@stackshift-ui/signin-signup 7.0.0-beta.0 → 7.0.0-beta.10

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/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.0",
4
+ "version": "7.0.0-beta.10",
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/system": "6.1.0-beta.0",
38
- "@stackshift-ui/card": "7.0.0-beta.0",
39
- "@stackshift-ui/heading": "7.0.0-beta.0",
40
- "@stackshift-ui/button": "6.1.0-beta.0",
41
- "@stackshift-ui/input": "7.0.0-beta.0",
42
- "@stackshift-ui/scripts": "6.1.0-beta.0",
43
- "@stackshift-ui/text": "7.0.0-beta.0",
44
- "@stackshift-ui/form": "7.0.0-beta.0",
45
- "@stackshift-ui/link": "6.0.12-beta.0",
46
- "@stackshift-ui/image": "6.1.0-beta.0",
47
- "@stackshift-ui/form-field": "7.0.0-beta.0",
48
- "@stackshift-ui/section": "7.0.0-beta.0",
49
- "@stackshift-ui/container": "7.0.0-beta.0",
50
- "@stackshift-ui/flex": "7.0.0-beta.0"
37
+ "@stackshift-ui/scripts": "7.0.0-beta.4",
38
+ "@stackshift-ui/system": "7.0.0-beta.5",
39
+ "@stackshift-ui/card": "7.0.0-beta.5",
40
+ "@stackshift-ui/button": "7.0.0-beta.7",
41
+ "@stackshift-ui/input": "7.0.0-beta.5",
42
+ "@stackshift-ui/link": "7.0.0-beta.5",
43
+ "@stackshift-ui/text": "7.0.0-beta.5",
44
+ "@stackshift-ui/image": "7.0.0-beta.6",
45
+ "@stackshift-ui/section": "7.0.0-beta.5",
46
+ "@stackshift-ui/form": "7.0.0-beta.5",
47
+ "@stackshift-ui/form-field": "7.0.0-beta.6",
48
+ "@stackshift-ui/flex": "7.0.0-beta.5",
49
+ "@stackshift-ui/container": "7.0.0-beta.5",
50
+ "@stackshift-ui/heading": "7.0.0-beta.5"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@types/react": "16.8 - 19",
54
54
  "next": "10 - 14",
55
55
  "react": "16.8 - 19",
56
56
  "react-dom": "16.8 - 19",
57
- "@stackshift-ui/system": ">=6.1.0-beta.0"
57
+ "@stackshift-ui/system": ">=7.0.0-beta.5"
58
58
  },
