negodesign 0.0.6 → 0.0.8
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/assets/login-01-admin.webp +0 -0
- package/dist/components/NegoDesign.svelte +24 -0
- package/dist/components/NegoDesign.svelte.d.ts +9 -0
- package/dist/components/core/button/ButtonSend.svelte +15 -0
- package/dist/components/core/button/ButtonSend.svelte.d.ts +4 -0
- package/dist/components/core/datatable/ui/DataTableActions.svelte +1 -1
- package/dist/components/core/datatable/ui/DataTableListFilter.svelte +1 -1
- package/dist/components/core/datatable/ui/DataTableListPagination.svelte +1 -1
- package/dist/components/core/form/ui/input-code-otp.svelte +58 -0
- package/dist/components/core/form/ui/input-code-otp.svelte.d.ts +10 -0
- package/dist/components/core/form/ui/input-email-or-phone.svelte +23 -0
- package/dist/components/core/form/ui/input-email-or-phone.svelte.d.ts +4 -0
- package/dist/components/core/form/ui/input-phone.svelte +21 -11
- package/dist/components/{pages/login/01/ui → core/panel}/LeftHero.svelte +16 -4
- package/dist/components/{pages/login/01/ui → core/panel}/LeftHero.svelte.d.ts +1 -1
- package/dist/components/core/tabs/data/TabModel.d.ts +1 -1
- package/dist/components/core/tabs/ui/tab-underline.svelte +3 -1
- package/dist/components/pages/forget-password/01/ui/ForgetPasswordCard.svelte +59 -0
- package/dist/components/pages/forget-password/01/ui/ForgetPasswordCard.svelte.d.ts +15 -0
- package/dist/components/pages/forget-password/01/ui/FormForgetPassword.svelte +37 -0
- package/dist/components/pages/forget-password/01/ui/FormForgetPassword.svelte.d.ts +8 -0
- package/dist/components/pages/forget-password/01/ui/PageForgetPassword01.svelte +74 -0
- package/dist/components/pages/forget-password/01/ui/PageForgetPassword01.svelte.d.ts +4 -0
- package/dist/components/pages/forget-password/PageForgetPassword.svelte +19 -0
- package/dist/components/pages/forget-password/PageForgetPassword.svelte.d.ts +15 -0
- package/dist/components/pages/forget-password/types.d.ts +15 -0
- package/dist/components/pages/login/01/ui/FormLogin.svelte +6 -4
- package/dist/components/pages/login/01/ui/FormLogin.svelte.d.ts +4 -2
- package/dist/components/pages/login/01/ui/FormLoginEmailPassword.svelte +5 -4
- package/dist/components/pages/login/01/ui/FormLoginEmailPassword.svelte.d.ts +3 -2
- package/dist/components/pages/login/01/ui/FormLoginPhonePassword.svelte +5 -4
- package/dist/components/pages/login/01/ui/FormLoginPhonePassword.svelte.d.ts +3 -2
- package/dist/components/pages/login/01/ui/FormLoginUsernamePassword.svelte +5 -4
- package/dist/components/pages/login/01/ui/FormLoginUsernamePassword.svelte.d.ts +3 -2
- package/dist/components/pages/login/01/ui/{AuthCard.svelte → LoginCard.svelte} +16 -8
- package/dist/components/pages/login/01/ui/{AuthCard.svelte.d.ts → LoginCard.svelte.d.ts} +6 -5
- package/dist/components/pages/login/01/ui/PageLogin01.svelte +86 -49
- package/dist/components/pages/login/01/ui/PageLogin01.svelte.d.ts +1 -1
- package/dist/components/pages/login/PageLogin.svelte +1 -1
- package/dist/components/pages/login/PageLogin.svelte.d.ts +1 -1
- package/dist/components/pages/login/{01/data/page-props.d.ts → types.d.ts} +4 -2
- package/dist/components/pages/login/types.js +1 -0
- package/dist/components/pages/otp-verification/01/ui/FormOtpVerification.svelte +29 -0
- package/dist/components/pages/otp-verification/01/ui/FormOtpVerification.svelte.d.ts +8 -0
- package/dist/components/pages/otp-verification/01/ui/OtpVerificationCard.svelte +56 -0
- package/dist/components/pages/otp-verification/01/ui/OtpVerificationCard.svelte.d.ts +15 -0
- package/dist/components/pages/otp-verification/01/ui/PageOtpVerification01.svelte +72 -0
- package/dist/components/pages/otp-verification/01/ui/PageOtpVerification01.svelte.d.ts +4 -0
- package/dist/components/pages/otp-verification/PageOtpVerification.svelte +16 -0
- package/dist/components/pages/otp-verification/PageOtpVerification.svelte.d.ts +12 -0
- package/dist/components/pages/otp-verification/types.d.ts +13 -0
- package/dist/components/pages/otp-verification/types.js +1 -0
- package/dist/components/pages/reset-password/01/ui/FormResetPassword.svelte +41 -0
- package/dist/components/pages/reset-password/01/ui/FormResetPassword.svelte.d.ts +8 -0
- package/dist/components/pages/reset-password/01/ui/PageResetPassword01.svelte +72 -0
- package/dist/components/pages/reset-password/01/ui/PageResetPassword01.svelte.d.ts +4 -0
- package/dist/components/pages/reset-password/01/ui/ResetPasswordCard.svelte +56 -0
- package/dist/components/pages/reset-password/01/ui/ResetPasswordCard.svelte.d.ts +15 -0
- package/dist/components/pages/reset-password/PageResetPassword.svelte +16 -0
- package/dist/components/pages/reset-password/PageResetPassword.svelte.d.ts +12 -0
- package/dist/components/pages/reset-password/types.d.ts +15 -0
- package/dist/components/pages/reset-password/types.js +1 -0
- package/dist/components/ui/badge/badge.svelte.d.ts +20 -20
- package/dist/components/ui/button/button.svelte +47 -28
- package/dist/components/ui/button/button.svelte.d.ts +77 -50
- package/dist/components/ui/button/index.d.ts +2 -2
- package/dist/components/ui/button/index.js +2 -2
- package/dist/components/ui/command/command-dialog.svelte +42 -0
- package/dist/components/ui/command/command-dialog.svelte.d.ts +14 -0
- package/dist/components/ui/command/command-empty.svelte +17 -0
- package/dist/components/ui/command/command-empty.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-group.svelte +33 -0
- package/dist/components/ui/command/command-group.svelte.d.ts +7 -0
- package/dist/components/ui/command/command-input.svelte +33 -0
- package/dist/components/ui/command/command-input.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-item.svelte +27 -0
- package/dist/components/ui/command/command-item.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-link-item.svelte +20 -0
- package/dist/components/ui/command/command-link-item.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-list.svelte +20 -0
- package/dist/components/ui/command/command-list.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-loading.svelte +7 -0
- package/dist/components/ui/command/command-loading.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-separator.svelte +17 -0
- package/dist/components/ui/command/command-separator.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-shortcut.svelte +23 -0
- package/dist/components/ui/command/command-shortcut.svelte.d.ts +5 -0
- package/dist/components/ui/command/command.svelte +28 -0
- package/dist/components/ui/command/command.svelte.d.ts +8 -0
- package/dist/components/ui/command/index.d.ts +12 -0
- package/dist/components/ui/command/index.js +14 -0
- package/dist/components/ui/dialog/dialog-close.svelte +11 -0
- package/dist/components/ui/dialog/dialog-close.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-content.svelte +48 -0
- package/dist/components/ui/dialog/dialog-content.svelte.d.ts +13 -0
- package/dist/components/ui/dialog/dialog-description.svelte +20 -0
- package/dist/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-footer.svelte +32 -0
- package/dist/components/ui/dialog/dialog-footer.svelte.d.ts +8 -0
- package/dist/components/ui/dialog/dialog-header.svelte +20 -0
- package/dist/components/ui/dialog/dialog-header.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte +20 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-portal.svelte +7 -0
- package/dist/components/ui/dialog/dialog-portal.svelte.d.ts +3 -0
- package/dist/components/ui/dialog/dialog-title.svelte +17 -0
- package/dist/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-trigger.svelte +11 -0
- package/dist/components/ui/dialog/dialog-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog.svelte +7 -0
- package/dist/components/ui/dialog/dialog.svelte.d.ts +3 -0
- package/dist/components/ui/dialog/index.d.ts +11 -0
- package/dist/components/ui/dialog/index.js +13 -0
- package/dist/components/ui/input/index.d.ts +2 -2
- package/dist/components/ui/input/index.js +2 -2
- package/dist/components/ui/input/input.svelte +9 -9
- package/dist/components/ui/input/input.svelte.d.ts +5 -5
- package/dist/components/ui/input-group/index.d.ts +7 -0
- package/dist/components/ui/input-group/index.js +9 -0
- package/dist/components/ui/input-group/input-group-addon.svelte +53 -0
- package/dist/components/ui/input-group/input-group-addon.svelte.d.ts +32 -0
- package/dist/components/ui/input-group/input-group-button.svelte +49 -0
- package/dist/components/ui/input-group/input-group-button.svelte.d.ts +32 -0
- package/dist/components/ui/input-group/input-group-input.svelte +23 -0
- package/dist/components/ui/input-group/input-group-input.svelte.d.ts +11 -0
- package/dist/components/ui/input-group/input-group-text.svelte +22 -0
- package/dist/components/ui/input-group/input-group-text.svelte.d.ts +5 -0
- package/dist/components/ui/input-group/input-group-textarea.svelte +23 -0
- package/dist/components/ui/input-group/input-group-textarea.svelte.d.ts +3 -0
- package/dist/components/ui/input-group/input-group.svelte +24 -0
- package/dist/components/ui/input-group/input-group.svelte.d.ts +5 -0
- package/dist/components/ui/input-otp/index.d.ts +5 -0
- package/dist/components/ui/input-otp/index.js +5 -0
- package/dist/components/ui/input-otp/input-otp-group.svelte +20 -0
- package/dist/components/ui/input-otp/input-otp-group.svelte.d.ts +5 -0
- package/dist/components/ui/input-otp/input-otp-separator.svelte +28 -0
- package/dist/components/ui/input-otp/input-otp-separator.svelte.d.ts +5 -0
- package/dist/components/ui/input-otp/input-otp-slot.svelte +31 -0
- package/dist/components/ui/input-otp/input-otp-slot.svelte.d.ts +4 -0
- package/dist/components/ui/input-otp/input-otp.svelte +23 -0
- package/dist/components/ui/input-otp/input-otp.svelte.d.ts +4 -0
- package/dist/components/ui/language-switcher/index.d.ts +1 -1
- package/dist/components/ui/language-switcher/language-switcher.svelte +1 -1
- package/dist/components/ui/light-switch/light-switch.svelte +2 -2
- package/dist/components/ui/light-switch/light-switch.svelte.d.ts +1 -1
- package/dist/components/ui/phone-input/country-selector.svelte +101 -0
- package/dist/components/ui/phone-input/country-selector.svelte.d.ts +13 -0
- package/dist/components/ui/phone-input/flag.svelte +21 -0
- package/dist/components/ui/phone-input/flag.svelte.d.ts +7 -0
- package/dist/components/ui/phone-input/flags.d.ts +2 -0
- package/dist/components/ui/phone-input/flags.js +10 -0
- package/dist/components/ui/phone-input/index.d.ts +3 -0
- package/dist/components/ui/phone-input/index.js +2 -0
- package/dist/components/ui/phone-input/phone-input.svelte +63 -0
- package/dist/components/ui/phone-input/phone-input.svelte.d.ts +7 -0
- package/dist/components/ui/phone-input/types.d.ts +16 -0
- package/dist/components/ui/phone-input/types.js +1 -0
- package/dist/components/ui/popover/index.d.ts +9 -0
- package/dist/components/ui/popover/index.js +11 -0
- package/dist/components/ui/popover/popover-close.svelte +7 -0
- package/dist/components/ui/popover/popover-close.svelte.d.ts +4 -0
- package/dist/components/ui/popover/popover-content.svelte +31 -0
- package/dist/components/ui/popover/popover-content.svelte.d.ts +10 -0
- package/dist/components/ui/popover/popover-description.svelte +20 -0
- package/dist/components/ui/popover/popover-description.svelte.d.ts +5 -0
- package/dist/components/ui/popover/popover-header.svelte +20 -0
- package/dist/components/ui/popover/popover-header.svelte.d.ts +5 -0
- package/dist/components/ui/popover/popover-portal.svelte +7 -0
- package/dist/components/ui/popover/popover-portal.svelte.d.ts +3 -0
- package/dist/components/ui/popover/popover-title.svelte +15 -0
- package/dist/components/ui/popover/popover-title.svelte.d.ts +5 -0
- package/dist/components/ui/popover/popover-trigger.svelte +17 -0
- package/dist/components/ui/popover/popover-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/popover/popover.svelte +7 -0
- package/dist/components/ui/popover/popover.svelte.d.ts +3 -0
- package/dist/components/ui/scroll-area/index.d.ts +3 -0
- package/dist/components/ui/scroll-area/index.js +5 -0
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte +30 -0
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte.d.ts +4 -0
- package/dist/components/ui/scroll-area/scroll-area.svelte +43 -0
- package/dist/components/ui/scroll-area/scroll-area.svelte.d.ts +11 -0
- package/dist/components/ui/sidebar/sidebar-menu-button.svelte.d.ts +17 -17
- package/dist/components/ui/tabs/tabs-list.svelte.d.ts +8 -8
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/index.js +4 -0
- package/dist/components/ui/textarea/textarea.svelte +23 -0
- package/dist/components/ui/textarea/textarea.svelte.d.ts +5 -0
- package/dist/globals.css +579 -22
- package/dist/i18n/config.d.ts +15 -0
- package/dist/i18n/config.js +38 -0
- package/dist/i18n/index.d.ts +14 -2
- package/dist/i18n/index.js +16 -4
- package/dist/i18n/langs/en.d.ts +76 -0
- package/dist/i18n/langs/en.js +75 -0
- package/dist/i18n/langs/pt.d.ts +76 -0
- package/dist/i18n/langs/pt.js +75 -0
- package/dist/i18n/translations.d.ts +76 -0
- package/dist/i18n/translations.js +4 -74
- package/dist/index.d.ts +28 -3
- package/dist/index.js +28 -3
- package/dist/types/index.d.ts +27 -0
- package/dist/types/index.js +1 -0
- package/package.json +14 -3
- package/dist/components/button.svelte +0 -83
- package/dist/components/button.svelte.d.ts +0 -32
- package/dist/components/pages/NegoDesignLayout.svelte +0 -7
- package/dist/components/pages/NegoDesignLayout.svelte.d.ts +0 -5
- /package/dist/components/pages/{login/01/data/page-props.js → forget-password/types.js} +0 -0
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import FormLogin from "./FormLogin.svelte";
|
|
3
|
-
import type {
|
|
3
|
+
import type { LoginRequestDto, LinkProps } from "../../types";
|
|
4
4
|
|
|
5
5
|
/** Form de login com telefone e senha. Wrapper fino de FormLogin variant="PHONE". */
|
|
6
6
|
type Props = {
|
|
7
|
-
onSubmit?: (credential:
|
|
7
|
+
onSubmit?: (credential: LoginRequestDto) => void;
|
|
8
|
+
forgetPassword?: LinkProps;
|
|
8
9
|
};
|
|
9
10
|
|
|
10
|
-
let { onSubmit }: Props = $props();
|
|
11
|
+
let { onSubmit, forgetPassword }: Props = $props();
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
|
-
<FormLogin variant="PHONE" {onSubmit} />
|
|
14
|
+
<FormLogin variant="PHONE" {onSubmit} {forgetPassword} />
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LoginRequestDto, LinkProps } from "../../types";
|
|
2
2
|
/** Form de login com telefone e senha. Wrapper fino de FormLogin variant="PHONE". */
|
|
3
3
|
type Props = {
|
|
4
|
-
onSubmit?: (credential:
|
|
4
|
+
onSubmit?: (credential: LoginRequestDto) => void;
|
|
5
|
+
forgetPassword?: LinkProps;
|
|
5
6
|
};
|
|
6
7
|
declare const FormLoginPhonePassword: import("svelte").Component<Props, {}, "">;
|
|
7
8
|
type FormLoginPhonePassword = ReturnType<typeof FormLoginPhonePassword>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import FormLogin from "./FormLogin.svelte";
|
|
3
|
-
import type {
|
|
3
|
+
import type { LoginRequestDto, LinkProps } from "../../types";
|
|
4
4
|
|
|
5
5
|
/** Form de login com username e senha. Wrapper fino de FormLogin variant="USERNAME". */
|
|
6
6
|
type Props = {
|
|
7
|
-
onSubmit?: (credential:
|
|
7
|
+
onSubmit?: (credential: LoginRequestDto) => void;
|
|
8
|
+
forgetPassword?: LinkProps;
|
|
8
9
|
};
|
|
9
10
|
|
|
10
|
-
let { onSubmit }: Props = $props();
|
|
11
|
+
let { onSubmit, forgetPassword }: Props = $props();
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
|
-
<FormLogin variant="USERNAME" {onSubmit} />
|
|
14
|
+
<FormLogin variant="USERNAME" {onSubmit} {forgetPassword} />
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LoginRequestDto, LinkProps } from "../../types";
|
|
2
2
|
/** Form de login com username e senha. Wrapper fino de FormLogin variant="USERNAME". */
|
|
3
3
|
type Props = {
|
|
4
|
-
onSubmit?: (credential:
|
|
4
|
+
onSubmit?: (credential: LoginRequestDto) => void;
|
|
5
|
+
forgetPassword?: LinkProps;
|
|
5
6
|
};
|
|
6
7
|
declare const FormLoginUsernamePassword: import("svelte").Component<Props, {}, "">;
|
|
7
8
|
type FormLoginUsernamePassword = ReturnType<typeof FormLoginUsernamePassword>;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import type { Snippet } from "svelte";
|
|
9
9
|
import { LightSwitch } from "../../../../ui/light-switch";
|
|
10
10
|
import { t } from "../../../../../i18n";
|
|
11
|
-
import type { AuthFormType,
|
|
11
|
+
import type { AuthFormType, LoginRequestDto, LinkProps } from "../../types";
|
|
12
12
|
import FormLoginEmailPassword from "./FormLoginEmailPassword.svelte";
|
|
13
13
|
import FormLoginUsernamePassword from "./FormLoginUsernamePassword.svelte";
|
|
14
14
|
import FormLoginPhonePassword from "./FormLoginPhonePassword.svelte";
|
|
@@ -23,13 +23,15 @@
|
|
|
23
23
|
*/
|
|
24
24
|
type Props = {
|
|
25
25
|
formType?: AuthFormType;
|
|
26
|
-
onSubmit?: (credential:
|
|
26
|
+
onSubmit?: (credential: LoginRequestDto) => void;
|
|
27
27
|
register?: Snippet;
|
|
28
|
+
forgetPassword?: LinkProps;
|
|
28
29
|
privacyPolicy?: LinkProps;
|
|
29
30
|
termsOfService?: LinkProps;
|
|
30
31
|
};
|
|
31
32
|
|
|
32
|
-
let { formType, onSubmit, register, privacyPolicy, termsOfService }: Props =
|
|
33
|
+
let { formType, onSubmit, register, forgetPassword, privacyPolicy, termsOfService }: Props =
|
|
34
|
+
$props();
|
|
33
35
|
</script>
|
|
34
36
|
|
|
35
37
|
<div class="flex-1 flex flex-col justify-between h-screen bg-gradient-right">
|
|
@@ -65,11 +67,11 @@
|
|
|
65
67
|
|
|
66
68
|
{#snippet loginSnippet()}
|
|
67
69
|
{#if formType == "EMAIL_PASSWORD"}
|
|
68
|
-
<FormLoginEmailPassword {onSubmit} />
|
|
70
|
+
<FormLoginEmailPassword {onSubmit} {forgetPassword} />
|
|
69
71
|
{:else if formType == "USERNAME_PASSWORD"}
|
|
70
|
-
<FormLoginUsernamePassword {onSubmit} />
|
|
72
|
+
<FormLoginUsernamePassword {onSubmit} {forgetPassword} />
|
|
71
73
|
{:else if formType == "PHONE_PASSWORD"}
|
|
72
|
-
<FormLoginPhonePassword {onSubmit} />
|
|
74
|
+
<FormLoginPhonePassword {onSubmit} {forgetPassword} />
|
|
73
75
|
{/if}
|
|
74
76
|
{/snippet}
|
|
75
77
|
|
|
@@ -84,8 +86,14 @@
|
|
|
84
86
|
<div
|
|
85
87
|
class="text-[11px] text-slate-400 py-2 flex justify-center gap-2 bg-background"
|
|
86
88
|
>
|
|
87
|
-
<LinkPrivacyPolity
|
|
89
|
+
<LinkPrivacyPolity
|
|
90
|
+
href={privacyPolicy?.url}
|
|
91
|
+
onclick={privacyPolicy?.onclick}
|
|
92
|
+
/>
|
|
88
93
|
<LabelOr />
|
|
89
|
-
<LinkTermsOfService
|
|
94
|
+
<LinkTermsOfService
|
|
95
|
+
href={termsOfService?.url}
|
|
96
|
+
onclick={termsOfService?.onclick}
|
|
97
|
+
/>
|
|
90
98
|
</div>
|
|
91
99
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
-
import type { AuthFormType,
|
|
2
|
+
import type { AuthFormType, LoginRequestDto, LinkProps } from "../../types";
|
|
3
3
|
/**
|
|
4
4
|
* Card de autenticação com abas login/register.
|
|
5
5
|
* @property {AuthFormType} formType - Tipo do form (EMAIL_PASSWORD, USERNAME_PASSWORD, PHONE_PASSWORD)
|
|
@@ -10,11 +10,12 @@ import type { AuthFormType, Credential, LinkProps } from "../data/page-props";
|
|
|
10
10
|
*/
|
|
11
11
|
type Props = {
|
|
12
12
|
formType?: AuthFormType;
|
|
13
|
-
onSubmit?: (credential:
|
|
13
|
+
onSubmit?: (credential: LoginRequestDto) => void;
|
|
14
14
|
register?: Snippet;
|
|
15
|
+
forgetPassword?: LinkProps;
|
|
15
16
|
privacyPolicy?: LinkProps;
|
|
16
17
|
termsOfService?: LinkProps;
|
|
17
18
|
};
|
|
18
|
-
declare const
|
|
19
|
-
type
|
|
20
|
-
export default
|
|
19
|
+
declare const LoginCard: import("svelte").Component<Props, {}, "">;
|
|
20
|
+
type LoginCard = ReturnType<typeof LoginCard>;
|
|
21
|
+
export default LoginCard;
|
|
@@ -1,49 +1,86 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import AuthCard from "./
|
|
3
|
-
import LeftHero from "
|
|
4
|
-
import type { PageLoginProps } from "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* @property {
|
|
11
|
-
* @property {
|
|
12
|
-
* @property {
|
|
13
|
-
* @property {LinkProps}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import AuthCard from "./LoginCard.svelte";
|
|
3
|
+
import LeftHero from "../../../../core/panel/LeftHero.svelte";
|
|
4
|
+
import type { PageLoginProps } from "../../types";
|
|
5
|
+
import { t } from "../../../../../i18n";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Variante 01 da página de login.
|
|
9
|
+
* Layout split: hero à esquerda, auth card à direita.
|
|
10
|
+
* @property {CarouselItem[]} carousel - Itens do carousel (opcional, usa valores padrão)
|
|
11
|
+
* @property {string} title - Título do hero
|
|
12
|
+
* @property {AuthFormType} formType - Tipo do form de login
|
|
13
|
+
* @property {LinkProps} privacyPolicy - Config do link de privacidade
|
|
14
|
+
* @property {LinkProps} termsOfService - Config do link de termos
|
|
15
|
+
*/
|
|
16
|
+
let {
|
|
17
|
+
carousel,
|
|
18
|
+
varient,
|
|
19
|
+
title,
|
|
20
|
+
formType = "USERNAME_PASSWORD",
|
|
21
|
+
children,
|
|
22
|
+
onSubmit,
|
|
23
|
+
forgetPassword,
|
|
24
|
+
privacyPolicy,
|
|
25
|
+
termsOfService,
|
|
26
|
+
}: PageLoginProps = $props();
|
|
27
|
+
|
|
28
|
+
const defaultCarousel = $derived([
|
|
29
|
+
{
|
|
30
|
+
buttonText: $t("label.next"),
|
|
31
|
+
title: $t("carousel.login.slide1.title"),
|
|
32
|
+
description: $t("carousel.login.slide1.description"),
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
buttonText: $t("label.next"),
|
|
36
|
+
title: $t("carousel.login.slide2.title"),
|
|
37
|
+
description: $t("carousel.login.slide2.description"),
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
buttonText: $t("label.next"),
|
|
41
|
+
title: $t("carousel.login.slide3.title"),
|
|
42
|
+
description: $t("carousel.login.slide3.description"),
|
|
43
|
+
},
|
|
44
|
+
]);
|
|
45
|
+
|
|
46
|
+
const carouselItems = $derived(carousel ?? defaultCarousel);
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<main class="h-screen w-screen flex items-center">
|
|
50
|
+
<svg width="0" height="0" class="absolute">
|
|
51
|
+
<defs>
|
|
52
|
+
<clipPath id="grid-curve-clip" clipPathUnits="objectBoundingBox">
|
|
53
|
+
<path d="M0.35,0 L1,0 C0.85,0.3 1,0.6 0.4,1 L1,1 Z" />
|
|
54
|
+
</clipPath>
|
|
55
|
+
</defs>
|
|
56
|
+
</svg>
|
|
57
|
+
<div class="hidden md:block md:w-8/12">
|
|
58
|
+
<LeftHero {title} varient={varient ?? "POINTER"} items={carouselItems} />
|
|
59
|
+
</div>
|
|
60
|
+
<div class="w-full md:px-0 md:w-4/12 border-gray-900">
|
|
61
|
+
{#if children}
|
|
62
|
+
{@render children()}
|
|
63
|
+
{:else}
|
|
64
|
+
<AuthCard
|
|
65
|
+
{formType}
|
|
66
|
+
{onSubmit}
|
|
67
|
+
{forgetPassword}
|
|
68
|
+
{privacyPolicy}
|
|
69
|
+
{termsOfService}
|
|
70
|
+
/>
|
|
71
|
+
{/if}
|
|
72
|
+
</div>
|
|
73
|
+
</main>
|
|
74
|
+
|
|
75
|
+
<style>
|
|
76
|
+
:global(.grid-pattern) {
|
|
77
|
+
background-size: 40px 40px;
|
|
78
|
+
background-image: linear-gradient(
|
|
79
|
+
to right,
|
|
80
|
+
rgba(0, 0, 0, 0.1) 1px,
|
|
81
|
+
transparent 1px
|
|
82
|
+
),
|
|
83
|
+
linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
|
|
84
|
+
clip-path: url(#grid-curve-clip);
|
|
85
|
+
}
|
|
86
|
+
</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PageLoginProps } from "
|
|
1
|
+
import type { PageLoginProps } from "../../types";
|
|
2
2
|
declare const PageLogin01: import("svelte").Component<PageLoginProps, {}, "">;
|
|
3
3
|
type PageLogin01 = ReturnType<typeof PageLogin01>;
|
|
4
4
|
export default PageLogin01;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { CarouselItem, CarouselItemType } from "
|
|
1
|
+
import type { CarouselItem, CarouselItemType } from "../../core/carousel/data/CarouselModel";
|
|
2
2
|
import type { Snippet } from "svelte";
|
|
3
3
|
export type AuthFormType = "EMAIL_PASSWORD" | "PHONE_PASSWORD" | "USERNAME_PASSWORD";
|
|
4
4
|
export type LoginVariant = "EMAIL" | "USERNAME" | "PHONE";
|
|
5
|
-
export type
|
|
5
|
+
export type LoginRequestDto = {
|
|
6
6
|
password: string;
|
|
7
7
|
data: string;
|
|
8
8
|
};
|
|
@@ -16,6 +16,8 @@ export type PageLoginProps = {
|
|
|
16
16
|
title?: string;
|
|
17
17
|
children?: Snippet;
|
|
18
18
|
formType?: AuthFormType;
|
|
19
|
+
onSubmit?: (credential: LoginRequestDto) => void;
|
|
20
|
+
forgetPassword?: LinkProps;
|
|
19
21
|
privacyPolicy?: LinkProps;
|
|
20
22
|
termsOfService?: LinkProps;
|
|
21
23
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import InputCodeOtp from "../../../../core/form/ui/input-code-otp.svelte";
|
|
3
|
+
import ButtonSend from "../../../../core/button/ButtonSend.svelte";
|
|
4
|
+
import { t } from "../../../../../i18n";
|
|
5
|
+
import type { OtpVerificationRequestDto } from "../../types";
|
|
6
|
+
|
|
7
|
+
type Props = {
|
|
8
|
+
otpLength?: number;
|
|
9
|
+
onSubmit?: (request: OtpVerificationRequestDto) => void;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
let { otpLength = 6, onSubmit }: Props = $props();
|
|
13
|
+
let code = $state("");
|
|
14
|
+
|
|
15
|
+
function handleSubmit(e: Event) {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
onSubmit?.({ code });
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<form class="w-full space-y-4" onsubmit={handleSubmit}>
|
|
22
|
+
<p class="text-[13px] py-3">{$t("text.otp-verification")}</p>
|
|
23
|
+
|
|
24
|
+
<div class="space-y-1">
|
|
25
|
+
<InputCodeOtp length={otpLength} bind:value={code} />
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<ButtonSend type="submit" />
|
|
29
|
+
</form>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { OtpVerificationRequestDto } from "../../types";
|
|
2
|
+
type Props = {
|
|
3
|
+
otpLength?: number;
|
|
4
|
+
onSubmit?: (request: OtpVerificationRequestDto) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const FormOtpVerification: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type FormOtpVerification = ReturnType<typeof FormOtpVerification>;
|
|
8
|
+
export default FormOtpVerification;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import LanguageSwitcher from "../../../../ui/language-switcher/language-switcher.svelte";
|
|
3
|
+
import ButtonBack from "../../../../core/button/ButtonBack.svelte";
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
|
+
import { LightSwitch } from "../../../../ui/light-switch";
|
|
6
|
+
import { t } from "../../../../../i18n";
|
|
7
|
+
import type { OtpVerificationRequestDto } from "../../types";
|
|
8
|
+
import FormOtpVerification from "./FormOtpVerification.svelte";
|
|
9
|
+
import TabUnderline from "../../../../core/tabs/ui/tab-underline.svelte";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Card de verificação OTP.
|
|
13
|
+
* @property {number} otpLength - Quantidade de caixas do código OTP
|
|
14
|
+
* @property {(req: OtpVerificationRequestDto) => void} onSubmit - Callback ao submeter
|
|
15
|
+
*/
|
|
16
|
+
type Props = {
|
|
17
|
+
otpLength?: number;
|
|
18
|
+
onSubmit?: (request: OtpVerificationRequestDto) => void;
|
|
19
|
+
children?: Snippet;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
let { otpLength, onSubmit, children }: Props = $props();
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<div class="flex-1 flex flex-col justify-between h-screen bg-gradient-right">
|
|
26
|
+
<nav class="flex justify-between p-5 md:bg-transparent">
|
|
27
|
+
<div>
|
|
28
|
+
<ButtonBack />
|
|
29
|
+
</div>
|
|
30
|
+
<div class="flex gap-2">
|
|
31
|
+
<LightSwitch />
|
|
32
|
+
<LanguageSwitcher />
|
|
33
|
+
</div>
|
|
34
|
+
</nav>
|
|
35
|
+
|
|
36
|
+
<div
|
|
37
|
+
class="p-5 h-full border-t-2 bg-background md:border-none rounded-tl-[35px] rounded-tr-[35px]"
|
|
38
|
+
>
|
|
39
|
+
<TabUnderline
|
|
40
|
+
items={[
|
|
41
|
+
{
|
|
42
|
+
item: {
|
|
43
|
+
label: $t("label.otp-verification"),
|
|
44
|
+
value: "otp-verification",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
]}
|
|
48
|
+
/>
|
|
49
|
+
|
|
50
|
+
{#if children}
|
|
51
|
+
{@render children()}
|
|
52
|
+
{:else}
|
|
53
|
+
<FormOtpVerification {otpLength} {onSubmit} />
|
|
54
|
+
{/if}
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
import type { OtpVerificationRequestDto } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Card de verificação OTP.
|
|
5
|
+
* @property {number} otpLength - Quantidade de caixas do código OTP
|
|
6
|
+
* @property {(req: OtpVerificationRequestDto) => void} onSubmit - Callback ao submeter
|
|
7
|
+
*/
|
|
8
|
+
type Props = {
|
|
9
|
+
otpLength?: number;
|
|
10
|
+
onSubmit?: (request: OtpVerificationRequestDto) => void;
|
|
11
|
+
children?: Snippet;
|
|
12
|
+
};
|
|
13
|
+
declare const OtpVerificationCard: import("svelte").Component<Props, {}, "">;
|
|
14
|
+
type OtpVerificationCard = ReturnType<typeof OtpVerificationCard>;
|
|
15
|
+
export default OtpVerificationCard;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import OtpVerificationCard from "./OtpVerificationCard.svelte";
|
|
3
|
+
import LeftHero from "../../../../core/panel/LeftHero.svelte";
|
|
4
|
+
import type { PageOtpVerificationProps } from "../../types";
|
|
5
|
+
import { t } from "../../../../../i18n";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Variante 01 da página de verificação OTP.
|
|
9
|
+
* Layout split: hero à esquerda (reutiliza do login), card de verificação à direita.
|
|
10
|
+
*/
|
|
11
|
+
let {
|
|
12
|
+
carousel,
|
|
13
|
+
varient,
|
|
14
|
+
title,
|
|
15
|
+
children,
|
|
16
|
+
otpLength,
|
|
17
|
+
onSubmit,
|
|
18
|
+
}: PageOtpVerificationProps = $props();
|
|
19
|
+
|
|
20
|
+
const defaultCarousel = $derived([
|
|
21
|
+
{
|
|
22
|
+
buttonText: $t("label.next"),
|
|
23
|
+
title: $t("carousel.otp-verification.slide1.title"),
|
|
24
|
+
description: $t("carousel.otp-verification.slide1.description"),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
buttonText: $t("label.next"),
|
|
28
|
+
title: $t("carousel.otp-verification.slide2.title"),
|
|
29
|
+
description: $t("carousel.otp-verification.slide2.description"),
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
buttonText: $t("label.next"),
|
|
33
|
+
title: $t("carousel.otp-verification.slide3.title"),
|
|
34
|
+
description: $t("carousel.otp-verification.slide3.description"),
|
|
35
|
+
},
|
|
36
|
+
]);
|
|
37
|
+
|
|
38
|
+
const carouselItems = $derived(carousel ?? defaultCarousel);
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<main class="h-screen w-screen flex items-center">
|
|
42
|
+
<svg width="0" height="0" class="absolute">
|
|
43
|
+
<defs>
|
|
44
|
+
<clipPath id="grid-curve-clip" clipPathUnits="objectBoundingBox">
|
|
45
|
+
<path d="M0.35,0 L1,0 C0.85,0.3 1,0.6 0.4,1 L1,1 Z" />
|
|
46
|
+
</clipPath>
|
|
47
|
+
</defs>
|
|
48
|
+
</svg>
|
|
49
|
+
<div class="hidden md:block md:w-8/12">
|
|
50
|
+
<LeftHero {title} varient={varient ?? "POINTER"} items={carouselItems} />
|
|
51
|
+
</div>
|
|
52
|
+
<div class="w-full md:px-0 md:w-4/12 border-gray-900">
|
|
53
|
+
{#if children}
|
|
54
|
+
{@render children()}
|
|
55
|
+
{:else}
|
|
56
|
+
<OtpVerificationCard {otpLength} {onSubmit} />
|
|
57
|
+
{/if}
|
|
58
|
+
</div>
|
|
59
|
+
</main>
|
|
60
|
+
|
|
61
|
+
<style>
|
|
62
|
+
:global(.grid-pattern) {
|
|
63
|
+
background-size: 40px 40px;
|
|
64
|
+
background-image: linear-gradient(
|
|
65
|
+
to right,
|
|
66
|
+
rgba(0, 0, 0, 0.1) 1px,
|
|
67
|
+
transparent 1px
|
|
68
|
+
),
|
|
69
|
+
linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
|
|
70
|
+
clip-path: url(#grid-curve-clip);
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PageOtpVerificationProps } from "../../types";
|
|
2
|
+
declare const PageOtpVerification01: import("svelte").Component<PageOtpVerificationProps, {}, "">;
|
|
3
|
+
type PageOtpVerification01 = ReturnType<typeof PageOtpVerification01>;
|
|
4
|
+
export default PageOtpVerification01;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { PageOtpVerificationProps } from "./types";
|
|
3
|
+
import PageOtpVerification01 from "./01/ui/PageOtpVerification01.svelte";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Página de verificação OTP.
|
|
7
|
+
* @property {"01"} varient - Variante do layout
|
|
8
|
+
*/
|
|
9
|
+
type Props = {
|
|
10
|
+
varient?: "01";
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
let { ...props }: PageOtpVerificationProps & Props = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<PageOtpVerification01 {...props} />
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PageOtpVerificationProps } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Página de verificação OTP.
|
|
4
|
+
* @property {"01"} varient - Variante do layout
|
|
5
|
+
*/
|
|
6
|
+
type Props = {
|
|
7
|
+
varient?: "01";
|
|
8
|
+
};
|
|
9
|
+
type $$ComponentProps = PageOtpVerificationProps & Props;
|
|
10
|
+
declare const PageOtpVerification: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
11
|
+
type PageOtpVerification = ReturnType<typeof PageOtpVerification>;
|
|
12
|
+
export default PageOtpVerification;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CarouselItem, CarouselItemType } from "../../core/carousel/data/CarouselModel";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
export type OtpVerificationRequestDto = {
|
|
4
|
+
code: string;
|
|
5
|
+
};
|
|
6
|
+
export type PageOtpVerificationProps = {
|
|
7
|
+
carousel?: CarouselItem[];
|
|
8
|
+
varient?: CarouselItemType;
|
|
9
|
+
title?: string;
|
|
10
|
+
children?: Snippet;
|
|
11
|
+
otpLength?: number;
|
|
12
|
+
onSubmit?: (request: OtpVerificationRequestDto) => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import InputCodeOtp from "../../../../core/form/ui/input-code-otp.svelte";
|
|
3
|
+
import InputPassword from "../../../../core/form/ui/input-password.svelte";
|
|
4
|
+
import InputPasswordConfirm from "../../../../core/form/ui/input-password-confirm.svelte";
|
|
5
|
+
import ButtonSend from "../../../../core/button/ButtonSend.svelte";
|
|
6
|
+
import { t } from "../../../../../i18n";
|
|
7
|
+
import type { ResetPasswordRequestDto } from "../../types";
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
otpLength?: number;
|
|
11
|
+
onSubmit?: (request: ResetPasswordRequestDto) => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
let { otpLength = 6, onSubmit }: Props = $props();
|
|
15
|
+
let code = $state("");
|
|
16
|
+
let password = $state("");
|
|
17
|
+
let confirmPassword = $state("");
|
|
18
|
+
|
|
19
|
+
function handleSubmit(e: Event) {
|
|
20
|
+
e.preventDefault();
|
|
21
|
+
onSubmit?.({ code, password, confirmPassword });
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<form class="w-full space-y-4" onsubmit={handleSubmit}>
|
|
26
|
+
<p class="text-[13px] py-3">{$t("text.reset-password")}</p>
|
|
27
|
+
|
|
28
|
+
<div class="space-y-1">
|
|
29
|
+
<InputCodeOtp length={otpLength} bind:value={code} />
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div class="space-y-1">
|
|
33
|
+
<InputPassword bind:value={password} />
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div class="space-y-1">
|
|
37
|
+
<InputPasswordConfirm bind:value={confirmPassword} />
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<ButtonSend type="submit" />
|
|
41
|
+
</form>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ResetPasswordRequestDto } from "../../types";
|
|
2
|
+
type Props = {
|
|
3
|
+
otpLength?: number;
|
|
4
|
+
onSubmit?: (request: ResetPasswordRequestDto) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const FormResetPassword: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type FormResetPassword = ReturnType<typeof FormResetPassword>;
|
|
8
|
+
export default FormResetPassword;
|