negodesign 0.0.26 → 0.0.28
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/assets/placeholder-company.png +0 -0
- package/dist/assets/placeholder-image.png +0 -0
- 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 +110 -91
- package/dist/components/core/card/highlight/02/CardHighlight02.svelte +108 -93
- package/dist/components/core/card/highlight/CardHighlight.svelte +22 -22
- package/dist/components/core/card/highlight/data.js +4 -1
- package/dist/components/core/card/media/01/CardMedia01.svelte +111 -111
- package/dist/components/core/card/media/02/CardMedia02.svelte +110 -110
- package/dist/components/core/card/media/CardMedia.svelte +17 -17
- package/dist/components/core/card/profile/01/CardProfile01.svelte +98 -98
- package/dist/components/core/card/profile/02/CardProfile02.svelte +98 -98
- package/dist/components/core/card/profile/CardProfile.svelte +17 -17
- package/dist/components/core/card/promotion/CardPromotion.svelte +133 -112
- package/dist/components/core/card/shared/CardButton.svelte +30 -30
- package/dist/components/core/card/shared/CardCart.svelte +36 -36
- package/dist/components/core/card/shared/CardDescription.svelte +38 -38
- package/dist/components/core/card/shared/CardFavorite.svelte +33 -33
- package/dist/components/core/card/shared/CardStarRating.svelte +20 -20
- package/dist/components/core/card/shared/CardStartPrice.svelte +32 -34
- package/dist/components/core/card/shared/CardTags.svelte +70 -73
- package/dist/components/core/card/shared/CardThumbnailVideo.svelte +169 -169
- package/dist/components/core/card/shared/TruncatableText.svelte +55 -55
- package/dist/components/core/carousel/badge/ui/CarouselBadge.svelte +82 -83
- package/dist/components/core/carousel/hero/CarouselHero.svelte +158 -158
- package/dist/components/core/carousel/highlights/ui/CarouselHighlights.svelte +65 -63
- package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte +64 -64
- package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte +55 -55
- 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/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/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/menu-links.svelte +27 -27
- package/dist/components/core/nav/ui/mobile/nav-menu-drawer.svelte +85 -85
- package/dist/components/core/nav/ui/nav-menu-bottom-sidebar.svelte +33 -33
- package/dist/components/core/nav/ui/nav-menu-sidebar.svelte +97 -97
- package/dist/components/core/nav/ui/nav-menu-top-bar-sidebar.svelte +103 -103
- package/dist/components/core/nav/ui/nav-menu.svelte +106 -106
- package/dist/components/core/panel/CarouselSlot.svelte +63 -63
- package/dist/components/core/panel/LeftHero.svelte +116 -116
- 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/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/globals.css +8 -38
- package/dist/styles/globals.css +149 -149
- package/package.json +113 -113
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
3
|
-
import { ArrowRight01Icon } from "@hugeicons/core-free-icons";
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
3
|
+
import { ArrowRight01Icon } from "@hugeicons/core-free-icons";
|
|
4
4
|
import type { LoginCarouselProps } from "../../pages/security/login/types";
|
|
5
|
-
import type { Snippet } from "svelte";
|
|
6
|
-
import Button from "../../ui/button/button.svelte";
|
|
7
|
-
import { t } from "../../../i18n";
|
|
8
|
-
import Logo from "../../../assets/login-01-admin.webp";
|
|
9
|
-
|
|
10
|
-
type Props = {
|
|
11
|
-
title?: string | Snippet;
|
|
12
|
-
variant?: "NUMBER" | "DOT";
|
|
13
|
-
autoPlayInterval?: number;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
let {
|
|
17
|
-
title,
|
|
18
|
-
items = [],
|
|
19
|
-
variant = "DOT",
|
|
20
|
-
autoPlayInterval = 5000,
|
|
21
|
-
}: Props & LoginCarouselProps = $props();
|
|
22
|
-
|
|
23
|
-
let currentIndex = $state(0);
|
|
24
|
-
let currentItem = $derived(items[currentIndex] ?? items[0]);
|
|
25
|
-
|
|
26
|
-
function goTo(index: number) {
|
|
27
|
-
currentIndex = index;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function next() {
|
|
31
|
-
if (items.length === 0) return;
|
|
32
|
-
currentIndex = (currentIndex + 1) % items.length;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
$effect(() => {
|
|
36
|
-
if (items.length <= 1) return;
|
|
37
|
-
const timer = setInterval(next, autoPlayInterval);
|
|
38
|
-
return () => clearInterval(timer);
|
|
39
|
-
});
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
<div
|
|
43
|
-
class="relative flex flex-col justify-between overflow-hidden h-screen p-8 bg-gradient-left text-white"
|
|
44
|
-
>
|
|
45
|
-
<div class="flex items-center gap-2">
|
|
46
|
-
<div class="font-bold text-xl tracking-wider flex items-center gap-2">
|
|
47
|
-
{#if typeof title === "function"}
|
|
48
|
-
{@render title()}
|
|
49
|
-
{:else}
|
|
50
|
-
{title || $t("label.welcome")}
|
|
51
|
-
{/if}
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
|
|
55
|
-
<section class="flex flex-col gap-5">
|
|
56
|
-
<div class="my-auto max-w-sm md:max-w-md lg:max-w-100">
|
|
57
|
-
{#if currentItem}
|
|
58
|
-
{#key currentIndex}
|
|
59
|
-
<div
|
|
60
|
-
class="text-xl md:text-2xl font-bold tracking-tight mb-4 leading-tight animate-in fade-in duration-300"
|
|
61
|
-
>
|
|
62
|
-
{currentItem.title}
|
|
63
|
-
</div>
|
|
64
|
-
<p
|
|
65
|
-
class=" text-sm mb-6 leading-relaxed animate-in fade-in duration-300"
|
|
66
|
-
>
|
|
67
|
-
{currentItem.description}
|
|
68
|
-
</p>
|
|
69
|
-
{/key}
|
|
70
|
-
<Button
|
|
71
|
-
variant="outline"
|
|
72
|
-
class="inline-flex items-center gap-2 text-sm font-semibold bg-primary"
|
|
73
|
-
>
|
|
74
|
-
{currentItem.buttonText}
|
|
75
|
-
<HugeiconsIcon icon={ArrowRight01Icon} size={16} />
|
|
76
|
-
</Button>
|
|
77
|
-
{/if}
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
<div class="flex items-center gap-2 mb-2">
|
|
81
|
-
{#each items as it, i (it.title)}
|
|
82
|
-
<button
|
|
83
|
-
type="button"
|
|
84
|
-
onclick={() => goTo(i)}
|
|
85
|
-
aria-label={`Ir para o item ${i + 1}`}
|
|
86
|
-
aria-current={currentIndex === i}
|
|
87
|
-
class="transition-all duration-300 focus:outline-none flex items-center justify-center {currentIndex ===
|
|
88
|
-
i
|
|
89
|
-
? 'opacity-100 scale-110'
|
|
90
|
-
: 'opacity-50 hover:opacity-75'}"
|
|
91
|
-
>
|
|
92
|
-
{#if variant === "NUMBER"}
|
|
93
|
-
<span
|
|
94
|
-
class="w-6 h-6 text-xs font-semibold rounded-full text-primary flex items-center justify-center"
|
|
95
|
-
>
|
|
96
|
-
{i + 1}
|
|
97
|
-
</span>
|
|
98
|
-
{:else}
|
|
99
|
-
<span class="w-2 h-2 rounded-full bg-white"></span>
|
|
100
|
-
{/if}
|
|
101
|
-
</button>
|
|
102
|
-
{/each}
|
|
103
|
-
</div>
|
|
104
|
-
</section>
|
|
105
|
-
|
|
106
|
-
<aside
|
|
107
|
-
class="hidden z-50 lg:block lg:absolute lg:right-0 lg:-bottom-3 lg:w-105 lg:h-105"
|
|
108
|
-
>
|
|
109
|
-
<img
|
|
110
|
-
src={Logo}
|
|
111
|
-
alt=""
|
|
112
|
-
class="shadow rounded-tl-lg rounded-bl-lg lg:w-105 lg:h-105"
|
|
113
|
-
/>
|
|
114
|
-
</aside>
|
|
115
|
-
</div>
|
|
116
|
-
|
|
117
|
-
<aside class="absolute grid-pattern p-0 top-0 h-screen w-8/12"></aside>
|
|
5
|
+
import type { Snippet } from "svelte";
|
|
6
|
+
import Button from "../../ui/button/button.svelte";
|
|
7
|
+
import { t } from "../../../i18n";
|
|
8
|
+
import Logo from "../../../assets/login-01-admin.webp";
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
title?: string | Snippet;
|
|
12
|
+
variant?: "NUMBER" | "DOT";
|
|
13
|
+
autoPlayInterval?: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
title,
|
|
18
|
+
items = [],
|
|
19
|
+
variant = "DOT",
|
|
20
|
+
autoPlayInterval = 5000,
|
|
21
|
+
}: Props & LoginCarouselProps = $props();
|
|
22
|
+
|
|
23
|
+
let currentIndex = $state(0);
|
|
24
|
+
let currentItem = $derived(items[currentIndex] ?? items[0]);
|
|
25
|
+
|
|
26
|
+
function goTo(index: number) {
|
|
27
|
+
currentIndex = index;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function next() {
|
|
31
|
+
if (items.length === 0) return;
|
|
32
|
+
currentIndex = (currentIndex + 1) % items.length;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
$effect(() => {
|
|
36
|
+
if (items.length <= 1) return;
|
|
37
|
+
const timer = setInterval(next, autoPlayInterval);
|
|
38
|
+
return () => clearInterval(timer);
|
|
39
|
+
});
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<div
|
|
43
|
+
class="relative flex flex-col justify-between overflow-hidden h-screen p-8 bg-gradient-left text-white"
|
|
44
|
+
>
|
|
45
|
+
<div class="flex items-center gap-2">
|
|
46
|
+
<div class="font-bold text-xl tracking-wider flex items-center gap-2">
|
|
47
|
+
{#if typeof title === "function"}
|
|
48
|
+
{@render title()}
|
|
49
|
+
{:else}
|
|
50
|
+
{title || $t("label.welcome")}
|
|
51
|
+
{/if}
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<section class="flex flex-col gap-5">
|
|
56
|
+
<div class="my-auto max-w-sm md:max-w-md lg:max-w-100">
|
|
57
|
+
{#if currentItem}
|
|
58
|
+
{#key currentIndex}
|
|
59
|
+
<div
|
|
60
|
+
class="text-xl md:text-2xl font-bold tracking-tight mb-4 leading-tight animate-in fade-in duration-300"
|
|
61
|
+
>
|
|
62
|
+
{currentItem.title}
|
|
63
|
+
</div>
|
|
64
|
+
<p
|
|
65
|
+
class=" text-sm mb-6 leading-relaxed animate-in fade-in duration-300"
|
|
66
|
+
>
|
|
67
|
+
{currentItem.description}
|
|
68
|
+
</p>
|
|
69
|
+
{/key}
|
|
70
|
+
<Button
|
|
71
|
+
variant="outline"
|
|
72
|
+
class="inline-flex items-center gap-2 text-sm font-semibold bg-primary"
|
|
73
|
+
>
|
|
74
|
+
{currentItem.buttonText}
|
|
75
|
+
<HugeiconsIcon icon={ArrowRight01Icon} size={16} />
|
|
76
|
+
</Button>
|
|
77
|
+
{/if}
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<div class="flex items-center gap-2 mb-2">
|
|
81
|
+
{#each items as it, i (it.title)}
|
|
82
|
+
<button
|
|
83
|
+
type="button"
|
|
84
|
+
onclick={() => goTo(i)}
|
|
85
|
+
aria-label={`Ir para o item ${i + 1}`}
|
|
86
|
+
aria-current={currentIndex === i}
|
|
87
|
+
class="transition-all duration-300 focus:outline-none flex items-center justify-center {currentIndex ===
|
|
88
|
+
i
|
|
89
|
+
? 'opacity-100 scale-110'
|
|
90
|
+
: 'opacity-50 hover:opacity-75'}"
|
|
91
|
+
>
|
|
92
|
+
{#if variant === "NUMBER"}
|
|
93
|
+
<span
|
|
94
|
+
class="w-6 h-6 text-xs font-semibold rounded-full text-primary flex items-center justify-center"
|
|
95
|
+
>
|
|
96
|
+
{i + 1}
|
|
97
|
+
</span>
|
|
98
|
+
{:else}
|
|
99
|
+
<span class="w-2 h-2 rounded-full bg-white"></span>
|
|
100
|
+
{/if}
|
|
101
|
+
</button>
|
|
102
|
+
{/each}
|
|
103
|
+
</div>
|
|
104
|
+
</section>
|
|
105
|
+
|
|
106
|
+
<aside
|
|
107
|
+
class="hidden z-50 lg:block lg:absolute lg:right-0 lg:-bottom-3 lg:w-105 lg:h-105"
|
|
108
|
+
>
|
|
109
|
+
<img
|
|
110
|
+
src={Logo}
|
|
111
|
+
alt=""
|
|
112
|
+
class="shadow rounded-tl-lg rounded-bl-lg lg:w-105 lg:h-105"
|
|
113
|
+
/>
|
|
114
|
+
</aside>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<aside class="absolute grid-pattern p-0 top-0 h-screen w-8/12"></aside>
|
|
@@ -1,32 +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}
|
|
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}
|
|
@@ -1,66 +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>
|
|
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>
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as Sidebar from "../../ui/sidebar/index.js";
|
|
3
|
-
import type { ComponentProps } from "svelte";
|
|
4
|
-
|
|
5
|
-
import type { NavUserSidebarProps } from "../nav/data/nav-user-sidebar";
|
|
6
|
-
import type {
|
|
7
|
-
NavMenuItem,
|
|
8
|
-
NavMenuSidebarProps,
|
|
9
|
-
} from "../nav/data/nav-menu-sidebar";
|
|
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";
|
|
14
|
-
import NavUserSidebar from "../nav/ui/nav-user-sidebar.svelte";
|
|
15
|
-
import { t } from "../../../i18n";
|
|
16
|
-
|
|
17
|
-
/**
|
|
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
|
-
* @property {Snippet} footer - Snippet customizado do footer
|
|
23
|
-
* @property {Snippet} header - Snippet customizado do header
|
|
24
|
-
*/
|
|
25
|
-
type Props = {
|
|
26
|
-
menusButtons?: NavMenuSidebarProps[];
|
|
27
|
-
menus: NavMenuItem[];
|
|
28
|
-
user: NavUserSidebarProps;
|
|
29
|
-
footer?: Snippet;
|
|
30
|
-
header?: Snippet;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
let {
|
|
34
|
-
ref = $bindable(null),
|
|
35
|
-
collapsible = "icon",
|
|
36
|
-
menusButtons,
|
|
37
|
-
menus,
|
|
38
|
-
user,
|
|
39
|
-
footer,
|
|
40
|
-
header,
|
|
41
|
-
...restProps
|
|
42
|
-
}: ComponentProps<typeof Sidebar.Root> & Props = $props();
|
|
43
|
-
</script>
|
|
44
|
-
|
|
45
|
-
<Sidebar.Root bind:ref {collapsible} {...restProps}>
|
|
46
|
-
<Sidebar.Header>
|
|
47
|
-
{#if header}
|
|
48
|
-
{@render header?.()}
|
|
49
|
-
{:else}
|
|
50
|
-
<NavMenuTopBarSidebar
|
|
51
|
-
content={{
|
|
52
|
-
title: $t("label.panel"),
|
|
53
|
-
subtitle: $t("label.administrative"),
|
|
54
|
-
}}
|
|
55
|
-
/>
|
|
56
|
-
{/if}
|
|
57
|
-
</Sidebar.Header>
|
|
58
|
-
<Sidebar.Content>
|
|
59
|
-
<NavMenuBarSidebar items={menus} />
|
|
60
|
-
</Sidebar.Content>
|
|
61
|
-
<Sidebar.Footer>
|
|
62
|
-
{#if footer}
|
|
63
|
-
{@render footer?.()}
|
|
64
|
-
{:else if menusButtons && menusButtons.length > 0}
|
|
65
|
-
<NavMenuBottomSidebar items={menusButtons} class="mt-auto" />
|
|
66
|
-
{/if}
|
|
67
|
-
<NavUserSidebar {user} />
|
|
68
|
-
</Sidebar.Footer>
|
|
69
|
-
<Sidebar.Rail />
|
|
70
|
-
</Sidebar.Root>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import * as Sidebar from "../../ui/sidebar/index.js";
|
|
3
|
+
import type { ComponentProps } from "svelte";
|
|
4
|
+
|
|
5
|
+
import type { NavUserSidebarProps } from "../nav/data/nav-user-sidebar";
|
|
6
|
+
import type {
|
|
7
|
+
NavMenuItem,
|
|
8
|
+
NavMenuSidebarProps,
|
|
9
|
+
} from "../nav/data/nav-menu-sidebar";
|
|
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";
|
|
14
|
+
import NavUserSidebar from "../nav/ui/nav-user-sidebar.svelte";
|
|
15
|
+
import { t } from "../../../i18n";
|
|
16
|
+
|
|
17
|
+
/**
|
|
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
|
+
* @property {Snippet} footer - Snippet customizado do footer
|
|
23
|
+
* @property {Snippet} header - Snippet customizado do header
|
|
24
|
+
*/
|
|
25
|
+
type Props = {
|
|
26
|
+
menusButtons?: NavMenuSidebarProps[];
|
|
27
|
+
menus: NavMenuItem[];
|
|
28
|
+
user: NavUserSidebarProps;
|
|
29
|
+
footer?: Snippet;
|
|
30
|
+
header?: Snippet;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
let {
|
|
34
|
+
ref = $bindable(null),
|
|
35
|
+
collapsible = "icon",
|
|
36
|
+
menusButtons,
|
|
37
|
+
menus,
|
|
38
|
+
user,
|
|
39
|
+
footer,
|
|
40
|
+
header,
|
|
41
|
+
...restProps
|
|
42
|
+
}: ComponentProps<typeof Sidebar.Root> & Props = $props();
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<Sidebar.Root bind:ref {collapsible} {...restProps}>
|
|
46
|
+
<Sidebar.Header>
|
|
47
|
+
{#if header}
|
|
48
|
+
{@render header?.()}
|
|
49
|
+
{:else}
|
|
50
|
+
<NavMenuTopBarSidebar
|
|
51
|
+
content={{
|
|
52
|
+
title: $t("label.panel"),
|
|
53
|
+
subtitle: $t("label.administrative"),
|
|
54
|
+
}}
|
|
55
|
+
/>
|
|
56
|
+
{/if}
|
|
57
|
+
</Sidebar.Header>
|
|
58
|
+
<Sidebar.Content>
|
|
59
|
+
<NavMenuBarSidebar items={menus} />
|
|
60
|
+
</Sidebar.Content>
|
|
61
|
+
<Sidebar.Footer>
|
|
62
|
+
{#if footer}
|
|
63
|
+
{@render footer?.()}
|
|
64
|
+
{:else if menusButtons && menusButtons.length > 0}
|
|
65
|
+
<NavMenuBottomSidebar items={menusButtons} class="mt-auto" />
|
|
66
|
+
{/if}
|
|
67
|
+
<NavUserSidebar {user} />
|
|
68
|
+
</Sidebar.Footer>
|
|
69
|
+
<Sidebar.Rail />
|
|
70
|
+
</Sidebar.Root>
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as UnderlineTabs from "../../../ui/underline-tabs";
|
|
3
|
-
import type { TabProps } from "../data/TabModel";
|
|
4
|
-
|
|
5
|
-
type Props = {
|
|
6
|
-
items?: TabProps[];
|
|
7
|
-
className?: string;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
let { items = [], className }: Props = $props();
|
|
11
|
-
|
|
12
|
-
let activeValue = $state<string>("");
|
|
13
|
-
|
|
14
|
-
let currentActiveValue = $derived(
|
|
15
|
-
activeValue || (items.length > 0 ? items[0].item.value : ""),
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
let selected = $derived(
|
|
19
|
-
items.find((it) => it.item.value === currentActiveValue) || items[0],
|
|
20
|
-
);
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
{#if items && items.length > 0 && selected}
|
|
24
|
-
<UnderlineTabs.Root
|
|
25
|
-
value={currentActiveValue}
|
|
26
|
-
onValueChange={(val) => (activeValue = val)}
|
|
27
|
-
class="mb-5 {className}"
|
|
28
|
-
>
|
|
29
|
-
<UnderlineTabs.List>
|
|
30
|
-
{#each items as it (it.item.value)}
|
|
31
|
-
<UnderlineTabs.Trigger
|
|
32
|
-
value={it.item.value}
|
|
33
|
-
class="text-lg md:text-base"
|
|
34
|
-
>
|
|
35
|
-
{it.item.label}
|
|
36
|
-
</UnderlineTabs.Trigger>
|
|
37
|
-
{/each}
|
|
38
|
-
</UnderlineTabs.List>
|
|
39
|
-
</UnderlineTabs.Root>
|
|
40
|
-
{#if selected.children}
|
|
41
|
-
{@render selected.children()}
|
|
42
|
-
{/if}
|
|
43
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import * as UnderlineTabs from "../../../ui/underline-tabs";
|
|
3
|
+
import type { TabProps } from "../data/TabModel";
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
items?: TabProps[];
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
let { items = [], className }: Props = $props();
|
|
11
|
+
|
|
12
|
+
let activeValue = $state<string>("");
|
|
13
|
+
|
|
14
|
+
let currentActiveValue = $derived(
|
|
15
|
+
activeValue || (items.length > 0 ? items[0].item.value : ""),
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
let selected = $derived(
|
|
19
|
+
items.find((it) => it.item.value === currentActiveValue) || items[0],
|
|
20
|
+
);
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
{#if items && items.length > 0 && selected}
|
|
24
|
+
<UnderlineTabs.Root
|
|
25
|
+
value={currentActiveValue}
|
|
26
|
+
onValueChange={(val) => (activeValue = val)}
|
|
27
|
+
class="mb-5 {className}"
|
|
28
|
+
>
|
|
29
|
+
<UnderlineTabs.List>
|
|
30
|
+
{#each items as it (it.item.value)}
|
|
31
|
+
<UnderlineTabs.Trigger
|
|
32
|
+
value={it.item.value}
|
|
33
|
+
class="text-lg md:text-base"
|
|
34
|
+
>
|
|
35
|
+
{it.item.label}
|
|
36
|
+
</UnderlineTabs.Trigger>
|
|
37
|
+
{/each}
|
|
38
|
+
</UnderlineTabs.List>
|
|
39
|
+
</UnderlineTabs.Root>
|
|
40
|
+
{#if selected.children}
|
|
41
|
+
{@render selected.children()}
|
|
42
|
+
{/if}
|
|
43
|
+
{/if}
|