@trafilea/afrodita-components 7.23.1 → 7.23.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.
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as i,__rest as r,__assign as e}from"tslib";import{jsxs as l,jsx as o}from"react/jsx-runtime";import t from"@emotion/styled";import{useTheme as c}from"../../../core/theme/Theme.js";import{ComponentSize as n}from"../../../types/enums.js";import"../../pricing/clubOffer/ClubOfferTag.js";import"../../pricing/discount/styled.js";import{getTestId as s}from"../../pricing/price/PriceLabel.js";import"react";import{getCurrencySymbol as p}from"../../../utils/getCurrencySymbol/getCurrencySimbol.js";import{Container as a,Price as d}from"../../pricing/styles.js";import"../ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../HorizontalDivider/HorizontalDivider.js";import"../Icon/Icon.js";import"../Image/styled.js";import"../PriceLabelV2/PriceLabelV2.js";import"../Toggle/toggle.styled.js";import"../../tooltip/Styled.js";import"../../pricing/priceLabelV3/PriceLabelV3.js";import"../../pricing/priceLabelV5/PriceLabelV5.styled.js";import"../../pricing/priceLabelV6/PriceLabelV6.styled.js";var m,g=t.div(m||(m=i(["\n display: flex;\n margin-left: -5px;\n"],["\n display: flex;\n margin-left: -5px;\n"]))),f=function(i){var t,m=i.finalPrice,f=i.originalPrice,y=i.color,b=i.testId,u=i.originalPriceStyled,P=void 0!==u&&u,v=i.originalPriceUnderlined,j=void 0===v||v,S=i.size,L=void 0===S?n.Small:S,h=i.isClubOffer,z=void 0!==h&&h,x=r(i,["finalPrice","originalPrice","color","testId","originalPriceStyled","originalPriceUnderlined","size","isClubOffer"]),C=c(),V=f&&f!==m,I="$";"string"==typeof m&&(I=p(m));var T="string"==typeof m&&m.includes(".")&&m.includes(I)?m.split(I)[1].split("."):["",""],O={size:n.Small,color:y||C.colors.pallete.secondary.color,weight:700};return l(a,e({},x,{children:[V&&!z&&o((function(){return o(d,e({size:P?L:n.Small,color:C.component.pricing.priceLabel.price.originalPriceColor||C.colors.shades[300].color,margin:!0,underlined:j,"data-testid":s(b,"original-product-price")},{children:f}),void 0)}),{},void 0),l(g,e({"data-testid":s(b,"final-product-price")},{children:[o(d,e({margin:!0,finalPriceStyledSmall:!0,style:{marginTop:"-5px"}},O,{size:L},{children:I}),void 0),o(d,e({finalPriceStyled:!0},O,{size:L,"data-testid":"test-price-final-product-price'"},{children:T[0]?T[0]:null===(t="".concat(m))||void 0===t?void 0:t.split(I)[1]}),void 0),o(d,e({finalPriceStyledSmall:!0,style:{marginTop:"-6px"}},O,{size:L},{children:T[1]?T[1]:"00"}),void 0)]}),void 0)]}),void 0)};export{f as PriceLabel};
1
+ import{__makeTemplateObject as i,__rest as r,__assign as e}from"tslib";import{jsxs as l,jsx as o}from"react/jsx-runtime";import t from"@emotion/styled";import{useTheme as n}from"../../../core/theme/Theme.js";import{ComponentSize as c}from"../../../types/enums.js";import"../../pricing/clubOffer/ClubOfferTag.js";import"../../pricing/discount/styled.js";import{getTestId as s}from"../../pricing/price/PriceLabel.js";import"react";import{getCurrencySymbol as p}from"../../../utils/getCurrencySymbol/getCurrencySimbol.js";import{Container as a,Price as d}from"../../pricing/styles.js";import"../ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../HorizontalDivider/HorizontalDivider.js";import"../Icon/Icon.js";import"../Image/styled.js";import"../PriceLabelV2/PriceLabelV2.js";import"../Toggle/toggle.styled.js";import"../../tooltip/Styled.js";import"../../pricing/priceLabelV3/PriceLabelV3.js";import"../../pricing/priceLabelV5/PriceLabelV5.styled.js";import"../../pricing/priceLabelV6/PriceLabelV6.styled.js";var m,g=t.div(m||(m=i(["\n display: flex;\n margin-left: -5px;\n"],["\n display: flex;\n margin-left: -5px;\n"]))),f=function(i){var t,m=i.finalPrice,f=i.originalPrice,y=i.color,b=i.testId,u=i.originalPriceStyled,P=void 0!==u&&u,v=i.originalPriceUnderlined,j=void 0===v||v,S=i.size,L=void 0===S?c.Small:S,h=i.isClubOffer,z=void 0!==h&&h,x=r(i,["finalPrice","originalPrice","color","testId","originalPriceStyled","originalPriceUnderlined","size","isClubOffer"]),C=n(),V=f&&f!==m,I="$";"string"==typeof m&&(I=p(m));var T="string"==typeof m&&m.includes(".")&&m.includes(I)?m.split(I)[1].split("."):["",""],O={size:c.Small,color:y||C.colors.pallete.secondary.color,weight:700};return l(a,e({},x,{children:[V&&!z&&o((function(){return o(d,e({size:P?L:c.Small,color:C.component.pricing.priceLabel.price.originalPriceColor||C.colors.shades[300].color,margin:!0,underlined:j,"data-testid":s(b,"original-product-price"),"data-nosnippet":!0},{children:f}),void 0)}),{},void 0),l(g,e({"data-testid":s(b,"final-product-price")},{children:[o(d,e({margin:!0,finalPriceStyledSmall:!0,style:{marginTop:"-5px"}},O,{size:L},{children:I}),void 0),o(d,e({finalPriceStyled:!0},O,{size:L,"data-testid":"test-price-final-product-price'"},{children:T[0]?T[0]:null===(t="".concat(m))||void 0===t?void 0:t.split(I)[1]}),void 0),o(d,e({finalPriceStyledSmall:!0,style:{marginTop:"-6px"}},O,{size:L},{children:T[1]?T[1]:"00"}),void 0)]}),void 0)]}),void 0)};export{f as PriceLabel};
2
2
  //# sourceMappingURL=PriceLabel.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n,__assign as e}from"tslib";import{jsxs as o,jsx as r}from"react/jsx-runtime";import i from"@emotion/styled";import t from"react";import{useTheme as d}from"../../core/theme/Theme.js";import{Icon as l}from"../icons/index.js";var s,c,m,a,h=i.div(s||(s=n(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 0.063rem solid ",";\n user-select: none;\n cursor: pointer;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 0.063rem solid ",";\n user-select: none;\n cursor: pointer;\n"])),(function(n){return n.borderColor})),f=i.p(c||(c=n(["\n font-size: 1rem;\n font-weight: 700;\n line-height: 1.5rem;\n color: ",";\n margin: 0.75rem 0;\n"],["\n font-size: 1rem;\n font-weight: 700;\n line-height: 1.5rem;\n color: ",";\n margin: 0.75rem 0;\n"])),(function(n){return n.color})),p=i.div(m||(m=n(["\n width: 1rem;\n height: 1rem;\n"],["\n width: 1rem;\n height: 1rem;\n"]))),u=i.div(a||(a=n(["\n @media (max-width: 768px) {\n display: ",";\n }\n"],["\n @media (max-width: 768px) {\n display: ",";\n }\n"])),(function(n){return n.showInMobile?"block":"none"})),v=function(n){var i=n.title,s=n.children,c=n.isOpenByDefault,m=void 0!==c&&c,a=n.showInMobile,v=void 0===a||a,b=d(),w=t.useState(m),g=w[0],y=w[1];return o(u,e({"data-testid":"FiltersAccordion",showInMobile:v},{children:[o(h,e({onClick:function(){return y((function(n){return!n}))},borderColor:b.colors.shades[100].color,"data-testid":"accordion-title"},{children:[r(f,e({color:b.colors.shades[550].color},{children:i}),void 0),r(p,{children:r(g?l.Arrows.ChevronUp:l.Arrows.ChevronDown,{fill:b.colors.shades[700].color},void 0)},void 0)]}),void 0),r("div",e({style:{display:g?"block":"none"},"data-testid":"accordion-children-container"},{children:s}),void 0)]}),void 0)};export{v as Accordion};
1
+ import{__makeTemplateObject as n,__assign as e}from"tslib";import{jsxs as o,jsx as r}from"react/jsx-runtime";import t from"@emotion/styled";import i from"react";import{useTheme as c}from"../../core/theme/Theme.js";import{Icon as d}from"../icons/index.js";var l,s,a,m,h,u=t.div(l||(l=n(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 0.063rem solid ",";\n user-select: none;\n cursor: pointer;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 0.063rem solid ",";\n user-select: none;\n cursor: pointer;\n"])),(function(n){return n.borderColor})),f=t.p(s||(s=n(["\n font-size: 1rem;\n font-weight: 700;\n line-height: 1.5rem;\n color: ",";\n margin: 0.75rem 0;\n"],["\n font-size: 1rem;\n font-weight: 700;\n line-height: 1.5rem;\n color: ",";\n margin: 0.75rem 0;\n"])),(function(n){return n.color})),p=t.div(a||(a=n(["\n width: 1rem;\n height: 1rem;\n"],["\n width: 1rem;\n height: 1rem;\n"]))),b=t.div(m||(m=n(["\n @media (max-width: 768px) {\n display: ",";\n }\n"],["\n @media (max-width: 768px) {\n display: ",";\n }\n"])),(function(n){return n.showInMobile?"block":"none"})),v=t.section(h||(h=n(["\n display: block;\n"],["\n display: block;\n"]))),y=0,w=function(n){var t=n.title,l=n.children,s=n.isOpenByDefault,a=void 0!==s&&s,m=n.showInMobile,h=void 0===m||m,w=c(),x=i.useState(a),g=x[0],k=x[1],j=i.useState((function(){return++y}))[0],C="".concat(j,"-accordion-title"),I="".concat(j,"-accordion-content"),D=function(){k((function(n){return!n}))};return o(b,e({"data-testid":"FiltersAccordion",showInMobile:h},{children:[o(u,e({borderColor:w.colors.shades[100].color,"data-testid":"accordion-title",id:C,"aria-expanded":g,"aria-controls":I,onClick:D,onKeyDown:function(n){"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),D())},tabIndex:0,role:"button"},{children:[r(f,e({color:w.colors.shades[550].color},{children:t}),void 0),r(p,{children:r(g?d.Arrows.ChevronUp:d.Arrows.ChevronDown,{fill:w.colors.shades[700].color},void 0)},void 0)]}),void 0),r(v,e({id:I,"aria-labelledby":C,style:{display:g?"block":"none"},"data-testid":"accordion-children-container",tabIndex:-1},{children:l}),void 0)]}),void 0)};export{w as Accordion};
2
2
  //# sourceMappingURL=Accordion.js.map
