@dropins/storefront-auth 0.0.1-alpha17 → 0.0.1-alpha19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{jsxs as x,jsx as d,Fragment as k}from"@dropins/tools/preact-jsx-runtime.js";import{useCallback as b,useRef as g,useState as _,useEffect as v}from"@dropins/tools/preact-hooks.js";import{classes as I}from"@dropins/tools/lib.js";import{Button as S,Field as M,Picker as V,Input as O,InputDate as R,Checkbox as y,TextArea as H}from"@dropins/tools/components.js";import{initReCaptcha as P}from"@dropins/tools/recaptcha.js";import{useText as q}from"@dropins/tools/i18n.js";import*as f from"@dropins/tools/preact-compat.js";import{memo as U,useCallback as N}from"@dropins/tools/preact-compat.js";const ee=r=>{if(!r)return null;const o=new FormData(r);if(o&&typeof o.entries=="function"){const u=o.entries();if(u&&typeof u[Symbol.iterator]=="function")return JSON.parse(JSON.stringify(Object.fromEntries(u)))||{}}return{}},re=r=>typeof r=="function",te=({type:r,buttonText:o,variant:u,className:l="",enableLoader:c=!1,onClick:s,style:h,icon:n,...p})=>{const $=b(T=>{s==null||s(T)},[s]);return x(S,{icon:n,style:h,type:r,variant:u,className:I(["auth-button",l,c?"enableLoader":""]),onClick:$,...p,children:[d("span",{className:"auth-button__text",children:o}),c?d("div",{className:"auth-button__loader-wrapper",children:d("span",{className:"auth-button__loader"})}):null]})},W=r=>r.reduce((o,{code:u,required:l,defaultValue:c})=>(l&&(o[u]=c),o),{}),G=({fieldsConfig:r,submitCallback:o})=>{const{requiredFieldError:u}=q({requiredFieldError:"Auth.FormText.requiredFieldError"}),l=g(null),[c,s]=_({}),[h,n]=_({});v(()=>{if(!r.length)return;const E=W(r);s(E)},[r==null?void 0:r.length]);const p=b((E,e)=>{const t=r.find(i=>i.code===E);return t!=null&&t.required&&!e?u:""},[r,u]),$=b(E=>{const{name:e,value:t,type:a,checked:i}=E==null?void 0:E.target,w=a==="checkbox"?i:t;s(D=>({...D,[e]:w}))},[]);v(()=>{P()},[]);const A=b(E=>{const{name:e,value:t,type:a,checked:i}=E==null?void 0:E.target,w=a==="checkbox"?i:t;n(D=>({...D,[e]:p(e,w)}))},[p]),T=b(E=>{E.preventDefault();let e=!0,t={},a=null;for(const[i,w]of Object.entries(c)){const D=p(i,w);D&&(t[i]=D,e=!1,a||(a=i))}if(n(t),a&&l.current){const i=l.current.elements.namedItem(a);i==null||i.focus()}o==null||o(E,e)},[c,p,o]);return{formData:c,errors:h,formRef:l,handleChange:$,handleBlur:A,handleSubmit:T}};var L=(r=>(r.BOOLEAN="BOOLEAN",r.DATE="DATE",r.DATETIME="DATETIME",r.DROPDOWN="DROPDOWN",r.FILE="FILE",r.GALLERY="GALLERY",r.HIDDEN="HIDDEN",r.IMAGE="IMAGE",r.MEDIA_IMAGE="MEDIA_IMAGE",r.MULTILINE="MULTILINE",r.MULTISELECT="MULTISELECT",r.PRICE="PRICE",r.SELECT="SELECT",r.TEXT="TEXT",r.TEXTAREA="TEXTAREA",r.UNDEFINED="UNDEFINED",r.VISUAL="VISUAL",r.WEIGHT="WEIGHT",r.EMPTY="",r))(L||{});const C=U(({loading:r,values:o,fields:u=[],errors:l,className:c="",onChange:s,onBlur:h})=>{const n=`${c}__field`,p=N((e,t,a)=>d(M,{error:a,className:I([n,`${n}--${e.id}`,[`${n}--${e.id}-hidden`,e.hidden],e.className]),"data-testid":`${c}--${e.id}`,disabled:r,children:d(V,{name:e.id,floatingLabel:`${e.label} ${e.required?"*":""}`,placeholder:e.label,"aria-label":e.label,options:e.options.map(i=>({...i,text:i.label})),onBlur:h,handleSelect:s,value:t||e.defaultValue})},e.id),[c,r,n,h,s]),$=N((e,t,a)=>d(M,{error:a,className:I([n,`${n}--${e.id}`,[`${n}--${e.id}-hidden`,e.hidden],e.className]),"data-testid":`${c}--${e.id}`,disabled:r,children:d(O,{type:"text",name:e.id,value:t===void 0?e.defaultValue:t,placeholder:e.label,floatingLabel:`${e.label} ${e.required?"*":""}`,onBlur:h,onChange:s})},e.id),[c,r,n,h,s]),A=N((e,t,a)=>d(M,{error:a,className:I([n,`${n}--${e.id}`,[`${n}--${e.id}-hidden`,e.hidden],e.className]),"data-testid":`${c}--${e.id}`,disabled:r,children:d(R,{type:"text",name:e.id,value:t||e.defaultValue,placeholder:e.label,floatingLabel:`${e.label} ${e.required?"*":""}`,onBlur:h,onChange:s})},e.id),[c,r,n,h,s]),T=N((e,t,a)=>d(M,{error:a,className:I([n,`${n}--${e.id}`,[`${n}--${e.id}-hidden`,e.hidden],e.className]),"data-testid":`${c}--${e.id}`,disabled:r,children:d(y,{name:e.id,checked:t||e.defaultValue,placeholder:e.label,label:`${e.label} ${e.required?"*":""}`,onBlur:h,onChange:s})},e.id),[c,r,n,h,s]),E=N((e,t,a)=>d(M,{error:a,className:I([n,`${n}--${e.id}`,[`${n}--${e.id}-hidden`,e.hidden],e.className]),"data-testid":`${c}--${e.id}`,disabled:r,children:d(H,{type:"text",name:e.id,value:t===void 0?e.defaultValue:t,label:`${e.label} ${e.required?"*":""}`,onBlur:h,onChange:s})},e.id),[c,r,n,h,s]);return u.length?d(k,{children:u.map(e=>{const t=(l==null?void 0:l[e.id])??void 0,a=(o==null?void 0:o[e.id])??void 0;switch(e.fieldType){case L.TEXT:return e.options.length?p(e,a,t):$(e,a,t);case L.MULTILINE:return $(e,a,t);case L.SELECT:return p(e,a,t);case L.DATE:return A(e,a,t);case L.BOOLEAN:return T(e,a,t);case"TEXTAREA":return E(e,a,t);default:return null}})}):null}),ne=({name:r,isLoading:o,children:u,className:l="defaultForm",fieldsConfig:c=[],submitCallback:s})=>{const{formData:h,errors:n,formRef:p,handleChange:$,handleBlur:A,handleSubmit:T}=G({submitCallback:s,fieldsConfig:c});return x("form",{onSubmit:T,className:l,name:r,ref:p,children:[d(C,{fields:c,onChange:$,onBlur:A,errors:n,values:h,className:l,isLoading:o}),u]})},ae=({children:r,text:o,bottomLine:u=!0,className:l})=>x("div",{className:I(["auth-title",l]),"data-testid":"auth-title_id",children:[x("div",{className:"auth-title__text",children:[d("h1",{className:"auth-title__heading",children:o}),r]}),u?d("div",{className:"auth-title__hr"}):null]}),Z=r=>f.createElement("svg",{id:"Icon_Warning_Base",width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},f.createElement("g",{clipPath:"url(#clip0_841_1324)"},f.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.9949 2.30237L0.802734 21.6977H23.1977L11.9949 2.30237Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M12.4336 10.5504L12.3373 14.4766H11.6632L11.5669 10.5504V9.51273H12.4336V10.5504ZM11.5883 18.2636V17.2687H12.4229V18.2636H11.5883Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),f.createElement("defs",null,f.createElement("clipPath",{id:"clip0_841_1324"},f.createElement("rect",{width:24,height:21,fill:"white",transform:"translate(0 1.5)"})))),B=r=>f.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},f.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z",stroke:"currentColor"}),f.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.75 12.762L10.2385 15.75L17.25 9",stroke:"currentColor"})),X=r=>f.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},f.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z",stroke:"currentColor"}),f.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.75 5.88423V4.75H12.25V5.88423L12.0485 13.0713H11.9515L11.75 5.88423ZM11.7994 18.25V16.9868H12.2253V18.25H11.7994Z",stroke:"currentColor"})),j={success:d(B,{}),warning:d(Z,{}),error:d(X,{})},ce=()=>{const[r,o]=_({}),u=b(l=>{if(!l||!l.type){o({});return}const c=j[l.type];o({...l,icon:c})},[]);return{inLineAlertProps:r,handleSetInLineAlertProps:u}};export{te as B,ne as F,ae as T,re as c,ee as g,ce as u};
1
+ import{jsxs as v,jsx as d,Fragment as S}from"@dropins/tools/preact-jsx-runtime.js";import{useCallback as D,useRef as g,useState as k,useEffect as V}from"@dropins/tools/preact-hooks.js";import{classes as L}from"@dropins/tools/lib.js";import{Button as R,Field as N,Picker as O,Input as y,InputDate as H,Checkbox as P,TextArea as q}from"@dropins/tools/components.js";import{initReCaptcha as U}from"@dropins/tools/recaptcha.js";import{useText as W}from"@dropins/tools/i18n.js";import*as f from"@dropins/tools/preact-compat.js";import{memo as G,useCallback as _}from"@dropins/tools/preact-compat.js";const te=r=>{if(!r)return null;const c=new FormData(r);if(c&&typeof c.entries=="function"){const u=c.entries();if(u&&typeof u[Symbol.iterator]=="function")return JSON.parse(JSON.stringify(Object.fromEntries(u)))||{}}return{}},ne=r=>typeof r=="function",ae=({type:r,buttonText:c,variant:u,className:l="",enableLoader:o=!1,onClick:s,style:h,icon:a,...p})=>{const I=D(A=>{s==null||s(A)},[s]);return v(R,{icon:a,style:h,type:r,variant:u,className:L(["auth-button",l,o?"enableLoader":""]),onClick:I,...p,children:[d("span",{className:"auth-button__text",children:c}),o?d("div",{className:"auth-button__loader-wrapper",children:d("span",{className:"auth-button__loader"})}):null]})},C=r=>r.reduce((c,{code:u,required:l,defaultValue:o})=>(l&&(c[u]=o),c),{}),F=({fieldsConfig:r,submitCallback:c})=>{const{requiredFieldError:u}=W({requiredFieldError:"Auth.FormText.requiredFieldError"}),l=g(null),o=g(!1),[s,h]=k({}),[a,p]=k({}),I=D(async()=>{o.current||(await U(0),o.current=!0)},[]);V(()=>{if(!r.length)return;const t=C(r);h(t)},[r==null?void 0:r.length]);const $=D((t,n)=>{const E=r.find(i=>i.code===t);return E!=null&&E.required&&!n?u:""},[r,u]),A=D(t=>{const{name:n,value:E,type:T,checked:i}=t==null?void 0:t.target,M=T==="checkbox"?i:E;h(b=>({...b,[n]:M}))},[]),x=D(t=>{const{name:n,value:E,type:T,checked:i}=t==null?void 0:t.target,M=T==="checkbox"?i:E;p(b=>({...b,[n]:$(n,M)}))},[$]),e=D(t=>{t.preventDefault();let n=!0,E={},T=null;for(const[i,M]of Object.entries(s)){const b=$(i,M);b&&(E[i]=b,n=!1,T||(T=i))}if(p(E),T&&l.current){const i=l.current.elements.namedItem(T);i==null||i.focus()}c==null||c(t,n)},[s,$,c]);return{formData:s,errors:a,formRef:l,handleChange:A,handleBlur:x,handleSubmit:e,handleFocus:I}};var w=(r=>(r.BOOLEAN="BOOLEAN",r.DATE="DATE",r.DATETIME="DATETIME",r.DROPDOWN="DROPDOWN",r.FILE="FILE",r.GALLERY="GALLERY",r.HIDDEN="HIDDEN",r.IMAGE="IMAGE",r.MEDIA_IMAGE="MEDIA_IMAGE",r.MULTILINE="MULTILINE",r.MULTISELECT="MULTISELECT",r.PRICE="PRICE",r.SELECT="SELECT",r.TEXT="TEXT",r.TEXTAREA="TEXTAREA",r.UNDEFINED="UNDEFINED",r.VISUAL="VISUAL",r.WEIGHT="WEIGHT",r.EMPTY="",r))(w||{});const Z=G(({loading:r,values:c,fields:u=[],errors:l,className:o="",onChange:s,onBlur:h})=>{const a=`${o}__field`,p=_((e,t,n)=>d(N,{error:n,className:L([a,`${a}--${e.id}`,[`${a}--${e.id}-hidden`,e.hidden],e.className]),"data-testid":`${o}--${e.id}`,disabled:r,children:d(O,{name:e.id,floatingLabel:`${e.label} ${e.required?"*":""}`,placeholder:e.label,"aria-label":e.label,options:e.options.map(E=>({...E,text:E.label})),onBlur:h,handleSelect:s,value:t||e.defaultValue})},e.id),[o,r,a,h,s]),I=_((e,t,n)=>d(N,{error:n,className:L([a,`${a}--${e.id}`,[`${a}--${e.id}-hidden`,e.hidden],e.className]),"data-testid":`${o}--${e.id}`,disabled:r,children:d(y,{type:"text",name:e.id,value:t===void 0?e.defaultValue:t,placeholder:e.label,floatingLabel:`${e.label} ${e.required?"*":""}`,onBlur:h,onChange:s})},e.id),[o,r,a,h,s]),$=_((e,t,n)=>d(N,{error:n,className:L([a,`${a}--${e.id}`,[`${a}--${e.id}-hidden`,e.hidden],e.className]),"data-testid":`${o}--${e.id}`,disabled:r,children:d(H,{type:"text",name:e.id,value:t||e.defaultValue,placeholder:e.label,floatingLabel:`${e.label} ${e.required?"*":""}`,onBlur:h,onChange:s})},e.id),[o,r,a,h,s]),A=_((e,t,n)=>d(N,{error:n,className:L([a,`${a}--${e.id}`,[`${a}--${e.id}-hidden`,e.hidden],e.className]),"data-testid":`${o}--${e.id}`,disabled:r,children:d(P,{name:e.id,checked:t||e.defaultValue,placeholder:e.label,label:`${e.label} ${e.required?"*":""}`,onBlur:h,onChange:s})},e.id),[o,r,a,h,s]),x=_((e,t,n)=>d(N,{error:n,className:L([a,`${a}--${e.id}`,[`${a}--${e.id}-hidden`,e.hidden],e.className]),"data-testid":`${o}--${e.id}`,disabled:r,children:d(q,{type:"text",name:e.id,value:t===void 0?e.defaultValue:t,label:`${e.label} ${e.required?"*":""}`,onBlur:h,onChange:s})},e.id),[o,r,a,h,s]);return u.length?d(S,{children:u.map(e=>{const t=(l==null?void 0:l[e.id])??void 0,n=(c==null?void 0:c[e.id])??void 0;switch(e.fieldType){case w.TEXT:return e.options.length?p(e,n,t):I(e,n,t);case w.MULTILINE:return I(e,n,t);case w.SELECT:return p(e,n,t);case w.DATE:return $(e,n,t);case w.BOOLEAN:return A(e,n,t);case"TEXTAREA":return x(e,n,t);default:return null}})}):null}),ce=({name:r,isLoading:c,children:u,className:l="defaultForm",fieldsConfig:o=[],submitCallback:s})=>{const{formData:h,errors:a,formRef:p,handleChange:I,handleBlur:$,handleSubmit:A,handleFocus:x}=F({submitCallback:s,fieldsConfig:o});return v("form",{onSubmit:A,className:l,name:r,ref:p,onFocus:x,children:[d(Z,{fields:o,onChange:I,onBlur:$,errors:a,values:h,className:l,isLoading:c}),u]})},oe=({children:r,text:c,bottomLine:u=!0,className:l})=>v("div",{className:L(["auth-title",l]),"data-testid":"auth-title_id",children:[v("div",{className:"auth-title__text",children:[d("h1",{className:"auth-title__heading",children:c}),r]}),u?d("div",{className:"auth-title__hr"}):null]}),B=r=>f.createElement("svg",{id:"Icon_Warning_Base",width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},f.createElement("g",{clipPath:"url(#clip0_841_1324)"},f.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.9949 2.30237L0.802734 21.6977H23.1977L11.9949 2.30237Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M12.4336 10.5504L12.3373 14.4766H11.6632L11.5669 10.5504V9.51273H12.4336V10.5504ZM11.5883 18.2636V17.2687H12.4229V18.2636H11.5883Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),f.createElement("defs",null,f.createElement("clipPath",{id:"clip0_841_1324"},f.createElement("rect",{width:24,height:21,fill:"white",transform:"translate(0 1.5)"})))),X=r=>f.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},f.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z",stroke:"currentColor"}),f.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.75 12.762L10.2385 15.75L17.25 9",stroke:"currentColor"})),j=r=>f.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},f.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z",stroke:"currentColor"}),f.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.75 5.88423V4.75H12.25V5.88423L12.0485 13.0713H11.9515L11.75 5.88423ZM11.7994 18.25V16.9868H12.2253V18.25H11.7994Z",stroke:"currentColor"})),Y={success:d(X,{}),warning:d(B,{}),error:d(j,{})},le=()=>{const[r,c]=k({}),u=D(l=>{if(!l||!l.type){c({});return}const o=Y[l.type];c({...l,icon:o})},[]);return{inLineAlertProps:r,handleSetInLineAlertProps:u}};export{ae as B,ce as F,oe as T,ne as c,te as g,le as u};
@@ -1 +1 @@
1
- import{jsxs as s,jsx as i,Fragment as u}from"@dropins/tools/preact-jsx-runtime.js";import{classes as m,Slot as d}from"@dropins/tools/lib.js";import{Button as r}from"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{r as f}from"../chunks/revokeCustomerToken.js";import{useText as h}from"@dropins/tools/i18n.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getStoreConfig.js";const p=({formSize:e="default",className:c="",slots:t,headingText:a,messageText:n})=>{const o=h({headingText:"Auth.SuccessNotification.headingText",messageText:"Auth.SuccessNotification.messageText",primaryButtonText:"Auth.SuccessNotification.primaryButtonText",secondaryButtonText:"Auth.SuccessNotification.secondaryButtonText"});return s("div",{className:m(["auth-successNotificationForm",e,c]),children:[i("p",{className:"auth-successNotificationForm__title","data-testid":"notification-title",children:a||o.headingText}),i("p",{className:"auth-successNotificationForm__content-text","data-testid":"notification-content",children:n||o.messageText}),t!=null&&t.SuccessNotificationActions?i(d,{"data-testid":"successNotificationActions",name:"SuccessNotificationActions",slot:t==null?void 0:t.SuccessNotificationActions,context:{}}):s(u,{children:[i(r,{"data-testid":"primaryButton",type:"button",className:"auth-successNotificationForm__button auth-successNotificationForm__button--top",onClick:()=>window.location.href="/",children:o.primaryButtonText}),i(r,{"data-testid":"secondaryButton",type:"button",variant:"tertiary",onClick:async()=>{await f(),window.location.href="/"},children:o.secondaryButtonText})]})]})},F=({formSize:e="default",slots:c,className:t,headingText:a,messageText:n})=>i("div",{className:"auth-success-notification",children:i(p,{formSize:e,className:t,slots:c,headingText:a,messageText:n})});export{F as SuccessNotification,F as default};
1
+ import{jsxs as a,jsx as o,Fragment as r}from"@dropins/tools/preact-jsx-runtime.js";import{classes as u,Slot as m}from"@dropins/tools/lib.js";import{Button as s}from"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{r as d}from"../chunks/revokeCustomerToken.js";import{useText as f}from"@dropins/tools/i18n.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getStoreConfig.js";const h=({formSize:e="default",className:n="",slots:t,labels:i})=>{const c=f({headingText:"Auth.SuccessNotification.headingText",messageText:"Auth.SuccessNotification.messageText",primaryButtonText:"Auth.SuccessNotification.primaryButtonText",secondaryButtonText:"Auth.SuccessNotification.secondaryButtonText"});return a("div",{className:u(["auth-successNotificationForm",e,n]),children:[o("p",{className:"auth-successNotificationForm__title","data-testid":"notification-title",children:(i==null?void 0:i.headingText)||c.headingText}),o("p",{className:"auth-successNotificationForm__content-text","data-testid":"notification-content",children:(i==null?void 0:i.messageText)||c.messageText}),t!=null&&t.SuccessNotificationActions?o(m,{"data-testid":"successNotificationActions",name:"SuccessNotificationActions",slot:t==null?void 0:t.SuccessNotificationActions,context:{}}):a(r,{children:[o(s,{"data-testid":"primaryButton",type:"button",className:"auth-successNotificationForm__button auth-successNotificationForm__button--top",onClick:()=>window.location.href="/",children:c.primaryButtonText}),o(s,{"data-testid":"secondaryButton",type:"button",variant:"tertiary",onClick:async()=>{await d(),window.location.href="/"},children:c.secondaryButtonText})]})]})},F=({formSize:e="default",slots:n,className:t,labels:i})=>o("div",{className:"auth-success-notification",children:o(h,{formSize:e,className:t,slots:n,labels:i})});export{F as SuccessNotification,F as default};
@@ -7,5 +7,6 @@ export declare const useForm: ({ fieldsConfig, submitCallback }: useFormProps) =
7
7
  handleChange: (event: Event) => void;
8
8
  handleBlur: (event: Event) => void;
9
9
  handleSubmit: (event: SubmitEvent) => void;
10
+ handleFocus: () => Promise<void>;
10
11
  };
11
12
  //# sourceMappingURL=useForm.d.ts.map
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name": "@dropins/storefront-auth", "version": "0.0.1-alpha17", "@dropins/elsie": "0.28.0-beta2"}
1
+ {"name": "@dropins/storefront-auth", "version": "0.0.1-alpha19", "@dropins/elsie": "0.28.2"}
@@ -6,8 +6,10 @@ export interface SuccessNotificationProps {
6
6
  };
7
7
  formSize?: 'default' | 'small';
8
8
  className?: string;
9
- headingText?: string;
10
- messageText?: string;
9
+ labels?: {
10
+ headingText: string;
11
+ messageText: string;
12
+ };
11
13
  }
12
14
  export interface SuccessNotificationFormProps extends SuccessNotificationProps {
13
15
  }