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.
Files changed (44) hide show
  1. package/dist/components/pages/security/auth/PageAuth01.svelte +65 -0
  2. package/dist/components/pages/security/auth/PageAuth01.svelte.d.ts +17 -0
  3. package/dist/components/pages/security/auth/PageAuth02.svelte +45 -0
  4. package/dist/components/pages/security/auth/PageAuth02.svelte.d.ts +17 -0
  5. package/dist/components/pages/security/auth/PageAuth03.svelte +45 -0
  6. package/dist/components/pages/security/auth/PageAuth03.svelte.d.ts +17 -0
  7. package/dist/components/pages/security/login/01/ui/PageLogin01.svelte +15 -40
  8. package/dist/components/pages/security/login/02/ui/PageLogin02.svelte +15 -20
  9. package/dist/components/pages/security/login/03/ui/PageLogin03.svelte +15 -20
  10. package/dist/components/pages/security/register/01/ui/PageRegister01.svelte +64 -0
  11. package/dist/components/pages/security/register/01/ui/PageRegister01.svelte.d.ts +3 -0
  12. package/dist/components/pages/security/register/01/ui/RegisterCard.svelte +100 -0
  13. package/dist/components/pages/security/register/01/ui/RegisterCard.svelte.d.ts +12 -0
  14. package/dist/components/pages/security/register/02/ui/PageRegister02.svelte +76 -0
  15. package/dist/components/pages/security/register/02/ui/PageRegister02.svelte.d.ts +4 -0
  16. package/dist/components/pages/security/register/02/ui/RegisterCard02.svelte +98 -0
  17. package/dist/components/pages/security/register/02/ui/RegisterCard02.svelte.d.ts +12 -0
  18. package/dist/components/pages/security/register/03/ui/PageRegister03.svelte +76 -0
  19. package/dist/components/pages/security/register/03/ui/PageRegister03.svelte.d.ts +4 -0
  20. package/dist/components/pages/security/register/03/ui/RegisterCard03.svelte +103 -0
  21. package/dist/components/pages/security/register/03/ui/RegisterCard03.svelte.d.ts +12 -0
  22. package/dist/components/pages/security/register/FormRegister.svelte +120 -0
  23. package/dist/components/pages/security/register/FormRegister.svelte.d.ts +8 -0
  24. package/dist/components/pages/security/register/PageRegister.svelte +30 -0
  25. package/dist/components/pages/security/register/PageRegister.svelte.d.ts +8 -0
  26. package/dist/components/pages/security/register/types.d.ts +51 -0
  27. package/dist/components/pages/security/register/types.js +1 -0
  28. package/dist/components/ui/modal/core/types.d.ts +3 -1
  29. package/dist/components/ui/modal/core/ui/ModalCore.svelte +132 -129
  30. package/dist/components/ui/modal/grid/ui/02/ModalGridSelection02.svelte +146 -142
  31. package/dist/components/ui/modal/share/types.d.ts +16 -1
  32. package/dist/components/ui/modal/share/ui/ModalShareSelection.svelte +156 -103
  33. package/dist/docs/DocsSidebar.svelte +58 -1
  34. package/dist/docs/components.js +94 -8
  35. package/dist/globals.css +18 -101
  36. package/dist/i18n/langs/en.d.ts +17 -0
  37. package/dist/i18n/langs/en.js +17 -0
  38. package/dist/i18n/langs/pt.d.ts +17 -0
  39. package/dist/i18n/langs/pt.js +17 -0
  40. package/dist/i18n/translations.d.ts +34 -0
  41. package/dist/index.d.ts +17 -1
  42. package/dist/index.js +17 -1
  43. package/dist/types/index.d.ts +7 -0
  44. package/package.json +1 -1
