@trafilea/afrodita-components 5.0.0-beta.133 → 5.0.0-beta.135
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 +82 -2
- package/build/index.esm.js +108 -45
- package/build/index.esm.js.map +1 -1
- package/build/index.js +108 -45
- package/build/index.js.map +1 -1
- package/build/theme/revel.theme.d.ts +76 -0
- package/build/theme/revel.theme.js +147 -41
- package/build/theme/shapermint.theme.d.ts +76 -0
- package/build/theme/shapermint.theme.js +101 -0
- package/build/theme/truekind.theme.d.ts +76 -0
- package/build/theme/truekind.theme.js +101 -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,
|
|
@@ -1128,11 +1129,12 @@ interface AccordionProps {
|
|
|
1128
1129
|
headerOnOpen?: ReactNode;
|
|
1129
1130
|
content: ReactNode;
|
|
1130
1131
|
disabled?: boolean;
|
|
1132
|
+
innerHTML?: boolean;
|
|
1131
1133
|
openIcon: IconType;
|
|
1132
1134
|
closeIcon: IconType;
|
|
1133
1135
|
onClick?: (index: number) => void;
|
|
1134
1136
|
}
|
|
1135
|
-
declare const Accordion: ({ header, headerOnOpen, content, defaultOpen, forceOpenHandler, forceOpenValue, titleColor, variant, disabled, openIcon, closeIcon, onClick, }: AccordionProps) => JSX.Element;
|
|
1137
|
+
declare const Accordion: ({ header, headerOnOpen, content, defaultOpen, forceOpenHandler, forceOpenValue, titleColor, variant, disabled, innerHTML, openIcon, closeIcon, onClick, }: AccordionProps) => JSX.Element;
|
|
1136
1138
|
|
|
1137
1139
|
declare const ThemeProvider: FC<{
|
|
1138
1140
|
theme: Theme;
|
|
@@ -1387,6 +1389,7 @@ declare type ThemeComponent = {
|
|
|
1387
1389
|
radio: {
|
|
1388
1390
|
borderColor: string;
|
|
1389
1391
|
background: string;
|
|
1392
|
+
textSize: ComponentSize$1.Small | ComponentSize$1.Medium | ComponentSize$1.Large;
|
|
1390
1393
|
size: {
|
|
1391
1394
|
small: {
|
|
1392
1395
|
borderWidth: string;
|
|
@@ -1415,6 +1418,7 @@ declare type ThemeComponent = {
|
|
|
1415
1418
|
};
|
|
1416
1419
|
};
|
|
1417
1420
|
label: {
|
|
1421
|
+
color: string;
|
|
1418
1422
|
fontSize: {
|
|
1419
1423
|
small: string;
|
|
1420
1424
|
medium: string;
|
|
@@ -1549,6 +1553,79 @@ declare type ThemeComponent = {
|
|
|
1549
1553
|
dotsOpacity: number;
|
|
1550
1554
|
};
|
|
1551
1555
|
};
|
|
1556
|
+
beforeAfter: {
|
|
1557
|
+
size: {
|
|
1558
|
+
small: {
|
|
1559
|
+
image: {
|
|
1560
|
+
minHeight: string;
|
|
1561
|
+
minWidth: string;
|
|
1562
|
+
mobile: {
|
|
1563
|
+
minHeight: string;
|
|
1564
|
+
minWidth: string;
|
|
1565
|
+
};
|
|
1566
|
+
};
|
|
1567
|
+
imageContainer: {
|
|
1568
|
+
maxWidth: string;
|
|
1569
|
+
padding: string;
|
|
1570
|
+
mobile: {
|
|
1571
|
+
maxWidth: string;
|
|
1572
|
+
};
|
|
1573
|
+
};
|
|
1574
|
+
userInfoText: {
|
|
1575
|
+
fontSize: string;
|
|
1576
|
+
mobile: {
|
|
1577
|
+
fontSize: string;
|
|
1578
|
+
};
|
|
1579
|
+
};
|
|
1580
|
+
};
|
|
1581
|
+
medium: {
|
|
1582
|
+
image: {
|
|
1583
|
+
minHeight: string;
|
|
1584
|
+
minWidth: string;
|
|
1585
|
+
mobile: {
|
|
1586
|
+
minHeight: string;
|
|
1587
|
+
minWidth: string;
|
|
1588
|
+
};
|
|
1589
|
+
};
|
|
1590
|
+
imageContainer: {
|
|
1591
|
+
maxWidth: string;
|
|
1592
|
+
padding: string;
|
|
1593
|
+
mobile: {
|
|
1594
|
+
maxWidth: string;
|
|
1595
|
+
};
|
|
1596
|
+
};
|
|
1597
|
+
userInfoText: {
|
|
1598
|
+
fontSize: string;
|
|
1599
|
+
mobile: {
|
|
1600
|
+
fontSize: string;
|
|
1601
|
+
};
|
|
1602
|
+
};
|
|
1603
|
+
};
|
|
1604
|
+
large: {
|
|
1605
|
+
image: {
|
|
1606
|
+
minHeight: string;
|
|
1607
|
+
minWidth: string;
|
|
1608
|
+
mobile: {
|
|
1609
|
+
minHeight: string;
|
|
1610
|
+
minWidth: string;
|
|
1611
|
+
};
|
|
1612
|
+
};
|
|
1613
|
+
imageContainer: {
|
|
1614
|
+
maxWidth: string;
|
|
1615
|
+
padding: string;
|
|
1616
|
+
mobile: {
|
|
1617
|
+
maxWidth: string;
|
|
1618
|
+
};
|
|
1619
|
+
};
|
|
1620
|
+
userInfoText: {
|
|
1621
|
+
fontSize: string;
|
|
1622
|
+
mobile: {
|
|
1623
|
+
fontSize: string;
|
|
1624
|
+
};
|
|
1625
|
+
};
|
|
1626
|
+
};
|
|
1627
|
+
};
|
|
1628
|
+
};
|
|
1552
1629
|
};
|
|
1553
1630
|
declare type ThemeTypography = {
|
|
1554
1631
|
config: {
|
|
@@ -2100,6 +2177,7 @@ declare type TextLinkProps = {
|
|
|
2100
2177
|
};
|
|
2101
2178
|
declare type TextLabelProps = {
|
|
2102
2179
|
variant: 'label';
|
|
2180
|
+
color?: string;
|
|
2103
2181
|
weight?: 'regular' | 'demi';
|
|
2104
2182
|
size?: 'regular' | 'small';
|
|
2105
2183
|
underline?: never;
|
|
@@ -2379,8 +2457,10 @@ interface BeforeAfterCardProps {
|
|
|
2379
2457
|
beforeImage: string;
|
|
2380
2458
|
afterImage: string;
|
|
2381
2459
|
alignCenter?: boolean;
|
|
2460
|
+
imageBorderRadius?: string;
|
|
2461
|
+
size?: ComponentSize;
|
|
2382
2462
|
}
|
|
2383
|
-
declare const BeforeAfterCard: ({ name, age, months, beforeImage, afterImage, alignCenter, }: BeforeAfterCardProps) => JSX.Element;
|
|
2463
|
+
declare const BeforeAfterCard: ({ name, age, months, beforeImage, afterImage, alignCenter, imageBorderRadius, size, }: BeforeAfterCardProps) => JSX.Element;
|
|
2384
2464
|
|
|
2385
2465
|
interface ImageCardWithDescriptionProps {
|
|
2386
2466
|
image: string;
|
package/build/index.esm.js
CHANGED
|
@@ -4231,7 +4231,7 @@ var BaseButton = function (_a) {
|
|
|
4231
4231
|
} }, { children: [renderLeading, children, renderTrailing] }), void 0));
|
|
4232
4232
|
};
|
|
4233
4233
|
|
|
4234
|
-
var getStylesBySize$
|
|
4234
|
+
var getStylesBySize$a = function (size, theme) {
|
|
4235
4235
|
switch (size) {
|
|
4236
4236
|
case ComponentSize.Large:
|
|
4237
4237
|
return {
|
|
@@ -4258,7 +4258,7 @@ var getStylesBySize$9 = function (size, theme) {
|
|
|
4258
4258
|
var BaseCTA = function (_a) {
|
|
4259
4259
|
var text = _a.text, _b = _a.wide, wide = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? ComponentSize.Medium : _c, props = __rest(_a, ["text", "wide", "size"]);
|
|
4260
4260
|
var theme = useTheme();
|
|
4261
|
-
var stylesBySize = getStylesBySize$
|
|
4261
|
+
var stylesBySize = getStylesBySize$a(size, theme);
|
|
4262
4262
|
return (jsx(BaseButton, __assign$1({}, props, { css: __assign$1(__assign$1({ width: wide ? '100%' : 'fit-content' }, stylesBySize), { fontWeight: theme.component.button.fontWeight, borderRadius: "".concat(theme.component.button.borderRadius), cursor: 'pointer', '&:disabled': {
|
|
4263
4263
|
backgroundColor: theme.colors.background.disabled,
|
|
4264
4264
|
color: theme.colors.text.disabled,
|
|
@@ -4694,7 +4694,7 @@ var DropdownDialog = function (_a) {
|
|
|
4694
4694
|
};
|
|
4695
4695
|
var templateObject_1$1g, templateObject_2$P, templateObject_3$C, templateObject_4$q;
|
|
4696
4696
|
|
|
4697
|
-
var getStylesBySize$
|
|
4697
|
+
var getStylesBySize$9 = function (size, theme) {
|
|
4698
4698
|
switch (size) {
|
|
4699
4699
|
case ComponentSize.Medium:
|
|
4700
4700
|
return {
|
|
@@ -4711,7 +4711,7 @@ var getStylesBySize$8 = function (size, theme) {
|
|
|
4711
4711
|
var SimpleSelector = function (_a) {
|
|
4712
4712
|
var text = _a.text, className = _a.className, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? ComponentSize.Medium : _c, _d = _a.active, active = _d === void 0 ? false : _d, _e = _a.testId, testId = _e === void 0 ? 'base-button' : _e, _f = _a.width, width = _f === void 0 ? '' : _f, onClick = _a.onClick;
|
|
4713
4713
|
var theme = useTheme();
|
|
4714
|
-
var stylesBySize = getStylesBySize$
|
|
4714
|
+
var stylesBySize = getStylesBySize$9(size, theme);
|
|
4715
4715
|
var activeStyles = active
|
|
4716
4716
|
? { fontWeight: theme.component.selector.hover.fontWeight }
|
|
4717
4717
|
: { fontWeight: theme.component.selector.default.fontWeight };
|
|
@@ -4775,7 +4775,7 @@ var TAGS = {
|
|
|
4775
4775
|
link: newStyled.a(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n cursor: pointer;\n color: inherit;\n text-decoration: ", ";\n "], ["\n cursor: pointer;\n color: inherit;\n text-decoration: ", ";\n "])), function (props) { return (props.underline ? 'underline' : 'none'); }),
|
|
4776
4776
|
button: newStyled.span(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n display: inline-block;\n "], ["\n display: inline-block;\n "]))),
|
|
4777
4777
|
pricing: newStyled.span(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n display: inline-block;\n font-weight: ", ";\n text-decoration: ", ";\n "], ["\n display: inline-block;\n font-weight: ", ";\n text-decoration: ", ";\n "])), function (props) { return (props.original ? 'normal' : 'bold'); }, function (props) { return (props.original ? 'line-through' : 'bold'); }),
|
|
4778
|
-
label: newStyled.label(templateObject_16 || (templateObject_16 = __makeTemplateObject([""], [""]))),
|
|
4778
|
+
label: newStyled.label(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), function (props) { return props.color && "color:".concat(props.color, ";"); }),
|
|
4779
4779
|
tag: newStyled.span(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n display: inline-block;\n text-transform: ", ";\n "], ["\n display: inline-block;\n text-transform: ", ";\n "])), function (props) { return (props.allCaps ? 'uppercase' : ''); }),
|
|
4780
4780
|
};
|
|
4781
4781
|
var Text$6 = function (_a) {
|
|
@@ -4906,7 +4906,7 @@ var SizeSelector = function (_a) {
|
|
|
4906
4906
|
};
|
|
4907
4907
|
var templateObject_1$1e;
|
|
4908
4908
|
|
|
4909
|
-
var getStylesBySize$
|
|
4909
|
+
var getStylesBySize$8 = function (size) {
|
|
4910
4910
|
switch (size) {
|
|
4911
4911
|
case ComponentSize.Large:
|
|
4912
4912
|
case ComponentSize.Medium:
|
|
@@ -4924,7 +4924,7 @@ var getStylesBySize$7 = function (size) {
|
|
|
4924
4924
|
}
|
|
4925
4925
|
};
|
|
4926
4926
|
var textButtonStyles$1 = function (theme, size) {
|
|
4927
|
-
var stylesBySize = getStylesBySize$
|
|
4927
|
+
var stylesBySize = getStylesBySize$8(size);
|
|
4928
4928
|
return __assign$1(__assign$1({ border: 'none', background: 'transparent', padding: 0, color: theme.colors.shades['550'].color, alignItems: 'center', fontWeight: 500, textDecorationLine: 'underline' }, stylesBySize), { '&:disabled': {
|
|
4929
4929
|
color: theme.colors.shades['250'].color,
|
|
4930
4930
|
textDecorationLine: 'none',
|
|
@@ -4958,7 +4958,7 @@ var SizeFitGuide = function (_a) {
|
|
|
4958
4958
|
};
|
|
4959
4959
|
var templateObject_1$1c, templateObject_2$N, templateObject_3$A;
|
|
4960
4960
|
|
|
4961
|
-
var getStylesBySize$
|
|
4961
|
+
var getStylesBySize$7 = function (size) {
|
|
4962
4962
|
switch (size) {
|
|
4963
4963
|
case ComponentSize.Large:
|
|
4964
4964
|
return {
|
|
@@ -4995,18 +4995,18 @@ var Container$O = newStyled.div(templateObject_1$1b || (templateObject_1$1b = __
|
|
|
4995
4995
|
}, function (_a) {
|
|
4996
4996
|
var _b;
|
|
4997
4997
|
var size = _a.size;
|
|
4998
|
-
return (_b = getStylesBySize$
|
|
4998
|
+
return (_b = getStylesBySize$7(size)) === null || _b === void 0 ? void 0 : _b.borderRadius;
|
|
4999
4999
|
}, function (_a) {
|
|
5000
5000
|
var _b;
|
|
5001
5001
|
var size = _a.size;
|
|
5002
|
-
return (_b = getStylesBySize$
|
|
5002
|
+
return (_b = getStylesBySize$7(size)) === null || _b === void 0 ? void 0 : _b.padding;
|
|
5003
5003
|
}, function (_a) {
|
|
5004
5004
|
var size = _a.size;
|
|
5005
5005
|
return (size === ComponentSize.Small ? '2rem' : 'unset');
|
|
5006
5006
|
}, function (_a) {
|
|
5007
5007
|
var _b;
|
|
5008
5008
|
var size = _a.size;
|
|
5009
|
-
return (_b = getStylesBySize$
|
|
5009
|
+
return (_b = getStylesBySize$7(size)) === null || _b === void 0 ? void 0 : _b.height;
|
|
5010
5010
|
});
|
|
5011
5011
|
var H3$2 = newStyled.h3(templateObject_2$M || (templateObject_2$M = __makeTemplateObject(["\n color: ", ";\n font-weight: bold;\n margin: 0;\n font-size: ", ";\n line-height: ", ";\n"], ["\n color: ", ";\n font-weight: bold;\n margin: 0;\n font-size: ", ";\n line-height: ", ";\n"])), function (_a) {
|
|
5012
5012
|
var textColor = _a.textColor;
|
|
@@ -5014,11 +5014,11 @@ var H3$2 = newStyled.h3(templateObject_2$M || (templateObject_2$M = __makeTempla
|
|
|
5014
5014
|
}, function (_a) {
|
|
5015
5015
|
var _b;
|
|
5016
5016
|
var size = _a.size;
|
|
5017
|
-
return (_b = getStylesBySize$
|
|
5017
|
+
return (_b = getStylesBySize$7(size)) === null || _b === void 0 ? void 0 : _b.fontSize;
|
|
5018
5018
|
}, function (_a) {
|
|
5019
5019
|
var _b;
|
|
5020
5020
|
var size = _a.size;
|
|
5021
|
-
return (_b = getStylesBySize$
|
|
5021
|
+
return (_b = getStylesBySize$7(size)) === null || _b === void 0 ? void 0 : _b.lineHeight;
|
|
5022
5022
|
});
|
|
5023
5023
|
var DiscountTag = function (_a) {
|
|
5024
5024
|
var discount = _a.discount, offText = _a.offText, disabled = _a.disabled, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#fff' : _b, _c = _a.borderColor, borderColor = _c === void 0 ? 'transparent' : _c, _d = _a.textColor, textColor = _d === void 0 ? '#fff' : _d, _e = _a.size, size = _e === void 0 ? ComponentSize.Medium : _e, style = _a.style;
|
|
@@ -5027,7 +5027,7 @@ var DiscountTag = function (_a) {
|
|
|
5027
5027
|
};
|
|
5028
5028
|
var templateObject_1$1b, templateObject_2$M;
|
|
5029
5029
|
|
|
5030
|
-
var getStylesBySize$
|
|
5030
|
+
var getStylesBySize$6 = function (size) {
|
|
5031
5031
|
switch (size) {
|
|
5032
5032
|
case ComponentSize.Large:
|
|
5033
5033
|
return {
|
|
@@ -5064,13 +5064,13 @@ var Price = newStyled.p(templateObject_2$L || (templateObject_2$L = __makeTempla
|
|
|
5064
5064
|
var size = _a.size, finalPriceStyled = _a.finalPriceStyled, finalPriceStyledSmall = _a.finalPriceStyledSmall;
|
|
5065
5065
|
return finalPriceStyled || finalPriceStyledSmall
|
|
5066
5066
|
? finalPriceStyledSmall
|
|
5067
|
-
? (_b = getStylesBySize$
|
|
5068
|
-
: (_c = getStylesBySize$
|
|
5069
|
-
: (_d = getStylesBySize$
|
|
5067
|
+
? (_b = getStylesBySize$6(size)) === null || _b === void 0 ? void 0 : _b.finalPricefontSizeSmall
|
|
5068
|
+
: (_c = getStylesBySize$6(size)) === null || _c === void 0 ? void 0 : _c.finalPricefontSize
|
|
5069
|
+
: (_d = getStylesBySize$6(size)) === null || _d === void 0 ? void 0 : _d.fontSize;
|
|
5070
5070
|
}, function (_a) {
|
|
5071
5071
|
var _b;
|
|
5072
5072
|
var size = _a.size;
|
|
5073
|
-
return (_b = getStylesBySize$
|
|
5073
|
+
return (_b = getStylesBySize$6(size)) === null || _b === void 0 ? void 0 : _b.lineHeight;
|
|
5074
5074
|
}, function (_a) {
|
|
5075
5075
|
var color = _a.color;
|
|
5076
5076
|
return color;
|
|
@@ -5080,7 +5080,7 @@ var Price = newStyled.p(templateObject_2$L || (templateObject_2$L = __makeTempla
|
|
|
5080
5080
|
}, function (_a) {
|
|
5081
5081
|
var _b;
|
|
5082
5082
|
var margin = _a.margin, size = _a.size;
|
|
5083
|
-
return (margin ? (_b = getStylesBySize$
|
|
5083
|
+
return (margin ? (_b = getStylesBySize$6(size)) === null || _b === void 0 ? void 0 : _b.margin : '0');
|
|
5084
5084
|
}, function (_a) {
|
|
5085
5085
|
var finalPriceStyledSmall = _a.finalPriceStyledSmall, size = _a.size;
|
|
5086
5086
|
return finalPriceStyledSmall ? (size === 'large' ? '-10px' : '-7px') : '0';
|
|
@@ -5088,7 +5088,7 @@ var Price = newStyled.p(templateObject_2$L || (templateObject_2$L = __makeTempla
|
|
|
5088
5088
|
var TagContainer = newStyled.p(templateObject_3$z || (templateObject_3$z = __makeTemplateObject(["\n margin: ", ";\n display: flex;\n align-items: center;\n"], ["\n margin: ", ";\n display: flex;\n align-items: center;\n"])), function (_a) {
|
|
5089
5089
|
var _b;
|
|
5090
5090
|
var size = _a.size;
|
|
5091
|
-
return (_b = getStylesBySize$
|
|
5091
|
+
return (_b = getStylesBySize$6(size)) === null || _b === void 0 ? void 0 : _b.margin;
|
|
5092
5092
|
});
|
|
5093
5093
|
function getTestId() {
|
|
5094
5094
|
var args = [];
|
|
@@ -9544,7 +9544,7 @@ var StyledSlider = newStyled(Slider)(templateObject_1$15 || (templateObject_1$15
|
|
|
9544
9544
|
});
|
|
9545
9545
|
var templateObject_1$15;
|
|
9546
9546
|
|
|
9547
|
-
var getStylesBySize$
|
|
9547
|
+
var getStylesBySize$5 = function (size) {
|
|
9548
9548
|
// rem units
|
|
9549
9549
|
switch (size) {
|
|
9550
9550
|
case ComponentSize.Large:
|
|
@@ -9576,7 +9576,7 @@ var getStylesBySize$4 = function (size) {
|
|
|
9576
9576
|
var SliderNavigation = function (_a) {
|
|
9577
9577
|
var children = _a.children, infinite = _a.infinite, arrows = _a.arrows, adaptiveHeight = _a.adaptiveHeight, dotsSize = _a.dotsSize, dotListMarginTop = _a.dotListMarginTop, _b = _a.initialSlide, initialSlide = _b === void 0 ? 0 : _b, _c = _a.dots, dots = _c === void 0 ? true : _c, _d = _a.slidesToShow, slidesToShow = _d === void 0 ? 1 : _d, _e = _a.speed, speed = _e === void 0 ? 500 : _e;
|
|
9578
9578
|
var _f = useState(0), activeIndex = _f[0], setActiveIndex = _f[1];
|
|
9579
|
-
var styles = dotsSize && getStylesBySize$
|
|
9579
|
+
var styles = dotsSize && getStylesBySize$5(dotsSize);
|
|
9580
9580
|
var theme = useTheme();
|
|
9581
9581
|
var nextArrow = arrows && (jsx(ArrowButton$1, { direction: "right", width: arrows.arrowWidth, height: arrows.arrowHeight }, void 0));
|
|
9582
9582
|
var prevArrow = arrows && (jsx(ArrowButton$1, { direction: "left", width: arrows.arrowWidth, height: arrows.arrowHeight }, void 0));
|
|
@@ -11459,7 +11459,7 @@ var ProgressBar = function (_a) {
|
|
|
11459
11459
|
};
|
|
11460
11460
|
var templateObject_1$_;
|
|
11461
11461
|
|
|
11462
|
-
var getStylesBySize$
|
|
11462
|
+
var getStylesBySize$4 = function (size) {
|
|
11463
11463
|
switch (size) {
|
|
11464
11464
|
case ComponentSize.Large:
|
|
11465
11465
|
return {
|
|
@@ -11484,15 +11484,15 @@ var Container$E = newStyled.div(templateObject_1$Z || (templateObject_1$Z = __ma
|
|
|
11484
11484
|
}, function (_a) {
|
|
11485
11485
|
var _b;
|
|
11486
11486
|
var size = _a.size;
|
|
11487
|
-
return (_b = getStylesBySize$
|
|
11487
|
+
return (_b = getStylesBySize$4(size)) === null || _b === void 0 ? void 0 : _b.widthHeight;
|
|
11488
11488
|
}, function (_a) {
|
|
11489
11489
|
var _b;
|
|
11490
11490
|
var size = _a.size;
|
|
11491
|
-
return (_b = getStylesBySize$
|
|
11491
|
+
return (_b = getStylesBySize$4(size)) === null || _b === void 0 ? void 0 : _b.widthHeight;
|
|
11492
11492
|
}, function (_a) {
|
|
11493
11493
|
var _b;
|
|
11494
11494
|
var size = _a.size;
|
|
11495
|
-
return (_b = getStylesBySize$
|
|
11495
|
+
return (_b = getStylesBySize$4(size)) === null || _b === void 0 ? void 0 : _b.margin;
|
|
11496
11496
|
}, function (_a) {
|
|
11497
11497
|
var hoverBackgroundColor = _a.hoverBackgroundColor;
|
|
11498
11498
|
return hoverBackgroundColor;
|
|
@@ -11720,14 +11720,14 @@ var StyledDisclosure = newStyled(Ye)(AccordionStyles.baseStyles, function (props
|
|
|
11720
11720
|
var StyledButton$1 = newStyled(Ye.Button)(AccordionSummaryStyles.baseStyles, function (props) { return [AccordionSummaryStyles[props.variant](props.theme, props.disabled)]; }, function (props) { return [AccordionSummaryStyles.title(props.titlecolor)]; });
|
|
11721
11721
|
var StyledPanel = newStyled(Ye.Panel)(AccordionDetailsStyles.baseStyles, function (props) { return [AccordionDetailsStyles[props.variant](props.theme)]; });
|
|
11722
11722
|
var Accordion$1 = function (_a) {
|
|
11723
|
-
var header = _a.header, headerOnOpen = _a.headerOnOpen, content = _a.content, defaultOpen = _a.defaultOpen, _b = _a.forceOpenHandler, forceOpenHandler = _b === void 0 ? false : _b, _c = _a.forceOpenValue, forceOpenValue = _c === void 0 ? false : _c, titleColor = _a.titleColor, variant = _a.variant, _d = _a.disabled, disabled = _d === void 0 ? false : _d, openIcon = _a.openIcon, closeIcon = _a.closeIcon, onClick = _a.onClick;
|
|
11723
|
+
var header = _a.header, headerOnOpen = _a.headerOnOpen, content = _a.content, defaultOpen = _a.defaultOpen, _b = _a.forceOpenHandler, forceOpenHandler = _b === void 0 ? false : _b, _c = _a.forceOpenValue, forceOpenValue = _c === void 0 ? false : _c, titleColor = _a.titleColor, variant = _a.variant, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.innerHTML, innerHTML = _e === void 0 ? false : _e, openIcon = _a.openIcon, closeIcon = _a.closeIcon, onClick = _a.onClick;
|
|
11724
11724
|
var theme = useTheme();
|
|
11725
11725
|
return (jsx$1(StyledDisclosure, __assign$1({ theme: theme, as: "div", defaultOpen: defaultOpen, variant: variant, disabled: disabled, onClick: onClick }, { children: function (_a) {
|
|
11726
11726
|
var open = _a.open;
|
|
11727
11727
|
var openWithForce = forceOpenHandler ? forceOpenValue : open;
|
|
11728
11728
|
var ControlIcon = disabled ? openIcon : openWithForce ? closeIcon : openIcon;
|
|
11729
11729
|
var showPanel = openWithForce && !disabled;
|
|
11730
|
-
return (jsxs$1(Fragment$1, { children: [jsxs$1(StyledButton$1, __assign$1({ theme: theme, variant: variant, disabled: disabled, titlecolor: titleColor }, { children: [showPanel && headerOnOpen ? headerOnOpen : header, jsx$1(ControlIcon, { title: openWithForce ? 'close icon' : 'open icon', height: theme.component.accordion.variant[variant].icon.height, width: theme.component.accordion.variant[variant].icon.width, fill: theme.component.accordion.variant[variant].icon.color }, void 0)] }), void 0), showPanel && (jsx$1(StyledPanel, __assign$1({ static: true, variant: variant, theme: theme }, { children: content }), void 0))] }, void 0));
|
|
11730
|
+
return (jsxs$1(Fragment$1, { children: [jsxs$1(StyledButton$1, __assign$1({ theme: theme, variant: variant, disabled: disabled, titlecolor: titleColor }, { children: [showPanel && headerOnOpen ? headerOnOpen : header, jsx$1(ControlIcon, { title: openWithForce ? 'close icon' : 'open icon', height: theme.component.accordion.variant[variant].icon.height, width: theme.component.accordion.variant[variant].icon.width, fill: theme.component.accordion.variant[variant].icon.color }, void 0)] }), void 0), showPanel && !innerHTML && (jsx$1(StyledPanel, __assign$1({ static: true, variant: variant, theme: theme }, { children: content }), void 0)), showPanel && innerHTML && (jsx$1("div", { dangerouslySetInnerHTML: { __html: content } }, void 0))] }, void 0));
|
|
11731
11731
|
} }), void 0));
|
|
11732
11732
|
};
|
|
11733
11733
|
|
|
@@ -11811,7 +11811,7 @@ var RadioInput = function (_a) {
|
|
|
11811
11811
|
var value = event.currentTarget.value;
|
|
11812
11812
|
onChange({ value: value, label: label });
|
|
11813
11813
|
};
|
|
11814
|
-
return (jsxs$1(Wrapper$4, { children: [jsxs$1(Container$D, __assign$1({ theme: theme, size: size, "data-testid": "container" }, { children: [jsx$1(Input$2, { id: "".concat(name, "-").concat(id), type: "radio", name: name, value: value, checked: checked, onChange: function (e) { return (disabled ? null : handleChange(e, label)); }, disabled: disabled }, void 0), jsx$1(CustomRadio, { size: size, isChecked: checked, disabled: disabled, theme: theme, "data-testid": "custom-radio" }, void 0)] }), void 0), jsx$1(Label$3, __assign$1({ htmlFor: "".concat(name, "-").concat(id), "data-testid": "label", variant: "regular", size:
|
|
11814
|
+
return (jsxs$1(Wrapper$4, { children: [jsxs$1(Container$D, __assign$1({ theme: theme, size: size, "data-testid": "container" }, { children: [jsx$1(Input$2, { id: "".concat(name, "-").concat(id), type: "radio", name: name, value: value, checked: checked, onChange: function (e) { return (disabled ? null : handleChange(e, label)); }, disabled: disabled }, void 0), jsx$1(CustomRadio, { size: size, isChecked: checked, disabled: disabled, theme: theme, "data-testid": "custom-radio" }, void 0)] }), void 0), jsx$1(Label$3, __assign$1({ htmlFor: "".concat(name, "-").concat(id), "data-testid": "label", variant: "regular", size: theme.component.radio.textSize, disabled: disabled }, { children: label }), void 0)] }, void 0));
|
|
11815
11815
|
};
|
|
11816
11816
|
var templateObject_1$X, templateObject_2$E;
|
|
11817
11817
|
|
|
@@ -11859,7 +11859,7 @@ var Tag$1 = function (_a) {
|
|
|
11859
11859
|
};
|
|
11860
11860
|
var templateObject_1$U;
|
|
11861
11861
|
|
|
11862
|
-
var getStylesBySize$
|
|
11862
|
+
var getStylesBySize$3 = function (size, styledBorder) {
|
|
11863
11863
|
switch (size) {
|
|
11864
11864
|
case ComponentSize.Large:
|
|
11865
11865
|
return {
|
|
@@ -11890,11 +11890,11 @@ var getStylesBySize$2 = function (size, styledBorder) {
|
|
|
11890
11890
|
var CategoryTag = function (_a) {
|
|
11891
11891
|
var text = _a.text, size = _a.size, className = _a.className, _b = _a.styledBorder, styledBorder = _b === void 0 ? false : _b;
|
|
11892
11892
|
var theme = useTheme();
|
|
11893
|
-
var stylesBySize = getStylesBySize$
|
|
11893
|
+
var stylesBySize = getStylesBySize$3(size, styledBorder);
|
|
11894
11894
|
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));
|
|
11895
11895
|
};
|
|
11896
11896
|
|
|
11897
|
-
var getStylesBySize$
|
|
11897
|
+
var getStylesBySize$2 = function (size, styledBorder) {
|
|
11898
11898
|
switch (size) {
|
|
11899
11899
|
case ComponentSize.Large:
|
|
11900
11900
|
return {
|
|
@@ -11924,7 +11924,7 @@ var getStylesBySize$1 = function (size, styledBorder) {
|
|
|
11924
11924
|
};
|
|
11925
11925
|
var SeasonOfferTag = function (_a) {
|
|
11926
11926
|
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;
|
|
11927
|
-
var stylesBySize = getStylesBySize$
|
|
11927
|
+
var stylesBySize = getStylesBySize$2(size, styledBorder);
|
|
11928
11928
|
return (jsx(Tag$1, { css: __assign$1({ backgroundColor: backgroundColor, fontWeight: 700, color: '#FFFFFF' }, stylesBySize), text: text, className: className }, void 0));
|
|
11929
11929
|
};
|
|
11930
11930
|
|
|
@@ -12636,7 +12636,7 @@ var ImageContainer$2 = newStyled.div(function (_a) {
|
|
|
12636
12636
|
var ImageHoverContainer = newStyled.img(templateObject_1$w || (templateObject_1$w = __makeTemplateObject(["\n opacity: 0;\n position: absolute;\n transition: all 0.4s ease-in-out;\n"], ["\n opacity: 0;\n position: absolute;\n transition: all 0.4s ease-in-out;\n"])));
|
|
12637
12637
|
var Container$o = newStyled.a(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: min-content;\n text-decoration: none;\n\n &:hover .hover__image {\n opacity: 1;\n }\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: min-content;\n text-decoration: none;\n\n &:hover .hover__image {\n opacity: 1;\n }\n"])));
|
|
12638
12638
|
var Title$2 = newStyled.p(templateObject_3$i || (templateObject_3$i = __makeTemplateObject(["\n font-size: 0.83rem;\n font-weight: normal;\n line-height: 1.375rem;\n min-height: 2.75rem;\n text-align: center;\n color: ", ";\n margin: 0.25rem 0;\n text-align: ", ";\n"], ["\n font-size: 0.83rem;\n font-weight: normal;\n line-height: 1.375rem;\n min-height: 2.75rem;\n text-align: center;\n color: ", ";\n margin: 0.25rem 0;\n text-align: ", ";\n"])), function (props) { return props.theme.colors.pallete.secondary.color; }, function (props) { return props.align; });
|
|
12639
|
-
var getStylesBySize = function (size) {
|
|
12639
|
+
var getStylesBySize$1 = function (size) {
|
|
12640
12640
|
switch (size) {
|
|
12641
12641
|
case ComponentSize.Medium:
|
|
12642
12642
|
return {
|
|
@@ -12667,7 +12667,7 @@ var MarginTopContainer = newStyled.div(templateObject_6$4 || (templateObject_6$4
|
|
|
12667
12667
|
var ProductItemMobile = function (_a) {
|
|
12668
12668
|
var title = _a.title, image = _a.image, imageHover = _a.imageHover, 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, priceAtBottom = _a.priceAtBottom, priceLoading = _a.priceLoading;
|
|
12669
12669
|
var theme = useTheme();
|
|
12670
|
-
var styles = getStylesBySize(size);
|
|
12670
|
+
var styles = getStylesBySize$1(size);
|
|
12671
12671
|
var space = useMemo(function () {
|
|
12672
12672
|
var _a;
|
|
12673
12673
|
return (_a = {},
|
|
@@ -17865,32 +17865,95 @@ var templateObject_1$3, templateObject_2$3, templateObject_3$3;
|
|
|
17865
17865
|
|
|
17866
17866
|
/* base styles & size variants */
|
|
17867
17867
|
var UserInfoTextStyles = {
|
|
17868
|
-
baseStyles: function (theme,
|
|
17868
|
+
baseStyles: function (theme, fontSize, alignCenter) {
|
|
17869
17869
|
return css({
|
|
17870
17870
|
margin: '0',
|
|
17871
17871
|
color: theme.colors.pallete.secondary.color,
|
|
17872
|
-
fontWeight: '
|
|
17873
|
-
fontSize:
|
|
17872
|
+
fontWeight: '400',
|
|
17873
|
+
fontSize: fontSize,
|
|
17874
17874
|
lineHeight: '130%',
|
|
17875
17875
|
textAlign: alignCenter ? 'center' : 'left',
|
|
17876
17876
|
});
|
|
17877
17877
|
},
|
|
17878
|
+
};
|
|
17879
|
+
var getStylesBySize = function (size, theme) {
|
|
17880
|
+
switch (size) {
|
|
17881
|
+
case ComponentSize.Large:
|
|
17882
|
+
return {
|
|
17883
|
+
imageMinHeight: theme.component.beforeAfter.size.large.image.minHeight,
|
|
17884
|
+
imageMinWidth: theme.component.beforeAfter.size.large.image.minWidth,
|
|
17885
|
+
mobileImageMinHeight: theme.component.beforeAfter.size.large.image.mobile.minHeight,
|
|
17886
|
+
mobileImageMinWidth: theme.component.beforeAfter.size.large.image.mobile.minWidth,
|
|
17887
|
+
imageContainerMaxWidth: theme.component.beforeAfter.size.large.imageContainer.maxWidth,
|
|
17888
|
+
imageContainerMobileMaxWidth: theme.component.beforeAfter.size.large.imageContainer.mobile.maxWidth,
|
|
17889
|
+
imageContainerPadding: theme.component.beforeAfter.size.large.imageContainer.padding,
|
|
17890
|
+
userInfoTextFontSize: theme.component.beforeAfter.size.large.userInfoText.fontSize,
|
|
17891
|
+
userInfoTextMobileFontSize: theme.component.beforeAfter.size.large.userInfoText.mobile.fontSize,
|
|
17892
|
+
};
|
|
17893
|
+
case ComponentSize.Medium:
|
|
17894
|
+
return {
|
|
17895
|
+
imageMinHeight: theme.component.beforeAfter.size.medium.image.minHeight,
|
|
17896
|
+
imageMinWidth: theme.component.beforeAfter.size.medium.image.minWidth,
|
|
17897
|
+
mobileImageMinHeight: theme.component.beforeAfter.size.medium.image.mobile.minHeight,
|
|
17898
|
+
mobileImageMinWidth: theme.component.beforeAfter.size.medium.image.mobile.minWidth,
|
|
17899
|
+
imageContainerMaxWidth: theme.component.beforeAfter.size.medium.imageContainer.maxWidth,
|
|
17900
|
+
imageContainerMobileMaxWidth: theme.component.beforeAfter.size.medium.imageContainer.mobile.maxWidth,
|
|
17901
|
+
imageContainerPadding: theme.component.beforeAfter.size.medium.imageContainer.padding,
|
|
17902
|
+
userInfoTextFontSize: theme.component.beforeAfter.size.medium.userInfoText.fontSize,
|
|
17903
|
+
userInfoTextMobileFontSize: theme.component.beforeAfter.size.medium.userInfoText.mobile.fontSize,
|
|
17904
|
+
};
|
|
17905
|
+
case ComponentSize.Small:
|
|
17906
|
+
return {
|
|
17907
|
+
imageMinHeight: theme.component.beforeAfter.size.small.image.minHeight,
|
|
17908
|
+
imageMinWidth: theme.component.beforeAfter.size.small.image.minWidth,
|
|
17909
|
+
mobileImageMinHeight: theme.component.beforeAfter.size.small.image.mobile.minHeight,
|
|
17910
|
+
mobileImageMinWidth: theme.component.beforeAfter.size.small.image.mobile.minWidth,
|
|
17911
|
+
imageContainerMaxWidth: theme.component.beforeAfter.size.small.imageContainer.maxWidth,
|
|
17912
|
+
imageContainerMobileMaxWidth: theme.component.beforeAfter.size.small.imageContainer.mobile.maxWidth,
|
|
17913
|
+
imageContainerPadding: theme.component.beforeAfter.size.small.imageContainer.padding,
|
|
17914
|
+
userInfoTextFontSize: theme.component.beforeAfter.size.small.userInfoText.fontSize,
|
|
17915
|
+
userInfoTextMobileFontSize: theme.component.beforeAfter.size.small.userInfoText.mobile.fontSize,
|
|
17916
|
+
};
|
|
17917
|
+
default:
|
|
17918
|
+
return {
|
|
17919
|
+
imageMinHeight: theme.component.beforeAfter.size.small.image.minHeight,
|
|
17920
|
+
imageMinWidth: theme.component.beforeAfter.size.small.image.minWidth,
|
|
17921
|
+
mobileImageMinHeight: theme.component.beforeAfter.size.small.image.mobile.minHeight,
|
|
17922
|
+
mobileImageMinWidth: theme.component.beforeAfter.size.small.image.mobile.minWidth,
|
|
17923
|
+
imageContainerMaxWidth: theme.component.beforeAfter.size.small.imageContainer.maxWidth,
|
|
17924
|
+
imageContainerMobileMaxWidth: theme.component.beforeAfter.size.small.imageContainer.mobile.maxWidth,
|
|
17925
|
+
imageContainerPadding: theme.component.beforeAfter.size.small.imageContainer.padding,
|
|
17926
|
+
userInfoTextFontSize: theme.component.beforeAfter.size.small.userInfoText.fontSize,
|
|
17927
|
+
userInfoTextMobileFontSize: theme.component.beforeAfter.size.small.userInfoText.mobile.fontSize,
|
|
17928
|
+
};
|
|
17929
|
+
}
|
|
17878
17930
|
};
|
|
17879
17931
|
|
|
17880
|
-
var Container$2 = newStyled.div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n row-gap: ", ";\n background: var(--colors-shades-white-color);\n border: 1px solid var(--colors-shades-50-color);\n box-sizing: border-box;\n
|
|
17881
|
-
|
|
17882
|
-
|
|
17932
|
+
var Container$2 = newStyled.div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n row-gap: ", ";\n background: var(--colors-shades-white-color);\n border: 1px solid var(--colors-shades-50-color);\n box-sizing: border-box;\n border-radius: 10px;\n max-width: ", ";\n width: 100%;\n height: 100%;\n padding: ", ";\n flex-wrap: wrap;\n"], ["\n display: flex;\n flex-direction: column;\n row-gap: ", ";\n background: var(--colors-shades-white-color);\n border: 1px solid var(--colors-shades-50-color);\n box-sizing: border-box;\n border-radius: 10px;\n max-width: ", ";\n width: 100%;\n height: 100%;\n padding: ", ";\n flex-wrap: wrap;\n"])), function (props) { return (props.isMobile ? '12px' : '15px'); }, function (props) {
|
|
17933
|
+
return props.isMobile
|
|
17934
|
+
? props.styles.imageContainerMobileMaxWidth
|
|
17935
|
+
: props.styles.imageContainerMaxWidth;
|
|
17936
|
+
}, function (props) { return props.styles.imageContainerPadding; });
|
|
17937
|
+
var ImageContainer$1 = newStyled.div(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 100%;\n column-gap: 4px;\n"], ["\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 100%;\n column-gap: 4px;\n"])));
|
|
17938
|
+
var ImageCard = newStyled.div(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n display: flex;\n min-height: ", ";\n min-width: ", ";\n width: ", ";\n flex-wrap: wrap;\n"], ["\n display: flex;\n min-height: ", ";\n min-width: ", ";\n width: ", ";\n flex-wrap: wrap;\n"])), function (props) {
|
|
17939
|
+
return props.isMobile ? props.styles.mobileImageMinHeight : props.styles.imageMinHeight;
|
|
17940
|
+
}, function (props) {
|
|
17941
|
+
return props.isMobile ? props.styles.mobileImageMinWidth : props.styles.imageMinWidth;
|
|
17942
|
+
}, function (props) {
|
|
17943
|
+
return props.isMobile ? props.styles.mobileImageMinWidth : props.styles.imageMinWidth;
|
|
17944
|
+
});
|
|
17883
17945
|
var UserInfoText = newStyled.div(function (_a) {
|
|
17884
|
-
var theme = _a.theme,
|
|
17946
|
+
var theme = _a.theme, fontSize = _a.fontSize, alignCenter = _a.alignCenter;
|
|
17885
17947
|
return [
|
|
17886
|
-
UserInfoTextStyles.baseStyles(theme,
|
|
17948
|
+
UserInfoTextStyles.baseStyles(theme, fontSize, alignCenter),
|
|
17887
17949
|
];
|
|
17888
17950
|
});
|
|
17889
17951
|
var BeforeAfterCard = function (_a) {
|
|
17890
|
-
var name = _a.name, age = _a.age, months = _a.months, beforeImage = _a.beforeImage, afterImage = _a.afterImage, _b = _a.alignCenter, alignCenter = _b === void 0 ? true : _b;
|
|
17952
|
+
var name = _a.name, age = _a.age, months = _a.months, beforeImage = _a.beforeImage, afterImage = _a.afterImage, _b = _a.alignCenter, alignCenter = _b === void 0 ? true : _b, _c = _a.imageBorderRadius, imageBorderRadius = _c === void 0 ? '' : _c, _d = _a.size, size = _d === void 0 ? ComponentSize.Small : _d;
|
|
17891
17953
|
var theme = useTheme();
|
|
17892
17954
|
var isMobile = useWindowDimensions({ desktop: 768, mobile: 0 }).isMobile;
|
|
17893
|
-
|
|
17955
|
+
var stylesBySize = getStylesBySize(size, theme);
|
|
17956
|
+
return (jsxs$1(Container$2, __assign$1({ "data-testid": "Container", isMobile: isMobile, styles: stylesBySize }, { children: [jsxs$1(ImageContainer$1, __assign$1({ "data-testid": "ImageContainer", isMobile: isMobile }, { children: [jsx$1(ImageCard, __assign$1({ "data-testid": "ImageCard", isMobile: isMobile, styles: stylesBySize }, { children: jsx$1(Image, { borderRadius: imageBorderRadius, src: beforeImage, alt: "before", height: "100%", width: "100%" }, void 0) }), void 0), jsx$1(ImageCard, __assign$1({ isMobile: isMobile, styles: stylesBySize }, { children: jsx$1(Image, { borderRadius: imageBorderRadius, src: afterImage, alt: "after", height: "100%", width: "100%" }, void 0) }), void 0)] }), void 0), jsx$1(UserInfoText, __assign$1({ "data-testid": "UserInfoText", theme: theme, alignCenter: alignCenter, fontSize: isMobile ? stylesBySize.userInfoTextMobileFontSize : stylesBySize.userInfoTextFontSize }, { children: "".concat(name, ", ").concat(age, " | ").concat(months, " months") }), void 0)] }), void 0));
|
|
17894
17957
|
};
|
|
17895
17958
|
var templateObject_1$2, templateObject_2$2, templateObject_3$2;
|
|
17896
17959
|
|