@stackshift-ui/signin-signup 1.0.0 → 6.0.3
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-2B4CU465.mjs +1 -0
- package/dist/chunk-H22IRLD6.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 +17 -17
- package/dist/chunk-32ATTMKN.mjs +0 -1
- package/dist/chunk-MBEAJPNQ.mjs +0 -1
- /package/dist/{chunk-TUQB6PIH.mjs → chunk-FNVCKDMO.mjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
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 o=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(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)),gt=t=>E(S({},"__esModule",{value:!0}),t);var l,g,L=o(()=>{"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:"/"},g=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:()=>A,default:()=>A});function A({logo:t,form:e,formLinks:r,signInLink:c}){return(0,n.jsx)(f.Section,{className:"py-10 bg-gray-50 lg:py-20",children:(0,n.jsxs)(P.Container,{maxWidth:576,children:[(0,n.jsx)(ot,{logo:t}),(0,n.jsxs)(P.Container,{className:"mb-6 text-center lg:mb-10",children:[(0,n.jsx)(Nt,{form:e}),(0,n.jsx)(Lt,{form:e,signInLink:c,thankYouPage:g(e==null?void 0:e.thankYouPage)})]}),(0,n.jsx)(Ct,{formLinks:r})]})})}function ot({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)(I.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 Nt({form:t}){return(0,n.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,n.jsx)(X.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 Lt({form:t,signInLink:e,thankYouPage:r}){var p,s;if(!(t!=null&&t.fields))return null;let[c,i]=O.default.useState(!1);return(0,n.jsxs)(F.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)(m.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)(R.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)(R.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)(C.Flex,{className:"relative bg-gray-100 rounded",children:[(0,n.jsx)(m.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 O,y,Q,m,X,Z,I,F,R,f,P,C,n,z=o(()=>{"use strict";O=J(require("react")),y=require("@stackshift-ui/button"),Q=require("@stackshift-ui/heading"),m=require("@stackshift-ui/input"),X=require("@stackshift-ui/text"),Z=require("@stackshift-ui/link"),I=require("@stackshift-ui/image"),F=require("@stackshift-ui/form"),R=require("@stackshift-ui/form-field"),f=require("@stackshift-ui/section"),P=require("@stackshift-ui/container"),C=require("@stackshift-ui/flex");L();n=require("react/jsx-runtime")});var bt={};N(bt,{SigninSignup_B:()=>q,default:()=>q});function q({logo:t,form:e,formLinks:r,signInLink:c}){return(0,u.jsx)(f.Section,{className:"py-10 bg-primary lg:py-20",children:(0,u.jsx)(P.Container,{maxWidth:1280,children:(0,u.jsxs)(P.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)(Yt,{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)(I.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)(X.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,w.useState)(!1);return(0,u.jsxs)(F.Form,{id:(i=t==null?void 0:t.id)!=null?i:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:g(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)(dt,{signInLink:e})]})]})}function qt({form:t,showPassword:e,setShowPassword:r}){var c,i,p,s;return(0,u.jsxs)(w.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)(R.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 bg-gray-100 rounded",children:[(0,u.jsx)(m.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)(y.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)(Ut,{showPassword:e})})]}):(0,u.jsx)(R.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)(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 dt({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 Yt({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)(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===c-1?null:r===c-2?(0,u.jsx)("span",{children:"\xA0and\xA0"}):(0,u.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function Ut({showPassword:t}){return(0,u.jsx)(w.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,y,et,Q,m,X,Z,I,F,R,f,P,C,u,T=o(()=>{"use strict";w=J(require("react")),et=require("@stackshift-ui/card");L();u=require("react/jsx-runtime")});var Wt={};N(Wt,{SigninSignup:()=>lt,SigninSignup_A:()=>A,SigninSignup_B:()=>q});module.exports=gt(Wt);var Y=require("react"),xt=require("react/jsx-runtime"),d={variant_a:(0,Y.lazy)(()=>Promise.resolve().then(()=>(z(),tt))),variant_b:(0,Y.lazy)(()=>Promise.resolve().then(()=>(T(),bt)))},Ht="SigninSignup",lt=({data:t})=>{var i,p,s,a,x,b,h,U,H,W,_,k,K,$,D,V,G,j;let e=t==null?void 0:t.variant,r=e&&(d==null?void 0:d[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:(U=(h=t==null?void 0:t.variants)==null?void 0:h.plainText)!=null?U: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 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});
|
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-FNVCKDMO.mjs";import{a as o}from"./chunk-2B4CU465.mjs";import{a as r}from"./chunk-H22IRLD6.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 N=(t,e)=>()=>(t&&(e=t(t=0)),e);var L=(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)),gt=t=>D(S({},"__esModule",{value:!0}),t);var l,g,o=N(()=>{"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:"/"},g=t=>t?(t==null?void 0:t.linkType)==="linkInternal"?`/${t==null?void 0:t.internalLink}`:t==null?void 0:t.externalLink:"/thank-you"});var I={};L(I,{SigninSignup_A:()=>Z,default:()=>Z});function Z({logo:t,form:e,formLinks:r,signInLink:c}){return(0,n.jsx)(X.Section,{className:"py-10 bg-gray-50 lg:py-20",children:(0,n.jsxs)(P.Container,{maxWidth:576,children:[(0,n.jsx)(Nt,{logo:t}),(0,n.jsxs)(P.Container,{className:"mb-6 text-center lg:mb-10",children:[(0,n.jsx)(Lt,{form:e}),(0,n.jsx)(ot,{form:e,signInLink:c,thankYouPage:g(e==null?void 0:e.thankYouPage)})]}),(0,n.jsx)(At,{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 ${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)(O.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)(E.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]=G.default.useState(!1);return(0,n.jsxs)(Q.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)(A.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)(R.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)(R.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)(A.Flex,{className:"relative bg-gray-100 rounded",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)(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 G,y,j,C,E,J,O,Q,R,X,P,A,n,F=N(()=>{"use strict";G=V(require("react")),y=require("@stackshift-ui/button"),j=require("@stackshift-ui/heading"),C=require("@stackshift-ui/input"),E=require("@stackshift-ui/text"),J=require("@stackshift-ui/link"),O=require("@stackshift-ui/image"),Q=require("@stackshift-ui/form"),R=require("@stackshift-ui/form-field"),X=require("@stackshift-ui/section"),P=require("@stackshift-ui/container"),A=require("@stackshift-ui/flex");o();n=require("react/jsx-runtime")});var st={};L(st,{SigninSignup_B:()=>it,default:()=>it});function it({logo:t,form:e,formLinks:r,signInLink:c}){return(0,u.jsx)(X.Section,{className:"py-10 bg-primary lg:py-20",children:(0,u.jsx)(P.Container,{maxWidth:1280,children:(0,u.jsxs)(P.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)(Yt,{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)(O.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)(E.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,w.useState)(!1);return(0,u.jsxs)(Q.Form,{id:(i=t==null?void 0:t.id)!=null?i:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:g(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)(dt,{signInLink:e})]})]})}function qt({form:t,showPassword:e,setShowPassword:r}){var c,i,p,s;return(0,u.jsxs)(w.default.Fragment,{children:[(0,u.jsx)(A.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)(R.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 bg-gray-100 rounded",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)(y.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)(Ut,{showPassword:e})})]}):(0,u.jsx)(R.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)(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 dt({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 Yt({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)(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===c-1?null:r===c-2?(0,u.jsx)("span",{children:"\xA0and\xA0"}):(0,u.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function Ut({showPassword:t}){return(0,u.jsx)(w.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,y,f,j,C,E,J,O,Q,R,X,P,A,u,bt=N(()=>{"use strict";w=V(require("react")),f=require("@stackshift-ui/card");o();u=require("react/jsx-runtime")});var Wt={};L(Wt,{SigninSignup:()=>lt});module.exports=gt(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,d,Y,U,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:(d=(T=t==null?void 0:t.variants)==null?void 0:T.primaryButton)!=null?d:void 0,secondButton:(U=(Y=t==null?void 0:t.variants)==null?void 0:Y.secondaryButton)!=null?U: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 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});
|
package/dist/signin-signup.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-FNVCKDMO.mjs";export{a as SigninSignup};
|
package/dist/signin_signup_a.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var M=Object.create;var b=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var u in e)b(t,u,{get:e[u],enumerable:!0})},v=(t,e,u,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of B(e))!Y.call(t,c)&&c!==u&&b(t,c,{get:()=>e[c],enumerable:!(p=q(e,c))||p.enumerable});return t};var H=(t,e,u)=>(u=t!=null?M(T(t)):{},v(e||!t||!t.__esModule?b(u,"default",{value:t,enumerable:!0}):u,t)),U=t=>v(b({},"__esModule",{value:!0}),t);var G={};m(G,{SigninSignup_A:()=>C,default:()=>C});module.exports=U(G);var
|
|
1
|
+
"use strict";var M=Object.create;var b=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var u in e)b(t,u,{get:e[u],enumerable:!0})},v=(t,e,u,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of B(e))!Y.call(t,c)&&c!==u&&b(t,c,{get:()=>e[c],enumerable:!(p=q(e,c))||p.enumerable});return t};var H=(t,e,u)=>(u=t!=null?M(T(t)):{},v(e||!t||!t.__esModule?b(u,"default",{value:t,enumerable:!0}):u,t)),U=t=>v(b({},"__esModule",{value:!0}),t);var G={};m(G,{SigninSignup_A:()=>C,default:()=>C});module.exports=U(G);var i=require("@stackshift-ui/button"),h=require("@stackshift-ui/container"),l=require("@stackshift-ui/flex"),N=require("@stackshift-ui/form"),w=require("@stackshift-ui/form-field"),L=require("@stackshift-ui/heading"),P=require("@stackshift-ui/image"),y=require("@stackshift-ui/input"),d=require("@stackshift-ui/link"),R=require("@stackshift-ui/section"),A=require("@stackshift-ui/text"),z=H(require("react"));var x=t=>{var e,u,p;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(u=(e=t==null?void 0:t.internalLink)==null?void 0:e.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:"/"},S=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 C({logo:t,form:e,formLinks:u,signInLink:p}){return(0,a.jsx)(R.Section,{className:"py-10 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:e}),(0,a.jsx)(D,{form:e,signInLink:p,thankYouPage:S(e==null?void 0:e.thankYouPage)})]}),(0,a.jsx)(j,{formLinks:u})]})})}function W({logo:t}){var e;return t?(0,a.jsx)("div",{className:"mb-10",children:(0,a.jsx)(d.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)(P.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 $({form:t}){return(0,a.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,a.jsx)(A.Text,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?(0,a.jsx)(L.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function D({form:t,signInLink:e,thankYouPage:u}){var n,r;if(!(t!=null&&t.fields))return null;let[p,c]=z.default.useState(!1);return(0,a.jsxs)(N.Form,{id:(n=t==null?void 0:t.id)!=null?n:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:u,children:[(0,a.jsx)(K,{form:t,showPassword:p,setShowPassword:c}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"webriq-recaptcha"})}),(0,a.jsx)("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&(0,a.jsx)(i.Button,{as:"button",variant:"custom",ariaLabel:(r=t==null?void 0:t.buttonLabel)!=null?r:"Sign Up form submit button",className:"w-full py-4 text-sm font-bold tex-gray-50",type:"submit",children:t==null?void 0:t.buttonLabel})}),e&&(0,a.jsx)(_,{signInLink:e})]})}function K({form:t,showPassword:e,setShowPassword:u}){var p,c;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.Flex,{wrap:!0,className:"-mx-2",children:(p=t==null?void 0:t.fields)==null?void 0:p.slice(0,2).map((n,r)=>{var s;return(0,a.jsx)("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:n.type==="inputText"?(0,a.jsx)(y.Input,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:n==null?void 0:n.placeholder,required:n==null?void 0:n.isRequired,className:"w-full py-4 text-xs bg-white",name:n==null?void 0:n.name,ariaLabel:n==null?void 0:n.label,...n,type:"text"}):(0,a.jsx)(w.FormField,{textSize:"sm",noLabel:!0,name:(s=n==null?void 0:n.name)!=null?s:"",...n})},r)})}),(c=t==null?void 0:t.fields)==null?void 0:c.slice(2).map((n,r)=>{var s;return(0,a.jsx)("div",{className:"my-3",children:n.type==="inputPassword"?(0,a.jsx)(g,{formFields:n,showPassword:e,setShowPassword:u}):(0,a.jsx)(w.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:n==null?void 0:n.placeholder,required:n==null?void 0:n.isRequired,name:(s=n==null?void 0:n.name)!=null?s:"",items:n==null?void 0:n.items,type:n==null?void 0:n.type,...n})},r)})]})}function _({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 g({formFields:t,showPassword:e,setShowPassword:u}){var p;return(0,a.jsxs)(l.Flex,{className:"relative",children:[(0,a.jsx)(y.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,a.jsx)(i.Button,{as:"button",variant:"unstyled",ariaLabel:e?"Show password":"Hide password",className:"absolute top-0 right-0 h-full p-2",type:"button",onClick:()=>u(!e),children:(0,a.jsx)(E,{showPassword:e})})]})}function j({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((e,u,{length:p})=>(0,a.jsxs)("span",{children:[(0,a.jsx)(i.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}),u===p-1?null:u===p-2?(0,a.jsx)("span",{children:"\xA0and\xA0"}):(0,a.jsx)("span",{children:"\xA0,\xA0"})]},u))}):null}function E({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-2B4CU465.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 g=Object.create;var b=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var $=(t,n)=>{for(var u in n)b(t,u,{get:n[u],enumerable:!0})},N=(t,n,u,p)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of m(n))!U.call(t,r)&&r!==u&&b(t,r,{get:()=>n[r],enumerable:!(p=Y(n,r))||p.enumerable});return t};var W=(t,n,u)=>(u=t!=null?g(H(t)):{},N(n||!t||!t.__esModule?b(u,"default",{value:t,enumerable:!0}):u,t)),_=t=>N(b({},"__esModule",{value:!0}),t);var Q={};$(Q,{SigninSignup_B:()=>T,default:()=>T});module.exports=_(Q);var i=require("@stackshift-ui/button"),C=require("@stackshift-ui/card"),w=require("@stackshift-ui/container"),R=require("@stackshift-ui/flex"),d=require("@stackshift-ui/form"),y=require("@stackshift-ui/form-field"),P=require("@stackshift-ui/heading"),A=require("@stackshift-ui/image"),M=require("@stackshift-ui/input"),B=require("@stackshift-ui/link"),z=require("@stackshift-ui/section"),q=require("@stackshift-ui/text"),s=W(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:"/"},S=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 T({logo:t,form:n,formLinks:u,signInLink:p}){return(0,a.jsx)(z.Section,{className:"py-10 bg-primary lg:py-20",children:(0,a.jsx)(w.Container,{maxWidth:1280,children:(0,a.jsxs)(w.Container,{maxWidth:576,children:[(0,a.jsx)(j,{logo:t}),(0,a.jsxs)(C.Card,{className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[(0,a.jsx)(D,{form:n}),(0,a.jsx)(E,{form:n,signInLink:p})]}),(0,a.jsx)(K,{formLinks:u})]})})})}function j({logo:t}){var n;return t?(0,a.jsx)("div",{className:"mb-10",children:(0,a.jsx)(B.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)(A.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 D({form:t}){return(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)(q.Text,{muted:!0,children:t==null?void 0:t.subtitle}),(0,a.jsx)(P.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name})]})}function E({form:t,signInLink:n}){var r;if(!(t!=null&&t.fields))return null;let[u,p]=(0,s.useState)(!1);return(0,a.jsxs)(d.Form,{id:(r=t==null?void 0:t.id)!=null?r:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:S(t==null?void 0:t.thankYouPage),children:[(0,a.jsx)(G,{form:t,showPassword:u,setShowPassword:p}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"webriq-recaptcha"})}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(V,{form:t}),(0,a.jsx)(J,{signInLink:n})]})]})}function G({form:t,showPassword:n,setShowPassword:u}){var p,r,v,L;return(0,a.jsxs)(s.default.Fragment,{children:[(0,a.jsx)(R.Flex,{className:"flex-col lg:flex-row gap-3",children:(r=(p=t==null?void 0:t.fields)==null?void 0:p.slice(0,2))==null?void 0:r.map((e,h)=>{var c;return(0,a.jsx)("div",{className:"w-full",children:(0,a.jsx)(y.FormField,{noLabel:!0,variant:"secondary",placeholder:e==null?void 0:e.placeholder,required:e==null?void 0:e.isRequired,name:(c=e==null?void 0:e.name)!=null?c:"",items:e==null?void 0:e.items,type:e==null?void 0:e.type,...e})},h)})}),(L=(v=t==null?void 0:t.fields)==null?void 0:v.slice(2))==null?void 0:L.map((e,h)=>{var c,l;return(0,a.jsx)("div",{className:"my-3",children:(e==null?void 0:e.type)==="inputPassword"?(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)(M.Input,{noLabel:!0,ariaLabel:(c=e==null?void 0:e.placeholder)!=null?c:e==null?void 0:e.name,variant:"secondary",type:n?"text":"password",placeholder:e==null?void 0:e.placeholder,name:e==null?void 0:e.name,required:e==null?void 0:e.isRequired}),(0,a.jsx)(i.Button,{variant:"unstyled",as:"button",ariaLabel:n?"Show password":"Hide password",className:"focus:outline-none mr-4",type:"button",onClick:()=>u(!n),children:(0,a.jsx)(O,{showPassword:n})})]}):(0,a.jsx)(y.FormField,{noLabel:!0,variant:"secondary",name:(l=e==null?void 0:e.name)!=null?l:"",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})},h)})]})}function V({form:t}){var n;return t!=null&&t.buttonLabel?(0,a.jsx)(i.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 J({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)(i.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 K({formLinks:t}){return t?(0,a.jsx)("p",{className:"text-xs text-center text-secondary-foreground",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 underline text-secondary-foreground hover:text-gray-50",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 O({showPassword:t}){return(0,a.jsx)(s.default.Fragment,{children:t?(0,a.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,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-H22IRLD6.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": "
|
|
4
|
+
"version": "6.0.3",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -28,25 +28,25 @@
|
|
|
28
28
|
"typescript": "^5.6.2",
|
|
29
29
|
"vite-tsconfig-paths": "^5.0.1",
|
|
30
30
|
"vitest": "^2.1.1",
|
|
31
|
-
"@stackshift-ui/eslint-config": "
|
|
32
|
-
"@stackshift-ui/typescript-config": "
|
|
31
|
+
"@stackshift-ui/eslint-config": "6.0.2",
|
|
32
|
+
"@stackshift-ui/typescript-config": "6.0.2"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"classnames": "^2.5.1",
|
|
36
|
-
"@stackshift-ui/scripts": "
|
|
37
|
-
"@stackshift-ui/
|
|
38
|
-
"@stackshift-ui/
|
|
39
|
-
"@stackshift-ui/
|
|
40
|
-
"@stackshift-ui/
|
|
41
|
-
"@stackshift-ui/input": "
|
|
42
|
-
"@stackshift-ui/
|
|
43
|
-
"@stackshift-ui/
|
|
44
|
-
"@stackshift-ui/
|
|
45
|
-
"@stackshift-ui/
|
|
46
|
-
"@stackshift-ui/
|
|
47
|
-
"@stackshift-ui/
|
|
48
|
-
"@stackshift-ui/
|
|
49
|
-
"@stackshift-ui/
|
|
36
|
+
"@stackshift-ui/scripts": "6.0.2",
|
|
37
|
+
"@stackshift-ui/button": "6.0.2",
|
|
38
|
+
"@stackshift-ui/card": "6.0.2",
|
|
39
|
+
"@stackshift-ui/heading": "6.0.2",
|
|
40
|
+
"@stackshift-ui/system": "6.0.2",
|
|
41
|
+
"@stackshift-ui/input": "6.0.3",
|
|
42
|
+
"@stackshift-ui/text": "6.0.2",
|
|
43
|
+
"@stackshift-ui/link": "6.0.2",
|
|
44
|
+
"@stackshift-ui/image": "6.0.2",
|
|
45
|
+
"@stackshift-ui/form": "6.0.2",
|
|
46
|
+
"@stackshift-ui/form-field": "6.0.3",
|
|
47
|
+
"@stackshift-ui/container": "6.0.2",
|
|
48
|
+
"@stackshift-ui/section": "6.0.2",
|
|
49
|
+
"@stackshift-ui/flex": "6.0.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@types/react": "16.8 - 19",
|
package/dist/chunk-32ATTMKN.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i,b as v}from"./chunk-4DDN6JI4.mjs";import N,{useState as S}from"react";import{Button as s}from"@stackshift-ui/button";import{Card as o}from"@stackshift-ui/card";import{Heading as d}from"@stackshift-ui/heading";import{Input as R}from"@stackshift-ui/input";import{Text as C}from"@stackshift-ui/text";import{Link as P}from"@stackshift-ui/link";import{Image as A}from"@stackshift-ui/image";import{Form as L}from"@stackshift-ui/form";import{FormField as y}from"@stackshift-ui/form-field";import{Section as M}from"@stackshift-ui/section";import{Container as g}from"@stackshift-ui/container";import{Flex as B}from"@stackshift-ui/flex";import{jsx as e,jsxs as p}from"react/jsx-runtime";function z({logo:a,form:n,formLinks:u,signInLink:c}){return e(M,{className:"py-10 bg-primary lg:py-20",children:e(g,{maxWidth:1280,children:p(g,{maxWidth:576,children:[e(q,{logo:a}),p(o,{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(P,{"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(A,{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(C,{muted:!0,children:a==null?void 0:a.subtitle}),e(d,{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]=S(!1);return p(L,{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(B,{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(y,{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 bg-gray-100 rounded",children:[e(R,{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(y,{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};
|
package/dist/chunk-MBEAJPNQ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i,b as h}from"./chunk-4DDN6JI4.mjs";import S from"react";import{Button as r}from"@stackshift-ui/button";import{Heading as N}from"@stackshift-ui/heading";import{Input as y}from"@stackshift-ui/input";import{Text as P}from"@stackshift-ui/text";import{Link as d}from"@stackshift-ui/link";import{Image as o}from"@stackshift-ui/image";import{Form as R}from"@stackshift-ui/form";import{FormField as x}from"@stackshift-ui/form-field";import{Section as A}from"@stackshift-ui/section";import{Container as w}from"@stackshift-ui/container";import{Flex as v}from"@stackshift-ui/flex";import{Fragment as g,jsx as e,jsxs as c}from"react/jsx-runtime";function z({logo:a,form:n,formLinks:u,signInLink:p}){return e(A,{className:"py-10 bg-gray-50 lg:py-20",children:c(w,{maxWidth:576,children:[e(L,{logo:a}),c(w,{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(d,{"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(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 C({form:a}){return c("div",{className:"mb-6",children:[a!=null&&a.subtitle?e(P,{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,b]=S.useState(!1);return c(R,{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:b}),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,b;return c(g,{children:[e(v,{wrap:!0,className:"-mx-2",children:(p=a==null?void 0:a.fields)==null?void 0:p.slice(0,2).map((t,s)=>{var l;return e("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:t.type==="inputText"?e(y,{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(x,{textSize:"sm",noLabel:!0,name:(l=t==null?void 0:t.name)!=null?l:"",...t})},s)})}),(b=a==null?void 0:a.fields)==null?void 0:b.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(x,{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(v,{className:"relative bg-gray-100 rounded",children:[e(y,{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(g,{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};
|
|
File without changes
|