@stackshift-ui/signin-signup 6.0.12 → 6.0.14-beta.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/dist/chunk-3KHZCO6J.mjs +1 -0
- package/dist/chunk-UYB2OBMQ.mjs +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/signin-signup.js +1 -1
- package/dist/signin-signup.mjs +1 -1
- package/dist/signin_signup_a.js +1 -1
- package/dist/signin_signup_a.mjs +1 -1
- package/dist/signin_signup_b.js +1 -1
- package/dist/signin_signup_b.mjs +1 -1
- package/package.json +18 -18
- package/dist/chunk-7U35HRM4.mjs +0 -1
- package/dist/chunk-DOEKUPLG.mjs +0 -1
- /package/dist/{chunk-6DGLF6TZ.mjs → chunk-IPCAE2FK.mjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,b as y}from"./chunk-4DDN6JI4.mjs";import{Button as x}from"@stackshift-ui/button";import{Container as w}from"@stackshift-ui/container";import{Flex as v}from"@stackshift-ui/flex";import{Form as S}from"@stackshift-ui/form";import{FormField as g}from"@stackshift-ui/form-field";import{Heading as z}from"@stackshift-ui/heading";import{Image as R}from"@stackshift-ui/image";import{Input as N}from"@stackshift-ui/input";import{Link as A}from"@stackshift-ui/link";import{Section as L}from"@stackshift-ui/section";import{Text as C}from"@stackshift-ui/text";import M from"react";import{Fragment as P,jsx as e,jsxs as c}from"react/jsx-runtime";function q({logo:a,form:n,formLinks:u,signInLink:p}){return e(L,{className:"py-10 rounded-md bg-gray-50 lg:py-20",children:c(w,{maxWidth:576,className:"!px-2 lg:px-4",children:[e(B,{logo:a}),c(w,{className:"mb-6 lg:px-4 text-center lg:mb-10",children:[e(T,{form:n}),e(Y,{form:n,signInLink:p,thankYouPage:y(n==null?void 0:n.thankYouPage)})]}),e(d,{formLinks:u})]})})}function B({logo:a}){var n;return a?e("div",{className:"mb-10",children:e(A,{"aria-label":`Go to ${i(a)==="/"?"home page":i(a)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:i(a),target:a==null?void 0:a.linkTarget,rel:(a==null?void 0:a.linkTarget)==="_blank"?"noopener noreferrer":"",children:e(R,{src:a==null?void 0:a.image,alt:(n=a==null?void 0:a.alt)!=null?n:"signup-logo",width:100,height:100,className:"flex justify-center mx-auto text-3xl font-bold leading-none"})})}):null}function T({form:a}){return c("div",{className:"mb-6",children:[a!=null&&a.subtitle?e(C,{muted:!0,children:a==null?void 0:a.subtitle}):null,a!=null&&a.name?e(z,{className:"text-2xl lg:text-2xl",children:a==null?void 0:a.name}):null]})}function Y({form:a,signInLink:n,thankYouPage:u}){var l,s;if(!(a!=null&&a.fields))return null;let[p,b]=M.useState({}),t=h=>{b(r=>({...r,[h]:!r[h]}))};return c(S,{id:(l=a==null?void 0:a.id)!=null?l:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:u,children:[e(H,{form:a,showPasswords:p,togglePasswordVisibility:t}),e("div",{children:e("div",{className:"webriq-recaptcha"})}),e("div",{className:"text-center",children:(a==null?void 0:a.buttonLabel)&&e(x,{as:"button",variant:"custom",ariaLabel:(s=a==null?void 0:a.buttonLabel)!=null?s:"Sign Up form submit button",className:"w-full py-4 text-sm font-bold tex-gray-50",type:"submit",children:a==null?void 0:a.buttonLabel})}),n&&e(U,{signInLink:n})]})}function H({form:a,showPasswords:n,togglePasswordVisibility:u}){var p,b;return c(P,{children:[e(v,{wrap:!0,className:"-mx-2",children:(p=a==null?void 0:a.fields)==null?void 0:p.slice(0,2).map((t,l)=>{var s;return e("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:t.type==="inputText"?e(N,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,className:"w-full py-4 text-xs bg-white",name:t==null?void 0:t.name,ariaLabel:t==null?void 0:t.label,...t,type:"text"}):e(g,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",name:(s=t==null?void 0:t.name)!=null?s:"",placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},l)})}),(b=a==null?void 0:a.fields)==null?void 0:b.slice(2).map((t,l)=>{var s;return e("div",{className:"my-3",children:t.type==="inputPassword"&&t.name?e(V,{formFields:t,showPassword:n[t.name]||!1,togglePassword:()=>u(t.name)}):e(g,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,name:(s=t==null?void 0:t.name)!=null?s:"",items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},l)})]})}function U({signInLink:a}){return a!=null&&a.label?c("div",{className:"w-full text-center mt-3",children:[e("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),e(x,{as:"link",variant:"link",link:a,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:a==null?void 0:a.label,children:a==null?void 0:a.label})]}):null}function V({formFields:a,showPassword:n,togglePassword:u}){var p;return c(v,{className:"relative",children:[e(N,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(p=a==null?void 0:a.placeholder)!=null?p:a==null?void 0:a.name,variant:"primary",type:n?"text":"password",placeholder:a==null?void 0:a.placeholder,name:a==null?void 0:a.name,required:a==null?void 0:a.isRequired}),e(x,{as:"button",variant:"unstyled",ariaLabel:n?"Show password":"Hide password",className:"absolute top-0 right-0 h-full p-2",type:"button",onClick:u,children:e(W,{showPassword:n})})]})}function d({formLinks:a}){return a?e("p",{className:"mt-10 lg:mt-3 text-xs text-center text-gray-700",children:a==null?void 0:a.map((n,u,{length:p})=>c("span",{children:[e(x,{as:"link",variant:"link",link:n,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:n==null?void 0:n.label,children:n==null?void 0:n.label}),u===p-1?null:u===p-2?e("span",{children:"\xA0and\xA0"}):e("span",{children:"\xA0,\xA0"})]},u))}):null}function W({showPassword:a}){return e(P,{children:a?e("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:c("g",{fill:"currentColor",children:[e("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),e("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),e("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):e("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:c("g",{fill:"currentColor",children:[e("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),e("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}export{q as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as b,b as w}from"./chunk-4DDN6JI4.mjs";import{Button as x}from"@stackshift-ui/button";import{Card as o}from"@stackshift-ui/card";import{Container as y}from"@stackshift-ui/container";import{Flex as d}from"@stackshift-ui/flex";import{Form as N}from"@stackshift-ui/form";import{FormField as v}from"@stackshift-ui/form-field";import{Heading as P}from"@stackshift-ui/heading";import{Image as S}from"@stackshift-ui/image";import{Input as C}from"@stackshift-ui/input";import{Link as R}from"@stackshift-ui/link";import{Section as L}from"@stackshift-ui/section";import{Text as M}from"@stackshift-ui/text";import h from"react";import{jsx as e,jsxs as c}from"react/jsx-runtime";function A({logo:a,form:n,formLinks:p,signInLink:u}){return e(L,{className:"py-10 bg-primary lg:py-20",children:e(y,{maxWidth:1280,children:c(y,{maxWidth:576,children:[e(B,{logo:a}),c(o,{borderRadius:"md",className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[e(z,{form:n}),e(m,{form:n,signInLink:u})]}),e(V,{formLinks:p})]})})})}function B({logo:a}){var n;return a?e("div",{className:"mb-10",children:e(R,{"aria-label":`Go to ${b(a)==="/"?"home page":b(a)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:b(a),target:a==null?void 0:a.linkTarget,rel:(a==null?void 0:a.linkTarget)==="_blank"?"noopener noreferrer":"",children:e(S,{src:a==null?void 0:a.image,alt:(n=a==null?void 0:a.alt)!=null?n:"signup-logo",width:100,height:100,className:"flex justify-center text-3xl font-bold leading-none text-white"})})}):null}function z({form:a}){return c("div",{className:"mb-6",children:[e(M,{muted:!0,className:"text-sm lg:text-base",children:a==null?void 0:a.subtitle}),e(P,{className:"text-xl lg:text-2xl",children:a==null?void 0:a.name})]})}function m({form:a,signInLink:n}){var r;if(!(a!=null&&a.fields))return null;let[p,u]=h.useState({}),l=s=>{u(t=>({...t,[s]:!t[s]}))};return c(N,{id:(r=a==null?void 0:a.id)!=null?r:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:w(a==null?void 0:a.thankYouPage),children:[e(q,{form:a,showPassword:p,togglePasswordVisibility:l}),e("div",{children:e("div",{className:"webriq-recaptcha"})}),c("div",{className:"text-center",children:[e(H,{form:a}),e(U,{signInLink:n})]})]})}function q({form:a,showPassword:n,togglePasswordVisibility:p}){var u,l,r,s;return c(h.Fragment,{children:[e(d,{className:"flex-col lg:flex-row gap-3",children:(l=(u=a==null?void 0:a.fields)==null?void 0:u.slice(0,2))==null?void 0:l.map((t,g)=>{var i;return e("div",{className:"w-full",children:e(v,{noLabel:!0,variant:"secondary",placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,name:(i=t==null?void 0:t.name)!=null?i:"",items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},g)})}),(s=(r=a==null?void 0:a.fields)==null?void 0:r.slice(2))==null?void 0:s.map((t,g)=>{var i;return e("div",{className:"my-3",children:(t==null?void 0:t.type)==="inputPassword"&&t.name?e(T,{formFields:t,showPassword:n[t.name]||!1,togglePassword:()=>p(t.name)}):e(v,{noLabel:!0,variant:"secondary",name:(i=t==null?void 0:t.name)!=null?i:"",placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},g)})]})}function T({formFields:a,showPassword:n,togglePassword:p}){var u;return c("div",{className:"flex",children:[e(C,{noLabel:!0,ariaLabel:(u=a==null?void 0:a.placeholder)!=null?u:a==null?void 0:a.name,variant:"secondary",type:n?"text":"password",placeholder:a==null?void 0:a.placeholder,name:a==null?void 0:a.name,required:a==null?void 0:a.isRequired}),e(x,{variant:"unstyled",as:"button",ariaLabel:n?"Show password":"Hide password",className:"focus:outline-none mr-4",type:"button",onClick:p,children:e(Y,{showPassword:n})})]})}function H({form:a}){var n;return a!=null&&a.buttonLabel?e(x,{as:"button",className:"w-full py-4 mb-3",ariaLabel:(n=a==null?void 0:a.buttonLabel)!=null?n:"Sign Up form submit button",variant:"custom",type:"submit",children:a==null?void 0:a.buttonLabel}):null}function U({signInLink:a}){return a!=null&&a.label?c("span",{className:"text-xs text-gray-900",children:[e("span",{children:"Already have an account?"})," ",e(x,{as:"link",variant:"link",link:a,className:"text-xs text-primary hover:underline",ariaLabel:a==null?void 0:a.label,children:a==null?void 0:a.label})]}):null}function V({formLinks:a}){return a?e("p",{className:"text-xs text-center text-secondary-foreground",children:a==null?void 0:a.map((n,p,{length:u})=>c("span",{children:[e(x,{as:"link",variant:"link",link:n,className:"text-xs underline text-secondary-foreground hover:text-gray-50",ariaLabel:n==null?void 0:n.label,children:n==null?void 0:n.label}),p===u-1?null:p===u-2?e("span",{children:"\xA0and\xA0"}):e("span",{children:"\xA0,\xA0"})]},p))}):null}function Y({showPassword:a}){return e(h.Fragment,{children:a?e("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:c("g",{fill:"currentColor",children:[e("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),e("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),e("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):e("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:c("g",{fill:"currentColor",children:[e("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),e("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}export{A as a};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var ht=Object.create;var w=Object.defineProperty;var yt=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,gt=Object.prototype.hasOwnProperty;var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var o=(t,e)=>{for(var r in e)w(t,r,{get:e[r],enumerable:!0})},D=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of wt(e))!gt.call(t,s)&&s!==r&&w(t,s,{get:()=>e[s],enumerable:!(i=yt(e,s))||i.enumerable});return t};var J=(t,e,r)=>(r=t!=null?ht(vt(t)):{},D(e||!t||!t.__esModule?w(r,"default",{value:t,enumerable:!0}):r,t)),Nt=t=>D(w({},"__esModule",{value:!0}),t);var x,v,L=N(()=>{"use strict";x=t=>{var e,r,i;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(r=(e=t==null?void 0:t.internalLink)==null?void 0:e.toLowerCase())!=null&&r.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(i=t==null?void 0:t.externalLink)!=null?i:"/"},v=t=>t?(t==null?void 0:t.linkType)==="linkInternal"?`/${t==null?void 0:t.internalLink}`:t==null?void 0:t.externalLink:"/thank-you"});var tt={};o(tt,{SigninSignup_A:()=>z,default:()=>z});function z({logo:t,form:e,formLinks:r,signInLink:i}){return(0,u.jsx)(I.Section,{className:"py-10 rounded-md bg-gray-50 lg:py-20",children:(0,u.jsxs)(S.Container,{maxWidth:576,children:[(0,u.jsx)(ot,{logo:t}),(0,u.jsxs)(S.Container,{className:"mb-6 text-center lg:mb-10",children:[(0,u.jsx)(Lt,{form:e}),(0,u.jsx)(St,{form:e,signInLink:i,thankYouPage:v(e==null?void 0:e.thankYouPage)})]}),(0,u.jsx)(zt,{formLinks:r})]})})}function ot({logo:t}){var e;return t?(0,u.jsx)("div",{className:"mb-10",children:(0,u.jsx)(Z.Link,{"aria-label":`Go to ${x(t)==="/"?"home page":x(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:x(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,u.jsx)(X.Image,{src:t==null?void 0:t.image,alt:(e=t==null?void 0:t.alt)!=null?e:"signup-logo",width:100,height:100,className:"flex justify-center mx-auto text-3xl font-bold leading-none"})})}):null}function Lt({form:t}){return(0,u.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,u.jsx)(F.Text,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?(0,u.jsx)(Q.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function St({form:t,signInLink:e,thankYouPage:r}){var c,n;if(!(t!=null&&t.fields))return null;let[i,s]=f.default.useState({}),a=l=>{s(b=>({...b,[l]:!b[l]}))};return(0,u.jsxs)(O.Form,{id:(c=t==null?void 0:t.id)!=null?c:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:r,children:[(0,u.jsx)(Pt,{form:t,showPasswords:i,togglePasswordVisibility:a}),(0,u.jsx)("div",{children:(0,u.jsx)("div",{className:"webriq-recaptcha"})}),(0,u.jsx)("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&(0,u.jsx)(h.Button,{as:"button",variant:"custom",ariaLabel:(n=t==null?void 0:t.buttonLabel)!=null?n:"Sign Up form submit button",className:"w-full py-4 text-sm font-bold tex-gray-50",type:"submit",children:t==null?void 0:t.buttonLabel})}),e&&(0,u.jsx)(Rt,{signInLink:e})]})}function Pt({form:t,showPasswords:e,togglePasswordVisibility:r}){var i,s;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(R.Flex,{wrap:!0,className:"-mx-2",children:(i=t==null?void 0:t.fields)==null?void 0:i.slice(0,2).map((a,c)=>{var n;return(0,u.jsx)("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:a.type==="inputText"?(0,u.jsx)(C.Input,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,className:"w-full py-4 text-xs bg-white",name:a==null?void 0:a.name,ariaLabel:a==null?void 0:a.label,...a,type:"text"}):(0,u.jsx)(P.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",name:(n=a==null?void 0:a.name)!=null?n:"",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},c)})}),(s=t==null?void 0:t.fields)==null?void 0:s.slice(2).map((a,c)=>{var n;return(0,u.jsx)("div",{className:"my-3",children:a.type==="inputPassword"&&a.name?(0,u.jsx)(Ct,{formFields:a,showPassword:e[a.name]||!1,togglePassword:()=>r(a.name)}):(0,u.jsx)(P.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,name:(n=a==null?void 0:a.name)!=null?n:"",items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},c)})]})}function Rt({signInLink:t}){return t!=null&&t.label?(0,u.jsxs)("div",{className:"w-full text-center mt-3",children:[(0,u.jsx)("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),(0,u.jsx)(h.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function Ct({formFields:t,showPassword:e,togglePassword:r}){var i;return(0,u.jsxs)(R.Flex,{className:"relative",children:[(0,u.jsx)(C.Input,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(i=t==null?void 0:t.placeholder)!=null?i:t==null?void 0:t.name,variant:"primary",type:e?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,u.jsx)(h.Button,{as:"button",variant:"unstyled",ariaLabel:e?"Show password":"Hide password",className:"absolute top-0 right-0 h-full p-2",type:"button",onClick:r,children:(0,u.jsx)(Bt,{showPassword:e})})]})}function zt({formLinks:t}){return t?(0,u.jsx)("p",{className:"mt-10 text-xs text-center text-gray-700",children:t==null?void 0:t.map((e,r,{length:i})=>(0,u.jsxs)("span",{children:[(0,u.jsx)(h.Button,{as:"link",variant:"link",link:e,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),r===i-1?null:r===i-2?(0,u.jsx)("span",{children:"\xA0and\xA0"}):(0,u.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function Bt({showPassword:t}){return(0,u.jsx)(u.Fragment,{children:t?(0,u.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,u.jsxs)("g",{fill:"currentColor",children:[(0,u.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,u.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,u.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,u.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,u.jsxs)("g",{fill:"currentColor",children:[(0,u.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,u.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}var h,S,R,O,P,Q,X,C,Z,I,F,f,u,B=N(()=>{"use strict";h=require("@stackshift-ui/button"),S=require("@stackshift-ui/container"),R=require("@stackshift-ui/flex"),O=require("@stackshift-ui/form"),P=require("@stackshift-ui/form-field"),Q=require("@stackshift-ui/heading"),X=require("@stackshift-ui/image"),C=require("@stackshift-ui/input"),Z=require("@stackshift-ui/link"),I=require("@stackshift-ui/section"),F=require("@stackshift-ui/text"),f=J(require("react"));L();u=require("react/jsx-runtime")});var bt={};o(bt,{SigninSignup_B:()=>q,default:()=>q});function q({logo:t,form:e,formLinks:r,signInLink:i}){return(0,p.jsx)(I.Section,{className:"py-10 bg-primary lg:py-20",children:(0,p.jsx)(S.Container,{maxWidth:1280,children:(0,p.jsxs)(S.Container,{maxWidth:576,children:[(0,p.jsx)(At,{logo:t}),(0,p.jsxs)(et.Card,{borderRadius:"md",className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[(0,p.jsx)(Mt,{form:e}),(0,p.jsx)(qt,{form:e,signInLink:i})]}),(0,p.jsx)(Vt,{formLinks:r})]})})})}function At({logo:t}){var e;return t?(0,p.jsx)("div",{className:"mb-10",children:(0,p.jsx)(Z.Link,{"aria-label":`Go to ${x(t)==="/"?"home page":x(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:x(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,p.jsx)(X.Image,{src:t==null?void 0:t.image,alt:(e=t==null?void 0:t.alt)!=null?e:"signup-logo",width:100,height:100,className:"flex justify-center text-3xl font-bold leading-none text-white"})})}):null}function Mt({form:t}){return(0,p.jsxs)("div",{className:"mb-6",children:[(0,p.jsx)(F.Text,{muted:!0,children:t==null?void 0:t.subtitle}),(0,p.jsx)(Q.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name})]})}function qt({form:t,signInLink:e}){var a;if(!(t!=null&&t.fields))return null;let[r,i]=g.default.useState({}),s=c=>{i(n=>({...n,[c]:!n[c]}))};return(0,p.jsxs)(O.Form,{id:(a=t==null?void 0:t.id)!=null?a:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:v(t==null?void 0:t.thankYouPage),children:[(0,p.jsx)(mt,{form:t,showPassword:r,togglePasswordVisibility:s}),(0,p.jsx)("div",{children:(0,p.jsx)("div",{className:"webriq-recaptcha"})}),(0,p.jsxs)("div",{className:"text-center",children:[(0,p.jsx)(Yt,{form:t}),(0,p.jsx)(Ut,{signInLink:e})]})]})}function mt({form:t,showPassword:e,togglePasswordVisibility:r}){var i,s,a,c;return(0,p.jsxs)(g.default.Fragment,{children:[(0,p.jsx)(R.Flex,{className:"flex-col lg:flex-row gap-3",children:(s=(i=t==null?void 0:t.fields)==null?void 0:i.slice(0,2))==null?void 0:s.map((n,l)=>{var b;return(0,p.jsx)("div",{className:"w-full",children:(0,p.jsx)(P.FormField,{noLabel:!0,variant:"secondary",placeholder:n==null?void 0:n.placeholder,required:n==null?void 0:n.isRequired,name:(b=n==null?void 0:n.name)!=null?b:"",items:n==null?void 0:n.items,type:n==null?void 0:n.type,...n})},l)})}),(c=(a=t==null?void 0:t.fields)==null?void 0:a.slice(2))==null?void 0:c.map((n,l)=>{var b;return(0,p.jsx)("div",{className:"my-3",children:(n==null?void 0:n.type)==="inputPassword"&&n.name?(0,p.jsx)(Tt,{formFields:n,showPassword:e[n.name]||!1,togglePassword:()=>r(n.name)}):(0,p.jsx)(P.FormField,{noLabel:!0,variant:"secondary",name:(b=n==null?void 0:n.name)!=null?b:"",placeholder:n==null?void 0:n.placeholder,required:n==null?void 0:n.isRequired,items:n==null?void 0:n.items,type:n==null?void 0:n.type,...n})},l)})]})}function Tt({formFields:t,showPassword:e,togglePassword:r}){var i;return(0,p.jsxs)("div",{className:"flex",children:[(0,p.jsx)(C.Input,{noLabel:!0,ariaLabel:(i=t==null?void 0:t.placeholder)!=null?i:t==null?void 0:t.name,variant:"secondary",type:e?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,p.jsx)(y.Button,{variant:"unstyled",as:"button",ariaLabel:e?"Show password":"Hide password",className:"focus:outline-none mr-4",type:"button",onClick:r,children:(0,p.jsx)(dt,{showPassword:e})})]})}function Yt({form:t}){var e;return t!=null&&t.buttonLabel?(0,p.jsx)(y.Button,{as:"button",className:"w-full py-4 mb-3",ariaLabel:(e=t==null?void 0:t.buttonLabel)!=null?e:"Sign Up form submit button",variant:"custom",type:"submit",children:t==null?void 0:t.buttonLabel}):null}function Ut({signInLink:t}){return t!=null&&t.label?(0,p.jsxs)("span",{className:"text-xs text-gray-900",children:[(0,p.jsx)("span",{children:"Already have an account?"})," ",(0,p.jsx)(y.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function Vt({formLinks:t}){return t?(0,p.jsx)("p",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((e,r,{length:i})=>(0,p.jsxs)("span",{children:[(0,p.jsx)(y.Button,{as:"link",variant:"link",link:e,className:"text-xs underline text-secondary-foreground hover:text-gray-50",ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),r===i-1?null:r===i-2?(0,p.jsx)("span",{children:"\xA0and\xA0"}):(0,p.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function dt({showPassword:t}){return(0,p.jsx)(g.default.Fragment,{children:t?(0,p.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,p.jsxs)("g",{fill:"currentColor",children:[(0,p.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,p.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,p.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,p.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,p.jsxs)("g",{fill:"currentColor",children:[(0,p.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,p.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}var y,et,S,R,O,P,Q,X,C,Z,I,F,g,p,m=N(()=>{"use strict";y=require("@stackshift-ui/button"),et=require("@stackshift-ui/card"),g=J(require("react"));L();p=require("react/jsx-runtime")});var Ht={};o(Ht,{SigninSignup:()=>lt,SigninSignup_A:()=>z,SigninSignup_B:()=>q});module.exports=Nt(Ht);var Y=require("react"),xt=require("react/jsx-runtime"),T={variant_a:(0,Y.lazy)(()=>Promise.resolve().then(()=>(B(),tt))),variant_b:(0,Y.lazy)(()=>Promise.resolve().then(()=>(m(),bt)))},kt="SigninSignup",lt=({data:t})=>{var s,a,c,n,l,b,U,V,d,k,H,W,_,K,$,G,j,E;let e=t==null?void 0:t.variant,r=e&&(T==null?void 0:T[e]),i={logo:(a=(s=t==null?void 0:t.variants)==null?void 0:s.logo)!=null?a:void 0,title:(n=(c=t==null?void 0:t.variants)==null?void 0:c.title)!=null?n:void 0,subtitle:(b=(l=t==null?void 0:t.variants)==null?void 0:l.subtitle)!=null?b:void 0,text:(V=(U=t==null?void 0:t.variants)==null?void 0:U.plainText)!=null?V:void 0,firstButton:(k=(d=t==null?void 0:t.variants)==null?void 0:d.primaryButton)!=null?k:void 0,secondButton:(W=(H=t==null?void 0:t.variants)==null?void 0:H.secondaryButton)!=null?W:void 0,formLinks:(K=(_=t==null?void 0:t.variants)==null?void 0:_.formLinks)!=null?K:void 0,signInLink:(G=($=t==null?void 0:t.variants)==null?void 0:$.signinLink)!=null?G:void 0,form:(E=(j=t==null?void 0:t.variants)==null?void 0:j.form)!=null?E:void 0};return r?(0,xt.jsx)(r,{...i}):null};lt.displayName=kt;B();m();0&&(module.exports={SigninSignup,SigninSignup_A,SigninSignup_B});
|
|
2
|
+
"use strict";var ht=Object.create;var w=Object.defineProperty;var yt=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,gt=Object.prototype.hasOwnProperty;var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var o=(t,e)=>{for(var r in e)w(t,r,{get:e[r],enumerable:!0})},D=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of wt(e))!gt.call(t,s)&&s!==r&&w(t,s,{get:()=>e[s],enumerable:!(i=yt(e,s))||i.enumerable});return t};var J=(t,e,r)=>(r=t!=null?ht(vt(t)):{},D(e||!t||!t.__esModule?w(r,"default",{value:t,enumerable:!0}):r,t)),Nt=t=>D(w({},"__esModule",{value:!0}),t);var x,v,L=N(()=>{"use strict";x=t=>{var e,r,i;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(r=(e=t==null?void 0:t.internalLink)==null?void 0:e.toLowerCase())!=null&&r.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(i=t==null?void 0:t.externalLink)!=null?i:"/"},v=t=>t?(t==null?void 0:t.linkType)==="linkInternal"?`/${t==null?void 0:t.internalLink}`:t==null?void 0:t.externalLink:"/thank-you"});var tt={};o(tt,{SigninSignup_A:()=>z,default:()=>z});function z({logo:t,form:e,formLinks:r,signInLink:i}){return(0,u.jsx)(I.Section,{className:"py-10 rounded-md bg-gray-50 lg:py-20",children:(0,u.jsxs)(S.Container,{maxWidth:576,className:"!px-2 lg:px-4",children:[(0,u.jsx)(ot,{logo:t}),(0,u.jsxs)(S.Container,{className:"mb-6 lg:px-4 text-center lg:mb-10",children:[(0,u.jsx)(Lt,{form:e}),(0,u.jsx)(St,{form:e,signInLink:i,thankYouPage:v(e==null?void 0:e.thankYouPage)})]}),(0,u.jsx)(zt,{formLinks:r})]})})}function ot({logo:t}){var e;return t?(0,u.jsx)("div",{className:"mb-10",children:(0,u.jsx)(Z.Link,{"aria-label":`Go to ${x(t)==="/"?"home page":x(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:x(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,u.jsx)(X.Image,{src:t==null?void 0:t.image,alt:(e=t==null?void 0:t.alt)!=null?e:"signup-logo",width:100,height:100,className:"flex justify-center mx-auto text-3xl font-bold leading-none"})})}):null}function Lt({form:t}){return(0,u.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,u.jsx)(F.Text,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?(0,u.jsx)(Q.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function St({form:t,signInLink:e,thankYouPage:r}){var c,n;if(!(t!=null&&t.fields))return null;let[i,s]=f.default.useState({}),a=l=>{s(b=>({...b,[l]:!b[l]}))};return(0,u.jsxs)(O.Form,{id:(c=t==null?void 0:t.id)!=null?c:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:r,children:[(0,u.jsx)(Pt,{form:t,showPasswords:i,togglePasswordVisibility:a}),(0,u.jsx)("div",{children:(0,u.jsx)("div",{className:"webriq-recaptcha"})}),(0,u.jsx)("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&(0,u.jsx)(h.Button,{as:"button",variant:"custom",ariaLabel:(n=t==null?void 0:t.buttonLabel)!=null?n:"Sign Up form submit button",className:"w-full py-4 text-sm font-bold tex-gray-50",type:"submit",children:t==null?void 0:t.buttonLabel})}),e&&(0,u.jsx)(Rt,{signInLink:e})]})}function Pt({form:t,showPasswords:e,togglePasswordVisibility:r}){var i,s;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(R.Flex,{wrap:!0,className:"-mx-2",children:(i=t==null?void 0:t.fields)==null?void 0:i.slice(0,2).map((a,c)=>{var n;return(0,u.jsx)("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:a.type==="inputText"?(0,u.jsx)(C.Input,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,className:"w-full py-4 text-xs bg-white",name:a==null?void 0:a.name,ariaLabel:a==null?void 0:a.label,...a,type:"text"}):(0,u.jsx)(P.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",name:(n=a==null?void 0:a.name)!=null?n:"",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},c)})}),(s=t==null?void 0:t.fields)==null?void 0:s.slice(2).map((a,c)=>{var n;return(0,u.jsx)("div",{className:"my-3",children:a.type==="inputPassword"&&a.name?(0,u.jsx)(Ct,{formFields:a,showPassword:e[a.name]||!1,togglePassword:()=>r(a.name)}):(0,u.jsx)(P.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,name:(n=a==null?void 0:a.name)!=null?n:"",items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},c)})]})}function Rt({signInLink:t}){return t!=null&&t.label?(0,u.jsxs)("div",{className:"w-full text-center mt-3",children:[(0,u.jsx)("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),(0,u.jsx)(h.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function Ct({formFields:t,showPassword:e,togglePassword:r}){var i;return(0,u.jsxs)(R.Flex,{className:"relative",children:[(0,u.jsx)(C.Input,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(i=t==null?void 0:t.placeholder)!=null?i:t==null?void 0:t.name,variant:"primary",type:e?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,u.jsx)(h.Button,{as:"button",variant:"unstyled",ariaLabel:e?"Show password":"Hide password",className:"absolute top-0 right-0 h-full p-2",type:"button",onClick:r,children:(0,u.jsx)(Bt,{showPassword:e})})]})}function zt({formLinks:t}){return t?(0,u.jsx)("p",{className:"mt-10 lg:mt-3 text-xs text-center text-gray-700",children:t==null?void 0:t.map((e,r,{length:i})=>(0,u.jsxs)("span",{children:[(0,u.jsx)(h.Button,{as:"link",variant:"link",link:e,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),r===i-1?null:r===i-2?(0,u.jsx)("span",{children:"\xA0and\xA0"}):(0,u.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function Bt({showPassword:t}){return(0,u.jsx)(u.Fragment,{children:t?(0,u.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,u.jsxs)("g",{fill:"currentColor",children:[(0,u.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,u.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,u.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,u.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,u.jsxs)("g",{fill:"currentColor",children:[(0,u.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,u.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}var h,S,R,O,P,Q,X,C,Z,I,F,f,u,B=N(()=>{"use strict";h=require("@stackshift-ui/button"),S=require("@stackshift-ui/container"),R=require("@stackshift-ui/flex"),O=require("@stackshift-ui/form"),P=require("@stackshift-ui/form-field"),Q=require("@stackshift-ui/heading"),X=require("@stackshift-ui/image"),C=require("@stackshift-ui/input"),Z=require("@stackshift-ui/link"),I=require("@stackshift-ui/section"),F=require("@stackshift-ui/text"),f=J(require("react"));L();u=require("react/jsx-runtime")});var bt={};o(bt,{SigninSignup_B:()=>m,default:()=>m});function m({logo:t,form:e,formLinks:r,signInLink:i}){return(0,p.jsx)(I.Section,{className:"py-10 bg-primary lg:py-20",children:(0,p.jsx)(S.Container,{maxWidth:1280,children:(0,p.jsxs)(S.Container,{maxWidth:576,children:[(0,p.jsx)(At,{logo:t}),(0,p.jsxs)(et.Card,{borderRadius:"md",className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[(0,p.jsx)(Mt,{form:e}),(0,p.jsx)(mt,{form:e,signInLink:i})]}),(0,p.jsx)(Vt,{formLinks:r})]})})})}function At({logo:t}){var e;return t?(0,p.jsx)("div",{className:"mb-10",children:(0,p.jsx)(Z.Link,{"aria-label":`Go to ${x(t)==="/"?"home page":x(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:x(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,p.jsx)(X.Image,{src:t==null?void 0:t.image,alt:(e=t==null?void 0:t.alt)!=null?e:"signup-logo",width:100,height:100,className:"flex justify-center text-3xl font-bold leading-none text-white"})})}):null}function Mt({form:t}){return(0,p.jsxs)("div",{className:"mb-6",children:[(0,p.jsx)(F.Text,{muted:!0,className:"text-sm lg:text-base",children:t==null?void 0:t.subtitle}),(0,p.jsx)(Q.Heading,{className:"text-xl lg:text-2xl",children:t==null?void 0:t.name})]})}function mt({form:t,signInLink:e}){var a;if(!(t!=null&&t.fields))return null;let[r,i]=g.default.useState({}),s=c=>{i(n=>({...n,[c]:!n[c]}))};return(0,p.jsxs)(O.Form,{id:(a=t==null?void 0:t.id)!=null?a:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:v(t==null?void 0:t.thankYouPage),children:[(0,p.jsx)(qt,{form:t,showPassword:r,togglePasswordVisibility:s}),(0,p.jsx)("div",{children:(0,p.jsx)("div",{className:"webriq-recaptcha"})}),(0,p.jsxs)("div",{className:"text-center",children:[(0,p.jsx)(Yt,{form:t}),(0,p.jsx)(Ut,{signInLink:e})]})]})}function qt({form:t,showPassword:e,togglePasswordVisibility:r}){var i,s,a,c;return(0,p.jsxs)(g.default.Fragment,{children:[(0,p.jsx)(R.Flex,{className:"flex-col lg:flex-row gap-3",children:(s=(i=t==null?void 0:t.fields)==null?void 0:i.slice(0,2))==null?void 0:s.map((n,l)=>{var b;return(0,p.jsx)("div",{className:"w-full",children:(0,p.jsx)(P.FormField,{noLabel:!0,variant:"secondary",placeholder:n==null?void 0:n.placeholder,required:n==null?void 0:n.isRequired,name:(b=n==null?void 0:n.name)!=null?b:"",items:n==null?void 0:n.items,type:n==null?void 0:n.type,...n})},l)})}),(c=(a=t==null?void 0:t.fields)==null?void 0:a.slice(2))==null?void 0:c.map((n,l)=>{var b;return(0,p.jsx)("div",{className:"my-3",children:(n==null?void 0:n.type)==="inputPassword"&&n.name?(0,p.jsx)(Tt,{formFields:n,showPassword:e[n.name]||!1,togglePassword:()=>r(n.name)}):(0,p.jsx)(P.FormField,{noLabel:!0,variant:"secondary",name:(b=n==null?void 0:n.name)!=null?b:"",placeholder:n==null?void 0:n.placeholder,required:n==null?void 0:n.isRequired,items:n==null?void 0:n.items,type:n==null?void 0:n.type,...n})},l)})]})}function Tt({formFields:t,showPassword:e,togglePassword:r}){var i;return(0,p.jsxs)("div",{className:"flex",children:[(0,p.jsx)(C.Input,{noLabel:!0,ariaLabel:(i=t==null?void 0:t.placeholder)!=null?i:t==null?void 0:t.name,variant:"secondary",type:e?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,p.jsx)(y.Button,{variant:"unstyled",as:"button",ariaLabel:e?"Show password":"Hide password",className:"focus:outline-none mr-4",type:"button",onClick:r,children:(0,p.jsx)(dt,{showPassword:e})})]})}function Yt({form:t}){var e;return t!=null&&t.buttonLabel?(0,p.jsx)(y.Button,{as:"button",className:"w-full py-4 mb-3",ariaLabel:(e=t==null?void 0:t.buttonLabel)!=null?e:"Sign Up form submit button",variant:"custom",type:"submit",children:t==null?void 0:t.buttonLabel}):null}function Ut({signInLink:t}){return t!=null&&t.label?(0,p.jsxs)("span",{className:"text-xs text-gray-900",children:[(0,p.jsx)("span",{children:"Already have an account?"})," ",(0,p.jsx)(y.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function Vt({formLinks:t}){return t?(0,p.jsx)("p",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((e,r,{length:i})=>(0,p.jsxs)("span",{children:[(0,p.jsx)(y.Button,{as:"link",variant:"link",link:e,className:"text-xs underline text-secondary-foreground hover:text-gray-50",ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),r===i-1?null:r===i-2?(0,p.jsx)("span",{children:"\xA0and\xA0"}):(0,p.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function dt({showPassword:t}){return(0,p.jsx)(g.default.Fragment,{children:t?(0,p.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,p.jsxs)("g",{fill:"currentColor",children:[(0,p.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,p.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,p.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,p.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,p.jsxs)("g",{fill:"currentColor",children:[(0,p.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,p.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}var y,et,S,R,O,P,Q,X,C,Z,I,F,g,p,q=N(()=>{"use strict";y=require("@stackshift-ui/button"),et=require("@stackshift-ui/card"),g=J(require("react"));L();p=require("react/jsx-runtime")});var Ht={};o(Ht,{SigninSignup:()=>lt,SigninSignup_A:()=>z,SigninSignup_B:()=>m});module.exports=Nt(Ht);var Y=require("react"),xt=require("react/jsx-runtime"),T={variant_a:(0,Y.lazy)(()=>Promise.resolve().then(()=>(B(),tt))),variant_b:(0,Y.lazy)(()=>Promise.resolve().then(()=>(q(),bt)))},kt="SigninSignup",lt=({data:t})=>{var s,a,c,n,l,b,U,V,d,k,H,W,_,K,$,G,j,E;let e=t==null?void 0:t.variant,r=e&&(T==null?void 0:T[e]),i={logo:(a=(s=t==null?void 0:t.variants)==null?void 0:s.logo)!=null?a:void 0,title:(n=(c=t==null?void 0:t.variants)==null?void 0:c.title)!=null?n:void 0,subtitle:(b=(l=t==null?void 0:t.variants)==null?void 0:l.subtitle)!=null?b:void 0,text:(V=(U=t==null?void 0:t.variants)==null?void 0:U.plainText)!=null?V:void 0,firstButton:(k=(d=t==null?void 0:t.variants)==null?void 0:d.primaryButton)!=null?k:void 0,secondButton:(W=(H=t==null?void 0:t.variants)==null?void 0:H.secondaryButton)!=null?W:void 0,formLinks:(K=(_=t==null?void 0:t.variants)==null?void 0:_.formLinks)!=null?K:void 0,signInLink:(G=($=t==null?void 0:t.variants)==null?void 0:$.signinLink)!=null?G:void 0,form:(E=(j=t==null?void 0:t.variants)==null?void 0:j.form)!=null?E:void 0};return r?(0,xt.jsx)(r,{...i}):null};lt.displayName=kt;B();q();0&&(module.exports={SigninSignup,SigninSignup_A,SigninSignup_B});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a as e}from"./chunk-
|
|
2
|
+
"use strict";import{a as e}from"./chunk-IPCAE2FK.mjs";import{a as o}from"./chunk-3KHZCO6J.mjs";import{a as r}from"./chunk-UYB2OBMQ.mjs";import"./chunk-4DDN6JI4.mjs";export{e as SigninSignup,o as SigninSignup_A,r as SigninSignup_B};
|
package/dist/signin-signup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ht=Object.create;var w=Object.defineProperty;var yt=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,gt=Object.prototype.hasOwnProperty;var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var L=(t,e)=>{for(var i in e)w(t,i,{get:e[i],enumerable:!0})},$=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of wt(e))!gt.call(t,s)&&s!==i&&w(t,s,{get:()=>e[s],enumerable:!(r=yt(e,s))||r.enumerable});return t};var G=(t,e,i)=>(i=t!=null?ht(vt(t)):{},$(e||!t||!t.__esModule?w(i,"default",{value:t,enumerable:!0}):i,t)),Nt=t=>$(w({},"__esModule",{value:!0}),t);var x,v,S=N(()=>{"use strict";x=t=>{var e,i,r;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(i=(e=t==null?void 0:t.internalLink)==null?void 0:e.toLowerCase())!=null&&i.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(r=t==null?void 0:t.externalLink)!=null?r:"/"},v=t=>t?(t==null?void 0:t.linkType)==="linkInternal"?`/${t==null?void 0:t.internalLink}`:t==null?void 0:t.externalLink:"/thank-you"});var I={};L(I,{SigninSignup_A:()=>Z,default:()=>Z});function Z({logo:t,form:e,formLinks:i,signInLink:r}){return(0,u.jsx)(O.Section,{className:"py-10 rounded-md bg-gray-50 lg:py-20",children:(0,u.jsxs)(P.Container,{maxWidth:576,children:[(0,u.jsx)(Lt,{logo:t}),(0,u.jsxs)(P.Container,{className:"mb-6 text-center lg:mb-10",children:[(0,u.jsx)(St,{form:e}),(0,u.jsx)(Pt,{form:e,signInLink:r,thankYouPage:v(e==null?void 0:e.thankYouPage)})]}),(0,u.jsx)(zt,{formLinks:i})]})})}function Lt({logo:t}){var e;return t?(0,u.jsx)("div",{className:"mb-10",children:(0,u.jsx)(J.Link,{"aria-label":`Go to ${x(t)==="/"?"home page":x(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:x(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,u.jsx)(D.Image,{src:t==null?void 0:t.image,alt:(e=t==null?void 0:t.alt)!=null?e:"signup-logo",width:100,height:100,className:"flex justify-center mx-auto text-3xl font-bold leading-none"})})}):null}function St({form:t}){return(0,u.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,u.jsx)(Q.Text,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?(0,u.jsx)(E.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function Pt({form:t,signInLink:e,thankYouPage:i}){var c,n;if(!(t!=null&&t.fields))return null;let[r,s]=X.default.useState({}),a=l=>{s(b=>({...b,[l]:!b[l]}))};return(0,u.jsxs)(j.Form,{id:(c=t==null?void 0:t.id)!=null?c:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:i,children:[(0,u.jsx)(ot,{form:t,showPasswords:r,togglePasswordVisibility:a}),(0,u.jsx)("div",{children:(0,u.jsx)("div",{className:"webriq-recaptcha"})}),(0,u.jsx)("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&(0,u.jsx)(h.Button,{as:"button",variant:"custom",ariaLabel:(n=t==null?void 0:t.buttonLabel)!=null?n:"Sign Up form submit button",className:"w-full py-4 text-sm font-bold tex-gray-50",type:"submit",children:t==null?void 0:t.buttonLabel})}),e&&(0,u.jsx)(Rt,{signInLink:e})]})}function ot({form:t,showPasswords:e,togglePasswordVisibility:i}){var r,s;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(R.Flex,{wrap:!0,className:"-mx-2",children:(r=t==null?void 0:t.fields)==null?void 0:r.slice(0,2).map((a,c)=>{var n;return(0,u.jsx)("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:a.type==="inputText"?(0,u.jsx)(C.Input,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,className:"w-full py-4 text-xs bg-white",name:a==null?void 0:a.name,ariaLabel:a==null?void 0:a.label,...a,type:"text"}):(0,u.jsx)(o.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",name:(n=a==null?void 0:a.name)!=null?n:"",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},c)})}),(s=t==null?void 0:t.fields)==null?void 0:s.slice(2).map((a,c)=>{var n;return(0,u.jsx)("div",{className:"my-3",children:a.type==="inputPassword"&&a.name?(0,u.jsx)(Ct,{formFields:a,showPassword:e[a.name]||!1,togglePassword:()=>i(a.name)}):(0,u.jsx)(o.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,name:(n=a==null?void 0:a.name)!=null?n:"",items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},c)})]})}function Rt({signInLink:t}){return t!=null&&t.label?(0,u.jsxs)("div",{className:"w-full text-center mt-3",children:[(0,u.jsx)("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),(0,u.jsx)(h.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function Ct({formFields:t,showPassword:e,togglePassword:i}){var r;return(0,u.jsxs)(R.Flex,{className:"relative",children:[(0,u.jsx)(C.Input,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(r=t==null?void 0:t.placeholder)!=null?r:t==null?void 0:t.name,variant:"primary",type:e?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,u.jsx)(h.Button,{as:"button",variant:"unstyled",ariaLabel:e?"Show password":"Hide password",className:"absolute top-0 right-0 h-full p-2",type:"button",onClick:i,children:(0,u.jsx)(Bt,{showPassword:e})})]})}function zt({formLinks:t}){return t?(0,u.jsx)("p",{className:"mt-10 text-xs text-center text-gray-700",children:t==null?void 0:t.map((e,i,{length:r})=>(0,u.jsxs)("span",{children:[(0,u.jsx)(h.Button,{as:"link",variant:"link",link:e,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),i===r-1?null:i===r-2?(0,u.jsx)("span",{children:"\xA0and\xA0"}):(0,u.jsx)("span",{children:"\xA0,\xA0"})]},i))}):null}function Bt({showPassword:t}){return(0,u.jsx)(u.Fragment,{children:t?(0,u.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,u.jsxs)("g",{fill:"currentColor",children:[(0,u.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,u.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,u.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,u.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,u.jsxs)("g",{fill:"currentColor",children:[(0,u.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,u.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}var h,P,R,j,o,E,D,C,J,O,Q,X,u,F=N(()=>{"use strict";h=require("@stackshift-ui/button"),P=require("@stackshift-ui/container"),R=require("@stackshift-ui/flex"),j=require("@stackshift-ui/form"),o=require("@stackshift-ui/form-field"),E=require("@stackshift-ui/heading"),D=require("@stackshift-ui/image"),C=require("@stackshift-ui/input"),J=require("@stackshift-ui/link"),O=require("@stackshift-ui/section"),Q=require("@stackshift-ui/text"),X=G(require("react"));S();u=require("react/jsx-runtime")});var ct={};L(ct,{SigninSignup_B:()=>st,default:()=>st});function st({logo:t,form:e,formLinks:i,signInLink:r}){return(0,p.jsx)(O.Section,{className:"py-10 bg-primary lg:py-20",children:(0,p.jsx)(P.Container,{maxWidth:1280,children:(0,p.jsxs)(P.Container,{maxWidth:576,children:[(0,p.jsx)(At,{logo:t}),(0,p.jsxs)(f.Card,{borderRadius:"md",className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[(0,p.jsx)(Mt,{form:e}),(0,p.jsx)(qt,{form:e,signInLink:r})]}),(0,p.jsx)(Vt,{formLinks:i})]})})})}function At({logo:t}){var e;return t?(0,p.jsx)("div",{className:"mb-10",children:(0,p.jsx)(J.Link,{"aria-label":`Go to ${x(t)==="/"?"home page":x(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:x(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,p.jsx)(D.Image,{src:t==null?void 0:t.image,alt:(e=t==null?void 0:t.alt)!=null?e:"signup-logo",width:100,height:100,className:"flex justify-center text-3xl font-bold leading-none text-white"})})}):null}function Mt({form:t}){return(0,p.jsxs)("div",{className:"mb-6",children:[(0,p.jsx)(Q.Text,{muted:!0,children:t==null?void 0:t.subtitle}),(0,p.jsx)(E.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name})]})}function qt({form:t,signInLink:e}){var a;if(!(t!=null&&t.fields))return null;let[i,r]=g.default.useState({}),s=c=>{r(n=>({...n,[c]:!n[c]}))};return(0,p.jsxs)(j.Form,{id:(a=t==null?void 0:t.id)!=null?a:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:v(t==null?void 0:t.thankYouPage),children:[(0,p.jsx)(Tt,{form:t,showPassword:i,togglePasswordVisibility:s}),(0,p.jsx)("div",{children:(0,p.jsx)("div",{className:"webriq-recaptcha"})}),(0,p.jsxs)("div",{className:"text-center",children:[(0,p.jsx)(Yt,{form:t}),(0,p.jsx)(Ut,{signInLink:e})]})]})}function Tt({form:t,showPassword:e,togglePasswordVisibility:i}){var r,s,a,c;return(0,p.jsxs)(g.default.Fragment,{children:[(0,p.jsx)(R.Flex,{className:"flex-col lg:flex-row gap-3",children:(s=(r=t==null?void 0:t.fields)==null?void 0:r.slice(0,2))==null?void 0:s.map((n,l)=>{var b;return(0,p.jsx)("div",{className:"w-full",children:(0,p.jsx)(o.FormField,{noLabel:!0,variant:"secondary",placeholder:n==null?void 0:n.placeholder,required:n==null?void 0:n.isRequired,name:(b=n==null?void 0:n.name)!=null?b:"",items:n==null?void 0:n.items,type:n==null?void 0:n.type,...n})},l)})}),(c=(a=t==null?void 0:t.fields)==null?void 0:a.slice(2))==null?void 0:c.map((n,l)=>{var b;return(0,p.jsx)("div",{className:"my-3",children:(n==null?void 0:n.type)==="inputPassword"&&n.name?(0,p.jsx)(mt,{formFields:n,showPassword:e[n.name]||!1,togglePassword:()=>i(n.name)}):(0,p.jsx)(o.FormField,{noLabel:!0,variant:"secondary",name:(b=n==null?void 0:n.name)!=null?b:"",placeholder:n==null?void 0:n.placeholder,required:n==null?void 0:n.isRequired,items:n==null?void 0:n.items,type:n==null?void 0:n.type,...n})},l)})]})}function mt({formFields:t,showPassword:e,togglePassword:i}){var r;return(0,p.jsxs)("div",{className:"flex",children:[(0,p.jsx)(C.Input,{noLabel:!0,ariaLabel:(r=t==null?void 0:t.placeholder)!=null?r:t==null?void 0:t.name,variant:"secondary",type:e?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,p.jsx)(y.Button,{variant:"unstyled",as:"button",ariaLabel:e?"Show password":"Hide password",className:"focus:outline-none mr-4",type:"button",onClick:i,children:(0,p.jsx)(dt,{showPassword:e})})]})}function Yt({form:t}){var e;return t!=null&&t.buttonLabel?(0,p.jsx)(y.Button,{as:"button",className:"w-full py-4 mb-3",ariaLabel:(e=t==null?void 0:t.buttonLabel)!=null?e:"Sign Up form submit button",variant:"custom",type:"submit",children:t==null?void 0:t.buttonLabel}):null}function Ut({signInLink:t}){return t!=null&&t.label?(0,p.jsxs)("span",{className:"text-xs text-gray-900",children:[(0,p.jsx)("span",{children:"Already have an account?"})," ",(0,p.jsx)(y.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function Vt({formLinks:t}){return t?(0,p.jsx)("p",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((e,i,{length:r})=>(0,p.jsxs)("span",{children:[(0,p.jsx)(y.Button,{as:"link",variant:"link",link:e,className:"text-xs underline text-secondary-foreground hover:text-gray-50",ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),i===r-1?null:i===r-2?(0,p.jsx)("span",{children:"\xA0and\xA0"}):(0,p.jsx)("span",{children:"\xA0,\xA0"})]},i))}):null}function dt({showPassword:t}){return(0,p.jsx)(g.default.Fragment,{children:t?(0,p.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,p.jsxs)("g",{fill:"currentColor",children:[(0,p.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,p.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,p.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,p.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,p.jsxs)("g",{fill:"currentColor",children:[(0,p.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,p.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}var y,f,P,R,j,o,E,D,C,J,O,Q,g,p,bt=N(()=>{"use strict";y=require("@stackshift-ui/button"),f=require("@stackshift-ui/card"),g=G(require("react"));S();p=require("react/jsx-runtime")});var Ht={};L(Ht,{SigninSignup:()=>lt});module.exports=Nt(Ht);var M=require("react"),xt=require("react/jsx-runtime"),A={variant_a:(0,M.lazy)(()=>Promise.resolve().then(()=>(F(),I))),variant_b:(0,M.lazy)(()=>Promise.resolve().then(()=>(bt(),ct)))},kt="SigninSignup",lt=({data:t})=>{var s,a,c,n,l,b,q,T,m,Y,U,V,d,k,H,W,_,K;let e=t==null?void 0:t.variant,i=e&&(A==null?void 0:A[e]),r={logo:(a=(s=t==null?void 0:t.variants)==null?void 0:s.logo)!=null?a:void 0,title:(n=(c=t==null?void 0:t.variants)==null?void 0:c.title)!=null?n:void 0,subtitle:(b=(l=t==null?void 0:t.variants)==null?void 0:l.subtitle)!=null?b:void 0,text:(T=(q=t==null?void 0:t.variants)==null?void 0:q.plainText)!=null?T:void 0,firstButton:(Y=(m=t==null?void 0:t.variants)==null?void 0:m.primaryButton)!=null?Y:void 0,secondButton:(V=(U=t==null?void 0:t.variants)==null?void 0:U.secondaryButton)!=null?V:void 0,formLinks:(k=(d=t==null?void 0:t.variants)==null?void 0:d.formLinks)!=null?k:void 0,signInLink:(W=(H=t==null?void 0:t.variants)==null?void 0:H.signinLink)!=null?W:void 0,form:(K=(_=t==null?void 0:t.variants)==null?void 0:_.form)!=null?K:void 0};return i?(0,xt.jsx)(i,{...r}):null};lt.displayName=kt;0&&(module.exports={SigninSignup});
|
|
1
|
+
"use strict";var ht=Object.create;var w=Object.defineProperty;var yt=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,gt=Object.prototype.hasOwnProperty;var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var L=(t,e)=>{for(var i in e)w(t,i,{get:e[i],enumerable:!0})},$=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of wt(e))!gt.call(t,s)&&s!==i&&w(t,s,{get:()=>e[s],enumerable:!(r=yt(e,s))||r.enumerable});return t};var G=(t,e,i)=>(i=t!=null?ht(vt(t)):{},$(e||!t||!t.__esModule?w(i,"default",{value:t,enumerable:!0}):i,t)),Nt=t=>$(w({},"__esModule",{value:!0}),t);var x,v,S=N(()=>{"use strict";x=t=>{var e,i,r;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(i=(e=t==null?void 0:t.internalLink)==null?void 0:e.toLowerCase())!=null&&i.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(r=t==null?void 0:t.externalLink)!=null?r:"/"},v=t=>t?(t==null?void 0:t.linkType)==="linkInternal"?`/${t==null?void 0:t.internalLink}`:t==null?void 0:t.externalLink:"/thank-you"});var I={};L(I,{SigninSignup_A:()=>Z,default:()=>Z});function Z({logo:t,form:e,formLinks:i,signInLink:r}){return(0,u.jsx)(O.Section,{className:"py-10 rounded-md bg-gray-50 lg:py-20",children:(0,u.jsxs)(P.Container,{maxWidth:576,className:"!px-2 lg:px-4",children:[(0,u.jsx)(Lt,{logo:t}),(0,u.jsxs)(P.Container,{className:"mb-6 lg:px-4 text-center lg:mb-10",children:[(0,u.jsx)(St,{form:e}),(0,u.jsx)(Pt,{form:e,signInLink:r,thankYouPage:v(e==null?void 0:e.thankYouPage)})]}),(0,u.jsx)(zt,{formLinks:i})]})})}function Lt({logo:t}){var e;return t?(0,u.jsx)("div",{className:"mb-10",children:(0,u.jsx)(J.Link,{"aria-label":`Go to ${x(t)==="/"?"home page":x(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:x(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,u.jsx)(D.Image,{src:t==null?void 0:t.image,alt:(e=t==null?void 0:t.alt)!=null?e:"signup-logo",width:100,height:100,className:"flex justify-center mx-auto text-3xl font-bold leading-none"})})}):null}function St({form:t}){return(0,u.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,u.jsx)(Q.Text,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?(0,u.jsx)(E.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function Pt({form:t,signInLink:e,thankYouPage:i}){var c,n;if(!(t!=null&&t.fields))return null;let[r,s]=X.default.useState({}),a=l=>{s(b=>({...b,[l]:!b[l]}))};return(0,u.jsxs)(j.Form,{id:(c=t==null?void 0:t.id)!=null?c:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:i,children:[(0,u.jsx)(ot,{form:t,showPasswords:r,togglePasswordVisibility:a}),(0,u.jsx)("div",{children:(0,u.jsx)("div",{className:"webriq-recaptcha"})}),(0,u.jsx)("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&(0,u.jsx)(h.Button,{as:"button",variant:"custom",ariaLabel:(n=t==null?void 0:t.buttonLabel)!=null?n:"Sign Up form submit button",className:"w-full py-4 text-sm font-bold tex-gray-50",type:"submit",children:t==null?void 0:t.buttonLabel})}),e&&(0,u.jsx)(Rt,{signInLink:e})]})}function ot({form:t,showPasswords:e,togglePasswordVisibility:i}){var r,s;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(R.Flex,{wrap:!0,className:"-mx-2",children:(r=t==null?void 0:t.fields)==null?void 0:r.slice(0,2).map((a,c)=>{var n;return(0,u.jsx)("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:a.type==="inputText"?(0,u.jsx)(C.Input,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,className:"w-full py-4 text-xs bg-white",name:a==null?void 0:a.name,ariaLabel:a==null?void 0:a.label,...a,type:"text"}):(0,u.jsx)(o.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",name:(n=a==null?void 0:a.name)!=null?n:"",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},c)})}),(s=t==null?void 0:t.fields)==null?void 0:s.slice(2).map((a,c)=>{var n;return(0,u.jsx)("div",{className:"my-3",children:a.type==="inputPassword"&&a.name?(0,u.jsx)(Ct,{formFields:a,showPassword:e[a.name]||!1,togglePassword:()=>i(a.name)}):(0,u.jsx)(o.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,name:(n=a==null?void 0:a.name)!=null?n:"",items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},c)})]})}function Rt({signInLink:t}){return t!=null&&t.label?(0,u.jsxs)("div",{className:"w-full text-center mt-3",children:[(0,u.jsx)("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),(0,u.jsx)(h.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function Ct({formFields:t,showPassword:e,togglePassword:i}){var r;return(0,u.jsxs)(R.Flex,{className:"relative",children:[(0,u.jsx)(C.Input,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(r=t==null?void 0:t.placeholder)!=null?r:t==null?void 0:t.name,variant:"primary",type:e?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,u.jsx)(h.Button,{as:"button",variant:"unstyled",ariaLabel:e?"Show password":"Hide password",className:"absolute top-0 right-0 h-full p-2",type:"button",onClick:i,children:(0,u.jsx)(Bt,{showPassword:e})})]})}function zt({formLinks:t}){return t?(0,u.jsx)("p",{className:"mt-10 lg:mt-3 text-xs text-center text-gray-700",children:t==null?void 0:t.map((e,i,{length:r})=>(0,u.jsxs)("span",{children:[(0,u.jsx)(h.Button,{as:"link",variant:"link",link:e,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),i===r-1?null:i===r-2?(0,u.jsx)("span",{children:"\xA0and\xA0"}):(0,u.jsx)("span",{children:"\xA0,\xA0"})]},i))}):null}function Bt({showPassword:t}){return(0,u.jsx)(u.Fragment,{children:t?(0,u.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,u.jsxs)("g",{fill:"currentColor",children:[(0,u.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,u.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,u.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,u.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,u.jsxs)("g",{fill:"currentColor",children:[(0,u.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,u.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}var h,P,R,j,o,E,D,C,J,O,Q,X,u,F=N(()=>{"use strict";h=require("@stackshift-ui/button"),P=require("@stackshift-ui/container"),R=require("@stackshift-ui/flex"),j=require("@stackshift-ui/form"),o=require("@stackshift-ui/form-field"),E=require("@stackshift-ui/heading"),D=require("@stackshift-ui/image"),C=require("@stackshift-ui/input"),J=require("@stackshift-ui/link"),O=require("@stackshift-ui/section"),Q=require("@stackshift-ui/text"),X=G(require("react"));S();u=require("react/jsx-runtime")});var ct={};L(ct,{SigninSignup_B:()=>st,default:()=>st});function st({logo:t,form:e,formLinks:i,signInLink:r}){return(0,p.jsx)(O.Section,{className:"py-10 bg-primary lg:py-20",children:(0,p.jsx)(P.Container,{maxWidth:1280,children:(0,p.jsxs)(P.Container,{maxWidth:576,children:[(0,p.jsx)(At,{logo:t}),(0,p.jsxs)(f.Card,{borderRadius:"md",className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[(0,p.jsx)(Mt,{form:e}),(0,p.jsx)(mt,{form:e,signInLink:r})]}),(0,p.jsx)(Vt,{formLinks:i})]})})})}function At({logo:t}){var e;return t?(0,p.jsx)("div",{className:"mb-10",children:(0,p.jsx)(J.Link,{"aria-label":`Go to ${x(t)==="/"?"home page":x(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:x(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,p.jsx)(D.Image,{src:t==null?void 0:t.image,alt:(e=t==null?void 0:t.alt)!=null?e:"signup-logo",width:100,height:100,className:"flex justify-center text-3xl font-bold leading-none text-white"})})}):null}function Mt({form:t}){return(0,p.jsxs)("div",{className:"mb-6",children:[(0,p.jsx)(Q.Text,{muted:!0,className:"text-sm lg:text-base",children:t==null?void 0:t.subtitle}),(0,p.jsx)(E.Heading,{className:"text-xl lg:text-2xl",children:t==null?void 0:t.name})]})}function mt({form:t,signInLink:e}){var a;if(!(t!=null&&t.fields))return null;let[i,r]=g.default.useState({}),s=c=>{r(n=>({...n,[c]:!n[c]}))};return(0,p.jsxs)(j.Form,{id:(a=t==null?void 0:t.id)!=null?a:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:v(t==null?void 0:t.thankYouPage),children:[(0,p.jsx)(qt,{form:t,showPassword:i,togglePasswordVisibility:s}),(0,p.jsx)("div",{children:(0,p.jsx)("div",{className:"webriq-recaptcha"})}),(0,p.jsxs)("div",{className:"text-center",children:[(0,p.jsx)(Yt,{form:t}),(0,p.jsx)(Ut,{signInLink:e})]})]})}function qt({form:t,showPassword:e,togglePasswordVisibility:i}){var r,s,a,c;return(0,p.jsxs)(g.default.Fragment,{children:[(0,p.jsx)(R.Flex,{className:"flex-col lg:flex-row gap-3",children:(s=(r=t==null?void 0:t.fields)==null?void 0:r.slice(0,2))==null?void 0:s.map((n,l)=>{var b;return(0,p.jsx)("div",{className:"w-full",children:(0,p.jsx)(o.FormField,{noLabel:!0,variant:"secondary",placeholder:n==null?void 0:n.placeholder,required:n==null?void 0:n.isRequired,name:(b=n==null?void 0:n.name)!=null?b:"",items:n==null?void 0:n.items,type:n==null?void 0:n.type,...n})},l)})}),(c=(a=t==null?void 0:t.fields)==null?void 0:a.slice(2))==null?void 0:c.map((n,l)=>{var b;return(0,p.jsx)("div",{className:"my-3",children:(n==null?void 0:n.type)==="inputPassword"&&n.name?(0,p.jsx)(Tt,{formFields:n,showPassword:e[n.name]||!1,togglePassword:()=>i(n.name)}):(0,p.jsx)(o.FormField,{noLabel:!0,variant:"secondary",name:(b=n==null?void 0:n.name)!=null?b:"",placeholder:n==null?void 0:n.placeholder,required:n==null?void 0:n.isRequired,items:n==null?void 0:n.items,type:n==null?void 0:n.type,...n})},l)})]})}function Tt({formFields:t,showPassword:e,togglePassword:i}){var r;return(0,p.jsxs)("div",{className:"flex",children:[(0,p.jsx)(C.Input,{noLabel:!0,ariaLabel:(r=t==null?void 0:t.placeholder)!=null?r:t==null?void 0:t.name,variant:"secondary",type:e?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,p.jsx)(y.Button,{variant:"unstyled",as:"button",ariaLabel:e?"Show password":"Hide password",className:"focus:outline-none mr-4",type:"button",onClick:i,children:(0,p.jsx)(dt,{showPassword:e})})]})}function Yt({form:t}){var e;return t!=null&&t.buttonLabel?(0,p.jsx)(y.Button,{as:"button",className:"w-full py-4 mb-3",ariaLabel:(e=t==null?void 0:t.buttonLabel)!=null?e:"Sign Up form submit button",variant:"custom",type:"submit",children:t==null?void 0:t.buttonLabel}):null}function Ut({signInLink:t}){return t!=null&&t.label?(0,p.jsxs)("span",{className:"text-xs text-gray-900",children:[(0,p.jsx)("span",{children:"Already have an account?"})," ",(0,p.jsx)(y.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function Vt({formLinks:t}){return t?(0,p.jsx)("p",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((e,i,{length:r})=>(0,p.jsxs)("span",{children:[(0,p.jsx)(y.Button,{as:"link",variant:"link",link:e,className:"text-xs underline text-secondary-foreground hover:text-gray-50",ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),i===r-1?null:i===r-2?(0,p.jsx)("span",{children:"\xA0and\xA0"}):(0,p.jsx)("span",{children:"\xA0,\xA0"})]},i))}):null}function dt({showPassword:t}){return(0,p.jsx)(g.default.Fragment,{children:t?(0,p.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,p.jsxs)("g",{fill:"currentColor",children:[(0,p.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,p.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,p.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,p.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,p.jsxs)("g",{fill:"currentColor",children:[(0,p.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,p.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}var y,f,P,R,j,o,E,D,C,J,O,Q,g,p,bt=N(()=>{"use strict";y=require("@stackshift-ui/button"),f=require("@stackshift-ui/card"),g=G(require("react"));S();p=require("react/jsx-runtime")});var Ht={};L(Ht,{SigninSignup:()=>lt});module.exports=Nt(Ht);var M=require("react"),xt=require("react/jsx-runtime"),A={variant_a:(0,M.lazy)(()=>Promise.resolve().then(()=>(F(),I))),variant_b:(0,M.lazy)(()=>Promise.resolve().then(()=>(bt(),ct)))},kt="SigninSignup",lt=({data:t})=>{var s,a,c,n,l,b,m,q,T,Y,U,V,d,k,H,W,_,K;let e=t==null?void 0:t.variant,i=e&&(A==null?void 0:A[e]),r={logo:(a=(s=t==null?void 0:t.variants)==null?void 0:s.logo)!=null?a:void 0,title:(n=(c=t==null?void 0:t.variants)==null?void 0:c.title)!=null?n:void 0,subtitle:(b=(l=t==null?void 0:t.variants)==null?void 0:l.subtitle)!=null?b:void 0,text:(q=(m=t==null?void 0:t.variants)==null?void 0:m.plainText)!=null?q:void 0,firstButton:(Y=(T=t==null?void 0:t.variants)==null?void 0:T.primaryButton)!=null?Y:void 0,secondButton:(V=(U=t==null?void 0:t.variants)==null?void 0:U.secondaryButton)!=null?V:void 0,formLinks:(k=(d=t==null?void 0:t.variants)==null?void 0:d.formLinks)!=null?k:void 0,signInLink:(W=(H=t==null?void 0:t.variants)==null?void 0:H.signinLink)!=null?W:void 0,form:(K=(_=t==null?void 0:t.variants)==null?void 0:_.form)!=null?K:void 0};return i?(0,xt.jsx)(i,{...r}):null};lt.displayName=kt;0&&(module.exports={SigninSignup});
|
package/dist/signin-signup.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-IPCAE2FK.mjs";export{a as SigninSignup};
|
package/dist/signin_signup_a.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var B=Object.create;var
|
|
1
|
+
"use strict";var B=Object.create;var x=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var U=(t,n)=>{for(var p in n)x(t,p,{get:n[p],enumerable:!0})},L=(t,n,p,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let c of Y(n))!H.call(t,c)&&c!==p&&x(t,c,{get:()=>n[c],enumerable:!(u=T(n,c))||u.enumerable});return t};var V=(t,n,p)=>(p=t!=null?B(d(t)):{},L(n||!t||!t.__esModule?x(p,"default",{value:t,enumerable:!0}):p,t)),W=t=>L(x({},"__esModule",{value:!0}),t);var J={};U(J,{SigninSignup_A:()=>q,default:()=>q});module.exports=W(J);var i=require("@stackshift-ui/button"),h=require("@stackshift-ui/container"),w=require("@stackshift-ui/flex"),S=require("@stackshift-ui/form"),y=require("@stackshift-ui/form-field"),g=require("@stackshift-ui/heading"),z=require("@stackshift-ui/image"),l=require("@stackshift-ui/input"),R=require("@stackshift-ui/link"),A=require("@stackshift-ui/section"),C=require("@stackshift-ui/text"),M=V(require("react"));var b=t=>{var n,p,u;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(p=(n=t==null?void 0:t.internalLink)==null?void 0:n.toLowerCase())!=null&&p.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(u=t==null?void 0:t.externalLink)!=null?u:"/"},P=t=>t?(t==null?void 0:t.linkType)==="linkInternal"?`/${t==null?void 0:t.internalLink}`:t==null?void 0:t.externalLink:"/thank-you";var a=require("react/jsx-runtime");function q({logo:t,form:n,formLinks:p,signInLink:u}){return(0,a.jsx)(A.Section,{className:"py-10 rounded-md bg-gray-50 lg:py-20",children:(0,a.jsxs)(h.Container,{maxWidth:576,className:"!px-2 lg:px-4",children:[(0,a.jsx)($,{logo:t}),(0,a.jsxs)(h.Container,{className:"mb-6 lg:px-4 text-center lg:mb-10",children:[(0,a.jsx)(K,{form:n}),(0,a.jsx)(_,{form:n,signInLink:u,thankYouPage:P(n==null?void 0:n.thankYouPage)})]}),(0,a.jsx)(G,{formLinks:p})]})})}function $({logo:t}){var n;return t?(0,a.jsx)("div",{className:"mb-10",children:(0,a.jsx)(R.Link,{"aria-label":`Go to ${b(t)==="/"?"home page":b(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:b(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(z.Image,{src:t==null?void 0:t.image,alt:(n=t==null?void 0:t.alt)!=null?n:"signup-logo",width:100,height:100,className:"flex justify-center mx-auto text-3xl font-bold leading-none"})})}):null}function K({form:t}){return(0,a.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,a.jsx)(C.Text,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?(0,a.jsx)(g.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function _({form:t,signInLink:n,thankYouPage:p}){var s,r;if(!(t!=null&&t.fields))return null;let[u,c]=M.default.useState({}),e=v=>{c(N=>({...N,[v]:!N[v]}))};return(0,a.jsxs)(S.Form,{id:(s=t==null?void 0:t.id)!=null?s:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:p,children:[(0,a.jsx)(j,{form:t,showPasswords:u,togglePasswordVisibility:e}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"webriq-recaptcha"})}),(0,a.jsx)("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&(0,a.jsx)(i.Button,{as:"button",variant:"custom",ariaLabel:(r=t==null?void 0:t.buttonLabel)!=null?r:"Sign Up form submit button",className:"w-full py-4 text-sm font-bold tex-gray-50",type:"submit",children:t==null?void 0:t.buttonLabel})}),n&&(0,a.jsx)(k,{signInLink:n})]})}function j({form:t,showPasswords:n,togglePasswordVisibility:p}){var u,c;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(w.Flex,{wrap:!0,className:"-mx-2",children:(u=t==null?void 0:t.fields)==null?void 0:u.slice(0,2).map((e,s)=>{var r;return(0,a.jsx)("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:e.type==="inputText"?(0,a.jsx)(l.Input,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:e==null?void 0:e.placeholder,required:e==null?void 0:e.isRequired,className:"w-full py-4 text-xs bg-white",name:e==null?void 0:e.name,ariaLabel:e==null?void 0:e.label,...e,type:"text"}):(0,a.jsx)(y.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",name:(r=e==null?void 0:e.name)!=null?r:"",placeholder:e==null?void 0:e.placeholder,required:e==null?void 0:e.isRequired,items:e==null?void 0:e.items,type:e==null?void 0:e.type,...e})},s)})}),(c=t==null?void 0:t.fields)==null?void 0:c.slice(2).map((e,s)=>{var r;return(0,a.jsx)("div",{className:"my-3",children:e.type==="inputPassword"&&e.name?(0,a.jsx)(E,{formFields:e,showPassword:n[e.name]||!1,togglePassword:()=>p(e.name)}):(0,a.jsx)(y.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:e==null?void 0:e.placeholder,required:e==null?void 0:e.isRequired,name:(r=e==null?void 0:e.name)!=null?r:"",items:e==null?void 0:e.items,type:e==null?void 0:e.type,...e})},s)})]})}function k({signInLink:t}){return t!=null&&t.label?(0,a.jsxs)("div",{className:"w-full text-center mt-3",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),(0,a.jsx)(i.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function E({formFields:t,showPassword:n,togglePassword:p}){var u;return(0,a.jsxs)(w.Flex,{className:"relative",children:[(0,a.jsx)(l.Input,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(u=t==null?void 0:t.placeholder)!=null?u:t==null?void 0:t.name,variant:"primary",type:n?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,a.jsx)(i.Button,{as:"button",variant:"unstyled",ariaLabel:n?"Show password":"Hide password",className:"absolute top-0 right-0 h-full p-2",type:"button",onClick:p,children:(0,a.jsx)(D,{showPassword:n})})]})}function G({formLinks:t}){return t?(0,a.jsx)("p",{className:"mt-10 lg:mt-3 text-xs text-center text-gray-700",children:t==null?void 0:t.map((n,p,{length:u})=>(0,a.jsxs)("span",{children:[(0,a.jsx)(i.Button,{as:"link",variant:"link",link:n,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:n==null?void 0:n.label,children:n==null?void 0:n.label}),p===u-1?null:p===u-2?(0,a.jsx)("span",{children:"\xA0and\xA0"}):(0,a.jsx)("span",{children:"\xA0,\xA0"})]},p))}):null}function D({showPassword:t}){return(0,a.jsx)(a.Fragment,{children:t?(0,a.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,a.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,a.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,a.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,a.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}0&&(module.exports={SigninSignup_A});
|
package/dist/signin_signup_a.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-3KHZCO6J.mjs";import"./chunk-4DDN6JI4.mjs";export{a as SigninSignup_A,a as default};
|
package/dist/signin_signup_b.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var z=Object.create;var x=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var Y=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var U=(t,n)=>{for(var r in n)x(t,r,{get:n[r],enumerable:!0})},d=(t,n,r,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let p of T(n))!H.call(t,p)&&p!==r&&x(t,p,{get:()=>n[p],enumerable:!(u=q(n,p))||u.enumerable});return t};var V=(t,n,r)=>(r=t!=null?z(Y(t)):{},d(n||!t||!t.__esModule?x(r,"default",{value:t,enumerable:!0}):r,t)),$=t=>d(x({},"__esModule",{value:!0}),t);var O={};U(O,{SigninSignup_B:()=>B,default:()=>B});module.exports=$(O);var b=require("@stackshift-ui/button"),N=require("@stackshift-ui/card"),v=require("@stackshift-ui/container"),g=require("@stackshift-ui/flex"),P=require("@stackshift-ui/form"),l=require("@stackshift-ui/form-field"),S=require("@stackshift-ui/heading"),C=require("@stackshift-ui/image"),R=require("@stackshift-ui/input"),M=require("@stackshift-ui/link"),m=require("@stackshift-ui/section"),A=require("@stackshift-ui/text"),w=V(require("react"));var h=t=>{var n,r,u;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(r=(n=t==null?void 0:t.internalLink)==null?void 0:n.toLowerCase())!=null&&r.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(u=t==null?void 0:t.externalLink)!=null?u:"/"},L=t=>t?(t==null?void 0:t.linkType)==="linkInternal"?`/${t==null?void 0:t.internalLink}`:t==null?void 0:t.externalLink:"/thank-you";var a=require("react/jsx-runtime");function B({logo:t,form:n,formLinks:r,signInLink:u}){return(0,a.jsx)(m.Section,{className:"py-10 bg-primary lg:py-20",children:(0,a.jsx)(v.Container,{maxWidth:1280,children:(0,a.jsxs)(v.Container,{maxWidth:576,children:[(0,a.jsx)(W,{logo:t}),(0,a.jsxs)(N.Card,{borderRadius:"md",className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[(0,a.jsx)(_,{form:n}),(0,a.jsx)(j,{form:n,signInLink:u})]}),(0,a.jsx)(J,{formLinks:r})]})})})}function W({logo:t}){var n;return t?(0,a.jsx)("div",{className:"mb-10",children:(0,a.jsx)(M.Link,{"aria-label":`Go to ${h(t)==="/"?"home page":h(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:h(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(C.Image,{src:t==null?void 0:t.image,alt:(n=t==null?void 0:t.alt)!=null?n:"signup-logo",width:100,height:100,className:"flex justify-center text-3xl font-bold leading-none text-white"})})}):null}function _({form:t}){return(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)(A.Text,{muted:!0,className:"text-sm lg:text-base",children:t==null?void 0:t.subtitle}),(0,a.jsx)(S.Heading,{className:"text-xl lg:text-2xl",children:t==null?void 0:t.name})]})}function j({form:t,signInLink:n}){var c;if(!(t!=null&&t.fields))return null;let[r,u]=w.default.useState({}),p=s=>{u(e=>({...e,[s]:!e[s]}))};return(0,a.jsxs)(P.Form,{id:(c=t==null?void 0:t.id)!=null?c:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:L(t==null?void 0:t.thankYouPage),children:[(0,a.jsx)(E,{form:t,showPassword:r,togglePasswordVisibility:p}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"webriq-recaptcha"})}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(k,{form:t}),(0,a.jsx)(D,{signInLink:n})]})]})}function E({form:t,showPassword:n,togglePasswordVisibility:r}){var u,p,c,s;return(0,a.jsxs)(w.default.Fragment,{children:[(0,a.jsx)(g.Flex,{className:"flex-col lg:flex-row gap-3",children:(p=(u=t==null?void 0:t.fields)==null?void 0:u.slice(0,2))==null?void 0:p.map((e,y)=>{var i;return(0,a.jsx)("div",{className:"w-full",children:(0,a.jsx)(l.FormField,{noLabel:!0,variant:"secondary",placeholder:e==null?void 0:e.placeholder,required:e==null?void 0:e.isRequired,name:(i=e==null?void 0:e.name)!=null?i:"",items:e==null?void 0:e.items,type:e==null?void 0:e.type,...e})},y)})}),(s=(c=t==null?void 0:t.fields)==null?void 0:c.slice(2))==null?void 0:s.map((e,y)=>{var i;return(0,a.jsx)("div",{className:"my-3",children:(e==null?void 0:e.type)==="inputPassword"&&e.name?(0,a.jsx)(G,{formFields:e,showPassword:n[e.name]||!1,togglePassword:()=>r(e.name)}):(0,a.jsx)(l.FormField,{noLabel:!0,variant:"secondary",name:(i=e==null?void 0:e.name)!=null?i:"",placeholder:e==null?void 0:e.placeholder,required:e==null?void 0:e.isRequired,items:e==null?void 0:e.items,type:e==null?void 0:e.type,...e})},y)})]})}function G({formFields:t,showPassword:n,togglePassword:r}){var u;return(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)(R.Input,{noLabel:!0,ariaLabel:(u=t==null?void 0:t.placeholder)!=null?u:t==null?void 0:t.name,variant:"secondary",type:n?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,a.jsx)(b.Button,{variant:"unstyled",as:"button",ariaLabel:n?"Show password":"Hide password",className:"focus:outline-none mr-4",type:"button",onClick:r,children:(0,a.jsx)(K,{showPassword:n})})]})}function k({form:t}){var n;return t!=null&&t.buttonLabel?(0,a.jsx)(b.Button,{as:"button",className:"w-full py-4 mb-3",ariaLabel:(n=t==null?void 0:t.buttonLabel)!=null?n:"Sign Up form submit button",variant:"custom",type:"submit",children:t==null?void 0:t.buttonLabel}):null}function D({signInLink:t}){return t!=null&&t.label?(0,a.jsxs)("span",{className:"text-xs text-gray-900",children:[(0,a.jsx)("span",{children:"Already have an account?"})," ",(0,a.jsx)(b.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function J({formLinks:t}){return t?(0,a.jsx)("p",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((n,r,{length:u})=>(0,a.jsxs)("span",{children:[(0,a.jsx)(b.Button,{as:"link",variant:"link",link:n,className:"text-xs underline text-secondary-foreground hover:text-gray-50",ariaLabel:n==null?void 0:n.label,children:n==null?void 0:n.label}),r===u-1?null:r===u-2?(0,a.jsx)("span",{children:"\xA0and\xA0"}):(0,a.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function K({showPassword:t}){return(0,a.jsx)(w.default.Fragment,{children:t?(0,a.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,a.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,a.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,a.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,a.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}0&&(module.exports={SigninSignup_B});
|
package/dist/signin_signup_b.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-UYB2OBMQ.mjs";import"./chunk-4DDN6JI4.mjs";export{a as SigninSignup_B,a as default};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/signin-signup",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.14-beta.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -29,32 +29,32 @@
|
|
|
29
29
|
"typescript": "^5.6.2",
|
|
30
30
|
"vite-tsconfig-paths": "^5.0.1",
|
|
31
31
|
"vitest": "^2.1.1",
|
|
32
|
-
"@stackshift-ui/typescript-config": "6.0.
|
|
33
|
-
"@stackshift-ui/eslint-config": "6.0.
|
|
32
|
+
"@stackshift-ui/typescript-config": "6.0.10-beta.0",
|
|
33
|
+
"@stackshift-ui/eslint-config": "6.0.10-beta.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
|
-
"@stackshift-ui/scripts": "6.0.
|
|
38
|
-
"@stackshift-ui/
|
|
39
|
-
"@stackshift-ui/
|
|
40
|
-
"@stackshift-ui/
|
|
41
|
-
"@stackshift-ui/
|
|
42
|
-
"@stackshift-ui/input": "6.0.
|
|
43
|
-
"@stackshift-ui/text": "6.0.
|
|
44
|
-
"@stackshift-ui/link": "6.0.
|
|
45
|
-
"@stackshift-ui/image": "6.0.
|
|
46
|
-
"@stackshift-ui/form": "6.0.
|
|
47
|
-
"@stackshift-ui/form-field": "6.0.
|
|
48
|
-
"@stackshift-ui/section": "6.0.
|
|
49
|
-
"@stackshift-ui/
|
|
50
|
-
"@stackshift-ui/
|
|
37
|
+
"@stackshift-ui/scripts": "6.0.10-beta.0",
|
|
38
|
+
"@stackshift-ui/system": "6.0.11-beta.0",
|
|
39
|
+
"@stackshift-ui/button": "6.0.11-beta.0",
|
|
40
|
+
"@stackshift-ui/card": "6.0.11-beta.0",
|
|
41
|
+
"@stackshift-ui/heading": "6.0.11-beta.0",
|
|
42
|
+
"@stackshift-ui/input": "6.0.12-beta.0",
|
|
43
|
+
"@stackshift-ui/text": "6.0.11-beta.0",
|
|
44
|
+
"@stackshift-ui/link": "6.0.11-beta.0",
|
|
45
|
+
"@stackshift-ui/image": "6.0.11-beta.0",
|
|
46
|
+
"@stackshift-ui/form": "6.0.11-beta.0",
|
|
47
|
+
"@stackshift-ui/form-field": "6.0.13-beta.0",
|
|
48
|
+
"@stackshift-ui/section": "6.0.11-beta.0",
|
|
49
|
+
"@stackshift-ui/container": "6.0.11-beta.0",
|
|
50
|
+
"@stackshift-ui/flex": "6.0.11-beta.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@types/react": "16.8 - 19",
|
|
54
54
|
"next": "10 - 14",
|
|
55
55
|
"react": "16.8 - 19",
|
|
56
56
|
"react-dom": "16.8 - 19",
|
|
57
|
-
"@stackshift-ui/system": ">=6.0.
|
|
57
|
+
"@stackshift-ui/system": ">=6.0.11-beta.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependenciesMeta": {
|
|
60
60
|
"next": {
|
package/dist/chunk-7U35HRM4.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i,b as y}from"./chunk-4DDN6JI4.mjs";import{Button as x}from"@stackshift-ui/button";import{Container as w}from"@stackshift-ui/container";import{Flex as v}from"@stackshift-ui/flex";import{Form as S}from"@stackshift-ui/form";import{FormField as g}from"@stackshift-ui/form-field";import{Heading as z}from"@stackshift-ui/heading";import{Image as R}from"@stackshift-ui/image";import{Input as N}from"@stackshift-ui/input";import{Link as A}from"@stackshift-ui/link";import{Section as L}from"@stackshift-ui/section";import{Text as C}from"@stackshift-ui/text";import M from"react";import{Fragment as P,jsx as e,jsxs as c}from"react/jsx-runtime";function q({logo:a,form:n,formLinks:u,signInLink:p}){return e(L,{className:"py-10 rounded-md bg-gray-50 lg:py-20",children:c(w,{maxWidth:576,children:[e(B,{logo:a}),c(w,{className:"mb-6 text-center lg:mb-10",children:[e(T,{form:n}),e(Y,{form:n,signInLink:p,thankYouPage:y(n==null?void 0:n.thankYouPage)})]}),e(d,{formLinks:u})]})})}function B({logo:a}){var n;return a?e("div",{className:"mb-10",children:e(A,{"aria-label":`Go to ${i(a)==="/"?"home page":i(a)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:i(a),target:a==null?void 0:a.linkTarget,rel:(a==null?void 0:a.linkTarget)==="_blank"?"noopener noreferrer":"",children:e(R,{src:a==null?void 0:a.image,alt:(n=a==null?void 0:a.alt)!=null?n:"signup-logo",width:100,height:100,className:"flex justify-center mx-auto text-3xl font-bold leading-none"})})}):null}function T({form:a}){return c("div",{className:"mb-6",children:[a!=null&&a.subtitle?e(C,{muted:!0,children:a==null?void 0:a.subtitle}):null,a!=null&&a.name?e(z,{className:"text-2xl lg:text-2xl",children:a==null?void 0:a.name}):null]})}function Y({form:a,signInLink:n,thankYouPage:u}){var b,s;if(!(a!=null&&a.fields))return null;let[p,l]=M.useState({}),t=h=>{l(r=>({...r,[h]:!r[h]}))};return c(S,{id:(b=a==null?void 0:a.id)!=null?b:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:u,children:[e(H,{form:a,showPasswords:p,togglePasswordVisibility:t}),e("div",{children:e("div",{className:"webriq-recaptcha"})}),e("div",{className:"text-center",children:(a==null?void 0:a.buttonLabel)&&e(x,{as:"button",variant:"custom",ariaLabel:(s=a==null?void 0:a.buttonLabel)!=null?s:"Sign Up form submit button",className:"w-full py-4 text-sm font-bold tex-gray-50",type:"submit",children:a==null?void 0:a.buttonLabel})}),n&&e(U,{signInLink:n})]})}function H({form:a,showPasswords:n,togglePasswordVisibility:u}){var p,l;return c(P,{children:[e(v,{wrap:!0,className:"-mx-2",children:(p=a==null?void 0:a.fields)==null?void 0:p.slice(0,2).map((t,b)=>{var s;return e("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:t.type==="inputText"?e(N,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,className:"w-full py-4 text-xs bg-white",name:t==null?void 0:t.name,ariaLabel:t==null?void 0:t.label,...t,type:"text"}):e(g,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",name:(s=t==null?void 0:t.name)!=null?s:"",placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},b)})}),(l=a==null?void 0:a.fields)==null?void 0:l.slice(2).map((t,b)=>{var s;return e("div",{className:"my-3",children:t.type==="inputPassword"&&t.name?e(V,{formFields:t,showPassword:n[t.name]||!1,togglePassword:()=>u(t.name)}):e(g,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,name:(s=t==null?void 0:t.name)!=null?s:"",items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},b)})]})}function U({signInLink:a}){return a!=null&&a.label?c("div",{className:"w-full text-center mt-3",children:[e("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),e(x,{as:"link",variant:"link",link:a,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:a==null?void 0:a.label,children:a==null?void 0:a.label})]}):null}function V({formFields:a,showPassword:n,togglePassword:u}){var p;return c(v,{className:"relative",children:[e(N,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(p=a==null?void 0:a.placeholder)!=null?p:a==null?void 0:a.name,variant:"primary",type:n?"text":"password",placeholder:a==null?void 0:a.placeholder,name:a==null?void 0:a.name,required:a==null?void 0:a.isRequired}),e(x,{as:"button",variant:"unstyled",ariaLabel:n?"Show password":"Hide password",className:"absolute top-0 right-0 h-full p-2",type:"button",onClick:u,children:e(W,{showPassword:n})})]})}function d({formLinks:a}){return a?e("p",{className:"mt-10 text-xs text-center text-gray-700",children:a==null?void 0:a.map((n,u,{length:p})=>c("span",{children:[e(x,{as:"link",variant:"link",link:n,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:n==null?void 0:n.label,children:n==null?void 0:n.label}),u===p-1?null:u===p-2?e("span",{children:"\xA0and\xA0"}):e("span",{children:"\xA0,\xA0"})]},u))}):null}function W({showPassword:a}){return e(P,{children:a?e("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:c("g",{fill:"currentColor",children:[e("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),e("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),e("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):e("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:c("g",{fill:"currentColor",children:[e("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),e("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}export{q as a};
|
package/dist/chunk-DOEKUPLG.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as b,b as x}from"./chunk-4DDN6JI4.mjs";import{Button as h}from"@stackshift-ui/button";import{Card as o}from"@stackshift-ui/card";import{Container as y}from"@stackshift-ui/container";import{Flex as d}from"@stackshift-ui/flex";import{Form as N}from"@stackshift-ui/form";import{FormField as v}from"@stackshift-ui/form-field";import{Heading as P}from"@stackshift-ui/heading";import{Image as S}from"@stackshift-ui/image";import{Input as C}from"@stackshift-ui/input";import{Link as R}from"@stackshift-ui/link";import{Section as L}from"@stackshift-ui/section";import{Text as M}from"@stackshift-ui/text";import w from"react";import{jsx as e,jsxs as c}from"react/jsx-runtime";function A({logo:a,form:n,formLinks:p,signInLink:u}){return e(L,{className:"py-10 bg-primary lg:py-20",children:e(y,{maxWidth:1280,children:c(y,{maxWidth:576,children:[e(B,{logo:a}),c(o,{borderRadius:"md",className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[e(z,{form:n}),e(q,{form:n,signInLink:u})]}),e(V,{formLinks:p})]})})})}function B({logo:a}){var n;return a?e("div",{className:"mb-10",children:e(R,{"aria-label":`Go to ${b(a)==="/"?"home page":b(a)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:b(a),target:a==null?void 0:a.linkTarget,rel:(a==null?void 0:a.linkTarget)==="_blank"?"noopener noreferrer":"",children:e(S,{src:a==null?void 0:a.image,alt:(n=a==null?void 0:a.alt)!=null?n:"signup-logo",width:100,height:100,className:"flex justify-center text-3xl font-bold leading-none text-white"})})}):null}function z({form:a}){return c("div",{className:"mb-6",children:[e(M,{muted:!0,children:a==null?void 0:a.subtitle}),e(P,{className:"text-2xl lg:text-2xl",children:a==null?void 0:a.name})]})}function q({form:a,signInLink:n}){var r;if(!(a!=null&&a.fields))return null;let[p,u]=w.useState({}),l=s=>{u(t=>({...t,[s]:!t[s]}))};return c(N,{id:(r=a==null?void 0:a.id)!=null?r:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:x(a==null?void 0:a.thankYouPage),children:[e(m,{form:a,showPassword:p,togglePasswordVisibility:l}),e("div",{children:e("div",{className:"webriq-recaptcha"})}),c("div",{className:"text-center",children:[e(H,{form:a}),e(U,{signInLink:n})]})]})}function m({form:a,showPassword:n,togglePasswordVisibility:p}){var u,l,r,s;return c(w.Fragment,{children:[e(d,{className:"flex-col lg:flex-row gap-3",children:(l=(u=a==null?void 0:a.fields)==null?void 0:u.slice(0,2))==null?void 0:l.map((t,g)=>{var i;return e("div",{className:"w-full",children:e(v,{noLabel:!0,variant:"secondary",placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,name:(i=t==null?void 0:t.name)!=null?i:"",items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},g)})}),(s=(r=a==null?void 0:a.fields)==null?void 0:r.slice(2))==null?void 0:s.map((t,g)=>{var i;return e("div",{className:"my-3",children:(t==null?void 0:t.type)==="inputPassword"&&t.name?e(T,{formFields:t,showPassword:n[t.name]||!1,togglePassword:()=>p(t.name)}):e(v,{noLabel:!0,variant:"secondary",name:(i=t==null?void 0:t.name)!=null?i:"",placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},g)})]})}function T({formFields:a,showPassword:n,togglePassword:p}){var u;return c("div",{className:"flex",children:[e(C,{noLabel:!0,ariaLabel:(u=a==null?void 0:a.placeholder)!=null?u:a==null?void 0:a.name,variant:"secondary",type:n?"text":"password",placeholder:a==null?void 0:a.placeholder,name:a==null?void 0:a.name,required:a==null?void 0:a.isRequired}),e(h,{variant:"unstyled",as:"button",ariaLabel:n?"Show password":"Hide password",className:"focus:outline-none mr-4",type:"button",onClick:p,children:e(Y,{showPassword:n})})]})}function H({form:a}){var n;return a!=null&&a.buttonLabel?e(h,{as:"button",className:"w-full py-4 mb-3",ariaLabel:(n=a==null?void 0:a.buttonLabel)!=null?n:"Sign Up form submit button",variant:"custom",type:"submit",children:a==null?void 0:a.buttonLabel}):null}function U({signInLink:a}){return a!=null&&a.label?c("span",{className:"text-xs text-gray-900",children:[e("span",{children:"Already have an account?"})," ",e(h,{as:"link",variant:"link",link:a,className:"text-xs text-primary hover:underline",ariaLabel:a==null?void 0:a.label,children:a==null?void 0:a.label})]}):null}function V({formLinks:a}){return a?e("p",{className:"text-xs text-center text-secondary-foreground",children:a==null?void 0:a.map((n,p,{length:u})=>c("span",{children:[e(h,{as:"link",variant:"link",link:n,className:"text-xs underline text-secondary-foreground hover:text-gray-50",ariaLabel:n==null?void 0:n.label,children:n==null?void 0:n.label}),p===u-1?null:p===u-2?e("span",{children:"\xA0and\xA0"}):e("span",{children:"\xA0,\xA0"})]},p))}):null}function Y({showPassword:a}){return e(w.Fragment,{children:a?e("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:c("g",{fill:"currentColor",children:[e("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),e("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),e("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):e("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:c("g",{fill:"currentColor",children:[e("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),e("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}export{A as a};
|
|
File without changes
|