@trafilea/afrodita-components 6.5.10 → 6.5.11
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 +6 -1
- package/build/index.esm.js +3 -11
- package/build/index.esm.js.map +1 -1
- package/build/index.js +3 -11
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -2997,6 +2997,10 @@ interface SizeFitGuideProps {
|
|
|
2997
2997
|
}
|
|
2998
2998
|
declare const SizeFitGuide: ({ title, fitPercentage, onClick, onClickFitPercentage, hideIcon, }: SizeFitGuideProps) => JSX.Element;
|
|
2999
2999
|
|
|
3000
|
+
declare type Size = 'S' | 'XS / S' | 'M' | 'M / L' | 'L' | 'XL' | 'XL / 2XL' | '2XL' | '3XL' | '4XL';
|
|
3001
|
+
declare type SizeTipReference = {
|
|
3002
|
+
[key in Size]?: string;
|
|
3003
|
+
};
|
|
3000
3004
|
interface SizeSelectorProps {
|
|
3001
3005
|
label: string;
|
|
3002
3006
|
sizes: SizeOption[];
|
|
@@ -3006,8 +3010,9 @@ interface SizeSelectorProps {
|
|
|
3006
3010
|
inline?: boolean;
|
|
3007
3011
|
width?: string;
|
|
3008
3012
|
hasSizeGuide?: boolean;
|
|
3013
|
+
sizeTipReferences?: SizeTipReference;
|
|
3009
3014
|
}
|
|
3010
|
-
declare const SizeSelector: ({ label, sizes, selectedValue, onChange, onClickSizeTip, inline, width, hasSizeGuide, }: SizeSelectorProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
3015
|
+
declare const SizeSelector: ({ label, sizes, selectedValue, onChange, onClickSizeTip, inline, width, hasSizeGuide, sizeTipReferences, }: SizeSelectorProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
3011
3016
|
|
|
3012
3017
|
interface SliderNavigationProps {
|
|
3013
3018
|
children: JSX.Element | JSX.Element[] | StyledComponent<any>;
|
package/build/index.esm.js
CHANGED
|
@@ -18876,22 +18876,14 @@ var ButtonsContainer = newStyled.div(templateObject_1$c || (templateObject_1$c =
|
|
|
18876
18876
|
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"])));
|
|
18877
18877
|
var templateObject_1$c, templateObject_2$8;
|
|
18878
18878
|
|
|
18879
|
-
var getPreLabel = function (sizeLabel) {
|
|
18880
|
-
if (sizeLabel === '3XL' || sizeLabel === '4XL') {
|
|
18881
|
-
return 'Runs big - ';
|
|
18882
|
-
}
|
|
18883
|
-
if (sizeLabel === 'M' || sizeLabel === 'L' || sizeLabel === 'M / L') {
|
|
18884
|
-
return 'Runs small - ';
|
|
18885
|
-
}
|
|
18886
|
-
return '';
|
|
18887
|
-
};
|
|
18888
18879
|
var SizeSelector = function (_a) {
|
|
18889
|
-
var
|
|
18880
|
+
var _b;
|
|
18881
|
+
var label = _a.label, sizes = _a.sizes, selectedValue = _a.selectedValue, onChange = _a.onChange, onClickSizeTip = _a.onClickSizeTip, _c = _a.inline, inline = _c === void 0 ? false : _c, width = _a.width, _d = _a.hasSizeGuide, hasSizeGuide = _d === void 0 ? false : _d, sizeTipReferences = _a.sizeTipReferences;
|
|
18890
18882
|
return (jsxs("div", __assign$1({ css: {
|
|
18891
18883
|
display: 'flex',
|
|
18892
18884
|
flexDirection: inline ? 'row' : 'column',
|
|
18893
18885
|
alignItems: inline ? 'center' : 'start',
|
|
18894
|
-
} }, { 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),
|
|
18886
|
+
} }, { 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), jsx(Text$8, __assign$1({ variant: "body", weight: "regular", size: "small" }, { children: (_b = sizeTipReferences === null || sizeTipReferences === void 0 ? void 0 : sizeTipReferences[selectedValue.label]) !== null && _b !== void 0 ? _b : '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) {
|
|
18895
18887
|
var active = !size.disabled && size.label === selectedValue.label;
|
|
18896
18888
|
return (jsx(SelectorSecondary, { css: {
|
|
18897
18889
|
padding: '0.75rem 1rem 0.625rem',
|