negodesign 0.0.11 → 0.0.13
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/NegoDesign.svelte +1 -1
- package/dist/components/NegoDesign.svelte.d.ts +1 -1
- package/dist/components/core/button/ButtonBack.svelte +1 -1
- package/dist/components/core/button/ButtonLogin.svelte +1 -1
- package/dist/components/core/button/ButtonLoginWith.svelte +1 -1
- package/dist/components/core/button/ButtonSend.svelte +1 -1
- package/dist/components/core/card/media/01/CardMedia01.svelte +114 -0
- package/dist/components/core/card/media/01/CardMedia01.svelte.d.ts +4 -0
- package/dist/components/core/card/media/02/CardMedia02.svelte +113 -0
- package/dist/components/core/card/media/02/CardMedia02.svelte.d.ts +4 -0
- package/dist/components/core/card/media/CardMedia.svelte +17 -0
- package/dist/components/core/card/media/CardMedia.svelte.d.ts +8 -0
- package/dist/components/core/card/media/data.d.ts +3 -0
- package/dist/components/core/card/media/data.js +117 -0
- package/dist/components/core/card/profile/01/CardProfile01.svelte +101 -0
- package/dist/components/core/card/profile/01/CardProfile01.svelte.d.ts +4 -0
- package/dist/components/core/card/profile/02/CardProfile02.svelte +97 -0
- package/dist/components/core/card/profile/02/CardProfile02.svelte.d.ts +4 -0
- package/dist/components/core/card/profile/CardProfile.svelte +17 -0
- package/dist/components/core/card/profile/CardProfile.svelte.d.ts +8 -0
- package/dist/components/core/card/profile/data.d.ts +3 -0
- package/dist/components/core/card/profile/data.js +107 -0
- 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/CardButton.svelte +30 -0
- package/dist/components/core/card/shared/CardButton.svelte.d.ts +12 -0
- package/dist/components/core/card/shared/CardDescription.svelte +23 -0
- package/dist/components/core/card/shared/CardDescription.svelte.d.ts +6 -0
- package/dist/components/core/card/shared/CardFavorite.svelte +28 -0
- package/dist/components/core/card/shared/CardFavorite.svelte.d.ts +7 -0
- package/dist/components/core/card/shared/CardStarRating.svelte +20 -0
- package/dist/components/core/card/shared/CardStarRating.svelte.d.ts +7 -0
- package/dist/components/core/card/shared/CardTags.svelte +56 -0
- package/dist/components/core/card/shared/CardTags.svelte.d.ts +10 -0
- package/dist/components/core/card/shared/CardThumbnailVideo.svelte +170 -0
- package/dist/components/core/card/shared/CardThumbnailVideo.svelte.d.ts +10 -0
- package/dist/components/core/card/shared/TruncatableText.svelte +56 -0
- package/dist/components/core/card/shared/TruncatableText.svelte.d.ts +8 -0
- package/dist/components/core/card/types.d.ts +54 -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 +34 -0
- package/dist/components/core/datatable/ui/DataTableCore.svelte +5 -5
- package/dist/components/core/form/ui/input-code-otp.svelte +3 -3
- package/dist/components/core/form/ui/input-code-otp.svelte.d.ts +2 -2
- package/dist/components/core/form/ui/input-email-or-phone.svelte +1 -1
- package/dist/components/core/form/ui/input-email.svelte +1 -1
- package/dist/components/core/form/ui/input-password-confirm.svelte +1 -1
- package/dist/components/core/form/ui/input-password.svelte +1 -1
- package/dist/components/core/form/ui/input-phone.svelte +1 -1
- package/dist/components/core/form/ui/input-username.svelte +2 -2
- package/dist/components/core/nav/data/nav-menu-sidebar.d.ts +7 -7
- package/dist/components/core/nav/data/nav-menu.d.ts +31 -0
- package/dist/components/core/nav/data/nav-user-sidebar.d.ts +1 -1
- package/dist/components/core/nav/ui/menu-links.svelte +28 -0
- package/dist/components/core/nav/ui/menu-links.svelte.d.ts +10 -0
- package/dist/components/core/nav/ui/mobile/nav-menu-drawer.svelte +85 -0
- package/dist/components/core/nav/ui/mobile/nav-menu-drawer.svelte.d.ts +9 -0
- package/dist/components/core/nav/ui/{nav-menu-bottom-bar.svelte → nav-menu-bottom-sidebar.svelte} +2 -2
- package/dist/components/core/nav/ui/nav-menu-bottom-sidebar.svelte.d.ts +10 -0
- package/dist/components/core/nav/ui/nav-menu-header-sidebar.svelte.d.ts +10 -0
- package/dist/components/core/nav/ui/{nav-menu-bar.svelte → nav-menu-sidebar.svelte} +7 -7
- package/dist/components/core/nav/ui/nav-menu-sidebar.svelte.d.ts +7 -0
- package/dist/components/core/nav/ui/nav-menu-top-bar-sidebar.svelte.d.ts +4 -0
- package/dist/components/core/nav/ui/nav-menu.svelte +98 -0
- package/dist/components/core/nav/ui/nav-menu.svelte.d.ts +4 -0
- package/dist/components/core/nav/ui/nav-user-sidebar.svelte +2 -2
- package/dist/components/core/nav/ui/nav-user-sidebar.svelte.d.ts +2 -2
- package/dist/components/core/panel/CarouselSlot.svelte +38 -0
- package/dist/components/core/panel/CarouselSlot.svelte.d.ts +11 -0
- package/dist/components/core/panel/LeftHero.svelte +3 -3
- package/dist/components/core/panel/LeftHero.svelte.d.ts +2 -2
- package/dist/components/core/search/01/Search01.svelte +15 -0
- package/dist/components/core/search/01/Search01.svelte.d.ts +4 -0
- package/dist/components/core/search/02/Search02.svelte +15 -0
- package/dist/components/core/search/02/Search02.svelte.d.ts +4 -0
- package/dist/components/core/search/SearchInput.svelte +32 -0
- package/dist/components/core/search/SearchInput.svelte.d.ts +4 -0
- package/dist/components/core/search/shared/SearchInputCore.svelte +66 -0
- package/dist/components/core/search/shared/SearchInputCore.svelte.d.ts +4 -0
- package/dist/components/core/search/types.d.ts +15 -0
- package/dist/components/core/sidebar/MenuBarSidebar.svelte +14 -14
- package/dist/components/core/sidebar/MenuBarSidebar.svelte.d.ts +8 -8
- package/dist/components/pages/admin/{ui → 01/ui}/AdminContent.svelte +1 -1
- package/dist/components/pages/admin/{ui → 01/ui}/AdminContent.svelte.d.ts +1 -1
- package/dist/components/pages/admin/{ui → 01/ui}/AdminPanel.svelte +8 -8
- package/dist/components/pages/admin/{ui → 01/ui}/AdminPanel.svelte.d.ts +4 -4
- package/dist/components/pages/privacy-policy-or-terms-of-use/01/DocsSidebar.svelte +69 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/01/DocsSidebar.svelte.d.ts +10 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/01/PrivacyPolicyOrTermsOfUse01.svelte +73 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/01/PrivacyPolicyOrTermsOfUse01.svelte.d.ts +7 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/01/TableOfContents.svelte +37 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/01/TableOfContents.svelte.d.ts +8 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/02/DocsPageHero.svelte +59 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/02/DocsPageHero.svelte.d.ts +10 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/02/PageHero.svelte +51 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/02/PageHero.svelte.d.ts +14 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/02/PrivacyPolicyOrTermsOfUse02.svelte +24 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/02/PrivacyPolicyOrTermsOfUse02.svelte.d.ts +7 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/PrivacyPolicyOrTermsOfUse.svelte +32 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/PrivacyPolicyOrTermsOfUse.svelte.d.ts +4 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/shared/ContentBlockView.svelte +26 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/shared/ContentBlockView.svelte.d.ts +7 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/shared/DocSectionView.svelte +44 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/shared/DocSectionView.svelte.d.ts +7 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/shared/PrivacyPolicyOrTermsOfUseBreadcrumb.svelte +34 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/shared/PrivacyPolicyOrTermsOfUseBreadcrumb.svelte.d.ts +7 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/shared/toc.d.ts +8 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/shared/toc.js +14 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/types.d.ts +62 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/types.js +5 -0
- package/dist/components/pages/{forget-password → security/forget-password}/01/ui/ForgetPasswordCard.svelte +15 -10
- package/dist/components/pages/{forget-password → security/forget-password}/01/ui/ForgetPasswordCard.svelte.d.ts +0 -5
- package/dist/components/pages/{forget-password → security/forget-password}/01/ui/FormForgetPassword.svelte +15 -5
- package/dist/components/pages/{forget-password → security/forget-password}/01/ui/PageForgetPassword01.svelte +6 -6
- package/dist/components/pages/{forget-password → security/forget-password}/PageForgetPassword.svelte +10 -7
- package/dist/components/pages/{forget-password → security/forget-password}/PageForgetPassword.svelte.d.ts +0 -7
- package/dist/components/pages/{forget-password → security/forget-password}/types.d.ts +3 -3
- package/dist/components/pages/{login → security/login}/01/ui/FormLogin.svelte +19 -15
- package/dist/components/pages/{login → security/login}/01/ui/FormLogin.svelte.d.ts +0 -6
- package/dist/components/pages/{login → security/login}/01/ui/FormLoginEmailPassword.svelte +10 -1
- package/dist/components/pages/{login → security/login}/01/ui/FormLoginEmailPassword.svelte.d.ts +0 -1
- package/dist/components/pages/{login → security/login}/01/ui/FormLoginPhonePassword.svelte +10 -1
- package/dist/components/pages/{login → security/login}/01/ui/FormLoginPhonePassword.svelte.d.ts +0 -1
- package/dist/components/pages/{login → security/login}/01/ui/FormLoginUsernamePassword.svelte +10 -1
- package/dist/components/pages/{login → security/login}/01/ui/FormLoginUsernamePassword.svelte.d.ts +0 -1
- package/dist/components/pages/{login → security/login}/01/ui/FormRegister.svelte +5 -5
- package/dist/components/pages/{login → security/login}/01/ui/LoginCard.svelte +28 -20
- package/dist/components/pages/security/login/01/ui/LoginCard.svelte.d.ts +13 -0
- package/dist/components/pages/{login → security/login}/01/ui/PageLogin01.svelte +12 -11
- package/dist/components/pages/security/login/PageLogin.svelte +22 -0
- package/dist/components/pages/security/login/PageLogin.svelte.d.ts +8 -0
- package/dist/components/pages/security/login/types.d.ts +33 -0
- package/dist/components/pages/security/login/types.js +1 -0
- package/dist/components/pages/{otp-verification → security/otp-verification}/01/ui/FormOtpVerification.svelte +13 -3
- package/dist/components/pages/{otp-verification → security/otp-verification}/01/ui/OtpVerificationCard.svelte +15 -10
- package/dist/components/pages/{otp-verification → security/otp-verification}/01/ui/OtpVerificationCard.svelte.d.ts +0 -5
- package/dist/components/pages/{otp-verification → security/otp-verification}/01/ui/PageOtpVerification01.svelte +12 -6
- package/dist/components/pages/{otp-verification → security/otp-verification}/PageOtpVerification.svelte +10 -4
- package/dist/components/pages/{otp-verification → security/otp-verification}/PageOtpVerification.svelte.d.ts +0 -4
- package/dist/components/pages/{otp-verification → security/otp-verification}/types.d.ts +3 -3
- package/dist/components/pages/security/otp-verification/types.js +1 -0
- package/dist/components/pages/{reset-password → security/reset-password}/01/ui/FormResetPassword.svelte +15 -5
- package/dist/components/pages/{reset-password → security/reset-password}/01/ui/PageResetPassword01.svelte +12 -6
- package/dist/components/pages/{reset-password → security/reset-password}/01/ui/ResetPasswordCard.svelte +15 -10
- package/dist/components/pages/{reset-password → security/reset-password}/01/ui/ResetPasswordCard.svelte.d.ts +0 -5
- package/dist/components/pages/{reset-password → security/reset-password}/PageResetPassword.svelte +10 -4
- package/dist/components/pages/{reset-password → security/reset-password}/PageResetPassword.svelte.d.ts +0 -4
- package/dist/components/pages/{reset-password → security/reset-password}/types.d.ts +3 -3
- package/dist/components/pages/security/reset-password/types.js +1 -0
- package/dist/components/ui/button/button.svelte +82 -101
- package/dist/components/ui/button/button.svelte.d.ts +36 -63
- package/dist/components/ui/button/index.d.ts +2 -2
- package/dist/components/ui/button/index.js +2 -2
- package/dist/components/ui/carousel/carousel-content.svelte +43 -0
- package/dist/components/ui/carousel/carousel-content.svelte.d.ts +5 -0
- package/dist/components/ui/carousel/carousel-item.svelte +30 -0
- package/dist/components/ui/carousel/carousel-item.svelte.d.ts +5 -0
- package/dist/components/ui/carousel/carousel-next.svelte +40 -0
- package/dist/components/ui/carousel/carousel-next.svelte.d.ts +4 -0
- package/dist/components/ui/carousel/carousel-previous.svelte +40 -0
- package/dist/components/ui/carousel/carousel-previous.svelte.d.ts +4 -0
- package/dist/components/ui/carousel/carousel.svelte +94 -0
- package/dist/components/ui/carousel/carousel.svelte.d.ts +5 -0
- package/dist/components/ui/carousel/context.d.ts +31 -0
- package/dist/components/ui/carousel/context.js +12 -0
- package/dist/components/ui/carousel/index.d.ts +6 -0
- package/dist/components/ui/carousel/index.js +8 -0
- package/dist/components/ui/input-group/input-group-addon.svelte +6 -0
- package/dist/components/ui/input-group/input-group-addon.svelte.d.ts +6 -0
- package/dist/components/ui/light-switch/light-switch.svelte +17 -6
- package/dist/components/ui/light-switch/light-switch.svelte.d.ts +2 -2
- package/dist/components/ui/star-rating/index.d.ts +2 -0
- package/dist/components/ui/star-rating/index.js +2 -0
- package/dist/components/ui/star-rating/star-rating-star.svelte +41 -0
- package/dist/components/ui/star-rating/star-rating-star.svelte.d.ts +4 -0
- package/dist/components/ui/star-rating/star-rating.svelte +20 -0
- package/dist/components/ui/star-rating/star-rating.svelte.d.ts +4 -0
- package/dist/components/ui/star-rating/types.d.ts +5 -0
- package/dist/components/ui/star-rating/types.js +1 -0
- package/dist/globals.css +645 -36
- package/dist/hooks/responsive.svelte.d.ts +3 -0
- package/dist/hooks/responsive.svelte.js +18 -0
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/langs/en.d.ts +23 -8
- package/dist/i18n/langs/en.js +23 -8
- package/dist/i18n/langs/pt.d.ts +23 -8
- package/dist/i18n/langs/pt.js +23 -8
- package/dist/i18n/translations.d.ts +46 -16
- package/dist/index.d.ts +15 -9
- package/dist/index.js +15 -9
- package/dist/styles/globals.css +147 -141
- package/dist/types/index.d.ts +4 -4
- package/package.json +11 -9
- package/dist/components/core/carousel/data/CarouselModel.d.ts +0 -11
- package/dist/components/core/nav/ui/nav-menu-bar.svelte.d.ts +0 -7
- package/dist/components/core/nav/ui/nav-menu-bottom-bar.svelte.d.ts +0 -10
- package/dist/components/core/nav/ui/nav-menu-header.svelte.d.ts +0 -10
- package/dist/components/core/nav/ui/nav-menu-top-bar.svelte.d.ts +0 -4
- package/dist/components/pages/login/01/ui/LoginCard.svelte.d.ts +0 -21
- package/dist/components/pages/login/PageLogin.svelte +0 -21
- package/dist/components/pages/login/PageLogin.svelte.d.ts +0 -17
- package/dist/components/pages/login/types.d.ts +0 -23
- /package/dist/components/{pages/forget-password → core/card}/types.js +0 -0
- /package/dist/components/{pages/login → core/carousel}/types.js +0 -0
- /package/dist/components/core/{carousel/data/CarouselModel.js → nav/data/nav-menu.js} +0 -0
- /package/dist/components/core/nav/ui/{nav-menu-header.svelte → nav-menu-header-sidebar.svelte} +0 -0
- /package/dist/components/core/nav/ui/{nav-menu-top-bar.svelte → nav-menu-top-bar-sidebar.svelte} +0 -0
- /package/dist/components/{pages/otp-verification → core/search}/types.js +0 -0
- /package/dist/components/pages/{forget-password → security/forget-password}/01/ui/FormForgetPassword.svelte.d.ts +0 -0
- /package/dist/components/pages/{forget-password → security/forget-password}/01/ui/PageForgetPassword01.svelte.d.ts +0 -0
- /package/dist/components/pages/{reset-password → security/forget-password}/types.js +0 -0
- /package/dist/components/pages/{login → security/login}/01/ui/FormRegister.svelte.d.ts +0 -0
- /package/dist/components/pages/{login → security/login}/01/ui/PageLogin01.svelte.d.ts +0 -0
- /package/dist/components/pages/{otp-verification → security/otp-verification}/01/ui/FormOtpVerification.svelte.d.ts +0 -0
- /package/dist/components/pages/{otp-verification → security/otp-verification}/01/ui/PageOtpVerification01.svelte.d.ts +0 -0
- /package/dist/components/pages/{reset-password → security/reset-password}/01/ui/FormResetPassword.svelte.d.ts +0 -0
- /package/dist/components/pages/{reset-password → security/reset-password}/01/ui/PageResetPassword01.svelte.d.ts +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
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";
|
|
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();
|
|
23
|
+
|
|
24
|
+
const responsive = useIsMobile();
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
{#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>
|
|
62
|
+
{/if}
|
|
63
|
+
</div>
|
|
64
|
+
{/snippet}
|
|
65
|
+
|
|
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}
|
|
84
|
+
|
|
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}
|
|
98
|
+
</nav>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as Avatar from "../../../ui/avatar/index.js";
|
|
3
3
|
import * as DropdownMenu from "../../../ui/dropdown-menu/index.js";
|
|
4
4
|
import * as Sidebar from "../../../ui/sidebar/index.js";
|
|
5
|
-
import type {
|
|
5
|
+
import type { NavUserSidebarProps } from "../data/nav-user-sidebar";
|
|
6
6
|
import { useSidebar } from "../../../ui/sidebar/index.js";
|
|
7
7
|
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
8
8
|
import {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
} from "@hugeicons/core-free-icons";
|
|
13
13
|
import { t } from "../../../../i18n";
|
|
14
14
|
|
|
15
|
-
let { user: userLogged }: { user:
|
|
15
|
+
let { user: userLogged }: { user: NavUserSidebarProps } = $props();
|
|
16
16
|
|
|
17
17
|
const sidebar = useSidebar();
|
|
18
18
|
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NavUserSidebarProps } from "../data/nav-user-sidebar";
|
|
2
2
|
type $$ComponentProps = {
|
|
3
|
-
user:
|
|
3
|
+
user: NavUserSidebarProps;
|
|
4
4
|
};
|
|
5
5
|
declare const NavUserSidebar: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
6
6
|
type NavUserSidebar = ReturnType<typeof NavUserSidebar>;
|
|
@@ -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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
3
3
|
import { ArrowRight01Icon } from "@hugeicons/core-free-icons";
|
|
4
|
-
import type {
|
|
4
|
+
import type { LoginCarouselProps } from "../../pages/security/login/types";
|
|
5
5
|
import type { Snippet } from "svelte";
|
|
6
6
|
import Button from "../../ui/button/button.svelte";
|
|
7
7
|
import { t } from "../../../i18n";
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
items = [],
|
|
19
19
|
variant = "DOT",
|
|
20
20
|
autoPlayInterval = 5000,
|
|
21
|
-
}: Props &
|
|
21
|
+
}: Props & LoginCarouselProps = $props();
|
|
22
22
|
|
|
23
23
|
let currentIndex = $state(0);
|
|
24
24
|
let currentItem = $derived(items[currentIndex] ?? items[0]);
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
</div>
|
|
54
54
|
|
|
55
55
|
<section class="flex flex-col gap-5">
|
|
56
|
-
<div class="my-auto max-w-sm md:max-w-md lg:max-w-
|
|
56
|
+
<div class="my-auto max-w-sm md:max-w-md lg:max-w-100">
|
|
57
57
|
{#if currentItem}
|
|
58
58
|
{#key currentIndex}
|
|
59
59
|
<div
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LoginCarouselProps } from "../../pages/security/login/types";
|
|
2
2
|
import type { Snippet } from "svelte";
|
|
3
3
|
type Props = {
|
|
4
4
|
title?: string | Snippet;
|
|
5
5
|
variant?: "NUMBER" | "DOT";
|
|
6
6
|
autoPlayInterval?: number;
|
|
7
7
|
};
|
|
8
|
-
type $$ComponentProps = Props &
|
|
8
|
+
type $$ComponentProps = Props & LoginCarouselProps;
|
|
9
9
|
declare const LeftHero: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
10
10
|
type LeftHero = ReturnType<typeof LeftHero>;
|
|
11
11
|
export default LeftHero;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* Search input with full border (variant 1).
|
|
4
|
+
* @component
|
|
5
|
+
*/
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import type { SearchItemProps } from "../types";
|
|
10
|
+
import SearchInputCore from "../shared/SearchInputCore.svelte";
|
|
11
|
+
|
|
12
|
+
let { ...restProps }: SearchItemProps = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<SearchInputCore {...restProps} variant={1} />
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* Search input with bottom border only (variant 2).
|
|
4
|
+
* @component
|
|
5
|
+
*/
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import type { SearchItemProps } from "../types";
|
|
10
|
+
import SearchInputCore from "../shared/SearchInputCore.svelte";
|
|
11
|
+
|
|
12
|
+
let { ...restProps }: SearchItemProps = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<SearchInputCore {...restProps} variant={2} />
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* Main Privacy Policy / Terms of Use component.
|
|
4
|
+
* Allows choosing between two layout variants:
|
|
5
|
+
* - **1**: Three-column layout with sidebar, content, and TOC (scroll-spy).
|
|
6
|
+
* - **2**: Simple layout with colored hero and centered content.
|
|
7
|
+
*
|
|
8
|
+
* @component
|
|
9
|
+
* @example
|
|
10
|
+
* ```svelte
|
|
11
|
+
* <!-- Variant 1 (default) — docs layout with sidebar -->
|
|
12
|
+
* <PrivacyPolicyOrTermsOfUse variant={1} data={pageData} />
|
|
13
|
+
*
|
|
14
|
+
* <!-- Variant 2 — layout with hero -->
|
|
15
|
+
* <PrivacyPolicyOrTermsOfUse variant={2} data={pageData} />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<script lang="ts">
|
|
21
|
+
import Search01 from "./01/Search01.svelte";
|
|
22
|
+
import Search02 from "./02/Search02.svelte";
|
|
23
|
+
import type { SearchInputProps } from "./types";
|
|
24
|
+
|
|
25
|
+
let { variant = 1, ...restProps }: SearchInputProps = $props();
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
{#if variant === 2}
|
|
29
|
+
<Search02 {...restProps} />
|
|
30
|
+
{:else}
|
|
31
|
+
<Search01 {...restProps} />
|
|
32
|
+
{/if}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* Reusable search input component used by Search01 and Search02.
|
|
4
|
+
* Renders a text input with a search icon and submit button.
|
|
5
|
+
* @component
|
|
6
|
+
*/
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
11
|
+
import { Search01Icon } from "@hugeicons/core-free-icons";
|
|
12
|
+
import Button from "../../../ui/button/button.svelte";
|
|
13
|
+
import { Separator } from "../../../ui/separator/index";
|
|
14
|
+
import { t } from "../../../../i18n";
|
|
15
|
+
import type { SearchInputProps } from "../types";
|
|
16
|
+
|
|
17
|
+
let { onSubmit, placeholder, variant = 1, buttonClass, inputClass, iconClass }: SearchInputProps = $props();
|
|
18
|
+
|
|
19
|
+
let value = $state("");
|
|
20
|
+
|
|
21
|
+
function handleKeydown(e: KeyboardEvent) {
|
|
22
|
+
if (e.key === "Enter") onSubmit?.(value);
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<div class="container relative">
|
|
27
|
+
<div
|
|
28
|
+
class="mx-auto md:w-11/12 z-10 {variant === 2
|
|
29
|
+
? 'border-b'
|
|
30
|
+
: 'border bg-input rounded-lg shadow'} m-auto"
|
|
31
|
+
>
|
|
32
|
+
<div class="flex items-center gap-2 py-1 px-2 w-full md:min-h-15">
|
|
33
|
+
<div class="items-center gap-2 hidden md:flex">
|
|
34
|
+
<HugeiconsIcon
|
|
35
|
+
icon={Search01Icon}
|
|
36
|
+
size={20}
|
|
37
|
+
color="currentColor"
|
|
38
|
+
strokeWidth={1.5}
|
|
39
|
+
class={iconClass}
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
<input
|
|
43
|
+
type="search"
|
|
44
|
+
bind:value
|
|
45
|
+
onkeydown={handleKeydown}
|
|
46
|
+
class="text-sm w-full bg-transparent border-none outline-none focus:outline-none focus:ring-0 focus:border-transparent {inputClass}"
|
|
47
|
+
placeholder={placeholder || $t("label.search.placeholder")}
|
|
48
|
+
/>
|
|
49
|
+
<div class="flex gap-1">
|
|
50
|
+
<Separator class="w-full" orientation="vertical" />
|
|
51
|
+
<Button
|
|
52
|
+
onclick={() => onSubmit?.(value)}
|
|
53
|
+
class={`flex justify-center items-center cursor-pointer ${buttonClass}`}
|
|
54
|
+
>
|
|
55
|
+
<HugeiconsIcon
|
|
56
|
+
icon={Search01Icon}
|
|
57
|
+
size={15}
|
|
58
|
+
color="currentColor"
|
|
59
|
+
strokeWidth={2}
|
|
60
|
+
/>
|
|
61
|
+
<span class="hidden md:block">{$t("label.search")}</span>
|
|
62
|
+
</Button>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Props for the search input component. */
|
|
2
|
+
export interface SearchItemProps {
|
|
3
|
+
/** Callback fired when the user submits the search. */
|
|
4
|
+
onSubmit?: (q: string) => void;
|
|
5
|
+
/** Placeholder text for the input field. */
|
|
6
|
+
buttonClass?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
inputClass?: string;
|
|
9
|
+
iconClass?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Extended search input props with a visual variant option. */
|
|
12
|
+
export interface SearchInputProps extends SearchItemProps {
|
|
13
|
+
/** Visual variant: 1 = full border, 2 = bottom border only. */
|
|
14
|
+
variant?: 1 | 2;
|
|
15
|
+
}
|
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
import * as Sidebar from "../../ui/sidebar/index.js";
|
|
3
3
|
import type { ComponentProps } from "svelte";
|
|
4
4
|
|
|
5
|
-
import type {
|
|
5
|
+
import type { NavUserSidebarProps } from "../nav/data/nav-user-sidebar";
|
|
6
6
|
import type {
|
|
7
7
|
NavMenuItem,
|
|
8
|
-
|
|
8
|
+
NavMenuSidebarProps,
|
|
9
9
|
} from "../nav/data/nav-menu-sidebar";
|
|
10
10
|
import type { Snippet } from "svelte";
|
|
11
|
+
import NavMenuTopBarSidebar from "../nav/ui/nav-menu-top-bar-sidebar.svelte";
|
|
12
|
+
import NavMenuBottomSidebar from "../nav/ui/nav-menu-bottom-sidebar.svelte";
|
|
13
|
+
import NavMenuBarSidebar from "../nav/ui/nav-menu-sidebar.svelte";
|
|
11
14
|
import NavUserSidebar from "../nav/ui/nav-user-sidebar.svelte";
|
|
12
|
-
import NavMenuBar from "../nav/ui/nav-menu-bar.svelte";
|
|
13
|
-
import NavMenuBottomBar from "../nav/ui/nav-menu-bottom-bar.svelte";
|
|
14
|
-
import NavMenuTopBar from "../nav/ui/nav-menu-top-bar.svelte";
|
|
15
15
|
import { t } from "../../../i18n";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
* @property {NavMenuSidebar[]} menusButtons -
|
|
20
|
-
* @property {NavMenuItem[]} menus -
|
|
21
|
-
* @property {NavUserSidebarItem} user -
|
|
18
|
+
* Navigation sidebar with menus, user, and buttons.
|
|
19
|
+
* @property {NavMenuSidebar[]} menusButtons - Footer buttons (e.g., logout)
|
|
20
|
+
* @property {NavMenuItem[]} menus - Main navigation items
|
|
21
|
+
* @property {NavUserSidebarItem} user - Logged-in user data
|
|
22
22
|
* @property {Snippet} footer - Snippet customizado do footer
|
|
23
23
|
* @property {Snippet} header - Snippet customizado do header
|
|
24
24
|
*/
|
|
25
25
|
type Props = {
|
|
26
|
-
menusButtons?:
|
|
26
|
+
menusButtons?: NavMenuSidebarProps[];
|
|
27
27
|
menus: NavMenuItem[];
|
|
28
|
-
user:
|
|
28
|
+
user: NavUserSidebarProps;
|
|
29
29
|
footer?: Snippet;
|
|
30
30
|
header?: Snippet;
|
|
31
31
|
};
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
{#if header}
|
|
48
48
|
{@render header?.()}
|
|
49
49
|
{:else}
|
|
50
|
-
<
|
|
50
|
+
<NavMenuTopBarSidebar
|
|
51
51
|
content={{
|
|
52
52
|
title: $t("label.panel"),
|
|
53
53
|
subtitle: $t("label.administrative"),
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
{/if}
|
|
57
57
|
</Sidebar.Header>
|
|
58
58
|
<Sidebar.Content>
|
|
59
|
-
<
|
|
59
|
+
<NavMenuBarSidebar items={menus} />
|
|
60
60
|
</Sidebar.Content>
|
|
61
61
|
<Sidebar.Footer>
|
|
62
62
|
{#if footer}
|
|
63
63
|
{@render footer?.()}
|
|
64
64
|
{:else if menusButtons && menusButtons.length > 0}
|
|
65
|
-
<
|
|
65
|
+
<NavMenuBottomSidebar items={menusButtons} class="mt-auto" />
|
|
66
66
|
{/if}
|
|
67
67
|
<NavUserSidebar {user} />
|
|
68
68
|
</Sidebar.Footer>
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import * as Sidebar from "../../ui/sidebar/index.js";
|
|
2
2
|
import type { ComponentProps } from "svelte";
|
|
3
|
-
import type {
|
|
4
|
-
import type { NavMenuItem,
|
|
3
|
+
import type { NavUserSidebarProps } from "../nav/data/nav-user-sidebar";
|
|
4
|
+
import type { NavMenuItem, NavMenuSidebarProps } from "../nav/data/nav-menu-sidebar";
|
|
5
5
|
import type { Snippet } from "svelte";
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* @property {NavMenuSidebar[]} menusButtons -
|
|
9
|
-
* @property {NavMenuItem[]} menus -
|
|
10
|
-
* @property {NavUserSidebarItem} user -
|
|
7
|
+
* Navigation sidebar with menus, user, and buttons.
|
|
8
|
+
* @property {NavMenuSidebar[]} menusButtons - Footer buttons (e.g., logout)
|
|
9
|
+
* @property {NavMenuItem[]} menus - Main navigation items
|
|
10
|
+
* @property {NavUserSidebarItem} user - Logged-in user data
|
|
11
11
|
* @property {Snippet} footer - Snippet customizado do footer
|
|
12
12
|
* @property {Snippet} header - Snippet customizado do header
|
|
13
13
|
*/
|
|
14
14
|
type Props = {
|
|
15
|
-
menusButtons?:
|
|
15
|
+
menusButtons?: NavMenuSidebarProps[];
|
|
16
16
|
menus: NavMenuItem[];
|
|
17
|
-
user:
|
|
17
|
+
user: NavUserSidebarProps;
|
|
18
18
|
footer?: Snippet;
|
|
19
19
|
header?: Snippet;
|
|
20
20
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import LanguageSwitcher from "
|
|
3
|
-
import LightSwitch from "
|
|
4
|
-
import { Separator } from "
|
|
5
|
-
import * as Sidebar from "
|
|
2
|
+
import LanguageSwitcher from "../../../../ui/language-switcher/language-switcher.svelte";
|
|
3
|
+
import LightSwitch from "../../../../ui/light-switch/light-switch.svelte";
|
|
4
|
+
import { Separator } from "../../../../ui/separator/index.js";
|
|
5
|
+
import * as Sidebar from "../../../../ui/sidebar/index.js";
|
|
6
6
|
import type { Snippet } from "svelte";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @property {Snippet} appsidebar -
|
|
11
|
-
* @property {Snippet} content -
|
|
12
|
-
* @property {Snippet} breadcrumb -
|
|
9
|
+
* Admin layout with sidebar, header, and content.
|
|
10
|
+
* @property {Snippet} appsidebar - Application sidebar
|
|
11
|
+
* @property {Snippet} content - Main content
|
|
12
|
+
* @property {Snippet} breadcrumb - Breadcrumb navigation
|
|
13
13
|
*/
|
|
14
14
|
type Props = {
|
|
15
15
|
appsidebar?: Snippet;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* @property {Snippet} appsidebar -
|
|
5
|
-
* @property {Snippet} content -
|
|
6
|
-
* @property {Snippet} breadcrumb -
|
|
3
|
+
* Admin layout with sidebar, header, and content.
|
|
4
|
+
* @property {Snippet} appsidebar - Application sidebar
|
|
5
|
+
* @property {Snippet} content - Main content
|
|
6
|
+
* @property {Snippet} breadcrumb - Breadcrumb navigation
|
|
7
7
|
*/
|
|
8
8
|
type Props = {
|
|
9
9
|
appsidebar?: Snippet;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* Side navigation sidebar for documentation pages.
|
|
4
|
+
* Generates links automatically from document sections.
|
|
5
|
+
* Navigates internally using anchors (#section-id).
|
|
6
|
+
*
|
|
7
|
+
* @component
|
|
8
|
+
* @example
|
|
9
|
+
* ```svelte
|
|
10
|
+
* <DocsSidebar sections={data.sections} activeId="introduction" />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<script lang="ts">
|
|
16
|
+
import type { DocSection } from "../types";
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
sections,
|
|
20
|
+
activeId,
|
|
21
|
+
}: {
|
|
22
|
+
/** Document sections (level 1 titles are displayed as groups). */
|
|
23
|
+
sections: DocSection[];
|
|
24
|
+
/** ID of the currently visible section (scroll-spy). */
|
|
25
|
+
activeId?: string;
|
|
26
|
+
} = $props();
|
|
27
|
+
|
|
28
|
+
/** Flattens level 1 sections with their subsections for the sidebar. */
|
|
29
|
+
const flatSections = $derived(
|
|
30
|
+
sections.flatMap((section) => {
|
|
31
|
+
const items = [
|
|
32
|
+
{
|
|
33
|
+
id: section.id,
|
|
34
|
+
label: section.number
|
|
35
|
+
? `${section.number}. ${section.title}`
|
|
36
|
+
: section.title,
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
if (section.subsections) {
|
|
41
|
+
for (const sub of section.subsections) {
|
|
42
|
+
items.push({
|
|
43
|
+
id: sub.id,
|
|
44
|
+
label: sub.number
|
|
45
|
+
? `${sub.number}. ${sub.title}`
|
|
46
|
+
: sub.title,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return items;
|
|
52
|
+
}),
|
|
53
|
+
);
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<aside class="w-56 shrink-0 hidden lg:block">
|
|
57
|
+
<nav class="sticky top-8 flex flex-col gap-1 text-sm">
|
|
58
|
+
{#each flatSections as item (item.id)}
|
|
59
|
+
<a
|
|
60
|
+
href="#{item.id}"
|
|
61
|
+
class="rounded-md px-2 py-1.5 transition-colors {activeId === item.id
|
|
62
|
+
? 'bg-muted text-foreground font-medium'
|
|
63
|
+
: 'text-muted-foreground hover:text-foreground hover:bg-muted/60'}"
|
|
64
|
+
>
|
|
65
|
+
{item.label}
|
|
66
|
+
</a>
|
|
67
|
+
{/each}
|
|
68
|
+
</nav>
|
|
69
|
+
</aside>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DocSection } from "../types";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
/** Document sections (level 1 titles are displayed as groups). */
|
|
4
|
+
sections: DocSection[];
|
|
5
|
+
/** ID of the currently visible section (scroll-spy). */
|
|
6
|
+
activeId?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const DocsSidebar: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
9
|
+
type DocsSidebar = ReturnType<typeof DocsSidebar>;
|
|
10
|
+
export default DocsSidebar;
|