negodesign 0.0.12 → 0.0.14
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/card/promotion/CardPromotion.svelte +44 -0
- package/dist/components/core/card/promotion/CardPromotion.svelte.d.ts +8 -0
- package/dist/components/core/card/promotion/data.d.ts +3 -0
- package/dist/components/core/card/promotion/data.js +31 -0
- package/dist/components/core/card/shared/CardFavorite.svelte +20 -20
- package/dist/components/core/card/shared/CardFavorite.svelte.d.ts +1 -1
- package/dist/components/core/card/types.d.ts +10 -0
- package/dist/components/core/carousel/hero/CarouselHero.svelte +140 -0
- package/dist/components/core/carousel/hero/CarouselHero.svelte.d.ts +10 -0
- package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte +53 -0
- package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte.d.ts +4 -0
- package/dist/components/core/carousel/shared/ui/SimpleBadgeCarousel.svelte +59 -0
- package/dist/components/core/carousel/shared/ui/SimpleBadgeCarousel.svelte.d.ts +4 -0
- package/dist/components/core/carousel/types.d.ts +22 -1
- package/dist/components/core/hero/SimpleHero.svelte +65 -0
- package/dist/components/core/hero/SimpleHero.svelte.d.ts +4 -0
- package/dist/components/core/hero/types.d.ts +18 -0
- package/dist/components/core/hero/types.js +1 -0
- package/dist/components/core/nav/data/nav-menu.d.ts +5 -1
- package/dist/components/core/nav/ui/nav-menu.svelte +94 -87
- package/dist/components/core/panel/CarouselSlot.svelte +38 -0
- package/dist/components/core/panel/CarouselSlot.svelte.d.ts +11 -0
- package/dist/globals.css +3756 -56
- package/dist/i18n/langs/en.d.ts +1 -0
- package/dist/i18n/langs/en.js +1 -0
- package/dist/i18n/langs/pt.d.ts +1 -0
- package/dist/i18n/langs/pt.js +1 -0
- package/dist/i18n/translations.d.ts +2 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/styles/animate.min.css +4385 -0
- package/dist/styles/globals.css +7 -2
- package/package.json +2 -2
- package/dist/components/core/carousel/ui/SimpleCarousel.svelte +0 -62
- package/dist/components/core/carousel/ui/SimpleCarousel.svelte.d.ts +0 -4
|
@@ -1,98 +1,105 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { Button } from "../../../ui/button/index.js";
|
|
3
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
4
|
+
import type { NavMenuProps } from "../data/nav-menu";
|
|
5
|
+
import LightSwitch from "../../../ui/light-switch/light-switch.svelte";
|
|
6
|
+
import LanguageSwitcher from "../../../ui/language-switcher/language-switcher.svelte";
|
|
7
|
+
import { t } from "../../../../i18n";
|
|
8
|
+
import { Login03Icon, User03Icon } from "@hugeicons/core-free-icons";
|
|
9
|
+
import { useIsMobile } from "../../../../hooks/responsive.svelte";
|
|
10
|
+
import NavMenuDrawer from "./mobile/nav-menu-drawer.svelte";
|
|
11
|
+
import MenuLinks from "./menu-links.svelte";
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
let {
|
|
14
|
+
logo,
|
|
15
|
+
links,
|
|
16
|
+
actions,
|
|
17
|
+
navClass = "",
|
|
18
|
+
linkClass = "",
|
|
19
|
+
buttonClass = "",
|
|
20
|
+
align = "LINK_SEPARATED_ACTIONS",
|
|
21
|
+
isLightSwitch = false,
|
|
22
|
+
isLanguageSwitcher = false,
|
|
23
|
+
onclickButtonLogin,
|
|
24
|
+
onclickButtonRegister,
|
|
25
|
+
}: NavMenuProps = $props();
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
const responsive = useIsMobile();
|
|
25
28
|
</script>
|
|
26
29
|
|
|
27
30
|
{#snippet actionButtons()}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{#if onclickButtonRegister}
|
|
44
|
-
<Button
|
|
45
|
-
variant="outline"
|
|
46
|
-
onclick={onclickButtonRegister}
|
|
47
|
-
class={buttonClass}
|
|
48
|
-
>
|
|
49
|
-
<HugeiconsIcon icon={User03Icon} />
|
|
50
|
-
{$t("label.register")}
|
|
51
|
-
</Button>
|
|
52
|
-
{/if}
|
|
53
|
-
{#if onclickButtonLogin}
|
|
54
|
-
<Button
|
|
55
|
-
variant="outline"
|
|
56
|
-
onclick={onclickButtonLogin}
|
|
57
|
-
class={buttonClass}
|
|
58
|
-
>
|
|
59
|
-
<HugeiconsIcon icon={Login03Icon} />
|
|
60
|
-
{$t("label.login")}
|
|
61
|
-
</Button>
|
|
31
|
+
<div class="flex items-center gap-2">
|
|
32
|
+
{#if isLightSwitch}
|
|
33
|
+
<LightSwitch />
|
|
34
|
+
{/if}
|
|
35
|
+
{#if isLanguageSwitcher}
|
|
36
|
+
<LanguageSwitcher />
|
|
37
|
+
{/if}
|
|
38
|
+
{#each actions as item (item.label)}
|
|
39
|
+
<Button
|
|
40
|
+
variant={item.type === "LINK" ? "ghost" : "outline"}
|
|
41
|
+
class={item.className}
|
|
42
|
+
onclick={item.onclick}
|
|
43
|
+
>
|
|
44
|
+
{#if item.icon}
|
|
45
|
+
<HugeiconsIcon icon={item.icon} />
|
|
62
46
|
{/if}
|
|
63
|
-
|
|
47
|
+
{item.label}
|
|
48
|
+
</Button>
|
|
49
|
+
{/each}
|
|
50
|
+
{#if onclickButtonRegister}
|
|
51
|
+
<Button
|
|
52
|
+
variant="outline"
|
|
53
|
+
onclick={onclickButtonRegister}
|
|
54
|
+
class={buttonClass}
|
|
55
|
+
>
|
|
56
|
+
<HugeiconsIcon icon={User03Icon} />
|
|
57
|
+
{$t("label.register")}
|
|
58
|
+
</Button>
|
|
59
|
+
{/if}
|
|
60
|
+
{#if onclickButtonLogin}
|
|
61
|
+
<Button
|
|
62
|
+
variant="outline"
|
|
63
|
+
onclick={onclickButtonLogin}
|
|
64
|
+
class={buttonClass}
|
|
65
|
+
>
|
|
66
|
+
<HugeiconsIcon icon={Login03Icon} />
|
|
67
|
+
{$t("label.login")}
|
|
68
|
+
</Button>
|
|
69
|
+
{/if}
|
|
70
|
+
</div>
|
|
64
71
|
{/snippet}
|
|
65
72
|
|
|
66
|
-
<nav
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
</
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
73
|
+
<nav
|
|
74
|
+
class={`flex items-center justify-between container py-5 md:px-5 ${navClass}`}
|
|
75
|
+
>
|
|
76
|
+
{#if logo}
|
|
77
|
+
<div>
|
|
78
|
+
{#if logo.img}
|
|
79
|
+
<img
|
|
80
|
+
src={logo.img}
|
|
81
|
+
alt="logo of site"
|
|
82
|
+
class={`max-h-50 ${logo.className}`}
|
|
83
|
+
/>
|
|
84
|
+
{:else if logo.label}
|
|
85
|
+
<span class={logo.className}>{logo.label}</span>
|
|
86
|
+
{/if}
|
|
87
|
+
</div>
|
|
88
|
+
{:else}
|
|
89
|
+
<div>
|
|
90
|
+
<span class="hidden">Logo</span>
|
|
91
|
+
</div>
|
|
92
|
+
{/if}
|
|
84
93
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
{/if}
|
|
97
|
-
{/if}
|
|
94
|
+
{#if responsive.isMobile}
|
|
95
|
+
<NavMenuDrawer {links} {onclickButtonLogin} {onclickButtonRegister} />
|
|
96
|
+
{:else if align === "LINK_SEPARATED_ACTIONS"}
|
|
97
|
+
<MenuLinks {links} {linkClass} orientation="horizontal" />
|
|
98
|
+
{@render actionButtons()}
|
|
99
|
+
{:else if align === "LINK_INTO_ACTIONS"}
|
|
100
|
+
<div class="flex items-center gap-2">
|
|
101
|
+
<MenuLinks {links} {linkClass} orientation="vertical" />
|
|
102
|
+
{@render actionButtons()}
|
|
103
|
+
</div>
|
|
104
|
+
{/if}
|
|
98
105
|
</nav>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import * as Carousel from "../../ui/carousel/index.js";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
isBorderBottom?: boolean;
|
|
7
|
+
isButtonPreviousAndNext?: boolean;
|
|
8
|
+
buttonPreviousAndNextClass?: string;
|
|
9
|
+
containerClass?: string;
|
|
10
|
+
children: Snippet;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
isBorderBottom = true,
|
|
15
|
+
isButtonPreviousAndNext = true,
|
|
16
|
+
buttonPreviousAndNextClass = "",
|
|
17
|
+
containerClass = "",
|
|
18
|
+
children,
|
|
19
|
+
}: Props = $props();
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<div
|
|
23
|
+
class={`relative py-3 px-2 ${isBorderBottom ? "border-b" : ""} ${containerClass}`}
|
|
24
|
+
>
|
|
25
|
+
<Carousel.Root>
|
|
26
|
+
<Carousel.Content class="ml-10">
|
|
27
|
+
{@render children()}
|
|
28
|
+
</Carousel.Content>
|
|
29
|
+
{#if isButtonPreviousAndNext}
|
|
30
|
+
<Carousel.Previous
|
|
31
|
+
class={`absolute top-1/2 -translate-y-1/2 left-1 mt-0.5 ${buttonPreviousAndNextClass}`}
|
|
32
|
+
/>
|
|
33
|
+
<Carousel.Next
|
|
34
|
+
class={`absolute top-1/2 -translate-y-1/2 right-1 mt-0.5 ${buttonPreviousAndNextClass}`}
|
|
35
|
+
/>
|
|
36
|
+
{/if}
|
|
37
|
+
</Carousel.Root>
|
|
38
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type Props = {
|
|
3
|
+
isBorderBottom?: boolean;
|
|
4
|
+
isButtonPreviousAndNext?: boolean;
|
|
5
|
+
buttonPreviousAndNextClass?: string;
|
|
6
|
+
containerClass?: string;
|
|
7
|
+
children: Snippet;
|
|
8
|
+
};
|
|
9
|
+
declare const CarouselSlot: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type CarouselSlot = ReturnType<typeof CarouselSlot>;
|
|
11
|
+
export default CarouselSlot;
|