@trafilea/afrodita-components 5.0.0-beta.169 → 5.0.0-beta.170
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 +3 -1
- package/build/index.esm.js +14 -13
- package/build/index.esm.js.map +1 -1
- package/build/index.js +14 -13
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -1071,8 +1071,10 @@ interface ProductGalleryProps {
|
|
|
1071
1071
|
thumbnailPosition?: 'vertical' | 'horizontal';
|
|
1072
1072
|
borderRadiusVariant?: boolean;
|
|
1073
1073
|
previewImgBorderColor?: string;
|
|
1074
|
+
ctaText?: string;
|
|
1075
|
+
ctaAction?: () => void;
|
|
1074
1076
|
}
|
|
1075
|
-
declare const ProductGallery: ({ images, selectedValue, topTag, bottomTag, productImageDataTestId, previewListDataTestId, thumbnailPosition, borderRadiusVariant, previewImgBorderColor, }: ProductGalleryProps) => JSX.Element;
|
|
1077
|
+
declare const ProductGallery: ({ images, selectedValue, topTag, bottomTag, productImageDataTestId, previewListDataTestId, thumbnailPosition, borderRadiusVariant, previewImgBorderColor, ctaText, ctaAction, }: ProductGalleryProps) => JSX.Element;
|
|
1076
1078
|
|
|
1077
1079
|
interface RatingProps {
|
|
1078
1080
|
rating: number;
|
package/build/index.esm.js
CHANGED
|
@@ -4690,7 +4690,7 @@ function SimpleDropdown(_a) {
|
|
|
4690
4690
|
var DialogDropdownWrapper = newStyled.div(templateObject_1$1g || (templateObject_1$1g = __makeTemplateObject(["\n position: relative;\n display: none;\n ::before,\n ::after {\n content: '';\n position: absolute;\n border: 11px solid transparent;\n margin-left: -10px;\n border-bottom-color: #e9e9e9;\n top: calc(", " - 5px);\n right: calc(", " + 21px);\n z-index: 50 !important;\n }\n ::after {\n border-bottom-color: #fff;\n top: calc(", " - 4px);\n right: calc(", " + 21px);\n z-index: 50 !important;\n }\n"], ["\n position: relative;\n display: none;\n ::before,\n ::after {\n content: '';\n position: absolute;\n border: 11px solid transparent;\n margin-left: -10px;\n border-bottom-color: #e9e9e9;\n top: calc(", " - 5px);\n right: calc(", " + 21px);\n z-index: 50 !important;\n }\n ::after {\n border-bottom-color: #fff;\n top: calc(", " - 4px);\n right: calc(", " + 21px);\n z-index: 50 !important;\n }\n"])), function (props) { return props.top; }, function (props) { return props.right; }, function (props) { return props.top; }, function (props) { return props.right; });
|
|
4691
4691
|
var DialogDropdownListContainer = newStyled.ul(templateObject_2$R || (templateObject_2$R = __makeTemplateObject(["\n position: absolute;\n list-style: none;\n width: max-content;\n min-width: 100px;\n background: #fff;\n border: 1px solid #e9e9e9;\n top: calc(", " + 15px);\n right: calc(", " - 23px);\n z-index: 50 !important;\n margin-bottom: 1rem;\n\n font-family: inherit;\n font-size: 100%;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n line-height: inherit;\n margin: 0;\n padding: 0;\n vertical-align: inherit;\n"], ["\n position: absolute;\n list-style: none;\n width: max-content;\n min-width: 100px;\n background: #fff;\n border: 1px solid #e9e9e9;\n top: calc(", " + 15px);\n right: calc(", " - 23px);\n z-index: 50 !important;\n margin-bottom: 1rem;\n\n font-family: inherit;\n font-size: 100%;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n line-height: inherit;\n margin: 0;\n padding: 0;\n vertical-align: inherit;\n"])), function (props) { return props.top; }, function (props) { return props.right; });
|
|
4692
4692
|
var DialogDropdownListItem = newStyled.li(templateObject_3$F || (templateObject_3$F = __makeTemplateObject(["\n border-bottom: 1px solid #e9e9e9;\n margin: 0;\n padding: 0;\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 17px;\n color: var(--colors-shades-550-color);\n vertical-align: inherit;\n"], ["\n border-bottom: 1px solid #e9e9e9;\n margin: 0;\n padding: 0;\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 17px;\n color: var(--colors-shades-550-color);\n vertical-align: inherit;\n"])));
|
|
4693
|
-
var DialogDropdownLink = newStyled.a(templateObject_4$
|
|
4693
|
+
var DialogDropdownLink = newStyled.a(templateObject_4$u || (templateObject_4$u = __makeTemplateObject(["\n display: inline-block;\n text-decoration: none;\n width: 100%;\n background-color: transparent;\n border: 0;\n margin: 0;\n padding: 12px;\n cursor: pointer;\n transition: all 0.2s;\n color: var(--colors-shades-700-color);\n font-size: 1.125rem;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n line-height: inherit;\n vertical-align: inherit;\n"], ["\n display: inline-block;\n text-decoration: none;\n width: 100%;\n background-color: transparent;\n border: 0;\n margin: 0;\n padding: 12px;\n cursor: pointer;\n transition: all 0.2s;\n color: var(--colors-shades-700-color);\n font-size: 1.125rem;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n line-height: inherit;\n vertical-align: inherit;\n"])));
|
|
4694
4694
|
var DropdownDialog = function (_a) {
|
|
4695
4695
|
var options = _a.options, _b = _a.position, top = _b.top, right = _b.right, style = _a.style, className = _a.className;
|
|
4696
4696
|
return (jsx$1(DialogDropdownWrapper, __assign$1({ top: top, right: right, style: style, className: className }, { children: jsx$1(DialogDropdownListContainer, __assign$1({ "data-testid": "dialog-dropdown-list", top: top, right: right }, { children: options.map(function (_a, idx) {
|
|
@@ -4698,7 +4698,7 @@ var DropdownDialog = function (_a) {
|
|
|
4698
4698
|
return (jsx$1(DialogDropdownListItem, { children: jsx$1(DialogDropdownLink, __assign$1({ href: value }, { children: label }), void 0) }, idx));
|
|
4699
4699
|
}) }), void 0) }), void 0));
|
|
4700
4700
|
};
|
|
4701
|
-
var templateObject_1$1g, templateObject_2$R, templateObject_3$F, templateObject_4$
|
|
4701
|
+
var templateObject_1$1g, templateObject_2$R, templateObject_3$F, templateObject_4$u;
|
|
4702
4702
|
|
|
4703
4703
|
var getStylesBySize$9 = function (size, theme) {
|
|
4704
4704
|
switch (size) {
|
|
@@ -4769,7 +4769,7 @@ var TAGS = {
|
|
|
4769
4769
|
hero1: newStyled.h1(templateObject_1$1f || (templateObject_1$1f = __makeTemplateObject([""], [""]))),
|
|
4770
4770
|
hero2: newStyled.h2(templateObject_2$Q || (templateObject_2$Q = __makeTemplateObject([""], [""]))),
|
|
4771
4771
|
hero3: newStyled.h3(templateObject_3$E || (templateObject_3$E = __makeTemplateObject([""], [""]))),
|
|
4772
|
-
display1: newStyled.h1(templateObject_4$
|
|
4772
|
+
display1: newStyled.h1(templateObject_4$t || (templateObject_4$t = __makeTemplateObject([""], [""]))),
|
|
4773
4773
|
display2: newStyled.h2(templateObject_5$h || (templateObject_5$h = __makeTemplateObject([""], [""]))),
|
|
4774
4774
|
heading1: newStyled.h1(templateObject_6$d || (templateObject_6$d = __makeTemplateObject([""], [""]))),
|
|
4775
4775
|
heading2: newStyled.h2(templateObject_7$8 || (templateObject_7$8 = __makeTemplateObject([""], [""]))),
|
|
@@ -4892,7 +4892,7 @@ var DEFAULTS = {
|
|
|
4892
4892
|
size: 'regular',
|
|
4893
4893
|
},
|
|
4894
4894
|
};
|
|
4895
|
-
var templateObject_1$1f, templateObject_2$Q, templateObject_3$E, templateObject_4$
|
|
4895
|
+
var templateObject_1$1f, templateObject_2$Q, templateObject_3$E, templateObject_4$t, templateObject_5$h, templateObject_6$d, templateObject_7$8, templateObject_8$6, templateObject_9$3, templateObject_10$3, templateObject_11$2, templateObject_12$2, templateObject_13$2, templateObject_14$1, templateObject_15$1, templateObject_16$1, templateObject_17$1;
|
|
4896
4896
|
|
|
4897
4897
|
var ButtonsContainer = newStyled.div(templateObject_1$1e || (templateObject_1$1e = __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) {
|
|
4898
4898
|
var inline = _a.inline;
|
|
@@ -5193,7 +5193,7 @@ var OutOfStock = function (_a) {
|
|
|
5193
5193
|
var CustomRadioGroup = newStyled(lt)(templateObject_1$18 || (templateObject_1$18 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
5194
5194
|
newStyled(lt.Label)(templateObject_2$M || (templateObject_2$M = __makeTemplateObject(["\n font-size: 0.88rem;\n"], ["\n font-size: 0.88rem;\n"])));
|
|
5195
5195
|
var CustomRadioGroupOption = newStyled(lt.Option)(templateObject_3$B || (templateObject_3$B = __makeTemplateObject(["\n margin-right: 8px;\n\n svg {\n cursor: pointer;\n }\n"], ["\n margin-right: 8px;\n\n svg {\n cursor: pointer;\n }\n"])));
|
|
5196
|
-
var Span = newStyled.span(templateObject_4$
|
|
5196
|
+
var Span = newStyled.span(templateObject_4$s || (templateObject_4$s = __makeTemplateObject(["\n font-weight: 600;\n"], ["\n font-weight: 600;\n"])));
|
|
5197
5197
|
var OptionsContainer = newStyled.div(templateObject_5$g || (templateObject_5$g = __makeTemplateObject(["\n display: flex;\n margin-top: 0.63rem;\n flex-wrap: wrap;\n"], ["\n display: flex;\n margin-top: 0.63rem;\n flex-wrap: wrap;\n"])));
|
|
5198
5198
|
var Label$2 = function (_a) {
|
|
5199
5199
|
var label = _a.label, values = _a.values;
|
|
@@ -5212,7 +5212,7 @@ var ColorRadioGroup$1 = Object.assign(ColorRadioGroup, {
|
|
|
5212
5212
|
Option: Option,
|
|
5213
5213
|
OptionsContainer: OptionsContainer,
|
|
5214
5214
|
});
|
|
5215
|
-
var templateObject_1$18, templateObject_2$M, templateObject_3$B, templateObject_4$
|
|
5215
|
+
var templateObject_1$18, templateObject_2$M, templateObject_3$B, templateObject_4$s, templateObject_5$g;
|
|
5216
5216
|
|
|
5217
5217
|
var Container$N = newStyled.div(templateObject_1$17 || (templateObject_1$17 = __makeTemplateObject(["\n width: 2rem;\n height: 2rem;\n border-radius: 50%;\n border: 0.081rem solid ", ";\n box-sizing: border-box;\n padding: 0.156rem;\n cursor: pointer;\n opacity: ", ";\n"], ["\n width: 2rem;\n height: 2rem;\n border-radius: 50%;\n border: 0.081rem solid ", ";\n box-sizing: border-box;\n padding: 0.156rem;\n cursor: pointer;\n opacity: ", ";\n"])), function (_a) {
|
|
5218
5218
|
var borderColor = _a.borderColor;
|
|
@@ -9617,7 +9617,7 @@ var Container$M = newStyled.div(templateObject_3$A || (templateObject_3$A = __ma
|
|
|
9617
9617
|
var position = _a.position;
|
|
9618
9618
|
return (position == 'horizontal' ? horizontalStyles : verticalStyles);
|
|
9619
9619
|
});
|
|
9620
|
-
var Button$2 = newStyled.button(templateObject_4$
|
|
9620
|
+
var Button$2 = newStyled.button(templateObject_4$r || (templateObject_4$r = __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"])));
|
|
9621
9621
|
var ImagePreviewList = function (_a) {
|
|
9622
9622
|
var images = _a.images, selectedImage = _a.selectedImage, onClick = _a.onClick, dataTestId = _a.dataTestId, position = _a.position, borderRadiusVariant = _a.borderRadiusVariant, previewImgBorderColor = _a.previewImgBorderColor;
|
|
9623
9623
|
return (jsx$1(Container$M, __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: {
|
|
@@ -9626,7 +9626,7 @@ var ImagePreviewList = function (_a) {
|
|
|
9626
9626
|
arrowPadding: 1.625,
|
|
9627
9627
|
}, adaptiveHeight: true, dots: false, slidesToShow: 4 }, { children: images.map(function (item) { return (jsx$1(Button$2, __assign$1({ onClick: function () { return onClick(item); } }, { children: jsx$1(ImageSmallPreview, { imageUrl: item.imageUrl, 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 (jsx$1(Button$2, __assign$1({ onClick: function () { return onClick(item); } }, { children: jsx$1(ImageSmallPreview, { imageUrl: item.imageUrl, alt: item.alt, selected: item.key === selectedImage.key, borderRadiusVariant: borderRadiusVariant, previewImgBorderColor: previewImgBorderColor }, void 0) }), item.key)); })) }), void 0));
|
|
9628
9628
|
};
|
|
9629
|
-
var templateObject_1$14, templateObject_2$K, templateObject_3$A, templateObject_4$
|
|
9629
|
+
var templateObject_1$14, templateObject_2$K, templateObject_3$A, templateObject_4$r;
|
|
9630
9630
|
|
|
9631
9631
|
var propTypes = {exports: {}};
|
|
9632
9632
|
|
|
@@ -11226,18 +11226,19 @@ var Container$L = newStyled.div(templateObject_1$13 || (templateObject_1$13 = __
|
|
|
11226
11226
|
});
|
|
11227
11227
|
var TopTagContainer$2 = newStyled.div(templateObject_2$J || (templateObject_2$J = __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'); });
|
|
11228
11228
|
var BottomTagContainer$2 = newStyled.div(templateObject_3$z || (templateObject_3$z = __makeTemplateObject(["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"], ["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"])));
|
|
11229
|
+
var ButtonSecondaryOutlineWrapper = newStyled(ButtonSecondaryOutline)(templateObject_4$q || (templateObject_4$q = __makeTemplateObject(["\n text-transform: capitalize;\n margin-top: 18px;\n\n @media (max-width: 992px) {\n margin-top: 10px;\n }\n"], ["\n text-transform: capitalize;\n margin-top: 18px;\n\n @media (max-width: 992px) {\n margin-top: 10px;\n }\n"])));
|
|
11229
11230
|
var ImageProductWithTags$1 = function (_a) {
|
|
11230
|
-
var image = _a.image, topTag = _a.topTag, bottomTag = _a.bottomTag, testId = _a.testId, position = _a.position, borderRadiusVariant = _a.borderRadiusVariant;
|
|
11231
|
+
var image = _a.image, topTag = _a.topTag, bottomTag = _a.bottomTag, testId = _a.testId, position = _a.position, borderRadiusVariant = _a.borderRadiusVariant, ctaText = _a.ctaText, ctaAction = _a.ctaAction;
|
|
11231
11232
|
return (jsxs$1(Container$L, __assign$1({ "data-testid": testId, className: "stylefor".concat(position), borderRadiusVariant: borderRadiusVariant }, { children: [jsx$1(InnerImageZoom, { src: image.imageUrl, zoomSrc: image.imageUrl, zoomType: "hover", imgAttributes: {
|
|
11232
11233
|
alt: image.alt,
|
|
11233
11234
|
style: { objectFit: 'cover', objectPosition: 'center' },
|
|
11234
|
-
}, 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));
|
|
11235
|
+
}, 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), ctaText && ctaAction && (jsx$1(ButtonSecondaryOutlineWrapper, { wide: true, onClick: ctaAction, text: ctaText }, void 0))] }), void 0));
|
|
11235
11236
|
};
|
|
11236
|
-
var templateObject_1$13, templateObject_2$J, templateObject_3$z;
|
|
11237
|
+
var templateObject_1$13, templateObject_2$J, templateObject_3$z, templateObject_4$q;
|
|
11237
11238
|
|
|
11238
11239
|
var Container$K = newStyled.div(templateObject_1$12 || (templateObject_1$12 = __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"])));
|
|
11239
11240
|
var ProductGallery = function (_a) {
|
|
11240
|
-
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, previewImgBorderColor = _a.previewImgBorderColor;
|
|
11241
|
+
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, previewImgBorderColor = _a.previewImgBorderColor, ctaText = _a.ctaText, ctaAction = _a.ctaAction;
|
|
11241
11242
|
var initialValue = selectedValue && images.includes(selectedValue) ? selectedValue : images[0];
|
|
11242
11243
|
var _c = useState(initialValue), selectedImage = _c[0], setSelectedImage = _c[1];
|
|
11243
11244
|
useEffect(function () {
|
|
@@ -11245,7 +11246,7 @@ var ProductGallery = function (_a) {
|
|
|
11245
11246
|
}, [initialValue]);
|
|
11246
11247
|
return (jsxs$1(Container$K, { children: [jsx$1(ImagePreviewList, { images: images, selectedImage: selectedImage, dataTestId: previewListDataTestId, onClick: function (value) {
|
|
11247
11248
|
setSelectedImage(value);
|
|
11248
|
-
}, position: thumbnailPosition, borderRadiusVariant: borderRadiusVariant, previewImgBorderColor: previewImgBorderColor }, void 0), jsx$1(ImageProductWithTags$1, { image: selectedImage, topTag: topTag, bottomTag: bottomTag, testId: productImageDataTestId, position: thumbnailPosition, borderRadiusVariant: borderRadiusVariant }, void 0)] }, void 0));
|
|
11249
|
+
}, position: thumbnailPosition, borderRadiusVariant: borderRadiusVariant, previewImgBorderColor: previewImgBorderColor }, void 0), jsx$1(ImageProductWithTags$1, { image: selectedImage, topTag: topTag, bottomTag: bottomTag, testId: productImageDataTestId, position: thumbnailPosition, borderRadiusVariant: borderRadiusVariant, ctaText: ctaText, ctaAction: ctaAction }, void 0)] }, void 0));
|
|
11249
11250
|
};
|
|
11250
11251
|
var templateObject_1$12;
|
|
11251
11252
|
|