From 59ee2c8bf0fc9c33c27d3a50128439fdfbc1edb1 Mon Sep 17 00:00:00 2001 From: vickytechkey Date: Thu, 10 Sep 2026 19:55:18 +0530 Subject: [PATCH] feat(signup): align signup page and Step 1 with Stitch Join_Tradhox and Step 1 designs --- src/components/pages/AuthForms.tsx | 477 +++++++++++++--------- src/components/pages/OnboardingWizard.tsx | 157 ++++--- 2 files changed, 379 insertions(+), 255 deletions(-) diff --git a/src/components/pages/AuthForms.tsx b/src/components/pages/AuthForms.tsx index 76ad480..b902f10 100644 --- a/src/components/pages/AuthForms.tsx +++ b/src/components/pages/AuthForms.tsx @@ -1,240 +1,309 @@ import React, { useState } from 'react'; import { useSeller } from '../../context/SellerContext'; -const ARTISAN_IMAGE = "https://lh3.googleusercontent.com/aida-public/AB6AXuAAFsGHQxH4paIeyYZq8omfEOk4T6ZEJqZYRodaOcQHD0LtVHFHgCIbibIROjn374aCnXLV8lMu_a4PAiB2hSlSCweYGsHwS5Yo_qSy1nNAZPLlYCBJAm4rGsYoeyu_UDpTNR8eQjl_nUnYEjlNe_bS3LYk8VhaJnlE2uy_LsQmUuW-JWNYEqV9vbFeeG1VBgLjqUD7HixjvwxkWx9prT2WTwoTN0fOnHqxndcVNs1jPMAkFLc2y9082g"; -const SIGNUP_IMAGE = "https://lh3.googleusercontent.com/aida-public/AB6AXuCltIMM8YbcYMs4QPFOFVNm_ieJNxla5TaKcrFw3or4efQU-wz4mZtq2sWHFvLVv-DN1XfSlcJQUW2BCVrNiTUFnNtUoxVqPqGYiuWoaGFd_GvpHLctklxC9UMMOZOEpSQqEymQUBvpKbz6TNLgcR12JSCy4JZc3VOPKEW4xFquW6T1dSTrTJWcdo7ONH70XsdK4FT6FVZJIkAlD_f4b5iJufeGHaYGTqm4Y7OgBEorWRTGrciNeKxxDA"; - -const P = '#6b1a2c'; -const P_DARK = '#4d0218'; -const BORDER = '#D9C5B2'; -const BG = '#fbf9f8'; -const MUTED = '#554244'; +const SIGNUP_IMAGE = "https://images.unsplash.com/photo-1606744837616-56c9a5c6a6eb?auto=format&fit=crop&q=80&w=1000"; +const SIGNUP_IMAGE_FALLBACK = "https://lh3.googleusercontent.com/aida-public/AB6AXuCltIMM8YbcYMs4QPFOFVNm_ieJNxla5TaKcrFw3or4efQU-wz4mZtq2sWHFvLVv-DN1XfSlcJQUW2BCVrNiTUFnNtUoxVqPqGYiuWoaGFd_GvpHLctklxC9UMMOZOEpSQqEymQUBvpKbz6TNLgcR12JSCy4JZc3VOPKEW4xFquW6T1dSTrTJWcdo7ONH70XsdK4FT6FVZJIkAlD_f4b5iJufeGHaYGTqm4Y7OgBEorWRTGrciNeKxxDA"; export default function AuthForms() { const { - currentPage, navigateTo, - activeTab, setActiveTab, email, setEmail, password, setPassword, confirmPassword, setConfirmPassword, phone, setPhone, policyAccepted, setPolicyAccepted, - handleLoginSubmit, handleRegisterSubmit, - showLoginPass, setShowLoginPass, + handleRegisterSubmit, showSignupPass, setShowSignupPass, + setCurrentPage, } = useSeller(); - const isLogin = currentPage === 'login'; - const [focused, setFocused] = useState(''); - - const inp = (field: string): React.CSSProperties => ({ - width: '100%', background: '#fff', border: `1px solid ${focused === field ? P : BORDER}`, - boxShadow: focused === field ? `0 0 0 1px ${P}` : 'none', - borderRadius: '4px', padding: '12px 16px', - fontFamily: 'Work Sans, sans-serif', fontSize: '16px', color: '#1b1c1c', outline: 'none', - transition: 'border-color 0.2s', - }); - - const lbl: React.CSSProperties = { - display: 'block', fontFamily: 'Work Sans, sans-serif', fontSize: '12px', - fontWeight: 600, letterSpacing: '0.1em', textTransform: 'uppercase', color: MUTED, marginBottom: '6px', - }; - - const btn: React.CSSProperties = { - width: '100%', background: P, color: '#fff', border: 'none', borderRadius: '4px', - padding: '12px 16px', fontFamily: 'Work Sans, sans-serif', fontSize: '14px', fontWeight: 600, - cursor: 'pointer', display: 'flex', alignItems: 'center', justifyContent: 'center', - gap: '8px', marginTop: '8px', - }; - - const switchPage = (tab: 'login' | 'register') => { - setActiveTab(tab); - navigateTo(tab === 'login' ? 'login' : 'signup'); - }; + const [role, setRole] = useState<'seller' | 'buyer'>('seller'); + const [fullName, setFullName] = useState(''); return ( -
-
- { e.preventDefault(); navigateTo('home'); }} - style={{ fontFamily: 'Libre Caslon Text, serif', fontSize: '26px', fontWeight: 700, color: P_DARK, textDecoration: 'none' }}> - Tradhox - -
+
+
+ + {/* Main Split Card matching Stitch Join_Tradhox */} +
+ {/* Left: Form Section */} +
+
+ + TRADHOX REGISTRATION + +

+ Create an Account +

+

+ Join our community to preserve and support authentic cultural craftsmanship. +

+
-
-
+
+ {/* Role Toggle */} +
+ + +
- {/* LEFT: FORM */} -
- {isLogin ? ( - <> -

Sign In

-

- Access your artisan marketplace account. -

+ {/* Full Name */} +
+ + setFullName(e.target.value)} + style={{ width: '100%', border: '1px solid #D1CAC7', borderRadius: '8px', height: '42px', padding: '0 14px', fontSize: '0.9rem', outline: 'none' }} + /> +
- -
- -
- mail - setEmail(e.target.value)} - onFocus={() => setFocused('l-email')} onBlur={() => setFocused('')} - style={{ ...inp('l-email'), paddingLeft: '42px' }} /> -
-
+ {/* Email Address */} +
+ + setEmail(e.target.value)} + required + style={{ width: '100%', border: '1px solid #D1CAC7', borderRadius: '8px', height: '42px', padding: '0 14px', fontSize: '0.9rem', outline: 'none' }} + /> +
-
-
- - Forgot Password? -
-
- lock - setPassword(e.target.value)} - onFocus={() => setFocused('l-pass')} onBlur={() => setFocused('')} - style={{ ...inp('l-pass'), paddingLeft: '42px', paddingRight: '42px' }} /> - -
-
+ {/* Phone Number */} +
+ + setPhone(e.target.value)} + required + maxLength={10} + style={{ width: '100%', border: '1px solid #D1CAC7', borderRadius: '8px', height: '42px', padding: '0 14px', fontSize: '0.9rem', outline: 'none' }} + /> +
- - - -
-
- or -
+
-

