negodesign 0.0.59 → 0.0.60
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/banner/AdCardBanner.svelte +74 -74
- package/dist/components/core/banner/CtaCardBanner.svelte +118 -118
- 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 +103 -103
- package/dist/components/core/card/highlight/02/CardHighlight02.svelte +99 -99
- package/dist/components/core/card/highlight/CardHighlight.svelte +22 -22
- package/dist/components/core/card/media/01/CardMedia01.svelte +133 -133
- package/dist/components/core/card/media/02/CardMedia02.svelte +127 -127
- package/dist/components/core/card/media/CardMedia.svelte +18 -18
- package/dist/components/core/card/product/01/CardProduct01.svelte +136 -136
- package/dist/components/core/card/product/02/CardProduct02.svelte +124 -124
- package/dist/components/core/card/product/CardProduct.svelte +22 -22
- package/dist/components/core/card/profile/01/CardProfile01.svelte +134 -134
- package/dist/components/core/card/profile/02/CardProfile02.svelte +132 -132
- package/dist/components/core/card/profile/CardProfile.svelte +18 -18
- package/dist/components/core/card/promotion/CardPromotion.svelte +139 -139
- package/dist/components/core/card/promotion/CardPromotionPrice.svelte +32 -32
- package/dist/components/core/card/shared/CardButton.svelte +42 -42
- package/dist/components/core/card/shared/CardCart.svelte +36 -36
- package/dist/components/core/card/shared/CardDescription.svelte +41 -41
- package/dist/components/core/card/shared/CardFavorite.svelte +33 -33
- package/dist/components/core/card/shared/CardLogo.svelte +19 -19
- package/dist/components/core/card/shared/CardPhoneOrWhatsapp.svelte +45 -45
- package/dist/components/core/card/shared/CardStarRating.svelte +24 -24
- package/dist/components/core/card/shared/CardTags.svelte +95 -95
- package/dist/components/core/card/shared/CardThumbnailVideo.svelte +232 -232
- package/dist/components/core/card/shared/CardTitlePrice.svelte +24 -24
- package/dist/components/core/card/shared/TruncatableText.svelte +49 -49
- package/dist/components/core/carousel/badge/ui/CarouselBadge.svelte +109 -109
- package/dist/components/core/carousel/grid/shared/ui/CarouselGridSlot.svelte +38 -38
- package/dist/components/core/carousel/hero/ui/CarouselHero.svelte +163 -163
- package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte +60 -60
- 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/footer/ui/Footer.svelte +18 -18
- 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/grid/ui/01/Grid01.svelte +28 -28
- package/dist/components/core/grid/ui/02/Grid02.svelte +28 -28
- package/dist/components/core/grid/ui/PanelGrid.svelte +27 -27
- package/dist/components/core/grid/ui/SimpleGrid.svelte +35 -35
- package/dist/components/core/grid/ui/shared/DescriptionGrid.svelte +23 -23
- package/dist/components/core/grid/ui/shared/IconRenderGrid.svelte +21 -21
- package/dist/components/core/grid/ui/shared/TitleGrid.svelte +19 -19
- 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/ComplexMenu.svelte +36 -36
- package/dist/components/core/nav/ui/Menu.svelte +70 -70
- package/dist/components/core/nav/ui/SimpleMenu.svelte +14 -14
- package/dist/components/core/nav/ui/mobile/MenuMobile.svelte +54 -54
- package/dist/components/core/nav/ui/shared/MenuButton.svelte +51 -51
- package/dist/components/core/nav/ui/shared/MenuLinks.svelte +40 -40
- package/dist/components/core/nav/ui/shared/MenuListItem.svelte +48 -48
- package/dist/components/core/nav/ui/shared/MenuLogo.svelte +13 -13
- package/dist/components/core/nav/ui/shared/navigation/NavigationMenuItem.svelte +15 -15
- package/dist/components/core/nav/ui/shared/navigation/NavigationMenuItemCard.svelte +62 -62
- package/dist/components/core/nav/ui/shared/navigation/NavigationMenuItemGrid.svelte +32 -32
- package/dist/components/core/nav/ui/shared/navigation/NavigationMenuItemList.svelte +24 -24
- package/dist/components/core/nav/ui/shared/navigation/NavigationMenuItems.svelte +21 -21
- package/dist/components/core/panel/CarouselSlot.svelte +57 -57
- package/dist/components/core/panel/LeftHero.svelte +117 -117
- 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/sidebar/ui/navbar/NavMenuBarSidebar.svelte +97 -97
- package/dist/components/core/sidebar/ui/navbar/NavMenuBottomSidebar.svelte +33 -33
- package/dist/components/core/sidebar/ui/navbar/NavMenuTopBarSidebar.svelte +103 -103
- 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/styles/globals.css +149 -149
- package/package.json +113 -113
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Skeleton from "../../../../ui/skeleton/skeleton.svelte";
|
|
3
|
-
import ImgPlaceholder from "../../../../../assets/placeholder-image.png";
|
|
4
|
-
import CardDescription from "../../shared/CardDescription.svelte";
|
|
5
|
-
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
6
|
-
import CardTags from "../../shared/CardTags.svelte";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Card component with a title and content.
|
|
10
|
-
* @component
|
|
11
|
-
*/
|
|
12
|
-
import type { CardHighlightProps } from "../../types";
|
|
13
|
-
import CardButton from "../../shared/CardButton.svelte";
|
|
14
|
-
import CardLogo from "../../shared/CardLogo.svelte";
|
|
15
|
-
import { t } from "../../../../../i18n";
|
|
16
|
-
|
|
17
|
-
let {
|
|
18
|
-
id,
|
|
19
|
-
logo,
|
|
20
|
-
tags,
|
|
21
|
-
title,
|
|
22
|
-
content,
|
|
23
|
-
imageUrl,
|
|
24
|
-
isLoading = false,
|
|
25
|
-
isFavorite = false,
|
|
26
|
-
buttonText,
|
|
27
|
-
buttonClass,
|
|
28
|
-
isDescriptionIcon,
|
|
29
|
-
isDescriptionLabel,
|
|
30
|
-
isExpandButton = false,
|
|
31
|
-
onClickBtn,
|
|
32
|
-
onClickFavorite,
|
|
33
|
-
}: CardHighlightProps = $props();
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<article
|
|
37
|
-
class="flex gap-1 bg-white dark:bg-background p-3 rounded-lg shadow border"
|
|
38
|
-
>
|
|
39
|
-
<aside class="relative rounded-lg border h-50">
|
|
40
|
-
<div class="absolute top-3 left-1 z-2 flex gap-1 w-50">
|
|
41
|
-
<CardLogo {isLoading} {logo} />
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
<div class="absolute top-3 right-1 z-2">
|
|
45
|
-
<CardFavorite
|
|
46
|
-
{id}
|
|
47
|
-
{isFavorite}
|
|
48
|
-
{isLoading}
|
|
49
|
-
onFavoriteClick={() => onClickFavorite?.(id)}
|
|
50
|
-
/>
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
{#if isLoading}
|
|
54
|
-
<Skeleton class="rounded-lg w-50 h-full object-cover object-center" />
|
|
55
|
-
{:else if imageUrl}
|
|
56
|
-
<img
|
|
57
|
-
src={imageUrl}
|
|
58
|
-
alt={imageUrl}
|
|
59
|
-
class="rounded-lg w-50 h-full object-cover object-center"
|
|
60
|
-
/>
|
|
61
|
-
{:else}
|
|
62
|
-
<img
|
|
63
|
-
src={ImgPlaceholder}
|
|
64
|
-
alt={imageUrl}
|
|
65
|
-
class="rounded-lg w-50 h-full object-cover object-center"
|
|
66
|
-
/>
|
|
67
|
-
{/if}
|
|
68
|
-
<div class="absolute inset-0 bg-black/5 rounded-sm h-full w-full"></div>
|
|
69
|
-
</aside>
|
|
70
|
-
<div class="px-5">
|
|
71
|
-
<div class="p-2 rounded-md">
|
|
72
|
-
{#if isLoading}
|
|
73
|
-
<Skeleton class="h-4 w-30 rounded-lg" />
|
|
74
|
-
{:else if title}
|
|
75
|
-
<div class="font-semibold">{title}</div>
|
|
76
|
-
{/if}
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<div class="w-75">
|
|
80
|
-
<CardDescription
|
|
81
|
-
{content}
|
|
82
|
-
{isLoading}
|
|
83
|
-
{isDescriptionIcon}
|
|
84
|
-
{isDescriptionLabel}
|
|
85
|
-
/>
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
{#if tags && tags.length > 0}
|
|
89
|
-
<div class="w-full mb-2">
|
|
90
|
-
<CardTags {tags} />
|
|
91
|
-
</div>
|
|
92
|
-
{/if}
|
|
93
|
-
|
|
94
|
-
<CardButton
|
|
95
|
-
{id}
|
|
96
|
-
{isLoading}
|
|
97
|
-
className={buttonClass}
|
|
98
|
-
isFlex={isExpandButton}
|
|
99
|
-
onClick={() => onClickBtn!(id)}
|
|
100
|
-
text={buttonText || $t("label.buy")}
|
|
101
|
-
/>
|
|
102
|
-
</div>
|
|
103
|
-
</article>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Skeleton from "../../../../ui/skeleton/skeleton.svelte";
|
|
3
|
+
import ImgPlaceholder from "../../../../../assets/placeholder-image.png";
|
|
4
|
+
import CardDescription from "../../shared/CardDescription.svelte";
|
|
5
|
+
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
6
|
+
import CardTags from "../../shared/CardTags.svelte";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Card component with a title and content.
|
|
10
|
+
* @component
|
|
11
|
+
*/
|
|
12
|
+
import type { CardHighlightProps } from "../../types";
|
|
13
|
+
import CardButton from "../../shared/CardButton.svelte";
|
|
14
|
+
import CardLogo from "../../shared/CardLogo.svelte";
|
|
15
|
+
import { t } from "../../../../../i18n";
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
id,
|
|
19
|
+
logo,
|
|
20
|
+
tags,
|
|
21
|
+
title,
|
|
22
|
+
content,
|
|
23
|
+
imageUrl,
|
|
24
|
+
isLoading = false,
|
|
25
|
+
isFavorite = false,
|
|
26
|
+
buttonText,
|
|
27
|
+
buttonClass,
|
|
28
|
+
isDescriptionIcon,
|
|
29
|
+
isDescriptionLabel,
|
|
30
|
+
isExpandButton = false,
|
|
31
|
+
onClickBtn,
|
|
32
|
+
onClickFavorite,
|
|
33
|
+
}: CardHighlightProps = $props();
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<article
|
|
37
|
+
class="flex gap-1 bg-white dark:bg-background p-3 rounded-lg shadow border"
|
|
38
|
+
>
|
|
39
|
+
<aside class="relative rounded-lg border h-50">
|
|
40
|
+
<div class="absolute top-3 left-1 z-2 flex gap-1 w-50">
|
|
41
|
+
<CardLogo {isLoading} {logo} />
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div class="absolute top-3 right-1 z-2">
|
|
45
|
+
<CardFavorite
|
|
46
|
+
{id}
|
|
47
|
+
{isFavorite}
|
|
48
|
+
{isLoading}
|
|
49
|
+
onFavoriteClick={() => onClickFavorite?.(id)}
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
{#if isLoading}
|
|
54
|
+
<Skeleton class="rounded-lg w-50 h-full object-cover object-center" />
|
|
55
|
+
{:else if imageUrl}
|
|
56
|
+
<img
|
|
57
|
+
src={imageUrl}
|
|
58
|
+
alt={imageUrl}
|
|
59
|
+
class="rounded-lg w-50 h-full object-cover object-center"
|
|
60
|
+
/>
|
|
61
|
+
{:else}
|
|
62
|
+
<img
|
|
63
|
+
src={ImgPlaceholder}
|
|
64
|
+
alt={imageUrl}
|
|
65
|
+
class="rounded-lg w-50 h-full object-cover object-center"
|
|
66
|
+
/>
|
|
67
|
+
{/if}
|
|
68
|
+
<div class="absolute inset-0 bg-black/5 rounded-sm h-full w-full"></div>
|
|
69
|
+
</aside>
|
|
70
|
+
<div class="px-5">
|
|
71
|
+
<div class="p-2 rounded-md">
|
|
72
|
+
{#if isLoading}
|
|
73
|
+
<Skeleton class="h-4 w-30 rounded-lg" />
|
|
74
|
+
{:else if title}
|
|
75
|
+
<div class="font-semibold">{title}</div>
|
|
76
|
+
{/if}
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div class="w-75">
|
|
80
|
+
<CardDescription
|
|
81
|
+
{content}
|
|
82
|
+
{isLoading}
|
|
83
|
+
{isDescriptionIcon}
|
|
84
|
+
{isDescriptionLabel}
|
|
85
|
+
/>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
{#if tags && tags.length > 0}
|
|
89
|
+
<div class="w-full mb-2">
|
|
90
|
+
<CardTags {tags} />
|
|
91
|
+
</div>
|
|
92
|
+
{/if}
|
|
93
|
+
|
|
94
|
+
<CardButton
|
|
95
|
+
{id}
|
|
96
|
+
{isLoading}
|
|
97
|
+
className={buttonClass}
|
|
98
|
+
isFlex={isExpandButton}
|
|
99
|
+
onClick={() => onClickBtn!(id)}
|
|
100
|
+
text={buttonText || $t("label.buy")}
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
</article>
|
|
@@ -1,99 +1,99 @@
|
|
|
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
|
-
import CardButton from "../../shared/CardButton.svelte";
|
|
16
|
-
import CardLogo from "../../shared/CardLogo.svelte";
|
|
17
|
-
|
|
18
|
-
let {
|
|
19
|
-
id,
|
|
20
|
-
logo,
|
|
21
|
-
tags,
|
|
22
|
-
title,
|
|
23
|
-
content,
|
|
24
|
-
imageUrl,
|
|
25
|
-
isLoading = false,
|
|
26
|
-
isFavorite = false,
|
|
27
|
-
isDescriptionIcon,
|
|
28
|
-
isDescriptionLabel,
|
|
29
|
-
isExpandButton = false,
|
|
30
|
-
buttonText,
|
|
31
|
-
buttonClass,
|
|
32
|
-
onClickBtn,
|
|
33
|
-
onClickFavorite,
|
|
34
|
-
}: CardHighlightProps = $props();
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<article
|
|
38
|
-
class="flex flex-col gap-1 bg-white dark:bg-background p-3 rounded-lg shadow border"
|
|
39
|
-
>
|
|
40
|
-
<aside class="relative rounded-lg border h-36">
|
|
41
|
-
<div class="absolute top-3 left-1 z-2 flex gap-1">
|
|
42
|
-
<CardLogo {isLoading} {logo} />
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<div class="absolute top-3 right-1 z-2">
|
|
46
|
-
<CardFavorite
|
|
47
|
-
{id}
|
|
48
|
-
{isFavorite}
|
|
49
|
-
{isLoading}
|
|
50
|
-
onFavoriteClick={() => onClickFavorite?.(id)}
|
|
51
|
-
/>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
{#if isLoading}
|
|
55
|
-
<Skeleton class="rounded-lg w-full h-full object-cover object-center" />
|
|
56
|
-
{:else if imageUrl}
|
|
57
|
-
<img
|
|
58
|
-
src={imageUrl}
|
|
59
|
-
alt={imageUrl}
|
|
60
|
-
class="rounded-lg w-full h-full object-cover object-center"
|
|
61
|
-
onerror={(e) => ((e.target as HTMLImageElement).src = ImgPlaceholder)}
|
|
62
|
-
/>
|
|
63
|
-
{/if}
|
|
64
|
-
<div class="absolute inset-0 bg-black/5 rounded-sm h-full w-full"></div>
|
|
65
|
-
</aside>
|
|
66
|
-
<div class="px-2 w-55">
|
|
67
|
-
<div class="rounded-md">
|
|
68
|
-
{#if isLoading}
|
|
69
|
-
<Skeleton class="h-4 w-30 rounded-lg" />
|
|
70
|
-
{:else if title}
|
|
71
|
-
<div class="font-semibold my-2">{title}</div>
|
|
72
|
-
{/if}
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
<div class="my-2">
|
|
76
|
-
<CardDescription
|
|
77
|
-
{content}
|
|
78
|
-
{isLoading}
|
|
79
|
-
{isDescriptionIcon}
|
|
80
|
-
{isDescriptionLabel}
|
|
81
|
-
/>
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
{#if tags && tags.length > 0}
|
|
85
|
-
<div class="my-2">
|
|
86
|
-
<CardTags {tags} {isLoading} />
|
|
87
|
-
</div>
|
|
88
|
-
{/if}
|
|
89
|
-
|
|
90
|
-
<CardButton
|
|
91
|
-
{id}
|
|
92
|
-
{isLoading}
|
|
93
|
-
className={buttonClass}
|
|
94
|
-
isFlex={isExpandButton}
|
|
95
|
-
onClick={() => onClickBtn!(id)}
|
|
96
|
-
text={buttonText || $t("label.buy")}
|
|
97
|
-
/>
|
|
98
|
-
</div>
|
|
99
|
-
</article>
|
|
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
|
+
import CardButton from "../../shared/CardButton.svelte";
|
|
16
|
+
import CardLogo from "../../shared/CardLogo.svelte";
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
id,
|
|
20
|
+
logo,
|
|
21
|
+
tags,
|
|
22
|
+
title,
|
|
23
|
+
content,
|
|
24
|
+
imageUrl,
|
|
25
|
+
isLoading = false,
|
|
26
|
+
isFavorite = false,
|
|
27
|
+
isDescriptionIcon,
|
|
28
|
+
isDescriptionLabel,
|
|
29
|
+
isExpandButton = false,
|
|
30
|
+
buttonText,
|
|
31
|
+
buttonClass,
|
|
32
|
+
onClickBtn,
|
|
33
|
+
onClickFavorite,
|
|
34
|
+
}: CardHighlightProps = $props();
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<article
|
|
38
|
+
class="flex flex-col gap-1 bg-white dark:bg-background p-3 rounded-lg shadow border"
|
|
39
|
+
>
|
|
40
|
+
<aside class="relative rounded-lg border h-36">
|
|
41
|
+
<div class="absolute top-3 left-1 z-2 flex gap-1">
|
|
42
|
+
<CardLogo {isLoading} {logo} />
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div class="absolute top-3 right-1 z-2">
|
|
46
|
+
<CardFavorite
|
|
47
|
+
{id}
|
|
48
|
+
{isFavorite}
|
|
49
|
+
{isLoading}
|
|
50
|
+
onFavoriteClick={() => onClickFavorite?.(id)}
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
{#if isLoading}
|
|
55
|
+
<Skeleton class="rounded-lg w-full h-full object-cover object-center" />
|
|
56
|
+
{:else if imageUrl}
|
|
57
|
+
<img
|
|
58
|
+
src={imageUrl}
|
|
59
|
+
alt={imageUrl}
|
|
60
|
+
class="rounded-lg w-full h-full object-cover object-center"
|
|
61
|
+
onerror={(e) => ((e.target as HTMLImageElement).src = ImgPlaceholder)}
|
|
62
|
+
/>
|
|
63
|
+
{/if}
|
|
64
|
+
<div class="absolute inset-0 bg-black/5 rounded-sm h-full w-full"></div>
|
|
65
|
+
</aside>
|
|
66
|
+
<div class="px-2 w-55">
|
|
67
|
+
<div class="rounded-md">
|
|
68
|
+
{#if isLoading}
|
|
69
|
+
<Skeleton class="h-4 w-30 rounded-lg" />
|
|
70
|
+
{:else if title}
|
|
71
|
+
<div class="font-semibold my-2">{title}</div>
|
|
72
|
+
{/if}
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div class="my-2">
|
|
76
|
+
<CardDescription
|
|
77
|
+
{content}
|
|
78
|
+
{isLoading}
|
|
79
|
+
{isDescriptionIcon}
|
|
80
|
+
{isDescriptionLabel}
|
|
81
|
+
/>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
{#if tags && tags.length > 0}
|
|
85
|
+
<div class="my-2">
|
|
86
|
+
<CardTags {tags} {isLoading} />
|
|
87
|
+
</div>
|
|
88
|
+
{/if}
|
|
89
|
+
|
|
90
|
+
<CardButton
|
|
91
|
+
{id}
|
|
92
|
+
{isLoading}
|
|
93
|
+
className={buttonClass}
|
|
94
|
+
isFlex={isExpandButton}
|
|
95
|
+
onClick={() => onClickBtn!(id)}
|
|
96
|
+
text={buttonText || $t("label.buy")}
|
|
97
|
+
/>
|
|
98
|
+
</div>
|
|
99
|
+
</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}
|