@anker-in/headless-ui 1.0.26-alpha.1763452467347 → 1.0.26-alpha.1763519122486

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";var n=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var c=(i,t)=>{for(var o in t)n(i,o,{get:t[o],enumerable:!0})},f=(i,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of x(t))!d.call(i,l)&&l!==o&&n(i,l,{get:()=>t[l],enumerable:!(s=g(t,l))||s.enumerable});return i};var v=i=>f(n({},"__esModule",{value:!0}),i);var N={};c(N,{ShippingPolicyModal:()=>h});module.exports=v(N);var e=require("react/jsx-runtime"),p=require("../../../../components/index.js"),a=require("../../../../components/dialog"),S=require("react");const h=({data:i,onClose:t,open:o})=>(0,e.jsx)(a.Dialog,{open:o,onOpenChange:t,children:(0,e.jsxs)(a.DialogContent,{className:"tablet:max-w-[729px] max-w-[326px] mx-auto w-full border-none overflow-hidden",children:[(0,e.jsx)(p.Text,{className:"text-[32px] font-bold leading-[1.2] md:text-[20px]",html:i?.title}),(0,e.jsxs)("div",{className:"mt-[16px]",children:[(0,e.jsx)(p.Text,{className:"text-[20px] font-bold leading-[1.2] md:text-[16px]",html:i?.shippingCoupon?.title}),(0,e.jsx)("ul",{className:"mt-3 grid grid-flow-row gap-[4px] font-semibold leading-[1.4]",children:i?.shippingCoupon?.list.map((s,l)=>(0,e.jsxs)("li",{className:"text-[16px]",children:[(0,e.jsxs)("span",{children:[l+1,"."]}),(0,e.jsx)("span",{className:"ml-[4px]",children:s})]},l))}),(0,e.jsxs)("div",{className:"mt-[24px] md:mt-[16px]",children:[(0,e.jsx)(p.Text,{className:"text-[20px] font-bold leading-[1.2] md:text-[16px]",html:i?.shippingService?.title}),(0,e.jsx)("div",{className:"mt-[12px] grid w-full grid-cols-2 gap-[12px] md:grid-cols-1",children:i?.shippingService?.list.map((s,l)=>(0,e.jsxs)("div",{className:"rounded-[12px] bg-[#F5F5F7] p-[16px] md:p-[12px]",children:[(0,e.jsx)(p.Text,{as:"p",className:"text-[20px] font-bold leading-[1.2] md:text-[16px]",html:s.title}),(0,e.jsx)("div",{className:"mt-[12px] grid grid-flow-row gap-[4px]",children:s.list.map((m,r)=>(0,e.jsx)(p.Text,{as:"p",className:"text-[16px] font-semibold leading-[1.2]",children:m},r))})]},l))})]}),(0,e.jsx)(p.Link,{className:"mt-[16px] block text-[16px] font-semibold leading-[1.2] underline",href:`${i?.terms?.url}`,children:i?.terms?.text})]})]})});
1
+ "use strict";var n=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var c=(i,t)=>{for(var o in t)n(i,o,{get:t[o],enumerable:!0})},f=(i,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of d(t))!x.call(i,l)&&l!==o&&n(i,l,{get:()=>t[l],enumerable:!(s=g(t,l))||s.enumerable});return i};var v=i=>f(n({},"__esModule",{value:!0}),i);var N={};c(N,{ShippingPolicyModal:()=>h});module.exports=v(N);var e=require("react/jsx-runtime"),p=require("../../../../components/index.js"),a=require("../../../../components/dialog"),S=require("react");const h=({data:i,onClose:t,open:o})=>(0,e.jsx)(a.Dialog,{open:o,onOpenChange:t,children:(0,e.jsxs)(a.DialogContent,{className:"tablet:max-w-[729px] rounded-lg max-w-[326px] mx-auto w-full border-none overflow-hidden",children:[(0,e.jsx)(p.Text,{className:"text-[32px] font-bold leading-[1.2] md:text-[20px]",html:i?.title}),(0,e.jsxs)("div",{className:"mt-[16px]",children:[(0,e.jsx)(p.Text,{className:"text-[20px] font-bold leading-[1.2] md:text-[16px]",html:i?.shippingCoupon?.title}),(0,e.jsx)("ul",{className:"mt-3 grid grid-flow-row gap-[4px] font-semibold leading-[1.4]",children:i?.shippingCoupon?.list.map((s,l)=>(0,e.jsxs)("li",{className:"text-[16px]",children:[(0,e.jsxs)("span",{children:[l+1,"."]}),(0,e.jsx)("span",{className:"ml-[4px]",children:s})]},l))}),(0,e.jsxs)("div",{className:"mt-[24px] md:mt-[16px]",children:[(0,e.jsx)(p.Text,{className:"text-[20px] font-bold leading-[1.2] md:text-[16px]",html:i?.shippingService?.title}),(0,e.jsx)("div",{className:"mt-[12px] grid w-full grid-cols-2 gap-[12px] md:grid-cols-1",children:i?.shippingService?.list.map((s,l)=>(0,e.jsxs)("div",{className:"rounded-[12px] bg-[#F5F5F7] p-[16px] md:p-[12px]",children:[(0,e.jsx)(p.Text,{as:"p",className:"text-[20px] font-bold leading-[1.2] md:text-[16px]",html:s.title}),(0,e.jsx)("div",{className:"mt-[12px] grid grid-flow-row gap-[4px]",children:s.list.map((m,r)=>(0,e.jsx)(p.Text,{as:"p",className:"text-[16px] font-semibold leading-[1.2]",children:m},r))})]},l))})]}),(0,e.jsx)(p.Link,{className:"mt-[16px] block text-[16px] font-semibold leading-[1.2] underline",href:`${i?.terms?.url}`,children:i?.terms?.text})]})]})});
2
2
  //# sourceMappingURL=ShippingPolicyModal.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.tsx"],
