@trafilea/afrodita-components 6.5.2 → 6.5.3
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.esm.js +10 -2
- package/build/index.esm.js.map +1 -1
- package/build/index.js +10 -2
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -18896,14 +18896,22 @@ var ButtonsContainer = newStyled.div(templateObject_1$c || (templateObject_1$c =
|
|
|
18896
18896
|
var Row = newStyled.div(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n gap: 5px;\n display: flex;\n margin: 5px 0 3px;\n flex-wrap: wrap;\n\n & button {\n font-weight: 600;\n }\n"], ["\n gap: 5px;\n display: flex;\n margin: 5px 0 3px;\n flex-wrap: wrap;\n\n & button {\n font-weight: 600;\n }\n"])));
|
|
18897
18897
|
var templateObject_1$c, templateObject_2$8;
|
|
18898
18898
|
|
|
18899
|
+
var getPreLabel = function (sizeLabel) {
|
|
18900
|
+
if (sizeLabel === '3XL' || sizeLabel === '4XL') {
|
|
18901
|
+
return 'Runs big - ';
|
|
18902
|
+
}
|
|
18903
|
+
if (sizeLabel === 'M' || sizeLabel === 'L' || sizeLabel === 'M / L') {
|
|
18904
|
+
return 'Runs small - ';
|
|
18905
|
+
}
|
|
18906
|
+
return '';
|
|
18907
|
+
};
|
|
18899
18908
|
var SizeSelector = function (_a) {
|
|
18900
18909
|
var label = _a.label, sizes = _a.sizes, selectedValue = _a.selectedValue, onChange = _a.onChange, onClickSizeTip = _a.onClickSizeTip, _b = _a.inline, inline = _b === void 0 ? false : _b, width = _a.width, _c = _a.hasSizeGuide, hasSizeGuide = _c === void 0 ? false : _c;
|
|
18901
|
-
var isLarge = selectedValue.label === '3XL' || selectedValue.label === '4XL';
|
|
18902
18910
|
return (jsxs("div", __assign$1({ css: {
|
|
18903
18911
|
display: 'flex',
|
|
18904
18912
|
flexDirection: inline ? 'row' : 'column',
|
|
18905
18913
|
alignItems: inline ? 'center' : 'start',
|
|
18906
|
-
} }, { children: [jsxs(Text$8, __assign$1({ variant: "body", weight: "regular", size: "small", css: { alignSelf: inline ? 'start' : 'inherit', padding: inline ? '0.75rem 0' : '0' } }, { children: [label, !inline && (jsx(Text$8, __assign$1({ variant: "label", weight: "demi", size: "regular" }, { children: selectedValue.description }), void 0))] }), void 0), hasSizeGuide && (jsxs(Row, { children: [jsx(Icon.Actions.CircleInfo, { width: 1.2 }, void 0), jsx(Text$8, __assign$1({ variant: "body", weight: "demi", size: "small", css: { display: 'flex' } }, { children: "Sizing Tip:" }), void 0),
|
|
18914
|
+
} }, { children: [jsxs(Text$8, __assign$1({ variant: "body", weight: "regular", size: "small", css: { alignSelf: inline ? 'start' : 'inherit', padding: inline ? '0.75rem 0' : '0' } }, { children: [label, !inline && (jsx(Text$8, __assign$1({ variant: "label", weight: "demi", size: "regular" }, { children: selectedValue.description }), void 0))] }), void 0), hasSizeGuide && (jsxs(Row, { children: [jsx(Icon.Actions.CircleInfo, { width: 1.2 }, void 0), jsx(Text$8, __assign$1({ variant: "body", weight: "demi", size: "small", css: { display: 'flex' } }, { children: "Sizing Tip:" }), void 0), jsxs(Text$8, __assign$1({ variant: "body", weight: "regular", size: "small" }, { children: [getPreLabel(selectedValue.label), "Refer to our"] }), void 0), onClickSizeTip && (jsx(SizeFitGuide, { title: "Size and Fit Guide", onClick: onClickSizeTip, hideIcon: true }, void 0))] }, void 0)), jsx(ButtonsContainer, __assign$1({ inline: inline }, { children: sizes.map(function (size) {
|
|
18907
18915
|
var active = !size.disabled && size.label === selectedValue.label;
|
|
18908
18916
|
return (jsx(SelectorSecondary, { css: {
|
|
18909
18917
|
padding: '0.75rem 1rem 0.625rem',
|