@trafilea/afrodita-components 5.0.0-beta.140 → 5.0.0-beta.142
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 +55 -0
- package/build/index.esm.js +48 -14
- package/build/index.esm.js.map +1 -1
- package/build/index.js +48 -14
- package/build/index.js.map +1 -1
- package/build/theme/revel.theme.d.ts +55 -0
- package/build/theme/revel.theme.js +80 -0
- package/build/theme/shapermint.theme.d.ts +55 -0
- package/build/theme/shapermint.theme.js +80 -0
- package/build/theme/truekind.theme.d.ts +55 -0
- package/build/theme/truekind.theme.js +80 -0
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { StyledComponent } from '@emotion/styled';
|
|
|
7
7
|
export { default as styled } from '@emotion/styled';
|
|
8
8
|
import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
|
|
9
9
|
import * as _emotion_react from '@emotion/react';
|
|
10
|
+
import { ComponentSize as ComponentSize$1 } from 'src/types/enums';
|
|
10
11
|
|
|
11
12
|
declare enum CardSectionType {
|
|
12
13
|
Header = 0,
|
|
@@ -1626,6 +1627,60 @@ declare type ThemeComponent = {
|
|
|
1626
1627
|
};
|
|
1627
1628
|
};
|
|
1628
1629
|
};
|
|
1630
|
+
total: {
|
|
1631
|
+
basicTotal: {
|
|
1632
|
+
amount: {
|
|
1633
|
+
color: string;
|
|
1634
|
+
fontSize: string;
|
|
1635
|
+
};
|
|
1636
|
+
currency: {
|
|
1637
|
+
color: string;
|
|
1638
|
+
fontSize: string;
|
|
1639
|
+
lineHeight: string;
|
|
1640
|
+
alignSelf?: string;
|
|
1641
|
+
};
|
|
1642
|
+
savings: {
|
|
1643
|
+
textFontSize: string;
|
|
1644
|
+
textLineHeight: string;
|
|
1645
|
+
amountFontSize: string;
|
|
1646
|
+
amountFontWeight: number;
|
|
1647
|
+
amountLineHeight: string;
|
|
1648
|
+
color?: string;
|
|
1649
|
+
};
|
|
1650
|
+
};
|
|
1651
|
+
};
|
|
1652
|
+
subTotal: {
|
|
1653
|
+
basicSubTotal: {
|
|
1654
|
+
family: string;
|
|
1655
|
+
size: string;
|
|
1656
|
+
weight: number;
|
|
1657
|
+
lineHeight: string;
|
|
1658
|
+
color: string;
|
|
1659
|
+
};
|
|
1660
|
+
};
|
|
1661
|
+
pricing: {
|
|
1662
|
+
priceLabel: {
|
|
1663
|
+
price: {
|
|
1664
|
+
size: ComponentSize$1.Small | ComponentSize$1.Medium | ComponentSize$1.Large;
|
|
1665
|
+
originalPriceColor: string;
|
|
1666
|
+
};
|
|
1667
|
+
};
|
|
1668
|
+
};
|
|
1669
|
+
orderSummary: {
|
|
1670
|
+
backgroundColor: string;
|
|
1671
|
+
};
|
|
1672
|
+
expressCheckout: {
|
|
1673
|
+
fontFamily: string;
|
|
1674
|
+
};
|
|
1675
|
+
copyrightText: {
|
|
1676
|
+
fontSize: string;
|
|
1677
|
+
fontWeight: number;
|
|
1678
|
+
lineHeight: string;
|
|
1679
|
+
color: string;
|
|
1680
|
+
};
|
|
1681
|
+
textButton: {
|
|
1682
|
+
fontWeight: number;
|
|
1683
|
+
};
|
|
1629
1684
|
};
|
|
1630
1685
|
declare type ThemeTypography = {
|
|
1631
1686
|
config: {
|
package/build/index.esm.js
CHANGED
|
@@ -4765,7 +4765,7 @@ var TAGS = {
|
|
|
4765
4765
|
hero3: newStyled.h3(templateObject_3$D || (templateObject_3$D = __makeTemplateObject([""], [""]))),
|
|
4766
4766
|
display1: newStyled.h1(templateObject_4$q || (templateObject_4$q = __makeTemplateObject([""], [""]))),
|
|
4767
4767
|
display2: newStyled.h2(templateObject_5$f || (templateObject_5$f = __makeTemplateObject([""], [""]))),
|
|
4768
|
-
heading1: newStyled.h1(templateObject_6$
|
|
4768
|
+
heading1: newStyled.h1(templateObject_6$b || (templateObject_6$b = __makeTemplateObject([""], [""]))),
|
|
4769
4769
|
heading2: newStyled.h2(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject([""], [""]))),
|
|
4770
4770
|
heading3: newStyled.h3(templateObject_8$4 || (templateObject_8$4 = __makeTemplateObject([""], [""]))),
|
|
4771
4771
|
heading4: newStyled.h4(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject([""], [""]))),
|
|
@@ -4886,7 +4886,7 @@ var DEFAULTS = {
|
|
|
4886
4886
|
size: 'regular',
|
|
4887
4887
|
},
|
|
4888
4888
|
};
|
|
4889
|
-
var templateObject_1$1g, templateObject_2$P, templateObject_3$D, templateObject_4$q, templateObject_5$f, templateObject_6$
|
|
4889
|
+
var templateObject_1$1g, templateObject_2$P, templateObject_3$D, templateObject_4$q, templateObject_5$f, templateObject_6$b, templateObject_7$6, templateObject_8$4, templateObject_9$1, templateObject_10$1, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17;
|
|
4890
4890
|
|
|
4891
4891
|
var ButtonsContainer = newStyled.div(templateObject_1$1f || (templateObject_1$1f = __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) {
|
|
4892
4892
|
var inline = _a.inline;
|
|
@@ -4918,17 +4918,17 @@ var getStylesBySize$8 = function (size) {
|
|
|
4918
4918
|
};
|
|
4919
4919
|
case ComponentSize.Small:
|
|
4920
4920
|
return {
|
|
4921
|
-
fontSize: '
|
|
4921
|
+
fontSize: '14px',
|
|
4922
4922
|
};
|
|
4923
4923
|
default:
|
|
4924
4924
|
return {
|
|
4925
|
-
fontSize: '
|
|
4925
|
+
fontSize: '14px',
|
|
4926
4926
|
};
|
|
4927
4927
|
}
|
|
4928
4928
|
};
|
|
4929
4929
|
var textButtonStyles$1 = function (theme, size) {
|
|
4930
4930
|
var stylesBySize = getStylesBySize$8(size);
|
|
4931
|
-
return __assign$1(__assign$1({ border: 'none', background: 'transparent', padding: 0, color: theme.colors.shades['550'].color, alignItems: 'center', fontWeight:
|
|
4931
|
+
return __assign$1(__assign$1({ border: 'none', background: 'transparent', padding: 0, color: theme.colors.shades['550'].color, alignItems: 'center', fontWeight: theme.component.textButton.fontWeight, textDecorationLine: 'underline' }, stylesBySize), { '&:disabled': {
|
|
4932
4932
|
color: theme.colors.shades['250'].color,
|
|
4933
4933
|
textDecorationLine: 'none',
|
|
4934
4934
|
} });
|
|
@@ -5108,7 +5108,7 @@ var PriceLabel = function (_a) {
|
|
|
5108
5108
|
color: color || theme.colors.pallete.secondary.color,
|
|
5109
5109
|
weight: 700,
|
|
5110
5110
|
};
|
|
5111
|
-
var OriginalPrice = function () { return (jsx$1(Price, __assign$1({ size: originalPriceStyled ? size : ComponentSize.Small, color: theme.
|
|
5111
|
+
var OriginalPrice = function () { return (jsx$1(Price, __assign$1({ size: originalPriceStyled ? size : ComponentSize.Small, color: theme.component.pricing.priceLabel.price.originalPriceColor, margin: true, underlined: originalPriceUnderlined, "data-testid": getTestId(testId, 'original-product-price') }, { children: originalPrice }), void 0)); };
|
|
5112
5112
|
return (jsxs$1(Container$N, { 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));
|
|
5113
5113
|
};
|
|
5114
5114
|
var templateObject_1$1b, templateObject_2$M, templateObject_3$B;
|
|
@@ -11634,12 +11634,12 @@ var TooltipText = newStyled.div(templateObject_4$n || (templateObject_4$n = __ma
|
|
|
11634
11634
|
return color;
|
|
11635
11635
|
});
|
|
11636
11636
|
var TopSection = newStyled.div(templateObject_5$d || (templateObject_5$d = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 0.688rem;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 0.688rem;\n"])));
|
|
11637
|
-
var Title$6 = newStyled.h1(templateObject_6$
|
|
11637
|
+
var Title$6 = newStyled.h1(templateObject_6$a || (templateObject_6$a = __makeTemplateObject(["\n font-size: 0.875rem;\n font-weight: 600;\n line-height: 1.375rem;\n margin: 0;\n color: ", ";\n"], ["\n font-size: 0.875rem;\n font-weight: 600;\n line-height: 1.375rem;\n margin: 0;\n color: ", ";\n"])), function (_a) {
|
|
11638
11638
|
var color = _a.color;
|
|
11639
11639
|
return color;
|
|
11640
11640
|
});
|
|
11641
11641
|
var IconContainer$5 = newStyled.div(templateObject_7$5 || (templateObject_7$5 = __makeTemplateObject(["\n width: 1.375rem;\n height: 1.125rem;\n margin-right: 0.563rem;\n"], ["\n width: 1.375rem;\n height: 1.125rem;\n margin-right: 0.563rem;\n"])));
|
|
11642
|
-
var templateObject_1$Z, templateObject_2$G, templateObject_3$x, templateObject_4$n, templateObject_5$d, templateObject_6$
|
|
11642
|
+
var templateObject_1$Z, templateObject_2$G, templateObject_3$x, templateObject_4$n, templateObject_5$d, templateObject_6$a, templateObject_7$5;
|
|
11643
11643
|
|
|
11644
11644
|
var Tooltip = function (_a) {
|
|
11645
11645
|
var children = _a.children, position = _a.position, text = _a.text, _b = _a.align, align = _b === void 0 ? 'center' : _b, onClick = _a.onClick, header = _a.header;
|
|
@@ -12271,22 +12271,56 @@ var templateObject_1$M;
|
|
|
12271
12271
|
|
|
12272
12272
|
var Wrapper$2 = newStyled.div(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"])));
|
|
12273
12273
|
var GrandTotal = newStyled.h1(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n margin: 0;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 700;\n color: ", ";\n display: flex;\n align-items: center;\n"], ["\n margin: 0;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 700;\n color: ", ";\n display: flex;\n align-items: center;\n"])), function (props) { return props.color; });
|
|
12274
|
-
var Currency = newStyled.span(templateObject_3$s || (templateObject_3$s = __makeTemplateObject(["\n margin: 0;\n margin-right: 0.625rem;\n font-size:
|
|
12274
|
+
var Currency = newStyled.span(templateObject_3$s || (templateObject_3$s = __makeTemplateObject(["\n margin: 0;\n margin-right: 0.625rem;\n font-weight: 600;\n color: ", ";\n font-size: ", ";\n line-height: ", ";\n align-self: ", ";\n"], ["\n margin: 0;\n margin-right: 0.625rem;\n font-weight: 600;\n color: ", ";\n font-size: ", ";\n line-height: ", ";\n align-self: ", ";\n"])), function (_a) {
|
|
12275
|
+
var theme = _a.theme;
|
|
12276
|
+
return theme.component.total.basicTotal.currency.color;
|
|
12277
|
+
}, function (_a) {
|
|
12278
|
+
var theme = _a.theme;
|
|
12279
|
+
return theme.component.total.basicTotal.currency.fontSize;
|
|
12280
|
+
}, function (_a) {
|
|
12281
|
+
var theme = _a.theme;
|
|
12282
|
+
return theme.component.total.basicTotal.currency.lineHeight;
|
|
12283
|
+
}, function (_a) {
|
|
12284
|
+
var theme = _a.theme;
|
|
12285
|
+
return theme.component.total.basicTotal.currency.alignSelf;
|
|
12286
|
+
});
|
|
12275
12287
|
var Container$v = newStyled.div(templateObject_4$k || (templateObject_4$k = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.625rem;\n color: ", ";\n"], ["\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.625rem;\n color: ", ";\n"])), function (props) { return props.highlightColor; });
|
|
12276
|
-
var
|
|
12288
|
+
var DiscountText = newStyled.h3(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n margin: 0;\n font-size: ", ";\n line-height: ", ";\n font-weight: 600;\n"], ["\n margin: 0;\n font-size: ", ";\n line-height: ", ";\n font-weight: 600;\n"])), function (_a) {
|
|
12289
|
+
var theme = _a.theme;
|
|
12290
|
+
return theme.component.total.basicTotal.savings.textFontSize;
|
|
12291
|
+
}, function (_a) {
|
|
12292
|
+
var theme = _a.theme;
|
|
12293
|
+
return theme.component.total.basicTotal.savings.textLineHeight;
|
|
12294
|
+
});
|
|
12295
|
+
var DiscountAmount = newStyled.h3(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n margin: 0;\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n"], ["\n margin: 0;\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n"])), function (_a) {
|
|
12296
|
+
var theme = _a.theme;
|
|
12297
|
+
return theme.component.total.basicTotal.savings.amountFontSize;
|
|
12298
|
+
}, function (_a) {
|
|
12299
|
+
var theme = _a.theme;
|
|
12300
|
+
return theme.component.total.basicTotal.savings.amountLineHeight;
|
|
12301
|
+
}, function (_a) {
|
|
12302
|
+
var theme = _a.theme;
|
|
12303
|
+
return theme.component.total.basicTotal.savings.amountFontWeight;
|
|
12304
|
+
});
|
|
12277
12305
|
var Total = function (_a) {
|
|
12278
12306
|
var total = _a.total, currency = _a.currency, saving = _a.saving, _b = _a.highlightColor, highlightColor = _b === void 0 ? '#2f806a' : _b;
|
|
12279
12307
|
var theme = useTheme();
|
|
12280
|
-
return (jsxs$1(Wrapper$2, __assign$1({ "data-testid": "total-wrapper" }, { children: [jsxs$1(GrandTotal, __assign$1({ color: theme.
|
|
12308
|
+
return (jsxs$1(Wrapper$2, __assign$1({ "data-testid": "total-wrapper" }, { children: [jsxs$1(GrandTotal, __assign$1({ color: theme.component.total.basicTotal.amount.color, "data-testid": "total-price" }, { children: [jsx$1(Currency, { children: currency }, void 0), total] }), void 0), saving && (jsxs$1(Container$v, __assign$1({ "data-testid": "subtotal-container", highlightColor: highlightColor }, { children: [jsx$1(DiscountText, __assign$1({ "data-testid": "saving-title" }, { children: saving.savingText }), void 0), jsx$1(DiscountAmount, __assign$1({ "data-testid": "saving-price" }, { children: saving.amount }), void 0)] }), void 0))] }), void 0));
|
|
12281
12309
|
};
|
|
12282
|
-
var templateObject_1$L, templateObject_2$w, templateObject_3$s, templateObject_4$k, templateObject_5$b;
|
|
12310
|
+
var templateObject_1$L, templateObject_2$w, templateObject_3$s, templateObject_4$k, templateObject_5$b, templateObject_6$9;
|
|
12283
12311
|
|
|
12284
12312
|
var Wrapper$1 = newStyled.div(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
12285
12313
|
var color = _a.color;
|
|
12286
12314
|
return color;
|
|
12287
12315
|
});
|
|
12288
12316
|
var ItemContainer = newStyled.div(templateObject_2$v || (templateObject_2$v = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.625rem;\n\n &:last-child {\n margin-bottom: 0;\n }\n"], ["\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.625rem;\n\n &:last-child {\n margin-bottom: 0;\n }\n"])));
|
|
12289
|
-
var Item$2 = newStyled.h4(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n margin: 0;\n font-size: 0.875rem;\n line-height:
|
|
12317
|
+
var Item$2 = newStyled.h4(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n margin: 0;\n font-size: 0.875rem;\n line-height: ", ";\n font-weight: ", ";\n"], ["\n margin: 0;\n font-size: 0.875rem;\n line-height: ", ";\n font-weight: ", ";\n"])), function (_a) {
|
|
12318
|
+
var theme = _a.theme;
|
|
12319
|
+
return theme.component.subTotal.basicSubTotal.lineHeight;
|
|
12320
|
+
}, function (_a) {
|
|
12321
|
+
var theme = _a.theme;
|
|
12322
|
+
return theme.component.subTotal.basicSubTotal.weight;
|
|
12323
|
+
});
|
|
12290
12324
|
var CouponItem = newStyled(Item$2)(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
12291
12325
|
var color = _a.color;
|
|
12292
12326
|
return color;
|
|
@@ -12547,7 +12581,7 @@ var Quantity = newStyled.div(templateObject_5$9 || (templateObject_5$9 = __makeT
|
|
|
12547
12581
|
var SimpleOrderItem = function (_a) {
|
|
12548
12582
|
var title = _a.title, subtitle = _a.subtitle, image = _a.image, price = _a.price, tag = _a.tag, quantity = _a.quantity, finalPriceStyle = _a.finalPriceStyle;
|
|
12549
12583
|
var theme = useTheme();
|
|
12550
|
-
return (jsxs$1(Container$r, { children: [jsxs$1(ImageContainer$3, { children: [jsx$1(Image, { src: image.src, alt: image.alt, width: "4.063rem", height: "5.375rem", objectFit: "cover", objectPosition: "center" }, void 0), quantity ? jsx$1(Quantity, __assign$1({ "data-testid": "order-item-quantity" }, { children: quantity }), void 0) : null] }, void 0), jsxs$1(DescriptionContainer, __assign$1({ "data-testid": "order-item-description-container", theme: theme }, { children: [jsx$1(Title$3, __assign$1({ color: theme.colors.shades['700'].color, "data-testid": "product-title" }, { children: title }), void 0), jsx$1(Subtitle, __assign$1({ color: theme.colors.shades['700'].color, "data-testid": "product-variant-title" }, { children: subtitle }), void 0), jsxs$1(PriceContainer, __assign$1({ "data-testid": "order-item-price-container", withTag: !!tag, theme: theme }, { children: [tag && (jsx$1(OfferBanner, { discountAppliedText: tag === null || tag === void 0 ? void 0 : tag.text, backgroundColor: tag === null || tag === void 0 ? void 0 : tag.backgroundColor }, void 0)), jsx$1(PriceLabel, { finalPrice: price.finalPrice, originalPrice: price.originalPrice, color: price.color || theme.colors.shades['700'].color, size:
|
|
12584
|
+
return (jsxs$1(Container$r, { children: [jsxs$1(ImageContainer$3, { children: [jsx$1(Image, { src: image.src, alt: image.alt, width: "4.063rem", height: "5.375rem", objectFit: "cover", objectPosition: "center" }, void 0), quantity ? jsx$1(Quantity, __assign$1({ "data-testid": "order-item-quantity" }, { children: quantity }), void 0) : null] }, void 0), jsxs$1(DescriptionContainer, __assign$1({ "data-testid": "order-item-description-container", theme: theme }, { children: [jsx$1(Title$3, __assign$1({ color: theme.colors.shades['700'].color, "data-testid": "product-title" }, { children: title }), void 0), jsx$1(Subtitle, __assign$1({ color: theme.colors.shades['700'].color, "data-testid": "product-variant-title" }, { children: subtitle }), void 0), jsxs$1(PriceContainer, __assign$1({ "data-testid": "order-item-price-container", withTag: !!tag, theme: theme }, { children: [tag && (jsx$1(OfferBanner, { discountAppliedText: tag === null || tag === void 0 ? void 0 : tag.text, backgroundColor: tag === null || tag === void 0 ? void 0 : tag.backgroundColor }, void 0)), jsx$1(PriceLabel, { finalPrice: price.finalPrice, originalPrice: price.originalPrice, color: price.color || theme.colors.shades['700'].color, size: theme.component.pricing.priceLabel.price.size, finalPriceStyle: finalPriceStyle, originalPriceStyled: true }, void 0)] }), void 0)] }), void 0)] }, void 0));
|
|
12551
12585
|
};
|
|
12552
12586
|
var templateObject_1$C, templateObject_2$o, templateObject_3$m, templateObject_4$e, templateObject_5$9;
|
|
12553
12587
|
|