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,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,112 +1,133 @@
|
|
|
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 CardDescription from "../shared/CardDescription.svelte";
|
|
7
|
-
import CardFavorite from "../shared/CardFavorite.svelte";
|
|
8
|
-
import CardStartPrice from "../shared/CardStartPrice.svelte";
|
|
9
|
-
import CardTags from "../shared/CardTags.svelte";
|
|
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
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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 CardDescription from "../shared/CardDescription.svelte";
|
|
7
|
+
import CardFavorite from "../shared/CardFavorite.svelte";
|
|
8
|
+
import CardStartPrice from "../shared/CardStartPrice.svelte";
|
|
9
|
+
import CardTags from "../shared/CardTags.svelte";
|
|
10
|
+
import ImgPlaceHolderGallery from "../../../../assets/placeholder-image.png";
|
|
11
|
+
import ImgPlaceholderCompany from "../../../../assets/placeholder-company.png";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Card component with a title and content.
|
|
15
|
+
* @component
|
|
16
|
+
*/
|
|
17
|
+
import type { CardPromotionProps } from "../types";
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
id,
|
|
21
|
+
tags,
|
|
22
|
+
logo,
|
|
23
|
+
title,
|
|
24
|
+
imageUrl,
|
|
25
|
+
isFavorite = false,
|
|
26
|
+
isCart = false,
|
|
27
|
+
isLoading = false,
|
|
28
|
+
newPrice,
|
|
29
|
+
oldPrice,
|
|
30
|
+
content,
|
|
31
|
+
buttonBuyText,
|
|
32
|
+
isDescriptionIcon,
|
|
33
|
+
isDescriptionLabel,
|
|
34
|
+
onClickBuy,
|
|
35
|
+
onClickShop,
|
|
36
|
+
onClickFavorite,
|
|
37
|
+
}: CardPromotionProps = $props();
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<article class="relative rounded-lg border">
|
|
41
|
+
<aside class="relative w-full">
|
|
42
|
+
<div class="absolute top-1 left-1 z-2 gap-1 p-2">
|
|
43
|
+
{#if isLoading}
|
|
44
|
+
<Skeleton class="h-5 w-20 rounded-full bg-black/20" />
|
|
45
|
+
{:else if logo}
|
|
46
|
+
<img
|
|
47
|
+
src={logo}
|
|
48
|
+
width={30}
|
|
49
|
+
height={30}
|
|
50
|
+
alt={title}
|
|
51
|
+
onerror={(e) =>
|
|
52
|
+
((e.target as HTMLImageElement).src = ImgPlaceholderCompany)}
|
|
53
|
+
class="rounded-lg"
|
|
54
|
+
/>
|
|
55
|
+
{:else}
|
|
56
|
+
<img
|
|
57
|
+
src={ImgPlaceholderCompany}
|
|
58
|
+
width={30}
|
|
59
|
+
height={30}
|
|
60
|
+
alt={title}
|
|
61
|
+
class="rounded-lg"
|
|
62
|
+
/>
|
|
63
|
+
{/if}
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div class="absolute top-1 right-1 z-2 flex items-center gap-1 p-2">
|
|
67
|
+
<CardFavorite
|
|
68
|
+
{id}
|
|
69
|
+
{isFavorite}
|
|
70
|
+
{isLoading}
|
|
71
|
+
onFavoriteClick={onClickFavorite}
|
|
72
|
+
/>
|
|
73
|
+
<CardCart {id} {isCart} {isLoading} onCartClick={onClickShop} />
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
{#if isLoading}
|
|
77
|
+
<Skeleton
|
|
78
|
+
class="rounded-lg h-30 w-full object-cover object-center bg-black/15"
|
|
79
|
+
/>
|
|
80
|
+
{:else if imageUrl}
|
|
81
|
+
<img
|
|
82
|
+
src={imageUrl}
|
|
83
|
+
alt={imageUrl}
|
|
84
|
+
class="rounded-tr-lg rounded-tl-lg h-36 w-full object-cover object-center"
|
|
85
|
+
onerror={(e) =>
|
|
86
|
+
((e.target as HTMLImageElement).src = ImgPlaceHolderGallery)}
|
|
87
|
+
/>
|
|
88
|
+
{/if}
|
|
89
|
+
<div class="absolute inset-0 bg-black/5 rounded-sm h-full w-full"></div>
|
|
90
|
+
</aside>
|
|
91
|
+
|
|
92
|
+
<aside
|
|
93
|
+
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"
|
|
94
|
+
>
|
|
95
|
+
<div class="flex justify-between w-full items-center mb-1">
|
|
96
|
+
{#if title}
|
|
97
|
+
{#if isLoading}
|
|
98
|
+
<Skeleton class="h-4 w-30 rounded-lg" />
|
|
99
|
+
{:else}
|
|
100
|
+
<div class="font-semibold line-clamp-1 flex-nowrap">
|
|
101
|
+
{title}
|
|
102
|
+
</div>
|
|
103
|
+
{/if}
|
|
104
|
+
{/if}
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<div>
|
|
108
|
+
<CardDescription {content} {isDescriptionIcon} {isDescriptionLabel} />
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
<div class="w-full mb-2">
|
|
112
|
+
<CardTags {tags} />
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<div class="flex justify-start gap-2 w-full">
|
|
116
|
+
{#if isLoading}
|
|
117
|
+
<Skeleton class="h-5 bg-black/10 w-25 my-2 mr-2" />
|
|
118
|
+
{:else if newPrice || oldPrice}
|
|
119
|
+
<div>
|
|
120
|
+
<CardStartPrice {newPrice} {oldPrice} />
|
|
121
|
+
</div>
|
|
122
|
+
{/if}
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
{#if isLoading}
|
|
126
|
+
<Skeleton class="h-9 w-full rounded-md" />
|
|
127
|
+
{:else}
|
|
128
|
+
<Button onclick={() => onClickBuy!(id)} class="w-full">
|
|
129
|
+
{buttonBuyText || $t("label.buy")}
|
|
130
|
+
</Button>
|
|
131
|
+
{/if}
|
|
132
|
+
</aside>
|
|
133
|
+
</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,36 +1,36 @@
|
|
|
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
|
+
<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,38 +1,38 @@
|
|
|
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
|
-
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
7
|
-
|
|
8
|
-
type CardDescriptionProps = {
|
|
9
|
-
content?: string;
|
|
10
|
-
isLoading?: boolean;
|
|
11
|
-
isDescriptionIcon?: boolean;
|
|
12
|
-
isDescriptionLabel?: boolean;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
let {
|
|
16
|
-
content,
|
|
17
|
-
isLoading = false,
|
|
18
|
-
isDescriptionIcon = true,
|
|
19
|
-
isDescriptionLabel = true,
|
|
20
|
-
}: CardDescriptionProps = $props();
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
{#if isLoading}
|
|
24
|
-
<Skeleton class="w-full h-5" />
|
|
25
|
-
{:else if content}
|
|
26
|
-
{#if isDescriptionLabel}
|
|
27
|
-
<div class="mb-1 text-[14px] md:text-[15px] flex items-center gap-1">
|
|
28
|
-
{#if isDescriptionIcon}
|
|
29
|
-
<HugeiconsIcon icon={Message01Icon} class="h-4 w-4" />
|
|
30
|
-
{/if}
|
|
31
|
-
<div>{$t("label.description")}</div>
|
|
32
|
-
</div>
|
|
33
|
-
{/if}
|
|
34
|
-
<TruncatableText
|
|
35
|
-
text={content}
|
|
36
|
-
class="text-justify text-[13px] md:text-[14px] text-gray-800 dark:text-gray-50 mt-3 my-4"
|
|
37
|
-
/>
|
|
38
|
-
{/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
|
+
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
7
|
+
|
|
8
|
+
type CardDescriptionProps = {
|
|
9
|
+
content?: string;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
isDescriptionIcon?: boolean;
|
|
12
|
+
isDescriptionLabel?: boolean;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
content,
|
|
17
|
+
isLoading = false,
|
|
18
|
+
isDescriptionIcon = true,
|
|
19
|
+
isDescriptionLabel = true,
|
|
20
|
+
}: CardDescriptionProps = $props();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
{#if isLoading}
|
|
24
|
+
<Skeleton class="w-full h-5" />
|
|
25
|
+
{:else if content}
|
|
26
|
+
{#if isDescriptionLabel}
|
|
27
|
+
<div class="mb-1 text-[14px] md:text-[15px] flex items-center gap-1">
|
|
28
|
+
{#if isDescriptionIcon}
|
|
29
|
+
<HugeiconsIcon icon={Message01Icon} class="h-4 w-4" />
|
|
30
|
+
{/if}
|
|
31
|
+
<div>{$t("label.description")}</div>
|
|
32
|
+
</div>
|
|
33
|
+
{/if}
|
|
34
|
+
<TruncatableText
|
|
35
|
+
text={content}
|
|
36
|
+
class="text-justify text-[13px] md:text-[14px] text-gray-800 dark:text-gray-50 mt-3 my-4"
|
|
37
|
+
/>
|
|
38
|
+
{/if}
|
|
@@ -1,33 +1,33 @@
|
|
|
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
|
+
<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}
|