negodesign 0.0.1 → 0.0.2
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/core/breadcrumb/breadcrumb-list.svelte +31 -31
- package/dist/components/core/button/ButtonBack.svelte +18 -18
- package/dist/components/core/button/ButtonLogin.svelte +15 -15
- package/dist/components/core/button/ButtonLoginWith.svelte +57 -57
- package/dist/components/core/carousel/data/CarouselModel.d.ts +2 -1
- package/dist/components/core/datatable/ui/DataTableActions.svelte +28 -28
- package/dist/components/core/datatable/ui/DataTableCheckbox.svelte +22 -22
- package/dist/components/core/datatable/ui/DataTableContent.svelte +59 -59
- package/dist/components/core/datatable/ui/DataTableCore.svelte +144 -144
- package/dist/components/core/datatable/ui/DataTableDragHandle.svelte +8 -8
- package/dist/components/core/datatable/ui/DataTableListFilter.svelte +59 -59
- package/dist/components/core/datatable/ui/DataTableListPagination.svelte +35 -35
- package/dist/components/core/form/ui/input-base.svelte +81 -81
- package/dist/components/core/form/ui/input-email.svelte +22 -22
- package/dist/components/core/form/ui/input-password-confirm.svelte +22 -22
- package/dist/components/core/form/ui/input-password.svelte +22 -22
- package/dist/components/core/form/ui/input-phone.svelte +22 -0
- package/dist/components/core/form/ui/input-phone.svelte.d.ts +4 -0
- package/dist/components/core/form/ui/input-username.svelte +21 -21
- package/dist/components/core/label/LabelOr.svelte +25 -25
- package/dist/components/core/link/link-forget-password.svelte +12 -12
- package/dist/components/core/link/link-privacy-polity.svelte +12 -12
- package/dist/components/core/link/link-terms-of-service.svelte +12 -12
- package/dist/components/core/nav/ui/nav-menu-bar.svelte +97 -97
- package/dist/components/core/nav/ui/nav-menu-bottom-bar.svelte +33 -33
- package/dist/components/core/nav/ui/nav-menu-top-bar.svelte +103 -103
- package/dist/components/core/sidebar/menu-bar-sidebar.svelte +62 -62
- package/dist/components/core/tabs/ui/tab-underline.svelte +41 -41
- package/dist/components/pages/admin/ui/admin-content.svelte +13 -13
- package/dist/components/pages/admin/ui/admin-panel.svelte +40 -40
- package/dist/components/pages/login/admin/01/data/page-props.d.ts +10 -0
- package/dist/components/pages/login/admin/01/data/page-props.js +1 -0
- package/dist/components/pages/login/admin/01/ui/AuthCard.svelte +84 -58
- package/dist/components/pages/login/admin/01/ui/AuthCard.svelte.d.ts +11 -17
- package/dist/components/pages/login/admin/01/ui/FormLogin.svelte +25 -5
- package/dist/components/pages/login/admin/01/ui/FormLogin.svelte.d.ts +6 -1
- package/dist/components/pages/login/admin/01/ui/FormLoginEmailPassword.svelte +12 -0
- package/dist/components/pages/login/admin/01/ui/FormLoginEmailPassword.svelte.d.ts +7 -0
- package/dist/components/pages/login/admin/01/ui/FormLoginPhonePassword.svelte +12 -0
- package/dist/components/pages/login/admin/01/ui/FormLoginPhonePassword.svelte.d.ts +7 -0
- package/dist/components/pages/login/admin/01/ui/FormLoginUsernamePassword.svelte +12 -0
- package/dist/components/pages/login/admin/01/ui/FormLoginUsernamePassword.svelte.d.ts +7 -0
- package/dist/components/pages/login/admin/01/ui/FormRegister.svelte +28 -28
- package/dist/components/pages/login/admin/01/ui/LeftHero.svelte +105 -105
- package/dist/components/pages/login/admin/01/ui/PageLogin.svelte +47 -49
- package/dist/components/pages/login/admin/01/ui/PageLogin.svelte.d.ts +14 -17
- package/dist/components/ui/badge/badge.svelte +49 -49
- package/dist/components/ui/chart/chart-container.svelte +80 -80
- package/dist/components/ui/chart/chart-style.svelte +37 -37
- package/dist/components/ui/chart/chart-tooltip.svelte +184 -184
- package/dist/components/ui/checkbox/checkbox.svelte +40 -40
- package/dist/components/ui/data-table/flex-render.svelte +40 -40
- package/dist/components/ui/drawer/drawer-close.svelte +7 -7
- package/dist/components/ui/drawer/drawer-content.svelte +33 -33
- package/dist/components/ui/drawer/drawer-description.svelte +17 -17
- package/dist/components/ui/drawer/drawer-footer.svelte +20 -20
- package/dist/components/ui/drawer/drawer-header.svelte +20 -20
- package/dist/components/ui/drawer/drawer-nested.svelte +12 -12
- package/dist/components/ui/drawer/drawer-overlay.svelte +17 -17
- package/dist/components/ui/drawer/drawer-portal.svelte +7 -7
- package/dist/components/ui/drawer/drawer-title.svelte +17 -17
- package/dist/components/ui/drawer/drawer-trigger.svelte +7 -7
- package/dist/components/ui/drawer/drawer.svelte +12 -12
- package/dist/components/ui/select/select-content.svelte +45 -45
- package/dist/components/ui/select/select-group-heading.svelte +21 -21
- package/dist/components/ui/select/select-group.svelte +17 -17
- package/dist/components/ui/select/select-item.svelte +41 -41
- package/dist/components/ui/select/select-label.svelte +20 -20
- package/dist/components/ui/select/select-portal.svelte +7 -7
- package/dist/components/ui/select/select-scroll-down-button.svelte +21 -21
- package/dist/components/ui/select/select-scroll-up-button.svelte +21 -21
- package/dist/components/ui/select/select-separator.svelte +18 -18
- package/dist/components/ui/select/select-trigger.svelte +30 -30
- package/dist/components/ui/select/select.svelte +11 -11
- package/dist/components/ui/sidebar/sidebar-menu-sub-button.svelte +39 -39
- package/dist/components/ui/table/table-body.svelte +15 -15
- package/dist/components/ui/table/table-caption.svelte +20 -20
- package/dist/components/ui/table/table-cell.svelte +15 -15
- package/dist/components/ui/table/table-footer.svelte +20 -20
- package/dist/components/ui/table/table-head.svelte +15 -15
- package/dist/components/ui/table/table-header.svelte +20 -20
- package/dist/components/ui/table/table-row.svelte +15 -15
- package/dist/components/ui/table/table.svelte +17 -17
- package/dist/components/ui/tabs/tabs-content.svelte +17 -17
- package/dist/components/ui/tabs/tabs-list.svelte +40 -40
- package/dist/components/ui/tabs/tabs-trigger.svelte +23 -23
- package/dist/components/ui/tabs/tabs.svelte +19 -19
- package/dist/index.js +0 -1
- package/package.json +94 -88
|
@@ -1,58 +1,84 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import LanguageSwitcher from "../../../../../ui/language-switcher/language-switcher.svelte";
|
|
3
|
-
import LinkTermsOfService from "../../../../../core/link/link-terms-of-service.svelte";
|
|
4
|
-
import LinkPrivacyPolity from "../../../../../core/link/link-privacy-polity.svelte";
|
|
5
|
-
import TabUnderline from "../../../../../core/tabs/ui/tab-underline.svelte";
|
|
6
|
-
import ButtonBack from "../../../../../core/button/ButtonBack.svelte";
|
|
7
|
-
import LabelOr from "../../../../../core/label/LabelOr.svelte";
|
|
8
|
-
//import FormRegister from "./FormRegister.svelte";
|
|
9
|
-
import
|
|
10
|
-
import { LightSwitch } from "../../../../../ui/light-switch";
|
|
11
|
-
import { t } from "../../../../../../i18n";
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import LanguageSwitcher from "../../../../../ui/language-switcher/language-switcher.svelte";
|
|
3
|
+
import LinkTermsOfService from "../../../../../core/link/link-terms-of-service.svelte";
|
|
4
|
+
import LinkPrivacyPolity from "../../../../../core/link/link-privacy-polity.svelte";
|
|
5
|
+
import TabUnderline from "../../../../../core/tabs/ui/tab-underline.svelte";
|
|
6
|
+
import ButtonBack from "../../../../../core/button/ButtonBack.svelte";
|
|
7
|
+
import LabelOr from "../../../../../core/label/LabelOr.svelte";
|
|
8
|
+
//import FormRegister from "./FormRegister.svelte";
|
|
9
|
+
import type { Snippet } from "svelte";
|
|
10
|
+
import { LightSwitch } from "../../../../../ui/light-switch";
|
|
11
|
+
import { t } from "../../../../../../i18n";
|
|
12
|
+
import type { AuthFormType, Credential, LinkProps } from "../data/page-props";
|
|
13
|
+
import FormLoginEmailPassword from "./FormLoginEmailPassword.svelte";
|
|
14
|
+
import FormLoginUsernamePassword from "./FormLoginUsernamePassword.svelte";
|
|
15
|
+
import FormLoginPhonePassword from "./FormLoginPhonePassword.svelte";
|
|
16
|
+
|
|
17
|
+
type Props = {
|
|
18
|
+
formType?: AuthFormType;
|
|
19
|
+
onSubmit?: (credential: Credential) => void;
|
|
20
|
+
register?: Snippet;
|
|
21
|
+
privacyPolicy?: LinkProps;
|
|
22
|
+
termsOfService?: LinkProps;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
let { formType, onSubmit, register, privacyPolicy, termsOfService }: Props = $props();
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<div class="flex-1 flex flex-col justify-between h-screen bg-gradient-right">
|
|
29
|
+
<nav class="flex justify-between p-5 md:bg-transparent">
|
|
30
|
+
<div>
|
|
31
|
+
<ButtonBack />
|
|
32
|
+
</div>
|
|
33
|
+
<div class="flex gap-2">
|
|
34
|
+
<LightSwitch />
|
|
35
|
+
<LanguageSwitcher />
|
|
36
|
+
</div>
|
|
37
|
+
</nav>
|
|
38
|
+
|
|
39
|
+
<div
|
|
40
|
+
class="p-5 h-full border-t-2 bg-background md:border-none rounded-tl-[35px] rounded-tr-[35px]"
|
|
41
|
+
>
|
|
42
|
+
<TabUnderline
|
|
43
|
+
items={[
|
|
44
|
+
{
|
|
45
|
+
item: { label: $t("label.login"), value: "login" },
|
|
46
|
+
children: loginSnippet,
|
|
47
|
+
},
|
|
48
|
+
...(register
|
|
49
|
+
? [
|
|
50
|
+
{
|
|
51
|
+
item: { label: $t("label.register"), value: "register" },
|
|
52
|
+
children: registerSnippet,
|
|
53
|
+
},
|
|
54
|
+
]
|
|
55
|
+
: []),
|
|
56
|
+
]}
|
|
57
|
+
/>
|
|
58
|
+
|
|
59
|
+
{#snippet loginSnippet()}
|
|
60
|
+
{#if formType == "EMAIL_PASSWORD"}
|
|
61
|
+
<FormLoginEmailPassword {onSubmit} />
|
|
62
|
+
{:else if formType == "USERNAME_PASSWORD"}
|
|
63
|
+
<FormLoginUsernamePassword {onSubmit} />
|
|
64
|
+
{:else if formType == "PHONE_PASSWORD"}
|
|
65
|
+
<FormLoginPhonePassword {onSubmit} />
|
|
66
|
+
{/if}
|
|
67
|
+
{/snippet}
|
|
68
|
+
|
|
69
|
+
{#snippet registerSnippet()}
|
|
70
|
+
{#if register}
|
|
71
|
+
{@render register()}
|
|
72
|
+
{/if}
|
|
73
|
+
{/snippet}
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<!-- Footer Terms -->
|
|
77
|
+
<div
|
|
78
|
+
class="text-[11px] text-slate-400 py-2 flex justify-center gap-2 bg-background"
|
|
79
|
+
>
|
|
80
|
+
<LinkPrivacyPolity href={privacyPolicy?.url} onclick={privacyPolicy?.onclick} />
|
|
81
|
+
<LabelOr />
|
|
82
|
+
<LinkTermsOfService href={termsOfService?.url} onclick={termsOfService?.onclick} />
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const AuthCard: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {}, {}, string>;
|
|
17
|
-
type AuthCard = InstanceType<typeof AuthCard>;
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
import type { AuthFormType, Credential, LinkProps } from "../data/page-props";
|
|
3
|
+
type Props = {
|
|
4
|
+
formType?: AuthFormType;
|
|
5
|
+
onSubmit?: (credential: Credential) => void;
|
|
6
|
+
register?: Snippet;
|
|
7
|
+
privacyPolicy?: LinkProps;
|
|
8
|
+
termsOfService?: LinkProps;
|
|
9
|
+
};
|
|
10
|
+
declare const AuthCard: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type AuthCard = ReturnType<typeof AuthCard>;
|
|
18
12
|
export default AuthCard;
|
|
@@ -1,30 +1,50 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import InputEmail from "../../../../../core/form/ui/input-email.svelte";
|
|
3
|
+
import InputUsername from "../../../../../core/form/ui/input-username.svelte";
|
|
4
|
+
import InputPhone from "../../../../../core/form/ui/input-phone.svelte";
|
|
3
5
|
import InputPassword from "../../../../../core/form/ui/input-password.svelte";
|
|
4
6
|
import ButtonLogin from "../../../../../core/button/ButtonLogin.svelte";
|
|
5
7
|
import LinkForgetPassword from "../../../../../core/link/link-forget-password.svelte";
|
|
6
8
|
import LabelOr from "../../../../../core/label/LabelOr.svelte";
|
|
7
9
|
import ButtonLoginWith from "../../../../../core/button/ButtonLoginWith.svelte";
|
|
8
10
|
import { t } from "../../../../../../i18n";
|
|
11
|
+
import type { Credential, LoginVariant } from "../data/page-props";
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
type Props = {
|
|
14
|
+
variant: LoginVariant;
|
|
15
|
+
onSubmit?: (credential: Credential) => void;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
let { variant, onSubmit }: Props = $props();
|
|
19
|
+
let data = $state("");
|
|
11
20
|
let password = $state("");
|
|
21
|
+
|
|
22
|
+
function handleSubmit(e: Event) {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
onSubmit?.({ data, password });
|
|
25
|
+
}
|
|
12
26
|
</script>
|
|
13
27
|
|
|
14
|
-
<form class="w-full space-y-4" onsubmit={
|
|
28
|
+
<form class="w-full space-y-4" onsubmit={handleSubmit}>
|
|
15
29
|
<p class="text-[13px] py-3">{$t("text.login")}</p>
|
|
16
30
|
|
|
17
31
|
<div class="space-y-1">
|
|
18
|
-
|
|
32
|
+
{#if variant === "EMAIL"}
|
|
33
|
+
<InputEmail bind:value={data} />
|
|
34
|
+
{:else if variant === "USERNAME"}
|
|
35
|
+
<InputUsername bind:value={data} />
|
|
36
|
+
{:else if variant === "PHONE"}
|
|
37
|
+
<InputPhone bind:value={data} />
|
|
38
|
+
{/if}
|
|
19
39
|
</div>
|
|
20
40
|
|
|
21
41
|
<div class="space-y-1 relative">
|
|
22
|
-
<InputPassword value={password} />
|
|
42
|
+
<InputPassword bind:value={password} />
|
|
23
43
|
<LinkForgetPassword />
|
|
24
44
|
</div>
|
|
25
45
|
|
|
26
46
|
<div class="flex flex-col gap-1">
|
|
27
|
-
<ButtonLogin />
|
|
47
|
+
<ButtonLogin type="submit" />
|
|
28
48
|
<LabelOr variant="SEPARATOR" />
|
|
29
49
|
<ButtonLoginWith icon="GOOGLE" />
|
|
30
50
|
</div>
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Credential, LoginVariant } from "../data/page-props";
|
|
2
|
+
type Props = {
|
|
3
|
+
variant: LoginVariant;
|
|
4
|
+
onSubmit?: (credential: Credential) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const FormLogin: import("svelte").Component<Props, {}, "">;
|
|
2
7
|
type FormLogin = ReturnType<typeof FormLogin>;
|
|
3
8
|
export default FormLogin;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import FormLogin from "./FormLogin.svelte";
|
|
3
|
+
import type { Credential } from "../data/page-props";
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
onSubmit?: (credential: Credential) => void;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
let { onSubmit }: Props = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<FormLogin variant="EMAIL" {onSubmit} />
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Credential } from "../data/page-props";
|
|
2
|
+
type Props = {
|
|
3
|
+
onSubmit?: (credential: Credential) => void;
|
|
4
|
+
};
|
|
5
|
+
declare const FormLoginEmailPassword: import("svelte").Component<Props, {}, "">;
|
|
6
|
+
type FormLoginEmailPassword = ReturnType<typeof FormLoginEmailPassword>;
|
|
7
|
+
export default FormLoginEmailPassword;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import FormLogin from "./FormLogin.svelte";
|
|
3
|
+
import type { Credential } from "../data/page-props";
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
onSubmit?: (credential: Credential) => void;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
let { onSubmit }: Props = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<FormLogin variant="PHONE" {onSubmit} />
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Credential } from "../data/page-props";
|
|
2
|
+
type Props = {
|
|
3
|
+
onSubmit?: (credential: Credential) => void;
|
|
4
|
+
};
|
|
5
|
+
declare const FormLoginPhonePassword: import("svelte").Component<Props, {}, "">;
|
|
6
|
+
type FormLoginPhonePassword = ReturnType<typeof FormLoginPhonePassword>;
|
|
7
|
+
export default FormLoginPhonePassword;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import FormLogin from "./FormLogin.svelte";
|
|
3
|
+
import type { Credential } from "../data/page-props";
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
onSubmit?: (credential: Credential) => void;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
let { onSubmit }: Props = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<FormLogin variant="USERNAME" {onSubmit} />
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Credential } from "../data/page-props";
|
|
2
|
+
type Props = {
|
|
3
|
+
onSubmit?: (credential: Credential) => void;
|
|
4
|
+
};
|
|
5
|
+
declare const FormLoginUsernamePassword: import("svelte").Component<Props, {}, "">;
|
|
6
|
+
type FormLoginUsernamePassword = ReturnType<typeof FormLoginUsernamePassword>;
|
|
7
|
+
export default FormLoginUsernamePassword;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import InputPasswordConfirm from "../../../../../core/form/ui/input-password-confirm.svelte";
|
|
3
|
-
import InputPassword from "../../../../../core/form/ui/input-password.svelte";
|
|
4
|
-
import InputEmail from "../../../../../core/form/ui/input-email.svelte";
|
|
5
|
-
import ButtonLogin from "../../../../../core/button/ButtonLogin.svelte";
|
|
6
|
-
import { t } from "../../../../../../i18n";
|
|
7
|
-
|
|
8
|
-
let email = $state("");
|
|
9
|
-
let password = $state("");
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<form class="space-y-4" onsubmit={(e) => e.preventDefault()}>
|
|
13
|
-
<p class="text-[13px] py-3">{$t("text.register")}</p>
|
|
14
|
-
|
|
15
|
-
<div class="space-y-1">
|
|
16
|
-
<InputEmail value={email} />
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<div class="space-y-1">
|
|
20
|
-
<InputPassword value={password} />
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
<div class="space-y-1">
|
|
24
|
-
<InputPasswordConfirm value={password} />
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
<ButtonLogin />
|
|
28
|
-
</form>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import InputPasswordConfirm from "../../../../../core/form/ui/input-password-confirm.svelte";
|
|
3
|
+
import InputPassword from "../../../../../core/form/ui/input-password.svelte";
|
|
4
|
+
import InputEmail from "../../../../../core/form/ui/input-email.svelte";
|
|
5
|
+
import ButtonLogin from "../../../../../core/button/ButtonLogin.svelte";
|
|
6
|
+
import { t } from "../../../../../../i18n";
|
|
7
|
+
|
|
8
|
+
let email = $state("");
|
|
9
|
+
let password = $state("");
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<form class="space-y-4" onsubmit={(e) => e.preventDefault()}>
|
|
13
|
+
<p class="text-[13px] py-3">{$t("text.register")}</p>
|
|
14
|
+
|
|
15
|
+
<div class="space-y-1">
|
|
16
|
+
<InputEmail value={email} />
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="space-y-1">
|
|
20
|
+
<InputPassword value={password} />
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div class="space-y-1">
|
|
24
|
+
<InputPasswordConfirm value={password} />
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<ButtonLogin />
|
|
28
|
+
</form>
|
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
3
|
-
import { ArrowRight01Icon } from "@hugeicons/core-free-icons";
|
|
4
|
-
import type { CarouselProps } from "../../../../../core/carousel/data/CarouselModel";
|
|
5
|
-
import type { Snippet } from "svelte";
|
|
6
|
-
import Button from "../../../../../ui/button/button.svelte";
|
|
7
|
-
|
|
8
|
-
type Props = {
|
|
9
|
-
title?: string | Snippet;
|
|
10
|
-
variant?: "NUMBER" | "DOT";
|
|
11
|
-
autoPlayInterval?: number;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
let {
|
|
15
|
-
title,
|
|
16
|
-
items = [],
|
|
17
|
-
variant = "DOT",
|
|
18
|
-
autoPlayInterval = 5000,
|
|
19
|
-
}: Props & CarouselProps = $props();
|
|
20
|
-
|
|
21
|
-
let currentIndex = $state(0);
|
|
22
|
-
let currentItem = $derived(items[currentIndex] ?? items[0]);
|
|
23
|
-
|
|
24
|
-
function goTo(index: number) {
|
|
25
|
-
currentIndex = index;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function next() {
|
|
29
|
-
if (items.length === 0) return;
|
|
30
|
-
currentIndex = (currentIndex + 1) % items.length;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
$effect(() => {
|
|
34
|
-
if (items.length <= 1) return;
|
|
35
|
-
const timer = setInterval(next, autoPlayInterval);
|
|
36
|
-
return () => clearInterval(timer);
|
|
37
|
-
});
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<div
|
|
41
|
-
class="relative flex flex-col justify-between overflow-hidden h-screen p-8 bg-gradient-left text-white"
|
|
42
|
-
>
|
|
43
|
-
<div class="flex items-center gap-2">
|
|
44
|
-
<div class="font-bold text-xl tracking-wider flex items-center gap-2">
|
|
45
|
-
{#if typeof title === "function"}
|
|
46
|
-
{@render title()}
|
|
47
|
-
{:else}
|
|
48
|
-
{title || ""}
|
|
49
|
-
{/if}
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
<section class="flex flex-col gap-5">
|
|
54
|
-
<div class="my-auto max-w-sm md:max-w-md">
|
|
55
|
-
{#if currentItem}
|
|
56
|
-
{#key currentIndex}
|
|
57
|
-
<div
|
|
58
|
-
class="text-xl md:text-2xl font-bold tracking-tight mb-4 leading-tight animate-in fade-in duration-300"
|
|
59
|
-
>
|
|
60
|
-
{currentItem.title}
|
|
61
|
-
</div>
|
|
62
|
-
<p
|
|
63
|
-
class=" text-sm mb-6 leading-relaxed animate-in fade-in duration-300"
|
|
64
|
-
>
|
|
65
|
-
{currentItem.description}
|
|
66
|
-
</p>
|
|
67
|
-
{/key}
|
|
68
|
-
<Button
|
|
69
|
-
variant="outline"
|
|
70
|
-
class="inline-flex items-center gap-2 text-sm font-semibold bg-primary"
|
|
71
|
-
>
|
|
72
|
-
{currentItem.buttonText}
|
|
73
|
-
<HugeiconsIcon icon={ArrowRight01Icon} size={16} />
|
|
74
|
-
</Button>
|
|
75
|
-
{/if}
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
<div class="flex items-center gap-2 mb-2">
|
|
79
|
-
{#each items as it, i (it.title)}
|
|
80
|
-
<button
|
|
81
|
-
type="button"
|
|
82
|
-
onclick={() => goTo(i)}
|
|
83
|
-
aria-label={`Ir para o item ${i + 1}`}
|
|
84
|
-
aria-current={currentIndex === i}
|
|
85
|
-
class="transition-all duration-300 focus:outline-none flex items-center justify-center {currentIndex ===
|
|
86
|
-
i
|
|
87
|
-
? 'opacity-100 scale-110'
|
|
88
|
-
: 'opacity-50 hover:opacity-75'}"
|
|
89
|
-
>
|
|
90
|
-
{#if variant === "NUMBER"}
|
|
91
|
-
<span
|
|
92
|
-
class="w-6 h-6 text-xs font-semibold rounded-full text-primary flex items-center justify-center"
|
|
93
|
-
>
|
|
94
|
-
{i + 1}
|
|
95
|
-
</span>
|
|
96
|
-
{:else}
|
|
97
|
-
<span class="w-2 h-2 rounded-full bg-white"></span>
|
|
98
|
-
{/if}
|
|
99
|
-
</button>
|
|
100
|
-
{/each}
|
|
101
|
-
</div>
|
|
102
|
-
</section>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
<aside class="absolute grid-pattern p-0 top-0 h-screen w-8/12"></aside>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
3
|
+
import { ArrowRight01Icon } from "@hugeicons/core-free-icons";
|
|
4
|
+
import type { CarouselProps } from "../../../../../core/carousel/data/CarouselModel";
|
|
5
|
+
import type { Snippet } from "svelte";
|
|
6
|
+
import Button from "../../../../../ui/button/button.svelte";
|
|
7
|
+
|
|
8
|
+
type Props = {
|
|
9
|
+
title?: string | Snippet;
|
|
10
|
+
variant?: "NUMBER" | "DOT";
|
|
11
|
+
autoPlayInterval?: number;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
let {
|
|
15
|
+
title,
|
|
16
|
+
items = [],
|
|
17
|
+
variant = "DOT",
|
|
18
|
+
autoPlayInterval = 5000,
|
|
19
|
+
}: Props & CarouselProps = $props();
|
|
20
|
+
|
|
21
|
+
let currentIndex = $state(0);
|
|
22
|
+
let currentItem = $derived(items[currentIndex] ?? items[0]);
|
|
23
|
+
|
|
24
|
+
function goTo(index: number) {
|
|
25
|
+
currentIndex = index;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function next() {
|
|
29
|
+
if (items.length === 0) return;
|
|
30
|
+
currentIndex = (currentIndex + 1) % items.length;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
$effect(() => {
|
|
34
|
+
if (items.length <= 1) return;
|
|
35
|
+
const timer = setInterval(next, autoPlayInterval);
|
|
36
|
+
return () => clearInterval(timer);
|
|
37
|
+
});
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<div
|
|
41
|
+
class="relative flex flex-col justify-between overflow-hidden h-screen p-8 bg-gradient-left text-white"
|
|
42
|
+
>
|
|
43
|
+
<div class="flex items-center gap-2">
|
|
44
|
+
<div class="font-bold text-xl tracking-wider flex items-center gap-2">
|
|
45
|
+
{#if typeof title === "function"}
|
|
46
|
+
{@render title()}
|
|
47
|
+
{:else}
|
|
48
|
+
{title || ""}
|
|
49
|
+
{/if}
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<section class="flex flex-col gap-5">
|
|
54
|
+
<div class="my-auto max-w-sm md:max-w-md">
|
|
55
|
+
{#if currentItem}
|
|
56
|
+
{#key currentIndex}
|
|
57
|
+
<div
|
|
58
|
+
class="text-xl md:text-2xl font-bold tracking-tight mb-4 leading-tight animate-in fade-in duration-300"
|
|
59
|
+
>
|
|
60
|
+
{currentItem.title}
|
|
61
|
+
</div>
|
|
62
|
+
<p
|
|
63
|
+
class=" text-sm mb-6 leading-relaxed animate-in fade-in duration-300"
|
|
64
|
+
>
|
|
65
|
+
{currentItem.description}
|
|
66
|
+
</p>
|
|
67
|
+
{/key}
|
|
68
|
+
<Button
|
|
69
|
+
variant="outline"
|
|
70
|
+
class="inline-flex items-center gap-2 text-sm font-semibold bg-primary"
|
|
71
|
+
>
|
|
72
|
+
{currentItem.buttonText}
|
|
73
|
+
<HugeiconsIcon icon={ArrowRight01Icon} size={16} />
|
|
74
|
+
</Button>
|
|
75
|
+
{/if}
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div class="flex items-center gap-2 mb-2">
|
|
79
|
+
{#each items as it, i (it.title)}
|
|
80
|
+
<button
|
|
81
|
+
type="button"
|
|
82
|
+
onclick={() => goTo(i)}
|
|
83
|
+
aria-label={`Ir para o item ${i + 1}`}
|
|
84
|
+
aria-current={currentIndex === i}
|
|
85
|
+
class="transition-all duration-300 focus:outline-none flex items-center justify-center {currentIndex ===
|
|
86
|
+
i
|
|
87
|
+
? 'opacity-100 scale-110'
|
|
88
|
+
: 'opacity-50 hover:opacity-75'}"
|
|
89
|
+
>
|
|
90
|
+
{#if variant === "NUMBER"}
|
|
91
|
+
<span
|
|
92
|
+
class="w-6 h-6 text-xs font-semibold rounded-full text-primary flex items-center justify-center"
|
|
93
|
+
>
|
|
94
|
+
{i + 1}
|
|
95
|
+
</span>
|
|
96
|
+
{:else}
|
|
97
|
+
<span class="w-2 h-2 rounded-full bg-white"></span>
|
|
98
|
+
{/if}
|
|
99
|
+
</button>
|
|
100
|
+
{/each}
|
|
101
|
+
</div>
|
|
102
|
+
</section>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<aside class="absolute grid-pattern p-0 top-0 h-screen w-8/12"></aside>
|