@pubflow/react 0.3.1 → 0.3.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +111 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +111 -16
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -455,7 +455,8 @@ function PubflowProvider({ children, config, instances, defaultInstance = 'defau
|
|
|
455
455
|
}
|
|
456
456
|
});
|
|
457
457
|
}
|
|
458
|
-
if
|
|
458
|
+
// Only set context value if we have instances to set
|
|
459
|
+
if (isMounted && Object.keys(instancesMap).length > 0) {
|
|
459
460
|
setContextValue({
|
|
460
461
|
instances: instancesMap,
|
|
461
462
|
defaultInstance
|
|
@@ -8560,6 +8561,68 @@ function BridgeList({ renderItem, showPagination = true, showSearch = true, show
|
|
|
8560
8561
|
}) })), renderPagination()] })] })] }));
|
|
8561
8562
|
}
|
|
8562
8563
|
|
|
8564
|
+
/**
|
|
8565
|
+
* Asset Utilities for Pubflow React
|
|
8566
|
+
*
|
|
8567
|
+
* Utilities for handling assets like logos, images, and other media files
|
|
8568
|
+
* Supports both external URLs and internal assets with proper Vite/bundler integration
|
|
8569
|
+
*/
|
|
8570
|
+
/**
|
|
8571
|
+
* Process asset URL - supports both external URLs and internal assets
|
|
8572
|
+
*
|
|
8573
|
+
* @param assetUrl - The asset URL to process
|
|
8574
|
+
* @returns Processed URL ready for use in src attributes
|
|
8575
|
+
*/
|
|
8576
|
+
function processAssetUrl(assetUrl) {
|
|
8577
|
+
// Return non-string values as-is (React components, null, undefined)
|
|
8578
|
+
if (!assetUrl || typeof assetUrl !== 'string') {
|
|
8579
|
+
return assetUrl;
|
|
8580
|
+
}
|
|
8581
|
+
// Return empty string as-is (no logo case)
|
|
8582
|
+
if (assetUrl.trim() === '') {
|
|
8583
|
+
return '';
|
|
8584
|
+
}
|
|
8585
|
+
// Check if it's an external URL (starts with http:// or https://)
|
|
8586
|
+
if (assetUrl.startsWith('http://') || assetUrl.startsWith('https://')) {
|
|
8587
|
+
return assetUrl;
|
|
8588
|
+
}
|
|
8589
|
+
// Check if it's a data URL (base64 encoded image)
|
|
8590
|
+
if (assetUrl.startsWith('data:')) {
|
|
8591
|
+
return assetUrl;
|
|
8592
|
+
}
|
|
8593
|
+
// Check if it's already a processed Vite asset (starts with /)
|
|
8594
|
+
if (assetUrl.startsWith('/')) {
|
|
8595
|
+
return assetUrl;
|
|
8596
|
+
}
|
|
8597
|
+
// Check if it's a blob URL
|
|
8598
|
+
if (assetUrl.startsWith('blob:')) {
|
|
8599
|
+
return assetUrl;
|
|
8600
|
+
}
|
|
8601
|
+
// For relative paths or simple filenames, assume they're in the public directory
|
|
8602
|
+
// This handles cases like 'logo.svg', './logo.png', '../assets/logo.jpg', etc.
|
|
8603
|
+
if (assetUrl.includes('.')) {
|
|
8604
|
+
// Remove leading ./ if present
|
|
8605
|
+
const cleanPath = assetUrl.replace(/^\.\//, '');
|
|
8606
|
+
// If it starts with ../, keep it as is (relative to current directory)
|
|
8607
|
+
if (assetUrl.startsWith('../')) {
|
|
8608
|
+
return assetUrl;
|
|
8609
|
+
}
|
|
8610
|
+
// For simple filenames or paths, prepend with /
|
|
8611
|
+
return `/${cleanPath}`;
|
|
8612
|
+
}
|
|
8613
|
+
// Return as-is for any other cases
|
|
8614
|
+
return assetUrl;
|
|
8615
|
+
}
|
|
8616
|
+
/**
|
|
8617
|
+
* Process logo URL specifically - alias for processAssetUrl with better naming
|
|
8618
|
+
*
|
|
8619
|
+
* @param logoUrl - The logo URL to process
|
|
8620
|
+
* @returns Processed URL ready for use in img src
|
|
8621
|
+
*/
|
|
8622
|
+
function processLogoUrl(logoUrl) {
|
|
8623
|
+
return processAssetUrl(logoUrl);
|
|
8624
|
+
}
|
|
8625
|
+
|
|
8563
8626
|
/**
|
|
8564
8627
|
* Professional login form component
|
|
8565
8628
|
*/
|
|
@@ -8617,21 +8680,31 @@ function LoginForm({ config = {}, onSuccess, onError, onPasswordReset, onAccount
|
|
|
8617
8680
|
const styles = {
|
|
8618
8681
|
container: {
|
|
8619
8682
|
maxWidth: '400px',
|
|
8683
|
+
width: '100%',
|
|
8620
8684
|
margin: '0 auto',
|
|
8621
8685
|
padding: '24px',
|
|
8622
8686
|
backgroundColor: '#ffffff',
|
|
8623
8687
|
borderRadius: '24px',
|
|
8624
8688
|
boxShadow: '0 8px 24px rgba(0, 0, 0, 0.1)',
|
|
8625
|
-
border: '1px solid #f0f0f0'
|
|
8689
|
+
border: '1px solid #f0f0f0',
|
|
8690
|
+
boxSizing: 'border-box'
|
|
8626
8691
|
},
|
|
8627
8692
|
logoSection: {
|
|
8693
|
+
display: 'flex',
|
|
8694
|
+
justifyContent: 'center',
|
|
8695
|
+
alignItems: 'center',
|
|
8628
8696
|
textAlign: 'center',
|
|
8629
|
-
marginBottom: '32px'
|
|
8697
|
+
marginBottom: '32px',
|
|
8698
|
+
width: '100%'
|
|
8630
8699
|
},
|
|
8631
8700
|
logo: {
|
|
8632
8701
|
maxWidth: '320px',
|
|
8633
|
-
|
|
8634
|
-
|
|
8702
|
+
maxHeight: '80px',
|
|
8703
|
+
height: 'auto',
|
|
8704
|
+
width: 'auto',
|
|
8705
|
+
objectFit: 'contain',
|
|
8706
|
+
marginBottom: '20px',
|
|
8707
|
+
display: 'block'
|
|
8635
8708
|
},
|
|
8636
8709
|
welcomeText: {
|
|
8637
8710
|
fontSize: '32px',
|
|
@@ -8740,7 +8813,7 @@ function LoginForm({ config = {}, onSuccess, onError, onPasswordReset, onAccount
|
|
|
8740
8813
|
textAlign: 'center'
|
|
8741
8814
|
}
|
|
8742
8815
|
};
|
|
8743
|
-
return (jsxRuntime.jsxs("div", { className: className, style: styles.container, children: [jsxRuntime.jsxs("div", { style: styles.logoSection, children: [logo && (typeof logo === 'string' ? (jsxRuntime.jsx("img", { src: logo, alt: `${appName} Logo`, style: styles.logo })) : (logo)), jsxRuntime.jsxs("h1", { style: styles.welcomeText, children: ["Welcome to ", appName] }), jsxRuntime.jsx("p", { style: styles.subtitleText, children: "Sign in to your account" })] }), jsxRuntime.jsxs("form", { onSubmit: handleSubmit, children: [error && (jsxRuntime.jsxs("div", { style: styles.errorContainer, children: [jsxRuntime.jsx("span", { style: { color: '#ff4757', fontSize: '20px' }, children: "\u26A0" }), jsxRuntime.jsx("span", { style: styles.errorText, children: error })] })), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "Email Address" }), jsxRuntime.jsxs("div", { style: styles.inputContainer, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\u2709" }), jsxRuntime.jsx("input", { type: "email", style: styles.input, placeholder: "Enter your email", value: email, onChange: (e) => setEmail(e.target.value), autoCapitalize: "none", autoComplete: "email", disabled: isLoading, required: true })] })] }), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "Password" }), jsxRuntime.jsxs("div", { style: styles.inputContainer, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\uD83D\uDD12" }), jsxRuntime.jsx("input", { type: showPassword ? 'text' : 'password', style: styles.input, placeholder: "Enter your password", value: password, onChange: (e) => setPassword(e.target.value), autoComplete: "current-password", disabled: isLoading, required: true }), jsxRuntime.jsx("button", { type: "button", style: styles.eyeButton, onClick: () => setShowPassword(!showPassword), disabled: isLoading, children: showPassword ? '👁' : '👁🗨' })] })] }), jsxRuntime.jsxs("div", { style: styles.checkboxContainer, children: [jsxRuntime.jsxs("label", { style: { display: 'flex', alignItems: 'center', fontSize: '14px', color: '#666' }, children: [jsxRuntime.jsx("input", { type: "checkbox", checked: rememberMe, onChange: (e) => setRememberMe(e.target.checked), style: { marginRight: '8px' } }), "Remember me"] }), showPasswordReset && (jsxRuntime.jsx("button", { type: "button", style: { ...styles.linkButton, fontSize: '14px' }, onClick: onPasswordReset, disabled: isLoading, children: "Forgot password?" }))] }), jsxRuntime.jsx("button", { type: "submit", style: {
|
|
8816
|
+
return (jsxRuntime.jsxs("div", { className: className, style: styles.container, children: [jsxRuntime.jsxs("div", { style: styles.logoSection, children: [logo && (typeof logo === 'string' ? (jsxRuntime.jsx("img", { src: processLogoUrl(logo), alt: `${appName} Logo`, style: styles.logo })) : (logo)), jsxRuntime.jsxs("h1", { style: styles.welcomeText, children: ["Welcome to ", appName] }), jsxRuntime.jsx("p", { style: styles.subtitleText, children: "Sign in to your account" })] }), jsxRuntime.jsxs("form", { onSubmit: handleSubmit, children: [error && (jsxRuntime.jsxs("div", { style: styles.errorContainer, children: [jsxRuntime.jsx("span", { style: { color: '#ff4757', fontSize: '20px' }, children: "\u26A0" }), jsxRuntime.jsx("span", { style: styles.errorText, children: error })] })), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "Email Address" }), jsxRuntime.jsxs("div", { style: styles.inputContainer, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\u2709" }), jsxRuntime.jsx("input", { type: "email", style: styles.input, placeholder: "Enter your email", value: email, onChange: (e) => setEmail(e.target.value), autoCapitalize: "none", autoComplete: "email", disabled: isLoading, required: true })] })] }), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "Password" }), jsxRuntime.jsxs("div", { style: styles.inputContainer, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\uD83D\uDD12" }), jsxRuntime.jsx("input", { type: showPassword ? 'text' : 'password', style: styles.input, placeholder: "Enter your password", value: password, onChange: (e) => setPassword(e.target.value), autoComplete: "current-password", disabled: isLoading, required: true }), jsxRuntime.jsx("button", { type: "button", style: styles.eyeButton, onClick: () => setShowPassword(!showPassword), disabled: isLoading, children: showPassword ? '👁' : '👁🗨' })] })] }), jsxRuntime.jsxs("div", { style: styles.checkboxContainer, children: [jsxRuntime.jsxs("label", { style: { display: 'flex', alignItems: 'center', fontSize: '14px', color: '#666' }, children: [jsxRuntime.jsx("input", { type: "checkbox", checked: rememberMe, onChange: (e) => setRememberMe(e.target.checked), style: { marginRight: '8px' } }), "Remember me"] }), showPasswordReset && (jsxRuntime.jsx("button", { type: "button", style: { ...styles.linkButton, fontSize: '14px' }, onClick: onPasswordReset, disabled: isLoading, children: "Forgot password?" }))] }), jsxRuntime.jsx("button", { type: "submit", style: {
|
|
8744
8817
|
...styles.loginButton,
|
|
8745
8818
|
opacity: isLoading ? 0.8 : 1,
|
|
8746
8819
|
cursor: isLoading ? 'not-allowed' : 'pointer'
|
|
@@ -8857,21 +8930,32 @@ function PasswordResetForm({ config = {}, onSuccess, onError, onBackToLogin, res
|
|
|
8857
8930
|
const styles = {
|
|
8858
8931
|
container: {
|
|
8859
8932
|
maxWidth: '400px',
|
|
8933
|
+
width: '100%',
|
|
8860
8934
|
margin: '0 auto',
|
|
8861
8935
|
padding: '24px',
|
|
8862
8936
|
backgroundColor: '#ffffff',
|
|
8863
8937
|
borderRadius: '24px',
|
|
8864
8938
|
boxShadow: '0 8px 24px rgba(0, 0, 0, 0.1)',
|
|
8865
|
-
border: '1px solid #f0f0f0'
|
|
8939
|
+
border: '1px solid #f0f0f0',
|
|
8940
|
+
boxSizing: 'border-box'
|
|
8866
8941
|
},
|
|
8867
8942
|
logoSection: {
|
|
8943
|
+
display: 'flex',
|
|
8944
|
+
flexDirection: 'column',
|
|
8945
|
+
justifyContent: 'center',
|
|
8946
|
+
alignItems: 'center',
|
|
8868
8947
|
textAlign: 'center',
|
|
8869
|
-
marginBottom: '32px'
|
|
8948
|
+
marginBottom: '32px',
|
|
8949
|
+
width: '100%'
|
|
8870
8950
|
},
|
|
8871
8951
|
logo: {
|
|
8872
8952
|
maxWidth: '320px',
|
|
8873
|
-
|
|
8874
|
-
|
|
8953
|
+
maxHeight: '80px',
|
|
8954
|
+
height: 'auto',
|
|
8955
|
+
width: 'auto',
|
|
8956
|
+
objectFit: 'contain',
|
|
8957
|
+
marginBottom: '20px',
|
|
8958
|
+
display: 'block'
|
|
8875
8959
|
},
|
|
8876
8960
|
title: {
|
|
8877
8961
|
fontSize: '28px',
|
|
@@ -8990,7 +9074,7 @@ function PasswordResetForm({ config = {}, onSuccess, onError, onBackToLogin, res
|
|
|
8990
9074
|
const renderStep = () => {
|
|
8991
9075
|
switch (step) {
|
|
8992
9076
|
case 'request':
|
|
8993
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: styles.logoSection, children: [logo && (typeof logo === 'string' ? (jsxRuntime.jsx("img", { src: logo, alt: `${appName} Logo`, style: styles.logo })) : (logo)), jsxRuntime.jsx("h1", { style: styles.title, children: "Reset Password" }), jsxRuntime.jsx("p", { style: styles.subtitle, children: "Enter your email to receive reset instructions" })] }), jsxRuntime.jsxs("form", { onSubmit: handleRequestReset, children: [error && (jsxRuntime.jsxs("div", { style: styles.errorContainer, children: [jsxRuntime.jsx("span", { style: { color: '#ff4757', fontSize: '20px' }, children: "\u26A0" }), jsxRuntime.jsx("span", { style: styles.errorText, children: error })] })), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "Email Address" }), jsxRuntime.jsxs("div", { style: styles.inputContainer, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\u2709" }), jsxRuntime.jsx("input", { type: "email", style: styles.input, placeholder: "Enter your email", value: email, onChange: (e) => setEmail(e.target.value), autoCapitalize: "none", autoComplete: "email", disabled: isLoading, required: true })] })] }), jsxRuntime.jsx("button", { type: "submit", style: {
|
|
9077
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: styles.logoSection, children: [logo && (typeof logo === 'string' ? (jsxRuntime.jsx("img", { src: processLogoUrl(logo), alt: `${appName} Logo`, style: styles.logo })) : (logo)), jsxRuntime.jsx("h1", { style: styles.title, children: "Reset Password" }), jsxRuntime.jsx("p", { style: styles.subtitle, children: "Enter your email to receive reset instructions" })] }), jsxRuntime.jsxs("form", { onSubmit: handleRequestReset, children: [error && (jsxRuntime.jsxs("div", { style: styles.errorContainer, children: [jsxRuntime.jsx("span", { style: { color: '#ff4757', fontSize: '20px' }, children: "\u26A0" }), jsxRuntime.jsx("span", { style: styles.errorText, children: error })] })), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "Email Address" }), jsxRuntime.jsxs("div", { style: styles.inputContainer, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\u2709" }), jsxRuntime.jsx("input", { type: "email", style: styles.input, placeholder: "Enter your email", value: email, onChange: (e) => setEmail(e.target.value), autoCapitalize: "none", autoComplete: "email", disabled: isLoading, required: true })] })] }), jsxRuntime.jsx("button", { type: "submit", style: {
|
|
8994
9078
|
...styles.button,
|
|
8995
9079
|
opacity: isLoading ? 0.8 : 1,
|
|
8996
9080
|
cursor: isLoading ? 'not-allowed' : 'pointer'
|
|
@@ -9127,21 +9211,32 @@ function AccountCreationForm({ config = {}, onSuccess, onError, onBackToLogin })
|
|
|
9127
9211
|
const styles = {
|
|
9128
9212
|
container: {
|
|
9129
9213
|
maxWidth: '400px',
|
|
9214
|
+
width: '100%',
|
|
9130
9215
|
margin: '0 auto',
|
|
9131
9216
|
padding: '24px',
|
|
9132
9217
|
backgroundColor: '#ffffff',
|
|
9133
9218
|
borderRadius: '24px',
|
|
9134
9219
|
boxShadow: '0 8px 24px rgba(0, 0, 0, 0.1)',
|
|
9135
|
-
border: '1px solid #f0f0f0'
|
|
9220
|
+
border: '1px solid #f0f0f0',
|
|
9221
|
+
boxSizing: 'border-box'
|
|
9136
9222
|
},
|
|
9137
9223
|
logoSection: {
|
|
9224
|
+
display: 'flex',
|
|
9225
|
+
flexDirection: 'column',
|
|
9226
|
+
justifyContent: 'center',
|
|
9227
|
+
alignItems: 'center',
|
|
9138
9228
|
textAlign: 'center',
|
|
9139
|
-
marginBottom: '32px'
|
|
9229
|
+
marginBottom: '32px',
|
|
9230
|
+
width: '100%'
|
|
9140
9231
|
},
|
|
9141
9232
|
logo: {
|
|
9142
9233
|
maxWidth: '320px',
|
|
9143
|
-
|
|
9144
|
-
|
|
9234
|
+
maxHeight: '80px',
|
|
9235
|
+
height: 'auto',
|
|
9236
|
+
width: 'auto',
|
|
9237
|
+
objectFit: 'contain',
|
|
9238
|
+
marginBottom: '20px',
|
|
9239
|
+
display: 'block'
|
|
9145
9240
|
},
|
|
9146
9241
|
title: {
|
|
9147
9242
|
fontSize: '28px',
|
|
@@ -9254,7 +9349,7 @@ function AccountCreationForm({ config = {}, onSuccess, onError, onBackToLogin })
|
|
|
9254
9349
|
const renderStep = () => {
|
|
9255
9350
|
switch (step) {
|
|
9256
9351
|
case 'form':
|
|
9257
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: styles.logoSection, children: [logo && (typeof logo === 'string' ? (jsxRuntime.jsx("img", { src: logo, alt: `${appName} Logo`, style: styles.logo })) : (logo)), jsxRuntime.jsx("h1", { style: styles.title, children: "Create Account" }), jsxRuntime.jsxs("p", { style: styles.subtitle, children: ["Join ", appName, " today"] })] }), jsxRuntime.jsxs("form", { onSubmit: handleSubmit, children: [errors.general && (jsxRuntime.jsxs("div", { style: { ...styles.successContainer, backgroundColor: '#fef2f2', borderColor: '#fecaca' }, children: [jsxRuntime.jsx("span", { style: { color: '#ff4757', fontSize: '20px' }, children: "\u26A0" }), jsxRuntime.jsx("span", { style: { ...styles.successText, color: '#dc2626' }, children: errors.general })] })), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "First Name *" }), jsxRuntime.jsxs("div", { style: { ...styles.inputContainer, ...(errors.name ? styles.inputError : {}) }, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\uD83D\uDC64" }), jsxRuntime.jsx("input", { type: "text", style: styles.input, placeholder: "Enter your first name", value: formData.name, onChange: (e) => updateField('name', e.target.value), autoComplete: "given-name", disabled: isLoading, required: true })] }), errors.name && jsxRuntime.jsx("div", { style: styles.errorText, children: errors.name })] }), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "Last Name *" }), jsxRuntime.jsxs("div", { style: { ...styles.inputContainer, ...(errors.lastName ? styles.inputError : {}) }, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\uD83D\uDC64" }), jsxRuntime.jsx("input", { type: "text", style: styles.input, placeholder: "Enter your last name", value: formData.lastName, onChange: (e) => updateField('lastName', e.target.value), autoComplete: "family-name", disabled: isLoading, required: true })] }), errors.lastName && jsxRuntime.jsx("div", { style: styles.errorText, children: errors.lastName })] }), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "Email Address *" }), jsxRuntime.jsxs("div", { style: { ...styles.inputContainer, ...(errors.email ? styles.inputError : {}) }, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\u2709" }), jsxRuntime.jsx("input", { type: "email", style: styles.input, placeholder: "Enter your email", value: formData.email, onChange: (e) => updateField('email', e.target.value), autoCapitalize: "none", autoComplete: "email", disabled: isLoading, required: true })] }), errors.email && jsxRuntime.jsx("div", { style: styles.errorText, children: errors.email })] }), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "Password *" }), jsxRuntime.jsxs("div", { style: { ...styles.inputContainer, ...(errors.password ? styles.inputError : {}) }, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\uD83D\uDD12" }), jsxRuntime.jsx("input", { type: showPassword ? 'text' : 'password', style: styles.input, placeholder: "Create a password", value: formData.password, onChange: (e) => updateField('password', e.target.value), autoComplete: "new-password", disabled: isLoading, required: true }), jsxRuntime.jsx("button", { type: "button", style: styles.eyeButton, onClick: () => setShowPassword(!showPassword), disabled: isLoading, children: showPassword ? '👁' : '👁🗨' })] }), errors.password && jsxRuntime.jsx("div", { style: styles.errorText, children: errors.password })] }), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "Confirm Password *" }), jsxRuntime.jsxs("div", { style: { ...styles.inputContainer, ...(errors.confirmPassword ? styles.inputError : {}) }, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\uD83D\uDD12" }), jsxRuntime.jsx("input", { type: showConfirmPassword ? 'text' : 'password', style: styles.input, placeholder: "Confirm your password", value: formData.confirmPassword, onChange: (e) => updateField('confirmPassword', e.target.value), autoComplete: "new-password", disabled: isLoading, required: true }), jsxRuntime.jsx("button", { type: "button", style: styles.eyeButton, onClick: () => setShowConfirmPassword(!showConfirmPassword), disabled: isLoading, children: showConfirmPassword ? '👁' : '👁🗨' })] }), errors.confirmPassword && jsxRuntime.jsx("div", { style: styles.errorText, children: errors.confirmPassword })] }), jsxRuntime.jsx("button", { type: "submit", style: {
|
|
9352
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: styles.logoSection, children: [logo && (typeof logo === 'string' ? (jsxRuntime.jsx("img", { src: processLogoUrl(logo), alt: `${appName} Logo`, style: styles.logo })) : (logo)), jsxRuntime.jsx("h1", { style: styles.title, children: "Create Account" }), jsxRuntime.jsxs("p", { style: styles.subtitle, children: ["Join ", appName, " today"] })] }), jsxRuntime.jsxs("form", { onSubmit: handleSubmit, children: [errors.general && (jsxRuntime.jsxs("div", { style: { ...styles.successContainer, backgroundColor: '#fef2f2', borderColor: '#fecaca' }, children: [jsxRuntime.jsx("span", { style: { color: '#ff4757', fontSize: '20px' }, children: "\u26A0" }), jsxRuntime.jsx("span", { style: { ...styles.successText, color: '#dc2626' }, children: errors.general })] })), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "First Name *" }), jsxRuntime.jsxs("div", { style: { ...styles.inputContainer, ...(errors.name ? styles.inputError : {}) }, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\uD83D\uDC64" }), jsxRuntime.jsx("input", { type: "text", style: styles.input, placeholder: "Enter your first name", value: formData.name, onChange: (e) => updateField('name', e.target.value), autoComplete: "given-name", disabled: isLoading, required: true })] }), errors.name && jsxRuntime.jsx("div", { style: styles.errorText, children: errors.name })] }), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "Last Name *" }), jsxRuntime.jsxs("div", { style: { ...styles.inputContainer, ...(errors.lastName ? styles.inputError : {}) }, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\uD83D\uDC64" }), jsxRuntime.jsx("input", { type: "text", style: styles.input, placeholder: "Enter your last name", value: formData.lastName, onChange: (e) => updateField('lastName', e.target.value), autoComplete: "family-name", disabled: isLoading, required: true })] }), errors.lastName && jsxRuntime.jsx("div", { style: styles.errorText, children: errors.lastName })] }), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "Email Address *" }), jsxRuntime.jsxs("div", { style: { ...styles.inputContainer, ...(errors.email ? styles.inputError : {}) }, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\u2709" }), jsxRuntime.jsx("input", { type: "email", style: styles.input, placeholder: "Enter your email", value: formData.email, onChange: (e) => updateField('email', e.target.value), autoCapitalize: "none", autoComplete: "email", disabled: isLoading, required: true })] }), errors.email && jsxRuntime.jsx("div", { style: styles.errorText, children: errors.email })] }), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "Password *" }), jsxRuntime.jsxs("div", { style: { ...styles.inputContainer, ...(errors.password ? styles.inputError : {}) }, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\uD83D\uDD12" }), jsxRuntime.jsx("input", { type: showPassword ? 'text' : 'password', style: styles.input, placeholder: "Create a password", value: formData.password, onChange: (e) => updateField('password', e.target.value), autoComplete: "new-password", disabled: isLoading, required: true }), jsxRuntime.jsx("button", { type: "button", style: styles.eyeButton, onClick: () => setShowPassword(!showPassword), disabled: isLoading, children: showPassword ? '👁' : '👁🗨' })] }), errors.password && jsxRuntime.jsx("div", { style: styles.errorText, children: errors.password })] }), jsxRuntime.jsxs("div", { style: styles.inputGroup, children: [jsxRuntime.jsx("label", { style: styles.inputLabel, children: "Confirm Password *" }), jsxRuntime.jsxs("div", { style: { ...styles.inputContainer, ...(errors.confirmPassword ? styles.inputError : {}) }, children: [jsxRuntime.jsx("span", { style: { marginRight: '12px', opacity: 0.7, color: '#666' }, children: "\uD83D\uDD12" }), jsxRuntime.jsx("input", { type: showConfirmPassword ? 'text' : 'password', style: styles.input, placeholder: "Confirm your password", value: formData.confirmPassword, onChange: (e) => updateField('confirmPassword', e.target.value), autoComplete: "new-password", disabled: isLoading, required: true }), jsxRuntime.jsx("button", { type: "button", style: styles.eyeButton, onClick: () => setShowConfirmPassword(!showConfirmPassword), disabled: isLoading, children: showConfirmPassword ? '👁' : '👁🗨' })] }), errors.confirmPassword && jsxRuntime.jsx("div", { style: styles.errorText, children: errors.confirmPassword })] }), jsxRuntime.jsx("button", { type: "submit", style: {
|
|
9258
9353
|
...styles.button,
|
|
9259
9354
|
opacity: isLoading ? 0.8 : 1,
|
|
9260
9355
|
cursor: isLoading ? 'not-allowed' : 'pointer'
|