Files
kaiser-natron/dist/assets/RegisterPage-s6f4pXQK.js
Dorian d6a40592ff design system: add Footer and CheckoutStepper sections
The two newly-shipped components (Footer with cream/brand/paper
tones, CheckoutStepper with active/completed/upcoming states) are
now documented in the design system at /design/footer and
/design/checkout-stepper. Sidebar entries added under "Sections"
and "Components" respectively, with DE + EN copy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 19:14:09 +01:00

1 line
6.3 KiB
JavaScript

import{B as e,C as t,G as n,M as r,S as i,ft as a,j as o,l as ee,m as s,o as c,p as l,r as te,s as u,u as d,x as f}from"./runtime-core.esm-bundler-DTXUv7Wx.js";import{c as p,i as ne,r as m}from"./runtime-dom.esm-bundler-Bg1uJ-W7.js";import{a as re,o as ie,t as h}from"./vue-router-Cyqru1db.js";import{t as ae}from"./Icon-Dcq1PyHo.js";import{t as oe}from"./i18n-D7Ao3GC7.js";import{r as se}from"./products-BqW5PUnm.js";import{c as ce,d as le,f as ue,n as de,p as fe}from"./api-DlB23x7f.js";import{t as pe}from"./Navbar-DhReqfWX.js";import{t as me}from"./Button-D1Rp2Xe1.js";import{t as he}from"./Footer-C7VVtZ3C.js";import{t as ge}from"./CartDrawer-Bmyv2SnQ.js";import{t as g}from"./Input-D0r2DMc-.js";var _e={class:`bg-cream text-ink min-h-svh`},_={class:`mx-auto w-full max-w-md px-6 py-14 sm:px-8 sm:py-20 md:py-24`},v={class:`flex flex-col gap-3 mb-8 text-center`},y={class:`eyebrow`},b={class:`font-display font-normal leading-[1.05] tracking-tight text-ink text-headline-md`},x={class:`text-[14px] text-muted`},S={class:`flex flex-col gap-2`},C={class:`text-[11px] font-bold uppercase tracking-eyebrow text-muted`},w={class:`relative`},T={value:``},E={value:`frau`},D={value:`herr`},O={value:`divers`},k={class:`grid gap-5 md:grid-cols-2`},A={class:`inline-flex items-start gap-3 cursor-pointer select-none`},j={class:`text-sm text-ink`},M={class:`inline-flex items-start gap-3 cursor-pointer select-none`},N={class:`text-sm text-ink`},P={key:0,class:`text-sm text-danger`,role:`alert`,"aria-live":`polite`},F={class:`mt-8 text-center text-[14px] text-muted`},ve={__name:`RegisterPage`,setup(ve){let{t:I}=oe(),L=fe(),ye=re(),R=ie(),z=e(!1);function be(){z.value=!1,R.push(`/checkout`)}async function xe(e){await ce(e.id,1),z.value=!0}async function Se({productId:e,quantity:t}){await ue(e,t)}async function Ce(e){await le(e)}let we=[{key:`nav.shop`,href:`/shop`},{key:`nav.bundles`,href:`/#bundles`},{key:`nav.revitalization`,href:`/#revitalize`},{key:`nav.about`,href:`/#about`}],B=e(``),V=e(``),H=e(``),U=e(``),W=e(``),G=e(``),K=e(!1),q=e(!1),J=e(!1),Y=e(``),X=c(()=>W.value===G.value),Te=c(()=>!U.value||W.value.length<8||!X.value||!q.value);async function Ee(){Y.value=``,J.value=!0;try{await de({email:U.value,password:W.value,salutation:B.value,firstName:V.value,lastName:H.value,acceptsMarketing:K.value,acceptsTerms:q.value});let e=String(ye.query.next||`/`);R.push(e)}catch(e){Y.value=e?.message||I(`checkout.error.generic`)}finally{J.value=!1}}let Z=e(null),Q=null;function $(){let e=Z.value,t=e&&(e.$el||e);if(!t||typeof window>`u`)return;let n=Math.round(t.getBoundingClientRect().height);document.documentElement.style.setProperty(`--nav-h`,`${n}px`)}return i(()=>{if($(),typeof ResizeObserver<`u`&&Z.value){let e=Z.value.$el||Z.value;Q=new ResizeObserver($),Q.observe(e)}window.addEventListener(`resize`,$)}),f(()=>{Q&&Q.disconnect(),typeof window<`u`&&window.removeEventListener(`resize`,$)}),(e,i)=>(t(),d(te,null,[s(pe,{ref_key:`navRef`,ref:Z,variant:`cream`,layout:`standard`,items:we,"cart-count":n(L).count,products:n(se),onCart:i[0]||=e=>z.value=!0,onSearch:xe},null,8,[`cart-count`,`products`]),u(`main`,_e,[u(`div`,_,[u(`header`,v,[u(`p`,y,a(n(I)(`auth.register.eyebrow`)),1),u(`h1`,b,a(n(I)(`auth.register.title`)),1),u(`p`,x,a(n(I)(`auth.register.sub`)),1)]),u(`form`,{class:`flex flex-col gap-5 rounded-md border border-line bg-paper p-6 md:p-8`,novalidate:``,onSubmit:p(Ee,[`prevent`])},[u(`div`,S,[u(`label`,C,a(n(I)(`checkout.field.salutation`)),1),u(`div`,w,[r(u(`select`,{"onUpdate:modelValue":i[1]||=e=>B.value=e,class:`appearance-none w-full rounded-sm border border-line bg-paper pl-4 pr-10 py-3 text-[15px] text-ink transition-colors duration-base focus:outline-none focus:border-brand`},[u(`option`,T,a(n(I)(`checkout.field.salutation.placeholder`)),1),u(`option`,E,a(n(I)(`checkout.field.salutation.frau`)),1),u(`option`,D,a(n(I)(`checkout.field.salutation.herr`)),1),u(`option`,O,a(n(I)(`checkout.field.salutation.divers`)),1)],512),[[ne,B.value]]),s(ae,{name:`chevron-down`,size:18,"stroke-width":2,class:`absolute right-4 top-1/2 -translate-y-1/2 text-muted pointer-events-none`})])]),u(`div`,k,[s(g,{modelValue:V.value,"onUpdate:modelValue":i[2]||=e=>V.value=e,label:n(I)(`checkout.field.firstName`)},null,8,[`modelValue`,`label`]),s(g,{modelValue:H.value,"onUpdate:modelValue":i[3]||=e=>H.value=e,label:n(I)(`checkout.field.lastName`)},null,8,[`modelValue`,`label`])]),s(g,{modelValue:U.value,"onUpdate:modelValue":i[4]||=e=>U.value=e,label:n(I)(`checkout.field.email`),type:`email`,required:``,placeholder:n(I)(`checkout.placeholder.email`)},null,8,[`modelValue`,`label`,`placeholder`]),s(g,{modelValue:W.value,"onUpdate:modelValue":i[5]||=e=>W.value=e,label:n(I)(`checkout.field.password`),type:`password`,required:``,hint:n(I)(`checkout.hint.password`)},null,8,[`modelValue`,`label`,`hint`]),s(g,{modelValue:G.value,"onUpdate:modelValue":i[6]||=e=>G.value=e,label:n(I)(`checkout.field.passwordConfirm`),type:`password`,required:``,error:G.value&&!X.value?n(I)(`checkout.error.passwordMismatch`):``},null,8,[`modelValue`,`label`,`error`]),u(`label`,A,[r(u(`input`,{"onUpdate:modelValue":i[7]||=e=>K.value=e,type:`checkbox`,class:`mt-0.5 w-5 h-5 shrink-0 rounded-xs border border-line accent-brand`},null,512),[[m,K.value]]),u(`span`,j,a(n(I)(`checkout.field.marketing`)),1)]),u(`label`,M,[r(u(`input`,{"onUpdate:modelValue":i[8]||=e=>q.value=e,type:`checkbox`,required:``,class:`mt-0.5 w-5 h-5 shrink-0 rounded-xs border border-line accent-brand`},null,512),[[m,q.value]]),u(`span`,N,[l(a(n(I)(`auth.register.terms.before`))+` `,1),s(n(h),{to:`/datenschutz`,class:`text-brand underline`},{default:o(()=>[l(a(n(I)(`auth.register.terms.link`)),1)]),_:1}),l(` `+a(n(I)(`auth.register.terms.after`)),1)])]),Y.value?(t(),d(`p`,P,a(Y.value),1)):ee(``,!0),s(me,{type:`submit`,variant:`primary`,size:`lg`,block:``,loading:J.value,disabled:Te.value},{default:o(()=>[l(a(n(I)(`auth.register.cta`)),1)]),_:1},8,[`loading`,`disabled`])],32),u(`p`,F,[l(a(n(I)(`auth.register.haveAccount`))+` `,1),s(n(h),{to:`/login`,class:`text-brand hover:underline`},{default:o(()=>[l(a(n(I)(`auth.register.cta.signIn`)),1)]),_:1})])])]),s(he),s(ge,{modelValue:z.value,"onUpdate:modelValue":i[9]||=e=>z.value=e,items:n(L).items,subtotal:n(L).subtotal,count:n(L).count,onUpdateQuantity:Se,onRemove:Ce,onCheckout:be},null,8,[`modelValue`,`items`,`subtotal`,`count`])],64))}};export{ve as default};