@stackshift-ui/signin-signup 7.0.0-beta.10 → 7.0.0-beta.12
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-4DDN6JI4.mjs +1 -0
- package/dist/chunk-FC6H6VJ3.mjs +1 -0
- package/dist/chunk-H7LYNEE4.mjs +1 -0
- package/dist/chunk-WOIW3RN6.mjs +1 -0
- package/dist/helper/index.d.ts +3 -0
- package/dist/helper/index.js +1 -0
- package/dist/helper/index.mjs +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/index.mjs +2 -0
- package/dist/signin-signup.d.ts +14 -0
- package/dist/signin-signup.js +1 -0
- package/dist/signin-signup.mjs +1 -0
- package/dist/signin_signup_a.d.ts +3 -0
- package/dist/signin_signup_a.js +1 -0
- package/dist/signin_signup_a.mjs +1 -0
- package/dist/signin_signup_b.d.ts +3 -0
- package/dist/signin_signup_b.js +1 -0
- package/dist/signin_signup_b.mjs +1 -0
- package/dist/types.d.ts +362 -0
- package/dist/types.js +1 -0
- package/package.json +16 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=e=>{var r,n,t;return e!=null&&e.internalLink&&(e==null?void 0:e.type)==="linkInternal"?(n=(r=e==null?void 0:e.internalLink)==null?void 0:r.toLowerCase())!=null&&n.includes("home")?"/":`/${e.internalLink}`:e!=null&&e.externalLink&&(e==null?void 0:e.type)==="linkExternal"&&(t=e==null?void 0:e.externalLink)!=null?t:"/"},L=e=>e?(e==null?void 0:e.linkType)==="linkInternal"?`/${e==null?void 0:e.internalLink}`:e==null?void 0:e.externalLink:"/thank-you";export{a,L as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as b,b as w}from"./chunk-4DDN6JI4.mjs";import{Button as g}from"@stackshift-ui/button";import{Card as o}from"@stackshift-ui/card";import{Container as y}from"@stackshift-ui/container";import{Flex as d}from"@stackshift-ui/flex";import{Form as N}from"@stackshift-ui/form";import{FormField as v}from"@stackshift-ui/form-field";import{Heading as S}from"@stackshift-ui/heading";import{Image as P}from"@stackshift-ui/image";import{Input as C}from"@stackshift-ui/input";import{Link as R}from"@stackshift-ui/link";import{Section as m}from"@stackshift-ui/section";import{Text as L}from"@stackshift-ui/text";import h from"react";import{jsx as e,jsxs as s}from"react/jsx-runtime";function M({logo:t,form:n,formLinks:c,signInLink:p}){return e(m,{className:"py-10 bg-primary lg:py-20",children:e(y,{maxWidth:1280,children:s(y,{maxWidth:576,children:[e(A,{logo:t}),s(o,{className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12 rounded-md",children:[e(B,{form:n}),e(z,{form:n,signInLink:p})]}),e(U,{formLinks:c})]})})})}function A({logo:t}){var n;return t?e("div",{className:"mb-10",children:e(R,{"aria-label":`Go to ${b(t)==="/"?"home page":b(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:b(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:e(P,{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 B({form:t}){return s("div",{className:"mb-6 text-center sm:text-left",children:[e(L,{muted:!0,className:"text-sm lg:text-base",children:t==null?void 0:t.subtitle}),e(S,{className:"text-xl lg:text-2xl",children:t==null?void 0:t.name})]})}function z({form:t,signInLink:n}){var u;if(!(t!=null&&t.fields))return null;let[c,p]=h.useState({}),l=i=>{p(a=>({...a,[i]:!a[i]}))};return s(N,{id:(u=t==null?void 0:t.id)!=null?u:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:w(t==null?void 0:t.thankYouPage),children:[e(k,{form:t,showPassword:c,togglePasswordVisibility:l}),e("div",{children:e("div",{className:"webriq-recaptcha"})}),s("div",{className:"text-center",children:[e(H,{form:t}),e(T,{signInLink:n})]})]})}function k({form:t,showPassword:n,togglePasswordVisibility:c}){var p,l,u,i;return s(h.Fragment,{children:[e(d,{className:"flex-col lg:flex-row gap-3",children:(l=(p=t==null?void 0:t.fields)==null?void 0:p.slice(0,2))==null?void 0:l.map((a,x)=>{var r;return e("div",{className:"w-full",children:e(v,{noLabel:!0,variant:"secondary",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,name:(r=a==null?void 0:a.name)!=null?r:"",items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},x)})}),(i=(u=t==null?void 0:t.fields)==null?void 0:u.slice(2))==null?void 0:i.map((a,x)=>{var r;return e("div",{className:"my-3",children:(a==null?void 0:a.type)==="inputPassword"&&a.name?e(q,{formFields:a,showPassword:n[a.name]||!1,togglePassword:()=>c(a.name)}):e(v,{noLabel:!0,variant:"secondary",name:(r=a==null?void 0:a.name)!=null?r:"",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 q({formFields:t,showPassword:n,togglePassword:c}){var p;return s("div",{className:"flex flex-col sm:flex-row gap-2 items-center relative",children:[e(C,{"aria-label":(p=t==null?void 0:t.placeholder)!=null?p:t==null?void 0:t.name,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,className:"pr-12"}),s(g,{variant:"unstyled","aria-label":n?"Show password":"Hide password",className:"focus:outline-none px-0 py-0 absolute right-4",type:"button",onClick:c,children:[e("span",{className:"block sm:hidden text-right",children:n?"Hide":"Show"}),e("span",{className:"hidden sm:block",children:e(V,{showPassword:n})})]})]})}function H({form:t}){var n;return t!=null&&t.buttonLabel?e(g,{className:"w-full py-4 mb-3","aria-label":(n=t==null?void 0:t.buttonLabel)!=null?n:"Sign Up form submit button",variant:"default",type:"submit",children:t==null?void 0:t.buttonLabel}):null}function T({signInLink:t}){return t!=null&&t.label?s("span",{className:"text-xs text-gray-900",children:[e("span",{children:"Already have an account?"})," ",e(g,{as:"link",link:t,variant:"link",className:"text-xs text-primary hover:underline",children:t==null?void 0:t.label})]}):null}function U({formLinks:t}){return t?e("p",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((n,c,{length:p})=>s("span",{children:[e(g,{as:"link",link:n,variant:"link",className:"text-xs underline text-secondary-foreground hover:text-gray-50","aria-label":n==null?void 0:n.label,asChild:!0,children:n==null?void 0:n.label}),c===p-1?null:c===p-2?e("span",{children:"\xA0and\xA0"}):e("span",{children:"\xA0,\xA0"})]},c))}):null}function V({showPassword:t}){return e(h.Fragment,{children:t?e("svg",{className:"w-5 h-5 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:s("g",{fill:"currentColor",children:[e("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),e("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),e("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):e("svg",{className:"w-5 h-5 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:s("g",{fill:"currentColor",children:[e("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),e("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}export{M as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as b,b as w}from"./chunk-4DDN6JI4.mjs";import{Button as h}from"@stackshift-ui/button";import{Container as y}from"@stackshift-ui/container";import{Flex as S}from"@stackshift-ui/flex";import{Form as P}from"@stackshift-ui/form";import{FormField as r}from"@stackshift-ui/form-field";import{Heading as k}from"@stackshift-ui/heading";import{Image as R}from"@stackshift-ui/image";import{Input as v}from"@stackshift-ui/input";import{Link as A}from"@stackshift-ui/link";import{Section as d}from"@stackshift-ui/section";import{Text as z}from"@stackshift-ui/text";import C from"react";import{Fragment as N,jsx as e,jsxs as c}from"react/jsx-runtime";function L({logo:t,form:n,formLinks:u,signInLink:p}){return e(d,{className:"py-10 rounded-md lg:py-20",children:c(y,{maxWidth:576,children:[e(M,{logo:t}),c(y,{className:"mb-6 text-center lg:mb-10",children:[e(q,{form:n}),e(B,{form:n,signInLink:p,thankYouPage:w(n==null?void 0:n.thankYouPage)})]}),e(U,{formLinks:u})]})})}function M({logo:t}){var n;return t?e("div",{className:"mb-10",children:e(A,{"aria-label":`Go to ${b(t)==="/"?"home page":b(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:b(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:e(R,{src:t==null?void 0:t.image,alt:(n=t==null?void 0:t.alt)!=null?n:"signup-logo",width:100,height:100,className:"flex justify-center mx-auto text-3xl font-bold leading-none"})})}):null}function q({form:t}){return c("div",{className:"mb-6",children:[t!=null&&t.subtitle?e(z,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?e(k,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function B({form:t,signInLink:n,thankYouPage:u}){var s,i;if(!(t!=null&&t.fields))return null;let[p,l]=C.useState({}),a=x=>{l(g=>({...g,[x]:!g[x]}))};return c(P,{id:(s=t==null?void 0:t.id)!=null?s:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:u,children:[e(T,{form:t,showPasswords:p,togglePasswordVisibility:a}),e("div",{children:e("div",{className:"webriq-recaptcha"})}),e("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&e(h,{variant:"default","aria-label":(i=t==null?void 0:t.buttonLabel)!=null?i:"Sign Up form submit button",className:"w-full py-4 text-sm font-bold tex-gray-50",type:"submit",children:t==null?void 0:t.buttonLabel})}),n&&e(Y,{signInLink:n})]})}function T({form:t,showPasswords:n,togglePasswordVisibility:u}){var p,l;return c(N,{children:[e(S,{wrap:!0,className:"-mx-2 lg:gap-0 gap-3",children:(p=t==null?void 0:t.fields)==null?void 0:p.slice(0,2).map((a,s)=>{var i;return e("div",{className:"w-full px-2 lg:w-1/2",children:a.type==="inputText"?e(v,{placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,className:"w-full py-4 text-base bg-white",name:a==null?void 0:a.name,"aria-label":a==null?void 0:a.label,...a,type:"text"}):e(r,{className:"py-4 bg-white",textSize:"sm",noLabel:!0,variant:"primary",name:(i=a==null?void 0:a.name)!=null?i:"",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})},s)})}),(l=t==null?void 0:t.fields)==null?void 0:l.slice(2).map((a,s)=>{var i;return e("div",{className:"my-3",children:a.type==="inputPassword"&&a.name?e(H,{formFields:a,showPassword:n[a.name]||!1,togglePassword:()=>u(a.name)}):e(r,{className:"py-4 bg-white",textSize:"sm",noLabel:!0,variant:"primary",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,name:(i=a==null?void 0:a.name)!=null?i:"",items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},s)})]})}function Y({signInLink:t}){return t!=null&&t.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(h,{as:"link",link:t,variant:"link",className:"text-xs text-primary cursor-pointer hover:underline",children:t==null?void 0:t.label})]}):null}function H({formFields:t,showPassword:n,togglePassword:u}){var p;return c("div",{className:"flex flex-col sm:flex-row gap-2 sm:items-center relative",children:[e(v,{className:"py-4 bg-white pr-12","aria-label":(p=t==null?void 0:t.placeholder)!=null?p:t==null?void 0:t.name,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}),c(h,{variant:"unstyled","aria-label":n?"Show password":"Hide password",className:"focus:outline-none px-0 py-0 absolute right-4",type:"button",onClick:u,children:[e("span",{className:"block sm:hidden text-right",children:n?"Hide":"Show"}),e("span",{className:"hidden sm:block",children:e(V,{showPassword:n})})]})]})}function U({formLinks:t}){return t?e("p",{className:"mt-10 lg:mt-3 text-xs text-center text-gray-700",children:t==null?void 0:t.map((n,u,{length:p})=>c("span",{children:[e(h,{as:"link",link:n,variant:"link",className:"text-xs text-primary cursor-pointer hover:underline",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 V({showPassword:t}){return e(N,{children:t?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: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 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{L as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as x}from"./chunk-H7LYNEE4.mjs";import{a as F}from"./chunk-FC6H6VJ3.mjs";import{jsx as K}from"react/jsx-runtime";var i={variant_a:x,variant_b:F},h="SigninSignup",I=({data:n})=>{var r,s,u,f,t,p,g,l,m,L,c,v,S,b,y,R,k,B;let e=n==null?void 0:n.variant,o=e&&(i==null?void 0:i[e]),P={logo:(s=(r=n==null?void 0:n.variants)==null?void 0:r.logo)!=null?s:void 0,title:(f=(u=n==null?void 0:n.variants)==null?void 0:u.title)!=null?f:void 0,subtitle:(p=(t=n==null?void 0:n.variants)==null?void 0:t.subtitle)!=null?p:void 0,text:(l=(g=n==null?void 0:n.variants)==null?void 0:g.plainText)!=null?l:void 0,firstButton:(L=(m=n==null?void 0:n.variants)==null?void 0:m.primaryButton)!=null?L:void 0,secondButton:(v=(c=n==null?void 0:n.variants)==null?void 0:c.secondaryButton)!=null?v:void 0,formLinks:(b=(S=n==null?void 0:n.variants)==null?void 0:S.formLinks)!=null?b:void 0,signInLink:(R=(y=n==null?void 0:n.variants)==null?void 0:y.signinLink)!=null?R:void 0,form:(B=(k=n==null?void 0:n.variants)==null?void 0:k.form)!=null?B:void 0};return o?K(o,{...P}):null};I.displayName=h;export{I as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var L=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var f=(e,r)=>{for(var n in r)L(e,n,{get:r[n],enumerable:!0})},p=(e,r,n,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of i(r))!s.call(e,a)&&a!==n&&L(e,a,{get:()=>r[a],enumerable:!(t=u(r,a))||t.enumerable});return e};var x=e=>p(L({},"__esModule",{value:!0}),e);var h={};f(h,{logoLink:()=>y,thankYouPageLink:()=>c});module.exports=x(h);var y=e=>{var r,n,t;return e!=null&&e.internalLink&&(e==null?void 0:e.type)==="linkInternal"?(n=(r=e==null?void 0:e.internalLink)==null?void 0:r.toLowerCase())!=null&&n.includes("home")?"/":`/${e.internalLink}`:e!=null&&e.externalLink&&(e==null?void 0:e.type)==="linkExternal"&&(t=e==null?void 0:e.externalLink)!=null?t:"/"},c=e=>e?(e==null?void 0:e.linkType)==="linkInternal"?`/${e==null?void 0:e.internalLink}`:e==null?void 0:e.externalLink:"/thank-you";0&&(module.exports={logoLink,thankYouPageLink});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"../chunk-4DDN6JI4.mjs";export{a as logoLink,b as thankYouPageLink};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";var pt=Object.create;var y=Object.defineProperty;var ut=Object.getOwnPropertyDescriptor;var st=Object.getOwnPropertyNames;var rt=Object.getPrototypeOf,ct=Object.prototype.hasOwnProperty;var lt=(t,e)=>{for(var u in e)y(t,u,{get:e[u],enumerable:!0})},W=(t,e,u,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of st(e))!ct.call(t,r)&&r!==u&&y(t,r,{get:()=>e[r],enumerable:!(s=ut(e,r))||s.enumerable});return t};var K=(t,e,u)=>(u=t!=null?pt(rt(t)):{},W(e||!t||!t.__esModule?y(u,"default",{value:t,enumerable:!0}):u,t)),bt=t=>W(y({},"__esModule",{value:!0}),t);var Mt={};lt(Mt,{SigninSignup:()=>nt,SigninSignup_A:()=>v,SigninSignup_B:()=>o});module.exports=bt(Mt);var h=require("@stackshift-ui/button"),S=require("@stackshift-ui/container"),$=require("@stackshift-ui/flex"),G=require("@stackshift-ui/form"),L=require("@stackshift-ui/form-field"),j=require("@stackshift-ui/heading"),E=require("@stackshift-ui/image"),P=require("@stackshift-ui/input"),D=require("@stackshift-ui/link"),J=require("@stackshift-ui/section"),O=require("@stackshift-ui/text"),Q=K(require("react"));var x=t=>{var e,u,s;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"&&(s=t==null?void 0:t.externalLink)!=null?s:"/"},w=t=>t?(t==null?void 0:t.linkType)==="linkInternal"?`/${t==null?void 0:t.internalLink}`:t==null?void 0:t.externalLink:"/thank-you";var n=require("react/jsx-runtime");function v({logo:t,form:e,formLinks:u,signInLink:s}){return(0,n.jsx)(J.Section,{className:"py-10 rounded-md lg:py-20",children:(0,n.jsxs)(S.Container,{maxWidth:576,children:[(0,n.jsx)(xt,{logo:t}),(0,n.jsxs)(S.Container,{className:"mb-6 text-center lg:mb-10",children:[(0,n.jsx)(ht,{form:e}),(0,n.jsx)(gt,{form:e,signInLink:s,thankYouPage:w(e==null?void 0:e.thankYouPage)})]}),(0,n.jsx)(Nt,{formLinks:u})]})})}function xt({logo:t}){var e;return t?(0,n.jsx)("div",{className:"mb-10",children:(0,n.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,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 ht({form:t}){return(0,n.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,n.jsx)(O.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 gt({form:t,signInLink:e,thankYouPage:u}){var c,i;if(!(t!=null&&t.fields))return null;let[s,r]=Q.default.useState({}),a=b=>{r(l=>({...l,[b]:!l[b]}))};return(0,n.jsxs)(G.Form,{id:(c=t==null?void 0:t.id)!=null?c:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:u,children:[(0,n.jsx)(yt,{form:t,showPasswords:s,togglePasswordVisibility:a}),(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"webriq-recaptcha"})}),(0,n.jsx)("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&(0,n.jsx)(h.Button,{variant:"default","aria-label":(i=t==null?void 0:t.buttonLabel)!=null?i:"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)(wt,{signInLink:e})]})}function yt({form:t,showPasswords:e,togglePasswordVisibility:u}){var s,r;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)($.Flex,{wrap:!0,className:"-mx-2 lg:gap-0 gap-3",children:(s=t==null?void 0:t.fields)==null?void 0:s.slice(0,2).map((a,c)=>{var i;return(0,n.jsx)("div",{className:"w-full px-2 lg:w-1/2",children:a.type==="inputText"?(0,n.jsx)(P.Input,{placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,className:"w-full py-4 text-base bg-white",name:a==null?void 0:a.name,"aria-label":a==null?void 0:a.label,...a,type:"text"}):(0,n.jsx)(L.FormField,{className:"py-4 bg-white",textSize:"sm",noLabel:!0,variant:"primary",name:(i=a==null?void 0:a.name)!=null?i:"",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},c)})}),(r=t==null?void 0:t.fields)==null?void 0:r.slice(2).map((a,c)=>{var i;return(0,n.jsx)("div",{className:"my-3",children:a.type==="inputPassword"&&a.name?(0,n.jsx)(vt,{formFields:a,showPassword:e[a.name]||!1,togglePassword:()=>u(a.name)}):(0,n.jsx)(L.FormField,{className:"py-4 bg-white",textSize:"sm",noLabel:!0,variant:"primary",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,name:(i=a==null?void 0:a.name)!=null?i:"",items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},c)})]})}function wt({signInLink:t}){return t!=null&&t.label?(0,n.jsxs)("div",{className:"w-full text-center mt-3",children:[(0,n.jsx)("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),(0,n.jsx)(h.Button,{as:"link",link:t,variant:"link",className:"text-xs text-primary cursor-pointer hover:underline",children:t==null?void 0:t.label})]}):null}function vt({formFields:t,showPassword:e,togglePassword:u}){var s;return(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 sm:items-center relative",children:[(0,n.jsx)(P.Input,{className:"py-4 bg-white pr-12","aria-label":(s=t==null?void 0:t.placeholder)!=null?s:t==null?void 0:t.name,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.jsxs)(h.Button,{variant:"unstyled","aria-label":e?"Show password":"Hide password",className:"focus:outline-none px-0 py-0 absolute right-4",type:"button",onClick:u,children:[(0,n.jsx)("span",{className:"block sm:hidden text-right",children:e?"Hide":"Show"}),(0,n.jsx)("span",{className:"hidden sm:block",children:(0,n.jsx)(ot,{showPassword:e})})]})]})}function Nt({formLinks:t}){return t?(0,n.jsx)("n",{className:"mt-10 lg:mt-3 text-xs text-center text-gray-700",children:t==null?void 0:t.map((e,u,{length:s})=>(0,n.jsxs)("span",{children:[(0,n.jsx)(h.Button,{as:"link",link:e,variant:"link",className:"text-xs text-primary cursor-pointer hover:underline",children:e==null?void 0:e.label}),u===s-1?null:u===s-2?(0,n.jsx)("span",{children:"\xA0and\xA0"}):(0,n.jsx)("span",{children:"\xA0,\xA0"})]},u))}):null}function ot({showPassword:t}){return(0,n.jsx)(n.Fragment,{children:t?(0,n.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,n.jsxs)("h",{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 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)("h",{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 X=require("@stackshift-ui/card"),N=K(require("react"));function o({logo:t,form:e,formLinks:u,signInLink:s}){return(0,n.jsx)(J.Section,{className:"py-10 bg-primary lg:py-20",children:(0,n.jsx)(S.Container,{maxWidth:1280,children:(0,n.jsxs)(S.Container,{maxWidth:576,children:[(0,n.jsx)(St,{logo:t}),(0,n.jsxs)(X.Card,{className:"n-6 mb-6 bg-white lg:mb-10 lg:n-12 rounded-md",children:[(0,n.jsx)(Lt,{form:e}),(0,n.jsx)(Pt,{form:e,signInLink:s})]}),(0,n.jsx)(Bt,{formLinks:u})]})})})}function St({logo:t}){var e;return t?(0,n.jsx)("div",{className:"mb-10",children:(0,n.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,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 text-3xl font-bold leading-none text-white"})})}):null}function Lt({form:t}){return(0,n.jsxs)("div",{className:"mb-6 text-center sm:text-left",children:[(0,n.jsx)(O.Text,{muted:!0,className:"text-sm lg:text-base",children:t==null?void 0:t.subtitle}),(0,n.jsx)(j.Heading,{className:"text-xl lg:text-2xl",children:t==null?void 0:t.name})]})}function Pt({form:t,signInLink:e}){var a;if(!(t!=null&&t.fields))return null;let[u,s]=N.default.useState({}),r=c=>{s(i=>({...i,[c]:!i[c]}))};return(0,n.jsxs)(G.Form,{id:(a=t==null?void 0:t.id)!=null?a:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:w(t==null?void 0:t.thankYouPage),children:[(0,n.jsx)(Rt,{form:t,showPassword:u,togglePasswordVisibility:r}),(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"webriq-recaptcha"})}),(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)(Ct,{form:t}),(0,n.jsx)(mt,{signInLink:e})]})]})}function Rt({form:t,showPassword:e,togglePasswordVisibility:u}){var s,r,a,c;return(0,n.jsxs)(N.default.Fragment,{children:[(0,n.jsx)($.Flex,{className:"flex-col lg:flex-row gap-3",children:(r=(s=t==null?void 0:t.fields)==null?void 0:s.slice(0,2))==null?void 0:r.map((i,b)=>{var l;return(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)(L.FormField,{noLabel:!0,variant:"secondary",placeholder:i==null?void 0:i.placeholder,required:i==null?void 0:i.isRequired,name:(l=i==null?void 0:i.name)!=null?l:"",items:i==null?void 0:i.items,type:i==null?void 0:i.type,...i})},b)})}),(c=(a=t==null?void 0:t.fields)==null?void 0:a.slice(2))==null?void 0:c.map((i,b)=>{var l;return(0,n.jsx)("div",{className:"my-3",children:(i==null?void 0:i.type)==="inputPassword"&&i.name?(0,n.jsx)(kt,{formFields:i,showPassword:e[i.name]||!1,togglePassword:()=>u(i.name)}):(0,n.jsx)(L.FormField,{noLabel:!0,variant:"secondary",name:(l=i==null?void 0:i.name)!=null?l:"",placeholder:i==null?void 0:i.placeholder,required:i==null?void 0:i.isRequired,items:i==null?void 0:i.items,type:i==null?void 0:i.type,...i})},b)})]})}function kt({formFields:t,showPassword:e,togglePassword:u}){var s;return(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 items-center relative",children:[(0,n.jsx)(P.Input,{"aria-label":(s=t==null?void 0:t.placeholder)!=null?s:t==null?void 0:t.name,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,className:"pr-12"}),(0,n.jsxs)(h.Button,{variant:"unstyled","aria-label":e?"Show password":"Hide password",className:"focus:outline-none px-0 py-0 absolute right-4",type:"button",onClick:u,children:[(0,n.jsx)("span",{className:"block sm:hidden text-right",children:e?"Hide":"Show"}),(0,n.jsx)("span",{className:"hidden sm:block",children:(0,n.jsx)(At,{showPassword:e})})]})]})}function Ct({form:t}){var e;return t!=null&&t.buttonLabel?(0,n.jsx)(h.Button,{className:"w-full py-4 mb-3","aria-label":(e=t==null?void 0:t.buttonLabel)!=null?e:"Sign Up form submit button",variant:"default",type:"submit",children:t==null?void 0:t.buttonLabel}):null}function mt({signInLink:t}){return t!=null&&t.label?(0,n.jsxs)("span",{className:"text-xs text-gray-900",children:[(0,n.jsx)("span",{children:"Already have an account?"})," ",(0,n.jsx)(h.Button,{as:"link",link:t,variant:"link",className:"text-xs text-primary hover:underline",children:t==null?void 0:t.label})]}):null}function Bt({formLinks:t}){return t?(0,n.jsx)("n",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((e,u,{length:s})=>(0,n.jsxs)("span",{children:[(0,n.jsx)(h.Button,{as:"link",link:e,variant:"link",className:"text-xs underline text-secondary-foreground hover:text-gray-50","aria-label":e==null?void 0:e.label,asChild:!0,children:e==null?void 0:e.label}),u===s-1?null:u===s-2?(0,n.jsx)("span",{children:"\xA0and\xA0"}):(0,n.jsx)("span",{children:"\xA0,\xA0"})]},u))}):null}function At({showPassword:t}){return(0,n.jsx)(N.default.Fragment,{children:t?(0,n.jsx)("svg",{className:"w-5 h-5 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)("h",{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 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)("h",{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 C={variant_a:v,variant_b:o},dt="SigninSignup",nt=({data:t})=>{var r,a,c,i,b,l,m,B,A,d,M,z,q,T,Y,H,U,V;let e=t==null?void 0:t.variant,u=e&&(C==null?void 0:C[e]),s={logo:(a=(r=t==null?void 0:t.variants)==null?void 0:r.logo)!=null?a:void 0,title:(i=(c=t==null?void 0:t.variants)==null?void 0:c.title)!=null?i:void 0,subtitle:(l=(b=t==null?void 0:t.variants)==null?void 0:b.subtitle)!=null?l:void 0,text:(B=(m=t==null?void 0:t.variants)==null?void 0:m.plainText)!=null?B:void 0,firstButton:(d=(A=t==null?void 0:t.variants)==null?void 0:A.primaryButton)!=null?d:void 0,secondButton:(z=(M=t==null?void 0:t.variants)==null?void 0:M.secondaryButton)!=null?z:void 0,formLinks:(T=(q=t==null?void 0:t.variants)==null?void 0:q.formLinks)!=null?T:void 0,signInLink:(H=(Y=t==null?void 0:t.variants)==null?void 0:Y.signinLink)!=null?H:void 0,form:(V=(U=t==null?void 0:t.variants)==null?void 0:U.form)!=null?V:void 0};return u?(0,n.jsx)(u,{...s}):null};nt.displayName=dt;0&&(module.exports={SigninSignup,SigninSignup_A,SigninSignup_B});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Form, LabeledRoute, LabeledRouteWithKey, Logo, SectionsProps } from "./types";
|
|
3
|
+
export interface SignUpFormProps {
|
|
4
|
+
logo?: Logo;
|
|
5
|
+
title?: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
firstButton?: LabeledRoute;
|
|
9
|
+
secondButton?: LabeledRoute;
|
|
10
|
+
formLinks?: LabeledRouteWithKey[];
|
|
11
|
+
signInLink?: LabeledRoute;
|
|
12
|
+
form?: Form;
|
|
13
|
+
}
|
|
14
|
+
export declare const SigninSignup: React.FC<SectionsProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var pt=Object.create;var y=Object.defineProperty;var ut=Object.getOwnPropertyDescriptor;var st=Object.getOwnPropertyNames;var rt=Object.getPrototypeOf,ct=Object.prototype.hasOwnProperty;var lt=(t,e)=>{for(var u in e)y(t,u,{get:e[u],enumerable:!0})},W=(t,e,u,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of st(e))!ct.call(t,r)&&r!==u&&y(t,r,{get:()=>e[r],enumerable:!(s=ut(e,r))||s.enumerable});return t};var K=(t,e,u)=>(u=t!=null?pt(rt(t)):{},W(e||!t||!t.__esModule?y(u,"default",{value:t,enumerable:!0}):u,t)),bt=t=>W(y({},"__esModule",{value:!0}),t);var Mt={};lt(Mt,{SigninSignup:()=>nt});module.exports=bt(Mt);var h=require("@stackshift-ui/button"),N=require("@stackshift-ui/container"),$=require("@stackshift-ui/flex"),G=require("@stackshift-ui/form"),S=require("@stackshift-ui/form-field"),j=require("@stackshift-ui/heading"),E=require("@stackshift-ui/image"),L=require("@stackshift-ui/input"),D=require("@stackshift-ui/link"),J=require("@stackshift-ui/section"),O=require("@stackshift-ui/text"),Q=K(require("react"));var x=t=>{var e,u,s;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"&&(s=t==null?void 0:t.externalLink)!=null?s:"/"},w=t=>t?(t==null?void 0:t.linkType)==="linkInternal"?`/${t==null?void 0:t.internalLink}`:t==null?void 0:t.externalLink:"/thank-you";var n=require("react/jsx-runtime");function o({logo:t,form:e,formLinks:u,signInLink:s}){return(0,n.jsx)(J.Section,{className:"py-10 rounded-md lg:py-20",children:(0,n.jsxs)(N.Container,{maxWidth:576,children:[(0,n.jsx)(xt,{logo:t}),(0,n.jsxs)(N.Container,{className:"mb-6 text-center lg:mb-10",children:[(0,n.jsx)(ht,{form:e}),(0,n.jsx)(gt,{form:e,signInLink:s,thankYouPage:w(e==null?void 0:e.thankYouPage)})]}),(0,n.jsx)(Nt,{formLinks:u})]})})}function xt({logo:t}){var e;return t?(0,n.jsx)("div",{className:"mb-10",children:(0,n.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,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 ht({form:t}){return(0,n.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,n.jsx)(O.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 gt({form:t,signInLink:e,thankYouPage:u}){var c,i;if(!(t!=null&&t.fields))return null;let[s,r]=Q.default.useState({}),a=b=>{r(l=>({...l,[b]:!l[b]}))};return(0,n.jsxs)(G.Form,{id:(c=t==null?void 0:t.id)!=null?c:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:u,children:[(0,n.jsx)(yt,{form:t,showPasswords:s,togglePasswordVisibility:a}),(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"webriq-recaptcha"})}),(0,n.jsx)("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&(0,n.jsx)(h.Button,{variant:"default","aria-label":(i=t==null?void 0:t.buttonLabel)!=null?i:"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)(wt,{signInLink:e})]})}function yt({form:t,showPasswords:e,togglePasswordVisibility:u}){var s,r;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)($.Flex,{wrap:!0,className:"-mx-2 lg:gap-0 gap-3",children:(s=t==null?void 0:t.fields)==null?void 0:s.slice(0,2).map((a,c)=>{var i;return(0,n.jsx)("div",{className:"w-full px-2 lg:w-1/2",children:a.type==="inputText"?(0,n.jsx)(L.Input,{placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,className:"w-full py-4 text-base bg-white",name:a==null?void 0:a.name,"aria-label":a==null?void 0:a.label,...a,type:"text"}):(0,n.jsx)(S.FormField,{className:"py-4 bg-white",textSize:"sm",noLabel:!0,variant:"primary",name:(i=a==null?void 0:a.name)!=null?i:"",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},c)})}),(r=t==null?void 0:t.fields)==null?void 0:r.slice(2).map((a,c)=>{var i;return(0,n.jsx)("div",{className:"my-3",children:a.type==="inputPassword"&&a.name?(0,n.jsx)(vt,{formFields:a,showPassword:e[a.name]||!1,togglePassword:()=>u(a.name)}):(0,n.jsx)(S.FormField,{className:"py-4 bg-white",textSize:"sm",noLabel:!0,variant:"primary",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,name:(i=a==null?void 0:a.name)!=null?i:"",items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},c)})]})}function wt({signInLink:t}){return t!=null&&t.label?(0,n.jsxs)("div",{className:"w-full text-center mt-3",children:[(0,n.jsx)("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),(0,n.jsx)(h.Button,{as:"link",link:t,variant:"link",className:"text-xs text-primary cursor-pointer hover:underline",children:t==null?void 0:t.label})]}):null}function vt({formFields:t,showPassword:e,togglePassword:u}){var s;return(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 sm:items-center relative",children:[(0,n.jsx)(L.Input,{className:"py-4 bg-white pr-12","aria-label":(s=t==null?void 0:t.placeholder)!=null?s:t==null?void 0:t.name,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.jsxs)(h.Button,{variant:"unstyled","aria-label":e?"Show password":"Hide password",className:"focus:outline-none px-0 py-0 absolute right-4",type:"button",onClick:u,children:[(0,n.jsx)("span",{className:"block sm:hidden text-right",children:e?"Hide":"Show"}),(0,n.jsx)("span",{className:"hidden sm:block",children:(0,n.jsx)(St,{showPassword:e})})]})]})}function Nt({formLinks:t}){return t?(0,n.jsx)("n",{className:"mt-10 lg:mt-3 text-xs text-center text-gray-700",children:t==null?void 0:t.map((e,u,{length:s})=>(0,n.jsxs)("span",{children:[(0,n.jsx)(h.Button,{as:"link",link:e,variant:"link",className:"text-xs text-primary cursor-pointer hover:underline",children:e==null?void 0:e.label}),u===s-1?null:u===s-2?(0,n.jsx)("span",{children:"\xA0and\xA0"}):(0,n.jsx)("span",{children:"\xA0,\xA0"})]},u))}):null}function St({showPassword:t}){return(0,n.jsx)(n.Fragment,{children:t?(0,n.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,n.jsxs)("h",{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 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)("h",{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 X=require("@stackshift-ui/card"),v=K(require("react"));function k({logo:t,form:e,formLinks:u,signInLink:s}){return(0,n.jsx)(J.Section,{className:"py-10 bg-primary lg:py-20",children:(0,n.jsx)(N.Container,{maxWidth:1280,children:(0,n.jsxs)(N.Container,{maxWidth:576,children:[(0,n.jsx)(Lt,{logo:t}),(0,n.jsxs)(X.Card,{className:"n-6 mb-6 bg-white lg:mb-10 lg:n-12 rounded-md",children:[(0,n.jsx)(ot,{form:e}),(0,n.jsx)(Pt,{form:e,signInLink:s})]}),(0,n.jsx)(At,{formLinks:u})]})})})}function Lt({logo:t}){var e;return t?(0,n.jsx)("div",{className:"mb-10",children:(0,n.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,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 text-3xl font-bold leading-none text-white"})})}):null}function ot({form:t}){return(0,n.jsxs)("div",{className:"mb-6 text-center sm:text-left",children:[(0,n.jsx)(O.Text,{muted:!0,className:"text-sm lg:text-base",children:t==null?void 0:t.subtitle}),(0,n.jsx)(j.Heading,{className:"text-xl lg:text-2xl",children:t==null?void 0:t.name})]})}function Pt({form:t,signInLink:e}){var a;if(!(t!=null&&t.fields))return null;let[u,s]=v.default.useState({}),r=c=>{s(i=>({...i,[c]:!i[c]}))};return(0,n.jsxs)(G.Form,{id:(a=t==null?void 0:t.id)!=null?a:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:w(t==null?void 0:t.thankYouPage),children:[(0,n.jsx)(Rt,{form:t,showPassword:u,togglePasswordVisibility:r}),(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"webriq-recaptcha"})}),(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)(Ct,{form:t}),(0,n.jsx)(Bt,{signInLink:e})]})]})}function Rt({form:t,showPassword:e,togglePasswordVisibility:u}){var s,r,a,c;return(0,n.jsxs)(v.default.Fragment,{children:[(0,n.jsx)($.Flex,{className:"flex-col lg:flex-row gap-3",children:(r=(s=t==null?void 0:t.fields)==null?void 0:s.slice(0,2))==null?void 0:r.map((i,b)=>{var l;return(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)(S.FormField,{noLabel:!0,variant:"secondary",placeholder:i==null?void 0:i.placeholder,required:i==null?void 0:i.isRequired,name:(l=i==null?void 0:i.name)!=null?l:"",items:i==null?void 0:i.items,type:i==null?void 0:i.type,...i})},b)})}),(c=(a=t==null?void 0:t.fields)==null?void 0:a.slice(2))==null?void 0:c.map((i,b)=>{var l;return(0,n.jsx)("div",{className:"my-3",children:(i==null?void 0:i.type)==="inputPassword"&&i.name?(0,n.jsx)(kt,{formFields:i,showPassword:e[i.name]||!1,togglePassword:()=>u(i.name)}):(0,n.jsx)(S.FormField,{noLabel:!0,variant:"secondary",name:(l=i==null?void 0:i.name)!=null?l:"",placeholder:i==null?void 0:i.placeholder,required:i==null?void 0:i.isRequired,items:i==null?void 0:i.items,type:i==null?void 0:i.type,...i})},b)})]})}function kt({formFields:t,showPassword:e,togglePassword:u}){var s;return(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 items-center relative",children:[(0,n.jsx)(L.Input,{"aria-label":(s=t==null?void 0:t.placeholder)!=null?s:t==null?void 0:t.name,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,className:"pr-12"}),(0,n.jsxs)(h.Button,{variant:"unstyled","aria-label":e?"Show password":"Hide password",className:"focus:outline-none px-0 py-0 absolute right-4",type:"button",onClick:u,children:[(0,n.jsx)("span",{className:"block sm:hidden text-right",children:e?"Hide":"Show"}),(0,n.jsx)("span",{className:"hidden sm:block",children:(0,n.jsx)(dt,{showPassword:e})})]})]})}function Ct({form:t}){var e;return t!=null&&t.buttonLabel?(0,n.jsx)(h.Button,{className:"w-full py-4 mb-3","aria-label":(e=t==null?void 0:t.buttonLabel)!=null?e:"Sign Up form submit button",variant:"default",type:"submit",children:t==null?void 0:t.buttonLabel}):null}function Bt({signInLink:t}){return t!=null&&t.label?(0,n.jsxs)("span",{className:"text-xs text-gray-900",children:[(0,n.jsx)("span",{children:"Already have an account?"})," ",(0,n.jsx)(h.Button,{as:"link",link:t,variant:"link",className:"text-xs text-primary hover:underline",children:t==null?void 0:t.label})]}):null}function At({formLinks:t}){return t?(0,n.jsx)("n",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((e,u,{length:s})=>(0,n.jsxs)("span",{children:[(0,n.jsx)(h.Button,{as:"link",link:e,variant:"link",className:"text-xs underline text-secondary-foreground hover:text-gray-50","aria-label":e==null?void 0:e.label,asChild:!0,children:e==null?void 0:e.label}),u===s-1?null:u===s-2?(0,n.jsx)("span",{children:"\xA0and\xA0"}):(0,n.jsx)("span",{children:"\xA0,\xA0"})]},u))}):null}function dt({showPassword:t}){return(0,n.jsx)(v.default.Fragment,{children:t?(0,n.jsx)("svg",{className:"w-5 h-5 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)("h",{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 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)("h",{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 C={variant_a:o,variant_b:k},mt="SigninSignup",nt=({data:t})=>{var r,a,c,i,b,l,B,A,d,m,M,z,q,T,Y,H,U,V;let e=t==null?void 0:t.variant,u=e&&(C==null?void 0:C[e]),s={logo:(a=(r=t==null?void 0:t.variants)==null?void 0:r.logo)!=null?a:void 0,title:(i=(c=t==null?void 0:t.variants)==null?void 0:c.title)!=null?i:void 0,subtitle:(l=(b=t==null?void 0:t.variants)==null?void 0:b.subtitle)!=null?l:void 0,text:(A=(B=t==null?void 0:t.variants)==null?void 0:B.plainText)!=null?A:void 0,firstButton:(m=(d=t==null?void 0:t.variants)==null?void 0:d.primaryButton)!=null?m:void 0,secondButton:(z=(M=t==null?void 0:t.variants)==null?void 0:M.secondaryButton)!=null?z:void 0,formLinks:(T=(q=t==null?void 0:t.variants)==null?void 0:q.formLinks)!=null?T:void 0,signInLink:(H=(Y=t==null?void 0:t.variants)==null?void 0:Y.signinLink)!=null?H:void 0,form:(V=(U=t==null?void 0:t.variants)==null?void 0:U.form)!=null?V:void 0};return u?(0,n.jsx)(u,{...s}):null};nt.displayName=mt;0&&(module.exports={SigninSignup});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-WOIW3RN6.mjs";import"./chunk-H7LYNEE4.mjs";import"./chunk-FC6H6VJ3.mjs";import"./chunk-4DDN6JI4.mjs";export{a as SigninSignup};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var M=Object.create;var x=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var H=(t,n)=>{for(var p in n)x(t,p,{get:n[p],enumerable:!0})},N=(t,n,p,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let c of B(n))!Y.call(t,c)&&c!==p&&x(t,c,{get:()=>n[c],enumerable:!(u=q(n,c))||u.enumerable});return t};var U=(t,n,p)=>(p=t!=null?M(T(t)):{},N(n||!t||!t.__esModule?x(p,"default",{value:t,enumerable:!0}):p,t)),V=t=>N(x({},"__esModule",{value:!0}),t);var O={};H(O,{SigninSignup_A:()=>z,default:()=>z});module.exports=V(O);var r=require("@stackshift-ui/button"),h=require("@stackshift-ui/container"),L=require("@stackshift-ui/flex"),P=require("@stackshift-ui/form"),y=require("@stackshift-ui/form-field"),S=require("@stackshift-ui/heading"),k=require("@stackshift-ui/image"),w=require("@stackshift-ui/input"),R=require("@stackshift-ui/link"),d=require("@stackshift-ui/section"),A=require("@stackshift-ui/text"),C=U(require("react"));var b=t=>{var n,p,u;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(p=(n=t==null?void 0:t.internalLink)==null?void 0:n.toLowerCase())!=null&&p.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(u=t==null?void 0:t.externalLink)!=null?u:"/"},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 a=require("react/jsx-runtime");function z({logo:t,form:n,formLinks:p,signInLink:u}){return(0,a.jsx)(d.Section,{className:"py-10 rounded-md lg:py-20",children:(0,a.jsxs)(h.Container,{maxWidth:576,children:[(0,a.jsx)(W,{logo:t}),(0,a.jsxs)(h.Container,{className:"mb-6 text-center lg:mb-10",children:[(0,a.jsx)($,{form:n}),(0,a.jsx)(K,{form:n,signInLink:u,thankYouPage:g(n==null?void 0:n.thankYouPage)})]}),(0,a.jsx)(D,{formLinks:p})]})})}function W({logo:t}){var n;return t?(0,a.jsx)("div",{className:"mb-10",children:(0,a.jsx)(R.Link,{"aria-label":`Go to ${b(t)==="/"?"home page":b(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:b(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(k.Image,{src:t==null?void 0:t.image,alt:(n=t==null?void 0:t.alt)!=null?n:"signup-logo",width:100,height:100,className:"flex justify-center mx-auto text-3xl font-bold leading-none"})})}):null}function $({form:t}){return(0,a.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,a.jsx)(A.Text,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?(0,a.jsx)(S.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function K({form:t,signInLink:n,thankYouPage:p}){var s,i;if(!(t!=null&&t.fields))return null;let[u,c]=C.default.useState({}),e=l=>{c(v=>({...v,[l]:!v[l]}))};return(0,a.jsxs)(P.Form,{id:(s=t==null?void 0:t.id)!=null?s:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:p,children:[(0,a.jsx)(j,{form:t,showPasswords:u,togglePasswordVisibility:e}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"webriq-recaptcha"})}),(0,a.jsx)("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&(0,a.jsx)(r.Button,{variant:"default","aria-label":(i=t==null?void 0:t.buttonLabel)!=null?i:"Sign Up form submit button",className:"w-full py-4 text-sm font-bold tex-gray-50",type:"submit",children:t==null?void 0:t.buttonLabel})}),n&&(0,a.jsx)(E,{signInLink:n})]})}function j({form:t,showPasswords:n,togglePasswordVisibility:p}){var u,c;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L.Flex,{wrap:!0,className:"-mx-2 lg:gap-0 gap-3",children:(u=t==null?void 0:t.fields)==null?void 0:u.slice(0,2).map((e,s)=>{var i;return(0,a.jsx)("div",{className:"w-full px-2 lg:w-1/2",children:e.type==="inputText"?(0,a.jsx)(w.Input,{placeholder:e==null?void 0:e.placeholder,required:e==null?void 0:e.isRequired,className:"w-full py-4 text-base bg-white",name:e==null?void 0:e.name,"aria-label":e==null?void 0:e.label,...e,type:"text"}):(0,a.jsx)(y.FormField,{className:"py-4 bg-white",textSize:"sm",noLabel:!0,variant:"primary",name:(i=e==null?void 0:e.name)!=null?i:"",placeholder:e==null?void 0:e.placeholder,required:e==null?void 0:e.isRequired,items:e==null?void 0:e.items,type:e==null?void 0:e.type,...e})},s)})}),(c=t==null?void 0:t.fields)==null?void 0:c.slice(2).map((e,s)=>{var i;return(0,a.jsx)("div",{className:"my-3",children:e.type==="inputPassword"&&e.name?(0,a.jsx)(G,{formFields:e,showPassword:n[e.name]||!1,togglePassword:()=>p(e.name)}):(0,a.jsx)(y.FormField,{className:"py-4 bg-white",textSize:"sm",noLabel:!0,variant:"primary",placeholder:e==null?void 0:e.placeholder,required:e==null?void 0:e.isRequired,name:(i=e==null?void 0:e.name)!=null?i:"",items:e==null?void 0:e.items,type:e==null?void 0:e.type,...e})},s)})]})}function E({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)(r.Button,{as:"link",link:t,variant:"link",className:"text-xs text-primary cursor-pointer hover:underline",children:t==null?void 0:t.label})]}):null}function G({formFields:t,showPassword:n,togglePassword:p}){var u;return(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 sm:items-center relative",children:[(0,a.jsx)(w.Input,{className:"py-4 bg-white pr-12","aria-label":(u=t==null?void 0:t.placeholder)!=null?u:t==null?void 0:t.name,type:n?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,a.jsxs)(r.Button,{variant:"unstyled","aria-label":n?"Show password":"Hide password",className:"focus:outline-none px-0 py-0 absolute right-4",type:"button",onClick:p,children:[(0,a.jsx)("span",{className:"block sm:hidden text-right",children:n?"Hide":"Show"}),(0,a.jsx)("span",{className:"hidden sm:block",children:(0,a.jsx)(J,{showPassword:n})})]})]})}function D({formLinks:t}){return t?(0,a.jsx)("p",{className:"mt-10 lg:mt-3 text-xs text-center text-gray-700",children:t==null?void 0:t.map((n,p,{length:u})=>(0,a.jsxs)("span",{children:[(0,a.jsx)(r.Button,{as:"link",link:n,variant:"link",className:"text-xs text-primary cursor-pointer hover:underline",children:n==null?void 0:n.label}),p===u-1?null:p===u-2?(0,a.jsx)("span",{children:"\xA0and\xA0"}):(0,a.jsx)("span",{children:"\xA0,\xA0"})]},p))}):null}function J({showPassword:t}){return(0,a.jsx)(a.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 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});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-H7LYNEE4.mjs";import"./chunk-4DDN6JI4.mjs";export{a as SigninSignup_A,a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var z=Object.create;var b=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var Y=(t,n)=>{for(var r in n)b(t,r,{get:n[r],enumerable:!0})},d=(t,n,r,p)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of q(n))!H.call(t,s)&&s!==r&&b(t,s,{get:()=>n[s],enumerable:!(p=k(n,s))||p.enumerable});return t};var U=(t,n,r)=>(r=t!=null?z(T(t)):{},d(n||!t||!t.__esModule?b(r,"default",{value:t,enumerable:!0}):r,t)),V=t=>d(b({},"__esModule",{value:!0}),t);var Q={};Y(Q,{SigninSignup_B:()=>B,default:()=>B});module.exports=V(Q);var x=require("@stackshift-ui/button"),N=require("@stackshift-ui/card"),y=require("@stackshift-ui/container"),L=require("@stackshift-ui/flex"),P=require("@stackshift-ui/form"),v=require("@stackshift-ui/form-field"),S=require("@stackshift-ui/heading"),C=require("@stackshift-ui/image"),m=require("@stackshift-ui/input"),R=require("@stackshift-ui/link"),M=require("@stackshift-ui/section"),A=require("@stackshift-ui/text"),l=U(require("react"));var h=t=>{var n,r,p;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(r=(n=t==null?void 0:t.internalLink)==null?void 0:n.toLowerCase())!=null&&r.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(p=t==null?void 0:t.externalLink)!=null?p:"/"},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 a=require("react/jsx-runtime");function B({logo:t,form:n,formLinks:r,signInLink:p}){return(0,a.jsx)(M.Section,{className:"py-10 bg-primary lg:py-20",children:(0,a.jsx)(y.Container,{maxWidth:1280,children:(0,a.jsxs)(y.Container,{maxWidth:576,children:[(0,a.jsx)($,{logo:t}),(0,a.jsxs)(N.Card,{className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12 rounded-md",children:[(0,a.jsx)(W,{form:n}),(0,a.jsx)(j,{form:n,signInLink:p})]}),(0,a.jsx)(K,{formLinks:r})]})})})}function $({logo:t}){var n;return t?(0,a.jsx)("div",{className:"mb-10",children:(0,a.jsx)(R.Link,{"aria-label":`Go to ${h(t)==="/"?"home page":h(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:h(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(C.Image,{src:t==null?void 0:t.image,alt:(n=t==null?void 0:t.alt)!=null?n:"signup-logo",width:100,height:100,className:"flex justify-center text-3xl font-bold leading-none text-white"})})}):null}function W({form:t}){return(0,a.jsxs)("div",{className:"mb-6 text-center sm:text-left",children:[(0,a.jsx)(A.Text,{muted:!0,className:"text-sm lg:text-base",children:t==null?void 0:t.subtitle}),(0,a.jsx)(S.Heading,{className:"text-xl lg:text-2xl",children:t==null?void 0:t.name})]})}function j({form:t,signInLink:n}){var u;if(!(t!=null&&t.fields))return null;let[r,p]=l.default.useState({}),s=i=>{p(e=>({...e,[i]:!e[i]}))};return(0,a.jsxs)(P.Form,{id:(u=t==null?void 0:t.id)!=null?u:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:g(t==null?void 0:t.thankYouPage),children:[(0,a.jsx)(E,{form:t,showPassword:r,togglePasswordVisibility:s}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"webriq-recaptcha"})}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(D,{form:t}),(0,a.jsx)(J,{signInLink:n})]})]})}function E({form:t,showPassword:n,togglePasswordVisibility:r}){var p,s,u,i;return(0,a.jsxs)(l.default.Fragment,{children:[(0,a.jsx)(L.Flex,{className:"flex-col lg:flex-row gap-3",children:(s=(p=t==null?void 0:t.fields)==null?void 0:p.slice(0,2))==null?void 0:s.map((e,w)=>{var c;return(0,a.jsx)("div",{className:"w-full",children:(0,a.jsx)(v.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})},w)})}),(i=(u=t==null?void 0:t.fields)==null?void 0:u.slice(2))==null?void 0:i.map((e,w)=>{var c;return(0,a.jsx)("div",{className:"my-3",children:(e==null?void 0:e.type)==="inputPassword"&&e.name?(0,a.jsx)(G,{formFields:e,showPassword:n[e.name]||!1,togglePassword:()=>r(e.name)}):(0,a.jsx)(v.FormField,{noLabel:!0,variant:"secondary",name:(c=e==null?void 0:e.name)!=null?c:"",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})},w)})]})}function G({formFields:t,showPassword:n,togglePassword:r}){var p;return(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 items-center relative",children:[(0,a.jsx)(m.Input,{"aria-label":(p=t==null?void 0:t.placeholder)!=null?p:t==null?void 0:t.name,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,className:"pr-12"}),(0,a.jsxs)(x.Button,{variant:"unstyled","aria-label":n?"Show password":"Hide password",className:"focus:outline-none px-0 py-0 absolute right-4",type:"button",onClick:r,children:[(0,a.jsx)("span",{className:"block sm:hidden text-right",children:n?"Hide":"Show"}),(0,a.jsx)("span",{className:"hidden sm:block",children:(0,a.jsx)(O,{showPassword:n})})]})]})}function D({form:t}){var n;return t!=null&&t.buttonLabel?(0,a.jsx)(x.Button,{className:"w-full py-4 mb-3","aria-label":(n=t==null?void 0:t.buttonLabel)!=null?n:"Sign Up form submit button",variant:"default",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)(x.Button,{as:"link",link:t,variant:"link",className:"text-xs text-primary hover:underline",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,r,{length:p})=>(0,a.jsxs)("span",{children:[(0,a.jsx)(x.Button,{as:"link",link:n,variant:"link",className:"text-xs underline text-secondary-foreground hover:text-gray-50","aria-label":n==null?void 0:n.label,asChild:!0,children:n==null?void 0:n.label}),r===p-1?null:r===p-2?(0,a.jsx)("span",{children:"\xA0and\xA0"}):(0,a.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function O({showPassword:t}){return(0,a.jsx)(l.default.Fragment,{children:t?(0,a.jsx)("svg",{className:"w-5 h-5 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 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});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-FC6H6VJ3.mjs";import"./chunk-4DDN6JI4.mjs";export{a as SigninSignup_B,a as default};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
export type StyleVariants<T extends string> = Record<T, string>;
|
|
2
|
+
export type Socials = "facebook" | "instagram" | "youtube" | "linkedin" | "twitter";
|
|
3
|
+
export interface MainImage {
|
|
4
|
+
image: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface LabeledRoute extends ConditionalLink {
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
linkTarget?: string;
|
|
11
|
+
linkType?: string;
|
|
12
|
+
_type?: string;
|
|
13
|
+
linkInternal?: any;
|
|
14
|
+
}
|
|
15
|
+
export interface ConditionalLink {
|
|
16
|
+
type?: string;
|
|
17
|
+
internalLink?: string | null;
|
|
18
|
+
externalLink?: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface StatItems {
|
|
21
|
+
label?: string;
|
|
22
|
+
mainImage?: MainImage;
|
|
23
|
+
value?: string;
|
|
24
|
+
_key?: string;
|
|
25
|
+
_type?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface Logo extends ConditionalLink {
|
|
28
|
+
alt?: string;
|
|
29
|
+
linkTarget?: string;
|
|
30
|
+
image?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface Images {
|
|
33
|
+
image?: string;
|
|
34
|
+
_key?: string;
|
|
35
|
+
_type?: string;
|
|
36
|
+
alt?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ContactDetails {
|
|
39
|
+
addressInfo?: string;
|
|
40
|
+
contactInfo?: string;
|
|
41
|
+
emailInfo?: string;
|
|
42
|
+
_key?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface SocialLink {
|
|
45
|
+
socialMedia?: string | null;
|
|
46
|
+
socialMediaLink?: string | null;
|
|
47
|
+
_key?: string | null;
|
|
48
|
+
_type?: string | null;
|
|
49
|
+
socialMediaIcon?: {
|
|
50
|
+
alt?: string;
|
|
51
|
+
image?: string;
|
|
52
|
+
} | null;
|
|
53
|
+
socialMediaPlatform?: string | null;
|
|
54
|
+
}
|
|
55
|
+
export interface LabeledRouteWithKey extends LabeledRoute {
|
|
56
|
+
_key?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface ArrayOfImageTitleAndText {
|
|
59
|
+
mainImage?: {
|
|
60
|
+
alt?: string;
|
|
61
|
+
image?: string;
|
|
62
|
+
};
|
|
63
|
+
plainText?: string;
|
|
64
|
+
title?: string;
|
|
65
|
+
_key?: string;
|
|
66
|
+
_type?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface FeaturedItem {
|
|
69
|
+
description?: string;
|
|
70
|
+
mainImage?: MainImage;
|
|
71
|
+
title?: string;
|
|
72
|
+
subtitle?: string;
|
|
73
|
+
_key?: string;
|
|
74
|
+
_type?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface ArrayOfTitleAndText {
|
|
77
|
+
_key?: string;
|
|
78
|
+
plainText?: string;
|
|
79
|
+
title?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface BlogPost extends SanityBody {
|
|
82
|
+
authors?: Author[] | null;
|
|
83
|
+
body?: any;
|
|
84
|
+
categories?: Category[] | null;
|
|
85
|
+
excerpt?: string | null;
|
|
86
|
+
link?: string | null;
|
|
87
|
+
mainImage?: string | null;
|
|
88
|
+
publishedAt?: string;
|
|
89
|
+
seo?: Seo | null;
|
|
90
|
+
slug?: SanitySlug | null;
|
|
91
|
+
title?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface Seo {
|
|
94
|
+
_type?: string;
|
|
95
|
+
seoTitle?: string;
|
|
96
|
+
seoDescription?: string;
|
|
97
|
+
seoImage?: string;
|
|
98
|
+
seoKeywords?: string;
|
|
99
|
+
seoSynonyms?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface SanitySlug {
|
|
102
|
+
current?: string;
|
|
103
|
+
_type?: "slug";
|
|
104
|
+
}
|
|
105
|
+
export interface SanityBody {
|
|
106
|
+
_createdAt?: string;
|
|
107
|
+
_id?: string;
|
|
108
|
+
_rev?: string;
|
|
109
|
+
_type?: string;
|
|
110
|
+
_updatedAt?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface Author extends SanityBody {
|
|
113
|
+
link?: string | null;
|
|
114
|
+
bio?: string | null;
|
|
115
|
+
name?: string | null;
|
|
116
|
+
slug?: SanitySlug | null;
|
|
117
|
+
image?: string | null;
|
|
118
|
+
profile?: {
|
|
119
|
+
alt: string;
|
|
120
|
+
image: string;
|
|
121
|
+
} | null;
|
|
122
|
+
}
|
|
123
|
+
export interface Category extends SanityBody {
|
|
124
|
+
title?: string;
|
|
125
|
+
}
|
|
126
|
+
export interface Form {
|
|
127
|
+
id?: string | null;
|
|
128
|
+
buttonLabel?: string | null;
|
|
129
|
+
name?: string | null;
|
|
130
|
+
subtitle?: string | null;
|
|
131
|
+
fields?: FormFields[] | null;
|
|
132
|
+
thankYouPage?: ThankYouPage | null;
|
|
133
|
+
}
|
|
134
|
+
export interface FormFields {
|
|
135
|
+
name?: string;
|
|
136
|
+
placeholder?: string;
|
|
137
|
+
pricingType?: string;
|
|
138
|
+
type?: FormTypes;
|
|
139
|
+
_key?: string;
|
|
140
|
+
_type?: string;
|
|
141
|
+
isRequired?: boolean;
|
|
142
|
+
label?: string;
|
|
143
|
+
items?: string[];
|
|
144
|
+
}
|
|
145
|
+
export type FormTypes = "inputText" | "inputEmail" | "inputPassword" | "inputNumber" | "textarea" | "inputFile" | "inputRadio" | "inputCheckbox" | "inputSelect";
|
|
146
|
+
export interface ThankYouPage {
|
|
147
|
+
externalLink?: string | null;
|
|
148
|
+
internalLink?: string | null;
|
|
149
|
+
linkInternal?: any;
|
|
150
|
+
linkTarget?: string;
|
|
151
|
+
linkType?: string;
|
|
152
|
+
type?: string;
|
|
153
|
+
}
|
|
154
|
+
export interface SectionsProps {
|
|
155
|
+
template?: Template;
|
|
156
|
+
data?: Sections;
|
|
157
|
+
variant?: string | null | undefined;
|
|
158
|
+
schema?: Variants;
|
|
159
|
+
}
|
|
160
|
+
export interface Sections extends SanityBody {
|
|
161
|
+
label?: string;
|
|
162
|
+
variant?: string;
|
|
163
|
+
variants?: Variants;
|
|
164
|
+
_key?: string;
|
|
165
|
+
}
|
|
166
|
+
export interface Variants {
|
|
167
|
+
template?: Template;
|
|
168
|
+
multipleMenus?: any;
|
|
169
|
+
arrayOfTitleAndText?: ArrayOfTitleAndText[] | null;
|
|
170
|
+
logo?: Logo | null;
|
|
171
|
+
primaryButton?: LabeledRoute | null;
|
|
172
|
+
secondaryButton?: LabeledRoute | null;
|
|
173
|
+
routes?: LabeledRouteWithKey[] | null;
|
|
174
|
+
menu?: LabeledRouteWithKey[] | null;
|
|
175
|
+
plans?: Plans[] | null;
|
|
176
|
+
formLinks?: LabeledRouteWithKey[] | null;
|
|
177
|
+
portfolios?: Portfolios[] | null;
|
|
178
|
+
portfoliosWithCategories?: PortfoliosWithCategories[] | null;
|
|
179
|
+
length?: number;
|
|
180
|
+
signInLink?: LabeledRoute | null;
|
|
181
|
+
signinLink?: LabeledRoute | null;
|
|
182
|
+
tags?: string[] | null;
|
|
183
|
+
posts?: BlogPost[] | null;
|
|
184
|
+
blogsPerPage?: number | null;
|
|
185
|
+
form?: Form | null;
|
|
186
|
+
collections?: Collection | null;
|
|
187
|
+
products?: CollectionProduct | null;
|
|
188
|
+
allProducts?: Collection[];
|
|
189
|
+
subtitle?: string | null;
|
|
190
|
+
caption?: string | null;
|
|
191
|
+
title?: string | null;
|
|
192
|
+
plainText?: string | null;
|
|
193
|
+
contactDescription?: string | null;
|
|
194
|
+
officeInformation?: string | null;
|
|
195
|
+
contactEmail?: string | null;
|
|
196
|
+
contactNumber?: string | null;
|
|
197
|
+
socialLinks?: SocialLink[] | null;
|
|
198
|
+
block?: any;
|
|
199
|
+
heading?: string | null;
|
|
200
|
+
acceptButtonLabel?: string | null;
|
|
201
|
+
declineButtonLabel?: string | null;
|
|
202
|
+
faqsWithCategories?: FaqsWithCategory[] | null;
|
|
203
|
+
faqs?: AskedQuestion[] | null;
|
|
204
|
+
arrayOfImageTitleAndText?: ArrayOfImageTitleAndText[] | null;
|
|
205
|
+
description?: string | null;
|
|
206
|
+
featuredItems?: FeaturedItem[] | null;
|
|
207
|
+
images?: Images[] | null;
|
|
208
|
+
contactDetails?: ContactDetails[] | null;
|
|
209
|
+
copyright?: string | null;
|
|
210
|
+
mainImage?: MainImage | null;
|
|
211
|
+
youtubeLink?: string | null;
|
|
212
|
+
banner?: any;
|
|
213
|
+
stats?: StatItems[] | null;
|
|
214
|
+
teams?: Team[] | null;
|
|
215
|
+
testimonials?: Testimonial[] | null;
|
|
216
|
+
selectStripeAccount?: string;
|
|
217
|
+
annualBilling?: string;
|
|
218
|
+
monthlyBilling?: string;
|
|
219
|
+
productDetails?: ProductDetail[];
|
|
220
|
+
btnLabel?: string;
|
|
221
|
+
selectAccount?: string;
|
|
222
|
+
hashtags?: string[];
|
|
223
|
+
numberOfPosts?: number;
|
|
224
|
+
text?: string;
|
|
225
|
+
button?: LabeledRoute;
|
|
226
|
+
features?: string[];
|
|
227
|
+
config?: {
|
|
228
|
+
enableAnalytics: boolean;
|
|
229
|
+
cookiePolicy?: {
|
|
230
|
+
siteName: string;
|
|
231
|
+
cookiePolicyPage: Reference;
|
|
232
|
+
};
|
|
233
|
+
consentModalPosition?: string;
|
|
234
|
+
};
|
|
235
|
+
contactLink?: LabeledRoute;
|
|
236
|
+
}
|
|
237
|
+
export interface Template {
|
|
238
|
+
bg?: string;
|
|
239
|
+
color?: string;
|
|
240
|
+
}
|
|
241
|
+
export type Plans = {
|
|
242
|
+
_key?: string | null;
|
|
243
|
+
_type?: "planItems" | null;
|
|
244
|
+
checkoutButtonName?: string | null;
|
|
245
|
+
description?: string | null;
|
|
246
|
+
monthlyPrice?: string | null;
|
|
247
|
+
planType?: string | null;
|
|
248
|
+
yearlyPrice?: string | null;
|
|
249
|
+
planIncludes?: string[] | null;
|
|
250
|
+
primaryButton?: LabeledRoute | null;
|
|
251
|
+
} & Record<string, string>;
|
|
252
|
+
export interface Portfolios {
|
|
253
|
+
dateAdded?: string | null;
|
|
254
|
+
mainImage?: {
|
|
255
|
+
image?: string | null;
|
|
256
|
+
alt?: string | null;
|
|
257
|
+
} | null;
|
|
258
|
+
primaryButton?: LabeledRoute | null;
|
|
259
|
+
title?: string | null;
|
|
260
|
+
_key?: string | null;
|
|
261
|
+
_type?: string | null;
|
|
262
|
+
}
|
|
263
|
+
export interface PortfoliosWithCategories {
|
|
264
|
+
category?: string | null;
|
|
265
|
+
content?: Content[] | null;
|
|
266
|
+
primaryButton?: LabeledRoute | null;
|
|
267
|
+
_key?: string | null;
|
|
268
|
+
_type?: string | null;
|
|
269
|
+
}
|
|
270
|
+
export interface Content extends Portfolios {
|
|
271
|
+
description?: string | null;
|
|
272
|
+
subtitle?: string | null;
|
|
273
|
+
}
|
|
274
|
+
export interface Collection extends SanityBody {
|
|
275
|
+
collectionInfoVariant?: {
|
|
276
|
+
variant?: string;
|
|
277
|
+
} | null;
|
|
278
|
+
name?: string | null;
|
|
279
|
+
products?: CollectionProduct[] | null;
|
|
280
|
+
sections?: any;
|
|
281
|
+
seo?: Seo | null;
|
|
282
|
+
slug?: SanitySlug | null;
|
|
283
|
+
}
|
|
284
|
+
export interface CollectionProduct extends SanityBody {
|
|
285
|
+
compareToPrice?: number | null;
|
|
286
|
+
description?: string | null;
|
|
287
|
+
ecwidProductId?: number | null;
|
|
288
|
+
name?: string | null;
|
|
289
|
+
price?: number | null;
|
|
290
|
+
productInfo?: ProductInfo | null;
|
|
291
|
+
productInfoVariant?: {
|
|
292
|
+
variant?: string;
|
|
293
|
+
} | null;
|
|
294
|
+
sections?: any;
|
|
295
|
+
seo?: Seo | null;
|
|
296
|
+
slug?: SanitySlug | null;
|
|
297
|
+
}
|
|
298
|
+
interface ProductInfo {
|
|
299
|
+
btnLabel?: string | null;
|
|
300
|
+
images?: ProductInfoImage[] | null;
|
|
301
|
+
productDetails?: ProductDetail[] | null;
|
|
302
|
+
socialLinks?: SocialLink[] | null;
|
|
303
|
+
subtitle?: string | null;
|
|
304
|
+
}
|
|
305
|
+
export interface ProductDetail {
|
|
306
|
+
blockContent?: any;
|
|
307
|
+
contentType?: string;
|
|
308
|
+
tabName?: string;
|
|
309
|
+
_key?: string;
|
|
310
|
+
[key: string]: any;
|
|
311
|
+
}
|
|
312
|
+
interface ProductInfoImage {
|
|
313
|
+
alt?: string | null;
|
|
314
|
+
_key: string;
|
|
315
|
+
_type: string;
|
|
316
|
+
image?: string | null;
|
|
317
|
+
}
|
|
318
|
+
export interface FaqsWithCategory {
|
|
319
|
+
askedQuestions?: AskedQuestion[] | null;
|
|
320
|
+
category?: string | null;
|
|
321
|
+
_key?: string;
|
|
322
|
+
_type?: string;
|
|
323
|
+
}
|
|
324
|
+
export interface AskedQuestion {
|
|
325
|
+
answer?: string | null;
|
|
326
|
+
question?: string | null;
|
|
327
|
+
hidden?: boolean;
|
|
328
|
+
_key?: string;
|
|
329
|
+
_type?: string;
|
|
330
|
+
}
|
|
331
|
+
export interface Team {
|
|
332
|
+
jobTitle?: string;
|
|
333
|
+
mainImage?: MainImage;
|
|
334
|
+
name?: string;
|
|
335
|
+
plainText?: string;
|
|
336
|
+
_key?: string;
|
|
337
|
+
_type?: string;
|
|
338
|
+
}
|
|
339
|
+
export interface Testimonial {
|
|
340
|
+
jobTitle?: string;
|
|
341
|
+
mainImage?: MainImage;
|
|
342
|
+
name?: string;
|
|
343
|
+
rating?: string;
|
|
344
|
+
testimony?: string;
|
|
345
|
+
_key?: string;
|
|
346
|
+
_type?: string;
|
|
347
|
+
}
|
|
348
|
+
export declare interface Reference {
|
|
349
|
+
_type: string;
|
|
350
|
+
_ref: string;
|
|
351
|
+
_key?: string;
|
|
352
|
+
_weak?: boolean;
|
|
353
|
+
_strengthenOnPublish?: {
|
|
354
|
+
type: string;
|
|
355
|
+
weak?: boolean;
|
|
356
|
+
template?: {
|
|
357
|
+
id: string;
|
|
358
|
+
params: Record<string, string | number | boolean>;
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
export {};
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var l=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var g=(n,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of a(t))!o.call(n,e)&&e!==r&&l(n,e,{get:()=>t[e],enumerable:!(i=s(t,e))||i.enumerable});return n};var u=n=>g(l({},"__esModule",{value:!0}),n);var c={};module.exports=u(c);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/signin-signup",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.12",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -34,27 +34,27 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
|
-
"@stackshift-ui/scripts": "7.0.0-beta.
|
|
38
|
-
"@stackshift-ui/system": "7.0.0-beta.
|
|
39
|
-
"@stackshift-ui/
|
|
40
|
-
"@stackshift-ui/
|
|
41
|
-
"@stackshift-ui/
|
|
42
|
-
"@stackshift-ui/
|
|
43
|
-
"@stackshift-ui/text": "7.0.0-beta.
|
|
44
|
-
"@stackshift-ui/
|
|
45
|
-
"@stackshift-ui/
|
|
46
|
-
"@stackshift-ui/form": "7.0.0-beta.
|
|
47
|
-
"@stackshift-ui/
|
|
48
|
-
"@stackshift-ui/
|
|
49
|
-
"@stackshift-ui/
|
|
50
|
-
"@stackshift-ui/
|
|
37
|
+
"@stackshift-ui/scripts": "7.0.0-beta.6",
|
|
38
|
+
"@stackshift-ui/system": "7.0.0-beta.7",
|
|
39
|
+
"@stackshift-ui/button": "7.0.0-beta.9",
|
|
40
|
+
"@stackshift-ui/card": "7.0.0-beta.7",
|
|
41
|
+
"@stackshift-ui/heading": "7.0.0-beta.7",
|
|
42
|
+
"@stackshift-ui/input": "7.0.0-beta.7",
|
|
43
|
+
"@stackshift-ui/text": "7.0.0-beta.7",
|
|
44
|
+
"@stackshift-ui/link": "7.0.0-beta.7",
|
|
45
|
+
"@stackshift-ui/form-field": "7.0.0-beta.8",
|
|
46
|
+
"@stackshift-ui/form": "7.0.0-beta.7",
|
|
47
|
+
"@stackshift-ui/image": "7.0.0-beta.8",
|
|
48
|
+
"@stackshift-ui/container": "7.0.0-beta.7",
|
|
49
|
+
"@stackshift-ui/section": "7.0.0-beta.7",
|
|
50
|
+
"@stackshift-ui/flex": "7.0.0-beta.7"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@types/react": "16.8 - 19",
|
|
54
54
|
"next": "10 - 14",
|
|
55
55
|
"react": "16.8 - 19",
|
|
56
56
|
"react-dom": "16.8 - 19",
|
|
57
|
-
"@stackshift-ui/system": ">=7.0.0-beta.
|
|
57
|
+
"@stackshift-ui/system": ">=7.0.0-beta.7"
|
|
58
58
|
},
|
|
59
59
|
"peerDependenciesMeta": {
|
|
60
60
|
"next": {
|