4
- "sourcesContent": ["import { Text, Link } from '../../../../components/index.js'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from '../../../../components/dialog'\nimport { useMemo } from 'react'\n\ninterface Terms {\n text: string\n url: string\n}\n\ninterface List {\n title: string\n list: string[]\n}\n\ninterface ShippingService {\n title: string\n list: List[]\n}\n\ninterface Data {\n title: string\n shippingCoupon: List\n shippingService: ShippingService\n terms: Terms\n}\n\ninterface Props {\n data: Data\n onClose: () => void\n open: boolean\n}\n\nexport const ShippingPolicyModal = ({ data, onClose, open }: Props) => {\n return (\n <Dialog open={open} onOpenChange={onClose}>\n <DialogContent className=\"tablet:max-w-[729px] max-w-[326px] mx-auto w-full border-none overflow-hidden\">\n <Text className=\"text-[32px] font-bold leading-[1.2] md:text-[20px]\" html={data?.title} />\n <div className=\"mt-[16px]\">\n <Text className=\"text-[20px] font-bold leading-[1.2] md:text-[16px]\" html={data?.shippingCoupon?.title} />\n <ul className=\"mt-3 grid grid-flow-row gap-[4px] font-semibold leading-[1.4]\">\n {data?.shippingCoupon?.list.map((item, index) => (\n <li className=\"text-[16px]\" key={index}>\n <span>{index + 1}.</span>\n <span className=\"ml-[4px]\">{item}</span>\n </li>\n ))}\n </ul>\n <div className=\"mt-[24px] md:mt-[16px]\">\n <Text className=\"text-[20px] font-bold leading-[1.2] md:text-[16px]\" html={data?.shippingService?.title} />\n <div className=\"mt-[12px] grid w-full grid-cols-2 gap-[12px] md:grid-cols-1\">\n {data?.shippingService?.list.map((item, index) => (\n <div className=\"rounded-[12px] bg-[#F5F5F7] p-[16px] md:p-[12px]\" key={index}>\n <Text as=\"p\" className=\"text-[20px] font-bold leading-[1.2] md:text-[16px]\" html={item.title} />\n <div className=\"mt-[12px] grid grid-flow-row gap-[4px]\">\n {item.list.map((subItem, subIndex) => (\n <Text as=\"p\" className=\"text-[16px] font-semibold leading-[1.2]\" key={subIndex}>\n {subItem}\n </Text>\n ))}\n </div>\n </div>\n ))}\n </div>\n </div>\n\n <Link\n className=\"mt-[16px] block text-[16px] font-semibold leading-[1.2] underline\"\n href={`${data?.terms?.url}`}\n >\n {data?.terms?.text}\n </Link>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,IAAA,eAAAC,EAAAH,GAoCQ,IAAAI,EAAA,6BApCRC,EAA2B,2CAC3BC,EAAgF,yCAChFC,EAAwB,iBA8BjB,MAAML,EAAsB,CAAC,CAAE,KAAAM,EAAM,QAAAC,EAAS,KAAAC,CAAK,OAEtD,OAAC,UAAO,KAAMA,EAAM,aAAcD,EAChC,oBAAC,iBAAc,UAAU,gFACvB,oBAAC,QAAK,UAAU,qDAAqD,KAAMD,GAAM,MAAO,KACxF,QAAC,OAAI,UAAU,YACb,oBAAC,QAAK,UAAU,qDAAqD,KAAMA,GAAM,gBAAgB,MAAO,KACxG,OAAC,MAAG,UAAU,gEACX,SAAAA,GAAM,gBAAgB,KAAK,IAAI,CAACG,EAAMC,OACrC,QAAC,MAAG,UAAU,cACZ,qBAAC,QAAM,UAAAA,EAAQ,EAAE,KAAC,KAClB,OAAC,QAAK,UAAU,WAAY,SAAAD,EAAK,IAFFC,CAGjC,CACD,EACH,KACA,QAAC,OAAI,UAAU,yBACb,oBAAC,QAAK,UAAU,qDAAqD,KAAMJ,GAAM,iBAAiB,MAAO,KACzG,OAAC,OAAI,UAAU,8DACZ,SAAAA,GAAM,iBAAiB,KAAK,IAAI,CAACG,EAAMC,OACtC,QAAC,OAAI,UAAU,mDACb,oBAAC,QAAK,GAAG,IAAI,UAAU,qDAAqD,KAAMD,EAAK,MAAO,KAC9F,OAAC,OAAI,UAAU,yCACZ,SAAAA,EAAK,KAAK,IAAI,CAACE,EAASC,OACvB,OAAC,QAAK,GAAG,IAAI,UAAU,0CACpB,SAAAD,GADmEC,CAEtE,CACD,EACH,IARqEF,CASvE,CACD,EACH,GACF,KAEA,OAAC,QACC,UAAU,oEACV,KAAM,GAAGJ,GAAM,OAAO,GAAG,GAExB,SAAAA,GAAM,OAAO,KAChB,GACF,GACF,EACF",
4
+ "sourcesContent": ["import { Text, Link } from '../../../../components/index.js'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from '../../../../components/dialog'\nimport { useMemo } from 'react'\n\ninterface Terms {\n text: string\n url: string\n}\n\ninterface List {\n title: string\n list: string[]\n}\n\ninterface ShippingService {\n title: string\n list: List[]\n}\n\ninterface Data {\n title: string\n shippingCoupon: List\n shippingService: ShippingService\n terms: Terms\n}\n\ninterface Props {\n data: Data\n onClose: () => void\n open: boolean\n}\n\nexport const ShippingPolicyModal = ({ data, onClose, open }: Props) => {\n return (\n <Dialog open={open} onOpenChange={onClose}>\n <DialogContent className=\"tablet:max-w-[729px] rounded-lg max-w-[326px] mx-auto w-full border-none overflow-hidden\">\n <Text className=\"text-[32px] font-bold leading-[1.2] md:text-[20px]\" html={data?.title} />\n <div className=\"mt-[16px]\">\n <Text className=\"text-[20px] font-bold leading-[1.2] md:text-[16px]\" html={data?.shippingCoupon?.title} />\n <ul className=\"mt-3 grid grid-flow-row gap-[4px] font-semibold leading-[1.4]\">\n {data?.shippingCoupon?.list.map((item, index) => (\n <li className=\"text-[16px]\" key={index}>\n <span>{index + 1}.</span>\n <span className=\"ml-[4px]\">{item}</span>\n </li>\n ))}\n </ul>\n <div className=\"mt-[24px] md:mt-[16px]\">\n <Text className=\"text-[20px] font-bold leading-[1.2] md:text-[16px]\" html={data?.shippingService?.title} />\n <div className=\"mt-[12px] grid w-full grid-cols-2 gap-[12px] md:grid-cols-1\">\n {data?.shippingService?.list.map((item, index) => (\n <div className=\"rounded-[12px] bg-[#F5F5F7] p-[16px] md:p-[12px]\" key={index}>\n <Text as=\"p\" className=\"text-[20px] font-bold leading-[1.2] md:text-[16px]\" html={item.title} />\n <div className=\"mt-[12px] grid grid-flow-row gap-[4px]\">\n {item.list.map((subItem, subIndex) => (\n <Text as=\"p\" className=\"text-[16px] font-semibold leading-[1.2]\" key={subIndex}>\n {subItem}\n </Text>\n ))}\n </div>\n </div>\n ))}\n </div>\n </div>\n\n <Link\n className=\"mt-[16px] block text-[16px] font-semibold leading-[1.2] underline\"\n href={`${data?.terms?.url}`}\n >\n {data?.terms?.text}\n </Link>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,IAAA,eAAAC,EAAAH,GAoCQ,IAAAI,EAAA,6BApCRC,EAA2B,2CAC3BC,EAAgF,yCAChFC,EAAwB,iBA8BjB,MAAML,EAAsB,CAAC,CAAE,KAAAM,EAAM,QAAAC,EAAS,KAAAC,CAAK,OAEtD,OAAC,UAAO,KAAMA,EAAM,aAAcD,EAChC,oBAAC,iBAAc,UAAU,2FACvB,oBAAC,QAAK,UAAU,qDAAqD,KAAMD,GAAM,MAAO,KACxF,QAAC,OAAI,UAAU,YACb,oBAAC,QAAK,UAAU,qDAAqD,KAAMA,GAAM,gBAAgB,MAAO,KACxG,OAAC,MAAG,UAAU,gEACX,SAAAA,GAAM,gBAAgB,KAAK,IAAI,CAACG,EAAMC,OACrC,QAAC,MAAG,UAAU,cACZ,qBAAC,QAAM,UAAAA,EAAQ,EAAE,KAAC,KAClB,OAAC,QAAK,UAAU,WAAY,SAAAD,EAAK,IAFFC,CAGjC,CACD,EACH,KACA,QAAC,OAAI,UAAU,yBACb,oBAAC,QAAK,UAAU,qDAAqD,KAAMJ,GAAM,iBAAiB,MAAO,KACzG,OAAC,OAAI,UAAU,8DACZ,SAAAA,GAAM,iBAAiB,KAAK,IAAI,CAACG,EAAMC,OACtC,QAAC,OAAI,UAAU,mDACb,oBAAC,QAAK,GAAG,IAAI,UAAU,qDAAqD,KAAMD,EAAK,MAAO,KAC9F,OAAC,OAAI,UAAU,yCACZ,SAAAA,EAAK,KAAK,IAAI,CAACE,EAASC,OACvB,OAAC,QAAK,GAAG,IAAI,UAAU,0CACpB,SAAAD,GADmEC,CAEtE,CACD,EACH,IARqEF,CASvE,CACD,EACH,GACF,KAEA,OAAC,QACC,UAAU,oEACV,KAAM,GAAGJ,GAAM,OAAO,GAAG,GAExB,SAAAA,GAAM,OAAO,KAChB,GACF,GACF,EACF",
6
6
  "names": ["ShippingPolicyModal_exports", "__export", "ShippingPolicyModal", "__toCommonJS", "import_jsx_runtime", "import_components", "import_dialog", "import_react", "data", "onClose", "open", "item", "index", "subItem", "subIndex"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var c=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var h=(e,t)=>{for(var o in t)c(e,o,{get:t[o],enumerable:!0})},S=(e,t,o,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of k(t))!w.call(e,l)&&l!==o&&c(e,l,{get:()=>t[l],enumerable:!(d=N(t,l))||d.enumerable});return e};var P=e=>S(c({},"__esModule",{value:!0}),e);var A={};h(A,{default:()=>B});module.exports=P(A);var a=require("react/jsx-runtime"),r=require("../../../../../components"),x=require("../../../../AiuiProvider/index.js"),p=require("../../../BizProductProvider.js"),s=require("react"),i=require("../../../utils"),u=require("../../../utils/textFormat");const T=()=>{const{copyWriting:e,locale:t="us"}=(0,x.useAiuiContext)(),{variant:o,finalPrice:d,totalSavings:l,memberFunctionResult:F,isLogin:m,comparePrice:b,onAddToCart:g,onBuyNow:f,savingDetail:n,coupon:z,addToCartLoading:y,buyNowLoading:C,profile:E}=(0,p.useBizProductContext)(),v=(0,s.useMemo)(()=>(0,u.replaceTemplate)(e?.totalSavings||"",{amount:(0,i.formatPrice)({amount:l,currencyCode:o.price.currencyCode,locale:t})}),[e?.totalSavings,l,o.price.currencyCode,t]),L=(0,s.useMemo)(()=>(0,u.replaceTemplate)(e?.memberSaving||"",{amount:(0,i.formatPrice)({amount:n?.member,currencyCode:o.price.currencyCode,locale:t})}),[e?.memberSaving,n?.member,o.price.currencyCode,t]);return(0,a.jsxs)(r.Container,{childClassName:"tablet:flex tablet:justify-between desktop:px-0 desktop:px-0 tablet:items-center tablet:gap-4",className:"bg-white py-3 border-t border-[#E4E5E6] desktop:border-none",children:[o.availableForSale?(0,a.jsxs)("div",{className:"flex flex-col justify-between desktop:items-end",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(r.Text,{className:"text-xl tablet:text-2xl font-bold !leading-[1.2] desktop:text-xl lg-desktop:text-2xl",html:(0,i.formatPrice)({amount:Math.floor(d*100)/100,currencyCode:o.price.currencyCode,locale:t})}),(l>0||n?.member>0&&m)&&(0,a.jsx)(r.Text,{className:"text-xl tablet:text-2xl font-bold line-through text-[#999] !leading-[1.2] desktop:text-xl lg-desktop:text-2xl",html:(0,i.formatPrice)({amount:b,currencyCode:o.price.currencyCode,locale:t})}),n?.member>0&&m&&(0,a.jsx)(r.Text,{className:"bg-brand-0 font-bold text-white px-1 py-[2px] text-sm rounded",html:e?.memberPrice||"Member Price"})]}),(l>0||n?.member>0&&m)&&(0,a.jsx)(r.Text,{className:"text-brand-0 text-[18px] desktop:text-end !leading-[1.2] font-bold desktop:text-xl lg-desktop:text-2xl",html:`${v}`})]}):(0,a.jsx)(r.Text,{className:"text-[20px] font-bold text-[#999999]",html:e?.soldOut??"Sold Out"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-2 tablet:mt-0",children:[(0,a.jsx)(r.Button,{variant:"secondary",disabled:!o.availableForSale,size:"lg",className:"w-1/2 tablet:w-auto",onClick:()=>g?.(),loading:y,children:e?.addToCart??"Add to Cart"}),(0,a.jsx)(r.Button,{variant:"primary",disabled:!o.availableForSale,size:"lg",loading:C,className:"w-1/2 tablet:w-auto",onClick:()=>f?.(),children:e?.buyNow??"Buy Now"})]})]})};var B=T;
1
+ "use strict";var c=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var w=(e,t)=>{for(var o in t)c(e,o,{get:t[o],enumerable:!0})},S=(e,t,o,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of k(t))!h.call(e,l)&&l!==o&&c(e,l,{get:()=>t[l],enumerable:!(d=N(t,l))||d.enumerable});return e};var P=e=>S(c({},"__esModule",{value:!0}),e);var A={};w(A,{default:()=>B});module.exports=P(A);var a=require("react/jsx-runtime"),r=require("../../../../../components"),x=require("../../../../AiuiProvider/index.js"),p=require("../../../BizProductProvider.js"),s=require("react"),i=require("../../../utils"),u=require("../../../utils/textFormat");const T=()=>{const{copyWriting:e,locale:t="us"}=(0,x.useAiuiContext)(),{variant:o,finalPrice:d,totalSavings:l,memberFunctionResult:F,isLogin:m,comparePrice:b,onAddToCart:g,onBuyNow:f,savingDetail:n,coupon:z,addToCartLoading:y,buyNowLoading:C,profile:E}=(0,p.useBizProductContext)(),v=(0,s.useMemo)(()=>(0,u.replaceTemplate)(e?.totalSavings||"",{amount:(0,i.formatPrice)({amount:l,currencyCode:o.price.currencyCode,locale:t})}),[e?.totalSavings,l,o.price.currencyCode,t]),L=(0,s.useMemo)(()=>(0,u.replaceTemplate)(e?.memberSaving||"",{amount:(0,i.formatPrice)({amount:n?.member,currencyCode:o.price.currencyCode,locale:t})}),[e?.memberSaving,n?.member,o.price.currencyCode,t]);return(0,a.jsxs)(r.Container,{childClassName:"tablet:flex tablet:justify-end tablet:gap-8 desktop:px-0 desktop:px-0 tablet:items-center tablet:gap-4",className:"bg-white py-3 border-t border-[#E4E5E6] desktop:border-none",children:[o.availableForSale?(0,a.jsxs)("div",{className:"flex flex-col justify-between desktop:items-end",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(r.Text,{className:"text-xl tablet:text-2xl font-bold !leading-[1.2] desktop:text-xl lg-desktop:text-2xl",html:(0,i.formatPrice)({amount:Math.floor(d*100)/100,currencyCode:o.price.currencyCode,locale:t})}),(l>0||n?.member>0&&m)&&(0,a.jsx)(r.Text,{className:"text-xl tablet:text-2xl font-bold line-through text-[#999] !leading-[1.2] desktop:text-xl lg-desktop:text-2xl",html:(0,i.formatPrice)({amount:b,currencyCode:o.price.currencyCode,locale:t})}),n?.member>0&&m&&(0,a.jsx)(r.Text,{className:"bg-brand-0 font-bold text-white px-1 py-[2px] text-sm rounded",html:e?.memberPrice||"Member Price"})]}),(l>0||n?.member>0&&m)&&(0,a.jsx)(r.Text,{className:"text-brand-0 text-[18px] desktop:text-end !leading-[1.2] font-bold desktop:text-xl lg-desktop:text-2xl",html:`${v}`})]}):(0,a.jsx)(r.Text,{className:"text-[20px] font-bold text-[#999999]",html:e?.soldOut??"Sold Out"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-2 tablet:mt-0",children:[(0,a.jsx)(r.Button,{variant:"secondary",disabled:!o.availableForSale,size:"lg",className:"w-1/2 tablet:w-auto",onClick:()=>g?.(),loading:y,children:e?.addToCart??"Add to Cart"}),(0,a.jsx)(r.Button,{variant:"primary",disabled:!o.availableForSale,size:"lg",loading:C,className:"w-1/2 tablet:w-auto",onClick:()=>f?.(),children:e?.buyNow??"Buy Now"})]})]})};var B=T;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/biz-components/Listing/components/PurchaseBar/ProductActions/index.tsx"],
4
- "sourcesContent": ["import { Text, Button, Container } from '../../../../../components'\nimport { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport { useBizProductContext } from '../../../BizProductProvider.js'\nimport { useMemo } from 'react'\nimport { formatPrice } from '../../../utils'\nimport { replaceTemplate } from '../../../utils/textFormat'\n\nconst ProductActions = () => {\n const { copyWriting, locale = 'us' } = useAiuiContext()\n const {\n variant,\n finalPrice,\n totalSavings,\n memberFunctionResult,\n isLogin,\n comparePrice,\n onAddToCart,\n onBuyNow,\n savingDetail,\n coupon,\n addToCartLoading,\n buyNowLoading,\n profile,\n } = useBizProductContext()\n\n const totalSavingsText = useMemo(() => {\n return replaceTemplate(copyWriting?.totalSavings || '', {\n amount: formatPrice({ amount: totalSavings, currencyCode: variant.price.currencyCode, locale }),\n })\n }, [copyWriting?.totalSavings, totalSavings, variant.price.currencyCode, locale])\n\n const memberPriceSaveText = useMemo(() => {\n return replaceTemplate(copyWriting?.memberSaving || '', {\n amount: formatPrice({\n amount: savingDetail?.member,\n currencyCode: variant.price.currencyCode,\n locale,\n }),\n })\n }, [copyWriting?.memberSaving, savingDetail?.member, variant.price.currencyCode, locale])\n\n return (\n <Container\n childClassName=\"tablet:flex tablet:justify-between desktop:px-0 desktop:px-0 tablet:items-center tablet:gap-4\"\n className=\"bg-white py-3 border-t border-[#E4E5E6] desktop:border-none\"\n >\n {variant.availableForSale ? (\n <div className=\"flex flex-col justify-between desktop:items-end\">\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"text-xl tablet:text-2xl font-bold !leading-[1.2] desktop:text-xl lg-desktop:text-2xl\"\n html={formatPrice({\n amount: Math.floor(finalPrice * 100) / 100,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n {(totalSavings > 0 || (savingDetail?.member > 0 && isLogin)) && (\n <Text\n className=\"text-xl tablet:text-2xl font-bold line-through text-[#999] !leading-[1.2] desktop:text-xl lg-desktop:text-2xl\"\n html={formatPrice({\n amount: comparePrice,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n )}\n {savingDetail?.member > 0 && isLogin && (\n <Text\n className=\"bg-brand-0 font-bold text-white px-1 py-[2px] text-sm rounded\"\n html={copyWriting?.memberPrice || 'Member Price'}\n />\n )}\n </div>\n {(totalSavings > 0 || (savingDetail?.member > 0 && isLogin)) && (\n <Text\n className=\"text-brand-0 text-[18px] desktop:text-end !leading-[1.2] font-bold desktop:text-xl lg-desktop:text-2xl\"\n html={`${totalSavingsText}`}\n />\n )}\n </div>\n ) : (\n <Text className=\"text-[20px] font-bold text-[#999999]\" html={copyWriting?.soldOut ?? 'Sold Out'} />\n )}\n <div className=\"flex items-center gap-2 mt-2 tablet:mt-0\">\n <Button\n variant=\"secondary\"\n disabled={!variant.availableForSale}\n size=\"lg\"\n className=\"w-1/2 tablet:w-auto\"\n onClick={() => onAddToCart?.()}\n loading={addToCartLoading}\n >\n {copyWriting?.addToCart ?? 'Add to Cart'}\n </Button>\n <Button\n variant=\"primary\"\n disabled={!variant.availableForSale}\n size=\"lg\"\n loading={buyNowLoading}\n className=\"w-1/2 tablet:w-auto\"\n onClick={() => onBuyNow?.()}\n >\n {copyWriting?.buyNow ?? 'Buy Now'}\n </Button>\n </div>\n </Container>\n )\n}\n\nexport default ProductActions\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAgDU,IAAAI,EAAA,6BAhDVC,EAAwC,qCACxCC,EAA+B,6CAC/BC,EAAqC,0CACrCC,EAAwB,iBACxBC,EAA4B,0BAC5BC,EAAgC,qCAEhC,MAAMC,EAAiB,IAAM,CAC3B,KAAM,CAAE,YAAAC,EAAa,OAAAC,EAAS,IAAK,KAAI,kBAAe,EAChD,CACJ,QAAAC,EACA,WAAAC,EACA,aAAAC,EACA,qBAAAC,EACA,QAAAC,EACA,aAAAC,EACA,YAAAC,EACA,SAAAC,EACA,aAAAC,EACA,OAAAC,EACA,iBAAAC,EACA,cAAAC,EACA,QAAAC,CACF,KAAI,wBAAqB,EAEnBC,KAAmB,WAAQ,OACxB,mBAAgBf,GAAa,cAAgB,GAAI,CACtD,UAAQ,eAAY,CAAE,OAAQI,EAAc,aAAcF,EAAQ,MAAM,aAAc,OAAAD,CAAO,CAAC,CAChG,CAAC,EACA,CAACD,GAAa,aAAcI,EAAcF,EAAQ,MAAM,aAAcD,CAAM,CAAC,EAE1Ee,KAAsB,WAAQ,OAC3B,mBAAgBhB,GAAa,cAAgB,GAAI,CACtD,UAAQ,eAAY,CAClB,OAAQU,GAAc,OACtB,aAAcR,EAAQ,MAAM,aAC5B,OAAAD,CACF,CAAC,CACH,CAAC,EACA,CAACD,GAAa,aAAcU,GAAc,OAAQR,EAAQ,MAAM,aAAcD,CAAM,CAAC,EAExF,SACE,QAAC,aACC,eAAe,gGACf,UAAU,8DAET,UAAAC,EAAQ,oBACP,QAAC,OAAI,UAAU,kDACb,qBAAC,OAAI,UAAU,0BACb,oBAAC,QACC,UAAU,uFACV,QAAM,eAAY,CAChB,OAAQ,KAAK,MAAMC,EAAa,GAAG,EAAI,IACvC,aAAcD,EAAQ,MAAM,aAC5B,OAAAD,CACF,CAAC,EACH,GACEG,EAAe,GAAMM,GAAc,OAAS,GAAKJ,OACjD,OAAC,QACC,UAAU,gHACV,QAAM,eAAY,CAChB,OAAQC,EACR,aAAcL,EAAQ,MAAM,aAC5B,OAAAD,CACF,CAAC,EACH,EAEDS,GAAc,OAAS,GAAKJ,MAC3B,OAAC,QACC,UAAU,gEACV,KAAMN,GAAa,aAAe,eACpC,GAEJ,GACEI,EAAe,GAAMM,GAAc,OAAS,GAAKJ,OACjD,OAAC,QACC,UAAU,yGACV,KAAM,GAAGS,CAAgB,GAC3B,GAEJ,KAEA,OAAC,QAAK,UAAU,uCAAuC,KAAMf,GAAa,SAAW,WAAY,KAEnG,QAAC,OAAI,UAAU,2CACb,oBAAC,UACC,QAAQ,YACR,SAAU,CAACE,EAAQ,iBACnB,KAAK,KACL,UAAU,sBACV,QAAS,IAAMM,IAAc,EAC7B,QAASI,EAER,SAAAZ,GAAa,WAAa,cAC7B,KACA,OAAC,UACC,QAAQ,UACR,SAAU,CAACE,EAAQ,iBACnB,KAAK,KACL,QAASW,EACT,UAAU,sBACV,QAAS,IAAMJ,IAAW,EAEzB,SAAAT,GAAa,QAAU,UAC1B,GACF,GACF,CAEJ,EAEA,IAAOV,EAAQS",
4
+ "sourcesContent": ["import { Text, Button, Container } from '../../../../../components'\nimport { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport { useBizProductContext } from '../../../BizProductProvider.js'\nimport { useMemo } from 'react'\nimport { formatPrice } from '../../../utils'\nimport { replaceTemplate } from '../../../utils/textFormat'\n\nconst ProductActions = () => {\n const { copyWriting, locale = 'us' } = useAiuiContext()\n const {\n variant,\n finalPrice,\n totalSavings,\n memberFunctionResult,\n isLogin,\n comparePrice,\n onAddToCart,\n onBuyNow,\n savingDetail,\n coupon,\n addToCartLoading,\n buyNowLoading,\n profile,\n } = useBizProductContext()\n\n const totalSavingsText = useMemo(() => {\n return replaceTemplate(copyWriting?.totalSavings || '', {\n amount: formatPrice({ amount: totalSavings, currencyCode: variant.price.currencyCode, locale }),\n })\n }, [copyWriting?.totalSavings, totalSavings, variant.price.currencyCode, locale])\n\n const memberPriceSaveText = useMemo(() => {\n return replaceTemplate(copyWriting?.memberSaving || '', {\n amount: formatPrice({\n amount: savingDetail?.member,\n currencyCode: variant.price.currencyCode,\n locale,\n }),\n })\n }, [copyWriting?.memberSaving, savingDetail?.member, variant.price.currencyCode, locale])\n\n return (\n <Container\n childClassName=\"tablet:flex tablet:justify-end tablet:gap-8 desktop:px-0 desktop:px-0 tablet:items-center tablet:gap-4\"\n className=\"bg-white py-3 border-t border-[#E4E5E6] desktop:border-none\"\n >\n {variant.availableForSale ? (\n <div className=\"flex flex-col justify-between desktop:items-end\">\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"text-xl tablet:text-2xl font-bold !leading-[1.2] desktop:text-xl lg-desktop:text-2xl\"\n html={formatPrice({\n amount: Math.floor(finalPrice * 100) / 100,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n {(totalSavings > 0 || (savingDetail?.member > 0 && isLogin)) && (\n <Text\n className=\"text-xl tablet:text-2xl font-bold line-through text-[#999] !leading-[1.2] desktop:text-xl lg-desktop:text-2xl\"\n html={formatPrice({\n amount: comparePrice,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n )}\n {savingDetail?.member > 0 && isLogin && (\n <Text\n className=\"bg-brand-0 font-bold text-white px-1 py-[2px] text-sm rounded\"\n html={copyWriting?.memberPrice || 'Member Price'}\n />\n )}\n </div>\n {(totalSavings > 0 || (savingDetail?.member > 0 && isLogin)) && (\n <Text\n className=\"text-brand-0 text-[18px] desktop:text-end !leading-[1.2] font-bold desktop:text-xl lg-desktop:text-2xl\"\n html={`${totalSavingsText}`}\n />\n )}\n </div>\n ) : (\n <Text className=\"text-[20px] font-bold text-[#999999]\" html={copyWriting?.soldOut ?? 'Sold Out'} />\n )}\n <div className=\"flex items-center gap-2 mt-2 tablet:mt-0\">\n <Button\n variant=\"secondary\"\n disabled={!variant.availableForSale}\n size=\"lg\"\n className=\"w-1/2 tablet:w-auto\"\n onClick={() => onAddToCart?.()}\n loading={addToCartLoading}\n >\n {copyWriting?.addToCart ?? 'Add to Cart'}\n </Button>\n <Button\n variant=\"primary\"\n disabled={!variant.availableForSale}\n size=\"lg\"\n loading={buyNowLoading}\n className=\"w-1/2 tablet:w-auto\"\n onClick={() => onBuyNow?.()}\n >\n {copyWriting?.buyNow ?? 'Buy Now'}\n </Button>\n </div>\n </Container>\n )\n}\n\nexport default ProductActions\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAgDU,IAAAI,EAAA,6BAhDVC,EAAwC,qCACxCC,EAA+B,6CAC/BC,EAAqC,0CACrCC,EAAwB,iBACxBC,EAA4B,0BAC5BC,EAAgC,qCAEhC,MAAMC,EAAiB,IAAM,CAC3B,KAAM,CAAE,YAAAC,EAAa,OAAAC,EAAS,IAAK,KAAI,kBAAe,EAChD,CACJ,QAAAC,EACA,WAAAC,EACA,aAAAC,EACA,qBAAAC,EACA,QAAAC,EACA,aAAAC,EACA,YAAAC,EACA,SAAAC,EACA,aAAAC,EACA,OAAAC,EACA,iBAAAC,EACA,cAAAC,EACA,QAAAC,CACF,KAAI,wBAAqB,EAEnBC,KAAmB,WAAQ,OACxB,mBAAgBf,GAAa,cAAgB,GAAI,CACtD,UAAQ,eAAY,CAAE,OAAQI,EAAc,aAAcF,EAAQ,MAAM,aAAc,OAAAD,CAAO,CAAC,CAChG,CAAC,EACA,CAACD,GAAa,aAAcI,EAAcF,EAAQ,MAAM,aAAcD,CAAM,CAAC,EAE1Ee,KAAsB,WAAQ,OAC3B,mBAAgBhB,GAAa,cAAgB,GAAI,CACtD,UAAQ,eAAY,CAClB,OAAQU,GAAc,OACtB,aAAcR,EAAQ,MAAM,aAC5B,OAAAD,CACF,CAAC,CACH,CAAC,EACA,CAACD,GAAa,aAAcU,GAAc,OAAQR,EAAQ,MAAM,aAAcD,CAAM,CAAC,EAExF,SACE,QAAC,aACC,eAAe,yGACf,UAAU,8DAET,UAAAC,EAAQ,oBACP,QAAC,OAAI,UAAU,kDACb,qBAAC,OAAI,UAAU,0BACb,oBAAC,QACC,UAAU,uFACV,QAAM,eAAY,CAChB,OAAQ,KAAK,MAAMC,EAAa,GAAG,EAAI,IACvC,aAAcD,EAAQ,MAAM,aAC5B,OAAAD,CACF,CAAC,EACH,GACEG,EAAe,GAAMM,GAAc,OAAS,GAAKJ,OACjD,OAAC,QACC,UAAU,gHACV,QAAM,eAAY,CAChB,OAAQC,EACR,aAAcL,EAAQ,MAAM,aAC5B,OAAAD,CACF,CAAC,EACH,EAEDS,GAAc,OAAS,GAAKJ,MAC3B,OAAC,QACC,UAAU,gEACV,KAAMN,GAAa,aAAe,eACpC,GAEJ,GACEI,EAAe,GAAMM,GAAc,OAAS,GAAKJ,OACjD,OAAC,QACC,UAAU,yGACV,KAAM,GAAGS,CAAgB,GAC3B,GAEJ,KAEA,OAAC,QAAK,UAAU,uCAAuC,KAAMf,GAAa,SAAW,WAAY,KAEnG,QAAC,OAAI,UAAU,2CACb,oBAAC,UACC,QAAQ,YACR,SAAU,CAACE,EAAQ,iBACnB,KAAK,KACL,UAAU,sBACV,QAAS,IAAMM,IAAc,EAC7B,QAASI,EAER,SAAAZ,GAAa,WAAa,cAC7B,KACA,OAAC,UACC,QAAQ,UACR,SAAU,CAACE,EAAQ,iBACnB,KAAK,KACL,QAASW,EACT,UAAU,sBACV,QAAS,IAAMJ,IAAW,EAEzB,SAAAT,GAAa,QAAU,UAC1B,GACF,GACF,CAEJ,EAEA,IAAOV,EAAQS",
6
6
  "names": ["ProductActions_exports", "__export", "ProductActions_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_AiuiProvider", "import_BizProductProvider", "import_react", "import_utils", "import_textFormat", "ProductActions", "copyWriting", "locale", "variant", "finalPrice", "totalSavings", "memberFunctionResult", "isLogin", "comparePrice", "onAddToCart", "onBuyNow", "savingDetail", "coupon", "addToCartLoading", "buyNowLoading", "profile", "totalSavingsText", "memberPriceSaveText"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var r=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var n=(p,l)=>{for(var o in l)r(p,o,{get:l[o],enumerable:!0})},x=(p,l,o,s)=>{if(l&&typeof l=="object"||typeof l=="function")for(let t of c(l))!g.call(p,t)&&t!==o&&r(p,t,{get:()=>l[t],enumerable:!(s=d(l,t))||s.enumerable});return p};var f=p=>x(r({},"__esModule",{value:!0}),p);var I={};n(I,{default:()=>v});module.exports=f(I);var e=require("react/jsx-runtime"),b=require("../../helpers/utils.js"),N=require("../SwiperBox/index.js"),i=require("../../shared/Styles.js"),a=require("../../components/index.js");const u=p=>{const{data:l,className:o}=p,{list:s}=l;return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)("div",{className:"",children:(0,e.jsx)("div",{className:"grid laptop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4",children:s.map((t,m)=>(0,e.jsxs)("div",{className:"relative rounded-2xl lg-desktop:aspect-[543/320] laptop:aspect-[440/280] tablet:aspect-[346/240] aspect-[358/240] overflow-hidden",children:[(0,e.jsx)(a.Picture,{className:"w-full h-full object-cover",imgClassName:"w-full h-full object-cover",source:`${t?.img?.url}, ${t?.padImg?.url} 1439, ${t?.miniImg?.url} 1023, ${t?.mobileImg?.url} 767`}),(0,e.jsxs)("div",{className:"laptop:px-6 laptop:pb-6 lg-desktop:px-8 lg-desktop:pb-8 px-4 pb-4",children:[(0,e.jsx)(a.Text,{html:t?.title,className:"text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]"}),(0,e.jsx)(a.Text,{html:t?.desc,className:"text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]"})]})]},m))})})})};var v=(0,i.withLayout)(u);
1
+ "use strict";"use client";var r=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var x=(p,l)=>{for(var o in l)r(p,o,{get:l[o],enumerable:!0})},n=(p,l,o,a)=>{if(l&&typeof l=="object"||typeof l=="function")for(let e of d(l))!g.call(p,e)&&e!==o&&r(p,e,{get:()=>l[e],enumerable:!(a=m(l,e))||a.enumerable});return p};var f=p=>n(r({},"__esModule",{value:!0}),p);var b={};x(b,{default:()=>v});module.exports=f(b);var t=require("react/jsx-runtime"),S=require("../../helpers/utils.js"),N=require("../SwiperBox/index.js"),c=require("../../shared/Styles.js"),s=require("../../components/index.js");const u=p=>{const{data:l,className:o}=p,{list:a}=l;return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{className:"",children:(0,t.jsx)("div",{className:"grid laptop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4",children:a.map((e,i)=>(0,t.jsxs)("div",{className:"relative rounded-2xl lg-desktop:aspect-[543/320] laptop:aspect-[440/280] tablet:aspect-[346/240] aspect-[358/240] overflow-hidden flex flex-col bg-[#EAEAEC] select-store-wrapper",children:[(0,t.jsx)(s.Picture,{className:"object-cover",imgClassName:"w-full h-full object-cover",source:`${e?.img?.url}, ${e?.padImg?.url} 1439, ${e?.miniImg?.url} 1023, ${e?.mobileImg?.url} 767`}),(0,t.jsxs)("div",{className:"laptop:px-6 laptop:pb-6 lg-desktop:px-8 lg-desktop:pb-8 px-4 pb-4",children:[(0,t.jsx)(s.Text,{html:e?.title,className:"text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]"}),(0,t.jsx)(s.Text,{html:e?.desc,className:"text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]"})]})]},i))})})})};var v=(0,c.withLayout)(u);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/SelectStore/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type SelectStoreDataType = {\n title: string\n desc: string\n img: Img\n mobileImg: Img\n padImg: Img\n miniImg: Img\n // pay: {\n // img: Img\n // }[]\n // delivery: {\n // img: Img\n // }[]\n // service: {\n // title: string\n // img: Img\n // }[]\n}\n\ntype SelectStoreType = {\n data: {\n list: SelectStoreDataType[]\n }\n className?: string\n}\n\nconst SelectStore = (props: SelectStoreType) => {\n const { data, className } = props\n const { list } = data\n // const number = list?.[2]?.service?.length || 0\n return (\n <>\n <div className=\"\">\n <div className=\"grid laptop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4\">\n {list.map((item, index) => (\n <div\n key={index}\n className=\"relative rounded-2xl lg-desktop:aspect-[543/320] laptop:aspect-[440/280] tablet:aspect-[346/240] aspect-[358/240] overflow-hidden\"\n >\n <Picture\n className=\"w-full h-full object-cover\"\n imgClassName=\"w-full h-full object-cover\"\n source={`${item?.img?.url}, ${item?.padImg?.url} 1439, ${item?.miniImg?.url} 1023, ${item?.mobileImg?.url} 767`}\n />\n <div className=\"laptop:px-6 laptop:pb-6 lg-desktop:px-8 lg-desktop:pb-8 px-4 pb-4\">\n <Text\n html={item?.title}\n className=\"text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]\"\n />\n <Text\n html={item?.desc}\n className=\"text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]\"\n />\n </div>\n </div>\n ))}\n </div>\n {/* <div className='grid desktop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4'>\n {list.map((item, index) => (\n <div key={index} className='bg-[#EAEAEC] rounded-2xl min-h-[240px] laptop:min-h-[280px] lg-desktop:min-h-[320px]'>\n <div className='flex flex-col laptop:p-[24px] lg-desktop:p-[32px] p-[16px] justify-start h-full'>\n <div className=\"flex flex-col justify-center flex-1\">\n \n {item?.pay && (\n <div className='flex gap-[16px] flex-wrap items-center justify-center laptop:gap-[24px]'>\n {item?.pay?.map((pay, ind)=>{\n return (\n <div key={ind} className='laptop:w-[60px] w-[48px]'>\n <Picture\n className=\" w-full\"\n imgClassName=\"\"\n source={pay?.img?.url}\n alt={pay?.img?.alt || ''}\n />\n </div>\n )\n })}\n </div>\n )}\n \n {\n item?.delivery && (\n <div className='flex gap-[24px] items-center justify-center'>\n {item?.delivery?.map((delivery, ind)=>{\n return (\n <div key={ind} className=''>\n <Picture\n className={` ${ind === 0 ? 'laptop:w-[174px] w-[116px]' : 'laptop:w-[75px] w-[50px]'}`}\n imgClassName=\"\"\n source={delivery?.img?.url}\n alt={delivery?.img?.alt || ''}\n />\n </div>\n )\n })}\n </div>\n ) \n }\n \n {\n item?.service && (\n <div className=' desktop:gap-[24px] gap-[8px] tablet:gap-[12px] laptop:gap-[28px] grid l-tablet:grid-cols-2 tablet:flex flex-wrap desktop:grid-cols-4 items-center justify-center'>\n {item?.service?.map((service, ind)=>{\n // \u5224\u65AD\uFF1A\u53EA\u5BF9\u7B2C\u4E94\u6761\uFF08index === 4\uFF09\u5E94\u7528\u54CD\u5E94\u5F0F\u663E\u793A/\u9690\u85CF\n const isFifth = ind === 4;\n return (\n <div key={ind} className={`\n flex flex-col items-center desktop:h-full w-[157px] justify-start desktop:w-[81px]\n ${isFifth ? 'laptop:flex desktop:hidden hidden' : ''} \n `}>\n <div className='w-[70px] desktop:w-[54px]'>\n <Picture\n className=\"\"\n imgClassName=\"w-full h-auto\"\n source={service?.img?.url}\n alt={service?.img?.alt || ''}\n />\n </div>\n <div className='text-center'>\n <Text html={service?.title} className=' font-bold text-[12px] mt-[8px] leading-[1.4]' />\n </div>\n </div>\n )\n })}\n </div>\n )\n }\n </div>\n <div className='mt-auto'>\n <Text html={item?.title} className='text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]'/>\n <Text html={item?.desc} className='text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]'/>\n </div>\n \n </div>\n </div>\n ))}\n </div> */}\n </div>\n </>\n )\n}\n\nexport default withLayout(SelectStore)\n"],
5
- "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAsCI,IAAAI,EAAA,6BArCJC,EAAmB,kCACnBC,EAAsB,iCAEtBC,EAA2B,kCAC3BC,EAA8B,qCA4B9B,MAAMC,EAAeC,GAA2B,CAC9C,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EAEjB,SACE,mBACE,mBAAC,OAAI,UAAU,GACb,mBAAC,OAAI,UAAU,+DACZ,SAAAE,EAAK,IAAI,CAACC,EAAMC,OACf,QAAC,OAEC,UAAU,oIAEV,oBAAC,WACC,UAAU,6BACV,aAAa,6BACb,OAAQ,GAAGD,GAAM,KAAK,GAAG,KAAKA,GAAM,QAAQ,GAAG,UAAUA,GAAM,SAAS,GAAG,UAAUA,GAAM,WAAW,GAAG,OAC3G,KACA,QAAC,OAAI,UAAU,oEACb,oBAAC,QACC,KAAMA,GAAM,MACZ,UAAU,0FACZ,KACA,OAAC,QACC,KAAMA,GAAM,KACZ,UAAU,+EACZ,GACF,IAjBKC,CAkBP,CACD,EACH,EAiFF,EACF,CAEJ,EAEA,IAAOb,KAAQ,cAAWO,CAAW",
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type SelectStoreDataType = {\n title: string\n desc: string\n img: Img\n mobileImg: Img\n padImg: Img\n miniImg: Img\n // pay: {\n // img: Img\n // }[]\n // delivery: {\n // img: Img\n // }[]\n // service: {\n // title: string\n // img: Img\n // }[]\n}\n\ntype SelectStoreType = {\n data: {\n list: SelectStoreDataType[]\n }\n className?: string\n}\n\nconst SelectStore = (props: SelectStoreType) => {\n const { data, className } = props\n const { list } = data\n // const number = list?.[2]?.service?.length || 0\n return (\n <>\n <div className=\"\">\n <div className=\"grid laptop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4\">\n {list.map((item, index) => (\n <div\n key={index}\n className=\"relative rounded-2xl lg-desktop:aspect-[543/320] laptop:aspect-[440/280] tablet:aspect-[346/240] aspect-[358/240] overflow-hidden flex flex-col bg-[#EAEAEC] select-store-wrapper\"\n >\n <Picture\n className=\"object-cover\"\n imgClassName=\"w-full h-full object-cover\"\n source={`${item?.img?.url}, ${item?.padImg?.url} 1439, ${item?.miniImg?.url} 1023, ${item?.mobileImg?.url} 767`}\n />\n <div className=\"laptop:px-6 laptop:pb-6 lg-desktop:px-8 lg-desktop:pb-8 px-4 pb-4\">\n <Text\n html={item?.title}\n className=\"text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]\"\n />\n <Text\n html={item?.desc}\n className=\"text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]\"\n />\n </div>\n </div>\n ))}\n </div>\n {/* <div className='grid desktop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4'>\n {list.map((item, index) => (\n <div key={index} className='bg-[#EAEAEC] rounded-2xl min-h-[240px] laptop:min-h-[280px] lg-desktop:min-h-[320px]'>\n <div className='flex flex-col laptop:p-[24px] lg-desktop:p-[32px] p-[16px] justify-start h-full'>\n <div className=\"flex flex-col justify-center flex-1\">\n \n {item?.pay && (\n <div className='flex gap-[16px] flex-wrap items-center justify-center laptop:gap-[24px]'>\n {item?.pay?.map((pay, ind)=>{\n return (\n <div key={ind} className='laptop:w-[60px] w-[48px]'>\n <Picture\n className=\" w-full\"\n imgClassName=\"\"\n source={pay?.img?.url}\n alt={pay?.img?.alt || ''}\n />\n </div>\n )\n })}\n </div>\n )}\n \n {\n item?.delivery && (\n <div className='flex gap-[24px] items-center justify-center'>\n {item?.delivery?.map((delivery, ind)=>{\n return (\n <div key={ind} className=''>\n <Picture\n className={` ${ind === 0 ? 'laptop:w-[174px] w-[116px]' : 'laptop:w-[75px] w-[50px]'}`}\n imgClassName=\"\"\n source={delivery?.img?.url}\n alt={delivery?.img?.alt || ''}\n />\n </div>\n )\n })}\n </div>\n ) \n }\n \n {\n item?.service && (\n <div className=' desktop:gap-[24px] gap-[8px] tablet:gap-[12px] laptop:gap-[28px] grid l-tablet:grid-cols-2 tablet:flex flex-wrap desktop:grid-cols-4 items-center justify-center'>\n {item?.service?.map((service, ind)=>{\n // \u5224\u65AD\uFF1A\u53EA\u5BF9\u7B2C\u4E94\u6761\uFF08index === 4\uFF09\u5E94\u7528\u54CD\u5E94\u5F0F\u663E\u793A/\u9690\u85CF\n const isFifth = ind === 4;\n return (\n <div key={ind} className={`\n flex flex-col items-center desktop:h-full w-[157px] justify-start desktop:w-[81px]\n ${isFifth ? 'laptop:flex desktop:hidden hidden' : ''} \n `}>\n <div className='w-[70px] desktop:w-[54px]'>\n <Picture\n className=\"\"\n imgClassName=\"w-full h-auto\"\n source={service?.img?.url}\n alt={service?.img?.alt || ''}\n />\n </div>\n <div className='text-center'>\n <Text html={service?.title} className=' font-bold text-[12px] mt-[8px] leading-[1.4]' />\n </div>\n </div>\n )\n })}\n </div>\n )\n }\n </div>\n <div className='mt-auto'>\n <Text html={item?.title} className='text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]'/>\n <Text html={item?.desc} className='text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]'/>\n </div>\n \n </div>\n </div>\n ))}\n </div> */}\n </div>\n </>\n )\n}\n\nexport default withLayout(SelectStore)\n"],
5
+ "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAsCI,IAAAI,EAAA,6BArCJC,EAAmB,kCACnBC,EAAsB,iCAEtBC,EAA2B,kCAC3BC,EAA8B,qCA4B9B,MAAMC,EAAeC,GAA2B,CAC9C,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EAEjB,SACE,mBACE,mBAAC,OAAI,UAAU,GACb,mBAAC,OAAI,UAAU,+DACZ,SAAAE,EAAK,IAAI,CAACC,EAAMC,OACf,QAAC,OAEC,UAAU,oLAEV,oBAAC,WACC,UAAU,eACV,aAAa,6BACb,OAAQ,GAAGD,GAAM,KAAK,GAAG,KAAKA,GAAM,QAAQ,GAAG,UAAUA,GAAM,SAAS,GAAG,UAAUA,GAAM,WAAW,GAAG,OAC3G,KACA,QAAC,OAAI,UAAU,oEACb,oBAAC,QACC,KAAMA,GAAM,MACZ,UAAU,0FACZ,KACA,OAAC,QACC,KAAMA,GAAM,KACZ,UAAU,+EACZ,GACF,IAjBKC,CAkBP,CACD,EACH,EAiFF,EACF,CAEJ,EAEA,IAAOb,KAAQ,cAAWO,CAAW",
6
6
  "names": ["SelectStore_exports", "__export", "SelectStore_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_SwiperBox", "import_Styles", "import_components", "SelectStore", "props", "data", "className", "list", "item", "index"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Text as l,Link as r}from"../../../../components/index.js";import{Dialog as g,DialogContent as x}from"../../../../components/dialog";import"react";const b=({data:i,onClose:o,open:a})=>e(g,{open:a,onOpenChange:o,children:t(x,{className:"tablet:max-w-[729px] max-w-[326px] mx-auto w-full border-none overflow-hidden",children:[e(l,{className:"text-[32px] font-bold leading-[1.2] md:text-[20px]",html:i?.title}),t("div",{className:"mt-[16px]",children:[e(l,{className:"text-[20px] font-bold leading-[1.2] md:text-[16px]",html:i?.shippingCoupon?.title}),e("ul",{className:"mt-3 grid grid-flow-row gap-[4px] font-semibold leading-[1.4]",children:i?.shippingCoupon?.list.map((p,s)=>t("li",{className:"text-[16px]",children:[t("span",{children:[s+1,"."]}),e("span",{className:"ml-[4px]",children:p})]},s))}),t("div",{className:"mt-[24px] md:mt-[16px]",children:[e(l,{className:"text-[20px] font-bold leading-[1.2] md:text-[16px]",html:i?.shippingService?.title}),e("div",{className:"mt-[12px] grid w-full grid-cols-2 gap-[12px] md:grid-cols-1",children:i?.shippingService?.list.map((p,s)=>t("div",{className:"rounded-[12px] bg-[#F5F5F7] p-[16px] md:p-[12px]",children:[e(l,{as:"p",className:"text-[20px] font-bold leading-[1.2] md:text-[16px]",html:p.title}),e("div",{className:"mt-[12px] grid grid-flow-row gap-[4px]",children:p.list.map((n,m)=>e(l,{as:"p",className:"text-[16px] font-semibold leading-[1.2]",children:n},m))})]},s))})]}),e(r,{className:"mt-[16px] block text-[16px] font-semibold leading-[1.2] underline",href:`${i?.terms?.url}`,children:i?.terms?.text})]})]})});export{b as ShippingPolicyModal};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Text as l,Link as r}from"../../../../components/index.js";import{Dialog as g,DialogContent as d}from"../../../../components/dialog";import"react";const b=({data:i,onClose:o,open:a})=>e(g,{open:a,onOpenChange:o,children:t(d,{className:"tablet:max-w-[729px] rounded-lg max-w-[326px] mx-auto w-full border-none overflow-hidden",children:[e(l,{className:"text-[32px] font-bold leading-[1.2] md:text-[20px]",html:i?.title}),t("div",{className:"mt-[16px]",children:[e(l,{className:"text-[20px] font-bold leading-[1.2] md:text-[16px]",html:i?.shippingCoupon?.title}),e("ul",{className:"mt-3 grid grid-flow-row gap-[4px] font-semibold leading-[1.4]",children:i?.shippingCoupon?.list.map((p,s)=>t("li",{className:"text-[16px]",children:[t("span",{children:[s+1,"."]}),e("span",{className:"ml-[4px]",children:p})]},s))}),t("div",{className:"mt-[24px] md:mt-[16px]",children:[e(l,{className:"text-[20px] font-bold leading-[1.2] md:text-[16px]",html:i?.shippingService?.title}),e("div",{className:"mt-[12px] grid w-full grid-cols-2 gap-[12px] md:grid-cols-1",children:i?.shippingService?.list.map((p,s)=>t("div",{className:"rounded-[12px] bg-[#F5F5F7] p-[16px] md:p-[12px]",children:[e(l,{as:"p",className:"text-[20px] font-bold leading-[1.2] md:text-[16px]",html:p.title}),e("div",{className:"mt-[12px] grid grid-flow-row gap-[4px]",children:p.list.map((n,m)=>e(l,{as:"p",className:"text-[16px] font-semibold leading-[1.2]",children:n},m))})]},s))})]}),e(r,{className:"mt-[16px] block text-[16px] font-semibold leading-[1.2] underline",href:`${i?.terms?.url}`,children:i?.terms?.text})]})]})});export{b as ShippingPolicyModal};
2
2
  //# sourceMappingURL=ShippingPolicyModal.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.tsx"],
4
- "sourcesContent": ["import { Text, Link } from '../../../../components/index.js'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from '../../../../components/dialog'\nimport { useMemo } from 'react'\n\ninterface Terms {\n text: string\n url: string\n}\n\ninterface List {\n title: string\n list: string[]\n}\n\ninterface ShippingService {\n title: string\n list: List[]\n}\n\ninterface Data {\n title: string\n shippingCoupon: List\n shippingService: ShippingService\n terms: Terms\n}\n\ninterface Props {\n data: Data\n onClose: () => void\n open: boolean\n}\n\nexport const ShippingPolicyModal = ({ data, onClose, open }: Props) => {\n return (\n <Dialog open={open} onOpenChange={onClose}>\n <DialogContent className=\"tablet:max-w-[729px] max-w-[326px] mx-auto w-full border-none overflow-hidden\">\n <Text className=\"text-[32px] font-bold leading-[1.2] md:text-[20px]\" html={data?.title} />\n <div className=\"mt-[16px]\">\n <Text className=\"text-[20px] font-bold leading-[1.2] md:text-[16px]\" html={data?.shippingCoupon?.title} />\n <ul className=\"mt-3 grid grid-flow-row gap-[4px] font-semibold leading-[1.4]\">\n {data?.shippingCoupon?.list.map((item, index) => (\n <li className=\"text-[16px]\" key={index}>\n <span>{index + 1}.</span>\n <span className=\"ml-[4px]\">{item}</span>\n </li>\n ))}\n </ul>\n <div className=\"mt-[24px] md:mt-[16px]\">\n <Text className=\"text-[20px] font-bold leading-[1.2] md:text-[16px]\" html={data?.shippingService?.title} />\n <div className=\"mt-[12px] grid w-full grid-cols-2 gap-[12px] md:grid-cols-1\">\n {data?.shippingService?.list.map((item, index) => (\n <div className=\"rounded-[12px] bg-[#F5F5F7] p-[16px] md:p-[12px]\" key={index}>\n <Text as=\"p\" className=\"text-[20px] font-bold leading-[1.2] md:text-[16px]\" html={item.title} />\n <div className=\"mt-[12px] grid grid-flow-row gap-[4px]\">\n {item.list.map((subItem, subIndex) => (\n <Text as=\"p\" className=\"text-[16px] font-semibold leading-[1.2]\" key={subIndex}>\n {subItem}\n </Text>\n ))}\n </div>\n </div>\n ))}\n </div>\n </div>\n\n <Link\n className=\"mt-[16px] block text-[16px] font-semibold leading-[1.2] underline\"\n href={`${data?.terms?.url}`}\n >\n {data?.terms?.text}\n </Link>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n"],
5
- "mappings": "AAoCQ,cAAAA,EAMQ,QAAAC,MANR,oBApCR,OAAS,QAAAC,EAAM,QAAAC,MAAY,kCAC3B,OAAS,UAAAC,EAAQ,iBAAAC,MAA+D,gCAChF,MAAwB,QA8BjB,MAAMC,EAAsB,CAAC,CAAE,KAAAC,EAAM,QAAAC,EAAS,KAAAC,CAAK,IAEtDT,EAACI,EAAA,CAAO,KAAMK,EAAM,aAAcD,EAChC,SAAAP,EAACI,EAAA,CAAc,UAAU,gFACvB,UAAAL,EAACE,EAAA,CAAK,UAAU,qDAAqD,KAAMK,GAAM,MAAO,EACxFN,EAAC,OAAI,UAAU,YACb,UAAAD,EAACE,EAAA,CAAK,UAAU,qDAAqD,KAAMK,GAAM,gBAAgB,MAAO,EACxGP,EAAC,MAAG,UAAU,gEACX,SAAAO,GAAM,gBAAgB,KAAK,IAAI,CAACG,EAAMC,IACrCV,EAAC,MAAG,UAAU,cACZ,UAAAA,EAAC,QAAM,UAAAU,EAAQ,EAAE,KAAC,EAClBX,EAAC,QAAK,UAAU,WAAY,SAAAU,EAAK,IAFFC,CAGjC,CACD,EACH,EACAV,EAAC,OAAI,UAAU,yBACb,UAAAD,EAACE,EAAA,CAAK,UAAU,qDAAqD,KAAMK,GAAM,iBAAiB,MAAO,EACzGP,EAAC,OAAI,UAAU,8DACZ,SAAAO,GAAM,iBAAiB,KAAK,IAAI,CAACG,EAAMC,IACtCV,EAAC,OAAI,UAAU,mDACb,UAAAD,EAACE,EAAA,CAAK,GAAG,IAAI,UAAU,qDAAqD,KAAMQ,EAAK,MAAO,EAC9FV,EAAC,OAAI,UAAU,yCACZ,SAAAU,EAAK,KAAK,IAAI,CAACE,EAASC,IACvBb,EAACE,EAAA,CAAK,GAAG,IAAI,UAAU,0CACpB,SAAAU,GADmEC,CAEtE,CACD,EACH,IARqEF,CASvE,CACD,EACH,GACF,EAEAX,EAACG,EAAA,CACC,UAAU,oEACV,KAAM,GAAGI,GAAM,OAAO,GAAG,GAExB,SAAAA,GAAM,OAAO,KAChB,GACF,GACF,EACF",
4
+ "sourcesContent": ["import { Text, Link } from '../../../../components/index.js'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from '../../../../components/dialog'\nimport { useMemo } from 'react'\n\ninterface Terms {\n text: string\n url: string\n}\n\ninterface List {\n title: string\n list: string[]\n}\n\ninterface ShippingService {\n title: string\n list: List[]\n}\n\ninterface Data {\n title: string\n shippingCoupon: List\n shippingService: ShippingService\n terms: Terms\n}\n\ninterface Props {\n data: Data\n onClose: () => void\n open: boolean\n}\n\nexport const ShippingPolicyModal = ({ data, onClose, open }: Props) => {\n return (\n <Dialog open={open} onOpenChange={onClose}>\n <DialogContent className=\"tablet:max-w-[729px] rounded-lg max-w-[326px] mx-auto w-full border-none overflow-hidden\">\n <Text className=\"text-[32px] font-bold leading-[1.2] md:text-[20px]\" html={data?.title} />\n <div className=\"mt-[16px]\">\n <Text className=\"text-[20px] font-bold leading-[1.2] md:text-[16px]\" html={data?.shippingCoupon?.title} />\n <ul className=\"mt-3 grid grid-flow-row gap-[4px] font-semibold leading-[1.4]\">\n {data?.shippingCoupon?.list.map((item, index) => (\n <li className=\"text-[16px]\" key={index}>\n <span>{index + 1}.</span>\n <span className=\"ml-[4px]\">{item}</span>\n </li>\n ))}\n </ul>\n <div className=\"mt-[24px] md:mt-[16px]\">\n <Text className=\"text-[20px] font-bold leading-[1.2] md:text-[16px]\" html={data?.shippingService?.title} />\n <div className=\"mt-[12px] grid w-full grid-cols-2 gap-[12px] md:grid-cols-1\">\n {data?.shippingService?.list.map((item, index) => (\n <div className=\"rounded-[12px] bg-[#F5F5F7] p-[16px] md:p-[12px]\" key={index}>\n <Text as=\"p\" className=\"text-[20px] font-bold leading-[1.2] md:text-[16px]\" html={item.title} />\n <div className=\"mt-[12px] grid grid-flow-row gap-[4px]\">\n {item.list.map((subItem, subIndex) => (\n <Text as=\"p\" className=\"text-[16px] font-semibold leading-[1.2]\" key={subIndex}>\n {subItem}\n </Text>\n ))}\n </div>\n </div>\n ))}\n </div>\n </div>\n\n <Link\n className=\"mt-[16px] block text-[16px] font-semibold leading-[1.2] underline\"\n href={`${data?.terms?.url}`}\n >\n {data?.terms?.text}\n </Link>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n"],
5
+ "mappings": "AAoCQ,cAAAA,EAMQ,QAAAC,MANR,oBApCR,OAAS,QAAAC,EAAM,QAAAC,MAAY,kCAC3B,OAAS,UAAAC,EAAQ,iBAAAC,MAA+D,gCAChF,MAAwB,QA8BjB,MAAMC,EAAsB,CAAC,CAAE,KAAAC,EAAM,QAAAC,EAAS,KAAAC,CAAK,IAEtDT,EAACI,EAAA,CAAO,KAAMK,EAAM,aAAcD,EAChC,SAAAP,EAACI,EAAA,CAAc,UAAU,2FACvB,UAAAL,EAACE,EAAA,CAAK,UAAU,qDAAqD,KAAMK,GAAM,MAAO,EACxFN,EAAC,OAAI,UAAU,YACb,UAAAD,EAACE,EAAA,CAAK,UAAU,qDAAqD,KAAMK,GAAM,gBAAgB,MAAO,EACxGP,EAAC,MAAG,UAAU,gEACX,SAAAO,GAAM,gBAAgB,KAAK,IAAI,CAACG,EAAMC,IACrCV,EAAC,MAAG,UAAU,cACZ,UAAAA,EAAC,QAAM,UAAAU,EAAQ,EAAE,KAAC,EAClBX,EAAC,QAAK,UAAU,WAAY,SAAAU,EAAK,IAFFC,CAGjC,CACD,EACH,EACAV,EAAC,OAAI,UAAU,yBACb,UAAAD,EAACE,EAAA,CAAK,UAAU,qDAAqD,KAAMK,GAAM,iBAAiB,MAAO,EACzGP,EAAC,OAAI,UAAU,8DACZ,SAAAO,GAAM,iBAAiB,KAAK,IAAI,CAACG,EAAMC,IACtCV,EAAC,OAAI,UAAU,mDACb,UAAAD,EAACE,EAAA,CAAK,GAAG,IAAI,UAAU,qDAAqD,KAAMQ,EAAK,MAAO,EAC9FV,EAAC,OAAI,UAAU,yCACZ,SAAAU,EAAK,KAAK,IAAI,CAACE,EAASC,IACvBb,EAACE,EAAA,CAAK,GAAG,IAAI,UAAU,0CACpB,SAAAU,GADmEC,CAEtE,CACD,EACH,IARqEF,CASvE,CACD,EACH,GACF,EAEAX,EAACG,EAAA,CACC,UAAU,oEACV,KAAM,GAAGI,GAAM,OAAO,GAAG,GAExB,SAAAA,GAAM,OAAO,KAChB,GACF,GACF,EACF",
6
6
  "names": ["jsx", "jsxs", "Text", "Link", "Dialog", "DialogContent", "ShippingPolicyModal", "data", "onClose", "open", "item", "index", "subItem", "subIndex"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{jsx as o,jsxs as d}from"react/jsx-runtime";import{Text as l,Button as c,Container as v}from"../../../../../components";import{useAiuiContext as N}from"../../../../AiuiProvider/index.js";import{useBizProductContext as k}from"../../../BizProductProvider.js";import{useMemo as s}from"react";import{formatPrice as i}from"../../../utils";import{replaceTemplate as u}from"../../../utils/textFormat";const w=()=>{const{copyWriting:t,locale:a="us"}=N(),{variant:e,finalPrice:x,totalSavings:n,memberFunctionResult:h,isLogin:m,comparePrice:p,onAddToCart:b,onBuyNow:g,savingDetail:r,coupon:S,addToCartLoading:f,buyNowLoading:y,profile:P}=k(),C=s(()=>u(t?.totalSavings||"",{amount:i({amount:n,currencyCode:e.price.currencyCode,locale:a})}),[t?.totalSavings,n,e.price.currencyCode,a]),T=s(()=>u(t?.memberSaving||"",{amount:i({amount:r?.member,currencyCode:e.price.currencyCode,locale:a})}),[t?.memberSaving,r?.member,e.price.currencyCode,a]);return d(v,{childClassName:"tablet:flex tablet:justify-between desktop:px-0 desktop:px-0 tablet:items-center tablet:gap-4",className:"bg-white py-3 border-t border-[#E4E5E6] desktop:border-none",children:[e.availableForSale?d("div",{className:"flex flex-col justify-between desktop:items-end",children:[d("div",{className:"flex items-center gap-1",children:[o(l,{className:"text-xl tablet:text-2xl font-bold !leading-[1.2] desktop:text-xl lg-desktop:text-2xl",html:i({amount:Math.floor(x*100)/100,currencyCode:e.price.currencyCode,locale:a})}),(n>0||r?.member>0&&m)&&o(l,{className:"text-xl tablet:text-2xl font-bold line-through text-[#999] !leading-[1.2] desktop:text-xl lg-desktop:text-2xl",html:i({amount:p,currencyCode:e.price.currencyCode,locale:a})}),r?.member>0&&m&&o(l,{className:"bg-brand-0 font-bold text-white px-1 py-[2px] text-sm rounded",html:t?.memberPrice||"Member Price"})]}),(n>0||r?.member>0&&m)&&o(l,{className:"text-brand-0 text-[18px] desktop:text-end !leading-[1.2] font-bold desktop:text-xl lg-desktop:text-2xl",html:`${C}`})]}):o(l,{className:"text-[20px] font-bold text-[#999999]",html:t?.soldOut??"Sold Out"}),d("div",{className:"flex items-center gap-2 mt-2 tablet:mt-0",children:[o(c,{variant:"secondary",disabled:!e.availableForSale,size:"lg",className:"w-1/2 tablet:w-auto",onClick:()=>b?.(),loading:f,children:t?.addToCart??"Add to Cart"}),o(c,{variant:"primary",disabled:!e.availableForSale,size:"lg",loading:y,className:"w-1/2 tablet:w-auto",onClick:()=>g?.(),children:t?.buyNow??"Buy Now"})]})]})};var M=w;export{M as default};
1
+ import{jsx as o,jsxs as d}from"react/jsx-runtime";import{Text as l,Button as c,Container as v}from"../../../../../components";import{useAiuiContext as N}from"../../../../AiuiProvider/index.js";import{useBizProductContext as k}from"../../../BizProductProvider.js";import{useMemo as s}from"react";import{formatPrice as i}from"../../../utils";import{replaceTemplate as u}from"../../../utils/textFormat";const h=()=>{const{copyWriting:t,locale:a="us"}=N(),{variant:e,finalPrice:x,totalSavings:n,memberFunctionResult:w,isLogin:m,comparePrice:p,onAddToCart:b,onBuyNow:g,savingDetail:r,coupon:S,addToCartLoading:f,buyNowLoading:y,profile:P}=k(),C=s(()=>u(t?.totalSavings||"",{amount:i({amount:n,currencyCode:e.price.currencyCode,locale:a})}),[t?.totalSavings,n,e.price.currencyCode,a]),T=s(()=>u(t?.memberSaving||"",{amount:i({amount:r?.member,currencyCode:e.price.currencyCode,locale:a})}),[t?.memberSaving,r?.member,e.price.currencyCode,a]);return d(v,{childClassName:"tablet:flex tablet:justify-end tablet:gap-8 desktop:px-0 desktop:px-0 tablet:items-center tablet:gap-4",className:"bg-white py-3 border-t border-[#E4E5E6] desktop:border-none",children:[e.availableForSale?d("div",{className:"flex flex-col justify-between desktop:items-end",children:[d("div",{className:"flex items-center gap-1",children:[o(l,{className:"text-xl tablet:text-2xl font-bold !leading-[1.2] desktop:text-xl lg-desktop:text-2xl",html:i({amount:Math.floor(x*100)/100,currencyCode:e.price.currencyCode,locale:a})}),(n>0||r?.member>0&&m)&&o(l,{className:"text-xl tablet:text-2xl font-bold line-through text-[#999] !leading-[1.2] desktop:text-xl lg-desktop:text-2xl",html:i({amount:p,currencyCode:e.price.currencyCode,locale:a})}),r?.member>0&&m&&o(l,{className:"bg-brand-0 font-bold text-white px-1 py-[2px] text-sm rounded",html:t?.memberPrice||"Member Price"})]}),(n>0||r?.member>0&&m)&&o(l,{className:"text-brand-0 text-[18px] desktop:text-end !leading-[1.2] font-bold desktop:text-xl lg-desktop:text-2xl",html:`${C}`})]}):o(l,{className:"text-[20px] font-bold text-[#999999]",html:t?.soldOut??"Sold Out"}),d("div",{className:"flex items-center gap-2 mt-2 tablet:mt-0",children:[o(c,{variant:"secondary",disabled:!e.availableForSale,size:"lg",className:"w-1/2 tablet:w-auto",onClick:()=>b?.(),loading:f,children:t?.addToCart??"Add to Cart"}),o(c,{variant:"primary",disabled:!e.availableForSale,size:"lg",loading:y,className:"w-1/2 tablet:w-auto",onClick:()=>g?.(),children:t?.buyNow??"Buy Now"})]})]})};var M=h;export{M as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/biz-components/Listing/components/PurchaseBar/ProductActions/index.tsx"],
4
- "sourcesContent": ["import { Text, Button, Container } from '../../../../../components'\nimport { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport { useBizProductContext } from '../../../BizProductProvider.js'\nimport { useMemo } from 'react'\nimport { formatPrice } from '../../../utils'\nimport { replaceTemplate } from '../../../utils/textFormat'\n\nconst ProductActions = () => {\n const { copyWriting, locale = 'us' } = useAiuiContext()\n const {\n variant,\n finalPrice,\n totalSavings,\n memberFunctionResult,\n isLogin,\n comparePrice,\n onAddToCart,\n onBuyNow,\n savingDetail,\n coupon,\n addToCartLoading,\n buyNowLoading,\n profile,\n } = useBizProductContext()\n\n const totalSavingsText = useMemo(() => {\n return replaceTemplate(copyWriting?.totalSavings || '', {\n amount: formatPrice({ amount: totalSavings, currencyCode: variant.price.currencyCode, locale }),\n })\n }, [copyWriting?.totalSavings, totalSavings, variant.price.currencyCode, locale])\n\n const memberPriceSaveText = useMemo(() => {\n return replaceTemplate(copyWriting?.memberSaving || '', {\n amount: formatPrice({\n amount: savingDetail?.member,\n currencyCode: variant.price.currencyCode,\n locale,\n }),\n })\n }, [copyWriting?.memberSaving, savingDetail?.member, variant.price.currencyCode, locale])\n\n return (\n <Container\n childClassName=\"tablet:flex tablet:justify-between desktop:px-0 desktop:px-0 tablet:items-center tablet:gap-4\"\n className=\"bg-white py-3 border-t border-[#E4E5E6] desktop:border-none\"\n >\n {variant.availableForSale ? (\n <div className=\"flex flex-col justify-between desktop:items-end\">\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"text-xl tablet:text-2xl font-bold !leading-[1.2] desktop:text-xl lg-desktop:text-2xl\"\n html={formatPrice({\n amount: Math.floor(finalPrice * 100) / 100,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n {(totalSavings > 0 || (savingDetail?.member > 0 && isLogin)) && (\n <Text\n className=\"text-xl tablet:text-2xl font-bold line-through text-[#999] !leading-[1.2] desktop:text-xl lg-desktop:text-2xl\"\n html={formatPrice({\n amount: comparePrice,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n )}\n {savingDetail?.member > 0 && isLogin && (\n <Text\n className=\"bg-brand-0 font-bold text-white px-1 py-[2px] text-sm rounded\"\n html={copyWriting?.memberPrice || 'Member Price'}\n />\n )}\n </div>\n {(totalSavings > 0 || (savingDetail?.member > 0 && isLogin)) && (\n <Text\n className=\"text-brand-0 text-[18px] desktop:text-end !leading-[1.2] font-bold desktop:text-xl lg-desktop:text-2xl\"\n html={`${totalSavingsText}`}\n />\n )}\n </div>\n ) : (\n <Text className=\"text-[20px] font-bold text-[#999999]\" html={copyWriting?.soldOut ?? 'Sold Out'} />\n )}\n <div className=\"flex items-center gap-2 mt-2 tablet:mt-0\">\n <Button\n variant=\"secondary\"\n disabled={!variant.availableForSale}\n size=\"lg\"\n className=\"w-1/2 tablet:w-auto\"\n onClick={() => onAddToCart?.()}\n loading={addToCartLoading}\n >\n {copyWriting?.addToCart ?? 'Add to Cart'}\n </Button>\n <Button\n variant=\"primary\"\n disabled={!variant.availableForSale}\n size=\"lg\"\n loading={buyNowLoading}\n className=\"w-1/2 tablet:w-auto\"\n onClick={() => onBuyNow?.()}\n >\n {copyWriting?.buyNow ?? 'Buy Now'}\n </Button>\n </div>\n </Container>\n )\n}\n\nexport default ProductActions\n"],
5
- "mappings": "AAgDU,OACE,OAAAA,EADF,QAAAC,MAAA,oBAhDV,OAAS,QAAAC,EAAM,UAAAC,EAAQ,aAAAC,MAAiB,4BACxC,OAAS,kBAAAC,MAAsB,oCAC/B,OAAS,wBAAAC,MAA4B,iCACrC,OAAS,WAAAC,MAAe,QACxB,OAAS,eAAAC,MAAmB,iBAC5B,OAAS,mBAAAC,MAAuB,4BAEhC,MAAMC,EAAiB,IAAM,CAC3B,KAAM,CAAE,YAAAC,EAAa,OAAAC,EAAS,IAAK,EAAIP,EAAe,EAChD,CACJ,QAAAQ,EACA,WAAAC,EACA,aAAAC,EACA,qBAAAC,EACA,QAAAC,EACA,aAAAC,EACA,YAAAC,EACA,SAAAC,EACA,aAAAC,EACA,OAAAC,EACA,iBAAAC,EACA,cAAAC,EACA,QAAAC,CACF,EAAInB,EAAqB,EAEnBoB,EAAmBnB,EAAQ,IACxBE,EAAgBE,GAAa,cAAgB,GAAI,CACtD,OAAQH,EAAY,CAAE,OAAQO,EAAc,aAAcF,EAAQ,MAAM,aAAc,OAAAD,CAAO,CAAC,CAChG,CAAC,EACA,CAACD,GAAa,aAAcI,EAAcF,EAAQ,MAAM,aAAcD,CAAM,CAAC,EAE1Ee,EAAsBpB,EAAQ,IAC3BE,EAAgBE,GAAa,cAAgB,GAAI,CACtD,OAAQH,EAAY,CAClB,OAAQa,GAAc,OACtB,aAAcR,EAAQ,MAAM,aAC5B,OAAAD,CACF,CAAC,CACH,CAAC,EACA,CAACD,GAAa,aAAcU,GAAc,OAAQR,EAAQ,MAAM,aAAcD,CAAM,CAAC,EAExF,OACEX,EAACG,EAAA,CACC,eAAe,gGACf,UAAU,8DAET,UAAAS,EAAQ,iBACPZ,EAAC,OAAI,UAAU,kDACb,UAAAA,EAAC,OAAI,UAAU,0BACb,UAAAD,EAACE,EAAA,CACC,UAAU,uFACV,KAAMM,EAAY,CAChB,OAAQ,KAAK,MAAMM,EAAa,GAAG,EAAI,IACvC,aAAcD,EAAQ,MAAM,aAC5B,OAAAD,CACF,CAAC,EACH,GACEG,EAAe,GAAMM,GAAc,OAAS,GAAKJ,IACjDjB,EAACE,EAAA,CACC,UAAU,gHACV,KAAMM,EAAY,CAChB,OAAQU,EACR,aAAcL,EAAQ,MAAM,aAC5B,OAAAD,CACF,CAAC,EACH,EAEDS,GAAc,OAAS,GAAKJ,GAC3BjB,EAACE,EAAA,CACC,UAAU,gEACV,KAAMS,GAAa,aAAe,eACpC,GAEJ,GACEI,EAAe,GAAMM,GAAc,OAAS,GAAKJ,IACjDjB,EAACE,EAAA,CACC,UAAU,yGACV,KAAM,GAAGwB,CAAgB,GAC3B,GAEJ,EAEA1B,EAACE,EAAA,CAAK,UAAU,uCAAuC,KAAMS,GAAa,SAAW,WAAY,EAEnGV,EAAC,OAAI,UAAU,2CACb,UAAAD,EAACG,EAAA,CACC,QAAQ,YACR,SAAU,CAACU,EAAQ,iBACnB,KAAK,KACL,UAAU,sBACV,QAAS,IAAMM,IAAc,EAC7B,QAASI,EAER,SAAAZ,GAAa,WAAa,cAC7B,EACAX,EAACG,EAAA,CACC,QAAQ,UACR,SAAU,CAACU,EAAQ,iBACnB,KAAK,KACL,QAASW,EACT,UAAU,sBACV,QAAS,IAAMJ,IAAW,EAEzB,SAAAT,GAAa,QAAU,UAC1B,GACF,GACF,CAEJ,EAEA,IAAOiB,EAAQlB",
4
+ "sourcesContent": ["import { Text, Button, Container } from '../../../../../components'\nimport { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport { useBizProductContext } from '../../../BizProductProvider.js'\nimport { useMemo } from 'react'\nimport { formatPrice } from '../../../utils'\nimport { replaceTemplate } from '../../../utils/textFormat'\n\nconst ProductActions = () => {\n const { copyWriting, locale = 'us' } = useAiuiContext()\n const {\n variant,\n finalPrice,\n totalSavings,\n memberFunctionResult,\n isLogin,\n comparePrice,\n onAddToCart,\n onBuyNow,\n savingDetail,\n coupon,\n addToCartLoading,\n buyNowLoading,\n profile,\n } = useBizProductContext()\n\n const totalSavingsText = useMemo(() => {\n return replaceTemplate(copyWriting?.totalSavings || '', {\n amount: formatPrice({ amount: totalSavings, currencyCode: variant.price.currencyCode, locale }),\n })\n }, [copyWriting?.totalSavings, totalSavings, variant.price.currencyCode, locale])\n\n const memberPriceSaveText = useMemo(() => {\n return replaceTemplate(copyWriting?.memberSaving || '', {\n amount: formatPrice({\n amount: savingDetail?.member,\n currencyCode: variant.price.currencyCode,\n locale,\n }),\n })\n }, [copyWriting?.memberSaving, savingDetail?.member, variant.price.currencyCode, locale])\n\n return (\n <Container\n childClassName=\"tablet:flex tablet:justify-end tablet:gap-8 desktop:px-0 desktop:px-0 tablet:items-center tablet:gap-4\"\n className=\"bg-white py-3 border-t border-[#E4E5E6] desktop:border-none\"\n >\n {variant.availableForSale ? (\n <div className=\"flex flex-col justify-between desktop:items-end\">\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"text-xl tablet:text-2xl font-bold !leading-[1.2] desktop:text-xl lg-desktop:text-2xl\"\n html={formatPrice({\n amount: Math.floor(finalPrice * 100) / 100,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n {(totalSavings > 0 || (savingDetail?.member > 0 && isLogin)) && (\n <Text\n className=\"text-xl tablet:text-2xl font-bold line-through text-[#999] !leading-[1.2] desktop:text-xl lg-desktop:text-2xl\"\n html={formatPrice({\n amount: comparePrice,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n )}\n {savingDetail?.member > 0 && isLogin && (\n <Text\n className=\"bg-brand-0 font-bold text-white px-1 py-[2px] text-sm rounded\"\n html={copyWriting?.memberPrice || 'Member Price'}\n />\n )}\n </div>\n {(totalSavings > 0 || (savingDetail?.member > 0 && isLogin)) && (\n <Text\n className=\"text-brand-0 text-[18px] desktop:text-end !leading-[1.2] font-bold desktop:text-xl lg-desktop:text-2xl\"\n html={`${totalSavingsText}`}\n />\n )}\n </div>\n ) : (\n <Text className=\"text-[20px] font-bold text-[#999999]\" html={copyWriting?.soldOut ?? 'Sold Out'} />\n )}\n <div className=\"flex items-center gap-2 mt-2 tablet:mt-0\">\n <Button\n variant=\"secondary\"\n disabled={!variant.availableForSale}\n size=\"lg\"\n className=\"w-1/2 tablet:w-auto\"\n onClick={() => onAddToCart?.()}\n loading={addToCartLoading}\n >\n {copyWriting?.addToCart ?? 'Add to Cart'}\n </Button>\n <Button\n variant=\"primary\"\n disabled={!variant.availableForSale}\n size=\"lg\"\n loading={buyNowLoading}\n className=\"w-1/2 tablet:w-auto\"\n onClick={() => onBuyNow?.()}\n >\n {copyWriting?.buyNow ?? 'Buy Now'}\n </Button>\n </div>\n </Container>\n )\n}\n\nexport default ProductActions\n"],
5
+ "mappings": "AAgDU,OACE,OAAAA,EADF,QAAAC,MAAA,oBAhDV,OAAS,QAAAC,EAAM,UAAAC,EAAQ,aAAAC,MAAiB,4BACxC,OAAS,kBAAAC,MAAsB,oCAC/B,OAAS,wBAAAC,MAA4B,iCACrC,OAAS,WAAAC,MAAe,QACxB,OAAS,eAAAC,MAAmB,iBAC5B,OAAS,mBAAAC,MAAuB,4BAEhC,MAAMC,EAAiB,IAAM,CAC3B,KAAM,CAAE,YAAAC,EAAa,OAAAC,EAAS,IAAK,EAAIP,EAAe,EAChD,CACJ,QAAAQ,EACA,WAAAC,EACA,aAAAC,EACA,qBAAAC,EACA,QAAAC,EACA,aAAAC,EACA,YAAAC,EACA,SAAAC,EACA,aAAAC,EACA,OAAAC,EACA,iBAAAC,EACA,cAAAC,EACA,QAAAC,CACF,EAAInB,EAAqB,EAEnBoB,EAAmBnB,EAAQ,IACxBE,EAAgBE,GAAa,cAAgB,GAAI,CACtD,OAAQH,EAAY,CAAE,OAAQO,EAAc,aAAcF,EAAQ,MAAM,aAAc,OAAAD,CAAO,CAAC,CAChG,CAAC,EACA,CAACD,GAAa,aAAcI,EAAcF,EAAQ,MAAM,aAAcD,CAAM,CAAC,EAE1Ee,EAAsBpB,EAAQ,IAC3BE,EAAgBE,GAAa,cAAgB,GAAI,CACtD,OAAQH,EAAY,CAClB,OAAQa,GAAc,OACtB,aAAcR,EAAQ,MAAM,aAC5B,OAAAD,CACF,CAAC,CACH,CAAC,EACA,CAACD,GAAa,aAAcU,GAAc,OAAQR,EAAQ,MAAM,aAAcD,CAAM,CAAC,EAExF,OACEX,EAACG,EAAA,CACC,eAAe,yGACf,UAAU,8DAET,UAAAS,EAAQ,iBACPZ,EAAC,OAAI,UAAU,kDACb,UAAAA,EAAC,OAAI,UAAU,0BACb,UAAAD,EAACE,EAAA,CACC,UAAU,uFACV,KAAMM,EAAY,CAChB,OAAQ,KAAK,MAAMM,EAAa,GAAG,EAAI,IACvC,aAAcD,EAAQ,MAAM,aAC5B,OAAAD,CACF,CAAC,EACH,GACEG,EAAe,GAAMM,GAAc,OAAS,GAAKJ,IACjDjB,EAACE,EAAA,CACC,UAAU,gHACV,KAAMM,EAAY,CAChB,OAAQU,EACR,aAAcL,EAAQ,MAAM,aAC5B,OAAAD,CACF,CAAC,EACH,EAEDS,GAAc,OAAS,GAAKJ,GAC3BjB,EAACE,EAAA,CACC,UAAU,gEACV,KAAMS,GAAa,aAAe,eACpC,GAEJ,GACEI,EAAe,GAAMM,GAAc,OAAS,GAAKJ,IACjDjB,EAACE,EAAA,CACC,UAAU,yGACV,KAAM,GAAGwB,CAAgB,GAC3B,GAEJ,EAEA1B,EAACE,EAAA,CAAK,UAAU,uCAAuC,KAAMS,GAAa,SAAW,WAAY,EAEnGV,EAAC,OAAI,UAAU,2CACb,UAAAD,EAACG,EAAA,CACC,QAAQ,YACR,SAAU,CAACU,EAAQ,iBACnB,KAAK,KACL,UAAU,sBACV,QAAS,IAAMM,IAAc,EAC7B,QAASI,EAER,SAAAZ,GAAa,WAAa,cAC7B,EACAX,EAACG,EAAA,CACC,QAAQ,UACR,SAAU,CAACU,EAAQ,iBACnB,KAAK,KACL,QAASW,EACT,UAAU,sBACV,QAAS,IAAMJ,IAAW,EAEzB,SAAAT,GAAa,QAAU,UAC1B,GACF,GACF,CAEJ,EAEA,IAAOiB,EAAQlB",
6
6
  "names": ["jsx", "jsxs", "Text", "Button", "Container", "useAiuiContext", "useBizProductContext", "useMemo", "formatPrice", "replaceTemplate", "ProductActions", "copyWriting", "locale", "variant", "finalPrice", "totalSavings", "memberFunctionResult", "isLogin", "comparePrice", "onAddToCart", "onBuyNow", "savingDetail", "coupon", "addToCartLoading", "buyNowLoading", "profile", "totalSavingsText", "memberPriceSaveText", "ProductActions_default"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{Fragment as c,jsx as e,jsxs as p}from"react/jsx-runtime";import"../../helpers/utils.js";import"../SwiperBox/index.js";import{withLayout as i}from"../../shared/Styles.js";import{Picture as m,Text as l}from"../../components/index.js";const d=o=>{const{data:a,className:g}=o,{list:s}=a;return e(c,{children:e("div",{className:"",children:e("div",{className:"grid laptop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4",children:s.map((t,r)=>p("div",{className:"relative rounded-2xl lg-desktop:aspect-[543/320] laptop:aspect-[440/280] tablet:aspect-[346/240] aspect-[358/240] overflow-hidden",children:[e(m,{className:"w-full h-full object-cover",imgClassName:"w-full h-full object-cover",source:`${t?.img?.url}, ${t?.padImg?.url} 1439, ${t?.miniImg?.url} 1023, ${t?.mobileImg?.url} 767`}),p("div",{className:"laptop:px-6 laptop:pb-6 lg-desktop:px-8 lg-desktop:pb-8 px-4 pb-4",children:[e(l,{html:t?.title,className:"text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]"}),e(l,{html:t?.desc,className:"text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]"})]})]},r))})})})};var S=i(d);export{S as default};
1
+ "use client";import{Fragment as d,jsx as t,jsxs as p}from"react/jsx-runtime";import"../../helpers/utils.js";import"../SwiperBox/index.js";import{withLayout as c}from"../../shared/Styles.js";import{Picture as i,Text as l}from"../../components/index.js";const m=o=>{const{data:s,className:g}=o,{list:a}=s;return t(d,{children:t("div",{className:"",children:t("div",{className:"grid laptop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4",children:a.map((e,r)=>p("div",{className:"relative rounded-2xl lg-desktop:aspect-[543/320] laptop:aspect-[440/280] tablet:aspect-[346/240] aspect-[358/240] overflow-hidden flex flex-col bg-[#EAEAEC] select-store-wrapper",children:[t(i,{className:"object-cover",imgClassName:"w-full h-full object-cover",source:`${e?.img?.url}, ${e?.padImg?.url} 1439, ${e?.miniImg?.url} 1023, ${e?.mobileImg?.url} 767`}),p("div",{className:"laptop:px-6 laptop:pb-6 lg-desktop:px-8 lg-desktop:pb-8 px-4 pb-4",children:[t(l,{html:e?.title,className:"text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]"}),t(l,{html:e?.desc,className:"text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]"})]})]},r))})})})};var I=c(m);export{I as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/SelectStore/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type SelectStoreDataType = {\n title: string\n desc: string\n img: Img\n mobileImg: Img\n padImg: Img\n miniImg: Img\n // pay: {\n // img: Img\n // }[]\n // delivery: {\n // img: Img\n // }[]\n // service: {\n // title: string\n // img: Img\n // }[]\n}\n\ntype SelectStoreType = {\n data: {\n list: SelectStoreDataType[]\n }\n className?: string\n}\n\nconst SelectStore = (props: SelectStoreType) => {\n const { data, className } = props\n const { list } = data\n // const number = list?.[2]?.service?.length || 0\n return (\n <>\n <div className=\"\">\n <div className=\"grid laptop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4\">\n {list.map((item, index) => (\n <div\n key={index}\n className=\"relative rounded-2xl lg-desktop:aspect-[543/320] laptop:aspect-[440/280] tablet:aspect-[346/240] aspect-[358/240] overflow-hidden\"\n >\n <Picture\n className=\"w-full h-full object-cover\"\n imgClassName=\"w-full h-full object-cover\"\n source={`${item?.img?.url}, ${item?.padImg?.url} 1439, ${item?.miniImg?.url} 1023, ${item?.mobileImg?.url} 767`}\n />\n <div className=\"laptop:px-6 laptop:pb-6 lg-desktop:px-8 lg-desktop:pb-8 px-4 pb-4\">\n <Text\n html={item?.title}\n className=\"text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]\"\n />\n <Text\n html={item?.desc}\n className=\"text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]\"\n />\n </div>\n </div>\n ))}\n </div>\n {/* <div className='grid desktop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4'>\n {list.map((item, index) => (\n <div key={index} className='bg-[#EAEAEC] rounded-2xl min-h-[240px] laptop:min-h-[280px] lg-desktop:min-h-[320px]'>\n <div className='flex flex-col laptop:p-[24px] lg-desktop:p-[32px] p-[16px] justify-start h-full'>\n <div className=\"flex flex-col justify-center flex-1\">\n \n {item?.pay && (\n <div className='flex gap-[16px] flex-wrap items-center justify-center laptop:gap-[24px]'>\n {item?.pay?.map((pay, ind)=>{\n return (\n <div key={ind} className='laptop:w-[60px] w-[48px]'>\n <Picture\n className=\" w-full\"\n imgClassName=\"\"\n source={pay?.img?.url}\n alt={pay?.img?.alt || ''}\n />\n </div>\n )\n })}\n </div>\n )}\n \n {\n item?.delivery && (\n <div className='flex gap-[24px] items-center justify-center'>\n {item?.delivery?.map((delivery, ind)=>{\n return (\n <div key={ind} className=''>\n <Picture\n className={` ${ind === 0 ? 'laptop:w-[174px] w-[116px]' : 'laptop:w-[75px] w-[50px]'}`}\n imgClassName=\"\"\n source={delivery?.img?.url}\n alt={delivery?.img?.alt || ''}\n />\n </div>\n )\n })}\n </div>\n ) \n }\n \n {\n item?.service && (\n <div className=' desktop:gap-[24px] gap-[8px] tablet:gap-[12px] laptop:gap-[28px] grid l-tablet:grid-cols-2 tablet:flex flex-wrap desktop:grid-cols-4 items-center justify-center'>\n {item?.service?.map((service, ind)=>{\n // \u5224\u65AD\uFF1A\u53EA\u5BF9\u7B2C\u4E94\u6761\uFF08index === 4\uFF09\u5E94\u7528\u54CD\u5E94\u5F0F\u663E\u793A/\u9690\u85CF\n const isFifth = ind === 4;\n return (\n <div key={ind} className={`\n flex flex-col items-center desktop:h-full w-[157px] justify-start desktop:w-[81px]\n ${isFifth ? 'laptop:flex desktop:hidden hidden' : ''} \n `}>\n <div className='w-[70px] desktop:w-[54px]'>\n <Picture\n className=\"\"\n imgClassName=\"w-full h-auto\"\n source={service?.img?.url}\n alt={service?.img?.alt || ''}\n />\n </div>\n <div className='text-center'>\n <Text html={service?.title} className=' font-bold text-[12px] mt-[8px] leading-[1.4]' />\n </div>\n </div>\n )\n })}\n </div>\n )\n }\n </div>\n <div className='mt-auto'>\n <Text html={item?.title} className='text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]'/>\n <Text html={item?.desc} className='text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]'/>\n </div>\n \n </div>\n </div>\n ))}\n </div> */}\n </div>\n </>\n )\n}\n\nexport default withLayout(SelectStore)\n"],
5
- "mappings": "aAsCI,mBAAAA,EAQU,OAAAC,EAKA,QAAAC,MAbV,oBArCJ,MAAmB,yBACnB,MAAsB,wBAEtB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BA4B9B,MAAMC,EAAeC,GAA2B,CAC9C,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EAEjB,OACEP,EAAAD,EAAA,CACE,SAAAC,EAAC,OAAI,UAAU,GACb,SAAAA,EAAC,OAAI,UAAU,+DACZ,SAAAS,EAAK,IAAI,CAACC,EAAMC,IACfV,EAAC,OAEC,UAAU,oIAEV,UAAAD,EAACG,EAAA,CACC,UAAU,6BACV,aAAa,6BACb,OAAQ,GAAGO,GAAM,KAAK,GAAG,KAAKA,GAAM,QAAQ,GAAG,UAAUA,GAAM,SAAS,GAAG,UAAUA,GAAM,WAAW,GAAG,OAC3G,EACAT,EAAC,OAAI,UAAU,oEACb,UAAAD,EAACI,EAAA,CACC,KAAMM,GAAM,MACZ,UAAU,0FACZ,EACAV,EAACI,EAAA,CACC,KAAMM,GAAM,KACZ,UAAU,+EACZ,GACF,IAjBKC,CAkBP,CACD,EACH,EAiFF,EACF,CAEJ,EAEA,IAAOC,EAAQV,EAAWG,CAAW",
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type SelectStoreDataType = {\n title: string\n desc: string\n img: Img\n mobileImg: Img\n padImg: Img\n miniImg: Img\n // pay: {\n // img: Img\n // }[]\n // delivery: {\n // img: Img\n // }[]\n // service: {\n // title: string\n // img: Img\n // }[]\n}\n\ntype SelectStoreType = {\n data: {\n list: SelectStoreDataType[]\n }\n className?: string\n}\n\nconst SelectStore = (props: SelectStoreType) => {\n const { data, className } = props\n const { list } = data\n // const number = list?.[2]?.service?.length || 0\n return (\n <>\n <div className=\"\">\n <div className=\"grid laptop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4\">\n {list.map((item, index) => (\n <div\n key={index}\n className=\"relative rounded-2xl lg-desktop:aspect-[543/320] laptop:aspect-[440/280] tablet:aspect-[346/240] aspect-[358/240] overflow-hidden flex flex-col bg-[#EAEAEC] select-store-wrapper\"\n >\n <Picture\n className=\"object-cover\"\n imgClassName=\"w-full h-full object-cover\"\n source={`${item?.img?.url}, ${item?.padImg?.url} 1439, ${item?.miniImg?.url} 1023, ${item?.mobileImg?.url} 767`}\n />\n <div className=\"laptop:px-6 laptop:pb-6 lg-desktop:px-8 lg-desktop:pb-8 px-4 pb-4\">\n <Text\n html={item?.title}\n className=\"text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]\"\n />\n <Text\n html={item?.desc}\n className=\"text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]\"\n />\n </div>\n </div>\n ))}\n </div>\n {/* <div className='grid desktop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4'>\n {list.map((item, index) => (\n <div key={index} className='bg-[#EAEAEC] rounded-2xl min-h-[240px] laptop:min-h-[280px] lg-desktop:min-h-[320px]'>\n <div className='flex flex-col laptop:p-[24px] lg-desktop:p-[32px] p-[16px] justify-start h-full'>\n <div className=\"flex flex-col justify-center flex-1\">\n \n {item?.pay && (\n <div className='flex gap-[16px] flex-wrap items-center justify-center laptop:gap-[24px]'>\n {item?.pay?.map((pay, ind)=>{\n return (\n <div key={ind} className='laptop:w-[60px] w-[48px]'>\n <Picture\n className=\" w-full\"\n imgClassName=\"\"\n source={pay?.img?.url}\n alt={pay?.img?.alt || ''}\n />\n </div>\n )\n })}\n </div>\n )}\n \n {\n item?.delivery && (\n <div className='flex gap-[24px] items-center justify-center'>\n {item?.delivery?.map((delivery, ind)=>{\n return (\n <div key={ind} className=''>\n <Picture\n className={` ${ind === 0 ? 'laptop:w-[174px] w-[116px]' : 'laptop:w-[75px] w-[50px]'}`}\n imgClassName=\"\"\n source={delivery?.img?.url}\n alt={delivery?.img?.alt || ''}\n />\n </div>\n )\n })}\n </div>\n ) \n }\n \n {\n item?.service && (\n <div className=' desktop:gap-[24px] gap-[8px] tablet:gap-[12px] laptop:gap-[28px] grid l-tablet:grid-cols-2 tablet:flex flex-wrap desktop:grid-cols-4 items-center justify-center'>\n {item?.service?.map((service, ind)=>{\n // \u5224\u65AD\uFF1A\u53EA\u5BF9\u7B2C\u4E94\u6761\uFF08index === 4\uFF09\u5E94\u7528\u54CD\u5E94\u5F0F\u663E\u793A/\u9690\u85CF\n const isFifth = ind === 4;\n return (\n <div key={ind} className={`\n flex flex-col items-center desktop:h-full w-[157px] justify-start desktop:w-[81px]\n ${isFifth ? 'laptop:flex desktop:hidden hidden' : ''} \n `}>\n <div className='w-[70px] desktop:w-[54px]'>\n <Picture\n className=\"\"\n imgClassName=\"w-full h-auto\"\n source={service?.img?.url}\n alt={service?.img?.alt || ''}\n />\n </div>\n <div className='text-center'>\n <Text html={service?.title} className=' font-bold text-[12px] mt-[8px] leading-[1.4]' />\n </div>\n </div>\n )\n })}\n </div>\n )\n }\n </div>\n <div className='mt-auto'>\n <Text html={item?.title} className='text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]'/>\n <Text html={item?.desc} className='text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]'/>\n </div>\n \n </div>\n </div>\n ))}\n </div> */}\n </div>\n </>\n )\n}\n\nexport default withLayout(SelectStore)\n"],
5
+ "mappings": "aAsCI,mBAAAA,EAQU,OAAAC,EAKA,QAAAC,MAbV,oBArCJ,MAAmB,yBACnB,MAAsB,wBAEtB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BA4B9B,MAAMC,EAAeC,GAA2B,CAC9C,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EAEjB,OACEP,EAAAD,EAAA,CACE,SAAAC,EAAC,OAAI,UAAU,GACb,SAAAA,EAAC,OAAI,UAAU,+DACZ,SAAAS,EAAK,IAAI,CAACC,EAAMC,IACfV,EAAC,OAEC,UAAU,oLAEV,UAAAD,EAACG,EAAA,CACC,UAAU,eACV,aAAa,6BACb,OAAQ,GAAGO,GAAM,KAAK,GAAG,KAAKA,GAAM,QAAQ,GAAG,UAAUA,GAAM,SAAS,GAAG,UAAUA,GAAM,WAAW,GAAG,OAC3G,EACAT,EAAC,OAAI,UAAU,oEACb,UAAAD,EAACI,EAAA,CACC,KAAMM,GAAM,MACZ,UAAU,0FACZ,EACAV,EAACI,EAAA,CACC,KAAMM,GAAM,KACZ,UAAU,+EACZ,GACF,IAjBKC,CAkBP,CACD,EACH,EAiFF,EACF,CAEJ,EAEA,IAAOC,EAAQV,EAAWG,CAAW",
6
6
  "names": ["Fragment", "jsx", "jsxs", "withLayout", "Picture", "Text", "SelectStore", "props", "data", "className", "list", "item", "index", "SelectStore_default"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anker-in/headless-ui",
3
- "version": "1.0.26-alpha.1763452467347",
3
+ "version": "1.0.26-alpha.1763519122486",
4
4
  "type": "commonjs",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/cjs/index.d.ts",