@trafilea/afrodita-components 7.24.6 → 7.24.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es/components/collection/product/mobile/ProductItemMobile.js +1 -1
- package/build/es/components/dropdown/base/BaseDropdownButton.js +1 -1
- package/build/es/components/dropdown/base/BaseDropdownOption.js +1 -1
- package/build/es/components/icon-button/IconButton.js +1 -1
- package/build/es/components/organisms/ProductCard/ProductCardV1/ProductCard.js +1 -1
- package/build/es/components/organisms/ProductCard/ProductCardV2/ProductCardV2.js +1 -1
- package/build/es/components/organisms/ProductCard/ProductCardV3/ProductCardV3.js +1 -1
- package/build/es/components/organisms/ProductCard/utils.js +2 -0
- package/build/es/components/organisms/ProductCard/utils.js.map +1 -0
- package/build/es/components/pricing/priceLabelV2/PriceLabelTooltip.js +1 -1
- package/build/es/components/pricing/priceLabelV2/PriceLabelV2.js +1 -1
- package/build/es/components/pricing/priceLabelV3/PriceLabelV3.js +1 -1
- package/build/es/components/pricing/priceLabelV4/PriceLabelV4.js +1 -1
- package/build/es/components/pricing/priceLabelV5/PriceLabelV5.js +1 -1
- package/build/es/components/pricing/priceLabelV6/PriceLabelV6.js +1 -1
- package/build/es/components/pricing/priceLabelV6/PriceLabelV6Components.js +1 -1
- package/build/es/components/pricing/priceLabelV6/PriceLabelV6Tooltip.js +1 -1
- package/build/es/components/quantityPicker/QuantityPicker.js +1 -1
- package/build/es/components/tooltip/Styled.js +1 -1
- package/build/es/components/tooltip/Tooltip.js +1 -1
- package/build/index.d.ts +36 -5
- package/build/lib/components/collection/product/mobile/ProductItemMobile.js +1 -1
- package/build/lib/components/dropdown/base/BaseDropdownButton.js +1 -1
- package/build/lib/components/dropdown/base/BaseDropdownOption.js +1 -1
- package/build/lib/components/icon-button/IconButton.js +1 -1
- package/build/lib/components/organisms/ProductCard/ProductCardV1/ProductCard.js +1 -1
- package/build/lib/components/organisms/ProductCard/ProductCardV2/ProductCardV2.js +1 -1
- package/build/lib/components/organisms/ProductCard/ProductCardV3/ProductCardV3.js +1 -1
- package/build/lib/components/organisms/ProductCard/utils.js +2 -0
- package/build/lib/components/organisms/ProductCard/utils.js.map +1 -0
- package/build/lib/components/pricing/priceLabelV2/PriceLabelTooltip.js +1 -1
- package/build/lib/components/pricing/priceLabelV2/PriceLabelV2.js +1 -1
- package/build/lib/components/pricing/priceLabelV3/PriceLabelV3.js +1 -1
- package/build/lib/components/pricing/priceLabelV4/PriceLabelV4.js +1 -1
- package/build/lib/components/pricing/priceLabelV5/PriceLabelV5.js +1 -1
- package/build/lib/components/pricing/priceLabelV6/PriceLabelV6.js +1 -1
- package/build/lib/components/pricing/priceLabelV6/PriceLabelV6Components.js +1 -1
- package/build/lib/components/pricing/priceLabelV6/PriceLabelV6Tooltip.js +1 -1
- package/build/lib/components/quantityPicker/QuantityPicker.js +1 -1
- package/build/lib/components/tooltip/Styled.js +1 -1
- package/build/lib/components/tooltip/Tooltip.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),
|
|
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"),l=require("../../../hooks/WindowDimensions.js"),a=require("../../../utils/getCurrencySymbol/getCurrencySimbol.js"),t=require("../../../types/enums.js"),o=require("../discount/DiscountTag.js"),c=require("../priceLabelV6/utils/priceLabelAria.js"),s=require("../styles.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=d(n),u=p.default.span(v||(v=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"]))),g=p.default.span(h||(h=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=p.default.span(P||(P=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"]))),x=p.default.span(_||(_=e.__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"]))),b=p.default.span(S||(S=e.__makeTemplateObject(["\n display: flex;\n gap: 8px;\n"],["\n display: flex;\n gap: 8px;\n"]))),f=function(){return i.jsx(u,{children:"REGULAR PRICE"},void 0)},j=function(e){var n=e.label;return i.jsx(g,{children:n||"CLUB MEMBERS"},void 0)};function y(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return e.filter(Boolean).join("-")}var v,h,P,_,S;exports.PriceLabelV4=function(n){var d;n.finalPrice;var p=n.originalPrice,u=n.discount,g=n.color,v=n.testId,h=n.finalPriceStyled,P=void 0!==h&&h,_=n.finalPriceStyle,S=n.originalPriceStyled,z=void 0!==S&&S,L=n.originalPriceUnderlined,T=void 0===L||L,C=n.size,A=void 0===C?t.ComponentSize.Medium:C,k=n.clubStyle,q=void 0!==k&&k,w=n.styledPrice,O=void 0!==w&&w,M=n.clubPrice,D=n.finalPriceAriaLabel,E=n.originalPriceAriaLabel,I=n.discountAriaLabel,R=e.__rest(n,["finalPrice","originalPrice","discount","color","testId","finalPriceStyled","finalPriceStyle","originalPriceStyled","originalPriceUnderlined","size","clubStyle","styledPrice","clubPrice","finalPriceAriaLabel","originalPriceAriaLabel","discountAriaLabel"]),U=r.useTheme(),B=l.useWindowDimensions().isMobile,F=M,V=p&&p!==F,W="$";"string"==typeof F&&(W=a.getCurrencySymbol(F));var G="string"==typeof F&&F.includes(".")&&F.includes(W)?F.split(W)[1].split("."):["",""],X={size:P?t.ComponentSize.Small:A,color:g||U.colors.pallete.secondary.color,weight:700},$=c.getPriceLabelAriaTexts({productFinalPrice:F,originalPrice:p,currencySymbol:W,isOriginalPrice:!!V,finalPriceAriaLabel:D,originalPriceAriaLabel:E}),H=$.computedFinalPriceLabel,J=$.computedOriginalPriceLabel,K=function(){var n=q?B?t.ComponentSize.Small:t.ComponentSize.XSmall:z?A:t.ComponentSize.Small;return i.jsx(s.Price,e.__assign({size:n,color:U.component.pricing.priceLabel.price.originalPriceColor,underlined:T,"data-testid":y(v,"original-product-price"),"data-nosnippet":!0,theme:U,"aria-label":J},{children:p}),void 0)};return i.jsxs(s.Container,e.__assign({},R,{children:[q&&!O?i.jsxs(m,{children:[i.jsxs(b,{children:[i.jsx(K,{},void 0),i.jsx(f,{},void 0)]},void 0),i.jsxs(b,{children:[i.jsx(s.Price,e.__assign({margin:!0,"data-testid":y(v,"final-product-price")},X,{style:_,size:A,"aria-label":H},{children:M}),void 0),i.jsx(j,{label:U.label.member},void 0)]},void 0)]},void 0):i.jsxs(m,{children:[i.jsxs(b,{children:[i.jsx(K,{},void 0),i.jsx(f,{},void 0)]},void 0),i.jsxs(b,{children:[i.jsxs(x,e.__assign({"aria-label":H},{children:[i.jsx(s.Price,e.__assign({margin:!0,finalPriceStyledSmall:!0,style:{marginTop:"-5px",color:"#c64844"}},X,{size:A,"data-testid":y(v,"final-product-price"),"aria-hidden":"true"},{children:W}),void 0),i.jsxs(s.Price,e.__assign({finalPriceStyled:!0},X,{size:A,style:{color:"#c64844"},"aria-hidden":"true"},{children:[G[0]?G[0]:null===(d="".concat(F))||void 0===d?void 0:d.split(W)[1],"."]}),void 0),i.jsx(s.Price,e.__assign({finalPriceStyledSmall:!0,style:{marginTop:"-6px",color:"#c64844"}},X,{size:A,"aria-hidden":"true"},{children:G[1]?G[1]:"00"}),void 0)]}),void 0),i.jsx(j,{label:U.label.member},void 0)]},void 0)]},void 0),u&&i.jsx(s.TagContainer,e.__assign({size:A},{children:i.jsx(o.DiscountTag,e.__assign({},u,{size:A,ariaLabel:I}),void 0)}),void 0)]}),void 0)},exports.getTestId=y;
|
|
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"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("../../../core/theme/Theme.js"),a=require("../../../utils/getCurrencySymbol/getCurrencySimbol.js"),l=require("../../../types/enums.js"),n=require("../priceLabelV6/utils/priceLabelAria.js"),o=require("./PriceLabelV5.styled.js");function c(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return e.filter(Boolean).join("-")}var t=function(r){var a=r.theme,n=r.originalPriceUnderlined,t=r.testId,s=r.originalPrice,d=r.ariaLabel;return i.jsx(o.Price,e.__assign({size:l.ComponentSize.Small,color:a.colors.shades[450].color,underlined:n,"data-testid":c(t,"original-product-price"),"data-nosnippet":!0,theme:a,"aria-label":d},{children:s}),void 0)};exports.PriceLabelV5=function(s){var d=s.finalPrice,u=s.originalPrice;s.discount;var P=s.color,g=s.testId,b=s.finalPriceStyle,m=s.originalPriceUnderlined,p=void 0===m||m,L=s.size,f=void 0===L?l.ComponentSize.Medium:L,v=s.finalPriceAriaLabel,y=s.originalPriceAriaLabel,h=e.__rest(s,["finalPrice","originalPrice","discount","color","testId","finalPriceStyle","originalPriceUnderlined","size","finalPriceAriaLabel","originalPriceAriaLabel"]),j=r.useTheme(),_="$";"string"==typeof d&&(_=a.getCurrencySymbol(d));var x=u&&u!==d,S=n.getPriceLabelAriaTexts({productFinalPrice:d,originalPrice:u,currencySymbol:_,isOriginalPrice:!!x,finalPriceAriaLabel:v,originalPriceAriaLabel:y}),A=S.computedFinalPriceLabel,q=S.computedOriginalPriceLabel,z={size:f,color:null!=P?P:j.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":c(g,"final-product-price")},z,{style:b,size:f,"aria-label":A},{children:d}),void 0),!!u&&i.jsx(t,{theme:j,originalPriceUnderlined:p,testId:g,originalPrice:u,ariaLabel:q},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 i=require("tslib"),e=require("react/jsx-runtime"),o=require("../../../core/theme/Theme.js");require("react");var r=require("../../../hooks/WindowDimensions.js"),a=require("../../../types/enums.js"),t=require("../styles.js"),l=require("./PriceLabelV6Components.js"),n=require("./utils/priceParsing.js"),s=require("./utils/priceLabelAria.js"),c=require("./utils/savingsRounding.js");exports.PriceLabelV6=function(d){var u=d.finalPrice,
|
|
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"),a=require("../../../types/enums.js"),t=require("../styles.js"),l=require("./PriceLabelV6Components.js"),n=require("./utils/priceParsing.js"),s=require("./utils/priceLabelAria.js"),c=require("./utils/savingsRounding.js");exports.PriceLabelV6=function(d){var u=d.finalPrice,p=d.originalPrice,P=d.discount,b=d.clubOffer,g=d.color,v=d.testId,m=d.originalPriceStyled,y=void 0!==m&&m,L=d.originalPriceUnderlined,S=void 0===L||L,f=d.size,h=void 0===f?a.ComponentSize.Small:f,j=d.bordersRounded,x=void 0!==j&&j,z=d.savingsDisplay,A=void 0===z||z,I=d.pricePerItem,D=d.hasRoundedSavings,T=void 0===D||D,q=d.showDecimals,O=void 0===q||q,w=d.tooltipText,C=d.tooltipIcon,H=d.tooltipPosition,_=d.tooltipAriaLabel,R=d.hasHorizontalLayout,M=void 0!==R&&R,V=d.isMobile,F=void 0!==V&&V,U=d.finalPriceAriaLabel,W=d.originalPriceAriaLabel,k=d.discountAriaLabel,B=i.__rest(d,["finalPrice","originalPrice","discount","clubOffer","color","testId","originalPriceStyled","originalPriceUnderlined","size","bordersRounded","savingsDisplay","pricePerItem","hasRoundedSavings","showDecimals","tooltipText","tooltipIcon","tooltipPosition","tooltipAriaLabel","hasHorizontalLayout","isMobile","finalPriceAriaLabel","originalPriceAriaLabel","discountAriaLabel"]),E=o.useTheme(),G=r.useWindowDimensions().isMobile,J=I||u,K=p!==J,N=p&&K,Q=!(!P||!K),X=!(!b||!K),Y=n.extractCurrencySymbol(J),Z=n.splitPriceIntoParts("string"==typeof J?J:"",Y),$={size:a.ComponentSize.Small,color:X?"var(--colors-pallete-wine-color)":g||E.colors.pallete.secondary.color,weight:700},ii=n.calculateSavings(p||0,J,Y),ei=c.applyRoundedSavings(ii,T),oi=c.formatSavingsToString(ei),ri=s.getPriceLabelAriaTexts({productFinalPrice:J,originalPrice:p,currencySymbol:Y,isOriginalPrice:!!N,finalPriceAriaLabel:U,originalPriceAriaLabel:W}),ai=ri.computedFinalPriceLabel,ti=ri.computedOriginalPriceLabel;return M?e.jsx(t.HorizontalVariantContainer,i.__assign({},B,{id:"priceLabelV6"},{children:e.jsxs(t.HorizontalVariantRow,i.__assign({"data-testid":"horizontal-variant-row"},{children:[e.jsx(l.PriceSection,{testId:v,priceCommonProps:$,size:h,currencySymbol:Y,finalPriceArray:Z,productFinalPrice:J,showDecimals:O,pricePerItem:I,theme:E,isHorizontalLayout:M,ariaLabel:ai},void 0),N&&e.jsx(l.OriginalPriceSection,{originalPrice:p,originalPriceStyled:y,originalPriceUnderlined:S,size:h,testId:v,theme:E,hasHorizontalLayout:M,ariaLabel:ti},void 0),e.jsx(l.TooltipSection,{tooltipText:w,tooltipIcon:C,tooltipPosition:H,isMobile:null!=F?F:G,tooltipAriaLabel:_},void 0),e.jsx(l.TagsSection,{isDiscount:Q,discount:P,bordersRounded:x,savingsDisplay:A,currencySymbol:Y,savetoString:oi,isHorizontalLayout:M,isClubOffer:X,clubOffer:b,discountAriaLabel:k},void 0)]}),void 0)}),void 0):e.jsxs(t.Container,i.__assign({},B,{id:"priceLabelV6"},{children:[N&&e.jsx(l.OriginalPriceSection,{originalPrice:p,originalPriceStyled:y,originalPriceUnderlined:S,size:h,testId:v,theme:E,hasHorizontalLayout:M,ariaLabel:ti},void 0),e.jsx(l.TooltipSection,{tooltipText:w,tooltipIcon:C,tooltipPosition:H,isMobile:null!=F?F:G,tooltipAriaLabel:_},void 0),e.jsx(l.PriceSection,{testId:v,priceCommonProps:$,size:h,currencySymbol:Y,finalPriceArray:Z,productFinalPrice:J,showDecimals:O,pricePerItem:I,theme:E,isHorizontalLayout:M,ariaLabel:ai},void 0),e.jsx(l.TagsSection,{isDiscount:Q,discount:P,bordersRounded:x,savingsDisplay:A,currencySymbol:Y,savetoString:oi,isHorizontalLayout:M,isClubOffer:X,clubOffer:b,discountAriaLabel:k},void 0)]}),void 0)};
|
|
2
2
|
//# sourceMappingURL=PriceLabelV6.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("../../../types/enums.js"),o=require("../clubOffer/ClubOfferTag.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("../../../types/enums.js"),o=require("../clubOffer/ClubOfferTag.js"),t=require("../discount/DiscountTag.js"),n=require("../price/PriceLabel.js"),a=require("../styles.js"),s=require("./PriceLabelV6.styled.js"),l=require("./PriceLabelV6Tooltip.js"),c=require("./utils/eventHandlers.js");exports.OriginalPriceSection=function(o){var t=o.originalPrice,s=o.originalPriceStyled,l=o.originalPriceUnderlined,c=o.size,d=o.testId,p=o.theme,u=o.hasHorizontalLayout,g=o.ariaLabel;return i.jsx(a.Price,e.__assign({size:s?c:r.ComponentSize.Small,color:p.component.pricing.priceLabel.price.originalPriceColor||p.colors.shades[300].color,margin:!0,underlined:l,"data-testid":n.getTestId(d,"original-product-price"),"data-nosnippet":!0,style:u?{fontSize:"12px"}:void 0,"aria-label":g},{children:t}),void 0)},exports.PriceSection=function(o){var t=o.testId,s=o.priceCommonProps,l=o.size,c=o.currencySymbol,d=o.finalPriceArray,p=o.productFinalPrice,u=o.showDecimals,g=o.pricePerItem,S=o.theme,m=o.isHorizontalLayout,x=void 0!==m&&m,z=o.ariaLabel,_=x?e.__assign(e.__assign({},s),{size:r.ComponentSize.Small,style:{fontSize:"14px"}}):s;return i.jsxs(a.FinalPriceStyledContainer,e.__assign({"data-testid":n.getTestId(t,"final-product-price"),"aria-label":z},{children:[i.jsx(a.Price,e.__assign({margin:!0,finalPriceStyledSmall:!x},_,{size:x?r.ComponentSize.Small:l,"aria-hidden":"true"},{children:c}),void 0),i.jsx(a.Price,e.__assign({finalPriceStyled:!x},_,{size:x?r.ComponentSize.Small:l,"aria-hidden":"true"},{children:d[0]||("string"==typeof p&&p.includes(c)?"".concat(p).split(c)[1]:"".concat(p))}),void 0),u&&i.jsxs(a.Price,e.__assign({finalPriceStyledSmall:!x,style:x?{fontSize:"14px"}:{marginTop:"-6px"}},_,{size:x?r.ComponentSize.Small:l,"aria-hidden":"true"},{children:[x&&".",d[1]?d[1]:"00"]}),void 0),g&&i.jsx(a.Price,e.__assign({size:r.ComponentSize.Small,color:S.colors.pallete.secondary.color,"aria-hidden":"true"},{children:"/each"}),void 0)]}),void 0)},exports.TagsSection=function(n){var s=n.isDiscount,l=n.discount,c=n.bordersRounded,d=n.savingsDisplay,p=n.currencySymbol,u=n.savetoString,g=n.isHorizontalLayout,S=void 0!==g&&g,m=n.isClubOffer,x=n.clubOffer,z=n.discountAriaLabel;return i.jsxs(i.Fragment,{children:[s&&i.jsx(a.TagContainer,e.__assign({size:r.ComponentSize.Small},{children:l&&i.jsx(t.DiscountTag,e.__assign({},l,{size:r.ComponentSize.Medium,style:e.__assign({letterSpacing:"-0.05rem"},S&&{fontSize:"12px"}),bordersRounded:c,savings:d?"Save ".concat(p).concat(u):void 0,ariaLabel:z}),void 0)}),void 0),m&&i.jsx(a.TagContainer,e.__assign({size:r.ComponentSize.Medium},{children:x&&i.jsx(o.ClubOfferTag,e.__assign({},x,{size:r.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(r){var o=r.tooltipText,t=r.tooltipIcon,n=r.tooltipPosition,a=r.isMobile,d=r.tooltipAriaLabel;if(!o)return null;var p=c.createStopPropagationHandlers();return i.jsx(s.TooltipWrapper,e.__assign({"data-testid":"PriceLabelV6-TooltipWrapper"},p,{children:i.jsx(l.PriceLabelV6Tooltip,{tooltipText:o,tooltipIcon:t,tooltipPosition:n,isMobile:a,tooltipAriaLabel:d},void 0)}),void 0)};
|
|
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");require("../../../core/theme/Theme.js"),require("react");var o=require("../../../types/enums.js");require("../clubOffer/ClubOfferTag.js"),require("../discount/styled.js");var r=require("../styles.js"),t=require("./utils/eventHandlers.js"),s=require("../../tooltip/Tooltip.js");require("../../atoms/PriceLabel/PriceLabel.js"),require("../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js"),require("../../atoms/HorizontalDivider/HorizontalDivider.js");var l=require("../../atoms/Icon/Icon.js");require("../../atoms/Image/styled.js"),require("../../atoms/PriceLabelV2/PriceLabelV2.js"),require("../../atoms/Toggle/toggle.styled.js");exports.PriceLabelV6Tooltip=function(a){var n=a.tooltipText,u=a.tooltipIcon,c=a.tooltipPosition,d=a.isMobile,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime");require("../../../core/theme/Theme.js"),require("react");var o=require("../../../types/enums.js");require("../clubOffer/ClubOfferTag.js"),require("../discount/styled.js");var r=require("../styles.js"),t=require("./utils/eventHandlers.js"),s=require("../../tooltip/Tooltip.js");require("../../atoms/PriceLabel/PriceLabel.js"),require("../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js"),require("../../atoms/HorizontalDivider/HorizontalDivider.js");var l=require("../../atoms/Icon/Icon.js");require("../../atoms/Image/styled.js"),require("../../atoms/PriceLabelV2/PriceLabelV2.js"),require("../../atoms/Toggle/toggle.styled.js");exports.PriceLabelV6Tooltip=function(a){var n=a.tooltipText,u=a.tooltipIcon,c=a.tooltipPosition,d=a.isMobile,b=a.borderColor,p=void 0===b?"#EAEAEA":b,j=a.tooltipAriaLabel,m=t.createStopPropagationHandlers(),q=null!=j?j:n;return i.jsx(r.TooltipContainer,e.__assign({"data-testid":"tooltip-container"},m,{children:i.jsx("div",e.__assign({},m,{children:i.jsx(s.Tooltip,e.__assign({showCloseIcon:!0,withArrow:!0,content:{text:n},position:null!=c?c:o.ComponentPosition.BottomRight,closeBtnSize:.7,borderColor:p,"data-testid":"tooltip",triggerAriaLabel:q,enableKeyboardToggle:!0},{children:i.jsx(l.Icon,{name:null!=u?u:"actions/circle_info",fill:"#8C8383",width:.8,height:.8,testId:"tooltip-icon",showTooltipTitle:d},void 0)}),void 0)}),void 0)}),void 0)};
|
|
2
2
|
//# sourceMappingURL=PriceLabelV6Tooltip.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),n=require("react"),i=require("../../core/theme/Theme.js"),t=require("./styled.js");exports.QuantityPicker=function(a){var o=a.initialValue,u=void 0===o?0:o,s=a.maxValue,c=void 0===s?99:s,l=a.value,d=a.testId,b=void 0===d?"quantity-picker":d,f=a.onChange,y=a.isOutlined,v=void 0!==y&&y,h=a.increaseIcon,m=a.decreaseIcon,q=a.increaseAriaLabel,x=a.decreaseAriaLabel,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),n=require("react"),i=require("../../core/theme/Theme.js"),t=require("./styled.js");exports.QuantityPicker=function(a){var o=a.initialValue,u=void 0===o?0:o,s=a.maxValue,c=void 0===s?99:s,l=a.value,d=a.testId,b=void 0===d?"quantity-picker":d,f=a.onChange,y=a.isOutlined,v=void 0!==y&&y,h=a.increaseIcon,m=a.decreaseIcon,q=a.increaseAriaLabel,x=a.decreaseAriaLabel,p=a.quantityAriaLabel,k=a.groupAriaDescribedBy,C=i.useTheme(),_=n.useState(null!=l?l:u),j=_[0],I=_[1],D="".concat(b,"-value"),g=(null!=l?l:j)>=c,R=[D,k].filter(Boolean).join(" "),O=function(e,r){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),r())};n.useEffect((function(){f&&f(j)}),[f,j]);var P=n.useCallback((function(e){return Math.max(Math.min(e,c),u)}),[c,u]);return n.useEffect((function(){I((function(e){return null==l?e:P(l)}))}),[l,P]),r.jsxs(t.Container,e.__assign({borderColor:C.colors.shades[200].color,color:C.colors.shades[700].color,"data-testid":b,borderRadius:C.component.qtyPicker.borderRadius,isOutlined:v},{children:[r.jsx(t.IncreaseDecrease,e.__assign({"data-testid":"".concat(b,"-minus"),onClick:function(){return I((function(e){return P(e-1)}))},isOutlined:v,borderColor:C.colors.shades[200].color,borderRadius:C.component.qtyPicker.borderRadius,role:"button",tabIndex:0,onKeyDown:function(e){return O(e,(function(){return I((function(e){return P(e-1)}))}))},"aria-label":null!=x?x:"Decrease quantity","aria-controls":D,"aria-describedby":R},{children:v?m:"-"}),void 0),r.jsx(t.NumberContainer,e.__assign({id:D,"aria-live":"polite","aria-atomic":"true","aria-label":null!=p?p:"Current quantity"},{children:j}),void 0),r.jsx(t.IncreaseDecrease,e.__assign({isMaxSelected:g,"data-testid":"".concat(b,"-plus"),onClick:function(){return I((function(e){return P(e+1)}))},isOutlined:v,borderColor:C.colors.shades[200].color,borderRadius:C.component.qtyPicker.borderRadius,isIncrease:!0,role:"button",tabIndex:g?-1:0,onKeyDown:function(e){return O(e,(function(){return I((function(e){return P(e+1)}))}))},"aria-label":null!=q?q:"Increase quantity","aria-controls":D,"aria-describedby":R,"aria-disabled":g},{children:v?h:"+"}),void 0)]}),void 0)};
|
|
2
2
|
//# sourceMappingURL=QuantityPicker.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),t=require("@emotion/styled"),e=require("../../types/enums.js"),o=require("./utils.js");function i(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var r,a,l,p,m,s,c,d
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),t=require("@emotion/styled"),e=require("../../types/enums.js"),o=require("./utils.js");function i(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var r,a,l,p,m,s,c,u,d=i(t),g=d.default.div(r||(r=n.__makeTemplateObject(["\n display: flex;\n flex-direction: ",";\n align-items: center;\n cursor: pointer;\n\n &:hover {\n .tooltip-container {\n visibility: ",";\n opacity: ",";\n cursor: text;\n }\n }\n"],["\n display: flex;\n flex-direction: ",";\n align-items: center;\n cursor: pointer;\n\n &:hover {\n .tooltip-container {\n visibility: ",";\n opacity: ",";\n cursor: text;\n }\n }\n"])),(function(n){var t=n.position;return o.getWrapperFlexDirection(t)}),(function(n){return n.disableHover?"hidden":"visible"}),(function(n){return n.disableHover?0:1})),f=d.default.div(a||(a=n.__makeTemplateObject(["\n position: absolute;\n display: flex;\n flex-direction: ",";\n align-items: ",";\n margin-left: ",";\n margin-right: ",";\n margin-top: ",";\n margin-bottom: ",";\n max-width: ",";\n transition: opacity 0.2s ease;\n userselect: none;\n opacity: 0;\n visibility: hidden;\n ","\n ","\n\n ","\n"],["\n position: absolute;\n display: flex;\n flex-direction: ",";\n align-items: ",";\n margin-left: ",";\n margin-right: ",";\n margin-top: ",";\n margin-bottom: ",";\n max-width: ",";\n transition: opacity 0.2s ease;\n userselect: none;\n opacity: 0;\n visibility: hidden;\n ","\n ","\n\n ","\n"])),(function(n){var t=n.position;return o.getContainerFlexDirection(t)}),(function(n){var t=n.position,e=n.align;return o.getTooltipAlignItems(t,e)}),(function(n){var t=n.position,o=n.childrenWidth;return x(t,e.ComponentPosition.Right,"".concat(o,"px"))}),(function(n){var t=n.position,o=n.childrenWidth;return x(t,e.ComponentPosition.Left,"".concat(o,"px"))}),(function(n){var t=n.position,o=n.tooltipHeight;return x(t,e.ComponentPosition.Top,"-".concat(o,"px"))}),(function(n){var t=n.position,o=n.tooltipHeight;return x(t,e.ComponentPosition.Bottom,"-".concat(o,"px"))}),(function(n){var t=n.maxWidth;return t||"none"}),(function(n){return n.forceVisible&&"\n opacity: 1;\n visibility: visible;\n "}),(function(n){return n.position===e.ComponentPosition.BottomRight&&"@media (max-width: 768px) {\n margin-left: -12px;\n }"}),(function(n){var t=n.position,e=n.borderColor,i=n.backgroundColor;return n.withArrow&&o.getArrowStyles(t,e,i)})),x=function(n,t,o){return n!==e.ComponentPosition.BottomLeft&&n!==e.ComponentPosition.BottomRight||t!==e.ComponentPosition.Bottom?n===e.ComponentPosition.BottomRight&&t===e.ComponentPosition.Right?"-30px":n===e.ComponentPosition.BottomLeft&&t===e.ComponentPosition.Left?"-40px":n===t?o:"0":"calc(".concat(o," - 37px)")},h=d.default.div(l||(l=n.__makeTemplateObject(["\n border: 0.063rem solid ",";\n padding: 0.563rem 0.75rem;\n border-radius: 0.5rem;\n background-color: ",";\n z-index: 999;\n position: relative;\n box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);\n z-index: 1;\n"],["\n border: 0.063rem solid ",";\n padding: 0.563rem 0.75rem;\n border-radius: 0.5rem;\n background-color: ",";\n z-index: 999;\n position: relative;\n box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);\n z-index: 1;\n"])),(function(n){return n.borderColor}),(function(n){return n.backgroundColor})),b=d.default.div(p||(p=n.__makeTemplateObject(["\n font-style: normal;\n font-weight: normal;\n font-size: 0.875rem;\n line-height: 1.125rem;\n margin: 0;\n text-align: ",";\n max-width: ",";\n color: ",";\n"],["\n font-style: normal;\n font-weight: normal;\n font-size: 0.875rem;\n line-height: 1.125rem;\n margin: 0;\n text-align: ",";\n max-width: ",";\n color: ",";\n"])),(function(n){return n.theme.component.autoship.tooltip.text.alignment}),(function(n){var t=n.theme,e=n.maxWidth;return null!=e?e:t.component.autoship.tooltip.text.maxWidth}),(function(n){return n.color})),v=d.default.div(m||(m=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 0.688rem;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 0.688rem;\n"]))),y=d.default.p(s||(s=n.__makeTemplateObject(["\n font-size: 0.875rem;\n font-weight: 600;\n line-height: 1.375rem;\n margin: 0;\n color: ",";\n"],["\n font-size: 0.875rem;\n font-weight: 600;\n line-height: 1.375rem;\n margin: 0;\n color: ",";\n"])),(function(n){return n.color})),C=d.default.div(c||(c=n.__makeTemplateObject(["\n width: 1.375rem;\n height: 1.125rem;\n margin-right: 0.563rem;\n"],["\n width: 1.375rem;\n height: 1.125rem;\n margin-right: 0.563rem;\n"]))),_=d.default.button(u||(u=n.__makeTemplateObject(["\n position: absolute;\n background: none;\n border: none;\n cursor: pointer;\n right: ",";\n top: 0.25rem;\n padding: 0px;\n z-index: 2;\n"],["\n position: absolute;\n background: none;\n border: none;\n cursor: pointer;\n right: ",";\n top: 0.25rem;\n padding: 0px;\n z-index: 2;\n"])),(function(n){var t=n.right;return void 0===t?".3rem":t}));exports.CloseToolTip=_,exports.ContentWrapper=h,exports.IconContainer=C,exports.Title=y,exports.TooltipContainer=f,exports.TooltipText=b,exports.TopSection=v,exports.Wrapper=g;
|
|
2
2
|
//# sourceMappingURL=Styled.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("tslib"),e=require("react/jsx-runtime"),i=require("react"),t=require("../../core/theme/Theme.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("tslib"),e=require("react/jsx-runtime"),i=require("react"),t=require("../../core/theme/Theme.js"),l=require("../../hooks/WindowDimensions.js"),n=require("../icons/index.js"),r=require("./Styled.js"),s=require("./utils.js");function d(o){return o&&"object"==typeof o&&"default"in o?o:{default:o}}var a=d(i),c=0;exports.Tooltip=function(d){var u,v,f,p=d.children,h=d.position,g=d.content,x=d.elementContent,C=d.backgroundColor,b=d.borderColor,T=d.showCloseIcon,y=d.align,j=void 0===y?"center":y,_=d.maxWidth,m=d.onClick,k=d.header,w=d.withArrow,I=void 0!==w&&w,W=d.closeBtnSize,q=void 0===W?.5:W,E=d.triggerAriaLabel,S=d.tooltipId,D=d.enableKeyboardToggle,H=void 0!==D&&D,R=t.useTheme(),M=i.useState(0),A=M[0],L=M[1],F=i.useRef(null),K=i.useRef(null),B=i.useState(0),N=B[0],z=B[1],O=i.useRef(null),P=i.useState(!1),V=P[0],G=P[1],J=i.useState(!1),Q=J[0],U=J[1],X=i.useRef(null);null==X.current&&(X.current=null!=S?S:"afrodita-tooltip-".concat(++c));var Y=l.useWindowDimensions().isMobile;i.useLayoutEffect((function(){var o=K.current;L((null==o?void 0:o.offsetWidth)||0)}),[]),i.useLayoutEffect((function(){var o=O.current;z((null==o?void 0:o.offsetHeight)||0)}),[]);return e.jsxs(r.Wrapper,o.__assign({ref:F,position:h,disableHover:V,onMouseEnter:function(){return G(V&&!1)},"data-testid":"TooltipWrapper",onBlur:function(o){var e;if(H){var i=o.relatedTarget;i&&(null===(e=F.current)||void 0===e?void 0:e.contains(i))||U(!1)}}},{children:[e.jsx("div",o.__assign({ref:K,onClick:function(){return V&&G(!1)},onKeyDown:function(o){"Enter"===o.key&&V&&G(!1),function(o){if(H)"Enter"===o.key||" "===o.key?(o.preventDefault(),V&&G(!1),U((function(o){return!o}))):"Escape"===o.key&&(o.preventDefault(),U(!1))}(o)},role:"button",tabIndex:0,"aria-label":E,"aria-describedby":Q&&null!==(u=X.current)&&void 0!==u?u:void 0,"aria-expanded":H?Q:void 0},{children:p}),void 0),e.jsxs(r.TooltipContainer,o.__assign({position:h,align:j,maxWidth:_,childrenWidth:A,tooltipHeight:N,ref:O,onClick:m,"data-testid":"TooltipContainer",className:"tooltip-container ".concat(V?"hidden":""),borderColor:b||R.colors.shades[200].color,backgroundColor:C||R.colors.shades.white.color,withArrow:I,"data-position":h,forceVisible:Q,role:"tooltip",id:null!==(v=X.current)&&void 0!==v?v:void 0,"aria-hidden":H?!Q:void 0,onKeyDown:function(o){var e;H&&"Escape"===o.key&&(o.preventDefault(),U(!1),null===(e=K.current)||void 0===e||e.focus())}},{children:[(T||Y)&&e.jsx(r.CloseToolTip,o.__assign({right:s.getCloseIconRight(h,null==k?void 0:k.iconRight),onClick:function(){G(!0),U(!1)}},{children:e.jsx(n.Icon.Actions.Close,{width:q,height:q,fill:null!==(f=null==k?void 0:k.iconFill)&&void 0!==f?f:R.colors.pallete.secondary.color},void 0)}),void 0),e.jsxs(r.ContentWrapper,o.__assign({className:"tooltip-wrapper",borderColor:b||R.colors.shades[200].color,backgroundColor:null!=C?C:R.colors.shades.white.color},{children:[k&&e.jsxs(r.TopSection,o.__assign({"data-testid":"TooltipHeader"},{children:[(null==k?void 0:k.Icon)&&e.jsx(r.IconContainer,{children:a.default.createElement(k.Icon,{testId:"HeaderIcon",fill:(null==k?void 0:k.iconFill)?null==k?void 0:k.iconFill:R.colors.pallete.secondary.color})},void 0),e.jsx(r.Title,o.__assign({color:(null==k?void 0:k.titleColor)?null==k?void 0:k.titleColor:R.colors.pallete.secondary.color},{children:k.title}),void 0)]}),void 0),g&&(null==g?void 0:g.text)?e.jsx(r.TooltipText,{color:(null==g?void 0:g.color)?null==g?void 0:g.color:R.colors.pallete.secondary.color,"data-testid":"TooltipText",dangerouslySetInnerHTML:{__html:g.text},maxWidth:s.getTooltipTextMaxWidth(h)},void 0):x]}),void 0)]}),void 0)]}),void 0)};
|
|
2
2
|
//# sourceMappingURL=Tooltip.js.map
|
package/package.json
CHANGED