negodesign 0.0.24 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/core/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/CardHighlight.svelte +67 -44
- package/dist/components/core/card/media/01/CardMedia01.svelte +114 -114
- package/dist/components/core/card/media/02/CardMedia02.svelte +113 -113
- package/dist/components/core/card/media/CardMedia.svelte +17 -17
- package/dist/components/core/card/profile/01/CardProfile01.svelte +101 -101
- package/dist/components/core/card/profile/02/CardProfile02.svelte +97 -97
- package/dist/components/core/card/profile/CardProfile.svelte +17 -17
- package/dist/components/core/card/promotion/CardPromotion.svelte +102 -81
- package/dist/components/core/card/shared/CardButton.svelte +30 -30
- package/dist/components/core/card/shared/CardCart.svelte +36 -32
- package/dist/components/core/card/shared/CardCart.svelte.d.ts +1 -0
- package/dist/components/core/card/shared/CardDescription.svelte +23 -23
- package/dist/components/core/card/shared/CardFavorite.svelte +33 -29
- package/dist/components/core/card/shared/CardFavorite.svelte.d.ts +1 -0
- package/dist/components/core/card/shared/CardStarRating.svelte +20 -20
- package/dist/components/core/card/shared/CardTags.svelte +56 -56
- package/dist/components/core/card/shared/CardThumbnailVideo.svelte +169 -169
- package/dist/components/core/card/shared/TruncatableText.svelte +55 -55
- package/dist/components/core/card/types.d.ts +1 -0
- package/dist/components/core/carousel/{shared/ui/SimpleBadgeCarousel.svelte → badge/ui/CarouselBadge.svelte} +80 -80
- package/dist/components/core/carousel/badge/ui/CarouselBadge.svelte.d.ts +4 -0
- package/dist/components/core/carousel/hero/CarouselHero.svelte +158 -158
- package/dist/components/core/carousel/highlights/types.d.ts +9 -0
- package/dist/components/core/carousel/highlights/types.js +1 -0
- package/dist/components/core/carousel/highlights/ui/CarouselHighlights.svelte +41 -65
- package/dist/components/core/carousel/highlights/ui/CarouselHighlights.svelte.d.ts +1 -1
- package/dist/components/core/carousel/promotion/types.d.ts +9 -0
- package/dist/components/core/carousel/promotion/types.js +1 -0
- package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte +41 -65
- package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte.d.ts +1 -1
- package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte +50 -0
- package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte.d.ts +4 -0
- package/dist/components/core/carousel/types.d.ts +11 -26
- 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 +38 -38
- 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 +6 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/styles/globals.css +149 -149
- package/package.json +113 -113
- package/dist/components/core/carousel/shared/ui/SimpleBadgeCarousel.svelte.d.ts +0 -4
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { CardProfileProps } from "../types";
|
|
3
|
-
import CardProfile01 from "./01/CardProfile01.svelte";
|
|
4
|
-
import CardProfile02 from "./02/CardProfile02.svelte";
|
|
5
|
-
|
|
6
|
-
type Props = {
|
|
7
|
-
variant?: 1 | 2;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
let { variant, ...restProps }: CardProfileProps & Props = $props();
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
{#if variant === 2}
|
|
14
|
-
<CardProfile02 {...restProps} />
|
|
15
|
-
{:else}
|
|
16
|
-
<CardProfile01 {...restProps} />
|
|
17
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { CardProfileProps } from "../types";
|
|
3
|
+
import CardProfile01 from "./01/CardProfile01.svelte";
|
|
4
|
+
import CardProfile02 from "./02/CardProfile02.svelte";
|
|
5
|
+
|
|
6
|
+
type Props = {
|
|
7
|
+
variant?: 1 | 2;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
let { variant, ...restProps }: CardProfileProps & Props = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
{#if variant === 2}
|
|
14
|
+
<CardProfile02 {...restProps} />
|
|
15
|
+
{:else}
|
|
16
|
+
<CardProfile01 {...restProps} />
|
|
17
|
+
{/if}
|
|
@@ -1,81 +1,102 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Button from "../../../ui/button/button.svelte";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Button from "../../../ui/button/button.svelte";
|
|
3
|
+
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
4
|
+
import { t } from "../../../../i18n";
|
|
5
|
+
import CardCart from "../shared/CardCart.svelte";
|
|
6
|
+
import CardFavorite from "../shared/CardFavorite.svelte";
|
|
7
|
+
/**
|
|
8
|
+
* Card component with a title and content.
|
|
9
|
+
* @component
|
|
10
|
+
*/
|
|
11
|
+
import type { CardPromotionProps } from "../types";
|
|
12
|
+
|
|
13
|
+
let {
|
|
14
|
+
id,
|
|
15
|
+
logo,
|
|
16
|
+
imageUrl,
|
|
17
|
+
title,
|
|
18
|
+
isFavorite = false,
|
|
19
|
+
isCart = false,
|
|
20
|
+
isLoading = false,
|
|
21
|
+
newPrice,
|
|
22
|
+
oldPrice,
|
|
23
|
+
buttonBuyText,
|
|
24
|
+
onClickBuy,
|
|
25
|
+
onClickShop,
|
|
26
|
+
onClickFavorite,
|
|
27
|
+
}: CardPromotionProps = $props();
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<article class="relative rounded-sm bg-background">
|
|
31
|
+
<div class="relative w-full p-2">
|
|
32
|
+
{#if logo}
|
|
33
|
+
<div class="absolute top-1 left-1 z-2 hidden gap-1 p-2">
|
|
34
|
+
<img src={logo} width={30} height={30} alt={title} class="rounded-lg" />
|
|
35
|
+
</div>
|
|
36
|
+
{/if}
|
|
37
|
+
|
|
38
|
+
<div class="absolute top-1 right-1 z-2 flex items-center gap-1 p-2">
|
|
39
|
+
<CardFavorite
|
|
40
|
+
{id}
|
|
41
|
+
{isFavorite}
|
|
42
|
+
{isLoading}
|
|
43
|
+
onFavoriteClick={onClickFavorite}
|
|
44
|
+
/>
|
|
45
|
+
<CardCart {id} {isCart} {isLoading} onCartClick={onClickShop} />
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
{#if imageUrl}
|
|
49
|
+
{#if isLoading}
|
|
50
|
+
<Skeleton
|
|
51
|
+
class="rounded-lg md:h-37.5 md:w-37.5 lg:h-50 lg:w-50 object-cover object-center"
|
|
52
|
+
/>
|
|
53
|
+
{:else}
|
|
54
|
+
<img
|
|
55
|
+
src={imageUrl}
|
|
56
|
+
alt={imageUrl}
|
|
57
|
+
class="rounded-lg md:h-37.5 md:w-37.5 lg:h-50 lg:w-50 object-cover object-center"
|
|
58
|
+
/>
|
|
59
|
+
{/if}
|
|
60
|
+
{/if}
|
|
61
|
+
<div class="absolute inset-0 bg-black/5 rounded-sm h-full w-full"></div>
|
|
62
|
+
|
|
63
|
+
{#if newPrice || oldPrice}
|
|
64
|
+
<div class="absolute bottom-2 right-3 z-2 flex items-center gap-2 mb-1">
|
|
65
|
+
{#if oldPrice}
|
|
66
|
+
<div
|
|
67
|
+
class="text-[10px] md:text-sm line-through bg-red-500 text-white p-1 rounded-sm"
|
|
68
|
+
>
|
|
69
|
+
{oldPrice}
|
|
70
|
+
</div>
|
|
71
|
+
{/if}
|
|
72
|
+
{#if newPrice}
|
|
73
|
+
<div class="font-bold text-lg md:text-xl lg:text-2xl relative">
|
|
74
|
+
{newPrice}
|
|
75
|
+
</div>
|
|
76
|
+
{/if}
|
|
77
|
+
</div>
|
|
78
|
+
{/if}
|
|
79
|
+
</div>
|
|
80
|
+
<div
|
|
81
|
+
class="bottom-1 inset-x-0 flex flex-col items-center justify-center gap-0.5 m-auto max-w-11/12 p-1 rounded-md"
|
|
82
|
+
>
|
|
83
|
+
<div class="flex justify-between w-full items-center">
|
|
84
|
+
{#if title}
|
|
85
|
+
{#if isLoading}
|
|
86
|
+
<Skeleton class="h-4 w-30 rounded-lg" />
|
|
87
|
+
{:else}
|
|
88
|
+
<div class="font-semibold line-clamp-1 flex-nowrap">
|
|
89
|
+
{title}
|
|
90
|
+
</div>
|
|
91
|
+
{/if}
|
|
92
|
+
{/if}
|
|
93
|
+
</div>
|
|
94
|
+
{#if isLoading}
|
|
95
|
+
<Skeleton class="h-9 w-full rounded-md" />
|
|
96
|
+
{:else}
|
|
97
|
+
<Button onclick={() => onClickBuy!(id)} class="w-full">
|
|
98
|
+
{buttonBuyText || $t("label.buy")}
|
|
99
|
+
</Button>
|
|
100
|
+
{/if}
|
|
101
|
+
</div>
|
|
102
|
+
</article>
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Button } from "../../../ui/button/index.js";
|
|
3
|
-
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/svelte";
|
|
4
|
-
|
|
5
|
-
type CardButtonProps = {
|
|
6
|
-
id: string | number;
|
|
7
|
-
icon: IconSvgElement;
|
|
8
|
-
isFlex?: boolean;
|
|
9
|
-
className?: string;
|
|
10
|
-
text: string;
|
|
11
|
-
onClick: (id: string | number) => void;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
let {
|
|
15
|
-
id,
|
|
16
|
-
icon,
|
|
17
|
-
isFlex,
|
|
18
|
-
className,
|
|
19
|
-
text,
|
|
20
|
-
onClick
|
|
21
|
-
}: CardButtonProps = $props();
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<Button
|
|
25
|
-
class="{isFlex ? 'flex-1' : ''} {className}"
|
|
26
|
-
onclick={() => onClick(id)}
|
|
27
|
-
>
|
|
28
|
-
<HugeiconsIcon {icon} />
|
|
29
|
-
<span>{text}</span>
|
|
30
|
-
</Button>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Button } from "../../../ui/button/index.js";
|
|
3
|
+
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/svelte";
|
|
4
|
+
|
|
5
|
+
type CardButtonProps = {
|
|
6
|
+
id: string | number;
|
|
7
|
+
icon: IconSvgElement;
|
|
8
|
+
isFlex?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
text: string;
|
|
11
|
+
onClick: (id: string | number) => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
let {
|
|
15
|
+
id,
|
|
16
|
+
icon,
|
|
17
|
+
isFlex,
|
|
18
|
+
className,
|
|
19
|
+
text,
|
|
20
|
+
onClick
|
|
21
|
+
}: CardButtonProps = $props();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<Button
|
|
25
|
+
class="{isFlex ? 'flex-1' : ''} {className}"
|
|
26
|
+
onclick={() => onClick(id)}
|
|
27
|
+
>
|
|
28
|
+
<HugeiconsIcon {icon} />
|
|
29
|
+
<span>{text}</span>
|
|
30
|
+
</Button>
|
|
@@ -1,32 +1,36 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Button } from "../../../ui/button/index.js";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Button } from "../../../ui/button/index.js";
|
|
3
|
+
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
4
|
+
import {
|
|
5
|
+
ShoppingCartAdd01Icon,
|
|
6
|
+
ShoppingCartRemove01Icon,
|
|
7
|
+
} from "@hugeicons/core-free-icons";
|
|
8
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
id: string | number;
|
|
12
|
+
isCart: boolean;
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
onCartClick?: (id: string | number) => void;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
let { id, isCart, isLoading = false, onCartClick }: Props = $props();
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
{#if isLoading}
|
|
21
|
+
<Skeleton class="w-8 h-8 rounded-full" />
|
|
22
|
+
{:else if isCart}
|
|
23
|
+
<Button
|
|
24
|
+
class="w-8 h-8 rounded-full bg-[#1d63be]"
|
|
25
|
+
onclick={() => onCartClick!(id)}
|
|
26
|
+
>
|
|
27
|
+
<HugeiconsIcon icon={ShoppingCartRemove01Icon} />
|
|
28
|
+
</Button>
|
|
29
|
+
{:else}
|
|
30
|
+
<Button
|
|
31
|
+
class="w-8 h-8 rounded-full bg-[#808080]"
|
|
32
|
+
onclick={() => onCartClick!(id)}
|
|
33
|
+
>
|
|
34
|
+
<HugeiconsIcon icon={ShoppingCartAdd01Icon} />
|
|
35
|
+
</Button>
|
|
36
|
+
{/if}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Message01Icon } from "@hugeicons/core-free-icons";
|
|
3
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
4
|
-
import TruncatableText from "./TruncatableText.svelte";
|
|
5
|
-
import { t } from "../../../../i18n";
|
|
6
|
-
|
|
7
|
-
type CardDescriptionProps = {
|
|
8
|
-
content?: string;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
let { content }: CardDescriptionProps = $props();
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
{#if content}
|
|
15
|
-
<div class="mb-1 text-[14px] flex items-center gap-1">
|
|
16
|
-
<HugeiconsIcon icon={Message01Icon} class="h-4 w-4" />
|
|
17
|
-
<div>{$t("label.description")}</div>
|
|
18
|
-
</div>
|
|
19
|
-
<TruncatableText
|
|
20
|
-
text={content}
|
|
21
|
-
class="text-justify text-[13px] text-gray-800 dark:text-gray-50 mt-3 my-4"
|
|
22
|
-
/>
|
|
23
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Message01Icon } from "@hugeicons/core-free-icons";
|
|
3
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
4
|
+
import TruncatableText from "./TruncatableText.svelte";
|
|
5
|
+
import { t } from "../../../../i18n";
|
|
6
|
+
|
|
7
|
+
type CardDescriptionProps = {
|
|
8
|
+
content?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
let { content }: CardDescriptionProps = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
{#if content}
|
|
15
|
+
<div class="mb-1 text-[14px] flex items-center gap-1">
|
|
16
|
+
<HugeiconsIcon icon={Message01Icon} class="h-4 w-4" />
|
|
17
|
+
<div>{$t("label.description")}</div>
|
|
18
|
+
</div>
|
|
19
|
+
<TruncatableText
|
|
20
|
+
text={content}
|
|
21
|
+
class="text-justify text-[13px] text-gray-800 dark:text-gray-50 mt-3 my-4"
|
|
22
|
+
/>
|
|
23
|
+
{/if}
|
|
@@ -1,29 +1,33 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Button } from "../../../ui/button/index.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
{
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Button } from "../../../ui/button/index.js";
|
|
3
|
+
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
4
|
+
import { HeartAddIcon, HeartRemoveIcon } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
6
|
+
|
|
7
|
+
type Props = {
|
|
8
|
+
id: string | number;
|
|
9
|
+
isFavorite: boolean;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
onFavoriteClick?: (id: string | number) => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
let { id, isFavorite, isLoading = false, onFavoriteClick }: Props = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
{#if isLoading}
|
|
18
|
+
<Skeleton class="w-8 h-8 rounded-full" />
|
|
19
|
+
{:else if isFavorite}
|
|
20
|
+
<Button
|
|
21
|
+
class="w-8 h-8 rounded-full bg-[#ce2356]"
|
|
22
|
+
onclick={() => onFavoriteClick!(id)}
|
|
23
|
+
>
|
|
24
|
+
<HugeiconsIcon icon={HeartRemoveIcon} />
|
|
25
|
+
</Button>
|
|
26
|
+
{:else}
|
|
27
|
+
<Button
|
|
28
|
+
class="w-8 h-8 rounded-full bg-[#808080]"
|
|
29
|
+
onclick={() => onFavoriteClick!(id)}
|
|
30
|
+
>
|
|
31
|
+
<HugeiconsIcon icon={HeartAddIcon} />
|
|
32
|
+
</Button>
|
|
33
|
+
{/if}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as StarRating from "../../../ui/star-rating";
|
|
3
|
-
|
|
4
|
-
type Props = {
|
|
5
|
-
startNumber: number;
|
|
6
|
-
startMax: number;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
let { startNumber, startMax }: Props = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
{#if startNumber}
|
|
13
|
-
<StarRating.Root max={startMax} value={startNumber} class="size-15 h-auto">
|
|
14
|
-
{#snippet children({ items })}
|
|
15
|
-
{#each items as item (item.index)}
|
|
16
|
-
<StarRating.Star {...item} class="py-0! my-0!" />
|
|
17
|
-
{/each}
|
|
18
|
-
{/snippet}
|
|
19
|
-
</StarRating.Root>
|
|
20
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import * as StarRating from "../../../ui/star-rating";
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
startNumber: number;
|
|
6
|
+
startMax: number;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
let { startNumber, startMax }: Props = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
{#if startNumber}
|
|
13
|
+
<StarRating.Root max={startMax} value={startNumber} class="size-15 h-auto">
|
|
14
|
+
{#snippet children({ items })}
|
|
15
|
+
{#each items as item (item.index)}
|
|
16
|
+
<StarRating.Star {...item} class="py-0! my-0!" />
|
|
17
|
+
{/each}
|
|
18
|
+
{/snippet}
|
|
19
|
+
</StarRating.Root>
|
|
20
|
+
{/if}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
3
|
-
import type { CardTagsProps } from "../types";
|
|
4
|
-
|
|
5
|
-
type Props = {
|
|
6
|
-
className?: string;
|
|
7
|
-
tags: CardTagsProps[];
|
|
8
|
-
isTagBorderBottom?: boolean;
|
|
9
|
-
isWrap?: boolean;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const {
|
|
13
|
-
tags,
|
|
14
|
-
className,
|
|
15
|
-
isTagBorderBottom,
|
|
16
|
-
isWrap = false,
|
|
17
|
-
}: Props = $props();
|
|
18
|
-
|
|
19
|
-
let isJustify = $derived(tags.length == 2 || tags.length == 3);
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
{#snippet createBadge(tag: CardTagsProps)}
|
|
23
|
-
<div
|
|
24
|
-
class="flex items-center h-5 shrink-0 {isTagBorderBottom
|
|
25
|
-
? 'border border-gray-200 rounded-full px-2 py-1'
|
|
26
|
-
: ''}"
|
|
27
|
-
>
|
|
28
|
-
{#if tag.icon}
|
|
29
|
-
<HugeiconsIcon
|
|
30
|
-
icon={tag.icon}
|
|
31
|
-
class="mr-0.5 h-3.75 w-3.75 shrink-0"
|
|
32
|
-
/>
|
|
33
|
-
{/if}
|
|
34
|
-
<div class="whitespace-nowrap">{tag.text}</div>
|
|
35
|
-
</div>
|
|
36
|
-
{/snippet}
|
|
37
|
-
|
|
38
|
-
{#if tags && tags.length > 0}
|
|
39
|
-
{#if isWrap}
|
|
40
|
-
<div class="flex flex-wrap gap-2 md:gap-5 {className}">
|
|
41
|
-
{#each tags as tag, i (i)}
|
|
42
|
-
{@render createBadge(tag)}
|
|
43
|
-
{/each}
|
|
44
|
-
</div>
|
|
45
|
-
{:else}
|
|
46
|
-
<div class="flex overflow-x-auto no-scrollbar w-full
|
|
47
|
-
{isJustify ? 'justify-between' : 'gap-4 md:gap-5 lg:gap-10'}
|
|
48
|
-
{className}">
|
|
49
|
-
{#each tags as tag, i (i)}
|
|
50
|
-
{@render createBadge(tag)}
|
|
51
|
-
{/each}
|
|
52
|
-
</div>
|
|
53
|
-
{/if}
|
|
54
|
-
{:else}
|
|
55
|
-
<div class="w-full h-5 {className}"></div>
|
|
56
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
3
|
+
import type { CardTagsProps } from "../types";
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
className?: string;
|
|
7
|
+
tags: CardTagsProps[];
|
|
8
|
+
isTagBorderBottom?: boolean;
|
|
9
|
+
isWrap?: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
tags,
|
|
14
|
+
className,
|
|
15
|
+
isTagBorderBottom,
|
|
16
|
+
isWrap = false,
|
|
17
|
+
}: Props = $props();
|
|
18
|
+
|
|
19
|
+
let isJustify = $derived(tags.length == 2 || tags.length == 3);
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
{#snippet createBadge(tag: CardTagsProps)}
|
|
23
|
+
<div
|
|
24
|
+
class="flex items-center h-5 shrink-0 {isTagBorderBottom
|
|
25
|
+
? 'border border-gray-200 rounded-full px-2 py-1'
|
|
26
|
+
: ''}"
|
|
27
|
+
>
|
|
28
|
+
{#if tag.icon}
|
|
29
|
+
<HugeiconsIcon
|
|
30
|
+
icon={tag.icon}
|
|
31
|
+
class="mr-0.5 h-3.75 w-3.75 shrink-0"
|
|
32
|
+
/>
|
|
33
|
+
{/if}
|
|
34
|
+
<div class="whitespace-nowrap">{tag.text}</div>
|
|
35
|
+
</div>
|
|
36
|
+
{/snippet}
|
|
37
|
+
|
|
38
|
+
{#if tags && tags.length > 0}
|
|
39
|
+
{#if isWrap}
|
|
40
|
+
<div class="flex flex-wrap gap-2 md:gap-5 {className}">
|
|
41
|
+
{#each tags as tag, i (i)}
|
|
42
|
+
{@render createBadge(tag)}
|
|
43
|
+
{/each}
|
|
44
|
+
</div>
|
|
45
|
+
{:else}
|
|
46
|
+
<div class="flex overflow-x-auto no-scrollbar w-full
|
|
47
|
+
{isJustify ? 'justify-between' : 'gap-4 md:gap-5 lg:gap-10'}
|
|
48
|
+
{className}">
|
|
49
|
+
{#each tags as tag, i (i)}
|
|
50
|
+
{@render createBadge(tag)}
|
|
51
|
+
{/each}
|
|
52
|
+
</div>
|
|
53
|
+
{/if}
|
|
54
|
+
{:else}
|
|
55
|
+
<div class="w-full h-5 {className}"></div>
|
|
56
|
+
{/if}
|