@@ -1,2 +1,2 @@
1
- import{__rest as i,__assign as e}from"tslib";import{jsxs as l,jsx as r}from"react/jsx-runtime";import{useTheme as o}from"../../../core/theme/Theme.js";import{useWindowDimensions as n}from"../../../hooks/WindowDimensions.js";import{ComponentSize as t}from"../../../types/enums.js";import{DiscountTag as c}from"../discount/DiscountTag.js";import{Container as d,TagContainer as a,PriceContainer as m,Price as p}from"../styles.js";var v=function(i,e){var l,r,o,n,c,d,a,m;switch(i){case t.Large:return{finalPricefontSize:(null===(l=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===l?void 0:l.large)||"20px",finalPricefontSizeSmall:(null===(r=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===r?void 0:r.large)||"14px",margin:"0 0 0 0.75rem",lineHeight:"2rem"};case t.Medium:return{fontSize:(null===(o=null==e?void 0:e.component.pricing.priceLabel.price.defaultFontSize)||void 0===o?void 0:o.medium)||"1.125rem",finalPricefontSize:(null===(n=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===n?void 0:n.medium)||"20px",finalPricefontSizeSmall:(null===(c=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===c?void 0:c.medium)||"14px",margin:"0 0 0 0.5rem",lineHeight:"1.25rem"};case t.Small:return{fontSize:(null===(d=null==e?void 0:e.component.pricing.priceLabel.price.defaultFontSize)||void 0===d?void 0:d.small)||"14px",finalPricefontSize:(null===(a=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===a?void 0:a.small)||"20px",finalPricefontSizeSmall:(null===(m=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===m?void 0:m.small)||"14px",margin:"0 0 0 0.5rem",lineHeight:"1.25rem"}}},s=function(i,e,l,r){var o,n,t;return l?null===(o=v(i,e))||void 0===o?void 0:o.finalPricefontSize:r?null===(n=v(i,e))||void 0===n?void 0:n.finalPricefontSizeSmall:null===(t=v(i,e))||void 0===t?void 0:t.fontSize};function u(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return i.filter(Boolean).join("-")}var f=function(v){var s=v.finalPrice,f=v.originalPrice,g=v.discount,S=v.color,z=v.originalPriceColor,P=v.testId,h=v.finalPriceStyled,b=void 0!==h&&h,y=v.finalPriceStyle,x=v.originalPriceStyled,L=void 0!==x&&x,F=v.originalPriceUnderlined,j=void 0===F||F,w=v.size,D=void 0===w?t.Medium:w,T=v.clubStyle,C=void 0!==T&&T,H=v.invertDirection,M=void 0!==H&&H,E=v.isPrincingStyleTestEnabled,I=void 0!==E&&E,U=i(v,["finalPrice","originalPrice","discount","color","originalPriceColor","testId","finalPriceStyled","finalPriceStyle","originalPriceStyled","originalPriceUnderlined","size","clubStyle","invertDirection","isPrincingStyleTestEnabled"]),k=o(),B=n().isMobile,W={size:b?t.Small:D,color:S||k.colors.pallete.secondary.color,weight:700},X=function(){var i=C?B?t.Small:t.XSmall:L?D:t.Small;return r(p,e({size:i,color:z||k.component.pricing.priceLabel.price.originalPriceColor,underlined:j,"data-testid":u(P,"original-product-price"),theme:k},{children:f}),void 0)};return l(d,e({},U,{id:"priceLabel"},{children:[l(m,I?e({flexDirection:"column",gap:"0.25rem"},{children:[!!f&&r(X,{},void 0),r(p,e({"data-testid":u(P,"final-product-price")},W,{style:y,size:D,weight:400},{children:s}),void 0)]}):e({flexDirection:M?"row-reverse":"row"},C?{children:[!!f&&r(X,{},void 0),r(p,e({"data-testid":u(P,"final-product-price")},W,{style:y,size:D},{children:s}),void 0)]}:{children:[r(p,e({"data-testid":u(P,"final-product-price")},W,{style:y,size:D},{children:s}),void 0),!!f&&r(X,{},void 0)]}),void 0),g&&r(a,e({size:D},{children:r(c,e({},g,{size:D}),void 0)}),void 0)]}),void 0)};export{f as PriceLabel,s as getFontSize,v as getStylesBySize,u as getTestId};
1
+ import{__rest as i,__assign as e}from"tslib";import{jsxs as l,jsx as r}from"react/jsx-runtime";import{useTheme as o}from"../../../core/theme/Theme.js";import{useWindowDimensions as n}from"../../../hooks/WindowDimensions.js";import{ComponentSize as t}from"../../../types/enums.js";import{DiscountTag as c}from"../discount/DiscountTag.js";import{Container as d,TagContainer as a,PriceContainer as p,Price as m}from"../styles.js";var v=function(i,e){var l,r,o,n,c,d,a,p;switch(i){case t.Large:return{finalPricefontSize:(null===(l=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===l?void 0:l.large)||"20px",finalPricefontSizeSmall:(null===(r=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===r?void 0:r.large)||"14px",margin:"0 0 0 0.75rem",lineHeight:"2rem"};case t.Medium:return{fontSize:(null===(o=null==e?void 0:e.component.pricing.priceLabel.price.defaultFontSize)||void 0===o?void 0:o.medium)||"1.125rem",finalPricefontSize:(null===(n=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===n?void 0:n.medium)||"20px",finalPricefontSizeSmall:(null===(c=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===c?void 0:c.medium)||"14px",margin:"0 0 0 0.5rem",lineHeight:"1.25rem"};case t.Small:return{fontSize:(null===(d=null==e?void 0:e.component.pricing.priceLabel.price.defaultFontSize)||void 0===d?void 0:d.small)||"14px",finalPricefontSize:(null===(a=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===a?void 0:a.small)||"20px",finalPricefontSizeSmall:(null===(p=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===p?void 0:p.small)||"14px",margin:"0 0 0 0.5rem",lineHeight:"1.25rem"}}},s=function(i,e,l,r){var o,n,t;return l?null===(o=v(i,e))||void 0===o?void 0:o.finalPricefontSize:r?null===(n=v(i,e))||void 0===n?void 0:n.finalPricefontSizeSmall:null===(t=v(i,e))||void 0===t?void 0:t.fontSize};function u(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return i.filter(Boolean).join("-")}var f=function(v){var s=v.finalPrice,f=v.originalPrice,g=v.discount,S=v.color,z=v.originalPriceColor,P=v.testId,h=v.finalPriceStyled,b=void 0!==h&&h,y=v.finalPriceStyle,x=v.originalPriceStyled,L=void 0!==x&&x,F=v.originalPriceUnderlined,j=void 0===F||F,w=v.size,D=void 0===w?t.Medium:w,T=v.clubStyle,C=void 0!==T&&T,H=v.invertDirection,M=void 0!==H&&H,E=v.isPrincingStyleTestEnabled,I=void 0!==E&&E,U=i(v,["finalPrice","originalPrice","discount","color","originalPriceColor","testId","finalPriceStyled","finalPriceStyle","originalPriceStyled","originalPriceUnderlined","size","clubStyle","invertDirection","isPrincingStyleTestEnabled"]),k=o(),B=n().isMobile,W={size:b?t.Small:D,color:S||k.colors.pallete.secondary.color,weight:700},X=function(){var i=C?B?t.Small:t.XSmall:L?D:t.Small;return r(m,e({size:i,color:z||k.component.pricing.priceLabel.price.originalPriceColor,underlined:j,"data-testid":u(P,"original-product-price"),"data-nosnippet":!0,theme:k},{children:f}),void 0)};return l(d,e({},U,{id:"priceLabel"},{children:[l(p,I?e({flexDirection:"column",gap:"0.25rem"},{children:[!!f&&r(X,{},void 0),r(m,e({"data-testid":u(P,"final-product-price")},W,{style:y,size:D,weight:400},{children:s}),void 0)]}):e({flexDirection:M?"row-reverse":"row"},C?{children:[!!f&&r(X,{},void 0),r(m,e({"data-testid":u(P,"final-product-price")},W,{style:y,size:D},{children:s}),void 0)]}:{children:[r(m,e({"data-testid":u(P,"final-product-price")},W,{style:y,size:D},{children:s}),void 0),!!f&&r(X,{},void 0)]}),void 0),g&&r(a,e({size:D},{children:r(c,e({},g,{size:D}),void 0)}),void 0)]}),void 0)};export{f as PriceLabel,s as getFontSize,v as getStylesBySize,u as getTestId};
2
2
  //# sourceMappingURL=PriceLabel.js.map
@@ -1,2 +1,2 @@
1
- import{__rest as i,__assign as o}from"tslib";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useTheme as t}from"../../../core/theme/Theme.js";import"react";import{useWindowDimensions as l}from"../../../hooks/WindowDimensions.js";import{getCurrencySymbol as s}from"../../../utils/getCurrencySymbol/getCurrencySimbol.js";import{ComponentSize as n}from"../../../types/enums.js";import{ClubOfferTag as c}from"../clubOffer/ClubOfferTag.js";import{DiscountTag as a}from"../discount/DiscountTag.js";import{getTestId as d}from"../price/PriceLabel.js";import{VerticalContainer as p,PriceDiscountRow as u,HorizontalVariantContainer as m,HorizontalVariantRow as v,Container as f,FinalPriceStyledContainer as y,Price as b,TagContainer as S}from"../styles.js";import{PriceLabelTooltip as h}from"./PriceLabelTooltip.js";var g=function(i){var t,l=i.testId,s=i.priceCommonProps,c=i.size,a=i.currencySymbol,p=i.finalPriceArray,u=i.productFinalPrice,m=i.showDecimals,v=i.pricePerItem,f=i.theme,S=i.isHorizontalLayout,h=void 0!==S&&S,g=i.isVerticalLayout,P=void 0!==g&&g,z=h?o(o({},s),{size:n.Small,style:{fontSize:"14px"}}):s,x=P?o(o({},s),{size:n.Small,style:{fontSize:"16px"}}):s,L=h?z:P?x:s;return e(y,o({"data-testid":d(l,"final-product-price")},{children:[r(b,o({margin:!0,finalPriceStyledSmall:!h&&!P},L,{size:h||P?n.Small:c},{children:a}),void 0),r(b,o({finalPriceStyled:!h&&!P},L,{size:h||P?n.Small:c},{children:p[0]?p[0]:null===(t="".concat(u))||void 0===t?void 0:t.split(a)[1]}),void 0),m&&e(b,o({finalPriceStyledSmall:!h&&!P,style:h?{fontSize:"14px"}:P?{fontSize:"16px"}:{marginTop:"-6px"}},L,{size:h||P?n.Small:c},{children:[(h||P)&&".",p[1]?p[1]:"00"]}),void 0),v&&r(b,o({size:n.Small,color:f.colors.pallete.secondary.color},{children:"/each"}),void 0)]}),void 0)},P=function(i){var e=i.isDiscount,t=i.discount,l=i.bordersRounded,s=i.savingsDisplay,c=i.currencySymbol,d=i.savetoString,p=i.isHorizontalLayout,u=void 0!==p&&p;return e?r(S,o({size:n.Small},{children:t&&r(a,o({},t,{size:n.Medium,style:o({letterSpacing:"-0.05rem"},u&&{fontSize:"12px"}),bordersRounded:l,savings:s?"Save ".concat(c).concat(d):void 0}),void 0)}),void 0):null},z=function(i){var e=i.isClubOffer,t=i.clubOffer;return e?r(S,o({size:n.Medium},{children:t&&r(c,o({},t,{size:n.Small,style:{borderRadius:"8px",width:"107px",height:"28px",alignItems:"center",padding:"3px 8px 3px 8px",fontSize:"14px",lineHeight:"22px"}}),void 0)}),void 0):null},x=function(c){var a=c.finalPrice,y=c.originalPrice,S=c.discount,x=c.clubOffer,L=c.color,D=c.testId,I=c.originalPriceStyled,C=void 0!==I&&I,O=c.originalPriceUnderlined,H=void 0===O||O,j=c.size,w=void 0===j?n.Small:j,R=c.bordersRounded,T=void 0!==R&&R,M=c.savingsDisplay,V=void 0===M||M,F=c.pricePerItem,A=c.hasRoundedSavings,N=void 0===A||A,U=c.showDecimals,k=void 0===U||U,W=c.tooltipText,$=c.tooltipIcon,q=c.tooltipPosition,B=c.hasVerticalLayout,E=void 0!==B&&B,G=c.hasHorizontalLayout,J=void 0!==G&&G,K=c.isMobile,Q=void 0!==K&&K,X=i(c,["finalPrice","originalPrice","discount","clubOffer","color","testId","originalPriceStyled","originalPriceUnderlined","size","bordersRounded","savingsDisplay","pricePerItem","hasRoundedSavings","showDecimals","tooltipText","tooltipIcon","tooltipPosition","hasVerticalLayout","hasHorizontalLayout","isMobile"]),Y=t(),Z=l().isMobile,_=F||a,ii=y!==_,oi=y&&ii,ei=!(!S||!ii),ri=!(!x||!ii),ti="$";"string"==typeof _&&(ti=s(_));var li,si,ni="string"==typeof _&&_.includes(".")&&_.includes(ti)?_.split(ti)[1].split("."):["",""],ci={size:n.Small,color:ri?"var(--colors-pallete-wine-color)":L||Y.colors.pallete.secondary.color,weight:700};"string"==typeof y&&"string"==typeof _?(li=Number(y.replace(ti,"")),si=Number(_.replace(ti,""))):(li="number"==typeof y?y:0,si="number"==typeof _?_:0);var ai=li-si;if(N){var di=Number((ai-Math.floor(ai)).toFixed(2));di>=.01&&di<.5?ai=Math.floor(ai)+0:di>=.51&&di<1&&(ai=Math.floor(ai)+.5)}var pi=ai.toFixed(2),ui=function(){return r(b,o({size:C?w:n.Small,color:Y.component.pricing.priceLabel.price.originalPriceColor||Y.colors.shades[300].color,margin:!E,underlined:H,"data-testid":d(D,"original-product-price"),style:J?{fontSize:"12px"}:void 0},{children:y}),void 0)};return E?e(p,o({},X,{id:"priceLabelV2"},{children:[W&&r(h,{tooltipText:W,tooltipIcon:$,tooltipPosition:q,isMobile:null!=Q?Q:Z},void 0),oi&&r(ui,{},void 0),e(u,{children:[r(P,{isDiscount:ei,discount:S,bordersRounded:T,savingsDisplay:V,currencySymbol:ti,savetoString:pi,isHorizontalLayout:J},void 0),r(z,{isClubOffer:ri,clubOffer:x},void 0),r(g,{testId:D,priceCommonProps:ci,size:w,currencySymbol:ti,finalPriceArray:ni,productFinalPrice:_,showDecimals:k,pricePerItem:F,theme:Y,isHorizontalLayout:J,isVerticalLayout:E},void 0)]},void 0)]}),void 0):J?r(m,o({},X,{id:"priceLabelV2"},{children:e(v,{children:[W&&r(h,{tooltipText:W,tooltipIcon:$,tooltipPosition:q},void 0),r(g,{testId:D,priceCommonProps:ci,size:w,currencySymbol:ti,finalPriceArray:ni,productFinalPrice:_,showDecimals:k,pricePerItem:F,theme:Y,isHorizontalLayout:J,isVerticalLayout:E},void 0),oi&&r(ui,{},void 0),r(P,{isDiscount:ei,discount:S,bordersRounded:T,savingsDisplay:V,currencySymbol:ti,savetoString:pi,isHorizontalLayout:J},void 0),r(z,{isClubOffer:ri,clubOffer:x},void 0)]},void 0)}),void 0):e(f,o({},X,{id:"priceLabelV2"},{children:[W&&r(h,{tooltipText:W,tooltipIcon:$,tooltipPosition:q},void 0),oi&&r(ui,{},void 0),r(g,{testId:D,priceCommonProps:ci,size:w,currencySymbol:ti,finalPriceArray:ni,productFinalPrice:_,showDecimals:k,pricePerItem:F,theme:Y,isHorizontalLayout:J,isVerticalLayout:E},void 0),r(P,{isDiscount:ei,discount:S,bordersRounded:T,savingsDisplay:V,currencySymbol:ti,savetoString:pi,isHorizontalLayout:J},void 0),r(z,{isClubOffer:ri,clubOffer:x},void 0)]}),void 0)};export{x as PriceLabelV2};
1
+ import{__rest as i,__assign as o}from"tslib";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useTheme as t}from"../../../core/theme/Theme.js";import"react";import{useWindowDimensions as l}from"../../../hooks/WindowDimensions.js";import{getCurrencySymbol as n}from"../../../utils/getCurrencySymbol/getCurrencySimbol.js";import{ComponentSize as s}from"../../../types/enums.js";import{ClubOfferTag as a}from"../clubOffer/ClubOfferTag.js";import{DiscountTag as c}from"../discount/DiscountTag.js";import{getTestId as d}from"../price/PriceLabel.js";import{VerticalContainer as p,PriceDiscountRow as u,HorizontalVariantContainer as m,HorizontalVariantRow as v,Container as f,FinalPriceStyledContainer as y,Price as b,TagContainer as S}from"../styles.js";import{PriceLabelTooltip as h}from"./PriceLabelTooltip.js";var g=function(i){var t,l=i.testId,n=i.priceCommonProps,a=i.size,c=i.currencySymbol,p=i.finalPriceArray,u=i.productFinalPrice,m=i.showDecimals,v=i.pricePerItem,f=i.theme,S=i.isHorizontalLayout,h=void 0!==S&&S,g=i.isVerticalLayout,P=void 0!==g&&g,z=h?o(o({},n),{size:s.Small,style:{fontSize:"14px"}}):n,x=P?o(o({},n),{size:s.Small,style:{fontSize:"16px"}}):n,L=h?z:P?x:n;return e(y,o({"data-testid":d(l,"final-product-price")},{children:[r(b,o({margin:!0,finalPriceStyledSmall:!h&&!P},L,{size:h||P?s.Small:a},{children:c}),void 0),r(b,o({finalPriceStyled:!h&&!P},L,{size:h||P?s.Small:a},{children:p[0]?p[0]:null===(t="".concat(u))||void 0===t?void 0:t.split(c)[1]}),void 0),m&&e(b,o({finalPriceStyledSmall:!h&&!P,style:h?{fontSize:"14px"}:P?{fontSize:"16px"}:{marginTop:"-6px"}},L,{size:h||P?s.Small:a},{children:[(h||P)&&".",p[1]?p[1]:"00"]}),void 0),v&&r(b,o({size:s.Small,color:f.colors.pallete.secondary.color},{children:"/each"}),void 0)]}),void 0)},P=function(i){var e=i.isDiscount,t=i.discount,l=i.bordersRounded,n=i.savingsDisplay,a=i.currencySymbol,d=i.savetoString,p=i.isHorizontalLayout,u=void 0!==p&&p;return e?r(S,o({size:s.Small},{children:t&&r(c,o({},t,{size:s.Medium,style:o({letterSpacing:"-0.05rem"},u&&{fontSize:"12px"}),bordersRounded:l,savings:n?"Save ".concat(a).concat(d):void 0}),void 0)}),void 0):null},z=function(i){var e=i.isClubOffer,t=i.clubOffer;return e?r(S,o({size:s.Medium},{children:t&&r(a,o({},t,{size:s.Small,style:{borderRadius:"8px",width:"107px",height:"28px",alignItems:"center",padding:"3px 8px 3px 8px",fontSize:"14px",lineHeight:"22px"}}),void 0)}),void 0):null},x=function(a){var c=a.finalPrice,y=a.originalPrice,S=a.discount,x=a.clubOffer,L=a.color,D=a.testId,I=a.originalPriceStyled,C=void 0!==I&&I,O=a.originalPriceUnderlined,H=void 0===O||O,j=a.size,w=void 0===j?s.Small:j,R=a.bordersRounded,T=void 0!==R&&R,M=a.savingsDisplay,V=void 0===M||M,F=a.pricePerItem,A=a.hasRoundedSavings,N=void 0===A||A,U=a.showDecimals,k=void 0===U||U,W=a.tooltipText,$=a.tooltipIcon,q=a.tooltipPosition,B=a.hasVerticalLayout,E=void 0!==B&&B,G=a.hasHorizontalLayout,J=void 0!==G&&G,K=a.isMobile,Q=void 0!==K&&K,X=i(a,["finalPrice","originalPrice","discount","clubOffer","color","testId","originalPriceStyled","originalPriceUnderlined","size","bordersRounded","savingsDisplay","pricePerItem","hasRoundedSavings","showDecimals","tooltipText","tooltipIcon","tooltipPosition","hasVerticalLayout","hasHorizontalLayout","isMobile"]),Y=t(),Z=l().isMobile,_=F||c,ii=y!==_,oi=y&&ii,ei=!(!S||!ii),ri=!(!x||!ii),ti="$";"string"==typeof _&&(ti=n(_));var li,ni,si="string"==typeof _&&_.includes(".")&&_.includes(ti)?_.split(ti)[1].split("."):["",""],ai={size:s.Small,color:ri?"var(--colors-pallete-wine-color)":L||Y.colors.pallete.secondary.color,weight:700};"string"==typeof y&&"string"==typeof _?(li=Number(y.replace(ti,"")),ni=Number(_.replace(ti,""))):(li="number"==typeof y?y:0,ni="number"==typeof _?_:0);var ci=li-ni;if(N){var di=Number((ci-Math.floor(ci)).toFixed(2));di>=.01&&di<.5?ci=Math.floor(ci)+0:di>=.51&&di<1&&(ci=Math.floor(ci)+.5)}var pi=ci.toFixed(2),ui=function(){return r(b,o({size:C?w:s.Small,color:Y.component.pricing.priceLabel.price.originalPriceColor||Y.colors.shades[300].color,margin:!E,underlined:H,"data-testid":d(D,"original-product-price"),"data-nosnippet":!0,style:J?{fontSize:"12px"}:void 0},{children:y}),void 0)};return E?e(p,o({},X,{id:"priceLabelV2"},{children:[W&&r(h,{tooltipText:W,tooltipIcon:$,tooltipPosition:q,isMobile:null!=Q?Q:Z},void 0),oi&&r(ui,{},void 0),e(u,{children:[r(P,{isDiscount:ei,discount:S,bordersRounded:T,savingsDisplay:V,currencySymbol:ti,savetoString:pi,isHorizontalLayout:J},void 0),r(z,{isClubOffer:ri,clubOffer:x},void 0),r(g,{testId:D,priceCommonProps:ai,size:w,currencySymbol:ti,finalPriceArray:si,productFinalPrice:_,showDecimals:k,pricePerItem:F,theme:Y,isHorizontalLayout:J,isVerticalLayout:E},void 0)]},void 0)]}),void 0):J?r(m,o({},X,{id:"priceLabelV2"},{children:e(v,{children:[W&&r(h,{tooltipText:W,tooltipIcon:$,tooltipPosition:q},void 0),r(g,{testId:D,priceCommonProps:ai,size:w,currencySymbol:ti,finalPriceArray:si,productFinalPrice:_,showDecimals:k,pricePerItem:F,theme:Y,isHorizontalLayout:J,isVerticalLayout:E},void 0),oi&&r(ui,{},void 0),r(P,{isDiscount:ei,discount:S,bordersRounded:T,savingsDisplay:V,currencySymbol:ti,savetoString:pi,isHorizontalLayout:J},void 0),r(z,{isClubOffer:ri,clubOffer:x},void 0)]},void 0)}),void 0):e(f,o({},X,{id:"priceLabelV2"},{children:[W&&r(h,{tooltipText:W,tooltipIcon:$,tooltipPosition:q},void 0),oi&&r(ui,{},void 0),r(g,{testId:D,priceCommonProps:ai,size:w,currencySymbol:ti,finalPriceArray:si,productFinalPrice:_,showDecimals:k,pricePerItem:F,theme:Y,isHorizontalLayout:J,isVerticalLayout:E},void 0),r(P,{isDiscount:ei,discount:S,bordersRounded:T,savingsDisplay:V,currencySymbol:ti,savetoString:pi,isHorizontalLayout:J},void 0),r(z,{isClubOffer:ri,clubOffer:x},void 0)]}),void 0)};export{x as PriceLabelV2};
2
2
  //# sourceMappingURL=PriceLabelV2.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as i,__rest as e,__assign as r}from"tslib";import{jsxs as o,jsx as l}from"react/jsx-runtime";import n from"@emotion/styled";import{useTheme as t}from"../../../core/theme/Theme.js";import{getCurrencySymbol as d}from"../../../utils/getCurrencySymbol/getCurrencySimbol.js";import{ComponentSize as c}from"../../../types/enums.js";import{ClubOfferTag as a}from"../clubOffer/ClubOfferTag.js";import{DiscountTag as s}from"../discount/DiscountTag.js";import{getTestId as p}from"../price/PriceLabel.js";import{Container as m,Price as f,TagContainer as u}from"../styles.js";var g,v,y,h=n.div(g||(g=i(["\n display: flex;\n"],["\n display: flex;\n"]))),x=n.div(v||(v=i(["\n display: column;\n align-items: center;\n"],["\n display: column;\n align-items: center;\n"]))),b=n.div(y||(y=i(["\n display: flex;\n padding-left: 0.5rem;\n"],["\n display: flex;\n padding-left: 0.5rem;\n"]))),S=function(i){var n,g=i.finalPrice,v=i.originalPrice,y=i.discount,S=i.clubOffer,P=i.color,z=i.testId,j=i.originalPriceStyled,w=void 0!==j&&j,M=i.originalPriceUnderlined,T=void 0===M||M,C=i.size,O=void 0===C?c.Small:C,R=i.bordersRounded,U=void 0!==R&&R,D=i.savingsDisplay,I=void 0===D||D,N=i.itemsQuantity,k=i.packUnitPrice,F=e(i,["finalPrice","originalPrice","discount","clubOffer","color","testId","originalPriceStyled","originalPriceUnderlined","size","bordersRounded","savingsDisplay","itemsQuantity","packUnitPrice"]),L=t(),Q=v!==g,A=v&&Q,B=y&&Q,E=S&&Q,H="$";"string"==typeof g&&(H=d(g));var V,$,q="string"==typeof g&&g.includes(".")&&g.includes(H)?g.split(H)[1].split("."):["",""],G={size:c.Small,color:E?"var(--colors-pallete-wine-color)":null!=P?P:L.colors.pallete.secondary.color,weight:700};"string"==typeof v&&"string"==typeof g?(V=Number(v.replace(H,"")),$=Number(g.replace(H,""))):(V="number"==typeof v?v:0,$="number"==typeof g?g:0);var J=V-$,K=Number((J-Math.floor(J)).toFixed(2));K>=.01&&K<.5?J=Math.floor(J)+0:K>=.51&&K<1&&(J=Math.floor(J)+.5);var W=J.toFixed(2);return o(x,r({},F,{children:[l(m,r({style:{paddingBottom:"0.5rem"}},{children:A&&l((function(){return l(f,r({size:w?O:c.Small,color:L.component.pricing.priceLabel.price.originalPriceColor||L.colors.shades[300].color,margin:!0,underlined:T,"data-testid":p(z,"original-product-price")},{children:v}),void 0)}),{},void 0)}),void 0),o(m,{children:[o(h,r({"data-testid":p(z,"final-product-price")},{children:[l(f,r({margin:!0,finalPriceStyledSmall:!0,style:{marginTop:"-5px"}},G,{size:O},{children:H}),void 0),l(f,r({finalPriceStyled:!0},G,{size:O},{children:q[0]?q[0]:null===(n="".concat(g))||void 0===n?void 0:n.split(H)[1]}),void 0),l(f,r({finalPriceStyledSmall:!0,style:{marginTop:"-6px"}},G,{size:O},{children:q[1]?q[1]:"00"}),void 0)]}),void 0),l((function(){return!N||N<2?null:o(b,r({"data-testid":p(z,"each-one-price")},{children:[o(f,r({},G,{weight:600},{children:["(",k]}),void 0),l(f,r({},G,{weight:400},{children:"/each"}),void 0),l(f,r({},G,{weight:600},{children:")"}),void 0)]}),void 0)}),{},void 0),B&&l(u,r({size:c.Small},{children:y&&l(s,r({},y,{size:c.Medium,style:{letterSpacing:"-0.05rem"},bordersRounded:U,savings:I?"SAVE ".concat(H).concat(W):void 0,showSavings:!0}),void 0)}),void 0),E&&l(u,r({size:c.Medium},{children:S&&l(a,r({},S,{size:c.Small,style:{borderRadius:"8px",width:"107px",height:"28px",alignItems:"center",padding:"3px 8px 3px 8px",fontSize:"14px",lineHeight:"22px"}}),void 0)}),void 0)]},void 0)]}),void 0)};export{S as PriceLabelV3};
1
+ import{__makeTemplateObject as i,__rest as e,__assign as r}from"tslib";import{jsxs as o,jsx as n}from"react/jsx-runtime";import l from"@emotion/styled";import{useTheme as t}from"../../../core/theme/Theme.js";import{getCurrencySymbol as d}from"../../../utils/getCurrencySymbol/getCurrencySimbol.js";import{ComponentSize as c}from"../../../types/enums.js";import{ClubOfferTag as a}from"../clubOffer/ClubOfferTag.js";import{DiscountTag as s}from"../discount/DiscountTag.js";import{getTestId as p}from"../price/PriceLabel.js";import{Container as m,Price as f,TagContainer as u}from"../styles.js";var g,v,y,h=l.div(g||(g=i(["\n display: flex;\n"],["\n display: flex;\n"]))),x=l.div(v||(v=i(["\n display: column;\n align-items: center;\n"],["\n display: column;\n align-items: center;\n"]))),b=l.div(y||(y=i(["\n display: flex;\n padding-left: 0.5rem;\n"],["\n display: flex;\n padding-left: 0.5rem;\n"]))),S=function(i){var l,g=i.finalPrice,v=i.originalPrice,y=i.discount,S=i.clubOffer,P=i.color,z=i.testId,j=i.originalPriceStyled,w=void 0!==j&&j,M=i.originalPriceUnderlined,T=void 0===M||M,C=i.size,O=void 0===C?c.Small:C,R=i.bordersRounded,U=void 0!==R&&R,D=i.savingsDisplay,I=void 0===D||D,N=i.itemsQuantity,k=i.packUnitPrice,F=e(i,["finalPrice","originalPrice","discount","clubOffer","color","testId","originalPriceStyled","originalPriceUnderlined","size","bordersRounded","savingsDisplay","itemsQuantity","packUnitPrice"]),L=t(),Q=v!==g,A=v&&Q,B=y&&Q,E=S&&Q,H="$";"string"==typeof g&&(H=d(g));var V,$,q="string"==typeof g&&g.includes(".")&&g.includes(H)?g.split(H)[1].split("."):["",""],G={size:c.Small,color:E?"var(--colors-pallete-wine-color)":null!=P?P:L.colors.pallete.secondary.color,weight:700};"string"==typeof v&&"string"==typeof g?(V=Number(v.replace(H,"")),$=Number(g.replace(H,""))):(V="number"==typeof v?v:0,$="number"==typeof g?g:0);var J=V-$,K=Number((J-Math.floor(J)).toFixed(2));K>=.01&&K<.5?J=Math.floor(J)+0:K>=.51&&K<1&&(J=Math.floor(J)+.5);var W=J.toFixed(2);return o(x,r({},F,{children:[n(m,r({style:{paddingBottom:"0.5rem"}},{children:A&&n((function(){return n(f,r({size:w?O:c.Small,color:L.component.pricing.priceLabel.price.originalPriceColor||L.colors.shades[300].color,margin:!0,underlined:T,"data-testid":p(z,"original-product-price"),"data-nosnippet":!0},{children:v}),void 0)}),{},void 0)}),void 0),o(m,{children:[o(h,r({"data-testid":p(z,"final-product-price")},{children:[n(f,r({margin:!0,finalPriceStyledSmall:!0,style:{marginTop:"-5px"}},G,{size:O},{children:H}),void 0),n(f,r({finalPriceStyled:!0},G,{size:O},{children:q[0]?q[0]:null===(l="".concat(g))||void 0===l?void 0:l.split(H)[1]}),void 0),n(f,r({finalPriceStyledSmall:!0,style:{marginTop:"-6px"}},G,{size:O},{children:q[1]?q[1]:"00"}),void 0)]}),void 0),n((function(){return!N||N<2?null:o(b,r({"data-testid":p(z,"each-one-price")},{children:[o(f,r({},G,{weight:600},{children:["(",k]}),void 0),n(f,r({},G,{weight:400},{children:"/each"}),void 0),n(f,r({},G,{weight:600},{children:")"}),void 0)]}),void 0)}),{},void 0),B&&n(u,r({size:c.Small},{children:y&&n(s,r({},y,{size:c.Medium,style:{letterSpacing:"-0.05rem"},bordersRounded:U,savings:I?"SAVE ".concat(H).concat(W):void 0,showSavings:!0}),void 0)}),void 0),E&&n(u,r({size:c.Medium},{children:S&&n(a,r({},S,{size:c.Small,style:{borderRadius:"8px",width:"107px",height:"28px",alignItems:"center",padding:"3px 8px 3px 8px",fontSize:"14px",lineHeight:"22px"}}),void 0)}),void 0)]},void 0)]}),void 0)};export{S as PriceLabelV3};
2
2
  //# sourceMappingURL=PriceLabelV3.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as i,__rest as e,__assign as n}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";import l from"@emotion/styled";import{useTheme as t}from"../../../core/theme/Theme.js";import{useWindowDimensions as c}from"../../../hooks/WindowDimensions.js";import{getCurrencySymbol as d}from"../../../utils/getCurrencySymbol/getCurrencySimbol.js";import{ComponentSize as a}from"../../../types/enums.js";import{DiscountTag as s}from"../discount/DiscountTag.js";import{Container as p,Price as m,TagContainer as g}from"../styles.js";var f=l.span(S||(S=i(["\n background-color: #e5e5e5;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: #5a5a5a;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"],["\n background-color: #e5e5e5;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: #5a5a5a;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"]))),u=l.span(z||(z=i(["\n background-color: #c64844;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: white;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"],["\n background-color: #c64844;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: white;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"]))),v=l.span(j||(j=i(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"]))),h=l.span(w||(w=i(["\n display: flex;\n"],["\n display: flex;\n"]))),y=l.span(k||(k=i(["\n display: flex;\n gap: 8px;\n"],["\n display: flex;\n gap: 8px;\n"]))),x=function(){return o(f,{children:"REGULAR PRICE"},void 0)},b=function(i){var e=i.label;return o(u,{children:e||"CLUB MEMBERS"},void 0)};function P(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return i.filter(Boolean).join("-")}var S,z,j,w,k,C=function(i){var l;i.finalPrice;var f=i.originalPrice,u=i.discount,S=i.color,z=i.testId,j=i.finalPriceStyled,w=void 0!==j&&j,k=i.finalPriceStyle,C=i.originalPriceStyled,E=void 0!==C&&C,M=i.originalPriceUnderlined,R=void 0===M||M,T=i.size,U=void 0===T?a.Medium:T,B=i.clubStyle,I=void 0!==B&&B,L=i.styledPrice,D=void 0!==L&&L,A=i.clubPrice,G=e(i,["finalPrice","originalPrice","discount","color","testId","finalPriceStyled","finalPriceStyle","originalPriceStyled","originalPriceUnderlined","size","clubStyle","styledPrice","clubPrice"]),W=t(),X=c().isMobile,$=A,q="$";"string"==typeof $&&(q=d($));var F="string"==typeof $&&$.includes(".")&&$.includes(q)?$.split(q)[1].split("."):["",""],H={size:w?a.Small:U,color:S||W.colors.pallete.secondary.color,weight:700},J=function(){var i=I?X?a.Small:a.XSmall:E?U:a.Small;return o(m,n({size:i,color:W.component.pricing.priceLabel.price.originalPriceColor,underlined:R,"data-testid":P(z,"original-product-price"),theme:W},{children:f}),void 0)};return r(p,n({},G,{children:[r(v,I&&!D?{children:[r(y,{children:[o(J,{},void 0),o(x,{},void 0)]},void 0),r(y,{children:[o(m,n({margin:!0,"data-testid":P(z,"final-product-price")},H,{style:k,size:U},{children:A}),void 0),o(b,{label:W.label.member},void 0)]},void 0)]}:{children:[r(y,{children:[o(J,{},void 0),o(x,{},void 0)]},void 0),r(y,{children:[r(h,{children:[o(m,n({margin:!0,finalPriceStyledSmall:!0,style:{marginTop:"-5px",color:"#c64844"}},H,{size:U,"data-testid":P(z,"final-product-price")},{children:q}),void 0),r(m,n({finalPriceStyled:!0},H,{size:U,style:{color:"#c64844"}},{children:[F[0]?F[0]:null===(l="".concat($))||void 0===l?void 0:l.split(q)[1],"."]}),void 0),o(m,n({finalPriceStyledSmall:!0,style:{marginTop:"-6px",color:"#c64844"}},H,{size:U},{children:F[1]?F[1]:"00"}),void 0)]},void 0),o(b,{label:W.label.member},void 0)]},void 0)]},void 0),u&&o(g,n({size:U},{children:o(s,n({},u,{size:U}),void 0)}),void 0)]}),void 0)};export{C as PriceLabelV4,P as getTestId};
1
+ import{__makeTemplateObject as i,__rest as n,__assign as e}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";import t from"@emotion/styled";import{useTheme as l}from"../../../core/theme/Theme.js";import{useWindowDimensions as c}from"../../../hooks/WindowDimensions.js";import{getCurrencySymbol as d}from"../../../utils/getCurrencySymbol/getCurrencySimbol.js";import{ComponentSize as a}from"../../../types/enums.js";import{DiscountTag as s}from"../discount/DiscountTag.js";import{Container as p,Price as m,TagContainer as g}from"../styles.js";var f=t.span(S||(S=i(["\n background-color: #e5e5e5;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: #5a5a5a;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"],["\n background-color: #e5e5e5;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: #5a5a5a;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"]))),u=t.span(z||(z=i(["\n background-color: #c64844;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: white;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"],["\n background-color: #c64844;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: white;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"]))),v=t.span(j||(j=i(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"]))),h=t.span(w||(w=i(["\n display: flex;\n"],["\n display: flex;\n"]))),y=t.span(k||(k=i(["\n display: flex;\n gap: 8px;\n"],["\n display: flex;\n gap: 8px;\n"]))),x=function(){return o(f,{children:"REGULAR PRICE"},void 0)},b=function(i){var n=i.label;return o(u,{children:n||"CLUB MEMBERS"},void 0)};function P(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];return i.filter(Boolean).join("-")}var S,z,j,w,k,C=function(i){var t;i.finalPrice;var f=i.originalPrice,u=i.discount,S=i.color,z=i.testId,j=i.finalPriceStyled,w=void 0!==j&&j,k=i.finalPriceStyle,C=i.originalPriceStyled,E=void 0!==C&&C,M=i.originalPriceUnderlined,R=void 0===M||M,T=i.size,U=void 0===T?a.Medium:T,B=i.clubStyle,I=void 0!==B&&B,L=i.styledPrice,D=void 0!==L&&L,A=i.clubPrice,G=n(i,["finalPrice","originalPrice","discount","color","testId","finalPriceStyled","finalPriceStyle","originalPriceStyled","originalPriceUnderlined","size","clubStyle","styledPrice","clubPrice"]),W=l(),X=c().isMobile,$=A,q="$";"string"==typeof $&&(q=d($));var F="string"==typeof $&&$.includes(".")&&$.includes(q)?$.split(q)[1].split("."):["",""],H={size:w?a.Small:U,color:S||W.colors.pallete.secondary.color,weight:700},J=function(){var i=I?X?a.Small:a.XSmall:E?U:a.Small;return o(m,e({size:i,color:W.component.pricing.priceLabel.price.originalPriceColor,underlined:R,"data-testid":P(z,"original-product-price"),"data-nosnippet":!0,theme:W},{children:f}),void 0)};return r(p,e({},G,{children:[r(v,I&&!D?{children:[r(y,{children:[o(J,{},void 0),o(x,{},void 0)]},void 0),r(y,{children:[o(m,e({margin:!0,"data-testid":P(z,"final-product-price")},H,{style:k,size:U},{children:A}),void 0),o(b,{label:W.label.member},void 0)]},void 0)]}:{children:[r(y,{children:[o(J,{},void 0),o(x,{},void 0)]},void 0),r(y,{children:[r(h,{children:[o(m,e({margin:!0,finalPriceStyledSmall:!0,style:{marginTop:"-5px",color:"#c64844"}},H,{size:U,"data-testid":P(z,"final-product-price")},{children:q}),void 0),r(m,e({finalPriceStyled:!0},H,{size:U,style:{color:"#c64844"}},{children:[F[0]?F[0]:null===(t="".concat($))||void 0===t?void 0:t.split(q)[1],"."]}),void 0),o(m,e({finalPriceStyledSmall:!0,style:{marginTop:"-6px",color:"#c64844"}},H,{size:U},{children:F[1]?F[1]:"00"}),void 0)]},void 0),o(b,{label:W.label.member},void 0)]},void 0)]},void 0),u&&o(g,e({size:U},{children:o(s,e({},u,{size:U}),void 0)}),void 0)]}),void 0)};export{C as PriceLabelV4,P as getTestId};
2
2
  //# sourceMappingURL=PriceLabelV4.js.map
@@ -1,2 +1,2 @@
1
- import{__rest as i,__assign as e}from"tslib";import{jsx as r,jsxs as o,Fragment as l}from"react/jsx-runtime";import{useTheme as n}from"../../../core/theme/Theme.js";import{ComponentSize as t}from"../../../types/enums.js";import{Container as c,Price as d}from"./PriceLabelV5.styled.js";function a(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return i.filter(Boolean).join("-")}var s=function(i){var o=i.theme,l=i.originalPriceUnderlined,n=i.testId,c=i.originalPrice;return r(d,e({size:t.Small,color:o.colors.shades[450].color,underlined:l,"data-testid":a(n,"original-product-price"),theme:o},{children:c}),void 0)},m=function(m){var f=m.finalPrice,u=m.originalPrice;m.discount;var p=m.color,P=m.testId,g=m.finalPriceStyle,h=m.originalPriceUnderlined,v=void 0===h||h,y=m.size,j=void 0===y?t.Medium:y,z=i(m,["finalPrice","originalPrice","discount","color","testId","finalPriceStyle","originalPriceUnderlined","size"]),I=n(),U={size:j,color:null!=p?p:I.colors.pallete.secondary.color,weight:700};return r(c,e({},z,{id:"priceLabel"},{children:o(l,{children:[r(d,e({margin:!0,"data-testid":a(P,"final-product-price")},U,{style:g,size:j},{children:f}),void 0),!!u&&r(s,{theme:I,originalPriceUnderlined:v,testId:P,originalPrice:u},void 0)]},void 0)}),void 0)};export{m as PriceLabelV5};
1
+ import{__rest as i,__assign as e}from"tslib";import{jsx as r,jsxs as o,Fragment as n}from"react/jsx-runtime";import{useTheme as t}from"../../../core/theme/Theme.js";import{ComponentSize as l}from"../../../types/enums.js";import{Container as d,Price as c}from"./PriceLabelV5.styled.js";function a(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return i.filter(Boolean).join("-")}var s=function(i){var o=i.theme,n=i.originalPriceUnderlined,t=i.testId,d=i.originalPrice;return r(c,e({size:l.Small,color:o.colors.shades[450].color,underlined:n,"data-testid":a(t,"original-product-price"),"data-nosnippet":!0,theme:o},{children:d}),void 0)},m=function(m){var f=m.finalPrice,p=m.originalPrice;m.discount;var u=m.color,P=m.testId,g=m.finalPriceStyle,h=m.originalPriceUnderlined,v=void 0===h||h,y=m.size,j=void 0===y?l.Medium:y,z=i(m,["finalPrice","originalPrice","discount","color","testId","finalPriceStyle","originalPriceUnderlined","size"]),I=t(),U={size:j,color:null!=u?u:I.colors.pallete.secondary.color,weight:700};return r(d,e({},z,{id:"priceLabel"},{children:o(n,{children:[r(c,e({margin:!0,"data-testid":a(P,"final-product-price")},U,{style:g,size:j},{children:f}),void 0),!!p&&r(s,{theme:I,originalPriceUnderlined:v,testId:P,originalPrice:p},void 0)]},void 0)}),void 0)};export{m as PriceLabelV5};
2
2
  //# sourceMappingURL=PriceLabelV5.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as i}from"tslib";import{jsx as e,jsxs as o,Fragment as r}from"react/jsx-runtime";import{ComponentSize as t}from"../../../types/enums.js";import{ClubOfferTag as l}from"../clubOffer/ClubOfferTag.js";import{DiscountTag as n}from"../discount/DiscountTag.js";import{getTestId as s}from"../price/PriceLabel.js";import{Price as a,FinalPriceStyledContainer as c,TagContainer as d}from"../styles.js";import{TooltipWrapper as p}from"./PriceLabelV6.styled.js";import{PriceLabelV6Tooltip as m}from"./PriceLabelV6Tooltip.js";import{createStopPropagationHandlers as u}from"./utils/eventHandlers.js";var f=function(o){var r=o.originalPrice,l=o.originalPriceStyled,n=o.originalPriceUnderlined,c=o.size,d=o.testId,p=o.theme,m=o.hasHorizontalLayout;return e(a,i({size:l?c:t.Small,color:p.component.pricing.priceLabel.price.originalPriceColor||p.colors.shades[300].color,margin:!0,underlined:n,"data-testid":s(d,"original-product-price"),style:m?{fontSize:"12px"}:void 0},{children:r}),void 0)},v=function(r){var l=r.testId,n=r.priceCommonProps,d=r.size,p=r.currencySymbol,m=r.finalPriceArray,u=r.productFinalPrice,f=r.showDecimals,v=r.pricePerItem,S=r.theme,y=r.isHorizontalLayout,g=void 0!==y&&y,h=g?i(i({},n),{size:t.Small,style:{fontSize:"14px"}}):n;return o(c,i({"data-testid":s(l,"final-product-price")},{children:[e(a,i({margin:!0,finalPriceStyledSmall:!g},h,{size:g?t.Small:d},{children:p}),void 0),e(a,i({finalPriceStyled:!g},h,{size:g?t.Small:d},{children:m[0]||("string"==typeof u&&u.includes(p)?"".concat(u).split(p)[1]:"".concat(u))}),void 0),f&&o(a,i({finalPriceStyledSmall:!g,style:g?{fontSize:"14px"}:{marginTop:"-6px"}},h,{size:g?t.Small:d},{children:[g&&".",m[1]?m[1]:"00"]}),void 0),v&&e(a,i({size:t.Small,color:S.colors.pallete.secondary.color},{children:"/each"}),void 0)]}),void 0)},S=function(s){var a=s.isDiscount,c=s.discount,p=s.bordersRounded,m=s.savingsDisplay,u=s.currencySymbol,f=s.savetoString,v=s.isHorizontalLayout,S=void 0!==v&&v,y=s.isClubOffer,g=s.clubOffer;return o(r,{children:[a&&e(d,i({size:t.Small},{children:c&&e(n,i({},c,{size:t.Medium,style:i({letterSpacing:"-0.05rem"},S&&{fontSize:"12px"}),bordersRounded:p,savings:m?"Save ".concat(u).concat(f):void 0}),void 0)}),void 0),y&&e(d,i({size:t.Medium},{children:g&&e(l,i({},g,{size:t.Small,style:{borderRadius:"8px",width:"107px",height:"28px",alignItems:"center",padding:"3px 8px 3px 8px",fontSize:"14px",lineHeight:"22px"}}),void 0)}),void 0)]},void 0)},y=function(o){var r=o.tooltipText,t=o.tooltipIcon,l=o.tooltipPosition,n=o.isMobile;if(!r)return null;var s=u();return e(p,i({"data-testid":"PriceLabelV6-TooltipWrapper"},s,{children:e(m,{tooltipText:r,tooltipIcon:t,tooltipPosition:l,isMobile:n},void 0)}),void 0)};export{f as OriginalPriceSection,v as PriceSection,S as TagsSection,y as TooltipSection};
1
+ import{__assign as i}from"tslib";import{jsx as e,jsxs as o,Fragment as r}from"react/jsx-runtime";import{ComponentSize as t}from"../../../types/enums.js";import{ClubOfferTag as l}from"../clubOffer/ClubOfferTag.js";import{DiscountTag as n}from"../discount/DiscountTag.js";import{getTestId as a}from"../price/PriceLabel.js";import{Price as s,FinalPriceStyledContainer as c,TagContainer as d}from"../styles.js";import{TooltipWrapper as p}from"./PriceLabelV6.styled.js";import{PriceLabelV6Tooltip as m}from"./PriceLabelV6Tooltip.js";import{createStopPropagationHandlers as u}from"./utils/eventHandlers.js";var f=function(o){var r=o.originalPrice,l=o.originalPriceStyled,n=o.originalPriceUnderlined,c=o.size,d=o.testId,p=o.theme,m=o.hasHorizontalLayout;return e(s,i({size:l?c:t.Small,color:p.component.pricing.priceLabel.price.originalPriceColor||p.colors.shades[300].color,margin:!0,underlined:n,"data-testid":a(d,"original-product-price"),"data-nosnippet":!0,style:m?{fontSize:"12px"}:void 0},{children:r}),void 0)},v=function(r){var l=r.testId,n=r.priceCommonProps,d=r.size,p=r.currencySymbol,m=r.finalPriceArray,u=r.productFinalPrice,f=r.showDecimals,v=r.pricePerItem,S=r.theme,y=r.isHorizontalLayout,g=void 0!==y&&y,h=g?i(i({},n),{size:t.Small,style:{fontSize:"14px"}}):n;return o(c,i({"data-testid":a(l,"final-product-price")},{children:[e(s,i({margin:!0,finalPriceStyledSmall:!g},h,{size:g?t.Small:d},{children:p}),void 0),e(s,i({finalPriceStyled:!g},h,{size:g?t.Small:d},{children:m[0]||("string"==typeof u&&u.includes(p)?"".concat(u).split(p)[1]:"".concat(u))}),void 0),f&&o(s,i({finalPriceStyledSmall:!g,style:g?{fontSize:"14px"}:{marginTop:"-6px"}},h,{size:g?t.Small:d},{children:[g&&".",m[1]?m[1]:"00"]}),void 0),v&&e(s,i({size:t.Small,color:S.colors.pallete.secondary.color},{children:"/each"}),void 0)]}),void 0)},S=function(a){var s=a.isDiscount,c=a.discount,p=a.bordersRounded,m=a.savingsDisplay,u=a.currencySymbol,f=a.savetoString,v=a.isHorizontalLayout,S=void 0!==v&&v,y=a.isClubOffer,g=a.clubOffer;return o(r,{children:[s&&e(d,i({size:t.Small},{children:c&&e(n,i({},c,{size:t.Medium,style:i({letterSpacing:"-0.05rem"},S&&{fontSize:"12px"}),bordersRounded:p,savings:m?"Save ".concat(u).concat(f):void 0}),void 0)}),void 0),y&&e(d,i({size:t.Medium},{children:g&&e(l,i({},g,{size:t.Small,style:{borderRadius:"8px",width:"107px",height:"28px",alignItems:"center",padding:"3px 8px 3px 8px",fontSize:"14px",lineHeight:"22px"}}),void 0)}),void 0)]},void 0)},y=function(o){var r=o.tooltipText,t=o.tooltipIcon,l=o.tooltipPosition,n=o.isMobile;if(!r)return null;var a=u();return e(p,i({"data-testid":"PriceLabelV6-TooltipWrapper"},a,{children:e(m,{tooltipText:r,tooltipIcon:t,tooltipPosition:l,isMobile:n},void 0)}),void 0)};export{f as OriginalPriceSection,v as PriceSection,S as TagsSection,y as TooltipSection};
2
2
  //# sourceMappingURL=PriceLabelV6Components.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("@emotion/styled"),l=require("../../../core/theme/Theme.js"),s=require("../../../types/enums.js");require("../../pricing/clubOffer/ClubOfferTag.js"),require("../../pricing/discount/styled.js");var n=require("../../pricing/price/PriceLabel.js");require("react");var t=require("../../../utils/getCurrencySymbol/getCurrencySimbol.js"),c=require("../../pricing/styles.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js"),require("../HorizontalDivider/HorizontalDivider.js"),require("../Icon/Icon.js"),require("../Image/styled.js"),require("../PriceLabelV2/PriceLabelV2.js"),require("../Toggle/toggle.styled.js"),require("../../tooltip/Styled.js"),require("../../pricing/priceLabelV3/PriceLabelV3.js"),require("../../pricing/priceLabelV5/PriceLabelV5.styled.js"),require("../../pricing/priceLabelV6/PriceLabelV6.styled.js");var a,d=o(r).default.div(a||(a=e.__makeTemplateObject(["\n display: flex;\n margin-left: -5px;\n"],["\n display: flex;\n margin-left: -5px;\n"])));exports.PriceLabel=function(r){var o,a=r.finalPrice,u=r.originalPrice,p=r.color,g=r.testId,f=r.originalPriceStyled,m=void 0!==f&&f,y=r.originalPriceUnderlined,b=void 0===y||y,j=r.size,P=void 0===j?s.ComponentSize.Small:j,v=r.isClubOffer,q=void 0!==v&&v,_=e.__rest(r,["finalPrice","originalPrice","color","testId","originalPriceStyled","originalPriceUnderlined","size","isClubOffer"]),S=l.useTheme(),x=u&&u!==a,C="$";"string"==typeof a&&(C=t.getCurrencySymbol(a));var L="string"==typeof a&&a.includes(".")&&a.includes(C)?a.split(C)[1].split("."):["",""],z={size:s.ComponentSize.Small,color:p||S.colors.pallete.secondary.color,weight:700};return i.jsxs(c.Container,e.__assign({},_,{children:[x&&!q&&i.jsx((function(){return i.jsx(c.Price,e.__assign({size:m?P:s.ComponentSize.Small,color:S.component.pricing.priceLabel.price.originalPriceColor||S.colors.shades[300].color,margin:!0,underlined:b,"data-testid":n.getTestId(g,"original-product-price")},{children:u}),void 0)}),{},void 0),i.jsxs(d,e.__assign({"data-testid":n.getTestId(g,"final-product-price")},{children:[i.jsx(c.Price,e.__assign({margin:!0,finalPriceStyledSmall:!0,style:{marginTop:"-5px"}},z,{size:P},{children:C}),void 0),i.jsx(c.Price,e.__assign({finalPriceStyled:!0},z,{size:P,"data-testid":"test-price-final-product-price'"},{children:L[0]?L[0]:null===(o="".concat(a))||void 0===o?void 0:o.split(C)[1]}),void 0),i.jsx(c.Price,e.__assign({finalPriceStyledSmall:!0,style:{marginTop:"-6px"}},z,{size:P},{children:L[1]?L[1]:"00"}),void 0)]}),void 0)]}),void 0)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("@emotion/styled"),l=require("../../../core/theme/Theme.js"),n=require("../../../types/enums.js");require("../../pricing/clubOffer/ClubOfferTag.js"),require("../../pricing/discount/styled.js");var s=require("../../pricing/price/PriceLabel.js");require("react");var t=require("../../../utils/getCurrencySymbol/getCurrencySimbol.js"),o=require("../../pricing/styles.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js"),require("../HorizontalDivider/HorizontalDivider.js"),require("../Icon/Icon.js"),require("../Image/styled.js"),require("../PriceLabelV2/PriceLabelV2.js"),require("../Toggle/toggle.styled.js"),require("../../tooltip/Styled.js"),require("../../pricing/priceLabelV3/PriceLabelV3.js"),require("../../pricing/priceLabelV5/PriceLabelV5.styled.js"),require("../../pricing/priceLabelV6/PriceLabelV6.styled.js");var a,d=c(r).default.div(a||(a=e.__makeTemplateObject(["\n display: flex;\n margin-left: -5px;\n"],["\n display: flex;\n margin-left: -5px;\n"])));exports.PriceLabel=function(r){var c,a=r.finalPrice,u=r.originalPrice,p=r.color,g=r.testId,f=r.originalPriceStyled,m=void 0!==f&&f,y=r.originalPriceUnderlined,b=void 0===y||y,j=r.size,P=void 0===j?n.ComponentSize.Small:j,v=r.isClubOffer,q=void 0!==v&&v,_=e.__rest(r,["finalPrice","originalPrice","color","testId","originalPriceStyled","originalPriceUnderlined","size","isClubOffer"]),S=l.useTheme(),x=u&&u!==a,C="$";"string"==typeof a&&(C=t.getCurrencySymbol(a));var L="string"==typeof a&&a.includes(".")&&a.includes(C)?a.split(C)[1].split("."):["",""],z={size:n.ComponentSize.Small,color:p||S.colors.pallete.secondary.color,weight:700};return i.jsxs(o.Container,e.__assign({},_,{children:[x&&!q&&i.jsx((function(){return i.jsx(o.Price,e.__assign({size:m?P:n.ComponentSize.Small,color:S.component.pricing.priceLabel.price.originalPriceColor||S.colors.shades[300].color,margin:!0,underlined:b,"data-testid":s.getTestId(g,"original-product-price"),"data-nosnippet":!0},{children:u}),void 0)}),{},void 0),i.jsxs(d,e.__assign({"data-testid":s.getTestId(g,"final-product-price")},{children:[i.jsx(o.Price,e.__assign({margin:!0,finalPriceStyledSmall:!0,style:{marginTop:"-5px"}},z,{size:P},{children:C}),void 0),i.jsx(o.Price,e.__assign({finalPriceStyled:!0},z,{size:P,"data-testid":"test-price-final-product-price'"},{children:L[0]?L[0]:null===(c="".concat(a))||void 0===c?void 0:c.split(C)[1]}),void 0),i.jsx(o.Price,e.__assign({finalPriceStyledSmall:!0,style:{marginTop:"-6px"}},z,{size:P},{children:L[1]?L[1]:"00"}),void 0)]}),void 0)]}),void 0)};
2
2
  //# sourceMappingURL=PriceLabel.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),o=require("@emotion/styled"),r=require("react"),t=require("../../core/theme/Theme.js"),i=require("../icons/index.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l,d,c,a,u=s(o),m=s(r),h=u.default.div(l||(l=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 0.063rem solid ",";\n user-select: none;\n cursor: pointer;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 0.063rem solid ",";\n user-select: none;\n cursor: pointer;\n"])),(function(e){return e.borderColor})),f=u.default.p(d||(d=e.__makeTemplateObject(["\n font-size: 1rem;\n font-weight: 700;\n line-height: 1.5rem;\n color: ",";\n margin: 0.75rem 0;\n"],["\n font-size: 1rem;\n font-weight: 700;\n line-height: 1.5rem;\n color: ",";\n margin: 0.75rem 0;\n"])),(function(e){return e.color})),p=u.default.div(c||(c=e.__makeTemplateObject(["\n width: 1rem;\n height: 1rem;\n"],["\n width: 1rem;\n height: 1rem;\n"]))),b=u.default.div(a||(a=e.__makeTemplateObject(["\n @media (max-width: 768px) {\n display: ",";\n }\n"],["\n @media (max-width: 768px) {\n display: ",";\n }\n"])),(function(e){return e.showInMobile?"block":"none"}));exports.Accordion=function(o){var r=o.title,s=o.children,l=o.isOpenByDefault,d=void 0!==l&&l,c=o.showInMobile,a=void 0===c||c,u=t.useTheme(),v=m.default.useState(d),j=v[0],_=v[1];return n.jsxs(b,e.__assign({"data-testid":"FiltersAccordion",showInMobile:a},{children:[n.jsxs(h,e.__assign({onClick:function(){return _((function(e){return!e}))},borderColor:u.colors.shades[100].color,"data-testid":"accordion-title"},{children:[n.jsx(f,e.__assign({color:u.colors.shades[550].color},{children:r}),void 0),n.jsx(p,{children:j?n.jsx(i.Icon.Arrows.ChevronUp,{fill:u.colors.shades[700].color},void 0):n.jsx(i.Icon.Arrows.ChevronDown,{fill:u.colors.shades[700].color},void 0)},void 0)]}),void 0),n.jsx("div",e.__assign({style:{display:j?"block":"none"},"data-testid":"accordion-children-container"},{children:s}),void 0)]}),void 0)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),o=require("@emotion/styled"),t=require("react"),r=require("../../core/theme/Theme.js"),i=require("../icons/index.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s,a,c,d,u,m=l(o),h=l(t),f=m.default.div(s||(s=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 0.063rem solid ",";\n user-select: none;\n cursor: pointer;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 0.063rem solid ",";\n user-select: none;\n cursor: pointer;\n"])),(function(e){return e.borderColor})),b=m.default.p(a||(a=e.__makeTemplateObject(["\n font-size: 1rem;\n font-weight: 700;\n line-height: 1.5rem;\n color: ",";\n margin: 0.75rem 0;\n"],["\n font-size: 1rem;\n font-weight: 700;\n line-height: 1.5rem;\n color: ",";\n margin: 0.75rem 0;\n"])),(function(e){return e.color})),p=m.default.div(c||(c=e.__makeTemplateObject(["\n width: 1rem;\n height: 1rem;\n"],["\n width: 1rem;\n height: 1rem;\n"]))),x=m.default.div(d||(d=e.__makeTemplateObject(["\n @media (max-width: 768px) {\n display: ",";\n }\n"],["\n @media (max-width: 768px) {\n display: ",";\n }\n"])),(function(e){return e.showInMobile?"block":"none"})),_=m.default.section(u||(u=e.__makeTemplateObject(["\n display: block;\n"],["\n display: block;\n"]))),j=0;exports.Accordion=function(o){var t=o.title,l=o.children,s=o.isOpenByDefault,a=void 0!==s&&s,c=o.showInMobile,d=void 0===c||c,u=r.useTheme(),m=h.default.useState(a),v=m[0],y=m[1],w=h.default.useState((function(){return++j}))[0],g="".concat(w,"-accordion-title"),k="".concat(w,"-accordion-content"),I=function(){y((function(e){return!e}))};return n.jsxs(x,e.__assign({"data-testid":"FiltersAccordion",showInMobile:d},{children:[n.jsxs(f,e.__assign({borderColor:u.colors.shades[100].color,"data-testid":"accordion-title",id:g,"aria-expanded":v,"aria-controls":k,onClick:I,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),I())},tabIndex:0,role:"button"},{children:[n.jsx(b,e.__assign({color:u.colors.shades[550].color},{children:t}),void 0),n.jsx(p,{children:v?n.jsx(i.Icon.Arrows.ChevronUp,{fill:u.colors.shades[700].color},void 0):n.jsx(i.Icon.Arrows.ChevronDown,{fill:u.colors.shades[700].color},void 0)},void 0)]}),void 0),n.jsx(_,e.__assign({id:k,"aria-labelledby":g,style:{display:v?"block":"none"},"data-testid":"accordion-children-container",tabIndex:-1},{children:l}),void 0)]}),void 0)};
2
2
  //# sourceMappingURL=Accordion.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),e=require("react/jsx-runtime"),n=require("../../../core/theme/Theme.js"),r=require("../../../hooks/WindowDimensions.js"),o=require("../../../types/enums.js"),l=require("../discount/DiscountTag.js"),t=require("../styles.js"),c=function(i,e){var n,r,l,t,c,s,a,d;switch(i){case o.ComponentSize.Large:return{finalPricefontSize:(null===(n=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===n?void 0:n.large)||"20px",finalPricefontSizeSmall:(null===(r=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===r?void 0:r.large)||"14px",margin:"0 0 0 0.75rem",lineHeight:"2rem"};case o.ComponentSize.Medium:return{fontSize:(null===(l=null==e?void 0:e.component.pricing.priceLabel.price.defaultFontSize)||void 0===l?void 0:l.medium)||"1.125rem",finalPricefontSize:(null===(t=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===t?void 0:t.medium)||"20px",finalPricefontSizeSmall:(null===(c=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===c?void 0:c.medium)||"14px",margin:"0 0 0 0.5rem",lineHeight:"1.25rem"};case o.ComponentSize.Small:return{fontSize:(null===(s=null==e?void 0:e.component.pricing.priceLabel.price.defaultFontSize)||void 0===s?void 0:s.small)||"14px",finalPricefontSize:(null===(a=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===a?void 0:a.small)||"20px",finalPricefontSizeSmall:(null===(d=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===d?void 0:d.small)||"14px",margin:"0 0 0 0.5rem",lineHeight:"1.25rem"}}};function s(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return i.filter(Boolean).join("-")}exports.PriceLabel=function(c){var a=c.finalPrice,d=c.originalPrice,p=c.discount,u=c.color,v=c.originalPriceColor,m=c.testId,g=c.finalPriceStyled,S=void 0!==g&&g,f=c.finalPriceStyle,z=c.originalPriceStyled,P=void 0!==z&&z,x=c.originalPriceUnderlined,_=void 0===x||x,h=c.size,j=void 0===h?o.ComponentSize.Medium:h,y=c.clubStyle,b=void 0!==y&&y,C=c.invertDirection,L=void 0!==C&&C,w=c.isPrincingStyleTestEnabled,D=void 0!==w&&w,F=i.__rest(c,["finalPrice","originalPrice","discount","color","originalPriceColor","testId","finalPriceStyled","finalPriceStyle","originalPriceStyled","originalPriceUnderlined","size","clubStyle","invertDirection","isPrincingStyleTestEnabled"]),T=n.useTheme(),q=r.useWindowDimensions().isMobile,M={size:S?o.ComponentSize.Small:j,color:u||T.colors.pallete.secondary.color,weight:700},H=function(){var n=b?q?o.ComponentSize.Small:o.ComponentSize.XSmall:P?j:o.ComponentSize.Small;return e.jsx(t.Price,i.__assign({size:n,color:v||T.component.pricing.priceLabel.price.originalPriceColor,underlined:_,"data-testid":s(m,"original-product-price"),theme:T},{children:d}),void 0)};return e.jsxs(t.Container,i.__assign({},F,{id:"priceLabel"},{children:[D?e.jsxs(t.PriceContainer,i.__assign({flexDirection:"column",gap:"0.25rem"},{children:[!!d&&e.jsx(H,{},void 0),e.jsx(t.Price,i.__assign({"data-testid":s(m,"final-product-price")},M,{style:f,size:j,weight:400},{children:a}),void 0)]}),void 0):b?e.jsxs(t.PriceContainer,i.__assign({flexDirection:L?"row-reverse":"row"},{children:[!!d&&e.jsx(H,{},void 0),e.jsx(t.Price,i.__assign({"data-testid":s(m,"final-product-price")},M,{style:f,size:j},{children:a}),void 0)]}),void 0):e.jsxs(t.PriceContainer,i.__assign({flexDirection:L?"row-reverse":"row"},{children:[e.jsx(t.Price,i.__assign({"data-testid":s(m,"final-product-price")},M,{style:f,size:j},{children:a}),void 0),!!d&&e.jsx(H,{},void 0)]}),void 0),p&&e.jsx(t.TagContainer,i.__assign({size:j},{children:e.jsx(l.DiscountTag,i.__assign({},p,{size:j}),void 0)}),void 0)]}),void 0)},exports.getFontSize=function(i,e,n,r){var o,l,t;return n?null===(o=c(i,e))||void 0===o?void 0:o.finalPricefontSize:r?null===(l=c(i,e))||void 0===l?void 0:l.finalPricefontSizeSmall:null===(t=c(i,e))||void 0===t?void 0:t.fontSize},exports.getStylesBySize=c,exports.getTestId=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),e=require("react/jsx-runtime"),n=require("../../../core/theme/Theme.js"),r=require("../../../hooks/WindowDimensions.js"),o=require("../../../types/enums.js"),l=require("../discount/DiscountTag.js"),t=require("../styles.js"),c=function(i,e){var n,r,l,t,c,a,s,d;switch(i){case o.ComponentSize.Large:return{finalPricefontSize:(null===(n=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===n?void 0:n.large)||"20px",finalPricefontSizeSmall:(null===(r=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===r?void 0:r.large)||"14px",margin:"0 0 0 0.75rem",lineHeight:"2rem"};case o.ComponentSize.Medium:return{fontSize:(null===(l=null==e?void 0:e.component.pricing.priceLabel.price.defaultFontSize)||void 0===l?void 0:l.medium)||"1.125rem",finalPricefontSize:(null===(t=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===t?void 0:t.medium)||"20px",finalPricefontSizeSmall:(null===(c=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===c?void 0:c.medium)||"14px",margin:"0 0 0 0.5rem",lineHeight:"1.25rem"};case o.ComponentSize.Small:return{fontSize:(null===(a=null==e?void 0:e.component.pricing.priceLabel.price.defaultFontSize)||void 0===a?void 0:a.small)||"14px",finalPricefontSize:(null===(s=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===s?void 0:s.small)||"20px",finalPricefontSizeSmall:(null===(d=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===d?void 0:d.small)||"14px",margin:"0 0 0 0.5rem",lineHeight:"1.25rem"}}};function a(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return i.filter(Boolean).join("-")}exports.PriceLabel=function(c){var s=c.finalPrice,d=c.originalPrice,p=c.discount,u=c.color,v=c.originalPriceColor,m=c.testId,g=c.finalPriceStyled,S=void 0!==g&&g,f=c.finalPriceStyle,z=c.originalPriceStyled,P=void 0!==z&&z,x=c.originalPriceUnderlined,_=void 0===x||x,h=c.size,j=void 0===h?o.ComponentSize.Medium:h,y=c.clubStyle,b=void 0!==y&&y,C=c.invertDirection,L=void 0!==C&&C,w=c.isPrincingStyleTestEnabled,D=void 0!==w&&w,F=i.__rest(c,["finalPrice","originalPrice","discount","color","originalPriceColor","testId","finalPriceStyled","finalPriceStyle","originalPriceStyled","originalPriceUnderlined","size","clubStyle","invertDirection","isPrincingStyleTestEnabled"]),T=n.useTheme(),q=r.useWindowDimensions().isMobile,M={size:S?o.ComponentSize.Small:j,color:u||T.colors.pallete.secondary.color,weight:700},H=function(){var n=b?q?o.ComponentSize.Small:o.ComponentSize.XSmall:P?j:o.ComponentSize.Small;return e.jsx(t.Price,i.__assign({size:n,color:v||T.component.pricing.priceLabel.price.originalPriceColor,underlined:_,"data-testid":a(m,"original-product-price"),"data-nosnippet":!0,theme:T},{children:d}),void 0)};return e.jsxs(t.Container,i.__assign({},F,{id:"priceLabel"},{children:[D?e.jsxs(t.PriceContainer,i.__assign({flexDirection:"column",gap:"0.25rem"},{children:[!!d&&e.jsx(H,{},void 0),e.jsx(t.Price,i.__assign({"data-testid":a(m,"final-product-price")},M,{style:f,size:j,weight:400},{children:s}),void 0)]}),void 0):b?e.jsxs(t.PriceContainer,i.__assign({flexDirection:L?"row-reverse":"row"},{children:[!!d&&e.jsx(H,{},void 0),e.jsx(t.Price,i.__assign({"data-testid":a(m,"final-product-price")},M,{style:f,size:j},{children:s}),void 0)]}),void 0):e.jsxs(t.PriceContainer,i.__assign({flexDirection:L?"row-reverse":"row"},{children:[e.jsx(t.Price,i.__assign({"data-testid":a(m,"final-product-price")},M,{style:f,size:j},{children:s}),void 0),!!d&&e.jsx(H,{},void 0)]}),void 0),p&&e.jsx(t.TagContainer,i.__assign({size:j},{children:e.jsx(l.DiscountTag,i.__assign({},p,{size:j}),void 0)}),void 0)]}),void 0)},exports.getFontSize=function(i,e,n,r){var o,l,t;return n?null===(o=c(i,e))||void 0===o?void 0:o.finalPricefontSize:r?null===(l=c(i,e))||void 0===l?void 0:l.finalPricefontSizeSmall:null===(t=c(i,e))||void 0===t?void 0:t.fontSize},exports.getStylesBySize=c,exports.getTestId=a;
2
2
  //# sourceMappingURL=PriceLabel.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),e=require("react/jsx-runtime"),o=require("../../../core/theme/Theme.js");require("react");var r=require("../../../hooks/WindowDimensions.js"),s=require("../../../utils/getCurrencySymbol/getCurrencySimbol.js"),t=require("../../../types/enums.js"),n=require("../clubOffer/ClubOfferTag.js"),l=require("../discount/DiscountTag.js"),a=require("../price/PriceLabel.js"),c=require("../styles.js"),d=require("./PriceLabelTooltip.js"),u=function(o){var r,s=o.testId,n=o.priceCommonProps,l=o.size,d=o.currencySymbol,u=o.finalPriceArray,p=o.productFinalPrice,m=o.showDecimals,v=o.pricePerItem,y=o.theme,g=o.isHorizontalLayout,f=void 0!==g&&g,S=o.isVerticalLayout,x=void 0!==S&&S,b=f?i.__assign(i.__assign({},n),{size:t.ComponentSize.Small,style:{fontSize:"14px"}}):n,z=x?i.__assign(i.__assign({},n),{size:t.ComponentSize.Small,style:{fontSize:"16px"}}):n,P=f?b:x?z:n;return e.jsxs(c.FinalPriceStyledContainer,i.__assign({"data-testid":a.getTestId(s,"final-product-price")},{children:[e.jsx(c.Price,i.__assign({margin:!0,finalPriceStyledSmall:!f&&!x},P,{size:f||x?t.ComponentSize.Small:l},{children:d}),void 0),e.jsx(c.Price,i.__assign({finalPriceStyled:!f&&!x},P,{size:f||x?t.ComponentSize.Small:l},{children:u[0]?u[0]:null===(r="".concat(p))||void 0===r?void 0:r.split(d)[1]}),void 0),m&&e.jsxs(c.Price,i.__assign({finalPriceStyledSmall:!f&&!x,style:f?{fontSize:"14px"}:x?{fontSize:"16px"}:{marginTop:"-6px"}},P,{size:f||x?t.ComponentSize.Small:l},{children:[(f||x)&&".",u[1]?u[1]:"00"]}),void 0),v&&e.jsx(c.Price,i.__assign({size:t.ComponentSize.Small,color:y.colors.pallete.secondary.color},{children:"/each"}),void 0)]}),void 0)},p=function(o){var r=o.isDiscount,s=o.discount,n=o.bordersRounded,a=o.savingsDisplay,d=o.currencySymbol,u=o.savetoString,p=o.isHorizontalLayout,m=void 0!==p&&p;return r?e.jsx(c.TagContainer,i.__assign({size:t.ComponentSize.Small},{children:s&&e.jsx(l.DiscountTag,i.__assign({},s,{size:t.ComponentSize.Medium,style:i.__assign({letterSpacing:"-0.05rem"},m&&{fontSize:"12px"}),bordersRounded:n,savings:a?"Save ".concat(d).concat(u):void 0}),void 0)}),void 0):null},m=function(o){var r=o.isClubOffer,s=o.clubOffer;return r?e.jsx(c.TagContainer,i.__assign({size:t.ComponentSize.Medium},{children:s&&e.jsx(n.ClubOfferTag,i.__assign({},s,{size:t.ComponentSize.Small,style:{borderRadius:"8px",width:"107px",height:"28px",alignItems:"center",padding:"3px 8px 3px 8px",fontSize:"14px",lineHeight:"22px"}}),void 0)}),void 0):null};exports.PriceLabelV2=function(n){var l=n.finalPrice,v=n.originalPrice,y=n.discount,g=n.clubOffer,f=n.color,S=n.testId,x=n.originalPriceStyled,b=void 0!==x&&x,z=n.originalPriceUnderlined,P=void 0===z||z,h=n.size,j=void 0===h?t.ComponentSize.Small:h,_=n.bordersRounded,C=void 0!==_&&_,L=n.savingsDisplay,D=void 0===L||L,I=n.pricePerItem,T=n.hasRoundedSavings,O=void 0===T||T,w=n.showDecimals,H=void 0===w||w,V=n.tooltipText,q=n.tooltipIcon,R=n.tooltipPosition,M=n.hasVerticalLayout,F=void 0!==M&&M,A=n.hasHorizontalLayout,N=void 0!==A&&A,U=n.isMobile,W=void 0!==U&&U,k=i.__rest(n,["finalPrice","originalPrice","discount","clubOffer","color","testId","originalPriceStyled","originalPriceUnderlined","size","bordersRounded","savingsDisplay","pricePerItem","hasRoundedSavings","showDecimals","tooltipText","tooltipIcon","tooltipPosition","hasVerticalLayout","hasHorizontalLayout","isMobile"]),$=o.useTheme(),B=r.useWindowDimensions().isMobile,E=I||l,G=v!==E,J=v&&G,K=!(!y||!G),Q=!(!g||!G),X="$";"string"==typeof E&&(X=s.getCurrencySymbol(E));var Y,Z,ii="string"==typeof E&&E.includes(".")&&E.includes(X)?E.split(X)[1].split("."):["",""],ei={size:t.ComponentSize.Small,color:Q?"var(--colors-pallete-wine-color)":f||$.colors.pallete.secondary.color,weight:700};"string"==typeof v&&"string"==typeof E?(Y=Number(v.replace(X,"")),Z=Number(E.replace(X,""))):(Y="number"==typeof v?v:0,Z="number"==typeof E?E:0);var oi=Y-Z;if(O){var ri=Number((oi-Math.floor(oi)).toFixed(2));ri>=.01&&ri<.5?oi=Math.floor(oi)+0:ri>=.51&&ri<1&&(oi=Math.floor(oi)+.5)}var si=oi.toFixed(2),ti=function(){return e.jsx(c.Price,i.__assign({size:b?j:t.ComponentSize.Small,color:$.component.pricing.priceLabel.price.originalPriceColor||$.colors.shades[300].color,margin:!F,underlined:P,"data-testid":a.getTestId(S,"original-product-price"),style:N?{fontSize:"12px"}:void 0},{children:v}),void 0)};return F?e.jsxs(c.VerticalContainer,i.__assign({},k,{id:"priceLabelV2"},{children:[V&&e.jsx(d.PriceLabelTooltip,{tooltipText:V,tooltipIcon:q,tooltipPosition:R,isMobile:null!=W?W:B},void 0),J&&e.jsx(ti,{},void 0),e.jsxs(c.PriceDiscountRow,{children:[e.jsx(p,{isDiscount:K,discount:y,bordersRounded:C,savingsDisplay:D,currencySymbol:X,savetoString:si,isHorizontalLayout:N},void 0),e.jsx(m,{isClubOffer:Q,clubOffer:g},void 0),e.jsx(u,{testId:S,priceCommonProps:ei,size:j,currencySymbol:X,finalPriceArray:ii,productFinalPrice:E,showDecimals:H,pricePerItem:I,theme:$,isHorizontalLayout:N,isVerticalLayout:F},void 0)]},void 0)]}),void 0):N?e.jsx(c.HorizontalVariantContainer,i.__assign({},k,{id:"priceLabelV2"},{children:e.jsxs(c.HorizontalVariantRow,{children:[V&&e.jsx(d.PriceLabelTooltip,{tooltipText:V,tooltipIcon:q,tooltipPosition:R},void 0),e.jsx(u,{testId:S,priceCommonProps:ei,size:j,currencySymbol:X,finalPriceArray:ii,productFinalPrice:E,showDecimals:H,pricePerItem:I,theme:$,isHorizontalLayout:N,isVerticalLayout:F},void 0),J&&e.jsx(ti,{},void 0),e.jsx(p,{isDiscount:K,discount:y,bordersRounded:C,savingsDisplay:D,currencySymbol:X,savetoString:si,isHorizontalLayout:N},void 0),e.jsx(m,{isClubOffer:Q,clubOffer:g},void 0)]},void 0)}),void 0):e.jsxs(c.Container,i.__assign({},k,{id:"priceLabelV2"},{children:[V&&e.jsx(d.PriceLabelTooltip,{tooltipText:V,tooltipIcon:q,tooltipPosition:R},void 0),J&&e.jsx(ti,{},void 0),e.jsx(u,{testId:S,priceCommonProps:ei,size:j,currencySymbol:X,finalPriceArray:ii,productFinalPrice:E,showDecimals:H,pricePerItem:I,theme:$,isHorizontalLayout:N,isVerticalLayout:F},void 0),e.jsx(p,{isDiscount:K,discount:y,bordersRounded:C,savingsDisplay:D,currencySymbol:X,savetoString:si,isHorizontalLayout:N},void 0),e.jsx(m,{isClubOffer:Q,clubOffer:g},void 0)]}),void 0)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),e=require("react/jsx-runtime"),o=require("../../../core/theme/Theme.js");require("react");var r=require("../../../hooks/WindowDimensions.js"),s=require("../../../utils/getCurrencySymbol/getCurrencySimbol.js"),t=require("../../../types/enums.js"),n=require("../clubOffer/ClubOfferTag.js"),l=require("../discount/DiscountTag.js"),a=require("../price/PriceLabel.js"),c=require("../styles.js"),d=require("./PriceLabelTooltip.js"),u=function(o){var r,s=o.testId,n=o.priceCommonProps,l=o.size,d=o.currencySymbol,u=o.finalPriceArray,p=o.productFinalPrice,m=o.showDecimals,v=o.pricePerItem,y=o.theme,g=o.isHorizontalLayout,f=void 0!==g&&g,S=o.isVerticalLayout,x=void 0!==S&&S,b=f?i.__assign(i.__assign({},n),{size:t.ComponentSize.Small,style:{fontSize:"14px"}}):n,z=x?i.__assign(i.__assign({},n),{size:t.ComponentSize.Small,style:{fontSize:"16px"}}):n,P=f?b:x?z:n;return e.jsxs(c.FinalPriceStyledContainer,i.__assign({"data-testid":a.getTestId(s,"final-product-price")},{children:[e.jsx(c.Price,i.__assign({margin:!0,finalPriceStyledSmall:!f&&!x},P,{size:f||x?t.ComponentSize.Small:l},{children:d}),void 0),e.jsx(c.Price,i.__assign({finalPriceStyled:!f&&!x},P,{size:f||x?t.ComponentSize.Small:l},{children:u[0]?u[0]:null===(r="".concat(p))||void 0===r?void 0:r.split(d)[1]}),void 0),m&&e.jsxs(c.Price,i.__assign({finalPriceStyledSmall:!f&&!x,style:f?{fontSize:"14px"}:x?{fontSize:"16px"}:{marginTop:"-6px"}},P,{size:f||x?t.ComponentSize.Small:l},{children:[(f||x)&&".",u[1]?u[1]:"00"]}),void 0),v&&e.jsx(c.Price,i.__assign({size:t.ComponentSize.Small,color:y.colors.pallete.secondary.color},{children:"/each"}),void 0)]}),void 0)},p=function(o){var r=o.isDiscount,s=o.discount,n=o.bordersRounded,a=o.savingsDisplay,d=o.currencySymbol,u=o.savetoString,p=o.isHorizontalLayout,m=void 0!==p&&p;return r?e.jsx(c.TagContainer,i.__assign({size:t.ComponentSize.Small},{children:s&&e.jsx(l.DiscountTag,i.__assign({},s,{size:t.ComponentSize.Medium,style:i.__assign({letterSpacing:"-0.05rem"},m&&{fontSize:"12px"}),bordersRounded:n,savings:a?"Save ".concat(d).concat(u):void 0}),void 0)}),void 0):null},m=function(o){var r=o.isClubOffer,s=o.clubOffer;return r?e.jsx(c.TagContainer,i.__assign({size:t.ComponentSize.Medium},{children:s&&e.jsx(n.ClubOfferTag,i.__assign({},s,{size:t.ComponentSize.Small,style:{borderRadius:"8px",width:"107px",height:"28px",alignItems:"center",padding:"3px 8px 3px 8px",fontSize:"14px",lineHeight:"22px"}}),void 0)}),void 0):null};exports.PriceLabelV2=function(n){var l=n.finalPrice,v=n.originalPrice,y=n.discount,g=n.clubOffer,f=n.color,S=n.testId,x=n.originalPriceStyled,b=void 0!==x&&x,z=n.originalPriceUnderlined,P=void 0===z||z,h=n.size,j=void 0===h?t.ComponentSize.Small:h,_=n.bordersRounded,C=void 0!==_&&_,L=n.savingsDisplay,D=void 0===L||L,I=n.pricePerItem,T=n.hasRoundedSavings,O=void 0===T||T,w=n.showDecimals,H=void 0===w||w,V=n.tooltipText,q=n.tooltipIcon,R=n.tooltipPosition,M=n.hasVerticalLayout,F=void 0!==M&&M,A=n.hasHorizontalLayout,N=void 0!==A&&A,U=n.isMobile,W=void 0!==U&&U,k=i.__rest(n,["finalPrice","originalPrice","discount","clubOffer","color","testId","originalPriceStyled","originalPriceUnderlined","size","bordersRounded","savingsDisplay","pricePerItem","hasRoundedSavings","showDecimals","tooltipText","tooltipIcon","tooltipPosition","hasVerticalLayout","hasHorizontalLayout","isMobile"]),$=o.useTheme(),B=r.useWindowDimensions().isMobile,E=I||l,G=v!==E,J=v&&G,K=!(!y||!G),Q=!(!g||!G),X="$";"string"==typeof E&&(X=s.getCurrencySymbol(E));var Y,Z,ii="string"==typeof E&&E.includes(".")&&E.includes(X)?E.split(X)[1].split("."):["",""],ei={size:t.ComponentSize.Small,color:Q?"var(--colors-pallete-wine-color)":f||$.colors.pallete.secondary.color,weight:700};"string"==typeof v&&"string"==typeof E?(Y=Number(v.replace(X,"")),Z=Number(E.replace(X,""))):(Y="number"==typeof v?v:0,Z="number"==typeof E?E:0);var oi=Y-Z;if(O){var ri=Number((oi-Math.floor(oi)).toFixed(2));ri>=.01&&ri<.5?oi=Math.floor(oi)+0:ri>=.51&&ri<1&&(oi=Math.floor(oi)+.5)}var si=oi.toFixed(2),ti=function(){return e.jsx(c.Price,i.__assign({size:b?j:t.ComponentSize.Small,color:$.component.pricing.priceLabel.price.originalPriceColor||$.colors.shades[300].color,margin:!F,underlined:P,"data-testid":a.getTestId(S,"original-product-price"),"data-nosnippet":!0,style:N?{fontSize:"12px"}:void 0},{children:v}),void 0)};return F?e.jsxs(c.VerticalContainer,i.__assign({},k,{id:"priceLabelV2"},{children:[V&&e.jsx(d.PriceLabelTooltip,{tooltipText:V,tooltipIcon:q,tooltipPosition:R,isMobile:null!=W?W:B},void 0),J&&e.jsx(ti,{},void 0),e.jsxs(c.PriceDiscountRow,{children:[e.jsx(p,{isDiscount:K,discount:y,bordersRounded:C,savingsDisplay:D,currencySymbol:X,savetoString:si,isHorizontalLayout:N},void 0),e.jsx(m,{isClubOffer:Q,clubOffer:g},void 0),e.jsx(u,{testId:S,priceCommonProps:ei,size:j,currencySymbol:X,finalPriceArray:ii,productFinalPrice:E,showDecimals:H,pricePerItem:I,theme:$,isHorizontalLayout:N,isVerticalLayout:F},void 0)]},void 0)]}),void 0):N?e.jsx(c.HorizontalVariantContainer,i.__assign({},k,{id:"priceLabelV2"},{children:e.jsxs(c.HorizontalVariantRow,{children:[V&&e.jsx(d.PriceLabelTooltip,{tooltipText:V,tooltipIcon:q,tooltipPosition:R},void 0),e.jsx(u,{testId:S,priceCommonProps:ei,size:j,currencySymbol:X,finalPriceArray:ii,productFinalPrice:E,showDecimals:H,pricePerItem:I,theme:$,isHorizontalLayout:N,isVerticalLayout:F},void 0),J&&e.jsx(ti,{},void 0),e.jsx(p,{isDiscount:K,discount:y,bordersRounded:C,savingsDisplay:D,currencySymbol:X,savetoString:si,isHorizontalLayout:N},void 0),e.jsx(m,{isClubOffer:Q,clubOffer:g},void 0)]},void 0)}),void 0):e.jsxs(c.Container,i.__assign({},k,{id:"priceLabelV2"},{children:[V&&e.jsx(d.PriceLabelTooltip,{tooltipText:V,tooltipIcon:q,tooltipPosition:R},void 0),J&&e.jsx(ti,{},void 0),e.jsx(u,{testId:S,priceCommonProps:ei,size:j,currencySymbol:X,finalPriceArray:ii,productFinalPrice:E,showDecimals:H,pricePerItem:I,theme:$,isHorizontalLayout:N,isVerticalLayout:F},void 0),e.jsx(p,{isDiscount:K,discount:y,bordersRounded:C,savingsDisplay:D,currencySymbol:X,savetoString:si,isHorizontalLayout:N},void 0),e.jsx(m,{isClubOffer:Q,clubOffer:g},void 0)]}),void 0)};
2
2
  //# sourceMappingURL=PriceLabelV2.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("@emotion/styled"),r=require("../../../core/theme/Theme.js"),s=require("../../../utils/getCurrencySymbol/getCurrencySimbol.js"),t=require("../../../types/enums.js"),o=require("../clubOffer/ClubOfferTag.js"),l=require("../discount/DiscountTag.js"),a=require("../price/PriceLabel.js"),d=require("../styles.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p,u,g,m=c(n),f=m.default.div(p||(p=e.__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"]))),v=m.default.div(u||(u=e.__makeTemplateObject(["\n display: column;\n align-items: center;\n"],["\n display: column;\n align-items: center;\n"]))),_=m.default.div(g||(g=e.__makeTemplateObject(["\n display: flex;\n padding-left: 0.5rem;\n"],["\n display: flex;\n padding-left: 0.5rem;\n"])));exports.PriceLabelV3=function(n){var c,p=n.finalPrice,u=n.originalPrice,g=n.discount,m=n.clubOffer,x=n.color,y=n.testId,h=n.originalPriceStyled,j=void 0!==h&&h,b=n.originalPriceUnderlined,S=void 0===b||b,P=n.size,z=void 0===P?t.ComponentSize.Small:P,C=n.bordersRounded,T=void 0!==C&&C,q=n.savingsDisplay,O=void 0===q||q,w=n.itemsQuantity,I=n.packUnitPrice,M=e.__rest(n,["finalPrice","originalPrice","discount","clubOffer","color","testId","originalPriceStyled","originalPriceUnderlined","size","bordersRounded","savingsDisplay","itemsQuantity","packUnitPrice"]),k=r.useTheme(),D=u!==p,R=u&&D,U=g&&D,L=m&&D,N="$";"string"==typeof p&&(N=s.getCurrencySymbol(p));var F,Q,V="string"==typeof p&&p.includes(".")&&p.includes(N)?p.split(N)[1].split("."):["",""],A={size:t.ComponentSize.Small,color:L?"var(--colors-pallete-wine-color)":null!=x?x:k.colors.pallete.secondary.color,weight:700};"string"==typeof u&&"string"==typeof p?(F=Number(u.replace(N,"")),Q=Number(p.replace(N,""))):(F="number"==typeof u?u:0,Q="number"==typeof p?p:0);var B=F-Q,E=Number((B-Math.floor(B)).toFixed(2));E>=.01&&E<.5?B=Math.floor(B)+0:E>=.51&&E<1&&(B=Math.floor(B)+.5);var H=B.toFixed(2);return i.jsxs(v,e.__assign({},M,{children:[i.jsx(d.Container,e.__assign({style:{paddingBottom:"0.5rem"}},{children:R&&i.jsx((function(){return i.jsx(d.Price,e.__assign({size:j?z:t.ComponentSize.Small,color:k.component.pricing.priceLabel.price.originalPriceColor||k.colors.shades[300].color,margin:!0,underlined:S,"data-testid":a.getTestId(y,"original-product-price")},{children:u}),void 0)}),{},void 0)}),void 0),i.jsxs(d.Container,{children:[i.jsxs(f,e.__assign({"data-testid":a.getTestId(y,"final-product-price")},{children:[i.jsx(d.Price,e.__assign({margin:!0,finalPriceStyledSmall:!0,style:{marginTop:"-5px"}},A,{size:z},{children:N}),void 0),i.jsx(d.Price,e.__assign({finalPriceStyled:!0},A,{size:z},{children:V[0]?V[0]:null===(c="".concat(p))||void 0===c?void 0:c.split(N)[1]}),void 0),i.jsx(d.Price,e.__assign({finalPriceStyledSmall:!0,style:{marginTop:"-6px"}},A,{size:z},{children:V[1]?V[1]:"00"}),void 0)]}),void 0),i.jsx((function(){return!w||w<2?null:i.jsxs(_,e.__assign({"data-testid":a.getTestId(y,"each-one-price")},{children:[i.jsxs(d.Price,e.__assign({},A,{weight:600},{children:["(",I]}),void 0),i.jsx(d.Price,e.__assign({},A,{weight:400},{children:"/each"}),void 0),i.jsx(d.Price,e.__assign({},A,{weight:600},{children:")"}),void 0)]}),void 0)}),{},void 0),U&&i.jsx(d.TagContainer,e.__assign({size:t.ComponentSize.Small},{children:g&&i.jsx(l.DiscountTag,e.__assign({},g,{size:t.ComponentSize.Medium,style:{letterSpacing:"-0.05rem"},bordersRounded:T,savings:O?"SAVE ".concat(N).concat(H):void 0,showSavings:!0}),void 0)}),void 0),L&&i.jsx(d.TagContainer,e.__assign({size:t.ComponentSize.Medium},{children:m&&i.jsx(o.ClubOfferTag,e.__assign({},m,{size:t.ComponentSize.Small,style:{borderRadius:"8px",width:"107px",height:"28px",alignItems:"center",padding:"3px 8px 3px 8px",fontSize:"14px",lineHeight:"22px"}}),void 0)}),void 0)]},void 0)]}),void 0)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("@emotion/styled"),r=require("../../../core/theme/Theme.js"),s=require("../../../utils/getCurrencySymbol/getCurrencySimbol.js"),t=require("../../../types/enums.js"),o=require("../clubOffer/ClubOfferTag.js"),l=require("../discount/DiscountTag.js"),a=require("../price/PriceLabel.js"),d=require("../styles.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p,u,g,m=c(n),f=m.default.div(p||(p=e.__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"]))),v=m.default.div(u||(u=e.__makeTemplateObject(["\n display: column;\n align-items: center;\n"],["\n display: column;\n align-items: center;\n"]))),_=m.default.div(g||(g=e.__makeTemplateObject(["\n display: flex;\n padding-left: 0.5rem;\n"],["\n display: flex;\n padding-left: 0.5rem;\n"])));exports.PriceLabelV3=function(n){var c,p=n.finalPrice,u=n.originalPrice,g=n.discount,m=n.clubOffer,x=n.color,y=n.testId,h=n.originalPriceStyled,j=void 0!==h&&h,b=n.originalPriceUnderlined,S=void 0===b||b,P=n.size,z=void 0===P?t.ComponentSize.Small:P,C=n.bordersRounded,T=void 0!==C&&C,q=n.savingsDisplay,O=void 0===q||q,w=n.itemsQuantity,I=n.packUnitPrice,M=e.__rest(n,["finalPrice","originalPrice","discount","clubOffer","color","testId","originalPriceStyled","originalPriceUnderlined","size","bordersRounded","savingsDisplay","itemsQuantity","packUnitPrice"]),k=r.useTheme(),D=u!==p,R=u&&D,U=g&&D,L=m&&D,N="$";"string"==typeof p&&(N=s.getCurrencySymbol(p));var F,Q,V="string"==typeof p&&p.includes(".")&&p.includes(N)?p.split(N)[1].split("."):["",""],A={size:t.ComponentSize.Small,color:L?"var(--colors-pallete-wine-color)":null!=x?x:k.colors.pallete.secondary.color,weight:700};"string"==typeof u&&"string"==typeof p?(F=Number(u.replace(N,"")),Q=Number(p.replace(N,""))):(F="number"==typeof u?u:0,Q="number"==typeof p?p:0);var B=F-Q,E=Number((B-Math.floor(B)).toFixed(2));E>=.01&&E<.5?B=Math.floor(B)+0:E>=.51&&E<1&&(B=Math.floor(B)+.5);var H=B.toFixed(2);return i.jsxs(v,e.__assign({},M,{children:[i.jsx(d.Container,e.__assign({style:{paddingBottom:"0.5rem"}},{children:R&&i.jsx((function(){return i.jsx(d.Price,e.__assign({size:j?z:t.ComponentSize.Small,color:k.component.pricing.priceLabel.price.originalPriceColor||k.colors.shades[300].color,margin:!0,underlined:S,"data-testid":a.getTestId(y,"original-product-price"),"data-nosnippet":!0},{children:u}),void 0)}),{},void 0)}),void 0),i.jsxs(d.Container,{children:[i.jsxs(f,e.__assign({"data-testid":a.getTestId(y,"final-product-price")},{children:[i.jsx(d.Price,e.__assign({margin:!0,finalPriceStyledSmall:!0,style:{marginTop:"-5px"}},A,{size:z},{children:N}),void 0),i.jsx(d.Price,e.__assign({finalPriceStyled:!0},A,{size:z},{children:V[0]?V[0]:null===(c="".concat(p))||void 0===c?void 0:c.split(N)[1]}),void 0),i.jsx(d.Price,e.__assign({finalPriceStyledSmall:!0,style:{marginTop:"-6px"}},A,{size:z},{children:V[1]?V[1]:"00"}),void 0)]}),void 0),i.jsx((function(){return!w||w<2?null:i.jsxs(_,e.__assign({"data-testid":a.getTestId(y,"each-one-price")},{children:[i.jsxs(d.Price,e.__assign({},A,{weight:600},{children:["(",I]}),void 0),i.jsx(d.Price,e.__assign({},A,{weight:400},{children:"/each"}),void 0),i.jsx(d.Price,e.__assign({},A,{weight:600},{children:")"}),void 0)]}),void 0)}),{},void 0),U&&i.jsx(d.TagContainer,e.__assign({size:t.ComponentSize.Small},{children:g&&i.jsx(l.DiscountTag,e.__assign({},g,{size:t.ComponentSize.Medium,style:{letterSpacing:"-0.05rem"},bordersRounded:T,savings:O?"SAVE ".concat(N).concat(H):void 0,showSavings:!0}),void 0)}),void 0),L&&i.jsx(d.TagContainer,e.__assign({size:t.ComponentSize.Medium},{children:m&&i.jsx(o.ClubOfferTag,e.__assign({},m,{size:t.ComponentSize.Small,style:{borderRadius:"8px",width:"107px",height:"28px",alignItems:"center",padding:"3px 8px 3px 8px",fontSize:"14px",lineHeight:"22px"}}),void 0)}),void 0)]},void 0)]}),void 0)};
2
2
  //# sourceMappingURL=PriceLabelV3.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("@emotion/styled"),r=require("../../../core/theme/Theme.js"),t=require("../../../hooks/WindowDimensions.js"),o=require("../../../utils/getCurrencySymbol/getCurrencySimbol.js"),l=require("../../../types/enums.js"),s=require("../discount/DiscountTag.js"),a=require("../styles.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=c(i),p=d.default.span(y||(y=e.__makeTemplateObject(["\n background-color: #e5e5e5;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: #5a5a5a;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"],["\n background-color: #e5e5e5;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: #5a5a5a;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"]))),u=d.default.span(b||(b=e.__makeTemplateObject(["\n background-color: #c64844;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: white;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"],["\n background-color: #c64844;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: white;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"]))),m=d.default.span(h||(h=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"]))),g=d.default.span(_||(_=e.__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"]))),x=d.default.span(P||(P=e.__makeTemplateObject(["\n display: flex;\n gap: 8px;\n"],["\n display: flex;\n gap: 8px;\n"]))),f=function(){return n.jsx(p,{children:"REGULAR PRICE"},void 0)},j=function(e){var i=e.label;return n.jsx(u,{children:i||"CLUB MEMBERS"},void 0)};function v(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.filter(Boolean).join("-")}var y,b,h,_,P;exports.PriceLabelV4=function(i){var c;i.finalPrice;var d=i.originalPrice,p=i.discount,u=i.color,y=i.testId,b=i.finalPriceStyled,h=void 0!==b&&b,_=i.finalPriceStyle,P=i.originalPriceStyled,S=void 0!==P&&P,z=i.originalPriceUnderlined,C=void 0===z||z,T=i.size,k=void 0===T?l.ComponentSize.Medium:T,q=i.clubStyle,w=void 0!==q&&q,O=i.styledPrice,M=void 0!==O&&O,D=i.clubPrice,E=e.__rest(i,["finalPrice","originalPrice","discount","color","testId","finalPriceStyled","finalPriceStyle","originalPriceStyled","originalPriceUnderlined","size","clubStyle","styledPrice","clubPrice"]),I=r.useTheme(),L=t.useWindowDimensions().isMobile,R=D,U="$";"string"==typeof R&&(U=o.getCurrencySymbol(R));var B="string"==typeof R&&R.includes(".")&&R.includes(U)?R.split(U)[1].split("."):["",""],W={size:h?l.ComponentSize.Small:k,color:u||I.colors.pallete.secondary.color,weight:700},A=function(){var i=w?L?l.ComponentSize.Small:l.ComponentSize.XSmall:S?k:l.ComponentSize.Small;return n.jsx(a.Price,e.__assign({size:i,color:I.component.pricing.priceLabel.price.originalPriceColor,underlined:C,"data-testid":v(y,"original-product-price"),theme:I},{children:d}),void 0)};return n.jsxs(a.Container,e.__assign({},E,{children:[w&&!M?n.jsxs(m,{children:[n.jsxs(x,{children:[n.jsx(A,{},void 0),n.jsx(f,{},void 0)]},void 0),n.jsxs(x,{children:[n.jsx(a.Price,e.__assign({margin:!0,"data-testid":v(y,"final-product-price")},W,{style:_,size:k},{children:D}),void 0),n.jsx(j,{label:I.label.member},void 0)]},void 0)]},void 0):n.jsxs(m,{children:[n.jsxs(x,{children:[n.jsx(A,{},void 0),n.jsx(f,{},void 0)]},void 0),n.jsxs(x,{children:[n.jsxs(g,{children:[n.jsx(a.Price,e.__assign({margin:!0,finalPriceStyledSmall:!0,style:{marginTop:"-5px",color:"#c64844"}},W,{size:k,"data-testid":v(y,"final-product-price")},{children:U}),void 0),n.jsxs(a.Price,e.__assign({finalPriceStyled:!0},W,{size:k,style:{color:"#c64844"}},{children:[B[0]?B[0]:null===(c="".concat(R))||void 0===c?void 0:c.split(U)[1],"."]}),void 0),n.jsx(a.Price,e.__assign({finalPriceStyledSmall:!0,style:{marginTop:"-6px",color:"#c64844"}},W,{size:k},{children:B[1]?B[1]:"00"}),void 0)]},void 0),n.jsx(j,{label:I.label.member},void 0)]},void 0)]},void 0),p&&n.jsx(a.TagContainer,e.__assign({size:k},{children:n.jsx(s.DiscountTag,e.__assign({},p,{size:k}),void 0)}),void 0)]}),void 0)},exports.getTestId=v;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("@emotion/styled"),r=require("../../../core/theme/Theme.js"),t=require("../../../hooks/WindowDimensions.js"),o=require("../../../utils/getCurrencySymbol/getCurrencySimbol.js"),l=require("../../../types/enums.js"),s=require("../discount/DiscountTag.js"),a=require("../styles.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=c(i),p=d.default.span(y||(y=e.__makeTemplateObject(["\n background-color: #e5e5e5;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: #5a5a5a;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"],["\n background-color: #e5e5e5;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: #5a5a5a;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"]))),u=d.default.span(b||(b=e.__makeTemplateObject(["\n background-color: #c64844;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: white;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"],["\n background-color: #c64844;\n padding: 3px 4px;\n border-radius: 4px;\n gap: 10px;\n align-items: center;\n justify-content: center;\n color: white;\n font-weight: 600;\n font-size: 0.6rem;\n line-height: 1rem;\n text-align: center;\n margin-bottom: 0.5rem;\n"]))),m=d.default.span(h||(h=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"]))),g=d.default.span(_||(_=e.__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"]))),x=d.default.span(P||(P=e.__makeTemplateObject(["\n display: flex;\n gap: 8px;\n"],["\n display: flex;\n gap: 8px;\n"]))),f=function(){return n.jsx(p,{children:"REGULAR PRICE"},void 0)},j=function(e){var i=e.label;return n.jsx(u,{children:i||"CLUB MEMBERS"},void 0)};function v(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.filter(Boolean).join("-")}var y,b,h,_,P;exports.PriceLabelV4=function(i){var c;i.finalPrice;var d=i.originalPrice,p=i.discount,u=i.color,y=i.testId,b=i.finalPriceStyled,h=void 0!==b&&b,_=i.finalPriceStyle,P=i.originalPriceStyled,S=void 0!==P&&P,z=i.originalPriceUnderlined,C=void 0===z||z,T=i.size,k=void 0===T?l.ComponentSize.Medium:T,q=i.clubStyle,w=void 0!==q&&q,O=i.styledPrice,M=void 0!==O&&O,D=i.clubPrice,E=e.__rest(i,["finalPrice","originalPrice","discount","color","testId","finalPriceStyled","finalPriceStyle","originalPriceStyled","originalPriceUnderlined","size","clubStyle","styledPrice","clubPrice"]),I=r.useTheme(),L=t.useWindowDimensions().isMobile,R=D,U="$";"string"==typeof R&&(U=o.getCurrencySymbol(R));var B="string"==typeof R&&R.includes(".")&&R.includes(U)?R.split(U)[1].split("."):["",""],W={size:h?l.ComponentSize.Small:k,color:u||I.colors.pallete.secondary.color,weight:700},A=function(){var i=w?L?l.ComponentSize.Small:l.ComponentSize.XSmall:S?k:l.ComponentSize.Small;return n.jsx(a.Price,e.__assign({size:i,color:I.component.pricing.priceLabel.price.originalPriceColor,underlined:C,"data-testid":v(y,"original-product-price"),"data-nosnippet":!0,theme:I},{children:d}),void 0)};return n.jsxs(a.Container,e.__assign({},E,{children:[w&&!M?n.jsxs(m,{children:[n.jsxs(x,{children:[n.jsx(A,{},void 0),n.jsx(f,{},void 0)]},void 0),n.jsxs(x,{children:[n.jsx(a.Price,e.__assign({margin:!0,"data-testid":v(y,"final-product-price")},W,{style:_,size:k},{children:D}),void 0),n.jsx(j,{label:I.label.member},void 0)]},void 0)]},void 0):n.jsxs(m,{children:[n.jsxs(x,{children:[n.jsx(A,{},void 0),n.jsx(f,{},void 0)]},void 0),n.jsxs(x,{children:[n.jsxs(g,{children:[n.jsx(a.Price,e.__assign({margin:!0,finalPriceStyledSmall:!0,style:{marginTop:"-5px",color:"#c64844"}},W,{size:k,"data-testid":v(y,"final-product-price")},{children:U}),void 0),n.jsxs(a.Price,e.__assign({finalPriceStyled:!0},W,{size:k,style:{color:"#c64844"}},{children:[B[0]?B[0]:null===(c="".concat(R))||void 0===c?void 0:c.split(U)[1],"."]}),void 0),n.jsx(a.Price,e.__assign({finalPriceStyledSmall:!0,style:{marginTop:"-6px",color:"#c64844"}},W,{size:k},{children:B[1]?B[1]:"00"}),void 0)]},void 0),n.jsx(j,{label:I.label.member},void 0)]},void 0)]},void 0),p&&n.jsx(a.TagContainer,e.__assign({size:k},{children:n.jsx(s.DiscountTag,e.__assign({},p,{size:k}),void 0)}),void 0)]}),void 0)},exports.getTestId=v;
2
2
  //# sourceMappingURL=PriceLabelV4.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("../../../core/theme/Theme.js"),n=require("../../../types/enums.js"),o=require("./PriceLabelV5.styled.js");function t(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return e.filter(Boolean).join("-")}var l=function(r){var l=r.theme,s=r.originalPriceUnderlined,c=r.testId,a=r.originalPrice;return i.jsx(o.Price,e.__assign({size:n.ComponentSize.Small,color:l.colors.shades[450].color,underlined:s,"data-testid":t(c,"original-product-price"),theme:l},{children:a}),void 0)};exports.PriceLabelV5=function(s){var c=s.finalPrice,a=s.originalPrice;s.discount;var d=s.color,u=s.testId,P=s.finalPriceStyle,g=s.originalPriceUnderlined,m=void 0===g||g,v=s.size,h=void 0===v?n.ComponentSize.Medium:v,p=e.__rest(s,["finalPrice","originalPrice","discount","color","testId","finalPriceStyle","originalPriceUnderlined","size"]),f=r.useTheme(),j={size:h,color:null!=d?d:f.colors.pallete.secondary.color,weight:700};return i.jsx(o.Container,e.__assign({},p,{id:"priceLabel"},{children:i.jsxs(i.Fragment,{children:[i.jsx(o.Price,e.__assign({margin:!0,"data-testid":t(u,"final-product-price")},j,{style:P,size:h},{children:c}),void 0),!!a&&i.jsx(l,{theme:f,originalPriceUnderlined:m,testId:u,originalPrice:a},void 0)]},void 0)}),void 0)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("../../../core/theme/Theme.js"),n=require("../../../types/enums.js"),o=require("./PriceLabelV5.styled.js");function t(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return e.filter(Boolean).join("-")}var l=function(r){var l=r.theme,s=r.originalPriceUnderlined,c=r.testId,a=r.originalPrice;return i.jsx(o.Price,e.__assign({size:n.ComponentSize.Small,color:l.colors.shades[450].color,underlined:s,"data-testid":t(c,"original-product-price"),"data-nosnippet":!0,theme:l},{children:a}),void 0)};exports.PriceLabelV5=function(s){var c=s.finalPrice,a=s.originalPrice;s.discount;var d=s.color,u=s.testId,P=s.finalPriceStyle,g=s.originalPriceUnderlined,m=void 0===g||g,p=s.size,v=void 0===p?n.ComponentSize.Medium:p,h=e.__rest(s,["finalPrice","originalPrice","discount","color","testId","finalPriceStyle","originalPriceUnderlined","size"]),f=r.useTheme(),j={size:v,color:null!=d?d:f.colors.pallete.secondary.color,weight:700};return i.jsx(o.Container,e.__assign({},h,{id:"priceLabel"},{children:i.jsxs(i.Fragment,{children:[i.jsx(o.Price,e.__assign({margin:!0,"data-testid":t(u,"final-product-price")},j,{style:P,size:v},{children:c}),void 0),!!a&&i.jsx(l,{theme:f,originalPriceUnderlined:m,testId:u,originalPrice:a},void 0)]},void 0)}),void 0)};
2
2
  //# sourceMappingURL=PriceLabelV5.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),o=require("../../../types/enums.js"),r=require("../clubOffer/ClubOfferTag.js"),n=require("../discount/DiscountTag.js"),t=require("../price/PriceLabel.js"),s=require("../styles.js"),l=require("./PriceLabelV6.styled.js"),a=require("./PriceLabelV6Tooltip.js"),c=require("./utils/eventHandlers.js");exports.OriginalPriceSection=function(r){var n=r.originalPrice,l=r.originalPriceStyled,a=r.originalPriceUnderlined,c=r.size,d=r.testId,p=r.theme,u=r.hasHorizontalLayout;return i.jsx(s.Price,e.__assign({size:l?c:o.ComponentSize.Small,color:p.component.pricing.priceLabel.price.originalPriceColor||p.colors.shades[300].color,margin:!0,underlined:a,"data-testid":t.getTestId(d,"original-product-price"),style:u?{fontSize:"12px"}:void 0},{children:n}),void 0)},exports.PriceSection=function(r){var n=r.testId,l=r.priceCommonProps,a=r.size,c=r.currencySymbol,d=r.finalPriceArray,p=r.productFinalPrice,u=r.showDecimals,g=r.pricePerItem,S=r.theme,m=r.isHorizontalLayout,x=void 0!==m&&m,z=x?e.__assign(e.__assign({},l),{size:o.ComponentSize.Small,style:{fontSize:"14px"}}):l;return i.jsxs(s.FinalPriceStyledContainer,e.__assign({"data-testid":t.getTestId(n,"final-product-price")},{children:[i.jsx(s.Price,e.__assign({margin:!0,finalPriceStyledSmall:!x},z,{size:x?o.ComponentSize.Small:a},{children:c}),void 0),i.jsx(s.Price,e.__assign({finalPriceStyled:!x},z,{size:x?o.ComponentSize.Small:a},{children:d[0]||("string"==typeof p&&p.includes(c)?"".concat(p).split(c)[1]:"".concat(p))}),void 0),u&&i.jsxs(s.Price,e.__assign({finalPriceStyledSmall:!x,style:x?{fontSize:"14px"}:{marginTop:"-6px"}},z,{size:x?o.ComponentSize.Small:a},{children:[x&&".",d[1]?d[1]:"00"]}),void 0),g&&i.jsx(s.Price,e.__assign({size:o.ComponentSize.Small,color:S.colors.pallete.secondary.color},{children:"/each"}),void 0)]}),void 0)},exports.TagsSection=function(t){var l=t.isDiscount,a=t.discount,c=t.bordersRounded,d=t.savingsDisplay,p=t.currencySymbol,u=t.savetoString,g=t.isHorizontalLayout,S=void 0!==g&&g,m=t.isClubOffer,x=t.clubOffer;return i.jsxs(i.Fragment,{children:[l&&i.jsx(s.TagContainer,e.__assign({size:o.ComponentSize.Small},{children:a&&i.jsx(n.DiscountTag,e.__assign({},a,{size:o.ComponentSize.Medium,style:e.__assign({letterSpacing:"-0.05rem"},S&&{fontSize:"12px"}),bordersRounded:c,savings:d?"Save ".concat(p).concat(u):void 0}),void 0)}),void 0),m&&i.jsx(s.TagContainer,e.__assign({size:o.ComponentSize.Medium},{children:x&&i.jsx(r.ClubOfferTag,e.__assign({},x,{size:o.ComponentSize.Small,style:{borderRadius:"8px",width:"107px",height:"28px",alignItems:"center",padding:"3px 8px 3px 8px",fontSize:"14px",lineHeight:"22px"}}),void 0)}),void 0)]},void 0)},exports.TooltipSection=function(o){var r=o.tooltipText,n=o.tooltipIcon,t=o.tooltipPosition,s=o.isMobile;if(!r)return null;var d=c.createStopPropagationHandlers();return i.jsx(l.TooltipWrapper,e.__assign({"data-testid":"PriceLabelV6-TooltipWrapper"},d,{children:i.jsx(a.PriceLabelV6Tooltip,{tooltipText:r,tooltipIcon:n,tooltipPosition:t,isMobile:s},void 0)}),void 0)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),o=require("../../../types/enums.js"),r=require("../clubOffer/ClubOfferTag.js"),n=require("../discount/DiscountTag.js"),t=require("../price/PriceLabel.js"),s=require("../styles.js"),l=require("./PriceLabelV6.styled.js"),a=require("./PriceLabelV6Tooltip.js"),c=require("./utils/eventHandlers.js");exports.OriginalPriceSection=function(r){var n=r.originalPrice,l=r.originalPriceStyled,a=r.originalPriceUnderlined,c=r.size,d=r.testId,p=r.theme,u=r.hasHorizontalLayout;return i.jsx(s.Price,e.__assign({size:l?c:o.ComponentSize.Small,color:p.component.pricing.priceLabel.price.originalPriceColor||p.colors.shades[300].color,margin:!0,underlined:a,"data-testid":t.getTestId(d,"original-product-price"),"data-nosnippet":!0,style:u?{fontSize:"12px"}:void 0},{children:n}),void 0)},exports.PriceSection=function(r){var n=r.testId,l=r.priceCommonProps,a=r.size,c=r.currencySymbol,d=r.finalPriceArray,p=r.productFinalPrice,u=r.showDecimals,g=r.pricePerItem,S=r.theme,m=r.isHorizontalLayout,x=void 0!==m&&m,z=x?e.__assign(e.__assign({},l),{size:o.ComponentSize.Small,style:{fontSize:"14px"}}):l;return i.jsxs(s.FinalPriceStyledContainer,e.__assign({"data-testid":t.getTestId(n,"final-product-price")},{children:[i.jsx(s.Price,e.__assign({margin:!0,finalPriceStyledSmall:!x},z,{size:x?o.ComponentSize.Small:a},{children:c}),void 0),i.jsx(s.Price,e.__assign({finalPriceStyled:!x},z,{size:x?o.ComponentSize.Small:a},{children:d[0]||("string"==typeof p&&p.includes(c)?"".concat(p).split(c)[1]:"".concat(p))}),void 0),u&&i.jsxs(s.Price,e.__assign({finalPriceStyledSmall:!x,style:x?{fontSize:"14px"}:{marginTop:"-6px"}},z,{size:x?o.ComponentSize.Small:a},{children:[x&&".",d[1]?d[1]:"00"]}),void 0),g&&i.jsx(s.Price,e.__assign({size:o.ComponentSize.Small,color:S.colors.pallete.secondary.color},{children:"/each"}),void 0)]}),void 0)},exports.TagsSection=function(t){var l=t.isDiscount,a=t.discount,c=t.bordersRounded,d=t.savingsDisplay,p=t.currencySymbol,u=t.savetoString,g=t.isHorizontalLayout,S=void 0!==g&&g,m=t.isClubOffer,x=t.clubOffer;return i.jsxs(i.Fragment,{children:[l&&i.jsx(s.TagContainer,e.__assign({size:o.ComponentSize.Small},{children:a&&i.jsx(n.DiscountTag,e.__assign({},a,{size:o.ComponentSize.Medium,style:e.__assign({letterSpacing:"-0.05rem"},S&&{fontSize:"12px"}),bordersRounded:c,savings:d?"Save ".concat(p).concat(u):void 0}),void 0)}),void 0),m&&i.jsx(s.TagContainer,e.__assign({size:o.ComponentSize.Medium},{children:x&&i.jsx(r.ClubOfferTag,e.__assign({},x,{size:o.ComponentSize.Small,style:{borderRadius:"8px",width:"107px",height:"28px",alignItems:"center",padding:"3px 8px 3px 8px",fontSize:"14px",lineHeight:"22px"}}),void 0)}),void 0)]},void 0)},exports.TooltipSection=function(o){var r=o.tooltipText,n=o.tooltipIcon,t=o.tooltipPosition,s=o.isMobile;if(!r)return null;var d=c.createStopPropagationHandlers();return i.jsx(l.TooltipWrapper,e.__assign({"data-testid":"PriceLabelV6-TooltipWrapper"},d,{children:i.jsx(a.PriceLabelV6Tooltip,{tooltipText:r,tooltipIcon:n,tooltipPosition:t,isMobile:s},void 0)}),void 0)};
2
2
  //# sourceMappingURL=PriceLabelV6Components.js.map
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Trafilea's Design System",
4
4
  "author": "Trafilea",
5
5
  "repository": "https://github.com/trafilea/afrodita-components",
6
- "version": "7.23.1",
6
+ "version": "7.23.3",
7
7
  "private": false,
8
8
  "main": "build/lib/index.js",
9
9
  "style": "build/es/index.css",