@trafilea/afrodita-components 7.9.3 → 7.10.0
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/gallery/ProductGallery.js +1 -1
- package/build/es/components/gallery/components/ImagePreviewList/ImagePreviewList.js +1 -1
- package/build/es/components/gallery/components/ImagePreviewList/styled.js +1 -1
- package/build/es/components/gallery/components/ImageProductSlide/ImageProductSlide.js +1 -1
- package/build/es/components/molecules/Video/Video.js +1 -1
- package/build/es/components/organisms/AutoshipPdpCard/AutoshipPdpCard.js +1 -1
- package/build/es/components/organisms/OfferAtCartV2/OfferAtCartV2.js +1 -1
- package/build/es/components/organisms/OfferAtCartV4/OfferAtCartV4.js +1 -1
- package/build/es/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/ImageProductSlide.js +1 -1
- package/build/es/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js +1 -1
- package/build/es/components/organisms/ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/index.js +1 -1
- package/build/es/components/organisms/SubscriptionPlanSelector/SubscriptionPlanSelector.js +1 -1
- package/build/es/components/organisms/TwoCtasAtCart/TwoCtasAtCart.js +1 -1
- package/build/es/components/pricing/price/PriceLabel.js +1 -1
- package/build/es/components/pricing/styles.js +1 -1
- package/build/es/components/product/order/item/SimpleOrderItem.js +1 -1
- package/build/es/components/totals/total/styled.js +1 -1
- package/build/index.d.ts +11 -1
- package/build/lib/components/collection/product/mobile/ProductItemMobile.js +1 -1
- package/build/lib/components/gallery/ProductGallery.js +1 -1
- package/build/lib/components/gallery/components/ImagePreviewList/ImagePreviewList.js +1 -1
- package/build/lib/components/gallery/components/ImagePreviewList/styled.js +1 -1
- package/build/lib/components/gallery/components/ImageProductSlide/ImageProductSlide.js +1 -1
- package/build/lib/components/molecules/Video/Video.js +1 -1
- package/build/lib/components/organisms/AutoshipPdpCard/AutoshipPdpCard.js +1 -1
- package/build/lib/components/organisms/OfferAtCartV2/OfferAtCartV2.js +1 -1
- package/build/lib/components/organisms/OfferAtCartV4/OfferAtCartV4.js +1 -1
- package/build/lib/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/ImageProductSlide.js +1 -1
- package/build/lib/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js +1 -1
- package/build/lib/components/organisms/ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/index.js +1 -1
- package/build/lib/components/organisms/SubscriptionPlanSelector/SubscriptionPlanSelector.js +1 -1
- package/build/lib/components/organisms/TwoCtasAtCart/TwoCtasAtCart.js +1 -1
- package/build/lib/components/pricing/price/PriceLabel.js +1 -1
- package/build/lib/components/pricing/styles.js +1 -1
- package/build/lib/components/product/order/item/SimpleOrderItem.js +1 -1
- package/build/lib/components/totals/total/styled.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as t,jsx as i,Fragment as r}from"react/jsx-runtime";import{useState as o,useEffect as s,useCallback as l,useMemo as c,Children as a,isValidElement as n,cloneElement as d}from"react";import{ComponentSize as m}from"../../../types/enums.js";import"../../../utils/constants/offerAtCart.js";import{decimalFormat as p}from"../../../utils/decimalParser/decimalParser.js";import"../../../utils/media.js";import"../../../utils/mock-content/CancellationFlowAccordion.js";import{Text as u}from"../../text/Text.js";import{Icon as b}from"../../icons/index.js";import{RadioInput as j}from"../../radio/input/radio.js";import{Tooltip as y}from"../../tooltip/Tooltip.js";import"../../PackSelectorV2/PackSelectoV2.js";import"../../absorbency-level/AbsorbencyLevel.js";import"../../accordion-options/AccordionOptions.js";import"../../accordion/Accordion.js";import"../../../core/theme/Theme.js";import"../../dropdown/variants/simple/SimpleDropdown.js";import"../../autoship/styled.js";import"../../autoshipV2/styled.js";import"../../before-after/BeforeAfter.js";import"../../pricing/clubOffer/ClubOfferTag.js";import"../../pricing/discount/styled.js";import"../../pricing/styles.js";import"../../atoms/PriceLabel/PriceLabel.js";import"../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../../atoms/HorizontalDivider/HorizontalDivider.js";import"../../atoms/Icon/Icon.js";import"../../atoms/Image/styled.js";import"../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../atoms/Toggle/toggle.styled.js";import"../../pricing/priceLabelV3/PriceLabelV3.js";import"../../pricing/priceLabelV5/PriceLabelV5.styled.js";import"../../pricing/priceLabelV6/PriceLabelV6.styled.js";import"../../shared/card/Card.js";import"../../bundle/minimalistic/styled.js";import"../../bundle/motivator/styled.js";import"../../bundle/simple/Simple.js";import"../../buynowpaylater/BuyNowPayLater.js";import"../../offer-banner/OfferBanner.js";import"../../cartProductItem/CloseIcon/CloseButton.js";import"../../cartProductItem/Description/Description.js";import"../../cartProductItem/Promo/Promo.js";import"../../cartProductItem/Title/Title.js";import"../../cartProductItem/TrashIcon/styled.js";import"../../checkbox/Checkbox.js";import"../../collection/grid/WithProductGrid.js";import"@emotion/react/jsx-runtime";import"../../SkeletonBox/SkeletonBox.js";import"../../club-price-label/ClubPriceLabel.js";import"../../strength-bars/StrengthBars.js";import"../../pricing/priceLabelV4/PriceLabelV4.js";import"../../rating/starList/StarList.js";import"../../rating/styles.js";import"../../collection/product/mobile/styled.js";import"../../icon-button/IconButton.js";import"../../tag/variants/product/styled.js";import"../../collection/product/truekind/styled.js";import"../../color/ColorRadioGroup.js";import"../../color/selector/PatternSelector.js";import"../../color/styles/ColorPickerwithTootip.styled.js";import"../../cross-sell/Checkbox/CrossSellCheckbox.js";import"../../cta/styled.js";import"../../delivery-details/DeliveryDetails.js";import"../../delivery-details/Note/Note.js";import"../../drawer/style.js";import"../../dropdown-list-icons/Styled.js";import"../../dropdown/size-dropdown/Styled.js";import"../../dropdown/variants/dialog/DropdownDialog.js";import"../../dropdown/base/BaseDropdown.js";import"@headlessui/react";import"../../input/base/Error.js";import"../../shared/select/BaseSelect.js";import"../../dropdown/variants/smart/styled.js";import"../../filtering/Accordion.js";import"../../filtering/FiltersStyled.js";import"../../filtering/Tags/Tags.js";import"../../fit-guarantee/FitGuarantee.js";import"../../fit/FitPredictor.js";import"../../slider/ArrowButton.js";import"../../slider/StyledSlider.js";import"../../gallery/components/ImageSmallPreview/styled.js";import"../../gallery/components/ImagePreviewList/styled.js";import"../../molecules/Video/components/styled.js";import"../../molecules/Video/styled.js";import"../../gallery/components/ImageProductSlide/styled.js";import"../../gallery/styled.js";import"../../icon-button/amazonAndPaypal/AmazonPaypalButtons.js";import"../../iconsWithTitle/index.js";import"../../image-card/ImageCard.js";import"../../input/label/Label.js";import"../../input/base/Styled.js";import"../../input/custom/Custom.js";import"../../input/basePlusButton/BasePlusButton.js";import"../../input/basePlusIcon/BasePlusIcon.js";import"../../modal/Modal.js";import"../../motivator-progress-bar/MotivatorProgressBar.js";import"../../order-bar/OrderBar.js";import"../../packs/selector/PackSelector.js";import"../../pagination/styles.js";import"../../payment-methods/PaymentMethod.js";import"../../product/order/item/SimpleOrderItem.js";import"../../progress-bar/ProgressBar.js";import"../../quantityPicker/styled.js";import"../../radio/RadioPrimary/radioPrimary.js";import"../../radio/clubRadioInput/clubRadio.js";import"../../review-detail/ReviewDetail.js";import"../../review/Review.js";import"../../reviews-header/ReviewsHeader.js";import"../../scroll-to-top/ScrollToTop.js";import"../../search-bar/components/ClearButton/styled.js";import"../../search-bar/components/Footer/styled.js";import"../../search-bar/components/ProductItem/styled.js";import"../../search-bar/components/ResultsPanel/styled.js";import"../../search-bar/components/SearchControl/styled.js";import"../../search-bar/styled.js";import"../../search-navigation/styled.js";import"react-dom";import"../../short-banner/ShortBanner.js";import"../../size-chart/styled.js";import"../../size-table/SizeTable.js";import"../../size/guide/SizeFitGuide.js";import"../../size/selector/styled.js";import"../../tabs/Tab.js";import"../../tabs/Tabs.js";import"../../tag/Tag.js";import"@emotion/react";import"../../textWithImage/index.js";import"../../timer/styled.js";import"../../toast/Toast.js";import"../../totals/total/styled.js";import"../../totals/subtotal/Subtotal.js";import"../../tracking-progress-v2/TrackingProgressV2.js";import"../../tracking-progress/TrackingProgress.js";import"../AutoshipOfferCard/AutoshipOfferCardItem.styled.js";import"../AutoshipOfferCardCta/AutoshipOfferCardItem.styled.js";import"../AutoshipPdpCard/AutoshipPdpCard.styled.js";import"../BasicAccordion/BasicAccordion.js";import"../CartItemCard/CartItem.js";import"../ClubOfferSelector/styled.js";import"../ClubOfferSelector2/styled.js";import"../JoinClubCard/joinClubCard.js";import"../OfferAtCart/styled.js";import"../OfferAtCartV2/styled.js";import"../OfferAtCartV3/styled.js";import"../OfferAtCartV4/styled.js";import"../OfferAtPDP/styled.js";import"../OfferAtPDP/types.js";import"../ProductCard/ProductCardV1/ProductCard.js";import"../ProductCard/ProductCardV2/styled.js";import"../ProductCard/ProductCardV3/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js";import"../ProductGalleryMobile/ProductGalleryMobileV2/ProductGalleryMobileV2.js";import"../ProductGalleryMobile/ProductGalleryMobileV3/ProductGalleryMobileV3.js";import"@ant-design/react-slick";import"../ProductGalleryMobile/ProductGalleryMobileV4/ContentGallery/styled.js";import"react-inner-image-zoom";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/MainContent/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/Slider/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV5/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/ColorVariantsGallery/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/styled.js";import"../SizeCharTable/SizeChartTableV2/styled.js";import"../SizeCharTable/SizeChartTableV3/styled.js";import"../../molecules/ArrowTip/ArrowTip.styled.js";import"../SizeCharTable/SizeChartTableV4/SizeChartTableV4.styled.js";import{Container as h,SubscriptionContainer as P,DiscountTag as f,SubscriptionHeader as g,FlexContainer as C,TooltipWrapper as T,StyledPrice as v,BenefitsContainer as k,SinglePurchaseContainer as S}from"./styled.js";import"../TwoCtasAtCart/Greeting.styled.js";import"../TwoCtasAtCart/Card.styled.js";import"../../molecules/OfferAtCartBenefits/OfferAtCartBenefits.styled.js";import"../../molecules/OfferAtCartImage/OfferAtCartImage.styled.js";import"../../molecules/CouponCard/styled.js";import{AutoshipFrequencyDropdown as V}from"../../molecules/AutoshipFrequencyDropdown/AutoshipFrequencyDropdown.js";import{BenefitsList as A}from"../../molecules/BenefitsList/BenefitsList.js";import"../../molecules/HurryUp/styled.js";import"../../molecules/Spinner/styled.js";import"../../molecules/IconsWithTitleList/IconsWithTitleList.styled.js";import"../../molecules/LikeButton/styled.js";import"../../molecules/ScarcityTag/ScarcityTag.styled.js";var G=function(G){var M=G.children,w=G.benefits,I=G.tooltip,B=G.pricing,L=G.frequency,z=G.onChange,x=G.className,O=G.discountTagClassName,D=G.closeIcon,F=G.currencySymbol,N=G.discountLabel,R=G.radios,q=G.termsAndConditions,W=o({oneTime:R.oneTime,subscription:R.subscription}),H=W[0],$=W[1];s((function(){$((function(t){return e(e({},t),{oneTime:e(e({},t.oneTime),{checked:!t.oneTime.disabled&&t.oneTime.checked}),subscription:e(e({},t.subscription),{checked:!t.subscription.disabled&&t.subscription.checked})})}))}),[H.oneTime.disabled,H.subscription.disabled]);var E=o(null==L?void 0:L.values[0]),J=E[0],Q=E[1],U=B.listPrice,_=B.discountedPrice,K=B.subscriptionDiscountPercentage,X=Number((_-_*(K/100)).toFixed(2)),Y=Math.floor(U-X),Z=Y/U*100,ee=5*Math.round(Z/5),te=l((function(){return H.subscription.checked?Number((_-_*(K/100)).toFixed(2)):_}),[_,H.subscription.checked,K]),ie=c((function(){return{subscriptionPeriod:J,withSubscription:H.subscription.checked,originalPrice:U,discountedPrice:te()}}),[J,H.subscription.checked,U,te]);s((function(){ie&&z(ie)}),[ie,z]);var re=function(t){var i;"subscription"===(i=t)&&H.subscription.disabled||"oneTime"===i&&H.oneTime.disabled||($((function(i){return e(e({},i),{oneTime:e(e({},i.oneTime),{checked:"oneTime"===t}),subscription:e(e({},i.subscription),{checked:"subscription"===t})})})),"oneTime"===t?Q(void 0):"subscription"===t&&L&&Q(L.values[0]))};return t(h,e({className:x},{children:[t(P,e({highlighted:H.subscription.checked,onClick:function(){return re("subscription")},"data-testid":"subscription-purchase-block",disabled:H.subscription.disabled},{children:[i(f,e({className:O,selected:H.subscription.checked},{children:null!=N?N:"".concat(ee,"% OFF - SAVE ").concat(F).concat(Y.toFixed(2))}),void 0),t(g,e({showBorder:H.subscription.checked},{children:[t(C,e({"data-testid":"subscription-block",onClick:function(){return re("subscription")}},{children:[i(j,{label:R.subscription.label,icon:R.subscription.icon,name:"subscription",id:"subscription",value:"subscription",size:m.Medium,style:{marginRight:"10px"},useV2Style:!0,onChange:function(){$((function(t){return{subscription:e(e({},t.subscription),{checked:!0}),oneTime:e(e({},t.oneTime),{checked:!1})}}))},checked:!H.subscription.disabled&&H.subscription.checked,disabled:H.subscription.disabled},void 0),I&&i(T,{children:i(y,e({position:0,content:I.content,header:I.header,maxWidth:"248px",showCloseIcon:D,closeBtnSize:.7},{children:i(b.Actions.CircleQuestion,{width:1},void 0)}),void 0)},void 0)]}),void 0),i(v,{testId:"subscription",finalPrice:"$".concat(p(Number(X))),disabled:H.subscription.disabled,highlighted:!H.subscription.disabled&&H.subscription.highlighted,size:m.Large,originalPrice:"$".concat(p(Number(U)))},void 0)]}),void 0),H.subscription.checked&&t(r,{children:[i(k,e({disabled:H.subscription.disabled},{children:function(){var t=H.subscription.disabled;if(M){var r=t?{opacity:.5,pointerEvents:"none"}:{};return a.map(M,(function(t){return n(t)?d(t,{style:e(e({},t.props.style),r)}):t}))}return w?i(A,{benefits:w,disabled:t},void 0):null}()}),void 0),q&&i(u,e({variant:"link",underline:!0,href:q.url,size:"regular",target:"_blank"},{children:q.text}),void 0),(null==L?void 0:L.showFrequencyText)&&i(V,{frequency:L,onChange:function(e){Q(H.subscription.checked?e.value:void 0)}},void 0)]},void 0)]}),void 0),t(S,e({"data-testid":"single-purchase-block",highlighted:H.oneTime.checked,disabled:H.oneTime.disabled,onClick:function(){return re("oneTime")}},{children:[i(j,{label:R.oneTime.label,icon:R.oneTime.icon,name:"oneTime",id:"oneTime",value:"oneTime",size:m.Medium,onChange:function(){$((function(t){return{subscription:e(e({},t.subscription),{checked:!1}),oneTime:e(e({},t.oneTime),{checked:!0})}}))},useV2Style:!0,checked:!H.oneTime.disabled&&H.oneTime.checked,disabled:H.oneTime.disabled},void 0),i(v,{testId:"single-purchase",finalPrice:"$".concat(p(Number(_))),disabled:H.oneTime.disabled,highlighted:!H.oneTime.disabled&&H.oneTime.highlighted,size:m.Large,originalPrice:"$".concat(p(Number(U)))},void 0)]}),void 0)]}),void 0)};export{G as SubscriptionPlanSelector};
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as t,jsx as i,Fragment as r}from"react/jsx-runtime";import{useState as o,useEffect as s,useCallback as l,useMemo as c,Children as a,isValidElement as n,cloneElement as d}from"react";import{ComponentSize as m}from"../../../types/enums.js";import"../../../utils/constants/offerAtCart.js";import{decimalFormat as p}from"../../../utils/decimalParser/decimalParser.js";import"../../../utils/media.js";import"../../../utils/mock-content/CancellationFlowAccordion.js";import{Text as u}from"../../text/Text.js";import{Icon as b}from"../../icons/index.js";import{RadioInput as j}from"../../radio/input/radio.js";import{Tooltip as y}from"../../tooltip/Tooltip.js";import"../../PackSelectorV2/PackSelectoV2.js";import"../../absorbency-level/AbsorbencyLevel.js";import"../../accordion-options/AccordionOptions.js";import"../../accordion/Accordion.js";import"../../../core/theme/Theme.js";import"../../dropdown/variants/simple/SimpleDropdown.js";import"../../autoship/styled.js";import"../../autoshipV2/styled.js";import"../../before-after/BeforeAfter.js";import"../../pricing/clubOffer/ClubOfferTag.js";import"../../pricing/discount/styled.js";import"../../pricing/styles.js";import"../../atoms/PriceLabel/PriceLabel.js";import"../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../../atoms/HorizontalDivider/HorizontalDivider.js";import"../../atoms/Icon/Icon.js";import"../../atoms/Image/styled.js";import"../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../atoms/Toggle/toggle.styled.js";import"../../pricing/priceLabelV3/PriceLabelV3.js";import"../../pricing/priceLabelV5/PriceLabelV5.styled.js";import"../../pricing/priceLabelV6/PriceLabelV6.styled.js";import"../../shared/card/Card.js";import"../../bundle/minimalistic/styled.js";import"../../bundle/motivator/styled.js";import"../../bundle/simple/Simple.js";import"../../buynowpaylater/BuyNowPayLater.js";import"../../offer-banner/OfferBanner.js";import"../../cartProductItem/CloseIcon/CloseButton.js";import"../../cartProductItem/Description/Description.js";import"../../cartProductItem/Promo/Promo.js";import"../../cartProductItem/Title/Title.js";import"../../cartProductItem/TrashIcon/styled.js";import"../../checkbox/Checkbox.js";import"../../collection/grid/WithProductGrid.js";import"@emotion/react/jsx-runtime";import"../../SkeletonBox/SkeletonBox.js";import"../../club-price-label/ClubPriceLabel.js";import"../../strength-bars/StrengthBars.js";import"../../pricing/priceLabelV4/PriceLabelV4.js";import"../../rating/starList/StarList.js";import"../../rating/styles.js";import"../../collection/product/mobile/styled.js";import"../../icon-button/IconButton.js";import"../../tag/variants/product/styled.js";import"../../collection/product/truekind/styled.js";import"../../color/ColorRadioGroup.js";import"../../color/selector/PatternSelector.js";import"../../color/styles/ColorPickerwithTootip.styled.js";import"../../cross-sell/Checkbox/CrossSellCheckbox.js";import"../../cta/styled.js";import"../../delivery-details/DeliveryDetails.js";import"../../delivery-details/Note/Note.js";import"../../drawer/style.js";import"../../dropdown-list-icons/Styled.js";import"../../dropdown/size-dropdown/Styled.js";import"../../dropdown/variants/dialog/DropdownDialog.js";import"../../dropdown/base/BaseDropdown.js";import"@headlessui/react";import"../../input/base/Error.js";import"../../shared/select/BaseSelect.js";import"../../dropdown/variants/smart/styled.js";import"../../filtering/Accordion.js";import"../../filtering/FiltersStyled.js";import"../../filtering/Tags/Tags.js";import"../../fit-guarantee/FitGuarantee.js";import"../../fit/FitPredictor.js";import"../../molecules/Video/components/styled.js";import"../../molecules/Video/styled.js";import"../../slider/ArrowButton.js";import"../../slider/StyledSlider.js";import"../../gallery/components/ImageSmallPreview/styled.js";import"../../gallery/components/ImagePreviewList/styled.js";import"../../gallery/components/ImageProductSlide/styled.js";import"../../gallery/styled.js";import"../../icon-button/amazonAndPaypal/AmazonPaypalButtons.js";import"../../iconsWithTitle/index.js";import"../../image-card/ImageCard.js";import"../../input/label/Label.js";import"../../input/base/Styled.js";import"../../input/custom/Custom.js";import"../../input/basePlusButton/BasePlusButton.js";import"../../input/basePlusIcon/BasePlusIcon.js";import"../../modal/Modal.js";import"../../motivator-progress-bar/MotivatorProgressBar.js";import"../../order-bar/OrderBar.js";import"../../packs/selector/PackSelector.js";import"../../pagination/styles.js";import"../../payment-methods/PaymentMethod.js";import"../../product/order/item/SimpleOrderItem.js";import"../../progress-bar/ProgressBar.js";import"../../quantityPicker/styled.js";import"../../radio/RadioPrimary/radioPrimary.js";import"../../radio/clubRadioInput/clubRadio.js";import"../../review-detail/ReviewDetail.js";import"../../review/Review.js";import"../../reviews-header/ReviewsHeader.js";import"../../scroll-to-top/ScrollToTop.js";import"../../search-bar/components/ClearButton/styled.js";import"../../search-bar/components/Footer/styled.js";import"../../search-bar/components/ProductItem/styled.js";import"../../search-bar/components/ResultsPanel/styled.js";import"../../search-bar/components/SearchControl/styled.js";import"../../search-bar/styled.js";import"../../search-navigation/styled.js";import"react-dom";import"../../short-banner/ShortBanner.js";import"../../size-chart/styled.js";import"../../size-table/SizeTable.js";import"../../size/guide/SizeFitGuide.js";import"../../size/selector/styled.js";import"../../tabs/Tab.js";import"../../tabs/Tabs.js";import"../../tag/Tag.js";import"@emotion/react";import"../../textWithImage/index.js";import"../../timer/styled.js";import"../../toast/Toast.js";import"../../totals/total/styled.js";import"../../totals/subtotal/Subtotal.js";import"../../tracking-progress-v2/TrackingProgressV2.js";import"../../tracking-progress/TrackingProgress.js";import"../AutoshipOfferCard/AutoshipOfferCardItem.styled.js";import"../AutoshipOfferCardCta/AutoshipOfferCardItem.styled.js";import"../AutoshipPdpCard/AutoshipPdpCard.styled.js";import"../BasicAccordion/BasicAccordion.js";import"../CartItemCard/CartItem.js";import"../ClubOfferSelector/styled.js";import"../ClubOfferSelector2/styled.js";import"../JoinClubCard/joinClubCard.js";import"../OfferAtCart/styled.js";import"../OfferAtCartV2/styled.js";import"../OfferAtCartV3/styled.js";import"../OfferAtCartV4/styled.js";import"../OfferAtPDP/styled.js";import"../OfferAtPDP/types.js";import"../ProductCard/ProductCardV1/ProductCard.js";import"../ProductCard/ProductCardV2/styled.js";import"../ProductCard/ProductCardV3/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js";import"../ProductGalleryMobile/ProductGalleryMobileV2/ProductGalleryMobileV2.js";import"../ProductGalleryMobile/ProductGalleryMobileV3/ProductGalleryMobileV3.js";import"@ant-design/react-slick";import"../ProductGalleryMobile/ProductGalleryMobileV4/ContentGallery/styled.js";import"react-inner-image-zoom";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/MainContent/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/Slider/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV5/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/ColorVariantsGallery/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/styled.js";import"../SizeCharTable/SizeChartTableV2/styled.js";import"../SizeCharTable/SizeChartTableV3/styled.js";import"../../molecules/ArrowTip/ArrowTip.styled.js";import"../SizeCharTable/SizeChartTableV4/SizeChartTableV4.styled.js";import{Container as h,SubscriptionContainer as P,DiscountTag as f,SubscriptionHeader as g,FlexContainer as C,TooltipWrapper as T,StyledPrice as v,BenefitsContainer as k,SinglePurchaseContainer as S}from"./styled.js";import"../TwoCtasAtCart/Greeting.styled.js";import"../TwoCtasAtCart/Card.styled.js";import"../../molecules/OfferAtCartBenefits/OfferAtCartBenefits.styled.js";import"../../molecules/OfferAtCartImage/OfferAtCartImage.styled.js";import"../../molecules/CouponCard/styled.js";import{AutoshipFrequencyDropdown as V}from"../../molecules/AutoshipFrequencyDropdown/AutoshipFrequencyDropdown.js";import{BenefitsList as A}from"../../molecules/BenefitsList/BenefitsList.js";import"../../molecules/HurryUp/styled.js";import"../../molecules/Spinner/styled.js";import"../../molecules/IconsWithTitleList/IconsWithTitleList.styled.js";import"../../molecules/LikeButton/styled.js";import"../../molecules/ScarcityTag/ScarcityTag.styled.js";var G=function(G){var M=G.children,w=G.benefits,I=G.tooltip,B=G.pricing,L=G.frequency,z=G.onChange,x=G.className,O=G.discountTagClassName,D=G.closeIcon,F=G.currencySymbol,N=G.discountLabel,R=G.radios,q=G.termsAndConditions,W=o({oneTime:R.oneTime,subscription:R.subscription}),H=W[0],$=W[1];s((function(){$((function(t){return e(e({},t),{oneTime:e(e({},t.oneTime),{checked:!t.oneTime.disabled&&t.oneTime.checked}),subscription:e(e({},t.subscription),{checked:!t.subscription.disabled&&t.subscription.checked})})}))}),[H.oneTime.disabled,H.subscription.disabled]);var E=o(null==L?void 0:L.values[0]),J=E[0],Q=E[1],U=B.listPrice,_=B.discountedPrice,K=B.subscriptionDiscountPercentage,X=Number((_-_*(K/100)).toFixed(2)),Y=Math.floor(U-X),Z=Y/U*100,ee=5*Math.round(Z/5),te=l((function(){return H.subscription.checked?Number((_-_*(K/100)).toFixed(2)):_}),[_,H.subscription.checked,K]),ie=c((function(){return{subscriptionPeriod:J,withSubscription:H.subscription.checked,originalPrice:U,discountedPrice:te()}}),[J,H.subscription.checked,U,te]);s((function(){ie&&z(ie)}),[ie,z]);var re=function(t){var i;"subscription"===(i=t)&&H.subscription.disabled||"oneTime"===i&&H.oneTime.disabled||($((function(i){return e(e({},i),{oneTime:e(e({},i.oneTime),{checked:"oneTime"===t}),subscription:e(e({},i.subscription),{checked:"subscription"===t})})})),"oneTime"===t?Q(void 0):"subscription"===t&&L&&Q(L.values[0]))};return t(h,e({className:x},{children:[t(P,e({highlighted:H.subscription.checked,onClick:function(){return re("subscription")},"data-testid":"subscription-purchase-block",disabled:H.subscription.disabled},{children:[i(f,e({className:O,selected:H.subscription.checked},{children:null!=N?N:"".concat(ee,"% OFF - SAVE ").concat(F).concat(Y.toFixed(2))}),void 0),t(g,e({showBorder:H.subscription.checked},{children:[t(C,e({"data-testid":"subscription-block",onClick:function(){return re("subscription")}},{children:[i(j,{label:R.subscription.label,icon:R.subscription.icon,name:"subscription",id:"subscription",value:"subscription",size:m.Medium,style:{marginRight:"10px"},useV2Style:!0,onChange:function(){$((function(t){return{subscription:e(e({},t.subscription),{checked:!0}),oneTime:e(e({},t.oneTime),{checked:!1})}}))},checked:!H.subscription.disabled&&H.subscription.checked,disabled:H.subscription.disabled},void 0),I&&i(T,{children:i(y,e({position:0,content:I.content,header:I.header,maxWidth:"248px",showCloseIcon:D,closeBtnSize:.7},{children:i(b.Actions.CircleQuestion,{width:1},void 0)}),void 0)},void 0)]}),void 0),i(v,{testId:"subscription",finalPrice:"$".concat(p(Number(X))),disabled:H.subscription.disabled,highlighted:!H.subscription.disabled&&H.subscription.highlighted,size:m.Large,originalPrice:"$".concat(p(Number(U)))},void 0)]}),void 0),H.subscription.checked&&t(r,{children:[i(k,e({disabled:H.subscription.disabled},{children:function(){var t=H.subscription.disabled;if(M){var r=t?{opacity:.5,pointerEvents:"none"}:{};return a.map(M,(function(t){return n(t)?d(t,{style:e(e({},t.props.style),r)}):t}))}return w?i(A,{benefits:w,disabled:t},void 0):null}()}),void 0),q&&i(u,e({variant:"link",underline:!0,href:q.url,size:"regular",target:"_blank"},{children:q.text}),void 0),(null==L?void 0:L.showFrequencyText)&&i(V,{frequency:L,onChange:function(e){Q(H.subscription.checked?e.value:void 0)}},void 0)]},void 0)]}),void 0),t(S,e({"data-testid":"single-purchase-block",highlighted:H.oneTime.checked,disabled:H.oneTime.disabled,onClick:function(){return re("oneTime")}},{children:[i(j,{label:R.oneTime.label,icon:R.oneTime.icon,name:"oneTime",id:"oneTime",value:"oneTime",size:m.Medium,onChange:function(){$((function(t){return{subscription:e(e({},t.subscription),{checked:!1}),oneTime:e(e({},t.oneTime),{checked:!0})}}))},useV2Style:!0,checked:!H.oneTime.disabled&&H.oneTime.checked,disabled:H.oneTime.disabled},void 0),i(v,{testId:"single-purchase",finalPrice:"$".concat(p(Number(_))),disabled:H.oneTime.disabled,highlighted:!H.oneTime.disabled&&H.oneTime.highlighted,size:m.Large,originalPrice:"$".concat(p(Number(U)))},void 0)]}),void 0)]}),void 0)};export{G as SubscriptionPlanSelector};
|
|
2
2
|
//# sourceMappingURL=SubscriptionPlanSelector.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";import e from"../../cta/primary/ButtonPrimary.js";import"@emotion/react/jsx-runtime";import"../../../core/theme/Theme.js";import"../../../types/enums.js";import"../../cta/styled.js";import"../../PackSelectorV2/PackSelectoV2.js";import"../../absorbency-level/AbsorbencyLevel.js";import"../../accordion-options/AccordionOptions.js";import"../../accordion/Accordion.js";import"react";import"../../../utils/constants/offerAtCart.js";import"../../../utils/media.js";import"../../../utils/mock-content/CancellationFlowAccordion.js";import"../../dropdown/variants/simple/SimpleDropdown.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"../../atoms/Icon/Icon.js";import"../../atoms/Image/styled.js";import"../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../atoms/Toggle/toggle.styled.js";import"../../radio/input/styles.js";import"../../autoship/styled.js";import"../../autoshipV2/styled.js";import"../../before-after/BeforeAfter.js";import"../../pricing/priceLabelV3/PriceLabelV3.js";import"../../pricing/priceLabelV5/PriceLabelV5.styled.js";import"../../pricing/priceLabelV6/PriceLabelV6.styled.js";import"../../shared/card/Card.js";import"../../bundle/minimalistic/styled.js";import"../../text/Text.js";import"../../bundle/motivator/styled.js";import"../../bundle/simple/Simple.js";import"../../buynowpaylater/BuyNowPayLater.js";import"../../offer-banner/OfferBanner.js";import"../../cartProductItem/CloseIcon/CloseButton.js";import"../../cartProductItem/Description/Description.js";import"../../cartProductItem/Promo/Promo.js";import"../../cartProductItem/Title/Title.js";import"../../cartProductItem/TrashIcon/styled.js";import"../../checkbox/Checkbox.js";import"../../collection/grid/WithProductGrid.js";import"../../SkeletonBox/SkeletonBox.js";import"../../club-price-label/ClubPriceLabel.js";import"../../strength-bars/StrengthBars.js";import"../../pricing/priceLabelV4/PriceLabelV4.js";import"../../rating/starList/StarList.js";import"../../rating/styles.js";import"../../collection/product/mobile/styled.js";import"../../icon-button/IconButton.js";import"../../tag/variants/product/styled.js";import"../../collection/product/truekind/styled.js";import"../../color/ColorRadioGroup.js";import"../../color/selector/PatternSelector.js";import"../../color/styles/ColorPickerwithTootip.styled.js";import"../../cross-sell/Checkbox/CrossSellCheckbox.js";import"../../delivery-details/DeliveryDetails.js";import"../../delivery-details/Note/Note.js";import"../../drawer/style.js";import"../../dropdown-list-icons/Styled.js";import"../../dropdown/size-dropdown/Styled.js";import"../../dropdown/variants/dialog/DropdownDialog.js";import"../../dropdown/base/BaseDropdown.js";import"@headlessui/react";import"../../input/base/Error.js";import"../../shared/select/BaseSelect.js";import"../../dropdown/variants/smart/styled.js";import"../../filtering/Accordion.js";import"../../filtering/FiltersStyled.js";import"../../filtering/Tags/Tags.js";import"../../fit-guarantee/FitGuarantee.js";import"../../fit/FitPredictor.js";import"../../
|
|
1
|
+
import{__assign as t}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";import e from"../../cta/primary/ButtonPrimary.js";import"@emotion/react/jsx-runtime";import"../../../core/theme/Theme.js";import"../../../types/enums.js";import"../../cta/styled.js";import"../../PackSelectorV2/PackSelectoV2.js";import"../../absorbency-level/AbsorbencyLevel.js";import"../../accordion-options/AccordionOptions.js";import"../../accordion/Accordion.js";import"react";import"../../../utils/constants/offerAtCart.js";import"../../../utils/media.js";import"../../../utils/mock-content/CancellationFlowAccordion.js";import"../../dropdown/variants/simple/SimpleDropdown.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"../../atoms/Icon/Icon.js";import"../../atoms/Image/styled.js";import"../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../atoms/Toggle/toggle.styled.js";import"../../radio/input/styles.js";import"../../autoship/styled.js";import"../../autoshipV2/styled.js";import"../../before-after/BeforeAfter.js";import"../../pricing/priceLabelV3/PriceLabelV3.js";import"../../pricing/priceLabelV5/PriceLabelV5.styled.js";import"../../pricing/priceLabelV6/PriceLabelV6.styled.js";import"../../shared/card/Card.js";import"../../bundle/minimalistic/styled.js";import"../../text/Text.js";import"../../bundle/motivator/styled.js";import"../../bundle/simple/Simple.js";import"../../buynowpaylater/BuyNowPayLater.js";import"../../offer-banner/OfferBanner.js";import"../../cartProductItem/CloseIcon/CloseButton.js";import"../../cartProductItem/Description/Description.js";import"../../cartProductItem/Promo/Promo.js";import"../../cartProductItem/Title/Title.js";import"../../cartProductItem/TrashIcon/styled.js";import"../../checkbox/Checkbox.js";import"../../collection/grid/WithProductGrid.js";import"../../SkeletonBox/SkeletonBox.js";import"../../club-price-label/ClubPriceLabel.js";import"../../strength-bars/StrengthBars.js";import"../../pricing/priceLabelV4/PriceLabelV4.js";import"../../rating/starList/StarList.js";import"../../rating/styles.js";import"../../collection/product/mobile/styled.js";import"../../icon-button/IconButton.js";import"../../tag/variants/product/styled.js";import"../../collection/product/truekind/styled.js";import"../../color/ColorRadioGroup.js";import"../../color/selector/PatternSelector.js";import"../../color/styles/ColorPickerwithTootip.styled.js";import"../../cross-sell/Checkbox/CrossSellCheckbox.js";import"../../delivery-details/DeliveryDetails.js";import"../../delivery-details/Note/Note.js";import"../../drawer/style.js";import"../../dropdown-list-icons/Styled.js";import"../../dropdown/size-dropdown/Styled.js";import"../../dropdown/variants/dialog/DropdownDialog.js";import"../../dropdown/base/BaseDropdown.js";import"@headlessui/react";import"../../input/base/Error.js";import"../../shared/select/BaseSelect.js";import"../../dropdown/variants/smart/styled.js";import"../../filtering/Accordion.js";import"../../filtering/FiltersStyled.js";import"../../filtering/Tags/Tags.js";import"../../fit-guarantee/FitGuarantee.js";import"../../fit/FitPredictor.js";import"../../molecules/Video/components/styled.js";import"../../molecules/Video/styled.js";import"../../slider/ArrowButton.js";import"../../slider/StyledSlider.js";import"../../gallery/components/ImageSmallPreview/styled.js";import"../../gallery/components/ImagePreviewList/styled.js";import"../../gallery/components/ImageProductSlide/styled.js";import"../../gallery/styled.js";import"../../icon-button/amazonAndPaypal/AmazonPaypalButtons.js";import"../../iconsWithTitle/index.js";import"../../image-card/ImageCard.js";import"../../input/label/Label.js";import"../../input/base/Styled.js";import"../../input/custom/Custom.js";import"../../input/basePlusButton/BasePlusButton.js";import"../../input/basePlusIcon/BasePlusIcon.js";import"../../modal/Modal.js";import"../../motivator-progress-bar/MotivatorProgressBar.js";import"../../order-bar/OrderBar.js";import"../../packs/selector/PackSelector.js";import"../../pagination/styles.js";import"../../payment-methods/PaymentMethod.js";import"../../product/order/item/SimpleOrderItem.js";import"../../progress-bar/ProgressBar.js";import"../../quantityPicker/styled.js";import"../../radio/RadioPrimary/radioPrimary.js";import"../../radio/clubRadioInput/clubRadio.js";import"../../review-detail/ReviewDetail.js";import"../../review/Review.js";import"../../reviews-header/ReviewsHeader.js";import"../../scroll-to-top/ScrollToTop.js";import"../../search-bar/components/ClearButton/styled.js";import"../../search-bar/components/Footer/styled.js";import"../../search-bar/components/ProductItem/styled.js";import"../../search-bar/components/ResultsPanel/styled.js";import"../../search-bar/components/SearchControl/styled.js";import"../../search-bar/styled.js";import"../../search-navigation/styled.js";import"react-dom";import"../../short-banner/ShortBanner.js";import"../../size-chart/styled.js";import"../../size-table/SizeTable.js";import"../../size/guide/SizeFitGuide.js";import"../../size/selector/styled.js";import"../../tabs/Tab.js";import"../../tabs/Tabs.js";import"../../tag/Tag.js";import"@emotion/react";import"../../textWithImage/index.js";import"../../timer/styled.js";import"../../toast/Toast.js";import"../../totals/total/styled.js";import"../../totals/subtotal/Subtotal.js";import"../../tracking-progress-v2/TrackingProgressV2.js";import"../../tracking-progress/TrackingProgress.js";import"../AutoshipOfferCard/AutoshipOfferCardItem.styled.js";import"../AutoshipOfferCardCta/AutoshipOfferCardItem.styled.js";import"../AutoshipPdpCard/AutoshipPdpCard.styled.js";import"../BasicAccordion/BasicAccordion.js";import"../CartItemCard/CartItem.js";import"../ClubOfferSelector/styled.js";import"../ClubOfferSelector2/styled.js";import"../JoinClubCard/joinClubCard.js";import"../OfferAtCart/styled.js";import"../OfferAtCartV2/styled.js";import"../OfferAtCartV3/styled.js";import"../OfferAtCartV4/styled.js";import"../OfferAtPDP/styled.js";import"../OfferAtPDP/types.js";import"../ProductCard/ProductCardV1/ProductCard.js";import"../ProductCard/ProductCardV2/styled.js";import"../ProductCard/ProductCardV3/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js";import"../ProductGalleryMobile/ProductGalleryMobileV2/ProductGalleryMobileV2.js";import"../ProductGalleryMobile/ProductGalleryMobileV3/ProductGalleryMobileV3.js";import"@ant-design/react-slick";import"../ProductGalleryMobile/ProductGalleryMobileV4/ContentGallery/styled.js";import"react-inner-image-zoom";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/MainContent/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/Slider/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV5/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/ColorVariantsGallery/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/styled.js";import"../SizeCharTable/SizeChartTableV2/styled.js";import"../SizeCharTable/SizeChartTableV3/styled.js";import"../../molecules/ArrowTip/ArrowTip.styled.js";import"../SizeCharTable/SizeChartTableV4/SizeChartTableV4.styled.js";import"../SubscriptionPlanSelector/styled.js";import"./Greeting.styled.js";import{Container as i,TitleWrapper as s,BodyContainer as l,GridContainer as a,BottomCopyWrapper as m,OutLineButtonContainer as p,SaveLessLinkButton as d,BtnOutlineWrapper as c}from"./Card.styled.js";import{DescriptionItem as n}from"./DescriptionItem.js";import{BottomButtonVersionsTypes as j}from"./types.js";import"../../molecules/OfferAtCartBenefits/OfferAtCartBenefits.styled.js";import"../../molecules/OfferAtCartImage/OfferAtCartImage.styled.js";import"../../molecules/CouponCard/styled.js";import"../../molecules/BenefitsList/styled.js";import"../../molecules/HurryUp/styled.js";import"../../molecules/Spinner/styled.js";import"../../molecules/IconsWithTitleList/IconsWithTitleList.styled.js";import"../../molecules/LikeButton/styled.js";import{ScarcityTag as y}from"../../molecules/ScarcityTag/ScarcityTag.js";function u(u){var b=u.title,P=u.saveLessButtonAction,C=u.saveLessButtonLabel,f=u.saveMoreButtonAction,g=u.saveMoreButtonLabel,h=u.descriptions,v=u.version,S=u.bottomCopy,V=u.titleBackgroundColor,T=u.scarcityText,G=u.scarcityTextColor;return r(i,t({id:"twoCtasAtCart"},{children:[o(s,t({id:"twoCtasAtCartTitle",backgroundColor:null!=V?V:void 0},{children:b}),void 0),o(e,{onClick:f,text:g,wide:!0},void 0),T&&o(y,{text:T,color:G},void 0),r(l,{children:[o(a,{children:h.map((function(t,r){return o(n,{text:t.text,smallerText:t.smallerText,iconName:null==t?void 0:t.iconName,type:null==t?void 0:t.type,link:null==t?void 0:t.link},"".concat(t.text,"-").concat(r))}))},void 0),S&&o(m,{dangerouslySetInnerHTML:{__html:S}},void 0)]},void 0),o(p,{children:v===j.link?o(d,t({href:"#",onClick:P},{children:C}),void 0):o(c,{wide:!0,onClick:P,text:C},void 0)},void 0)]}),void 0)}export{u as TwoCtasAtCart};
|
|
2
2
|
//# sourceMappingURL=TwoCtasAtCart.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as i,__assign as e}from"tslib";import{jsxs as l,jsx as
|
|
1
|
+
import{__rest as i,__assign as e}from"tslib";import{jsxs as l,jsx as r}from"react/jsx-runtime";import{useTheme as o}from"../../../core/theme/Theme.js";import{useWindowDimensions as n}from"../../../hooks/WindowDimensions.js";import{ComponentSize as t}from"../../../types/enums.js";import{DiscountTag as c}from"../discount/DiscountTag.js";import{Container as d,TagContainer as a,PriceContainer as m,Price as p}from"../styles.js";var v=function(i,e){var l,r,o,n,c,d,a,m;switch(i){case t.Large:return{finalPricefontSize:(null===(l=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===l?void 0:l.large)||"20px",finalPricefontSizeSmall:(null===(r=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===r?void 0:r.large)||"14px",margin:"0 0 0 0.75rem",lineHeight:"2rem"};case t.Medium:return{fontSize:(null===(o=null==e?void 0:e.component.pricing.priceLabel.price.defaultFontSize)||void 0===o?void 0:o.medium)||"1.125rem",finalPricefontSize:(null===(n=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===n?void 0:n.medium)||"20px",finalPricefontSizeSmall:(null===(c=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===c?void 0:c.medium)||"14px",margin:"0 0 0 0.5rem",lineHeight:"1.25rem"};case t.Small:return{fontSize:(null===(d=null==e?void 0:e.component.pricing.priceLabel.price.defaultFontSize)||void 0===d?void 0:d.small)||"14px",finalPricefontSize:(null===(a=null==e?void 0:e.component.pricing.priceLabel.price.largeFontSize)||void 0===a?void 0:a.small)||"20px",finalPricefontSizeSmall:(null===(m=null==e?void 0:e.component.pricing.priceLabel.price.smallFontSize)||void 0===m?void 0:m.small)||"14px",margin:"0 0 0 0.5rem",lineHeight:"1.25rem"}}},s=function(i,e,l,r){var o,n,t;return l?null===(o=v(i,e))||void 0===o?void 0:o.finalPricefontSize:r?null===(n=v(i,e))||void 0===n?void 0:n.finalPricefontSizeSmall:null===(t=v(i,e))||void 0===t?void 0:t.fontSize};function u(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return i.filter(Boolean).join("-")}var f=function(v){var s=v.finalPrice,f=v.originalPrice,g=v.discount,S=v.color,z=v.originalPriceColor,P=v.testId,h=v.finalPriceStyled,b=void 0!==h&&h,y=v.finalPriceStyle,x=v.originalPriceStyled,L=void 0!==x&&x,F=v.originalPriceUnderlined,j=void 0===F||F,w=v.size,D=void 0===w?t.Medium:w,T=v.clubStyle,C=void 0!==T&&T,H=v.invertDirection,M=void 0!==H&&H,E=v.isPrincingStyleTestEnabled,I=void 0!==E&&E,U=i(v,["finalPrice","originalPrice","discount","color","originalPriceColor","testId","finalPriceStyled","finalPriceStyle","originalPriceStyled","originalPriceUnderlined","size","clubStyle","invertDirection","isPrincingStyleTestEnabled"]),k=o(),B=n().isMobile,W={size:b?t.Small:D,color:S||k.colors.pallete.secondary.color,weight:700},X=function(){var i=C?B?t.Small:t.XSmall:L?D:t.Small;return r(p,e({size:i,color:z||k.component.pricing.priceLabel.price.originalPriceColor,underlined:j,"data-testid":u(P,"original-product-price"),theme:k},{children:f}),void 0)};return l(d,e({},U,{id:"priceLabel"},{children:[l(m,I?e({flexDirection:"column",gap:"0.25rem"},{children:[!!f&&r(X,{},void 0),r(p,e({"data-testid":u(P,"final-product-price")},W,{style:y,size:D,weight:400},{children:s}),void 0)]}):e({flexDirection:M?"row-reverse":"row"},C?{children:[!!f&&r(X,{},void 0),r(p,e({"data-testid":u(P,"final-product-price")},W,{style:y,size:D},{children:s}),void 0)]}:{children:[r(p,e({"data-testid":u(P,"final-product-price")},W,{style:y,size:D},{children:s}),void 0),!!f&&r(X,{},void 0)]}),void 0),g&&r(a,e({size:D},{children:r(c,e({},g,{size:D}),void 0)}),void 0)]}),void 0)};export{f as PriceLabel,s as getFontSize,v as getStylesBySize,u as getTestId};
|
|
2
2
|
//# sourceMappingURL=PriceLabel.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from"tslib";import i from"@emotion/styled";import{getFontSize as e,getStylesBySize as l}from"./price/PriceLabel.js";var t,r,a,o,p,d,f,s,g,m
|
|
1
|
+
import{__makeTemplateObject as n}from"tslib";import i from"@emotion/styled";import{getFontSize as e,getStylesBySize as l}from"./price/PriceLabel.js";var t,r,a,o,p,d,f,s,g,x,m=i.div(t||(t=n(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"]))),c=i.p(r||(r=n(["\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n text-decoration: ",";\n margin: ",";\n position: relative;\n margin-top: ",";\n"],["\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n text-decoration: ",";\n margin: ",";\n position: relative;\n margin-top: ",";\n"])),(function(n){var i=n.weight;return i||"400"}),(function(n){var i=n.size,l=n.theme,t=n.finalPriceStyled,r=n.finalPriceStyledSmall;return e(i,l,t,r)}),(function(n){var i,e=n.size;return null===(i=l(e))||void 0===i?void 0:i.lineHeight}),(function(n){return n.color}),(function(n){return n.underlined?"line-through":"none"}),(function(n){var i,e=n.margin,t=n.size;return e?null===(i=l(t))||void 0===i?void 0:i.margin:"0"}),(function(n){var i=n.finalPriceStyledSmall,e=n.size;return i?"large"===e?"-6px":"-7px":"0"})),u=i.div(a||(a=n(["\n margin: ",";\n display: flex;\n align-items: center;\n"],["\n margin: ",";\n display: flex;\n align-items: center;\n"])),(function(n){var i,e=n.size;return null===(i=l(e))||void 0===i?void 0:i.margin})),v=i.div(o||(o=n(["\n display: flex;\n flex-direction: ",";\n gap: ",";\n"],["\n display: flex;\n flex-direction: ",";\n gap: ",";\n"])),(function(n){return n.flexDirection}),(function(n){var i=n.gap;return void 0===i?"0.5rem":i})),y=i.div(p||(p=n(["\n margin-top: -0.4rem;\n .tooltip-wrapper {\n box-shadow: none;\n }\n"],["\n margin-top: -0.4rem;\n .tooltip-wrapper {\n box-shadow: none;\n }\n"]))),h=i.div(d||(d=n(["\n display: flex;\n"],["\n display: flex;\n"]))),w=i.div(f||(f=n(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n"],["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n"]))),z=i.div(s||(s=n(["\n display: flex;\n align-items: center;\n gap: 8px;\n"],["\n display: flex;\n align-items: center;\n gap: 8px;\n"]))),S=i.div(g||(g=n(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n"],["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n"]))),b=i.div(x||(x=n(["\n display: flex;\n align-items: center;\n gap: 8px;\n"],["\n display: flex;\n align-items: center;\n gap: 8px;\n"])));export{m as Container,h as FinalPriceStyledContainer,S as HorizontalVariantContainer,b as HorizontalVariantRow,c as Price,v as PriceContainer,z as PriceDiscountRow,u as TagContainer,y as TooltipContainer,w as VerticalContainer};
|
|
2
2
|
//# sourceMappingURL=styles.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,g,h,f,u,v,b,
|
|
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,y=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"]))),x=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})),T=function(i){var t,l,p,g,h,f,u,v,b=i.title,T=i.className,k=i.subtitle,V=i.midElement,H=i.image,I=i.price,O=i.tag,W=i.quantity,D=i.finalPriceStyle,E=i.isGift,q=i.isClub,F=i.isPrincingStyleTestEnabled,G=r();return n(y,e({className:T},{children:[n(x,{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),k&&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:k}),void 0),V,E&&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),E?o(S,{children:"GIFT"},void 0):q?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,isPrincingStyleTestEnabled:F},void 0)]}),void 0)]}),void 0)]}),void 0)};export{T as default};
|
|
2
2
|
//# sourceMappingURL=SimpleOrderItem.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,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"]))),
|
|
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,w=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"]))),z=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"]))),v=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})),T=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")})),S=e(T)(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"})),j=e.div(c||(c=n(["\n display: flex;\n flex-direction: column;\n font-size: 16px;\n line-height: 24px;\n font-weight: 400;\n\n & > span:first-of-type {\n color: #ff4e30;\n text-decoration: line-through;\n }\n\n & > span:last-of-type {\n color: #44c676;\n }\n"],["\n display: flex;\n flex-direction: column;\n font-size: 16px;\n line-height: 24px;\n font-weight: 400;\n\n & > span:first-of-type {\n color: #ff4e30;\n text-decoration: line-through;\n }\n\n & > span:last-of-type {\n color: #44c676;\n }\n"]))),E=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 "])))})),P=e.h3(x||(x=n(["\n margin: 0;\n font-size: ",";\n line-height: 28px;\n font-weight: ",";\n\n color: ",";\n\n ","\n\n ","\n"],["\n margin: 0;\n font-size: ",";\n line-height: 28px;\n font-weight: ",";\n\n color: ",";\n\n ","\n\n ","\n"])),(function(n){return n.isPrincingStyleTestEnabled?"16px":"18px"}),(function(n){var t=n.theme;return n.isPrincingStyleTestEnabled?400:t.component.total.basicTotal.savings.amountFontWeight}),(function(n){var t=n.isPrincingStyleTestEnabled,e=n.highlightColor;return t?"#FF4E30":e}),(function(e){if(e.isPrincingStyleTestEnabled)return t(m||(m=n(["\n &::before {\n content: '-';\n margin-right: 2px;\n }\n "],["\n &::before {\n content: '-';\n margin-right: 2px;\n }\n "])))}),(function(e){if(e.isSavingsHighlighted)return t(u||(u=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)(d||(d=n(["\n font-size: 20px;\n"],["\n font-size: 20px;\n"]))),H=e.div(y||(y=n(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"]))),C=e.div(b||(b=n(["\n position: absolute;\n transform: translate(10px, -18px);\n"],["\n position: absolute;\n transform: translate(10px, -18px);\n"])));export{T as Container,v as Currency,P as DiscountAmount,F as DiscountText,z as GrandTotal,E as PriceWrapper,j as PricingStyledContainer,H as SavingsSvgContainer,C as StarsContainer,S as TotalContainer,k as TotalLabel,w as Wrapper};
|
|
2
2
|
//# sourceMappingURL=styled.js.map
|
package/build/index.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ interface PriceLabelProps {
|
|
|
118
118
|
clubStyle?: boolean;
|
|
119
119
|
bordersRounded?: boolean;
|
|
120
120
|
invertDirection?: boolean;
|
|
121
|
+
isPrincingStyleTestEnabled?: boolean;
|
|
121
122
|
}
|
|
122
123
|
declare const PriceLabel: react__default.FC<PriceLabelProps>;
|
|
123
124
|
|
|
@@ -3407,6 +3408,10 @@ declare type ProductGalleryProps = {
|
|
|
3407
3408
|
hasToPreserveOrder?: boolean;
|
|
3408
3409
|
isRatioSquare?: boolean;
|
|
3409
3410
|
itemsOnViewport?: number;
|
|
3411
|
+
videoAutoplay?: boolean;
|
|
3412
|
+
videoInPreview?: boolean;
|
|
3413
|
+
hideVideoControls?: boolean;
|
|
3414
|
+
alwaysPlayInPreview?: boolean;
|
|
3410
3415
|
};
|
|
3411
3416
|
declare const ProductGallery: FC<ProductGalleryProps>;
|
|
3412
3417
|
|
|
@@ -3659,8 +3664,9 @@ interface ProductOrderItemProps {
|
|
|
3659
3664
|
finalPriceStyle?: react__default.CSSProperties;
|
|
3660
3665
|
isGift?: boolean;
|
|
3661
3666
|
isClub?: boolean;
|
|
3667
|
+
isPrincingStyleTestEnabled?: boolean;
|
|
3662
3668
|
}
|
|
3663
|
-
declare const SimpleOrderItem: ({ title, className, subtitle, midElement, image, price, tag, quantity, finalPriceStyle, isGift, isClub, }: ProductOrderItemProps) => JSX.Element;
|
|
3669
|
+
declare const SimpleOrderItem: ({ title, className, subtitle, midElement, image, price, tag, quantity, finalPriceStyle, isGift, isClub, isPrincingStyleTestEnabled, }: ProductOrderItemProps) => JSX.Element;
|
|
3664
3670
|
|
|
3665
3671
|
interface ProgressBarProps {
|
|
3666
3672
|
description?: string;
|
|
@@ -4588,6 +4594,10 @@ interface ProductGalleryMobileProps$3 {
|
|
|
4588
4594
|
selectedValue?: ContentType;
|
|
4589
4595
|
hasToPreserveOrder?: boolean;
|
|
4590
4596
|
itemsOnViewport?: number;
|
|
4597
|
+
videoAutoplay?: boolean;
|
|
4598
|
+
hideVideoControls?: boolean;
|
|
4599
|
+
videoMuted?: boolean;
|
|
4600
|
+
videoLoop?: boolean;
|
|
4591
4601
|
}
|
|
4592
4602
|
declare const ProductGalleryMobile: react__default.FC<ProductGalleryMobileProps$3>;
|
|
4593
4603
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("tslib"),r=require("@emotion/react/jsx-runtime"),i=require("react"),o=require("../../../SkeletonBox/SkeletonBox.js"),s=require("../../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.js");require("../../../atoms/HorizontalDivider/HorizontalDivider.js"),require("../../../atoms/Icon/Icon.js");var t=require("../../../atoms/Image/Image.js");require("../../../atoms/PriceLabel/PriceLabel.js"),require("../../../atoms/PriceLabelV2/PriceLabelV2.js"),require("react/jsx-runtime"),require("../../../atoms/Toggle/toggle.styled.js");var l=require("../../../buynowpaylater/BuyNowPayLater.js"),n=require("../../../club-price-label/ClubPriceLabel.js"),a=require("../../../shared/spacing/Spacing.js"),d=require("../../../strength-bars/StrengthBars.js"),c=require("../../../../core/theme/Theme.js"),u=require("../../../../hooks/WindowDimensions.js");require("../../../../utils/constants/offerAtCart.js");var g=require("../../../../utils/getSrcSet/getSrcSet.js");require("../../../../utils/media.js"),require("../../../../utils/mock-content/CancellationFlowAccordion.js");var j=require("../../../../types/enums.js");require("../../../PackSelectorV2/PackSelectoV2.js"),require("../../../absorbency-level/AbsorbencyLevel.js"),require("../../../accordion-options/AccordionOptions.js"),require("../../../accordion/Accordion.js"),require("../../../dropdown/variants/simple/SimpleDropdown.js");var m=require("../../../icons/index.js");require("../../../radio/input/styles.js"),require("../../../tooltip/Styled.js"),require("../../../autoship/styled.js"),require("../../../autoshipV2/styled.js"),require("../../../before-after/BeforeAfter.js"),require("../../../pricing/clubOffer/ClubOfferTag.js");var v=require("../../../pricing/discount/DiscountTag.js"),p=require("../../../pricing/price/PriceLabel.js"),q=require("../../../pricing/priceLabelV2/PriceLabelV2.js");require("../../../pricing/priceLabelV3/PriceLabelV3.js"),require("../../../pricing/priceLabelV5/PriceLabelV5.styled.js");var y=require("../../../pricing/styles.js");require("../../../pricing/priceLabelV6/PriceLabelV6.styled.js"),require("../../../shared/card/Card.js"),require("../../../bundle/minimalistic/styled.js"),require("../../../text/Text.js"),require("../../../bundle/motivator/styled.js"),require("../../../bundle/simple/Simple.js"),require("../../../offer-banner/OfferBanner.js"),require("../../../cartProductItem/CloseIcon/CloseButton.js"),require("../../../cartProductItem/Description/Description.js"),require("../../../cartProductItem/Promo/Promo.js"),require("../../../cartProductItem/Title/Title.js"),require("../../../cartProductItem/TrashIcon/styled.js"),require("../../../checkbox/Checkbox.js"),require("../../grid/WithProductGrid.js");var b=require("../../../pricing/priceLabelV4/PriceLabelV4.js"),h=require("../../../rating/Rating.js"),P=require("./constants.js"),S=require("./styled.js"),f=require("../../../icon-button/IconButton.js");require("../../../tag/variants/product/styled.js"),require("../truekind/styled.js"),require("../../../color/ColorRadioGroup.js"),require("../../../color/selector/PatternSelector.js"),require("../../../color/styles/ColorPickerwithTootip.styled.js"),require("../../../cross-sell/Checkbox/CrossSellCheckbox.js"),require("../../../cta/styled.js"),require("../../../delivery-details/DeliveryDetails.js"),require("../../../delivery-details/Note/Note.js"),require("../../../drawer/style.js"),require("../../../dropdown-list-icons/Styled.js"),require("../../../dropdown/size-dropdown/Styled.js"),require("../../../dropdown/variants/dialog/DropdownDialog.js"),require("../../../dropdown/base/BaseDropdown.js"),require("@headlessui/react"),require("../../../input/base/Error.js"),require("../../../shared/select/BaseSelect.js"),require("../../../dropdown/variants/smart/styled.js"),require("../../../filtering/Accordion.js"),require("../../../filtering/FiltersStyled.js"),require("../../../filtering/Tags/Tags.js"),require("../../../fit-guarantee/FitGuarantee.js"),require("../../../fit/FitPredictor.js"),require("../../../slider/ArrowButton.js"),require("../../../slider/StyledSlider.js"),require("../../../gallery/components/ImageSmallPreview/styled.js"),require("../../../gallery/components/ImagePreviewList/styled.js"),require("../../../molecules/Video/components/styled.js"),require("../../../molecules/Video/styled.js"),require("../../../gallery/components/ImageProductSlide/styled.js"),require("../../../gallery/styled.js"),require("../../../icon-button/amazonAndPaypal/AmazonPaypalButtons.js"),require("../../../iconsWithTitle/index.js"),require("../../../image-card/ImageCard.js"),require("../../../input/label/Label.js"),require("../../../input/base/Styled.js"),require("../../../input/custom/Custom.js"),require("../../../input/basePlusButton/BasePlusButton.js"),require("../../../input/basePlusIcon/BasePlusIcon.js"),require("../../../modal/Modal.js"),require("../../../motivator-progress-bar/MotivatorProgressBar.js"),require("../../../order-bar/OrderBar.js"),require("../../../packs/selector/PackSelector.js"),require("../../../pagination/styles.js"),require("../../../payment-methods/PaymentMethod.js"),require("../../../product/order/item/SimpleOrderItem.js"),require("../../../progress-bar/ProgressBar.js"),require("../../../quantityPicker/styled.js"),require("../../../radio/RadioPrimary/radioPrimary.js"),require("../../../radio/clubRadioInput/clubRadio.js"),require("../../../rating/starList/StarList.js"),require("../../../review-detail/ReviewDetail.js"),require("../../../review/Review.js"),require("../../../reviews-header/ReviewsHeader.js"),require("../../../scroll-to-top/ScrollToTop.js"),require("../../../search-bar/components/ClearButton/styled.js"),require("../../../search-bar/components/Footer/styled.js"),require("../../../search-bar/components/ProductItem/styled.js"),require("../../../search-bar/components/ResultsPanel/styled.js"),require("../../../search-bar/components/SearchControl/styled.js"),require("../../../search-bar/styled.js"),require("../../../search-navigation/styled.js"),require("react-dom"),require("../../../short-banner/ShortBanner.js"),require("../../../size-chart/styled.js"),require("../../../size-table/SizeTable.js"),require("../../../size/guide/SizeFitGuide.js"),require("../../../size/selector/styled.js"),require("../../../tabs/Tab.js"),require("../../../tabs/Tabs.js"),require("../../../tag/Tag.js"),require("@emotion/react"),require("../../../textWithImage/index.js"),require("../../../timer/styled.js"),require("../../../toast/Toast.js"),require("../../../totals/total/styled.js"),require("../../../totals/subtotal/Subtotal.js"),require("../../../tracking-progress-v2/TrackingProgressV2.js"),require("../../../tracking-progress/TrackingProgress.js"),require("../../../organisms/AutoshipOfferCard/AutoshipOfferCardItem.styled.js"),require("../../../organisms/AutoshipOfferCardCta/AutoshipOfferCardItem.styled.js"),require("../../../organisms/AutoshipPdpCard/AutoshipPdpCard.styled.js"),require("../../../organisms/BasicAccordion/BasicAccordion.js"),require("../../../organisms/CartItemCard/CartItem.js"),require("../../../organisms/ClubOfferSelector/styled.js"),require("../../../organisms/ClubOfferSelector2/styled.js"),require("../../../organisms/JoinClubCard/joinClubCard.js"),require("../../../organisms/OfferAtCart/styled.js"),require("../../../organisms/OfferAtCartV2/styled.js"),require("../../../organisms/OfferAtCartV3/styled.js"),require("../../../organisms/OfferAtCartV4/styled.js"),require("../../../organisms/OfferAtPDP/styled.js"),require("../../../organisms/OfferAtPDP/types.js"),require("../../../organisms/ProductCard/ProductCardV1/ProductCard.js"),require("../../../organisms/ProductCard/ProductCardV2/styled.js"),require("../../../organisms/ProductCard/ProductCardV3/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV2/ProductGalleryMobileV2.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV3/ProductGalleryMobileV3.js"),require("@ant-design/react-slick"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/ContentGallery/styled.js"),require("react-inner-image-zoom"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/MainContent/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/Slider/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV5/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV6/ColorVariantsGallery/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV6/styled.js"),require("../../../organisms/SizeCharTable/SizeChartTableV2/styled.js"),require("../../../organisms/SizeCharTable/SizeChartTableV3/styled.js"),require("../../../molecules/ArrowTip/ArrowTip.styled.js"),require("../../../organisms/SizeCharTable/SizeChartTableV4/SizeChartTableV4.styled.js"),require("../../../organisms/SubscriptionPlanSelector/styled.js"),require("../../../organisms/TwoCtasAtCart/Greeting.styled.js"),require("../../../organisms/TwoCtasAtCart/Card.styled.js"),require("../../../molecules/OfferAtCartBenefits/OfferAtCartBenefits.styled.js"),require("../../../molecules/OfferAtCartImage/OfferAtCartImage.styled.js"),require("../../../molecules/CouponCard/styled.js"),require("../../../molecules/BenefitsList/styled.js"),require("../../../molecules/HurryUp/styled.js"),require("../../../molecules/Spinner/styled.js"),require("../../../molecules/IconsWithTitleList/IconsWithTitleList.styled.js");var C=require("../../../molecules/LikeButton/LikeButton.js");require("../../../molecules/ScarcityTag/ScarcityTag.styled.js");module.exports=function(x){var z,w,T,L,k,I,V,M,B,D,G,A=x.title,_=x.image,O=x.imageHover,F=x.price,R=x.rating,N=x.hideRating,W=void 0!==N&&N,E=x.size,H=x.alignName,Y=void 0===H?"center":H,J=x.url,K=x.className,Q=x.topTag,U=x.bottomTag,X=x.onClick,Z=x.priceDisplayType,$=void 0===Z?"default":Z,ee=x.priceAtBottom,re=x.ratingOnTop,ie=x.priceLoading,oe=x.noFollow,se=void 0!==oe&&oe,te=x.colorPicker,le=void 0===te?{display:!1,position:"top",component:void 0,componentContainerProps:{position:"absolute",top:"4px",right:"4px",padding:"0px",boxSizing:"border-box",zIndex:1}}:te,ne=x.isBNPL,ae=void 0===ne?{displayBNPL:!1,installments:4,installmentPrice:"",iconFolder:"PDP",iconName:"Klarna",showLogo:!0,iconColor:"#292929",fontSize:"12px"}:ne,de=x.hasStrength,ce=void 0===de?{strength:-1,description:""}:de,ue=x.clubPrice,ge=void 0===ue?"":ue,je=x.showClubPriceLabel,me=void 0!==je&&je,ve=x.isRatingLoading,pe=x.version,qe=void 0===pe?1:pe,ye=x.showDiscountPercentageTag,be=void 0!==ye&&ye,he=x.discountTagLoading,Pe=x.discountTag,Se=x.isOnViewport,fe=void 0!==Se&&Se,Ce=x.hasDefaultSize,xe=void 0!==Ce&&Ce,ze=x.clubOffer,we=x.likeBtn,Te=x.onClickBottomButton,Le=x.showDecimals,ke=void 0===Le||Le,Ie=x.showDivider,Ve=void 0!==Ie&&Ie,Me=x.invertPriceDirection,Be=void 0!==Me&&Me,De=x.priceAndReviewInOneLine,Ge=void 0!==De&&De,Ae=x.priceAndDiscountTagInOneLine,_e=void 0!==Ae&&Ae,Oe=c.useTheme(),Fe=S.getStylesBySize(E),Re=u.useWindowDimensions().isMobile,Ne=i.useMemo((function(){var e;return(e={},e[j.ComponentSize.Large]=8,e[j.ComponentSize.Medium]=4,e[j.ComponentSize.Small]=2,e)[E]}),[E]),We=function(i){var o,t,l,n,a,d;if(void 0===i&&(i=qe),"hidden"===$)return null;switch(i){case 4:return"styled"===$?r.jsx(b.PriceLabelV4,{finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount-v4",clubStyle:me,clubPrice:ge,styledPrice:!0,finalPriceStyle:me?Re?{fontSize:"12px",fontWeight:700,color:null===(t=Oe.colors.pallete.brickRed)||void 0===t?void 0:t.color}:{fontSize:"16px",fontWeight:700,color:null===(o=Oe.colors.pallete.brickRed)||void 0===o?void 0:o.color}:void 0},void 0):r.jsx(b.PriceLabelV4,{finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount-v4",clubStyle:me,clubPrice:ge,finalPriceStyle:me?Re?{fontSize:"12px",fontWeight:700,color:null===(n=Oe.colors.pallete.brickRed)||void 0===n?void 0:n.color}:{fontSize:"16px",fontWeight:700,color:null===(l=Oe.colors.pallete.brickRed)||void 0===l?void 0:l.color}:void 0},void 0);case 5:return r.jsx(S.ClubOfferPriceLabelWrapper,e.__assign({style:null==ze?void 0:ze.wrapperStyle},{children:r.jsx(s.ClubPriceMemberLabel,{isClub:!0,isPDP:!0,finalPrice:null===(a=null==ze?void 0:ze.price)||void 0===a?void 0:a.finalPrice,originalPrice:null===(d=null==ze?void 0:ze.price)||void 0===d?void 0:d.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount-v4",clubStyle:me,icon:null==ze?void 0:ze.clubOfferIcon,isCollections:null==ze?void 0:ze.isCollections},void 0)}),void 0);default:return"styled"===$?r.jsx(q.PriceLabelV2,{finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Large,testId:"volume-discount",showDecimals:ke},void 0):r.jsx(p.PriceLabel,{invertDirection:Be,finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount",clubStyle:me,finalPriceStyle:me?Re?{fontSize:"12px",fontWeight:700}:{fontSize:"16px",fontWeight:700}:void 0},void 0)}},Ee=function(){return W||!R.reviews&&!R.rating?r.jsx(r.Fragment,{},void 0):ve?r.jsx(o,{height:"20px",width:"80px"},void 0):r.jsx(h.Rating,{size:E===j.ComponentSize.Large?j.ComponentSize.Small:j.ComponentSize.XSmall,rating:R.rating,reviews:null==R?void 0:R.reviews,reviewsText:"",wrapWithParenthesis:!0},void 0)},He=i.useState(null!==(z=null==we?void 0:we.isLiked)&&void 0!==z&&z),Ye=He[0],Je=He[1],Ke=i.useState(null!==(w=null==we?void 0:we.likes)&&void 0!==w?w:0),Qe=Ke[0],Ue=Ke[1],Xe=_e?S.InlineContainer:i.Fragment;return r.jsxs(S.ProdCardContainer,e.__assign({className:K,"data-testid":"product-card-container-div"},{children:["corner"===le.position&&r.jsx(S.CornerContainer,e.__assign({},le.componentContainerProps,{children:le.component}),void 0),r.jsxs(S.Container,e.__assign({as:J?"a":"div",href:J,rel:se?"nofollow":"",className:"picContainer",onClick:X},{children:[!!we&&r.jsx(C.LikeButton,{isLiked:Ye,likes:Qe,onClick:function(e){e.stopPropagation(),Ue(Ye?function(e){return e-1}:function(e){return e+1}),Je((function(e){return!e})),null==we||we.onClick(e)},colors:{background:{active:null!==(k=null===(L=null===(T=we.colors)||void 0===T?void 0:T.background)||void 0===L?void 0:L.active)&&void 0!==k?k:Oe.colors.shades.white.color,hover:null!==(G=null!==(M=null===(V=null===(I=we.colors)||void 0===I?void 0:I.background)||void 0===V?void 0:V.hover)&&void 0!==M?M:null===(D=null===(B=we.colors)||void 0===B?void 0:B.background)||void 0===D?void 0:D.active)&&void 0!==G?G:Oe.colors.shades.white.color}}},void 0),Q||U?r.jsxs(S.ImageContainer,e.__assign({width:null==Fe?void 0:Fe.width,height:null==Fe?void 0:Fe.height,"data-testid":"tags-image-container"},{children:[r.jsx(t.Image,{src:_.src,srcSet:g.getSrcSet(_.src,180,360,720,960),alt:_.alt,width:xe?null==Fe?void 0:Fe.width:"100%",height:xe?null==Fe?void 0:Fe.height:"100%",loading:fe?"eager":"lazy",decoding:fe?"sync":"async",borderRadius:P.STYLES_BY_THEME[Oe.name].image.borderRadius},void 0),r.jsx(S.TopTagContainer,e.__assign({style:{width:le.display?"100%":"inherit"}},{children:Q}),void 0),r.jsx(S.BottomTagContainer,e.__assign({style:{width:le.display?"100%":"inherit"}},{children:U}),void 0)]}),void 0):r.jsx(t.Image,{src:_.src,srcSet:g.getSrcSet(_.src,180,360,720,960),alt:_.alt,width:null==Fe?void 0:Fe.width,height:null==Fe?void 0:Fe.height,loading:fe?"eager":"lazy",decoding:fe?"sync":"async",borderRadius:P.STYLES_BY_THEME[Oe.name].image.borderRadius},void 0),O?r.jsx(S.ImageHoverContainer,{className:"hover__image",src:O.src,srcSet:g.getSrcSet(O.src,180,360,720,960),loading:"lazy",decoding:"async",alt:O.alt,width:null==Fe?void 0:Fe.width,height:null==Fe?void 0:Fe.height},void 0):null]}),void 0),le.display&&"top"===le.position&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),le.component]},void 0),re&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(Ee,{},void 0)]},void 0),r.jsxs(S.Container,e.__assign({as:J?"a":"div",href:J,rel:se?"nofollow":"",onClick:X,className:"textContainer",style:{alignItems:me?"flex-start":"center"}},{children:[r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(S.Title,e.__assign({theme:Oe,align:me?"left":Y,"data-testid":"product-card-title"},{children:A}),void 0),r.jsx(a.Spacing,{size:Ne},void 0),Ve&&r.jsxs(r.Fragment,{children:[r.jsx(S.Divider,{theme:Oe},void 0),r.jsx(a.Spacing,{size:Ne},void 0)]},void 0),ce&&-1!==ce.strength&&r.jsxs(r.Fragment,{children:[r.jsx(d.StrengthBars,{barsFilled:ce.strength,supportText:ce.description},void 0),r.jsx(a.Spacing,{size:10},void 0)]},void 0),ee&&!re?r.jsxs(r.Fragment,{children:[r.jsx(Ee,{},void 0),r.jsx(a.Spacing,{size:Ne},void 0),r.jsxs(S.MarginTopContainer,e.__assign({style:{marginTop:(null==ze?void 0:ze.isClubOffer)?0:8}},{children:[ie?r.jsx(o,{height:"20px",width:"140px"},void 0):We(),(null==ze?void 0:ze.isClubOffer)&&We(5)]}),void 0)]},void 0):r.jsxs(r.Fragment,{children:[r.jsxs(Xe,{children:[ie?r.jsx(o,{height:"20px",width:"140px"},void 0):Ge&&!re?r.jsxs(S.OneLineInfoWrapper,{children:[We(),r.jsx(Ee,{},void 0)]},void 0):r.jsxs(r.Fragment,{children:[!(null==ze?void 0:ze.isClubMember)&&We(),(null==ze?void 0:ze.isClubOffer)&&We(5),r.jsx(l.BuyNowPayLater,{displayBNPL:null==ae?void 0:ae.displayBNPL,installments:(null==ae?void 0:ae.installments)||0,installmentPrice:(null==ae?void 0:ae.installmentPrice)||"",iconFolder:null==ae?void 0:ae.iconFolder,iconName:(null==ae?void 0:ae.iconName)||"",showLogo:null==ae?void 0:ae.showLogo,iconColor:null==ae?void 0:ae.iconColor,fontSize:null==ae?void 0:ae.fontSize},void 0)]},void 0),me&&r.jsx(n.ClubPriceLabel,{clubPrice:ge},void 0),he?r.jsx(o,{height:"22px",width:"75px"},void 0):be&&r.jsx(y.TagContainer,e.__assign({size:j.ComponentSize.Small},{children:Pe&&r.jsx(v.DiscountTag,e.__assign({},Pe,{size:j.ComponentSize.Medium,style:{letterSpacing:"-0.05rem"}}),void 0)}),void 0)]},void 0),r.jsx(a.Spacing,{size:Ne},void 0),!re&&!Ge&&r.jsx(Ee,{},void 0)]},void 0),!!Te&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(a.Spacing,{size:Ne},void 0),r.jsxs(f.IconButton,e.__assign({size:j.ComponentSize.Small,width:"100%",onClick:function(e){e.preventDefault(),e.stopPropagation(),null==Te||Te(e)},backgroundColor:{active:"transparent",hover:"transparent"},hasText:!0,rounded:!1,border:"1px solid #D1D1D1"},{children:[r.jsx(m.Icon.Custom.Eye,{fill:"black",width:"16px",height:"16px"},void 0),r.jsx("span",e.__assign({style:{color:"black",fontSize:"14px"}},{children:"Quick View"}),void 0)]}),void 0)]},void 0)]}),void 0),le.display&&"bottom"===le.position&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),le.component]},void 0)]}),void 0)};
|
|
1
|
+
"use strict";var e=require("tslib"),r=require("@emotion/react/jsx-runtime"),i=require("react"),o=require("../../../SkeletonBox/SkeletonBox.js"),s=require("../../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.js");require("../../../atoms/HorizontalDivider/HorizontalDivider.js"),require("../../../atoms/Icon/Icon.js");var t=require("../../../atoms/Image/Image.js");require("../../../atoms/PriceLabel/PriceLabel.js"),require("../../../atoms/PriceLabelV2/PriceLabelV2.js"),require("react/jsx-runtime"),require("../../../atoms/Toggle/toggle.styled.js");var l=require("../../../buynowpaylater/BuyNowPayLater.js"),n=require("../../../club-price-label/ClubPriceLabel.js"),a=require("../../../shared/spacing/Spacing.js"),d=require("../../../strength-bars/StrengthBars.js"),c=require("../../../../core/theme/Theme.js"),u=require("../../../../hooks/WindowDimensions.js");require("../../../../utils/constants/offerAtCart.js");var g=require("../../../../utils/getSrcSet/getSrcSet.js");require("../../../../utils/media.js"),require("../../../../utils/mock-content/CancellationFlowAccordion.js");var j=require("../../../../types/enums.js");require("../../../PackSelectorV2/PackSelectoV2.js"),require("../../../absorbency-level/AbsorbencyLevel.js"),require("../../../accordion-options/AccordionOptions.js"),require("../../../accordion/Accordion.js"),require("../../../dropdown/variants/simple/SimpleDropdown.js");var m=require("../../../icons/index.js");require("../../../radio/input/styles.js"),require("../../../tooltip/Styled.js"),require("../../../autoship/styled.js"),require("../../../autoshipV2/styled.js"),require("../../../before-after/BeforeAfter.js"),require("../../../pricing/clubOffer/ClubOfferTag.js");var v=require("../../../pricing/discount/DiscountTag.js"),p=require("../../../pricing/price/PriceLabel.js"),q=require("../../../pricing/priceLabelV2/PriceLabelV2.js");require("../../../pricing/priceLabelV3/PriceLabelV3.js"),require("../../../pricing/priceLabelV5/PriceLabelV5.styled.js");var y=require("../../../pricing/styles.js");require("../../../pricing/priceLabelV6/PriceLabelV6.styled.js"),require("../../../shared/card/Card.js"),require("../../../bundle/minimalistic/styled.js"),require("../../../text/Text.js"),require("../../../bundle/motivator/styled.js"),require("../../../bundle/simple/Simple.js"),require("../../../offer-banner/OfferBanner.js"),require("../../../cartProductItem/CloseIcon/CloseButton.js"),require("../../../cartProductItem/Description/Description.js"),require("../../../cartProductItem/Promo/Promo.js"),require("../../../cartProductItem/Title/Title.js"),require("../../../cartProductItem/TrashIcon/styled.js"),require("../../../checkbox/Checkbox.js"),require("../../grid/WithProductGrid.js");var b=require("../../../pricing/priceLabelV4/PriceLabelV4.js"),h=require("../../../rating/Rating.js"),P=require("./constants.js"),S=require("./styled.js"),f=require("../../../icon-button/IconButton.js");require("../../../tag/variants/product/styled.js"),require("../truekind/styled.js"),require("../../../color/ColorRadioGroup.js"),require("../../../color/selector/PatternSelector.js"),require("../../../color/styles/ColorPickerwithTootip.styled.js"),require("../../../cross-sell/Checkbox/CrossSellCheckbox.js"),require("../../../cta/styled.js"),require("../../../delivery-details/DeliveryDetails.js"),require("../../../delivery-details/Note/Note.js"),require("../../../drawer/style.js"),require("../../../dropdown-list-icons/Styled.js"),require("../../../dropdown/size-dropdown/Styled.js"),require("../../../dropdown/variants/dialog/DropdownDialog.js"),require("../../../dropdown/base/BaseDropdown.js"),require("@headlessui/react"),require("../../../input/base/Error.js"),require("../../../shared/select/BaseSelect.js"),require("../../../dropdown/variants/smart/styled.js"),require("../../../filtering/Accordion.js"),require("../../../filtering/FiltersStyled.js"),require("../../../filtering/Tags/Tags.js"),require("../../../fit-guarantee/FitGuarantee.js"),require("../../../fit/FitPredictor.js"),require("../../../molecules/Video/components/styled.js"),require("../../../molecules/Video/styled.js"),require("../../../slider/ArrowButton.js"),require("../../../slider/StyledSlider.js"),require("../../../gallery/components/ImageSmallPreview/styled.js"),require("../../../gallery/components/ImagePreviewList/styled.js"),require("../../../gallery/components/ImageProductSlide/styled.js"),require("../../../gallery/styled.js"),require("../../../icon-button/amazonAndPaypal/AmazonPaypalButtons.js"),require("../../../iconsWithTitle/index.js"),require("../../../image-card/ImageCard.js"),require("../../../input/label/Label.js"),require("../../../input/base/Styled.js"),require("../../../input/custom/Custom.js"),require("../../../input/basePlusButton/BasePlusButton.js"),require("../../../input/basePlusIcon/BasePlusIcon.js"),require("../../../modal/Modal.js"),require("../../../motivator-progress-bar/MotivatorProgressBar.js"),require("../../../order-bar/OrderBar.js"),require("../../../packs/selector/PackSelector.js"),require("../../../pagination/styles.js"),require("../../../payment-methods/PaymentMethod.js"),require("../../../product/order/item/SimpleOrderItem.js"),require("../../../progress-bar/ProgressBar.js"),require("../../../quantityPicker/styled.js"),require("../../../radio/RadioPrimary/radioPrimary.js"),require("../../../radio/clubRadioInput/clubRadio.js"),require("../../../rating/starList/StarList.js"),require("../../../review-detail/ReviewDetail.js"),require("../../../review/Review.js"),require("../../../reviews-header/ReviewsHeader.js"),require("../../../scroll-to-top/ScrollToTop.js"),require("../../../search-bar/components/ClearButton/styled.js"),require("../../../search-bar/components/Footer/styled.js"),require("../../../search-bar/components/ProductItem/styled.js"),require("../../../search-bar/components/ResultsPanel/styled.js"),require("../../../search-bar/components/SearchControl/styled.js"),require("../../../search-bar/styled.js"),require("../../../search-navigation/styled.js"),require("react-dom"),require("../../../short-banner/ShortBanner.js"),require("../../../size-chart/styled.js"),require("../../../size-table/SizeTable.js"),require("../../../size/guide/SizeFitGuide.js"),require("../../../size/selector/styled.js"),require("../../../tabs/Tab.js"),require("../../../tabs/Tabs.js"),require("../../../tag/Tag.js"),require("@emotion/react"),require("../../../textWithImage/index.js"),require("../../../timer/styled.js"),require("../../../toast/Toast.js"),require("../../../totals/total/styled.js"),require("../../../totals/subtotal/Subtotal.js"),require("../../../tracking-progress-v2/TrackingProgressV2.js"),require("../../../tracking-progress/TrackingProgress.js"),require("../../../organisms/AutoshipOfferCard/AutoshipOfferCardItem.styled.js"),require("../../../organisms/AutoshipOfferCardCta/AutoshipOfferCardItem.styled.js"),require("../../../organisms/AutoshipPdpCard/AutoshipPdpCard.styled.js"),require("../../../organisms/BasicAccordion/BasicAccordion.js"),require("../../../organisms/CartItemCard/CartItem.js"),require("../../../organisms/ClubOfferSelector/styled.js"),require("../../../organisms/ClubOfferSelector2/styled.js"),require("../../../organisms/JoinClubCard/joinClubCard.js"),require("../../../organisms/OfferAtCart/styled.js"),require("../../../organisms/OfferAtCartV2/styled.js"),require("../../../organisms/OfferAtCartV3/styled.js"),require("../../../organisms/OfferAtCartV4/styled.js"),require("../../../organisms/OfferAtPDP/styled.js"),require("../../../organisms/OfferAtPDP/types.js"),require("../../../organisms/ProductCard/ProductCardV1/ProductCard.js"),require("../../../organisms/ProductCard/ProductCardV2/styled.js"),require("../../../organisms/ProductCard/ProductCardV3/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV2/ProductGalleryMobileV2.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV3/ProductGalleryMobileV3.js"),require("@ant-design/react-slick"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/ContentGallery/styled.js"),require("react-inner-image-zoom"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/MainContent/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/Slider/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV5/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV6/ColorVariantsGallery/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV6/styled.js"),require("../../../organisms/SizeCharTable/SizeChartTableV2/styled.js"),require("../../../organisms/SizeCharTable/SizeChartTableV3/styled.js"),require("../../../molecules/ArrowTip/ArrowTip.styled.js"),require("../../../organisms/SizeCharTable/SizeChartTableV4/SizeChartTableV4.styled.js"),require("../../../organisms/SubscriptionPlanSelector/styled.js"),require("../../../organisms/TwoCtasAtCart/Greeting.styled.js"),require("../../../organisms/TwoCtasAtCart/Card.styled.js"),require("../../../molecules/OfferAtCartBenefits/OfferAtCartBenefits.styled.js"),require("../../../molecules/OfferAtCartImage/OfferAtCartImage.styled.js"),require("../../../molecules/CouponCard/styled.js"),require("../../../molecules/BenefitsList/styled.js"),require("../../../molecules/HurryUp/styled.js"),require("../../../molecules/Spinner/styled.js"),require("../../../molecules/IconsWithTitleList/IconsWithTitleList.styled.js");var C=require("../../../molecules/LikeButton/LikeButton.js");require("../../../molecules/ScarcityTag/ScarcityTag.styled.js");module.exports=function(x){var z,w,T,L,k,I,V,M,B,D,G,A=x.title,_=x.image,O=x.imageHover,F=x.price,R=x.rating,N=x.hideRating,W=void 0!==N&&N,E=x.size,H=x.alignName,Y=void 0===H?"center":H,J=x.url,K=x.className,Q=x.topTag,U=x.bottomTag,X=x.onClick,Z=x.priceDisplayType,$=void 0===Z?"default":Z,ee=x.priceAtBottom,re=x.ratingOnTop,ie=x.priceLoading,oe=x.noFollow,se=void 0!==oe&&oe,te=x.colorPicker,le=void 0===te?{display:!1,position:"top",component:void 0,componentContainerProps:{position:"absolute",top:"4px",right:"4px",padding:"0px",boxSizing:"border-box",zIndex:1}}:te,ne=x.isBNPL,ae=void 0===ne?{displayBNPL:!1,installments:4,installmentPrice:"",iconFolder:"PDP",iconName:"Klarna",showLogo:!0,iconColor:"#292929",fontSize:"12px"}:ne,de=x.hasStrength,ce=void 0===de?{strength:-1,description:""}:de,ue=x.clubPrice,ge=void 0===ue?"":ue,je=x.showClubPriceLabel,me=void 0!==je&&je,ve=x.isRatingLoading,pe=x.version,qe=void 0===pe?1:pe,ye=x.showDiscountPercentageTag,be=void 0!==ye&&ye,he=x.discountTagLoading,Pe=x.discountTag,Se=x.isOnViewport,fe=void 0!==Se&&Se,Ce=x.hasDefaultSize,xe=void 0!==Ce&&Ce,ze=x.clubOffer,we=x.likeBtn,Te=x.onClickBottomButton,Le=x.showDecimals,ke=void 0===Le||Le,Ie=x.showDivider,Ve=void 0!==Ie&&Ie,Me=x.invertPriceDirection,Be=void 0!==Me&&Me,De=x.priceAndReviewInOneLine,Ge=void 0!==De&&De,Ae=x.priceAndDiscountTagInOneLine,_e=void 0!==Ae&&Ae,Oe=c.useTheme(),Fe=S.getStylesBySize(E),Re=u.useWindowDimensions().isMobile,Ne=i.useMemo((function(){var e;return(e={},e[j.ComponentSize.Large]=8,e[j.ComponentSize.Medium]=4,e[j.ComponentSize.Small]=2,e)[E]}),[E]),We=function(i){var o,t,l,n,a,d;if(void 0===i&&(i=qe),"hidden"===$)return null;switch(i){case 4:return"styled"===$?r.jsx(b.PriceLabelV4,{finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount-v4",clubStyle:me,clubPrice:ge,styledPrice:!0,finalPriceStyle:me?Re?{fontSize:"12px",fontWeight:700,color:null===(t=Oe.colors.pallete.brickRed)||void 0===t?void 0:t.color}:{fontSize:"16px",fontWeight:700,color:null===(o=Oe.colors.pallete.brickRed)||void 0===o?void 0:o.color}:void 0},void 0):r.jsx(b.PriceLabelV4,{finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount-v4",clubStyle:me,clubPrice:ge,finalPriceStyle:me?Re?{fontSize:"12px",fontWeight:700,color:null===(n=Oe.colors.pallete.brickRed)||void 0===n?void 0:n.color}:{fontSize:"16px",fontWeight:700,color:null===(l=Oe.colors.pallete.brickRed)||void 0===l?void 0:l.color}:void 0},void 0);case 5:return r.jsx(S.ClubOfferPriceLabelWrapper,e.__assign({style:null==ze?void 0:ze.wrapperStyle},{children:r.jsx(s.ClubPriceMemberLabel,{isClub:!0,isPDP:!0,finalPrice:null===(a=null==ze?void 0:ze.price)||void 0===a?void 0:a.finalPrice,originalPrice:null===(d=null==ze?void 0:ze.price)||void 0===d?void 0:d.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount-v4",clubStyle:me,icon:null==ze?void 0:ze.clubOfferIcon,isCollections:null==ze?void 0:ze.isCollections},void 0)}),void 0);default:return"styled"===$?r.jsx(q.PriceLabelV2,{finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Large,testId:"volume-discount",showDecimals:ke},void 0):r.jsx(p.PriceLabel,{invertDirection:Be,finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount",clubStyle:me,finalPriceStyle:me?Re?{fontSize:"12px",fontWeight:700}:{fontSize:"16px",fontWeight:700}:void 0},void 0)}},Ee=function(){return W||!R.reviews&&!R.rating?r.jsx(r.Fragment,{},void 0):ve?r.jsx(o,{height:"20px",width:"80px"},void 0):r.jsx(h.Rating,{size:E===j.ComponentSize.Large?j.ComponentSize.Small:j.ComponentSize.XSmall,rating:R.rating,reviews:null==R?void 0:R.reviews,reviewsText:"",wrapWithParenthesis:!0},void 0)},He=i.useState(null!==(z=null==we?void 0:we.isLiked)&&void 0!==z&&z),Ye=He[0],Je=He[1],Ke=i.useState(null!==(w=null==we?void 0:we.likes)&&void 0!==w?w:0),Qe=Ke[0],Ue=Ke[1],Xe=_e?S.InlineContainer:i.Fragment;return r.jsxs(S.ProdCardContainer,e.__assign({className:K,"data-testid":"product-card-container-div"},{children:["corner"===le.position&&r.jsx(S.CornerContainer,e.__assign({},le.componentContainerProps,{children:le.component}),void 0),r.jsxs(S.Container,e.__assign({as:J?"a":"div",href:J,rel:se?"nofollow":"",className:"picContainer",onClick:X},{children:[!!we&&r.jsx(C.LikeButton,{isLiked:Ye,likes:Qe,onClick:function(e){e.stopPropagation(),Ue(Ye?function(e){return e-1}:function(e){return e+1}),Je((function(e){return!e})),null==we||we.onClick(e)},colors:{background:{active:null!==(k=null===(L=null===(T=we.colors)||void 0===T?void 0:T.background)||void 0===L?void 0:L.active)&&void 0!==k?k:Oe.colors.shades.white.color,hover:null!==(G=null!==(M=null===(V=null===(I=we.colors)||void 0===I?void 0:I.background)||void 0===V?void 0:V.hover)&&void 0!==M?M:null===(D=null===(B=we.colors)||void 0===B?void 0:B.background)||void 0===D?void 0:D.active)&&void 0!==G?G:Oe.colors.shades.white.color}}},void 0),Q||U?r.jsxs(S.ImageContainer,e.__assign({width:null==Fe?void 0:Fe.width,height:null==Fe?void 0:Fe.height,"data-testid":"tags-image-container"},{children:[r.jsx(t.Image,{src:_.src,srcSet:g.getSrcSet(_.src,180,360,720,960),alt:_.alt,width:xe?null==Fe?void 0:Fe.width:"100%",height:xe?null==Fe?void 0:Fe.height:"100%",loading:fe?"eager":"lazy",decoding:fe?"sync":"async",borderRadius:P.STYLES_BY_THEME[Oe.name].image.borderRadius},void 0),r.jsx(S.TopTagContainer,e.__assign({style:{width:le.display?"100%":"inherit"}},{children:Q}),void 0),r.jsx(S.BottomTagContainer,e.__assign({style:{width:le.display?"100%":"inherit"}},{children:U}),void 0)]}),void 0):r.jsx(t.Image,{src:_.src,srcSet:g.getSrcSet(_.src,180,360,720,960),alt:_.alt,width:null==Fe?void 0:Fe.width,height:null==Fe?void 0:Fe.height,loading:fe?"eager":"lazy",decoding:fe?"sync":"async",borderRadius:P.STYLES_BY_THEME[Oe.name].image.borderRadius},void 0),O?r.jsx(S.ImageHoverContainer,{className:"hover__image",src:O.src,srcSet:g.getSrcSet(O.src,180,360,720,960),loading:"lazy",decoding:"async",alt:O.alt,width:null==Fe?void 0:Fe.width,height:null==Fe?void 0:Fe.height},void 0):null]}),void 0),le.display&&"top"===le.position&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),le.component]},void 0),re&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(Ee,{},void 0)]},void 0),r.jsxs(S.Container,e.__assign({as:J?"a":"div",href:J,rel:se?"nofollow":"",onClick:X,className:"textContainer",style:{alignItems:me?"flex-start":"center"}},{children:[r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(S.Title,e.__assign({theme:Oe,align:me?"left":Y,"data-testid":"product-card-title"},{children:A}),void 0),r.jsx(a.Spacing,{size:Ne},void 0),Ve&&r.jsxs(r.Fragment,{children:[r.jsx(S.Divider,{theme:Oe},void 0),r.jsx(a.Spacing,{size:Ne},void 0)]},void 0),ce&&-1!==ce.strength&&r.jsxs(r.Fragment,{children:[r.jsx(d.StrengthBars,{barsFilled:ce.strength,supportText:ce.description},void 0),r.jsx(a.Spacing,{size:10},void 0)]},void 0),ee&&!re?r.jsxs(r.Fragment,{children:[r.jsx(Ee,{},void 0),r.jsx(a.Spacing,{size:Ne},void 0),r.jsxs(S.MarginTopContainer,e.__assign({style:{marginTop:(null==ze?void 0:ze.isClubOffer)?0:8}},{children:[ie?r.jsx(o,{height:"20px",width:"140px"},void 0):We(),(null==ze?void 0:ze.isClubOffer)&&We(5)]}),void 0)]},void 0):r.jsxs(r.Fragment,{children:[r.jsxs(Xe,{children:[ie?r.jsx(o,{height:"20px",width:"140px"},void 0):Ge&&!re?r.jsxs(S.OneLineInfoWrapper,{children:[We(),r.jsx(Ee,{},void 0)]},void 0):r.jsxs(r.Fragment,{children:[!(null==ze?void 0:ze.isClubMember)&&We(),(null==ze?void 0:ze.isClubOffer)&&We(5),r.jsx(l.BuyNowPayLater,{displayBNPL:null==ae?void 0:ae.displayBNPL,installments:(null==ae?void 0:ae.installments)||0,installmentPrice:(null==ae?void 0:ae.installmentPrice)||"",iconFolder:null==ae?void 0:ae.iconFolder,iconName:(null==ae?void 0:ae.iconName)||"",showLogo:null==ae?void 0:ae.showLogo,iconColor:null==ae?void 0:ae.iconColor,fontSize:null==ae?void 0:ae.fontSize},void 0)]},void 0),me&&r.jsx(n.ClubPriceLabel,{clubPrice:ge},void 0),he?r.jsx(o,{height:"22px",width:"75px"},void 0):be&&r.jsx(y.TagContainer,e.__assign({size:j.ComponentSize.Small},{children:Pe&&r.jsx(v.DiscountTag,e.__assign({},Pe,{size:j.ComponentSize.Medium,style:{letterSpacing:"-0.05rem"}}),void 0)}),void 0)]},void 0),r.jsx(a.Spacing,{size:Ne},void 0),!re&&!Ge&&r.jsx(Ee,{},void 0)]},void 0),!!Te&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(a.Spacing,{size:Ne},void 0),r.jsxs(f.IconButton,e.__assign({size:j.ComponentSize.Small,width:"100%",onClick:function(e){e.preventDefault(),e.stopPropagation(),null==Te||Te(e)},backgroundColor:{active:"transparent",hover:"transparent"},hasText:!0,rounded:!1,border:"1px solid #D1D1D1"},{children:[r.jsx(m.Icon.Custom.Eye,{fill:"black",width:"16px",height:"16px"},void 0),r.jsx("span",e.__assign({style:{color:"black",fontSize:"14px"}},{children:"Quick View"}),void 0)]}),void 0)]},void 0)]}),void 0),le.display&&"bottom"===le.position&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),le.component]},void 0)]}),void 0)};
|
|
2
2
|
//# sourceMappingURL=ProductItemMobile.js.map
|
|
@@ -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"),t=require("react"),o=require("./components/ImagePreviewList/ImagePreviewList.js"),r=require("./components/ImageProductSlide/ImageProductSlide.js"),a=require("./styled.js");exports.ProductGallery=function(s){var d=s.images,n=s.selectedValue,u=s.topTag,v=s.topRightTag,l=s.bottomTag,c=s.productImageDataTestId,m=s.previewListDataTestId,g=s.thumbnailPosition,w=s.borderRadiusVariant,p=void 0!==w&&w,I=s.previewImgBorderColor,P=s.ctaText,h=s.ctaAction,f=s.hideCTA,T=void 0===f||f,x=s.hasOverflowArrows,b=void 0!==x&&x,q=s.withZoom,y=void 0===q||q,j=s.hasToPreserveOrder,A=void 0!==j&&j,C=s.isRatioSquare,O=s.itemsOnViewport,R=void 0===O?6:O,V=s.videoAutoplay,S=void 0!==V&&V,L=s.videoInPreview,_=void 0!==L&&L,B=s.hideVideoControls,D=void 0!==B&&B,Z=s.alwaysPlayInPreview,k=void 0!==Z&&Z,E=t.useState(function(e,i){if(i){var t=e.indexOf(i);return t>-1?t:0}return 0}(d,n)),G=E[0],M=E[1];if(t.useEffect((function(){if(n&&!A){var e=d.indexOf(n);e>-1&&M(e)}}),[n,A]),0===d.length)return null;var z=d[G];return i.jsxs(a.Container,e.__assign({thumbnailPosition:g},{children:[i.jsx(o.ImagePreviewList,{images:d,selectedImage:z,dataTestId:m,onClick:function(e){M(e)},position:g,borderRadiusVariant:p,previewImgBorderColor:I,hasOverflowArrows:b,isRatioSquare:C,itemsOnViewport:R,videoInPreview:_,alwaysPlayInPreview:k},void 0),i.jsx(r.ImageProductSlide,{content:z,topTag:u,topRightTag:v,bottomTag:l,testId:c,position:g,borderRadiusVariant:p,ctaText:P,ctaAction:h,hideCTA:T,withZoom:y,isRatioSquare:C,videoAutoplay:S,hideVideoControls:D},void 0)]}),void 0)};
|
|
2
2
|
//# sourceMappingURL=ProductGallery.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("../../../slider/SliderNavigation.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("../../../molecules/Video/Video.js"),o=require("../../../slider/SliderNavigation.js"),a=require("../ImageSmallPreview/ImageSmallPreview.js"),t=require("./styled.js"),n=function(e,i){var r="eager";i&&(r=e<i?"eager":"lazy");return r},s=function(e,i){var r="auto";i&&(r=e<i?"sync":"async");return r},l=function(o){var l=o.item,d=o.index,u=o.selectedImage,v=o.onClick,c=o.borderRadiusVariant,m=o.previewImgBorderColor,w=o.isRatioSquare,g=o.itemsOnViewport,y=void 0===g?0:g,I=o.videoInPreview,p=void 0!==I&&I,x=o.alwaysPlayInPreview,P=void 0!==x&&x,C=o.isHorizontal,j=void 0!==C&&C,h=l.isVideo&&p&&(P||l.key===u.key);return i.jsx(t.Button,e.__assign({onClick:function(){return v(d)}},{children:h?i.jsx(t.VideoContainer,e.__assign({isRatioSquare:w,isHorizontal:j},{children:i.jsx(r.Video,{source:l.url,thumbnail:void 0,autoPlay:!0,muted:!0,loop:!0,style:{objectFit:"cover"},withProgressBar:!1,controls:!1,hasAudioControl:!1,preload:"auto"},void 0)}),void 0):i.jsx(a.ImageSmallPreview,{imageUrl:(null==l?void 0:l.alt.includes("-video"))?null==l?void 0:l.thumbnailUrl:null==l?void 0:l.url,alt:l.alt,selected:l.key===u.key,borderRadiusVariant:c,previewImgBorderColor:m,isRatioSquare:w,loading:n(d,y),decoding:s(d,y)},void 0)}),l.key)};exports.ImagePreviewList=function(r){var a=r.images,n=r.selectedImage,s=r.onClick,d=r.dataTestId,u=r.position,v=r.borderRadiusVariant,c=r.previewImgBorderColor,m=r.hasOverflowArrows,w=r.isRatioSquare,g=r.itemsOnViewport,y=void 0===g?0:g,I=r.videoInPreview,p=void 0!==I&&I,x=r.alwaysPlayInPreview,P=void 0!==x&&x;return i.jsxs(i.Fragment,{children:[i.jsx(t.Container,e.__assign({role:"list","data-testid":d,position:u,className:m?"imageListContainer":u,hasOverflowArrows:m,isRatioSquare:w},{children:"horizontal"==u?i.jsx("div",e.__assign({style:{maxWidth:"360px"}},{children:i.jsx(o,e.__assign({speed:200,infinite:!1,adaptiveHeight:!0,dots:!1,slidesToShow:4.2},{children:a.map((function(e,i){return l({item:e,index:i,selectedImage:n,onClick:s,borderRadiusVariant:v,previewImgBorderColor:c,isRatioSquare:w,itemsOnViewport:y,videoInPreview:p,alwaysPlayInPreview:P,isHorizontal:!0})}))}),void 0)}),void 0):a.map((function(e,i){return l({item:e,index:i,selectedImage:n,onClick:s,borderRadiusVariant:v,previewImgBorderColor:c,isRatioSquare:w,itemsOnViewport:y,videoInPreview:p,alwaysPlayInPreview:P,isHorizontal:!1})}))}),void 0),m&&i.jsxs(t.ArrowsContainer,e.__assign({role:"navigation"},{children:[i.jsx(t.ArrowPrev,{onClick:function(){document.querySelector(".imageListContainer").scrollBy(0,-200)}},void 0),i.jsx(t.ArrowNext,{onClick:function(){document.querySelector(".imageListContainer").scrollBy(0,200)}},void 0)]}),void 0)]},void 0)};
|
|
2
2
|
//# sourceMappingURL=ImagePreviewList.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),t=require("@emotion/react");function e(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var o,i,r,a,d,l,s,p,u,c=e(require("@emotion/styled")),g=t.css(o||(o=n.__makeTemplateObject(["\n grid-row: 2;\n grid-auto-flow: column;\n grid-column-gap: 6px;\n margin-top: 20px;\n max-width: 360px;\n overflow: auto;\n"],["\n grid-row: 2;\n grid-auto-flow: column;\n grid-column-gap: 6px;\n margin-top: 20px;\n max-width: 360px;\n overflow: auto;\n"]))),h=t.css(i||(i=n.__makeTemplateObject(["\n grid-row-gap: 20px;\n overflow: auto;\n grid-area: 1/1;\n"],["\n grid-row-gap: 20px;\n overflow: auto;\n grid-area: 1/1;\n"]))),m=c.default.div(r||(r=n.__makeTemplateObject(["\n display: grid;\n max-height: ",";\n height: min-content;\n align-items: flex-start;\n ","\n\n ","\n"],["\n display: grid;\n max-height: ",";\n height: min-content;\n align-items: flex-start;\n ","\n\n ","\n"])),(function(n){var t=n.isRatioSquare,e=n.theme;return t?"530px":"calc(530px / (".concat(e.component.gallery.aspectRatio,"))")}),(function(n){return"horizontal"==n.position?g:h}),(function(n){return n.hasOverflowArrows&&"\n scroll-behavior: smooth;\n &::-webkit-scrollbar {\n visibility: hidden;\n }\n "})),b=c.default.button(a||(a=n.__makeTemplateObject(["\n padding: 0;\n border: none;\n text-decoration: none;\n background: transparent;\n outline: none;\n"],["\n padding: 0;\n border: none;\n text-decoration: none;\n background: transparent;\n outline: none;\n"]))),f=c.default.div(d||(d=n.__makeTemplateObject(["\n display: flex;\n width: 65px;\n position: relative;\n left: 6px;\n"],["\n display: flex;\n width: 65px;\n position: relative;\n left: 6px;\n"]))),x=c.default.div(l||(l=n.__makeTemplateObject(["\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n color: #2a2a2a;\n border: 0;\n font-family: inherit;\n font-size: 100%;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n line-height: inherit;\n margin: 0;\n padding: 0;\n vertical-align: inherit;\n background-color: #ececea;\n box-sizing: border-box;\n cursor: pointer;\n float: left;\n height: 20px;\n position: relative;\n width: 50%;\n background-position: 50%;\n background-repeat: no-repeat;\n background-size: 11px;\n display: block;\n"],["\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n color: #2a2a2a;\n border: 0;\n font-family: inherit;\n font-size: 100%;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n line-height: inherit;\n margin: 0;\n padding: 0;\n vertical-align: inherit;\n background-color: #ececea;\n box-sizing: border-box;\n cursor: pointer;\n float: left;\n height: 20px;\n position: relative;\n width: 50%;\n background-position: 50%;\n background-repeat: no-repeat;\n background-size: 11px;\n display: block;\n"]))),w=c.default(x)(s||(s=n.__makeTemplateObject(["\n background-image: url(https://truekind.com/cdn/shop/t/340/assets/up-arrow.svg?v=48788596234827096911690908673);\n border-radius: 0 0 0 4px;\n"],["\n background-image: url(https://truekind.com/cdn/shop/t/340/assets/up-arrow.svg?v=48788596234827096911690908673);\n border-radius: 0 0 0 4px;\n"]))),k=c.default(x)(p||(p=n.__makeTemplateObject(["\n grid-column: 1;\n background-image: url(https://truekind.com/cdn/shop/t/340/assets/down-arrow.svg?v=48788596234827096911690908673);\n border-radius: 0 0 4px 0;\n border-left: 1px solid rgba(42, 42, 42, 0.1);\n"],["\n grid-column: 1;\n background-image: url(https://truekind.com/cdn/shop/t/340/assets/down-arrow.svg?v=48788596234827096911690908673);\n border-radius: 0 0 4px 0;\n border-left: 1px solid rgba(42, 42, 42, 0.1);\n"]))),v=c.default.div(u||(u=n.__makeTemplateObject(["\n width: ",";\n height: ",";\n overflow: hidden;\n ","\n position: relative;\n cursor: pointer;\n\n & button,\n & [data-testid='play'],\n & [data-testid='pause'],\n & [role='button'] {\n display: none !important;\n }\n"],["\n width: ",";\n height: ",";\n overflow: hidden;\n ","\n position: relative;\n cursor: pointer;\n\n & button,\n & [data-testid='play'],\n & [data-testid='pause'],\n & [role='button'] {\n display: none !important;\n }\n"])),(function(n){return n.theme.component.gallery.thumbnail.desktop.width}),(function(n){var t=n.isRatioSquare,e=n.theme;return t?e.component.gallery.thumbnail.desktop.width:e.component.gallery.thumbnail.desktop.height}),(function(n){return!n.isHorizontal&&"margin: 0 auto;"}));exports.ArrowBaseStyles=x,exports.ArrowNext=k,exports.ArrowPrev=w,exports.ArrowsContainer=f,exports.Button=b,exports.Container=m,exports.VideoContainer=v;
|
|
2
2
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),o=require("react/jsx-runtime"),e=require("../../../molecules/Video/Video.js"),t=require("./styled.js");exports.ImageProductSlide=function(r){var a,d=r.content,n=r.topTag,s=r.topRightTag,l=r.bottomTag,c=r.testId,u=r.position,v=void 0===u?"vertical":u,g=r.borderRadiusVariant,h=r.ctaText,p=r.ctaAction,j=r.hideCTA,x=r.withZoom,m=r.isRatioSquare,y=r.videoAutoplay,T=void 0!==y&&y,b=r.hideVideoControls,_=void 0!==b&&b,R=null==d?void 0:d.url,C=null!==(a=null==d?void 0:d.isVideo)&&void 0!==a&&a,S=T||null==d?void 0:d.thumbnailUrl,V=_?{pointerEvents:"none"}:void 0;return o.jsxs(t.Container,i.__assign({"data-testid":c,className:"stylefor".concat(v),borderRadiusVariant:g,position:v},{children:[!C&&o.jsxs(o.Fragment,{children:[x?o.jsx(t.InnerImageZoomStyled,{src:R,zoomSrc:R,zoomType:"hover",imgAttributes:{alt:d.alt,style:{objectFit:"cover",objectPosition:"center"},loading:"eager",decoding:"sync"},width:"horizontal"==v?360:530,height:"horizontal"==v?480:720,hideHint:!0,isRatioSquare:m},void 0):o.jsx(t.ImageStyled,{width:"horizontal"==v?"360px":"530px",height:"auto",src:R,alt:d.alt,objectFit:"cover",loading:"eager",decoding:"sync",isRatioSquare:m},void 0),o.jsx(t.TopTagContainer,i.__assign({borderRadiusVariant:g},{children:n}),void 0),o.jsx(t.BottomTagContainer,i.__assign({isCTAHidden:j},{children:l}),void 0),!!s&&o.jsx(t.TopRightTagWrapper,{children:o.jsx(t.TopRightTagContainer,{children:s},void 0)},void 0)]},void 0),C&&o.jsx(e.Video,{source:R,thumbnail:S,autoPlay:T,muted:!0,loop:!0,withProgressBar:!_,style:V,preload:"auto"},void 0),h&&p&&o.jsx("div",i.__assign({style:{display:j?"none":"block"}},{children:o.jsx(t.ButtonSecondaryOutlineWrapper,{wide:!0,onClick:p,text:h},void 0)}),void 0)]}),void 0)};
|
|
2
2
|
//# sourceMappingURL=ImageProductSlide.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),t=require("react");require("../../../core/theme/Theme.js"),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
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),t=require("react");require("../../../core/theme/Theme.js"),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 n=require("../../atoms/Icon/Icon.js");require("../../atoms/Image/styled.js"),require("../../atoms/PriceLabelV2/PriceLabelV2.js"),require("../../atoms/Toggle/toggle.styled.js");var o=require("./components/ProgressBar.js"),i=require("./styled.js");exports.Video=function(s){var u,a,c=s.source,d=s.thumbnail,l=s.height,m=s.className,f=s.withProgressBar,v=void 0===f||f,j=s.hasAudioControl,g=s.muted,h=s.onLoadedData,y=e.__rest(s,["source","thumbnail","height","className","withProgressBar","hasAudioControl","muted","onLoadedData"]),p=t.useRef(null),q=t.useState(!0),P=q[0],b=q[1],x=t.useState(!1),_=x[0],C=x[1],L=t.useState(g),I=L[0],S=L[1],T=t.useState(0),k=T[0],B=T[1],D=t.useState(!1),M=D[0],V=D[1],A=k>0,H=(null===(u=p.current)||void 0===u?void 0:u.duration)?k/p.current.duration:0,N=k===(null===(a=null==p?void 0:p.current)||void 0===a?void 0:a.duration)||0===k,O=y.autoPlay?void 0:d;return r.jsxs(i.Container,e.__assign({className:m},{children:[!P&&v&&r.jsx(o.ProgressBar,{progress:H,hide:N},void 0),_?r.jsx(i.PauseContainer,{"data-testid":"pause",onClick:function(){p.current&&_&&(p.current.pause(),C(!1))}},void 0):r.jsx(i.PlayContainer,e.__assign({"data-testid":"play",onClick:function(){p.current&&!M&&(V(!0),p.current.play().then((function(){C(!0)})).catch((function(e){console.error("Error playing video:",e)})).finally((function(){return V(!1)})))}},{children:A&&r.jsx(i.PlayIcon,{},void 0)}),void 0),j&&r.jsxs(i.MuteButton,e.__assign({onClick:function(){p.current&&S((function(e){return!e}))}},{children:[I&&r.jsx(n.Icon,{name:"custom/sound_off",testId:"sound-off-icon"},void 0),!I&&r.jsx(n.Icon,{name:"custom/sound_on",testId:"sound-on-icon"},void 0)]}),void 0),r.jsxs(i.HTMLVideo,e.__assign({},y,{muted:I,"data-testid":"video",poster:O,playsInline:!0,ref:p,onTimeUpdate:function(){if(p.current){var e=p.current.currentTime;requestAnimationFrame((function(){return B(e)}))}},onCanPlay:function(){return b(!1)},onLoadedData:function(e){h&&h(e),b(!1),y.autoPlay&&p.current&&p.current.play().then((function(){C(!0)})).catch((function(e){console.error("Error auto-playing video:",e)}))},onPause:function(){return C(!1)},onPlaying:function(){return C(!0)},height:l||"auto"},{children:[r.jsx("track",{kind:"captions"},void 0),r.jsx("source",{src:c},void 0)]}),void 0)]}),void 0)};
|
|
2
2
|
//# sourceMappingURL=Video.js.map
|