yt-uikit 0.7.414 → 0.7.415-mixandmatchUIChanges.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/BundleBlock/ProductGridSkeleton/ProductGridSkeleton.d.ts +5 -0
- package/dist/esm/components/BundleBlock/VolumeBundle/temp.d.ts +3 -0
- package/dist/esm/components/Cart/FreebieClaim.d.ts +17 -0
- package/dist/esm/components/Cart/VariantSelectionPopup/MobileVariantPopover.styled.d.ts +49 -0
- package/dist/esm/hooks/useShadowConfetti.d.ts +1 -0
- package/dist/esm/index.js +14 -17
- package/dist/esm/shadowStyles.d.ts +1 -0
- package/dist/esm/types/components/BundleBlock/ProductGridSkeleton/ProductGridSkeleton.d.ts +5 -0
- package/dist/esm/types/components/BundleBlock/VolumeBundle/temp.d.ts +3 -0
- package/dist/esm/types/components/Cart/FreebieClaim.d.ts +17 -0
- package/dist/esm/types/components/Cart/VariantSelectionPopup/MobileVariantPopover.styled.d.ts +49 -0
- package/dist/esm/types/hooks/useShadowConfetti.d.ts +1 -0
- package/dist/esm/types/shadowStyles.d.ts +1 -0
- package/package.json +1 -1
- package/dist/esm/components/ProductOffersBlock/ProductOffersCoupon.d.ts +0 -12
- package/dist/esm/components/ProductOffersBlock/ProductOffersList.d.ts +0 -12
- package/dist/esm/components/ProductOffersBlock/ProductOffersTermsMobilePopover.d.ts +0 -10
- package/dist/esm/components/ProductOffersBlock/ProductOffersTermsPopup.d.ts +0 -10
- package/dist/esm/components/ProductOffersBlock/ProductsOffers.d.ts +0 -32
- package/dist/esm/types/components/ProductOffersBlock/ProductOffersCoupon.d.ts +0 -12
- package/dist/esm/types/components/ProductOffersBlock/ProductOffersList.d.ts +0 -12
- package/dist/esm/types/components/ProductOffersBlock/ProductOffersTermsMobilePopover.d.ts +0 -10
- package/dist/esm/types/components/ProductOffersBlock/ProductOffersTermsPopup.d.ts +0 -10
- package/dist/esm/types/components/ProductOffersBlock/ProductsOffers.d.ts +0 -32
|
@@ -0,0 +1,17 @@
|
|
|
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;
|
|
@@ -0,0 +1,49 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useShadowConfetti(): (options: any) => void;
|
package/dist/esm/index.js
CHANGED
|
@@ -4233,22 +4233,13 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4233
4233
|
max-width: 800px;
|
|
4234
4234
|
background-color: white;
|
|
4235
4235
|
border-radius: 8px;
|
|
4236
|
-
|
|
4237
|
-
overflow-y: auto;
|
|
4236
|
+
overflow-y: hidden;
|
|
4238
4237
|
z-index: 1001;
|
|
4239
4238
|
|
|
4240
|
-
/* Hide scrollbar (Chrome, Safari) */
|
|
4241
|
-
&::-webkit-scrollbar {
|
|
4242
|
-
display: none;
|
|
4243
|
-
}
|
|
4244
|
-
|
|
4245
|
-
/* Hide scrollbar (Firefox) */
|
|
4246
|
-
scrollbar-width: none;
|
|
4247
|
-
-ms-overflow-style: none;
|
|
4248
4239
|
|
|
4249
4240
|
@media (max-width: 600px) {
|
|
4250
|
-
|
|
4251
|
-
width: 100
|
|
4241
|
+
box-sizing: border-box;
|
|
4242
|
+
width: 100% ;
|
|
4252
4243
|
max-height: 37vh;
|
|
4253
4244
|
position: absolute;
|
|
4254
4245
|
left: 0;
|
|
@@ -4261,7 +4252,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4261
4252
|
display: flex;
|
|
4262
4253
|
flex-direction: column;
|
|
4263
4254
|
align-items: center;
|
|
4264
|
-
padding:
|
|
4255
|
+
padding: 10px 7px 0px 7px;
|
|
4265
4256
|
`,lg=x.input`
|
|
4266
4257
|
flex-grow: 1;
|
|
4267
4258
|
padding: 8px 12px;
|
|
@@ -4311,18 +4302,24 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4311
4302
|
margin-left: 4px;
|
|
4312
4303
|
}
|
|
4313
4304
|
`;const dg=x.div`
|
|
4305
|
+
max-height: calc(57vh - 80px);
|
|
4306
|
+
overflow-y: auto;
|
|
4314
4307
|
display: flex;
|
|
4315
4308
|
flex-direction: column;
|
|
4316
4309
|
gap: 12px;
|
|
4310
|
+
@media (max-width: 600px) {
|
|
4311
|
+
max-height: calc(37vh - 80px);
|
|
4312
|
+
}
|
|
4313
|
+
|
|
4317
4314
|
`,sg=x.div`
|
|
4318
4315
|
display: flex;
|
|
4319
4316
|
align-items: center;
|
|
4320
|
-
padding: 8px;
|
|
4317
|
+
padding: 8px 4px;
|
|
4321
4318
|
border-radius: 8px;
|
|
4322
4319
|
cursor: pointer;
|
|
4323
4320
|
transition: background-color 0.2s ease;
|
|
4324
|
-
|
|
4325
|
-
|
|
4321
|
+
margin: 0px 6px;
|
|
4322
|
+
background-color: ${e=>e.isSelected?e.primaryBgColor+"10":"transparent"};
|
|
4326
4323
|
border: ${e=>e.isSelected?"1px solid "+(e.primaryBgColor+"40"):"1px solid transparent"};
|
|
4327
4324
|
|
|
4328
4325
|
&:hover {
|
|
@@ -4414,7 +4411,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4414
4411
|
font-size: 11px;
|
|
4415
4412
|
padding: 4px 8px;
|
|
4416
4413
|
}
|
|
4417
|
-
`,bg=({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),[E,k]=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));return n&&n.productDetails.variants.edges.length?n.productDetails.variants.edges[0].node.id:""},D=(e,t)=>{if(null==m)return;const n=t||I(e);a((t=>({...t,[m]:{productId:e,variantId:n}}))),s(!1),h("")},_=e=>{a((t=>{const n={...t};return delete n[e],n})),v({})};console.log("version 8 ");const N=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=()=>{k(window.innerWidth<450)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const P=e.customizations,O=E,A="bundles"===e.appName?e.pageHeader?.title:e?.title,F="bundles"===e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(jf,{verticalMargin:P.comboBundle.verticalMargin,borderRadius:"20px"},P.comboBundle.embedContentVisibility&&t.createElement(Vf,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}},A)),P.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Price")&&Number($)>1&&t.createElement(t.Fragment,null,t.createElement(Wf,{infoAlignment:P.comboBundle.infoAlignment},t.createElement(Hf,null,Wh(P.general.currencySymbol,e.storeCurrencyCode),Vh($)),Number($)<Number(S)&&t.createElement(Uf,{style:{minWidth:"fit-content"}},Wh(P.general.currencySymbol,e.storeCurrencyCode)," ",Vh(S)),t.createElement(qf,{style:{minWidth:"fit-content"}},"In Stock")),t.createElement(Qf,{style:{textAlign:P.comboBundle.infoAlignment||"left",fontSize:P.comboBundle.productDescriptionFontSize}},"Tax included. Shipping calculated at checkout."))),t.createElement(Gf,{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: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;console.log("Selected Variants",d);const 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]),console.log(d),a&&i?t.createElement(Yf,{key:`tier-${n}`,onClick:()=>!s&&N(n),style:{borderRadius:"20px",cursor:s?"default":"pointer"},isHorizontal:O,infoAlignment:P.comboBundle.infoAlignment},!s&&t.createElement(tg,{onClick:e=>{e.stopPropagation(),_(n)}},"×"),t.createElement(Xf,{src:i?.featuredMedia?.preview?.image?.url||"/placeholder.svg?height=200&width=200",alt:i?.title,style:{aspectRatio:P?.general.imageAspectRatio||"1/1"},isHorizontal:O}),t.createElement(Kf,{style:{color:"#1e1e1e",textAlign:"center",...O&&"right"===P.comboBundle.infoAlignment&&{padding:"0 8px",textAlign:"right",alignItems:"flex-end"},...O&&"left"===P.comboBundle.infoAlignment&&{padding:"0 5px",textAlign:"left",alignItems:"flex-start"},...!O&&"left"===P.comboBundle.infoAlignment&&{padding:"0 10px"},...O&&"center"===P.comboBundle.infoAlignment&&{textAlign:"left",alignItems:"flex-start",padding:"0 5px"}},isHorizontal:O},t.createElement(eg,{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(Zf,{key:`tier-${n}`,onClick:()=>!s&&N(n),isHorizontal:O,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(ng,null,"+")),t.createElement(Jf,{style:{fontSize:"15px",fontWeight:"600",color:P.comboBundle.titleTextColor||"#1e1e1e",lineHeight:"normal",height:"20%",display:"flex",alignItems:"center",justifyContent:"center"},isHorizontal:O,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(rg,{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(Yo,{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(og,{onClick:()=>s(!1)},t.createElement(ag,{onClick:e=>e.stopPropagation()},t.createElement(ig,{style:{position:"sticky",top:0,background:"#fff",zIndex:10,paddingBottom:"8px"}},t.createElement("div",{style:{display:"flex",width:"100%",gap:"2px",alignItems:"center",marginBottom:"8px"}},t.createElement(lg,{placeholder:"Search",value:g,onChange:e=>{h(e.target.value)}}),t.createElement(cg,{onClick:()=>s(!1)},"Cancel")),t.createElement("div",{style:{height:"1px",width:"100%",backgroundColor:"#EBEBEB"}})),t.createElement(dg,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);let i=o.variants.edges[0].node.id;return i=a&&null!==m?r?.[m]?.variantId||i:b[n.productId]||(o.variants.edges.length>0?o.variants.edges[0].node.id:""),t.createElement(sg,{className:"mixAndMatch-product-item",primaryBgColor:P.general.primaryColor||"#1e1e1e",key:o.id,isSelected:a,onClick:()=>{D(n.productId,i)}},t.createElement(pg,{className:"mixAndMatch-vendor-image",src:o.featuredMedia?.preview?.image?.url||"/placeholder.svg?height=50&width=50",alt:o.title}),t.createElement(ug,{className:"mixAndMatch-vendor-info"},t.createElement(mg,{className:"mixAndMatch-vendor-name"},o.title),t.createElement(xg,{className:"mixAndMatch-variant-options"},o.variants.edges.map((({node:e})=>e.inventoryQuantity>0&&t.createElement(yg,{className:"mixAndMatch-variant-button "+(i===e.id?"mixAndMatch-variant-button--selected":""),primaryBgColor:P.general?.primaryColor,disabled:!!a,key:e.id,isSelected:i===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(fg,{cornerRadiusType:e?.cornerRadiusType??"",primaryBgColor:P.general?.primaryColor||"#1e1e1e",onClick:()=>a?_(m||0):D(n.productId,i)},a?t.createElement(gg,null,"Added"):" + Add"))})):t.createElement(hg,null,'No products found matching "',g,'"')))))},vg=x.div`
|
|
4414
|
+
`,bg=({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),[E,k]=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},D=(e,t)=>{if(null==m)return;const n=t||I(e);a((t=>({...t,[m]:{productId:e,variantId:n}}))),s(!1),h("")},_=e=>{a((t=>{const n={...t};return delete n[e],n})),v({})};console.log("version 8 ");const N=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=()=>{k(window.innerWidth<450)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const P=e.customizations,O=E,A="bundles"===e.appName?e.pageHeader?.title:e?.title,F="bundles"===e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(jf,{verticalMargin:P.comboBundle.verticalMargin,borderRadius:"20px"},P.comboBundle.embedContentVisibility&&t.createElement(Vf,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}},A)),P.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Price")&&Number($)>1&&t.createElement(t.Fragment,null,t.createElement(Wf,{infoAlignment:P.comboBundle.infoAlignment},t.createElement(Hf,null,Wh(P.general.currencySymbol,e.storeCurrencyCode),Vh($)),Number($)<Number(S)&&t.createElement(Uf,{style:{minWidth:"fit-content"}},Wh(P.general.currencySymbol,e.storeCurrencyCode)," ",Vh(S)),t.createElement(qf,{style:{minWidth:"fit-content"}},"In Stock")),t.createElement(Qf,{style:{textAlign:P.comboBundle.infoAlignment||"left",fontSize:P.comboBundle.productDescriptionFontSize}},"Tax included. Shipping calculated at checkout."))),t.createElement(Gf,{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: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(Yf,{key:`tier-${n}`,onClick:()=>!s&&N(n),style:{borderRadius:"20px",cursor:s?"default":"pointer"},isHorizontal:O,infoAlignment:P.comboBundle.infoAlignment},!s&&t.createElement(tg,{onClick:e=>{e.stopPropagation(),_(n)}},"×"),t.createElement(Xf,{src:i?.featuredMedia?.preview?.image?.url||"/placeholder.svg?height=200&width=200",alt:i?.title,style:{aspectRatio:P?.general.imageAspectRatio||"1/1"},isHorizontal:O}),t.createElement(Kf,{style:{color:"#1e1e1e",textAlign:"center",...O&&"right"===P.comboBundle.infoAlignment&&{padding:"0 8px",textAlign:"right",alignItems:"flex-end"},...O&&"left"===P.comboBundle.infoAlignment&&{padding:"0 5px",textAlign:"left",alignItems:"flex-start"},...!O&&"left"===P.comboBundle.infoAlignment&&{padding:"0 10px"},...O&&"center"===P.comboBundle.infoAlignment&&{textAlign:"left",alignItems:"flex-start",padding:"0 5px"}},isHorizontal:O},t.createElement(eg,{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(Zf,{key:`tier-${n}`,onClick:()=>!s&&N(n),isHorizontal:O,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(ng,null,"+")),t.createElement(Jf,{style:{fontSize:"15px",fontWeight:"600",color:P.comboBundle.titleTextColor||"#1e1e1e",lineHeight:"normal",height:"20%",display:"flex",alignItems:"center",justifyContent:"center"},isHorizontal:O,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(rg,{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(Yo,{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(og,{onClick:()=>s(!1)},t.createElement(ag,{onClick:e=>e.stopPropagation()},t.createElement(ig,{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(lg,{placeholder:"Search",value:g,onChange:e=>{h(e.target.value)}}),t.createElement(cg,{onClick:()=>s(!1)},"Cancel")),t.createElement("div",{style:{height:"1px",width:"100%",backgroundColor:"#EBEBEB"}})),t.createElement(dg,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(sg,{className:"mixAndMatch-product-item",primaryBgColor:P.general.primaryColor||"#1e1e1e",key:o.id,isSelected:a,onClick:()=>{D(n.productId,l)}},t.createElement(pg,{className:"mixAndMatch-vendor-image",src:o.featuredMedia?.preview?.image?.url||"/placeholder.svg?height=50&width=50",alt:o.title}),t.createElement(ug,{className:"mixAndMatch-vendor-info"},t.createElement(mg,{className:"mixAndMatch-vendor-name"},o.title),t.createElement(xg,{className:"mixAndMatch-variant-options"},o.variants.edges.map((({node:e})=>e.inventoryQuantity>0&&t.createElement(yg,{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(fg,{cornerRadiusType:e?.cornerRadiusType??"",primaryBgColor:P.general?.primaryColor||"#1e1e1e",onClick:()=>a?_(m||0):D(n.productId,l)},a?t.createElement(gg,null,"Added"):" + Add"))})):t.createElement(hg,null,'No products found matching "',g,'"')))))},vg=x.div`
|
|
4418
4415
|
border-radius: 8px;
|
|
4419
4416
|
container-type: inline-size;
|
|
4420
4417
|
`,wg=x.div`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ytBundleShadowCss: string;
|
|
@@ -0,0 +1,17 @@
|
|
|
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;
|
|
@@ -0,0 +1,49 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useShadowConfetti(): (options: any) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ytBundleShadowCss: string;
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CartCheckpoint } from "./ProductsOffers";
|
|
3
|
-
import { ProductsOffersConfigType } from "./ProductsOffers";
|
|
4
|
-
interface ProductOffersCouponProps {
|
|
5
|
-
offersToShow: CartCheckpoint[];
|
|
6
|
-
offersConfig?: ProductsOffersConfigType | null;
|
|
7
|
-
getOfferCardMessage: (offer: CartCheckpoint) => string;
|
|
8
|
-
setSelectedOffer: (offer: CartCheckpoint | null) => void;
|
|
9
|
-
setShowPopup: (show: boolean) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const ProductOffersCoupon: ({ offersToShow, offersConfig, getOfferCardMessage, setSelectedOffer, setShowPopup, }: ProductOffersCouponProps) => React.JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CartCheckpoint } from "./ProductsOffers";
|
|
3
|
-
import { ProductsOffersConfigType } from "./ProductsOffers";
|
|
4
|
-
interface ProductOffersListProps {
|
|
5
|
-
offersToShow: CartCheckpoint[];
|
|
6
|
-
offersConfig: ProductsOffersConfigType;
|
|
7
|
-
getOfferCardMessage: (offer: CartCheckpoint) => string;
|
|
8
|
-
setSelectedOffer: (offer: CartCheckpoint | null) => void;
|
|
9
|
-
setShowPopup: (show: boolean) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const ProductOffersList: ({ offersToShow, offersConfig, getOfferCardMessage, setSelectedOffer, setShowPopup, }: ProductOffersListProps) => React.JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CartCheckpoint, OfferTermsAndConditions } from "./ProductsOffers";
|
|
3
|
-
import { ProductsOffersConfigType } from "./ProductsOffers";
|
|
4
|
-
export declare const ProductOffersTermsMobilePopover: ({ showPopup, selectedOffer, selectedOfferTerms, onClose, offersConfig, }: {
|
|
5
|
-
showPopup: boolean;
|
|
6
|
-
selectedOffer: CartCheckpoint | null;
|
|
7
|
-
selectedOfferTerms: OfferTermsAndConditions | null;
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
offersConfig?: ProductsOffersConfigType | null | undefined;
|
|
10
|
-
}) => React.ReactPortal | null;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CartCheckpoint, OfferTermsAndConditions } from "./ProductsOffers";
|
|
3
|
-
import { ProductsOffersConfigType } from "./ProductsOffers";
|
|
4
|
-
export declare const ProductOffersTermsPopup: ({ showPopup, selectedOffer, selectedOfferTerms, onClose, offersConfig, }: {
|
|
5
|
-
showPopup: boolean;
|
|
6
|
-
selectedOffer: CartCheckpoint | null;
|
|
7
|
-
selectedOfferTerms: OfferTermsAndConditions | null;
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
offersConfig?: ProductsOffersConfigType | null | undefined;
|
|
10
|
-
}) => React.ReactPortal | null;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Checkpoint } from "../Cart/Cart";
|
|
3
|
-
export interface ProductsOffersConfigType {
|
|
4
|
-
sectionType?: "coupon" | "list";
|
|
5
|
-
sectionTitle?: string;
|
|
6
|
-
sectionBackgroundColor?: string;
|
|
7
|
-
sectionBgContrastColor?: string;
|
|
8
|
-
cardBackgroundColor?: string;
|
|
9
|
-
cardBackgroundTransparent?: boolean;
|
|
10
|
-
textColor?: string;
|
|
11
|
-
accentColor?: string;
|
|
12
|
-
roundness?: number;
|
|
13
|
-
cardPadding?: number;
|
|
14
|
-
viewDetailsTitle?: string;
|
|
15
|
-
alignment?: "left" | "middle" | "right";
|
|
16
|
-
iconVisibility?: boolean;
|
|
17
|
-
popupIsolationStrategy?: "revert" | "revert-layer" | "unset" | "initial" | "inherit" | "none";
|
|
18
|
-
}
|
|
19
|
-
export interface CartCheckpoint extends Checkpoint {
|
|
20
|
-
customCartProgressBarCriteria?: string | null;
|
|
21
|
-
discountPercentage?: number | null;
|
|
22
|
-
discountId?: number | null;
|
|
23
|
-
}
|
|
24
|
-
export interface OfferTermsAndConditions {
|
|
25
|
-
offerMessage: string;
|
|
26
|
-
terms: string[];
|
|
27
|
-
}
|
|
28
|
-
declare const ProductsOffers: ({ offersConfig, offers, }: {
|
|
29
|
-
offersConfig?: ProductsOffersConfigType | null | undefined;
|
|
30
|
-
offers: CartCheckpoint[];
|
|
31
|
-
}) => React.JSX.Element;
|
|
32
|
-
export default ProductsOffers;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CartCheckpoint } from "./ProductsOffers";
|
|
3
|
-
import { ProductsOffersConfigType } from "./ProductsOffers";
|
|
4
|
-
interface ProductOffersCouponProps {
|
|
5
|
-
offersToShow: CartCheckpoint[];
|
|
6
|
-
offersConfig?: ProductsOffersConfigType | null;
|
|
7
|
-
getOfferCardMessage: (offer: CartCheckpoint) => string;
|
|
8
|
-
setSelectedOffer: (offer: CartCheckpoint | null) => void;
|
|
9
|
-
setShowPopup: (show: boolean) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const ProductOffersCoupon: ({ offersToShow, offersConfig, getOfferCardMessage, setSelectedOffer, setShowPopup, }: ProductOffersCouponProps) => React.JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CartCheckpoint } from "./ProductsOffers";
|
|
3
|
-
import { ProductsOffersConfigType } from "./ProductsOffers";
|
|
4
|
-
interface ProductOffersListProps {
|
|
5
|
-
offersToShow: CartCheckpoint[];
|
|
6
|
-
offersConfig: ProductsOffersConfigType;
|
|
7
|
-
getOfferCardMessage: (offer: CartCheckpoint) => string;
|
|
8
|
-
setSelectedOffer: (offer: CartCheckpoint | null) => void;
|
|
9
|
-
setShowPopup: (show: boolean) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const ProductOffersList: ({ offersToShow, offersConfig, getOfferCardMessage, setSelectedOffer, setShowPopup, }: ProductOffersListProps) => React.JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CartCheckpoint, OfferTermsAndConditions } from "./ProductsOffers";
|
|
3
|
-
import { ProductsOffersConfigType } from "./ProductsOffers";
|
|
4
|
-
export declare const ProductOffersTermsMobilePopover: ({ showPopup, selectedOffer, selectedOfferTerms, onClose, offersConfig, }: {
|
|
5
|
-
showPopup: boolean;
|
|
6
|
-
selectedOffer: CartCheckpoint | null;
|
|
7
|
-
selectedOfferTerms: OfferTermsAndConditions | null;
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
offersConfig?: ProductsOffersConfigType | null | undefined;
|
|
10
|
-
}) => React.ReactPortal | null;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CartCheckpoint, OfferTermsAndConditions } from "./ProductsOffers";
|
|
3
|
-
import { ProductsOffersConfigType } from "./ProductsOffers";
|
|
4
|
-
export declare const ProductOffersTermsPopup: ({ showPopup, selectedOffer, selectedOfferTerms, onClose, offersConfig, }: {
|
|
5
|
-
showPopup: boolean;
|
|
6
|
-
selectedOffer: CartCheckpoint | null;
|
|
7
|
-
selectedOfferTerms: OfferTermsAndConditions | null;
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
offersConfig?: ProductsOffersConfigType | null | undefined;
|
|
10
|
-
}) => React.ReactPortal | null;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Checkpoint } from "../Cart/Cart";
|
|
3
|
-
export interface ProductsOffersConfigType {
|
|
4
|
-
sectionType?: "coupon" | "list";
|
|
5
|
-
sectionTitle?: string;
|
|
6
|
-
sectionBackgroundColor?: string;
|
|
7
|
-
sectionBgContrastColor?: string;
|
|
8
|
-
cardBackgroundColor?: string;
|
|
9
|
-
cardBackgroundTransparent?: boolean;
|
|
10
|
-
textColor?: string;
|
|
11
|
-
accentColor?: string;
|
|
12
|
-
roundness?: number;
|
|
13
|
-
cardPadding?: number;
|
|
14
|
-
viewDetailsTitle?: string;
|
|
15
|
-
alignment?: "left" | "middle" | "right";
|
|
16
|
-
iconVisibility?: boolean;
|
|
17
|
-
popupIsolationStrategy?: "revert" | "revert-layer" | "unset" | "initial" | "inherit" | "none";
|
|
18
|
-
}
|
|
19
|
-
export interface CartCheckpoint extends Checkpoint {
|
|
20
|
-
customCartProgressBarCriteria?: string | null;
|
|
21
|
-
discountPercentage?: number | null;
|
|
22
|
-
discountId?: number | null;
|
|
23
|
-
}
|
|
24
|
-
export interface OfferTermsAndConditions {
|
|
25
|
-
offerMessage: string;
|
|
26
|
-
terms: string[];
|
|
27
|
-
}
|
|
28
|
-
declare const ProductsOffers: ({ offersConfig, offers, }: {
|
|
29
|
-
offersConfig?: ProductsOffersConfigType | null | undefined;
|
|
30
|
-
offers: CartCheckpoint[];
|
|
31
|
-
}) => React.JSX.Element;
|
|
32
|
-
export default ProductsOffers;
|