@stackshift-ui/signin-signup 6.0.4 → 6.0.5-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-DOEKUPLG.mjs +1 -0
- package/dist/chunk-GHFZYE3G.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 +6 -6
- package/src/signin_signup_a.tsx +24 -13
- package/src/signin_signup_b.tsx +59 -30
- package/dist/chunk-2B4CU465.mjs +0 -1
- package/dist/chunk-H22IRLD6.mjs +0 -1
- /package/dist/{chunk-FNVCKDMO.mjs → chunk-UALEHLFH.mjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as b,b as w}from"./chunk-4DDN6JI4.mjs";import{Button as r}from"@stackshift-ui/button";import{Container as y}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 d}from"@stackshift-ui/heading";import{Image as o}from"@stackshift-ui/image";import{Input as N}from"@stackshift-ui/input";import{Link as z}from"@stackshift-ui/link";import{Section as A}from"@stackshift-ui/section";import{Text as L}from"@stackshift-ui/text";import R from"react";import{Fragment as P,jsx as e,jsxs as s}from"react/jsx-runtime";function C({logo:a,form:n,formLinks:p,signInLink:u}){return e(A,{className:"py-10 rounded-md bg-gray-50 lg:py-20",children:s(y,{maxWidth:576,children:[e(M,{logo:a}),s(y,{className:"mb-6 text-center lg:mb-10",children:[e(q,{form:n}),e(B,{form:n,signInLink:u,thankYouPage:w(n==null?void 0:n.thankYouPage)})]}),e(U,{formLinks:p})]})})}function M({logo:a}){var n;return a?e("div",{className:"mb-10",children:e(z,{"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(o,{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 q({form:a}){return s("div",{className:"mb-6",children:[a!=null&&a.subtitle?e(L,{muted:!0,children:a==null?void 0:a.subtitle}):null,a!=null&&a.name?e(d,{className:"text-2xl lg:text-2xl",children:a==null?void 0:a.name}):null]})}function B({form:a,signInLink:n,thankYouPage:p}){var l,c;if(!(a!=null&&a.fields))return null;let[u,i]=R.useState({}),t=x=>{i(h=>({...h,[x]:!h[x]}))};return s(S,{id:(l=a==null?void 0:a.id)!=null?l:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:p,children:[e(T,{form:a,showPasswords:u,togglePasswordVisibility:t}),e("div",{children:e("div",{className:"webriq-recaptcha"})}),e("div",{className:"text-center",children:(a==null?void 0:a.buttonLabel)&&e(r,{as:"button",variant:"custom",ariaLabel:(c=a==null?void 0:a.buttonLabel)!=null?c:"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(Y,{signInLink:n})]})}function T({form:a,showPasswords:n,togglePasswordVisibility:p}){var u,i;return s(P,{children:[e(v,{wrap:!0,className:"-mx-2",children:(u=a==null?void 0:a.fields)==null?void 0:u.slice(0,2).map((t,l)=>{var c;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,{textSize:"sm",noLabel:!0,name:(c=t==null?void 0:t.name)!=null?c:"",...t})},l)})}),(i=a==null?void 0:a.fields)==null?void 0:i.slice(2).map((t,l)=>{var c;return e("div",{className:"my-3",children:t.type==="inputPassword"&&t.name?e(H,{formFields:t,showPassword:n[t.name]||!1,togglePassword:()=>p(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:(c=t==null?void 0:t.name)!=null?c:"",items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},l)})]})}function Y({signInLink:a}){return a!=null&&a.label?s("div",{className:"w-full text-center mt-3",children:[e("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),e(r,{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 H({formFields:a,showPassword:n,togglePassword:p}){var u;return s(v,{className:"relative",children:[e(N,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(u=a==null?void 0:a.placeholder)!=null?u: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(r,{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:e(V,{showPassword:n})})]})}function U({formLinks:a}){return a?e("p",{className:"mt-10 text-xs text-center text-gray-700",children:a==null?void 0:a.map((n,p,{length:u})=>s("span",{children:[e(r,{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?e("span",{children:"\xA0and\xA0"}):e("span",{children:"\xA0,\xA0"})]},p))}):null}function V({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:s("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:s("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{C as a};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var ht=Object.create;var S=Object.defineProperty;var yt=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,St=Object.prototype.hasOwnProperty;var L=(t,e)=>()=>(t&&(e=t(t=0)),e);var g=(t,e)=>{for(var r in e)S(t,r,{get:e[r],enumerable:!0})},E=(t,e,r,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of wt(e))!St.call(t,i)&&i!==r&&S(t,i,{get:()=>e[i],enumerable:!(c=yt(e,i))||c.enumerable});return t};var J=(t,e,r)=>(r=t!=null?ht(vt(t)):{},E(e||!t||!t.__esModule?S(r,"default",{value:t,enumerable:!0}):r,t)),Nt=t=>E(S({},"__esModule",{value:!0}),t);var l,N,o=L(()=>{"use strict";l=t=>{var e,r,c;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"&&(c=t==null?void 0:t.externalLink)!=null?c:"/"},N=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={};g(tt,{SigninSignup_A:()=>A,default:()=>A});function A({logo:t,form:e,formLinks:r,signInLink:c}){return(0,n.jsx)(I.Section,{className:"py-10 bg-gray-50 lg:py-20",children:(0,n.jsxs)(R.Container,{maxWidth:576,children:[(0,n.jsx)(Lt,{logo:t}),(0,n.jsxs)(R.Container,{className:"mb-6 text-center lg:mb-10",children:[(0,n.jsx)(gt,{form:e}),(0,n.jsx)(ot,{form:e,signInLink:c,thankYouPage:N(e==null?void 0:e.thankYouPage)})]}),(0,n.jsx)(Ct,{formLinks:r})]})})}function Lt({logo:t}){var e;return t?(0,n.jsx)("div",{className:"mb-10",children:(0,n.jsx)(Z.Link,{"aria-label":`Go to ${l(t)==="/"?"home page":l(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:l(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,n.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 gt({form:t}){return(0,n.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,n.jsx)(F.Text,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?(0,n.jsx)(Q.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function ot({form:t,signInLink:e,thankYouPage:r}){var p,s;if(!(t!=null&&t.fields))return null;let[c,i]=f.default.useState(!1);return(0,n.jsxs)(O.Form,{id:(p=t==null?void 0:t.id)!=null?p:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:r,children:[(0,n.jsx)(Rt,{form:t,showPassword:c,setShowPassword:i}),(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"webriq-recaptcha"})}),(0,n.jsx)("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&(0,n.jsx)(y.Button,{as:"button",variant:"custom",ariaLabel:(s=t==null?void 0:t.buttonLabel)!=null?s:"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,n.jsx)(Pt,{signInLink:e})]})}function Rt({form:t,showPassword:e,setShowPassword:r}){var c,i;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.Flex,{wrap:!0,className:"-mx-2",children:(c=t==null?void 0:t.fields)==null?void 0:c.slice(0,2).map((p,s)=>{var a;return(0,n.jsx)("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:p.type==="inputText"?(0,n.jsx)(C.Input,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:p==null?void 0:p.placeholder,required:p==null?void 0:p.isRequired,className:"w-full py-4 text-xs bg-white",name:p==null?void 0:p.name,ariaLabel:p==null?void 0:p.label,...p,type:"text"}):(0,n.jsx)(P.FormField,{textSize:"sm",noLabel:!0,name:(a=p==null?void 0:p.name)!=null?a:"",...p})},s)})}),(i=t==null?void 0:t.fields)==null?void 0:i.slice(2).map((p,s)=>{var a;return(0,n.jsx)("div",{className:"my-3",children:p.type==="inputPassword"?(0,n.jsx)(mt,{formFields:p,showPassword:e,setShowPassword:r}):(0,n.jsx)(P.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:p==null?void 0:p.placeholder,required:p==null?void 0:p.isRequired,name:(a=p==null?void 0:p.name)!=null?a:"",items:p==null?void 0:p.items,type:p==null?void 0:p.type,...p})},s)})]})}function Pt({signInLink:t}){return t!=null&&t.label?(0,n.jsxs)("div",{className:"w-full text-center mt-3",children:[(0,n.jsx)("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),(0,n.jsx)(y.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 mt({formFields:t,showPassword:e,setShowPassword:r}){var c;return(0,n.jsxs)(m.Flex,{className:"relative",children:[(0,n.jsx)(C.Input,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(c=t==null?void 0:t.placeholder)!=null?c: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,n.jsx)(y.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(!e),children:(0,n.jsx)(At,{showPassword:e})})]})}function Ct({formLinks:t}){return t?(0,n.jsx)("p",{className:"mt-10 text-xs text-center text-gray-700",children:t==null?void 0:t.map((e,r,{length:c})=>(0,n.jsxs)("span",{children:[(0,n.jsx)(y.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===c-1?null:r===c-2?(0,n.jsx)("span",{children:"\xA0and\xA0"}):(0,n.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function At({showPassword:t}){return(0,n.jsx)(n.Fragment,{children:t?(0,n.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,n.jsxs)("g",{fill:"currentColor",children:[(0,n.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,n.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,n.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,n.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,n.jsxs)("g",{fill:"currentColor",children:[(0,n.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,n.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,R,m,O,P,Q,X,C,Z,I,F,f,n,z=L(()=>{"use strict";y=require("@stackshift-ui/button"),R=require("@stackshift-ui/container"),m=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"));o();n=require("react/jsx-runtime")});var bt={};g(bt,{SigninSignup_B:()=>q,default:()=>q});function q({logo:t,form:e,formLinks:r,signInLink:c}){return(0,u.jsx)(I.Section,{className:"py-10 bg-primary lg:py-20",children:(0,u.jsx)(R.Container,{maxWidth:1280,children:(0,u.jsxs)(R.Container,{maxWidth:576,children:[(0,u.jsx)(zt,{logo:t}),(0,u.jsxs)(et.Card,{className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[(0,u.jsx)(Bt,{form:e}),(0,u.jsx)(Mt,{form:e,signInLink:c})]}),(0,u.jsx)(Ut,{formLinks:r})]})})})}function zt({logo:t}){var e;return t?(0,u.jsx)("div",{className:"mb-10",children:(0,u.jsx)(Z.Link,{"aria-label":`Go to ${l(t)==="/"?"home page":l(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:l(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 text-3xl font-bold leading-none text-white"})})}):null}function Bt({form:t}){return(0,u.jsxs)("div",{className:"mb-6",children:[(0,u.jsx)(F.Text,{muted:!0,children:t==null?void 0:t.subtitle}),(0,u.jsx)(Q.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name})]})}function Mt({form:t,signInLink:e}){var i;if(!(t!=null&&t.fields))return null;let[r,c]=(0,v.useState)(!1);return(0,u.jsxs)(O.Form,{id:(i=t==null?void 0:t.id)!=null?i:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:N(t==null?void 0:t.thankYouPage),children:[(0,u.jsx)(qt,{form:t,showPassword:r,setShowPassword:c}),(0,u.jsx)("div",{children:(0,u.jsx)("div",{className:"webriq-recaptcha"})}),(0,u.jsxs)("div",{className:"text-center",children:[(0,u.jsx)(Tt,{form:t}),(0,u.jsx)(Yt,{signInLink:e})]})]})}function qt({form:t,showPassword:e,setShowPassword:r}){var c,i,p,s;return(0,u.jsxs)(v.default.Fragment,{children:[(0,u.jsx)(m.Flex,{className:"flex-col lg:flex-row gap-3",children:(i=(c=t==null?void 0:t.fields)==null?void 0:c.slice(0,2))==null?void 0:i.map((a,x)=>{var b;return(0,u.jsx)("div",{className:"w-full",children:(0,u.jsx)(P.FormField,{noLabel:!0,variant:"secondary",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,name:(b=a==null?void 0:a.name)!=null?b:"",items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},x)})}),(s=(p=t==null?void 0:t.fields)==null?void 0:p.slice(2))==null?void 0:s.map((a,x)=>{var b,h;return(0,u.jsx)("div",{className:"my-3",children:(a==null?void 0:a.type)==="inputPassword"?(0,u.jsxs)("div",{className:"flex",children:[(0,u.jsx)(C.Input,{noLabel:!0,ariaLabel:(b=a==null?void 0:a.placeholder)!=null?b:a==null?void 0:a.name,variant:"secondary",type:e?"text":"password",placeholder:a==null?void 0:a.placeholder,name:a==null?void 0:a.name,required:a==null?void 0:a.isRequired}),(0,u.jsx)(w.Button,{variant:"unstyled",as:"button",ariaLabel:e?"Show password":"Hide password",className:"focus:outline-none mr-4",type:"button",onClick:()=>r(!e),children:(0,u.jsx)(dt,{showPassword:e})})]}):(0,u.jsx)(P.FormField,{noLabel:!0,variant:"secondary",name:(h=a==null?void 0:a.name)!=null?h:"",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})},x)})]})}function Tt({form:t}){var e;return t!=null&&t.buttonLabel?(0,u.jsx)(w.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 Yt({signInLink:t}){return t!=null&&t.label?(0,u.jsxs)("span",{className:"text-xs text-gray-900",children:[(0,u.jsx)("span",{children:"Already have an account?"})," ",(0,u.jsx)(w.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 Ut({formLinks:t}){return t?(0,u.jsx)("p",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((e,r,{length:c})=>(0,u.jsxs)("span",{children:[(0,u.jsx)(w.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===c-1?null:r===c-2?(0,u.jsx)("span",{children:"\xA0and\xA0"}):(0,u.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function dt({showPassword:t}){return(0,u.jsx)(v.default.Fragment,{children:t?(0,u.jsx)("svg",{className:"w-5 h-5 my-auto 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 w,et,R,m,O,P,Q,X,C,Z,I,F,v,u,T=L(()=>{"use strict";w=require("@stackshift-ui/button"),et=require("@stackshift-ui/card"),v=J(require("react"));o();u=require("react/jsx-runtime")});var Wt={};g(Wt,{SigninSignup:()=>lt,SigninSignup_A:()=>A,SigninSignup_B:()=>q});module.exports=Nt(Wt);var U=require("react"),xt=require("react/jsx-runtime"),Y={variant_a:(0,U.lazy)(()=>Promise.resolve().then(()=>(z(),tt))),variant_b:(0,U.lazy)(()=>Promise.resolve().then(()=>(T(),bt)))},Ht="SigninSignup",lt=({data:t})=>{var i,p,s,a,x,b,h,d,H,W,_,k,K,$,D,V,G,j;let e=t==null?void 0:t.variant,r=e&&(Y==null?void 0:Y[e]),c={logo:(p=(i=t==null?void 0:t.variants)==null?void 0:i.logo)!=null?p:void 0,title:(a=(s=t==null?void 0:t.variants)==null?void 0:s.title)!=null?a:void 0,subtitle:(b=(x=t==null?void 0:t.variants)==null?void 0:x.subtitle)!=null?b:void 0,text:(d=(h=t==null?void 0:t.variants)==null?void 0:h.plainText)!=null?d:void 0,firstButton:(W=(H=t==null?void 0:t.variants)==null?void 0:H.primaryButton)!=null?W:void 0,secondButton:(k=(_=t==null?void 0:t.variants)==null?void 0:_.secondaryButton)!=null?k:void 0,formLinks:($=(K=t==null?void 0:t.variants)==null?void 0:K.formLinks)!=null?$:void 0,signInLink:(V=(D=t==null?void 0:t.variants)==null?void 0:D.signinLink)!=null?V:void 0,form:(j=(G=t==null?void 0:t.variants)==null?void 0:G.form)!=null?j:void 0};return r?(0,xt.jsx)(r,{...c}):null};lt.displayName=Ht;z();T();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 o=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>{for(var i in e)w(t,i,{get:e[i],enumerable:!0})},D=(t,e,i,p)=>{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:!(p=yt(e,s))||p.enumerable});return t};var J=(t,e,i)=>(i=t!=null?ht(vt(t)):{},D(e||!t||!t.__esModule?w(i,"default",{value:t,enumerable:!0}):i,t)),ot=t=>D(w({},"__esModule",{value:!0}),t);var x,v,L=o(()=>{"use strict";x=t=>{var e,i,p;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"&&(p=t==null?void 0:t.externalLink)!=null?p:"/"},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={};N(tt,{SigninSignup_A:()=>C,default:()=>C});function C({logo:t,form:e,formLinks:i,signInLink:p}){return(0,n.jsx)(I.Section,{className:"py-10 rounded-md bg-gray-50 lg:py-20",children:(0,n.jsxs)(S.Container,{maxWidth:576,children:[(0,n.jsx)(Nt,{logo:t}),(0,n.jsxs)(S.Container,{className:"mb-6 text-center lg:mb-10",children:[(0,n.jsx)(Lt,{form:e}),(0,n.jsx)(St,{form:e,signInLink:p,thankYouPage:v(e==null?void 0:e.thankYouPage)})]}),(0,n.jsx)(Ct,{formLinks:i})]})})}function Nt({logo:t}){var e;return t?(0,n.jsx)("div",{className:"mb-10",children:(0,n.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,n.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,n.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,n.jsx)(F.Text,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?(0,n.jsx)(Q.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function St({form:t,signInLink:e,thankYouPage:i}){var c,a;if(!(t!=null&&t.fields))return null;let[p,s]=f.default.useState({}),r=b=>{s(l=>({...l,[b]:!l[b]}))};return(0,n.jsxs)(O.Form,{id:(c=t==null?void 0:t.id)!=null?c:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:i,children:[(0,n.jsx)(Pt,{form:t,showPasswords:p,togglePasswordVisibility:r}),(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"webriq-recaptcha"})}),(0,n.jsx)("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&(0,n.jsx)(h.Button,{as:"button",variant:"custom",ariaLabel:(a=t==null?void 0:t.buttonLabel)!=null?a:"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,n.jsx)(Rt,{signInLink:e})]})}function Pt({form:t,showPasswords:e,togglePasswordVisibility:i}){var p,s;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(R.Flex,{wrap:!0,className:"-mx-2",children:(p=t==null?void 0:t.fields)==null?void 0:p.slice(0,2).map((r,c)=>{var a;return(0,n.jsx)("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:r.type==="inputText"?(0,n.jsx)(m.Input,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:r==null?void 0:r.placeholder,required:r==null?void 0:r.isRequired,className:"w-full py-4 text-xs bg-white",name:r==null?void 0:r.name,ariaLabel:r==null?void 0:r.label,...r,type:"text"}):(0,n.jsx)(P.FormField,{textSize:"sm",noLabel:!0,name:(a=r==null?void 0:r.name)!=null?a:"",...r})},c)})}),(s=t==null?void 0:t.fields)==null?void 0:s.slice(2).map((r,c)=>{var a;return(0,n.jsx)("div",{className:"my-3",children:r.type==="inputPassword"&&r.name?(0,n.jsx)(mt,{formFields:r,showPassword:e[r.name]||!1,togglePassword:()=>i(r.name)}):(0,n.jsx)(P.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:r==null?void 0:r.placeholder,required:r==null?void 0:r.isRequired,name:(a=r==null?void 0:r.name)!=null?a:"",items:r==null?void 0:r.items,type:r==null?void 0:r.type,...r})},c)})]})}function Rt({signInLink:t}){return t!=null&&t.label?(0,n.jsxs)("div",{className:"w-full text-center mt-3",children:[(0,n.jsx)("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),(0,n.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 mt({formFields:t,showPassword:e,togglePassword:i}){var p;return(0,n.jsxs)(R.Flex,{className:"relative",children:[(0,n.jsx)(m.Input,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(p=t==null?void 0:t.placeholder)!=null?p: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,n.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,n.jsx)(dt,{showPassword:e})})]})}function Ct({formLinks:t}){return t?(0,n.jsx)("p",{className:"mt-10 text-xs text-center text-gray-700",children:t==null?void 0:t.map((e,i,{length:p})=>(0,n.jsxs)("span",{children:[(0,n.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===p-1?null:i===p-2?(0,n.jsx)("span",{children:"\xA0and\xA0"}):(0,n.jsx)("span",{children:"\xA0,\xA0"})]},i))}):null}function dt({showPassword:t}){return(0,n.jsx)(n.Fragment,{children:t?(0,n.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,n.jsxs)("g",{fill:"currentColor",children:[(0,n.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,n.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,n.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,n.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,n.jsxs)("g",{fill:"currentColor",children:[(0,n.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,n.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,m,Z,I,F,f,n,d=o(()=>{"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"),m=require("@stackshift-ui/input"),Z=require("@stackshift-ui/link"),I=require("@stackshift-ui/section"),F=require("@stackshift-ui/text"),f=J(require("react"));L();n=require("react/jsx-runtime")});var lt={};N(lt,{SigninSignup_B:()=>A,default:()=>A});function A({logo:t,form:e,formLinks:i,signInLink:p}){return(0,u.jsx)(I.Section,{className:"py-10 bg-primary lg:py-20",children:(0,u.jsx)(S.Container,{maxWidth:1280,children:(0,u.jsxs)(S.Container,{maxWidth:576,children:[(0,u.jsx)(zt,{logo:t}),(0,u.jsxs)(et.Card,{borderRadius:"md",className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[(0,u.jsx)(Bt,{form:e}),(0,u.jsx)(At,{form:e,signInLink:p})]}),(0,u.jsx)(Ut,{formLinks:i})]})})})}function zt({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 text-3xl font-bold leading-none text-white"})})}):null}function Bt({form:t}){return(0,u.jsxs)("div",{className:"mb-6",children:[(0,u.jsx)(F.Text,{muted:!0,children:t==null?void 0:t.subtitle}),(0,u.jsx)(Q.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name})]})}function At({form:t,signInLink:e}){var r;if(!(t!=null&&t.fields))return null;let[i,p]=g.default.useState({}),s=c=>{p(a=>({...a,[c]:!a[c]}))};return(0,u.jsxs)(O.Form,{id:(r=t==null?void 0:t.id)!=null?r:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:v(t==null?void 0:t.thankYouPage),children:[(0,u.jsx)(Mt,{form:t,showPassword:i,togglePasswordVisibility:s}),(0,u.jsx)("div",{children:(0,u.jsx)("div",{className:"webriq-recaptcha"})}),(0,u.jsxs)("div",{className:"text-center",children:[(0,u.jsx)(Tt,{form:t}),(0,u.jsx)(Yt,{signInLink:e})]})]})}function Mt({form:t,showPassword:e,togglePasswordVisibility:i}){var p,s,r,c;return(0,u.jsxs)(g.default.Fragment,{children:[(0,u.jsx)(R.Flex,{className:"flex-col lg:flex-row gap-3",children:(s=(p=t==null?void 0:t.fields)==null?void 0:p.slice(0,2))==null?void 0:s.map((a,b)=>{var l;return(0,u.jsx)("div",{className:"w-full",children:(0,u.jsx)(P.FormField,{noLabel:!0,variant:"secondary",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,name:(l=a==null?void 0:a.name)!=null?l:"",items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},b)})}),(c=(r=t==null?void 0:t.fields)==null?void 0:r.slice(2))==null?void 0:c.map((a,b)=>{var l;return(0,u.jsx)("div",{className:"my-3",children:(a==null?void 0:a.type)==="inputPassword"&&a.name?(0,u.jsx)(qt,{formFields:a,showPassword:e[a.name]||!1,togglePassword:()=>i(a.name)}):(0,u.jsx)(P.FormField,{noLabel:!0,variant:"secondary",name:(l=a==null?void 0:a.name)!=null?l:"",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})},b)})]})}function qt({formFields:t,showPassword:e,togglePassword:i}){var p;return(0,u.jsxs)("div",{className:"flex",children:[(0,u.jsx)(m.Input,{noLabel:!0,ariaLabel:(p=t==null?void 0:t.placeholder)!=null?p: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,u.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,u.jsx)(Vt,{showPassword:e})})]})}function Tt({form:t}){var e;return t!=null&&t.buttonLabel?(0,u.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 Yt({signInLink:t}){return t!=null&&t.label?(0,u.jsxs)("span",{className:"text-xs text-gray-900",children:[(0,u.jsx)("span",{children:"Already have an account?"})," ",(0,u.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 Ut({formLinks:t}){return t?(0,u.jsx)("p",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((e,i,{length:p})=>(0,u.jsxs)("span",{children:[(0,u.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===p-1?null:i===p-2?(0,u.jsx)("span",{children:"\xA0and\xA0"}):(0,u.jsx)("span",{children:"\xA0,\xA0"})]},i))}):null}function Vt({showPassword:t}){return(0,u.jsx)(g.default.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 y,et,S,R,O,P,Q,X,m,Z,I,F,g,u,M=o(()=>{"use strict";y=require("@stackshift-ui/button"),et=require("@stackshift-ui/card"),g=J(require("react"));L();u=require("react/jsx-runtime")});var Ht={};N(Ht,{SigninSignup:()=>bt,SigninSignup_A:()=>C,SigninSignup_B:()=>A});module.exports=ot(Ht);var T=require("react"),xt=require("react/jsx-runtime"),q={variant_a:(0,T.lazy)(()=>Promise.resolve().then(()=>(d(),tt))),variant_b:(0,T.lazy)(()=>Promise.resolve().then(()=>(M(),lt)))},kt="SigninSignup",bt=({data:t})=>{var s,r,c,a,b,l,Y,U,V,k,H,W,_,K,$,G,j,E;let e=t==null?void 0:t.variant,i=e&&(q==null?void 0:q[e]),p={logo:(r=(s=t==null?void 0:t.variants)==null?void 0:s.logo)!=null?r:void 0,title:(a=(c=t==null?void 0:t.variants)==null?void 0:c.title)!=null?a:void 0,subtitle:(l=(b=t==null?void 0:t.variants)==null?void 0:b.subtitle)!=null?l:void 0,text:(U=(Y=t==null?void 0:t.variants)==null?void 0:Y.plainText)!=null?U:void 0,firstButton:(k=(V=t==null?void 0:t.variants)==null?void 0:V.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 i?(0,xt.jsx)(i,{...p}):null};bt.displayName=kt;d();M();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-UALEHLFH.mjs";import{a as o}from"./chunk-GHFZYE3G.mjs";import{a as r}from"./chunk-DOEKUPLG.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 S=Object.defineProperty;var yt=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,St=Object.prototype.hasOwnProperty;var L=(t,e)=>()=>(t&&(e=t(t=0)),e);var g=(t,e)=>{for(var r in e)S(t,r,{get:e[r],enumerable:!0})},D=(t,e,r,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of wt(e))!St.call(t,i)&&i!==r&&S(t,i,{get:()=>e[i],enumerable:!(c=yt(e,i))||c.enumerable});return t};var V=(t,e,r)=>(r=t!=null?ht(vt(t)):{},D(e||!t||!t.__esModule?S(r,"default",{value:t,enumerable:!0}):r,t)),Nt=t=>D(S({},"__esModule",{value:!0}),t);var l,N,o=L(()=>{"use strict";l=t=>{var e,r,c;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"&&(c=t==null?void 0:t.externalLink)!=null?c:"/"},N=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={};g(I,{SigninSignup_A:()=>Z,default:()=>Z});function Z({logo:t,form:e,formLinks:r,signInLink:c}){return(0,n.jsx)(O.Section,{className:"py-10 bg-gray-50 lg:py-20",children:(0,n.jsxs)(R.Container,{maxWidth:576,children:[(0,n.jsx)(Lt,{logo:t}),(0,n.jsxs)(R.Container,{className:"mb-6 text-center lg:mb-10",children:[(0,n.jsx)(gt,{form:e}),(0,n.jsx)(ot,{form:e,signInLink:c,thankYouPage:N(e==null?void 0:e.thankYouPage)})]}),(0,n.jsx)(At,{formLinks:r})]})})}function Lt({logo:t}){var e;return t?(0,n.jsx)("div",{className:"mb-10",children:(0,n.jsx)(J.Link,{"aria-label":`Go to ${l(t)==="/"?"home page":l(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:l(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,n.jsx)(E.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 gt({form:t}){return(0,n.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,n.jsx)(Q.Text,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?(0,n.jsx)(j.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function ot({form:t,signInLink:e,thankYouPage:r}){var p,s;if(!(t!=null&&t.fields))return null;let[c,i]=X.default.useState(!1);return(0,n.jsxs)(G.Form,{id:(p=t==null?void 0:t.id)!=null?p:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:r,children:[(0,n.jsx)(Rt,{form:t,showPassword:c,setShowPassword:i}),(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"webriq-recaptcha"})}),(0,n.jsx)("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&(0,n.jsx)(y.Button,{as:"button",variant:"custom",ariaLabel:(s=t==null?void 0:t.buttonLabel)!=null?s:"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,n.jsx)(Pt,{signInLink:e})]})}function Rt({form:t,showPassword:e,setShowPassword:r}){var c,i;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(C.Flex,{wrap:!0,className:"-mx-2",children:(c=t==null?void 0:t.fields)==null?void 0:c.slice(0,2).map((p,s)=>{var a;return(0,n.jsx)("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:p.type==="inputText"?(0,n.jsx)(A.Input,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:p==null?void 0:p.placeholder,required:p==null?void 0:p.isRequired,className:"w-full py-4 text-xs bg-white",name:p==null?void 0:p.name,ariaLabel:p==null?void 0:p.label,...p,type:"text"}):(0,n.jsx)(P.FormField,{textSize:"sm",noLabel:!0,name:(a=p==null?void 0:p.name)!=null?a:"",...p})},s)})}),(i=t==null?void 0:t.fields)==null?void 0:i.slice(2).map((p,s)=>{var a;return(0,n.jsx)("div",{className:"my-3",children:p.type==="inputPassword"?(0,n.jsx)(Ct,{formFields:p,showPassword:e,setShowPassword:r}):(0,n.jsx)(P.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:p==null?void 0:p.placeholder,required:p==null?void 0:p.isRequired,name:(a=p==null?void 0:p.name)!=null?a:"",items:p==null?void 0:p.items,type:p==null?void 0:p.type,...p})},s)})]})}function Pt({signInLink:t}){return t!=null&&t.label?(0,n.jsxs)("div",{className:"w-full text-center mt-3",children:[(0,n.jsx)("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),(0,n.jsx)(y.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,setShowPassword:r}){var c;return(0,n.jsxs)(C.Flex,{className:"relative",children:[(0,n.jsx)(A.Input,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(c=t==null?void 0:t.placeholder)!=null?c: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,n.jsx)(y.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(!e),children:(0,n.jsx)(mt,{showPassword:e})})]})}function At({formLinks:t}){return t?(0,n.jsx)("p",{className:"mt-10 text-xs text-center text-gray-700",children:t==null?void 0:t.map((e,r,{length:c})=>(0,n.jsxs)("span",{children:[(0,n.jsx)(y.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===c-1?null:r===c-2?(0,n.jsx)("span",{children:"\xA0and\xA0"}):(0,n.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function mt({showPassword:t}){return(0,n.jsx)(n.Fragment,{children:t?(0,n.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,n.jsxs)("g",{fill:"currentColor",children:[(0,n.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,n.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,n.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,n.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,n.jsxs)("g",{fill:"currentColor",children:[(0,n.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,n.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,R,C,G,P,j,E,A,J,O,Q,X,n,F=L(()=>{"use strict";y=require("@stackshift-ui/button"),R=require("@stackshift-ui/container"),C=require("@stackshift-ui/flex"),G=require("@stackshift-ui/form"),P=require("@stackshift-ui/form-field"),j=require("@stackshift-ui/heading"),E=require("@stackshift-ui/image"),A=require("@stackshift-ui/input"),J=require("@stackshift-ui/link"),O=require("@stackshift-ui/section"),Q=require("@stackshift-ui/text"),X=V(require("react"));o();n=require("react/jsx-runtime")});var st={};g(st,{SigninSignup_B:()=>it,default:()=>it});function it({logo:t,form:e,formLinks:r,signInLink:c}){return(0,u.jsx)(O.Section,{className:"py-10 bg-primary lg:py-20",children:(0,u.jsx)(R.Container,{maxWidth:1280,children:(0,u.jsxs)(R.Container,{maxWidth:576,children:[(0,u.jsx)(zt,{logo:t}),(0,u.jsxs)(f.Card,{className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[(0,u.jsx)(Bt,{form:e}),(0,u.jsx)(Mt,{form:e,signInLink:c})]}),(0,u.jsx)(Ut,{formLinks:r})]})})})}function zt({logo:t}){var e;return t?(0,u.jsx)("div",{className:"mb-10",children:(0,u.jsx)(J.Link,{"aria-label":`Go to ${l(t)==="/"?"home page":l(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:l(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,u.jsx)(E.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 Bt({form:t}){return(0,u.jsxs)("div",{className:"mb-6",children:[(0,u.jsx)(Q.Text,{muted:!0,children:t==null?void 0:t.subtitle}),(0,u.jsx)(j.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name})]})}function Mt({form:t,signInLink:e}){var i;if(!(t!=null&&t.fields))return null;let[r,c]=(0,v.useState)(!1);return(0,u.jsxs)(G.Form,{id:(i=t==null?void 0:t.id)!=null?i:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:N(t==null?void 0:t.thankYouPage),children:[(0,u.jsx)(qt,{form:t,showPassword:r,setShowPassword:c}),(0,u.jsx)("div",{children:(0,u.jsx)("div",{className:"webriq-recaptcha"})}),(0,u.jsxs)("div",{className:"text-center",children:[(0,u.jsx)(Tt,{form:t}),(0,u.jsx)(Yt,{signInLink:e})]})]})}function qt({form:t,showPassword:e,setShowPassword:r}){var c,i,p,s;return(0,u.jsxs)(v.default.Fragment,{children:[(0,u.jsx)(C.Flex,{className:"flex-col lg:flex-row gap-3",children:(i=(c=t==null?void 0:t.fields)==null?void 0:c.slice(0,2))==null?void 0:i.map((a,x)=>{var b;return(0,u.jsx)("div",{className:"w-full",children:(0,u.jsx)(P.FormField,{noLabel:!0,variant:"secondary",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,name:(b=a==null?void 0:a.name)!=null?b:"",items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},x)})}),(s=(p=t==null?void 0:t.fields)==null?void 0:p.slice(2))==null?void 0:s.map((a,x)=>{var b,h;return(0,u.jsx)("div",{className:"my-3",children:(a==null?void 0:a.type)==="inputPassword"?(0,u.jsxs)("div",{className:"flex",children:[(0,u.jsx)(A.Input,{noLabel:!0,ariaLabel:(b=a==null?void 0:a.placeholder)!=null?b:a==null?void 0:a.name,variant:"secondary",type:e?"text":"password",placeholder:a==null?void 0:a.placeholder,name:a==null?void 0:a.name,required:a==null?void 0:a.isRequired}),(0,u.jsx)(w.Button,{variant:"unstyled",as:"button",ariaLabel:e?"Show password":"Hide password",className:"focus:outline-none mr-4",type:"button",onClick:()=>r(!e),children:(0,u.jsx)(dt,{showPassword:e})})]}):(0,u.jsx)(P.FormField,{noLabel:!0,variant:"secondary",name:(h=a==null?void 0:a.name)!=null?h:"",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})},x)})]})}function Tt({form:t}){var e;return t!=null&&t.buttonLabel?(0,u.jsx)(w.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 Yt({signInLink:t}){return t!=null&&t.label?(0,u.jsxs)("span",{className:"text-xs text-gray-900",children:[(0,u.jsx)("span",{children:"Already have an account?"})," ",(0,u.jsx)(w.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 Ut({formLinks:t}){return t?(0,u.jsx)("p",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((e,r,{length:c})=>(0,u.jsxs)("span",{children:[(0,u.jsx)(w.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===c-1?null:r===c-2?(0,u.jsx)("span",{children:"\xA0and\xA0"}):(0,u.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function dt({showPassword:t}){return(0,u.jsx)(v.default.Fragment,{children:t?(0,u.jsx)("svg",{className:"w-5 h-5 my-auto 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 w,f,R,C,G,P,j,E,A,J,O,Q,v,u,bt=L(()=>{"use strict";w=require("@stackshift-ui/button"),f=require("@stackshift-ui/card"),v=V(require("react"));o();u=require("react/jsx-runtime")});var Wt={};g(Wt,{SigninSignup:()=>lt});module.exports=Nt(Wt);var M=require("react"),xt=require("react/jsx-runtime"),B={variant_a:(0,M.lazy)(()=>Promise.resolve().then(()=>(F(),I))),variant_b:(0,M.lazy)(()=>Promise.resolve().then(()=>(bt(),st)))},Ht="SigninSignup",lt=({data:t})=>{var i,p,s,a,x,b,h,q,T,Y,U,d,H,W,_,k,K,$;let e=t==null?void 0:t.variant,r=e&&(B==null?void 0:B[e]),c={logo:(p=(i=t==null?void 0:t.variants)==null?void 0:i.logo)!=null?p:void 0,title:(a=(s=t==null?void 0:t.variants)==null?void 0:s.title)!=null?a:void 0,subtitle:(b=(x=t==null?void 0:t.variants)==null?void 0:x.subtitle)!=null?b:void 0,text:(q=(h=t==null?void 0:t.variants)==null?void 0:h.plainText)!=null?q:void 0,firstButton:(Y=(T=t==null?void 0:t.variants)==null?void 0:T.primaryButton)!=null?Y:void 0,secondButton:(d=(U=t==null?void 0:t.variants)==null?void 0:U.secondaryButton)!=null?d:void 0,formLinks:(W=(H=t==null?void 0:t.variants)==null?void 0:H.formLinks)!=null?W:void 0,signInLink:(k=(_=t==null?void 0:t.variants)==null?void 0:_.signinLink)!=null?k:void 0,form:($=(K=t==null?void 0:t.variants)==null?void 0:K.form)!=null?$:void 0};return r?(0,xt.jsx)(r,{...c}):null};lt.displayName=Ht;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 o=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>{for(var r in e)w(t,r,{get:e[r],enumerable:!0})},$=(t,e,r,p)=>{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:!(p=yt(e,s))||p.enumerable});return t};var G=(t,e,r)=>(r=t!=null?ht(vt(t)):{},$(e||!t||!t.__esModule?w(r,"default",{value:t,enumerable:!0}):r,t)),ot=t=>$(w({},"__esModule",{value:!0}),t);var x,v,L=o(()=>{"use strict";x=t=>{var e,r,p;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"&&(p=t==null?void 0:t.externalLink)!=null?p:"/"},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={};N(I,{SigninSignup_A:()=>Z,default:()=>Z});function Z({logo:t,form:e,formLinks:r,signInLink:p}){return(0,n.jsx)(O.Section,{className:"py-10 rounded-md bg-gray-50 lg:py-20",children:(0,n.jsxs)(S.Container,{maxWidth:576,children:[(0,n.jsx)(Nt,{logo:t}),(0,n.jsxs)(S.Container,{className:"mb-6 text-center lg:mb-10",children:[(0,n.jsx)(Lt,{form:e}),(0,n.jsx)(St,{form:e,signInLink:p,thankYouPage:v(e==null?void 0:e.thankYouPage)})]}),(0,n.jsx)(Ct,{formLinks:r})]})})}function Nt({logo:t}){var e;return t?(0,n.jsx)("div",{className:"mb-10",children:(0,n.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,n.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 Lt({form:t}){return(0,n.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,n.jsx)(Q.Text,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?(0,n.jsx)(E.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,a;if(!(t!=null&&t.fields))return null;let[p,s]=X.default.useState({}),i=l=>{s(b=>({...b,[l]:!b[l]}))};return(0,n.jsxs)(j.Form,{id:(c=t==null?void 0:t.id)!=null?c:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:r,children:[(0,n.jsx)(Pt,{form:t,showPasswords:p,togglePasswordVisibility:i}),(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"webriq-recaptcha"})}),(0,n.jsx)("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&(0,n.jsx)(h.Button,{as:"button",variant:"custom",ariaLabel:(a=t==null?void 0:t.buttonLabel)!=null?a:"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,n.jsx)(Rt,{signInLink:e})]})}function Pt({form:t,showPasswords:e,togglePasswordVisibility:r}){var p,s;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(R.Flex,{wrap:!0,className:"-mx-2",children:(p=t==null?void 0:t.fields)==null?void 0:p.slice(0,2).map((i,c)=>{var a;return(0,n.jsx)("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:i.type==="inputText"?(0,n.jsx)(m.Input,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:i==null?void 0:i.placeholder,required:i==null?void 0:i.isRequired,className:"w-full py-4 text-xs bg-white",name:i==null?void 0:i.name,ariaLabel:i==null?void 0:i.label,...i,type:"text"}):(0,n.jsx)(P.FormField,{textSize:"sm",noLabel:!0,name:(a=i==null?void 0:i.name)!=null?a:"",...i})},c)})}),(s=t==null?void 0:t.fields)==null?void 0:s.slice(2).map((i,c)=>{var a;return(0,n.jsx)("div",{className:"my-3",children:i.type==="inputPassword"&&i.name?(0,n.jsx)(mt,{formFields:i,showPassword:e[i.name]||!1,togglePassword:()=>r(i.name)}):(0,n.jsx)(P.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:i==null?void 0:i.placeholder,required:i==null?void 0:i.isRequired,name:(a=i==null?void 0:i.name)!=null?a:"",items:i==null?void 0:i.items,type:i==null?void 0:i.type,...i})},c)})]})}function Rt({signInLink:t}){return t!=null&&t.label?(0,n.jsxs)("div",{className:"w-full text-center mt-3",children:[(0,n.jsx)("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),(0,n.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 mt({formFields:t,showPassword:e,togglePassword:r}){var p;return(0,n.jsxs)(R.Flex,{className:"relative",children:[(0,n.jsx)(m.Input,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(p=t==null?void 0:t.placeholder)!=null?p: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,n.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,n.jsx)(dt,{showPassword:e})})]})}function Ct({formLinks:t}){return t?(0,n.jsx)("p",{className:"mt-10 text-xs text-center text-gray-700",children:t==null?void 0:t.map((e,r,{length:p})=>(0,n.jsxs)("span",{children:[(0,n.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===p-1?null:r===p-2?(0,n.jsx)("span",{children:"\xA0and\xA0"}):(0,n.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function dt({showPassword:t}){return(0,n.jsx)(n.Fragment,{children:t?(0,n.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,n.jsxs)("g",{fill:"currentColor",children:[(0,n.jsx)("path",{P:"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,n.jsx)("path",{P:"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,n.jsx)("path",{P:"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,n.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,n.jsxs)("g",{fill:"currentColor",children:[(0,n.jsx)("path",{P:"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,n.jsx)("path",{P:"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,j,P,E,D,m,J,O,Q,X,n,F=o(()=>{"use strict";h=require("@stackshift-ui/button"),S=require("@stackshift-ui/container"),R=require("@stackshift-ui/flex"),j=require("@stackshift-ui/form"),P=require("@stackshift-ui/form-field"),E=require("@stackshift-ui/heading"),D=require("@stackshift-ui/image"),m=require("@stackshift-ui/input"),J=require("@stackshift-ui/link"),O=require("@stackshift-ui/section"),Q=require("@stackshift-ui/text"),X=G(require("react"));L();n=require("react/jsx-runtime")});var ct={};N(ct,{SigninSignup_B:()=>st,default:()=>st});function st({logo:t,form:e,formLinks:r,signInLink:p}){return(0,u.jsx)(O.Section,{className:"py-10 bg-primary lg:py-20",children:(0,u.jsx)(S.Container,{maxWidth:1280,children:(0,u.jsxs)(S.Container,{maxWidth:576,children:[(0,u.jsx)(zt,{logo:t}),(0,u.jsxs)(f.Card,{borderRadius:"md",className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[(0,u.jsx)(Bt,{form:e}),(0,u.jsx)(At,{form:e,signInLink:p})]}),(0,u.jsx)(Ut,{formLinks:r})]})})})}function zt({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 text-3xl font-bold leading-none text-white"})})}):null}function Bt({form:t}){return(0,u.jsxs)("div",{className:"mb-6",children:[(0,u.jsx)(Q.Text,{muted:!0,children:t==null?void 0:t.subtitle}),(0,u.jsx)(E.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name})]})}function At({form:t,signInLink:e}){var i;if(!(t!=null&&t.fields))return null;let[r,p]=g.default.useState({}),s=c=>{p(a=>({...a,[c]:!a[c]}))};return(0,u.jsxs)(j.Form,{id:(i=t==null?void 0:t.id)!=null?i:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:v(t==null?void 0:t.thankYouPage),children:[(0,u.jsx)(Mt,{form:t,showPassword:r,togglePasswordVisibility:s}),(0,u.jsx)("div",{children:(0,u.jsx)("div",{className:"webriq-recaptcha"})}),(0,u.jsxs)("div",{className:"text-center",children:[(0,u.jsx)(Tt,{form:t}),(0,u.jsx)(Yt,{signInLink:e})]})]})}function Mt({form:t,showPassword:e,togglePasswordVisibility:r}){var p,s,i,c;return(0,u.jsxs)(g.default.Fragment,{children:[(0,u.jsx)(R.Flex,{className:"flex-col lg:flex-row gap-3",children:(s=(p=t==null?void 0:t.fields)==null?void 0:p.slice(0,2))==null?void 0:s.map((a,l)=>{var b;return(0,u.jsx)("div",{className:"w-full",children:(0,u.jsx)(P.FormField,{noLabel:!0,variant:"secondary",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,name:(b=a==null?void 0:a.name)!=null?b:"",items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},l)})}),(c=(i=t==null?void 0:t.fields)==null?void 0:i.slice(2))==null?void 0:c.map((a,l)=>{var b;return(0,u.jsx)("div",{className:"my-3",children:(a==null?void 0:a.type)==="inputPassword"&&a.name?(0,u.jsx)(qt,{formFields:a,showPassword:e[a.name]||!1,togglePassword:()=>r(a.name)}):(0,u.jsx)(P.FormField,{noLabel:!0,variant:"secondary",name:(b=a==null?void 0:a.name)!=null?b:"",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})},l)})]})}function qt({formFields:t,showPassword:e,togglePassword:r}){var p;return(0,u.jsxs)("div",{className:"flex",children:[(0,u.jsx)(m.Input,{noLabel:!0,ariaLabel:(p=t==null?void 0:t.placeholder)!=null?p: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,u.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,u.jsx)(Vt,{showPassword:e})})]})}function Tt({form:t}){var e;return t!=null&&t.buttonLabel?(0,u.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 Yt({signInLink:t}){return t!=null&&t.label?(0,u.jsxs)("span",{className:"text-xs text-gray-900",children:[(0,u.jsx)("span",{children:"Already have an account?"})," ",(0,u.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 Ut({formLinks:t}){return t?(0,u.jsx)("p",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((e,r,{length:p})=>(0,u.jsxs)("span",{children:[(0,u.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===p-1?null:r===p-2?(0,u.jsx)("span",{children:"\xA0and\xA0"}):(0,u.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function Vt({showPassword:t}){return(0,u.jsx)(g.default.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",{P:"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",{P:"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",{P:"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",{P:"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",{P:"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,S,R,j,P,E,D,m,J,O,Q,g,u,bt=o(()=>{"use strict";y=require("@stackshift-ui/button"),f=require("@stackshift-ui/card"),g=G(require("react"));L();u=require("react/jsx-runtime")});var Ht={};N(Ht,{SigninSignup:()=>lt});module.exports=ot(Ht);var B=require("react"),xt=require("react/jsx-runtime"),z={variant_a:(0,B.lazy)(()=>Promise.resolve().then(()=>(F(),I))),variant_b:(0,B.lazy)(()=>Promise.resolve().then(()=>(bt(),ct)))},kt="SigninSignup",lt=({data:t})=>{var s,i,c,a,l,b,A,M,q,T,Y,U,V,k,H,W,_,K;let e=t==null?void 0:t.variant,r=e&&(z==null?void 0:z[e]),p={logo:(i=(s=t==null?void 0:t.variants)==null?void 0:s.logo)!=null?i:void 0,title:(a=(c=t==null?void 0:t.variants)==null?void 0:c.title)!=null?a:void 0,subtitle:(b=(l=t==null?void 0:t.variants)==null?void 0:l.subtitle)!=null?b:void 0,text:(M=(A=t==null?void 0:t.variants)==null?void 0:A.plainText)!=null?M:void 0,firstButton:(T=(q=t==null?void 0:t.variants)==null?void 0:q.primaryButton)!=null?T:void 0,secondButton:(U=(Y=t==null?void 0:t.variants)==null?void 0:Y.secondaryButton)!=null?U:void 0,formLinks:(k=(V=t==null?void 0:t.variants)==null?void 0:V.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 r?(0,xt.jsx)(r,{...p}):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-UALEHLFH.mjs";export{a as SigninSignup};
|
package/dist/signin_signup_a.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var q=Object.create;var b=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var Y=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var H=(t,n)=>{for(var u in n)b(t,u,{get:n[u],enumerable:!0})},L=(t,n,u,p)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of T(n))!m.call(t,r)&&r!==u&&b(t,r,{get:()=>n[r],enumerable:!(p=B(n,r))||p.enumerable});return t};var U=(t,n,u)=>(u=t!=null?q(Y(t)):{},L(n||!t||!t.__esModule?b(u,"default",{value:t,enumerable:!0}):u,t)),V=t=>L(b({},"__esModule",{value:!0}),t);var D={};H(D,{SigninSignup_A:()=>M,default:()=>M});module.exports=V(D);var i=require("@stackshift-ui/button"),h=require("@stackshift-ui/container"),y=require("@stackshift-ui/flex"),S=require("@stackshift-ui/form"),l=require("@stackshift-ui/form-field"),d=require("@stackshift-ui/heading"),g=require("@stackshift-ui/image"),w=require("@stackshift-ui/input"),z=require("@stackshift-ui/link"),A=require("@stackshift-ui/section"),C=require("@stackshift-ui/text"),R=U(require("react"));var x=t=>{var n,u,p;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(u=(n=t==null?void 0:t.internalLink)==null?void 0:n.toLowerCase())!=null&&u.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(p=t==null?void 0:t.externalLink)!=null?p:"/"},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 M({logo:t,form:n,formLinks:u,signInLink:p}){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,children:[(0,a.jsx)(W,{logo:t}),(0,a.jsxs)(h.Container,{className:"mb-6 text-center lg:mb-10",children:[(0,a.jsx)($,{form:n}),(0,a.jsx)(K,{form:n,signInLink:p,thankYouPage:P(n==null?void 0:n.thankYouPage)})]}),(0,a.jsx)(E,{formLinks:u})]})})}function W({logo:t}){var n;return t?(0,a.jsx)("div",{className:"mb-10",children:(0,a.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,a.jsx)(g.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 $({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)(d.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function K({form:t,signInLink:n,thankYouPage:u}){var c,s;if(!(t!=null&&t.fields))return null;let[p,r]=R.default.useState({}),e=v=>{r(N=>({...N,[v]:!N[v]}))};return(0,a.jsxs)(S.Form,{id:(c=t==null?void 0:t.id)!=null?c:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:u,children:[(0,a.jsx)(_,{form:t,showPasswords:p,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:(s=t==null?void 0:t.buttonLabel)!=null?s:"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)(j,{signInLink:n})]})}function _({form:t,showPasswords:n,togglePasswordVisibility:u}){var p,r;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y.Flex,{wrap:!0,className:"-mx-2",children:(p=t==null?void 0:t.fields)==null?void 0:p.slice(0,2).map((e,c)=>{var s;return(0,a.jsx)("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:e.type==="inputText"?(0,a.jsx)(w.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)(l.FormField,{textSize:"sm",noLabel:!0,name:(s=e==null?void 0:e.name)!=null?s:"",...e})},c)})}),(r=t==null?void 0:t.fields)==null?void 0:r.slice(2).map((e,c)=>{var s;return(0,a.jsx)("div",{className:"my-3",children:e.type==="inputPassword"&&e.name?(0,a.jsx)(k,{formFields:e,showPassword:n[e.name]||!1,togglePassword:()=>u(e.name)}):(0,a.jsx)(l.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:(s=e==null?void 0:e.name)!=null?s:"",items:e==null?void 0:e.items,type:e==null?void 0:e.type,...e})},c)})]})}function j({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 k({formFields:t,showPassword:n,togglePassword:u}){var p;return(0,a.jsxs)(y.Flex,{className:"relative",children:[(0,a.jsx)(w.Input,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(p=t==null?void 0:t.placeholder)!=null?p: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:u,children:(0,a.jsx)(G,{showPassword:n})})]})}function E({formLinks:t}){return t?(0,a.jsx)("p",{className:"mt-10 text-xs text-center text-gray-700",children:t==null?void 0:t.map((n,u,{length:p})=>(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}),u===p-1?null:u===p-2?(0,a.jsx)("span",{children:"\xA0and\xA0"}):(0,a.jsx)("span",{children:"\xA0,\xA0"})]},u))}):null}function G({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-GHFZYE3G.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 m=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?m(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:()=>z,default:()=>z});module.exports=$(O);var b=require("@stackshift-ui/button"),N=require("@stackshift-ui/card"),v=require("@stackshift-ui/container"),P=require("@stackshift-ui/flex"),g=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"),A=require("@stackshift-ui/section"),B=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 z({logo:t,form:n,formLinks:r,signInLink:u}){return(0,a.jsx)(A.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)(B.Text,{muted:!0,children:t==null?void 0:t.subtitle}),(0,a.jsx)(S.Heading,{className:"text-2xl 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)(g.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)(P.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-DOEKUPLG.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.5-beta.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -29,23 +29,23 @@
|
|
|
29
29
|
"typescript": "^5.6.2",
|
|
30
30
|
"vite-tsconfig-paths": "^5.0.1",
|
|
31
31
|
"vitest": "^2.1.1",
|
|
32
|
-
"@stackshift-ui/
|
|
33
|
-
"@stackshift-ui/
|
|
32
|
+
"@stackshift-ui/typescript-config": "6.0.2",
|
|
33
|
+
"@stackshift-ui/eslint-config": "6.0.2"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
37
|
"@stackshift-ui/card": "6.0.3",
|
|
38
|
+
"@stackshift-ui/button": "6.0.3",
|
|
38
39
|
"@stackshift-ui/scripts": "6.0.2",
|
|
39
40
|
"@stackshift-ui/heading": "6.0.3",
|
|
40
41
|
"@stackshift-ui/system": "6.0.3",
|
|
41
|
-
"@stackshift-ui/button": "6.0.3",
|
|
42
42
|
"@stackshift-ui/input": "6.0.4",
|
|
43
43
|
"@stackshift-ui/text": "6.0.3",
|
|
44
|
-
"@stackshift-ui/link": "6.0.3",
|
|
45
44
|
"@stackshift-ui/image": "6.0.3",
|
|
46
45
|
"@stackshift-ui/form": "6.0.3",
|
|
47
|
-
"@stackshift-ui/form-field": "6.0.4",
|
|
48
46
|
"@stackshift-ui/section": "6.0.3",
|
|
47
|
+
"@stackshift-ui/form-field": "6.0.5-beta.0",
|
|
48
|
+
"@stackshift-ui/link": "6.0.3",
|
|
49
49
|
"@stackshift-ui/flex": "6.0.3",
|
|
50
50
|
"@stackshift-ui/container": "6.0.3"
|
|
51
51
|
},
|
package/src/signin_signup_a.tsx
CHANGED
|
@@ -17,7 +17,7 @@ import { LabeledRoute, LabeledRouteWithKey, Logo, Form as iForm } from "./types"
|
|
|
17
17
|
|
|
18
18
|
export default function SigninSignup_A({ logo, form, formLinks, signInLink }: SignUpFormProps) {
|
|
19
19
|
return (
|
|
20
|
-
<Section className="py-10 bg-gray-50 lg:py-20">
|
|
20
|
+
<Section className="py-10 rounded-md bg-gray-50 lg:py-20">
|
|
21
21
|
<Container maxWidth={576}>
|
|
22
22
|
<LogoSection logo={logo} />
|
|
23
23
|
<Container className="mb-6 text-center lg:mb-10">
|
|
@@ -76,7 +76,14 @@ function SignupForm({
|
|
|
76
76
|
thankYouPage?: LabeledRoute;
|
|
77
77
|
}) {
|
|
78
78
|
if (!form?.fields) return null;
|
|
79
|
-
const [
|
|
79
|
+
const [showPasswords, setShowPasswords] = React.useState<{ [key: string]: boolean }>({});
|
|
80
|
+
|
|
81
|
+
const togglePasswordVisibility = (fieldName: string) => {
|
|
82
|
+
setShowPasswords(prev => ({
|
|
83
|
+
...prev,
|
|
84
|
+
[fieldName]: !prev[fieldName],
|
|
85
|
+
}));
|
|
86
|
+
};
|
|
80
87
|
|
|
81
88
|
return (
|
|
82
89
|
<Form
|
|
@@ -84,7 +91,11 @@ function SignupForm({
|
|
|
84
91
|
name="SignUp-VariantA-Form"
|
|
85
92
|
className="form-signup"
|
|
86
93
|
thankyouPage={thankYouPage}>
|
|
87
|
-
<FormFields
|
|
94
|
+
<FormFields
|
|
95
|
+
form={form}
|
|
96
|
+
showPasswords={showPasswords}
|
|
97
|
+
togglePasswordVisibility={togglePasswordVisibility}
|
|
98
|
+
/>
|
|
88
99
|
<div>
|
|
89
100
|
<div className="webriq-recaptcha" />
|
|
90
101
|
</div>
|
|
@@ -107,12 +118,12 @@ function SignupForm({
|
|
|
107
118
|
|
|
108
119
|
function FormFields({
|
|
109
120
|
form,
|
|
110
|
-
|
|
111
|
-
|
|
121
|
+
showPasswords,
|
|
122
|
+
togglePasswordVisibility,
|
|
112
123
|
}: {
|
|
113
124
|
form?: iForm;
|
|
114
|
-
|
|
115
|
-
|
|
125
|
+
showPasswords: { [key: string]: boolean };
|
|
126
|
+
togglePasswordVisibility: (fieldName: string) => void;
|
|
116
127
|
}) {
|
|
117
128
|
return (
|
|
118
129
|
<>
|
|
@@ -140,11 +151,11 @@ function FormFields({
|
|
|
140
151
|
</Flex>
|
|
141
152
|
{form?.fields?.slice(2).map((formFields, index) => (
|
|
142
153
|
<div key={index} className="my-3">
|
|
143
|
-
{formFields.type === "inputPassword" ? (
|
|
154
|
+
{formFields.type === "inputPassword" && formFields.name ? ( // Check if name exists
|
|
144
155
|
<PasswordField
|
|
145
156
|
formFields={formFields}
|
|
146
|
-
showPassword={
|
|
147
|
-
|
|
157
|
+
showPassword={showPasswords[formFields.name] || false}
|
|
158
|
+
togglePassword={() => togglePasswordVisibility(formFields.name!)}
|
|
148
159
|
/>
|
|
149
160
|
) : (
|
|
150
161
|
<FormField
|
|
@@ -187,11 +198,11 @@ function SignInLink({ signInLink }: { signInLink?: LabeledRoute }) {
|
|
|
187
198
|
function PasswordField({
|
|
188
199
|
formFields,
|
|
189
200
|
showPassword,
|
|
190
|
-
|
|
201
|
+
togglePassword,
|
|
191
202
|
}: {
|
|
192
203
|
formFields?: any;
|
|
193
204
|
showPassword: boolean;
|
|
194
|
-
|
|
205
|
+
togglePassword: () => void;
|
|
195
206
|
}) {
|
|
196
207
|
return (
|
|
197
208
|
<Flex className="relative">
|
|
@@ -212,7 +223,7 @@ function PasswordField({
|
|
|
212
223
|
ariaLabel={showPassword ? "Show password" : "Hide password"}
|
|
213
224
|
className="absolute top-0 right-0 h-full p-2"
|
|
214
225
|
type="button"
|
|
215
|
-
onClick={
|
|
226
|
+
onClick={togglePassword}>
|
|
216
227
|
<PasswordIcon showPassword={showPassword} />
|
|
217
228
|
</Button>
|
|
218
229
|
</Flex>
|
package/src/signin_signup_b.tsx
CHANGED
|
@@ -10,7 +10,7 @@ import { Input } from "@stackshift-ui/input";
|
|
|
10
10
|
import { Link } from "@stackshift-ui/link";
|
|
11
11
|
import { Section } from "@stackshift-ui/section";
|
|
12
12
|
import { Text } from "@stackshift-ui/text";
|
|
13
|
-
import React
|
|
13
|
+
import React from "react";
|
|
14
14
|
import { SignUpFormProps } from ".";
|
|
15
15
|
import { logoLink, thankYouPageLink } from "./helper";
|
|
16
16
|
import { LabeledRoute, Logo, Form as iForm } from "./types";
|
|
@@ -21,7 +21,7 @@ export default function SigninSignup_B({ logo, form, formLinks, signInLink }: Si
|
|
|
21
21
|
<Container maxWidth={1280}>
|
|
22
22
|
<Container maxWidth={576}>
|
|
23
23
|
<LogoSection logo={logo} />
|
|
24
|
-
<Card className="p-6 mb-6 bg-white lg:mb-10 lg:p-12">
|
|
24
|
+
<Card borderRadius="md" className="p-6 mb-6 bg-white lg:mb-10 lg:p-12">
|
|
25
25
|
<SubtitleAndHeadingText form={form} />
|
|
26
26
|
<SignupForm form={form} signInLink={signInLink} />
|
|
27
27
|
</Card>
|
|
@@ -66,7 +66,14 @@ function SubtitleAndHeadingText({ form }: { form?: iForm }) {
|
|
|
66
66
|
|
|
67
67
|
function SignupForm({ form, signInLink }: { form?: iForm; signInLink?: LabeledRoute }) {
|
|
68
68
|
if (!form?.fields) return null;
|
|
69
|
-
const [
|
|
69
|
+
const [showPasswords, setShowPasswords] = React.useState<{ [key: string]: boolean }>({});
|
|
70
|
+
|
|
71
|
+
const togglePasswordVisibility = (fieldName: string) => {
|
|
72
|
+
setShowPasswords(prev => ({
|
|
73
|
+
...prev,
|
|
74
|
+
[fieldName]: !prev[fieldName],
|
|
75
|
+
}));
|
|
76
|
+
};
|
|
70
77
|
|
|
71
78
|
return (
|
|
72
79
|
<Form
|
|
@@ -74,7 +81,11 @@ function SignupForm({ form, signInLink }: { form?: iForm; signInLink?: LabeledRo
|
|
|
74
81
|
name="SignUp-VariantB-Form"
|
|
75
82
|
className="form-signup"
|
|
76
83
|
thankyouPage={thankYouPageLink(form?.thankYouPage)}>
|
|
77
|
-
<FormFields
|
|
84
|
+
<FormFields
|
|
85
|
+
form={form}
|
|
86
|
+
showPassword={showPasswords}
|
|
87
|
+
togglePasswordVisibility={togglePasswordVisibility}
|
|
88
|
+
/>
|
|
78
89
|
<div>
|
|
79
90
|
<div className="webriq-recaptcha" />
|
|
80
91
|
</div>
|
|
@@ -89,11 +100,11 @@ function SignupForm({ form, signInLink }: { form?: iForm; signInLink?: LabeledRo
|
|
|
89
100
|
function FormFields({
|
|
90
101
|
form,
|
|
91
102
|
showPassword,
|
|
92
|
-
|
|
103
|
+
togglePasswordVisibility,
|
|
93
104
|
}: {
|
|
94
105
|
form?: iForm;
|
|
95
|
-
showPassword: boolean;
|
|
96
|
-
|
|
106
|
+
showPassword: { [key: string]: boolean };
|
|
107
|
+
togglePasswordVisibility: (fieldName: string) => void;
|
|
97
108
|
}) {
|
|
98
109
|
return (
|
|
99
110
|
<React.Fragment>
|
|
@@ -116,28 +127,12 @@ function FormFields({
|
|
|
116
127
|
|
|
117
128
|
{form?.fields?.slice(2)?.map((formFields, index) => (
|
|
118
129
|
<div key={index} className="my-3">
|
|
119
|
-
{formFields?.type === "inputPassword" ? (
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
type={showPassword ? "text" : "password"}
|
|
126
|
-
placeholder={formFields?.placeholder}
|
|
127
|
-
name={formFields?.name}
|
|
128
|
-
required={formFields?.isRequired}
|
|
129
|
-
/>
|
|
130
|
-
{/* SVG icon on the right of the password input field */}
|
|
131
|
-
<Button
|
|
132
|
-
variant="unstyled"
|
|
133
|
-
as="button"
|
|
134
|
-
ariaLabel={showPassword ? "Show password" : "Hide password"}
|
|
135
|
-
className="focus:outline-none mr-4"
|
|
136
|
-
type="button"
|
|
137
|
-
onClick={() => setShowPassword(!showPassword)}>
|
|
138
|
-
<PasswordIcon showPassword={showPassword} />
|
|
139
|
-
</Button>
|
|
140
|
-
</div>
|
|
130
|
+
{formFields?.type === "inputPassword" && formFields.name ? (
|
|
131
|
+
<PasswordField
|
|
132
|
+
formFields={formFields}
|
|
133
|
+
showPassword={showPassword[formFields.name] || false}
|
|
134
|
+
togglePassword={() => togglePasswordVisibility(formFields.name!)}
|
|
135
|
+
/>
|
|
141
136
|
) : (
|
|
142
137
|
<FormField
|
|
143
138
|
noLabel
|
|
@@ -156,6 +151,40 @@ function FormFields({
|
|
|
156
151
|
);
|
|
157
152
|
}
|
|
158
153
|
|
|
154
|
+
function PasswordField({
|
|
155
|
+
formFields,
|
|
156
|
+
showPassword,
|
|
157
|
+
togglePassword,
|
|
158
|
+
}: {
|
|
159
|
+
formFields?: any;
|
|
160
|
+
showPassword: boolean;
|
|
161
|
+
togglePassword: () => void;
|
|
162
|
+
}) {
|
|
163
|
+
return (
|
|
164
|
+
<div className="flex">
|
|
165
|
+
<Input
|
|
166
|
+
noLabel
|
|
167
|
+
ariaLabel={formFields?.placeholder ?? formFields?.name}
|
|
168
|
+
variant="secondary"
|
|
169
|
+
type={showPassword ? "text" : "password"}
|
|
170
|
+
placeholder={formFields?.placeholder}
|
|
171
|
+
name={formFields?.name}
|
|
172
|
+
required={formFields?.isRequired}
|
|
173
|
+
/>
|
|
174
|
+
{/* SVG icon on the right of the password input field */}
|
|
175
|
+
<Button
|
|
176
|
+
variant="unstyled"
|
|
177
|
+
as="button"
|
|
178
|
+
ariaLabel={showPassword ? "Show password" : "Hide password"}
|
|
179
|
+
className="focus:outline-none mr-4"
|
|
180
|
+
type="button"
|
|
181
|
+
onClick={togglePassword}>
|
|
182
|
+
<PasswordIcon showPassword={showPassword} />
|
|
183
|
+
</Button>
|
|
184
|
+
</div>
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
159
188
|
function FormButtonLabel({ form }: { form?: iForm }) {
|
|
160
189
|
if (!form?.buttonLabel) return null;
|
|
161
190
|
|
|
@@ -220,7 +249,7 @@ function PasswordIcon({ showPassword }: { showPassword: boolean }) {
|
|
|
220
249
|
<React.Fragment>
|
|
221
250
|
{showPassword ? (
|
|
222
251
|
<svg
|
|
223
|
-
className="w-5 h-5 my-auto text-gray-500"
|
|
252
|
+
className="w-5 h-5 my-auto ml-4 text-gray-500"
|
|
224
253
|
xmlns="http://www.w3.org/2000/svg"
|
|
225
254
|
aria-hidden="true"
|
|
226
255
|
role="img"
|
package/dist/chunk-2B4CU465.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as b,b as h}from"./chunk-4DDN6JI4.mjs";import{Button as r}from"@stackshift-ui/button";import{Container as x}from"@stackshift-ui/container";import{Flex as y}from"@stackshift-ui/flex";import{Form as g}from"@stackshift-ui/form";import{FormField as w}from"@stackshift-ui/form-field";import{Heading as N}from"@stackshift-ui/heading";import{Image as P}from"@stackshift-ui/image";import{Input as v}from"@stackshift-ui/input";import{Link as R}from"@stackshift-ui/link";import{Section as d}from"@stackshift-ui/section";import{Text as o}from"@stackshift-ui/text";import A from"react";import{Fragment as S,jsx as e,jsxs as c}from"react/jsx-runtime";function z({logo:a,form:n,formLinks:u,signInLink:p}){return e(d,{className:"py-10 bg-gray-50 lg:py-20",children:c(x,{maxWidth:576,children:[e(L,{logo:a}),c(x,{className:"mb-6 text-center lg:mb-10",children:[e(C,{form:n}),e(M,{form:n,signInLink:p,thankYouPage:h(n==null?void 0:n.thankYouPage)})]}),e(Y,{formLinks:u})]})})}function L({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(P,{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 C({form:a}){return c("div",{className:"mb-6",children:[a!=null&&a.subtitle?e(o,{muted:!0,children:a==null?void 0:a.subtitle}):null,a!=null&&a.name?e(N,{className:"text-2xl lg:text-2xl",children:a==null?void 0:a.name}):null]})}function M({form:a,signInLink:n,thankYouPage:u}){var t,s;if(!(a!=null&&a.fields))return null;let[p,i]=A.useState(!1);return c(g,{id:(t=a==null?void 0:a.id)!=null?t:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:u,children:[e(q,{form:a,showPassword:p,setShowPassword:i}),e("div",{children:e("div",{className:"webriq-recaptcha"})}),e("div",{className:"text-center",children:(a==null?void 0:a.buttonLabel)&&e(r,{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(B,{signInLink:n})]})}function q({form:a,showPassword:n,setShowPassword:u}){var p,i;return c(S,{children:[e(y,{wrap:!0,className:"-mx-2",children:(p=a==null?void 0:a.fields)==null?void 0:p.slice(0,2).map((t,s)=>{var l;return e("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:t.type==="inputText"?e(v,{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(w,{textSize:"sm",noLabel:!0,name:(l=t==null?void 0:t.name)!=null?l:"",...t})},s)})}),(i=a==null?void 0:a.fields)==null?void 0:i.slice(2).map((t,s)=>{var l;return e("div",{className:"my-3",children:t.type==="inputPassword"?e(T,{formFields:t,showPassword:n,setShowPassword:u}):e(w,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,name:(l=t==null?void 0:t.name)!=null?l:"",items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},s)})]})}function B({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(r,{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 T({formFields:a,showPassword:n,setShowPassword:u}){var p;return c(y,{className:"relative",children:[e(v,{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(r,{as:"button",variant:"unstyled",ariaLabel:n?"Show password":"Hide password",className:"absolute top-0 right-0 h-full p-2",type:"button",onClick:()=>u(!n),children:e(H,{showPassword:n})})]})}function Y({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(r,{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 H({showPassword:a}){return e(S,{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{z as a};
|
package/dist/chunk-H22IRLD6.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i,b as v}from"./chunk-4DDN6JI4.mjs";import{Button as s}from"@stackshift-ui/button";import{Card as S}from"@stackshift-ui/card";import{Container as y}from"@stackshift-ui/container";import{Flex as o}from"@stackshift-ui/flex";import{Form as R}from"@stackshift-ui/form";import{FormField as g}from"@stackshift-ui/form-field";import{Heading as C}from"@stackshift-ui/heading";import{Image as d}from"@stackshift-ui/image";import{Input as P}from"@stackshift-ui/input";import{Link as A}from"@stackshift-ui/link";import{Section as L}from"@stackshift-ui/section";import{Text as M}from"@stackshift-ui/text";import N,{useState as B}from"react";import{jsx as e,jsxs as p}from"react/jsx-runtime";function z({logo:a,form:n,formLinks:u,signInLink:c}){return e(L,{className:"py-10 bg-primary lg:py-20",children:e(y,{maxWidth:1280,children:p(y,{maxWidth:576,children:[e(q,{logo:a}),p(S,{className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[e(T,{form:n}),e(H,{form:n,signInLink:c})]}),e(_,{formLinks:u})]})})})}function q({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(d,{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 T({form:a}){return p("div",{className:"mb-6",children:[e(M,{muted:!0,children:a==null?void 0:a.subtitle}),e(C,{className:"text-2xl lg:text-2xl",children:a==null?void 0:a.name})]})}function H({form:a,signInLink:n}){var r;if(!(a!=null&&a.fields))return null;let[u,c]=B(!1);return p(R,{id:(r=a==null?void 0:a.id)!=null?r:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:v(a==null?void 0:a.thankYouPage),children:[e(U,{form:a,showPassword:u,setShowPassword:c}),e("div",{children:e("div",{className:"webriq-recaptcha"})}),p("div",{className:"text-center",children:[e(Y,{form:a}),e(W,{signInLink:n})]})]})}function U({form:a,showPassword:n,setShowPassword:u}){var c,r,h,x;return p(N.Fragment,{children:[e(o,{className:"flex-col lg:flex-row gap-3",children:(r=(c=a==null?void 0:a.fields)==null?void 0:c.slice(0,2))==null?void 0:r.map((t,l)=>{var b;return e("div",{className:"w-full",children:e(g,{noLabel:!0,variant:"secondary",placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,name:(b=t==null?void 0:t.name)!=null?b:"",items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},l)})}),(x=(h=a==null?void 0:a.fields)==null?void 0:h.slice(2))==null?void 0:x.map((t,l)=>{var b,w;return e("div",{className:"my-3",children:(t==null?void 0:t.type)==="inputPassword"?p("div",{className:"flex",children:[e(P,{noLabel:!0,ariaLabel:(b=t==null?void 0:t.placeholder)!=null?b: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}),e(s,{variant:"unstyled",as:"button",ariaLabel:n?"Show password":"Hide password",className:"focus:outline-none mr-4",type:"button",onClick:()=>u(!n),children:e(j,{showPassword:n})})]}):e(g,{noLabel:!0,variant:"secondary",name:(w=t==null?void 0:t.name)!=null?w:"",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)})]})}function Y({form:a}){var n;return a!=null&&a.buttonLabel?e(s,{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 W({signInLink:a}){return a!=null&&a.label?p("span",{className:"text-xs text-gray-900",children:[e("span",{children:"Already have an account?"})," ",e(s,{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 _({formLinks:a}){return a?e("p",{className:"text-xs text-center text-secondary-foreground",children:a==null?void 0:a.map((n,u,{length:c})=>p("span",{children:[e(s,{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}),u===c-1?null:u===c-2?e("span",{children:"\xA0and\xA0"}):e("span",{children:"\xA0,\xA0"})]},u))}):null}function j({showPassword:a}){return e(N.Fragment,{children:a?e("svg",{className:"w-5 h-5 my-auto 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:p("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:p("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{z as a};
|
|
File without changes
|