@@ -1,129 +1,132 @@
1
- <script lang="ts">
2
- import { cn } from "../../../../../utils";
3
- import { ArrowLeft01Icon, ArrowRight01Icon } from "@hugeicons/core-free-icons";
4
- import { HugeiconsIcon } from "@hugeicons/svelte";
5
- import type { ModalCoreProps } from "../types";
6
-
7
- let {
8
- isOpen = $bindable(false),
9
- title,
10
- subtitle,
11
- totalSteps = 1,
12
- currentStep = 1,
13
- showProgress = true,
14
- showBack = true,
15
- showSkip = false,
16
- skipText = "Skip This Step",
17
- continueText = "Continue",
18
- backText = "Back",
19
- onBack,
20
- onContinue,
21
- onSkip,
22
- onClose,
23
- content,
24
- footer,
25
- class: className,
26
- }: ModalCoreProps = $props();
27
-
28
- function handleClose() {
29
- isOpen = false;
30
- onClose?.();
31
- }
32
-
33
- const progressPercent = $derived(
34
- totalSteps > 0 ? (currentStep / totalSteps) * 100 : 0
35
- );
36
- </script>
37
-
38
- {#if isOpen}
39
- <div class="fixed inset-0 z-50 flex items-center justify-center">
40
- <!-- svelte-ignore a11y_no_static_element_interactions -->
41
- <div
42
- class="absolute inset-0 bg-black/50 backdrop-blur-sm"
43
- onclick={handleClose}
44
- onkeydown={(e) => {
45
- if (e.key === "Escape") handleClose();
46
- }}
47
- ></div>
48
-
49
- <div
50
- class={cn(
51
- "relative z-10 mx-4 flex max-h-[90vh] w-full max-w-3xl flex-col overflow-hidden rounded-3xl border border-border bg-card shadow-lg",
52
- "before:absolute before:-inset-px before:z-[-1] before:rounded-3xl before:bg-linear-to-br before:from-primary/40 before:via-primary/10 before:to-transparent",
53
- "animate-in fade-in zoom-in-95 duration-200",
54
- className
55
- )}
56
- >
57
- <!-- Header -->
58
- <div class="px-8 pt-8">
59
- <h2 class="text-2xl font-extrabold tracking-tight md:text-3xl">
60
- {title}
61
- </h2>
62
- {#if subtitle}
63
- <p class="mt-2 text-sm text-muted-foreground">{subtitle}</p>
64
- {/if}
65
- </div>
66
-
67
- <!-- Content -->
68
- <div class="flex-1 overflow-y-auto px-8 py-6">
69
- {#if content}
70
- {@render content()}
71
- {/if}
72
- </div>
73
-
74
- <!-- Footer -->
75
- {#if footer}
76
- <div class="border-t border-border px-8 py-5">
77
- {@render footer()}
78
- </div>
79
- {:else}
80
- <div class="border-t border-border px-8 py-5">
81
- {#if showProgress}
82
- <div class="mb-5 h-1.5 w-full overflow-hidden rounded-full bg-muted">
83
- <div
84
- class="h-full rounded-full bg-linear-to-r from-primary to-primary/70 transition-all duration-300"
85
- style="width: {progressPercent}%"
86
- ></div>
87
- </div>
88
- {/if}
89
-
90
- <div class="flex items-center justify-between">
91
- <div class="flex items-center gap-4">
92
- {#if showSkip}
93
- <button
94
- type="button"
95
- class="text-sm font-medium text-muted-foreground transition hover:text-foreground"
96
- onclick={onSkip}
97
- >
98
- {skipText}
99
- </button>
100
- {/if}
101
- </div>
102
-
103
- <div class="flex items-center gap-3">
104
- {#if showBack && currentStep > 1}
105
- <button
106
- type="button"
107
- class="inline-flex items-center gap-2 rounded-full border border-border px-5 py-2.5 text-sm font-semibold transition hover:bg-muted"
108
- onclick={onBack}
109
- >
110
- <HugeiconsIcon icon={ArrowLeft01Icon} class="size-4" />
111
- {backText}
112
- </button>
113
- {/if}
114
-
115
- <button
116
- type="button"
117
- class="inline-flex items-center gap-2 rounded-full bg-primary px-6 py-2.5 text-sm font-semibold text-primary-foreground transition hover:bg-primary/90"
118
- onclick={onContinue}
119
- >
120
- {continueText}
121
- <HugeiconsIcon icon={ArrowRight01Icon} class="size-4" />
122
- </button>
123
- </div>
124
- </div>
125
- </div>
126
- {/if}
127
- </div>
128
- </div>
129
- {/if}
1
+ <script lang="ts">
2
+ import { cn } from "../../../../../utils";
3
+ import {
4
+ ArrowLeft01Icon,
5
+ ArrowRight01Icon,
6
+ } from "@hugeicons/core-free-icons";
7
+ import { HugeiconsIcon } from "@hugeicons/svelte";
8
+ import type { ModalCoreProps } from "../types";
9
+
10
+ let {
11
+ isOpen = $bindable(false),
12
+ title,
13
+ subtitle,
14
+ totalSteps = 1,
15
+ currentStep = 1,
16
+ showProgress = true,
17
+ showBack = true,
18
+ showSkip = false,
19
+ skipText = "Skip This Step",
20
+ continueText = "Continue",
21
+ backText = "Back",
22
+ onBack,
23
+ onContinue,
24
+ onSkip,
25
+ onClose,
26
+ content,
27
+ footer,
28
+ class: className,
29
+ }: ModalCoreProps = $props();
30
+
31
+ function handleClose() {
32
+ isOpen = false;
33
+ onClose?.();
34
+ }
35
+
36
+ const progressPercent = $derived(
37
+ totalSteps > 0 ? (currentStep / totalSteps) * 100 : 0,
38
+ );
39
+ </script>
40
+
41
+ {#if isOpen}
42
+ <div class="fixed inset-0 z-50 flex items-center justify-center">
43
+ <!-- svelte-ignore a11y_no_static_element_interactions -->
44
+ <div
45
+ class="absolute inset-0 bg-black/50 backdrop-blur-sm"
46
+ onclick={handleClose}
47
+ onkeydown={(e) => {
48
+ if (e.key === "Escape") handleClose();
49
+ }}
50
+ ></div>
51
+
52
+ <div
53
+ class={cn(
54
+ "relative z-10 mx-4 flex max-h-[90vh] w-full max-w-3xl flex-col overflow-hidden rounded-3xl border border-border shadow-lg bg-background",
55
+ "before:absolute before:-inset-px before:z-[-1] before:rounded-3xl",
56
+ "animate-in fade-in zoom-in-95 duration-200",
57
+ className,
58
+ )}
59
+ >
60
+ <!-- Header -->
61
+ <div class="px-8 pt-8">
62
+ <h2 class="text-2xl font-semibold tracking-tight">
63
+ {title}
64
+ </h2>
65
+ {#if subtitle}
66
+ <p class="mt-2 text-sm text-muted-foreground">{subtitle}</p>
67
+ {/if}
68
+ </div>
69
+
70
+ <!-- Content -->
71
+ <div class="flex-1 overflow-y-auto px-8 py-6">
72
+ {#if content}
73
+ {@render content()}
74
+ {/if}
75
+ </div>
76
+
77
+ <!-- Footer -->
78
+ {#if footer}
79
+ <div class="border-t border-border px-8 py-5">
80
+ {@render footer()}
81
+ </div>
82
+ {:else}
83
+ <div class="border-t border-border px-8 py-5">
84
+ {#if showProgress}
85
+ <div class="mb-5 h-1.5 w-full overflow-hidden rounded-full">
86
+ <div
87
+ class="h-full rounded-full transition-all duration-300"
88
+ style="width: {progressPercent}%"
89
+ ></div>
90
+ </div>
91
+ {/if}
92
+
93
+ <div class="flex items-center justify-between">
94
+ <div class="flex items-center gap-4">
95
+ {#if showSkip}
96
+ <button
97
+ type="button"
98
+ class="text-sm font-medium text-muted-foreground transition hover:text-foreground"
99
+ onclick={onSkip}
100
+ >
101
+ {skipText}
102
+ </button>
103
+ {/if}
104
+ </div>
105
+
106
+ <div class="flex items-center gap-3">
107
+ {#if showBack && currentStep > 1}
108
+ <button
109
+ type="button"
110
+ class="inline-flex items-center gap-2 rounded-full border border-border px-5 py-2.5 text-sm font-semibold transition"
111
+ onclick={onBack}
112
+ >
113
+ <HugeiconsIcon icon={ArrowLeft01Icon} class="size-4" />
114
+ {backText}
115
+ </button>
116
+ {/if}
117
+
118
+ <button
119
+ type="button"
120
+ class="inline-flex items-center gap-2 rounded-full px-6 py-2.5 text-sm font-semibold bg-primary transition"
121
+ onclick={onContinue}
122
+ >
123
+ {continueText}
124
+ <HugeiconsIcon icon={ArrowRight01Icon} class="size-4" />
125
+ </button>
126
+ </div>
127
+ </div>
128
+ </div>
129
+ {/if}
130
+ </div>
131
+ </div>
132
+ {/if}
@@ -1,142 +1,146 @@
1
- <script lang="ts">
2
- import { cn } from "../../../../../../utils";
3
- import { HugeiconsIcon } from "@hugeicons/svelte";
4
- import { CheckmarkCircle02Icon } from "@hugeicons/core-free-icons";
5
- import ModalCore from "../../../core/ui/ModalCore.svelte";
6
- import type { ModalGridSelectionProps, ModelGridCard, ModelGridCategory } from "../../types";
7
-
8
- let {
9
- title,
10
- subtitle,
11
- categories = [],
12
- selectedCategory = $bindable(null),
13
- cards = [],
14
- selectedCard = $bindable(null),
15
- selectedCards = $bindable([]),
16
- multiple = false,
17
- totalSteps = 1,
18
- currentStep = 1,
19
- isOpen = $bindable(false),
20
- onSelect,
21
- onSelectCategory,
22
- onBack,
23
- onContinue,
24
- class: className,
25
- }: ModalGridSelectionProps = $props();
26
-
27
- function handleSelectCard(card: ModelGridCard) {
28
- if (multiple) {
29
- const exists = selectedCards.some((c: ModelGridCard) => c.title === card.title);
30
- if (exists) {
31
- selectedCards = selectedCards.filter((c: ModelGridCard) => c.title !== card.title);
32
- } else {
33
- selectedCards = [...selectedCards, card];
34
- }
35
- onSelect?.(card);
36
- } else {
37
- selectedCard = card;
38
- onSelect?.(card);
39
- }
40
- }
41
-
42
- function handleSelectCategory(category: ModelGridCategory) {
43
- selectedCategory = category;
44
- onSelectCategory?.(category);
45
- }
46
-
47
- function isSelectedCard(card: ModelGridCard): boolean {
48
- if (multiple) {
49
- return selectedCards.some((c: ModelGridCard) => c.title === card.title);
50
- }
51
- return selectedCard?.title === card.title;
52
- }
53
-
54
- function isSelectedCategory(category: ModelGridCategory): boolean {
55
- return selectedCategory?.value === category.value;
56
- }
57
- </script>
58
-
59
- <ModalCore
60
- bind:isOpen
61
- {title}
62
- {subtitle}
63
- {totalSteps}
64
- {currentStep}
65
- showProgress={false}
66
- showBack={currentStep > 1}
67
- {onBack}
68
- {onContinue}
69
- class={cn("dark", className)}
70
- >
71
- {#snippet content()}
72
- <!-- Categories -->
73
- {#if categories.length > 0}
74
- <div class="mb-6 flex flex-wrap gap-2">
75
- {#each categories as cat (cat.value)}
76
- {@const active = isSelectedCategory(cat)}
77
- <button
78
- type="button"
79
- class={cn(
80
- "rounded-full border px-4 py-1.5 text-sm font-medium transition-all duration-200",
81
- active
82
- ? "border-white/20 bg-white/10 text-white"
83
- : "border-white/10 bg-transparent text-white/60 hover:border-white/20 hover:text-white/80"
84
- )}
85
- onclick={() => handleSelectCategory(cat)}
86
- >
87
- {cat.label}
88
- </button>
89
- {/each}
90
- </div>
91
- {/if}
92
-
93
- <!-- Cards Grid -->
94
- <div class="grid grid-cols-1 gap-3 md:grid-cols-2">
95
- {#each cards as card, i (i)}
96
- {@const selected = isSelectedCard(card)}
97
- <button
98
- type="button"
99
- class={cn(
100
- "relative flex items-center gap-4 rounded-xl border p-4 text-left transition-all duration-200",
101
- selected
102
- ? "border-primary/50 bg-primary/10"
103
- : "border-white/10 bg-white/5 hover:border-white/20 hover:bg-white/8"
104
- )}
105
- onclick={() => handleSelectCard(card)}
106
- >
107
- <!-- Icon -->
108
- <div
109
- class={cn(
110
- "flex size-10 shrink-0 items-center justify-center rounded-lg",
111
- selected ? "bg-primary/20" : "bg-white/10"
112
- )}
113
- >
114
- {#if typeof card.icon === "string"}
115
- <i class="{card.icon} text-lg text-white/70"></i>
116
- {:else}
117
- <HugeiconsIcon icon={card.icon} class="size-5 text-white/70" />
118
- {/if}
119
- </div>
120
-
121
- <!-- Text -->
122
- <div class="min-w-0 flex-1">
123
- <p class="text-sm font-bold text-white">{card.title}</p>
124
- {#if card.description}
125
- <p class="mt-0.5 line-clamp-1 text-xs text-white/50">
126
- {card.description}
127
- </p>
128
- {/if}
129
- </div>
130
-
131
- <!-- Checkmark -->
132
- {#if selected}
133
- <HugeiconsIcon
134
- icon={CheckmarkCircle02Icon}
135
- class="size-5 shrink-0 text-primary"
136
- />
137
- {/if}
138
- </button>
139
- {/each}
140
- </div>
141
- {/snippet}
142
- </ModalCore>
1
+ <script lang="ts">
2
+ import { cn } from "../../../../../../utils";
3
+ import { HugeiconsIcon } from "@hugeicons/svelte";
4
+ import { CheckmarkCircle02Icon } from "@hugeicons/core-free-icons";
5
+ import ModalCore from "../../../core/ui/ModalCore.svelte";
6
+ import type {
7
+ ModalGridSelectionProps,
8
+ ModelGridCard,
9
+ ModelGridCategory,
10
+ } from "../../types";
11
+
12
+ let {
13
+ title,
14
+ subtitle,
15
+ categories = [],
16
+ selectedCategory = $bindable(null),
17
+ cards = [],
18
+ selectedCard = $bindable(null),
19
+ selectedCards = $bindable([]),
20
+ multiple = false,
21
+ totalSteps = 1,
22
+ currentStep = 1,
23
+ isOpen = $bindable(false),
24
+ onSelect,
25
+ onSelectCategory,
26
+ onBack,
27
+ onContinue,
28
+ class: className,
29
+ }: ModalGridSelectionProps = $props();
30
+
31
+ function handleSelectCard(card: ModelGridCard) {
32
+ if (multiple) {
33
+ const exists = selectedCards.some(
34
+ (c: ModelGridCard) => c.title === card.title,
35
+ );
36
+ if (exists) {
37
+ selectedCards = selectedCards.filter(
38
+ (c: ModelGridCard) => c.title !== card.title,
39
+ );
40
+ } else {
41
+ selectedCards = [...selectedCards, card];
42
+ }
43
+ onSelect?.(card);
44
+ } else {
45
+ selectedCard = card;
46
+ onSelect?.(card);
47
+ }
48
+ }
49
+
50
+ function handleSelectCategory(category: ModelGridCategory) {
51
+ selectedCategory = category;
52
+ onSelectCategory?.(category);
53
+ }
54
+
55
+ function isSelectedCard(card: ModelGridCard): boolean {
56
+ if (multiple) {
57
+ return selectedCards.some((c: ModelGridCard) => c.title === card.title);
58
+ }
59
+ return selectedCard?.title === card.title;
60
+ }
61
+
62
+ function isSelectedCategory(category: ModelGridCategory): boolean {
63
+ return selectedCategory?.value === category.value;
64
+ }
65
+ </script>
66
+
67
+ <ModalCore
68
+ bind:isOpen
69
+ {title}
70
+ {subtitle}
71
+ {totalSteps}
72
+ {currentStep}
73
+ showProgress={false}
74
+ showBack={currentStep > 1}
75
+ {onBack}
76
+ {onContinue}
77
+ class={cn(className)}
78
+ >
79
+ {#snippet content()}
80
+ <!-- Categories -->
81
+ {#if categories.length > 0}
82
+ <div class="mb-6 flex flex-wrap gap-2">
83
+ {#each categories as cat (cat.value)}
84
+ {@const active = isSelectedCategory(cat)}
85
+ <button
86
+ type="button"
87
+ class={cn(
88
+ "rounded-full border px-4 py-1.5 text-sm font-medium transition-all duration-200",
89
+ active ? "" : "",
90
+ )}
91
+ onclick={() => handleSelectCategory(cat)}
92
+ >
93
+ {cat.label}
94
+ </button>
95
+ {/each}
96
+ </div>
97
+ {/if}
98
+
99
+ <!-- Cards Grid -->
100
+ <div class="grid grid-cols-1 gap-3 md:grid-cols-2">
101
+ {#each cards as card, i (i)}
102
+ {@const selected = isSelectedCard(card)}
103
+ <button
104
+ type="button"
105
+ class={cn(
106
+ "relative flex items-center gap-4 rounded-xl border p-4 text-left transition-all duration-200",
107
+ selected ? "" : "",
108
+ )}
109
+ onclick={() => handleSelectCard(card)}
110
+ >
111
+ <!-- Icon -->
112
+ <div
113
+ class={cn(
114
+ "flex size-10 shrink-0 items-center justify-center rounded-lg",
115
+ selected ? "bg-primary/20" : "bg-primary/40",
116
+ )}
117
+ >
118
+ {#if typeof card.icon === "string"}
119
+ <i class="{card.icon} text-lg"></i>
120
+ {:else}
121
+ <HugeiconsIcon icon={card.icon} class="size-5" />
122
+ {/if}
123
+ </div>
124
+
125
+ <!-- Text -->
126
+ <div class="min-w-0 flex-1">
127
+ <p class="text-sm font-bold">{card.title}</p>
128
+ {#if card.description}
129
+ <p class="mt-0.5 line-clamp-1 text-xs">
130
+ {card.description}
131
+ </p>
132
+ {/if}
133
+ </div>
134
+
135
+ <!-- Checkmark -->
136
+ {#if selected}
137
+ <HugeiconsIcon
138
+ icon={CheckmarkCircle02Icon}
139
+ class="size-5 shrink-0 text-primary"
140
+ />
141
+ {/if}
142
+ </button>
143
+ {/each}
144
+ </div>
145
+ {/snippet}
146
+ </ModalCore>
@@ -3,9 +3,17 @@ export type { ModelSocialShare } from "../core/types";
3
3
  /**
4
4
  * Props do componente ModalShareSelection — modal de partilha em redes sociais.
5
5
  * Terceira variação do sistema de modais do NegoDesign.
6
+ * Cada rede social pode ser activada/inactivada com as propriedades isX.
6
7
  * @property title - Título principal do modal (ex: "Share this design").
7
8
  * @property subtitle - Subtítulo/descrição abaixo do título.
8
9
  * @property networks - Lista de redes sociais para partilhar.
10
+ * @property isWhatsapp - Mostra a rede social WhatsApp.
11
+ * @property isInstagram - Mostra a rede social Instagram.
12
+ * @property isFacebook - Mostra a rede social Facebook.
13
+ * @property isTwitter - Mostra a rede social Twitter/X.
14
+ * @property isLinkedin - Mostra a rede social LinkedIn.
15
+ * @property isPinterest - Mostra a rede social Pinterest.
16
+ * @property isTumblr - Mostra a rede social Tumblr.
9
17
  * @property linkLabel - Texto acima do input de link (ex: "Or copy link").
10
18
  * @property linkValue - URL a ser partilhada/copiada.
11
19
  * @property copyText - Texto do botão de copiar.
@@ -19,7 +27,14 @@ export type { ModelSocialShare } from "../core/types";
19
27
  export type ModalShareSelectionProps = {
20
28
  title: string;
21
29
  subtitle?: string;
22
- networks: ModelSocialShare[];
30
+ networks?: ModelSocialShare[];
31
+ isWhatsapp?: boolean;
32
+ isInstagram?: boolean;
33
+ isFacebook?: boolean;
34
+ isTwitter?: boolean;
35
+ isLinkedin?: boolean;
36
+ isPinterest?: boolean;
37
+ isTumblr?: boolean;
23
38
  linkLabel?: string;
24
39
  linkValue?: string;
25
40
  copyText?: string;