@trafilea/afrodita-components 6.57.1 → 6.57.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.d.ts +7 -1
- package/build/index.esm.js +46 -17
- package/build/index.esm.js.map +1 -1
- package/build/index.js +46 -17
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -175,6 +175,7 @@ declare const HorizontalDivider: _emotion_styled.StyledComponent<{
|
|
|
175
175
|
declare type StyledIconProps = {
|
|
176
176
|
backgroundColor?: string;
|
|
177
177
|
opacity?: number | string;
|
|
178
|
+
showTooltipTitle?: boolean;
|
|
178
179
|
};
|
|
179
180
|
|
|
180
181
|
declare type Actions$1 = 'actions/add' | 'actions/check_box_empty' | 'actions/check_box_light' | 'actions/check_box_solid' | 'actions/check' | 'actions/circle_check' | 'actions/circle_clear' | 'actions/circle_info' | 'actions/circle_minus' | 'actions/circle_plus' | 'actions/circle_question' | 'actions/circle_solid_check' | 'actions/circle_solid_clear' | 'actions/circle_solid_info' | 'actions/circle_solid_minus' | 'actions/circle_solid_plus' | 'actions/circle_solid_question' | 'actions/circle_solid_styled_check' | 'actions/circle_solid_warning' | 'actions/circle_solid_reload' | 'actions/circle_warning' | 'actions/clear_light' | 'actions/close' | 'actions/copy_outlined' | 'actions/copy' | 'actions/edit' | 'actions/light_check' | 'actions/light_exclamation' | 'actions/like_solid' | 'actions/like' | 'actions/like_bold' | 'actions/minus' | 'actions/not_allowed' | 'actions/question' | 'actions/radio_empty' | 'actions/radio_filled' | 'actions/settings_solid' | 'actions/settings' | 'actions/share' | 'actions/signout' | 'actions/signout_light' | 'actions/trash' | 'actions/warning' | 'actions/navigate' | 'actions/camera';
|
|
@@ -187,7 +188,7 @@ declare type MyAccount$1 = 'myaccount/birthday_gifts' | 'myaccount/community' |
|
|
|
187
188
|
declare type Navigation$1 = 'navigation/address_information' | 'navigation/benefits' | 'navigation/club_membership' | 'navigation/ellipsis' | 'navigation/ellipsis_horizontal' | 'navigation/filters' | 'navigation/hamburger' | 'navigation/home' | 'navigation/home_solid' | 'navigation/loading' | 'navigation/lock' | 'navigation/lock_solid' | 'navigation/map_marker' | 'navigation/map_marker_light' | 'navigation/map_solid' | 'navigation/menu_lines' | 'navigation/search' | 'navigation/shaperbox' | 'navigation/shopping_bag' | 'navigation/shopping_bag_v2' | 'navigation/shopping_bag_v3' | 'navigation/shopping_bag_v4' | 'navigation/shopping_cart' | 'navigation/shopping_cart_v2' | 'navigation/slide_dot' | 'navigation/slide_dot_solid' | 'navigation/user' | 'navigation/address_information_light' | 'navigation/user_solid' | 'navigation/user_v2' | 'navigation/filters_v2' | 'navigation/gift';
|
|
188
189
|
declare type Other$1 = 'other/bod_con_label' | 'other/bod_con_mobile_label' | 'other/call_us' | 'other/chat' | 'other/email' | 'other/express_shipping' | 'other/fit_guarantee' | 'other/fit_predictor' | 'other/free_exchange' | 'other/get_discount' | 'other/hassel_free_returns' | 'other/loading' | 'other/mc_afee' | 'other/megafone' | 'other/play' | 'other/qr_code' | 'other/question_with_circle' | 'other/revel_beauty' | 'other/shapermint' | 'other/shapermint_club_icon' | 'other/shapermint_club_icon2' | 'other/shapermint_club_label' | 'other/shapermint_club_mobile_label' | 'other/shapermint_logo' | 'other/shm_club' | 'other/shop_now' | 'other/sign_form' | 'other/sixty_days_tsd' | 'other/the_bod_con' | 'other/the_spa_dr' | 'other/lock' | 'other/help_center' | 'other/arrow_outward' | 'other/coupons' | 'other/flag_usa' | 'other/flag_canada' | 'other/flag_aus' | 'other/flag_uk' | 'other/flag_nz' | 'other/flag_sg';
|
|
189
190
|
declare type Payment$1 = 'payment/amazon' | 'payment/amex' | 'payment/jcb' | 'payment/klarna' | 'payment/master_card' | 'payment/paypal' | 'payment/visa' | 'payment/payment_methods';
|
|
190
|
-
declare type PDP$1 = 'pdp/circle_number' | 'pdp/clock' | 'pdp/drop' | 'pdp/drop_empty' | 'pdp/error_cross' | 'pdp/flag_usa' | 'pdp/hours' | 'pdp/klarna_logo' | 'pdp/light_bulb' | 'pdp/free_returns_v2' | 'pdp/free_shipping_v2' | 'pdp/loading_trafisizy' | 'pdp/minus' | 'pdp/moon' | 'pdp/new_clock' | 'pdp/play_mini' | 'pdp/play_video' | 'pdp/plus' | 'pdp/rule' | 'pdp/shipping' | 'pdp/shipping_empty' | 'pdp/size_empty' | 'pdp/size_empty_v2' | 'pdp/size_with_stars' | 'pdp/star' | 'pdp/stars' | 'pdp/star_empty' | 'pdp/star_half' | 'pdp/stopwatch' | 'pdp/drop_v2' | 'pdp/few_drops' | 'pdp/trust_badge' | 'pdp/verified' | 'pdp/wrinkle_free_face' | 'pdp/skin_appearance' | 'pdp/shine_heart' | 'pdp/cruelty_free' | 'pdp/ph_formula' | 'pdp/box' | 'pdp/afterpay_logo' | 'pdp/trustpilot_star' | 'pdp/trustpilot_half_star';
|
|
191
|
+
declare type PDP$1 = 'pdp/circle_number' | 'pdp/clock' | 'pdp/drop' | 'pdp/drop_empty' | 'pdp/error_cross' | 'pdp/flag_usa' | 'pdp/hours' | 'pdp/klarna_logo' | 'pdp/light_bulb' | 'pdp/free_returns_v2' | 'pdp/free_shipping_v2' | 'pdp/loading_trafisizy' | 'pdp/minus' | 'pdp/moon' | 'pdp/tape_measure' | 'pdp/new_clock' | 'pdp/play_mini' | 'pdp/play_video' | 'pdp/plus' | 'pdp/rule' | 'pdp/shipping' | 'pdp/shipping_empty' | 'pdp/size_empty' | 'pdp/size_empty_v2' | 'pdp/size_with_stars' | 'pdp/star' | 'pdp/stars' | 'pdp/star_empty' | 'pdp/star_half' | 'pdp/stopwatch' | 'pdp/drop_v2' | 'pdp/few_drops' | 'pdp/trust_badge' | 'pdp/verified' | 'pdp/wrinkle_free_face' | 'pdp/skin_appearance' | 'pdp/shine_heart' | 'pdp/cruelty_free' | 'pdp/ph_formula' | 'pdp/box' | 'pdp/afterpay_logo' | 'pdp/trustpilot_star' | 'pdp/trustpilot_half_star';
|
|
191
192
|
declare type SlideDots$1 = 'slidedots/slide_dot';
|
|
192
193
|
declare type SocialMedia$1 = 'socialmedia/facebook' | 'socialmedia/facebook_solid' | 'socialmedia/instagram' | 'socialmedia/instagram_solid' | 'socialmedia/interaction' | 'socialmedia/pinterest' | 'socialmedia/twitter' | 'socialmedia/youtube' | 'socialmedia/spotify' | 'socialmedia/apple_podcast';
|
|
193
194
|
declare type IconName = Actions$1 | Arrows$1 | Custom$1 | Download$1 | Emoji$1 | Messaging$1 | MyAccount$1 | Navigation$1 | Other$1 | Payment$1 | PDP$1 | SlideDots$1 | SocialMedia$1;
|
|
@@ -200,6 +201,7 @@ declare type IconProps$1 = {
|
|
|
200
201
|
name: IconName;
|
|
201
202
|
svgProps?: Omit<SVGProps<SVGElement>, 'ref'>;
|
|
202
203
|
className?: string;
|
|
204
|
+
showTooltipTitle?: boolean;
|
|
203
205
|
} & StyledIconProps;
|
|
204
206
|
|
|
205
207
|
declare const Icon$1: react__default.NamedExoticComponent<IconProps$1>;
|
|
@@ -1127,6 +1129,8 @@ declare const LightBulb: IconComponent;
|
|
|
1127
1129
|
|
|
1128
1130
|
declare const LoadingTrafisizy: IconComponent;
|
|
1129
1131
|
|
|
1132
|
+
declare const TapeMeasure: IconComponent;
|
|
1133
|
+
|
|
1130
1134
|
declare const Minus: IconComponent;
|
|
1131
1135
|
|
|
1132
1136
|
declare const Moon: IconComponent;
|
|
@@ -1184,6 +1188,7 @@ declare const PDP_Hours: typeof Hours;
|
|
|
1184
1188
|
declare const PDP_KlarnaLogo: typeof KlarnaLogo;
|
|
1185
1189
|
declare const PDP_LightBulb: typeof LightBulb;
|
|
1186
1190
|
declare const PDP_LoadingTrafisizy: typeof LoadingTrafisizy;
|
|
1191
|
+
declare const PDP_TapeMeasure: typeof TapeMeasure;
|
|
1187
1192
|
declare const PDP_Minus: typeof Minus;
|
|
1188
1193
|
declare const PDP_Moon: typeof Moon;
|
|
1189
1194
|
declare const PDP_NewClock: typeof NewClock;
|
|
@@ -1222,6 +1227,7 @@ declare namespace PDP {
|
|
|
1222
1227
|
PDP_KlarnaLogo as KlarnaLogo,
|
|
1223
1228
|
PDP_LightBulb as LightBulb,
|
|
1224
1229
|
PDP_LoadingTrafisizy as LoadingTrafisizy,
|
|
1230
|
+
PDP_TapeMeasure as TapeMeasure,
|
|
1225
1231
|
PDP_Minus as Minus,
|
|
1226
1232
|
PDP_Moon as Moon,
|
|
1227
1233
|
PDP_NewClock as NewClock,
|
package/build/index.esm.js
CHANGED
|
@@ -3572,7 +3572,7 @@ var getArrowStyles = function (position, borderColor, backgroundColor) {
|
|
|
3572
3572
|
case ComponentPosition.BottomLeft:
|
|
3573
3573
|
return "\n &::before,&::after\n {\n content: '';\n position: absolute;\n top: 0%;\n left: 171px;\n margin-top: -9px;\n border: 10px solid transparent;\n border-top: 0;\n }\n \n &::before {\n border-bottom: 10px solid ".concat(borderColor, ";\n margin-top: -10px;\n }\n &::after {\n border-bottom: 10px solid ").concat(backgroundColor, ";\n z-index: 999;\n }");
|
|
3574
3574
|
case ComponentPosition.BottomRight:
|
|
3575
|
-
return "\n &::before,&::after\n {\n content: '';\n position: absolute;\n top: 0%;\n left:
|
|
3575
|
+
return "\n &::before,&::after\n {\n content: '';\n position: absolute;\n top: 0%;\n left: 28px;\n margin-top: -9px;\n border: 10px solid transparent;\n border-top: 0;\n }\n \n &::before {\n border-bottom: 10px solid ".concat(borderColor, ";\n margin-top: -10px;\n }\n &::after {\n border-bottom: 10px solid ").concat(backgroundColor, ";\n z-index: 999;\n }");
|
|
3576
3576
|
case ComponentPosition.Left:
|
|
3577
3577
|
return "\n &::before,&::after\n {\n content: '';\n position: absolute;\n top: 50%;\n left: 100%;\n margin-top: -10px;\n border: 10px solid transparent;\n border-right: 0;s\n border-left: 10px solid transparent;\n margin-left: -1px;\n }\n \n &::before {\n border-left: 10px solid ".concat(borderColor, ";\n \n }\n &::after {\n border-left: 10px solid ").concat(backgroundColor, ";\n z-index: 999;\n }");
|
|
3578
3578
|
case ComponentPosition.Right:
|
|
@@ -3594,6 +3594,24 @@ var getTooltipAlignItems = function (position, align) {
|
|
|
3594
3594
|
case ComponentPosition.Right:
|
|
3595
3595
|
return 'center';
|
|
3596
3596
|
}
|
|
3597
|
+
};
|
|
3598
|
+
var getCloseIconRight = function (position, defaultRight) {
|
|
3599
|
+
switch (position) {
|
|
3600
|
+
case ComponentPosition.BottomLeft:
|
|
3601
|
+
case ComponentPosition.BottomRight:
|
|
3602
|
+
return '.55rem';
|
|
3603
|
+
default:
|
|
3604
|
+
return defaultRight;
|
|
3605
|
+
}
|
|
3606
|
+
};
|
|
3607
|
+
var getTooltipTextMaxWidth = function (position) {
|
|
3608
|
+
switch (position) {
|
|
3609
|
+
case ComponentPosition.BottomLeft:
|
|
3610
|
+
case ComponentPosition.BottomRight:
|
|
3611
|
+
return '203px';
|
|
3612
|
+
default:
|
|
3613
|
+
return undefined;
|
|
3614
|
+
}
|
|
3597
3615
|
};
|
|
3598
3616
|
|
|
3599
3617
|
var Wrapper$8 = newStyled.div(templateObject_1$2D || (templateObject_1$2D = __makeTemplateObject(["\n display: flex;\n flex-direction: ", ";\n align-items: center;\n cursor: pointer;\n\n &:hover {\n .tooltip-container {\n visibility: ", ";\n opacity: ", ";\n cursor: text;\n }\n }\n"], ["\n display: flex;\n flex-direction: ", ";\n align-items: center;\n cursor: pointer;\n\n &:hover {\n .tooltip-container {\n visibility: ", ";\n opacity: ", ";\n cursor: text;\n }\n }\n"])), function (_a) {
|
|
@@ -3637,10 +3655,10 @@ var getTooltipMargin = function (actual, expected, margin) {
|
|
|
3637
3655
|
return "calc(".concat(margin, " - 37px)");
|
|
3638
3656
|
}
|
|
3639
3657
|
if (actual === ComponentPosition.BottomRight && expected === ComponentPosition.Right) {
|
|
3640
|
-
return '-
|
|
3658
|
+
return '-30px';
|
|
3641
3659
|
}
|
|
3642
3660
|
if (actual === ComponentPosition.BottomLeft && expected === ComponentPosition.Left) {
|
|
3643
|
-
return '-
|
|
3661
|
+
return '-40px';
|
|
3644
3662
|
}
|
|
3645
3663
|
return actual === expected ? margin : '0';
|
|
3646
3664
|
};
|
|
@@ -3655,8 +3673,8 @@ var TooltipText = newStyled.div(templateObject_4$17 || (templateObject_4$17 = __
|
|
|
3655
3673
|
var theme = _a.theme;
|
|
3656
3674
|
return theme.component.autoship.tooltip.text.alignment;
|
|
3657
3675
|
}, function (_a) {
|
|
3658
|
-
var theme = _a.theme;
|
|
3659
|
-
return theme.component.autoship.tooltip.text.maxWidth;
|
|
3676
|
+
var theme = _a.theme, maxWidth = _a.maxWidth;
|
|
3677
|
+
return maxWidth !== null && maxWidth !== void 0 ? maxWidth : theme.component.autoship.tooltip.text.maxWidth;
|
|
3660
3678
|
}, function (_a) {
|
|
3661
3679
|
var color = _a.color;
|
|
3662
3680
|
return color;
|
|
@@ -3691,12 +3709,12 @@ var Tooltip = function (_a) {
|
|
|
3691
3709
|
var ref = tooltipRef.current;
|
|
3692
3710
|
setTooltipHeight((ref === null || ref === void 0 ? void 0 : ref.offsetHeight) || 0);
|
|
3693
3711
|
}, [tooltipRef]);
|
|
3694
|
-
return (jsxs$1(Wrapper$8, __assign$1({ position: position, disableHover: closeTooltip, onMouseEnter: function () { return setCloseTooltip(closeTooltip && false); }, "data-testid": "TooltipWrapper" }, { children: [jsx$1("div", __assign$1({ ref: childrenRef, onClick: function () { return closeTooltip && setCloseTooltip(false); }, onKeyDown: function (e) { return e.key === 'Enter' && closeTooltip && setCloseTooltip(false); }, role: "button", tabIndex: 0 }, { children: children }), void 0), jsxs$1(TooltipContainer, __assign$1({ position: position, align: align, maxWidth: maxWidth, childrenWidth: childrenWidth, tooltipHeight: tooltipHeight, ref: tooltipRef, onClick: onClick, "data-testid": "TooltipContainer", className: "tooltip-container ".concat(closeTooltip ? 'hidden' : ''), borderColor: theme.colors.shades['200'].color, backgroundColor: backgroundColor ? backgroundColor : theme.colors.shades.white.color, withArrow: withArrow, "data-position": position }, { children: [(showCloseIcon || isMobile) && (jsx$1(CloseToolTip, __assign$1({ right: header === null || header === void 0 ? void 0 : header.iconRight, onClick: function () { return setCloseTooltip(true); } }, { children: jsx$1(Icon.Actions.Close, { width: closeBtnSize, height: closeBtnSize, fill: (_b = header === null || header === void 0 ? void 0 : header.iconFill) !== null && _b !== void 0 ? _b : theme.colors.pallete.secondary.color }, void 0) }), void 0)), jsxs$1(ContentWrapper$1, __assign$1({ className: "tooltip-wrapper", borderColor: theme.colors.shades['200'].color, backgroundColor: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : theme.colors.shades.white.color }, { children: [header && (jsxs$1(TopSection, __assign$1({ "data-testid": "TooltipHeader" }, { children: [(header === null || header === void 0 ? void 0 : header.Icon) && (jsx$1(IconContainer$6, { children: React__default.createElement(header.Icon, {
|
|
3712
|
+
return (jsxs$1(Wrapper$8, __assign$1({ position: position, disableHover: closeTooltip, onMouseEnter: function () { return setCloseTooltip(closeTooltip && false); }, "data-testid": "TooltipWrapper" }, { children: [jsx$1("div", __assign$1({ ref: childrenRef, onClick: function () { return closeTooltip && setCloseTooltip(false); }, onKeyDown: function (e) { return e.key === 'Enter' && closeTooltip && setCloseTooltip(false); }, role: "button", tabIndex: 0 }, { children: children }), void 0), jsxs$1(TooltipContainer, __assign$1({ position: position, align: align, maxWidth: maxWidth, childrenWidth: childrenWidth, tooltipHeight: tooltipHeight, ref: tooltipRef, onClick: onClick, "data-testid": "TooltipContainer", className: "tooltip-container ".concat(closeTooltip ? 'hidden' : ''), borderColor: theme.colors.shades['200'].color, backgroundColor: backgroundColor ? backgroundColor : theme.colors.shades.white.color, withArrow: withArrow, "data-position": position }, { children: [(showCloseIcon || isMobile) && (jsx$1(CloseToolTip, __assign$1({ right: getCloseIconRight(position, header === null || header === void 0 ? void 0 : header.iconRight), onClick: function () { return setCloseTooltip(true); } }, { children: jsx$1(Icon.Actions.Close, { width: closeBtnSize, height: closeBtnSize, fill: (_b = header === null || header === void 0 ? void 0 : header.iconFill) !== null && _b !== void 0 ? _b : theme.colors.pallete.secondary.color }, void 0) }), void 0)), jsxs$1(ContentWrapper$1, __assign$1({ className: "tooltip-wrapper", borderColor: theme.colors.shades['200'].color, backgroundColor: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : theme.colors.shades.white.color }, { children: [header && (jsxs$1(TopSection, __assign$1({ "data-testid": "TooltipHeader" }, { children: [(header === null || header === void 0 ? void 0 : header.Icon) && (jsx$1(IconContainer$6, { children: React__default.createElement(header.Icon, {
|
|
3695
3713
|
testId: 'HeaderIcon',
|
|
3696
3714
|
fill: (header === null || header === void 0 ? void 0 : header.iconFill)
|
|
3697
3715
|
? header === null || header === void 0 ? void 0 : header.iconFill
|
|
3698
3716
|
: theme.colors.pallete.secondary.color,
|
|
3699
|
-
}) }, void 0)), jsx$1(Title$b, __assign$1({ color: (header === null || header === void 0 ? void 0 : header.titleColor) ? header === null || header === void 0 ? void 0 : header.titleColor : theme.colors.pallete.secondary.color }, { children: header.title }), void 0)] }), void 0)), content && (content === null || content === void 0 ? void 0 : content.text) ? (jsx$1(TooltipText, { color: (content === null || content === void 0 ? void 0 : content.color) ? content === null || content === void 0 ? void 0 : content.color : theme.colors.pallete.secondary.color, "data-testid": "TooltipText", dangerouslySetInnerHTML: { __html: content.text } }, void 0)) : (elementContent)] }), void 0)] }), void 0)] }), void 0));
|
|
3717
|
+
}) }, void 0)), jsx$1(Title$b, __assign$1({ color: (header === null || header === void 0 ? void 0 : header.titleColor) ? header === null || header === void 0 ? void 0 : header.titleColor : theme.colors.pallete.secondary.color }, { children: header.title }), void 0)] }), void 0)), content && (content === null || content === void 0 ? void 0 : content.text) ? (jsx$1(TooltipText, { color: (content === null || content === void 0 ? void 0 : content.color) ? content === null || content === void 0 ? void 0 : content.color : theme.colors.pallete.secondary.color, "data-testid": "TooltipText", dangerouslySetInnerHTML: { __html: content.text }, maxWidth: getTooltipTextMaxWidth(position) }, void 0)) : (elementContent)] }), void 0)] }), void 0)] }), void 0));
|
|
3700
3718
|
};
|
|
3701
3719
|
|
|
3702
3720
|
var FinalPriceStyledContainer$3 = newStyled.div(templateObject_1$2C || (templateObject_1$2C = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
@@ -3758,7 +3776,7 @@ var PriceLabelV2$1 = function (_a) {
|
|
|
3758
3776
|
text: tooltipText,
|
|
3759
3777
|
}, position: tooltipPosition !== null && tooltipPosition !== void 0 ? tooltipPosition : (isDiscount && isMobile
|
|
3760
3778
|
? ComponentPosition.BottomLeft
|
|
3761
|
-
: ComponentPosition.BottomRight), "data-testid": "tooltip" }, { children: jsx$1(Icon$1, { name: tooltipIcon !== null && tooltipIcon !== void 0 ? tooltipIcon : 'actions/circle_info', fill: theme.colors.shades[500].color, testId: "tooltip-icon" }, void 0) }), void 0) }), void 0)), isClubOffer && (jsx$1(TagContainer, __assign$1({ size: ComponentSize.Medium }, { children: clubOffer && (jsx$1(ClubOfferTag, __assign$1({}, clubOffer, { size: ComponentSize.Small, style: {
|
|
3779
|
+
: ComponentPosition.BottomRight), closeBtnSize: 0.7, "data-testid": "tooltip" }, { children: jsx$1(Icon$1, { name: tooltipIcon !== null && tooltipIcon !== void 0 ? tooltipIcon : 'actions/circle_info', fill: theme.colors.shades[500].color, testId: "tooltip-icon", showTooltipTitle: false }, void 0) }), void 0) }), void 0)), isClubOffer && (jsx$1(TagContainer, __assign$1({ size: ComponentSize.Medium }, { children: clubOffer && (jsx$1(ClubOfferTag, __assign$1({}, clubOffer, { size: ComponentSize.Small, style: {
|
|
3762
3780
|
borderRadius: '8px',
|
|
3763
3781
|
width: '107px',
|
|
3764
3782
|
height: '28px',
|
|
@@ -3985,7 +4003,7 @@ var SkeletonBox = function (_a) {
|
|
|
3985
4003
|
};
|
|
3986
4004
|
var templateObject_1$2v;
|
|
3987
4005
|
|
|
3988
|
-
var StyledSvgWrapper = newStyled.svg(templateObject_1$2u || (templateObject_1$2u = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n color: ", ";\n display: inline-block;\n vertical-align: middle;\n flex: none;\n ", "\n ", "\n"], ["\n width: ", ";\n height: ", ";\n color: ", ";\n display: inline-block;\n vertical-align: middle;\n flex: none;\n ", "\n ", "\n"])), function (_a) {
|
|
4006
|
+
var StyledSvgWrapper = newStyled.svg(templateObject_1$2u || (templateObject_1$2u = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n color: ", ";\n display: inline-block;\n vertical-align: middle;\n flex: none;\n ", "\n ", "\n ", "\n"], ["\n width: ", ";\n height: ", ";\n color: ", ";\n display: inline-block;\n vertical-align: middle;\n flex: none;\n ", "\n ", "\n ", "\n"])), function (_a) {
|
|
3989
4007
|
var width = _a.width;
|
|
3990
4008
|
return width;
|
|
3991
4009
|
}, function (_a) {
|
|
@@ -4000,8 +4018,12 @@ var StyledSvgWrapper = newStyled.svg(templateObject_1$2u || (templateObject_1$2u
|
|
|
4000
4018
|
}, function (_a) {
|
|
4001
4019
|
var opacity = _a.opacity;
|
|
4002
4020
|
return opacity && "opacity: ".concat(opacity, ";");
|
|
4021
|
+
}, function (_a) {
|
|
4022
|
+
var showTooltipTitle = _a.showTooltipTitle;
|
|
4023
|
+
return !showTooltipTitle &&
|
|
4024
|
+
"\n use {\n pointer-events: none;\n }\n ";
|
|
4003
4025
|
});
|
|
4004
|
-
var StyledImageWrapper = newStyled.img(templateObject_2$1P || (templateObject_2$1P = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n display: inline-block;\n vertical-align: middle;\n flex: none;\n ", "\n ", "\n"], ["\n width: ", ";\n height: ", ";\n display: inline-block;\n vertical-align: middle;\n flex: none;\n ", "\n ", "\n"])), function (_a) {
|
|
4026
|
+
var StyledImageWrapper = newStyled.img(templateObject_2$1P || (templateObject_2$1P = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n display: inline-block;\n vertical-align: middle;\n flex: none;\n ", "\n ", "\n ", "\n"], ["\n width: ", ";\n height: ", ";\n display: inline-block;\n vertical-align: middle;\n flex: none;\n ", "\n ", "\n ", "\n"])), function (_a) {
|
|
4005
4027
|
var width = _a.width;
|
|
4006
4028
|
return width;
|
|
4007
4029
|
}, function (_a) {
|
|
@@ -4013,6 +4035,10 @@ var StyledImageWrapper = newStyled.img(templateObject_2$1P || (templateObject_2$
|
|
|
4013
4035
|
}, function (_a) {
|
|
4014
4036
|
var opacity = _a.opacity;
|
|
4015
4037
|
return opacity && "opacity: ".concat(opacity, ";");
|
|
4038
|
+
}, function (_a) {
|
|
4039
|
+
var showTooltipTitle = _a.showTooltipTitle;
|
|
4040
|
+
return !showTooltipTitle &&
|
|
4041
|
+
"\n use {\n pointer-events: none;\n }\n ";
|
|
4016
4042
|
});
|
|
4017
4043
|
var templateObject_1$2u, templateObject_2$1P;
|
|
4018
4044
|
|
|
@@ -4093,9 +4119,9 @@ var getIconDimension = function (dimension) {
|
|
|
4093
4119
|
};
|
|
4094
4120
|
|
|
4095
4121
|
var UnmemoIconFromExtSource = function (_a) {
|
|
4096
|
-
var height = _a.height, width = _a.width, title = _a.title, testId = _a.testId, fill = _a.fill, name = _a.name, svgProps = _a.svgProps, iconURL = _a.iconURL, svgId = _a.svgId, rest = __rest(_a, ["height", "width", "title", "testId", "fill", "name", "svgProps", "iconURL", "svgId"]);
|
|
4097
|
-
var
|
|
4098
|
-
var
|
|
4122
|
+
var height = _a.height, width = _a.width, title = _a.title, testId = _a.testId, fill = _a.fill, name = _a.name, svgProps = _a.svgProps, iconURL = _a.iconURL, svgId = _a.svgId, _b = _a.showTooltipTitle, showTooltipTitle = _b === void 0 ? true : _b, rest = __rest(_a, ["height", "width", "title", "testId", "fill", "name", "svgProps", "iconURL", "svgId", "showTooltipTitle"]);
|
|
4123
|
+
var _c = useState(false), error = _c[0], setError = _c[1];
|
|
4124
|
+
var _d = useState(), localSource = _d[0], setLocalSource = _d[1];
|
|
4099
4125
|
useEffect(function () {
|
|
4100
4126
|
var fetchIcon = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
4101
4127
|
var localSource;
|
|
@@ -4129,13 +4155,13 @@ var UnmemoIconFromExtSource = function (_a) {
|
|
|
4129
4155
|
if (!fill && !svgProps) {
|
|
4130
4156
|
return jsx$1(StyledImageWrapper, __assign$1({}, imageProperties, rest, { src: localSource.src }), void 0);
|
|
4131
4157
|
}
|
|
4132
|
-
return (jsxs$1(StyledSvgWrapper, __assign$1({ "data-testid": testId, fill: fill, height: height, type: "image/svg+xml", width: width }, rest, svgProps, { children: [jsx$1("title", { children: title !== null && title !== void 0 ? title : name }, void 0), jsx$1("use", { href: "".concat(localSource.src, "#").concat(svgId) }, void 0)] }), void 0));
|
|
4158
|
+
return (jsxs$1(StyledSvgWrapper, __assign$1({ "data-testid": testId, fill: fill, height: height, type: "image/svg+xml", width: width }, rest, svgProps, { showTooltipTitle: showTooltipTitle }, { children: [showTooltipTitle && jsx$1("title", { children: title !== null && title !== void 0 ? title : name }, void 0), jsx$1("use", { href: "".concat(localSource.src, "#").concat(svgId) }, void 0)] }), void 0));
|
|
4133
4159
|
};
|
|
4134
4160
|
var IconFromExtSource = React__default.memo(UnmemoIconFromExtSource);
|
|
4135
4161
|
|
|
4136
4162
|
/* eslint-disable react/forbid-component-props */
|
|
4137
4163
|
var UnmemoIcon = function (_a) {
|
|
4138
|
-
var height = _a.height, _b = _a.width, width = _b === void 0 ? 1 : _b, title = _a.title, testId = _a.testId, fill = _a.fill, name = _a.name, svgProps = _a.svgProps, rest = __rest(_a, ["height", "width", "title", "testId", "fill", "name", "svgProps"]);
|
|
4164
|
+
var height = _a.height, _b = _a.width, width = _b === void 0 ? 1 : _b, title = _a.title, testId = _a.testId, fill = _a.fill, name = _a.name, svgProps = _a.svgProps, _c = _a.showTooltipTitle, showTooltipTitle = _c === void 0 ? true : _c, rest = __rest(_a, ["height", "width", "title", "testId", "fill", "name", "svgProps", "showTooltipTitle"]);
|
|
4139
4165
|
var assets = useTheme().assets;
|
|
4140
4166
|
var newWidth = width && getIconDimension(width);
|
|
4141
4167
|
var newHeight = height ? getIconDimension(height) : getIconDimension(width);
|
|
@@ -4143,9 +4169,9 @@ var UnmemoIcon = function (_a) {
|
|
|
4143
4169
|
var svgSplit = name.split('/');
|
|
4144
4170
|
var svgId = svgSplit[svgSplit.length - 1];
|
|
4145
4171
|
if (assets.isSameOriginIcons) {
|
|
4146
|
-
return (jsxs$1(StyledSvgWrapper, __assign$1({ "data-testid": testId, fill: fill, height: newHeight, type: "image/svg+xml", width: newWidth }, rest, svgProps, { children: [jsx$1("title", { children: title !== null && title !== void 0 ? title : name }, void 0), jsx$1("use", { href: "".concat(iconURL, "#").concat(svgId) }, void 0)] }), void 0));
|
|
4172
|
+
return (jsxs$1(StyledSvgWrapper, __assign$1({ "data-testid": testId, fill: fill, height: newHeight, type: "image/svg+xml", width: newWidth }, rest, svgProps, { showTooltipTitle: showTooltipTitle }, { children: [showTooltipTitle && jsx$1("title", { children: title !== null && title !== void 0 ? title : name }, void 0), jsx$1("use", { href: "".concat(iconURL, "#").concat(svgId) }, void 0)] }), void 0));
|
|
4147
4173
|
}
|
|
4148
|
-
return (jsx$1(IconFromExtSource, __assign$1({ svgId: svgId, iconURL: iconURL, testId: testId, fill: fill, height: newHeight, svgProps: svgProps, width: newWidth, name: name, title: title }, rest), void 0));
|
|
4174
|
+
return (jsx$1(IconFromExtSource, __assign$1({ svgId: svgId, iconURL: iconURL, testId: testId, fill: fill, height: newHeight, svgProps: svgProps, width: newWidth, name: name, title: title, showTooltipTitle: showTooltipTitle }, rest), void 0));
|
|
4149
4175
|
};
|
|
4150
4176
|
var Icon$1 = React__default.memo(UnmemoIcon, function (prevProps, nextProps) { return prevProps.name !== nextProps.name; });
|
|
4151
4177
|
|
|
@@ -4916,6 +4942,8 @@ var LightBulb = function (props) { return jsx$1(Icon$1, __assign$1({}, props, {
|
|
|
4916
4942
|
|
|
4917
4943
|
var LoadingTrafisizy = function (props) { return jsx$1(Icon$1, __assign$1({}, props, { name: "pdp/loading_trafisizy" }), void 0); };
|
|
4918
4944
|
|
|
4945
|
+
var TapeMeasure = function (props) { return (jsx$1(Icon$1, __assign$1({}, props, { name: "pdp/tape_measure" }), void 0)); };
|
|
4946
|
+
|
|
4919
4947
|
var Minus = function (props) { return jsx$1(Icon$1, __assign$1({}, props, { name: "pdp/minus" }), void 0); };
|
|
4920
4948
|
|
|
4921
4949
|
var Moon = function (props) { return jsx$1(Icon$1, __assign$1({}, props, { name: "pdp/moon" }), void 0); };
|
|
@@ -4975,6 +5003,7 @@ var PDP = /*#__PURE__*/Object.freeze({
|
|
|
4975
5003
|
KlarnaLogo: KlarnaLogo,
|
|
4976
5004
|
LightBulb: LightBulb,
|
|
4977
5005
|
LoadingTrafisizy: LoadingTrafisizy,
|
|
5006
|
+
TapeMeasure: TapeMeasure,
|
|
4978
5007
|
Minus: Minus,
|
|
4979
5008
|
Moon: Moon,
|
|
4980
5009
|
NewClock: NewClock,
|