@trafilea/afrodita-components 7.8.2 → 7.8.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{__rest as i,__assign as e}from"tslib";import{jsxs as l,jsx as n}from"react/jsx-runtime";import{useTheme as o}from"../../../core/theme/Theme.js";import{useWindowDimensions as r}from"../../../hooks/WindowDimensions.js";import{ComponentSize as t}from"../../../types/enums.js";import{DiscountTag as c}from"../discount/DiscountTag.js";import{Container as d,PriceContainer as a,Price as m,TagContainer as p}from"../styles.js";var v=function(i,e){var l,n,o,r,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===(n=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===n?void 0:n.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===(r=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===r?void 0:r.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"}}},u=function(i,e,l,n){var o,r,t;return l?null===(o=v(i,e))||void 0===o?void 0:o.finalPricefontSize:n?null===(r=v(i,e))||void 0===r?void 0:r.finalPricefontSizeSmall:null===(t=v(i,e))||void 0===t?void 0:t.fontSize};function s(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return i.filter(Boolean).join("-")}var f=function(v){var u=v.finalPrice,f=v.originalPrice,S=v.discount,g=v.color,z=v.testId,P=v.finalPriceStyled,h=void 0!==P&&P,b=v.finalPriceStyle,y=v.originalPriceStyled,L=void 0!==y&&y,x=v.originalPriceUnderlined,F=void 0===x||x,j=v.size,D=void 0===j?t.Medium:j,w=v.clubStyle,H=void 0!==w&&w,M=v.invertDirection,I=void 0!==M&&M,T=i(v,["finalPrice","originalPrice","discount","color","testId","finalPriceStyled","finalPriceStyle","originalPriceStyled","originalPriceUnderlined","size","clubStyle","invertDirection"]),U=o(),k=r().isMobile,B={size:h?t.Small:D,color:g||U.colors.pallete.secondary.color,weight:700},C=function(){var i=H?k?t.Small:t.XSmall:L?D:t.Small;return n(m,e({size:i,color:U.component.pricing.priceLabel.price.originalPriceColor,underlined:F,"data-testid":s(z,"original-product-price"),theme:U},{children:f}),void 0)};return l(d,e({},T,{id:"priceLabel"},{children:[l(a,e({invertDirection:I},H?{children:[!!f&&n(C,{},void 0),n(m,e({margin:!0,"data-testid":s(z,"final-product-price")},B,{style:b,size:D},{children:u}),void 0)]}:{children:[n(m,e({"data-testid":s(z,"final-product-price")},B,{style:b,size:D},{children:u}),void 0),!!f&&n(C,{},void 0)]}),void 0),S&&n(p,e({size:D},{children:n(c,e({},S,{size:D}),void 0)}),void 0)]}),void 0)};export{f as PriceLabel,u as getFontSize,v as getStylesBySize,s as getTestId};
1
+ import{__rest as i,__assign as e}from"tslib";import{jsxs as l,jsx as o}from"react/jsx-runtime";import{useTheme as r}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,PriceContainer as a,Price as m,TagContainer as p}from"../styles.js";var v=function(i,e){var l,o,r,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===(o=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===o?void 0:o.large)||"14px",margin:"0 0 0 0.75rem",lineHeight:"2rem"};case t.Medium:return{fontSize:(null===(r=null==e?void 0:e.component.pricing.priceLabel.price.defaultFontSize)||void 0===r?void 0:r.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"}}},u=function(i,e,l,o){var r,n,t;return l?null===(r=v(i,e))||void 0===r?void 0:r.finalPricefontSize:o?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 s(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return i.filter(Boolean).join("-")}var f=function(v){var u=v.finalPrice,f=v.originalPrice,S=v.discount,g=v.color,z=v.originalPriceColor,P=v.testId,h=v.finalPriceStyled,b=void 0!==h&&h,y=v.finalPriceStyle,L=v.originalPriceStyled,x=void 0!==L&&L,F=v.originalPriceUnderlined,j=void 0===F||F,D=v.size,w=void 0===D?t.Medium:D,C=v.clubStyle,H=void 0!==C&&C,M=v.invertDirection,I=void 0!==M&&M,T=i(v,["finalPrice","originalPrice","discount","color","originalPriceColor","testId","finalPriceStyled","finalPriceStyle","originalPriceStyled","originalPriceUnderlined","size","clubStyle","invertDirection"]),U=r(),k=n().isMobile,B={size:b?t.Small:w,color:g||U.colors.pallete.secondary.color,weight:700},W=function(){var i=H?k?t.Small:t.XSmall:x?w:t.Small;return o(m,e({size:i,color:z||U.component.pricing.priceLabel.price.originalPriceColor,underlined:j,"data-testid":s(P,"original-product-price"),theme:U},{children:f}),void 0)};return l(d,e({},T,{id:"priceLabel"},{children:[l(a,e({invertDirection:I},H?{children:[!!f&&o(W,{},void 0),o(m,e({margin:!0,"data-testid":s(P,"final-product-price")},B,{style:y,size:w},{children:u}),void 0)]}:{children:[o(m,e({"data-testid":s(P,"final-product-price")},B,{style:y,size:w},{children:u}),void 0),!!f&&o(W,{},void 0)]}),void 0),S&&o(p,e({size:w},{children:o(c,e({},S,{size:w}),void 0)}),void 0)]}),void 0)};export{f as PriceLabel,u as getFontSize,v as getStylesBySize,s as getTestId};
2
2
  //# sourceMappingURL=PriceLabel.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as i,__assign as e}from"tslib";import{jsxs as n,jsx as o}from"react/jsx-runtime";import t from"@emotion/styled";import{useTheme as r}from"../../../../core/theme/Theme.js";import{mediaQueries as l}from"../../../../utils/media.js";import{ClubPriceMemberLabel as c}from"../../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.js";import"../../../atoms/HorizontalDivider/HorizontalDivider.js";import{Icon as a}from"../../../atoms/Icon/Icon.js";import{Image as s}from"../../../atoms/Image/Image.js";import"../../../atoms/PriceLabel/PriceLabel.js";import"../../../atoms/PriceLabelV2/PriceLabelV2.js";import"react";import"../../../atoms/Toggle/toggle.styled.js";import{OfferBanner as d}from"../../../offer-banner/OfferBanner.js";import"../../../pricing/clubOffer/ClubOfferTag.js";import"../../../../types/enums.js";import"../../../pricing/discount/styled.js";import{PriceLabel as m}from"../../../pricing/price/PriceLabel.js";import"../../../pricing/styles.js";import"../../../tooltip/Styled.js";import"../../../pricing/priceLabelV3/PriceLabelV3.js";import"../../../pricing/priceLabelV5/PriceLabelV5.styled.js";import"../../../pricing/priceLabelV6/PriceLabelV6.styled.js";var p,h,g,f,u,v,b,x=t.div(p||(p=i(["\n display: flex;\n flex-direction: row;\n width: auto;\n padding: 10px 0;\n"],["\n display: flex;\n flex-direction: row;\n width: auto;\n padding: 10px 0;\n"]))),y=t.div(h||(h=i(["\n position: relative;\n width: ",";\n img {\n display: block;\n }\n"],["\n position: relative;\n width: ",";\n img {\n display: block;\n }\n"])),"63px"),j=t.div(g||(g=i(["\n display: flex;\n flex-direction: column;\n ",";\n width: calc(100% - ",");\n"],["\n display: flex;\n flex-direction: column;\n ",";\n width: calc(100% - ",");\n"])),l({paddingLeft:["0.938rem","1.875rem"]}),"63px"),w=t.h2((function(i){return{fontWeight:600,fontSize:"1rem",lineHeight:"1.5rem",color:i.color,margin:"0.063rem 0"}})),P=t.h3((function(i){var e=i.color,n=i.fontSize,o=i.lineHeight;return{fontWeight:i.fontWeight,fontSize:n,lineHeight:o,color:e,margin:i.margin}})),L=t.div(f||(f=i(["\n display: flex;\n ",";\n height: 100%;\n align-items: end;\n margin-top: 0.219rem;\n"],["\n display: flex;\n ",";\n height: 100%;\n align-items: end;\n margin-top: 0.219rem;\n"])),(function(i){var e=i.withTag;return i.theme,e?l({justifyContent:["space-between","end"],flexDirection:["row","column"]}):"justify-content: end"})),z=t.div(u||(u=i(["\n position: absolute;\n right: 0;\n top: 0;\n transform: translate(30%, -30%);\n border-radius: 50%;\n width: 1rem;\n height: 1rem;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--colors-shades-300-color);\n color: var(--colors-shades-white-color);\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 24px;\n"],["\n position: absolute;\n right: 0;\n top: 0;\n transform: translate(30%, -30%);\n border-radius: 50%;\n width: 1rem;\n height: 1rem;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--colors-shades-300-color);\n color: var(--colors-shades-white-color);\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 24px;\n"]))),C=t.span(v||(v=i(["\n display: block;\n transform: translateY(1px);\n"],["\n display: block;\n transform: translateY(1px);\n"]))),S=t.span(b||(b=i(["\n color: ",";\n font-weight: 600;\n font-size: 14px;\n line-height: 22px;\n"],["\n color: ",";\n font-weight: 600;\n font-size: 14px;\n line-height: 22px;\n"])),(function(i){return i.theme.colors.semantic.urgent.color})),k=function(i){var t,l,p,h,g,f,u,v,b=i.title,k=i.className,T=i.subtitle,V=i.midElement,H=i.image,I=i.price,O=i.tag,W=i.quantity,D=i.finalPriceStyle,q=i.isGift,F=i.isClub,G=r();return n(x,e({className:k},{children:[n(y,{children:[o(s,{src:H.src,alt:H.alt,width:"4.063rem",height:"5.375rem",objectFit:"cover",objectPosition:"center"},void 0),W?o(z,e({"data-testid":"order-item-quantity"},{children:o(C,{children:W},void 0)}),void 0):null]},void 0),n(j,e({"data-testid":"order-item-description-container",theme:G},{children:[o(w,e({color:G.colors.shades[700].color,"data-testid":"product-title"},{children:b}),void 0),T&&o(P,e({color:(null===(l=null===(t=G.component.pricing)||void 0===t?void 0:t.subtitle)||void 0===l?void 0:l.color)||G.colors.shades[700].color,fontSize:(null===(h=null===(p=G.component.pricing)||void 0===p?void 0:p.subtitle)||void 0===h?void 0:h.fontSize)||"0.75rem",lineHeight:(null===(f=null===(g=G.component.pricing)||void 0===g?void 0:g.subtitle)||void 0===f?void 0:f.lineHeight)||"1rem",fontWeight:(null===(v=null===(u=G.component.pricing)||void 0===u?void 0:u.subtitle)||void 0===v?void 0:v.fontWeight)||"normal","data-testid":"product-variant-title",margin:"0.5rem 0 0 0"},{children:T}),void 0),V,q&&o(S,{children:"Limited Time Only"},void 0),n(L,e({"data-testid":"order-item-price-container",withTag:!!O,theme:G},{children:[O&&o(d,{discountAppliedText:null==O?void 0:O.text,backgroundColor:null==O?void 0:O.backgroundColor},void 0),q?o(S,{children:"GIFT"},void 0):F?o(c,{finalPrice:I.finalPrice,originalPrice:I.originalPrice,isCollections:!1,isClubOffer:!0,isClub:!0,icon:o(a,{name:"other/club_filled",height:"21px",width:"52px"},void 0),style:{gap:8}},void 0):o(m,{finalPrice:I.finalPrice,originalPrice:I.originalPrice,color:I.color||G.colors.shades[700].color,size:G.component.pricing.priceLabel.price.size,finalPriceStyle:D,originalPriceStyled:!0},void 0)]}),void 0)]}),void 0)]}),void 0)};export{k as default};
1
+ import{__makeTemplateObject as i,__assign as e}from"tslib";import{jsxs as n,jsx as o}from"react/jsx-runtime";import t from"@emotion/styled";import{useTheme as r}from"../../../../core/theme/Theme.js";import{mediaQueries as l}from"../../../../utils/media.js";import{ClubPriceMemberLabel as c}from"../../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.js";import"../../../atoms/HorizontalDivider/HorizontalDivider.js";import{Icon as a}from"../../../atoms/Icon/Icon.js";import{Image as s}from"../../../atoms/Image/Image.js";import"../../../atoms/PriceLabel/PriceLabel.js";import"../../../atoms/PriceLabelV2/PriceLabelV2.js";import"react";import"../../../atoms/Toggle/toggle.styled.js";import{OfferBanner as d}from"../../../offer-banner/OfferBanner.js";import"../../../pricing/clubOffer/ClubOfferTag.js";import"../../../../types/enums.js";import"../../../pricing/discount/styled.js";import{PriceLabel as m}from"../../../pricing/price/PriceLabel.js";import"../../../pricing/styles.js";import"../../../tooltip/Styled.js";import"../../../pricing/priceLabelV3/PriceLabelV3.js";import"../../../pricing/priceLabelV5/PriceLabelV5.styled.js";import"../../../pricing/priceLabelV6/PriceLabelV6.styled.js";var p,g,h,f,u,v,b,x=t.div(p||(p=i(["\n display: flex;\n flex-direction: row;\n width: auto;\n padding: 10px 0;\n"],["\n display: flex;\n flex-direction: row;\n width: auto;\n padding: 10px 0;\n"]))),y=t.div(g||(g=i(["\n position: relative;\n width: ",";\n img {\n display: block;\n }\n"],["\n position: relative;\n width: ",";\n img {\n display: block;\n }\n"])),"63px"),j=t.div(h||(h=i(["\n display: flex;\n flex-direction: column;\n ",";\n width: calc(100% - ",");\n"],["\n display: flex;\n flex-direction: column;\n ",";\n width: calc(100% - ",");\n"])),l({paddingLeft:["0.938rem","1.875rem"]}),"63px"),P=t.h2((function(i){return{fontWeight:600,fontSize:"1rem",lineHeight:"1.5rem",color:i.color,margin:"0.063rem 0"}})),w=t.h3((function(i){var e=i.color,n=i.fontSize,o=i.lineHeight;return{fontWeight:i.fontWeight,fontSize:n,lineHeight:o,color:e,margin:i.margin}})),L=t.div(f||(f=i(["\n display: flex;\n ",";\n height: 100%;\n align-items: end;\n margin-top: 0.219rem;\n"],["\n display: flex;\n ",";\n height: 100%;\n align-items: end;\n margin-top: 0.219rem;\n"])),(function(i){return i.withTag?l({justifyContent:["space-between","end"],flexDirection:["row","column"]}):"justify-content: end"})),z=t.div(u||(u=i(["\n position: absolute;\n right: 0;\n top: 0;\n transform: translate(30%, -30%);\n border-radius: 50%;\n width: 1rem;\n height: 1rem;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--colors-shades-300-color);\n color: var(--colors-shades-white-color);\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 24px;\n"],["\n position: absolute;\n right: 0;\n top: 0;\n transform: translate(30%, -30%);\n border-radius: 50%;\n width: 1rem;\n height: 1rem;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--colors-shades-300-color);\n color: var(--colors-shades-white-color);\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 24px;\n"]))),C=t.span(v||(v=i(["\n display: block;\n transform: translateY(1px);\n"],["\n display: block;\n transform: translateY(1px);\n"]))),S=t.span(b||(b=i(["\n color: ",";\n font-weight: 600;\n font-size: 14px;\n line-height: 22px;\n"],["\n color: ",";\n font-weight: 600;\n font-size: 14px;\n line-height: 22px;\n"])),(function(i){return i.theme.colors.semantic.urgent.color})),k=function(i){var t,l,p,g,h,f,u,v,b=i.title,k=i.className,T=i.subtitle,V=i.midElement,H=i.image,I=i.price,O=i.tag,W=i.quantity,D=i.finalPriceStyle,q=i.isGift,F=i.isClub,G=r();return n(x,e({className:k},{children:[n(y,{children:[o(s,{src:H.src,alt:H.alt,width:"4.063rem",height:"5.375rem",objectFit:"cover",objectPosition:"center"},void 0),W?o(z,e({"data-testid":"order-item-quantity"},{children:o(C,{children:W},void 0)}),void 0):null]},void 0),n(j,e({"data-testid":"order-item-description-container",theme:G},{children:[o(P,e({color:G.colors.shades[700].color,"data-testid":"product-title"},{children:b}),void 0),T&&o(w,e({color:(null===(l=null===(t=G.component.pricing)||void 0===t?void 0:t.subtitle)||void 0===l?void 0:l.color)||G.colors.shades[700].color,fontSize:(null===(g=null===(p=G.component.pricing)||void 0===p?void 0:p.subtitle)||void 0===g?void 0:g.fontSize)||"0.75rem",lineHeight:(null===(f=null===(h=G.component.pricing)||void 0===h?void 0:h.subtitle)||void 0===f?void 0:f.lineHeight)||"1rem",fontWeight:(null===(v=null===(u=G.component.pricing)||void 0===u?void 0:u.subtitle)||void 0===v?void 0:v.fontWeight)||"normal","data-testid":"product-variant-title",margin:"0.5rem 0 0 0"},{children:T}),void 0),V,q&&o(S,{children:"Limited Time Only"},void 0),n(L,e({"data-testid":"order-item-price-container",withTag:!!O,theme:G},{children:[O&&o(d,{discountAppliedText:null==O?void 0:O.text,backgroundColor:null==O?void 0:O.backgroundColor},void 0),q?o(S,{children:"GIFT"},void 0):F?o(c,{finalPrice:I.finalPrice,originalPrice:I.originalPrice,isCollections:!1,isClubOffer:!0,isClub:!0,icon:o(a,{name:"other/club_filled",height:"21px",width:"52px"},void 0),style:{gap:8}},void 0):o(m,{finalPrice:I.finalPrice,originalPrice:I.originalPrice,color:I.color||G.colors.shades[700].color,originalPriceColor:I.originalPriceColor,size:G.component.pricing.priceLabel.price.size,finalPriceStyle:D,originalPriceStyled:!0},void 0)]}),void 0)]}),void 0)]}),void 0)};export{k as default};
2
2
  //# sourceMappingURL=SimpleOrderItem.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as i}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useTheme as e}from"../../../core/theme/Theme.js";import"react";import"../../../types/enums.js";import"../../pricing/clubOffer/ClubOfferTag.js";import"../../pricing/discount/styled.js";import"../../pricing/styles.js";import"../../tooltip/Styled.js";import"../../atoms/PriceLabel/PriceLabel.js";import"../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../../atoms/HorizontalDivider/HorizontalDivider.js";import{Icon as r}from"../../atoms/Icon/Icon.js";import{Image as a}from"../../atoms/Image/Image.js";import"../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../atoms/Toggle/toggle.styled.js";import{Wrapper as s,TotalContainer as l,TotalLabel as d,GrandTotal as m,Currency as n,Container as h,SavingsSvgContainer as c,StarsContainer as g,DiscountText as p,DiscountAmount as v}from"./styled.js";var b=function(b){var f=b.total,j=b.currency,u=b.saving,y=b.highlightColor,L=void 0===y?"#2f806a":y,T=b.showTotalLabel,x=void 0!==T&&T,w=b.highlightSavings,P=e(),C="v1"===w||"v2"===w;return t(s,i({"data-testid":"total-wrapper"},{children:[t(l,i({showTotalLabel:x},{children:[x&&o(d,i({variant:"heading6",size:"regular",weight:"bold"},{children:"Total"}),void 0),t(m,i({color:P.component.total.basicTotal.amount.color,"data-testid":"total-price"},{children:[o(n,{children:j},void 0),f]}),void 0)]}),void 0),u&&t(h,i({"data-testid":"subtotal-container",highlightColor:L,highlightSavings:w},{children:[C&&t(c,{children:[o(r,{name:"other/bookmark",width:"20px",height:"20px",fill:"#2F806A"},void 0),"v2"===w&&o(g,{children:o(a,{src:"https://cdn.shapermint.com/assets/common/gifs/stars.gif",alt:"stars",width:"35px",height:"35px"},void 0)},void 0)]},void 0),o(p,i({"data-testid":"saving-title",isSavingsHighlighted:C},{children:u.savingText}),void 0),o(v,i({"data-testid":"saving-price",isSavingsHighlighted:C},{children:u.amount}),void 0)]}),void 0)]}),void 0)};export{b as Total};
1
+ import{__assign as i}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useTheme as e}from"../../../core/theme/Theme.js";import"react";import"../../../types/enums.js";import"../../pricing/clubOffer/ClubOfferTag.js";import"../../pricing/discount/styled.js";import"../../pricing/styles.js";import"../../tooltip/Styled.js";import"../../atoms/PriceLabel/PriceLabel.js";import"../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../../atoms/HorizontalDivider/HorizontalDivider.js";import{Icon as r}from"../../atoms/Icon/Icon.js";import{Image as a}from"../../atoms/Image/Image.js";import"../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../atoms/Toggle/toggle.styled.js";import{Wrapper as l,TotalContainer as s,TotalLabel as d,GrandTotal as n,PricingStyledContainer as h,PriceWrapper as c,Currency as m,Container as g,SavingsSvgContainer as p,StarsContainer as v,DiscountText as b,DiscountAmount as f}from"./styled.js";var j=function(j){var u=j.total,y=j.original,T=j.currency,P=j.saving,L=j.highlightColor,S=void 0===L?"#2f806a":L,x=j.showTotalLabel,w=void 0!==x&&x,C=j.highlightSavings,H=j.isPrincingStyleTestEnabled,I=void 0!==H&&H,z=e(),E="v1"===C||"v2"===C;return t(l,i({"data-testid":"total-wrapper"},{children:[t(s,i({showTotalLabel:w},{children:[w&&o(d,i({variant:"heading6",size:"regular",weight:"bold"},{children:"Total"}),void 0),o(n,i({"data-testid":"total-price"},{children:I?t(h,{children:[o("span",{children:y},void 0),o("span",{children:u},void 0)]},void 0):t(c,i({color:z.component.total.basicTotal.amount.color},{children:[o(m,{children:T},void 0),u]}),void 0)}),void 0)]}),void 0),P&&t(g,i({"data-testid":"subtotal-container",highlightSavings:C},{children:[E&&t(p,{children:[o(r,{name:"other/bookmark",width:"20px",height:"20px",fill:"#2F806A"},void 0),"v2"===C&&o(v,{children:o(a,{src:"https://cdn.shapermint.com/assets/common/gifs/stars.gif",alt:"stars",width:"35px",height:"35px"},void 0)},void 0)]},void 0),o(b,i({"data-testid":"saving-title",isSavingsHighlighted:E,isPrincingStyleTestEnabled:I,highlightColor:S},{children:P.savingText}),void 0),o(f,i({"data-testid":"saving-price",isSavingsHighlighted:E,isPrincingStyleTestEnabled:I,highlightColor:S},{children:P.amount}),void 0)]}),void 0)]}),void 0)};export{j as Total};
2
2
  //# sourceMappingURL=Total.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"tslib";import{css as t}from"@emotion/react";import e from"@emotion/styled";import{Text as i}from"../../text/Text.js";var o,r,l,a,s,f,g,c,h,p,m,u,x,d=e.div(o||(o=n(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"],["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"]))),w=e.h1(r||(r=n(["\n margin: 0;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 700;\n color: ",";\n display: block;\n align-items: center;\n"],["\n margin: 0;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 700;\n color: ",";\n display: block;\n align-items: center;\n"])),(function(n){return n.color})),y=e.span(l||(l=n(["\n margin: 0;\n margin-right: 0.625rem;\n font-weight: 600;\n color: ",";\n font-size: ",";\n line-height: ",";\n align-self: ",";\n"],["\n margin: 0;\n margin-right: 0.625rem;\n font-weight: 600;\n color: ",";\n font-size: ",";\n line-height: ",";\n align-self: ",";\n"])),(function(n){return n.theme.component.total.basicTotal.currency.color}),(function(n){return n.theme.component.total.basicTotal.currency.fontSize}),(function(n){return n.theme.component.total.basicTotal.currency.lineHeight}),(function(n){return n.theme.component.total.basicTotal.currency.alignSelf})),b=e.div(s||(s=n(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.625rem;\n color: ",";\n align-items: center;\n\n ","\n"],["\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.625rem;\n color: ",";\n align-items: center;\n\n ","\n"])),(function(n){return n.highlightColor}),(function(e){var i=e.highlightSavings;if(i)return t(a||(a=n(["\n justify-content: unset;\n gap: 0.5rem;\n background-color: ",";\n width: auto;\n align-self: end;\n padding: 4px;\n border-radius: 4px;\n "],["\n justify-content: unset;\n gap: 0.5rem;\n background-color: ",";\n width: auto;\n align-self: end;\n padding: 4px;\n border-radius: 4px;\n "])),"v1"===i&&"#dff1ec")})),z=e(b)(f||(f=n(["\n justify-content: ",";\n margin-top: 0;\n"],["\n justify-content: ",";\n margin-top: 0;\n"])),(function(n){return n.showTotalLabel?"space-between":"flex-end"})),v=e.h3(c||(c=n(["\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n font-weight: 600;\n\n ","\n"],["\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n font-weight: 600;\n\n ","\n"])),(function(e){if(e.isSavingsHighlighted)return t(g||(g=n(["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n text-transform: uppercase;\n "],["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n text-transform: uppercase;\n "])))})),j=e.h3(p||(p=n(["\n margin: 0;\n font-size: 18px;\n line-height: 28px;\n font-weight: ",";\n\n ","\n"],["\n margin: 0;\n font-size: 18px;\n line-height: 28px;\n font-weight: ",";\n\n ","\n"])),(function(n){return n.theme.component.total.basicTotal.savings.amountFontWeight}),(function(e){if(e.isSavingsHighlighted)return t(h||(h=n(["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n "],["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n "])))})),T=e(i)(m||(m=n(["\n font-size: 20px;\n"],["\n font-size: 20px;\n"]))),S=e.div(u||(u=n(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"]))),k=e.div(x||(x=n(["\n position: absolute;\n transform: translate(10px, -18px);\n"],["\n position: absolute;\n transform: translate(10px, -18px);\n"])));export{b as Container,y as Currency,j as DiscountAmount,v as DiscountText,w as GrandTotal,S as SavingsSvgContainer,k as StarsContainer,z as TotalContainer,T as TotalLabel,d as Wrapper};
1
+ import{__makeTemplateObject as n}from"tslib";import{css as t}from"@emotion/react";import e from"@emotion/styled";import{Text as i}from"../../text/Text.js";var o,r,l,a,s,f,c,g,p,h,m,u,x,d,y,b=e.div(o||(o=n(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"],["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"]))),w=e.h1(r||(r=n(["\n margin: 0;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 700;\n display: block;\n align-items: center;\n"],["\n margin: 0;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 700;\n display: block;\n align-items: center;\n"]))),z=e.span(l||(l=n(["\n margin: 0;\n margin-right: 0.625rem;\n font-weight: 600;\n color: ",";\n font-size: ",";\n line-height: ",";\n align-self: ",";\n"],["\n margin: 0;\n margin-right: 0.625rem;\n font-weight: 600;\n color: ",";\n font-size: ",";\n line-height: ",";\n align-self: ",";\n"])),(function(n){return n.theme.component.total.basicTotal.currency.color}),(function(n){return n.theme.component.total.basicTotal.currency.fontSize}),(function(n){return n.theme.component.total.basicTotal.currency.lineHeight}),(function(n){return n.theme.component.total.basicTotal.currency.alignSelf})),v=e.div(s||(s=n(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.625rem;\n align-items: center;\n\n ","\n"],["\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.625rem;\n align-items: center;\n\n ","\n"])),(function(e){var i=e.highlightSavings;if(i)return t(a||(a=n(["\n justify-content: unset;\n gap: 0.5rem;\n background-color: ",";\n width: auto;\n align-self: end;\n padding: 4px;\n border-radius: 4px;\n "],["\n justify-content: unset;\n gap: 0.5rem;\n background-color: ",";\n width: auto;\n align-self: end;\n padding: 4px;\n border-radius: 4px;\n "])),"v1"===i&&"#dff1ec")})),T=e(v)(f||(f=n(["\n justify-content: ",";\n margin-top: 0;\n"],["\n justify-content: ",";\n margin-top: 0;\n"])),(function(n){return n.showTotalLabel?"space-between":"flex-end"})),S=e.div(c||(c=n(["\n display: flex;\n flex-direction: column;\n font-size: 18px;\n line-height: 28px;\n font-weight: ",";\n\n & > span:first-of-type {\n color: #ff4e30;\n }\n\n & > span:last-of-type {\n color: #44c676;\n }\n"],["\n display: flex;\n flex-direction: column;\n font-size: 18px;\n line-height: 28px;\n font-weight: ",";\n\n & > span:first-of-type {\n color: #ff4e30;\n }\n\n & > span:last-of-type {\n color: #44c676;\n }\n"])),(function(n){return n.theme.component.total.basicTotal.savings.amountFontWeight})),j=e.span(g||(g=n(["\n color: ",";\n"],["\n color: ",";\n"])),(function(n){return n.color})),F=e.h3(h||(h=n(["\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n font-weight: 600;\n color: ",";\n\n ","\n"],["\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n font-weight: 600;\n color: ",";\n\n ","\n"])),(function(n){var t=n.highlightColor;return n.isPrincingStyleTestEnabled?"#FF4E30":t}),(function(e){if(e.isSavingsHighlighted)return t(p||(p=n(["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n text-transform: uppercase;\n "],["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n text-transform: uppercase;\n "])))})),E=e.h3(u||(u=n(["\n margin: 0;\n font-size: 18px;\n line-height: 28px;\n font-weight: ",";\n\n text-decoration: ",";\n\n color: ",";\n\n ","\n"],["\n margin: 0;\n font-size: 18px;\n line-height: 28px;\n font-weight: ",";\n\n text-decoration: ",";\n\n color: ",";\n\n ","\n"])),(function(n){return n.theme.component.total.basicTotal.savings.amountFontWeight}),(function(n){return n.isPrincingStyleTestEnabled&&"line-through"}),(function(n){var t=n.isPrincingStyleTestEnabled,e=n.highlightColor;return t?"#FF4E30":e}),(function(e){if(e.isSavingsHighlighted)return t(m||(m=n(["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n "],["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n "])))})),k=e(i)(x||(x=n(["\n font-size: 20px;\n"],["\n font-size: 20px;\n"]))),H=e.div(d||(d=n(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"]))),P=e.div(y||(y=n(["\n position: absolute;\n transform: translate(10px, -18px);\n"],["\n position: absolute;\n transform: translate(10px, -18px);\n"])));export{v as Container,z as Currency,E as DiscountAmount,F as DiscountText,w as GrandTotal,j as PriceWrapper,S as PricingStyledContainer,H as SavingsSvgContainer,P as StarsContainer,T as TotalContainer,k as TotalLabel,b as Wrapper};
2
2
  //# sourceMappingURL=styled.js.map
package/build/index.d.ts CHANGED
@@ -106,6 +106,7 @@ interface PriceLabelProps {
106
106
  finalPrice: string | number;
107
107
  originalPrice?: string | number;
108
108
  color?: string;
109
+ originalPriceColor?: string;
109
110
  size?: ComponentSize.Small | ComponentSize.Medium | ComponentSize.Large;
110
111
  discount?: DiscountTagProps$1;
111
112
  clubOffer?: ClubOfferTagProps;
@@ -3616,6 +3617,7 @@ declare const PaymentMethod: ({ Icon, width, height, onClick }: PaymentMethodsPr
3616
3617
 
3617
3618
  interface Price extends Pick<PriceLabelProps, 'finalPrice' | 'originalPrice'> {
3618
3619
  color?: string;
3620
+ originalPriceColor?: string;
3619
3621
  }
3620
3622
  interface ProductOrderItemProps {
3621
3623
  title: react__default.ReactNode | string;
@@ -4242,6 +4244,7 @@ interface SubtotalProps {
4242
4244
 
4243
4245
  interface TotalProps {
4244
4246
  total: string;
4247
+ original?: string;
4245
4248
  currency: string;
4246
4249
  highlightColor?: string;
4247
4250
  saving?: {
@@ -4250,10 +4253,11 @@ interface TotalProps {
4250
4253
  };
4251
4254
  showTotalLabel?: boolean;
4252
4255
  highlightSavings?: 'v1' | 'v2';
4256
+ isPrincingStyleTestEnabled?: boolean;
4253
4257
  }
4254
4258
 
4255
4259
  declare const Totals: {
4256
- Total: ({ total, currency, saving, highlightColor, showTotalLabel, highlightSavings, }: TotalProps) => JSX.Element;
4260
+ Total: ({ total, original, currency, saving, highlightColor, showTotalLabel, highlightSavings, isPrincingStyleTestEnabled, }: TotalProps) => JSX.Element;
4257
4261
  Subtotal: ({ subtotal, shipping, taxes, coupon, highlightColor, }: SubtotalProps) => JSX.Element;
4258
4262
  };
4259
4263
 
@@ -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,a,d,s;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===(d=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===d?void 0:d.small)||"20px",finalPricefontSizeSmall:(null===(s=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===s?void 0:s.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 d=c.finalPrice,s=c.originalPrice,p=c.discount,u=c.color,m=c.testId,v=c.finalPriceStyled,S=void 0!==v&&v,g=c.finalPriceStyle,f=c.originalPriceStyled,z=void 0!==f&&f,P=c.originalPriceUnderlined,x=void 0===P||P,_=c.size,h=void 0===_?o.ComponentSize.Medium:_,j=c.clubStyle,b=void 0!==j&&j,y=c.invertDirection,C=void 0!==y&&y,L=i.__rest(c,["finalPrice","originalPrice","discount","color","testId","finalPriceStyled","finalPriceStyle","originalPriceStyled","originalPriceUnderlined","size","clubStyle","invertDirection"]),F=n.useTheme(),D=r.useWindowDimensions().isMobile,q={size:S?o.ComponentSize.Small:h,color:u||F.colors.pallete.secondary.color,weight:700},T=function(){var n=b?D?o.ComponentSize.Small:o.ComponentSize.XSmall:z?h:o.ComponentSize.Small;return e.jsx(t.Price,i.__assign({size:n,color:F.component.pricing.priceLabel.price.originalPriceColor,underlined:x,"data-testid":a(m,"original-product-price"),theme:F},{children:s}),void 0)};return e.jsxs(t.Container,i.__assign({},L,{id:"priceLabel"},{children:[b?e.jsxs(t.PriceContainer,i.__assign({invertDirection:C},{children:[!!s&&e.jsx(T,{},void 0),e.jsx(t.Price,i.__assign({margin:!0,"data-testid":a(m,"final-product-price")},q,{style:g,size:h},{children:d}),void 0)]}),void 0):e.jsxs(t.PriceContainer,i.__assign({invertDirection:C},{children:[e.jsx(t.Price,i.__assign({"data-testid":a(m,"final-product-price")},q,{style:g,size:h},{children:d}),void 0),!!s&&e.jsx(T,{},void 0)]}),void 0),p&&e.jsx(t.TagContainer,i.__assign({size:h},{children:e.jsx(l.DiscountTag,i.__assign({},p,{size:h}),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;
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,d,s;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===(d=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===d?void 0:d.small)||"20px",finalPricefontSizeSmall:(null===(s=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===s?void 0:s.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 d=c.finalPrice,s=c.originalPrice,p=c.discount,u=c.color,m=c.originalPriceColor,v=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,b=c.clubStyle,y=void 0!==b&&b,C=c.invertDirection,L=void 0!==C&&C,F=i.__rest(c,["finalPrice","originalPrice","discount","color","originalPriceColor","testId","finalPriceStyled","finalPriceStyle","originalPriceStyled","originalPriceUnderlined","size","clubStyle","invertDirection"]),D=n.useTheme(),q=r.useWindowDimensions().isMobile,T={size:S?o.ComponentSize.Small:j,color:u||D.colors.pallete.secondary.color,weight:700},w=function(){var n=y?q?o.ComponentSize.Small:o.ComponentSize.XSmall:P?j:o.ComponentSize.Small;return e.jsx(t.Price,i.__assign({size:n,color:m||D.component.pricing.priceLabel.price.originalPriceColor,underlined:_,"data-testid":a(v,"original-product-price"),theme:D},{children:s}),void 0)};return e.jsxs(t.Container,i.__assign({},F,{id:"priceLabel"},{children:[y?e.jsxs(t.PriceContainer,i.__assign({invertDirection:L},{children:[!!s&&e.jsx(w,{},void 0),e.jsx(t.Price,i.__assign({margin:!0,"data-testid":a(v,"final-product-price")},T,{style:f,size:j},{children:d}),void 0)]}),void 0):e.jsxs(t.PriceContainer,i.__assign({invertDirection:L},{children:[e.jsx(t.Price,i.__assign({"data-testid":a(v,"final-product-price")},T,{style:f,size:j},{children:d}),void 0),!!s&&e.jsx(w,{},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";var e=require("tslib"),i=require("react/jsx-runtime"),n=require("@emotion/styled"),r=require("../../../../core/theme/Theme.js"),t=require("../../../../utils/media.js"),o=require("../../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.js");require("../../../atoms/HorizontalDivider/HorizontalDivider.js");var l=require("../../../atoms/Icon/Icon.js"),a=require("../../../atoms/Image/Image.js");require("../../../atoms/PriceLabel/PriceLabel.js"),require("../../../atoms/PriceLabelV2/PriceLabelV2.js"),require("react"),require("../../../atoms/Toggle/toggle.styled.js");var s=require("../../../offer-banner/OfferBanner.js");require("../../../pricing/clubOffer/ClubOfferTag.js"),require("../../../../types/enums.js"),require("../../../pricing/discount/styled.js");var c=require("../../../pricing/price/PriceLabel.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../../pricing/styles.js"),require("../../../tooltip/Styled.js"),require("../../../pricing/priceLabelV3/PriceLabelV3.js"),require("../../../pricing/priceLabelV5/PriceLabelV5.styled.js"),require("../../../pricing/priceLabelV6/PriceLabelV6.styled.js");var u,m,g,p,f,h,b,v=d(n),j=v.default.div(u||(u=e.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n width: auto;\n padding: 10px 0;\n"],["\n display: flex;\n flex-direction: row;\n width: auto;\n padding: 10px 0;\n"]))),x=v.default.div(m||(m=e.__makeTemplateObject(["\n position: relative;\n width: ",";\n img {\n display: block;\n }\n"],["\n position: relative;\n width: ",";\n img {\n display: block;\n }\n"])),"63px"),y=v.default.div(g||(g=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n ",";\n width: calc(100% - ",");\n"],["\n display: flex;\n flex-direction: column;\n ",";\n width: calc(100% - ",");\n"])),t.mediaQueries({paddingLeft:["0.938rem","1.875rem"]}),"63px"),_=v.default.h2((function(e){return{fontWeight:600,fontSize:"1rem",lineHeight:"1.5rem",color:e.color,margin:"0.063rem 0"}})),q=v.default.h3((function(e){var i=e.color,n=e.fontSize,r=e.lineHeight;return{fontWeight:e.fontWeight,fontSize:n,lineHeight:r,color:i,margin:e.margin}})),P=v.default.div(p||(p=e.__makeTemplateObject(["\n display: flex;\n ",";\n height: 100%;\n align-items: end;\n margin-top: 0.219rem;\n"],["\n display: flex;\n ",";\n height: 100%;\n align-items: end;\n margin-top: 0.219rem;\n"])),(function(e){var i=e.withTag;return e.theme,i?t.mediaQueries({justifyContent:["space-between","end"],flexDirection:["row","column"]}):"justify-content: end"})),w=v.default.div(f||(f=e.__makeTemplateObject(["\n position: absolute;\n right: 0;\n top: 0;\n transform: translate(30%, -30%);\n border-radius: 50%;\n width: 1rem;\n height: 1rem;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--colors-shades-300-color);\n color: var(--colors-shades-white-color);\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 24px;\n"],["\n position: absolute;\n right: 0;\n top: 0;\n transform: translate(30%, -30%);\n border-radius: 50%;\n width: 1rem;\n height: 1rem;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--colors-shades-300-color);\n color: var(--colors-shades-white-color);\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 24px;\n"]))),L=v.default.span(h||(h=e.__makeTemplateObject(["\n display: block;\n transform: translateY(1px);\n"],["\n display: block;\n transform: translateY(1px);\n"]))),T=v.default.span(b||(b=e.__makeTemplateObject(["\n color: ",";\n font-weight: 600;\n font-size: 14px;\n line-height: 22px;\n"],["\n color: ",";\n font-weight: 600;\n font-size: 14px;\n line-height: 22px;\n"])),(function(e){return e.theme.colors.semantic.urgent.color}));module.exports=function(n){var t,d,u,m,g,p,f,h,b=n.title,v=n.className,k=n.subtitle,z=n.midElement,O=n.image,C=n.price,S=n.tag,V=n.quantity,H=n.finalPriceStyle,I=n.isGift,W=n.isClub,D=r.useTheme();return i.jsxs(j,e.__assign({className:v},{children:[i.jsxs(x,{children:[i.jsx(a.Image,{src:O.src,alt:O.alt,width:"4.063rem",height:"5.375rem",objectFit:"cover",objectPosition:"center"},void 0),V?i.jsx(w,e.__assign({"data-testid":"order-item-quantity"},{children:i.jsx(L,{children:V},void 0)}),void 0):null]},void 0),i.jsxs(y,e.__assign({"data-testid":"order-item-description-container",theme:D},{children:[i.jsx(_,e.__assign({color:D.colors.shades[700].color,"data-testid":"product-title"},{children:b}),void 0),k&&i.jsx(q,e.__assign({color:(null===(d=null===(t=D.component.pricing)||void 0===t?void 0:t.subtitle)||void 0===d?void 0:d.color)||D.colors.shades[700].color,fontSize:(null===(m=null===(u=D.component.pricing)||void 0===u?void 0:u.subtitle)||void 0===m?void 0:m.fontSize)||"0.75rem",lineHeight:(null===(p=null===(g=D.component.pricing)||void 0===g?void 0:g.subtitle)||void 0===p?void 0:p.lineHeight)||"1rem",fontWeight:(null===(h=null===(f=D.component.pricing)||void 0===f?void 0:f.subtitle)||void 0===h?void 0:h.fontWeight)||"normal","data-testid":"product-variant-title",margin:"0.5rem 0 0 0"},{children:k}),void 0),z,I&&i.jsx(T,{children:"Limited Time Only"},void 0),i.jsxs(P,e.__assign({"data-testid":"order-item-price-container",withTag:!!S,theme:D},{children:[S&&i.jsx(s.OfferBanner,{discountAppliedText:null==S?void 0:S.text,backgroundColor:null==S?void 0:S.backgroundColor},void 0),I?i.jsx(T,{children:"GIFT"},void 0):W?i.jsx(o.ClubPriceMemberLabel,{finalPrice:C.finalPrice,originalPrice:C.originalPrice,isCollections:!1,isClubOffer:!0,isClub:!0,icon:i.jsx(l.Icon,{name:"other/club_filled",height:"21px",width:"52px"},void 0),style:{gap:8}},void 0):i.jsx(c.PriceLabel,{finalPrice:C.finalPrice,originalPrice:C.originalPrice,color:C.color||D.colors.shades[700].color,size:D.component.pricing.priceLabel.price.size,finalPriceStyle:H,originalPriceStyled:!0},void 0)]}),void 0)]}),void 0)]}),void 0)};
1
+ "use strict";var e=require("tslib"),i=require("react/jsx-runtime"),n=require("@emotion/styled"),r=require("../../../../core/theme/Theme.js"),t=require("../../../../utils/media.js"),o=require("../../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.js");require("../../../atoms/HorizontalDivider/HorizontalDivider.js");var l=require("../../../atoms/Icon/Icon.js"),a=require("../../../atoms/Image/Image.js");require("../../../atoms/PriceLabel/PriceLabel.js"),require("../../../atoms/PriceLabelV2/PriceLabelV2.js"),require("react"),require("../../../atoms/Toggle/toggle.styled.js");var s=require("../../../offer-banner/OfferBanner.js");require("../../../pricing/clubOffer/ClubOfferTag.js"),require("../../../../types/enums.js"),require("../../../pricing/discount/styled.js");var c=require("../../../pricing/price/PriceLabel.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../../pricing/styles.js"),require("../../../tooltip/Styled.js"),require("../../../pricing/priceLabelV3/PriceLabelV3.js"),require("../../../pricing/priceLabelV5/PriceLabelV5.styled.js"),require("../../../pricing/priceLabelV6/PriceLabelV6.styled.js");var u,m,g,p,f,h,b,v=d(n),j=v.default.div(u||(u=e.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n width: auto;\n padding: 10px 0;\n"],["\n display: flex;\n flex-direction: row;\n width: auto;\n padding: 10px 0;\n"]))),x=v.default.div(m||(m=e.__makeTemplateObject(["\n position: relative;\n width: ",";\n img {\n display: block;\n }\n"],["\n position: relative;\n width: ",";\n img {\n display: block;\n }\n"])),"63px"),y=v.default.div(g||(g=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n ",";\n width: calc(100% - ",");\n"],["\n display: flex;\n flex-direction: column;\n ",";\n width: calc(100% - ",");\n"])),t.mediaQueries({paddingLeft:["0.938rem","1.875rem"]}),"63px"),_=v.default.h2((function(e){return{fontWeight:600,fontSize:"1rem",lineHeight:"1.5rem",color:e.color,margin:"0.063rem 0"}})),P=v.default.h3((function(e){var i=e.color,n=e.fontSize,r=e.lineHeight;return{fontWeight:e.fontWeight,fontSize:n,lineHeight:r,color:i,margin:e.margin}})),q=v.default.div(p||(p=e.__makeTemplateObject(["\n display: flex;\n ",";\n height: 100%;\n align-items: end;\n margin-top: 0.219rem;\n"],["\n display: flex;\n ",";\n height: 100%;\n align-items: end;\n margin-top: 0.219rem;\n"])),(function(e){return e.withTag?t.mediaQueries({justifyContent:["space-between","end"],flexDirection:["row","column"]}):"justify-content: end"})),w=v.default.div(f||(f=e.__makeTemplateObject(["\n position: absolute;\n right: 0;\n top: 0;\n transform: translate(30%, -30%);\n border-radius: 50%;\n width: 1rem;\n height: 1rem;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--colors-shades-300-color);\n color: var(--colors-shades-white-color);\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 24px;\n"],["\n position: absolute;\n right: 0;\n top: 0;\n transform: translate(30%, -30%);\n border-radius: 50%;\n width: 1rem;\n height: 1rem;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--colors-shades-300-color);\n color: var(--colors-shades-white-color);\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 24px;\n"]))),L=v.default.span(h||(h=e.__makeTemplateObject(["\n display: block;\n transform: translateY(1px);\n"],["\n display: block;\n transform: translateY(1px);\n"]))),T=v.default.span(b||(b=e.__makeTemplateObject(["\n color: ",";\n font-weight: 600;\n font-size: 14px;\n line-height: 22px;\n"],["\n color: ",";\n font-weight: 600;\n font-size: 14px;\n line-height: 22px;\n"])),(function(e){return e.theme.colors.semantic.urgent.color}));module.exports=function(n){var t,d,u,m,g,p,f,h,b=n.title,v=n.className,k=n.subtitle,z=n.midElement,C=n.image,O=n.price,S=n.tag,V=n.quantity,H=n.finalPriceStyle,I=n.isGift,W=n.isClub,D=r.useTheme();return i.jsxs(j,e.__assign({className:v},{children:[i.jsxs(x,{children:[i.jsx(a.Image,{src:C.src,alt:C.alt,width:"4.063rem",height:"5.375rem",objectFit:"cover",objectPosition:"center"},void 0),V?i.jsx(w,e.__assign({"data-testid":"order-item-quantity"},{children:i.jsx(L,{children:V},void 0)}),void 0):null]},void 0),i.jsxs(y,e.__assign({"data-testid":"order-item-description-container",theme:D},{children:[i.jsx(_,e.__assign({color:D.colors.shades[700].color,"data-testid":"product-title"},{children:b}),void 0),k&&i.jsx(P,e.__assign({color:(null===(d=null===(t=D.component.pricing)||void 0===t?void 0:t.subtitle)||void 0===d?void 0:d.color)||D.colors.shades[700].color,fontSize:(null===(m=null===(u=D.component.pricing)||void 0===u?void 0:u.subtitle)||void 0===m?void 0:m.fontSize)||"0.75rem",lineHeight:(null===(p=null===(g=D.component.pricing)||void 0===g?void 0:g.subtitle)||void 0===p?void 0:p.lineHeight)||"1rem",fontWeight:(null===(h=null===(f=D.component.pricing)||void 0===f?void 0:f.subtitle)||void 0===h?void 0:h.fontWeight)||"normal","data-testid":"product-variant-title",margin:"0.5rem 0 0 0"},{children:k}),void 0),z,I&&i.jsx(T,{children:"Limited Time Only"},void 0),i.jsxs(q,e.__assign({"data-testid":"order-item-price-container",withTag:!!S,theme:D},{children:[S&&i.jsx(s.OfferBanner,{discountAppliedText:null==S?void 0:S.text,backgroundColor:null==S?void 0:S.backgroundColor},void 0),I?i.jsx(T,{children:"GIFT"},void 0):W?i.jsx(o.ClubPriceMemberLabel,{finalPrice:O.finalPrice,originalPrice:O.originalPrice,isCollections:!1,isClubOffer:!0,isClub:!0,icon:i.jsx(l.Icon,{name:"other/club_filled",height:"21px",width:"52px"},void 0),style:{gap:8}},void 0):i.jsx(c.PriceLabel,{finalPrice:O.finalPrice,originalPrice:O.originalPrice,color:O.color||D.colors.shades[700].color,originalPriceColor:O.originalPriceColor,size:D.component.pricing.priceLabel.price.size,finalPriceStyle:H,originalPriceStyled:!0},void 0)]}),void 0)]}),void 0)]}),void 0)};
2
2
  //# sourceMappingURL=SimpleOrderItem.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");require("react"),require("../../../types/enums.js"),require("../../pricing/clubOffer/ClubOfferTag.js"),require("../../pricing/discount/styled.js"),require("../../pricing/styles.js"),require("../../tooltip/Styled.js"),require("../../atoms/PriceLabel/PriceLabel.js"),require("../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js"),require("../../atoms/HorizontalDivider/HorizontalDivider.js");var s=require("../../atoms/Icon/Icon.js"),t=require("../../atoms/Image/Image.js");require("../../atoms/PriceLabelV2/PriceLabelV2.js"),require("../../atoms/Toggle/toggle.styled.js");var a=require("./styled.js");exports.Total=function(o){var n=o.total,l=o.currency,d=o.saving,g=o.highlightColor,c=void 0===g?"#2f806a":g,h=o.showTotalLabel,u=void 0!==h&&h,v=o.highlightSavings,j=r.useTheme(),m="v1"===v||"v2"===v;return i.jsxs(a.Wrapper,e.__assign({"data-testid":"total-wrapper"},{children:[i.jsxs(a.TotalContainer,e.__assign({showTotalLabel:u},{children:[u&&i.jsx(a.TotalLabel,e.__assign({variant:"heading6",size:"regular",weight:"bold"},{children:"Total"}),void 0),i.jsxs(a.GrandTotal,e.__assign({color:j.component.total.basicTotal.amount.color,"data-testid":"total-price"},{children:[i.jsx(a.Currency,{children:l},void 0),n]}),void 0)]}),void 0),d&&i.jsxs(a.Container,e.__assign({"data-testid":"subtotal-container",highlightColor:c,highlightSavings:v},{children:[m&&i.jsxs(a.SavingsSvgContainer,{children:[i.jsx(s.Icon,{name:"other/bookmark",width:"20px",height:"20px",fill:"#2F806A"},void 0),"v2"===v&&i.jsx(a.StarsContainer,{children:i.jsx(t.Image,{src:"https://cdn.shapermint.com/assets/common/gifs/stars.gif",alt:"stars",width:"35px",height:"35px"},void 0)},void 0)]},void 0),i.jsx(a.DiscountText,e.__assign({"data-testid":"saving-title",isSavingsHighlighted:m},{children:d.savingText}),void 0),i.jsx(a.DiscountAmount,e.__assign({"data-testid":"saving-price",isSavingsHighlighted:m},{children:d.amount}),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");require("react"),require("../../../types/enums.js"),require("../../pricing/clubOffer/ClubOfferTag.js"),require("../../pricing/discount/styled.js"),require("../../pricing/styles.js"),require("../../tooltip/Styled.js"),require("../../atoms/PriceLabel/PriceLabel.js"),require("../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js"),require("../../atoms/HorizontalDivider/HorizontalDivider.js");var s=require("../../atoms/Icon/Icon.js"),t=require("../../atoms/Image/Image.js");require("../../atoms/PriceLabelV2/PriceLabelV2.js"),require("../../atoms/Toggle/toggle.styled.js");var a=require("./styled.js");exports.Total=function(o){var n=o.total,l=o.original,d=o.currency,c=o.saving,g=o.highlightColor,h=void 0===g?"#2f806a":g,v=o.showTotalLabel,u=void 0!==v&&v,j=o.highlightSavings,m=o.isPrincingStyleTestEnabled,p=void 0!==m&&m,x=r.useTheme(),b="v1"===j||"v2"===j;return i.jsxs(a.Wrapper,e.__assign({"data-testid":"total-wrapper"},{children:[i.jsxs(a.TotalContainer,e.__assign({showTotalLabel:u},{children:[u&&i.jsx(a.TotalLabel,e.__assign({variant:"heading6",size:"regular",weight:"bold"},{children:"Total"}),void 0),i.jsx(a.GrandTotal,e.__assign({"data-testid":"total-price"},{children:p?i.jsxs(a.PricingStyledContainer,{children:[i.jsx("span",{children:l},void 0),i.jsx("span",{children:n},void 0)]},void 0):i.jsxs(a.PriceWrapper,e.__assign({color:x.component.total.basicTotal.amount.color},{children:[i.jsx(a.Currency,{children:d},void 0),n]}),void 0)}),void 0)]}),void 0),c&&i.jsxs(a.Container,e.__assign({"data-testid":"subtotal-container",highlightSavings:j},{children:[b&&i.jsxs(a.SavingsSvgContainer,{children:[i.jsx(s.Icon,{name:"other/bookmark",width:"20px",height:"20px",fill:"#2F806A"},void 0),"v2"===j&&i.jsx(a.StarsContainer,{children:i.jsx(t.Image,{src:"https://cdn.shapermint.com/assets/common/gifs/stars.gif",alt:"stars",width:"35px",height:"35px"},void 0)},void 0)]},void 0),i.jsx(a.DiscountText,e.__assign({"data-testid":"saving-title",isSavingsHighlighted:b,isPrincingStyleTestEnabled:p,highlightColor:h},{children:c.savingText}),void 0),i.jsx(a.DiscountAmount,e.__assign({"data-testid":"saving-price",isSavingsHighlighted:b,isPrincingStyleTestEnabled:p,highlightColor:h},{children:c.amount}),void 0)]}),void 0)]}),void 0)};
2
2
  //# sourceMappingURL=Total.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),e=require("@emotion/react"),t=require("@emotion/styled"),i=require("../../text/Text.js");function o(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var a,r,l,s,c,p,f,m,g,u,h,x,d,b=o(t),_=b.default.div(a||(a=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"],["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"]))),T=b.default.h1(r||(r=n.__makeTemplateObject(["\n margin: 0;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 700;\n color: ",";\n display: block;\n align-items: center;\n"],["\n margin: 0;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 700;\n color: ",";\n display: block;\n align-items: center;\n"])),(function(n){return n.color})),j=b.default.span(l||(l=n.__makeTemplateObject(["\n margin: 0;\n margin-right: 0.625rem;\n font-weight: 600;\n color: ",";\n font-size: ",";\n line-height: ",";\n align-self: ",";\n"],["\n margin: 0;\n margin-right: 0.625rem;\n font-weight: 600;\n color: ",";\n font-size: ",";\n line-height: ",";\n align-self: ",";\n"])),(function(n){return n.theme.component.total.basicTotal.currency.color}),(function(n){return n.theme.component.total.basicTotal.currency.fontSize}),(function(n){return n.theme.component.total.basicTotal.currency.lineHeight}),(function(n){return n.theme.component.total.basicTotal.currency.alignSelf})),y=b.default.div(c||(c=n.__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.625rem;\n color: ",";\n align-items: center;\n\n ","\n"],["\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.625rem;\n color: ",";\n align-items: center;\n\n ","\n"])),(function(n){return n.highlightColor}),(function(t){var i=t.highlightSavings;if(i)return e.css(s||(s=n.__makeTemplateObject(["\n justify-content: unset;\n gap: 0.5rem;\n background-color: ",";\n width: auto;\n align-self: end;\n padding: 4px;\n border-radius: 4px;\n "],["\n justify-content: unset;\n gap: 0.5rem;\n background-color: ",";\n width: auto;\n align-self: end;\n padding: 4px;\n border-radius: 4px;\n "])),"v1"===i&&"#dff1ec")})),w=b.default(y)(p||(p=n.__makeTemplateObject(["\n justify-content: ",";\n margin-top: 0;\n"],["\n justify-content: ",";\n margin-top: 0;\n"])),(function(n){return n.showTotalLabel?"space-between":"flex-end"})),k=b.default.h3(m||(m=n.__makeTemplateObject(["\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n font-weight: 600;\n\n ","\n"],["\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n font-weight: 600;\n\n ","\n"])),(function(t){if(t.isSavingsHighlighted)return e.css(f||(f=n.__makeTemplateObject(["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n text-transform: uppercase;\n "],["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n text-transform: uppercase;\n "])))})),v=b.default.h3(u||(u=n.__makeTemplateObject(["\n margin: 0;\n font-size: 18px;\n line-height: 28px;\n font-weight: ",";\n\n ","\n"],["\n margin: 0;\n font-size: 18px;\n line-height: 28px;\n font-weight: ",";\n\n ","\n"])),(function(n){return n.theme.component.total.basicTotal.savings.amountFontWeight}),(function(t){if(t.isSavingsHighlighted)return e.css(g||(g=n.__makeTemplateObject(["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n "],["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n "])))})),z=b.default(i.Text)(h||(h=n.__makeTemplateObject(["\n font-size: 20px;\n"],["\n font-size: 20px;\n"]))),O=b.default.div(x||(x=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"]))),S=b.default.div(d||(d=n.__makeTemplateObject(["\n position: absolute;\n transform: translate(10px, -18px);\n"],["\n position: absolute;\n transform: translate(10px, -18px);\n"])));exports.Container=y,exports.Currency=j,exports.DiscountAmount=v,exports.DiscountText=k,exports.GrandTotal=T,exports.SavingsSvgContainer=O,exports.StarsContainer=S,exports.TotalContainer=w,exports.TotalLabel=z,exports.Wrapper=_;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),e=require("@emotion/react"),t=require("@emotion/styled"),i=require("../../text/Text.js");function o(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var a,r,l,s,c,f,p,g,m,u,h,x,d,b,y,_=o(t),T=_.default.div(a||(a=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"],["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"]))),j=_.default.h1(r||(r=n.__makeTemplateObject(["\n margin: 0;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 700;\n display: block;\n align-items: center;\n"],["\n margin: 0;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 700;\n display: block;\n align-items: center;\n"]))),w=_.default.span(l||(l=n.__makeTemplateObject(["\n margin: 0;\n margin-right: 0.625rem;\n font-weight: 600;\n color: ",";\n font-size: ",";\n line-height: ",";\n align-self: ",";\n"],["\n margin: 0;\n margin-right: 0.625rem;\n font-weight: 600;\n color: ",";\n font-size: ",";\n line-height: ",";\n align-self: ",";\n"])),(function(n){return n.theme.component.total.basicTotal.currency.color}),(function(n){return n.theme.component.total.basicTotal.currency.fontSize}),(function(n){return n.theme.component.total.basicTotal.currency.lineHeight}),(function(n){return n.theme.component.total.basicTotal.currency.alignSelf})),k=_.default.div(c||(c=n.__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.625rem;\n align-items: center;\n\n ","\n"],["\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.625rem;\n align-items: center;\n\n ","\n"])),(function(t){var i=t.highlightSavings;if(i)return e.css(s||(s=n.__makeTemplateObject(["\n justify-content: unset;\n gap: 0.5rem;\n background-color: ",";\n width: auto;\n align-self: end;\n padding: 4px;\n border-radius: 4px;\n "],["\n justify-content: unset;\n gap: 0.5rem;\n background-color: ",";\n width: auto;\n align-self: end;\n padding: 4px;\n border-radius: 4px;\n "])),"v1"===i&&"#dff1ec")})),v=_.default(k)(f||(f=n.__makeTemplateObject(["\n justify-content: ",";\n margin-top: 0;\n"],["\n justify-content: ",";\n margin-top: 0;\n"])),(function(n){return n.showTotalLabel?"space-between":"flex-end"})),z=_.default.div(p||(p=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n font-size: 18px;\n line-height: 28px;\n font-weight: ",";\n\n & > span:first-of-type {\n color: #ff4e30;\n }\n\n & > span:last-of-type {\n color: #44c676;\n }\n"],["\n display: flex;\n flex-direction: column;\n font-size: 18px;\n line-height: 28px;\n font-weight: ",";\n\n & > span:first-of-type {\n color: #ff4e30;\n }\n\n & > span:last-of-type {\n color: #44c676;\n }\n"])),(function(n){return n.theme.component.total.basicTotal.savings.amountFontWeight})),O=_.default.span(g||(g=n.__makeTemplateObject(["\n color: ",";\n"],["\n color: ",";\n"])),(function(n){return n.color})),S=_.default.h3(u||(u=n.__makeTemplateObject(["\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n font-weight: 600;\n color: ",";\n\n ","\n"],["\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n font-weight: 600;\n color: ",";\n\n ","\n"])),(function(n){var e=n.highlightColor;return n.isPrincingStyleTestEnabled?"#FF4E30":e}),(function(t){if(t.isSavingsHighlighted)return e.css(m||(m=n.__makeTemplateObject(["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n text-transform: uppercase;\n "],["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n text-transform: uppercase;\n "])))})),C=_.default.h3(x||(x=n.__makeTemplateObject(["\n margin: 0;\n font-size: 18px;\n line-height: 28px;\n font-weight: ",";\n\n text-decoration: ",";\n\n color: ",";\n\n ","\n"],["\n margin: 0;\n font-size: 18px;\n line-height: 28px;\n font-weight: ",";\n\n text-decoration: ",";\n\n color: ",";\n\n ","\n"])),(function(n){return n.theme.component.total.basicTotal.savings.amountFontWeight}),(function(n){return n.isPrincingStyleTestEnabled&&"line-through"}),(function(n){var e=n.isPrincingStyleTestEnabled,t=n.highlightColor;return e?"#FF4E30":t}),(function(t){if(t.isSavingsHighlighted)return e.css(h||(h=n.__makeTemplateObject(["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n "],["\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n "])))})),F=_.default(i.Text)(d||(d=n.__makeTemplateObject(["\n font-size: 20px;\n"],["\n font-size: 20px;\n"]))),P=_.default.div(b||(b=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"]))),E=_.default.div(y||(y=n.__makeTemplateObject(["\n position: absolute;\n transform: translate(10px, -18px);\n"],["\n position: absolute;\n transform: translate(10px, -18px);\n"])));exports.Container=k,exports.Currency=w,exports.DiscountAmount=C,exports.DiscountText=S,exports.GrandTotal=j,exports.PriceWrapper=O,exports.PricingStyledContainer=z,exports.SavingsSvgContainer=P,exports.StarsContainer=E,exports.TotalContainer=v,exports.TotalLabel=F,exports.Wrapper=T;
2
2
  //# sourceMappingURL=styled.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.8.2",
6
+ "version": "7.8.3",
7
7
  "private": false,
8
8
  "main": "build/lib/index.js",
9
9
  "style": "build/es/index.css",