negodesign 0.0.75 → 0.0.77
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/components/pages/security/auth/PageAuth01.svelte +65 -0
- package/dist/components/pages/security/auth/PageAuth01.svelte.d.ts +17 -0
- package/dist/components/pages/security/auth/PageAuth02.svelte +45 -0
- package/dist/components/pages/security/auth/PageAuth02.svelte.d.ts +17 -0
- package/dist/components/pages/security/auth/PageAuth03.svelte +45 -0
- package/dist/components/pages/security/auth/PageAuth03.svelte.d.ts +17 -0
- package/dist/components/pages/security/login/01/ui/PageLogin01.svelte +15 -40
- package/dist/components/pages/security/login/02/ui/PageLogin02.svelte +15 -20
- package/dist/components/pages/security/login/03/ui/PageLogin03.svelte +15 -20
- package/dist/components/pages/security/register/01/ui/PageRegister01.svelte +64 -0
- package/dist/components/pages/security/register/01/ui/PageRegister01.svelte.d.ts +3 -0
- package/dist/components/pages/security/register/01/ui/RegisterCard.svelte +100 -0
- package/dist/components/pages/security/register/01/ui/RegisterCard.svelte.d.ts +12 -0
- package/dist/components/pages/security/register/02/ui/PageRegister02.svelte +76 -0
- package/dist/components/pages/security/register/02/ui/PageRegister02.svelte.d.ts +4 -0
- package/dist/components/pages/security/register/02/ui/RegisterCard02.svelte +98 -0
- package/dist/components/pages/security/register/02/ui/RegisterCard02.svelte.d.ts +12 -0
- package/dist/components/pages/security/register/03/ui/PageRegister03.svelte +76 -0
- package/dist/components/pages/security/register/03/ui/PageRegister03.svelte.d.ts +4 -0
- package/dist/components/pages/security/register/03/ui/RegisterCard03.svelte +103 -0
- package/dist/components/pages/security/register/03/ui/RegisterCard03.svelte.d.ts +12 -0
- package/dist/components/pages/security/register/FormRegister.svelte +120 -0
- package/dist/components/pages/security/register/FormRegister.svelte.d.ts +8 -0
- package/dist/components/pages/security/register/PageRegister.svelte +30 -0
- package/dist/components/pages/security/register/PageRegister.svelte.d.ts +8 -0
- package/dist/components/pages/security/register/types.d.ts +51 -0
- package/dist/components/pages/security/register/types.js +1 -0
- package/dist/components/ui/modal/core/types.d.ts +3 -1
- package/dist/components/ui/modal/core/ui/ModalCore.svelte +132 -129
- package/dist/components/ui/modal/grid/ui/02/ModalGridSelection02.svelte +146 -142
- package/dist/components/ui/modal/share/types.d.ts +16 -1
- package/dist/components/ui/modal/share/ui/ModalShareSelection.svelte +156 -103
- package/dist/docs/DocsSidebar.svelte +58 -1
- package/dist/docs/components.js +94 -8
- package/dist/globals.css +18 -101
- package/dist/i18n/langs/en.d.ts +17 -0
- package/dist/i18n/langs/en.js +17 -0
- package/dist/i18n/langs/pt.d.ts +17 -0
- package/dist/i18n/langs/pt.js +17 -0
- package/dist/i18n/translations.d.ts +34 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.js +17 -1
- package/dist/types/index.d.ts +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* @component RegisterCard02
|
|
4
|
+
* Variant 02 authentication card for registration with welcome header, social login, and form.
|
|
5
|
+
*
|
|
6
|
+
* @example svelte
|
|
7
|
+
* <RegisterCard02 fields={{ isName: true, isEmail: true }} onSubmit={(data) => register(data)} />
|
|
8
|
+
*/
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import LanguageSwitcher from "../../../../../ui/language-switcher/language-switcher.svelte";
|
|
13
|
+
import { LightSwitch } from "../../../../../ui/light-switch";
|
|
14
|
+
import { t } from "../../../../../../i18n";
|
|
15
|
+
import type {
|
|
16
|
+
RegisterFormFields,
|
|
17
|
+
RegisterRequestDto,
|
|
18
|
+
LinkProps,
|
|
19
|
+
SocialLoginItem,
|
|
20
|
+
} from "../../types";
|
|
21
|
+
import SocialLogin from "../../../../../ui/social-login/social-login.svelte";
|
|
22
|
+
import FormRegister from "../../FormRegister.svelte";
|
|
23
|
+
|
|
24
|
+
type Props = {
|
|
25
|
+
fields?: RegisterFormFields;
|
|
26
|
+
onSubmit?: (data: RegisterRequestDto) => void;
|
|
27
|
+
login?: LinkProps;
|
|
28
|
+
privacyPolicy?: LinkProps;
|
|
29
|
+
termsOfService?: LinkProps;
|
|
30
|
+
socialLogins?: SocialLoginItem[];
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
let {
|
|
34
|
+
fields,
|
|
35
|
+
onSubmit,
|
|
36
|
+
login,
|
|
37
|
+
privacyPolicy,
|
|
38
|
+
termsOfService,
|
|
39
|
+
socialLogins = [],
|
|
40
|
+
}: Props = $props();
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<div class="flex-1 flex flex-col justify-between h-full">
|
|
44
|
+
<nav class="flex justify-end p-5">
|
|
45
|
+
<div class="flex gap-2">
|
|
46
|
+
<LightSwitch />
|
|
47
|
+
<LanguageSwitcher />
|
|
48
|
+
</div>
|
|
49
|
+
</nav>
|
|
50
|
+
|
|
51
|
+
<div class="flex-1 flex flex-col justify-center px-8 md:px-12 pb-8">
|
|
52
|
+
<div class="w-full max-w-sm mx-auto space-y-6">
|
|
53
|
+
<div class="text-center space-y-2">
|
|
54
|
+
<h1 class="text-2xl font-bold text-gray-900">
|
|
55
|
+
{$t("text.register.welcome") ?? $t("text.login.welcome")}
|
|
56
|
+
</h1>
|
|
57
|
+
<p class="text-sm text-gray-500">
|
|
58
|
+
{$t("text.register.continue") ?? $t("text.login.continue")}
|
|
59
|
+
</p>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<FormRegister {fields} {onSubmit} />
|
|
63
|
+
|
|
64
|
+
{#if socialLogins.length > 0}
|
|
65
|
+
<SocialLogin items={socialLogins} />
|
|
66
|
+
{/if}
|
|
67
|
+
|
|
68
|
+
<p class="text-center text-sm text-gray-600">
|
|
69
|
+
{$t("text.login.has-account")}
|
|
70
|
+
<a
|
|
71
|
+
href={login?.url ?? "/login"}
|
|
72
|
+
onclick={login?.onclick}
|
|
73
|
+
class="font-semibold text-primary hover:underline"
|
|
74
|
+
>
|
|
75
|
+
{$t("text.login.sign-in")}
|
|
76
|
+
</a>
|
|
77
|
+
</p>
|
|
78
|
+
|
|
79
|
+
<div class="text-center text-xs text-gray-400 space-x-2">
|
|
80
|
+
<a
|
|
81
|
+
href={privacyPolicy?.url ?? "/privacy-policy"}
|
|
82
|
+
onclick={privacyPolicy?.onclick}
|
|
83
|
+
class="hover:underline"
|
|
84
|
+
>
|
|
85
|
+
{$t("link.privacy-policy.label")}
|
|
86
|
+
</a>
|
|
87
|
+
<span>|</span>
|
|
88
|
+
<a
|
|
89
|
+
href={termsOfService?.url ?? "/terms-of-service"}
|
|
90
|
+
onclick={termsOfService?.onclick}
|
|
91
|
+
class="hover:underline"
|
|
92
|
+
>
|
|
93
|
+
{$t("link.terms-of-service.label")}
|
|
94
|
+
</a>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RegisterFormFields, RegisterRequestDto, LinkProps, SocialLoginItem } from "../../types";
|
|
2
|
+
type Props = {
|
|
3
|
+
fields?: RegisterFormFields;
|
|
4
|
+
onSubmit?: (data: RegisterRequestDto) => void;
|
|
5
|
+
login?: LinkProps;
|
|
6
|
+
privacyPolicy?: LinkProps;
|
|
7
|
+
termsOfService?: LinkProps;
|
|
8
|
+
socialLogins?: SocialLoginItem[];
|
|
9
|
+
};
|
|
10
|
+
declare const RegisterCard02: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type RegisterCard02 = ReturnType<typeof RegisterCard02>;
|
|
12
|
+
export default RegisterCard02;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* @component PageRegister03
|
|
4
|
+
* Variant 03 of the register page. Split layout with glass morphism: hero on the left, auth card on the right.
|
|
5
|
+
*
|
|
6
|
+
* @example svelte
|
|
7
|
+
* <PageRegister03 fields={{ isName: true, isEmail: true }} onSubmit={(data) => register(data)} />
|
|
8
|
+
*/
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import AuthCard from "./RegisterCard03.svelte";
|
|
13
|
+
import PageAuth03 from "../../../auth/PageAuth03.svelte";
|
|
14
|
+
import type { PageRegisterProps } from "../../../../../../types";
|
|
15
|
+
import { t } from "../../../../../../i18n";
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
carousel,
|
|
19
|
+
type,
|
|
20
|
+
title,
|
|
21
|
+
fields,
|
|
22
|
+
children,
|
|
23
|
+
onSubmit,
|
|
24
|
+
login,
|
|
25
|
+
privacyPolicy,
|
|
26
|
+
termsOfService,
|
|
27
|
+
socialLogins = [],
|
|
28
|
+
}: PageRegisterProps = $props();
|
|
29
|
+
|
|
30
|
+
const defaultCarousel = $derived([
|
|
31
|
+
{
|
|
32
|
+
buttonText: $t("label.next"),
|
|
33
|
+
title:
|
|
34
|
+
$t("carousel.register.slide1.title") ??
|
|
35
|
+
$t("carousel.login.slide1.title"),
|
|
36
|
+
description:
|
|
37
|
+
$t("carousel.register.slide1.description") ??
|
|
38
|
+
$t("carousel.login.slide1.description"),
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
buttonText: $t("label.next"),
|
|
42
|
+
title:
|
|
43
|
+
$t("carousel.register.slide2.title") ??
|
|
44
|
+
$t("carousel.login.slide2.title"),
|
|
45
|
+
description:
|
|
46
|
+
$t("carousel.register.slide2.description") ??
|
|
47
|
+
$t("carousel.login.slide2.description"),
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
buttonText: $t("label.next"),
|
|
51
|
+
title:
|
|
52
|
+
$t("carousel.register.slide3.title") ??
|
|
53
|
+
$t("carousel.login.slide3.title"),
|
|
54
|
+
description:
|
|
55
|
+
$t("carousel.register.slide3.description") ??
|
|
56
|
+
$t("carousel.login.slide3.description"),
|
|
57
|
+
},
|
|
58
|
+
]);
|
|
59
|
+
|
|
60
|
+
const carouselItems = $derived(carousel ?? defaultCarousel);
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<PageAuth03 {title} {type} carousel={carouselItems}>
|
|
64
|
+
{#if children}
|
|
65
|
+
{@render children()}
|
|
66
|
+
{:else}
|
|
67
|
+
<AuthCard
|
|
68
|
+
{fields}
|
|
69
|
+
{onSubmit}
|
|
70
|
+
{login}
|
|
71
|
+
{privacyPolicy}
|
|
72
|
+
{termsOfService}
|
|
73
|
+
{socialLogins}
|
|
74
|
+
/>
|
|
75
|
+
{/if}
|
|
76
|
+
</PageAuth03>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* @component RegisterCard03
|
|
4
|
+
* Variant 03 authentication card for registration with glass morphism design and social login.
|
|
5
|
+
*
|
|
6
|
+
* @example svelte
|
|
7
|
+
* <RegisterCard03 fields={{ isName: true, isEmail: true }} onSubmit={(data) => register(data)} />
|
|
8
|
+
*/
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import LanguageSwitcher from "../../../../../ui/language-switcher/language-switcher.svelte";
|
|
13
|
+
import { LightSwitch } from "../../../../../ui/light-switch";
|
|
14
|
+
import { t } from "../../../../../../i18n";
|
|
15
|
+
import type {
|
|
16
|
+
RegisterFormFields,
|
|
17
|
+
RegisterRequestDto,
|
|
18
|
+
LinkProps,
|
|
19
|
+
SocialLoginItem,
|
|
20
|
+
} from "../../types";
|
|
21
|
+
import SocialLogin from "../../../../../ui/social-login/social-login.svelte";
|
|
22
|
+
import FormRegister from "../../FormRegister.svelte";
|
|
23
|
+
|
|
24
|
+
type Props = {
|
|
25
|
+
fields?: RegisterFormFields;
|
|
26
|
+
onSubmit?: (data: RegisterRequestDto) => void;
|
|
27
|
+
login?: LinkProps;
|
|
28
|
+
privacyPolicy?: LinkProps;
|
|
29
|
+
termsOfService?: LinkProps;
|
|
30
|
+
socialLogins?: SocialLoginItem[];
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
let {
|
|
34
|
+
fields,
|
|
35
|
+
onSubmit,
|
|
36
|
+
login,
|
|
37
|
+
privacyPolicy,
|
|
38
|
+
termsOfService,
|
|
39
|
+
socialLogins = [],
|
|
40
|
+
}: Props = $props();
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<div class="flex-1 flex flex-col justify-between h-full">
|
|
44
|
+
<nav class="flex justify-end p-5">
|
|
45
|
+
<div class="flex gap-2">
|
|
46
|
+
<LightSwitch />
|
|
47
|
+
<LanguageSwitcher />
|
|
48
|
+
</div>
|
|
49
|
+
</nav>
|
|
50
|
+
|
|
51
|
+
<div class="flex-1 flex flex-col justify-center px-8 md:px-12 pb-8">
|
|
52
|
+
<div class="w-full max-w-sm mx-auto space-y-6">
|
|
53
|
+
<div class="space-y-2">
|
|
54
|
+
<div class="w-12 h-12 rounded-xl flex items-center justify-center">
|
|
55
|
+
<span class="text-xl font-bold text-gray-600">G</span>
|
|
56
|
+
</div>
|
|
57
|
+
<h1 class="text-2xl font-bold text-gray-900">
|
|
58
|
+
{$t("text.register.welcome") ?? $t("text.login.welcome")}
|
|
59
|
+
</h1>
|
|
60
|
+
<p class="text-sm text-gray-500">
|
|
61
|
+
{$t("text.register.subtitle") ?? $t("text.login.subtitle")}
|
|
62
|
+
</p>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<FormRegister {fields} {onSubmit} />
|
|
66
|
+
|
|
67
|
+
{#if socialLogins.length > 0}
|
|
68
|
+
<SocialLogin items={socialLogins} />
|
|
69
|
+
{/if}
|
|
70
|
+
|
|
71
|
+
<div class="flex flex-col space-y-2">
|
|
72
|
+
<div class="text-center text-xs space-x-2">
|
|
73
|
+
<a
|
|
74
|
+
href={privacyPolicy?.url ?? "/privacy-policy"}
|
|
75
|
+
onclick={privacyPolicy?.onclick}
|
|
76
|
+
class="hover:underline"
|
|
77
|
+
>
|
|
78
|
+
{$t("link.privacy-policy.label")}
|
|
79
|
+
</a>
|
|
80
|
+
<span>|</span>
|
|
81
|
+
<a
|
|
82
|
+
href={termsOfService?.url ?? "/terms-of-service"}
|
|
83
|
+
onclick={termsOfService?.onclick}
|
|
84
|
+
class="hover:underline"
|
|
85
|
+
>
|
|
86
|
+
{$t("link.terms-of-service.label")}
|
|
87
|
+
</a>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<p class="text-center text-sm">
|
|
91
|
+
{$t("text.login.has-account")}
|
|
92
|
+
<a
|
|
93
|
+
href={login?.url ?? "/login"}
|
|
94
|
+
onclick={login?.onclick}
|
|
95
|
+
class="font-semibold text-primary hover:underline"
|
|
96
|
+
>
|
|
97
|
+
{$t("text.login.sign-in")}
|
|
98
|
+
</a>
|
|
99
|
+
</p>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RegisterFormFields, RegisterRequestDto, LinkProps, SocialLoginItem } from "../../types";
|
|
2
|
+
type Props = {
|
|
3
|
+
fields?: RegisterFormFields;
|
|
4
|
+
onSubmit?: (data: RegisterRequestDto) => void;
|
|
5
|
+
login?: LinkProps;
|
|
6
|
+
privacyPolicy?: LinkProps;
|
|
7
|
+
termsOfService?: LinkProps;
|
|
8
|
+
socialLogins?: SocialLoginItem[];
|
|
9
|
+
};
|
|
10
|
+
declare const RegisterCard03: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type RegisterCard03 = ReturnType<typeof RegisterCard03>;
|
|
12
|
+
export default RegisterCard03;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import InputPasswordConfirm from "../../../ui/form/ui/input-password-confirm.svelte";
|
|
3
|
+
import InputPassword from "../../../ui/form/ui/input-password.svelte";
|
|
4
|
+
import InputEmail from "../../../ui/form/ui/input-email.svelte";
|
|
5
|
+
import InputBase from "../../../ui/form/ui/input-base.svelte";
|
|
6
|
+
import InputPhone from "../../../ui/form/ui/input-phone.svelte";
|
|
7
|
+
import ButtonLogin from "../../../ui/button/ButtonLogin.svelte";
|
|
8
|
+
import { t } from "../../../../i18n";
|
|
9
|
+
import type { RegisterFormFields, RegisterRequestDto } from "./types";
|
|
10
|
+
|
|
11
|
+
type Props = {
|
|
12
|
+
fields?: RegisterFormFields;
|
|
13
|
+
onSubmit?: (data: RegisterRequestDto) => void;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
fields = {},
|
|
18
|
+
onSubmit,
|
|
19
|
+
}: Props = $props();
|
|
20
|
+
|
|
21
|
+
let name = $state("");
|
|
22
|
+
let email = $state("");
|
|
23
|
+
let password = $state("");
|
|
24
|
+
let confirmPassword = $state("");
|
|
25
|
+
let birthday = $state("");
|
|
26
|
+
let gender = $state("");
|
|
27
|
+
let phone = $state("");
|
|
28
|
+
|
|
29
|
+
const {
|
|
30
|
+
isName = false,
|
|
31
|
+
isEmail = true,
|
|
32
|
+
isPassword = true,
|
|
33
|
+
isConfirmPassword = true,
|
|
34
|
+
isBirthday = false,
|
|
35
|
+
isGender = false,
|
|
36
|
+
isPhone = false,
|
|
37
|
+
} = fields;
|
|
38
|
+
|
|
39
|
+
function handleSubmit(e: Event) {
|
|
40
|
+
e.preventDefault();
|
|
41
|
+
onSubmit?.({
|
|
42
|
+
name: isName ? name : undefined,
|
|
43
|
+
email,
|
|
44
|
+
password: isPassword ? password : undefined,
|
|
45
|
+
confirmPassword: isConfirmPassword ? confirmPassword : undefined,
|
|
46
|
+
birthday: isBirthday ? birthday : undefined,
|
|
47
|
+
gender: isGender ? gender : undefined,
|
|
48
|
+
phone: isPhone ? phone : undefined,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<form class="space-y-4" onsubmit={handleSubmit}>
|
|
54
|
+
<p class="text-[13px] py-3">{$t("text.register")}</p>
|
|
55
|
+
|
|
56
|
+
{#if isName}
|
|
57
|
+
<div class="space-y-1">
|
|
58
|
+
<InputBase
|
|
59
|
+
type="text"
|
|
60
|
+
label={$t("input.name.label")}
|
|
61
|
+
placeholder={$t("input.name.placeholder")}
|
|
62
|
+
isLabel
|
|
63
|
+
isIcon
|
|
64
|
+
bind:value={name}
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
{/if}
|
|
68
|
+
|
|
69
|
+
{#if isEmail}
|
|
70
|
+
<div class="space-y-1">
|
|
71
|
+
<InputEmail bind:value={email} />
|
|
72
|
+
</div>
|
|
73
|
+
{/if}
|
|
74
|
+
|
|
75
|
+
{#if isPhone}
|
|
76
|
+
<div class="space-y-1">
|
|
77
|
+
<InputPhone bind:value={phone} />
|
|
78
|
+
</div>
|
|
79
|
+
{/if}
|
|
80
|
+
|
|
81
|
+
{#if isBirthday}
|
|
82
|
+
<div class="space-y-1">
|
|
83
|
+
<InputBase
|
|
84
|
+
type="date"
|
|
85
|
+
label={$t("input.birthday.label")}
|
|
86
|
+
placeholder={$t("input.birthday.placeholder")}
|
|
87
|
+
isLabel
|
|
88
|
+
isIcon
|
|
89
|
+
bind:value={birthday}
|
|
90
|
+
/>
|
|
91
|
+
</div>
|
|
92
|
+
{/if}
|
|
93
|
+
|
|
94
|
+
{#if isGender}
|
|
95
|
+
<div class="space-y-1">
|
|
96
|
+
<InputBase
|
|
97
|
+
type="text"
|
|
98
|
+
label={$t("input.gender.label")}
|
|
99
|
+
placeholder={$t("input.gender.placeholder")}
|
|
100
|
+
isLabel
|
|
101
|
+
isIcon
|
|
102
|
+
bind:value={gender}
|
|
103
|
+
/>
|
|
104
|
+
</div>
|
|
105
|
+
{/if}
|
|
106
|
+
|
|
107
|
+
{#if isPassword}
|
|
108
|
+
<div class="space-y-1">
|
|
109
|
+
<InputPassword bind:value={password} />
|
|
110
|
+
</div>
|
|
111
|
+
{/if}
|
|
112
|
+
|
|
113
|
+
{#if isConfirmPassword}
|
|
114
|
+
<div class="space-y-1">
|
|
115
|
+
<InputPasswordConfirm bind:value={confirmPassword} />
|
|
116
|
+
</div>
|
|
117
|
+
{/if}
|
|
118
|
+
|
|
119
|
+
<ButtonLogin />
|
|
120
|
+
</form>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RegisterFormFields, RegisterRequestDto } from "./types";
|
|
2
|
+
type Props = {
|
|
3
|
+
fields?: RegisterFormFields;
|
|
4
|
+
onSubmit?: (data: RegisterRequestDto) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const FormRegister: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type FormRegister = ReturnType<typeof FormRegister>;
|
|
8
|
+
export default FormRegister;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* @component PageRegister
|
|
4
|
+
* Main register page. Routes to the specified layout variant.
|
|
5
|
+
*
|
|
6
|
+
* @example svelte
|
|
7
|
+
* <PageRegister variant={1} fields={{ isName: true, isEmail: true }} onSubmit={(data) => register(data)} />
|
|
8
|
+
*/
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import type { PageRegisterProps } from "./types";
|
|
13
|
+
import PageRegister01 from "./01/ui/PageRegister01.svelte";
|
|
14
|
+
import PageRegister02 from "./02/ui/PageRegister02.svelte";
|
|
15
|
+
import PageRegister03 from "./03/ui/PageRegister03.svelte";
|
|
16
|
+
|
|
17
|
+
type Props = {
|
|
18
|
+
variant?: 1 | 2 | 3;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
let { variant = 1, ...props }: PageRegisterProps & Props = $props();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
{#if variant === 3}
|
|
25
|
+
<PageRegister03 {...props} />
|
|
26
|
+
{:else if variant === 2}
|
|
27
|
+
<PageRegister02 {...props} />
|
|
28
|
+
{:else}
|
|
29
|
+
<PageRegister01 {...props} />
|
|
30
|
+
{/if}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PageRegisterProps } from "./types";
|
|
2
|
+
type Props = {
|
|
3
|
+
variant?: 1 | 2 | 3;
|
|
4
|
+
};
|
|
5
|
+
type $$ComponentProps = PageRegisterProps & Props;
|
|
6
|
+
declare const PageRegister: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type PageRegister = ReturnType<typeof PageRegister>;
|
|
8
|
+
export default PageRegister;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
import type { IconSvgElement } from "@hugeicons/svelte";
|
|
3
|
+
export type RegisterCarouselItemType = "NUMBER" | "DOT" | "POINTER";
|
|
4
|
+
export type SocialProvider = "GOOGLE" | "FACEBOOK" | "LINKEDIN";
|
|
5
|
+
export interface RegisterCarouselItem {
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
buttonText: string;
|
|
9
|
+
buttonUrl?: string;
|
|
10
|
+
backgroundUrl?: string;
|
|
11
|
+
}
|
|
12
|
+
export type LinkProps = {
|
|
13
|
+
url?: string;
|
|
14
|
+
onclick?: () => void;
|
|
15
|
+
};
|
|
16
|
+
export type SocialLoginItem = {
|
|
17
|
+
provider: SocialProvider;
|
|
18
|
+
icon?: IconSvgElement;
|
|
19
|
+
label?: string;
|
|
20
|
+
onclick?: () => void;
|
|
21
|
+
};
|
|
22
|
+
export type RegisterFormFields = {
|
|
23
|
+
isName?: boolean;
|
|
24
|
+
isEmail?: boolean;
|
|
25
|
+
isPassword?: boolean;
|
|
26
|
+
isConfirmPassword?: boolean;
|
|
27
|
+
isBirthday?: boolean;
|
|
28
|
+
isGender?: boolean;
|
|
29
|
+
isPhone?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export type RegisterRequestDto = {
|
|
32
|
+
name?: string;
|
|
33
|
+
email: string;
|
|
34
|
+
password?: string;
|
|
35
|
+
confirmPassword?: string;
|
|
36
|
+
birthday?: string;
|
|
37
|
+
gender?: string;
|
|
38
|
+
phone?: string;
|
|
39
|
+
};
|
|
40
|
+
export type PageRegisterProps = {
|
|
41
|
+
carousel?: RegisterCarouselItem[];
|
|
42
|
+
type?: RegisterCarouselItemType;
|
|
43
|
+
title?: string;
|
|
44
|
+
children?: Snippet;
|
|
45
|
+
fields?: RegisterFormFields;
|
|
46
|
+
onSubmit?: (data: RegisterRequestDto) => void;
|
|
47
|
+
login?: LinkProps;
|
|
48
|
+
privacyPolicy?: LinkProps;
|
|
49
|
+
termsOfService?: LinkProps;
|
|
50
|
+
socialLogins?: SocialLoginItem[];
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -71,12 +71,14 @@ export type ModelGridCard = {
|
|
|
71
71
|
* Cada item representa uma plataforma de redes sociais para partilhar conteúdo.
|
|
72
72
|
* @property name - Nome da rede social (ex: "Facebook", "Twitter").
|
|
73
73
|
* @property icon - Ícone da rede social (string CSS ou HugeIcons).
|
|
74
|
+
* @property img - URL da imagem/imagem de marca da rede social.
|
|
74
75
|
* @property color - Cor da rede social (hex, rgb, etc.).
|
|
75
76
|
* @property url - URL de partilha da rede social.
|
|
76
77
|
*/
|
|
77
78
|
export type ModelSocialShare = {
|
|
78
79
|
name: string;
|
|
79
|
-
icon
|
|
80
|
+
icon?: string | IconSvgElement;
|
|
81
|
+
img?: string;
|
|
80
82
|
color?: string;
|
|
81
83
|
url?: string;
|
|
82
84
|
};
|