@pagamio/frontend-commons-lib 0.8.305 → 0.8.306
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/lib/auth/components/LoginPage.js +9 -3
- package/lib/styles.css +14 -0
- package/package.json +1 -1
|
@@ -309,18 +309,24 @@ export function PagamioLoginPage({ logo, text = loginPageDefaultText, appLabel,
|
|
|
309
309
|
'Email & Password';
|
|
310
310
|
const phoneTabLabel = phoneOtpConfig?.tabLabel ?? phonePinConfig?.tabLabel ?? (phonePinConfig ? 'Phone + PIN' : 'Phone + OTP');
|
|
311
311
|
const usernameTabLabel = usernamePinConfig?.tabLabel ?? 'Login Number + PIN';
|
|
312
|
-
return (_jsx(AuthPageLayout, { appLabel: appLabel, title: text.welcomeTitle, subtitle: text.welcomeSubtitle, errorMessage: activeTab === 'password' ? (error ?? authError?.message) : undefined, logo: logo, className: className, horizontal: false, sideContent: features && features.length > 0 ? _jsx(FeatureCarousel, { features: features }) : undefined, sideContentClass: sideContentClass, footer: footer, children: _jsxs("div", { className: "mt-8", children: [showTabs && (_jsxs("div", { className: "mb-6 flex rounded-
|
|
312
|
+
return (_jsx(AuthPageLayout, { appLabel: appLabel, title: text.welcomeTitle, subtitle: text.welcomeSubtitle, errorMessage: activeTab === 'password' ? (error ?? authError?.message) : undefined, logo: logo, className: className, horizontal: false, sideContent: features && features.length > 0 ? _jsx(FeatureCarousel, { features: features }) : undefined, sideContentClass: sideContentClass, footer: footer, children: _jsxs("div", { className: "mt-8", children: [showTabs && (_jsxs("div", { className: "mb-6 inline-flex w-full items-center gap-1 rounded-xl bg-muted/60 p-1", role: "tablist", "aria-label": "Login method", children: [_jsx("button", { type: "button", role: "tab", "aria-selected": activeTab === 'password', onClick: () => setActiveTab('password'), className: `flex-1 rounded-lg px-3 py-2 text-center text-sm font-medium transition-all ${activeTab === 'password'
|
|
313
|
+
? 'bg-background text-foreground shadow-sm ring-1 ring-border'
|
|
314
|
+
: 'text-muted-foreground hover:bg-background/40 hover:text-foreground'}`, children: passwordTabLabel }), showPhoneTab && (_jsx("button", { type: "button", role: "tab", "aria-selected": activeTab === 'phone', onClick: () => {
|
|
313
315
|
setActiveTab('phone');
|
|
314
316
|
setPhoneStep('enterPhone');
|
|
315
317
|
setPhoneOtpValue('');
|
|
316
318
|
setPhonePinValue('');
|
|
317
319
|
setPhoneError(null);
|
|
318
|
-
}, className: `flex-1 py-2 text-sm font-medium transition-
|
|
320
|
+
}, className: `flex-1 rounded-lg px-3 py-2 text-center text-sm font-medium transition-all ${activeTab === 'phone'
|
|
321
|
+
? 'bg-background text-foreground shadow-sm ring-1 ring-border'
|
|
322
|
+
: 'text-muted-foreground hover:bg-background/40 hover:text-foreground'}`, children: phoneTabLabel })), showUsernameTab && (_jsx("button", { type: "button", role: "tab", "aria-selected": activeTab === 'username', onClick: () => {
|
|
319
323
|
setActiveTab('username');
|
|
320
324
|
setUsernameStep('enterLoginNumber');
|
|
321
325
|
setLoginNumberPinValue('');
|
|
322
326
|
setUsernameError(null);
|
|
323
|
-
}, className: `flex-1 py-2 text-sm font-medium transition-
|
|
327
|
+
}, className: `flex-1 rounded-lg px-3 py-2 text-center text-sm font-medium transition-all ${activeTab === 'username'
|
|
328
|
+
? 'bg-background text-foreground shadow-sm ring-1 ring-border'
|
|
329
|
+
: 'text-muted-foreground hover:bg-background/40 hover:text-foreground'}`, children: usernameTabLabel }))] })), activeTab === 'password' && (_jsxs(_Fragment, { children: [_jsx(FormEngine, { fields: loginFields, onSubmit: handleSubmit, layout: "vertical", className: "mb-0 px-0", submitButtonClass: "w-full", submitButtonText: isLoading ? text.loadingButtonLabel : text.loginButtonLabel, onCancel: () => { }, showCancelButton: false, showSubmittingText: false, formRef: formRef, initialValues: {
|
|
324
330
|
...(loginFieldType === 'email' ? { email: '' } : { username: '' }),
|
|
325
331
|
password: '',
|
|
326
332
|
rememberMe: false,
|
package/lib/styles.css
CHANGED
|
@@ -2486,6 +2486,9 @@ video {
|
|
|
2486
2486
|
.bg-muted\/30 {
|
|
2487
2487
|
background-color: hsl(var(--muted) / 0.3);
|
|
2488
2488
|
}
|
|
2489
|
+
.bg-muted\/60 {
|
|
2490
|
+
background-color: hsl(var(--muted) / 0.6);
|
|
2491
|
+
}
|
|
2489
2492
|
.bg-orange-100 {
|
|
2490
2493
|
--tw-bg-opacity: 1;
|
|
2491
2494
|
background-color: rgb(254 236 220 / var(--tw-bg-opacity, 1));
|
|
@@ -3591,6 +3594,11 @@ video {
|
|
|
3591
3594
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
3592
3595
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
3593
3596
|
}
|
|
3597
|
+
.ring-1 {
|
|
3598
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
3599
|
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
3600
|
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
3601
|
+
}
|
|
3594
3602
|
.ring-2 {
|
|
3595
3603
|
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
3596
3604
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
@@ -3606,6 +3614,9 @@ video {
|
|
|
3606
3614
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
3607
3615
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
3608
3616
|
}
|
|
3617
|
+
.ring-border {
|
|
3618
|
+
--tw-ring-color: hsl(var(--border));
|
|
3619
|
+
}
|
|
3609
3620
|
.ring-cyan-400 {
|
|
3610
3621
|
--tw-ring-opacity: 1;
|
|
3611
3622
|
--tw-ring-color: rgb(34 211 238 / var(--tw-ring-opacity, 1));
|
|
@@ -4193,6 +4204,9 @@ video {
|
|
|
4193
4204
|
.hover\:bg-accent:hover {
|
|
4194
4205
|
background-color: hsl(var(--accent));
|
|
4195
4206
|
}
|
|
4207
|
+
.hover\:bg-background\/40:hover {
|
|
4208
|
+
background-color: hsl(var(--background) / 0.4);
|
|
4209
|
+
}
|
|
4196
4210
|
.hover\:bg-blue-200:hover {
|
|
4197
4211
|
--tw-bg-opacity: 1;
|
|
4198
4212
|
background-color: rgb(195 221 253 / var(--tw-bg-opacity, 1));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagamio/frontend-commons-lib",
|
|
3
3
|
"description": "Pagamio library for Frontend reusable components like the form engine and table container",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.306",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"provenance": false
|