@lockerverse/react 0.2.67 → 0.2.69
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/README.md
CHANGED
|
@@ -125,10 +125,12 @@ custom amounts, or multiple Products.
|
|
|
125
125
|
## Donate launcher
|
|
126
126
|
|
|
127
127
|
`LockerverseDonateLauncher` turns an existing payment widget into a native
|
|
128
|
-
React dialog.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
React dialog. The launcher selects its controls from each Product's existing
|
|
129
|
+
capabilities. Visitors can set quantities for fixed one-time Products and add
|
|
130
|
+
an inline amount for custom one-time Products. The launcher combines these
|
|
131
|
+
one-time choices in one checkout. Monthly and annual Products are exclusive:
|
|
132
|
+
the visitor selects one tier before the same `LockerversePayment` form opens in
|
|
133
|
+
subscription mode.
|
|
132
134
|
|
|
133
135
|
```tsx
|
|
134
136
|
import { LockerverseDonateLauncher } from "@lockerverse/react/donate-launcher";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lockerverse-donate-launcher.d.ts","names":[],"sources":["../src/lockerverse-donate-launcher.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"lockerverse-donate-launcher.d.ts","names":[],"sources":["../src/lockerverse-donate-launcher.tsx"],"mappings":";;iBAwjBgB,4BACd,aACA,aACG,gBACF,iDAA8B,IAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./lockerverse-payment.js";import{Dialog as t}from"@base-ui/react/dialog";import{createLockerverseCheckoutClient as n}from"@lockerverse/sdk/checkout";import{
|
|
1
|
+
import{t as e}from"./lockerverse-payment.js";import{Dialog as t}from"@base-ui/react/dialog";import{createLockerverseCheckoutClient as n}from"@lockerverse/sdk/checkout";import{createElement as r,useEffect as i,useState as a}from"react";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";const l=new Intl.NumberFormat(`en-US`,{currency:`USD`,style:`currency`}),u=/^(?:0|[1-9]\d*)(?:\.\d{1,2})?$/,d=[1e3,2500,5e3,1e4];function f(e){if(!u.test(e))return null;let t=Math.round(Number(e)*100);return Number.isSafeInteger(t)&&t>0?t:null}function p(e,t){let n=``;return t===`monthly`&&(n=`/month`),t===`annually`&&(n=`/year`),`${l.format(e/100)}${n}`}function m({customAmounts:e,product:t,quantities:n,recurringProductId:r,setCustomAmounts:i,setQuantities:a,setRecurringProductId:o}){let u=n[t.id]??0;if(t.pricingMode===`fixed`&&t.paymentOption===`one-time`){let e=Math.min(t.maximumQuantity??1/0,t.inventoryQuantity??1/0);return c(`span`,{className:`lockerverse-launcher__quantity`,children:[s(`button`,{"aria-label":`Decrease ${t.name} quantity`,disabled:u===0,onClick:()=>{o(null),a(e=>{let n=e[t.id]??0,r=t.minimumQuantity??1;return{...e,[t.id]:n<=r?0:n-1}})},type:`button`,children:`−`}),s(`output`,{"aria-label":`${t.name} quantity`,children:u}),s(`button`,{"aria-label":`Increase ${t.name} quantity`,disabled:u>=e,onClick:()=>{o(null),a(e=>{let n=e[t.id]??0;return{...e,[t.id]:n===0?t.minimumQuantity??1:n+1}})},type:`button`,children:`+`})]})}return t.pricingMode===`custom`&&t.paymentOption===`one-time`?c(`span`,{className:`lockerverse-launcher__custom-amount`,children:[s(`span`,{"aria-hidden":`true`,children:`$`}),s(`input`,{"aria-label":`${t.name} amount`,min:(t.minimumAmountCents??1)/100,name:`amount-${t.slug}`,onChange:e=>{o(null),i(n=>({...n,[t.id]:e.target.value}))},placeholder:`0.00`,step:`0.01`,type:`number`,value:e[t.id]??``}),t.minimumAmountCents===null?null:c(`small`,{children:[`Minimum `,l.format(t.minimumAmountCents/100)]})]}):s(`button`,{"aria-label":`Select ${t.name}`,"aria-pressed":r===t.id,className:`lockerverse-launcher__select`,onClick:()=>{a({}),i({}),o(e=>e===t.id?null:t.id)},type:`button`,children:`Select`})}function h({variant:e=`default`,...t}){let{customAmounts:n,product:r,quantities:i,recurringProductId:a}=t,o=f(n[r.id]??``),l=a===r.id||r.paymentOption===`one-time`&&(r.pricingMode===`fixed`&&(i[r.id]??0)>0||r.pricingMode===`custom`&&o!==null&&(r.minimumAmountCents===null||o>=r.minimumAmountCents));return c(`article`,{className:`lockerverse-launcher__product lockerverse-launcher__product--${e}`,"data-selected":l||void 0,children:[c(`span`,{className:`lockerverse-launcher__product-copy`,children:[s(`strong`,{className:`lockerverse-launcher__product-name`,children:r.name}),r.description?s(`small`,{children:r.description}):null,r.amountCents===null?null:s(`span`,{className:`lockerverse-launcher__product-price`,children:p(r.amountCents,r.paymentOption)})]}),s(m,{...t})]})}function g({customAmounts:e,product:t,setCustomAmounts:n,setRecurringProductId:r}){let i=e[t.id]??``,a=f(i),o=d.filter(e=>t.minimumAmountCents===null||e>=t.minimumAmountCents),u=o.includes(a??0),p=e=>{r(null),n(n=>({...n,[t.id]:e}))};return s(`div`,{className:`lockerverse-launcher__donation-option`,children:c(`fieldset`,{className:`lockerverse-launcher__donation-choices`,children:[c(`legend`,{className:`lockerverse-launcher__sr-only`,children:[t.name,` amount`]}),s(`button`,{"aria-pressed":i===``,onClick:()=>p(``),type:`button`,children:`No thanks`}),o.map(e=>s(`button`,{"aria-pressed":a===e,onClick:()=>p(String(e/100)),type:`button`,children:l.format(e/100).replace(`.00`,``)},e)),s(`label`,{className:`lockerverse-launcher__donation-other`,"data-selected":i!==``&&!u||void 0,children:s(`input`,{"aria-label":`${t.name} amount`,min:(t.minimumAmountCents??1)/100,name:`amount-${t.slug}`,onChange:e=>p(e.target.value),placeholder:`Other $`,step:`0.01`,type:`number`,value:u?``:i})})]})})}function _({products:e,variant:t=`default`,...n}){return s(`div`,{className:`lockerverse-launcher__product-list`,children:e.map(e=>t===`donation`?r(g,{...n,key:e.id,product:e}):r(h,{...n,key:e.id,product:e,variant:t}))})}function v(e,t){let n=0,r=0;for(let i of t){let t=e.products.find(e=>e.slug===i.productSlug);if(t){if(`quantity`in i){n+=i.quantity,r+=(t.amountCents??0)*i.quantity;continue}n+=1,r+=`amountCents`in i?i.amountCents:t.amountCents??0}}return{amountCents:r,itemCount:n}}function y(){return s(`div`,{"aria-label":`Loading donation options`,className:`lockerverse-launcher__loading`,role:`status`,children:[0,1,2].map(e=>s(`span`,{"aria-hidden":`true`,className:`lockerverse-launcher__loading-row`},e))})}function b(e,t,n,r){if(r){let t=e.products.find(e=>e.id===r&&e.paymentOption!==`one-time`);return t?[{productSlug:t.slug}]:[]}return e.products.flatMap(e=>{let r=t[e.id]??0;if(e.pricingMode===`fixed`&&e.paymentOption===`one-time`&&r>0)return[{productSlug:e.slug,quantity:r}];let i=f(n[e.id]??``);return e.pricingMode===`custom`&&e.paymentOption===`one-time`&&i!==null&&(e.minimumAmountCents===null||i>=e.minimumAmountCents)?[{amountCents:i,productSlug:e.slug}]:[]})}function x({catalog:e,onContinue:t,...n}){let r=b(e,n.quantities,n.customAmounts,n.recurringProductId),i=v(e,r),a=e.products.filter(e=>e.paymentOption===`one-time`&&e.pricingMode===`custom`),o=e.products.filter(e=>!a.includes(e));return c(`form`,{className:`lockerverse-launcher__products`,onSubmit:e=>{e.preventDefault(),r.length>0&&t(r)},children:[o.length>0?s(`section`,{className:`lockerverse-launcher__section`,children:s(_,{...n,products:o})}):null,a.length>0?c(`section`,{className:`lockerverse-launcher__donation`,children:[c(`header`,{className:`lockerverse-launcher__section-header`,children:[s(`h3`,{children:`Add a donation`}),s(`p`,{children:`Choose an amount to add to this order.`})]}),s(_,{...n,products:a,variant:`donation`})]}):null,e.products.length>0?c(`footer`,{className:`lockerverse-launcher__footer`,children:[c(`p`,{"aria-live":`polite`,className:`lockerverse-launcher__summary`,children:[s(`span`,{children:i.itemCount===0?`No items selected`:`${i.itemCount} ${i.itemCount===1?`item`:`items`} selected`}),i.itemCount===0?null:s(`strong`,{children:l.format(i.amountCents/100)})]}),s(`button`,{className:`lockerverse-launcher__continue`,disabled:r.length===0,type:`submit`,children:`Continue`})]}):null]})}function S({onEdit:t,paymentProps:n,selection:r,style:i}){return c(`div`,{className:`lockerverse-launcher__checkout`,children:[s(`header`,{className:`lockerverse-launcher__checkout-toolbar`,children:s(`button`,{className:`lockerverse-launcher__back`,onClick:t,type:`button`,children:`Edit order`})}),s(e,{...n,selection:r,style:i})]})}function C({catalog:e,checkout:n}){return n?c(o,{children:[s(t.Title,{className:`lockerverse-launcher__sr-only`,children:`Checkout`}),s(t.Description,{className:`lockerverse-launcher__sr-only`,children:`Review the order and complete payment.`})]}):e?c(`header`,{className:`lockerverse-launcher__header`,children:[e.community?c(`div`,{className:`lockerverse-launcher__brand`,children:[e.community.imageUrl?s(`img`,{alt:`${e.community.name} logo`,height:`28`,src:e.community.imageUrl,width:`28`}):null,s(`span`,{children:e.community.name})]}):null,s(t.Title,{className:`lockerverse-launcher__title`,children:e.widget.title??e.widget.name}),s(t.Description,{className:`lockerverse-launcher__description`,children:e.widget.description??`Choose your options, then continue to checkout.`})]}):c(`header`,{className:`lockerverse-launcher__header`,children:[s(t.Title,{className:`lockerverse-launcher__title`,children:`Donate`}),s(t.Description,{className:`lockerverse-launcher__description`,children:`Choose your options, then continue to checkout.`})]})}function w({buttonLabel:e=`Donate`,position:r=`inline`,...o}){let[l,u]=a(!1),[d,f]=a(null),[p,m]=a(null),[h,g]=a({}),[_,v]=a({}),[b,w]=a(null),[T,E]=a(!1),[D,O]=a(0),{apiBaseUrl:k,communitySlug:A,environment:j,fetch:M,onError:N,requestTimeoutMs:P,sentryDsn:F,widgetSlug:I}=o,L={...d?.community?{"--lockerverse-accent":d.community.accentColor}:{},...o.style};i(()=>{if(!(l&&d===null))return;let e=!0;return n(o).load().then(t=>{e&&(f(t),E(!1))}).catch(()=>{e&&E(!0)}),()=>{e=!1}},[k,d,A,j,M,D,N,l,P,F,I]);let R=s(y,{});return T&&(R=c(`div`,{role:`alert`,children:[s(`p`,{children:`Unable to load donation options.`}),s(`button`,{onClick:()=>{E(!1),O(e=>e+1)},type:`button`,children:`Retry`})]})),d&&(R=s(x,{catalog:d,customAmounts:h,onContinue:m,quantities:_,recurringProductId:b,setCustomAmounts:g,setQuantities:v,setRecurringProductId:w})),p&&(R=s(S,{onEdit:()=>m(null),paymentProps:o,selection:p,style:L})),c(t.Root,{onOpenChange:u,open:l,children:[s(t.Trigger,{className:`lockerverse-launcher lockerverse-launcher--${r}`,"data-lockerverse-theme":o.theme??`dark`,style:L,children:e}),c(t.Portal,{children:[s(t.Backdrop,{className:`lockerverse-launcher__backdrop`}),s(t.Viewport,{className:`lockerverse-launcher__viewport`,children:c(t.Popup,{className:`lockerverse-launcher__dialog`,"data-lockerverse-theme":o.theme??`dark`,style:L,children:[s(C,{catalog:d,checkout:p!==null}),s(t.Close,{"aria-label":`Close donation dialog`,className:`lockerverse-launcher__close`,children:s(`span`,{"aria-hidden":`true`,children:`×`})}),R]})})]})]})}export{w as t};
|
|
2
2
|
//# sourceMappingURL=lockerverse-donate-launcher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lockerverse-donate-launcher.js","names":[],"sources":["../src/lockerverse-donate-launcher.tsx"],"sourcesContent":["import { Dialog } from \"@base-ui/react/dialog\";\nimport {\n createLockerverseCheckoutClient,\n type LockerverseCatalog,\n} from \"@lockerverse/sdk/checkout\";\nimport { type ReactNode, useEffect, useId, useState } from \"react\";\n\nimport { LockerversePayment } from \"./lockerverse-payment.tsx\";\nimport type {\n LockerverseDonateLauncherProps,\n LockerversePaymentSelectionItem,\n} from \"./types.ts\";\n\nconst usd = new Intl.NumberFormat(\"en-US\", {\n currency: \"USD\",\n style: \"currency\",\n});\n\nexport function LockerverseDonateLauncher({\n buttonLabel = \"Donate\",\n position = \"inline\",\n ...paymentProps\n}: LockerverseDonateLauncherProps) {\n const amountInputId = useId();\n const [open, setOpen] = useState(false);\n const [catalog, setCatalog] = useState<LockerverseCatalog | null>(null);\n const [selection, setSelection] = useState<\n LockerversePaymentSelectionItem[] | null\n >(null);\n const [customProduct, setCustomProduct] = useState<\n LockerverseCatalog[\"products\"][number] | null\n >(null);\n const [customAmount, setCustomAmount] = useState(\"\");\n const [loadError, setLoadError] = useState(false);\n const [loadRevision, setLoadRevision] = useState(0);\n const {\n apiBaseUrl,\n communitySlug,\n environment,\n fetch,\n onError,\n requestTimeoutMs,\n sentryDsn,\n widgetSlug,\n } = paymentProps;\n\n useEffect(() => {\n if (!(open && catalog === null)) {\n return;\n }\n let active = true;\n const client = createLockerverseCheckoutClient(paymentProps);\n client\n .load()\n .then((nextCatalog) => {\n if (active) {\n setCatalog(nextCatalog);\n setLoadError(false);\n }\n })\n .catch(() => {\n if (active) {\n setLoadError(true);\n }\n });\n return () => {\n active = false;\n };\n }, [\n apiBaseUrl,\n catalog,\n communitySlug,\n environment,\n fetch,\n loadRevision,\n onError,\n open,\n requestTimeoutMs,\n sentryDsn,\n widgetSlug,\n ]);\n\n let content: ReactNode = <p role=\"status\">Loading donation options...</p>;\n if (loadError) {\n content = (\n <div role=\"alert\">\n <p>Unable to load donation options.</p>\n <button\n onClick={() => {\n setLoadError(false);\n setLoadRevision((revision) => revision + 1);\n }}\n type=\"button\"\n >\n Retry\n </button>\n </div>\n );\n }\n if (catalog) {\n content = (\n <div className=\"lockerverse-launcher__products\">\n {catalog.products.map((product) => (\n <button\n className=\"lockerverse-launcher__product\"\n key={product.id}\n onClick={() => {\n if (product.pricingMode === \"custom\") {\n setCustomProduct(product);\n return;\n }\n if (product.paymentOption !== \"one-time\") {\n setSelection([{ productSlug: product.slug }]);\n return;\n }\n setSelection([\n {\n productSlug: product.slug,\n quantity: product.minimumQuantity ?? 1,\n },\n ]);\n }}\n type=\"button\"\n >\n <span className=\"lockerverse-launcher__product-copy\">\n <span>{product.name}</span>\n {product.description ? (\n <small>{product.description}</small>\n ) : null}\n </span>\n {product.amountCents === null ? null : (\n <strong>{usd.format(product.amountCents / 100)}</strong>\n )}\n </button>\n ))}\n </div>\n );\n }\n if (customProduct) {\n content = (\n <form\n className=\"lockerverse-launcher__amount-form\"\n onSubmit={(event) => {\n event.preventDefault();\n setSelection([\n {\n amountCents: Math.round(Number(customAmount) * 100),\n productSlug: customProduct.slug,\n },\n ]);\n }}\n >\n <label htmlFor={amountInputId}>Donation amount</label>\n <input\n id={amountInputId}\n min={(customProduct.minimumAmountCents ?? 1) / 100}\n name=\"amount\"\n onChange={(event) => setCustomAmount(event.target.value)}\n required\n step=\"0.01\"\n type=\"number\"\n value={customAmount}\n />\n <button type=\"submit\">Continue</button>\n </form>\n );\n }\n if (selection) {\n content = (\n <div className=\"lockerverse-launcher__checkout\">\n <button\n className=\"lockerverse-launcher__back\"\n onClick={() => setSelection(null)}\n type=\"button\"\n >\n Back\n </button>\n <LockerversePayment {...paymentProps} selection={selection} />\n </div>\n );\n }\n\n return (\n <Dialog.Root onOpenChange={setOpen} open={open}>\n <Dialog.Trigger\n className={`lockerverse-launcher lockerverse-launcher--${position}`}\n data-lockerverse-theme={paymentProps.theme ?? \"dark\"}\n style={paymentProps.style}\n >\n {buttonLabel}\n </Dialog.Trigger>\n <Dialog.Portal>\n <Dialog.Backdrop className=\"lockerverse-launcher__backdrop\" />\n <Dialog.Viewport className=\"lockerverse-launcher__viewport\">\n <Dialog.Popup\n className=\"lockerverse-launcher__dialog\"\n data-lockerverse-theme={paymentProps.theme ?? \"dark\"}\n style={paymentProps.style}\n >\n <Dialog.Title className=\"lockerverse-launcher__title\">\n {catalog?.widget.title ?? catalog?.widget.name ?? \"Donate\"}\n </Dialog.Title>\n {catalog?.widget.description ? (\n <Dialog.Description className=\"lockerverse-launcher__description\">\n {catalog.widget.description}\n </Dialog.Description>\n ) : null}\n <Dialog.Close\n aria-label=\"Close donation dialog\"\n className=\"lockerverse-launcher__close\"\n >\n Close\n </Dialog.Close>\n {content}\n </Dialog.Popup>\n </Dialog.Viewport>\n </Dialog.Portal>\n </Dialog.Root>\n );\n}\n"],"mappings":"qRAaA,MAAM,EAAM,IAAI,KAAK,aAAa,QAAS,CACzC,SAAU,MACV,MAAO,UACT,CAAC,EAED,SAAgB,EAA0B,CACxC,cAAc,SACd,WAAW,S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AAW,8CAA8C,IACzD,yBAAwB,EAAa,OAAS,OAC9C,MAAO,EAAa,MAEnB,SAAA,CACa,CAAA,EAChB,EAAC,EAAO,OAAR,CAAA,SAAA,CACE,EAAC,EAAO,SAAR,CAAiB,UAAU,gCAAkC,CAAA,EAC7D,EAAC,EAAO,SAAR,CAAiB,UAAU,iCACzB,SAAA,EAAC,EAAO,MAAR,CACE,UAAU,+BACV,yBAAwB,EAAa,OAAS,OAC9C,MAAO,EAAa,MAHtB,SAAA,CAKE,EAAC,EAAO,MAAR,CAAc,UAAU,8BACrB,SAAA,GAAS,OAAO,OAAS,GAAS,OAAO,MAAQ,QACtC,CAAA,EACb,GAAS,OAAO,YACf,EAAC,EAAO,YAAR,CAAoB,UAAU,oCAC3B,SAAA,EAAQ,OAAO,WACE,CAAA,EAClB,KACJ,EAAC,EAAO,MAAR,CACE,aAAW,wBACX,UAAU,8BACX,SAAA,OAEa,CAAA,EACb,CACW,GACC,CAAA,CACJ,CAAA,CAAA,CACJ,GAEjB"}
|
|
1
|
+
{"version":3,"file":"lockerverse-donate-launcher.js","names":[],"sources":["../src/lockerverse-donate-launcher.tsx"],"sourcesContent":["import { Dialog } from \"@base-ui/react/dialog\";\nimport {\n createLockerverseCheckoutClient,\n type LockerverseCatalog,\n type LockerverseProduct,\n} from \"@lockerverse/sdk/checkout\";\nimport {\n type Dispatch,\n type ReactNode,\n type SetStateAction,\n useEffect,\n useState,\n} from \"react\";\n\nimport { LockerversePayment } from \"./lockerverse-payment.tsx\";\nimport type {\n LockerverseDonateLauncherProps,\n LockerversePaymentSelectionItem,\n LockerversePaymentStyle,\n} from \"./types.ts\";\n\nconst usd = new Intl.NumberFormat(\"en-US\", {\n currency: \"USD\",\n style: \"currency\",\n});\nconst decimalAmountPattern = /^(?:0|[1-9]\\d*)(?:\\.\\d{1,2})?$/;\nconst suggestedDonationAmountsCents = [1000, 2500, 5000, 10_000];\n\nfunction parseAmountCents(value: string) {\n if (!decimalAmountPattern.test(value)) {\n return null;\n }\n const amountCents = Math.round(Number(value) * 100);\n return Number.isSafeInteger(amountCents) && amountCents > 0\n ? amountCents\n : null;\n}\n\nfunction formatProductPrice(\n amountCents: number,\n paymentOption: \"one-time\" | \"monthly\" | \"annually\"\n) {\n let cadence = \"\";\n if (paymentOption === \"monthly\") {\n cadence = \"/month\";\n }\n if (paymentOption === \"annually\") {\n cadence = \"/year\";\n }\n return `${usd.format(amountCents / 100)}${cadence}`;\n}\n\ntype LauncherProductControlProps = {\n customAmounts: Record<string, string>;\n product: LockerverseProduct;\n quantities: Record<string, number>;\n recurringProductId: string | null;\n setCustomAmounts: Dispatch<SetStateAction<Record<string, string>>>;\n setQuantities: Dispatch<SetStateAction<Record<string, number>>>;\n setRecurringProductId: Dispatch<SetStateAction<string | null>>;\n};\n\nfunction LauncherProductControl({\n customAmounts,\n product,\n quantities,\n recurringProductId,\n setCustomAmounts,\n setQuantities,\n setRecurringProductId,\n}: LauncherProductControlProps) {\n const quantity = quantities[product.id] ?? 0;\n if (product.pricingMode === \"fixed\" && product.paymentOption === \"one-time\") {\n const maximum = Math.min(\n product.maximumQuantity ?? Number.POSITIVE_INFINITY,\n product.inventoryQuantity ?? Number.POSITIVE_INFINITY\n );\n return (\n <span className=\"lockerverse-launcher__quantity\">\n <button\n aria-label={`Decrease ${product.name} quantity`}\n disabled={quantity === 0}\n onClick={() => {\n setRecurringProductId(null);\n setQuantities((current) => {\n const currentQuantity = current[product.id] ?? 0;\n const minimum = product.minimumQuantity ?? 1;\n return {\n ...current,\n [product.id]:\n currentQuantity <= minimum ? 0 : currentQuantity - 1,\n };\n });\n }}\n type=\"button\"\n >\n −\n </button>\n <output aria-label={`${product.name} quantity`}>{quantity}</output>\n <button\n aria-label={`Increase ${product.name} quantity`}\n disabled={quantity >= maximum}\n onClick={() => {\n setRecurringProductId(null);\n setQuantities((current) => {\n const currentQuantity = current[product.id] ?? 0;\n return {\n ...current,\n [product.id]:\n currentQuantity === 0\n ? (product.minimumQuantity ?? 1)\n : currentQuantity + 1,\n };\n });\n }}\n type=\"button\"\n >\n +\n </button>\n </span>\n );\n }\n\n if (\n product.pricingMode === \"custom\" &&\n product.paymentOption === \"one-time\"\n ) {\n return (\n <span className=\"lockerverse-launcher__custom-amount\">\n <span aria-hidden=\"true\">$</span>\n <input\n aria-label={`${product.name} amount`}\n min={(product.minimumAmountCents ?? 1) / 100}\n name={`amount-${product.slug}`}\n onChange={(event) => {\n setRecurringProductId(null);\n setCustomAmounts((current) => ({\n ...current,\n [product.id]: event.target.value,\n }));\n }}\n placeholder=\"0.00\"\n step=\"0.01\"\n type=\"number\"\n value={customAmounts[product.id] ?? \"\"}\n />\n {product.minimumAmountCents === null ? null : (\n <small>Minimum {usd.format(product.minimumAmountCents / 100)}</small>\n )}\n </span>\n );\n }\n\n return (\n <button\n aria-label={`Select ${product.name}`}\n aria-pressed={recurringProductId === product.id}\n className=\"lockerverse-launcher__select\"\n onClick={() => {\n setQuantities({});\n setCustomAmounts({});\n setRecurringProductId((current) =>\n current === product.id ? null : product.id\n );\n }}\n type=\"button\"\n >\n Select\n </button>\n );\n}\n\ntype LauncherProductOptionProps = LauncherProductControlProps & {\n variant?: \"default\" | \"donation\";\n};\n\nfunction LauncherProductOption({\n variant = \"default\",\n ...props\n}: LauncherProductOptionProps) {\n const { customAmounts, product, quantities, recurringProductId } = props;\n const customAmount = parseAmountCents(customAmounts[product.id] ?? \"\");\n const isSelected =\n recurringProductId === product.id ||\n (product.paymentOption === \"one-time\" &&\n ((product.pricingMode === \"fixed\" && (quantities[product.id] ?? 0) > 0) ||\n (product.pricingMode === \"custom\" &&\n customAmount !== null &&\n (product.minimumAmountCents === null ||\n customAmount >= product.minimumAmountCents))));\n return (\n <article\n className={`lockerverse-launcher__product lockerverse-launcher__product--${variant}`}\n data-selected={isSelected || undefined}\n >\n <span className=\"lockerverse-launcher__product-copy\">\n <strong className=\"lockerverse-launcher__product-name\">\n {product.name}\n </strong>\n {product.description ? <small>{product.description}</small> : null}\n {product.amountCents === null ? null : (\n <span className=\"lockerverse-launcher__product-price\">\n {formatProductPrice(product.amountCents, product.paymentOption)}\n </span>\n )}\n </span>\n <LauncherProductControl {...props} />\n </article>\n );\n}\n\nfunction LauncherDonationOption({\n customAmounts,\n product,\n setCustomAmounts,\n setRecurringProductId,\n}: LauncherProductControlProps) {\n const amount = customAmounts[product.id] ?? \"\";\n const amountCents = parseAmountCents(amount);\n const suggestions = suggestedDonationAmountsCents.filter(\n (suggestion) =>\n product.minimumAmountCents === null ||\n suggestion >= product.minimumAmountCents\n );\n const isSuggestedAmount = suggestions.includes(amountCents ?? 0);\n const setAmount = (value: string) => {\n setRecurringProductId(null);\n setCustomAmounts((current) => ({\n ...current,\n [product.id]: value,\n }));\n };\n\n return (\n <div className=\"lockerverse-launcher__donation-option\">\n <fieldset className=\"lockerverse-launcher__donation-choices\">\n <legend className=\"lockerverse-launcher__sr-only\">\n {product.name} amount\n </legend>\n <button\n aria-pressed={amount === \"\"}\n onClick={() => setAmount(\"\")}\n type=\"button\"\n >\n No thanks\n </button>\n {suggestions.map((suggestion) => (\n <button\n aria-pressed={amountCents === suggestion}\n key={suggestion}\n onClick={() => setAmount(String(suggestion / 100))}\n type=\"button\"\n >\n {usd.format(suggestion / 100).replace(\".00\", \"\")}\n </button>\n ))}\n <label\n className=\"lockerverse-launcher__donation-other\"\n data-selected={amount !== \"\" && !isSuggestedAmount ? true : undefined}\n >\n <input\n aria-label={`${product.name} amount`}\n min={(product.minimumAmountCents ?? 1) / 100}\n name={`amount-${product.slug}`}\n onChange={(event) => setAmount(event.target.value)}\n placeholder=\"Other $\"\n step=\"0.01\"\n type=\"number\"\n value={isSuggestedAmount ? \"\" : amount}\n />\n </label>\n </fieldset>\n </div>\n );\n}\n\ntype LauncherProductListProps = Omit<LauncherProductControlProps, \"product\"> & {\n products: LockerverseProduct[];\n variant?: LauncherProductOptionProps[\"variant\"];\n};\n\nfunction LauncherProductList({\n products,\n variant = \"default\",\n ...controlProps\n}: LauncherProductListProps) {\n return (\n <div className=\"lockerverse-launcher__product-list\">\n {products.map((product) =>\n variant === \"donation\" ? (\n <LauncherDonationOption\n {...controlProps}\n key={product.id}\n product={product}\n />\n ) : (\n <LauncherProductOption\n {...controlProps}\n key={product.id}\n product={product}\n variant={variant}\n />\n )\n )}\n </div>\n );\n}\n\nfunction getSelectionSummary(\n catalog: LockerverseCatalog,\n selection: LockerversePaymentSelectionItem[]\n) {\n let itemCount = 0;\n let amountCents = 0;\n for (const item of selection) {\n const product = catalog.products.find(\n (candidate) => candidate.slug === item.productSlug\n );\n if (!product) {\n continue;\n }\n if (\"quantity\" in item) {\n itemCount += item.quantity;\n amountCents += (product.amountCents ?? 0) * item.quantity;\n continue;\n }\n itemCount += 1;\n amountCents +=\n \"amountCents\" in item ? item.amountCents : (product.amountCents ?? 0);\n }\n return { amountCents, itemCount };\n}\n\nfunction LauncherLoading() {\n return (\n <div\n aria-label=\"Loading donation options\"\n className=\"lockerverse-launcher__loading\"\n role=\"status\"\n >\n {[0, 1, 2].map((item) => (\n <span\n aria-hidden=\"true\"\n className=\"lockerverse-launcher__loading-row\"\n key={item}\n />\n ))}\n </div>\n );\n}\n\nfunction createLauncherSelection(\n catalog: LockerverseCatalog,\n quantities: Record<string, number>,\n customAmounts: Record<string, string>,\n recurringProductId: string | null\n): LockerversePaymentSelectionItem[] {\n if (recurringProductId) {\n const product = catalog.products.find(\n (candidate) =>\n candidate.id === recurringProductId &&\n candidate.paymentOption !== \"one-time\"\n );\n return product ? [{ productSlug: product.slug }] : [];\n }\n\n return catalog.products.flatMap(\n (product): LockerversePaymentSelectionItem[] => {\n const quantity = quantities[product.id] ?? 0;\n if (\n product.pricingMode === \"fixed\" &&\n product.paymentOption === \"one-time\" &&\n quantity > 0\n ) {\n return [{ productSlug: product.slug, quantity }];\n }\n const amountCents = parseAmountCents(customAmounts[product.id] ?? \"\");\n if (\n product.pricingMode === \"custom\" &&\n product.paymentOption === \"one-time\" &&\n amountCents !== null &&\n (product.minimumAmountCents === null ||\n amountCents >= product.minimumAmountCents)\n ) {\n return [{ amountCents, productSlug: product.slug }];\n }\n return [];\n }\n );\n}\n\ntype LauncherSelectionStateProps = Omit<LauncherProductControlProps, \"product\">;\n\ntype LauncherCatalogProps = LauncherSelectionStateProps & {\n catalog: LockerverseCatalog;\n onContinue: (selection: LockerversePaymentSelectionItem[]) => void;\n};\n\nfunction LauncherCatalog({\n catalog,\n onContinue,\n ...selectionState\n}: LauncherCatalogProps) {\n const draftSelection = createLauncherSelection(\n catalog,\n selectionState.quantities,\n selectionState.customAmounts,\n selectionState.recurringProductId\n );\n const summary = getSelectionSummary(catalog, draftSelection);\n const donationProducts = catalog.products.filter(\n (product) =>\n product.paymentOption === \"one-time\" && product.pricingMode === \"custom\"\n );\n const orderProducts = catalog.products.filter(\n (product) => !donationProducts.includes(product)\n );\n\n return (\n <form\n className=\"lockerverse-launcher__products\"\n onSubmit={(event) => {\n event.preventDefault();\n if (draftSelection.length > 0) {\n onContinue(draftSelection);\n }\n }}\n >\n {orderProducts.length > 0 ? (\n <section className=\"lockerverse-launcher__section\">\n <LauncherProductList {...selectionState} products={orderProducts} />\n </section>\n ) : null}\n {donationProducts.length > 0 ? (\n <section className=\"lockerverse-launcher__donation\">\n <header className=\"lockerverse-launcher__section-header\">\n <h3>Add a donation</h3>\n <p>Choose an amount to add to this order.</p>\n </header>\n <LauncherProductList\n {...selectionState}\n products={donationProducts}\n variant=\"donation\"\n />\n </section>\n ) : null}\n {catalog.products.length > 0 ? (\n <footer className=\"lockerverse-launcher__footer\">\n <p aria-live=\"polite\" className=\"lockerverse-launcher__summary\">\n <span>\n {summary.itemCount === 0\n ? \"No items selected\"\n : `${summary.itemCount} ${summary.itemCount === 1 ? \"item\" : \"items\"} selected`}\n </span>\n {summary.itemCount === 0 ? null : (\n <strong>{usd.format(summary.amountCents / 100)}</strong>\n )}\n </p>\n <button\n className=\"lockerverse-launcher__continue\"\n disabled={draftSelection.length === 0}\n type=\"submit\"\n >\n Continue\n </button>\n </footer>\n ) : null}\n </form>\n );\n}\n\ntype LauncherPaymentProps = Omit<\n LockerverseDonateLauncherProps,\n \"buttonLabel\" | \"position\"\n>;\n\ntype LauncherCheckoutProps = {\n onEdit: () => void;\n paymentProps: LauncherPaymentProps;\n selection: LockerversePaymentSelectionItem[];\n style: LockerversePaymentStyle;\n};\n\nfunction LauncherCheckout({\n onEdit,\n paymentProps,\n selection,\n style,\n}: LauncherCheckoutProps) {\n return (\n <div className=\"lockerverse-launcher__checkout\">\n <header className=\"lockerverse-launcher__checkout-toolbar\">\n <button\n className=\"lockerverse-launcher__back\"\n onClick={onEdit}\n type=\"button\"\n >\n Edit order\n </button>\n </header>\n <LockerversePayment\n {...paymentProps}\n selection={selection}\n style={style}\n />\n </div>\n );\n}\n\nfunction LauncherDialogHeading({\n catalog,\n checkout,\n}: {\n catalog: LockerverseCatalog | null;\n checkout: boolean;\n}) {\n if (checkout) {\n return (\n <>\n <Dialog.Title className=\"lockerverse-launcher__sr-only\">\n Checkout\n </Dialog.Title>\n <Dialog.Description className=\"lockerverse-launcher__sr-only\">\n Review the order and complete payment.\n </Dialog.Description>\n </>\n );\n }\n\n if (!catalog) {\n return (\n <header className=\"lockerverse-launcher__header\">\n <Dialog.Title className=\"lockerverse-launcher__title\">\n Donate\n </Dialog.Title>\n <Dialog.Description className=\"lockerverse-launcher__description\">\n Choose your options, then continue to checkout.\n </Dialog.Description>\n </header>\n );\n }\n\n return (\n <header className=\"lockerverse-launcher__header\">\n {catalog.community ? (\n <div className=\"lockerverse-launcher__brand\">\n {catalog.community.imageUrl ? (\n <img\n alt={`${catalog.community.name} logo`}\n height=\"28\"\n src={catalog.community.imageUrl}\n width=\"28\"\n />\n ) : null}\n <span>{catalog.community.name}</span>\n </div>\n ) : null}\n <Dialog.Title className=\"lockerverse-launcher__title\">\n {catalog.widget.title ?? catalog.widget.name}\n </Dialog.Title>\n <Dialog.Description className=\"lockerverse-launcher__description\">\n {catalog.widget.description ??\n \"Choose your options, then continue to checkout.\"}\n </Dialog.Description>\n </header>\n );\n}\n\nexport function LockerverseDonateLauncher({\n buttonLabel = \"Donate\",\n position = \"inline\",\n ...paymentProps\n}: LockerverseDonateLauncherProps) {\n const [open, setOpen] = useState(false);\n const [catalog, setCatalog] = useState<LockerverseCatalog | null>(null);\n const [selection, setSelection] = useState<\n LockerversePaymentSelectionItem[] | null\n >(null);\n const [customAmounts, setCustomAmounts] = useState<Record<string, string>>(\n {}\n );\n const [quantities, setQuantities] = useState<Record<string, number>>({});\n const [recurringProductId, setRecurringProductId] = useState<string | null>(\n null\n );\n const [loadError, setLoadError] = useState(false);\n const [loadRevision, setLoadRevision] = useState(0);\n const {\n apiBaseUrl,\n communitySlug,\n environment,\n fetch,\n onError,\n requestTimeoutMs,\n sentryDsn,\n widgetSlug,\n } = paymentProps;\n const launcherStyle: LockerversePaymentStyle = {\n ...(catalog?.community\n ? { \"--lockerverse-accent\": catalog.community.accentColor }\n : {}),\n ...paymentProps.style,\n };\n\n useEffect(() => {\n if (!(open && catalog === null)) {\n return;\n }\n let active = true;\n const client = createLockerverseCheckoutClient(paymentProps);\n client\n .load()\n .then((nextCatalog) => {\n if (active) {\n setCatalog(nextCatalog);\n setLoadError(false);\n }\n })\n .catch(() => {\n if (active) {\n setLoadError(true);\n }\n });\n return () => {\n active = false;\n };\n }, [\n apiBaseUrl,\n catalog,\n communitySlug,\n environment,\n fetch,\n loadRevision,\n onError,\n open,\n requestTimeoutMs,\n sentryDsn,\n widgetSlug,\n ]);\n\n let content: ReactNode = <LauncherLoading />;\n if (loadError) {\n content = (\n <div role=\"alert\">\n <p>Unable to load donation options.</p>\n <button\n onClick={() => {\n setLoadError(false);\n setLoadRevision((revision) => revision + 1);\n }}\n type=\"button\"\n >\n Retry\n </button>\n </div>\n );\n }\n if (catalog) {\n content = (\n <LauncherCatalog\n catalog={catalog}\n customAmounts={customAmounts}\n onContinue={setSelection}\n quantities={quantities}\n recurringProductId={recurringProductId}\n setCustomAmounts={setCustomAmounts}\n setQuantities={setQuantities}\n setRecurringProductId={setRecurringProductId}\n />\n );\n }\n if (selection) {\n content = (\n <LauncherCheckout\n onEdit={() => setSelection(null)}\n paymentProps={paymentProps}\n selection={selection}\n style={launcherStyle}\n />\n );\n }\n\n return (\n <Dialog.Root onOpenChange={setOpen} open={open}>\n <Dialog.Trigger\n className={`lockerverse-launcher lockerverse-launcher--${position}`}\n data-lockerverse-theme={paymentProps.theme ?? \"dark\"}\n style={launcherStyle}\n >\n {buttonLabel}\n </Dialog.Trigger>\n <Dialog.Portal>\n <Dialog.Backdrop className=\"lockerverse-launcher__backdrop\" />\n <Dialog.Viewport className=\"lockerverse-launcher__viewport\">\n <Dialog.Popup\n className=\"lockerverse-launcher__dialog\"\n data-lockerverse-theme={paymentProps.theme ?? \"dark\"}\n style={launcherStyle}\n >\n <LauncherDialogHeading\n catalog={catalog}\n checkout={selection !== null}\n />\n <Dialog.Close\n aria-label=\"Close donation dialog\"\n className=\"lockerverse-launcher__close\"\n >\n <span aria-hidden=\"true\">×</span>\n </Dialog.Close>\n {content}\n </Dialog.Popup>\n </Dialog.Viewport>\n </Dialog.Portal>\n </Dialog.Root>\n );\n}\n"],"mappings":"2SAqBA,MAAM,EAAM,IAAI,KAAK,aAAa,QAAS,CACzC,SAAU,MACV,MAAO,UACT,CAAC,EACK,EAAuB,iCACvB,EAAgC,CAAC,IAAM,KAAM,IAAM,GAAM,EAE/D,SAAS,EAAiB,EAAe,CACvC,GAAI,CAAC,EAAqB,KAAK,CAAK,EAClC,OAAO,KAET,IAAM,EAAc,KAAK,MAAM,OAAO,CAAK,EAAI,GAAG,EAClD,OAAO,OAAO,cAAc,CAAW,GAAK,EAAc,EACtD,EACA,IACN,CAEA,SAAS,EACP,EACA,EACA,CACA,IAAI,EAAU,GAOd,OANI,IAAkB,YACpB,EAAU,UAER,IAAkB,aACpB,EAAU,SAEL,GAAG,EAAI,OAAO,EAAc,GAAG,IAAI,GAC5C,CAYA,SAAS,EAAuB,CAC9B,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,QAAV,SAAA,CACE,EAAC,IAAD,CAAA,SAAG,kCAAmC,CAAA,EACtC,EAAC,SAAD,CACE,YAAe,CACb,EAAa,EAAK,EAClB,EAAiB,GAAa,EAAW,CAAC,CAC5C,EACA,KAAK,SACN,SAAA,OAEO,CAAA,CACL,KAGL,IACF,EACE,EAAC,EAAD,CACW,UACM,gBACf,WAAY,EACA,aACQ,qBACF,mBACH,gBACQ,uBACxB,CAAA,GAGD,IACF,EACE,EAAC,EAAD,CACE,WAAc,EAAa,IAAI,EACjB,eACH,YACX,MAAO,CACR,CAAA,GAKH,EAAC,EAAO,KAAR,CAAa,aAAc,EAAe,OAA1C,SAAA,CACE,EAAC,EAAO,QAAR,CACE,UAAW,8CAA8C,IACzD,yBAAwB,EAAa,OAAS,OAC9C,MAAO,EAEN,SAAA,CACa,CAAA,EAChB,EAAC,EAAO,OAAR,CAAA,SAAA,CACE,EAAC,EAAO,SAAR,CAAiB,UAAU,gCAAkC,CAAA,EAC7D,EAAC,EAAO,SAAR,CAAiB,UAAU,iCACzB,SAAA,EAAC,EAAO,MAAR,CACE,UAAU,+BACV,yBAAwB,EAAa,OAAS,OAC9C,MAAO,EAHT,SAAA,CAKE,EAAC,EAAD,CACW,UACT,SAAU,IAAc,IACzB,CAAA,EACD,EAAC,EAAO,MAAR,CACE,aAAW,wBACX,UAAU,8BAEV,SAAA,EAAC,OAAD,CAAM,cAAY,OAAO,SAAA,GAAO,CAAA,CACpB,CAAA,EACb,CACW,GACC,CAAA,CACJ,CAAA,CAAA,CACJ,GAEjB"}
|
package/dist/styles.css
CHANGED
|
@@ -1040,30 +1040,30 @@
|
|
|
1040
1040
|
.lockerverse-launcher__dialog {
|
|
1041
1041
|
--lockerverse-accent: #38d77a;
|
|
1042
1042
|
--lockerverse-accent-contrast: #000;
|
|
1043
|
-
--lockerverse-bg: #
|
|
1044
|
-
--lockerverse-border: rgb(255
|
|
1045
|
-
--lockerverse-control: #
|
|
1043
|
+
--lockerverse-bg: #17130f;
|
|
1044
|
+
--lockerverse-border: rgb(255 228 194 / 14%);
|
|
1045
|
+
--lockerverse-control: #211b16;
|
|
1046
1046
|
--lockerverse-danger: #f08a98;
|
|
1047
1047
|
--lockerverse-font-family:
|
|
1048
1048
|
ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
|
|
1049
1049
|
sans-serif;
|
|
1050
|
-
--lockerverse-muted: rgb(255
|
|
1050
|
+
--lockerverse-muted: rgb(255 235 211 / 65%);
|
|
1051
1051
|
--lockerverse-radius: 10px;
|
|
1052
|
-
--lockerverse-subtle: rgb(255
|
|
1053
|
-
--lockerverse-text: #
|
|
1052
|
+
--lockerverse-subtle: rgb(255 228 194 / 8%);
|
|
1053
|
+
--lockerverse-text: #fff5e9;
|
|
1054
1054
|
box-sizing: border-box;
|
|
1055
1055
|
font-family: var(--lockerverse-font-family);
|
|
1056
1056
|
}
|
|
1057
1057
|
|
|
1058
1058
|
.lockerverse-launcher[data-lockerverse-theme="light"],
|
|
1059
1059
|
.lockerverse-launcher__dialog[data-lockerverse-theme="light"] {
|
|
1060
|
-
--lockerverse-bg: #
|
|
1061
|
-
--lockerverse-border: rgb(
|
|
1062
|
-
--lockerverse-control: #
|
|
1060
|
+
--lockerverse-bg: #fffaf3;
|
|
1061
|
+
--lockerverse-border: rgb(92 68 43 / 15%);
|
|
1062
|
+
--lockerverse-control: #fffdf9;
|
|
1063
1063
|
--lockerverse-danger: #c52b3e;
|
|
1064
|
-
--lockerverse-muted: rgb(
|
|
1065
|
-
--lockerverse-subtle: rgb(
|
|
1066
|
-
--lockerverse-text: #
|
|
1064
|
+
--lockerverse-muted: rgb(70 55 40 / 66%);
|
|
1065
|
+
--lockerverse-subtle: rgb(103 73 43 / 7%);
|
|
1066
|
+
--lockerverse-text: #2d251d;
|
|
1067
1067
|
}
|
|
1068
1068
|
|
|
1069
1069
|
.lockerverse-launcher {
|
|
@@ -1078,6 +1078,21 @@
|
|
|
1078
1078
|
border: 0;
|
|
1079
1079
|
border-radius: 999px;
|
|
1080
1080
|
box-shadow: 0 14px 34px rgb(0 0 0 / 28%);
|
|
1081
|
+
transition:
|
|
1082
|
+
transform 180ms ease,
|
|
1083
|
+
box-shadow 180ms ease,
|
|
1084
|
+
filter 180ms ease;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
.lockerverse-launcher:hover {
|
|
1088
|
+
box-shadow: 0 18px 42px rgb(0 0 0 / 34%);
|
|
1089
|
+
filter: brightness(1.04);
|
|
1090
|
+
transform: translateY(-2px);
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
.lockerverse-launcher:active {
|
|
1094
|
+
box-shadow: 0 10px 24px rgb(0 0 0 / 24%);
|
|
1095
|
+
transform: translateY(0) scale(0.98);
|
|
1081
1096
|
}
|
|
1082
1097
|
|
|
1083
1098
|
.lockerverse-launcher--bottom-left,
|
|
@@ -1105,8 +1120,9 @@
|
|
|
1105
1120
|
position: fixed;
|
|
1106
1121
|
inset: 0;
|
|
1107
1122
|
z-index: 1000;
|
|
1108
|
-
background: rgb(
|
|
1109
|
-
backdrop-filter: blur(
|
|
1123
|
+
background: rgb(8 12 9 / 72%);
|
|
1124
|
+
backdrop-filter: blur(10px) saturate(0.75);
|
|
1125
|
+
animation: lockerverse-launcher-fade-in 180ms ease-out;
|
|
1110
1126
|
}
|
|
1111
1127
|
|
|
1112
1128
|
.lockerverse-launcher__viewport {
|
|
@@ -1120,15 +1136,24 @@
|
|
|
1120
1136
|
|
|
1121
1137
|
.lockerverse-launcher__dialog {
|
|
1122
1138
|
position: relative;
|
|
1123
|
-
width: min(100%,
|
|
1139
|
+
width: min(100%, 580px);
|
|
1124
1140
|
max-height: calc(100dvh - 48px);
|
|
1125
|
-
padding:
|
|
1141
|
+
padding: 30px;
|
|
1126
1142
|
overflow-y: auto;
|
|
1127
1143
|
color: var(--lockerverse-text);
|
|
1128
1144
|
background: var(--lockerverse-bg);
|
|
1129
1145
|
border: 1px solid var(--lockerverse-border);
|
|
1130
|
-
border-radius: calc(var(--lockerverse-radius) +
|
|
1131
|
-
box-shadow:
|
|
1146
|
+
border-radius: calc(var(--lockerverse-radius) + 12px);
|
|
1147
|
+
box-shadow:
|
|
1148
|
+
0 32px 100px rgb(5 14 8 / 48%),
|
|
1149
|
+
inset 0 1px 0 rgb(255 255 255 / 10%);
|
|
1150
|
+
animation: lockerverse-launcher-enter 240ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
.lockerverse-launcher__dialog:has(.lockerverse-launcher__products) {
|
|
1154
|
+
width: min(100%, 600px);
|
|
1155
|
+
padding: 32px;
|
|
1156
|
+
border-radius: calc(var(--lockerverse-radius) + 18px);
|
|
1132
1157
|
}
|
|
1133
1158
|
|
|
1134
1159
|
.lockerverse-launcher__dialog *,
|
|
@@ -1137,79 +1162,357 @@
|
|
|
1137
1162
|
box-sizing: border-box;
|
|
1138
1163
|
}
|
|
1139
1164
|
|
|
1165
|
+
.lockerverse-launcher__sr-only {
|
|
1166
|
+
position: absolute;
|
|
1167
|
+
width: 1px;
|
|
1168
|
+
height: 1px;
|
|
1169
|
+
padding: 0;
|
|
1170
|
+
margin: -1px;
|
|
1171
|
+
overflow: hidden;
|
|
1172
|
+
white-space: nowrap;
|
|
1173
|
+
border: 0;
|
|
1174
|
+
clip: rect(0, 0, 0, 0);
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
.lockerverse-launcher__header {
|
|
1178
|
+
display: grid;
|
|
1179
|
+
gap: 8px;
|
|
1180
|
+
padding-right: 50px;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
.lockerverse-launcher__brand {
|
|
1184
|
+
display: flex;
|
|
1185
|
+
gap: 9px;
|
|
1186
|
+
align-items: center;
|
|
1187
|
+
margin-bottom: 4px;
|
|
1188
|
+
font-size: 13px;
|
|
1189
|
+
font-weight: 600;
|
|
1190
|
+
color: var(--lockerverse-muted);
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
.lockerverse-launcher__brand img {
|
|
1194
|
+
width: 28px;
|
|
1195
|
+
height: 28px;
|
|
1196
|
+
object-fit: cover;
|
|
1197
|
+
border: 1px solid var(--lockerverse-border);
|
|
1198
|
+
border-radius: 8px;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1140
1201
|
.lockerverse-launcher__title {
|
|
1141
|
-
padding-right: 72px;
|
|
1142
1202
|
margin: 0;
|
|
1143
|
-
font-size:
|
|
1144
|
-
|
|
1203
|
+
font-size: clamp(25px, 5vw, 30px);
|
|
1204
|
+
font-weight: 650;
|
|
1205
|
+
line-height: 1.12;
|
|
1206
|
+
letter-spacing: -0.035em;
|
|
1207
|
+
text-wrap: balance;
|
|
1145
1208
|
}
|
|
1146
1209
|
|
|
1147
1210
|
.lockerverse-launcher__description {
|
|
1148
|
-
|
|
1211
|
+
max-width: 52ch;
|
|
1212
|
+
margin: 0;
|
|
1213
|
+
font-size: 14px;
|
|
1214
|
+
line-height: 1.5;
|
|
1149
1215
|
color: var(--lockerverse-muted);
|
|
1216
|
+
text-wrap: pretty;
|
|
1150
1217
|
}
|
|
1151
1218
|
|
|
1152
1219
|
.lockerverse-launcher__close {
|
|
1153
1220
|
position: absolute;
|
|
1154
|
-
top:
|
|
1155
|
-
right:
|
|
1156
|
-
|
|
1157
|
-
|
|
1221
|
+
top: 22px;
|
|
1222
|
+
right: 22px;
|
|
1223
|
+
display: grid;
|
|
1224
|
+
place-items: center;
|
|
1225
|
+
width: 38px;
|
|
1226
|
+
height: 38px;
|
|
1227
|
+
padding: 0;
|
|
1158
1228
|
font: inherit;
|
|
1229
|
+
font-size: 24px;
|
|
1230
|
+
line-height: 1;
|
|
1159
1231
|
color: var(--lockerverse-muted);
|
|
1160
1232
|
cursor: pointer;
|
|
1161
1233
|
background: var(--lockerverse-subtle);
|
|
1162
1234
|
border: 1px solid var(--lockerverse-border);
|
|
1163
|
-
border-radius:
|
|
1235
|
+
border-radius: 50%;
|
|
1236
|
+
transition:
|
|
1237
|
+
color 160ms ease,
|
|
1238
|
+
background 160ms ease,
|
|
1239
|
+
transform 160ms ease;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
.lockerverse-launcher__close:hover {
|
|
1243
|
+
color: var(--lockerverse-text);
|
|
1244
|
+
background: color-mix(in srgb, var(--lockerverse-text) 12%, transparent);
|
|
1245
|
+
transform: rotate(4deg);
|
|
1164
1246
|
}
|
|
1165
1247
|
|
|
1166
1248
|
.lockerverse-launcher__products,
|
|
1167
|
-
.lockerverse-launcher__amount-form,
|
|
1168
1249
|
.lockerverse-launcher__checkout {
|
|
1169
1250
|
display: grid;
|
|
1170
|
-
gap:
|
|
1171
|
-
|
|
1251
|
+
gap: 10px;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
.lockerverse-launcher__products {
|
|
1255
|
+
margin-top: 26px;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
.lockerverse-launcher__checkout {
|
|
1259
|
+
gap: 18px;
|
|
1260
|
+
margin-top: 0;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
.lockerverse-launcher__section,
|
|
1264
|
+
.lockerverse-launcher__product-list {
|
|
1265
|
+
display: grid;
|
|
1266
|
+
gap: 10px;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
.lockerverse-launcher__donation {
|
|
1270
|
+
display: grid;
|
|
1271
|
+
gap: 14px;
|
|
1272
|
+
padding: 18px;
|
|
1273
|
+
margin-top: 10px;
|
|
1274
|
+
background: color-mix(
|
|
1275
|
+
in srgb,
|
|
1276
|
+
var(--lockerverse-accent) 7%,
|
|
1277
|
+
var(--lockerverse-control)
|
|
1278
|
+
);
|
|
1279
|
+
border: 1px solid
|
|
1280
|
+
color-mix(in srgb, var(--lockerverse-accent) 23%, var(--lockerverse-border));
|
|
1281
|
+
border-radius: calc(var(--lockerverse-radius) + 8px);
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
.lockerverse-launcher__section-header {
|
|
1285
|
+
display: grid;
|
|
1286
|
+
gap: 3px;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
.lockerverse-launcher__section-header h3,
|
|
1290
|
+
.lockerverse-launcher__section-header p {
|
|
1291
|
+
margin: 0;
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
.lockerverse-launcher__section-header h3 {
|
|
1295
|
+
font-size: 17px;
|
|
1296
|
+
font-weight: 650;
|
|
1297
|
+
letter-spacing: -0.015em;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
.lockerverse-launcher__donation
|
|
1301
|
+
.lockerverse-launcher__section-header
|
|
1302
|
+
h3::before {
|
|
1303
|
+
margin-right: 8px;
|
|
1304
|
+
color: var(--lockerverse-accent);
|
|
1305
|
+
content: "♡";
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
.lockerverse-launcher__section-header p {
|
|
1309
|
+
font-size: 13px;
|
|
1310
|
+
color: var(--lockerverse-muted);
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
.lockerverse-launcher__donation-option {
|
|
1314
|
+
display: grid;
|
|
1315
|
+
gap: 8px;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
.lockerverse-launcher__donation-choices {
|
|
1319
|
+
display: grid;
|
|
1320
|
+
grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
|
|
1321
|
+
gap: 7px;
|
|
1322
|
+
padding: 0;
|
|
1323
|
+
margin: 0;
|
|
1324
|
+
border: 0;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
.lockerverse-launcher__donation-choices > button,
|
|
1328
|
+
.lockerverse-launcher__donation-other {
|
|
1329
|
+
min-height: 40px;
|
|
1330
|
+
padding: 8px 7px;
|
|
1331
|
+
font: inherit;
|
|
1332
|
+
font-size: 13px;
|
|
1333
|
+
font-weight: 650;
|
|
1334
|
+
color: var(--lockerverse-text);
|
|
1335
|
+
cursor: pointer;
|
|
1336
|
+
background: var(--lockerverse-subtle);
|
|
1337
|
+
border: 1px solid var(--lockerverse-border);
|
|
1338
|
+
border-radius: calc(var(--lockerverse-radius) - 1px);
|
|
1339
|
+
transition:
|
|
1340
|
+
color 150ms ease,
|
|
1341
|
+
background 150ms ease,
|
|
1342
|
+
border-color 150ms ease,
|
|
1343
|
+
transform 100ms ease;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
.lockerverse-launcher__donation-choices > button {
|
|
1347
|
+
white-space: nowrap;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
.lockerverse-launcher__donation-choices > button:hover,
|
|
1351
|
+
.lockerverse-launcher__donation-other:hover {
|
|
1352
|
+
border-color: color-mix(in srgb, var(--lockerverse-accent) 55%, transparent);
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
.lockerverse-launcher__donation-choices > button:active {
|
|
1356
|
+
transform: translateY(1px);
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
.lockerverse-launcher__donation-choices > button[aria-pressed="true"],
|
|
1360
|
+
.lockerverse-launcher__donation-other[data-selected="true"] {
|
|
1361
|
+
color: var(--lockerverse-accent-contrast);
|
|
1362
|
+
background: var(--lockerverse-accent);
|
|
1363
|
+
border-color: var(--lockerverse-accent);
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
.lockerverse-launcher__donation-other {
|
|
1367
|
+
position: relative;
|
|
1368
|
+
display: grid;
|
|
1369
|
+
width: auto;
|
|
1370
|
+
padding: 0;
|
|
1371
|
+
overflow: hidden;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
.lockerverse-launcher__donation-other input {
|
|
1375
|
+
min-width: 0;
|
|
1376
|
+
padding: 8px 12px;
|
|
1377
|
+
font: inherit;
|
|
1378
|
+
font-size: 13px;
|
|
1379
|
+
font-weight: 650;
|
|
1380
|
+
font-variant-numeric: tabular-nums;
|
|
1381
|
+
color: inherit;
|
|
1382
|
+
appearance: textfield;
|
|
1383
|
+
outline: none;
|
|
1384
|
+
background: transparent;
|
|
1385
|
+
border: 0;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
.lockerverse-launcher__donation-other[data-selected="true"]::before {
|
|
1389
|
+
position: absolute;
|
|
1390
|
+
top: 50%;
|
|
1391
|
+
left: 12px;
|
|
1392
|
+
content: "$";
|
|
1393
|
+
transform: translateY(-50%);
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
.lockerverse-launcher__donation-other[data-selected="true"] input {
|
|
1397
|
+
padding-left: 24px;
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
.lockerverse-launcher__donation-other input::placeholder {
|
|
1401
|
+
color: var(--lockerverse-muted);
|
|
1402
|
+
opacity: 1;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
.lockerverse-launcher__donation-other[data-selected="true"] input::placeholder {
|
|
1406
|
+
color: inherit;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
.lockerverse-launcher__donation-other input::-webkit-inner-spin-button,
|
|
1410
|
+
.lockerverse-launcher__donation-other input::-webkit-outer-spin-button {
|
|
1411
|
+
margin: 0;
|
|
1412
|
+
appearance: none;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
.lockerverse-launcher__checkout-toolbar {
|
|
1416
|
+
display: flex;
|
|
1417
|
+
align-items: center;
|
|
1418
|
+
min-height: 38px;
|
|
1419
|
+
padding-right: 52px;
|
|
1420
|
+
margin-top: -8px;
|
|
1172
1421
|
}
|
|
1173
1422
|
|
|
1174
1423
|
.lockerverse-launcher__back {
|
|
1175
1424
|
justify-self: start;
|
|
1176
|
-
padding:
|
|
1425
|
+
padding: 8px 0;
|
|
1177
1426
|
font: inherit;
|
|
1427
|
+
font-size: 14px;
|
|
1428
|
+
font-weight: 600;
|
|
1178
1429
|
color: var(--lockerverse-muted);
|
|
1179
1430
|
cursor: pointer;
|
|
1180
1431
|
background: transparent;
|
|
1181
|
-
border:
|
|
1182
|
-
|
|
1432
|
+
border: 0;
|
|
1433
|
+
transition:
|
|
1434
|
+
color 160ms ease,
|
|
1435
|
+
transform 100ms ease;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
.lockerverse-launcher__back::before {
|
|
1439
|
+
margin-right: 6px;
|
|
1440
|
+
content: "←";
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
.lockerverse-launcher__back:hover {
|
|
1444
|
+
color: var(--lockerverse-accent);
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
.lockerverse-launcher__back:active {
|
|
1448
|
+
transform: translateX(-1px);
|
|
1183
1449
|
}
|
|
1184
1450
|
|
|
1185
1451
|
.lockerverse-launcher__checkout > .lockerverse-payment {
|
|
1186
1452
|
max-width: none;
|
|
1187
1453
|
padding: 0;
|
|
1454
|
+
background: transparent;
|
|
1455
|
+
border-radius: 0;
|
|
1456
|
+
box-shadow: none;
|
|
1188
1457
|
}
|
|
1189
1458
|
|
|
1190
1459
|
.lockerverse-launcher__product {
|
|
1191
|
-
display:
|
|
1460
|
+
display: grid;
|
|
1461
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
1192
1462
|
gap: 16px;
|
|
1193
1463
|
align-items: center;
|
|
1194
1464
|
justify-content: space-between;
|
|
1195
|
-
min-height:
|
|
1196
|
-
padding:
|
|
1465
|
+
min-height: 76px;
|
|
1466
|
+
padding: 17px;
|
|
1197
1467
|
font: inherit;
|
|
1198
1468
|
color: var(--lockerverse-text);
|
|
1199
1469
|
text-align: left;
|
|
1200
|
-
cursor: pointer;
|
|
1201
1470
|
background: var(--lockerverse-control);
|
|
1202
1471
|
border: 1px solid var(--lockerverse-border);
|
|
1203
|
-
border-radius: var(--lockerverse-radius);
|
|
1472
|
+
border-radius: calc(var(--lockerverse-radius) + 7px);
|
|
1473
|
+
box-shadow: 0 5px 18px rgb(75 50 27 / 5%);
|
|
1474
|
+
transition:
|
|
1475
|
+
background 180ms ease,
|
|
1476
|
+
border-color 180ms ease,
|
|
1477
|
+
box-shadow 180ms ease,
|
|
1478
|
+
transform 180ms ease;
|
|
1204
1479
|
}
|
|
1205
1480
|
|
|
1206
1481
|
.lockerverse-launcher__product:hover {
|
|
1207
|
-
border-color: color-mix(in srgb, var(--lockerverse-accent)
|
|
1482
|
+
border-color: color-mix(in srgb, var(--lockerverse-accent) 42%, transparent);
|
|
1483
|
+
transform: translateY(-1px);
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
.lockerverse-launcher__product[data-selected="true"] {
|
|
1487
|
+
background: color-mix(
|
|
1488
|
+
in srgb,
|
|
1489
|
+
var(--lockerverse-accent) 8%,
|
|
1490
|
+
var(--lockerverse-bg)
|
|
1491
|
+
);
|
|
1492
|
+
border-color: color-mix(in srgb, var(--lockerverse-accent) 55%, transparent);
|
|
1493
|
+
box-shadow: inset 3px 0 0 var(--lockerverse-accent);
|
|
1208
1494
|
}
|
|
1209
1495
|
|
|
1210
1496
|
.lockerverse-launcher__product-copy {
|
|
1211
1497
|
display: grid;
|
|
1212
|
-
|
|
1498
|
+
flex: 1;
|
|
1499
|
+
gap: 2px;
|
|
1500
|
+
min-width: 0;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
.lockerverse-launcher__product-name {
|
|
1504
|
+
overflow: hidden;
|
|
1505
|
+
text-overflow: ellipsis;
|
|
1506
|
+
font-size: 15px;
|
|
1507
|
+
font-weight: 600;
|
|
1508
|
+
white-space: nowrap;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
.lockerverse-launcher__product-price {
|
|
1512
|
+
margin-top: 2px;
|
|
1513
|
+
font-size: 14px;
|
|
1514
|
+
font-weight: 650;
|
|
1515
|
+
font-variant-numeric: tabular-nums;
|
|
1213
1516
|
}
|
|
1214
1517
|
|
|
1215
1518
|
.lockerverse-launcher__product-copy small {
|
|
@@ -1217,24 +1520,116 @@
|
|
|
1217
1520
|
color: var(--lockerverse-muted);
|
|
1218
1521
|
}
|
|
1219
1522
|
|
|
1220
|
-
.lockerverse-
|
|
1221
|
-
|
|
1523
|
+
.lockerverse-launcher__quantity {
|
|
1524
|
+
display: inline-grid;
|
|
1525
|
+
grid-template-columns: 36px 38px 36px;
|
|
1526
|
+
align-items: center;
|
|
1527
|
+
overflow: hidden;
|
|
1528
|
+
background: var(--lockerverse-bg);
|
|
1529
|
+
border: 1px solid var(--lockerverse-border);
|
|
1530
|
+
border-radius: calc(var(--lockerverse-radius) - 1px);
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
.lockerverse-launcher__quantity button {
|
|
1534
|
+
min-height: 36px;
|
|
1535
|
+
padding: 0;
|
|
1536
|
+
font: inherit;
|
|
1537
|
+
color: var(--lockerverse-text);
|
|
1538
|
+
cursor: pointer;
|
|
1539
|
+
background: var(--lockerverse-subtle);
|
|
1540
|
+
border: 0;
|
|
1541
|
+
transition:
|
|
1542
|
+
color 150ms ease,
|
|
1543
|
+
background 150ms ease,
|
|
1544
|
+
transform 100ms ease;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
.lockerverse-launcher__quantity button:hover:not(:disabled) {
|
|
1548
|
+
color: var(--lockerverse-accent);
|
|
1549
|
+
background: color-mix(in srgb, var(--lockerverse-accent) 12%, transparent);
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
.lockerverse-launcher__quantity button:active:not(:disabled) {
|
|
1553
|
+
transform: scale(0.92);
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
.lockerverse-launcher__quantity button:disabled,
|
|
1557
|
+
.lockerverse-launcher__continue:disabled {
|
|
1558
|
+
cursor: not-allowed;
|
|
1559
|
+
opacity: 0.45;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
.lockerverse-launcher__quantity output {
|
|
1222
1563
|
font-weight: 600;
|
|
1564
|
+
font-variant-numeric: tabular-nums;
|
|
1565
|
+
text-align: center;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
.lockerverse-launcher__custom-amount {
|
|
1569
|
+
display: grid;
|
|
1570
|
+
grid-template-columns: auto minmax(80px, 112px);
|
|
1571
|
+
gap: 4px 6px;
|
|
1572
|
+
align-items: center;
|
|
1573
|
+
color: var(--lockerverse-muted);
|
|
1223
1574
|
}
|
|
1224
1575
|
|
|
1225
|
-
.lockerverse-
|
|
1576
|
+
.lockerverse-launcher__custom-amount input {
|
|
1226
1577
|
width: 100%;
|
|
1227
|
-
min-height:
|
|
1228
|
-
padding:
|
|
1578
|
+
min-height: 38px;
|
|
1579
|
+
padding: 7px 9px;
|
|
1229
1580
|
font: inherit;
|
|
1230
|
-
font-
|
|
1581
|
+
font-variant-numeric: tabular-nums;
|
|
1231
1582
|
color: var(--lockerverse-text);
|
|
1232
|
-
|
|
1583
|
+
appearance: textfield;
|
|
1584
|
+
background: var(--lockerverse-bg);
|
|
1233
1585
|
border: 1px solid var(--lockerverse-border);
|
|
1234
1586
|
border-radius: var(--lockerverse-radius);
|
|
1235
1587
|
}
|
|
1236
1588
|
|
|
1237
|
-
.lockerverse-
|
|
1589
|
+
.lockerverse-launcher__custom-amount input::-webkit-inner-spin-button,
|
|
1590
|
+
.lockerverse-launcher__custom-amount input::-webkit-outer-spin-button {
|
|
1591
|
+
margin: 0;
|
|
1592
|
+
appearance: none;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
.lockerverse-launcher__custom-amount small {
|
|
1596
|
+
grid-column: 1 / -1;
|
|
1597
|
+
font-size: 11px;
|
|
1598
|
+
text-align: right;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
.lockerverse-launcher__select {
|
|
1602
|
+
min-height: 38px;
|
|
1603
|
+
padding: 7px 13px;
|
|
1604
|
+
font: inherit;
|
|
1605
|
+
font-weight: 600;
|
|
1606
|
+
color: var(--lockerverse-text);
|
|
1607
|
+
cursor: pointer;
|
|
1608
|
+
background: var(--lockerverse-subtle);
|
|
1609
|
+
border: 1px solid var(--lockerverse-border);
|
|
1610
|
+
border-radius: var(--lockerverse-radius);
|
|
1611
|
+
transition:
|
|
1612
|
+
color 160ms ease,
|
|
1613
|
+
background 160ms ease,
|
|
1614
|
+
border-color 160ms ease,
|
|
1615
|
+
transform 100ms ease;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
.lockerverse-launcher__select:hover {
|
|
1619
|
+
border-color: color-mix(in srgb, var(--lockerverse-accent) 50%, transparent);
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
.lockerverse-launcher__select:active {
|
|
1623
|
+
transform: scale(0.97);
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
.lockerverse-launcher__select[aria-pressed="true"] {
|
|
1627
|
+
color: var(--lockerverse-accent-contrast);
|
|
1628
|
+
background: var(--lockerverse-accent);
|
|
1629
|
+
border-color: var(--lockerverse-accent);
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
.lockerverse-launcher__continue {
|
|
1238
1633
|
min-height: 48px;
|
|
1239
1634
|
padding: 12px;
|
|
1240
1635
|
font: inherit;
|
|
@@ -1244,6 +1639,79 @@
|
|
|
1244
1639
|
background: var(--lockerverse-accent);
|
|
1245
1640
|
border: 0;
|
|
1246
1641
|
border-radius: var(--lockerverse-radius);
|
|
1642
|
+
box-shadow: 0 10px 24px
|
|
1643
|
+
color-mix(in srgb, var(--lockerverse-accent) 22%, transparent);
|
|
1644
|
+
transition:
|
|
1645
|
+
filter 160ms ease,
|
|
1646
|
+
transform 100ms ease,
|
|
1647
|
+
box-shadow 160ms ease;
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
.lockerverse-launcher__continue::after {
|
|
1651
|
+
margin-left: 8px;
|
|
1652
|
+
content: "→";
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
.lockerverse-launcher__continue:hover:not(:disabled) {
|
|
1656
|
+
box-shadow: 0 12px 30px
|
|
1657
|
+
color-mix(in srgb, var(--lockerverse-accent) 30%, transparent);
|
|
1658
|
+
filter: brightness(1.04);
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
.lockerverse-launcher__continue:active:not(:disabled) {
|
|
1662
|
+
transform: scale(0.985);
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
.lockerverse-launcher__footer {
|
|
1666
|
+
position: sticky;
|
|
1667
|
+
bottom: -30px;
|
|
1668
|
+
z-index: 2;
|
|
1669
|
+
display: grid;
|
|
1670
|
+
grid-template-columns: minmax(0, 1fr) minmax(180px, 0.8fr);
|
|
1671
|
+
gap: 18px;
|
|
1672
|
+
align-items: center;
|
|
1673
|
+
padding: 16px 30px 30px;
|
|
1674
|
+
margin: 8px -30px -30px;
|
|
1675
|
+
background: color-mix(in srgb, var(--lockerverse-bg) 96%, transparent);
|
|
1676
|
+
border-top: 1px solid var(--lockerverse-border);
|
|
1677
|
+
box-shadow: 0 -12px 28px
|
|
1678
|
+
color-mix(in srgb, var(--lockerverse-bg) 82%, transparent);
|
|
1679
|
+
backdrop-filter: blur(12px);
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
.lockerverse-launcher__summary {
|
|
1683
|
+
display: grid;
|
|
1684
|
+
gap: 2px;
|
|
1685
|
+
margin: 0;
|
|
1686
|
+
font-size: 12px;
|
|
1687
|
+
color: var(--lockerverse-muted);
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
.lockerverse-launcher__summary strong {
|
|
1691
|
+
font-size: 18px;
|
|
1692
|
+
font-variant-numeric: tabular-nums;
|
|
1693
|
+
color: var(--lockerverse-text);
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
.lockerverse-launcher__loading {
|
|
1697
|
+
display: grid;
|
|
1698
|
+
gap: 10px;
|
|
1699
|
+
margin-top: 26px;
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
.lockerverse-launcher__loading-row {
|
|
1703
|
+
display: block;
|
|
1704
|
+
height: 76px;
|
|
1705
|
+
background: linear-gradient(
|
|
1706
|
+
100deg,
|
|
1707
|
+
var(--lockerverse-control) 20%,
|
|
1708
|
+
var(--lockerverse-subtle) 42%,
|
|
1709
|
+
var(--lockerverse-control) 64%
|
|
1710
|
+
);
|
|
1711
|
+
background-size: 240% 100%;
|
|
1712
|
+
border: 1px solid var(--lockerverse-border);
|
|
1713
|
+
border-radius: calc(var(--lockerverse-radius) + 3px);
|
|
1714
|
+
animation: lockerverse-launcher-shimmer 1.4s ease-in-out infinite;
|
|
1247
1715
|
}
|
|
1248
1716
|
|
|
1249
1717
|
.lockerverse-launcher__dialog > [role="alert"] {
|
|
@@ -1272,6 +1740,51 @@
|
|
|
1272
1740
|
padding: 22px 18px max(22px, env(safe-area-inset-bottom));
|
|
1273
1741
|
border-radius: 18px 18px 0 0;
|
|
1274
1742
|
}
|
|
1743
|
+
|
|
1744
|
+
.lockerverse-launcher__dialog:has(.lockerverse-launcher__products) {
|
|
1745
|
+
padding: 22px 18px max(22px, env(safe-area-inset-bottom));
|
|
1746
|
+
border-radius: 18px 18px 0 0;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
.lockerverse-launcher__product {
|
|
1750
|
+
gap: 12px;
|
|
1751
|
+
padding: 14px;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
.lockerverse-launcher__footer {
|
|
1755
|
+
bottom: -22px;
|
|
1756
|
+
grid-template-columns: 1fr;
|
|
1757
|
+
gap: 10px;
|
|
1758
|
+
padding: 14px 18px max(22px, env(safe-area-inset-bottom));
|
|
1759
|
+
margin: 8px -18px calc(-1 * max(22px, env(safe-area-inset-bottom)));
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
.lockerverse-launcher__summary {
|
|
1763
|
+
grid-template-columns: 1fr auto;
|
|
1764
|
+
align-items: baseline;
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
@keyframes lockerverse-launcher-enter {
|
|
1769
|
+
from {
|
|
1770
|
+
opacity: 0;
|
|
1771
|
+
transform: translateY(12px) scale(0.98);
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
@keyframes lockerverse-launcher-fade-in {
|
|
1776
|
+
from {
|
|
1777
|
+
opacity: 0;
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
@keyframes lockerverse-launcher-shimmer {
|
|
1782
|
+
0% {
|
|
1783
|
+
background-position: 100% 0;
|
|
1784
|
+
}
|
|
1785
|
+
100% {
|
|
1786
|
+
background-position: -100% 0;
|
|
1787
|
+
}
|
|
1275
1788
|
}
|
|
1276
1789
|
|
|
1277
1790
|
@media (prefers-reduced-motion: reduce) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lockerverse/react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.69",
|
|
4
4
|
"description": "Tree-shakable React payment and signup UI for Lockerverse",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@base-ui/react": "1.6.0",
|
|
62
62
|
"valibot": "1.4.2",
|
|
63
|
-
"@lockerverse/sdk": "0.2.
|
|
63
|
+
"@lockerverse/sdk": "0.2.69"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@size-limit/file": "13.0.3",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
"name": "React payment styles",
|
|
112
|
-
"limit": "5 kB",
|
|
112
|
+
"limit": "5.7 kB",
|
|
113
113
|
"path": "dist/styles.css"
|
|
114
114
|
},
|
|
115
115
|
{
|