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,63 +1,65 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import CardHighlight from "../../../card/highlight/CardHighlight.svelte";
|
|
3
|
-
import CarouselHeader from "../../shared/ui/CarouselHeader.svelte";
|
|
4
|
-
import CarouselSlot from "../../../panel/CarouselSlot.svelte";
|
|
5
|
-
import * as Carousel from "../../../../ui/carousel/index.js";
|
|
6
|
-
import type { CarouselHighlightsProps } from "../types";
|
|
7
|
-
import { useDevice } from "../../../../../hooks/responsive.svelte";
|
|
8
|
-
import Autoplay from "embla-carousel-autoplay";
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
title,
|
|
12
|
-
items,
|
|
13
|
-
description,
|
|
14
|
-
titleClass,
|
|
15
|
-
descriptionClass,
|
|
16
|
-
isButtonPreviousAndNext = true,
|
|
17
|
-
buttonPreviousAndNextClass = "",
|
|
18
|
-
containerClass = "",
|
|
19
|
-
isLoading = false,
|
|
20
|
-
varient = 1,
|
|
21
|
-
isDescriptionIcon,
|
|
22
|
-
isDescriptionLabel,
|
|
23
|
-
onButtonViewAll,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
{
|
|
33
|
-
{
|
|
34
|
-
{
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
{
|
|
40
|
-
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
{
|
|
57
|
-
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import CardHighlight from "../../../card/highlight/CardHighlight.svelte";
|
|
3
|
+
import CarouselHeader from "../../shared/ui/CarouselHeader.svelte";
|
|
4
|
+
import CarouselSlot from "../../../panel/CarouselSlot.svelte";
|
|
5
|
+
import * as Carousel from "../../../../ui/carousel/index.js";
|
|
6
|
+
import type { CarouselHighlightsProps } from "../types";
|
|
7
|
+
import { useDevice } from "../../../../../hooks/responsive.svelte";
|
|
8
|
+
import Autoplay from "embla-carousel-autoplay";
|
|
9
|
+
|
|
10
|
+
const {
|
|
11
|
+
title,
|
|
12
|
+
items,
|
|
13
|
+
description,
|
|
14
|
+
titleClass,
|
|
15
|
+
descriptionClass,
|
|
16
|
+
isButtonPreviousAndNext = true,
|
|
17
|
+
buttonPreviousAndNextClass = "",
|
|
18
|
+
containerClass = "",
|
|
19
|
+
isLoading = false,
|
|
20
|
+
varient = 1,
|
|
21
|
+
isDescriptionIcon,
|
|
22
|
+
isDescriptionLabel,
|
|
23
|
+
onButtonViewAll,
|
|
24
|
+
positionButtonPreviousAndNext,
|
|
25
|
+
}: CarouselHighlightsProps = $props();
|
|
26
|
+
|
|
27
|
+
const responsive = useDevice();
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<CarouselHeader
|
|
31
|
+
{title}
|
|
32
|
+
{description}
|
|
33
|
+
{titleClass}
|
|
34
|
+
{descriptionClass}
|
|
35
|
+
{containerClass}
|
|
36
|
+
{onButtonViewAll}
|
|
37
|
+
>
|
|
38
|
+
<CarouselSlot
|
|
39
|
+
isBorderBottom={false}
|
|
40
|
+
{isButtonPreviousAndNext}
|
|
41
|
+
{buttonPreviousAndNextClass}
|
|
42
|
+
{positionButtonPreviousAndNext}
|
|
43
|
+
containerClass="w-full"
|
|
44
|
+
plugins={[Autoplay({ delay: 4000, stopOnInteraction: true })]}
|
|
45
|
+
>
|
|
46
|
+
{#if isLoading}
|
|
47
|
+
{#each Array.from( { length: responsive.isMobile ? 5 : 10 }, ) as _, i (`loading-${i}`)}
|
|
48
|
+
<Carousel.Item class="pl-2 basis-auto">
|
|
49
|
+
<CardHighlight id={i} {isLoading} {varient} />
|
|
50
|
+
</Carousel.Item>
|
|
51
|
+
{/each}
|
|
52
|
+
{:else}
|
|
53
|
+
{#each items as item, i (`highlight-${item.id ?? i}`)}
|
|
54
|
+
<Carousel.Item class="pl-2 basis-auto">
|
|
55
|
+
<CardHighlight
|
|
56
|
+
{...item}
|
|
57
|
+
{varient}
|
|
58
|
+
{isDescriptionIcon}
|
|
59
|
+
{isDescriptionLabel}
|
|
60
|
+
/>
|
|
61
|
+
</Carousel.Item>
|
|
62
|
+
{/each}
|
|
63
|
+
{/if}
|
|
64
|
+
</CarouselSlot>
|
|
65
|
+
</CarouselHeader>
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import CardPromotion from "../../../card/promotion/CardPromotion.svelte";
|
|
3
|
-
import CarouselSlot from "../../../panel/CarouselSlot.svelte";
|
|
4
|
-
import * as Carousel from "../../../../ui/carousel/index.js";
|
|
5
|
-
import type { CarouselPromotionProps } from "../types";
|
|
6
|
-
import CarouselHeader from "../../shared/ui/CarouselHeader.svelte";
|
|
7
|
-
import { useDevice } from "../../../../../hooks/responsive.svelte";
|
|
8
|
-
import Autoplay from "embla-carousel-autoplay";
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
title,
|
|
12
|
-
items,
|
|
13
|
-
description,
|
|
14
|
-
titleClass,
|
|
15
|
-
descriptionClass,
|
|
16
|
-
isButtonPreviousAndNext = true,
|
|
17
|
-
isLoading = false,
|
|
18
|
-
buttonPreviousAndNextClass = "",
|
|
19
|
-
containerClass = "",
|
|
20
|
-
positionButtonPreviousAndNext,
|
|
21
|
-
isDescriptionIcon,
|
|
22
|
-
isDescriptionLabel,
|
|
23
|
-
onButtonViewAll,
|
|
24
|
-
}: CarouselPromotionProps = $props();
|
|
25
|
-
|
|
26
|
-
const responsive = useDevice();
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
<CarouselHeader
|
|
30
|
-
{title}
|
|
31
|
-
{description}
|
|
32
|
-
{titleClass}
|
|
33
|
-
{descriptionClass}
|
|
34
|
-
{containerClass}
|
|
35
|
-
{onButtonViewAll}
|
|
36
|
-
>
|
|
37
|
-
<CarouselSlot
|
|
38
|
-
isBorderBottom={false}
|
|
39
|
-
{isButtonPreviousAndNext}
|
|
40
|
-
{buttonPreviousAndNextClass}
|
|
41
|
-
{positionButtonPreviousAndNext}
|
|
42
|
-
containerClass="w-full"
|
|
43
|
-
plugins={[Autoplay({ delay: 4000, stopOnInteraction: true })]}
|
|
44
|
-
>
|
|
45
|
-
{#if isLoading}
|
|
46
|
-
{#each Array.from( { length: responsive.isMobile ? 5 : 10 }, ) as _, i (`loading-${i}`)}
|
|
47
|
-
<Carousel.Item class="pl-2
|
|
48
|
-
<CardPromotion
|
|
49
|
-
id={i}
|
|
50
|
-
{isLoading}
|
|
51
|
-
{isDescriptionIcon}
|
|
52
|
-
{isDescriptionLabel}
|
|
53
|
-
/>
|
|
54
|
-
</Carousel.Item>
|
|
55
|
-
{/each}
|
|
56
|
-
{:else}
|
|
57
|
-
{#each items as item (item.id)}
|
|
58
|
-
<Carousel.Item class="pl-2
|
|
59
|
-
<CardPromotion {...item} {isDescriptionIcon} {isDescriptionLabel} />
|
|
60
|
-
</Carousel.Item>
|
|
61
|
-
{/each}
|
|
62
|
-
{/if}
|
|
63
|
-
</CarouselSlot>
|
|
64
|
-
</CarouselHeader>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import CardPromotion from "../../../card/promotion/CardPromotion.svelte";
|
|
3
|
+
import CarouselSlot from "../../../panel/CarouselSlot.svelte";
|
|
4
|
+
import * as Carousel from "../../../../ui/carousel/index.js";
|
|
5
|
+
import type { CarouselPromotionProps } from "../types";
|
|
6
|
+
import CarouselHeader from "../../shared/ui/CarouselHeader.svelte";
|
|
7
|
+
import { useDevice } from "../../../../../hooks/responsive.svelte";
|
|
8
|
+
import Autoplay from "embla-carousel-autoplay";
|
|
9
|
+
|
|
10
|
+
const {
|
|
11
|
+
title,
|
|
12
|
+
items,
|
|
13
|
+
description,
|
|
14
|
+
titleClass,
|
|
15
|
+
descriptionClass,
|
|
16
|
+
isButtonPreviousAndNext = true,
|
|
17
|
+
isLoading = false,
|
|
18
|
+
buttonPreviousAndNextClass = "",
|
|
19
|
+
containerClass = "",
|
|
20
|
+
positionButtonPreviousAndNext,
|
|
21
|
+
isDescriptionIcon,
|
|
22
|
+
isDescriptionLabel,
|
|
23
|
+
onButtonViewAll,
|
|
24
|
+
}: CarouselPromotionProps = $props();
|
|
25
|
+
|
|
26
|
+
const responsive = useDevice();
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<CarouselHeader
|
|
30
|
+
{title}
|
|
31
|
+
{description}
|
|
32
|
+
{titleClass}
|
|
33
|
+
{descriptionClass}
|
|
34
|
+
{containerClass}
|
|
35
|
+
{onButtonViewAll}
|
|
36
|
+
>
|
|
37
|
+
<CarouselSlot
|
|
38
|
+
isBorderBottom={false}
|
|
39
|
+
{isButtonPreviousAndNext}
|
|
40
|
+
{buttonPreviousAndNextClass}
|
|
41
|
+
{positionButtonPreviousAndNext}
|
|
42
|
+
containerClass="w-full"
|
|
43
|
+
plugins={[Autoplay({ delay: 4000, stopOnInteraction: true })]}
|
|
44
|
+
>
|
|
45
|
+
{#if isLoading}
|
|
46
|
+
{#each Array.from( { length: responsive.isMobile ? 5 : 10 }, ) as _, i (`loading-${i}`)}
|
|
47
|
+
<Carousel.Item class="pl-2 w-75 basis-auto">
|
|
48
|
+
<CardPromotion
|
|
49
|
+
id={i}
|
|
50
|
+
{isLoading}
|
|
51
|
+
{isDescriptionIcon}
|
|
52
|
+
{isDescriptionLabel}
|
|
53
|
+
/>
|
|
54
|
+
</Carousel.Item>
|
|
55
|
+
{/each}
|
|
56
|
+
{:else}
|
|
57
|
+
{#each items as item, i (`promotion-${item.id ?? i}`)}
|
|
58
|
+
<Carousel.Item class="pl-2 w-75 basis-auto">
|
|
59
|
+
<CardPromotion {...item} {isDescriptionIcon} {isDescriptionLabel} />
|
|
60
|
+
</Carousel.Item>
|
|
61
|
+
{/each}
|
|
62
|
+
{/if}
|
|
63
|
+
</CarouselSlot>
|
|
64
|
+
</CarouselHeader>
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Button from "../../../../ui/button/button.svelte";
|
|
3
|
-
import { t } from "../../../../../i18n";
|
|
4
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
5
|
-
import { ArrowRight02Icon } from "@hugeicons/core-free-icons";
|
|
6
|
-
import type { CarouselHeaderProps } from "../../types";
|
|
7
|
-
import type { Snippet } from "svelte";
|
|
8
|
-
|
|
9
|
-
type Props = {
|
|
10
|
-
children: Snippet;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const {
|
|
14
|
-
title,
|
|
15
|
-
description,
|
|
16
|
-
titleClass,
|
|
17
|
-
descriptionClass,
|
|
18
|
-
containerClass = "",
|
|
19
|
-
onButtonViewAll,
|
|
20
|
-
children,
|
|
21
|
-
}: CarouselHeaderProps & Props = $props();
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<div class="w-full flex justify-center">
|
|
25
|
-
<div class="w-[95%] p-2 rounded-xl border {containerClass}">
|
|
26
|
-
<div class="flex flex-col gap-1">
|
|
27
|
-
<div class="flex justify-between">
|
|
28
|
-
<div>
|
|
29
|
-
{#if title}
|
|
30
|
-
<h1 class={`text-xl ${titleClass}`}>{title}</h1>
|
|
31
|
-
{/if}
|
|
32
|
-
{#if description}
|
|
33
|
-
<div class={`mt-3 ${descriptionClass}`}>
|
|
34
|
-
{description}
|
|
35
|
-
</div>
|
|
36
|
-
{/if}
|
|
37
|
-
</div>
|
|
38
|
-
{#if onButtonViewAll}
|
|
39
|
-
<div>
|
|
40
|
-
<Button
|
|
41
|
-
variant="ghost"
|
|
42
|
-
size="sm"
|
|
43
|
-
class="flex items-center gap-0.5"
|
|
44
|
-
onclick={onButtonViewAll}
|
|
45
|
-
>
|
|
46
|
-
{$t("label.view.full")}
|
|
47
|
-
<HugeiconsIcon icon={ArrowRight02Icon} />
|
|
48
|
-
</Button>
|
|
49
|
-
</div>
|
|
50
|
-
{/if}
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
<div>{@render children()}</div>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Button from "../../../../ui/button/button.svelte";
|
|
3
|
+
import { t } from "../../../../../i18n";
|
|
4
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
5
|
+
import { ArrowRight02Icon } from "@hugeicons/core-free-icons";
|
|
6
|
+
import type { CarouselHeaderProps } from "../../types";
|
|
7
|
+
import type { Snippet } from "svelte";
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
children: Snippet;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
title,
|
|
15
|
+
description,
|
|
16
|
+
titleClass,
|
|
17
|
+
descriptionClass,
|
|
18
|
+
containerClass = "",
|
|
19
|
+
onButtonViewAll,
|
|
20
|
+
children,
|
|
21
|
+
}: CarouselHeaderProps & Props = $props();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<div class="w-full flex justify-center">
|
|
25
|
+
<div class="w-[95%] p-2 rounded-xl border {containerClass}">
|
|
26
|
+
<div class="flex flex-col gap-1">
|
|
27
|
+
<div class="flex justify-between">
|
|
28
|
+
<div>
|
|
29
|
+
{#if title}
|
|
30
|
+
<h1 class={`text-xl ${titleClass}`}>{title}</h1>
|
|
31
|
+
{/if}
|
|
32
|
+
{#if description}
|
|
33
|
+
<div class={`mt-3 ${descriptionClass}`}>
|
|
34
|
+
{description}
|
|
35
|
+
</div>
|
|
36
|
+
{/if}
|
|
37
|
+
</div>
|
|
38
|
+
{#if onButtonViewAll}
|
|
39
|
+
<div>
|
|
40
|
+
<Button
|
|
41
|
+
variant="ghost"
|
|
42
|
+
size="sm"
|
|
43
|
+
class="flex items-center gap-0.5"
|
|
44
|
+
onclick={onButtonViewAll}
|
|
45
|
+
>
|
|
46
|
+
{$t("label.view.full")}
|
|
47
|
+
<HugeiconsIcon icon={ArrowRight02Icon} />
|
|
48
|
+
</Button>
|
|
49
|
+
</div>
|
|
50
|
+
{/if}
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div>{@render children()}</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
<script lang="ts" generics="T">
|
|
2
|
-
import type { CellContext } from "@tanstack/table-core";
|
|
3
|
-
import * as DropdownMenu from "../../../ui/dropdown-menu/index.js";
|
|
4
|
-
import Button from "../../../ui/button/button.svelte";
|
|
5
|
-
import { MoreHorizontalIcon } from "@hugeicons/core-free-icons";
|
|
6
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
7
|
-
|
|
8
|
-
let { row }: CellContext<T, unknown> = $props();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<DropdownMenu.Root>
|
|
12
|
-
<DropdownMenu.Trigger>
|
|
13
|
-
{#snippet child({ props })}
|
|
14
|
-
<Button {...props} variant="ghost" class="size-8 p-0">
|
|
15
|
-
<HugeiconsIcon icon={MoreHorizontalIcon} class="size-4" />
|
|
16
|
-
<span class="sr-only">Open menu</span>
|
|
17
|
-
</Button>
|
|
18
|
-
{/snippet}
|
|
19
|
-
</DropdownMenu.Trigger>
|
|
20
|
-
<DropdownMenu.Content align="end">
|
|
21
|
-
<DropdownMenu.Item onclick={() => console.log(row.original)}
|
|
22
|
-
>Copy</DropdownMenu.Item
|
|
23
|
-
>
|
|
24
|
-
<DropdownMenu.Item onclick={() => console.log(row.original)}
|
|
25
|
-
>Delete</DropdownMenu.Item
|
|
26
|
-
>
|
|
27
|
-
</DropdownMenu.Content>
|
|
28
|
-
</DropdownMenu.Root>
|
|
1
|
+
<script lang="ts" generics="T">
|
|
2
|
+
import type { CellContext } from "@tanstack/table-core";
|
|
3
|
+
import * as DropdownMenu from "../../../ui/dropdown-menu/index.js";
|
|
4
|
+
import Button from "../../../ui/button/button.svelte";
|
|
5
|
+
import { MoreHorizontalIcon } from "@hugeicons/core-free-icons";
|
|
6
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
7
|
+
|
|
8
|
+
let { row }: CellContext<T, unknown> = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<DropdownMenu.Root>
|
|
12
|
+
<DropdownMenu.Trigger>
|
|
13
|
+
{#snippet child({ props })}
|
|
14
|
+
<Button {...props} variant="ghost" class="size-8 p-0">
|
|
15
|
+
<HugeiconsIcon icon={MoreHorizontalIcon} class="size-4" />
|
|
16
|
+
<span class="sr-only">Open menu</span>
|
|
17
|
+
</Button>
|
|
18
|
+
{/snippet}
|
|
19
|
+
</DropdownMenu.Trigger>
|
|
20
|
+
<DropdownMenu.Content align="end">
|
|
21
|
+
<DropdownMenu.Item onclick={() => console.log(row.original)}
|
|
22
|
+
>Copy</DropdownMenu.Item
|
|
23
|
+
>
|
|
24
|
+
<DropdownMenu.Item onclick={() => console.log(row.original)}
|
|
25
|
+
>Delete</DropdownMenu.Item
|
|
26
|
+
>
|
|
27
|
+
</DropdownMenu.Content>
|
|
28
|
+
</DropdownMenu.Root>
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Checkbox } from "../../../ui/checkbox";
|
|
3
|
-
|
|
4
|
-
let {
|
|
5
|
-
checked = $bindable(false),
|
|
6
|
-
indeterminate = $bindable(false),
|
|
7
|
-
onCheckedChange,
|
|
8
|
-
...restProps
|
|
9
|
-
}: {
|
|
10
|
-
checked?: boolean;
|
|
11
|
-
indeterminate?: boolean;
|
|
12
|
-
onCheckedChange?: (value: boolean) => void;
|
|
13
|
-
[key: string]: unknown;
|
|
14
|
-
} = $props();
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<Checkbox
|
|
18
|
-
bind:checked
|
|
19
|
-
bind:indeterminate
|
|
20
|
-
onCheckedChange={(v) => onCheckedChange?.(!!v)}
|
|
21
|
-
{...restProps}
|
|
22
|
-
/>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Checkbox } from "../../../ui/checkbox";
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
checked = $bindable(false),
|
|
6
|
+
indeterminate = $bindable(false),
|
|
7
|
+
onCheckedChange,
|
|
8
|
+
...restProps
|
|
9
|
+
}: {
|
|
10
|
+
checked?: boolean;
|
|
11
|
+
indeterminate?: boolean;
|
|
12
|
+
onCheckedChange?: (value: boolean) => void;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
} = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<Checkbox
|
|
18
|
+
bind:checked
|
|
19
|
+
bind:indeterminate
|
|
20
|
+
onCheckedChange={(v) => onCheckedChange?.(!!v)}
|
|
21
|
+
{...restProps}
|
|
22
|
+
/>
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
<script lang="ts" generics="T">
|
|
2
|
-
import type {
|
|
3
|
-
ColumnDef,
|
|
4
|
-
Table as TanstackTable,
|
|
5
|
-
} from "@tanstack/table-core";
|
|
6
|
-
import * as Table from "../../../ui/table/index.js";
|
|
7
|
-
import FlexRender from "../../../ui/data-table/flex-render.svelte";
|
|
8
|
-
|
|
9
|
-
type Props = {
|
|
10
|
-
table: TanstackTable<T>;
|
|
11
|
-
columns: ColumnDef<T>[];
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
let { table, columns }: Props = $props();
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<div class="rounded-md border">
|
|
18
|
-
<Table.Root>
|
|
19
|
-
<Table.Header>
|
|
20
|
-
{#each table.getHeaderGroups() as headerGroup (headerGroup.id)}
|
|
21
|
-
<Table.Row>
|
|
22
|
-
{#each headerGroup.headers as header (header.id)}
|
|
23
|
-
<Table.Head class="[&:has([role=checkbox])]:ps-3">
|
|
24
|
-
{#if !header.isPlaceholder}
|
|
25
|
-
<FlexRender
|
|
26
|
-
content={header.column.columnDef.header}
|
|
27
|
-
context={header.getContext()}
|
|
28
|
-
/>
|
|
29
|
-
{/if}
|
|
30
|
-
</Table.Head>
|
|
31
|
-
{/each}
|
|
32
|
-
</Table.Row>
|
|
33
|
-
{/each}
|
|
34
|
-
</Table.Header>
|
|
35
|
-
<Table.Body>
|
|
36
|
-
{#each table.getRowModel().rows as row (row.id)}
|
|
37
|
-
<Table.Row data-state={row.getIsSelected() && "selected"}>
|
|
38
|
-
{#each row.getVisibleCells() as cell (cell.id)}
|
|
39
|
-
<Table.Cell class="[&:has([role=checkbox])]:ps-3">
|
|
40
|
-
<FlexRender
|
|
41
|
-
content={cell.column.columnDef.cell}
|
|
42
|
-
context={cell.getContext()}
|
|
43
|
-
/>
|
|
44
|
-
</Table.Cell>
|
|
45
|
-
{/each}
|
|
46
|
-
</Table.Row>
|
|
47
|
-
{:else}
|
|
48
|
-
<Table.Row>
|
|
49
|
-
<Table.Cell
|
|
50
|
-
colspan={columns.length}
|
|
51
|
-
class="h-24 text-center"
|
|
52
|
-
>
|
|
53
|
-
No results.
|
|
54
|
-
</Table.Cell>
|
|
55
|
-
</Table.Row>
|
|
56
|
-
{/each}
|
|
57
|
-
</Table.Body>
|
|
58
|
-
</Table.Root>
|
|
59
|
-
</div>
|
|
1
|
+
<script lang="ts" generics="T">
|
|
2
|
+
import type {
|
|
3
|
+
ColumnDef,
|
|
4
|
+
Table as TanstackTable,
|
|
5
|
+
} from "@tanstack/table-core";
|
|
6
|
+
import * as Table from "../../../ui/table/index.js";
|
|
7
|
+
import FlexRender from "../../../ui/data-table/flex-render.svelte";
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
table: TanstackTable<T>;
|
|
11
|
+
columns: ColumnDef<T>[];
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
let { table, columns }: Props = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div class="rounded-md border">
|
|
18
|
+
<Table.Root>
|
|
19
|
+
<Table.Header>
|
|
20
|
+
{#each table.getHeaderGroups() as headerGroup (headerGroup.id)}
|
|
21
|
+
<Table.Row>
|
|
22
|
+
{#each headerGroup.headers as header (header.id)}
|
|
23
|
+
<Table.Head class="[&:has([role=checkbox])]:ps-3">
|
|
24
|
+
{#if !header.isPlaceholder}
|
|
25
|
+
<FlexRender
|
|
26
|
+
content={header.column.columnDef.header}
|
|
27
|
+
context={header.getContext()}
|
|
28
|
+
/>
|
|
29
|
+
{/if}
|
|
30
|
+
</Table.Head>
|
|
31
|
+
{/each}
|
|
32
|
+
</Table.Row>
|
|
33
|
+
{/each}
|
|
34
|
+
</Table.Header>
|
|
35
|
+
<Table.Body>
|
|
36
|
+
{#each table.getRowModel().rows as row (row.id)}
|
|
37
|
+
<Table.Row data-state={row.getIsSelected() && "selected"}>
|
|
38
|
+
{#each row.getVisibleCells() as cell (cell.id)}
|
|
39
|
+
<Table.Cell class="[&:has([role=checkbox])]:ps-3">
|
|
40
|
+
<FlexRender
|
|
41
|
+
content={cell.column.columnDef.cell}
|
|
42
|
+
context={cell.getContext()}
|
|
43
|
+
/>
|
|
44
|
+
</Table.Cell>
|
|
45
|
+
{/each}
|
|
46
|
+
</Table.Row>
|
|
47
|
+
{:else}
|
|
48
|
+
<Table.Row>
|
|
49
|
+
<Table.Cell
|
|
50
|
+
colspan={columns.length}
|
|
51
|
+
class="h-24 text-center"
|
|
52
|
+
>
|
|
53
|
+
No results.
|
|
54
|
+
</Table.Cell>
|
|
55
|
+
</Table.Row>
|
|
56
|
+
{/each}
|
|
57
|
+
</Table.Body>
|
|
58
|
+
</Table.Root>
|
|
59
|
+
</div>
|