negodesign 0.0.59 → 0.0.60
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/banner/AdCardBanner.svelte +74 -74
- package/dist/components/core/banner/CtaCardBanner.svelte +118 -118
- 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/button/ButtonSend.svelte +15 -15
- package/dist/components/core/card/highlight/01/CardHighlight01.svelte +103 -103
- package/dist/components/core/card/highlight/02/CardHighlight02.svelte +99 -99
- package/dist/components/core/card/highlight/CardHighlight.svelte +22 -22
- package/dist/components/core/card/media/01/CardMedia01.svelte +133 -133
- package/dist/components/core/card/media/02/CardMedia02.svelte +127 -127
- package/dist/components/core/card/media/CardMedia.svelte +18 -18
- package/dist/components/core/card/product/01/CardProduct01.svelte +136 -136
- package/dist/components/core/card/product/02/CardProduct02.svelte +124 -124
- package/dist/components/core/card/product/CardProduct.svelte +22 -22
- package/dist/components/core/card/profile/01/CardProfile01.svelte +134 -134
- package/dist/components/core/card/profile/02/CardProfile02.svelte +132 -132
- package/dist/components/core/card/profile/CardProfile.svelte +18 -18
- package/dist/components/core/card/promotion/CardPromotion.svelte +139 -139
- package/dist/components/core/card/promotion/CardPromotionPrice.svelte +32 -32
- package/dist/components/core/card/shared/CardButton.svelte +42 -42
- package/dist/components/core/card/shared/CardCart.svelte +36 -36
- package/dist/components/core/card/shared/CardDescription.svelte +41 -41
- package/dist/components/core/card/shared/CardFavorite.svelte +33 -33
- package/dist/components/core/card/shared/CardLogo.svelte +19 -19
- package/dist/components/core/card/shared/CardPhoneOrWhatsapp.svelte +45 -45
- package/dist/components/core/card/shared/CardStarRating.svelte +24 -24
- package/dist/components/core/card/shared/CardTags.svelte +95 -95
- package/dist/components/core/card/shared/CardThumbnailVideo.svelte +232 -232
- package/dist/components/core/card/shared/CardTitlePrice.svelte +24 -24
- package/dist/components/core/card/shared/TruncatableText.svelte +49 -49
- package/dist/components/core/carousel/badge/ui/CarouselBadge.svelte +109 -109
- package/dist/components/core/carousel/grid/shared/ui/CarouselGridSlot.svelte +38 -38
- package/dist/components/core/carousel/hero/ui/CarouselHero.svelte +163 -163
- package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte +60 -60
- 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 +151 -151
- 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/footer/ui/Footer.svelte +18 -18
- package/dist/components/core/form/ui/input-base.svelte +81 -81
- package/dist/components/core/form/ui/input-email-or-phone.svelte +23 -23
- package/dist/components/core/form/ui/input-email.svelte +23 -23
- package/dist/components/core/form/ui/input-password-confirm.svelte +23 -23
- package/dist/components/core/form/ui/input-password.svelte +23 -23
- package/dist/components/core/form/ui/input-phone.svelte +33 -33
- package/dist/components/core/form/ui/input-username.svelte +22 -22
- package/dist/components/core/grid/ui/01/Grid01.svelte +28 -28
- package/dist/components/core/grid/ui/02/Grid02.svelte +28 -28
- package/dist/components/core/grid/ui/PanelGrid.svelte +27 -27
- package/dist/components/core/grid/ui/SimpleGrid.svelte +35 -35
- package/dist/components/core/grid/ui/shared/DescriptionGrid.svelte +23 -23
- package/dist/components/core/grid/ui/shared/IconRenderGrid.svelte +21 -21
- package/dist/components/core/grid/ui/shared/TitleGrid.svelte +19 -19
- package/dist/components/core/hero/SimpleHero.svelte +65 -65
- 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/ComplexMenu.svelte +36 -36
- package/dist/components/core/nav/ui/Menu.svelte +70 -70
- package/dist/components/core/nav/ui/SimpleMenu.svelte +14 -14
- package/dist/components/core/nav/ui/mobile/MenuMobile.svelte +54 -54
- package/dist/components/core/nav/ui/shared/MenuButton.svelte +51 -51
- package/dist/components/core/nav/ui/shared/MenuLinks.svelte +40 -40
- package/dist/components/core/nav/ui/shared/MenuListItem.svelte +48 -48
- package/dist/components/core/nav/ui/shared/MenuLogo.svelte +13 -13
- package/dist/components/core/nav/ui/shared/navigation/NavigationMenuItem.svelte +15 -15
- package/dist/components/core/nav/ui/shared/navigation/NavigationMenuItemCard.svelte +62 -62
- package/dist/components/core/nav/ui/shared/navigation/NavigationMenuItemGrid.svelte +32 -32
- package/dist/components/core/nav/ui/shared/navigation/NavigationMenuItemList.svelte +24 -24
- package/dist/components/core/nav/ui/shared/navigation/NavigationMenuItems.svelte +21 -21
- package/dist/components/core/panel/CarouselSlot.svelte +57 -57
- package/dist/components/core/panel/LeftHero.svelte +117 -117
- package/dist/components/core/search/SearchInput.svelte +32 -32
- package/dist/components/core/search/shared/SearchInputCore.svelte +66 -66
- package/dist/components/core/sidebar/MenuBarSidebar.svelte +70 -70
- package/dist/components/core/sidebar/ui/navbar/NavMenuBarSidebar.svelte +97 -97
- package/dist/components/core/sidebar/ui/navbar/NavMenuBottomSidebar.svelte +33 -33
- package/dist/components/core/sidebar/ui/navbar/NavMenuTopBarSidebar.svelte +103 -103
- package/dist/components/core/tabs/ui/tab-underline.svelte +43 -43
- package/dist/components/pages/admin/01/ui/AdminContent.svelte +14 -14
- package/dist/components/pages/admin/01/ui/AdminPanel.svelte +46 -46
- package/dist/components/pages/security/login/01/ui/FormRegister.svelte +28 -28
- package/dist/components/pages/security/login/01/ui/LoginCard.svelte +107 -107
- package/dist/components/pages/security/login/PageLogin.svelte +22 -22
- package/dist/components/ui/badge/badge.svelte +49 -49
- package/dist/components/ui/button/button.svelte +82 -82
- 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/star-rating/star-rating-star.svelte +41 -41
- package/dist/components/ui/star-rating/star-rating.svelte +20 -20
- 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/styles/globals.css +149 -149
- package/package.json +113 -113
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { t } from "../../../i18n";
|
|
3
|
-
import type { HTMLAnchorAttributes } from "svelte/elements";
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAnchorAttributes;
|
|
6
|
-
|
|
7
|
-
let { ...restProps }: Props = $props();
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<a {...restProps} class="text-xs text-slate-500 hover:text-slate-800 z-10">
|
|
11
|
-
{$t("link.terms-of-service.label")}
|
|
12
|
-
</a>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { t } from "../../../i18n";
|
|
3
|
+
import type { HTMLAnchorAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
type Props = HTMLAnchorAttributes;
|
|
6
|
+
|
|
7
|
+
let { ...restProps }: Props = $props();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<a {...restProps} class="text-xs text-slate-500 hover:text-slate-800 z-10">
|
|
11
|
+
{$t("link.terms-of-service.label")}
|
|
12
|
+
</a>
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as NavigationMenu from "../../../ui/navigation-menu/index.js";
|
|
3
|
-
import type { ComplexMenuProps } from "../data/types";
|
|
4
|
-
import {
|
|
5
|
-
isCard,
|
|
6
|
-
isGrid,
|
|
7
|
-
isList,
|
|
8
|
-
isItems,
|
|
9
|
-
isItem,
|
|
10
|
-
} from "../data/complex-menu-utils";
|
|
11
|
-
import NavigationMenuItemGrid from "./shared/navigation/NavigationMenuItemGrid.svelte";
|
|
12
|
-
import NavigationMenuItemCard from "./shared/navigation/NavigationMenuItemCard.svelte";
|
|
13
|
-
import NavigationMenuItem from "./shared/navigation/NavigationMenuItem.svelte";
|
|
14
|
-
import NavigationMenuItemList from "./shared/navigation/NavigationMenuItemList.svelte";
|
|
15
|
-
import NavigationMenuItems from "./shared/navigation/NavigationMenuItems.svelte";
|
|
16
|
-
|
|
17
|
-
let { menus: links, textClass }: ComplexMenuProps = $props();
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<NavigationMenu.Root viewport={true}>
|
|
21
|
-
<NavigationMenu.List class="flex-wrap {textClass}">
|
|
22
|
-
{#each links as link, i (i)}
|
|
23
|
-
{#if isCard(link)}
|
|
24
|
-
<NavigationMenuItemCard {...link} />
|
|
25
|
-
{:else if isGrid(link)}
|
|
26
|
-
<NavigationMenuItemGrid {...link} />
|
|
27
|
-
{:else if isList(link)}
|
|
28
|
-
<NavigationMenuItemList {...link} />
|
|
29
|
-
{:else if isItems(link)}
|
|
30
|
-
<NavigationMenuItems {...link} />
|
|
31
|
-
{:else if isItem(link)}
|
|
32
|
-
<NavigationMenuItem {...link} />
|
|
33
|
-
{/if}
|
|
34
|
-
{/each}
|
|
35
|
-
</NavigationMenu.List>
|
|
36
|
-
</NavigationMenu.Root>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import * as NavigationMenu from "../../../ui/navigation-menu/index.js";
|
|
3
|
+
import type { ComplexMenuProps } from "../data/types";
|
|
4
|
+
import {
|
|
5
|
+
isCard,
|
|
6
|
+
isGrid,
|
|
7
|
+
isList,
|
|
8
|
+
isItems,
|
|
9
|
+
isItem,
|
|
10
|
+
} from "../data/complex-menu-utils";
|
|
11
|
+
import NavigationMenuItemGrid from "./shared/navigation/NavigationMenuItemGrid.svelte";
|
|
12
|
+
import NavigationMenuItemCard from "./shared/navigation/NavigationMenuItemCard.svelte";
|
|
13
|
+
import NavigationMenuItem from "./shared/navigation/NavigationMenuItem.svelte";
|
|
14
|
+
import NavigationMenuItemList from "./shared/navigation/NavigationMenuItemList.svelte";
|
|
15
|
+
import NavigationMenuItems from "./shared/navigation/NavigationMenuItems.svelte";
|
|
16
|
+
|
|
17
|
+
let { menus: links, textClass }: ComplexMenuProps = $props();
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<NavigationMenu.Root viewport={true}>
|
|
21
|
+
<NavigationMenu.List class="flex-wrap {textClass}">
|
|
22
|
+
{#each links as link, i (i)}
|
|
23
|
+
{#if isCard(link)}
|
|
24
|
+
<NavigationMenuItemCard {...link} />
|
|
25
|
+
{:else if isGrid(link)}
|
|
26
|
+
<NavigationMenuItemGrid {...link} />
|
|
27
|
+
{:else if isList(link)}
|
|
28
|
+
<NavigationMenuItemList {...link} />
|
|
29
|
+
{:else if isItems(link)}
|
|
30
|
+
<NavigationMenuItems {...link} />
|
|
31
|
+
{:else if isItem(link)}
|
|
32
|
+
<NavigationMenuItem {...link} />
|
|
33
|
+
{/if}
|
|
34
|
+
{/each}
|
|
35
|
+
</NavigationMenu.List>
|
|
36
|
+
</NavigationMenu.Root>
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { LanguageSwitcher } from "../../../ui/language-switcher";
|
|
3
|
-
import { LightSwitch } from "../../../ui/light-switch";
|
|
4
|
-
import { useDevice } from "../../../../hooks/responsive.svelte";
|
|
5
|
-
import type { ComplexMenuProps, SimpleMenuProps } from "../../../../types";
|
|
6
|
-
import ComplexMenu from "./ComplexMenu.svelte";
|
|
7
|
-
import ComplexMenuMobile from "./mobile/ComplexMenuMobile.svelte";
|
|
8
|
-
import SimpleMenuMobile from "./mobile/SimpleMenuMobile.svelte";
|
|
9
|
-
import MenuButton from "./shared/MenuButton.svelte";
|
|
10
|
-
import MenuLogo from "./shared/MenuLogo.svelte";
|
|
11
|
-
import type { MenuProps, MenuVarientProps } from "../data/types";
|
|
12
|
-
import SimpleMenu from "./SimpleMenu.svelte";
|
|
13
|
-
|
|
14
|
-
let {
|
|
15
|
-
logo,
|
|
16
|
-
navMenu,
|
|
17
|
-
isBorder,
|
|
18
|
-
navMenuButton,
|
|
19
|
-
isLightSwitch,
|
|
20
|
-
isLanguageSwitcher,
|
|
21
|
-
}: MenuProps = $props();
|
|
22
|
-
|
|
23
|
-
function isLinks(item: MenuVarientProps): item is SimpleMenuProps {
|
|
24
|
-
return "links" in item;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function isMenu(item: MenuVarientProps): item is ComplexMenuProps {
|
|
28
|
-
return "menus" in item;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const responsive = useDevice();
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
{#snippet actionButtons()}
|
|
35
|
-
<div class="flex items-center gap-2">
|
|
36
|
-
{#if isLightSwitch}
|
|
37
|
-
<LightSwitch />
|
|
38
|
-
{/if}
|
|
39
|
-
{#if isLanguageSwitcher}
|
|
40
|
-
<LanguageSwitcher />
|
|
41
|
-
{/if}
|
|
42
|
-
{#if navMenuButton}
|
|
43
|
-
<MenuButton {...navMenuButton} />
|
|
44
|
-
{/if}
|
|
45
|
-
</div>
|
|
46
|
-
{/snippet}
|
|
47
|
-
|
|
48
|
-
<nav
|
|
49
|
-
class="flex items-center justify-between p-2 md:p-5 {isBorder
|
|
50
|
-
? 'border-b-2'
|
|
51
|
-
: ''}"
|
|
52
|
-
>
|
|
53
|
-
{#if logo}
|
|
54
|
-
<MenuLogo {...logo} />
|
|
55
|
-
{/if}
|
|
56
|
-
|
|
57
|
-
{#if responsive.isMobile}
|
|
58
|
-
{#if isLinks(navMenu)}
|
|
59
|
-
<SimpleMenuMobile {...navMenu} />
|
|
60
|
-
{:else if isMenu(navMenu)}
|
|
61
|
-
<ComplexMenuMobile {...navMenu} />
|
|
62
|
-
{/if}
|
|
63
|
-
{:else if isLinks(navMenu)}
|
|
64
|
-
<SimpleMenu {...navMenu} />
|
|
65
|
-
{@render actionButtons()}
|
|
66
|
-
{:else if isMenu(navMenu)}
|
|
67
|
-
<ComplexMenu {...navMenu} />
|
|
68
|
-
{@render actionButtons()}
|
|
69
|
-
{/if}
|
|
70
|
-
</nav>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { LanguageSwitcher } from "../../../ui/language-switcher";
|
|
3
|
+
import { LightSwitch } from "../../../ui/light-switch";
|
|
4
|
+
import { useDevice } from "../../../../hooks/responsive.svelte";
|
|
5
|
+
import type { ComplexMenuProps, SimpleMenuProps } from "../../../../types";
|
|
6
|
+
import ComplexMenu from "./ComplexMenu.svelte";
|
|
7
|
+
import ComplexMenuMobile from "./mobile/ComplexMenuMobile.svelte";
|
|
8
|
+
import SimpleMenuMobile from "./mobile/SimpleMenuMobile.svelte";
|
|
9
|
+
import MenuButton from "./shared/MenuButton.svelte";
|
|
10
|
+
import MenuLogo from "./shared/MenuLogo.svelte";
|
|
11
|
+
import type { MenuProps, MenuVarientProps } from "../data/types";
|
|
12
|
+
import SimpleMenu from "./SimpleMenu.svelte";
|
|
13
|
+
|
|
14
|
+
let {
|
|
15
|
+
logo,
|
|
16
|
+
navMenu,
|
|
17
|
+
isBorder,
|
|
18
|
+
navMenuButton,
|
|
19
|
+
isLightSwitch,
|
|
20
|
+
isLanguageSwitcher,
|
|
21
|
+
}: MenuProps = $props();
|
|
22
|
+
|
|
23
|
+
function isLinks(item: MenuVarientProps): item is SimpleMenuProps {
|
|
24
|
+
return "links" in item;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function isMenu(item: MenuVarientProps): item is ComplexMenuProps {
|
|
28
|
+
return "menus" in item;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const responsive = useDevice();
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
{#snippet actionButtons()}
|
|
35
|
+
<div class="flex items-center gap-2">
|
|
36
|
+
{#if isLightSwitch}
|
|
37
|
+
<LightSwitch />
|
|
38
|
+
{/if}
|
|
39
|
+
{#if isLanguageSwitcher}
|
|
40
|
+
<LanguageSwitcher />
|
|
41
|
+
{/if}
|
|
42
|
+
{#if navMenuButton}
|
|
43
|
+
<MenuButton {...navMenuButton} />
|
|
44
|
+
{/if}
|
|
45
|
+
</div>
|
|
46
|
+
{/snippet}
|
|
47
|
+
|
|
48
|
+
<nav
|
|
49
|
+
class="flex items-center justify-between p-2 md:p-5 {isBorder
|
|
50
|
+
? 'border-b-2'
|
|
51
|
+
: ''}"
|
|
52
|
+
>
|
|
53
|
+
{#if logo}
|
|
54
|
+
<MenuLogo {...logo} />
|
|
55
|
+
{/if}
|
|
56
|
+
|
|
57
|
+
{#if responsive.isMobile}
|
|
58
|
+
{#if isLinks(navMenu)}
|
|
59
|
+
<SimpleMenuMobile {...navMenu} />
|
|
60
|
+
{:else if isMenu(navMenu)}
|
|
61
|
+
<ComplexMenuMobile {...navMenu} />
|
|
62
|
+
{/if}
|
|
63
|
+
{:else if isLinks(navMenu)}
|
|
64
|
+
<SimpleMenu {...navMenu} />
|
|
65
|
+
{@render actionButtons()}
|
|
66
|
+
{:else if isMenu(navMenu)}
|
|
67
|
+
<ComplexMenu {...navMenu} />
|
|
68
|
+
{@render actionButtons()}
|
|
69
|
+
{/if}
|
|
70
|
+
</nav>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { SimpleMenuProps } from "../data/nav-menu";
|
|
3
|
-
import MenuLinks from "./shared/MenuLinks.svelte";
|
|
4
|
-
|
|
5
|
-
let { ...restProps }: SimpleMenuProps = $props();
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
{#if restProps.align === "LINK_INTO_ACTIONS"}
|
|
9
|
-
<div class="flex items-center gap-2">
|
|
10
|
-
<MenuLinks {...restProps} orientation="vertical" />
|
|
11
|
-
</div>
|
|
12
|
-
{:else}
|
|
13
|
-
<MenuLinks {...restProps} orientation="horizontal" />
|
|
14
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { SimpleMenuProps } from "../data/nav-menu";
|
|
3
|
+
import MenuLinks from "./shared/MenuLinks.svelte";
|
|
4
|
+
|
|
5
|
+
let { ...restProps }: SimpleMenuProps = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
{#if restProps.align === "LINK_INTO_ACTIONS"}
|
|
9
|
+
<div class="flex items-center gap-2">
|
|
10
|
+
<MenuLinks {...restProps} orientation="vertical" />
|
|
11
|
+
</div>
|
|
12
|
+
{:else}
|
|
13
|
+
<MenuLinks {...restProps} orientation="horizontal" />
|
|
14
|
+
{/if}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as Drawer from "../../../../ui/drawer/index.js";
|
|
3
|
-
import type { NavMenuButtonProps } from "../../data/nav-menu";
|
|
4
|
-
import { buttonVariants } from "../../../../ui/button/index.js";
|
|
5
|
-
import { cn } from "../../../../../utils.js";
|
|
6
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
7
|
-
import { Menu } from "@hugeicons/core-free-icons";
|
|
8
|
-
import LightSwitch from "../../../../ui/light-switch/light-switch.svelte";
|
|
9
|
-
import LanguageSwitcher from "../../../../ui/language-switcher/language-switcher.svelte";
|
|
10
|
-
import { t } from "../../../../../i18n";
|
|
11
|
-
import type { Snippet } from "svelte";
|
|
12
|
-
|
|
13
|
-
type Props = {
|
|
14
|
-
navMenuButton?: NavMenuButtonProps;
|
|
15
|
-
isLightSwitch?: boolean;
|
|
16
|
-
isLanguageSwitcher?: boolean;
|
|
17
|
-
children: Snippet;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const { navMenuButton, isLightSwitch, isLanguageSwitcher, children }: Props =
|
|
21
|
-
$props();
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<div class="flex flex-wrap gap-2">
|
|
25
|
-
<Drawer.Root direction="right">
|
|
26
|
-
<Drawer.Trigger
|
|
27
|
-
class={cn(buttonVariants({ variant: "outline" }), "capitalize")}
|
|
28
|
-
>
|
|
29
|
-
<HugeiconsIcon icon={Menu} />
|
|
30
|
-
</Drawer.Trigger>
|
|
31
|
-
<Drawer.Content
|
|
32
|
-
class="data-[vaul-drawer-direction=bottom]:max-h-[50vh] data-[vaul-drawer-direction=top]:max-h-[50vh]"
|
|
33
|
-
>
|
|
34
|
-
<Drawer.Header>
|
|
35
|
-
<Drawer.Title>{$t("label.menu")}</Drawer.Title>
|
|
36
|
-
<Drawer.Description>
|
|
37
|
-
{$t("label.navigation.text")}
|
|
38
|
-
</Drawer.Description>
|
|
39
|
-
</Drawer.Header>
|
|
40
|
-
<div class="no-scrollbar overflow-y-auto px-4">
|
|
41
|
-
{@render children()}
|
|
42
|
-
</div>
|
|
43
|
-
<Drawer.Footer>
|
|
44
|
-
<div class="flex justify-center gap-5 py-5">
|
|
45
|
-
<LightSwitch />
|
|
46
|
-
<LanguageSwitcher />
|
|
47
|
-
</div>
|
|
48
|
-
<Drawer.Close class={buttonVariants({ variant: "outline" })}>
|
|
49
|
-
{$t("label.close")}
|
|
50
|
-
</Drawer.Close>
|
|
51
|
-
</Drawer.Footer>
|
|
52
|
-
</Drawer.Content>
|
|
53
|
-
</Drawer.Root>
|
|
54
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import * as Drawer from "../../../../ui/drawer/index.js";
|
|
3
|
+
import type { NavMenuButtonProps } from "../../data/nav-menu";
|
|
4
|
+
import { buttonVariants } from "../../../../ui/button/index.js";
|
|
5
|
+
import { cn } from "../../../../../utils.js";
|
|
6
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
7
|
+
import { Menu } from "@hugeicons/core-free-icons";
|
|
8
|
+
import LightSwitch from "../../../../ui/light-switch/light-switch.svelte";
|
|
9
|
+
import LanguageSwitcher from "../../../../ui/language-switcher/language-switcher.svelte";
|
|
10
|
+
import { t } from "../../../../../i18n";
|
|
11
|
+
import type { Snippet } from "svelte";
|
|
12
|
+
|
|
13
|
+
type Props = {
|
|
14
|
+
navMenuButton?: NavMenuButtonProps;
|
|
15
|
+
isLightSwitch?: boolean;
|
|
16
|
+
isLanguageSwitcher?: boolean;
|
|
17
|
+
children: Snippet;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const { navMenuButton, isLightSwitch, isLanguageSwitcher, children }: Props =
|
|
21
|
+
$props();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<div class="flex flex-wrap gap-2">
|
|
25
|
+
<Drawer.Root direction="right">
|
|
26
|
+
<Drawer.Trigger
|
|
27
|
+
class={cn(buttonVariants({ variant: "outline" }), "capitalize")}
|
|
28
|
+
>
|
|
29
|
+
<HugeiconsIcon icon={Menu} />
|
|
30
|
+
</Drawer.Trigger>
|
|
31
|
+
<Drawer.Content
|
|
32
|
+
class="data-[vaul-drawer-direction=bottom]:max-h-[50vh] data-[vaul-drawer-direction=top]:max-h-[50vh]"
|
|
33
|
+
>
|
|
34
|
+
<Drawer.Header>
|
|
35
|
+
<Drawer.Title>{$t("label.menu")}</Drawer.Title>
|
|
36
|
+
<Drawer.Description>
|
|
37
|
+
{$t("label.navigation.text")}
|
|
38
|
+
</Drawer.Description>
|
|
39
|
+
</Drawer.Header>
|
|
40
|
+
<div class="no-scrollbar overflow-y-auto px-4">
|
|
41
|
+
{@render children()}
|
|
42
|
+
</div>
|
|
43
|
+
<Drawer.Footer>
|
|
44
|
+
<div class="flex justify-center gap-5 py-5">
|
|
45
|
+
<LightSwitch />
|
|
46
|
+
<LanguageSwitcher />
|
|
47
|
+
</div>
|
|
48
|
+
<Drawer.Close class={buttonVariants({ variant: "outline" })}>
|
|
49
|
+
{$t("label.close")}
|
|
50
|
+
</Drawer.Close>
|
|
51
|
+
</Drawer.Footer>
|
|
52
|
+
</Drawer.Content>
|
|
53
|
+
</Drawer.Root>
|
|
54
|
+
</div>
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { NavMenuButtonProps } from "../../data/nav-menu";
|
|
3
|
-
import { Login03Icon, User03Icon } from "@hugeicons/core-free-icons";
|
|
4
|
-
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/svelte";
|
|
5
|
-
import { Button } from "../../../../ui/button/index.js";
|
|
6
|
-
import { t } from "../../../../../i18n";
|
|
7
|
-
|
|
8
|
-
let {
|
|
9
|
-
buttonClass,
|
|
10
|
-
textButtonLogin,
|
|
11
|
-
textButtonRegister,
|
|
12
|
-
onclickButtonLogin,
|
|
13
|
-
onclickButtonRegister,
|
|
14
|
-
}: NavMenuButtonProps = $props();
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
{#if onclickButtonRegister}
|
|
18
|
-
{@render actionButtons({
|
|
19
|
-
text: textButtonRegister || $t("label.register"),
|
|
20
|
-
icon: User03Icon,
|
|
21
|
-
onclick: onclickButtonRegister,
|
|
22
|
-
})}
|
|
23
|
-
{/if}
|
|
24
|
-
{#if onclickButtonLogin}
|
|
25
|
-
{@render actionButtons({
|
|
26
|
-
text: textButtonLogin || $t("label.login"),
|
|
27
|
-
icon: Login03Icon,
|
|
28
|
-
onclick: onclickButtonLogin,
|
|
29
|
-
})}
|
|
30
|
-
{/if}
|
|
31
|
-
|
|
32
|
-
{#snippet actionButtons({
|
|
33
|
-
text,
|
|
34
|
-
icon,
|
|
35
|
-
onclick,
|
|
36
|
-
}: Readonly<{
|
|
37
|
-
text: string;
|
|
38
|
-
icon: IconSvgElement;
|
|
39
|
-
onclick: () => void;
|
|
40
|
-
}>)}
|
|
41
|
-
<Button
|
|
42
|
-
{onclick}
|
|
43
|
-
variant="outline"
|
|
44
|
-
class="flex justify-between items-center gap-3 rounded-full border p-5 md:p-5 cursor-pointer md:text-md"
|
|
45
|
-
>
|
|
46
|
-
<div>{text}</div>
|
|
47
|
-
<div class="border p-2 rounded-full bg-white dark:bg-background mr-0">
|
|
48
|
-
<HugeiconsIcon {icon} />
|
|
49
|
-
</div>
|
|
50
|
-
</Button>
|
|
51
|
-
{/snippet}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { NavMenuButtonProps } from "../../data/nav-menu";
|
|
3
|
+
import { Login03Icon, User03Icon } from "@hugeicons/core-free-icons";
|
|
4
|
+
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/svelte";
|
|
5
|
+
import { Button } from "../../../../ui/button/index.js";
|
|
6
|
+
import { t } from "../../../../../i18n";
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
buttonClass,
|
|
10
|
+
textButtonLogin,
|
|
11
|
+
textButtonRegister,
|
|
12
|
+
onclickButtonLogin,
|
|
13
|
+
onclickButtonRegister,
|
|
14
|
+
}: NavMenuButtonProps = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
{#if onclickButtonRegister}
|
|
18
|
+
{@render actionButtons({
|
|
19
|
+
text: textButtonRegister || $t("label.register"),
|
|
20
|
+
icon: User03Icon,
|
|
21
|
+
onclick: onclickButtonRegister,
|
|
22
|
+
})}
|
|
23
|
+
{/if}
|
|
24
|
+
{#if onclickButtonLogin}
|
|
25
|
+
{@render actionButtons({
|
|
26
|
+
text: textButtonLogin || $t("label.login"),
|
|
27
|
+
icon: Login03Icon,
|
|
28
|
+
onclick: onclickButtonLogin,
|
|
29
|
+
})}
|
|
30
|
+
{/if}
|
|
31
|
+
|
|
32
|
+
{#snippet actionButtons({
|
|
33
|
+
text,
|
|
34
|
+
icon,
|
|
35
|
+
onclick,
|
|
36
|
+
}: Readonly<{
|
|
37
|
+
text: string;
|
|
38
|
+
icon: IconSvgElement;
|
|
39
|
+
onclick: () => void;
|
|
40
|
+
}>)}
|
|
41
|
+
<Button
|
|
42
|
+
{onclick}
|
|
43
|
+
variant="outline"
|
|
44
|
+
class="flex justify-between items-center gap-3 rounded-full border p-5 md:p-5 cursor-pointer md:text-md"
|
|
45
|
+
>
|
|
46
|
+
<div>{text}</div>
|
|
47
|
+
<div class="border p-2 rounded-full bg-white dark:bg-background mr-0">
|
|
48
|
+
<HugeiconsIcon {icon} />
|
|
49
|
+
</div>
|
|
50
|
+
</Button>
|
|
51
|
+
{/snippet}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
3
|
-
import type { NavMenuLinksProps } from "../../data/nav-menu";
|
|
4
|
-
|
|
5
|
-
type Props = {
|
|
6
|
-
links: NavMenuLinksProps[];
|
|
7
|
-
linkClass?: string;
|
|
8
|
-
groupClass?: string;
|
|
9
|
-
menuKey?: string;
|
|
10
|
-
activeClass?: string;
|
|
11
|
-
orientation?: "horizontal" | "vertical";
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
let {
|
|
15
|
-
links,
|
|
16
|
-
linkClass,
|
|
17
|
-
groupClass,
|
|
18
|
-
menuKey,
|
|
19
|
-
activeClass = "bg-gradient text-white",
|
|
20
|
-
orientation,
|
|
21
|
-
}: Props = $props();
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<ul
|
|
25
|
-
class={`flex ${orientation === "vertical" ? "flex-col" : "items-center"} gap-2 md:gap-5 lg:gap-15 ${groupClass}`}
|
|
26
|
-
>
|
|
27
|
-
{#each links as item (item.label)}
|
|
28
|
-
<li>
|
|
29
|
-
<a
|
|
30
|
-
class={`flex items-center gap-1 ${linkClass} ${item.key && menuKey === item.key ? activeClass : ""}`}
|
|
31
|
-
href={item.url ?? item.href ?? "#"}
|
|
32
|
-
>
|
|
33
|
-
{#if item.icon}
|
|
34
|
-
<HugeiconsIcon icon={item.icon} size={15} />
|
|
35
|
-
{/if}
|
|
36
|
-
{item.label}
|
|
37
|
-
</a>
|
|
38
|
-
</li>
|
|
39
|
-
{/each}
|
|
40
|
-
</ul>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
3
|
+
import type { NavMenuLinksProps } from "../../data/nav-menu";
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
links: NavMenuLinksProps[];
|
|
7
|
+
linkClass?: string;
|
|
8
|
+
groupClass?: string;
|
|
9
|
+
menuKey?: string;
|
|
10
|
+
activeClass?: string;
|
|
11
|
+
orientation?: "horizontal" | "vertical";
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
let {
|
|
15
|
+
links,
|
|
16
|
+
linkClass,
|
|
17
|
+
groupClass,
|
|
18
|
+
menuKey,
|
|
19
|
+
activeClass = "bg-gradient text-white",
|
|
20
|
+
orientation,
|
|
21
|
+
}: Props = $props();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<ul
|
|
25
|
+
class={`flex ${orientation === "vertical" ? "flex-col" : "items-center"} gap-2 md:gap-5 lg:gap-15 ${groupClass}`}
|
|
26
|
+
>
|
|
27
|
+
{#each links as item (item.label)}
|
|
28
|
+
<li>
|
|
29
|
+
<a
|
|
30
|
+
class={`flex items-center gap-1 ${linkClass} ${item.key && menuKey === item.key ? activeClass : ""}`}
|
|
31
|
+
href={item.url ?? item.href ?? "#"}
|
|
32
|
+
>
|
|
33
|
+
{#if item.icon}
|
|
34
|
+
<HugeiconsIcon icon={item.icon} size={15} />
|
|
35
|
+
{/if}
|
|
36
|
+
{item.label}
|
|
37
|
+
</a>
|
|
38
|
+
</li>
|
|
39
|
+
{/each}
|
|
40
|
+
</ul>
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as NavigationMenu from "../../../../ui/navigation-menu/index.js";
|
|
3
|
-
import { cn } from "../../../../../utils";
|
|
4
|
-
import type { ListItemProps } from "../../data/types";
|
|
5
|
-
let {
|
|
6
|
-
title,
|
|
7
|
-
content,
|
|
8
|
-
href,
|
|
9
|
-
icon,
|
|
10
|
-
class: className,
|
|
11
|
-
...restProps
|
|
12
|
-
}: ListItemProps = $props();
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
{#snippet header()}
|
|
16
|
-
<div class="leading-none font-medium">{title}</div>
|
|
17
|
-
{/snippet}
|
|
18
|
-
|
|
19
|
-
<li>
|
|
20
|
-
<NavigationMenu.Link>
|
|
21
|
-
{#snippet child()}
|
|
22
|
-
<a
|
|
23
|
-
{href}
|
|
24
|
-
class={cn(
|
|
25
|
-
"block space-y-1 rounded-md p-3 leading-none no-underline transition-colors outline-none select-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
26
|
-
className,
|
|
27
|
-
)}
|
|
28
|
-
{...restProps}
|
|
29
|
-
>
|
|
30
|
-
{#if icon}
|
|
31
|
-
<div class="flex gap-1 items-center">
|
|
32
|
-
<div>
|
|
33
|
-
<i class={`${icon} size-8 md:size-10`}></i>
|
|
34
|
-
</div>
|
|
35
|
-
<div class="-mt-1">
|
|
36
|
-
{@render header()}
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
{:else}
|
|
40
|
-
{@render header()}
|
|
41
|
-
{/if}
|
|
42
|
-
<p class="line-clamp-2 text-sm leading-snug text-muted-foreground">
|
|
43
|
-
{content}
|
|
44
|
-
</p>
|
|
45
|
-
</a>
|
|
46
|
-
{/snippet}
|
|
47
|
-
</NavigationMenu.Link>
|
|
48
|
-
</li>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import * as NavigationMenu from "../../../../ui/navigation-menu/index.js";
|
|
3
|
+
import { cn } from "../../../../../utils";
|
|
4
|
+
import type { ListItemProps } from "../../data/types";
|
|
5
|
+
let {
|
|
6
|
+
title,
|
|
7
|
+
content,
|
|
8
|
+
href,
|
|
9
|
+
icon,
|
|
10
|
+
class: className,
|
|
11
|
+
...restProps
|
|
12
|
+
}: ListItemProps = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
{#snippet header()}
|
|
16
|
+
<div class="leading-none font-medium">{title}</div>
|
|
17
|
+
{/snippet}
|
|
18
|
+
|
|
19
|
+
<li>
|
|
20
|
+
<NavigationMenu.Link>
|
|
21
|
+
{#snippet child()}
|
|
22
|
+
<a
|
|
23
|
+
{href}
|
|
24
|
+
class={cn(
|
|
25
|
+
"block space-y-1 rounded-md p-3 leading-none no-underline transition-colors outline-none select-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
26
|
+
className,
|
|
27
|
+
)}
|
|
28
|
+
{...restProps}
|
|
29
|
+
>
|
|
30
|
+
{#if icon}
|
|
31
|
+
<div class="flex gap-1 items-center">
|
|
32
|
+
<div>
|
|
33
|
+
<i class={`${icon} size-8 md:size-10`}></i>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="-mt-1">
|
|
36
|
+
{@render header()}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
{:else}
|
|
40
|
+
{@render header()}
|
|
41
|
+
{/if}
|
|
42
|
+
<p class="line-clamp-2 text-sm leading-snug text-muted-foreground">
|
|
43
|
+
{content}
|
|
44
|
+
</p>
|
|
45
|
+
</a>
|
|
46
|
+
{/snippet}
|
|
47
|
+
</NavigationMenu.Link>
|
|
48
|
+
</li>
|