59
59
  "peerDependenciesMeta": {
60
60
  "next": {
@@ -1,9 +1,11 @@
1
- import React, { lazy } from "react";
2
- import { SectionsProps, Logo, LabeledRoute, LabeledRouteWithKey, Form } from "./types";
1
+ import React from "react";
2
+ import SigninSignupA from "./signin_signup_a";
3
+ import SigninSignupB from "./signin_signup_b";
4
+ import { Form, LabeledRoute, LabeledRouteWithKey, Logo, SectionsProps } from "./types";
3
5
 
4
6
  const Variants = {
5
- variant_a: lazy(() => import("./signin_signup_a")),
6
- variant_b: lazy(() => import("./signin_signup_b")),
7
+ variant_a: SigninSignupA,
8
+ variant_b: SigninSignupB,
7
9
  };
8
10
 
9
11
  export interface SignUpFormProps {
@@ -8,20 +8,19 @@ import { Image } from "@stackshift-ui/image";
8
8
  import { Input } from "@stackshift-ui/input";
9
9
  import { Link } from "@stackshift-ui/link";
10
10
  import { Section } from "@stackshift-ui/section";
11
+ import { buildSanityLink } from "@stackshift-ui/system";
11
12
  import { Text } from "@stackshift-ui/text";
12
13
  import React from "react";
13
-
14
- import { buildSanityLink } from "@stackshift-ui/system";
15
14
  import { SignUpFormProps } from ".";
16
15
  import { logoLink, thankYouPageLink } from "./helper";
17
16
  import { LabeledRoute, LabeledRouteWithKey, Logo, Form as iForm } from "./types";
18
17
 
19
18
  export default function SigninSignup_A({ logo, form, formLinks, signInLink }: SignUpFormProps) {
20
19
  return (
21
- <Section className="py-10 rounded-md bg-gray-50 lg:py-20">
22
- <Container maxWidth={576} className="px-4">
20
+ <Section className="py-10 rounded-md lg:py-20">
21
+ <Container maxWidth={576}>
23
22
  <LogoSection logo={logo} />
24
- <Container className="mb-6 px-4 text-center lg:mb-10">
23
+ <Container className="mb-6 text-center lg:mb-10">
25
24
  <SubtitleAndHeadingText form={form} />
26
25
  <SignupForm
27
26
  form={form}
@@ -129,14 +128,14 @@ function FormFields({
129
128
  }) {
130
129
  return (
131
130
  <>
132
- <Flex wrap className="-mx-2">
131
+ <Flex wrap className="-mx-2 lg:gap-0 gap-3">
133
132
  {form?.fields?.slice(0, 2).map((formFields, index) => (
134
- <div className="w-full px-2 mb-3 lg:w-1/2" key={index}>
133
+ <div className="w-full px-2 lg:w-1/2" key={index}>
135
134
  {formFields.type === "inputText" ? (
136
135
  <Input
137
136
  placeholder={formFields?.placeholder}
138
137
  required={formFields?.isRequired}
139
- className="w-full py-4 text-xs bg-white"
138
+ className="w-full py-4 text-base bg-white"
140
139
  name={formFields?.name}
141
140
  aria-label={formFields?.label}
142
141
  {...formFields}
@@ -144,7 +143,7 @@ function FormFields({
144
143
  />
145
144
  ) : (
146
145
  <FormField
147
- className="py-4"
146
+ className="py-4 bg-white"
148
147
  textSize="sm"
149
148
  noLabel
150
149
  variant="primary"
@@ -169,7 +168,7 @@ function FormFields({
169
168
  />
170
169
  ) : (
171
170
  <FormField
172
- className="py-4"
171
+ className="py-4 bg-white"
173
172
  textSize="sm"
174
173
  noLabel
175
174
  variant="primary"
@@ -190,23 +189,15 @@ function FormFields({
190
189
  function SignInLink({ signInLink }: { signInLink?: LabeledRoute }) {
191
190
  if (!signInLink?.label) return null;
192
191
 
193
- const link = buildSanityLink({
194
- type: signInLink?.type ?? "",
195
- internalLink: signInLink?.internalLink ?? "",
196
- externalLink: signInLink?.externalLink ?? "",
197
- });
198
-
199
192
  return (
200
193
  <div className="w-full text-center mt-3">
201
194
  <span className="text-xs text-gray-500">Already have an account? </span>
202
195
  <Button
196
+ as="link"
197
+ link={signInLink}
203
198
  variant="link"
204
- className="text-xs text-primary cursor-pointer hover:underline"
205
- aria-label={signInLink?.label}
206
- asChild>
207
- <Link href={link.href} target={link.target} rel={link.rel}>
208
- {signInLink?.label}
209
- </Link>
199
+ className="text-xs text-primary cursor-pointer hover:underline">
200
+ {signInLink?.label}
210
201
  </Button>
211
202
  </div>
212
203
  );
@@ -222,9 +213,9 @@ function PasswordField({
222
213
  togglePassword: () => void;
223
214
  }) {
224
215
  return (
225
- <div className="flex flex-col sm:flex-row gap-2 sm:items-center">
216
+ <div className="flex flex-col sm:flex-row gap-2 sm:items-center relative">
226
217
  <Input
227
- className="py-4"
218
+ className="py-4 bg-white pr-12"
228
219
  aria-label={formFields?.placeholder ?? formFields?.name}
229
220
  type={showPassword ? "text" : "password"}
230
221
  placeholder={formFields?.placeholder}
@@ -235,7 +226,7 @@ function PasswordField({
235
226
  <Button
236
227
  variant="unstyled"
237
228
  aria-label={showPassword ? "Show password" : "Hide password"}
238
- className="focus:outline-none"
229
+ className="focus:outline-none px-0 py-0 absolute right-4"
239
230
  type="button"
240
231
  onClick={togglePassword}>
241
232
  <span className="block sm:hidden text-right">{showPassword ? "Hide" : "Show"}</span>
@@ -252,32 +243,22 @@ function FormLinks({ formLinks }: { formLinks?: LabeledRouteWithKey[] }) {
252
243
 
253
244
  return (
254
245
  <p className="mt-10 lg:mt-3 text-xs text-center text-gray-700">
255
- {formLinks?.map((link: any, index: number, { length }: any) => {
256
- const linkObj = buildSanityLink({
257
- type: link?.type ?? "",
258
- internalLink: link?.internalLink ?? "",
259
- externalLink: link?.externalLink ?? "",
260
- });
261
-
262
- return (
263
- <span key={index}>
264
- <Button
265
- variant="link"
266
- className="text-xs text-primary cursor-pointer hover:underline"
267
- aria-label={link?.label}
268
- asChild>
269
- <Link href={linkObj.href} target={linkObj.target} rel={linkObj.rel}>
270
- {link?.label}
271
- </Link>
272
- </Button>
273
- {index === length - 1 ? null : index === length - 2 ? (
274
- <span>&nbsp;and&nbsp;</span>
275
- ) : (
276
- <span>&nbsp;,&nbsp;</span>
277
- )}
278
- </span>
279
- );
280
- })}
246
+ {formLinks?.map((link_: any, index: number, { length }: any) => (
247
+ <span key={index}>
248
+ <Button
249
+ as="link"
250
+ link={link_}
251
+ variant="link"
252
+ className="text-xs text-primary cursor-pointer hover:underline">
253
+ {link_?.label}
254
+ </Button>
255
+ {index === length - 1 ? null : index === length - 2 ? (
256
+ <span>&nbsp;and&nbsp;</span>
257
+ ) : (
258
+ <span>&nbsp;,&nbsp;</span>
259
+ )}
260
+ </span>
261
+ ))}
281
262
  </p>
282
263
  );
283
264
  }
@@ -287,7 +268,7 @@ function PasswordIcon({ showPassword }: { showPassword: boolean }) {
287
268
  <>
288
269
  {showPassword ? (
289
270
  <svg
290
- className="w-5 h-5 my-auto ml-4 text-gray-500"
271
+ className="w-5 h-5 my-auto text-gray-500"
291
272
  xmlns="http://www.w3.org/2000/svg"
292
273
  aria-hidden="true"
293
274
  role="img"
@@ -303,7 +284,7 @@ function PasswordIcon({ showPassword }: { showPassword: boolean }) {
303
284
  </svg>
304
285
  ) : (
305
286
  <svg
306
- className="w-5 h-5 my-auto ml-4 text-gray-500"
287
+ className="w-5 h-5 my-auto text-gray-500"
307
288
  xmlns="http://www.w3.org/2000/svg"
308
289
  aria-hidden="true"
309
290
  role="img"
@@ -166,19 +166,20 @@ function PasswordField({
166
166
  togglePassword: () => void;
167
167
  }) {
168
168
  return (
169
- <div className="flex flex-col sm:flex-row gap-2 items-center">
169
+ <div className="flex flex-col sm:flex-row gap-2 items-center relative">
170
170
  <Input
171
171
  aria-label={formFields?.placeholder ?? formFields?.name}
172
172
  type={showPassword ? "text" : "password"}
173
173
  placeholder={formFields?.placeholder}
174
174
  name={formFields?.name}
175
175
  required={formFields?.isRequired}
176
+ className="pr-12"
176
177
  />
177
178
  {/* SVG icon on the right of the password input field */}
178
179
  <Button
179
180
  variant="unstyled"
180
181
  aria-label={showPassword ? "Show password" : "Hide password"}
181
- className="focus:outline-none"
182
+ className="focus:outline-none px-0 py-0 absolute right-4"
182
183
  type="button"
183
184
  onClick={togglePassword}>
184
185
  <span className="block sm:hidden text-right">{showPassword ? "Hide" : "Show"}</span>
@@ -207,23 +208,15 @@ function FormButtonLabel({ form }: { form?: iForm }) {
207
208
  function SigninLink({ signInLink }: { signInLink?: LabeledRoute }) {
208
209
  if (!signInLink?.label) return null;
209
210
 
210
- const link = buildSanityLink({
211
- type: signInLink?.type ?? "",
212
- internalLink: signInLink?.internalLink ?? "",
213
- externalLink: signInLink?.externalLink ?? "",
214
- });
215
-
216
211
  return (
217
212
  <span className="text-xs text-gray-900">
218
213
  <span>Already have an account?</span>{" "}
219
214
  <Button
215
+ as="link"
216
+ link={signInLink}
220
217
  variant="link"
221
- className="text-xs text-primary hover:underline"
222
- aria-label={signInLink?.label}
223
- asChild>
224
- <Link href={link.href} target={link.target} rel={link.rel}>
225
- {signInLink?.label}
226
- </Link>
218
+ className="text-xs text-primary hover:underline">
219
+ {signInLink?.label}
227
220
  </Button>
228
221
  </span>
229
222
  );
@@ -234,32 +227,24 @@ function FormLinks({ formLinks }: { formLinks?: LabeledRoute[] }) {
234
227
 
235
228
  return (
236
229
  <p className="text-xs text-center text-secondary-foreground">
237
- {formLinks?.map((link, index, { length }) => {
238
- const linkObj = buildSanityLink({
239
- type: link?.type ?? "",
240
- internalLink: link?.internalLink ?? "",
241
- externalLink: link?.externalLink ?? "",
242
- });
243
-
244
- return (
245
- <span key={index}>
246
- <Button
247
- variant="link"
248
- className="text-xs underline text-secondary-foreground hover:text-gray-50"
249
- aria-label={link?.label}
250
- asChild>
251
- <Link href={linkObj?.href} target={linkObj?.target} rel={linkObj?.rel}>
252
- {link?.label}
253
- </Link>
254
- </Button>
255
- {index === length - 1 ? null : index === length - 2 ? (
256
- <span>&nbsp;and&nbsp;</span>
257
- ) : (
258
- <span>&nbsp;,&nbsp;</span>
259
- )}
260
- </span>
261
- );
262
- })}
230
+ {formLinks?.map((link_, index, { length }) => (
231
+ <span key={index}>
232
+ <Button
233
+ as="link"
234
+ link={link_}
235
+ variant="link"
236
+ className="text-xs underline text-secondary-foreground hover:text-gray-50"
237
+ aria-label={link_?.label}
238
+ asChild>
239
+ {link_?.label}
240
+ </Button>
241
+ {index === length - 1 ? null : index === length - 2 ? (
242
+ <span>&nbsp;and&nbsp;</span>
243
+ ) : (
244
+ <span>&nbsp;,&nbsp;</span>
245
+ )}
246
+ </span>
247
+ ))}
263
248
  </p>
264
249
  );
265
250
  }
@@ -1 +0,0 @@
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};
@@ -1 +0,0 @@
1
- import{lazy as x}from"react";import{jsx as I}from"react/jsx-runtime";var i={variant_a:x(()=>import("./signin_signup_a.mjs")),variant_b:x(()=>import("./signin_signup_b.mjs"))},P="SigninSignup",h=({data:n})=>{var r,s,u,t,f,l,p,m,g,L,c,v,b,y,R,k,S,B;let e=n==null?void 0:n.variant,o=e&&(i==null?void 0:i[e]),F={logo:(s=(r=n==null?void 0:n.variants)==null?void 0:r.logo)!=null?s:void 0,title:(t=(u=n==null?void 0:n.variants)==null?void 0:u.title)!=null?t:void 0,subtitle:(l=(f=n==null?void 0:n.variants)==null?void 0:f.subtitle)!=null?l:void 0,text:(m=(p=n==null?void 0:n.variants)==null?void 0:p.plainText)!=null?m:void 0,firstButton:(L=(g=n==null?void 0:n.variants)==null?void 0:g.primaryButton)!=null?L:void 0,secondButton:(v=(c=n==null?void 0:n.variants)==null?void 0:c.secondaryButton)!=null?v:void 0,formLinks:(y=(b=n==null?void 0:n.variants)==null?void 0:b.formLinks)!=null?y:void 0,signInLink:(k=(R=n==null?void 0:n.variants)==null?void 0:R.signinLink)!=null?k:void 0,form:(B=(S=n==null?void 0:n.variants)==null?void 0:S.form)!=null?B:void 0};return o?I(o,{...F}):null};h.displayName=P;export{h as a};
@@ -1 +0,0 @@
1
- import{a as b,b as y}from"./chunk-4DDN6JI4.mjs";import{Button as x}from"@stackshift-ui/button";import{Container as w}from"@stackshift-ui/container";import{Flex as S}from"@stackshift-ui/flex";import{Form as P}from"@stackshift-ui/form";import{FormField as g}from"@stackshift-ui/form-field";import{Heading as z}from"@stackshift-ui/heading";import{Image as R}from"@stackshift-ui/image";import{Input as v}from"@stackshift-ui/input";import{Link as A}from"@stackshift-ui/link";import{Section as L}from"@stackshift-ui/section";import{Text as C}from"@stackshift-ui/text";import M from"react";import{Fragment as N,jsx as e,jsxs as c}from"react/jsx-runtime";function d({logo:a,form:n,formLinks:u,signInLink:p}){return e(L,{className:"py-10 rounded-md bg-gray-50 lg:py-20",children:c(w,{maxWidth:576,className:"px-4",children:[e(q,{logo:a}),c(w,{className:"mb-6 px-4 text-center lg:mb-10",children:[e(B,{form:n}),e(T,{form:n,signInLink:p,thankYouPage:y(n==null?void 0:n.thankYouPage)})]}),e(V,{formLinks:u})]})})}function q({logo:a}){var n;return a?e("div",{className:"mb-10",children:e(A,{"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(R,{src:a==null?void 0:a.image,alt:(n=a==null?void 0:a.alt)!=null?n:"signup-logo",width:100,height:100,className:"flex justify-center mx-auto text-3xl font-bold leading-none"})})}):null}function B({form:a}){return c("div",{className:"mb-6",children:[a!=null&&a.subtitle?e(C,{muted:!0,children:a==null?void 0:a.subtitle}):null,a!=null&&a.name?e(z,{className:"text-2xl lg:text-2xl",children:a==null?void 0:a.name}):null]})}function T({form:a,signInLink:n,thankYouPage:u}){var l,s;if(!(a!=null&&a.fields))return null;let[p,i]=M.useState({}),t=h=>{i(r=>({...r,[h]:!r[h]}))};return c(P,{id:(l=a==null?void 0:a.id)!=null?l:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:u,children:[e(Y,{form:a,showPasswords:p,togglePasswordVisibility:t}),e("div",{children:e("div",{className:"webriq-recaptcha"})}),e("div",{className:"text-center",children:(a==null?void 0:a.buttonLabel)&&e(x,{as:"button",variant:"custom",ariaLabel:(s=a==null?void 0:a.buttonLabel)!=null?s:"Sign Up form submit button",className:"w-full py-4 text-sm font-bold tex-gray-50",type:"submit",children:a==null?void 0:a.buttonLabel})}),n&&e(H,{signInLink:n})]})}function Y({form:a,showPasswords:n,togglePasswordVisibility:u}){var p,i;return c(N,{children:[e(S,{wrap:!0,className:"-mx-2",children:(p=a==null?void 0:a.fields)==null?void 0:p.slice(0,2).map((t,l)=>{var s;return e("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:t.type==="inputText"?e(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(g,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",name:(s=t==null?void 0:t.name)!=null?s:"",placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},l)})}),(i=a==null?void 0:a.fields)==null?void 0:i.slice(2).map((t,l)=>{var s;return e("div",{className:"my-3",children:t.type==="inputPassword"&&t.name?e(U,{formFields:t,showPassword:n[t.name]||!1,togglePassword:()=>u(t.name)}):e(g,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,name:(s=t==null?void 0:t.name)!=null?s:"",items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},l)})]})}function H({signInLink:a}){return a!=null&&a.label?c("div",{className:"w-full text-center mt-3",children:[e("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),e(x,{as:"link",variant:"link",link:a,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:a==null?void 0:a.label,children:a==null?void 0:a.label})]}):null}function U({formFields:a,showPassword:n,togglePassword:u}){var p;return c("div",{className:"flex flex-col sm:flex-row gap-2 sm:items-center",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}),c(x,{variant:"unstyled",as:"button",ariaLabel:n?"Show password":"Hide password",className:"focus:outline-none",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(k,{showPassword:n})})]})]})}function V({formLinks:a}){return a?e("p",{className:"mt-10 lg:mt-3 text-xs text-center text-gray-700",children:a==null?void 0:a.map((n,u,{length:p})=>c("span",{children:[e(x,{as:"link",variant:"link",link:n,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:n==null?void 0:n.label,children:n==null?void 0:n.label}),u===p-1?null:u===p-2?e("span",{children:"\xA0and\xA0"}):e("span",{children:"\xA0,\xA0"})]},u))}):null}function k({showPassword:a}){return e(N,{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{d as a};
@@ -1 +0,0 @@
1
- import{a as b,b as w}from"./chunk-4DDN6JI4.mjs";import{Button as x}from"@stackshift-ui/button";import{Card as o}from"@stackshift-ui/card";import{Container as y}from"@stackshift-ui/container";import{Flex as d}from"@stackshift-ui/flex";import{Form as N}from"@stackshift-ui/form";import{FormField as v}from"@stackshift-ui/form-field";import{Heading as P}from"@stackshift-ui/heading";import{Image as S}from"@stackshift-ui/image";import{Input as C}from"@stackshift-ui/input";import{Link as R}from"@stackshift-ui/link";import{Section as L}from"@stackshift-ui/section";import{Text as M}from"@stackshift-ui/text";import g from"react";import{jsx as e,jsxs as c}from"react/jsx-runtime";function A({logo:a,form:n,formLinks:u,signInLink:p}){return e(L,{className:"py-10 bg-primary lg:py-20",children:e(y,{maxWidth:1280,children:c(y,{maxWidth:576,children:[e(B,{logo:a}),c(o,{borderRadius:"md",className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[e(m,{form:n}),e(z,{form:n,signInLink:p})]}),e(V,{formLinks:u})]})})})}function B({logo:a}){var n;return a?e("div",{className:"mb-10",children:e(R,{"aria-label":`Go to ${b(a)==="/"?"home page":b(a)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:b(a),target:a==null?void 0:a.linkTarget,rel:(a==null?void 0:a.linkTarget)==="_blank"?"noopener noreferrer":"",children:e(S,{src:a==null?void 0:a.image,alt:(n=a==null?void 0:a.alt)!=null?n:"signup-logo",width:100,height:100,className:"flex justify-center text-3xl font-bold leading-none text-white"})})}):null}function m({form:a}){return c("div",{className:"mb-6 text-center sm:text-left",children:[e(M,{muted:!0,className:"text-sm lg:text-base",children:a==null?void 0:a.subtitle}),e(P,{className:"text-xl lg:text-2xl",children:a==null?void 0:a.name})]})}function z({form:a,signInLink:n}){var s;if(!(a!=null&&a.fields))return null;let[u,p]=g.useState({}),l=r=>{p(t=>({...t,[r]:!t[r]}))};return c(N,{id:(s=a==null?void 0:a.id)!=null?s:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:w(a==null?void 0:a.thankYouPage),children:[e(q,{form:a,showPassword:u,togglePasswordVisibility:l}),e("div",{children:e("div",{className:"webriq-recaptcha"})}),c("div",{className:"text-center",children:[e(T,{form:a}),e(U,{signInLink:n})]})]})}function q({form:a,showPassword:n,togglePasswordVisibility:u}){var p,l,s,r;return c(g.Fragment,{children:[e(d,{className:"flex-col lg:flex-row gap-3",children:(l=(p=a==null?void 0:a.fields)==null?void 0:p.slice(0,2))==null?void 0:l.map((t,h)=>{var i;return e("div",{className:"w-full",children:e(v,{noLabel:!0,variant:"secondary",placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,name:(i=t==null?void 0:t.name)!=null?i:"",items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},h)})}),(r=(s=a==null?void 0:a.fields)==null?void 0:s.slice(2))==null?void 0:r.map((t,h)=>{var i;return e("div",{className:"my-3",children:(t==null?void 0:t.type)==="inputPassword"&&t.name?e(H,{formFields:t,showPassword:n[t.name]||!1,togglePassword:()=>u(t.name)}):e(v,{noLabel:!0,variant:"secondary",name:(i=t==null?void 0:t.name)!=null?i:"",placeholder:t==null?void 0:t.placeholder,required:t==null?void 0:t.isRequired,items:t==null?void 0:t.items,type:t==null?void 0:t.type,...t})},h)})]})}function H({formFields:a,showPassword:n,togglePassword:u}){var p;return c("div",{className:"flex flex-col sm:flex-row gap-2 items-center",children:[e(C,{noLabel:!0,ariaLabel:(p=a==null?void 0:a.placeholder)!=null?p:a==null?void 0:a.name,variant:"secondary",type:n?"text":"password",placeholder:a==null?void 0:a.placeholder,name:a==null?void 0:a.name,required:a==null?void 0:a.isRequired}),c(x,{variant:"unstyled",as:"button",ariaLabel:n?"Show password":"Hide password",className:"focus:outline-none",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(Y,{showPassword:n})})]})]})}function T({form:a}){var n;return a!=null&&a.buttonLabel?e(x,{as:"button",className:"w-full py-4 mb-3",ariaLabel:(n=a==null?void 0:a.buttonLabel)!=null?n:"Sign Up form submit button",variant:"custom",type:"submit",children:a==null?void 0:a.buttonLabel}):null}function U({signInLink:a}){return a!=null&&a.label?c("span",{className:"text-xs text-gray-900",children:[e("span",{children:"Already have an account?"})," ",e(x,{as:"link",variant:"link",link:a,className:"text-xs text-primary hover:underline",ariaLabel:a==null?void 0:a.label,children:a==null?void 0:a.label})]}):null}function V({formLinks:a}){return a?e("p",{className:"text-xs text-center text-secondary-foreground",children:a==null?void 0:a.map((n,u,{length:p})=>c("span",{children:[e(x,{as:"link",variant:"link",link:n,className:"text-xs underline text-secondary-foreground hover:text-gray-50",ariaLabel:n==null?void 0:n.label,children:n==null?void 0:n.label}),u===p-1?null:u===p-2?e("span",{children:"\xA0and\xA0"}):e("span",{children:"\xA0,\xA0"})]},u))}):null}function Y({showPassword:a}){return e(g.Fragment,{children:a?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: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 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:c("g",{fill:"currentColor",children:[e("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),e("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}export{A as a};
@@ -1,3 +0,0 @@
1
- import { Logo } from "../types";
2
- export declare const logoLink: (logo: Logo) => string;
3
- export declare const thankYouPageLink: (link: any) => any;
@@ -1 +0,0 @@
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});
@@ -1 +0,0 @@
1
- import{a,b}from"../chunk-4DDN6JI4.mjs";export{a as logoLink,b as thankYouPageLink};
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from "./signin-signup";
2
- export * from "./signin_signup_a";
3
- export * from "./signin_signup_b";
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";var ht=Object.create;var w=Object.defineProperty;var yt=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,gt=Object.prototype.hasOwnProperty;var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var o=(t,e)=>{for(var s in e)w(t,s,{get:e[s],enumerable:!0})},E=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of wt(e))!gt.call(t,r)&&r!==s&&w(t,r,{get:()=>e[r],enumerable:!(i=yt(e,r))||i.enumerable});return t};var D=(t,e,s)=>(s=t!=null?ht(vt(t)):{},E(e||!t||!t.__esModule?w(s,"default",{value:t,enumerable:!0}):s,t)),Nt=t=>E(w({},"__esModule",{value:!0}),t);var x,v,L=N(()=>{"use strict";x=t=>{var e,s,i;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(s=(e=t==null?void 0:t.internalLink)==null?void 0:e.toLowerCase())!=null&&s.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(i=t==null?void 0:t.externalLink)!=null?i:"/"},v=t=>t?(t==null?void 0:t.linkType)==="linkInternal"?`/${t==null?void 0:t.internalLink}`:t==null?void 0:t.externalLink:"/thank-you"});var tt={};o(tt,{SigninSignup_A:()=>m,default:()=>m});function m({logo:t,form:e,formLinks:s,signInLink:i}){return(0,n.jsx)(I.Section,{className:"py-10 rounded-md bg-gray-50 lg:py-20",children:(0,n.jsxs)(S.Container,{maxWidth:576,className:"px-4",children:[(0,n.jsx)(ot,{logo:t}),(0,n.jsxs)(S.Container,{className:"mb-6 px-4 text-center lg:mb-10",children:[(0,n.jsx)(Lt,{form:e}),(0,n.jsx)(St,{form:e,signInLink:i,thankYouPage:v(e==null?void 0:e.thankYouPage)})]}),(0,n.jsx)(Ct,{formLinks:s})]})})}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 ${x(t)==="/"?"home page":x(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:x(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,n.jsx)(X.Image,{src:t==null?void 0:t.image,alt:(e=t==null?void 0:t.alt)!=null?e:"signup-logo",width:100,height:100,className:"flex justify-center mx-auto text-3xl font-bold leading-none"})})}):null}function Lt({form:t}){return(0,n.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,n.jsx)(F.Text,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?(0,n.jsx)(Q.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function St({form:t,signInLink:e,thankYouPage:s}){var c,p;if(!(t!=null&&t.fields))return null;let[i,r]=f.default.useState({}),a=l=>{r(b=>({...b,[l]:!b[l]}))};return(0,n.jsxs)(O.Form,{id:(c=t==null?void 0:t.id)!=null?c:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:s,children:[(0,n.jsx)(Pt,{form:t,showPasswords:i,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,{as:"button",variant:"custom",ariaLabel:(p=t==null?void 0:t.buttonLabel)!=null?p:"Sign Up form submit button",className:"w-full py-4 text-sm font-bold tex-gray-50",type:"submit",children:t==null?void 0:t.buttonLabel})}),e&&(0,n.jsx)(Rt,{signInLink:e})]})}function Pt({form:t,showPasswords:e,togglePasswordVisibility:s}){var i,r;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(J.Flex,{wrap:!0,className:"-mx-2",children:(i=t==null?void 0:t.fields)==null?void 0:i.slice(0,2).map((a,c)=>{var p;return(0,n.jsx)("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:a.type==="inputText"?(0,n.jsx)(R.Input,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,className:"w-full py-4 text-xs bg-white",name:a==null?void 0:a.name,ariaLabel:a==null?void 0:a.label,...a,type:"text"}):(0,n.jsx)(P.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",name:(p=a==null?void 0:a.name)!=null?p:"",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 p;return(0,n.jsx)("div",{className:"my-3",children:a.type==="inputPassword"&&a.name?(0,n.jsx)(mt,{formFields:a,showPassword:e[a.name]||!1,togglePassword:()=>s(a.name)}):(0,n.jsx)(P.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,name:(p=a==null?void 0:a.name)!=null?p:"",items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},c)})]})}function Rt({signInLink:t}){return t!=null&&t.label?(0,n.jsxs)("div",{className:"w-full text-center mt-3",children:[(0,n.jsx)("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),(0,n.jsx)(h.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function mt({formFields:t,showPassword:e,togglePassword:s}){var i;return(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 sm:items-center",children:[(0,n.jsx)(R.Input,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(i=t==null?void 0:t.placeholder)!=null?i:t==null?void 0:t.name,variant:"primary",type:e?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,n.jsxs)(h.Button,{variant:"unstyled",as:"button",ariaLabel:e?"Show password":"Hide password",className:"focus:outline-none",type:"button",onClick:s,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)(zt,{showPassword:e})})]})]})}function Ct({formLinks:t}){return t?(0,n.jsx)("p",{className:"mt-10 lg:mt-3 text-xs text-center text-gray-700",children:t==null?void 0:t.map((e,s,{length:i})=>(0,n.jsxs)("span",{children:[(0,n.jsx)(h.Button,{as:"link",variant:"link",link:e,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),s===i-1?null:s===i-2?(0,n.jsx)("span",{children:"\xA0and\xA0"}):(0,n.jsx)("span",{children:"\xA0,\xA0"})]},s))}):null}function zt({showPassword:t}){return(0,n.jsx)(n.Fragment,{children:t?(0,n.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,n.jsxs)("g",{fill:"currentColor",children:[(0,n.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,n.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,n.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,n.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,n.jsxs)("g",{fill:"currentColor",children:[(0,n.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,n.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}var h,S,J,O,P,Q,X,R,Z,I,F,f,n,C=N(()=>{"use strict";h=require("@stackshift-ui/button"),S=require("@stackshift-ui/container"),J=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"),R=require("@stackshift-ui/input"),Z=require("@stackshift-ui/link"),I=require("@stackshift-ui/section"),F=require("@stackshift-ui/text"),f=D(require("react"));L();n=require("react/jsx-runtime")});var bt={};o(bt,{SigninSignup_B:()=>A,default:()=>A});function A({logo:t,form:e,formLinks:s,signInLink:i}){return(0,u.jsx)(I.Section,{className:"py-10 bg-primary lg:py-20",children:(0,u.jsx)(S.Container,{maxWidth:1280,children:(0,u.jsxs)(S.Container,{maxWidth:576,children:[(0,u.jsx)(Bt,{logo:t}),(0,u.jsxs)(et.Card,{borderRadius:"md",className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[(0,u.jsx)(At,{form:e}),(0,u.jsx)(Mt,{form:e,signInLink:i})]}),(0,u.jsx)(Yt,{formLinks:s})]})})})}function Bt({logo:t}){var e;return t?(0,u.jsx)("div",{className:"mb-10",children:(0,u.jsx)(Z.Link,{"aria-label":`Go to ${x(t)==="/"?"home page":x(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:x(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,u.jsx)(X.Image,{src:t==null?void 0:t.image,alt:(e=t==null?void 0:t.alt)!=null?e:"signup-logo",width:100,height:100,className:"flex justify-center text-3xl font-bold leading-none text-white"})})}):null}function At({form:t}){return(0,u.jsxs)("div",{className:"mb-6 text-center sm:text-left",children:[(0,u.jsx)(F.Text,{muted:!0,className:"text-sm lg:text-base",children:t==null?void 0:t.subtitle}),(0,u.jsx)(Q.Heading,{className:"text-xl lg:text-2xl",children:t==null?void 0:t.name})]})}function Mt({form:t,signInLink:e}){var a;if(!(t!=null&&t.fields))return null;let[s,i]=g.default.useState({}),r=c=>{i(p=>({...p,[c]:!p[c]}))};return(0,u.jsxs)(O.Form,{id:(a=t==null?void 0:t.id)!=null?a:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:v(t==null?void 0:t.thankYouPage),children:[(0,u.jsx)(dt,{form:t,showPassword:s,togglePasswordVisibility:r}),(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)(kt,{signInLink:e})]})]})}function dt({form:t,showPassword:e,togglePasswordVisibility:s}){var i,r,a,c;return(0,u.jsxs)(g.default.Fragment,{children:[(0,u.jsx)(J.Flex,{className:"flex-col lg:flex-row gap-3",children:(r=(i=t==null?void 0:t.fields)==null?void 0:i.slice(0,2))==null?void 0:r.map((p,l)=>{var b;return(0,u.jsx)("div",{className:"w-full",children:(0,u.jsx)(P.FormField,{noLabel:!0,variant:"secondary",placeholder:p==null?void 0:p.placeholder,required:p==null?void 0:p.isRequired,name:(b=p==null?void 0:p.name)!=null?b:"",items:p==null?void 0:p.items,type:p==null?void 0:p.type,...p})},l)})}),(c=(a=t==null?void 0:t.fields)==null?void 0:a.slice(2))==null?void 0:c.map((p,l)=>{var b;return(0,u.jsx)("div",{className:"my-3",children:(p==null?void 0:p.type)==="inputPassword"&&p.name?(0,u.jsx)(qt,{formFields:p,showPassword:e[p.name]||!1,togglePassword:()=>s(p.name)}):(0,u.jsx)(P.FormField,{noLabel:!0,variant:"secondary",name:(b=p==null?void 0:p.name)!=null?b:"",placeholder:p==null?void 0:p.placeholder,required:p==null?void 0:p.isRequired,items:p==null?void 0:p.items,type:p==null?void 0:p.type,...p})},l)})]})}function qt({formFields:t,showPassword:e,togglePassword:s}){var i;return(0,u.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 items-center",children:[(0,u.jsx)(R.Input,{noLabel:!0,ariaLabel:(i=t==null?void 0:t.placeholder)!=null?i:t==null?void 0:t.name,variant:"secondary",type:e?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,u.jsxs)(y.Button,{variant:"unstyled",as:"button",ariaLabel:e?"Show password":"Hide password",className:"focus:outline-none",type:"button",onClick:s,children:[(0,u.jsx)("span",{className:"block sm:hidden text-right",children:e?"Hide":"Show"}),(0,u.jsx)("span",{className:"hidden sm:block",children:(0,u.jsx)(Ht,{showPassword:e})})]})]})}function Tt({form:t}){var e;return t!=null&&t.buttonLabel?(0,u.jsx)(y.Button,{as:"button",className:"w-full py-4 mb-3",ariaLabel:(e=t==null?void 0:t.buttonLabel)!=null?e:"Sign Up form submit button",variant:"custom",type:"submit",children:t==null?void 0:t.buttonLabel}):null}function kt({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,s,{length:i})=>(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}),s===i-1?null:s===i-2?(0,u.jsx)("span",{children:"\xA0and\xA0"}):(0,u.jsx)("span",{children:"\xA0,\xA0"})]},s))}):null}function Ht({showPassword:t}){return(0,u.jsx)(g.default.Fragment,{children:t?(0,u.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,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 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,u.jsxs)("g",{fill:"currentColor",children:[(0,u.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,u.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}var y,et,S,J,O,P,Q,X,R,Z,I,F,g,u,M=N(()=>{"use strict";y=require("@stackshift-ui/button"),et=require("@stackshift-ui/card"),g=D(require("react"));L();u=require("react/jsx-runtime")});var Vt={};o(Vt,{SigninSignup:()=>lt,SigninSignup_A:()=>m,SigninSignup_B:()=>A});module.exports=Nt(Vt);var q=require("react"),xt=require("react/jsx-runtime"),d={variant_a:(0,q.lazy)(()=>Promise.resolve().then(()=>(C(),tt))),variant_b:(0,q.lazy)(()=>Promise.resolve().then(()=>(M(),bt)))},Ut="SigninSignup",lt=({data:t})=>{var r,a,c,p,l,b,T,k,Y,H,U,V,W,_,K,$,G,j;let e=t==null?void 0:t.variant,s=e&&(d==null?void 0:d[e]),i={logo:(a=(r=t==null?void 0:t.variants)==null?void 0:r.logo)!=null?a:void 0,title:(p=(c=t==null?void 0:t.variants)==null?void 0:c.title)!=null?p:void 0,subtitle:(b=(l=t==null?void 0:t.variants)==null?void 0:l.subtitle)!=null?b:void 0,text:(k=(T=t==null?void 0:t.variants)==null?void 0:T.plainText)!=null?k:void 0,firstButton:(H=(Y=t==null?void 0:t.variants)==null?void 0:Y.primaryButton)!=null?H:void 0,secondButton:(V=(U=t==null?void 0:t.variants)==null?void 0:U.secondaryButton)!=null?V:void 0,formLinks:(_=(W=t==null?void 0:t.variants)==null?void 0:W.formLinks)!=null?_:void 0,signInLink:($=(K=t==null?void 0:t.variants)==null?void 0:K.signinLink)!=null?$:void 0,form:(j=(G=t==null?void 0:t.variants)==null?void 0:G.form)!=null?j:void 0};return s?(0,xt.jsx)(s,{...i}):null};lt.displayName=Ut;C();M();0&&(module.exports={SigninSignup,SigninSignup_A,SigninSignup_B});
package/dist/index.mjs DELETED
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";import{a as e}from"./chunk-G3QOBYBY.mjs";import{a as o}from"./chunk-ZB5SS6U5.mjs";import{a as r}from"./chunk-ZJJ6VT3F.mjs";import"./chunk-4DDN6JI4.mjs";export{e as SigninSignup,o as SigninSignup_A,r as SigninSignup_B};
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import { SectionsProps, Logo, LabeledRoute, LabeledRouteWithKey, Form } 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>;
@@ -1 +0,0 @@
1
- "use strict";var ht=Object.create;var w=Object.defineProperty;var yt=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,gt=Object.prototype.hasOwnProperty;var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var L=(t,e)=>{for(var s in e)w(t,s,{get:e[s],enumerable:!0})},K=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of wt(e))!gt.call(t,r)&&r!==s&&w(t,r,{get:()=>e[r],enumerable:!(i=yt(e,r))||i.enumerable});return t};var $=(t,e,s)=>(s=t!=null?ht(vt(t)):{},K(e||!t||!t.__esModule?w(s,"default",{value:t,enumerable:!0}):s,t)),Nt=t=>K(w({},"__esModule",{value:!0}),t);var x,v,o=N(()=>{"use strict";x=t=>{var e,s,i;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(s=(e=t==null?void 0:t.internalLink)==null?void 0:e.toLowerCase())!=null&&s.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(i=t==null?void 0:t.externalLink)!=null?i:"/"},v=t=>t?(t==null?void 0:t.linkType)==="linkInternal"?`/${t==null?void 0:t.internalLink}`:t==null?void 0:t.externalLink:"/thank-you"});var I={};L(I,{SigninSignup_A:()=>Z,default:()=>Z});function Z({logo:t,form:e,formLinks:s,signInLink:i}){return(0,n.jsx)(O.Section,{className:"py-10 rounded-md bg-gray-50 lg:py-20",children:(0,n.jsxs)(S.Container,{maxWidth:576,className:"px-4",children:[(0,n.jsx)(Lt,{logo:t}),(0,n.jsxs)(S.Container,{className:"mb-6 px-4 text-center lg:mb-10",children:[(0,n.jsx)(ot,{form:e}),(0,n.jsx)(St,{form:e,signInLink:i,thankYouPage:v(e==null?void 0:e.thankYouPage)})]}),(0,n.jsx)(mt,{formLinks:s})]})})}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 ${x(t)==="/"?"home page":x(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:x(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,n.jsx)(D.Image,{src:t==null?void 0:t.image,alt:(e=t==null?void 0:t.alt)!=null?e:"signup-logo",width:100,height:100,className:"flex justify-center mx-auto text-3xl font-bold leading-none"})})}):null}function ot({form:t}){return(0,n.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,n.jsx)(Q.Text,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?(0,n.jsx)(E.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function St({form:t,signInLink:e,thankYouPage:s}){var c,u;if(!(t!=null&&t.fields))return null;let[i,r]=X.default.useState({}),a=l=>{r(b=>({...b,[l]:!b[l]}))};return(0,n.jsxs)(j.Form,{id:(c=t==null?void 0:t.id)!=null?c:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:s,children:[(0,n.jsx)(Pt,{form:t,showPasswords:i,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,{as:"button",variant:"custom",ariaLabel:(u=t==null?void 0:t.buttonLabel)!=null?u:"Sign Up form submit button",className:"w-full py-4 text-sm font-bold tex-gray-50",type:"submit",children:t==null?void 0:t.buttonLabel})}),e&&(0,n.jsx)(Rt,{signInLink:e})]})}function Pt({form:t,showPasswords:e,togglePasswordVisibility:s}){var i,r;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(G.Flex,{wrap:!0,className:"-mx-2",children:(i=t==null?void 0:t.fields)==null?void 0:i.slice(0,2).map((a,c)=>{var u;return(0,n.jsx)("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:a.type==="inputText"?(0,n.jsx)(R.Input,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,className:"w-full py-4 text-xs bg-white",name:a==null?void 0:a.name,ariaLabel:a==null?void 0:a.label,...a,type:"text"}):(0,n.jsx)(P.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",name:(u=a==null?void 0:a.name)!=null?u:"",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 u;return(0,n.jsx)("div",{className:"my-3",children:a.type==="inputPassword"&&a.name?(0,n.jsx)(Ct,{formFields:a,showPassword:e[a.name]||!1,togglePassword:()=>s(a.name)}):(0,n.jsx)(P.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:a==null?void 0:a.placeholder,required:a==null?void 0:a.isRequired,name:(u=a==null?void 0:a.name)!=null?u:"",items:a==null?void 0:a.items,type:a==null?void 0:a.type,...a})},c)})]})}function Rt({signInLink:t}){return t!=null&&t.label?(0,n.jsxs)("div",{className:"w-full text-center mt-3",children:[(0,n.jsx)("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),(0,n.jsx)(h.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function Ct({formFields:t,showPassword:e,togglePassword:s}){var i;return(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 sm:items-center",children:[(0,n.jsx)(R.Input,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(i=t==null?void 0:t.placeholder)!=null?i:t==null?void 0:t.name,variant:"primary",type:e?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,n.jsxs)(h.Button,{variant:"unstyled",as:"button",ariaLabel:e?"Show password":"Hide password",className:"focus:outline-none",type:"button",onClick:s,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)(zt,{showPassword:e})})]})]})}function mt({formLinks:t}){return t?(0,n.jsx)("p",{className:"mt-10 lg:mt-3 text-xs text-center text-gray-700",children:t==null?void 0:t.map((e,s,{length:i})=>(0,n.jsxs)("span",{children:[(0,n.jsx)(h.Button,{as:"link",variant:"link",link:e,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),s===i-1?null:s===i-2?(0,n.jsx)("span",{children:"\xA0and\xA0"}):(0,n.jsx)("span",{children:"\xA0,\xA0"})]},s))}):null}function zt({showPassword:t}){return(0,n.jsx)(n.Fragment,{children:t?(0,n.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,n.jsxs)("g",{fill:"currentColor",children:[(0,n.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,n.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,n.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,n.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,n.jsxs)("g",{fill:"currentColor",children:[(0,n.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,n.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}var h,S,G,j,P,E,D,R,J,O,Q,X,n,F=N(()=>{"use strict";h=require("@stackshift-ui/button"),S=require("@stackshift-ui/container"),G=require("@stackshift-ui/flex"),j=require("@stackshift-ui/form"),P=require("@stackshift-ui/form-field"),E=require("@stackshift-ui/heading"),D=require("@stackshift-ui/image"),R=require("@stackshift-ui/input"),J=require("@stackshift-ui/link"),O=require("@stackshift-ui/section"),Q=require("@stackshift-ui/text"),X=$(require("react"));o();n=require("react/jsx-runtime")});var ct={};L(ct,{SigninSignup_B:()=>rt,default:()=>rt});function rt({logo:t,form:e,formLinks:s,signInLink:i}){return(0,p.jsx)(O.Section,{className:"py-10 bg-primary lg:py-20",children:(0,p.jsx)(S.Container,{maxWidth:1280,children:(0,p.jsxs)(S.Container,{maxWidth:576,children:[(0,p.jsx)(Bt,{logo:t}),(0,p.jsxs)(f.Card,{borderRadius:"md",className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[(0,p.jsx)(At,{form:e}),(0,p.jsx)(Mt,{form:e,signInLink:i})]}),(0,p.jsx)(Yt,{formLinks:s})]})})})}function Bt({logo:t}){var e;return t?(0,p.jsx)("div",{className:"mb-10",children:(0,p.jsx)(J.Link,{"aria-label":`Go to ${x(t)==="/"?"home page":x(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:x(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,p.jsx)(D.Image,{src:t==null?void 0:t.image,alt:(e=t==null?void 0:t.alt)!=null?e:"signup-logo",width:100,height:100,className:"flex justify-center text-3xl font-bold leading-none text-white"})})}):null}function At({form:t}){return(0,p.jsxs)("div",{className:"mb-6 text-center sm:text-left",children:[(0,p.jsx)(Q.Text,{muted:!0,className:"text-sm lg:text-base",children:t==null?void 0:t.subtitle}),(0,p.jsx)(E.Heading,{className:"text-xl lg:text-2xl",children:t==null?void 0:t.name})]})}function Mt({form:t,signInLink:e}){var a;if(!(t!=null&&t.fields))return null;let[s,i]=g.default.useState({}),r=c=>{i(u=>({...u,[c]:!u[c]}))};return(0,p.jsxs)(j.Form,{id:(a=t==null?void 0:t.id)!=null?a:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:v(t==null?void 0:t.thankYouPage),children:[(0,p.jsx)(dt,{form:t,showPassword:s,togglePasswordVisibility:r}),(0,p.jsx)("div",{children:(0,p.jsx)("div",{className:"webriq-recaptcha"})}),(0,p.jsxs)("div",{className:"text-center",children:[(0,p.jsx)(Tt,{form:t}),(0,p.jsx)(kt,{signInLink:e})]})]})}function dt({form:t,showPassword:e,togglePasswordVisibility:s}){var i,r,a,c;return(0,p.jsxs)(g.default.Fragment,{children:[(0,p.jsx)(G.Flex,{className:"flex-col lg:flex-row gap-3",children:(r=(i=t==null?void 0:t.fields)==null?void 0:i.slice(0,2))==null?void 0:r.map((u,l)=>{var b;return(0,p.jsx)("div",{className:"w-full",children:(0,p.jsx)(P.FormField,{noLabel:!0,variant:"secondary",placeholder:u==null?void 0:u.placeholder,required:u==null?void 0:u.isRequired,name:(b=u==null?void 0:u.name)!=null?b:"",items:u==null?void 0:u.items,type:u==null?void 0:u.type,...u})},l)})}),(c=(a=t==null?void 0:t.fields)==null?void 0:a.slice(2))==null?void 0:c.map((u,l)=>{var b;return(0,p.jsx)("div",{className:"my-3",children:(u==null?void 0:u.type)==="inputPassword"&&u.name?(0,p.jsx)(qt,{formFields:u,showPassword:e[u.name]||!1,togglePassword:()=>s(u.name)}):(0,p.jsx)(P.FormField,{noLabel:!0,variant:"secondary",name:(b=u==null?void 0:u.name)!=null?b:"",placeholder:u==null?void 0:u.placeholder,required:u==null?void 0:u.isRequired,items:u==null?void 0:u.items,type:u==null?void 0:u.type,...u})},l)})]})}function qt({formFields:t,showPassword:e,togglePassword:s}){var i;return(0,p.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 items-center",children:[(0,p.jsx)(R.Input,{noLabel:!0,ariaLabel:(i=t==null?void 0:t.placeholder)!=null?i:t==null?void 0:t.name,variant:"secondary",type:e?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,p.jsxs)(y.Button,{variant:"unstyled",as:"button",ariaLabel:e?"Show password":"Hide password",className:"focus:outline-none",type:"button",onClick:s,children:[(0,p.jsx)("span",{className:"block sm:hidden text-right",children:e?"Hide":"Show"}),(0,p.jsx)("span",{className:"hidden sm:block",children:(0,p.jsx)(Ht,{showPassword:e})})]})]})}function Tt({form:t}){var e;return t!=null&&t.buttonLabel?(0,p.jsx)(y.Button,{as:"button",className:"w-full py-4 mb-3",ariaLabel:(e=t==null?void 0:t.buttonLabel)!=null?e:"Sign Up form submit button",variant:"custom",type:"submit",children:t==null?void 0:t.buttonLabel}):null}function kt({signInLink:t}){return t!=null&&t.label?(0,p.jsxs)("span",{className:"text-xs text-gray-900",children:[(0,p.jsx)("span",{children:"Already have an account?"})," ",(0,p.jsx)(y.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function Yt({formLinks:t}){return t?(0,p.jsx)("p",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((e,s,{length:i})=>(0,p.jsxs)("span",{children:[(0,p.jsx)(y.Button,{as:"link",variant:"link",link:e,className:"text-xs underline text-secondary-foreground hover:text-gray-50",ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),s===i-1?null:s===i-2?(0,p.jsx)("span",{children:"\xA0and\xA0"}):(0,p.jsx)("span",{children:"\xA0,\xA0"})]},s))}):null}function Ht({showPassword:t}){return(0,p.jsx)(g.default.Fragment,{children:t?(0,p.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,p.jsxs)("g",{fill:"currentColor",children:[(0,p.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,p.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,p.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,p.jsx)("svg",{className:"w-5 h-5 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,p.jsxs)("g",{fill:"currentColor",children:[(0,p.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,p.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}var y,f,S,G,j,P,E,D,R,J,O,Q,g,p,bt=N(()=>{"use strict";y=require("@stackshift-ui/button"),f=require("@stackshift-ui/card"),g=$(require("react"));o();p=require("react/jsx-runtime")});var Vt={};L(Vt,{SigninSignup:()=>lt});module.exports=Nt(Vt);var B=require("react"),xt=require("react/jsx-runtime"),z={variant_a:(0,B.lazy)(()=>Promise.resolve().then(()=>(F(),I))),variant_b:(0,B.lazy)(()=>Promise.resolve().then(()=>(bt(),ct)))},Ut="SigninSignup",lt=({data:t})=>{var r,a,c,u,l,b,A,M,d,q,T,k,Y,H,U,V,W,_;let e=t==null?void 0:t.variant,s=e&&(z==null?void 0:z[e]),i={logo:(a=(r=t==null?void 0:t.variants)==null?void 0:r.logo)!=null?a:void 0,title:(u=(c=t==null?void 0:t.variants)==null?void 0:c.title)!=null?u:void 0,subtitle:(b=(l=t==null?void 0:t.variants)==null?void 0:l.subtitle)!=null?b:void 0,text:(M=(A=t==null?void 0:t.variants)==null?void 0:A.plainText)!=null?M:void 0,firstButton:(q=(d=t==null?void 0:t.variants)==null?void 0:d.primaryButton)!=null?q:void 0,secondButton:(k=(T=t==null?void 0:t.variants)==null?void 0:T.secondaryButton)!=null?k:void 0,formLinks:(H=(Y=t==null?void 0:t.variants)==null?void 0:Y.formLinks)!=null?H:void 0,signInLink:(V=(U=t==null?void 0:t.variants)==null?void 0:U.signinLink)!=null?V:void 0,form:(_=(W=t==null?void 0:t.variants)==null?void 0:W.form)!=null?_:void 0};return s?(0,xt.jsx)(s,{...i}):null};lt.displayName=Ut;0&&(module.exports={SigninSignup});
@@ -1 +0,0 @@
1
- import{a}from"./chunk-G3QOBYBY.mjs";export{a as SigninSignup};
@@ -1,3 +0,0 @@
1
- import { SignUpFormProps } from ".";
2
- export default function SigninSignup_A({ logo, form, formLinks, signInLink }: SignUpFormProps): import("react/jsx-runtime").JSX.Element;
3
- export { SigninSignup_A };
@@ -1 +0,0 @@
1
- "use strict";var q=Object.create;var x=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var Y=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var U=(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 T(n))!H.call(t,c)&&c!==p&&x(t,c,{get:()=>n[c],enumerable:!(u=B(n,c))||u.enumerable});return t};var V=(t,n,p)=>(p=t!=null?q(Y(t)):{},N(n||!t||!t.__esModule?x(p,"default",{value:t,enumerable:!0}):p,t)),k=t=>N(x({},"__esModule",{value:!0}),t);var J={};U(J,{SigninSignup_A:()=>d,default:()=>d});module.exports=k(J);var i=require("@stackshift-ui/button"),h=require("@stackshift-ui/container"),S=require("@stackshift-ui/flex"),P=require("@stackshift-ui/form"),y=require("@stackshift-ui/form-field"),g=require("@stackshift-ui/heading"),z=require("@stackshift-ui/image"),w=require("@stackshift-ui/input"),R=require("@stackshift-ui/link"),A=require("@stackshift-ui/section"),C=require("@stackshift-ui/text"),M=V(require("react"));var b=t=>{var n,p,u;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(p=(n=t==null?void 0:t.internalLink)==null?void 0:n.toLowerCase())!=null&&p.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(u=t==null?void 0:t.externalLink)!=null?u:"/"},L=t=>t?(t==null?void 0:t.linkType)==="linkInternal"?`/${t==null?void 0:t.internalLink}`:t==null?void 0:t.externalLink:"/thank-you";var a=require("react/jsx-runtime");function d({logo:t,form:n,formLinks:p,signInLink:u}){return(0,a.jsx)(A.Section,{className:"py-10 rounded-md bg-gray-50 lg:py-20",children:(0,a.jsxs)(h.Container,{maxWidth:576,className:"px-4",children:[(0,a.jsx)(W,{logo:t}),(0,a.jsxs)(h.Container,{className:"mb-6 px-4 text-center lg:mb-10",children:[(0,a.jsx)($,{form:n}),(0,a.jsx)(K,{form:n,signInLink:u,thankYouPage:L(n==null?void 0:n.thankYouPage)})]}),(0,a.jsx)(G,{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)(z.Image,{src:t==null?void 0:t.image,alt:(n=t==null?void 0:t.alt)!=null?n:"signup-logo",width:100,height:100,className:"flex justify-center mx-auto text-3xl font-bold leading-none"})})}):null}function $({form:t}){return(0,a.jsxs)("div",{className:"mb-6",children:[t!=null&&t.subtitle?(0,a.jsx)(C.Text,{muted:!0,children:t==null?void 0:t.subtitle}):null,t!=null&&t.name?(0,a.jsx)(g.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name}):null]})}function K({form:t,signInLink:n,thankYouPage:p}){var r,s;if(!(t!=null&&t.fields))return null;let[u,c]=M.default.useState({}),e=l=>{c(v=>({...v,[l]:!v[l]}))};return(0,a.jsxs)(P.Form,{id:(r=t==null?void 0:t.id)!=null?r:void 0,name:"SignUp-VariantA-Form",className:"form-signup",thankyouPage:p,children:[(0,a.jsx)(_,{form:t,showPasswords:u,togglePasswordVisibility:e}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"webriq-recaptcha"})}),(0,a.jsx)("div",{className:"text-center",children:(t==null?void 0:t.buttonLabel)&&(0,a.jsx)(i.Button,{as:"button",variant:"custom",ariaLabel:(s=t==null?void 0:t.buttonLabel)!=null?s:"Sign Up form submit button",className:"w-full py-4 text-sm font-bold tex-gray-50",type:"submit",children:t==null?void 0:t.buttonLabel})}),n&&(0,a.jsx)(j,{signInLink:n})]})}function _({form:t,showPasswords:n,togglePasswordVisibility:p}){var u,c;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S.Flex,{wrap:!0,className:"-mx-2",children:(u=t==null?void 0:t.fields)==null?void 0:u.slice(0,2).map((e,r)=>{var s;return(0,a.jsx)("div",{className:"w-full px-2 mb-3 lg:w-1/2",children:e.type==="inputText"?(0,a.jsx)(w.Input,{textSize:"sm",variant:"primary",noLabel:!0,placeholder:e==null?void 0:e.placeholder,required:e==null?void 0:e.isRequired,className:"w-full py-4 text-xs bg-white",name:e==null?void 0:e.name,ariaLabel:e==null?void 0:e.label,...e,type:"text"}):(0,a.jsx)(y.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",name:(s=e==null?void 0:e.name)!=null?s:"",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})},r)})}),(c=t==null?void 0:t.fields)==null?void 0:c.slice(2).map((e,r)=>{var s;return(0,a.jsx)("div",{className:"my-3",children:e.type==="inputPassword"&&e.name?(0,a.jsx)(E,{formFields:e,showPassword:n[e.name]||!1,togglePassword:()=>p(e.name)}):(0,a.jsx)(y.FormField,{className:"py-4",textSize:"sm",noLabel:!0,variant:"primary",placeholder:e==null?void 0:e.placeholder,required:e==null?void 0:e.isRequired,name:(s=e==null?void 0:e.name)!=null?s:"",items:e==null?void 0:e.items,type:e==null?void 0:e.type,...e})},r)})]})}function j({signInLink:t}){return t!=null&&t.label?(0,a.jsxs)("div",{className:"w-full text-center mt-3",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"Already have an account? "}),(0,a.jsx)(i.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function E({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",children:[(0,a.jsx)(w.Input,{className:"py-4",textSize:"sm",noLabel:!0,"aria-label":(u=t==null?void 0:t.placeholder)!=null?u:t==null?void 0:t.name,variant:"primary",type:n?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,a.jsxs)(i.Button,{variant:"unstyled",as:"button",ariaLabel:n?"Show password":"Hide password",className:"focus:outline-none",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)(D,{showPassword:n})})]})]})}function G({formLinks:t}){return t?(0,a.jsx)("p",{className:"mt-10 lg:mt-3 text-xs text-center text-gray-700",children:t==null?void 0:t.map((n,p,{length:u})=>(0,a.jsxs)("span",{children:[(0,a.jsx)(i.Button,{as:"link",variant:"link",link:n,className:"text-xs text-primary cursor-pointer hover:underline",ariaLabel:n==null?void 0:n.label,children:n==null?void 0:n.label}),p===u-1?null:p===u-2?(0,a.jsx)("span",{children:"\xA0and\xA0"}):(0,a.jsx)("span",{children:"\xA0,\xA0"})]},p))}):null}function D({showPassword:t}){return(0,a.jsx)(a.Fragment,{children:t?(0,a.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,a.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,a.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,a.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,a.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}0&&(module.exports={SigninSignup_A});
@@ -1 +0,0 @@
1
- import{a}from"./chunk-ZB5SS6U5.mjs";import"./chunk-4DDN6JI4.mjs";export{a as SigninSignup_A,a as default};
@@ -1,3 +0,0 @@
1
- import { SignUpFormProps } from ".";
2
- export default function SigninSignup_B({ logo, form, formLinks, signInLink }: SignUpFormProps): import("react/jsx-runtime").JSX.Element;
3
- export { SigninSignup_B };
@@ -1 +0,0 @@
1
- "use strict";var z=Object.create;var x=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var U=(t,n)=>{for(var r in n)x(t,r,{get:n[r],enumerable:!0})},d=(t,n,r,p)=>{if(n&&typeof n=="object"||typeof n=="function")for(let u of T(n))!Y.call(t,u)&&u!==r&&x(t,u,{get:()=>n[u],enumerable:!(p=q(n,u))||p.enumerable});return t};var V=(t,n,r)=>(r=t!=null?z(H(t)):{},d(n||!t||!t.__esModule?x(r,"default",{value:t,enumerable:!0}):r,t)),$=t=>d(x({},"__esModule",{value:!0}),t);var O={};U(O,{SigninSignup_B:()=>B,default:()=>B});module.exports=$(O);var b=require("@stackshift-ui/button"),L=require("@stackshift-ui/card"),l=require("@stackshift-ui/container"),g=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"),R=require("@stackshift-ui/input"),m=require("@stackshift-ui/link"),M=require("@stackshift-ui/section"),A=require("@stackshift-ui/text"),w=V(require("react"));var h=t=>{var n,r,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:"/"},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 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)(l.Container,{maxWidth:1280,children:(0,a.jsxs)(l.Container,{maxWidth:576,children:[(0,a.jsx)(k,{logo:t}),(0,a.jsxs)(L.Card,{borderRadius:"md",className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[(0,a.jsx)(W,{form:n}),(0,a.jsx)(_,{form:n,signInLink:p})]}),(0,a.jsx)(J,{formLinks:r})]})})})}function k({logo:t}){var n;return t?(0,a.jsx)("div",{className:"mb-10",children:(0,a.jsx)(m.Link,{"aria-label":`Go to ${h(t)==="/"?"home page":h(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:h(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(C.Image,{src:t==null?void 0:t.image,alt:(n=t==null?void 0:t.alt)!=null?n:"signup-logo",width:100,height:100,className:"flex justify-center text-3xl font-bold leading-none text-white"})})}):null}function 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 _({form:t,signInLink:n}){var s;if(!(t!=null&&t.fields))return null;let[r,p]=w.default.useState({}),u=c=>{p(e=>({...e,[c]:!e[c]}))};return(0,a.jsxs)(P.Form,{id:(s=t==null?void 0:t.id)!=null?s:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:N(t==null?void 0:t.thankYouPage),children:[(0,a.jsx)(j,{form:t,showPassword:r,togglePasswordVisibility:u}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"webriq-recaptcha"})}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(G,{form:t}),(0,a.jsx)(D,{signInLink:n})]})]})}function j({form:t,showPassword:n,togglePasswordVisibility:r}){var p,u,s,c;return(0,a.jsxs)(w.default.Fragment,{children:[(0,a.jsx)(g.Flex,{className:"flex-col lg:flex-row gap-3",children:(u=(p=t==null?void 0:t.fields)==null?void 0:p.slice(0,2))==null?void 0:u.map((e,y)=>{var i;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:(i=e==null?void 0:e.name)!=null?i:"",items:e==null?void 0:e.items,type:e==null?void 0:e.type,...e})},y)})}),(c=(s=t==null?void 0:t.fields)==null?void 0:s.slice(2))==null?void 0:c.map((e,y)=>{var i;return(0,a.jsx)("div",{className:"my-3",children:(e==null?void 0:e.type)==="inputPassword"&&e.name?(0,a.jsx)(E,{formFields:e,showPassword:n[e.name]||!1,togglePassword:()=>r(e.name)}):(0,a.jsx)(v.FormField,{noLabel:!0,variant:"secondary",name:(i=e==null?void 0:e.name)!=null?i:"",placeholder:e==null?void 0:e.placeholder,required:e==null?void 0:e.isRequired,items:e==null?void 0:e.items,type:e==null?void 0:e.type,...e})},y)})]})}function E({formFields:t,showPassword:n,togglePassword:r}){var p;return(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 items-center",children:[(0,a.jsx)(R.Input,{noLabel:!0,ariaLabel:(p=t==null?void 0:t.placeholder)!=null?p:t==null?void 0:t.name,variant:"secondary",type:n?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,a.jsxs)(b.Button,{variant:"unstyled",as:"button",ariaLabel:n?"Show password":"Hide password",className:"focus:outline-none",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)(K,{showPassword:n})})]})]})}function G({form:t}){var n;return t!=null&&t.buttonLabel?(0,a.jsx)(b.Button,{as:"button",className:"w-full py-4 mb-3",ariaLabel:(n=t==null?void 0:t.buttonLabel)!=null?n:"Sign Up form submit button",variant:"custom",type:"submit",children:t==null?void 0:t.buttonLabel}):null}function D({signInLink:t}){return t!=null&&t.label?(0,a.jsxs)("span",{className:"text-xs text-gray-900",children:[(0,a.jsx)("span",{children:"Already have an account?"})," ",(0,a.jsx)(b.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function J({formLinks:t}){return t?(0,a.jsx)("p",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((n,r,{length:p})=>(0,a.jsxs)("span",{children:[(0,a.jsx)(b.Button,{as:"link",variant:"link",link:n,className:"text-xs underline text-secondary-foreground hover:text-gray-50",ariaLabel:n==null?void 0:n.label,children:n==null?void 0:n.label}),r===p-1?null:r===p-2?(0,a.jsx)("span",{children:"\xA0and\xA0"}):(0,a.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function K({showPassword:t}){return(0,a.jsx)(w.default.Fragment,{children:t?(0,a.jsx)("svg",{className:"w-5 h-5 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});
@@ -1 +0,0 @@
1
- import{a}from"./chunk-ZJJ6VT3F.mjs";import"./chunk-4DDN6JI4.mjs";export{a as SigninSignup_B,a as default};
package/dist/types.d.ts DELETED
@@ -1,362 +0,0 @@
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 DELETED
@@ -1 +0,0 @@
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);