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.
Files changed (35) hide show
  1. package/dist/components/core/card/promotion/CardPromotion.svelte +44 -0
  2. package/dist/components/core/card/promotion/CardPromotion.svelte.d.ts +8 -0
  3. package/dist/components/core/card/promotion/data.d.ts +3 -0
  4. package/dist/components/core/card/promotion/data.js +31 -0
  5. package/dist/components/core/card/shared/CardFavorite.svelte +20 -20
  6. package/dist/components/core/card/shared/CardFavorite.svelte.d.ts +1 -1
  7. package/dist/components/core/card/types.d.ts +10 -0
  8. package/dist/components/core/carousel/hero/CarouselHero.svelte +140 -0
  9. package/dist/components/core/carousel/hero/CarouselHero.svelte.d.ts +10 -0
  10. package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte +53 -0
  11. package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte.d.ts +4 -0
  12. package/dist/components/core/carousel/shared/ui/SimpleBadgeCarousel.svelte +59 -0
  13. package/dist/components/core/carousel/shared/ui/SimpleBadgeCarousel.svelte.d.ts +4 -0
  14. package/dist/components/core/carousel/types.d.ts +22 -1
  15. package/dist/components/core/hero/SimpleHero.svelte +65 -0
  16. package/dist/components/core/hero/SimpleHero.svelte.d.ts +4 -0
  17. package/dist/components/core/hero/types.d.ts +18 -0
  18. package/dist/components/core/hero/types.js +1 -0
  19. package/dist/components/core/nav/data/nav-menu.d.ts +5 -1
  20. package/dist/components/core/nav/ui/nav-menu.svelte +94 -87
  21. package/dist/components/core/panel/CarouselSlot.svelte +38 -0
  22. package/dist/components/core/panel/CarouselSlot.svelte.d.ts +11 -0
  23. package/dist/globals.css +3756 -56
  24. package/dist/i18n/langs/en.d.ts +1 -0
  25. package/dist/i18n/langs/en.js +1 -0
  26. package/dist/i18n/langs/pt.d.ts +1 -0
  27. package/dist/i18n/langs/pt.js +1 -0
  28. package/dist/i18n/translations.d.ts +2 -0
  29. package/dist/index.d.ts +3 -1
  30. package/dist/index.js +3 -1
  31. package/dist/styles/animate.min.css +4385 -0
  32. package/dist/styles/globals.css +7 -2
  33. package/package.json +2 -2
  34. package/dist/components/core/carousel/ui/SimpleCarousel.svelte +0 -62
  35. package/dist/components/core/carousel/ui/SimpleCarousel.svelte.d.ts +0 -4
@@ -1,98 +1,105 @@
1
1
  <script lang="ts">
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";
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
- let {
14
- logo,
15
- links,
16
- actions,
17
- linkClass = "",
18
- buttonClass = "",
19
- align = "LINK_SEPARATED_ACTIONS",
20
- onclickButtonLogin,
21
- onclickButtonRegister,
22
- }: NavMenuProps = $props();
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
- const responsive = useIsMobile();
27
+ const responsive = useIsMobile();
25
28
  </script>
26
29
 
27
30
  {#snippet actionButtons()}
28
- <div class="flex items-center gap-2">
29
- <LightSwitch />
30
- <LanguageSwitcher />
31
- {#each actions as item (item.label)}
32
- <Button
33
- variant={item.type === "LINK" ? "ghost" : "outline"}
34
- class={item.className}
35
- onclick={item.onclick}
36
- >
37
- {#if item.icon}
38
- <HugeiconsIcon icon={item.icon} />
39
- {/if}
40
- {item.label}
41
- </Button>
42
- {/each}
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
- </div>
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 class="flex items-center justify-between container py-5 md:px-5">
67
- {#if logo}
68
- <div>
69
- {#if logo.img}
70
- <img
71
- src={logo.img}
72
- alt="logo of site"
73
- class={`max-h-50 ${logo.className}`}
74
- />
75
- {:else if logo.label}
76
- <span class={logo.className}>{logo.label}</span>
77
- {/if}
78
- </div>
79
- {:else}
80
- <div>
81
- <span class="hidden">Logo</span>
82
- </div>
83
- {/if}
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
- {#if responsive.isMobile}
86
- <NavMenuDrawer {links} {onclickButtonLogin} {onclickButtonRegister} />
87
- {:else}
88
- {#if align === "LINK_SEPARATED_ACTIONS"}
89
- <MenuLinks {links} {linkClass} orientation="horizontal" />
90
- {@render actionButtons()}
91
- {:else if align === "LINK_INTO_ACTIONS"}
92
- <div class="flex items-center gap-2">
93
- <MenuLinks {links} {linkClass} orientation="vertical" />
94
- {@render actionButtons()}
95
- </div>
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;