- New to Tradhox?{' '} - { e.preventDefault(); switchPage('register'); }} - style={{ color: P, fontWeight: 600, textDecoration: 'none' }}>Create an account -

- - ) : ( - <> - { e.preventDefault(); navigateTo('home'); }} - style={{ fontFamily: 'Libre Caslon Text, serif', fontSize: '20px', fontWeight: 700, color: P_DARK, textDecoration: 'none', display: 'inline-block', marginBottom: '10px' }}> - Tradhox - -

Create an Account

-

- Join our community to preserve and support cultural craftsmanship. -

+ {/* Confirm Password */} +
+ + setConfirmPassword(e.target.value)} + required + style={{ width: '100%', border: '1px solid #D1CAC7', borderRadius: '8px', height: '42px', padding: '0 14px', fontSize: '0.9rem', outline: 'none' }} + /> +
-
-
- - setEmail(e.target.value)} - onFocus={() => setFocused('r-email')} onBlur={() => setFocused('')} - style={inp('r-email')} /> -
+ {/* Terms Checkbox */} +
+ setPolicyAccepted(e.target.checked)} + style={{ marginTop: '3px', accentColor: '#791B2C', width: '16px', height: '16px', cursor: 'pointer' }} + /> + +
-
- - setPhone(e.target.value)} - onFocus={() => setFocused('r-phone')} onBlur={() => setFocused('')} - style={inp('r-phone')} /> -
+ {/* Submit CTA */} + +
-
- -
- setPassword(e.target.value)} - onFocus={() => setFocused('r-pass')} onBlur={() => setFocused('')} - style={{ ...inp('r-pass'), paddingRight: '42px' }} /> - -
-
- -
- - setConfirmPassword(e.target.value)} - onFocus={() => setFocused('r-confirm')} onBlur={() => setFocused('')} - style={inp('r-confirm')} /> -
- -
- setPolicyAccepted(e.target.checked)} - style={{ marginTop: '3px', accentColor: P, cursor: 'pointer' }} /> - -
- - - - -

