yt-uikit 0.8.2-mixandmatchmodalheightfix.0.4 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/Cart/Cart.d.ts +1 -1
- package/dist/esm/components/Cart/FloatingCart.d.ts +23 -0
- package/dist/esm/components/Cart/StickyCart.d.ts +1 -1
- package/dist/esm/index.js +6 -6
- package/dist/esm/types/components/Cart/Cart.d.ts +1 -1
- package/dist/esm/types/components/Cart/FloatingCart.d.ts +23 -0
- package/dist/esm/types/components/Cart/StickyCart.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/esm/components/BundleBlock/ProductGridSkeleton/ProductGridSkeleton.d.ts +0 -5
- package/dist/esm/components/BundleBlock/VolumeBundle/temp.d.ts +0 -3
- package/dist/esm/components/Cart/FreebieClaim.d.ts +0 -17
- package/dist/esm/components/Cart/VariantSelectionPopup/MobileVariantPopover.styled.d.ts +0 -49
- package/dist/esm/hooks/useShadowConfetti.d.ts +0 -1
- package/dist/esm/shadowStyles.d.ts +0 -1
- package/dist/esm/types/components/BundleBlock/ProductGridSkeleton/ProductGridSkeleton.d.ts +0 -5
- package/dist/esm/types/components/BundleBlock/VolumeBundle/temp.d.ts +0 -3
- package/dist/esm/types/components/Cart/FreebieClaim.d.ts +0 -17
- package/dist/esm/types/components/Cart/VariantSelectionPopup/MobileVariantPopover.styled.d.ts +0 -49
- package/dist/esm/types/hooks/useShadowConfetti.d.ts +0 -1
- package/dist/esm/types/shadowStyles.d.ts +0 -1
|
@@ -200,7 +200,7 @@ export interface CartProps {
|
|
|
200
200
|
cartOffersCarousalData?: CartOffersCarousalProps;
|
|
201
201
|
freebieMilestoneData?: freebieMilestoneProps;
|
|
202
202
|
cartOffersCarouselHeight?: number;
|
|
203
|
-
stickyBarBuyNowFunction?: (
|
|
203
|
+
stickyBarBuyNowFunction?: (variantId: string, quantity: number) => Promise<void>;
|
|
204
204
|
gstSectionCustomizationData?: GSTSectionCustomizationProps;
|
|
205
205
|
noteSectionTitle?: string;
|
|
206
206
|
checkoutSectionMessage?: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Checkpoint } from "./Cart";
|
|
3
|
+
export interface FloatingCartProps {
|
|
4
|
+
setIsCartOpen: (isOpen: boolean) => void;
|
|
5
|
+
isCartOpen?: boolean;
|
|
6
|
+
cartCheckpoints?: Checkpoint[];
|
|
7
|
+
customCartProgressBarCriteria?: string;
|
|
8
|
+
floatingCartData?: FloatingCartDataProps;
|
|
9
|
+
effectiveQuantityForProgressBar?: number;
|
|
10
|
+
cartComponentsCornerType?: "rounded" | "sharp";
|
|
11
|
+
cartComponentsCornerRadius?: number;
|
|
12
|
+
}
|
|
13
|
+
export type FloatingCartDataProps = {
|
|
14
|
+
enableFloatingCart: boolean;
|
|
15
|
+
backgroundColor: string;
|
|
16
|
+
bannerBackgroundColor: string;
|
|
17
|
+
textColor: string;
|
|
18
|
+
buttonColor: string;
|
|
19
|
+
bannerFooterText: string;
|
|
20
|
+
showOnPages: string[];
|
|
21
|
+
};
|
|
22
|
+
declare const FloatingCart: React.FC<FloatingCartProps>;
|
|
23
|
+
export default FloatingCart;
|
|
@@ -39,7 +39,7 @@ export type StickyAddToCartProps = {
|
|
|
39
39
|
cartComponentsCornerType?: "rounded" | "sharp";
|
|
40
40
|
cartComponentsCornerRadius?: number;
|
|
41
41
|
stickyCartCustomizationData?: stickyCartCustomizationDataProps;
|
|
42
|
-
checkoutFunction?: (
|
|
42
|
+
checkoutFunction?: (variantId: string, quantity: number) => Promise<void>;
|
|
43
43
|
backgroundColor?: string;
|
|
44
44
|
primaryTextColor?: string;
|
|
45
45
|
comboBundleData?: BundlePayload;
|
package/dist/esm/index.js
CHANGED
|
@@ -2235,7 +2235,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
2235
2235
|
font-weight: 400;
|
|
2236
2236
|
min-width: 14px;
|
|
2237
2237
|
line-height: 14px;
|
|
2238
|
-
`,Bp=({isOpen:e,setIsOpen:n,backgroundColor:r="white",backgroundSubdued:a="#3947821F",tertiaryColor:i="#067D431A",tertiaryTextColor:d="#000000",exploreCTAColor:s,checkoutFontSize:p,cartTitle:u="My Cart",emptyCartTitle:m,emptyCartDescription:f,emptyCartButtons:g,removeCartItem:h,handleIncrement:x,handleDecrement:y,addCartItem:b,isUserSignedIn:v,showBundle:w,showCouponOptions:C,bundleProducts:k,discountAmountOff:E,loyaltyIcon:T,pointsToBeUsed:S,rewardMultiplier:$,redemptionMultiplier:B,discountApplied:z,removeDiscount:I,applyDiscount:N,rewardCoupons:D,userTotalPoints:_,checkoutFunction:P,joinNowFunction:A,guestLoyaltyPercentage:O,isDev:F,recProductsList:M,showMultiStepProgressBar:R,cartCheckpoints:L,redemptionRate:j,pointsRewardRate:V,showCartLevelAltPay:W,guestRewardCoupon:H,showGuestDiscountCoupon:q,applyTemplateDiscount:U,exploreCtaRedirectLink:Q,discountAmountApplied:G,minimumCartValue:Y,discountInCheckoutButton:Z,isStickyCheckout:X,showDiscountsListToGuestUsers:K,showApplyCouponsButtonToGuestUsers:J,handleCheckpointCrossed:ee,customCartProgressBarCriteria:te,checkoutButtonColor:ne="#252E69",ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,primaryTextColor:ae,secondaryTextColor:ie,productRecsCtaButtonText:le,productRecsTitleText:ce,emptyProductRecsTitleText:de,showProductRecsOnDesktop:se,showProductRecsOnMobile:pe,themeColor:ue,themeTextColor:me,companyName:fe,gstNumber:ge,showGSTOption:he,applyGSTToCart:xe,showMOVForProgressTiers:ye,freeProduct:be,showLoyaltyCta:ve=!1,freeProductAdjustedCartTotal:we,minimumOrderValueToAvailDiscount:Ce,signinCTAButtonVisible:ke,cartSigninCTAMainText:Ee,applyNoteToCart:Te,note:Se,showNoteOption:$e,inlineCartOfferInfoText:Be,inlineCartOfferInfoRedirectLink:ze,cartOfferTermsAndConditionsText:Ie,showEditOptionOnProducts:Ne,onSetLoading:De,showVariantSelectionDropdownInProductRecs:_e,originalCartSubtotal:Pe,freebieProductsInCart:Ae,showFreebieClaim:Oe,addFreebieToCart:Fe,freebiesInCart:Me,effectiveQuantityForProgressBar:Re,productPercentageOffMapping:Le,productTagsMapping:je,removeFreebieFromCart:Ve,postalCodeList:We,enableGeoLocationDeliveryRestriction:He=!1,getProductDetailsByVariantId:qe,applyPostalCodeAndDeliverySlotToCart:Ue,showDeleteOnFreebies:Qe,freebieCouponTemplates:Ge,freebieFlowCheckpoints:Ye,freebieClaimData:Ze,postalCodeBasedItemTrackingParameter:Xe,enableSlotPicker:Ke,deliveryHeaderTitle:Je,deliveryAvailableText:et,deliveryNotAvailableText:tt,giftWrapSetupData:nt,giftWrapProductDetail:rt,progressBarFreeProductIconType:ot,enableCustomCartOnCartPage:at,isCartPage:it,showCartTimer:lt,showFreebieMilestone:ct,freebieMilestoneData:pt,cartTimerInMinutes:ut,cartTimerCustomText:mt,productRecsCardLayout:ft,productRecsCardListVariant:ht,imageAspectSelector:yt,cartComponentsCornerType:bt,cartComponentsCornerRadius:vt,cartOffersCarousalData:wt,gstSectionCustomizationData:Ct,noteSectionTitle:kt,checkoutSectionMessage:Et,checkoutSectionMessageDisplay:Tt,showVariantSelectionDropdownInProductClaim:St,loyaltyDiscount:$t,brandTokenName:Bt,showDiscountOnMRP:zt,switchWidthVariant:It,prefixMessageText:Nt,suffixMessageText:Dt,successMessageText:_t,toggleDecimal:Pt,cartOffersCarouselHeight:At,disableCheckoutButton:Ot,showEmptyCartRecommendations:Ft=!1,checkoutButtonBottomSpacing:Mt,showPoweredByBadge:Rt,applyCouponCode:Lt,showApplyCoupon:jt,enableConfetti:Vt,checkoutSectionMessageRedirectLink:Wt,showCheckoutButtonPaymentIcons:Ht,shouldCheckInventoryQuantity:qt})=>{const Ut=Zt(Jt),Qt=Zt(cn),[Gt,Yt]=c(!1),[Xt,en]=Kt(pn),[tn,nn]=c(!1),[un,mn]=c(!0),{setLoading:fn}=dn();t.useEffect((()=>{De&&De(fn)}),[De]);const gn=o(!1);l((()=>{const t=()=>{n(!1)};return e?(gn.current||window.history.pushState({ytCustomCartDrawer:"open"},""),window.addEventListener("popstate",t),gn.current=!0):(gn.current&&"open"===window.history.state?.ytCustomCartDrawer&&window.history.back(),gn.current=!1),()=>{window.removeEventListener("popstate",t)}}),[e,n]);const[xn,yn]=c(!1);l((()=>{const t=document.querySelector("body");if(t)return at&&it?(t.classList.remove("drawer-open"),void t.classList.remove("drawer-closed")):void(xn?(t.classList.remove("drawer-open"),t.classList.remove("drawer-closed")):e?(t.classList.add("drawer-open"),t.classList.remove("drawer-closed")):(t.classList.remove("drawer-open"),t.classList.add("drawer-closed")))}),[e,at,it,xn]),l((()=>{function e(){const e=window.innerWidth;yn(e>=450)}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const bn=Ut?.items?.reduce(((e,t)=>e+t?.quantity),0),vn=o(null);l((()=>{function e(e){vn.current&&!vn.current.contains(e.target)&&en(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]),l((()=>{const e=()=>{Yt(!0),window.setTimeout((()=>Yt(!1)),3e3)};return window.addEventListener("yt:autoFreebieAdded",e),()=>window.removeEventListener("yt:autoFreebieAdded",e)}),[]);const[wn,Cn]=c("normal"),[kn,En]=c("normal"),[Tn,Sn]=c("auto");l((()=>{CSS.supports("font-weight","500")?Cn("500"):CSS.supports("font-weight","400")?Cn("400"):CSS.supports("font-weight","600")&&Cn("600"),CSS.supports("font-weight","400")?En("400"):CSS.supports("font-weight","300")?En("300"):CSS.supports("font-weight","200")&&En("200"),CSS.supports("width","-webkit-fill-available")?Sn("-webkit-fill-available"):CSS.supports("width","-moz-available")&&Sn("-moz-available")}),[]),l((()=>{document.documentElement.style.setProperty("--yt-cart-font-weight",wn),document.documentElement.style.setProperty("--yt-cart-product-rec-price-font-weight",kn),document.documentElement.style.setProperty("--yt-cart-custom-fill-width",Tn)}),[wn,kn]);const[$n]=Kt(rn);Zt(on);const[Bn]=Kt(ln),[zn]=Kt(an);l((()=>{const e=Ut?.items.some((e=>(je?.get(String(e.product_id))||[]).includes("Delhi-NCR")));nn(e)}),[Ut?.items,je]);l((()=>{mn(!("all-products"!==Xe&&("specific-tags"!==Xe||$n.isPostalCodeValid||Ke)&&("specific-tags"!==Xe||$n.isPostalCodeValid||Bn||!Ke)&&("specific-tags"===Xe&&"standard"===zn||tn&&(Ke?$n.isPostalCodeValid&&Bn:$n.isPostalCodeValid))))}),[$n.isPostalCodeValid,Bn,tn,Xe,Ke]),Kt(sn);const[In,Nn]=c(!0);l((()=>{"true"===localStorage.getItem("cartTimerRanOnce")&&Nn(!1);const e=localStorage.getItem("cartTimerTimeLeft");e&&parseInt(e,10)<=0&&Nn(!1)}),[]);const Dn=new Date("2024-11-01");return hn(Ut?.items_subtotal_price,Ut?.currency),t.createElement(Sp,{className:"yt-cart-drawer",$isDev:F,$isOpen:e,$backgroundColor:r,$enableCustomCartOnCartPage:at,$isCartPage:it,$isLargeScreen:xn,$switchWidthVariant:It},Qt.cartLoading?t.createElement("div",{style:{backgroundColor:"#fff",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",display:"flex",position:"absolute",opacity:0,zIndex:51}},Qt.showLoader&&!Qt.showSkeletonLoader&&t.createElement("div",{className:"loader"},"")):t.createElement(t.Fragment,null),t.createElement(t.Fragment,null,Xt&&t.createElement("div",{style:{position:"fixed",inset:0,zIndex:40,backgroundColor:"rgba(128,128,128,0.7)"}},""),t.createElement("div",{style:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between"}},t.createElement("div",{style:{}},t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",margin:"1rem 1rem 0px"}},t.createElement("span",{className:"yt-cart-title-container",style:{fontWeight:"var(--yt-cart-font-weight, bold)",color:ae,fontSize:"16px"}},t.createElement("span",{style:{whiteSpace:"nowrap",flexShrink:0}},u),Ut?.item_count>0&&W&&!(ve&&W)&&V>0&&t.createElement(Ep,{pointsRewardRate:V,loyaltyIcon:T,brandTokenName:Bt,themeColor:ue,themeTextColor:me,rewardMultiplier:$}),bn>0&&t.createElement($p,{$backgroundSubdued:a},bn)),t.createElement("div",{style:{display:"flex",gap:"8px",flexDirection:"row",alignItems:"center"}},!(at&&it)&&t.createElement("div",{className:"close-button",style:{backgroundColor:a||"#cacaca30"}},t.createElement(xt,{style:{height:"auto",width:"auto",color:ae},fontSize:24,cursor:"pointer",onClick:()=>n(!e)})))),Qt&&t.createElement(vp,{$themeColor:ue,show:Qt.showLoader}),wt?.enableCartOffersCarousel&&t.createElement(hp,{themeColor:ue,cartOffersCarousalData:wt,cartOffersCarouselHeight:At,cartData:Ut}),lt&&In&&Ut?.item_count?t.createElement(Ys,{minutes:ut,customText:mt,onTimerComplete:()=>{Nn(!1),localStorage.setItem("cartTimerRanOnce","true"),localStorage.removeItem("timeLeft"),localStorage.removeItem("lastUpdate")}}):null,Gt&&Vt&&t.createElement(Qr,{particleCount:50,spread:90,origin:{y:.3}}),Be?t.createElement(El,{inlineCartOfferInfoText:Be,inlineCartOfferInfoRedirectLink:ze,themeColor:ue,tooltipText:Ie,themeTextColor:me}):null),R&&Ut?.items_subtotal_price>0&&Ut?.currency&&!!L&&function(e,t,n,r,o){if(!e||0===e.length)return!1;const a=[...e].sort(((e,t)=>"minimum_order_value"===r?e?.minimumOrderValue-t?.minimumOrderValue:e?.quantityThreshold-t?.quantityThreshold));return a.filter((e=>0!==e?.[Lr(r)]&&("minimum_order_value"!==r||1!==e?.[Lr(r)]))).some(((e,i)=>jr(e,i,a,o,{currentCartAmount:t,effectiveQuantityForProgressBar:n,customCartProgressBarCriteria:r,checkpoints:a}).progressPercentage>0))}(L,hn(void 0!==Pe?Pe:Ut?.items_subtotal_price,Ut.currency),void 0===Re?Ut?.item_count:Re,te??"minimum_order_value",Ut?.item_count)&&t.createElement(t.Fragment,null,t.createElement($o,{customCartProgressBarCriteria:te??"minimum_order_value",handleCheckpointCrossed:ee,checkpoints:L,effectiveQuantityForProgressBar:void 0===Re?Ut?.item_count:Re,currentCartAmount:hn(void 0!==Pe?Pe:Ut?.items_subtotal_price,Ut.currency),themeColor:ue,themeTextColor:me,primaryTextColor:ae,secondaryTextColor:ie,showMOVForProgressTiers:ye,progressBarFreeProductIconType:ot,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,prefixMessageText:Nt,suffixMessageText:Dt,successMessageText:_t,enableConfetti:Vt})),Ut?.item_count>0&&t.createElement("div",{style:{display:"flex",height:"12px",background:"#87878717"}}),0===Ut?.items?.length&&0===Ut?.item_count&&!1===Qt?.showSkeletonLoader?t.createElement(_o,{showLoyaltyCta:ve,joinNowFunction:A,emptyCartTitle:m,emptyCartDescription:f,exploreCTAColor:s,isUserSignedIn:v,exploreCtaRedirectLink:Q,themeColor:ue,emptyCartButtons:g,cartComponentsCornerRadius:vt,cartComponentsCornerType:bt,themeTextColor:me,recProductsList:M,addCartItem:b,productRecsCtaButtonText:le,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,primaryTextColor:ae,secondaryTextColor:ie,showVariantSelectionDropdownInProductRecs:_e,emptyProductRecsTitleText:de,backgroundSubdued:a,showEmptyCartRecommendations:Ft,tertiaryColor:i,tertiaryTextColor:d}):t.createElement("div",{style:{display:"flex",flexDirection:"column",overflowY:"auto",flex:1,overflowX:"hidden",height:"100%",scrollbarWidth:"none"}},t.createElement(ni,{isDev:F,themeColor:ue,handleDecrement:y,handleIncrement:x,removeCartItem:h,addCartItem:b,primaryTextColor:ae,secondaryTextColor:ie,freeProduct:be,themeTextColor:me,showEditOptionOnProducts:Ne,productPercentageOffMapping:Le,productTagsMapping:je,removeFreebieFromCart:Ve,showDeleteOnFreebies:Qe,freebieCouponTemplates:Ge??[],freebieFlowCheckpoints:Ye??[],cartCheckpoints:L,freeProductAdjustedCartTotal:we,imageAspectSelector:yt,cartComponentsCornerRadius:vt,cartComponentsCornerType:bt,giftWrapVariantId:rt?.variants?.nodes[0]?.id,giftWrapProductId:nt?.giftProductId,showGiftWrapAsLineItem:nt?.showGiftWrapAsLineItem,backgroundSubdued:a,tertiaryColor:i,tertiaryTextColor:d,backgroundColor:r,showDiscountOnMRP:zt,checkoutSectionMessage:Et,checkoutSectionMessageRedirectLink:Wt,showFreebieMilestone:ct,freebieMilestoneData:pt}),xn&&se&&!!M&&M?.length>0&&Ut?.item_count>0&&b&&t.createElement(vr,{addCartItem:b,products:M,productRecsCtaButtonText:le,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,productRecsTitleText:ce,themeColor:ue,primaryTextColor:ae,secondaryTextColor:ie,showVariantSelectionDropdownInProductRecs:_e,cardLayout:ft,variant:ht,cartComponentsCornerType:bt,cartComponentsCornerRadius:vt,backgroundSubdued:a,backgroundColor:r,tertiaryColor:i,tertiaryTextColor:d}),!xn&&pe&&!!M&&M?.length>0&&Ut?.item_count>0&&b&&t.createElement(vr,{addCartItem:b,products:M,productRecsCtaButtonText:le,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,productRecsTitleText:ce,themeColor:ue,primaryTextColor:ae,secondaryTextColor:ie,showVariantSelectionDropdownInProductRecs:_e,cardLayout:ft,variant:ht,cartComponentsCornerRadius:vt,cartComponentsCornerType:bt,backgroundSubdued:a,tertiaryColor:i,tertiaryTextColor:d})),t.createElement(Go,null,Ut?.item_count>0&&w&&k&&t.createElement(oi,{bundleProducts:k}),he&&!!xe&&Ut?.item_count>0&&t.createElement(xi,{companyName:fe,gstNumber:ge,themeColor:ue,iconColor:Ct?.iconColor,showIcon:Ct?.showIcon,backgroundColor:Ct?.backgroundColor,textColor:Ct?.textColor,title:Ct?.title}),!!Ut&&Ut?.item_count>0&&!!Fe&&!!Ae&&!!Me&&Ae.length>0&&t.createElement(kl,{freebieProductsInCart:Ae,themeColor:ue,themeTextColor:me,primaryTextColor:ae,addFreebieToCart:Fe,freebiesInCart:Me,imageAspectSelector:yt,freebieCouponTemplates:Ge,freebieClaimData:Ze,cartCheckpoints:L,isCartDrawerOpen:e,shouldCheckInventoryQuantity:qt}),He&&(We?.length??0)>0&&!!Ue&&Ut?.item_count>0&&t.createElement("div",{className:"form-group"},t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",margin:"6px 1rem 1rem 1rem"},onClick:()=>mn(!un)},t.createElement("span",{style:{fontSize:"12px",display:"flex",gap:"5px",alignItems:"center"}},"Shipping ",t.createElement(gt,null)),t.createElement("div",{className:"icon-transition"},un?t.createElement(dt,null):t.createElement(st,null))),"all-products"===Xe&&un?t.createElement(Fs,{postalCodeList:We,themeColor:ue,themeTextColor:me,enableSlotPicker:Ke,deliveryHeaderTitle:Je,deliveryAvailableText:et,deliveryNotAvailableText:tt,disabledDates:Dn}):un&&(tn?t.createElement(Fs,{postalCodeList:We,themeColor:ue,themeTextColor:me,enableSlotPicker:Ke,deliveryHeaderTitle:Je,deliveryAvailableText:et,deliveryNotAvailableText:tt,disabledDates:Dn}):t.createElement(Ms,{postalCodeList:We,themeColor:ue,themeTextColor:me,enableSlotPicker:Ke,disabledDates:Dn}))),$e&&!!Te&&Ut?.item_count>0&&t.createElement(yi,{note:Se,noteSectionTitle:kt}),nt?.showGiftWrapOption&&Ut?.item_count>0&&t.createElement(Us,{themeColor:ue,id:nt?.giftProductId,detail:rt,showPrice:nt?.showPrice,errorText:nt?.errorText,customText:nt?.customText,showGiftIcon:nt?.showGiftIcon,addCartItem:b,removeCartItem:h}),Ut?.item_count>0&&jt&&!ve&&Lt&&t.createElement(Tp,{backgroundSubdued:a,themeColor:ue,themeTextColor:me,primaryTextColor:ae,cartComponentsCornerRadius:vt,applyCouponCode:Lt,removeDiscount:I,enableConfetti:Vt}),Ut?.item_count>0&&C&&N&&!$t&&U&&D&&D?.length>0?t.createElement(t.Fragment,null,v||v&&J?t.createElement(xa,{themeColor:ue,showGuestDiscountCoupon:q,guestRewardCoupon:H,ref:vn,discountAmountOff:E,userTotalPoints:_??0,applyDiscount:N,applyTemplateDiscount:U,rewardCoupons:D,isCouponSelectionOpen:Xt,setIsCouponSelectionOpen:en,pointsToBeUsed:S,joinNowFunction:A,guestLoyaltyPercentage:O,isUserSignedIn:v,showDiscountsListToGuestUsers:K}):!!O&&ve&&!!A&&t.createElement(Uo,{cartSigninCTAMainText:Ee,signinCTAButtonVisible:ke,guestLoyaltyPercentage:O,joinNowFunction:A,themeColor:ue,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,primaryTextColor:ae,secondaryTextColor:ie,cartComponentsCornerRadius:vt,cartComponentsCornerType:bt,showCartLevelAltPay:W})):Ut?.item_count>0&&t.createElement(t.Fragment,null,v||!ve||$t?!$t&&Ut?.item_count>0&&void 0!==E&&void 0!==S&&!!T&&ve&&!!N&&t.createElement(pa,{themeColor:ue,applyDiscount:N,discountAmountOff:E,loyaltyIcon:T,pointsToBeUsed:S,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,primaryTextColor:ae,secondaryTextColor:ie,minimumOrderValueToAvailDiscount:Ce,brandTokenName:Bt,showCartLevelAltPay:W,redemptionMultiplier:B}):Ut?.item_count>0&&!!O&&!!A&&t.createElement(Uo,{cartSigninCTAMainText:Ee,signinCTAButtonVisible:ke,themeColor:ue,joinNowFunction:A,guestLoyaltyPercentage:O,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,primaryTextColor:ae,secondaryTextColor:ie,cartComponentsCornerRadius:vt,cartComponentsCornerType:bt,showCartLevelAltPay:W})),Ut?.item_count>0&&!!$t&&!!I&&ve&&$t&&void 0!==S&&t.createElement(la,{themeColor:ue,removeDiscount:I,loyaltyDiscount:$t,isDev:F,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,primaryTextColor:ae,secondaryTextColor:ie,pointsToBeUsed:S,brandTokenName:Bt,showCartLevelAltPay:W}),ve&&W&&j&&T&&Ut?.item_count>0&&t.createElement(Cp,{loyaltyIcon:T,backgroundSubdued:a,primaryTextColor:ae,pointsRewardRate:V,rewardMultiplier:$}),ve&&Ut&&Ut.item_count>0&&!!Ce&&Ce>1&&t.createElement("span",{className:"yt-cart-loyalty-mov-text",style:{fontSize:"10px",color:ue??"#50D1AA",fontWeight:600,display:"flex",justifyContent:ke?"space-between":"center"}},"Minimum order value to use ",Bt,":"," ",Ce),Ut&&P&&Ut?.item_count>0&&t.createElement("div",null,t.createElement(jo,{disableCheckoutButton:!!Ot||Qt.cartLoading,discountApplied:z,checkoutFunction:P,checkoutButtonColor:ne,checkoutFontSize:p,discountInCheckoutButton:Z,isStickyCheckout:X,discountAmountApplied:G,minimumCartValue:Y,themeTextColor:me,applyGSTToCart:xe,showGSTOption:he,applyNoteToCart:Te,showNoteOption:$e,enableGeoLocationDeliveryRestriction:He,applyPostalCodeAndDeliverySlotToCart:Ue,enableSlotPicker:Ke,cartComponentsCornerRadius:vt,cartComponentsCornerType:bt,checkoutSectionMessage:Et,checkoutSectionMessageDisplay:Tt,checkoutSectionMessageRedirectLink:Wt,showDiscountOnMRP:zt,tertiaryColor:i,tertiaryTextColor:d,cartCheckpoints:L,toggleDecimal:Pt,checkoutButtonBottomSpacing:Mt,showPoweredByBadge:Rt,showCheckoutButtonPaymentIcons:Ht,primaryTextColor:ae}))))))},zp=x.div`
|
|
2238
|
+
`,Bp=({isOpen:e,setIsOpen:n,backgroundColor:r="white",backgroundSubdued:a="#3947821F",tertiaryColor:i="#067D431A",tertiaryTextColor:d="#000000",exploreCTAColor:s,checkoutFontSize:p,cartTitle:u="My Cart",emptyCartTitle:m,emptyCartDescription:f,emptyCartButtons:g,removeCartItem:h,handleIncrement:x,handleDecrement:y,addCartItem:b,isUserSignedIn:v,showBundle:w,showCouponOptions:C,bundleProducts:k,discountAmountOff:E,loyaltyIcon:T,pointsToBeUsed:S,rewardMultiplier:$,redemptionMultiplier:B,discountApplied:z,removeDiscount:I,applyDiscount:N,rewardCoupons:D,userTotalPoints:_,checkoutFunction:P,joinNowFunction:A,guestLoyaltyPercentage:O,isDev:F,recProductsList:M,showMultiStepProgressBar:R,cartCheckpoints:L,redemptionRate:j,pointsRewardRate:V,showCartLevelAltPay:W,guestRewardCoupon:H,showGuestDiscountCoupon:q,applyTemplateDiscount:U,exploreCtaRedirectLink:Q,discountAmountApplied:G,minimumCartValue:Y,discountInCheckoutButton:Z,isStickyCheckout:X,showDiscountsListToGuestUsers:K,showApplyCouponsButtonToGuestUsers:J,handleCheckpointCrossed:ee,customCartProgressBarCriteria:te,checkoutButtonColor:ne="#252E69",ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,primaryTextColor:ae,secondaryTextColor:ie,productRecsCtaButtonText:le,productRecsTitleText:ce,emptyProductRecsTitleText:de,showProductRecsOnDesktop:se,showProductRecsOnMobile:pe,themeColor:ue,themeTextColor:me,companyName:fe,gstNumber:ge,showGSTOption:he,applyGSTToCart:xe,showMOVForProgressTiers:ye,freeProduct:be,showLoyaltyCta:ve=!1,freeProductAdjustedCartTotal:we,minimumOrderValueToAvailDiscount:Ce,signinCTAButtonVisible:ke,cartSigninCTAMainText:Ee,applyNoteToCart:Te,note:Se,showNoteOption:$e,inlineCartOfferInfoText:Be,inlineCartOfferInfoRedirectLink:ze,cartOfferTermsAndConditionsText:Ie,showEditOptionOnProducts:Ne,onSetLoading:De,showVariantSelectionDropdownInProductRecs:_e,originalCartSubtotal:Pe,freebieProductsInCart:Ae,showFreebieClaim:Oe,addFreebieToCart:Fe,freebiesInCart:Me,effectiveQuantityForProgressBar:Re,productPercentageOffMapping:Le,productTagsMapping:je,removeFreebieFromCart:Ve,postalCodeList:We,enableGeoLocationDeliveryRestriction:He=!1,getProductDetailsByVariantId:qe,applyPostalCodeAndDeliverySlotToCart:Ue,showDeleteOnFreebies:Qe,freebieCouponTemplates:Ge,freebieFlowCheckpoints:Ye,freebieClaimData:Ze,postalCodeBasedItemTrackingParameter:Xe,enableSlotPicker:Ke,deliveryHeaderTitle:Je,deliveryAvailableText:et,deliveryNotAvailableText:tt,giftWrapSetupData:nt,giftWrapProductDetail:rt,progressBarFreeProductIconType:ot,enableCustomCartOnCartPage:at,isCartPage:it,showCartTimer:lt,showFreebieMilestone:ct,freebieMilestoneData:pt,cartTimerInMinutes:ut,cartTimerCustomText:mt,productRecsCardLayout:ft,productRecsCardListVariant:ht,imageAspectSelector:yt,cartComponentsCornerType:bt,cartComponentsCornerRadius:vt,cartOffersCarousalData:wt,gstSectionCustomizationData:Ct,noteSectionTitle:kt,checkoutSectionMessage:Et,checkoutSectionMessageDisplay:Tt,showVariantSelectionDropdownInProductClaim:St,loyaltyDiscount:$t,brandTokenName:Bt,showDiscountOnMRP:zt,switchWidthVariant:It,prefixMessageText:Nt,suffixMessageText:Dt,successMessageText:_t,toggleDecimal:Pt,cartOffersCarouselHeight:At,disableCheckoutButton:Ot,showEmptyCartRecommendations:Ft=!1,checkoutButtonBottomSpacing:Mt,showPoweredByBadge:Rt,applyCouponCode:Lt,showApplyCoupon:jt,enableConfetti:Vt,checkoutSectionMessageRedirectLink:Wt,showCheckoutButtonPaymentIcons:Ht,shouldCheckInventoryQuantity:qt})=>{const Ut=Zt(Jt),Qt=Zt(cn),[Gt,Yt]=c(!1),[Xt,en]=Kt(pn),[tn,nn]=c(!1),[un,mn]=c(!0),{setLoading:fn}=dn();t.useEffect((()=>{De&&De(fn)}),[De]);const gn=o(!1);l((()=>{const t=()=>{n(!1)};return e?(gn.current||window.history.pushState({ytCustomCartDrawer:"open"},""),window.addEventListener("popstate",t),gn.current=!0):(gn.current&&"open"===window.history.state?.ytCustomCartDrawer&&window.history.back(),gn.current=!1),()=>{window.removeEventListener("popstate",t)}}),[e,n]);const[xn,yn]=c(!1);l((()=>{const t=document.querySelector("body");if(t)return at&&it?(t.classList.remove("drawer-open"),void t.classList.remove("drawer-closed")):void(xn?(t.classList.remove("drawer-open"),t.classList.remove("drawer-closed")):e?(t.classList.add("drawer-open"),t.classList.remove("drawer-closed")):(t.classList.remove("drawer-open"),t.classList.add("drawer-closed")))}),[e,at,it,xn]),l((()=>{function e(){const e=window.innerWidth;yn(e>=450)}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const bn=Ut?.items?.reduce(((e,t)=>e+t?.quantity),0),vn=o(null);l((()=>{function e(e){vn.current&&!vn.current.contains(e.target)&&en(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]),l((()=>{const e=()=>{Yt(!0),window.setTimeout((()=>Yt(!1)),3e3)};return window.addEventListener("yt:autoFreebieAdded",e),()=>window.removeEventListener("yt:autoFreebieAdded",e)}),[]);const[wn,Cn]=c("normal"),[kn,En]=c("normal"),[Tn,Sn]=c("auto");l((()=>{CSS.supports("font-weight","500")?Cn("500"):CSS.supports("font-weight","400")?Cn("400"):CSS.supports("font-weight","600")&&Cn("600"),CSS.supports("font-weight","400")?En("400"):CSS.supports("font-weight","300")?En("300"):CSS.supports("font-weight","200")&&En("200"),CSS.supports("width","-webkit-fill-available")?Sn("-webkit-fill-available"):CSS.supports("width","-moz-available")&&Sn("-moz-available")}),[]),l((()=>{document.documentElement.style.setProperty("--yt-cart-font-weight",wn),document.documentElement.style.setProperty("--yt-cart-product-rec-price-font-weight",kn),document.documentElement.style.setProperty("--yt-cart-custom-fill-width",Tn)}),[wn,kn]);const[$n]=Kt(rn);Zt(on);const[Bn]=Kt(ln),[zn]=Kt(an);l((()=>{const e=Ut?.items.some((e=>(je?.get(String(e.product_id))||[]).includes("Delhi-NCR")));nn(e)}),[Ut?.items,je]);l((()=>{mn(!("all-products"!==Xe&&("specific-tags"!==Xe||$n.isPostalCodeValid||Ke)&&("specific-tags"!==Xe||$n.isPostalCodeValid||Bn||!Ke)&&("specific-tags"===Xe&&"standard"===zn||tn&&(Ke?$n.isPostalCodeValid&&Bn:$n.isPostalCodeValid))))}),[$n.isPostalCodeValid,Bn,tn,Xe,Ke]),Kt(sn);const[In,Nn]=c(!0);l((()=>{"true"===localStorage.getItem("cartTimerRanOnce")&&Nn(!1);const e=localStorage.getItem("cartTimerTimeLeft");e&&parseInt(e,10)<=0&&Nn(!1)}),[]);const Dn=new Date("2024-11-01");return hn(Ut?.items_subtotal_price,Ut?.currency),t.createElement(Sp,{className:"yt-cart-drawer",$isDev:F,$isOpen:e,$backgroundColor:r,$enableCustomCartOnCartPage:at,$isCartPage:it,$isLargeScreen:xn,$switchWidthVariant:It},Qt.cartLoading?t.createElement("div",{style:{backgroundColor:"#fff",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",display:"flex",position:"absolute",opacity:0,zIndex:51}},Qt.showLoader&&!Qt.showSkeletonLoader&&t.createElement("div",{className:"loader"},"")):t.createElement(t.Fragment,null),t.createElement(t.Fragment,null,Xt&&t.createElement("div",{style:{position:"fixed",inset:0,zIndex:40,backgroundColor:"rgba(128,128,128,0.7)"}},""),t.createElement("div",{className:"yt-cart-drawer-content",style:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between"}},t.createElement("div",{style:{}},t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",margin:"1rem 1rem 0px"}},t.createElement("span",{className:"yt-cart-title-container",style:{fontWeight:"var(--yt-cart-font-weight, bold)",color:ae,fontSize:"16px"}},t.createElement("span",{style:{whiteSpace:"nowrap",flexShrink:0}},u),Ut?.item_count>0&&W&&!(ve&&W)&&V>0&&t.createElement(Ep,{pointsRewardRate:V,loyaltyIcon:T,brandTokenName:Bt,themeColor:ue,themeTextColor:me,rewardMultiplier:$}),bn>0&&t.createElement($p,{$backgroundSubdued:a},bn)),t.createElement("div",{style:{display:"flex",gap:"8px",flexDirection:"row",alignItems:"center"}},!(at&&it)&&t.createElement("div",{className:"close-button",style:{backgroundColor:a||"#cacaca30"}},t.createElement(xt,{style:{height:"auto",width:"auto",color:ae},fontSize:24,cursor:"pointer",onClick:()=>n(!e)})))),Qt&&t.createElement(vp,{$themeColor:ue,show:Qt.showLoader}),wt?.enableCartOffersCarousel&&t.createElement(hp,{themeColor:ue,cartOffersCarousalData:wt,cartOffersCarouselHeight:At,cartData:Ut}),lt&&In&&Ut?.item_count?t.createElement(Ys,{minutes:ut,customText:mt,onTimerComplete:()=>{Nn(!1),localStorage.setItem("cartTimerRanOnce","true"),localStorage.removeItem("timeLeft"),localStorage.removeItem("lastUpdate")}}):null,Gt&&Vt&&t.createElement(Qr,{particleCount:50,spread:90,origin:{y:.3}}),Be?t.createElement(El,{inlineCartOfferInfoText:Be,inlineCartOfferInfoRedirectLink:ze,themeColor:ue,tooltipText:Ie,themeTextColor:me}):null),R&&Ut?.items_subtotal_price>0&&Ut?.currency&&!!L&&function(e,t,n,r,o){if(!e||0===e.length)return!1;const a=[...e].sort(((e,t)=>"minimum_order_value"===r?e?.minimumOrderValue-t?.minimumOrderValue:e?.quantityThreshold-t?.quantityThreshold));return a.filter((e=>0!==e?.[Lr(r)]&&("minimum_order_value"!==r||1!==e?.[Lr(r)]))).some(((e,i)=>jr(e,i,a,o,{currentCartAmount:t,effectiveQuantityForProgressBar:n,customCartProgressBarCriteria:r,checkpoints:a}).progressPercentage>0))}(L,hn(void 0!==Pe?Pe:Ut?.items_subtotal_price,Ut.currency),void 0===Re?Ut?.item_count:Re,te??"minimum_order_value",Ut?.item_count)&&t.createElement(t.Fragment,null,t.createElement($o,{customCartProgressBarCriteria:te??"minimum_order_value",handleCheckpointCrossed:ee,checkpoints:L,effectiveQuantityForProgressBar:void 0===Re?Ut?.item_count:Re,currentCartAmount:hn(void 0!==Pe?Pe:Ut?.items_subtotal_price,Ut.currency),themeColor:ue,themeTextColor:me,primaryTextColor:ae,secondaryTextColor:ie,showMOVForProgressTiers:ye,progressBarFreeProductIconType:ot,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,prefixMessageText:Nt,suffixMessageText:Dt,successMessageText:_t,enableConfetti:Vt})),Ut?.item_count>0&&t.createElement("div",{style:{display:"flex",height:"12px",background:"#87878717"}}),0===Ut?.items?.length&&0===Ut?.item_count&&!1===Qt?.showSkeletonLoader?t.createElement(_o,{showLoyaltyCta:ve,joinNowFunction:A,emptyCartTitle:m,emptyCartDescription:f,exploreCTAColor:s,isUserSignedIn:v,exploreCtaRedirectLink:Q,themeColor:ue,emptyCartButtons:g,cartComponentsCornerRadius:vt,cartComponentsCornerType:bt,themeTextColor:me,recProductsList:M,addCartItem:b,productRecsCtaButtonText:le,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,primaryTextColor:ae,secondaryTextColor:ie,showVariantSelectionDropdownInProductRecs:_e,emptyProductRecsTitleText:de,backgroundSubdued:a,showEmptyCartRecommendations:Ft,tertiaryColor:i,tertiaryTextColor:d}):t.createElement("div",{style:{display:"flex",flexDirection:"column",overflowY:"auto",flex:1,overflowX:"hidden",height:"100%",scrollbarWidth:"none"}},t.createElement(ni,{isDev:F,themeColor:ue,handleDecrement:y,handleIncrement:x,removeCartItem:h,addCartItem:b,primaryTextColor:ae,secondaryTextColor:ie,freeProduct:be,themeTextColor:me,showEditOptionOnProducts:Ne,productPercentageOffMapping:Le,productTagsMapping:je,removeFreebieFromCart:Ve,showDeleteOnFreebies:Qe,freebieCouponTemplates:Ge??[],freebieFlowCheckpoints:Ye??[],cartCheckpoints:L,freeProductAdjustedCartTotal:we,imageAspectSelector:yt,cartComponentsCornerRadius:vt,cartComponentsCornerType:bt,giftWrapVariantId:rt?.variants?.nodes[0]?.id,giftWrapProductId:nt?.giftProductId,showGiftWrapAsLineItem:nt?.showGiftWrapAsLineItem,backgroundSubdued:a,tertiaryColor:i,tertiaryTextColor:d,backgroundColor:r,showDiscountOnMRP:zt,checkoutSectionMessage:Et,checkoutSectionMessageRedirectLink:Wt,showFreebieMilestone:ct,freebieMilestoneData:pt}),xn&&se&&!!M&&M?.length>0&&Ut?.item_count>0&&b&&t.createElement(vr,{addCartItem:b,products:M,productRecsCtaButtonText:le,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,productRecsTitleText:ce,themeColor:ue,primaryTextColor:ae,secondaryTextColor:ie,showVariantSelectionDropdownInProductRecs:_e,cardLayout:ft,variant:ht,cartComponentsCornerType:bt,cartComponentsCornerRadius:vt,backgroundSubdued:a,backgroundColor:r,tertiaryColor:i,tertiaryTextColor:d}),!xn&&pe&&!!M&&M?.length>0&&Ut?.item_count>0&&b&&t.createElement(vr,{addCartItem:b,products:M,productRecsCtaButtonText:le,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,productRecsTitleText:ce,themeColor:ue,primaryTextColor:ae,secondaryTextColor:ie,showVariantSelectionDropdownInProductRecs:_e,cardLayout:ft,variant:ht,cartComponentsCornerRadius:vt,cartComponentsCornerType:bt,backgroundSubdued:a,tertiaryColor:i,tertiaryTextColor:d})),t.createElement(Go,null,Ut?.item_count>0&&w&&k&&t.createElement(oi,{bundleProducts:k}),he&&!!xe&&Ut?.item_count>0&&t.createElement(xi,{companyName:fe,gstNumber:ge,themeColor:ue,iconColor:Ct?.iconColor,showIcon:Ct?.showIcon,backgroundColor:Ct?.backgroundColor,textColor:Ct?.textColor,title:Ct?.title}),!!Ut&&Ut?.item_count>0&&!!Fe&&!!Ae&&!!Me&&Ae.length>0&&t.createElement(kl,{freebieProductsInCart:Ae,themeColor:ue,themeTextColor:me,primaryTextColor:ae,addFreebieToCart:Fe,freebiesInCart:Me,imageAspectSelector:yt,freebieCouponTemplates:Ge,freebieClaimData:Ze,cartCheckpoints:L,isCartDrawerOpen:e,shouldCheckInventoryQuantity:qt}),He&&(We?.length??0)>0&&!!Ue&&Ut?.item_count>0&&t.createElement("div",{className:"form-group"},t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",margin:"6px 1rem 1rem 1rem"},onClick:()=>mn(!un)},t.createElement("span",{style:{fontSize:"12px",display:"flex",gap:"5px",alignItems:"center"}},"Shipping ",t.createElement(gt,null)),t.createElement("div",{className:"icon-transition"},un?t.createElement(dt,null):t.createElement(st,null))),"all-products"===Xe&&un?t.createElement(Fs,{postalCodeList:We,themeColor:ue,themeTextColor:me,enableSlotPicker:Ke,deliveryHeaderTitle:Je,deliveryAvailableText:et,deliveryNotAvailableText:tt,disabledDates:Dn}):un&&(tn?t.createElement(Fs,{postalCodeList:We,themeColor:ue,themeTextColor:me,enableSlotPicker:Ke,deliveryHeaderTitle:Je,deliveryAvailableText:et,deliveryNotAvailableText:tt,disabledDates:Dn}):t.createElement(Ms,{postalCodeList:We,themeColor:ue,themeTextColor:me,enableSlotPicker:Ke,disabledDates:Dn}))),$e&&!!Te&&Ut?.item_count>0&&t.createElement(yi,{note:Se,noteSectionTitle:kt}),nt?.showGiftWrapOption&&Ut?.item_count>0&&t.createElement(Us,{themeColor:ue,id:nt?.giftProductId,detail:rt,showPrice:nt?.showPrice,errorText:nt?.errorText,customText:nt?.customText,showGiftIcon:nt?.showGiftIcon,addCartItem:b,removeCartItem:h}),Ut?.item_count>0&&jt&&!ve&&Lt&&t.createElement(Tp,{backgroundSubdued:a,themeColor:ue,themeTextColor:me,primaryTextColor:ae,cartComponentsCornerRadius:vt,applyCouponCode:Lt,removeDiscount:I,enableConfetti:Vt}),Ut?.item_count>0&&C&&N&&!$t&&U&&D&&D?.length>0?t.createElement(t.Fragment,null,v||v&&J?t.createElement(xa,{themeColor:ue,showGuestDiscountCoupon:q,guestRewardCoupon:H,ref:vn,discountAmountOff:E,userTotalPoints:_??0,applyDiscount:N,applyTemplateDiscount:U,rewardCoupons:D,isCouponSelectionOpen:Xt,setIsCouponSelectionOpen:en,pointsToBeUsed:S,joinNowFunction:A,guestLoyaltyPercentage:O,isUserSignedIn:v,showDiscountsListToGuestUsers:K}):!!O&&ve&&!!A&&t.createElement(Uo,{cartSigninCTAMainText:Ee,signinCTAButtonVisible:ke,guestLoyaltyPercentage:O,joinNowFunction:A,themeColor:ue,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,primaryTextColor:ae,secondaryTextColor:ie,cartComponentsCornerRadius:vt,cartComponentsCornerType:bt,showCartLevelAltPay:W})):Ut?.item_count>0&&t.createElement(t.Fragment,null,v||!ve||$t?!$t&&Ut?.item_count>0&&void 0!==E&&void 0!==S&&!!T&&ve&&!!N&&t.createElement(pa,{themeColor:ue,applyDiscount:N,discountAmountOff:E,loyaltyIcon:T,pointsToBeUsed:S,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,primaryTextColor:ae,secondaryTextColor:ie,minimumOrderValueToAvailDiscount:Ce,brandTokenName:Bt,showCartLevelAltPay:W,redemptionMultiplier:B}):Ut?.item_count>0&&!!O&&!!A&&t.createElement(Uo,{cartSigninCTAMainText:Ee,signinCTAButtonVisible:ke,themeColor:ue,joinNowFunction:A,guestLoyaltyPercentage:O,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,primaryTextColor:ae,secondaryTextColor:ie,cartComponentsCornerRadius:vt,cartComponentsCornerType:bt,showCartLevelAltPay:W})),Ut?.item_count>0&&!!$t&&!!I&&ve&&$t&&void 0!==S&&t.createElement(la,{themeColor:ue,removeDiscount:I,loyaltyDiscount:$t,isDev:F,ctaButtonBackgroundColor:re,ctaButtonTextColor:oe,primaryTextColor:ae,secondaryTextColor:ie,pointsToBeUsed:S,brandTokenName:Bt,showCartLevelAltPay:W}),ve&&W&&j&&T&&Ut?.item_count>0&&t.createElement(Cp,{loyaltyIcon:T,backgroundSubdued:a,primaryTextColor:ae,pointsRewardRate:V,rewardMultiplier:$}),ve&&Ut&&Ut.item_count>0&&!!Ce&&Ce>1&&t.createElement("span",{className:"yt-cart-loyalty-mov-text",style:{fontSize:"10px",color:ue??"#50D1AA",fontWeight:600,display:"flex",justifyContent:ke?"space-between":"center"}},"Minimum order value to use ",Bt,":"," ",Ce),Ut&&P&&Ut?.item_count>0&&t.createElement("div",null,t.createElement(jo,{disableCheckoutButton:!!Ot||Qt.cartLoading,discountApplied:z,checkoutFunction:P,checkoutButtonColor:ne,checkoutFontSize:p,discountInCheckoutButton:Z,isStickyCheckout:X,discountAmountApplied:G,minimumCartValue:Y,themeTextColor:me,applyGSTToCart:xe,showGSTOption:he,applyNoteToCart:Te,showNoteOption:$e,enableGeoLocationDeliveryRestriction:He,applyPostalCodeAndDeliverySlotToCart:Ue,enableSlotPicker:Ke,cartComponentsCornerRadius:vt,cartComponentsCornerType:bt,checkoutSectionMessage:Et,checkoutSectionMessageDisplay:Tt,checkoutSectionMessageRedirectLink:Wt,showDiscountOnMRP:zt,tertiaryColor:i,tertiaryTextColor:d,cartCheckpoints:L,toggleDecimal:Pt,checkoutButtonBottomSpacing:Mt,showPoweredByBadge:Rt,showCheckoutButtonPaymentIcons:Ht,primaryTextColor:ae}))))))},zp=x.div`
|
|
2239
2239
|
position: relative;
|
|
2240
2240
|
`,Ip=x.button`
|
|
2241
2241
|
border: 1px solid #ccc;
|
|
@@ -2437,7 +2437,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
2437
2437
|
transform: scale(1.01);
|
|
2438
2438
|
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
|
|
2439
2439
|
}
|
|
2440
|
-
`,Up={showPrice:!0,productImage:{id:"",path:""},buyNowCtaTitle:"BUY NOW",desktopBarType:"stretch",showProductName:!0,showBuyNowButton:!1,showProductImage:!0,addToCartCtaTitle:"ADD TO CART",showAddToCartButton:!0,showVariantSelector:!1,productInfoVisibility:!0,excludeProducts:[],showBarOnDesktop:!0,ctaButtonFontSize:18,startsAppearingAtHeight:200,fullyAppearsAtHeight:400},Qp=({showStickyCart:e,product:n,addCartItem:r,onSetLoading:i,themeColor:d,cartData:s,isCartOpen:p,setIsCartOpen:u,ctaButtonBackgroundColor:m,ctaButtonTextColor:f,addToStickyCart:g,cartComponentsCornerType:h,cartComponentsCornerRadius:x,themeTextColor:y,stickyCartCustomizationData:b,checkoutFunction:v,backgroundColor:w,primaryTextColor:C,comboBundleData:k,comboBundleAddToCartFunction:E})=>{const[T,S]=c(""),[$,B]=c(null),[z,I]=c({}),N=Ta(),[D,_]=c(null),P=o(null);l((()=>{const e=e=>{P.current&&!P.current.contains(e.target)&&_(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]);const A=a((()=>k&&"combo"===k.type?k?.products?.[0]?.productDetails?.variants?.edges?.find((e=>e?.node?.availableForSale))?.node:n?.variants?.find((e=>e?.available))),[k,n]),[O,F]=c((()=>{if(!k||"combo"!==k.type)return{};const e={};return k?.products?.forEach(((t,n)=>{const r=t?.productDetails?.variants?.edges?.find((e=>e?.node?.availableForSale))?.node;r&&(e[n]=r.id)})),e})),M=a((e=>{if(!k||"combo"!==k.type)return;const t={};k?.products?.forEach(((n,r)=>{const o=n?.productDetails?.variants?.edges?.find((t=>{const r=t?.node;return n?.productDetails?.options?.every(((t,n)=>{const o=e?.[t?.name],a=r?.title?.split(" / ")?.at(n);return!(!o||!a)&&o.trim().toLowerCase()===a.trim().toLowerCase()}))}));o?.node?.id&&(t[r]=o.node.id)})),Object.keys(t).length>0&&F((e=>({...e,...t})))}),[k]);l((()=>{const e=A();if(e){S(String(e.id)),B(e);const t={};n?.options&&Array.isArray(n.options)&&n.options.forEach(((n,r)=>{const o=`option${r+1}`;e?.[o]&&(t[n?.name]=e[o])})),I(t)}}),[n,A]);const R=a((()=>new URLSearchParams(window.location.search).get("variant")||""),[]),L=()=>{const e=R();if(e){const t=n?.variants?.find((t=>String(t?.id)===String(e)));if(t&&t?.available){S(String(t.id)),B(t);const e={};n?.options?.forEach(((n,r)=>{const o=`option${r+1}`;t?.[o]&&(e[n?.name]=t[o])})),I(e)}else{const e=A();e&&(S(String(e.id)),B(e))}}};l((()=>{L();const e=new Event("urlChange");let t=!0;const n=window.history.pushState,r=window.history.replaceState;return window.history.pushState=function(){t&&(n.apply(this,arguments),window.dispatchEvent(e))},window.history.replaceState=function(){t&&(r.apply(this,arguments),window.dispatchEvent(e))},window.addEventListener("urlChange",L),()=>{t=!1,window.removeEventListener("urlChange",L),window.history.pushState=n,window.history.replaceState=r}}),[R,n,A,$,T]);const j=o(null),[V,W]=c(1),H=yn(s,s?.currency);l((()=>{(async()=>{try{n&&T&&B(n?.variants?.filter((e=>String(e?.id)===String(T)))[0])}catch(e){console.error("Error getting selected product variant id")}})()}),[n,T]);const{cartLoading:q}=dn(),U=o(null),[Q,G]=c(0);l((()=>{U.current&&G(U.current.offsetWidth)}),[]);const Y=n?.options?.find((e=>e?.name?.toLowerCase()?.includes("color")))?.name,Z=Y?z?.[Y]:null,X=b&&(K=b,0!==Object.keys(K).length||K.constructor!==Object)?b:Up;var K;const{showProductName:J,showPrice:ee,showVariantSelector:te,showBuyNowButton:ne,showAddToCartButton:re,desktopBarType:oe,showProductImage:ae,buyNowCtaTitle:ie,addToCartCtaTitle:le,productInfoVisibility:ce,showBarOnDesktop:de,ctaButtonFontSize:se,startsAppearingAtHeight:pe,fullyAppearsAtHeight:ue,topRibbonText:me}=X,[fe,ge]=c(0),[he,xe]=c(100),[ye,be]=c(!1);if(l((()=>{const e=()=>{const e=window.scrollY;document.documentElement.scrollHeight;const t=pe||200,n=ue||400;if(e>t){const r=Math.min((e-t)/(n-t),1);ge(r),xe(100-100*r)}else ge(0),xe(100)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),l((()=>{const e=()=>{const e=window.innerWidth<768;be(e||!1!==de)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[de]),n?.variants?.length<1)return null;const ve=n?.available??!0,we=A(),Ce=k&&"combo"===k.type?k?.products?.[0]?.productDetails?.variants?.edges?.find((e=>e?.node?.id===O?.[0]))?.node?.price:$?.price??we?.price??n?.variants?.[0]?.price;if(0===Number(Ce))return null;if(!e||!ye)return null;if(b?.excludeProducts?.includes(n?.handle))return null;const ke=k&&"combo"===k.type?Object.values(O).length>0:$?.available??!0;return t.createElement(Mp,{className:"yt-sticky-bar-container",$opacity:fe,$translateY:he,$desktopBarType:oe||"stretch"},t.createElement(Rp,{className:"yt-sticky-bar-inner-container",$desktopBarType:oe||"stretch",$themeColor:d,$cornerType:h??"sharp",$cornerRadius:x??20,$themeTextColor:y,$productInfoVisibility:ce,$topRibbonText:me,$backgroundColor:w},ce&&t.createElement(Lp,null,ae&&t.createElement(jp,{className:"yt-sticky-bar-product-image",src:((e,t)=>"string"==typeof e?.featured_image?e.featured_image:e?.featured_image?.src?e.featured_image.src:t?.featured_image)($,n),alt:$?.name}),t.createElement(Vp,{ref:U,className:"yt-sticky-bar-product-details"},J&&t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},t.createElement("span",{style:{fontSize:"20px",fontWeight:"500",color:C,display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",lineHeight:"normal"}},`${n?.title}`),Z&&t.createElement("span",{style:{fontSize:"11px",color:"#666",backgroundColor:"#f1f1f1",padding:"2px 6px",borderRadius:"10px",border:"1px solid #ddd"}},Z)),n?.variants?.length>1&&te&&t.createElement(Op,{className:"yt-sticky-bar-option-container",ref:P},n?.options?.map((e=>{const r=N?.options?.find((t=>t.name.trim().toLowerCase()===e.name.trim().toLowerCase())),o=z[e.name],a=D===e.name,i=t=>{((e,t)=>{const r={...z,[e]:t};I(r);const o=n?.variants?.find((e=>n?.options?.every(((t,n)=>{const o=r?.[t?.name],a=e?.[`option${n+1}`];return"string"==typeof o&&"string"==typeof a?o.trim().toLowerCase()===a.trim().toLowerCase():o===a}))));o&&(S(String(o.id)),B(o)),k&&"combo"===k?.type&&M(r)})(e.name,t),_(null)},l=Ea(r,o);return t.createElement("div",{key:e.name,style:{display:"flex",alignItems:"center",gap:"8px"}},t.createElement(Fp,null,e.name),t.createElement(zp,null,t.createElement(Ip,{onClick:()=>{_(a?null:e.name)},className:"yt-sticky-bar-dropdown-button"},"color"===r?.type&&l?.value?t.createElement(_p,{$colorValue:l.value}):"image"===r?.type&&l?.value?t.createElement(Pp,{src:l.value}):null,o,t.createElement(Ap,{size:8,$isOpen:a})),a&&t.createElement(Np,{$backgroundColor:w,className:"yt-sticky-bar-dropdown-panel"},e.values.map((e=>{const n=Ea(r,e);return t.createElement(Dp,{className:"yt-sticky-bar-dropdown-item",key:e,onClick:()=>i(e)},"color"===r?.type&&n?.value?t.createElement(_p,{$colorValue:n.value}):"image"===r?.type&&n?.value?t.createElement(Pp,{src:n.value}):null,e)})))))}))),ee&&t.createElement(t.Fragment,null,$?.compare_at_price&&$?.compare_at_price>$?.price?t.createElement("div",{style:{display:"flex",flexDirection:"row",gap:5,alignItems:"center"}},t.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${H}`,hn($?.price,s?.currency)),t.createElement("span",{style:{textDecoration:"line-through",color:"#6b7280",fontSize:14},className:"yt-sticky-bar-product-compare-price"},`${H}`,hn($?.compare_at_price,s?.currency)),t.createElement("span",{style:{backgroundColor:d??"black",color:y??"white",padding:"3px 9px",fontSize:"12px",borderRadius:"rounded"===h?`${x}px`:"0"},className:"yt-sticky-bar-product-discount"},"Save ",`${H}`,hn($?.compare_at_price-$?.price,s?.currency))):t.createElement(t.Fragment,null,t.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${H}`,hn($?.price,s?.currency)))),t.createElement("span",{style:{color:"#6E747B",fontSize:10},className:"yt-sticky-bar-product-tax-inclusion"},"Inclusive of all taxes"))),ve&&t.createElement(Wp,{className:"yt-sticky-bar-product-line-item-control",$flexDirection:ce?"row":"column"},re&&t.createElement(qp,{ref:j,onClick:async()=>{if(k&&"combo"===k.type){if(!E)return void console.error("[StickyCart.tsx] comboBundleAddToCartFunction is undefined");const e=Object.entries(O);if(0===e.length)return;const t=e.map((([,e])=>e)),n=e.map((([e,t])=>{const n=k?.products?.[Number(e)],r=n?.productDetails?.variants?.edges?.find((e=>e?.node?.id===t))?.node;return r?{variantId:t,price:Number(r?.price),compareAtPrice:Number(r?.compareAtPrice||r?.price)}:null})).filter((e=>null!==e)),r=n.reduce(((e,t)=>e+Math.max(t.compareAtPrice,t.price)),0),o=n.reduce(((e,t)=>e+t.price),0);let a=Math.min(r,o);k?.percentageOff?a=o*(1-k.percentageOff/100):k?.dealAmount?a=k.dealAmount:k?.amountOff&&(a=o-k.amountOff);const i=n.map((({variantId:e,price:t})=>({variantId:e,price:t})));await E(Number(r.toFixed(2)),t,Number(a.toFixed(2)),i)}else g&&await g(String(T)??String(n?.variants[0]?.id),V)},disabled:q.cartLoading||!ke,$bgColor:ke?m:"#d1d5db",$textColor:ke?f:"#6b7280",className:"yt-sticky-add-to-cart-button",$cornerType:h??"sharp",$cornerRadius:x??20,$fontSize:se,style:{cursor:ke?"pointer":"not-allowed",opacity:ke?1:.6}},q.cartLoading?t.createElement(ta,{color:"white",loading:q.cartLoading,size:15}):t.createElement(t.Fragment,null,ke?le??"Add to Cart":"Out of Stock")),ne&&t.createElement(Hp,{onClick:async
|
|
2440
|
+
`,Up={showPrice:!0,productImage:{id:"",path:""},buyNowCtaTitle:"BUY NOW",desktopBarType:"stretch",showProductName:!0,showBuyNowButton:!1,showProductImage:!0,addToCartCtaTitle:"ADD TO CART",showAddToCartButton:!0,showVariantSelector:!1,productInfoVisibility:!0,excludeProducts:[],showBarOnDesktop:!0,ctaButtonFontSize:18,startsAppearingAtHeight:200,fullyAppearsAtHeight:400},Qp=({showStickyCart:e,product:n,addCartItem:r,onSetLoading:i,themeColor:d,cartData:s,isCartOpen:p,setIsCartOpen:u,ctaButtonBackgroundColor:m,ctaButtonTextColor:f,addToStickyCart:g,cartComponentsCornerType:h,cartComponentsCornerRadius:x,themeTextColor:y,stickyCartCustomizationData:b,checkoutFunction:v,backgroundColor:w,primaryTextColor:C,comboBundleData:k,comboBundleAddToCartFunction:E})=>{const[T,S]=c(""),[$,B]=c(null),[z,I]=c({}),N=Ta(),[D,_]=c(null),P=o(null);l((()=>{const e=e=>{P.current&&!P.current.contains(e.target)&&_(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]);const A=a((()=>k&&"combo"===k.type?k?.products?.[0]?.productDetails?.variants?.edges?.find((e=>e?.node?.availableForSale))?.node:n?.variants?.find((e=>e?.available))),[k,n]),[O,F]=c((()=>{if(!k||"combo"!==k.type)return{};const e={};return k?.products?.forEach(((t,n)=>{const r=t?.productDetails?.variants?.edges?.find((e=>e?.node?.availableForSale))?.node;r&&(e[n]=r.id)})),e})),M=a((e=>{if(!k||"combo"!==k.type)return;const t={};k?.products?.forEach(((n,r)=>{const o=n?.productDetails?.variants?.edges?.find((t=>{const r=t?.node;return n?.productDetails?.options?.every(((t,n)=>{const o=e?.[t?.name],a=r?.title?.split(" / ")?.at(n);return!(!o||!a)&&o.trim().toLowerCase()===a.trim().toLowerCase()}))}));o?.node?.id&&(t[r]=o.node.id)})),Object.keys(t).length>0&&F((e=>({...e,...t})))}),[k]);l((()=>{const e=A();if(e){S(String(e.id)),B(e);const t={};n?.options&&Array.isArray(n.options)&&n.options.forEach(((n,r)=>{const o=`option${r+1}`;e?.[o]&&(t[n?.name]=e[o])})),I(t)}}),[n,A]);const R=a((()=>new URLSearchParams(window.location.search).get("variant")||""),[]),L=()=>{const e=R();if(e){const t=n?.variants?.find((t=>String(t?.id)===String(e)));if(t&&t?.available){S(String(t.id)),B(t);const e={};n?.options?.forEach(((n,r)=>{const o=`option${r+1}`;t?.[o]&&(e[n?.name]=t[o])})),I(e)}else{const e=A();e&&(S(String(e.id)),B(e))}}};l((()=>{L();const e=new Event("urlChange");let t=!0;const n=window.history.pushState,r=window.history.replaceState;return window.history.pushState=function(){t&&(n.apply(this,arguments),window.dispatchEvent(e))},window.history.replaceState=function(){t&&(r.apply(this,arguments),window.dispatchEvent(e))},window.addEventListener("urlChange",L),()=>{t=!1,window.removeEventListener("urlChange",L),window.history.pushState=n,window.history.replaceState=r}}),[R,n,A,$,T]);const j=o(null),[V,W]=c(1),H=yn(s,s?.currency);l((()=>{(async()=>{try{n&&T&&B(n?.variants?.filter((e=>String(e?.id)===String(T)))[0])}catch(e){console.error("Error getting selected product variant id")}})()}),[n,T]);const{cartLoading:q}=dn(),U=o(null),[Q,G]=c(0);l((()=>{U.current&&G(U.current.offsetWidth)}),[]);const Y=n?.options?.find((e=>e?.name?.toLowerCase()?.includes("color")))?.name,Z=Y?z?.[Y]:null,X=b&&(K=b,0!==Object.keys(K).length||K.constructor!==Object)?b:Up;var K;const{showProductName:J,showPrice:ee,showVariantSelector:te,showBuyNowButton:ne,showAddToCartButton:re,desktopBarType:oe,showProductImage:ae,buyNowCtaTitle:ie,addToCartCtaTitle:le,productInfoVisibility:ce,showBarOnDesktop:de,ctaButtonFontSize:se,startsAppearingAtHeight:pe,fullyAppearsAtHeight:ue,topRibbonText:me}=X,[fe,ge]=c(0),[he,xe]=c(100),[ye,be]=c(!1);if(l((()=>{const e=()=>{const e=window.scrollY;document.documentElement.scrollHeight;const t=pe||200,n=ue||400;if(e>t){const r=Math.min((e-t)/(n-t),1);ge(r),xe(100-100*r)}else ge(0),xe(100)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),l((()=>{const e=()=>{const e=window.innerWidth<768;be(e||!1!==de)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[de]),n?.variants?.length<1)return null;const ve=n?.available??!0,we=A(),Ce=k&&"combo"===k.type?k?.products?.[0]?.productDetails?.variants?.edges?.find((e=>e?.node?.id===O?.[0]))?.node?.price:$?.price??we?.price??n?.variants?.[0]?.price;if(0===Number(Ce))return null;if(!e||!ye)return null;if(b?.excludeProducts?.includes(n?.handle))return null;const ke=k&&"combo"===k.type?Object.values(O).length>0:$?.available??!0;return t.createElement(Mp,{className:"yt-sticky-bar-container",$opacity:fe,$translateY:he,$desktopBarType:oe||"stretch"},t.createElement(Rp,{className:"yt-sticky-bar-inner-container",$desktopBarType:oe||"stretch",$themeColor:d,$cornerType:h??"sharp",$cornerRadius:x??20,$themeTextColor:y,$productInfoVisibility:ce,$topRibbonText:me,$backgroundColor:w},ce&&t.createElement(Lp,null,ae&&t.createElement(jp,{className:"yt-sticky-bar-product-image",src:((e,t)=>"string"==typeof e?.featured_image?e.featured_image:e?.featured_image?.src?e.featured_image.src:t?.featured_image)($,n),alt:$?.name}),t.createElement(Vp,{ref:U,className:"yt-sticky-bar-product-details"},J&&t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},t.createElement("span",{style:{fontSize:"20px",fontWeight:"500",color:C,display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",lineHeight:"normal"}},`${n?.title}`),Z&&t.createElement("span",{style:{fontSize:"11px",color:"#666",backgroundColor:"#f1f1f1",padding:"2px 6px",borderRadius:"10px",border:"1px solid #ddd"}},Z)),n?.variants?.length>1&&te&&t.createElement(Op,{className:"yt-sticky-bar-option-container",ref:P},n?.options?.map((e=>{const r=N?.options?.find((t=>t.name.trim().toLowerCase()===e.name.trim().toLowerCase())),o=z[e.name],a=D===e.name,i=t=>{((e,t)=>{const r={...z,[e]:t};I(r);const o=n?.variants?.find((e=>n?.options?.every(((t,n)=>{const o=r?.[t?.name],a=e?.[`option${n+1}`];return"string"==typeof o&&"string"==typeof a?o.trim().toLowerCase()===a.trim().toLowerCase():o===a}))));o&&(S(String(o.id)),B(o)),k&&"combo"===k?.type&&M(r)})(e.name,t),_(null)},l=Ea(r,o);return t.createElement("div",{key:e.name,style:{display:"flex",alignItems:"center",gap:"8px"}},t.createElement(Fp,null,e.name),t.createElement(zp,null,t.createElement(Ip,{onClick:()=>{_(a?null:e.name)},className:"yt-sticky-bar-dropdown-button"},"color"===r?.type&&l?.value?t.createElement(_p,{$colorValue:l.value}):"image"===r?.type&&l?.value?t.createElement(Pp,{src:l.value}):null,o,t.createElement(Ap,{size:8,$isOpen:a})),a&&t.createElement(Np,{$backgroundColor:w,className:"yt-sticky-bar-dropdown-panel"},e.values.map((e=>{const n=Ea(r,e);return t.createElement(Dp,{className:"yt-sticky-bar-dropdown-item",key:e,onClick:()=>i(e)},"color"===r?.type&&n?.value?t.createElement(_p,{$colorValue:n.value}):"image"===r?.type&&n?.value?t.createElement(Pp,{src:n.value}):null,e)})))))}))),ee&&t.createElement(t.Fragment,null,$?.compare_at_price&&$?.compare_at_price>$?.price?t.createElement("div",{style:{display:"flex",flexDirection:"row",gap:5,alignItems:"center"}},t.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${H}`,hn($?.price,s?.currency)),t.createElement("span",{style:{textDecoration:"line-through",color:"#6b7280",fontSize:14},className:"yt-sticky-bar-product-compare-price"},`${H}`,hn($?.compare_at_price,s?.currency)),t.createElement("span",{style:{backgroundColor:d??"black",color:y??"white",padding:"3px 9px",fontSize:"12px",borderRadius:"rounded"===h?`${x}px`:"0"},className:"yt-sticky-bar-product-discount"},"Save ",`${H}`,hn($?.compare_at_price-$?.price,s?.currency))):t.createElement(t.Fragment,null,t.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${H}`,hn($?.price,s?.currency)))),t.createElement("span",{style:{color:"#6E747B",fontSize:10},className:"yt-sticky-bar-product-tax-inclusion"},"Inclusive of all taxes"))),ve&&t.createElement(Wp,{className:"yt-sticky-bar-product-line-item-control",$flexDirection:ce?"row":"column"},re&&t.createElement(qp,{ref:j,onClick:async()=>{if(k&&"combo"===k.type){if(!E)return void console.error("[StickyCart.tsx] comboBundleAddToCartFunction is undefined");const e=Object.entries(O);if(0===e.length)return;const t=e.map((([,e])=>e)),n=e.map((([e,t])=>{const n=k?.products?.[Number(e)],r=n?.productDetails?.variants?.edges?.find((e=>e?.node?.id===t))?.node;return r?{variantId:t,price:Number(r?.price),compareAtPrice:Number(r?.compareAtPrice||r?.price)}:null})).filter((e=>null!==e)),r=n.reduce(((e,t)=>e+Math.max(t.compareAtPrice,t.price)),0),o=n.reduce(((e,t)=>e+t.price),0);let a=Math.min(r,o);k?.percentageOff?a=o*(1-k.percentageOff/100):k?.dealAmount?a=k.dealAmount:k?.amountOff&&(a=o-k.amountOff);const i=n.map((({variantId:e,price:t})=>({variantId:e,price:t})));await E(Number(r.toFixed(2)),t,Number(a.toFixed(2)),i)}else g&&await g(String(T)??String(n?.variants[0]?.id),V)},disabled:q.cartLoading||!ke,$bgColor:ke?m:"#d1d5db",$textColor:ke?f:"#6b7280",className:"yt-sticky-add-to-cart-button",$cornerType:h??"sharp",$cornerRadius:x??20,$fontSize:se,style:{cursor:ke?"pointer":"not-allowed",opacity:ke?1:.6}},q.cartLoading?t.createElement(ta,{color:"white",loading:q.cartLoading,size:15}):t.createElement(t.Fragment,null,ke?le??"Add to Cart":"Out of Stock")),ne&&t.createElement(Hp,{onClick:async()=>{try{v&&await v(String(T)??String(n?.variants[0]?.id),V)}catch(e){console.error("Error checking out from sticky bar")}},id:"yt-checkout-button",className:"yt-checkout-button",disabled:q.cartLoading||!ke,$bgColor:ke?d:"#d1d5db",$textColor:ke?y:"#6b7280",$cornerType:h??"sharp",$cornerRadius:x??20,$fontSize:se,style:{cursor:ke?"pointer":"not-allowed",opacity:ke?1:.6}},q.cartLoading?t.createElement(ta,{color:"white",loading:q.cartLoading,size:15}):t.createElement(t.Fragment,null,ke?ie??"Buy Now":"Out of Stock")))))},Gp=x.div`
|
|
2441
2441
|
width: 100%;
|
|
2442
2442
|
height: 100%;
|
|
2443
2443
|
display: flex;
|
|
@@ -3957,7 +3957,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3957
3957
|
}
|
|
3958
3958
|
|
|
3959
3959
|
@media (max-width: 400px) {
|
|
3960
|
-
grid-template-columns: repeat(auto-fit, minmax(
|
|
3960
|
+
grid-template-columns: repeat(auto-fit, minmax(109px, 1fr));
|
|
3961
3961
|
gap: 6px;
|
|
3962
3962
|
}
|
|
3963
3963
|
`,tg=x.div`
|
|
@@ -4240,7 +4240,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4240
4240
|
@media (max-width: 600px) {
|
|
4241
4241
|
box-sizing: border-box;
|
|
4242
4242
|
width: 100% ;
|
|
4243
|
-
max-height:
|
|
4243
|
+
max-height: 37vh;
|
|
4244
4244
|
position: absolute;
|
|
4245
4245
|
left: 0;
|
|
4246
4246
|
right: 0;
|
|
@@ -4308,7 +4308,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4308
4308
|
flex-direction: column;
|
|
4309
4309
|
gap: 12px;
|
|
4310
4310
|
@media (max-width: 600px) {
|
|
4311
|
-
max-height:
|
|
4311
|
+
max-height: calc(37vh - 80px);
|
|
4312
4312
|
}
|
|
4313
4313
|
|
|
4314
4314
|
`,hg=x.div`
|
|
@@ -4411,7 +4411,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4411
4411
|
font-size: 11px;
|
|
4412
4412
|
padding: 4px 8px;
|
|
4413
4413
|
}
|
|
4414
|
-
`,Tg=({bundle:e,addToCartFunction:n})=>{const[r,a]=c({}),[d,s]=c(!1),[p,u]=c(0),[m,f]=c(0),[g,h]=c(""),[x,y]=c([]),[b,v]=c({}),[w,C]=c(!1),[k,E]=c(window.innerWidth<450),T=e.builderTiers?.productTier||[],S=i((()=>(e,t)=>{const n=e?.variants?.edges?.find((e=>e.node.id===t)),r=n?.node;return r?e.tracksInventory&&r.inventoryItem?.tracked?r.inventoryQuantity>0?r.inventoryQuantity:r.inventoryQuantity<=0&&"continue"===r.inventoryPolicy?1/0:0:1/0:0}),[]),{originalPrice:$,dealPrice:B,offerValue:z}=i((()=>{const t=[];let n=0;Object.values(r).forEach((e=>{e.productId&&e.variantId&&(t.push({productId:e.productId,variantId:e.variantId}),n++)}));let o=0,a=0;for(const{productId:n,variantId:r}of t){const t=e.products.find((e=>e.productId===n));if(!t)continue;const i=t.productDetails.variants.edges.find((e=>e.node.id===r))?.node;if(!i)continue;const l=Number.parseFloat(i.price||"0"),c=Number.parseFloat(i.compareAtPrice||"0");o+=l,a+=c>0?c:l}let i=o;(n===T.length||e?.dealAmount)&&(e?.percentageOff?i=o*(1-e.percentageOff/100):e?.dealAmount?i=e.dealAmount:e?.amountOff&&e.amountOff<o&&(i=o-e.amountOff));const l=a||o,c=l-i;return{originalPrice:l.toFixed(2),dealPrice:i.toFixed(2),offerValue:c.toFixed(2)}}),[e,r,T.length]);l((()=>{u(T.length-Object.keys(r).length)}),[r]),l((()=>{const e={};let t=!1;T.forEach(((n,r)=>{if(n.isFixed&&n.products&&n.products.length>0){const o=n.products[0];if(o&&o.productId){const n=o.variantIds?.[0]||N(o.productId);n&&(e[r]={productId:o.productId,variantId:n},t=!0)}}})),t&&a((t=>({...t,...e})))}),[T]),l((()=>{if(null===m||0===T.length)return;const t=T[m].products.map((e=>e.productId)),n=new Map;e.products.forEach((e=>{t.includes(e.productId)&&!n.has(e.productId)&&n.set(e.productId,e)}));let r=Array.from(n.values());if(""!==g.trim()){const e=g.toLowerCase();r=r.filter((t=>t.productDetails.title.toLowerCase().includes(e)||t.productDetails.selectedVariant?.displayName?.toLowerCase().includes(e)||t.productDetails.collections?.edges?.some((t=>t.node.title.toLowerCase().includes(e)))))}y(r)}),[g,e.products,m,T]);const I=t=>{const n=e.products.find((e=>e.productId===t));return n?.productDetails},N=t=>{const n=e.products.find((e=>e.productId===t));if(!n||!n.productDetails.variants.edges.length)return"";const r=n.productDetails.variants.edges.find((e=>S(n.productDetails,e.node.id)>0))?.node;return r?r.id:n.productDetails.variants.edges[0].node.id},D=(t,n)=>{if(null==m)return;const r=n||N(t),o=e.products.find((e=>e.productId===t));if(o){if(0===S(o.productDetails,r))return void console.log("Cannot select out of stock variant")}a((e=>({...e,[m]:{productId:t,variantId:r}}))),s(!1),h("")},_=e=>{a((t=>{const n={...t};return delete n[e],n})),v({})},P=t=>{const n=T[t];if(n.isFixed)return;f(t),s(!0),h("");const r=n.products.map((e=>e.productId)),o=e.products.filter((e=>r.includes(e.productId))),a=new Map;o.forEach((e=>{a.has(e.productId)||a.set(e.productId,e)})),y(Array.from(a.values()))};l((()=>{const e=()=>{E(window.innerWidth<450)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const A=e.customizations,O=k,F="bundles"===e.appName?e.pageHeader?.title:e?.title,M="bundles"===e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(t.Fragment,null,t.createElement(Qf,{verticalMargin:A.comboBundle.verticalMargin,borderRadius:"20px"},A.comboBundle.embedContentVisibility&&t.createElement(Gf,null,A.comboBundle?.embedContentVisibility&&A.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Title")&&t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginBottom:"10px",width:"100%",textAlign:A.comboBundle.infoAlignment||"left"}},t.createElement("h2",{style:{fontSize:"28px",color:A.comboBundle?.titleTextColor||"#000",fontWeight:"bold",lineHeight:"1.6",margin:0}},F)),A.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Price")&&Number(B)>1&&t.createElement(t.Fragment,null,t.createElement(Yf,{infoAlignment:A.comboBundle.infoAlignment},t.createElement(Zf,null,Yh(A.general.currencySymbol,e.storeCurrencyCode),Gh(B)),Number(B)<Number($)&&t.createElement(Xf,{style:{minWidth:"fit-content"}},Yh(A.general.currencySymbol,e.storeCurrencyCode)," ",Gh($)),t.createElement(Kf,{style:{minWidth:"fit-content"}},"In Stock")),t.createElement(Jf,{style:{textAlign:A.comboBundle.infoAlignment||"left",fontSize:A.comboBundle.productDescriptionFontSize}},"Tax included. Shipping calculated at checkout."))),t.createElement(eg,{gridSize:T.length,isHorizontal:O},T.map(((e,n)=>{const a=(e=>!!r[e]&&!!r[e].productId)(n),{product:i,variantId:c}=(e=>{const t=r?.[e];return t?{product:I(t.productId),variantId:t.variantId}:{product:void 0,variantId:""}})(n),d=i?((e,t)=>{if(!e||!e.variants.edges)return null;const n=e.variants.edges.find((e=>e.node.id===t));return n?.node})(i,c):null,s=e.isFixed,p=o(null);return l((()=>{const e=p.current;if(!e)return;const t=e.querySelector("span");if(!t)return;const n=e.clientWidth,r=t.scrollWidth;if(r<=n)return e.setAttribute("data-overflow","false"),e.style.removeProperty("--scroll-end"),void e.style.removeProperty("--duration");const o=-(r-n);e.style.setProperty("--scroll-end",`${o}px`);const a=2*Math.max(1,Math.abs(o)/40)+3;e.style.setProperty("--duration",`${a}s`),e.setAttribute("data-overflow","true")}),[d?.displayName,d?.title]),a&&i?t.createElement(tg,{key:`tier-${n}`,onClick:()=>!s&&P(n),style:{borderRadius:"20px",cursor:s?"default":"pointer"},isHorizontal:O,infoAlignment:A.comboBundle.infoAlignment},!s&&t.createElement(lg,{onClick:e=>{e.stopPropagation(),_(n)}},"×"),t.createElement(rg,{src:i?.featuredMedia?.preview?.image?.url||"/placeholder.svg?height=200&width=200",alt:i?.title,style:{aspectRatio:A?.general.imageAspectRatio||"1/1"},isHorizontal:O}),t.createElement(og,{style:{color:"#1e1e1e",textAlign:"center",...O&&"right"===A.comboBundle.infoAlignment&&{padding:"0 8px",textAlign:"right",alignItems:"flex-end"},...O&&"left"===A.comboBundle.infoAlignment&&{padding:"0 5px",textAlign:"left",alignItems:"flex-start"},...!O&&"left"===A.comboBundle.infoAlignment&&{padding:"0 10px"},...O&&"center"===A.comboBundle.infoAlignment&&{textAlign:"left",alignItems:"flex-start",padding:"0 5px"}},isHorizontal:O},t.createElement(ig,{style:{fontSize:"15px",width:"100%",display:"flex",alignItems:"center",fontWeight:"600",textAlign:"center",lineHeight:"normal"},ref:p},t.createElement("span",null,i?.title," - ",d?.title)))):t.createElement(ng,{key:`tier-${n}`,onClick:()=>!s&&P(n),isHorizontal:O,infoAlignment:A.comboBundle.infoAlignment,style:{cursor:s?"default":"pointer"}},s?t.createElement("div",{style:{textAlign:"center",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},t.createElement("div",{style:{fontSize:"12px",color:"#666",marginBottom:"8px"}},"Fixed Product"),t.createElement("div",{style:{fontSize:"14px",fontWeight:"600"}},e.title||`Product ${n+1}`)):t.createElement(t.Fragment,null,t.createElement("div",{style:{width:"100%",height:"80%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",borderTopLeftRadius:"18px",borderTopRightRadius:"18px",flexShrink:0,backgroundColor:"#f8f9fa"}},t.createElement(cg,null,"+")),t.createElement(ag,{style:{fontSize:"15px",fontWeight:"600",color:A.comboBundle.titleTextColor||"#1e1e1e",lineHeight:"normal",height:"20%",display:"flex",alignItems:"center",justifyContent:"center"},isHorizontal:O,infoAlignment:A.comboBundle.infoAlignment},t.createElement("p",{style:{width:"80%",margin:"0",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},e.title?`${e.title}`:`Select Product ${n+1}`))))}))),t.createElement(dg,{hoverProperties:{customizeHoverState:A.general.customizeHoverState,backgroundColor:A.general.ctaHoverBackgroundColor,textColor:A.general.ctaHoverTextColor},borderRadius:A.general.ctaBorderRadius,primaryBgColor:A.general.ctaBackgroundColor,onClick:async()=>{C(!0);try{if(p>0)return console.log("Please select all products"),void C(!1);const t=Object.values(r).map((e=>e.variantId)),o=Object.values(r).map((t=>{const n=e.products.find((e=>e.productId===t.productId));if(!n)return null;const r=n?.productDetails?.variants?.edges?.find((e=>e.node.id===t.variantId))?.node;return r?{variantId:t.variantId,price:Number(r.price)}:null})).filter(Boolean);await n(t.length,t,Number(B),o)}catch(e){console.log("Add to cart error:",e)}finally{C(!1)}},textColor:A.general.ctaTextColor,borderColor:A.general.ctaBorderColor},0===p?w?t.createElement(ta,{color:"white",loading:w,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):t.createElement(t.Fragment,null,A.comboBundle.ctaTitle||"Add Bundle to cart"):`Add ${p} more item(s)`),A.comboBundle?.embedContentVisibility&&A.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Description")&&t.createElement("div",{style:{margin:"20px 0px"}},t.createElement("h4",{style:{fontSize:"16px",color:A.comboBundle?.descriptionTextColor||"#000",lineHeight:"1.2",margin:0,padding:"8px",backgroundColor:A.general.primaryColor+"20",textAlign:A.comboBundle.infoAlignment||"left"}},"Description"),t.createElement("div",{style:{fontSize:A.comboBundle.productDescriptionFontSize||"16px",color:A.comboBundle?.descriptionTextColor||"#000",lineHeight:"1.2",padding:"8px",backgroundColor:A.general.primaryColor+"08",textAlign:A.comboBundle.infoAlignment||"left"},dangerouslySetInnerHTML:{__html:M}}))),d&&t.createElement(sg,{onClick:()=>s(!1)},t.createElement(pg,{onClick:e=>e.stopPropagation()},t.createElement(ug,{style:{position:"sticky",top:0,background:"#fff",zIndex:10}},t.createElement("div",{style:{display:"flex",width:"100%",gap:"2px",alignItems:"center",marginBottom:"8px"}},t.createElement(mg,{placeholder:"Search",value:g,onChange:e=>{h(e.target.value)}}),t.createElement(fg,{onClick:()=>s(!1)},"Cancel")),t.createElement("div",{style:{height:"1px",width:"100%",backgroundColor:"#EBEBEB"}})),t.createElement("div",{style:{marginBottom:k?"20px":"5px"}},t.createElement(gg,null,x.length>0?x.map((n=>{const o=n.productDetails,a=(e=>{if(null==m)return!1;const t=r?.[m];return!!t&&t.productId===e})(n.productId),i=N(n.productId);let l=i||"";return l=a&&null!==m?r?.[m]?.variantId||l:b[n.productId]||i,t.createElement(hg,{className:"mixAndMatch-product-item",primaryBgColor:A.general.primaryColor||"#1e1e1e",key:o.id,isSelected:a,onClick:()=>{D(n.productId,l)}},t.createElement(xg,{className:"mixAndMatch-vendor-image",src:o.featuredMedia?.preview?.image?.url||"/placeholder.svg?height=50&width=50",alt:o.title}),t.createElement(yg,{className:"mixAndMatch-vendor-info"},t.createElement(bg,{className:"mixAndMatch-vendor-name"},o.title),t.createElement(kg,{className:"mixAndMatch-variant-options"},o.variants.edges.map((({node:e})=>{const r=0===S(o,e.id);return t.createElement(Eg,{className:"mixAndMatch-variant-button "+(l===e.id?"mixAndMatch-variant-button--selected":""),primaryBgColor:A.general?.primaryColor,disabled:!!a||r,key:e.id,isSelected:l===e.id,tierHasProductId:!!a,onClick:t=>{var o,a;t.stopPropagation(),r||(o=n.productId,a=e.id,v((e=>({...e,[o]:a}))))},style:{opacity:r?.5:1,cursor:r?"not-allowed":"pointer"}},e.title)})))),t.createElement(vg,{cornerRadiusType:e?.cornerRadiusType??"",primaryBgColor:A.general?.primaryColor||"#1e1e1e",onClick:()=>a?_(m||0):D(n.productId,l)},a?t.createElement(wg,null,"Added"):" + Add"))})):t.createElement(Cg,null,'No products found matching "',g,'"'))))))},Sg=x.div`
|
|
4414
|
+
`,Tg=({bundle:e,addToCartFunction:n})=>{const[r,a]=c({}),[d,s]=c(!1),[p,u]=c(0),[m,f]=c(0),[g,h]=c(""),[x,y]=c([]),[b,v]=c({}),[w,C]=c(!1),[k,E]=c(window.innerWidth<450),T=e.builderTiers?.productTier||[],{originalPrice:S,dealPrice:$,offerValue:B}=i((()=>{const t=[];let n=0;Object.values(r).forEach((e=>{e.productId&&e.variantId&&(t.push({productId:e.productId,variantId:e.variantId}),n++)}));let o=0,a=0;for(const{productId:n,variantId:r}of t){const t=e.products.find((e=>e.productId===n));if(!t)continue;const i=t.productDetails.variants.edges.find((e=>e.node.id===r))?.node;if(!i)continue;const l=Number.parseFloat(i.price||"0"),c=Number.parseFloat(i.compareAtPrice||"0");o+=l,a+=c>0?c:l}let i=o;(n===T.length||e?.dealAmount)&&(e?.percentageOff?i=o*(1-e.percentageOff/100):e?.dealAmount?i=e.dealAmount:e?.amountOff&&e.amountOff<o&&(i=o-e.amountOff));const l=a||o,c=l-i;return{originalPrice:l.toFixed(2),dealPrice:i.toFixed(2),offerValue:c.toFixed(2)}}),[e,r,T.length]);l((()=>{u(T.length-Object.keys(r).length)}),[r]),l((()=>{const e={};let t=!1;T.forEach(((n,r)=>{if(n.isFixed&&n.products&&n.products.length>0){const o=n.products[0];if(o&&o.productId){const n=o.variantIds?.[0]||I(o.productId);n&&(e[r]={productId:o.productId,variantId:n},t=!0)}}})),t&&a((t=>({...t,...e})))}),[T]),l((()=>{if(null===m||0===T.length)return;const t=T[m].products.map((e=>e.productId)),n=new Map;e.products.forEach((e=>{t.includes(e.productId)&&!n.has(e.productId)&&n.set(e.productId,e)}));let r=Array.from(n.values());if(""!==g.trim()){const e=g.toLowerCase();r=r.filter((t=>t.productDetails.title.toLowerCase().includes(e)||t.productDetails.selectedVariant?.displayName?.toLowerCase().includes(e)||t.productDetails.collections?.edges?.some((t=>t.node.title.toLowerCase().includes(e)))))}y(r)}),[g,e.products,m,T]);const z=t=>{const n=e.products.find((e=>e.productId===t));return n?.productDetails},I=t=>{const n=e.products.find((e=>e.productId===t));if(!n||!n.productDetails.variants.edges.length)return"";const r=n.productDetails.variants.edges.find((e=>e.node.inventoryQuantity>0))?.node;return r?r.id:n.productDetails.variants.edges[0].node.id},N=(e,t)=>{if(null==m)return;const n=t||I(e);a((t=>({...t,[m]:{productId:e,variantId:n}}))),s(!1),h("")},D=e=>{a((t=>{const n={...t};return delete n[e],n})),v({})};console.log("version 8 ");const _=t=>{const n=T[t];if(console.log("Opening product selection for tier:",t,n),n.isFixed)return;f(t),s(!0),h("");const r=n.products.map((e=>e.productId)),o=e.products.filter((e=>r.includes(e.productId))),a=new Map;o.forEach((e=>{a.has(e.productId)||a.set(e.productId,e)})),console.log("Filtered products for tier:",Array.from(a.values())),y(Array.from(a.values()))};l((()=>{const e=()=>{E(window.innerWidth<450)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const P=e.customizations,A=k,O="bundles"===e.appName?e.pageHeader?.title:e?.title,F="bundles"===e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(Qf,{verticalMargin:P.comboBundle.verticalMargin,borderRadius:"20px"},P.comboBundle.embedContentVisibility&&t.createElement(Gf,null,P.comboBundle?.embedContentVisibility&&P.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Title")&&t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginBottom:"10px",width:"100%",textAlign:P.comboBundle.infoAlignment||"left"}},t.createElement("h2",{style:{fontSize:"28px",color:P.comboBundle?.titleTextColor||"#000",fontWeight:"bold",lineHeight:"1.6",margin:0}},O)),P.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Price")&&Number($)>1&&t.createElement(t.Fragment,null,t.createElement(Yf,{infoAlignment:P.comboBundle.infoAlignment},t.createElement(Zf,null,Yh(P.general.currencySymbol,e.storeCurrencyCode),Gh($)),Number($)<Number(S)&&t.createElement(Xf,{style:{minWidth:"fit-content"}},Yh(P.general.currencySymbol,e.storeCurrencyCode)," ",Gh(S)),t.createElement(Kf,{style:{minWidth:"fit-content"}},"In Stock")),t.createElement(Jf,{style:{textAlign:P.comboBundle.infoAlignment||"left",fontSize:P.comboBundle.productDescriptionFontSize}},"Tax included. Shipping calculated at checkout."))),t.createElement(eg,{gridSize:T.length,isHorizontal:A},T.map(((e,n)=>{const a=(e=>!!r[e]&&!!r[e].productId)(n),{product:i,variantId:c}=(e=>{const t=r?.[e];return t?{product:z(t.productId),variantId:t.variantId}:{product:void 0,variantId:""}})(n),d=i?((e,t)=>{if(!e||!e.variants.edges)return null;const n=e.variants.edges.find((e=>e.node.id===t));return n?.node})(i,c):null,s=e.isFixed,p=o(null);return l((()=>{const e=p.current;if(!e)return;const t=e.querySelector("span");if(!t)return;const n=e.clientWidth,r=t.scrollWidth;if(r<=n)return e.setAttribute("data-overflow","false"),e.style.removeProperty("--scroll-end"),void e.style.removeProperty("--duration");const o=-(r-n);e.style.setProperty("--scroll-end",`${o}px`);const a=2*Math.max(1,Math.abs(o)/40)+3;e.style.setProperty("--duration",`${a}s`),e.setAttribute("data-overflow","true")}),[d?.displayName,d?.title]),a&&i?t.createElement(tg,{key:`tier-${n}`,onClick:()=>!s&&_(n),style:{borderRadius:"20px",cursor:s?"default":"pointer"},isHorizontal:A,infoAlignment:P.comboBundle.infoAlignment},!s&&t.createElement(lg,{onClick:e=>{e.stopPropagation(),D(n)}},"×"),t.createElement(rg,{src:i?.featuredMedia?.preview?.image?.url||"/placeholder.svg?height=200&width=200",alt:i?.title,style:{aspectRatio:P?.general.imageAspectRatio||"1/1"},isHorizontal:A}),t.createElement(og,{style:{color:"#1e1e1e",textAlign:"center",...A&&"right"===P.comboBundle.infoAlignment&&{padding:"0 8px",textAlign:"right",alignItems:"flex-end"},...A&&"left"===P.comboBundle.infoAlignment&&{padding:"0 5px",textAlign:"left",alignItems:"flex-start"},...!A&&"left"===P.comboBundle.infoAlignment&&{padding:"0 10px"},...A&&"center"===P.comboBundle.infoAlignment&&{textAlign:"left",alignItems:"flex-start",padding:"0 5px"}},isHorizontal:A},t.createElement(ig,{style:{fontSize:"15px",width:"100%",display:"flex",alignItems:"center",fontWeight:"600",textAlign:"center",lineHeight:"normal"},ref:p},t.createElement("span",null,i?.title," - ",d?.title)))):t.createElement(ng,{key:`tier-${n}`,onClick:()=>!s&&_(n),isHorizontal:A,infoAlignment:P.comboBundle.infoAlignment,style:{cursor:s?"default":"pointer"}},s?t.createElement("div",{style:{textAlign:"center",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},t.createElement("div",{style:{fontSize:"12px",color:"#666",marginBottom:"8px"}},"Fixed Product"),t.createElement("div",{style:{fontSize:"14px",fontWeight:"600"}},e.title||`Product ${n+1}`)):t.createElement(t.Fragment,null,t.createElement("div",{style:{width:"100%",height:"80%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",borderTopLeftRadius:"18px",borderTopRightRadius:"18px",flexShrink:0,backgroundColor:"#f8f9fa"}},t.createElement(cg,null,"+")),t.createElement(ag,{style:{fontSize:"15px",fontWeight:"600",color:P.comboBundle.titleTextColor||"#1e1e1e",lineHeight:"normal",height:"20%",display:"flex",alignItems:"center",justifyContent:"center"},isHorizontal:A,infoAlignment:P.comboBundle.infoAlignment},t.createElement("p",{style:{width:"80%",margin:"0",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},e.title?`${e.title}`:`Select Product ${n+1}`))))}))),t.createElement(dg,{hoverProperties:{customizeHoverState:P.general.customizeHoverState,backgroundColor:P.general.ctaHoverBackgroundColor,textColor:P.general.ctaHoverTextColor},borderRadius:P.general.ctaBorderRadius,primaryBgColor:P.general.ctaBackgroundColor,onClick:async()=>{C(!0);try{if(p>0)return console.log("Please select all products"),void C(!1);const t=Object.values(r).map((e=>e.variantId)),o=Object.values(r).map((t=>{const n=e.products.find((e=>e.productId===t.productId));if(!n)return null;const r=n?.productDetails?.variants?.edges?.find((e=>e.node.id===t.variantId))?.node;return r?{variantId:t.variantId,price:Number(r.price)}:null})).filter(Boolean);await n(t.length,t,Number($),o)}catch(e){console.log("Add to cart error:",e)}finally{C(!1)}},textColor:P.general.ctaTextColor,borderColor:P.general.ctaBorderColor},0===p?w?t.createElement(ta,{color:"white",loading:w,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):t.createElement(t.Fragment,null,P.comboBundle.ctaTitle||"Add Bundle to cart"):`Add ${p} more item(s)`),P.comboBundle?.embedContentVisibility&&P.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Description")&&t.createElement("div",{style:{margin:"20px 0px"}},t.createElement("h4",{style:{fontSize:"16px",color:P.comboBundle?.descriptionTextColor||"#000",lineHeight:"1.2",margin:0,padding:"8px",backgroundColor:P.general.primaryColor+"20",textAlign:P.comboBundle.infoAlignment||"left"}},"Description"),t.createElement("div",{style:{fontSize:P.comboBundle.productDescriptionFontSize||"16px",color:P.comboBundle?.descriptionTextColor||"#000",lineHeight:"1.2",padding:"8px",backgroundColor:P.general.primaryColor+"08",textAlign:P.comboBundle.infoAlignment||"left"},dangerouslySetInnerHTML:{__html:F}})),d&&t.createElement(sg,{onClick:()=>s(!1)},t.createElement(pg,{onClick:e=>e.stopPropagation()},t.createElement(ug,{style:{position:"sticky",top:0,background:"#fff",zIndex:10}},t.createElement("div",{style:{display:"flex",width:"100%",gap:"2px",alignItems:"center",marginBottom:"8px"}},t.createElement(mg,{placeholder:"Search",value:g,onChange:e=>{h(e.target.value)}}),t.createElement(fg,{onClick:()=>s(!1)},"Cancel")),t.createElement("div",{style:{height:"1px",width:"100%",backgroundColor:"#EBEBEB"}})),t.createElement(gg,null,x.length>0?x.map((n=>{const o=n.productDetails,a=(e=>{if(null==m)return!1;const t=r?.[m];return!!t&&t.productId===e})(n.productId),i=I(n.productId);let l=i||"";return l=a&&null!==m?r?.[m]?.variantId||l:b[n.productId]||i,t.createElement(hg,{className:"mixAndMatch-product-item",primaryBgColor:P.general.primaryColor||"#1e1e1e",key:o.id,isSelected:a,onClick:()=>{N(n.productId,l)}},t.createElement(xg,{className:"mixAndMatch-vendor-image",src:o.featuredMedia?.preview?.image?.url||"/placeholder.svg?height=50&width=50",alt:o.title}),t.createElement(yg,{className:"mixAndMatch-vendor-info"},t.createElement(bg,{className:"mixAndMatch-vendor-name"},o.title),t.createElement(kg,{className:"mixAndMatch-variant-options"},o.variants.edges.map((({node:e})=>e.inventoryQuantity>0&&t.createElement(Eg,{className:"mixAndMatch-variant-button "+(l===e.id?"mixAndMatch-variant-button--selected":""),primaryBgColor:P.general?.primaryColor,disabled:!!a,key:e.id,isSelected:l===e.id,tierHasProductId:!!a,onClick:t=>{var r,o;t.stopPropagation(),r=n.productId,o=e.id,v((e=>({...e,[r]:o})))}},e.title))))),t.createElement(vg,{cornerRadiusType:e?.cornerRadiusType??"",primaryBgColor:P.general?.primaryColor||"#1e1e1e",onClick:()=>a?D(m||0):N(n.productId,l)},a?t.createElement(wg,null,"Added"):" + Add"))})):t.createElement(Cg,null,'No products found matching "',g,'"')))))},Sg=x.div`
|
|
4415
4415
|
border-radius: 8px;
|
|
4416
4416
|
container-type: inline-size;
|
|
4417
4417
|
`,$g=x.div`
|
|
@@ -200,7 +200,7 @@ export interface CartProps {
|
|
|
200
200
|
cartOffersCarousalData?: CartOffersCarousalProps;
|
|
201
201
|
freebieMilestoneData?: freebieMilestoneProps;
|
|
202
202
|
cartOffersCarouselHeight?: number;
|
|
203
|
-
stickyBarBuyNowFunction?: (
|
|
203
|
+
stickyBarBuyNowFunction?: (variantId: string, quantity: number) => Promise<void>;
|
|
204
204
|
gstSectionCustomizationData?: GSTSectionCustomizationProps;
|
|
205
205
|
noteSectionTitle?: string;
|
|
206
206
|
checkoutSectionMessage?: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Checkpoint } from "./Cart";
|
|
3
|
+
export interface FloatingCartProps {
|
|
4
|
+
setIsCartOpen: (isOpen: boolean) => void;
|
|
5
|
+
isCartOpen?: boolean;
|
|
6
|
+
cartCheckpoints?: Checkpoint[];
|
|
7
|
+
customCartProgressBarCriteria?: string;
|
|
8
|
+
floatingCartData?: FloatingCartDataProps;
|
|
9
|
+
effectiveQuantityForProgressBar?: number;
|
|
10
|
+
cartComponentsCornerType?: "rounded" | "sharp";
|
|
11
|
+
cartComponentsCornerRadius?: number;
|
|
12
|
+
}
|
|
13
|
+
export type FloatingCartDataProps = {
|
|
14
|
+
enableFloatingCart: boolean;
|
|
15
|
+
backgroundColor: string;
|
|
16
|
+
bannerBackgroundColor: string;
|
|
17
|
+
textColor: string;
|
|
18
|
+
buttonColor: string;
|
|
19
|
+
bannerFooterText: string;
|
|
20
|
+
showOnPages: string[];
|
|
21
|
+
};
|
|
22
|
+
declare const FloatingCart: React.FC<FloatingCartProps>;
|
|
23
|
+
export default FloatingCart;
|
|
@@ -39,7 +39,7 @@ export type StickyAddToCartProps = {
|
|
|
39
39
|
cartComponentsCornerType?: "rounded" | "sharp";
|
|
40
40
|
cartComponentsCornerRadius?: number;
|
|
41
41
|
stickyCartCustomizationData?: stickyCartCustomizationDataProps;
|
|
42
|
-
checkoutFunction?: (
|
|
42
|
+
checkoutFunction?: (variantId: string, quantity: number) => Promise<void>;
|
|
43
43
|
backgroundColor?: string;
|
|
44
44
|
primaryTextColor?: string;
|
|
45
45
|
comboBundleData?: BundlePayload;
|
package/dist/index.d.ts
CHANGED
|
@@ -701,7 +701,7 @@ interface CartProps {
|
|
|
701
701
|
cartOffersCarousalData?: CartOffersCarousalProps;
|
|
702
702
|
freebieMilestoneData?: freebieMilestoneProps;
|
|
703
703
|
cartOffersCarouselHeight?: number;
|
|
704
|
-
stickyBarBuyNowFunction?: (
|
|
704
|
+
stickyBarBuyNowFunction?: (variantId: string, quantity: number) => Promise<void>;
|
|
705
705
|
gstSectionCustomizationData?: GSTSectionCustomizationProps;
|
|
706
706
|
noteSectionTitle?: string;
|
|
707
707
|
checkoutSectionMessage?: string;
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
type FreebieClaimProps = {
|
|
3
|
-
freebieProductsInCart: any;
|
|
4
|
-
freebieSectionTitle?: string;
|
|
5
|
-
themeColor?: string;
|
|
6
|
-
themeTextColor?: string;
|
|
7
|
-
checkpoints?: any;
|
|
8
|
-
addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
|
|
9
|
-
freebiesInCart: string[];
|
|
10
|
-
showFreebieClaimAsPopup?: boolean;
|
|
11
|
-
productClaimCtaButtonText?: string;
|
|
12
|
-
imageAspectSelector?: "square" | "portrait";
|
|
13
|
-
freebieCouponTemplates?: any;
|
|
14
|
-
};
|
|
15
|
-
export declare const FreebieClaimPopup: React.ForwardRefExoticComponent<FreebieClaimProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
declare const FreebieClaim: React.FC<FreebieClaimProps>;
|
|
17
|
-
export default FreebieClaim;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const VariantSelectionPopupContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
-
export declare const ModalContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
|
-
$themeColor?: string | undefined;
|
|
5
|
-
$cornerRadius?: number | undefined;
|
|
6
|
-
$backgroundColor?: string | undefined;
|
|
7
|
-
}>> & string;
|
|
8
|
-
export declare const CloseButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
9
|
-
export declare const ProductDetails: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
|
-
export declare const ProductImage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
|
|
11
|
-
export declare const ProductInfo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
|
-
export declare const ProductTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {
|
|
13
|
-
$themeColor?: string | undefined;
|
|
14
|
-
}>> & string;
|
|
15
|
-
export declare const ProductPrice: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
16
|
-
primaryTextColor?: string | undefined;
|
|
17
|
-
}>> & string;
|
|
18
|
-
export declare const OriginalPrice: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
19
|
-
export declare const ViewDetailsLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
|
|
20
|
-
export declare const OptionContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
21
|
-
export declare const OptionTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
22
|
-
export declare const OptionsWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
23
|
-
export declare const VariantOption: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
24
|
-
$isSelected?: boolean | undefined;
|
|
25
|
-
$isDisabled?: boolean | undefined;
|
|
26
|
-
$themeColor?: string | undefined;
|
|
27
|
-
backgroundColor?: string | undefined;
|
|
28
|
-
}>> & string;
|
|
29
|
-
export declare const CartButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
30
|
-
$themeColor: string;
|
|
31
|
-
}>> & string;
|
|
32
|
-
export declare const LoaderContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
33
|
-
export declare const QuantitySelectorContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
34
|
-
export declare const MainSelectorContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
35
|
-
$backgroundColor: string;
|
|
36
|
-
}>> & string;
|
|
37
|
-
export declare const FlexContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
38
|
-
export declare const DetailsSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
39
|
-
export declare const PriceSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
40
|
-
export declare const LinkSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
41
|
-
export declare const ActionsSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
42
|
-
export declare const ReplaceButtonContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
43
|
-
export declare const ReplaceButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
44
|
-
$themeColor?: string | undefined;
|
|
45
|
-
$cornerRadius?: number | undefined;
|
|
46
|
-
$cornerType?: string | undefined;
|
|
47
|
-
$disabled?: boolean | undefined;
|
|
48
|
-
}>> & string;
|
|
49
|
-
export declare const ReplaceButtonContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useShadowConfetti(): (options: any) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ytBundleShadowCss: string;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
type FreebieClaimProps = {
|
|
3
|
-
freebieProductsInCart: any;
|
|
4
|
-
freebieSectionTitle?: string;
|
|
5
|
-
themeColor?: string;
|
|
6
|
-
themeTextColor?: string;
|
|
7
|
-
checkpoints?: any;
|
|
8
|
-
addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
|
|
9
|
-
freebiesInCart: string[];
|
|
10
|
-
showFreebieClaimAsPopup?: boolean;
|
|
11
|
-
productClaimCtaButtonText?: string;
|
|
12
|
-
imageAspectSelector?: "square" | "portrait";
|
|
13
|
-
freebieCouponTemplates?: any;
|
|
14
|
-
};
|
|
15
|
-
export declare const FreebieClaimPopup: React.ForwardRefExoticComponent<FreebieClaimProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
declare const FreebieClaim: React.FC<FreebieClaimProps>;
|
|
17
|
-
export default FreebieClaim;
|
package/dist/esm/types/components/Cart/VariantSelectionPopup/MobileVariantPopover.styled.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const VariantSelectionPopupContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
-
export declare const ModalContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
|
-
$themeColor?: string | undefined;
|
|
5
|
-
$cornerRadius?: number | undefined;
|
|
6
|
-
$backgroundColor?: string | undefined;
|
|
7
|
-
}>> & string;
|
|
8
|
-
export declare const CloseButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
9
|
-
export declare const ProductDetails: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
|
-
export declare const ProductImage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
|
|
11
|
-
export declare const ProductInfo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
|
-
export declare const ProductTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {
|
|
13
|
-
$themeColor?: string | undefined;
|
|
14
|
-
}>> & string;
|
|
15
|
-
export declare const ProductPrice: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
16
|
-
primaryTextColor?: string | undefined;
|
|
17
|
-
}>> & string;
|
|
18
|
-
export declare const OriginalPrice: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
19
|
-
export declare const ViewDetailsLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
|
|
20
|
-
export declare const OptionContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
21
|
-
export declare const OptionTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
22
|
-
export declare const OptionsWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
23
|
-
export declare const VariantOption: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
24
|
-
$isSelected?: boolean | undefined;
|
|
25
|
-
$isDisabled?: boolean | undefined;
|
|
26
|
-
$themeColor?: string | undefined;
|
|
27
|
-
backgroundColor?: string | undefined;
|
|
28
|
-
}>> & string;
|
|
29
|
-
export declare const CartButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
30
|
-
$themeColor: string;
|
|
31
|
-
}>> & string;
|
|
32
|
-
export declare const LoaderContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
33
|
-
export declare const QuantitySelectorContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
34
|
-
export declare const MainSelectorContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
35
|
-
$backgroundColor: string;
|
|
36
|
-
}>> & string;
|
|
37
|
-
export declare const FlexContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
38
|
-
export declare const DetailsSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
39
|
-
export declare const PriceSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
40
|
-
export declare const LinkSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
41
|
-
export declare const ActionsSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
42
|
-
export declare const ReplaceButtonContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
43
|
-
export declare const ReplaceButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
44
|
-
$themeColor?: string | undefined;
|
|
45
|
-
$cornerRadius?: number | undefined;
|
|
46
|
-
$cornerType?: string | undefined;
|
|
47
|
-
$disabled?: boolean | undefined;
|
|
48
|
-
}>> & string;
|
|
49
|
-
export declare const ReplaceButtonContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useShadowConfetti(): (options: any) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ytBundleShadowCss: string;
|