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,93 +1,108 @@
|
|
|
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 CardDescription from "../../shared/CardDescription.svelte";
|
|
6
|
-
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
7
|
-
import CardTags from "../../shared/CardTags.svelte";
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<
|
|
89
|
-
{
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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 CardDescription from "../../shared/CardDescription.svelte";
|
|
6
|
+
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
7
|
+
import CardTags from "../../shared/CardTags.svelte";
|
|
8
|
+
import ImgPlaceholderCompany from "../../../../../assets/placeholder-company.png";
|
|
9
|
+
import ImgPlaceholder from "../../../../../assets/placeholder-image.png";
|
|
10
|
+
/**
|
|
11
|
+
* Card component with a title and content.
|
|
12
|
+
* @component
|
|
13
|
+
*/
|
|
14
|
+
import type { CardHighlightProps } from "../../types";
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
id,
|
|
18
|
+
logo,
|
|
19
|
+
tags,
|
|
20
|
+
title,
|
|
21
|
+
content,
|
|
22
|
+
imageUrl,
|
|
23
|
+
isLoading = false,
|
|
24
|
+
isFavorite = false,
|
|
25
|
+
isDescriptionIcon,
|
|
26
|
+
isDescriptionLabel,
|
|
27
|
+
buttonText,
|
|
28
|
+
onClickBtn,
|
|
29
|
+
onClickFavorite,
|
|
30
|
+
}: CardHighlightProps = $props();
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<article
|
|
34
|
+
class="flex flex-col gap-1 bg-white dark:bg-background p-3 rounded-lg shadow border"
|
|
35
|
+
>
|
|
36
|
+
<aside class="relative rounded-lg border h-36">
|
|
37
|
+
<div class="absolute top-3 left-1 z-2 flex gap-1">
|
|
38
|
+
{#if isLoading}
|
|
39
|
+
<Skeleton class="w-full h-full rounded-lg" />
|
|
40
|
+
{:else if logo}
|
|
41
|
+
<img
|
|
42
|
+
src={logo}
|
|
43
|
+
alt={logo}
|
|
44
|
+
class="rounded-lg w-8 h-8 object-cover object-center"
|
|
45
|
+
onerror={(e) =>
|
|
46
|
+
((e.target as HTMLImageElement).src = ImgPlaceholderCompany)}
|
|
47
|
+
/>
|
|
48
|
+
{:else}
|
|
49
|
+
<img
|
|
50
|
+
src={ImgPlaceholderCompany}
|
|
51
|
+
alt={logo}
|
|
52
|
+
class="rounded-lg w-8 h-8 object-cover object-center"
|
|
53
|
+
/>
|
|
54
|
+
{/if}
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div class="absolute top-3 right-1 z-2">
|
|
58
|
+
<CardFavorite
|
|
59
|
+
{id}
|
|
60
|
+
{isFavorite}
|
|
61
|
+
{isLoading}
|
|
62
|
+
onFavoriteClick={() => onClickFavorite?.(id)}
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
{#if isLoading}
|
|
67
|
+
<Skeleton class="rounded-lg w-full h-full object-cover object-center" />
|
|
68
|
+
{:else if imageUrl}
|
|
69
|
+
<img
|
|
70
|
+
src={imageUrl}
|
|
71
|
+
alt={imageUrl}
|
|
72
|
+
class="rounded-lg w-full h-full object-cover object-center"
|
|
73
|
+
onerror={(e) => ((e.target as HTMLImageElement).src = ImgPlaceholder)}
|
|
74
|
+
/>
|
|
75
|
+
{/if}
|
|
76
|
+
<div class="absolute inset-0 bg-black/5 rounded-sm h-full w-full"></div>
|
|
77
|
+
</aside>
|
|
78
|
+
<div class="px-2 w-55">
|
|
79
|
+
<div class="rounded-md">
|
|
80
|
+
{#if isLoading}
|
|
81
|
+
<Skeleton class="h-4 w-30 rounded-lg" />
|
|
82
|
+
{:else if title}
|
|
83
|
+
<div class="font-semibold my-2">{title}</div>
|
|
84
|
+
{/if}
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div class="my-2">
|
|
88
|
+
<CardDescription
|
|
89
|
+
{content}
|
|
90
|
+
{isLoading}
|
|
91
|
+
{isDescriptionIcon}
|
|
92
|
+
{isDescriptionLabel}
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div class="my-2">
|
|
97
|
+
<CardTags {tags} {isLoading} />
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
{#if isLoading}
|
|
101
|
+
<Skeleton class="h-10 w-full rounded-md mt-2 md:mt-3" />
|
|
102
|
+
{:else}
|
|
103
|
+
<Button onclick={() => onClickBtn!(id)} class="mt-2 md:mt-3 md:min-w-32">
|
|
104
|
+
{buttonText || $t("label.buy")}
|
|
105
|
+
</Button>
|
|
106
|
+
{/if}
|
|
107
|
+
</div>
|
|
108
|
+
</article>
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* Card component with a title and content.
|
|
4
|
-
* @component
|
|
5
|
-
*/
|
|
6
|
-
import type { CardHighlightProps } from "../types";
|
|
7
|
-
import CardHighlight01 from "./01/CardHighlight01.svelte";
|
|
8
|
-
import CardHighlight02 from "./02/CardHighlight02.svelte";
|
|
9
|
-
|
|
10
|
-
let {
|
|
11
|
-
varient = 1,
|
|
12
|
-
...restProps
|
|
13
|
-
}: CardHighlightProps & {
|
|
14
|
-
varient?: 1 | 2;
|
|
15
|
-
} = $props();
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
{#if varient == 2}
|
|
19
|
-
<CardHighlight02 {...restProps} />
|
|
20
|
-
{:else}
|
|
21
|
-
<CardHighlight01 {...restProps} />
|
|
22
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Card component with a title and content.
|
|
4
|
+
* @component
|
|
5
|
+
*/
|
|
6
|
+
import type { CardHighlightProps } from "../types";
|
|
7
|
+
import CardHighlight01 from "./01/CardHighlight01.svelte";
|
|
8
|
+
import CardHighlight02 from "./02/CardHighlight02.svelte";
|
|
9
|
+
|
|
10
|
+
let {
|
|
11
|
+
varient = 1,
|
|
12
|
+
...restProps
|
|
13
|
+
}: CardHighlightProps & {
|
|
14
|
+
varient?: 1 | 2;
|
|
15
|
+
} = $props();
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
{#if varient == 2}
|
|
19
|
+
<CardHighlight02 {...restProps} />
|
|
20
|
+
{:else}
|
|
21
|
+
<CardHighlight01 {...restProps} />
|
|
22
|
+
{/if}
|
|
@@ -14,7 +14,8 @@ const items = [
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
id: 2,
|
|
17
|
-
imageUrl: 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
17
|
+
//imageUrl: 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
18
|
+
imageUrl: undefined,
|
|
18
19
|
title: 'Miramar Suites',
|
|
19
20
|
content: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since 1966, when designers at Letraset and James Mosley, the librarian at St Bride Printing Library in London, took a 1914 Cicero translation and scrambled it to make dummy text for Letraset's Body Type sheets. It has survived not only many decades, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised thanks to these sheets and more recently with desktop publishing software like Aldus PageMaker and Microsoft Word including versions of Lorem Ipsum",
|
|
20
21
|
tags: [
|
|
@@ -23,6 +24,7 @@ const items = [
|
|
|
23
24
|
{ icon: NecklaceIcon, text: 'Rua 19', },
|
|
24
25
|
]
|
|
25
26
|
},
|
|
27
|
+
/*
|
|
26
28
|
{
|
|
27
29
|
id: 3,
|
|
28
30
|
imageUrl: 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
@@ -58,5 +60,6 @@ const items = [
|
|
|
58
60
|
{ icon: NecklaceIcon, text: 'Rua 19', },
|
|
59
61
|
]
|
|
60
62
|
},
|
|
63
|
+
*/
|
|
61
64
|
];
|
|
62
65
|
export default items;
|
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* Card component with a title and content.
|
|
4
|
-
* @component
|
|
5
|
-
*/
|
|
6
|
-
import {
|
|
7
|
-
InformationCircleIcon,
|
|
8
|
-
UserIcon,
|
|
9
|
-
} from "@hugeicons/core-free-icons";
|
|
10
|
-
import { t } from "../../../../../i18n";
|
|
11
|
-
import type { CardMediaProps } from "../../types";
|
|
12
|
-
import CardStarRating from "../../shared/CardStarRating.svelte";
|
|
13
|
-
import CardDescription from "../../shared/CardDescription.svelte";
|
|
14
|
-
import CardTags from "../../shared/CardTags.svelte";
|
|
15
|
-
import CardThumbnailVideo from "../../shared/CardThumbnailVideo.svelte";
|
|
16
|
-
import CardButton from "../../shared/CardButton.svelte";
|
|
17
|
-
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
18
|
-
|
|
19
|
-
let {
|
|
20
|
-
id,
|
|
21
|
-
tags,
|
|
22
|
-
logo,
|
|
23
|
-
title,
|
|
24
|
-
content,
|
|
25
|
-
imageUrl,
|
|
26
|
-
videoUrl,
|
|
27
|
-
//videoAction,
|
|
28
|
-
startNumber,
|
|
29
|
-
startMax = 5,
|
|
30
|
-
isImageButtonMaximized = false,
|
|
31
|
-
isVideoButtonMaximized = false,
|
|
32
|
-
isTagBorderBottom = false,
|
|
33
|
-
isFavorite = false,
|
|
34
|
-
buttonProfileClass,
|
|
35
|
-
buttonDetailsClass,
|
|
36
|
-
onFavoriteClick,
|
|
37
|
-
onButtonProfile,
|
|
38
|
-
onButtonDetails,
|
|
39
|
-
}: CardMediaProps = $props();
|
|
40
|
-
|
|
41
|
-
let isShowButtonProfileAndDetails = $derived(
|
|
42
|
-
onButtonProfile != null && onButtonDetails != null,
|
|
43
|
-
);
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<article
|
|
47
|
-
class="border border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-transparent rounded-lg p-5 space-y-1 md:space-y-3"
|
|
48
|
-
>
|
|
49
|
-
<div class="flex justify-between items-center w-full mb-4">
|
|
50
|
-
<div class="flex justify-start gap-2">
|
|
51
|
-
<div class="flex justify-center items-center">
|
|
52
|
-
{#if logo}
|
|
53
|
-
<img src={logo} alt={logo} class="w-12 h-12 rounded-lg" />
|
|
54
|
-
{/if}
|
|
55
|
-
</div>
|
|
56
|
-
<div class="flex-col">
|
|
57
|
-
{#if title}
|
|
58
|
-
<div class="text-center font-bold text-lg">{title}</div>
|
|
59
|
-
{/if}
|
|
60
|
-
{#if startNumber}
|
|
61
|
-
<CardStarRating {startNumber} {startMax} />
|
|
62
|
-
{/if}
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
<div class="flex justify-end items-center">
|
|
66
|
-
<CardFavorite
|
|
67
|
-
{id}
|
|
68
|
-
{isFavorite}
|
|
69
|
-
onFavoriteClick={() => onFavoriteClick!(id)}
|
|
70
|
-
/>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<div class="h-15 my-2">
|
|
75
|
-
<CardDescription {content} />
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
<CardTags className="my-6" tags={tags ?? []} {isTagBorderBottom} />
|
|
79
|
-
|
|
80
|
-
<CardThumbnailVideo
|
|
81
|
-
{imageUrl}
|
|
82
|
-
{videoUrl}
|
|
83
|
-
{isImageButtonMaximized}
|
|
84
|
-
{isVideoButtonMaximized}
|
|
85
|
-
/>
|
|
86
|
-
|
|
87
|
-
{#if onButtonProfile || onButtonDetails}
|
|
88
|
-
<div class="flex justify-center items-center gap-2 mt-4 w-full">
|
|
89
|
-
{#if onButtonProfile}
|
|
90
|
-
<CardButton
|
|
91
|
-
{id}
|
|
92
|
-
icon={UserIcon}
|
|
93
|
-
className={buttonProfileClass}
|
|
94
|
-
text={$t("label.view.profile")}
|
|
95
|
-
onClick={onButtonProfile}
|
|
96
|
-
isFlex={isShowButtonProfileAndDetails}
|
|
97
|
-
/>
|
|
98
|
-
{/if}
|
|
99
|
-
{#if onButtonDetails}
|
|
100
|
-
<CardButton
|
|
101
|
-
{id}
|
|
102
|
-
icon={InformationCircleIcon}
|
|
103
|
-
className={buttonDetailsClass}
|
|
104
|
-
text={$t("label.more.details")}
|
|
105
|
-
onClick={onButtonDetails}
|
|
106
|
-
isFlex={isShowButtonProfileAndDetails}
|
|
107
|
-
/>
|
|
108
|
-
{/if}
|
|
109
|
-
</div>
|
|
110
|
-
{/if}
|
|
111
|
-
</article>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Card component with a title and content.
|
|
4
|
+
* @component
|
|
5
|
+
*/
|
|
6
|
+
import {
|
|
7
|
+
InformationCircleIcon,
|
|
8
|
+
UserIcon,
|
|
9
|
+
} from "@hugeicons/core-free-icons";
|
|
10
|
+
import { t } from "../../../../../i18n";
|
|
11
|
+
import type { CardMediaProps } from "../../types";
|
|
12
|
+
import CardStarRating from "../../shared/CardStarRating.svelte";
|
|
13
|
+
import CardDescription from "../../shared/CardDescription.svelte";
|
|
14
|
+
import CardTags from "../../shared/CardTags.svelte";
|
|
15
|
+
import CardThumbnailVideo from "../../shared/CardThumbnailVideo.svelte";
|
|
16
|
+
import CardButton from "../../shared/CardButton.svelte";
|
|
17
|
+
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
id,
|
|
21
|
+
tags,
|
|
22
|
+
logo,
|
|
23
|
+
title,
|
|
24
|
+
content,
|
|
25
|
+
imageUrl,
|
|
26
|
+
videoUrl,
|
|
27
|
+
//videoAction,
|
|
28
|
+
startNumber,
|
|
29
|
+
startMax = 5,
|
|
30
|
+
isImageButtonMaximized = false,
|
|
31
|
+
isVideoButtonMaximized = false,
|
|
32
|
+
isTagBorderBottom = false,
|
|
33
|
+
isFavorite = false,
|
|
34
|
+
buttonProfileClass,
|
|
35
|
+
buttonDetailsClass,
|
|
36
|
+
onFavoriteClick,
|
|
37
|
+
onButtonProfile,
|
|
38
|
+
onButtonDetails,
|
|
39
|
+
}: CardMediaProps = $props();
|
|
40
|
+
|
|
41
|
+
let isShowButtonProfileAndDetails = $derived(
|
|
42
|
+
onButtonProfile != null && onButtonDetails != null,
|
|
43
|
+
);
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<article
|
|
47
|
+
class="border border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-transparent rounded-lg p-5 space-y-1 md:space-y-3"
|
|
48
|
+
>
|
|
49
|
+
<div class="flex justify-between items-center w-full mb-4">
|
|
50
|
+
<div class="flex justify-start gap-2">
|
|
51
|
+
<div class="flex justify-center items-center">
|
|
52
|
+
{#if logo}
|
|
53
|
+
<img src={logo} alt={logo} class="w-12 h-12 rounded-lg" />
|
|
54
|
+
{/if}
|
|
55
|
+
</div>
|
|
56
|
+
<div class="flex-col">
|
|
57
|
+
{#if title}
|
|
58
|
+
<div class="text-center font-bold text-lg">{title}</div>
|
|
59
|
+
{/if}
|
|
60
|
+
{#if startNumber}
|
|
61
|
+
<CardStarRating {startNumber} {startMax} />
|
|
62
|
+
{/if}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="flex justify-end items-center">
|
|
66
|
+
<CardFavorite
|
|
67
|
+
{id}
|
|
68
|
+
{isFavorite}
|
|
69
|
+
onFavoriteClick={() => onFavoriteClick!(id)}
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<div class="h-15 my-2">
|
|
75
|
+
<CardDescription {content} />
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<CardTags className="my-6" tags={tags ?? []} {isTagBorderBottom} />
|
|
79
|
+
|
|
80
|
+
<CardThumbnailVideo
|
|
81
|
+
{imageUrl}
|
|
82
|
+
{videoUrl}
|
|
83
|
+
{isImageButtonMaximized}
|
|
84
|
+
{isVideoButtonMaximized}
|
|
85
|
+
/>
|
|
86
|
+
|
|
87
|
+
{#if onButtonProfile || onButtonDetails}
|
|
88
|
+
<div class="flex justify-center items-center gap-2 mt-4 w-full">
|
|
89
|
+
{#if onButtonProfile}
|
|
90
|
+
<CardButton
|
|
91
|
+
{id}
|
|
92
|
+
icon={UserIcon}
|
|
93
|
+
className={buttonProfileClass}
|
|
94
|
+
text={$t("label.view.profile")}
|
|
95
|
+
onClick={onButtonProfile}
|
|
96
|
+
isFlex={isShowButtonProfileAndDetails}
|
|
97
|
+
/>
|
|
98
|
+
{/if}
|
|
99
|
+
{#if onButtonDetails}
|
|
100
|
+
<CardButton
|
|
101
|
+
{id}
|
|
102
|
+
icon={InformationCircleIcon}
|
|
103
|
+
className={buttonDetailsClass}
|
|
104
|
+
text={$t("label.more.details")}
|
|
105
|
+
onClick={onButtonDetails}
|
|
106
|
+
isFlex={isShowButtonProfileAndDetails}
|
|
107
|
+
/>
|
|
108
|
+
{/if}
|
|
109
|
+
</div>
|
|
110
|
+
{/if}
|
|
111
|
+
</article>
|