@dcl/shop 1.2.1-31142410827.commit-447715b → 1.3.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/_assets/{Activity-CxjV6VXk.js → Activity-ew3XpoT3.js} +4 -4
- package/_assets/{AnimatedBackground-BiXIwT8i.js → AnimatedBackground-D_nEuM-e.js} +1 -1
- package/_assets/{Assets-DVK807CG.js → Assets-cBlMqNjz.js} +18 -18
- package/_assets/{Assets.styles-A3yRI2MU.js → Assets.styles-CLwfDCDf.js} +1 -1
- package/_assets/{Authorizations-D1FoQR5j.js → Authorizations-Cs0nL4Oz.js} +3 -3
- package/_assets/Cart-BO4t_lkf.js +696 -0
- package/_assets/{CircularProgress-D5sNhvlC.js → CircularProgress-GqV7M35A.js} +4 -4
- package/_assets/{Collection-Bqw8AoVr.js → Collection-dJYcennk.js} +7 -7
- package/_assets/CollectionCarousel-uJ5UjL8j.js +872 -0
- package/_assets/{Confetti-CDwPqeLK.js → Confetti-CFn9Pw72.js} +1 -1
- package/_assets/{Creator-6eREKFWS.js → Creator-CuGxdrmY.js} +23 -23
- package/_assets/{ErrorNotice-BQwK_TDE.js → ErrorNotice-CJ7LbSaM.js} +1 -1
- package/_assets/{ExchangeController-BX6K_R7F.js → ExchangeController-CwGAtelJ.js} +1 -1
- package/_assets/{Faq-D_JBmT_h.js → Faq-CDhDmUOq.js} +1 -1
- package/_assets/{GetCredits-Q0Mgpypn.js → GetCredits-1I-xEtGF.js} +18 -18
- package/_assets/{Grow-DXIhfb0h.js → Grow-CVnVH5HV.js} +1 -1
- package/_assets/{HelpersUtil-BTJgul2J.js → HelpersUtil-DeEtn4Uv.js} +1 -1
- package/_assets/ItemDetail-R2KchS-D.js +3577 -0
- package/_assets/LazyEmoteControls-C8q58ZLn.js +2 -0
- package/_assets/{LoadMore-D20OD6Vd.js → LoadMore-CRwBs35r.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-DGbgCot9.js → ManaPricingBanner.styles-BlUs3NYz.js} +1 -1
- package/_assets/{MyAssets-D-pR6nEY.js → MyAssets-Crv1OZqH.js} +5 -5
- package/_assets/{MyFavorites-BZJTE-15.js → MyFavorites-BsDoGy_0.js} +1 -1
- package/_assets/{NotFound-CY50b1nf.js → NotFound-CTrYO3ch.js} +1 -1
- package/_assets/{NotificationsBell-B4g5IIot.js → NotificationsBell-DRGgz2iS.js} +1 -1
- package/_assets/{OutfitDetail-BVF3gVX4.js → OutfitDetail-PIgUTZD2.js} +13 -13
- package/_assets/{OutfitPreview-BH8Vtdqe.js → OutfitPreview-B7Y1-68b.js} +2 -2
- package/_assets/{OutfitStudio-CkkYfM7v.js → OutfitStudio-Bsv8_JeA.js} +11 -11
- package/_assets/{StoreSettings-ByjR6E4Q.js → StoreSettings-BH1LqeM8.js} +5 -5
- package/_assets/{Success-ChdN3XnW.js → Success-C0JqrNNn.js} +4 -4
- package/_assets/{SwapController-BSn7c8IX.js → SwapController-B403gwlM.js} +1 -1
- package/_assets/{Tooltip-C20chtvP.js → Tooltip-Bb6q6TxX.js} +1 -1
- package/_assets/TradeService-BsjSuIVy.js +1 -0
- package/_assets/{W3MFrameProviderSingleton-DM1LkzC3.js → W3MFrameProviderSingleton-B6S06Y_H.js} +3 -3
- package/_assets/{WebCryptoP256-DtXjN3TD.js → WebCryptoP256-CI6-qWGK.js} +1 -1
- package/_assets/authorizations-CRcoV7f0.js +1 -0
- package/_assets/{basic-CKrSeG36.js → basic-DEn_IlUm.js} +1 -1
- package/_assets/{biconomy-CraeH257.js → biconomy-DvPM-XBT.js} +1 -1
- package/_assets/{builder-C8bXNaZ5.js → builder-Npez-0pQ.js} +1 -1
- package/_assets/buy-CRR9-X2w.js +1 -0
- package/_assets/buy-gasless-Cj1VGZpP.js +1 -0
- package/_assets/{categories-C5jojgbc.js → categories-CMYRFP-3.js} +4 -4
- package/_assets/{ccip-BTuFCSPg.js → ccip-Bvp_nKL6.js} +1 -1
- package/_assets/{ccip-Bb0XTJKs.js → ccip-DFr4gxX6.js} +1 -1
- package/_assets/{collectionPage.styles-BQBK8RFg.js → collectionPage.styles-B4iEFMy_.js} +1 -1
- package/_assets/{controller-BslzK_oR.js → controller-CgyRh-Bw.js} +2 -2
- package/_assets/{core-A4i7e9_h.js → core-B7wRtbuZ.js} +4 -4
- package/_assets/{createSvgIcon-DtyE83ul.js → createSvgIcon-Bo9WJgq_.js} +4 -4
- package/_assets/{custom-IpjkpKYP.js → custom-CH6sSlIL.js} +1 -1
- package/_assets/{data-capture-BylIfDOD.js → data-capture-DreW3nks.js} +1 -1
- package/_assets/{email-C_gUvpJ8.js → email-pIKOIyQR.js} +1 -1
- package/_assets/{embedded-wallet-BZVHH3C_.js → embedded-wallet-CLmF0Kdd.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-BvfQxvDt.js → emotion-styled.browser.esm-BqTQ5SYv.js} +1 -1
- package/_assets/{engine-B73Qkzgt.js → engine-D64OXa1r.js} +1 -1
- package/_assets/{errors-CX9EJ2UZ.js → errors-BbwwHm_0.js} +1 -1
- package/_assets/{estimate-l1-fee-Bjxio48q.js → estimate-l1-fee-BU85AjOG.js} +1 -1
- package/_assets/{execute-BR9GMA2A.js → execute-BozDg2yb.js} +2 -2
- package/_assets/{features-CoryLSMJ.js → features-BDTF_ohu.js} +1 -1
- package/_assets/{fetchTokenMetadata-BcVWHlEL.js → fetchTokenMetadata-BT4wvs8u.js} +2 -2
- package/_assets/{field.styles-BX2ce_24.js → field.styles-C3qh-tZ2.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-BFR9-DCg.js → get-ecosystem-wallet-info-BlqgcGd0.js} +1 -1
- package/_assets/{getBalance-OP0XWTi2.js → getBalance-B89LWv-k.js} +1 -1
- package/_assets/{getNFT-BsALO_-5.js → getNFT-CMlAXi2W.js} +1 -1
- package/_assets/{getNFT--XquMmAd.js → getNFT-Cy5QJvSJ.js} +1 -1
- package/_assets/{grid.styles-D3oxiL_A.js → grid.styles-B2Eu32l1.js} +1 -1
- package/_assets/{hashTypedData-BZTDP8kP.js → hashTypedData-5hKkNljV.js} +1 -1
- package/_assets/{hashTypedData-CJy6tOpf.js → hashTypedData-CVMcc6Hz.js} +1 -1
- package/_assets/{in-app-bTj5LvvL.js → in-app-BiD_q7tQ.js} +1 -1
- package/_assets/{in-app-wallet-calls-V54KdLrU.js → in-app-wallet-calls-BxK-hX9G.js} +1 -1
- package/_assets/{index-D-JDvnI6.js → index-2KdRKXEu.js} +1 -1
- package/_assets/{index-B6qDcfLC.js → index-69aWe7LF.js} +1 -1
- package/_assets/{index-YzDw7lnB.js → index-BCSwRUu3.js} +1 -1
- package/_assets/{index-PfvTvnFS.js → index-BLQrxn9F.js} +1 -1
- package/_assets/{index-UKtYEQEQ.js → index-BNtwDdqR.js} +1 -1
- package/_assets/{index-DV6xJ5R3.js → index-BS9mRV4X.js} +1 -1
- package/_assets/{index-C8Kc50nN.js → index-BU93X1R1.js} +1 -1
- package/_assets/{index-zp7bpiif.js → index-Baqe51s4.js} +1 -1
- package/_assets/{index-Bs-rgt8S.js → index-BawFzGfz.js} +1 -1
- package/_assets/{index-Ceqm243m.js → index-BbAhN-VL.js} +1 -1
- package/_assets/{index-gDU5HG0M.js → index-BfrZo6vI.js} +1 -1
- package/_assets/{index-C8xBYuq6.js → index-Bj_Y4oBT.js} +1 -1
- package/_assets/{index-BfDKCK-b.js → index-Brr2CMye.js} +1 -1
- package/_assets/{index-CEAo9zba.js → index-BvQGZppV.js} +1 -1
- package/_assets/{index-CfuAIPVB.js → index-BwVlQTGw.js} +1 -1
- package/_assets/{index-CWbpUhbz.js → index-ByMxSKoO.js} +1 -1
- package/_assets/{index-DSeFRPGN.js → index-C0Tjm6c2.js} +2 -2
- package/_assets/{index-D8uCQOfi.js → index-C54j1-wd.js} +1 -1
- package/_assets/{index-BzlJrLzv.js → index-CD88wagS.js} +1 -1
- package/_assets/{index-CLKNbQ2Y.js → index-CGyHa-8V.js} +1 -1
- package/_assets/{index-0lnGEb9H.js → index-CKJapgfm.js} +1 -1
- package/_assets/{index-B2t9sa1E.js → index-CKK-zMqi.js} +72 -72
- package/_assets/{index-Bam-2vzo.js → index-CL_zZiR1.js} +1 -1
- package/_assets/{index-md2wV3Vc.js → index-COl_MS2X.js} +1 -1
- package/_assets/{index-DReHody5.js → index-CRNF_QU5.js} +1 -1
- package/_assets/{index-Tv4r9Lwx.js → index-CU54HyHs.js} +1 -1
- package/_assets/{index-w6ENWwBi.js → index-CdmghwAv.js} +1 -1
- package/_assets/{index-rkAdeG6n.js → index-CgPj91Wh.js} +1 -1
- package/_assets/{index-Bi2VdHZq.js → index-CoC4ZTSB.js} +3 -3
- package/_assets/{index-Cf_haBRI.js → index-D2gLfWlc.js} +1 -1
- package/_assets/{index-CNeTXjRv.js → index-D4mfZpjO.js} +2 -2
- package/_assets/{index-BFqY25SM.js → index-D6N8FICT.js} +2 -2
- package/_assets/{index-CJKoD8At.js → index-D7-5iUKs.js} +1 -1
- package/_assets/{index-BhMQwy2J.js → index-DKDGLsyf.js} +1 -1
- package/_assets/{index-Bu1qaX74.js → index-DQT21rdJ.js} +1 -1
- package/_assets/{index-DVvKTSOr.js → index-DRZIPiLU.js} +11 -11
- package/_assets/{index-2eCGZaTL.js → index-DRwratoB.js} +1 -1
- package/_assets/{index-D9DKKnsH.js → index-DmJfaFSK.js} +1 -1
- package/_assets/{index-Brb4suFu.js → index-DnZSYmpU.js} +1 -1
- package/_assets/{index-Bc5nlTSa.js → index-DnhjRPd0.js} +1 -1
- package/_assets/{index-iQ7iCCBF.js → index-DnlLS_ys.js} +1 -1
- package/_assets/{index-lkLKW4IC.js → index-DsKwbNYL.js} +1 -1
- package/_assets/{index-Coc88CNs.js → index-DxKuqcFg.js} +1 -1
- package/_assets/{index-BQGrMQAe.js → index-Dy-uR3t4.js} +1 -1
- package/_assets/{index-BTO7S5s4.js → index-E4Z_g959.js} +3 -3
- package/_assets/{index-BsvoYnWP.js → index-Eas9yoRi.js} +1 -1
- package/_assets/{index-BAAdKhhE.js → index-GomvWLkv.js} +1 -1
- package/_assets/{index-CNfRDyX8.js → index-UWPTFHML.js} +1 -1
- package/_assets/{index-CoZGIPvy.js → index-Xe0zG67j.js} +2 -2
- package/_assets/{index-Dz2XpmN8.js → index-bVwIZVq2.js} +1 -1
- package/_assets/{index-CD7rVCS9.js → index-hnGTtZoN.js} +3 -3
- package/_assets/{index-CVzFwkR2.js → index-tt5vpwow.js} +1 -1
- package/_assets/{index.es-Cf1qw100.js → index.es-BYW_XSuo.js} +4 -4
- package/_assets/{index.es-D8QRPbHG.js → index.es-D0J6Rjn_.js} +1 -1
- package/_assets/{index.es-D-iJF_vP.js → index.es-wL4nLZcl.js} +1 -1
- package/_assets/{localBatchGatewayRequest-mmyGx97_.js → localBatchGatewayRequest-CBnpaR4-.js} +1 -1
- package/_assets/{networks-auA2rGBi.js → networks-D41xdN6D.js} +1 -1
- package/_assets/{onramp-DnEfmJx7.js → onramp-DR5Lm3nA.js} +1 -1
- package/_assets/{openzeppelin-IGdhY6bS.js → openzeppelin-B19X12pO.js} +1 -1
- package/_assets/{parseNft-BiFdLjSe.js → parseNft-BHr3f8D7.js} +2 -2
- package/_assets/{parseSignature-J8MdklGZ.js → parseSignature-CRruTE7l.js} +1 -1
- package/_assets/{parseSignature-QJftY_rY.js → parseSignature-Cz1WFGnm.js} +3 -3
- package/_assets/{passkeys-D2Xshh23.js → passkeys-BAR54cJC.js} +1 -1
- package/_assets/{pay-with-exchange-Cu035sqT.js → pay-with-exchange-zDCz8UbG.js} +1 -1
- package/_assets/{qr-overlay-DYgMyv1Q.js → qr-overlay-DXWbTjg8.js} +1 -1
- package/_assets/{receive-CsNpdfnW.js → receive-B3ivhPV_.js} +1 -1
- package/_assets/{resolveImplementation-DTQI53AV.js → resolveImplementation-ASrjiSw-.js} +1 -1
- package/_assets/{rpc-KnP3VACd.js → rpc-r3GlqTct.js} +1 -1
- package/_assets/{secp256k1-CNuJw6t5.js → secp256k1-B5NNIaFX.js} +1 -1
- package/_assets/{secp256k1-D9mIimtB.js → secp256k1-Ch2QO1Jw.js} +1 -1
- package/_assets/{secp256k1-HByYfqH7.js → secp256k1-ChcROQU5.js} +1 -1
- package/_assets/{send-CMCnYIdY.js → send-6dgb2b7F.js} +1 -1
- package/_assets/{send-batch-transaction-C1sbN2my.js → send-batch-transaction-D_JGI6Rn.js} +1 -1
- package/_assets/{send-eip712-transaction-BAJeY5fb.js → send-eip712-transaction-BAt6mbHJ.js} +2 -2
- package/_assets/{send-gasless-transaction-B44KlVWh.js → send-gasless-transaction-B6-du22J.js} +2 -2
- package/_assets/{send-transaction-DT0LgivN.js → send-transaction-CWeSxAY3.js} +2 -2
- package/_assets/{sendMetaTransaction-etVFqqtW.js → sendMetaTransaction-Ds4_qSVu.js} +1 -1
- package/_assets/{sendRawTransaction-CP59S8fY.js → sendRawTransaction-lB8XtpQV.js} +3 -3
- package/_assets/{serializeTransaction-D82eIJpu.js → serializeTransaction-sBiqyBXY.js} +1 -1
- package/_assets/{session-proposal-CTk25Dr-.js → session-proposal-CtX3xmD3.js} +1 -1
- package/_assets/{session-request-C1qUxOZG.js → session-request-TgRSx-rm.js} +2 -2
- package/_assets/{signing-D2OJn6T_.js → signing-BLltMKaw.js} +3 -3
- package/_assets/{skeleton.styles-CEQXSxcg.js → skeleton.styles-CHtcYOO2.js} +1 -1
- package/_assets/{socials-Clt3JNMD.js → socials-C-PWl5ol.js} +1 -1
- package/_assets/{styled-DRUYplNz.js → styled-ByfFVW_J.js} +1 -1
- package/_assets/{swaps-hOclSX6h.js → swaps-cy6g7st6.js} +1 -1
- package/_assets/{thirdweb-DH3-POmB.js → thirdweb-Dw1AnBJt.js} +3 -3
- package/_assets/{to-serializable-transaction-CTdC8nHQ.js → to-serializable-transaction-BYNNGJgk.js} +2 -2
- package/_assets/{transactionReceipt-u3fxiMLd.js → transactionReceipt-D3t9P89G.js} +1 -1
- package/_assets/{transactions-CrPkr7No.js → transactions-Ci41fiMj.js} +1 -1
- package/_assets/useCreditPacks-DnkAdSB8.js +1 -0
- package/_assets/useImportable-DTHq6mob.js +1 -0
- package/_assets/{useInfiniteGrid-BJjThIIr.js → useInfiniteGrid-C5_gVX8O.js} +1 -1
- package/_assets/useTheme-pA484HjF.js +1 -0
- package/_assets/{verifyHash-GC24awPW.js → verifyHash-Bwromxoc.js} +1 -1
- package/_assets/{w3m-modal-D8ODxmhx.js → w3m-modal-JLRA_T5o.js} +1 -1
- package/_assets/{w3m-modal-C_4LJHJd.js → w3m-modal-yFiS_Jze.js} +1 -1
- package/_assets/{wait-for-tx-receipt-DxjVHpLa.js → wait-for-tx-receipt-BXBtEFR-.js} +1 -1
- package/_assets/{wallets-CLONLSgR.js → wallets-DB4fTO2e.js} +5 -5
- package/_assets/{web-connector-Bg3R-MOR.js → web-connector-CwHeziUM.js} +3 -3
- package/_assets/{writeContract-B0hqGC9P.js → writeContract-lzu9ejzj.js} +1 -1
- package/_assets/{zoraTestnet-BrHNrHjI.js → zoraTestnet-Bhmm9a22.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Cart-CMAKp-wK.js +0 -696
- package/_assets/CollectionCarousel-DMTJO3vn.js +0 -872
- package/_assets/ItemDetail--g9bExAk.js +0 -3577
- package/_assets/LazyEmoteControls-DLE3wPcI.js +0 -2
- package/_assets/TradeService-C1HwlfJG.js +0 -1
- package/_assets/authorizations-BIUtCNZm.js +0 -1
- package/_assets/buy-Dvc_dX-A.js +0 -1
- package/_assets/buy-gasless-C2CSfMz_.js +0 -1
- package/_assets/useCreditPacks-BKNj_K3V.js +0 -1
- package/_assets/useImportable-Dxzd_Mzq.js +0 -1
- package/_assets/useTheme-Rk_Pnmot.js +0 -1
|
@@ -0,0 +1,872 @@
|
|
|
1
|
+
import{j as n,r as k}from"./react-BYHuwl8r.js";import{s as a,t as d,b,y as M,K as A,b$ as z,C as ce,v as le,I as K,E as pe,g as j,f as C,aX as U,aq as Q,a8 as he,cq as O,ap as ue}from"./index-CKK-zMqi.js";import{s as xe,i as F,A as V,g as B,r as Z,m as J,k as G,l as Y}from"./authorizations-CRcoV7f0.js";import{i as ge}from"./errors-BbwwHm_0.js";import{E as fe}from"./ErrorNotice-CJ7LbSaM.js";import{k as me,l as be,m as _,n as we,o as ye}from"./buy-CRR9-X2w.js";import{s as ee,M as te,E as ae}from"./sendMetaTransaction-Ds4_qSVu.js";import{I as ve,C as ne}from"./ethers-BDpbhgX6.js";const S="shop:resume_after_signin",ke=900*1e3;function xt(e){try{sessionStorage.setItem(S,JSON.stringify({...e,at:Date.now()}))}catch{}}function gt(e){let t;try{t=sessionStorage.getItem(S)}catch{return null}if(!t)return null;try{sessionStorage.removeItem(S)}catch{}let i;try{i=JSON.parse(t)}catch{return null}return!i||i.type!==e||typeof i.at!="number"||Date.now()-i.at>ke?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function je(e,t){return(e+t-1n)/t}function Ce(e,t,i){return e<=0||t<=0?0n:e>=t?i:je(i*BigInt(e),BigInt(t))}function ft(e){var u,p,y;const t=Number.isFinite(e.priceCents)?Math.max(0,Math.trunc(e.priceCents)):0,i=Number.isFinite(e.balanceCents)?Math.max(0,Math.trunc(e.balanceCents)):0,r=e.priceManaWei>0n?e.priceManaWei:0n,l=e.manaBalanceWei>0n?e.manaBalanceWei:0n;if(t<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=t&&c.push({method:"credits",creditsCents:t,manaWei:0n}),r>0n&&i>0&&i<t){const o=t-i,f=Ce(o,t,r);l>=f&&c.push({method:"combined",creditsCents:i,manaWei:f})}r>0n&&l>=r&&c.push({method:"mana",creditsCents:0,manaWei:r});const h=((u=c.find(o=>o.method==="credits"))==null?void 0:u.method)??((p=c.find(o=>o.method==="combined"))==null?void 0:p.method)??((y=c.find(o=>o.method==="mana"))==null?void 0:y.method)??null,g=!c.some(o=>o.method==="mana"||o.method==="combined")&&r>0n&&l>0n?{manaWei:l,manaCents:Me(l,t,r),priceCents:t}:null;return{options:c,preferred:h,manaShortfall:g}}function Me(e,t,i){return Number(e*BigInt(t)/i)}function mt(e,t){let i=Number.isFinite(t)?Math.max(0,Math.trunc(t)):0;return e.map(r=>{const l=Number.isFinite(r)?Math.max(0,Math.trunc(r)):0,c=Math.min(l,i);return i-=c,c})}function $(e){return Number.isFinite(e)?Math.max(0,e)/10:0}function bt(e,t){return e.options.find(i=>i.method===t)??null}function wt(e,t){if(!Number.isFinite(e)||e<=0||t<=0n)return null;const i=e/10;return Number(t)/1e18/i}const E="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ae=a.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 12px;
|
|
5
|
+
align-items: stretch;
|
|
6
|
+
width: 100%;
|
|
7
|
+
`,ie=`
|
|
8
|
+
width: 100%;
|
|
9
|
+
min-height: 56px;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
gap: 8px;
|
|
14
|
+
flex-wrap: wrap;
|
|
15
|
+
padding: 0 12px;
|
|
16
|
+
border: 0;
|
|
17
|
+
border-radius: 12px;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
transition:
|
|
20
|
+
background 0.15s ease,
|
|
21
|
+
filter 0.15s ease;
|
|
22
|
+
font-family: ${d.font.sans};
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
font-size: 15px;
|
|
25
|
+
line-height: 24px;
|
|
26
|
+
letter-spacing: 0.46px;
|
|
27
|
+
text-transform: uppercase;
|
|
28
|
+
color: ${d.colors.softWhite};
|
|
29
|
+
|
|
30
|
+
&:focus-visible {
|
|
31
|
+
outline: 2px solid ${d.colors.accent};
|
|
32
|
+
outline-offset: 2px;
|
|
33
|
+
}
|
|
34
|
+
&:disabled {
|
|
35
|
+
opacity: 0.6;
|
|
36
|
+
cursor: default;
|
|
37
|
+
}
|
|
38
|
+
`,X=a.button`
|
|
39
|
+
${ie}
|
|
40
|
+
background: ${d.gradients.buyBtn};
|
|
41
|
+
|
|
42
|
+
&:hover:not(:disabled) {
|
|
43
|
+
filter: brightness(1.08);
|
|
44
|
+
}
|
|
45
|
+
`,N=a.button`
|
|
46
|
+
${ie}
|
|
47
|
+
background: ${d.colors.text2};
|
|
48
|
+
|
|
49
|
+
&:hover:not(:disabled) {
|
|
50
|
+
background: ${d.colors.gray0};
|
|
51
|
+
}
|
|
52
|
+
`,W=a.span`
|
|
53
|
+
display: inline-flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 6px;
|
|
56
|
+
text-transform: none;
|
|
57
|
+
letter-spacing: 0;
|
|
58
|
+
|
|
59
|
+
span {
|
|
60
|
+
font-size: 20px;
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
line-height: normal;
|
|
63
|
+
}
|
|
64
|
+
.ico {
|
|
65
|
+
width: 24px;
|
|
66
|
+
height: 24px;
|
|
67
|
+
background: ${d.colors.softWhite};
|
|
68
|
+
}
|
|
69
|
+
`,P=a.span`
|
|
70
|
+
position: relative;
|
|
71
|
+
display: block;
|
|
72
|
+
width: 30px;
|
|
73
|
+
height: 30px;
|
|
74
|
+
flex: none;
|
|
75
|
+
|
|
76
|
+
/* Centred in the slot, not pinned to its top: the slot is taller than the glyph and sits next to a
|
|
77
|
+
vertically centred amount, so a top-pinned mark reads as floating above the number. */
|
|
78
|
+
img {
|
|
79
|
+
position: absolute;
|
|
80
|
+
top: 50%;
|
|
81
|
+
left: 0;
|
|
82
|
+
transform: translateY(-50%);
|
|
83
|
+
width: 24px;
|
|
84
|
+
height: 24px;
|
|
85
|
+
display: block;
|
|
86
|
+
}
|
|
87
|
+
`,ze=a.span`
|
|
88
|
+
font-size: 13px;
|
|
89
|
+
font-weight: 600;
|
|
90
|
+
letter-spacing: 0.02em;
|
|
91
|
+
opacity: 0.85;
|
|
92
|
+
`,$e=a.span`
|
|
93
|
+
font-size: 18px;
|
|
94
|
+
font-weight: 600;
|
|
95
|
+
opacity: 0.7;
|
|
96
|
+
`,We=a.p`
|
|
97
|
+
margin: 0;
|
|
98
|
+
font-family: ${d.font.sans};
|
|
99
|
+
font-weight: 400;
|
|
100
|
+
font-size: 12px;
|
|
101
|
+
line-height: 1;
|
|
102
|
+
color: ${d.colors.muted};
|
|
103
|
+
text-align: center;
|
|
104
|
+
`,Te=a.p`
|
|
105
|
+
margin: -4px 0 0;
|
|
106
|
+
font-family: ${d.font.sans};
|
|
107
|
+
font-weight: 400;
|
|
108
|
+
font-size: 12px;
|
|
109
|
+
line-height: 1.4;
|
|
110
|
+
color: ${d.colors.muted};
|
|
111
|
+
text-align: center;
|
|
112
|
+
`;function yt({options:e,totalCents:t,onPay:i,busy:r=!1,rateNote:l,creditsLabel:c,shortfall:h,showCreditsAmount:w=!0,creditsFallback:g=null}){const u=e.some(p=>p.method==="credits");return n.jsxs(Ae,{children:[!u&&g?n.jsx(X,{type:"button","data-testid":"pay-with-credits-topup",onClick:g.onClick,disabled:r,children:n.jsx("span",{children:g.label})}):null,e.map(p=>p.method==="credits"?n.jsxs(X,{type:"button","data-testid":"pay-with-credits",onClick:()=>i("credits"),disabled:r,children:[n.jsx("span",{children:c??b("buyModal.buy")}),w?n.jsxs(W,{children:[n.jsx(M,{}),n.jsx("span",{children:A($(p.creditsCents))})]}):null]},"credits"):p.method==="mana"?n.jsxs(N,{type:"button","data-testid":"pay-with-mana",onClick:()=>i("mana"),disabled:r,children:[n.jsx("span",{children:b("buyModal.buyWithMana")}),n.jsxs(W,{children:[n.jsx(P,{children:n.jsx("img",{src:E,alt:"","aria-hidden":!0})}),n.jsx("span",{children:z(p.manaWei)})]})]},"mana"):n.jsxs(N,{type:"button","data-testid":"pay-with-combined",onClick:()=>i("combined"),disabled:r,children:[n.jsx("span",{children:b("buyModal.buyWith")}),n.jsxs(W,{children:[n.jsx(M,{}),n.jsx("span",{children:A($(p.creditsCents))}),n.jsx($e,{children:"+"}),n.jsx(P,{children:n.jsx("img",{src:E,alt:"","aria-hidden":!0})}),n.jsx("span",{children:z(p.manaWei)}),n.jsx(ze,{children:"MANA"})]})]},"combined")),h?n.jsxs(n.Fragment,{children:[n.jsxs(N,{type:"button","data-testid":"pay-with-mana-disabled",disabled:!0,children:[n.jsx("span",{children:b("buyModal.buyWithMana")}),n.jsxs(W,{children:[n.jsx(P,{children:n.jsx("img",{src:E,alt:"","aria-hidden":!0})}),n.jsx("span",{children:z(h.manaWei)})]})]},"mana-short"),n.jsx(Te,{"data-testid":"mana-shortfall-note",children:b("buyModal.manaWorth",{mana:z(h.manaWei),credits:A($(h.manaCents)),price:A($(h.priceCents)),currency:ce.name})})]}):null,l?n.jsx(We,{"data-testid":"mana-rate-note",children:l}):null,n.jsx("span",{hidden:!0,"data-testid":"pay-total-cents",children:t})]})}function vt(e,t){const i=(r,...l)=>void e.invalidateQueries({queryKey:t?[r,...l]:[r]});e.invalidateQueries({queryKey:["usd-balance"]}),e.invalidateQueries({queryKey:["detail-trade"]}),e.invalidateQueries({queryKey:["shop-item"]}),i("owned-token",t==null?void 0:t.contractAddress,t==null?void 0:t.tokenId),i("public-token",t==null?void 0:t.contractAddress,t==null?void 0:t.tokenId),i("item-resales",t==null?void 0:t.contractAddress,t==null?void 0:t.itemId),e.invalidateQueries({queryKey:["shop-items"]}),e.invalidateQueries({queryKey:["catalog-items"]}),e.invalidateQueries({queryKey:["overview-listings"]}),e.invalidateQueries({queryKey:["upsell-listings"]}),e.invalidateQueries({queryKey:["my-assets"]}),e.invalidateQueries({queryKey:["purchases"]}),e.invalidateQueries({queryKey:["owned-item-count"]})}const Be=le`
|
|
113
|
+
to { transform: rotate(360deg); }
|
|
114
|
+
`,Ie=a.div`
|
|
115
|
+
position: fixed;
|
|
116
|
+
inset: 0;
|
|
117
|
+
z-index: 10000;
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
padding: 16px;
|
|
122
|
+
background: rgba(22, 21, 24, 0.55);
|
|
123
|
+
`,Ee=a.div`
|
|
124
|
+
width: 480px;
|
|
125
|
+
max-width: 100%;
|
|
126
|
+
max-height: 92vh;
|
|
127
|
+
overflow-y: auto;
|
|
128
|
+
background: ${d.colors.white};
|
|
129
|
+
border-radius: 16px;
|
|
130
|
+
padding: 12px 16px 16px;
|
|
131
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: column;
|
|
134
|
+
gap: 20px;
|
|
135
|
+
`,Ne=a.div`
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: space-between;
|
|
139
|
+
gap: 8px;
|
|
140
|
+
padding-bottom: 16px;
|
|
141
|
+
border-bottom: 1px solid ${d.colors.gray4};
|
|
142
|
+
`,Pe=a.h2`
|
|
143
|
+
margin: 0;
|
|
144
|
+
font-family: ${d.font.sans};
|
|
145
|
+
font-weight: 600;
|
|
146
|
+
font-size: 20px;
|
|
147
|
+
line-height: 1.6;
|
|
148
|
+
color: ${d.colors.text};
|
|
149
|
+
`,Se=a.button`
|
|
150
|
+
flex: none;
|
|
151
|
+
display: grid;
|
|
152
|
+
place-items: center;
|
|
153
|
+
width: 24px;
|
|
154
|
+
height: 24px;
|
|
155
|
+
border: 0;
|
|
156
|
+
background: none;
|
|
157
|
+
cursor: pointer;
|
|
158
|
+
color: ${d.colors.text};
|
|
159
|
+
|
|
160
|
+
.ico {
|
|
161
|
+
width: 18px;
|
|
162
|
+
height: 18px;
|
|
163
|
+
}
|
|
164
|
+
&:disabled {
|
|
165
|
+
opacity: 0.4;
|
|
166
|
+
cursor: default;
|
|
167
|
+
}
|
|
168
|
+
&:focus-visible {
|
|
169
|
+
outline: 2px solid ${d.colors.accent};
|
|
170
|
+
outline-offset: 2px;
|
|
171
|
+
}
|
|
172
|
+
`,Fe=a.div`
|
|
173
|
+
display: grid;
|
|
174
|
+
grid-template-columns: 44px 1fr;
|
|
175
|
+
align-items: center;
|
|
176
|
+
gap: 14px;
|
|
177
|
+
padding: 14px 18px;
|
|
178
|
+
background: ${d.colors.white};
|
|
179
|
+
border: 1px solid ${d.colors.line};
|
|
180
|
+
border-radius: 16px;
|
|
181
|
+
`,Ve=a.div`
|
|
182
|
+
width: 44px;
|
|
183
|
+
height: 44px;
|
|
184
|
+
border-radius: 10px;
|
|
185
|
+
background: ${d.colors.media};
|
|
186
|
+
overflow: hidden;
|
|
187
|
+
display: flex;
|
|
188
|
+
align-items: center;
|
|
189
|
+
justify-content: center;
|
|
190
|
+
color: ${d.colors.muted2};
|
|
191
|
+
|
|
192
|
+
img {
|
|
193
|
+
width: 100%;
|
|
194
|
+
height: 100%;
|
|
195
|
+
object-fit: contain;
|
|
196
|
+
}
|
|
197
|
+
.ccy-mark {
|
|
198
|
+
width: 26px;
|
|
199
|
+
height: 26px;
|
|
200
|
+
}
|
|
201
|
+
`,Le=a.div`
|
|
202
|
+
min-width: 0;
|
|
203
|
+
display: flex;
|
|
204
|
+
flex-direction: column;
|
|
205
|
+
gap: 4px;
|
|
206
|
+
`,De=a.span`
|
|
207
|
+
font-weight: 700;
|
|
208
|
+
color: ${d.colors.text};
|
|
209
|
+
`,Re=a.span`
|
|
210
|
+
font-size: 13px;
|
|
211
|
+
line-height: 1.45;
|
|
212
|
+
color: ${d.colors.muted};
|
|
213
|
+
`,qe=a.p`
|
|
214
|
+
margin: 0;
|
|
215
|
+
font-size: 12px;
|
|
216
|
+
line-height: 1.5;
|
|
217
|
+
color: ${d.colors.muted2};
|
|
218
|
+
`,Oe=a.div`
|
|
219
|
+
display: flex;
|
|
220
|
+
gap: 12px;
|
|
221
|
+
|
|
222
|
+
${d.media.maxWidth("mobile")} {
|
|
223
|
+
flex-direction: column-reverse;
|
|
224
|
+
}
|
|
225
|
+
`,Xe=a.button`
|
|
226
|
+
flex: 1 1 0;
|
|
227
|
+
height: 48px;
|
|
228
|
+
border: 2px solid ${d.colors.accent};
|
|
229
|
+
border-radius: 12px;
|
|
230
|
+
background: transparent;
|
|
231
|
+
color: ${d.colors.accent};
|
|
232
|
+
cursor: pointer;
|
|
233
|
+
font-family: ${d.font.sans};
|
|
234
|
+
font-weight: 600;
|
|
235
|
+
font-size: 13px;
|
|
236
|
+
line-height: 24px;
|
|
237
|
+
letter-spacing: 0.46px;
|
|
238
|
+
text-transform: uppercase;
|
|
239
|
+
|
|
240
|
+
&:hover:not(:disabled) {
|
|
241
|
+
background: rgba(105, 31, 169, 0.06);
|
|
242
|
+
}
|
|
243
|
+
&:disabled {
|
|
244
|
+
cursor: default;
|
|
245
|
+
opacity: 0.5;
|
|
246
|
+
}
|
|
247
|
+
&:focus-visible {
|
|
248
|
+
outline: 2px solid ${d.colors.accent};
|
|
249
|
+
outline-offset: 2px;
|
|
250
|
+
}
|
|
251
|
+
`,He=a.button`
|
|
252
|
+
flex: 1 1 0;
|
|
253
|
+
display: inline-flex;
|
|
254
|
+
align-items: center;
|
|
255
|
+
justify-content: center;
|
|
256
|
+
gap: 8px;
|
|
257
|
+
height: 48px;
|
|
258
|
+
border: 0;
|
|
259
|
+
border-radius: 12px;
|
|
260
|
+
background: ${d.colors.accent};
|
|
261
|
+
color: ${d.colors.softWhite};
|
|
262
|
+
cursor: pointer;
|
|
263
|
+
font-family: ${d.font.sans};
|
|
264
|
+
font-weight: 600;
|
|
265
|
+
font-size: 13px;
|
|
266
|
+
line-height: 24px;
|
|
267
|
+
letter-spacing: 0.46px;
|
|
268
|
+
text-transform: uppercase;
|
|
269
|
+
|
|
270
|
+
&:hover:not(:disabled) {
|
|
271
|
+
background: ${d.colors.accentHover};
|
|
272
|
+
}
|
|
273
|
+
&:disabled {
|
|
274
|
+
cursor: default;
|
|
275
|
+
background: rgba(105, 31, 169, 0.4);
|
|
276
|
+
}
|
|
277
|
+
&:focus-visible {
|
|
278
|
+
outline: 2px solid ${d.colors.accent};
|
|
279
|
+
outline-offset: 2px;
|
|
280
|
+
}
|
|
281
|
+
`,Ke=a.span`
|
|
282
|
+
width: 16px;
|
|
283
|
+
height: 16px;
|
|
284
|
+
border-radius: 50%;
|
|
285
|
+
border: 2px solid rgba(255, 255, 255, 0.5);
|
|
286
|
+
border-top-color: ${d.colors.white};
|
|
287
|
+
animation: ${Be} 0.7s linear infinite;
|
|
288
|
+
|
|
289
|
+
@media (prefers-reduced-motion: reduce) {
|
|
290
|
+
animation: none;
|
|
291
|
+
}
|
|
292
|
+
`;function kt({auth:e,signer:t,title:i,reason:r,name:l,image:c,icon:h,onAuthorized:w,onCancel:g,onClose:u}){const[p,y]=k.useState(!1),[o,f]=k.useState(null);async function v(){y(!0),f(null);try{await xe({auth:e,signer:t,active:!0}),w()}catch(x){ge(x)?f(b("authorizeStep.errorRejected")):(pe(x,{flow:"authorize_step",kind:e.kind}),f(b("authorizeStep.errorGeneric"))),y(!1)}}return n.jsx(Ie,{onClick:p?void 0:u,role:"presentation",children:n.jsxs(Ee,{onClick:x=>x.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i,children:[n.jsxs(Ne,{children:[n.jsx(Pe,{children:i}),n.jsx(Se,{onClick:u,disabled:p,"aria-label":b("authorizeStep.close"),children:n.jsx(K,{name:"close",className:"ico"})})]}),n.jsxs(Fe,{"data-testid":"authorize-step-row",children:[n.jsx(Ve,{children:c?n.jsx("img",{src:c,alt:""}):h}),n.jsxs(Le,{children:[n.jsx(De,{title:l,children:l}),n.jsx(Re,{children:r})]})]}),n.jsx(qe,{children:b("authorizeStep.note")}),n.jsx(fe,{message:o}),n.jsxs(Oe,{children:[n.jsx(Xe,{type:"button",onClick:g,disabled:p,children:b("authorizeStep.cancel")}),n.jsx(He,{type:"button","data-testid":"authorize-step-action",onClick:()=>void v(),disabled:p,children:p?n.jsxs(n.Fragment,{children:[n.jsx(Ke,{"aria-hidden":!0}),b("authorizeStep.authorizing")]}):b("authorizeStep.authorize")})]})]})})}const jt="data:image/webp;base64,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",Ct="https://cdn.decentraland.org/@dcl/shop/1.3.0/_assets/buy-error-22UunaPC.png";async function Mt(e){const[t]=await oe({...e,trades:[e.trade]});return t}async function At(e){const[t]=await oe({...e,trades:[],mints:[e.mint]});return t}async function oe(e){const{trades:t,mints:i=[],buyer:r,signer:l,onSigned:c}=e;if(t.length===0&&i.length===0)throw new Error("No items to buy");const h=new Map;for(const u of t){const p=`${u.chainId}:${u.contract.toLowerCase()}`,y=h.get(p);y?y.push(u):h.set(p,[u])}const w=new Map;for(const u of i){const p=w.get(u.chainId);p?p.push(u):w.set(u.chainId,[u])}const g=[];for(const u of h.values())g.push(await Ue({trades:u,buyer:r,signer:l,onSigned:c}));for(const[u,p]of w)g.push(await Qe({mints:p,chainId:u,buyer:r,signer:l,onSigned:c}));return g}async function Ue(e){const{trades:t,buyer:i,signer:r,onSigned:l}=e,c=t[0],h=j(U(c.contract),c.chainId),w=j(C.MANAToken,c.chainId);await F({auth:{kind:V.Allowance,contractAddress:w.address,spenderAddress:h.address,chainId:c.chainId},signer:r});const g=t.map(o=>be(o,i));if(B.enabled)try{const o=new ve(h.abi).encodeFunctionData("accept",[g]),f=Z(),v=J(r.provider,f),x=await ee(v,f,o,h,{serverURL:B.relayerUrl});return l==null||l(),await G(x,"the MANA purchase"),x}catch(o){if(o instanceof te&&o.code===ae.USER_DENIED||o instanceof Y)throw o;console.warn("[buyWithMana] gasless meta-tx failed, falling back to a direct tx:",o)}await Q(r.provider,c.chainId);const p=await new ne(h.address,h.abi,r).accept(g,_(c.chainId));return l==null||l(),(await p.wait()).transactionHash}async function Qe(e){const{mints:t,chainId:i,buyer:r,signer:l,onSigned:c}=e,h=j(C.CollectionStore,i),w=j(C.MANAToken,i),g=t.map(o=>o.item);if(await F({auth:{kind:V.Allowance,contractAddress:w.address,spenderAddress:h.address,chainId:i},signer:l}),B.enabled)try{const o=we(g,r,h.abi),f=Z(),v=J(l.provider,f),x=await ee(v,f,o,h,{serverURL:B.relayerUrl});return c==null||c(),await G(x,"the MANA purchase"),x}catch(o){if(o instanceof te&&o.code===ae.USER_DENIED||o instanceof Y)throw o;console.warn("[buyMintWithMana] gasless meta-tx failed, falling back to a direct tx:",o)}await Q(l.provider,i);const p=await new ne(h.address,h.abi,l).buy(ye(g,r),_(i));return c==null||c(),(await p.wait()).transactionHash}async function zt(e){const{trade:t,...i}=e;return re({target:{kind:"trade",trade:t},...i})}async function $t(e){const{mint:t,...i}=e;return re({target:{kind:"store",mint:t},...i})}async function re(e){const{target:t,buyer:i,signer:r,credits:l,manaGapWei:c,onBroadcast:h,onReverted:w}=e;if(l.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(c<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const g=se(t),u=j(C.MANAToken,g),p=j(C.CreditsManager,g);await F({auth:{kind:V.Allowance,contractAddress:u.address,spenderAddress:p.address,chainId:g},signer:r});const o=(l.reduce((f,v)=>f+BigInt(v.availableAmount),0n)+c).toString();return me({purchase:Ze(t,l,o),buyer:i,signer:r,onBroadcast:h,onReverted:w})}function se(e){return e.kind==="trade"?e.trade.chainId:e.mint.chainId}function Ze(e,t,i){return e.kind==="trade"?{kind:"trade",trade:e.trade,credits:t,maxCreditedValue:i}:{kind:"store",item:e.mint.item,chainId:e.mint.chainId,credits:t,maxCreditedValue:i}}function Wt(e,t){const i=se(t);return e==="combined"?{spender:j(C.CreditsManager,i).address,chainId:i}:{spender:t.kind==="trade"?j(U(t.trade.contract),i).address:j(C.CollectionStore,i).address,chainId:i}}function Tt(e){return n.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...e,children:n.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function Bt(e){return n.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...e,children:n.jsx("path",{fill:"#f48221",d:"M10 0a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 11a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1Z"})})}const{colors:s,gradients:L,radius:de,z:Je}=d,It=a.div`
|
|
293
|
+
position: fixed;
|
|
294
|
+
inset: 0;
|
|
295
|
+
z-index: ${Je.overlay};
|
|
296
|
+
display: flex;
|
|
297
|
+
overflow-y: auto;
|
|
298
|
+
padding: 20px;
|
|
299
|
+
`,Et=a.div`
|
|
300
|
+
position: fixed;
|
|
301
|
+
inset: 0;
|
|
302
|
+
background: rgba(22, 21, 24, 0.45);
|
|
303
|
+
`,Nt=a.div`
|
|
304
|
+
position: relative;
|
|
305
|
+
z-index: 1;
|
|
306
|
+
margin: auto;
|
|
307
|
+
width: 100%;
|
|
308
|
+
/* Wide enough to fit all 4 credit bundles comfortably in a single row (the credits-server returns 4;
|
|
309
|
+
the Figma mock showed 3 at ~180px). The pack tiles flex to share this width. */
|
|
310
|
+
max-width: 700px;
|
|
311
|
+
/* Flex-item auto-minimum can otherwise push the card past the viewport on a narrow screen. */
|
|
312
|
+
min-width: 0;
|
|
313
|
+
/* Never taller than the viewport (100% of the padded overlay): the no-funds state stacks a warning, a
|
|
314
|
+
line list, 4 pack tiles, the total AND the Cancel/Buy pair, which overflows a laptop screen at 100%
|
|
315
|
+
zoom and used to take the CTAs off-screen with it. The body absorbs the difference, and the clip is
|
|
316
|
+
the backstop — a phase that forgets to make itself shrinkable is then visibly cut off at the card's
|
|
317
|
+
edge instead of painting its buttons out on the scrim. */
|
|
318
|
+
max-height: 100%;
|
|
319
|
+
overflow: hidden;
|
|
320
|
+
background: ${s.white};
|
|
321
|
+
border-radius: 16px;
|
|
322
|
+
padding: 12px 16px 16px;
|
|
323
|
+
box-shadow: 0 24px 60px rgba(22, 21, 24, 0.28);
|
|
324
|
+
animation: cart-pop-in 0.16s ease;
|
|
325
|
+
display: flex;
|
|
326
|
+
flex-direction: column;
|
|
327
|
+
gap: 24px;
|
|
328
|
+
|
|
329
|
+
&[data-tall] {
|
|
330
|
+
min-height: 379px;
|
|
331
|
+
justify-content: space-between;
|
|
332
|
+
}
|
|
333
|
+
`,Pt=a.div`
|
|
334
|
+
display: flex;
|
|
335
|
+
flex-direction: column;
|
|
336
|
+
gap: 4px;
|
|
337
|
+
padding-bottom: 16px;
|
|
338
|
+
border-bottom: 1px solid ${s.gray4};
|
|
339
|
+
`,St=a.div`
|
|
340
|
+
display: flex;
|
|
341
|
+
align-items: flex-start;
|
|
342
|
+
justify-content: space-between;
|
|
343
|
+
gap: 8px;
|
|
344
|
+
`,Ft=a.h2`
|
|
345
|
+
margin: 0;
|
|
346
|
+
font-size: 20px;
|
|
347
|
+
font-weight: 700;
|
|
348
|
+
line-height: 1.6;
|
|
349
|
+
color: ${s.text};
|
|
350
|
+
`,Vt=a.button`
|
|
351
|
+
flex-shrink: 0;
|
|
352
|
+
border: 0;
|
|
353
|
+
background: transparent;
|
|
354
|
+
cursor: pointer;
|
|
355
|
+
padding: 2px;
|
|
356
|
+
line-height: 0;
|
|
357
|
+
`,Lt=a.div`
|
|
358
|
+
display: flex;
|
|
359
|
+
align-items: center;
|
|
360
|
+
gap: 4px;
|
|
361
|
+
`,Dt=a.span`
|
|
362
|
+
font-size: 14px;
|
|
363
|
+
font-weight: 600;
|
|
364
|
+
color: ${s.muted1};
|
|
365
|
+
`,Rt=a(M)`
|
|
366
|
+
width: 14px;
|
|
367
|
+
height: 14px;
|
|
368
|
+
background: ${s.text};
|
|
369
|
+
`,qt=a.span`
|
|
370
|
+
font-size: 14px;
|
|
371
|
+
color: ${s.text};
|
|
372
|
+
`,Ot=a.div`
|
|
373
|
+
display: flex;
|
|
374
|
+
flex-direction: column;
|
|
375
|
+
gap: 24px;
|
|
376
|
+
/* Shrink inside a viewport-capped card instead of overflowing it. Anything with its own flexible
|
|
377
|
+
region (e.g. the cart's line list) gives up height first; this scroll is the last resort so the
|
|
378
|
+
CTAs are always reachable on a short screen. */
|
|
379
|
+
min-height: 0;
|
|
380
|
+
overflow-y: auto;
|
|
381
|
+
|
|
382
|
+
/* Processing / loading states centre a single element in a taller body. */
|
|
383
|
+
&[data-processing] {
|
|
384
|
+
flex: 1;
|
|
385
|
+
align-items: center;
|
|
386
|
+
justify-content: center;
|
|
387
|
+
gap: 32px;
|
|
388
|
+
padding: 24px 0;
|
|
389
|
+
}
|
|
390
|
+
`,Xt=a.div`
|
|
391
|
+
display: flex;
|
|
392
|
+
gap: 24px;
|
|
393
|
+
align-items: center;
|
|
394
|
+
|
|
395
|
+
${d.media.maxWidth("mobile")} {
|
|
396
|
+
gap: 12px;
|
|
397
|
+
}
|
|
398
|
+
`,Ht=a.div`
|
|
399
|
+
flex-shrink: 0;
|
|
400
|
+
width: 110px;
|
|
401
|
+
height: 110px;
|
|
402
|
+
background: ${s.media};
|
|
403
|
+
border-radius: 8px;
|
|
404
|
+
display: grid;
|
|
405
|
+
place-items: center;
|
|
406
|
+
overflow: hidden;
|
|
407
|
+
|
|
408
|
+
& img {
|
|
409
|
+
width: 83%;
|
|
410
|
+
height: 83%;
|
|
411
|
+
object-fit: contain;
|
|
412
|
+
filter: drop-shadow(0.7px 2.9px 3.7px rgba(0, 0, 0, 0.1));
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
${d.media.maxWidth("mobile")} {
|
|
416
|
+
width: 80px;
|
|
417
|
+
height: 80px;
|
|
418
|
+
}
|
|
419
|
+
`,Kt=a.div`
|
|
420
|
+
flex: 1;
|
|
421
|
+
min-width: 0;
|
|
422
|
+
display: flex;
|
|
423
|
+
flex-direction: column;
|
|
424
|
+
justify-content: center;
|
|
425
|
+
gap: 4px;
|
|
426
|
+
`,Ut=a.div`
|
|
427
|
+
font-size: 18px;
|
|
428
|
+
font-weight: 700;
|
|
429
|
+
line-height: 1.3;
|
|
430
|
+
color: ${s.text};
|
|
431
|
+
overflow: hidden;
|
|
432
|
+
text-overflow: ellipsis;
|
|
433
|
+
|
|
434
|
+
${d.media.maxWidth("mobile")} {
|
|
435
|
+
font-size: 16px;
|
|
436
|
+
}
|
|
437
|
+
`,Qt=a(he)`
|
|
438
|
+
font-size: 12px;
|
|
439
|
+
line-height: 1.43;
|
|
440
|
+
color: ${s.muted};
|
|
441
|
+
`,Zt=a.div`
|
|
442
|
+
display: flex;
|
|
443
|
+
align-items: center;
|
|
444
|
+
gap: 6px;
|
|
445
|
+
margin-top: 4px;
|
|
446
|
+
|
|
447
|
+
& span {
|
|
448
|
+
font-size: 18px;
|
|
449
|
+
font-weight: 700;
|
|
450
|
+
color: ${s.text2};
|
|
451
|
+
}
|
|
452
|
+
`,Jt=a(M)`
|
|
453
|
+
width: 18px;
|
|
454
|
+
height: 18px;
|
|
455
|
+
background: ${s.text2};
|
|
456
|
+
`,Gt=a.div`
|
|
457
|
+
display: flex;
|
|
458
|
+
align-items: flex-start;
|
|
459
|
+
gap: 12px;
|
|
460
|
+
background: rgba(255, 162, 90, 0.3);
|
|
461
|
+
border-radius: ${de.btn};
|
|
462
|
+
padding: 16px;
|
|
463
|
+
|
|
464
|
+
& > svg {
|
|
465
|
+
flex-shrink: 0;
|
|
466
|
+
}
|
|
467
|
+
`,Yt=a.p`
|
|
468
|
+
margin: 0;
|
|
469
|
+
font-size: 14px;
|
|
470
|
+
line-height: 1.334;
|
|
471
|
+
color: ${s.text2};
|
|
472
|
+
|
|
473
|
+
& b {
|
|
474
|
+
font-weight: 700;
|
|
475
|
+
}
|
|
476
|
+
`,_t=a.a`
|
|
477
|
+
display: inline-block;
|
|
478
|
+
margin-top: 4px;
|
|
479
|
+
font-size: 14px;
|
|
480
|
+
font-weight: 600;
|
|
481
|
+
line-height: 1.334;
|
|
482
|
+
color: ${s.text2};
|
|
483
|
+
text-decoration: underline;
|
|
484
|
+
|
|
485
|
+
&:hover {
|
|
486
|
+
color: ${s.accent};
|
|
487
|
+
}
|
|
488
|
+
`,ea=a.div`
|
|
489
|
+
display: flex;
|
|
490
|
+
flex-wrap: wrap;
|
|
491
|
+
gap: 12px;
|
|
492
|
+
margin: -6px 0;
|
|
493
|
+
padding: 6px;
|
|
494
|
+
`,ta=a.button`
|
|
495
|
+
/* Wide enough to stay readable, so a narrow card wraps the tiles onto a second row instead of
|
|
496
|
+
squeezing four of them into one. */
|
|
497
|
+
flex: 1 1 140px;
|
|
498
|
+
height: 109px;
|
|
499
|
+
border: 1px solid ${s.muted2};
|
|
500
|
+
background: ${s.media};
|
|
501
|
+
border-radius: 16px;
|
|
502
|
+
display: flex;
|
|
503
|
+
align-items: center;
|
|
504
|
+
justify-content: center;
|
|
505
|
+
gap: 8px;
|
|
506
|
+
cursor: pointer;
|
|
507
|
+
padding: 3px;
|
|
508
|
+
transition:
|
|
509
|
+
transform 0.12s ease,
|
|
510
|
+
border-color 0.12s ease,
|
|
511
|
+
border-width 0.12s ease,
|
|
512
|
+
padding 0.12s ease;
|
|
513
|
+
|
|
514
|
+
/* The buy gradient AS the border: the flat fill is clipped to the padding box and the gradient to the
|
|
515
|
+
border box, which paints a gradient ring on the tile's own radius with no wrapper element (a
|
|
516
|
+
gradient is not a valid border-color). */
|
|
517
|
+
&:hover:not(:disabled),
|
|
518
|
+
&[data-on] {
|
|
519
|
+
padding: 0;
|
|
520
|
+
border-color: transparent;
|
|
521
|
+
border-width: 4px;
|
|
522
|
+
background-image: linear-gradient(${s.media}, ${s.media}), ${L.buyBtn};
|
|
523
|
+
background-origin: border-box;
|
|
524
|
+
background-clip: padding-box, border-box;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/* Selected also lifts; hover alone is just the ring. */
|
|
528
|
+
&[data-on] {
|
|
529
|
+
transform: scale(1.03);
|
|
530
|
+
}
|
|
531
|
+
`,aa=a.img`
|
|
532
|
+
width: 24px;
|
|
533
|
+
height: 26px;
|
|
534
|
+
flex: none;
|
|
535
|
+
`,na=a.span`
|
|
536
|
+
font-size: 24px;
|
|
537
|
+
font-weight: 500;
|
|
538
|
+
color: ${s.text};
|
|
539
|
+
`,ia=a.span`
|
|
540
|
+
font-size: 14px;
|
|
541
|
+
color: ${s.text};
|
|
542
|
+
`,oa=a.div`
|
|
543
|
+
display: flex;
|
|
544
|
+
align-items: center;
|
|
545
|
+
justify-content: space-between;
|
|
546
|
+
border-top: 1px solid ${s.gray4};
|
|
547
|
+
padding-top: 12px;
|
|
548
|
+
`,ra=a.div`
|
|
549
|
+
display: flex;
|
|
550
|
+
align-items: center;
|
|
551
|
+
gap: 8px;
|
|
552
|
+
font-size: 24px;
|
|
553
|
+
font-weight: 700;
|
|
554
|
+
color: ${s.text};
|
|
555
|
+
`,sa=a(M)`
|
|
556
|
+
width: 30px;
|
|
557
|
+
height: 30px;
|
|
558
|
+
background: ${s.text};
|
|
559
|
+
`,da=a.span`
|
|
560
|
+
font-size: 14px;
|
|
561
|
+
font-weight: 600;
|
|
562
|
+
color: ${s.muted1};
|
|
563
|
+
`,ca=a.div`
|
|
564
|
+
position: sticky;
|
|
565
|
+
bottom: 0;
|
|
566
|
+
display: flex;
|
|
567
|
+
gap: 12px;
|
|
568
|
+
margin-top: -8px;
|
|
569
|
+
padding-top: 8px;
|
|
570
|
+
background: ${s.white};
|
|
571
|
+
`,la=a.button`
|
|
572
|
+
flex: 1;
|
|
573
|
+
/* Let the CTAs shrink so their min-content can't widen the modal past the viewport on mobile. */
|
|
574
|
+
min-width: 0;
|
|
575
|
+
height: 46px;
|
|
576
|
+
border-radius: ${de.card};
|
|
577
|
+
border: 0;
|
|
578
|
+
cursor: pointer;
|
|
579
|
+
font-size: 15px;
|
|
580
|
+
font-weight: 600;
|
|
581
|
+
letter-spacing: 0.46px;
|
|
582
|
+
text-transform: uppercase;
|
|
583
|
+
display: inline-flex;
|
|
584
|
+
align-items: center;
|
|
585
|
+
justify-content: center;
|
|
586
|
+
gap: 8px;
|
|
587
|
+
|
|
588
|
+
&[data-full] {
|
|
589
|
+
width: 100%;
|
|
590
|
+
}
|
|
591
|
+
/* The design system's primary fill (Figma 738:53266 "BUY Button") — the same gradient the cart's
|
|
592
|
+
CHECKOUT carries, so the two ends of the buy flow match. */
|
|
593
|
+
&[data-variant='gradient'] {
|
|
594
|
+
background: ${L.buyBtn};
|
|
595
|
+
color: ${s.softWhite};
|
|
596
|
+
}
|
|
597
|
+
&[data-variant='gradient']:hover:not(:disabled),
|
|
598
|
+
&[data-variant='gradient']:active:not(:disabled) {
|
|
599
|
+
background-image: linear-gradient(${s.dclRed}, ${s.dclRed});
|
|
600
|
+
}
|
|
601
|
+
&[data-variant='outline'] {
|
|
602
|
+
background: transparent;
|
|
603
|
+
border: 0.5px solid ${s.text};
|
|
604
|
+
color: ${s.text2};
|
|
605
|
+
font-size: 13px;
|
|
606
|
+
}
|
|
607
|
+
/* Figma's outlined hover (738:53251), which on this light card is the readable half of the pair: the
|
|
608
|
+
white-fill hover the dark-field buttons take would be invisible here. Same treatment as the
|
|
609
|
+
drawer's dismissing CTA (CartPopover ctaCss) — the two sit in one flow. */
|
|
610
|
+
&[data-variant='outline']:hover:not(:disabled) {
|
|
611
|
+
background: ${s.text2};
|
|
612
|
+
color: ${s.softWhite};
|
|
613
|
+
}
|
|
614
|
+
&[data-variant='ruby'] {
|
|
615
|
+
background: ${s.dclRed};
|
|
616
|
+
color: ${s.softWhite};
|
|
617
|
+
font-size: 13px;
|
|
618
|
+
letter-spacing: 0.61px;
|
|
619
|
+
}
|
|
620
|
+
// Solid accent fill (the error state's "Try again").
|
|
621
|
+
&[data-variant='purple'] {
|
|
622
|
+
background: ${s.accent};
|
|
623
|
+
color: ${s.softWhite};
|
|
624
|
+
font-size: 13px;
|
|
625
|
+
}
|
|
626
|
+
&:hover:not(:disabled),
|
|
627
|
+
&[data-variant='purple']:hover:not(:disabled) {
|
|
628
|
+
background: ${s.accentHover};
|
|
629
|
+
}
|
|
630
|
+
&:disabled {
|
|
631
|
+
opacity: 0.6;
|
|
632
|
+
cursor: default;
|
|
633
|
+
}
|
|
634
|
+
`,pa=a.img`
|
|
635
|
+
width: 61px;
|
|
636
|
+
height: 61px;
|
|
637
|
+
`,ha=a.div`
|
|
638
|
+
display: flex;
|
|
639
|
+
flex-direction: column;
|
|
640
|
+
align-items: center;
|
|
641
|
+
gap: 16px;
|
|
642
|
+
background: rgba(255, 201, 213, 0.5);
|
|
643
|
+
border-radius: 16px;
|
|
644
|
+
padding: 24px 16px;
|
|
645
|
+
`,ua=a.img`
|
|
646
|
+
width: 64px;
|
|
647
|
+
height: 80px;
|
|
648
|
+
object-fit: contain;
|
|
649
|
+
`,xa=a.p`
|
|
650
|
+
margin: 0;
|
|
651
|
+
text-align: center;
|
|
652
|
+
font-size: 20px;
|
|
653
|
+
line-height: 1.334;
|
|
654
|
+
font-weight: 400;
|
|
655
|
+
color: ${s.text2};
|
|
656
|
+
|
|
657
|
+
& b {
|
|
658
|
+
font-weight: 700;
|
|
659
|
+
}
|
|
660
|
+
`,ga=a.div`
|
|
661
|
+
font-size: 20px;
|
|
662
|
+
font-weight: 700;
|
|
663
|
+
color: ${s.text2};
|
|
664
|
+
text-align: center;
|
|
665
|
+
`,fa=a.div`
|
|
666
|
+
width: 100%;
|
|
667
|
+
max-width: 456px;
|
|
668
|
+
height: 12px;
|
|
669
|
+
background: ${s.media};
|
|
670
|
+
border-radius: 100px;
|
|
671
|
+
overflow: hidden;
|
|
672
|
+
`,ma=a.span`
|
|
673
|
+
display: block;
|
|
674
|
+
height: 100%;
|
|
675
|
+
width: 40%;
|
|
676
|
+
border-radius: 100px;
|
|
677
|
+
background: ${L.amethyst};
|
|
678
|
+
animation: buy-modal-progress 1.1s ease-in-out infinite;
|
|
679
|
+
|
|
680
|
+
@keyframes buy-modal-progress {
|
|
681
|
+
0% {
|
|
682
|
+
transform: translateX(-120%);
|
|
683
|
+
}
|
|
684
|
+
100% {
|
|
685
|
+
transform: translateX(320%);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
&[data-step] {
|
|
690
|
+
animation: none;
|
|
691
|
+
min-width: 12px;
|
|
692
|
+
transition: width 0.35s ease;
|
|
693
|
+
}
|
|
694
|
+
`,ba=a.div`
|
|
695
|
+
display: flex;
|
|
696
|
+
flex-direction: column;
|
|
697
|
+
align-items: center;
|
|
698
|
+
gap: 16px;
|
|
699
|
+
background: rgba(193, 238, 207, 0.5);
|
|
700
|
+
border-radius: 16px;
|
|
701
|
+
padding: 24px 16px;
|
|
702
|
+
|
|
703
|
+
&[data-wide] {
|
|
704
|
+
flex-direction: row;
|
|
705
|
+
align-items: center;
|
|
706
|
+
gap: 24px;
|
|
707
|
+
padding: 16px 24px;
|
|
708
|
+
}
|
|
709
|
+
@media (max-width: 600px) {
|
|
710
|
+
&[data-wide] {
|
|
711
|
+
flex-direction: column;
|
|
712
|
+
gap: 12px;
|
|
713
|
+
padding: 16px;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
`,wa=a.p`
|
|
717
|
+
margin: 0;
|
|
718
|
+
font-size: 20px;
|
|
719
|
+
line-height: 1.334;
|
|
720
|
+
color: ${s.text2};
|
|
721
|
+
text-align: center;
|
|
722
|
+
|
|
723
|
+
& b {
|
|
724
|
+
font-weight: 700;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
&[data-wide] {
|
|
728
|
+
text-align: left;
|
|
729
|
+
font-size: 18px;
|
|
730
|
+
}
|
|
731
|
+
@media (max-width: 600px) {
|
|
732
|
+
&[data-wide] {
|
|
733
|
+
text-align: center;
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
`,{colors:D,media:T}=d,Ge=a.section`
|
|
737
|
+
margin-top: 40px;
|
|
738
|
+
`,Ye=a.div`
|
|
739
|
+
display: flex;
|
|
740
|
+
align-items: center;
|
|
741
|
+
justify-content: space-between;
|
|
742
|
+
margin-bottom: 20px;
|
|
743
|
+
`,_e=a.h2`
|
|
744
|
+
font-size: 22px;
|
|
745
|
+
font-weight: 700;
|
|
746
|
+
color: ${D.softWhite};
|
|
747
|
+
`,et=a.button`
|
|
748
|
+
display: inline-flex;
|
|
749
|
+
align-items: center;
|
|
750
|
+
gap: 4px;
|
|
751
|
+
background: none;
|
|
752
|
+
border: 0;
|
|
753
|
+
padding: 0;
|
|
754
|
+
color: ${D.softWhite};
|
|
755
|
+
font-weight: 700;
|
|
756
|
+
font-size: 13px;
|
|
757
|
+
letter-spacing: 0.046em;
|
|
758
|
+
text-transform: uppercase;
|
|
759
|
+
cursor: pointer;
|
|
760
|
+
white-space: nowrap;
|
|
761
|
+
|
|
762
|
+
&:hover {
|
|
763
|
+
text-decoration: underline;
|
|
764
|
+
}
|
|
765
|
+
`,tt=a(K)`
|
|
766
|
+
transform: rotate(-90deg);
|
|
767
|
+
`,at=a.div`
|
|
768
|
+
position: relative;
|
|
769
|
+
`,H=a.button`
|
|
770
|
+
position: absolute;
|
|
771
|
+
top: 112px;
|
|
772
|
+
transform: translateY(-50%);
|
|
773
|
+
z-index: 5;
|
|
774
|
+
width: 53px;
|
|
775
|
+
height: 53px;
|
|
776
|
+
padding: 0;
|
|
777
|
+
border: 0;
|
|
778
|
+
background: transparent;
|
|
779
|
+
cursor: pointer;
|
|
780
|
+
filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
|
|
781
|
+
transition:
|
|
782
|
+
transform 0.15s ease,
|
|
783
|
+
filter 0.15s ease,
|
|
784
|
+
opacity 0.15s ease;
|
|
785
|
+
|
|
786
|
+
& img {
|
|
787
|
+
display: block;
|
|
788
|
+
width: 100%;
|
|
789
|
+
height: 100%;
|
|
790
|
+
}
|
|
791
|
+
// Sit the arrows in the page gutter (aligned to the nav's 54px), not over the cards — at -40px their
|
|
792
|
+
// inner edge landed ~13px onto the first/last card.
|
|
793
|
+
&[data-side='left'] {
|
|
794
|
+
left: -53px;
|
|
795
|
+
}
|
|
796
|
+
&[data-side='right'] {
|
|
797
|
+
right: -53px;
|
|
798
|
+
}
|
|
799
|
+
&[data-side='left'] img {
|
|
800
|
+
transform: scaleX(-1);
|
|
801
|
+
}
|
|
802
|
+
&:hover:not(:disabled) {
|
|
803
|
+
transform: translateY(-50%) scale(1.07);
|
|
804
|
+
}
|
|
805
|
+
&:disabled {
|
|
806
|
+
opacity: 0;
|
|
807
|
+
pointer-events: none;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
@media (prefers-reduced-motion: reduce) {
|
|
811
|
+
transition: none;
|
|
812
|
+
}
|
|
813
|
+
${T.maxWidth("lg")} {
|
|
814
|
+
display: none;
|
|
815
|
+
}
|
|
816
|
+
`,nt=a.div`
|
|
817
|
+
display: grid;
|
|
818
|
+
grid-auto-flow: column;
|
|
819
|
+
grid-auto-columns: calc((100% - 64px) / 5);
|
|
820
|
+
gap: 16px;
|
|
821
|
+
overflow-x: auto;
|
|
822
|
+
overflow-y: hidden;
|
|
823
|
+
padding: 12px 14px;
|
|
824
|
+
margin-left: -14px;
|
|
825
|
+
scroll-padding-inline: 14px;
|
|
826
|
+
scroll-snap-type: x mandatory;
|
|
827
|
+
scrollbar-width: none;
|
|
828
|
+
|
|
829
|
+
&::-webkit-scrollbar {
|
|
830
|
+
display: none;
|
|
831
|
+
}
|
|
832
|
+
& > * {
|
|
833
|
+
scroll-snap-align: start;
|
|
834
|
+
}
|
|
835
|
+
${T.maxWidth("xl")} {
|
|
836
|
+
grid-auto-columns: calc((100% - 48px) / 4);
|
|
837
|
+
}
|
|
838
|
+
${T.maxWidth("lg")} {
|
|
839
|
+
grid-auto-columns: calc((100% - 32px) / 3);
|
|
840
|
+
}
|
|
841
|
+
${T.maxWidth("sm")} {
|
|
842
|
+
grid-auto-columns: calc((100% - 16px) / 2);
|
|
843
|
+
}
|
|
844
|
+
`,it=a.div`
|
|
845
|
+
display: flex;
|
|
846
|
+
align-items: center;
|
|
847
|
+
justify-content: center;
|
|
848
|
+
gap: 8px;
|
|
849
|
+
margin-top: 18px;
|
|
850
|
+
`,ot=a.button`
|
|
851
|
+
width: 10px;
|
|
852
|
+
height: 10px;
|
|
853
|
+
border-radius: 50%;
|
|
854
|
+
border: 0;
|
|
855
|
+
padding: 0;
|
|
856
|
+
/* Figma "Carousel Dots" (verbatim): rgba(0,0,0,0.5) at rest, Brand/Orange active. */
|
|
857
|
+
background: rgba(0, 0, 0, 0.5);
|
|
858
|
+
cursor: pointer;
|
|
859
|
+
transition:
|
|
860
|
+
opacity 0.12s ease,
|
|
861
|
+
background 0.12s ease,
|
|
862
|
+
transform 0.12s ease;
|
|
863
|
+
|
|
864
|
+
&:hover {
|
|
865
|
+
opacity: 0.8;
|
|
866
|
+
}
|
|
867
|
+
&[data-active] {
|
|
868
|
+
background: ${D.media};
|
|
869
|
+
opacity: 1;
|
|
870
|
+
transform: scale(1.1);
|
|
871
|
+
}
|
|
872
|
+
`;function ya({title:e,items:t,onViewAll:i}){const r=k.useRef(null),[l,c]=k.useState(1),[h,w]=k.useState(0),[g,u]=k.useState(!0),[p,y]=k.useState(!1),o=k.useCallback(()=>{const x=r.current;if(!x)return;const{scrollLeft:m,scrollWidth:R,clientWidth:I}=x,q=Math.max(1,Math.ceil(R/I));c(q),w(Math.min(q-1,Math.round(m/I))),u(m<=1),y(m+I>=R-1)},[]);if(k.useEffect(()=>{o();const x=r.current;if(x)return x.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",o),()=>{x.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[o,t.length]),t.length===0)return null;function f(x){const m=r.current;m&&m.scrollBy({left:x*m.clientWidth,behavior:"smooth"})}function v(x){const m=r.current;m&&m.scrollTo({left:x*m.clientWidth,behavior:"smooth"})}return n.jsxs(Ge,{"data-testid":"carousel",children:[n.jsxs(Ye,{children:[n.jsx(_e,{children:e}),i?n.jsxs(et,{onClick:i,children:[b("collectionCarousel.viewAll"),n.jsx(tt,{name:"chevron-down",size:16})]}):null]}),n.jsxs(at,{children:[n.jsx(H,{"data-side":"left",onClick:()=>f(-1),"aria-label":b("collectionCarousel.scrollLeft"),disabled:g,children:n.jsx("img",{src:O,alt:"","aria-hidden":!0})}),n.jsx(nt,{ref:r,children:t.map(x=>n.jsx(ue,{item:x},x.id))}),n.jsx(H,{"data-side":"right",onClick:()=>f(1),"aria-label":b("collectionCarousel.scrollRight"),disabled:p,children:n.jsx("img",{src:O,alt:"","aria-hidden":!0})})]}),l>1?n.jsx(it,{"aria-label":b("collectionCarousel.pages"),children:Array.from({length:l}).map((x,m)=>n.jsx(ot,{"data-active":m===h||void 0,"aria-label":b("collectionCarousel.goToPage",{page:m+1}),"aria-current":m===h?"true":void 0,onClick:()=>v(m)},m))}):null]})}export{Wt as $,Xt as A,Lt as B,Nt as C,ta as D,aa as E,jt as F,na as G,Pt as H,ia as I,oa as J,ra as K,pa as L,It as M,sa as N,da as O,yt as P,ft as Q,gt as R,Et as S,Ft as T,ya as U,kt as V,Gt as W,Vt as X,E as Y,xt as Z,vt as _,St as a,oe as a0,mt as a1,Ce as a2,Ze as a3,se as a4,$ as a5,ba as a6,wa as a7,Mt as a8,At as a9,bt as aa,zt as ab,$t as ac,Tt as b,Dt as c,Rt as d,qt as e,Ot as f,ha as g,ua as h,Ct as i,xa as j,ca as k,la as l,wt as m,ga as n,fa as o,ma as p,Bt as q,Yt as r,_t as s,Ht as t,Kt as u,Ut as v,Qt as w,Zt as x,Jt as y,ea as z};
|