@trafilea/afrodita-components 5.0.0-beta.91 → 5.0.0-beta.94
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 +14 -8
- package/build/index.esm.js +82 -74
- package/build/index.esm.js.map +1 -1
- package/build/index.js +82 -74
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -734,11 +734,12 @@ interface PriceLabelProps {
|
|
|
734
734
|
finalPriceStyled?: boolean;
|
|
735
735
|
finalPriceStyle?: React.CSSProperties;
|
|
736
736
|
originalPriceStyled?: boolean;
|
|
737
|
+
originalPriceUnderlined?: boolean;
|
|
737
738
|
testId?: string;
|
|
738
739
|
}
|
|
739
|
-
declare const PriceLabel: ({ finalPrice, originalPrice, discount, color, testId, finalPriceStyled, finalPriceStyle, originalPriceStyled, size, }: PriceLabelProps) => JSX.Element;
|
|
740
|
+
declare const PriceLabel: ({ finalPrice, originalPrice, discount, color, testId, finalPriceStyled, finalPriceStyle, originalPriceStyled, originalPriceUnderlined, size, }: PriceLabelProps) => JSX.Element;
|
|
740
741
|
|
|
741
|
-
declare const
|
|
742
|
+
declare const PriceLabelV2: ({ finalPrice, originalPrice, discount, color, testId, originalPriceStyled, originalPriceUnderlined, size, }: PriceLabelProps) => JSX.Element;
|
|
742
743
|
|
|
743
744
|
interface ColorPickerProps {
|
|
744
745
|
options: ColorPickerOption[];
|
|
@@ -765,8 +766,9 @@ interface ProductGalleryProps {
|
|
|
765
766
|
productImageDataTestId?: string;
|
|
766
767
|
previewListDataTestId?: string;
|
|
767
768
|
thumbnailPosition?: 'vertical' | 'horizontal';
|
|
769
|
+
borderRadiusVariant?: boolean;
|
|
768
770
|
}
|
|
769
|
-
declare const ProductGallery: ({ images, selectedValue, topTag, bottomTag, productImageDataTestId, previewListDataTestId, thumbnailPosition, }: ProductGalleryProps) => JSX.Element;
|
|
771
|
+
declare const ProductGallery: ({ images, selectedValue, topTag, bottomTag, productImageDataTestId, previewListDataTestId, thumbnailPosition, borderRadiusVariant, }: ProductGalleryProps) => JSX.Element;
|
|
770
772
|
|
|
771
773
|
interface RatingProps {
|
|
772
774
|
rating: number;
|
|
@@ -1314,16 +1316,18 @@ interface CategoryTagProps {
|
|
|
1314
1316
|
text: string;
|
|
1315
1317
|
size: ComponentSize.Large | ComponentSize.Medium | ComponentSize.Small;
|
|
1316
1318
|
className?: string;
|
|
1319
|
+
styledBorder?: boolean;
|
|
1317
1320
|
}
|
|
1318
|
-
declare const CategoryTag: ({ text, size, className }: CategoryTagProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1321
|
+
declare const CategoryTag: ({ text, size, className, styledBorder }: CategoryTagProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1319
1322
|
|
|
1320
1323
|
interface SeasonOfferTagProps {
|
|
1321
1324
|
text: string;
|
|
1322
1325
|
backgroundColor?: string;
|
|
1323
1326
|
size: ComponentSize.Large | ComponentSize.Medium | ComponentSize.Small;
|
|
1324
1327
|
className?: string;
|
|
1328
|
+
styledBorder?: boolean;
|
|
1325
1329
|
}
|
|
1326
|
-
declare const SeasonOfferTag: ({ text, backgroundColor, size, className, }: SeasonOfferTagProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1330
|
+
declare const SeasonOfferTag: ({ text, backgroundColor, size, className, styledBorder, }: SeasonOfferTagProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1327
1331
|
|
|
1328
1332
|
interface TimeProps {
|
|
1329
1333
|
hours: number;
|
|
@@ -1620,6 +1624,7 @@ interface ProductItemSmallMobileProps extends ProductItemProps {
|
|
|
1620
1624
|
topTag?: JSX.Element;
|
|
1621
1625
|
bottomTag?: JSX.Element;
|
|
1622
1626
|
onClick?: () => void;
|
|
1627
|
+
priceDisplayType?: 'default' | 'styled';
|
|
1623
1628
|
}
|
|
1624
1629
|
|
|
1625
1630
|
declare function withProductGrid<P extends ProductItemProps>(ProductItemComponent: React.FC<P>, data: ProductItemProps[]): {
|
|
@@ -1628,7 +1633,7 @@ declare function withProductGrid<P extends ProductItemProps>(ProductItemComponen
|
|
|
1628
1633
|
};
|
|
1629
1634
|
|
|
1630
1635
|
declare const Collection: {
|
|
1631
|
-
ProductItemMobile: ({ title, image, price, rating, size, alignName, url, className, topTag, bottomTag, onClick, }: ProductItemSmallMobileProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1636
|
+
ProductItemMobile: ({ title, image, price, rating, size, alignName, url, className, topTag, bottomTag, onClick, priceDisplayType, }: ProductItemSmallMobileProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1632
1637
|
withProductGrid: typeof withProductGrid;
|
|
1633
1638
|
};
|
|
1634
1639
|
|
|
@@ -1822,8 +1827,9 @@ interface ProductGalleryMobileProps {
|
|
|
1822
1827
|
bottomTag?: JSX.Element;
|
|
1823
1828
|
productImageDataTestId?: string;
|
|
1824
1829
|
slideDotsDataTestId?: string;
|
|
1830
|
+
borderRadiusVariant?: boolean;
|
|
1825
1831
|
}
|
|
1826
|
-
declare const ProductGalleryMobile: ({ images, selectedValue, topTag, bottomTag, productImageDataTestId, slideDotsDataTestId, }: ProductGalleryMobileProps) => JSX.Element;
|
|
1832
|
+
declare const ProductGalleryMobile: ({ images, selectedValue, topTag, bottomTag, productImageDataTestId, slideDotsDataTestId, borderRadiusVariant, }: ProductGalleryMobileProps) => JSX.Element;
|
|
1827
1833
|
|
|
1828
1834
|
interface RadioProps {
|
|
1829
1835
|
name: string;
|
|
@@ -2068,4 +2074,4 @@ declare const formatPrice: (value: number, { locale, currency }?: {
|
|
|
2068
2074
|
currency?: string | undefined;
|
|
2069
2075
|
}) => string;
|
|
2070
2076
|
|
|
2071
|
-
export { Accordion, AccordionOptions, AmazonButton, AssetsProvider, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, ButtonType, CTAProps, _default as Card, CardSectionType, CartProductItem, CategoryTag, Checkbox, Collection, ColorPickerOption, ComponentPosition, ComponentSize, index_d as CrossSell, DeliveryDetails, DiscountTag, Drawer, DropdownListIcons, DropdownListIconsItem, DropdownListIconsSubItem, DropdownOption, Filter, FilterChange, FilteringDropdown, Tags as FilteringTags, Filters, FitPredictor, Icon, IconButton, IconProps, IconWithOpacityProps, IconsWithTitle, Image, ImageType, Input, InputValidationType, Modal, MultiColorPicker, Note, OfferBanner, OrderBar, Overlay, PackSelector, Pagination, PaginatorBlog, Pattern, PaymentMethod, PaypalButton, Portal, PriceLabel,
|
|
2077
|
+
export { Accordion, AccordionOptions, AmazonButton, AssetsProvider, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, ButtonType, CTAProps, _default as Card, CardSectionType, CartProductItem, CategoryTag, Checkbox, Collection, ColorPickerOption, ComponentPosition, ComponentSize, index_d as CrossSell, DeliveryDetails, DiscountTag, Drawer, DropdownListIcons, DropdownListIconsItem, DropdownListIconsSubItem, DropdownOption, Filter, FilterChange, FilteringDropdown, Tags as FilteringTags, Filters, FitPredictor, Icon, IconButton, IconProps, IconWithOpacityProps, IconsWithTitle, Image, ImageType, Input, InputValidationType, Modal, MultiColorPicker, Note, OfferBanner, OrderBar, Overlay, PackSelector, Pagination, PaginatorBlog, Pattern, PaymentMethod, PaypalButton, Portal, PriceLabel, PriceLabelV2, ProductGallery, ProductGalleryMobile, ProgressBar, QuantityPicker, RadioGroupInput, RadioGroupOption, RadioInput, Rating, Review, ScrollToTop, SearchBar, SearchBarOptionItem, SearchNavigation, SeasonOfferTag, SimpleDropdown, SimpleOrderItem, SingleColorPicker, SizeFitGuide, SizeOption, SizeSelector, SizeTable, SliderNavigation, Spacing, Spinner, StarList, Tab, Tabs, Text, TextButton, TextWithImage, Theme, ThemeAssets, ThemeBasicPallete, ThemeBreakpoints, ThemeColorPallete, ThemeColors, ThemeComponent, ThemeFonts, ThemeProvider, ThemeTypography, ThemeVariables, Timer, Tooltip, Totals, WithTestId, decimalFormat, formatPrice, imageVideoProps, isEmail, isEmpty, isNumber, isPhoneNumber, isValidDate, modalEvent, simulateMouseClick, sliceString, useModal, useModalEvent, useOnClickOutside, useTheme, useThemeAssets, useWindowDimensions };
|
package/build/index.esm.js
CHANGED
|
@@ -3584,7 +3584,7 @@ var InputValidationType;
|
|
|
3584
3584
|
InputValidationType[InputValidationType["Empty"] = 2] = "Empty";
|
|
3585
3585
|
})(InputValidationType || (InputValidationType = {}));
|
|
3586
3586
|
|
|
3587
|
-
var Section = newStyled.div(templateObject_1$
|
|
3587
|
+
var Section = newStyled.div(templateObject_1$1f || (templateObject_1$1f = __makeTemplateObject(["\n font-weight: 600;\n display: flex;\n flex-direction: row;\n align-items: center;\n align-text: left;\n width: 100%;\n box-sizing: border-box;\n align-self: flex-start;\n padding: ", ";\n"], ["\n font-weight: 600;\n display: flex;\n flex-direction: row;\n align-items: center;\n align-text: left;\n width: 100%;\n box-sizing: border-box;\n align-self: flex-start;\n padding: ", ";\n"])), function (props) {
|
|
3588
3588
|
return props.type === CardSectionType.Header ? '1.5rem 1.5rem 0' : '0 1.5rem 1.5rem';
|
|
3589
3589
|
});
|
|
3590
3590
|
var CardHeader = function (_a) {
|
|
@@ -3595,14 +3595,14 @@ var CardFooter = function (_a) {
|
|
|
3595
3595
|
var children = _a.children;
|
|
3596
3596
|
return (jsx$1(Section, __assign$1({ type: CardSectionType.Footer }, { children: children }), void 0));
|
|
3597
3597
|
};
|
|
3598
|
-
var templateObject_1$
|
|
3598
|
+
var templateObject_1$1f;
|
|
3599
3599
|
|
|
3600
|
-
var Body = newStyled.div(templateObject_1$
|
|
3600
|
+
var Body = newStyled.div(templateObject_1$1e || (templateObject_1$1e = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 0.5rem 1.5rem;\n align-self: flex-start;\n"], ["\n display: flex;\n align-items: center;\n padding: 0.5rem 1.5rem;\n align-self: flex-start;\n"])));
|
|
3601
3601
|
var CardBody = function (_a) {
|
|
3602
3602
|
var children = _a.children;
|
|
3603
3603
|
return jsx$1(Body, { children: children }, void 0);
|
|
3604
3604
|
};
|
|
3605
|
-
var templateObject_1$
|
|
3605
|
+
var templateObject_1$1e;
|
|
3606
3606
|
|
|
3607
3607
|
var IGNORED_KEYS = ['typography', 'fonts'];
|
|
3608
3608
|
var applyVariablesIntoTheme = function (theme) {
|
|
@@ -3747,7 +3747,7 @@ var AssetsProvider = function (_a) {
|
|
|
3747
3747
|
};
|
|
3748
3748
|
var useThemeAssets = function () { return useContext(AssetsContext); };
|
|
3749
3749
|
|
|
3750
|
-
var Container$L = newStyled.div(templateObject_1$
|
|
3750
|
+
var Container$L = newStyled.div(templateObject_1$1d || (templateObject_1$1d = __makeTemplateObject(["\n ", "\n width: ", ";\n background: ", ";\n border-radius: ", ";\n border: ", ";\n"], ["\n ", "\n width: ", ";\n background: ", ";\n border-radius: ", ";\n border: ", ";\n"])), function (_a) {
|
|
3751
3751
|
var flex = _a.flex;
|
|
3752
3752
|
return flex &&
|
|
3753
3753
|
"display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;";
|
|
@@ -3767,7 +3767,7 @@ var Card$2 = Object.assign(Card$1, {
|
|
|
3767
3767
|
Footer: CardFooter,
|
|
3768
3768
|
Body: CardBody,
|
|
3769
3769
|
});
|
|
3770
|
-
var templateObject_1$
|
|
3770
|
+
var templateObject_1$1d;
|
|
3771
3771
|
|
|
3772
3772
|
var Fragment = Fragment$1;
|
|
3773
3773
|
function jsx(type, props, key) {
|
|
@@ -3909,7 +3909,7 @@ function BaseSelectOption(_a) {
|
|
|
3909
3909
|
return (jsx$1(Ee.Option, __assign$1({ className: className, as: as, value: value, disabled: disabled }, { children: children }), void 0));
|
|
3910
3910
|
}
|
|
3911
3911
|
|
|
3912
|
-
var CustomListBox = newStyled(Ee)(templateObject_1$
|
|
3912
|
+
var CustomListBox = newStyled(Ee)(templateObject_1$1c || (templateObject_1$1c = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
|
3913
3913
|
function BaseSelect(_a) {
|
|
3914
3914
|
var value = _a.value, onChange = _a.onChange, disabled = _a.disabled, children = _a.children, className = _a.className;
|
|
3915
3915
|
return (jsx$1(CustomListBox, __assign$1({ disabled: disabled, as: "div", value: value, onChange: onChange, className: className }, { children: children }), void 0));
|
|
@@ -3919,7 +3919,7 @@ var BaseSelect$1 = Object.assign(BaseSelect, {
|
|
|
3919
3919
|
Options: BaseSelectOptions,
|
|
3920
3920
|
Option: BaseSelectOption,
|
|
3921
3921
|
});
|
|
3922
|
-
var templateObject_1$
|
|
3922
|
+
var templateObject_1$1c;
|
|
3923
3923
|
|
|
3924
3924
|
var CustomButton = newStyled.button(function (_a) {
|
|
3925
3925
|
var theme = _a.theme, wide = _a.wide, isSortOrFilter = _a.isSortOrFilter;
|
|
@@ -4132,7 +4132,7 @@ var CustomCheckboxStyles = {
|
|
|
4132
4132
|
},
|
|
4133
4133
|
};
|
|
4134
4134
|
|
|
4135
|
-
var Container$K = newStyled.div(templateObject_1$
|
|
4135
|
+
var Container$K = newStyled.div(templateObject_1$1b || (templateObject_1$1b = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"])));
|
|
4136
4136
|
var CustomCheckbox = newStyled.div(CustomCheckboxStyles.baseStyles, function (props) { return [
|
|
4137
4137
|
CustomCheckboxStyles[props.size](props.theme),
|
|
4138
4138
|
CustomCheckboxStyles[props.variant](props.theme, props.isChecked, props.disabled),
|
|
@@ -4168,7 +4168,7 @@ var Checkbox = function (_a) {
|
|
|
4168
4168
|
}, []);
|
|
4169
4169
|
return (jsxs$1(Container$K, { children: [jsx$1(Input$3, { type: "checkbox", checked: isChecked, disabled: disabled, onChange: handleChange, id: id }, void 0), jsx$1(CustomCheckbox, __assign$1({ theme: theme, size: size, disabled: disabled, isChecked: isChecked, "data-testid": "checkbox", variant: variant }, { children: isChecked && jsx$1(Icon.Actions.Check, { fill: "#fff" }, void 0) }), void 0), jsx$1(Label$3, __assign$1({ "data-testid": "checkbox-text", size: size, variant: isChecked ? 'demi' : 'regular', htmlFor: id, disabled: disabled }, { children: text }), void 0)] }, void 0));
|
|
4170
4170
|
};
|
|
4171
|
-
var templateObject_1$
|
|
4171
|
+
var templateObject_1$1b, templateObject_2$L;
|
|
4172
4172
|
|
|
4173
4173
|
var CustomOption = newStyled.li(function (_a) {
|
|
4174
4174
|
var theme = _a.theme, selected = _a.selected, active = _a.active;
|
|
@@ -4305,11 +4305,11 @@ var SelectorSecondary = function (_a) {
|
|
|
4305
4305
|
// This defines which HTML tag to render for each `variant`, it also defines
|
|
4306
4306
|
// `variants` styles that are consistent through all themes.
|
|
4307
4307
|
var TAGS = {
|
|
4308
|
-
hero1: newStyled.h1(templateObject_1$
|
|
4308
|
+
hero1: newStyled.h1(templateObject_1$1a || (templateObject_1$1a = __makeTemplateObject([""], [""]))),
|
|
4309
4309
|
hero2: newStyled.h2(templateObject_2$K || (templateObject_2$K = __makeTemplateObject([""], [""]))),
|
|
4310
4310
|
hero3: newStyled.h3(templateObject_3$x || (templateObject_3$x = __makeTemplateObject([""], [""]))),
|
|
4311
|
-
display1: newStyled.h1(templateObject_4$
|
|
4312
|
-
display2: newStyled.h2(templateObject_5$
|
|
4311
|
+
display1: newStyled.h1(templateObject_4$n || (templateObject_4$n = __makeTemplateObject([""], [""]))),
|
|
4312
|
+
display2: newStyled.h2(templateObject_5$d || (templateObject_5$d = __makeTemplateObject([""], [""]))),
|
|
4313
4313
|
heading1: newStyled.h1(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject([""], [""]))),
|
|
4314
4314
|
heading2: newStyled.h2(templateObject_7$5 || (templateObject_7$5 = __makeTemplateObject([""], [""]))),
|
|
4315
4315
|
heading3: newStyled.h3(templateObject_8$3 || (templateObject_8$3 = __makeTemplateObject([""], [""]))),
|
|
@@ -4428,9 +4428,9 @@ var DEFAULTS = {
|
|
|
4428
4428
|
size: 'regular',
|
|
4429
4429
|
},
|
|
4430
4430
|
};
|
|
4431
|
-
var templateObject_1$
|
|
4431
|
+
var templateObject_1$1a, templateObject_2$K, templateObject_3$x, templateObject_4$n, templateObject_5$d, templateObject_6$8, templateObject_7$5, templateObject_8$3, templateObject_9$1, templateObject_10$1, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17;
|
|
4432
4432
|
|
|
4433
|
-
var ButtonsContainer = newStyled.div(templateObject_1$
|
|
4433
|
+
var ButtonsContainer = newStyled.div(templateObject_1$19 || (templateObject_1$19 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n margin: ", ";\n"], ["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n margin: ", ";\n"])), function (_a) {
|
|
4434
4434
|
var inline = _a.inline;
|
|
4435
4435
|
return (inline ? '0 0 0 10px' : '8px 0 0 0');
|
|
4436
4436
|
});
|
|
@@ -4448,7 +4448,7 @@ var SizeSelector = function (_a) {
|
|
|
4448
4448
|
}, size: ComponentSize.Medium, text: size.label, active: active, disabled: size.disabled, onClick: function () { return onChange(size); }, testId: "size-variant-".concat(size.label.split('/')[0]), width: width }, size.label));
|
|
4449
4449
|
}) }), void 0)] }), void 0));
|
|
4450
4450
|
};
|
|
4451
|
-
var templateObject_1$
|
|
4451
|
+
var templateObject_1$19;
|
|
4452
4452
|
|
|
4453
4453
|
var getStylesBySize$7 = function (size) {
|
|
4454
4454
|
switch (size) {
|
|
@@ -4475,7 +4475,7 @@ var textButtonStyles$1 = function (theme, size) {
|
|
|
4475
4475
|
} });
|
|
4476
4476
|
};
|
|
4477
4477
|
var withContainer = function (iconFill, isLeading, Icon) {
|
|
4478
|
-
return Icon && (jsx("span", __assign$1({ css: css(templateObject_1$
|
|
4478
|
+
return Icon && (jsx("span", __assign$1({ css: css(templateObject_1$18 || (templateObject_1$18 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n ", "\n "], ["\n display: flex;\n align-items: center;\n ", "\n "])), isLeading ? 'margin-right: 5px' : 'margin-left: 5px') }, { children: jsx(Icon, { width: 1.25, height: 1.25, fill: iconFill }, void 0) }), void 0));
|
|
4479
4479
|
};
|
|
4480
4480
|
var getIconFill = function (theme, disabled, iconColor) {
|
|
4481
4481
|
if (disabled)
|
|
@@ -4491,16 +4491,16 @@ var TextButton = function (_a) {
|
|
|
4491
4491
|
var iconFill = getIconFill(theme, disabled, iconColor);
|
|
4492
4492
|
return (jsx(BaseButton, __assign$1({ renderLeading: withContainer(iconFill, true, LeadingIcon), renderTrailing: withContainer(iconFill, false, TrailingIcon), disabled: disabled, type: type, onClick: onClick, css: textButtonStyles$1(theme, size), uppercase: uppercase }, { children: text }), void 0));
|
|
4493
4493
|
};
|
|
4494
|
-
var templateObject_1$
|
|
4494
|
+
var templateObject_1$18;
|
|
4495
4495
|
|
|
4496
|
-
var Container$J = newStyled.div(templateObject_1$
|
|
4496
|
+
var Container$J = newStyled.div(templateObject_1$17 || (templateObject_1$17 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 0.88rem;\n"], ["\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 0.88rem;\n"])));
|
|
4497
4497
|
var P$3 = newStyled.p(templateObject_2$J || (templateObject_2$J = __makeTemplateObject(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
|
|
4498
4498
|
var PercentageSpan = newStyled.span(templateObject_3$w || (templateObject_3$w = __makeTemplateObject(["\n font-weight: 700;\n text-decoration-line: underline;\n cursor: pointer;\n"], ["\n font-weight: 700;\n text-decoration-line: underline;\n cursor: pointer;\n"])));
|
|
4499
4499
|
var SizeFitGuide = function (_a) {
|
|
4500
4500
|
var title = _a.title, fitPercentage = _a.fitPercentage, onClick = _a.onClick, onClickFitPercentage = _a.onClickFitPercentage;
|
|
4501
4501
|
return (jsxs$1(Container$J, { children: [jsx$1(TextButton, { LeadingIcon: Icon.PDP.Rule, size: ComponentSize.Small, text: title, onClick: onClick, uppercase: false }, void 0), !!fitPercentage && (jsxs$1(P$3, { children: ["Fit As Expected:", ' ', jsxs$1(PercentageSpan, __assign$1({ onClick: onClickFitPercentage, role: "button" }, { children: [fitPercentage, "%"] }), void 0)] }, void 0))] }, void 0));
|
|
4502
4502
|
};
|
|
4503
|
-
var templateObject_1$
|
|
4503
|
+
var templateObject_1$17, templateObject_2$J, templateObject_3$w;
|
|
4504
4504
|
|
|
4505
4505
|
var getStylesBySize$6 = function (size) {
|
|
4506
4506
|
switch (size) {
|
|
@@ -4530,7 +4530,7 @@ var getStylesBySize$6 = function (size) {
|
|
|
4530
4530
|
};
|
|
4531
4531
|
}
|
|
4532
4532
|
};
|
|
4533
|
-
var Container$I = newStyled.div(templateObject_1$
|
|
4533
|
+
var Container$I = newStyled.div(templateObject_1$16 || (templateObject_1$16 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n padding: ", ";\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: ", ";\n height: ", ";\n text-align: center;\n cursor: default;\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n padding: ", ";\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: ", ";\n height: ", ";\n text-align: center;\n cursor: default;\n"])), function (_a) {
|
|
4534
4534
|
var backgroundColor = _a.backgroundColor;
|
|
4535
4535
|
return backgroundColor;
|
|
4536
4536
|
}, function (_a) {
|
|
@@ -4569,7 +4569,7 @@ var DiscountTag = function (_a) {
|
|
|
4569
4569
|
var theme = useTheme();
|
|
4570
4570
|
return (jsx$1(Container$I, __assign$1({ backgroundColor: disabled ? theme.colors.shades['50'].color : backgroundColor, borderColor: disabled ? theme.colors.shades['50'].color : borderColor, size: size, "data-testid": "discount-container" }, { children: jsxs$1(H3$2, __assign$1({ textColor: disabled ? theme.colors.shades['250'].color : textColor, size: size, style: style }, { children: [discount, "% ", offText] }), void 0) }), void 0));
|
|
4571
4571
|
};
|
|
4572
|
-
var templateObject_1$
|
|
4572
|
+
var templateObject_1$16, templateObject_2$I;
|
|
4573
4573
|
|
|
4574
4574
|
var getStylesBySize$5 = function (size) {
|
|
4575
4575
|
switch (size) {
|
|
@@ -4599,7 +4599,7 @@ var getStylesBySize$5 = function (size) {
|
|
|
4599
4599
|
};
|
|
4600
4600
|
}
|
|
4601
4601
|
};
|
|
4602
|
-
var Container$H = newStyled.div(templateObject_1$
|
|
4602
|
+
var Container$H = newStyled.div(templateObject_1$15 || (templateObject_1$15 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
|
|
4603
4603
|
var Price = newStyled.p(templateObject_2$H || (templateObject_2$H = __makeTemplateObject(["\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-decoration: ", ";\n margin: ", ";\n margin-top: ", ";\n"], ["\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-decoration: ", ";\n margin: ", ";\n margin-top: ", ";\n"])), function (_a) {
|
|
4604
4604
|
var weight = _a.weight;
|
|
4605
4605
|
return (weight ? weight : '400');
|
|
@@ -4634,8 +4634,6 @@ var TagContainer = newStyled.p(templateObject_3$v || (templateObject_3$v = __mak
|
|
|
4634
4634
|
var size = _a.size;
|
|
4635
4635
|
return (_b = getStylesBySize$5(size)) === null || _b === void 0 ? void 0 : _b.margin;
|
|
4636
4636
|
});
|
|
4637
|
-
var FinalPriceContainer = newStyled.div(templateObject_4$n || (templateObject_4$n = __makeTemplateObject(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
|
|
4638
|
-
var FinalPriceStyledContainer = newStyled.div(templateObject_5$d || (templateObject_5$d = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
4639
4637
|
function getTestId() {
|
|
4640
4638
|
var args = [];
|
|
4641
4639
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -4644,25 +4642,22 @@ function getTestId() {
|
|
|
4644
4642
|
return args.filter(Boolean).join('-');
|
|
4645
4643
|
}
|
|
4646
4644
|
var PriceLabel = function (_a) {
|
|
4647
|
-
var finalPrice = _a.finalPrice, originalPrice = _a.originalPrice, discount = _a.discount, color = _a.color, testId = _a.testId, _b = _a.finalPriceStyled, finalPriceStyled = _b === void 0 ? false : _b, finalPriceStyle = _a.finalPriceStyle, _c = _a.originalPriceStyled, originalPriceStyled = _c === void 0 ? false : _c, _d = _a.size, size =
|
|
4645
|
+
var finalPrice = _a.finalPrice, originalPrice = _a.originalPrice, discount = _a.discount, color = _a.color, testId = _a.testId, _b = _a.finalPriceStyled, finalPriceStyled = _b === void 0 ? false : _b, finalPriceStyle = _a.finalPriceStyle, _c = _a.originalPriceStyled, originalPriceStyled = _c === void 0 ? false : _c, _d = _a.originalPriceUnderlined, originalPriceUnderlined = _d === void 0 ? true : _d, _e = _a.size, size = _e === void 0 ? ComponentSize.Medium : _e;
|
|
4648
4646
|
var theme = useTheme();
|
|
4649
|
-
var finalPriceArray = typeof finalPrice === 'string' && finalPrice.includes('.') && finalPrice.includes('$')
|
|
4650
|
-
? finalPrice.split('$')[1].split('.')
|
|
4651
|
-
: ['', ''];
|
|
4652
|
-
var availableFinalPriceStyled = finalPriceStyled && finalPriceArray[0];
|
|
4653
4647
|
var priceCommonProps = {
|
|
4654
4648
|
size: finalPriceStyled ? ComponentSize.Small : size,
|
|
4655
4649
|
color: color || theme.colors.pallete.secondary.color,
|
|
4656
4650
|
weight: 700,
|
|
4657
4651
|
};
|
|
4658
|
-
var OriginalPrice = function () { return (jsx$1(Price, __assign$1({ size: originalPriceStyled ? size : ComponentSize.Small, color: theme.colors.shades['300'].color, margin: true, underlined:
|
|
4659
|
-
return (jsxs$1(Container$H, { children: [
|
|
4652
|
+
var OriginalPrice = function () { return (jsx$1(Price, __assign$1({ size: originalPriceStyled ? size : ComponentSize.Small, color: theme.colors.shades['300'].color, margin: true, underlined: originalPriceUnderlined, "data-testid": getTestId(testId, 'original-product-price') }, { children: originalPrice }), void 0)); };
|
|
4653
|
+
return (jsxs$1(Container$H, { children: [jsx$1(Price, __assign$1({ margin: true, "data-testid": getTestId(testId, 'final-product-price') }, priceCommonProps, { style: finalPriceStyle }, { children: finalPrice }), void 0), originalPrice && jsx$1(OriginalPrice, {}, void 0), discount && (jsx$1(TagContainer, __assign$1({ size: size }, { children: jsx$1(DiscountTag, __assign$1({}, discount, { size: size }), void 0) }), void 0))] }, void 0));
|
|
4660
4654
|
};
|
|
4661
|
-
var templateObject_1$
|
|
4655
|
+
var templateObject_1$15, templateObject_2$H, templateObject_3$v;
|
|
4662
4656
|
|
|
4663
|
-
var
|
|
4657
|
+
var FinalPriceStyledContainer = newStyled.div(templateObject_1$14 || (templateObject_1$14 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
4658
|
+
var PriceLabelV2 = function (_a) {
|
|
4664
4659
|
var _b;
|
|
4665
|
-
var finalPrice = _a.finalPrice, originalPrice = _a.originalPrice, discount = _a.discount, color = _a.color, testId = _a.testId, _c = _a.originalPriceStyled, originalPriceStyled = _c === void 0 ? false : _c, _d = _a.size, size =
|
|
4660
|
+
var finalPrice = _a.finalPrice, originalPrice = _a.originalPrice, discount = _a.discount, color = _a.color, testId = _a.testId, _c = _a.originalPriceStyled, originalPriceStyled = _c === void 0 ? false : _c, _d = _a.originalPriceUnderlined, originalPriceUnderlined = _d === void 0 ? true : _d, _e = _a.size, size = _e === void 0 ? ComponentSize.Medium : _e;
|
|
4666
4661
|
var theme = useTheme();
|
|
4667
4662
|
var isDiffFinalAndOriginalPrice = originalPrice !== finalPrice;
|
|
4668
4663
|
var isOriginalPrice = originalPrice && isDiffFinalAndOriginalPrice;
|
|
@@ -4675,9 +4670,10 @@ var PriceLabelHomeColPDP = function (_a) {
|
|
|
4675
4670
|
color: color || theme.colors.pallete.secondary.color,
|
|
4676
4671
|
weight: 700,
|
|
4677
4672
|
};
|
|
4678
|
-
var OriginalPrice = function () { return (jsx$1(Price, __assign$1({ size: originalPriceStyled ? size : ComponentSize.Small, color: theme.colors.shades['300'].color, margin: true, underlined:
|
|
4673
|
+
var OriginalPrice = function () { return (jsx$1(Price, __assign$1({ size: originalPriceStyled ? size : ComponentSize.Small, color: theme.colors.shades['300'].color, margin: true, underlined: originalPriceUnderlined, "data-testid": getTestId(testId, 'original-product-price') }, { children: originalPrice }), void 0)); };
|
|
4679
4674
|
return (jsxs$1(Container$H, { children: [isOriginalPrice && jsx$1(OriginalPrice, {}, void 0), jsxs$1(FinalPriceStyledContainer, __assign$1({ "data-testid": getTestId(testId, 'final-product-price') }, { children: [jsx$1(Price, __assign$1({ margin: true, finalPriceStyledSmall: true, style: { fontSize: '14px', marginTop: '-5px' } }, priceCommonProps, { children: "$" }), void 0), jsx$1(Price, __assign$1({ finalPriceStyled: true }, priceCommonProps, { children: finalPriceArray[0] ? finalPriceArray[0] : (_b = "".concat(finalPrice)) === null || _b === void 0 ? void 0 : _b.split('$')[1] }), void 0), jsx$1(Price, __assign$1({ finalPriceStyledSmall: true, style: { fontSize: '14px', marginTop: '-6px' } }, priceCommonProps, { children: finalPriceArray[1] ? finalPriceArray[1] : '00' }), void 0)] }), void 0), isDiscount && (jsx$1(TagContainer, __assign$1({ size: ComponentSize.Small }, { children: discount && (jsx$1(DiscountTag, __assign$1({}, discount, { size: ComponentSize.Medium, style: { fontSize: '14px', letterSpacing: '-0.05rem' } }), void 0)) }), void 0))] }, void 0));
|
|
4680
|
-
};
|
|
4675
|
+
};
|
|
4676
|
+
var templateObject_1$14;
|
|
4681
4677
|
|
|
4682
4678
|
var OneColorSelector = function (_a) {
|
|
4683
4679
|
var color = _a.color, selected = _a.selected, testId = _a.testId;
|
|
@@ -4811,14 +4807,18 @@ var MultiColorPicker = function (_a) {
|
|
|
4811
4807
|
return (jsxs$1(ColorRadioGroup$1, __assign$1({ value: selectedColor, onChange: onChangeHandler }, { children: [jsx$1(ColorRadioGroup$1.Label, { label: label, values: valueLabels }, void 0), jsx$1(ColorRadioGroup$1.OptionsContainer, { children: renderOptions(selectedColor, options) }, void 0)] }), void 0));
|
|
4812
4808
|
};
|
|
4813
4809
|
|
|
4814
|
-
var Image$2 = newStyled.img(templateObject_1$11 || (templateObject_1$11 = __makeTemplateObject(["\n width: 4.063rem;\n height: 5.375rem;\n box-sizing: border-box;\n cursor: pointer;\n border: ", ";\n"], ["\n width: 4.063rem;\n height: 5.375rem;\n box-sizing: border-box;\n cursor: pointer;\n border: ", ";\n"])), function (_a) {
|
|
4810
|
+
var Image$2 = newStyled.img(templateObject_1$11 || (templateObject_1$11 = __makeTemplateObject(["\n ", "\n\n width: 4.063rem;\n height: 5.375rem;\n box-sizing: border-box;\n cursor: pointer;\n border: ", ";\n"], ["\n ", "\n\n width: 4.063rem;\n height: 5.375rem;\n box-sizing: border-box;\n cursor: pointer;\n border: ", ";\n"])), function (_a) {
|
|
4811
|
+
var borderRadiusVariant = _a.borderRadiusVariant;
|
|
4812
|
+
return borderRadiusVariant &&
|
|
4813
|
+
"\nborder-radius: 20px;\n";
|
|
4814
|
+
}, function (_a) {
|
|
4815
4815
|
var selected = _a.selected, theme = _a.theme;
|
|
4816
4816
|
return selected ? "0.063rem solid ".concat(theme.colors.shades['700'].color) : 'inherit';
|
|
4817
4817
|
});
|
|
4818
4818
|
var ImageSmallPreview = function (_a) {
|
|
4819
|
-
var imageUrl = _a.imageUrl, alt = _a.alt, _b = _a.selected, selected = _b === void 0 ? false : _b, className = _a.className;
|
|
4819
|
+
var imageUrl = _a.imageUrl, alt = _a.alt, _b = _a.selected, selected = _b === void 0 ? false : _b, className = _a.className, borderRadiusVariant = _a.borderRadiusVariant;
|
|
4820
4820
|
var theme = useTheme();
|
|
4821
|
-
return jsx$1(Image$2, { className: className, src: imageUrl, alt: alt, selected: selected, theme: theme }, void 0);
|
|
4821
|
+
return (jsx$1(Image$2, { className: className, src: imageUrl, alt: alt, selected: selected, theme: theme, borderRadiusVariant: borderRadiusVariant }, void 0));
|
|
4822
4822
|
};
|
|
4823
4823
|
var templateObject_1$11;
|
|
4824
4824
|
|
|
@@ -9137,12 +9137,12 @@ var Container$F = newStyled.div(templateObject_3$t || (templateObject_3$t = __ma
|
|
|
9137
9137
|
});
|
|
9138
9138
|
var Button$3 = newStyled.button(templateObject_4$l || (templateObject_4$l = __makeTemplateObject(["\n padding: 0;\n border: none;\n text-decoration: none;\n background: transparent;\n outline: none;\n"], ["\n padding: 0;\n border: none;\n text-decoration: none;\n background: transparent;\n outline: none;\n"])));
|
|
9139
9139
|
var ImagePreviewList = function (_a) {
|
|
9140
|
-
var images = _a.images, selectedImage = _a.selectedImage, onClick = _a.onClick, dataTestId = _a.dataTestId, position = _a.position;
|
|
9140
|
+
var images = _a.images, selectedImage = _a.selectedImage, onClick = _a.onClick, dataTestId = _a.dataTestId, position = _a.position, borderRadiusVariant = _a.borderRadiusVariant;
|
|
9141
9141
|
return (jsx$1(Container$F, __assign$1({ "data-testid": dataTestId, position: position, className: position }, { children: position == 'horizontal' ? (jsx$1("div", __assign$1({ style: { maxWidth: '360px' } }, { children: jsx$1(SliderNavigation, __assign$1({ speed: 200, infinite: false, arrows: {
|
|
9142
9142
|
arrowWidth: 0.75,
|
|
9143
9143
|
arrowHeight: 1.25,
|
|
9144
9144
|
arrowPadding: 1.625,
|
|
9145
|
-
}, adaptiveHeight: true, dots: false, slidesToShow: 4 }, { children: images.map(function (item) { return (jsx$1(Button$3, __assign$1({ onClick: function () { return onClick(item); } }, { children: jsx$1(ImageSmallPreview, { imageUrl: item.imageUrl, alt: item.alt, selected: item.key === selectedImage.key }, void 0) }), item.key)); }) }), void 0) }), void 0)) : (images.map(function (item) { return (jsx$1(Button$3, __assign$1({ onClick: function () { return onClick(item); } }, { children: jsx$1(ImageSmallPreview, { imageUrl: item.imageUrl, alt: item.alt, selected: item.key === selectedImage.key }, void 0) }), item.key)); })) }), void 0));
|
|
9145
|
+
}, adaptiveHeight: true, dots: false, slidesToShow: 4 }, { children: images.map(function (item) { return (jsx$1(Button$3, __assign$1({ onClick: function () { return onClick(item); } }, { children: jsx$1(ImageSmallPreview, { imageUrl: item.imageUrl, alt: item.alt, selected: item.key === selectedImage.key, borderRadiusVariant: borderRadiusVariant }, void 0) }), item.key)); }) }), void 0) }), void 0)) : (images.map(function (item) { return (jsx$1(Button$3, __assign$1({ onClick: function () { return onClick(item); } }, { children: jsx$1(ImageSmallPreview, { imageUrl: item.imageUrl, alt: item.alt, selected: item.key === selectedImage.key, borderRadiusVariant: borderRadiusVariant }, void 0) }), item.key)); })) }), void 0));
|
|
9146
9146
|
};
|
|
9147
9147
|
var templateObject_1$$, templateObject_2$E, templateObject_3$t, templateObject_4$l;
|
|
9148
9148
|
|
|
@@ -10730,29 +10730,33 @@ InnerImageZoom.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
10730
10730
|
afterZoomOut: PropTypes.func
|
|
10731
10731
|
} : {};
|
|
10732
10732
|
|
|
10733
|
-
var Container$E = newStyled.div(templateObject_1$_ || (templateObject_1$_ = __makeTemplateObject(["\n position: relative;\n height: '45rem' &.styleforhorizontal {\n height: '30rem';\n }\n display: block;\n height: fit-content;\n overflow: hidden;\n white-space: nowrap;\n grid-area: 1/2;\n"], ["\n position: relative;\n height: '45rem' &.styleforhorizontal {\n height: '30rem';\n }\n display: block;\n height: fit-content;\n overflow: hidden;\n white-space: nowrap;\n grid-area: 1/2;\n"])))
|
|
10734
|
-
var
|
|
10733
|
+
var Container$E = newStyled.div(templateObject_1$_ || (templateObject_1$_ = __makeTemplateObject(["\n ", "\n position: relative;\n height: '45rem' &.styleforhorizontal {\n height: '30rem';\n }\n display: block;\n height: fit-content;\n overflow: hidden;\n white-space: nowrap;\n grid-area: 1/2;\n"], ["\n ", "\n position: relative;\n height: '45rem' &.styleforhorizontal {\n height: '30rem';\n }\n display: block;\n height: fit-content;\n overflow: hidden;\n white-space: nowrap;\n grid-area: 1/2;\n"])), function (_a) {
|
|
10734
|
+
var borderRadiusVariant = _a.borderRadiusVariant;
|
|
10735
|
+
return borderRadiusVariant &&
|
|
10736
|
+
"\n border-radius: 40px;\n ";
|
|
10737
|
+
});
|
|
10738
|
+
var TopTagContainer$2 = newStyled.div(templateObject_2$D || (templateObject_2$D = __makeTemplateObject(["\n position: absolute;\n left: ", ";\n top: ", ";\n"], ["\n position: absolute;\n left: ", ";\n top: ", ";\n"])), function (props) { return (props.borderRadiusVariant ? '50px' : '0'); }, function (props) { return (props.borderRadiusVariant ? '10px' : '0'); });
|
|
10735
10739
|
var BottomTagContainer$2 = newStyled.div(templateObject_3$s || (templateObject_3$s = __makeTemplateObject(["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"], ["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"])));
|
|
10736
10740
|
var ImageProductWithTags$1 = function (_a) {
|
|
10737
|
-
var image = _a.image, topTag = _a.topTag, bottomTag = _a.bottomTag, testId = _a.testId, position = _a.position;
|
|
10738
|
-
return (jsxs$1(Container$E, __assign$1({ "data-testid": testId, className: "stylefor".concat(position) }, { children: [jsx$1(InnerImageZoom, { src: image.imageUrl, zoomSrc: image.imageUrl, zoomType: "hover", imgAttributes: {
|
|
10741
|
+
var image = _a.image, topTag = _a.topTag, bottomTag = _a.bottomTag, testId = _a.testId, position = _a.position, borderRadiusVariant = _a.borderRadiusVariant;
|
|
10742
|
+
return (jsxs$1(Container$E, __assign$1({ "data-testid": testId, className: "stylefor".concat(position), borderRadiusVariant: borderRadiusVariant }, { children: [jsx$1(InnerImageZoom, { src: image.imageUrl, zoomSrc: image.imageUrl, zoomType: "hover", imgAttributes: {
|
|
10739
10743
|
alt: image.alt,
|
|
10740
10744
|
style: { objectFit: 'cover', objectPosition: 'center' },
|
|
10741
|
-
}, width: position == 'horizontal' ? 360 : 530, height: position == 'horizontal' ? 480 : 720, hideHint: true }, void 0), jsx$1(TopTagContainer$2, { children: topTag }, void 0), jsx$1(BottomTagContainer$2, { children: bottomTag }, void 0)] }), void 0));
|
|
10745
|
+
}, width: position == 'horizontal' ? 360 : 530, height: position == 'horizontal' ? 480 : 720, hideHint: true }, void 0), jsx$1(TopTagContainer$2, __assign$1({ borderRadiusVariant: borderRadiusVariant }, { children: topTag }), void 0), jsx$1(BottomTagContainer$2, { children: bottomTag }, void 0)] }), void 0));
|
|
10742
10746
|
};
|
|
10743
10747
|
var templateObject_1$_, templateObject_2$D, templateObject_3$s;
|
|
10744
10748
|
|
|
10745
10749
|
var Container$D = newStyled.div(templateObject_1$Z || (templateObject_1$Z = __makeTemplateObject(["\n display: grid;\n grid-template-columns: max-content 1fr;\n grid-column-gap: 20px;\n max-height: 45rem;\n width: fit-content;\n"], ["\n display: grid;\n grid-template-columns: max-content 1fr;\n grid-column-gap: 20px;\n max-height: 45rem;\n width: fit-content;\n"])));
|
|
10746
10750
|
var ProductGallery = function (_a) {
|
|
10747
|
-
var images = _a.images, selectedValue = _a.selectedValue, topTag = _a.topTag, bottomTag = _a.bottomTag, productImageDataTestId = _a.productImageDataTestId, previewListDataTestId = _a.previewListDataTestId, thumbnailPosition = _a.thumbnailPosition;
|
|
10751
|
+
var images = _a.images, selectedValue = _a.selectedValue, topTag = _a.topTag, bottomTag = _a.bottomTag, productImageDataTestId = _a.productImageDataTestId, previewListDataTestId = _a.previewListDataTestId, thumbnailPosition = _a.thumbnailPosition, _b = _a.borderRadiusVariant, borderRadiusVariant = _b === void 0 ? false : _b;
|
|
10748
10752
|
var initialValue = selectedValue && images.includes(selectedValue) ? selectedValue : images[0];
|
|
10749
|
-
var
|
|
10753
|
+
var _c = useState(initialValue), selectedImage = _c[0], setSelectedImage = _c[1];
|
|
10750
10754
|
useEffect(function () {
|
|
10751
10755
|
setSelectedImage(initialValue);
|
|
10752
10756
|
}, [initialValue]);
|
|
10753
10757
|
return (jsxs$1(Container$D, { children: [jsx$1(ImagePreviewList, { images: images, selectedImage: selectedImage, dataTestId: previewListDataTestId, onClick: function (value) {
|
|
10754
10758
|
setSelectedImage(value);
|
|
10755
|
-
}, position: thumbnailPosition }, void 0), jsx$1(ImageProductWithTags$1, { image: selectedImage, topTag: topTag, bottomTag: bottomTag, testId: productImageDataTestId, position: thumbnailPosition }, void 0)] }, void 0));
|
|
10759
|
+
}, position: thumbnailPosition, borderRadiusVariant: borderRadiusVariant }, void 0), jsx$1(ImageProductWithTags$1, { image: selectedImage, topTag: topTag, bottomTag: bottomTag, testId: productImageDataTestId, position: thumbnailPosition, borderRadiusVariant: borderRadiusVariant }, void 0)] }, void 0));
|
|
10756
10760
|
};
|
|
10757
10761
|
var templateObject_1$Z;
|
|
10758
10762
|
|
|
@@ -11344,7 +11348,7 @@ var RadioGroupInput = function (_a) {
|
|
|
11344
11348
|
}) }), void 0));
|
|
11345
11349
|
};
|
|
11346
11350
|
|
|
11347
|
-
var Wrapper$3 = newStyled.div(templateObject_1$R || (templateObject_1$R = __makeTemplateObject(["\n padding: 12px 58px;\n"], ["\n padding: 12px 58px;\n"])));
|
|
11351
|
+
var Wrapper$3 = newStyled.div(templateObject_1$R || (templateObject_1$R = __makeTemplateObject(["\n padding: 12px 58px;\n @media (max-width: 768px) {\n padding: 0.625rem 1.5rem;\n }\n"], ["\n padding: 12px 58px;\n @media (max-width: 768px) {\n padding: 0.625rem 1.5rem;\n }\n"])));
|
|
11348
11352
|
var Container$w = newStyled.div(templateObject_2$z || (templateObject_2$z = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"], ["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
11349
11353
|
var Minimalistic = function (_a) {
|
|
11350
11354
|
var _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#FFF6EF' : _b, _c = _a.borderColor, borderColor = _c === void 0 ? '#E7C9B2' : _c, originalPrice = _a.originalPrice, price = _a.price, savingPrice = _a.savingPrice, getMorePayLessText = _a.getMorePayLessText, youAreSavingText = _a.youAreSavingText, getQtyForText = _a.getQtyForText, discount = _a.discount, offText = _a.offText, _d = _a.widthAuto, widthAuto = _d === void 0 ? false : _d, _e = _a.testId, testId = _e === void 0 ? 'minimalistic' : _e;
|
|
@@ -11376,12 +11380,12 @@ var Tag$1 = function (_a) {
|
|
|
11376
11380
|
};
|
|
11377
11381
|
var templateObject_1$P;
|
|
11378
11382
|
|
|
11379
|
-
var getStylesBySize$2 = function (size) {
|
|
11383
|
+
var getStylesBySize$2 = function (size, styledBorder) {
|
|
11380
11384
|
switch (size) {
|
|
11381
11385
|
case ComponentSize.Large:
|
|
11382
11386
|
return {
|
|
11383
11387
|
padding: '0.125rem 1.25rem 0 1.25rem',
|
|
11384
|
-
borderRadius: '0 0.25rem 0.25rem 0',
|
|
11388
|
+
borderRadius: styledBorder ? '20px' : '0 0.25rem 0.25rem 0',
|
|
11385
11389
|
fontSize: '0.875rem',
|
|
11386
11390
|
lineHeight: '0.875rem',
|
|
11387
11391
|
height: '1.5rem',
|
|
@@ -11389,7 +11393,7 @@ var getStylesBySize$2 = function (size) {
|
|
|
11389
11393
|
case ComponentSize.Medium:
|
|
11390
11394
|
return {
|
|
11391
11395
|
padding: '0.063rem 0.625rem',
|
|
11392
|
-
borderRadius: '0 0.25rem 0.25rem 0',
|
|
11396
|
+
borderRadius: styledBorder ? '20px' : '0 0.25rem 0.25rem 0',
|
|
11393
11397
|
fontSize: '0.625rem',
|
|
11394
11398
|
lineHeight: '0.625rem',
|
|
11395
11399
|
height: '1rem',
|
|
@@ -11397,7 +11401,7 @@ var getStylesBySize$2 = function (size) {
|
|
|
11397
11401
|
case ComponentSize.Small:
|
|
11398
11402
|
return {
|
|
11399
11403
|
padding: '0.125rem 0.625rem',
|
|
11400
|
-
borderRadius: '0 0.125em 0.125rem 0',
|
|
11404
|
+
borderRadius: styledBorder ? '20px' : '0 0.125em 0.125rem 0',
|
|
11401
11405
|
fontSize: '0.5rem',
|
|
11402
11406
|
lineHeight: '0.75rem',
|
|
11403
11407
|
height: '0.875rem',
|
|
@@ -11405,18 +11409,18 @@ var getStylesBySize$2 = function (size) {
|
|
|
11405
11409
|
}
|
|
11406
11410
|
};
|
|
11407
11411
|
var CategoryTag = function (_a) {
|
|
11408
|
-
var text = _a.text, size = _a.size, className = _a.className;
|
|
11412
|
+
var text = _a.text, size = _a.size, className = _a.className, _b = _a.styledBorder, styledBorder = _b === void 0 ? false : _b;
|
|
11409
11413
|
var theme = useTheme();
|
|
11410
|
-
var stylesBySize = getStylesBySize$2(size);
|
|
11414
|
+
var stylesBySize = getStylesBySize$2(size, styledBorder);
|
|
11411
11415
|
return (jsx(Tag$1, { css: __assign$1({ backgroundColor: theme.colors.shades.white.color, fontWeight: 600, color: theme.colors.shades['700'].color }, stylesBySize), text: text, className: className }, void 0));
|
|
11412
11416
|
};
|
|
11413
11417
|
|
|
11414
|
-
var getStylesBySize$1 = function (size) {
|
|
11418
|
+
var getStylesBySize$1 = function (size, styledBorder) {
|
|
11415
11419
|
switch (size) {
|
|
11416
11420
|
case ComponentSize.Large:
|
|
11417
11421
|
return {
|
|
11418
11422
|
padding: '0.5rem 1rem',
|
|
11419
|
-
borderRadius: '0 0 0.25rem 0',
|
|
11423
|
+
borderRadius: styledBorder ? '20px' : '0 0 0.25rem 0',
|
|
11420
11424
|
fontSize: '0.75rem',
|
|
11421
11425
|
lineHeight: '1rem',
|
|
11422
11426
|
letterSpacing: '0.16em',
|
|
@@ -11424,7 +11428,7 @@ var getStylesBySize$1 = function (size) {
|
|
|
11424
11428
|
case ComponentSize.Medium:
|
|
11425
11429
|
return {
|
|
11426
11430
|
padding: '0.375rem 0.625rem 0.25rem',
|
|
11427
|
-
borderRadius: '0 0 0.25rem 0',
|
|
11431
|
+
borderRadius: styledBorder ? '20px' : '0 0 0.25rem 0',
|
|
11428
11432
|
fontSize: '0.625rem',
|
|
11429
11433
|
lineHeight: '0.875rem',
|
|
11430
11434
|
letterSpacing: '0.16em',
|
|
@@ -11432,7 +11436,7 @@ var getStylesBySize$1 = function (size) {
|
|
|
11432
11436
|
case ComponentSize.Small:
|
|
11433
11437
|
return {
|
|
11434
11438
|
padding: '0.125rem 0.5rem',
|
|
11435
|
-
borderRadius: '0 0 0.25rem 0',
|
|
11439
|
+
borderRadius: styledBorder ? '20px' : '0 0 0.25rem 0',
|
|
11436
11440
|
fontSize: '0.5rem',
|
|
11437
11441
|
lineHeight: '0.875rem',
|
|
11438
11442
|
letterSpacing: '0.16em',
|
|
@@ -11440,8 +11444,8 @@ var getStylesBySize$1 = function (size) {
|
|
|
11440
11444
|
}
|
|
11441
11445
|
};
|
|
11442
11446
|
var SeasonOfferTag = function (_a) {
|
|
11443
|
-
var text = _a.text, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#C64844' : _b, size = _a.size, className = _a.className;
|
|
11444
|
-
var stylesBySize = getStylesBySize$1(size);
|
|
11447
|
+
var text = _a.text, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#C64844' : _b, size = _a.size, className = _a.className, _c = _a.styledBorder, styledBorder = _c === void 0 ? false : _c;
|
|
11448
|
+
var stylesBySize = getStylesBySize$1(size, styledBorder);
|
|
11445
11449
|
return (jsx(Tag$1, { css: __assign$1({ backgroundColor: backgroundColor, fontWeight: 700, color: '#FFFFFF' }, stylesBySize), text: text, className: className }, void 0));
|
|
11446
11450
|
};
|
|
11447
11451
|
|
|
@@ -12184,7 +12188,7 @@ var getStylesBySize = function (size) {
|
|
|
12184
12188
|
var TopTagContainer$1 = newStyled.div(templateObject_3$e || (templateObject_3$e = __makeTemplateObject(["\n position: absolute;\n left: 0;\n top: 0;\n width: inherit;\n"], ["\n position: absolute;\n left: 0;\n top: 0;\n width: inherit;\n"])));
|
|
12185
12189
|
var BottomTagContainer$1 = newStyled.div(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject(["\n position: absolute;\n bottom: 15%;\n left: 0;\n width: inherit;\n"], ["\n position: absolute;\n bottom: 15%;\n left: 0;\n width: inherit;\n"])));
|
|
12186
12190
|
var ProductItemMobile = function (_a) {
|
|
12187
|
-
var title = _a.title, image = _a.image, price = _a.price, rating = _a.rating, size = _a.size, _b = _a.alignName, alignName = _b === void 0 ? 'center' : _b, url = _a.url, className = _a.className, topTag = _a.topTag, bottomTag = _a.bottomTag, onClick = _a.onClick;
|
|
12191
|
+
var title = _a.title, image = _a.image, price = _a.price, rating = _a.rating, size = _a.size, _b = _a.alignName, alignName = _b === void 0 ? 'center' : _b, url = _a.url, className = _a.className, topTag = _a.topTag, bottomTag = _a.bottomTag, onClick = _a.onClick, _c = _a.priceDisplayType, priceDisplayType = _c === void 0 ? 'default' : _c;
|
|
12188
12192
|
var theme = useTheme();
|
|
12189
12193
|
var styles = getStylesBySize(size);
|
|
12190
12194
|
var space = useMemo(function () {
|
|
@@ -12195,7 +12199,7 @@ var ProductItemMobile = function (_a) {
|
|
|
12195
12199
|
_a[ComponentSize.Small] = 2,
|
|
12196
12200
|
_a)[size];
|
|
12197
12201
|
}, [size]);
|
|
12198
|
-
return (jsxs(Container$j, __assign$1({ as: url ? 'a' : 'div', href: url, className: className, onClick: onClick }, { children: [!!topTag || !!bottomTag ? (jsxs(ImageContainer, __assign$1({ width: styles === null || styles === void 0 ? void 0 : styles.width, height: styles === null || styles === void 0 ? void 0 : styles.height, "data-testid": "tags-image-container" }, { children: [jsx(Image, { src: image.src, alt: image.alt, width: "100%", height: "100%" }, void 0), jsx(TopTagContainer$1, { children: topTag }, void 0), jsx(BottomTagContainer$1, { children: bottomTag }, void 0)] }), void 0)) : (jsx(Image, { src: image.src, alt: image.alt, width: styles === null || styles === void 0 ? void 0 : styles.width, height: styles === null || styles === void 0 ? void 0 : styles.height }, void 0)), jsx(Spacing, { size: space }, void 0), jsx(Title$2, __assign$1({ theme: theme, align: alignName }, { children: title }), void 0), jsx(Spacing, { size: space }, void 0), jsx(
|
|
12202
|
+
return (jsxs(Container$j, __assign$1({ as: url ? 'a' : 'div', href: url, className: className, onClick: onClick }, { children: [!!topTag || !!bottomTag ? (jsxs(ImageContainer, __assign$1({ width: styles === null || styles === void 0 ? void 0 : styles.width, height: styles === null || styles === void 0 ? void 0 : styles.height, "data-testid": "tags-image-container" }, { children: [jsx(Image, { src: image.src, alt: image.alt, width: "100%", height: "100%" }, void 0), jsx(TopTagContainer$1, { children: topTag }, void 0), jsx(BottomTagContainer$1, { children: bottomTag }, void 0)] }), void 0)) : (jsx(Image, { src: image.src, alt: image.alt, width: styles === null || styles === void 0 ? void 0 : styles.width, height: styles === null || styles === void 0 ? void 0 : styles.height }, void 0)), jsx(Spacing, { size: space }, void 0), jsx(Title$2, __assign$1({ theme: theme, align: alignName }, { children: title }), void 0), jsx(Spacing, { size: space }, void 0), priceDisplayType === 'styled' ? (jsx(PriceLabelV2, { finalPrice: price.finalPrice, originalPrice: price.originalPrice, finalPriceStyled: false, color: price.color, size: ComponentSize.Large, testId: "volume-discount" }, void 0)) : (jsx(PriceLabel, { finalPrice: price.finalPrice, originalPrice: price.originalPrice, finalPriceStyled: false, color: price.color, size: ComponentSize.Medium, testId: "volume-discount" }, void 0)), jsx(Spacing, { size: space }, void 0), jsx(Rating, { size: size === ComponentSize.Large ? ComponentSize.Small : ComponentSize.XSmall, rating: rating.rating, reviews: rating.reviews, reviewsText: "", wrapWithParenthesis: true }, void 0)] }), void 0));
|
|
12199
12203
|
};
|
|
12200
12204
|
var templateObject_1$s, templateObject_2$g, templateObject_3$e, templateObject_4$8;
|
|
12201
12205
|
|
|
@@ -12876,12 +12880,16 @@ function useSwipeable(options) {
|
|
|
12876
12880
|
return handlers;
|
|
12877
12881
|
}
|
|
12878
12882
|
|
|
12879
|
-
var Container$b = newStyled.div(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["\n position: relative;\n max-height: 31.875rem;\n overflow: hidden;\n"], ["\n position: relative;\n max-height: 31.875rem;\n overflow: hidden;\n"])))
|
|
12880
|
-
var
|
|
12883
|
+
var Container$b = newStyled.div(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["\n ", "\n position: relative;\n max-height: 31.875rem;\n overflow: hidden;\n"], ["\n ", "\n position: relative;\n max-height: 31.875rem;\n overflow: hidden;\n"])), function (_a) {
|
|
12884
|
+
var borderRadiusVariant = _a.borderRadiusVariant;
|
|
12885
|
+
return borderRadiusVariant &&
|
|
12886
|
+
"\n border-radius: 40px;\n ";
|
|
12887
|
+
});
|
|
12888
|
+
var TopTagContainer = newStyled.div(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n position: absolute;\n left: ", ";\n top: ", ";\n"], ["\n position: absolute;\n left: ", ";\n top: ", ";\n"])), function (props) { return (props.borderRadiusVariant ? '13px' : '0'); }, function (props) { return (props.borderRadiusVariant ? '11px' : '0'); });
|
|
12881
12889
|
var BottomTagContainer = newStyled.div(templateObject_3$a || (templateObject_3$a = __makeTemplateObject(["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"], ["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"])));
|
|
12882
12890
|
var ImageProductWithTags = forwardRef(function ImageProductWithTags(_a, ref) {
|
|
12883
|
-
var image = _a.image, topTag = _a.topTag, bottomTag = _a.bottomTag, testId = _a.testId;
|
|
12884
|
-
return (jsxs$1(Container$b, __assign$1({ "data-testid": testId, ref: ref }, { children: [jsx$1(InnerImageZoom, { src: image.imageUrl, zoomSrc: image.imageUrl, zoomType: "hover", imgAttributes: { alt: image.alt, width: '100%', height: '510px' }, height: 510, fullscreenOnMobile: true, className: "zoomWrapper" }, void 0), jsx$1(TopTagContainer, { children: topTag }, void 0), jsx$1(BottomTagContainer, { children: bottomTag }, void 0)] }), void 0));
|
|
12891
|
+
var image = _a.image, topTag = _a.topTag, bottomTag = _a.bottomTag, testId = _a.testId, borderRadiusVariant = _a.borderRadiusVariant;
|
|
12892
|
+
return (jsxs$1(Container$b, __assign$1({ "data-testid": testId, ref: ref, borderRadiusVariant: borderRadiusVariant }, { children: [jsx$1(InnerImageZoom, { src: image.imageUrl, zoomSrc: image.imageUrl, zoomType: "hover", imgAttributes: { alt: image.alt, width: '100%', height: '510px' }, height: 510, fullscreenOnMobile: true, className: "zoomWrapper" }, void 0), jsx$1(TopTagContainer, __assign$1({ borderRadiusVariant: borderRadiusVariant }, { children: topTag }), void 0), jsx$1(BottomTagContainer, { children: bottomTag }, void 0)] }), void 0));
|
|
12885
12893
|
});
|
|
12886
12894
|
var templateObject_1$j, templateObject_2$a, templateObject_3$a;
|
|
12887
12895
|
|
|
@@ -12921,15 +12929,15 @@ var templateObject_1$g, templateObject_2$9, templateObject_3$9;
|
|
|
12921
12929
|
|
|
12922
12930
|
var Container$9 = newStyled.div(templateObject_1$f || (templateObject_1$f = __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"])));
|
|
12923
12931
|
var ProductGalleryMobile = function (_a) {
|
|
12924
|
-
var images = _a.images, selectedValue = _a.selectedValue, topTag = _a.topTag, bottomTag = _a.bottomTag, productImageDataTestId = _a.productImageDataTestId, slideDotsDataTestId = _a.slideDotsDataTestId;
|
|
12925
|
-
var
|
|
12932
|
+
var images = _a.images, selectedValue = _a.selectedValue, topTag = _a.topTag, bottomTag = _a.bottomTag, productImageDataTestId = _a.productImageDataTestId, slideDotsDataTestId = _a.slideDotsDataTestId, _b = _a.borderRadiusVariant, borderRadiusVariant = _b === void 0 ? false : _b;
|
|
12933
|
+
var _c = useState(0), index = _c[0], setIndex = _c[1];
|
|
12926
12934
|
useEffect(function () {
|
|
12927
12935
|
if (selectedValue == null) {
|
|
12928
12936
|
return;
|
|
12929
12937
|
}
|
|
12930
12938
|
setIndex(Math.max(0, images.indexOf(selectedValue)));
|
|
12931
12939
|
}, [selectedValue, images]);
|
|
12932
|
-
var
|
|
12940
|
+
var _d = useState(function () { return images[index]; }), selectedImage = _d[0], setSelectedImage = _d[1];
|
|
12933
12941
|
var handlers = useSwipeable({
|
|
12934
12942
|
onSwipedLeft: useCallback(function () {
|
|
12935
12943
|
setIndex(function (index) { return Math.min(index + 1, images.length - 1); });
|
|
@@ -12941,7 +12949,7 @@ var ProductGalleryMobile = function (_a) {
|
|
|
12941
12949
|
useEffect(function () {
|
|
12942
12950
|
setSelectedImage(images[index]);
|
|
12943
12951
|
}, [index, images]);
|
|
12944
|
-
return (jsxs$1(Container$9, { children: [jsx$1(ImageProductWithTags, __assign$1({}, handlers, { image: selectedImage, topTag: topTag, bottomTag: bottomTag, testId: productImageDataTestId }), void 0), jsx$1(SlideNavigation, { quantity: images.length, selectedIndex: images.indexOf(selectedImage), onNavigate: setIndex, testId: slideDotsDataTestId }, void 0)] }, void 0));
|
|
12952
|
+
return (jsxs$1(Container$9, { children: [jsx$1(ImageProductWithTags, __assign$1({}, handlers, { image: selectedImage, topTag: topTag, bottomTag: bottomTag, testId: productImageDataTestId, borderRadiusVariant: borderRadiusVariant }), void 0), jsx$1(SlideNavigation, { quantity: images.length, selectedIndex: images.indexOf(selectedImage), onNavigate: setIndex, testId: slideDotsDataTestId }, void 0)] }, void 0));
|
|
12945
12953
|
};
|
|
12946
12954
|
var templateObject_1$f;
|
|
12947
12955
|
|
|
@@ -17316,5 +17324,5 @@ var AccordionOptions = function (_a) {
|
|
|
17316
17324
|
};
|
|
17317
17325
|
var templateObject_1;
|
|
17318
17326
|
|
|
17319
|
-
export { Accordion$1 as Accordion, AccordionOptions, AmazonButton, AssetsProvider, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, Card$2 as Card, CardSectionType, CartProductItem, CategoryTag, Checkbox, Collection, ComponentPosition, ComponentSize, index as CrossSell, DeliveryDetails, DiscountTag, Drawer, DropdownListIcons, FilteringDropdown, Tags as FilteringTags, Filters, FitPredictor, Icon, IconButton, IconsWithTitle, Image, Input$1 as Input, InputValidationType, Modal, MultiColorPicker, Note, OfferBanner, OrderBar, Overlay, PackSelector, Pagination, PaginatorBlog, PaymentMethod, PaypalButton, Portal, PriceLabel,
|
|
17327
|
+
export { Accordion$1 as Accordion, AccordionOptions, AmazonButton, AssetsProvider, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, Card$2 as Card, CardSectionType, CartProductItem, CategoryTag, Checkbox, Collection, ComponentPosition, ComponentSize, index as CrossSell, DeliveryDetails, DiscountTag, Drawer, DropdownListIcons, FilteringDropdown, Tags as FilteringTags, Filters, FitPredictor, Icon, IconButton, IconsWithTitle, Image, Input$1 as Input, InputValidationType, Modal, MultiColorPicker, Note, OfferBanner, OrderBar, Overlay, PackSelector, Pagination, PaginatorBlog, PaymentMethod, PaypalButton, Portal, PriceLabel, PriceLabelV2, ProductGallery, ProductGalleryMobile, ProgressBar, QuantityPicker, RadioGroupInput, RadioInput, Rating, Review, ScrollToTop, SearchBar, SearchNavigation, SeasonOfferTag, SimpleDropdown, SimpleOrderItem, SingleColorPicker, SizeFitGuide, SizeSelector, SizeTable, SliderNavigation, Spacing, Spinner, StarList, Tab, Tabs, Text$6 as Text, TextButton, TextWithImage, ThemeProvider, ThemeVariables, Timer, Tooltip, Totals, decimalFormat, formatPrice, isEmail, isEmpty, isNumber$1 as isNumber, isPhoneNumber, isValidDate, modalEvent, simulateMouseClick, sliceString, useModal, useModalEvent, useOnClickOutside, useTheme, useThemeAssets, useWindowDimensions };
|
|
17320
17328
|
//# sourceMappingURL=index.esm.js.map
|