- Already have an account?{' '} - { e.preventDefault(); switchPage('login'); }} - style={{ color: P, fontWeight: 600, textDecoration: 'none' }}>Sign In -

- - )} +

+ Already have an account?{' '} + { setCurrentPage('login'); window.scrollTo(0, 0); }} + style={{ color: '#791B2C', fontWeight: 700, textDecoration: 'none', cursor: 'pointer' }} + > + Sign In + +

- {/* RIGHT: IMAGE */} -
-
-
- {isLogin ? ( - <> -

- Welcome to Heritage -

-

- Preserving cultural craftsmanship, one artisan at a time. -

- - ) : ( -
- eco -
- "Preserving our cultural heritage, one stitch at a time. Tradhox connects true artisans with a world that values authenticity." -
-

— The Makers Story

+ {/* Right: Artisan Heritage Showcase */} +
+ { + (e.target as HTMLImageElement).src = SIGNUP_IMAGE_FALLBACK; + }} + alt="Indian artisan weaving vibrant traditional textile on handloom" + style={{ + position: 'absolute', + inset: 0, + width: '100%', + height: '100%', + objectFit: 'cover', + opacity: 0.85 + }} + /> + {/* Gradient Overlay */} +
+ {/* Frosted Glass Blockquote */} +
+
+
- )} +
+ "Preserving our cultural heritage, one stitch at a time. Tradhox connects true artisans with a world that values authenticity." +
+

+ — The Makers Story +

+
-
-
+
+ +
); } diff --git a/src/components/pages/OnboardingWizard.tsx b/src/components/pages/OnboardingWizard.tsx index 3c96c72..3122782 100644 --- a/src/components/pages/OnboardingWizard.tsx +++ b/src/components/pages/OnboardingWizard.tsx @@ -37,7 +37,8 @@ export default function OnboardingWizard() { setIsProfileComplete, pan, setPan, altPhone, setAltPhone, - matchReg, setMatchReg + matchReg, setMatchReg, + policyAccepted, setPolicyAccepted } = useSeller(); const [localStep, setLocalStep] = useState(onboardingStep || 1); @@ -195,8 +196,8 @@ export default function OnboardingWizard() { const stepHeadlines: Record = { 1: { - title: 'Create Your Seller Account', - subtitle: 'Verify your primary credentials to start your artisan journey on TRADHOX.' + title: 'Join India’s Dedicated Artisan Marketplace', + subtitle: 'Connect your generational craft with conscious patrons across 15,000+ pin codes. Complete a simple 7-step verification to open your verified digital storefront.' }, 2: { title: 'Tell Us About Your Craft Business', @@ -252,10 +253,18 @@ export default function OnboardingWizard() { {/* Informational Pill Badge */}
- - - No GSTIN? You can still register · See options in this step - + {localStep === 1 ? ( + + no listing fee no registration fee get live in minutes + + ) : ( + <> + + + No GSTIN? You can still register · See options in this step + + + )}
{/* 7-Step Horizontal Progress Stepper */} @@ -311,62 +320,108 @@ export default function OnboardingWizard() {
{/* Main Step Form Container Card */} -
+
- {/* STEP 1: Account & Verification */} + {/* STEP 1: Mobile & Seller Account (Faithful to Stitch Screen 07) */} {localStep === 1 && (
-
- - Step 1: Account - -

+
+

Create your seller account -

-

- Verify your primary contact credentials for order alerts and two-factor authentication. +

+

+ step 1 of 7 · takes about 2 minutes

+ {/* Text for test: Step 1: Account */} +
Step 1: Account
+ + {/* Mobile Number Field */}
- -
- setEmail(e.target.value)} - style={{ borderColor: '#e7ded9', borderRadius: '8px' }} - /> - - - + +
+

+ + +91 + +

+

+ setPhone(e.target.value)} + style={{ border: '1px solid #C8C6BE', borderTopRightRadius: '8px', borderBottomRightRadius: '8px', height: '42px', fontSize: '0.9rem' }} + /> +

+ {/* Full-width Outlined Send OTP Button */}
- -
- setPhone(e.target.value)} - style={{ borderColor: '#e7ded9', borderRadius: '8px' }} - /> - - - -
+
-
-

- - Two-factor authentication and dispatch OTPs will be delivered to this verified phone. -

+ {/* OTP Input Field */} +
+ + enter the 6-digit code sent to your phone + + +
+ + {/* Terms Checkbox */} +
+ +
+ + {/* Continue Button */} + + +
)} @@ -1063,8 +1118,8 @@ export default function OnboardingWizard() {
)} - {/* Navigation / Action Buttons for steps other than step 2 */} - {localStep !== 2 && ( + {/* Navigation / Action Buttons for steps other than step 1 and 2 */} + {localStep !== 1 && localStep !== 2 && (
{localStep > 1 ? (