negodesign 0.0.28 → 0.0.30
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/lonely-404.mp4 +0 -0
- package/dist/components/core/banner/AdCardBanner.svelte +74 -0
- package/dist/components/core/banner/AdCardBanner.svelte.d.ts +4 -0
- package/dist/components/core/banner/CtaCardBanner.svelte +118 -0
- package/dist/components/core/banner/CtaCardBanner.svelte.d.ts +4 -0
- package/dist/components/core/banner/NotificationBanner.svelte +95 -0
- package/dist/components/core/banner/NotificationBanner.svelte.d.ts +4 -0
- package/dist/components/core/banner/types.d.ts +63 -0
- package/dist/components/core/banner/types.js +1 -0
- package/dist/components/core/card/highlight/01/CardHighlight01.svelte +20 -27
- package/dist/components/core/card/highlight/02/CardHighlight02.svelte +18 -27
- package/dist/components/core/card/highlight/data.js +1 -4
- package/dist/components/core/card/media/01/CardMedia01.svelte +114 -98
- package/dist/components/core/card/media/02/CardMedia02.svelte +115 -99
- package/dist/components/core/card/media/CardMedia.svelte +10 -9
- package/dist/components/core/card/media/CardMedia.svelte.d.ts +1 -0
- package/dist/components/core/card/profile/01/CardProfile01.svelte +104 -86
- package/dist/components/core/card/profile/02/CardProfile02.svelte +103 -87
- package/dist/components/core/card/profile/CardProfile.svelte +8 -7
- package/dist/components/core/card/profile/CardProfile.svelte.d.ts +1 -0
- package/dist/components/core/card/promotion/CardPromotion.svelte +10 -4
- package/dist/components/core/card/shared/CardButton.svelte +38 -23
- package/dist/components/core/card/shared/CardButton.svelte.d.ts +2 -1
- package/dist/components/core/card/shared/CardDescription.svelte +30 -30
- package/dist/components/core/card/shared/CardLogo.svelte +19 -0
- package/dist/components/core/card/shared/CardLogo.svelte.d.ts +7 -0
- package/dist/components/core/card/shared/CardStarRating.svelte +18 -14
- package/dist/components/core/card/shared/CardStarRating.svelte.d.ts +1 -0
- package/dist/components/core/card/shared/CardStartPrice.svelte +1 -1
- package/dist/components/core/card/shared/CardThumbnailVideo.svelte +210 -148
- package/dist/components/core/card/shared/CardThumbnailVideo.svelte.d.ts +1 -0
- package/dist/components/core/card/types.d.ts +5 -0
- package/dist/components/core/carousel/grid/media/types.d.ts +11 -0
- package/dist/components/core/carousel/grid/media/types.js +1 -0
- package/dist/components/core/carousel/grid/media/ui/CarouselGridMedia.svelte +49 -0
- package/dist/components/core/carousel/grid/media/ui/CarouselGridMedia.svelte.d.ts +4 -0
- package/dist/components/core/carousel/grid/profile/types.d.ts +11 -0
- package/dist/components/core/carousel/grid/profile/types.js +1 -0
- package/dist/components/core/carousel/grid/profile/ui/CarouselGridProfile.svelte +49 -0
- package/dist/components/core/carousel/grid/profile/ui/CarouselGridProfile.svelte.d.ts +4 -0
- package/dist/components/core/carousel/grid/shared/ui/CarouselGridSlot.svelte +33 -0
- package/dist/components/core/carousel/grid/shared/ui/CarouselGridSlot.svelte.d.ts +11 -0
- package/dist/components/core/carousel/hero/CarouselHero.svelte +21 -19
- package/dist/components/core/carousel/hero/CarouselHero.svelte.d.ts +1 -0
- package/dist/components/core/carousel/highlights/types.d.ts +4 -4
- package/dist/components/core/carousel/highlights/ui/CarouselHighlights.svelte +4 -22
- package/dist/components/core/carousel/promotion/types.d.ts +5 -5
- package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte +4 -21
- package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte +6 -1
- package/dist/components/core/carousel/types.d.ts +1 -0
- package/dist/components/core/footer/types.d.ts +23 -0
- package/dist/components/core/footer/types.js +1 -0
- package/dist/components/core/footer/ui/01/Footer01.svelte +76 -0
- package/dist/components/core/footer/ui/01/Footer01.svelte.d.ts +4 -0
- package/dist/components/core/footer/ui/02/Footer02.svelte +53 -0
- package/dist/components/core/footer/ui/02/Footer02.svelte.d.ts +4 -0
- package/dist/components/core/footer/ui/Footer.svelte +18 -0
- package/dist/components/core/footer/ui/Footer.svelte.d.ts +7 -0
- package/dist/components/core/footer/ui/shared/FooterColumn.svelte +18 -0
- package/dist/components/core/footer/ui/shared/FooterColumn.svelte.d.ts +4 -0
- package/dist/components/core/footer/ui/shared/FooterNewsLetter.svelte +57 -0
- package/dist/components/core/footer/ui/shared/FooterNewsLetter.svelte.d.ts +9 -0
- package/dist/components/core/footer/ui/shared/FooterSocialIcon.svelte +62 -0
- package/dist/components/core/footer/ui/shared/FooterSocialIcon.svelte.d.ts +4 -0
- package/dist/components/core/panel/CarouselSlot.svelte +4 -15
- package/dist/components/core/panel/CarouselSlot.svelte.d.ts +2 -12
- package/dist/components/core/panel/LeftHero.svelte +2 -2
- package/dist/components/core/panel/type.d.ts +11 -0
- package/dist/components/core/panel/type.js +1 -0
- package/dist/globals.css +463 -47
- package/dist/i18n/langs/en.d.ts +4 -0
- package/dist/i18n/langs/en.js +4 -0
- package/dist/i18n/langs/pt.d.ts +4 -0
- package/dist/i18n/langs/pt.js +10 -6
- package/dist/i18n/translations.d.ts +8 -0
- package/dist/index.d.ts +17 -5
- package/dist/index.js +17 -5
- package/dist/styles/globals.css +1 -1
- package/package.json +1 -1
|
@@ -1,98 +1,116 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import CardButton from "../../shared/CardButton.svelte";
|
|
16
|
-
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
2
|
+
/**
|
|
3
|
+
* Card component with a title and content.
|
|
4
|
+
* @component
|
|
5
|
+
*/
|
|
6
|
+
import { InformationCircleIcon, UserIcon } from "@hugeicons/core-free-icons";
|
|
7
|
+
import { t } from "../../../../../i18n";
|
|
8
|
+
import type { CardProfileProps } from "../../types";
|
|
9
|
+
import CardStarRating from "../../shared/CardStarRating.svelte";
|
|
10
|
+
import CardDescription from "../../shared/CardDescription.svelte";
|
|
11
|
+
import CardTags from "../../shared/CardTags.svelte";
|
|
12
|
+
import CardButton from "../../shared/CardButton.svelte";
|
|
13
|
+
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
14
|
+
import Skeleton from "../../../../ui/skeleton/skeleton.svelte";
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
let {
|
|
17
|
+
id,
|
|
18
|
+
tags,
|
|
19
|
+
logo,
|
|
20
|
+
title,
|
|
21
|
+
content,
|
|
22
|
+
startNumber,
|
|
23
|
+
startMax = 5,
|
|
24
|
+
isTagBorderBottom = true,
|
|
25
|
+
isFavorite = false,
|
|
26
|
+
buttonProfileClass,
|
|
27
|
+
buttonDetailsClass,
|
|
28
|
+
isLoading = false,
|
|
29
|
+
onFavoriteClick,
|
|
30
|
+
onButtonProfile,
|
|
31
|
+
onButtonDetails,
|
|
32
|
+
}: CardProfileProps = $props();
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
let isShowButtonProfileAndDetails = $derived(
|
|
35
|
+
onButtonProfile != null && onButtonDetails != null,
|
|
36
|
+
);
|
|
38
37
|
</script>
|
|
39
38
|
|
|
40
39
|
<article
|
|
41
|
-
|
|
40
|
+
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"
|
|
42
41
|
>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</div>
|
|
59
|
-
<div class="flex justify-end items-center">
|
|
60
|
-
<CardFavorite
|
|
61
|
-
{id}
|
|
62
|
-
{isFavorite}
|
|
63
|
-
onFavoriteClick={() => onFavoriteClick!(id)}
|
|
64
|
-
/>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
42
|
+
<div class="flex justify-between items-center w-full mb-4">
|
|
43
|
+
<div class="flex justify-start gap-2">
|
|
44
|
+
<div class="flex justify-center items-center">
|
|
45
|
+
{#if isLoading}
|
|
46
|
+
<Skeleton class="w-12 h-12 rounded-lg bg-gray-300" />
|
|
47
|
+
{:else if logo}
|
|
48
|
+
<img src={logo} alt={logo} class="w-12 h-12 rounded-lg" />
|
|
49
|
+
{/if}
|
|
50
|
+
</div>
|
|
51
|
+
<div class="flex-col">
|
|
52
|
+
{#if title}
|
|
53
|
+
<div class="text-center font-bold text-lg">{title}</div>
|
|
54
|
+
{:else if isLoading}
|
|
55
|
+
<Skeleton class="w-40 h-5 rounded-lg bg-gray-400 mb-0.5" />
|
|
56
|
+
{/if}
|
|
67
57
|
|
|
68
|
-
|
|
69
|
-
|
|
58
|
+
{#if startNumber}
|
|
59
|
+
<CardStarRating {startNumber} {startMax} {isLoading} />
|
|
60
|
+
{:else if isLoading}
|
|
61
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-300 mt-0.5" />
|
|
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
|
+
{isLoading}
|
|
71
|
+
/>
|
|
70
72
|
</div>
|
|
73
|
+
</div>
|
|
71
74
|
|
|
72
|
-
|
|
75
|
+
<div class="h-15 my-2">
|
|
76
|
+
<CardDescription {content} {isLoading} />
|
|
77
|
+
</div>
|
|
73
78
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
79
|
+
<CardTags
|
|
80
|
+
className="my-6"
|
|
81
|
+
tags={tags ?? []}
|
|
82
|
+
{isTagBorderBottom}
|
|
83
|
+
{isLoading}
|
|
84
|
+
/>
|
|
85
|
+
|
|
86
|
+
{#if onButtonProfile || onButtonDetails}
|
|
87
|
+
<div class="flex justify-center items-center gap-2 mt-4 w-full">
|
|
88
|
+
{#if onButtonProfile}
|
|
89
|
+
<CardButton
|
|
90
|
+
{id}
|
|
91
|
+
icon={UserIcon}
|
|
92
|
+
className={buttonProfileClass}
|
|
93
|
+
text={$t("label.view.profile")}
|
|
94
|
+
onClick={onButtonProfile}
|
|
95
|
+
isFlex={isShowButtonProfileAndDetails}
|
|
96
|
+
{isLoading}
|
|
97
|
+
/>
|
|
98
|
+
{:else if isLoading}
|
|
99
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
100
|
+
{/if}
|
|
101
|
+
{#if onButtonDetails}
|
|
102
|
+
<CardButton
|
|
103
|
+
{id}
|
|
104
|
+
icon={InformationCircleIcon}
|
|
105
|
+
className={buttonDetailsClass}
|
|
106
|
+
text={$t("label.more.details")}
|
|
107
|
+
onClick={onButtonDetails}
|
|
108
|
+
isFlex={isShowButtonProfileAndDetails}
|
|
109
|
+
{isLoading}
|
|
110
|
+
/>
|
|
111
|
+
{:else if isLoading}
|
|
112
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
113
|
+
{/if}
|
|
114
|
+
</div>
|
|
115
|
+
{/if}
|
|
98
116
|
</article>
|
|
@@ -1,98 +1,114 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
33
|
-
}: CardProfileProps = $props();
|
|
2
|
+
/**
|
|
3
|
+
* Card component with a title and content.
|
|
4
|
+
* @component
|
|
5
|
+
*/
|
|
6
|
+
import { InformationCircleIcon, UserIcon } from "@hugeicons/core-free-icons";
|
|
7
|
+
import { t } from "../../../../../i18n";
|
|
8
|
+
import type { CardProfileProps } from "../../types";
|
|
9
|
+
import CardStarRating from "../../shared/CardStarRating.svelte";
|
|
10
|
+
import CardTags from "../../shared/CardTags.svelte";
|
|
11
|
+
import CardDescription from "../../shared/CardDescription.svelte";
|
|
12
|
+
import CardButton from "../../shared/CardButton.svelte";
|
|
13
|
+
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
14
|
+
import Skeleton from "../../../../ui/skeleton/skeleton.svelte";
|
|
15
|
+
let {
|
|
16
|
+
id,
|
|
17
|
+
tags,
|
|
18
|
+
logo,
|
|
19
|
+
title,
|
|
20
|
+
content,
|
|
21
|
+
className,
|
|
22
|
+
startNumber,
|
|
23
|
+
startMax = 5,
|
|
24
|
+
isTagBorderBottom = true,
|
|
25
|
+
isFavorite = false,
|
|
26
|
+
buttonProfileClass,
|
|
27
|
+
buttonDetailsClass,
|
|
28
|
+
isLoading = false,
|
|
29
|
+
onFavoriteClick,
|
|
30
|
+
onButtonProfile,
|
|
31
|
+
onButtonDetails,
|
|
32
|
+
}: CardProfileProps = $props();
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
let isShowButtonProfileAndDetails = $derived(
|
|
35
|
+
onButtonProfile != null && onButtonDetails != null,
|
|
36
|
+
);
|
|
38
37
|
</script>
|
|
39
38
|
|
|
40
39
|
<article
|
|
41
|
-
|
|
40
|
+
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 {className}"
|
|
42
41
|
>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</div>
|
|
59
|
-
<div class="flex justify-end items-center absolute top-0 right-0">
|
|
60
|
-
<CardFavorite
|
|
61
|
-
{id}
|
|
62
|
-
{isFavorite}
|
|
63
|
-
onFavoriteClick={() => onFavoriteClick!(id)}
|
|
64
|
-
/>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
42
|
+
<div class="flex flex-col justify-center items-center w-full relative">
|
|
43
|
+
<div class="flex flex-col justify-start gap-2">
|
|
44
|
+
<div class="flex justify-center items-center">
|
|
45
|
+
{#if isLoading}
|
|
46
|
+
<Skeleton class="w-12 h-12 rounded-lg bg-gray-400 mt-0.5" />
|
|
47
|
+
{:else if logo}
|
|
48
|
+
<img src={logo} alt={logo} class="w-12 h-12 rounded-lg" />
|
|
49
|
+
{/if}
|
|
50
|
+
</div>
|
|
51
|
+
<div class="flex flex-col justify-center items-center">
|
|
52
|
+
{#if title}
|
|
53
|
+
<div class="text-center font-bold text-lg">{title}</div>
|
|
54
|
+
{:else if isLoading}
|
|
55
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
56
|
+
{/if}
|
|
67
57
|
|
|
68
|
-
|
|
69
|
-
|
|
58
|
+
{#if startNumber}
|
|
59
|
+
<CardStarRating {startNumber} {startMax} {isLoading} />
|
|
60
|
+
{:else if isLoading}
|
|
61
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-300 mt-0.5" />
|
|
62
|
+
{/if}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="flex justify-end items-center absolute top-0 right-0">
|
|
66
|
+
<CardFavorite
|
|
67
|
+
{id}
|
|
68
|
+
{isFavorite}
|
|
69
|
+
onFavoriteClick={() => onFavoriteClick!(id)}
|
|
70
|
+
{isLoading}
|
|
71
|
+
/>
|
|
70
72
|
</div>
|
|
73
|
+
</div>
|
|
71
74
|
|
|
72
|
-
|
|
75
|
+
<div class="h-15 mb-8">
|
|
76
|
+
<CardDescription {content} {isLoading} />
|
|
77
|
+
</div>
|
|
73
78
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
79
|
+
<CardTags
|
|
80
|
+
className="my-4"
|
|
81
|
+
tags={tags ?? []}
|
|
82
|
+
{isTagBorderBottom}
|
|
83
|
+
{isLoading}
|
|
84
|
+
/>
|
|
85
|
+
|
|
86
|
+
{#if onButtonProfile || onButtonDetails}
|
|
87
|
+
<div class="flex justify-center items-center gap-2 mt-4 w-full">
|
|
88
|
+
{#if onButtonProfile}
|
|
89
|
+
<CardButton
|
|
90
|
+
{id}
|
|
91
|
+
icon={UserIcon}
|
|
92
|
+
className={buttonProfileClass}
|
|
93
|
+
text={$t("label.view.profile")}
|
|
94
|
+
onClick={onButtonProfile}
|
|
95
|
+
isFlex={isShowButtonProfileAndDetails}
|
|
96
|
+
/>
|
|
97
|
+
{:else if isLoading}
|
|
98
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
99
|
+
{/if}
|
|
100
|
+
{#if onButtonDetails}
|
|
101
|
+
<CardButton
|
|
102
|
+
{id}
|
|
103
|
+
icon={InformationCircleIcon}
|
|
104
|
+
className={buttonDetailsClass}
|
|
105
|
+
text={$t("label.more.details")}
|
|
106
|
+
onClick={onButtonDetails}
|
|
107
|
+
isFlex={isShowButtonProfileAndDetails}
|
|
108
|
+
/>
|
|
109
|
+
{:else if isLoading}
|
|
110
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
111
|
+
{/if}
|
|
112
|
+
</div>
|
|
113
|
+
{/if}
|
|
98
114
|
</article>
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { CardProfileProps } from "../types";
|
|
3
|
+
import CardProfile01 from "./01/CardProfile01.svelte";
|
|
4
|
+
import CardProfile02 from "./02/CardProfile02.svelte";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
type Props = {
|
|
7
|
+
variant?: 1 | 2;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
};
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
let { variant, isLoading, ...restProps }: CardProfileProps & Props = $props();
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
{#if variant === 2}
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
oldPrice,
|
|
30
30
|
content,
|
|
31
31
|
buttonBuyText,
|
|
32
|
+
buttonBuyClass,
|
|
32
33
|
isDescriptionIcon,
|
|
33
34
|
isDescriptionLabel,
|
|
34
35
|
onClickBuy,
|
|
@@ -108,9 +109,11 @@
|
|
|
108
109
|
<CardDescription {content} {isDescriptionIcon} {isDescriptionLabel} />
|
|
109
110
|
</div>
|
|
110
111
|
|
|
111
|
-
|
|
112
|
-
<
|
|
113
|
-
|
|
112
|
+
{#if tags && tags.length > 0}
|
|
113
|
+
<div class="w-full mb-2">
|
|
114
|
+
<CardTags {tags} />
|
|
115
|
+
</div>
|
|
116
|
+
{/if}
|
|
114
117
|
|
|
115
118
|
<div class="flex justify-start gap-2 w-full">
|
|
116
119
|
{#if isLoading}
|
|
@@ -125,7 +128,10 @@
|
|
|
125
128
|
{#if isLoading}
|
|
126
129
|
<Skeleton class="h-9 w-full rounded-md" />
|
|
127
130
|
{:else}
|
|
128
|
-
<Button
|
|
131
|
+
<Button
|
|
132
|
+
onclick={() => onClickBuy!(id)}
|
|
133
|
+
class="w-full bottom-0 bg-gradient {buttonBuyClass}"
|
|
134
|
+
>
|
|
129
135
|
{buttonBuyText || $t("label.buy")}
|
|
130
136
|
</Button>
|
|
131
137
|
{/if}
|
|
@@ -1,30 +1,45 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { Button } from "../../../ui/button/index.js";
|
|
3
|
+
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
4
|
+
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/svelte";
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
type CardButtonProps = {
|
|
7
|
+
id: string | number;
|
|
8
|
+
icon?: IconSvgElement | string;
|
|
9
|
+
isFlex?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
text: string;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
onClick: (id: string | number) => void;
|
|
14
|
+
};
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
let {
|
|
17
|
+
id,
|
|
18
|
+
icon,
|
|
19
|
+
isFlex,
|
|
20
|
+
className,
|
|
21
|
+
text,
|
|
22
|
+
isLoading,
|
|
23
|
+
onClick,
|
|
24
|
+
}: CardButtonProps = $props();
|
|
22
25
|
</script>
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
{#if isLoading}
|
|
28
|
+
<Skeleton
|
|
29
|
+
class="w-full h-7.5 rounded-lg bg-gray-500/80 dark:bg-gray-500/30"
|
|
30
|
+
/>
|
|
31
|
+
{:else}
|
|
32
|
+
<Button
|
|
33
|
+
class="bg-gradient {isFlex ? 'flex-1' : ''} {className}"
|
|
26
34
|
onclick={() => onClick(id)}
|
|
27
|
-
>
|
|
28
|
-
|
|
35
|
+
>
|
|
36
|
+
{#if icon}
|
|
37
|
+
{#if typeof icon === "string"}
|
|
38
|
+
<i class={icon}></i>
|
|
39
|
+
{:else}
|
|
40
|
+
<HugeiconsIcon {icon} />
|
|
41
|
+
{/if}
|
|
42
|
+
{/if}
|
|
29
43
|
<span>{text}</span>
|
|
30
|
-
</Button>
|
|
44
|
+
</Button>
|
|
45
|
+
{/if}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type IconSvgElement } from "@hugeicons/svelte";
|
|
2
2
|
type CardButtonProps = {
|
|
3
3
|
id: string | number;
|
|
4
|
-
icon
|
|
4
|
+
icon?: IconSvgElement | string;
|
|
5
5
|
isFlex?: boolean;
|
|
6
6
|
className?: string;
|
|
7
7
|
text: string;
|
|
8
|
+
isLoading?: boolean;
|
|
8
9
|
onClick: (id: string | number) => void;
|
|
9
10
|
};
|
|
10
11
|
declare const CardButton: import("svelte").Component<CardButtonProps, {}, "">;
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
type CardDescriptionProps = {
|
|
9
|
+
content?: string;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
isDescriptionIcon?: boolean;
|
|
12
|
+
isDescriptionLabel?: boolean;
|
|
13
|
+
};
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
let {
|
|
16
|
+
content,
|
|
17
|
+
isLoading = false,
|
|
18
|
+
isDescriptionIcon = true,
|
|
19
|
+
isDescriptionLabel = true,
|
|
20
|
+
}: CardDescriptionProps = $props();
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
{#if isLoading}
|
|
24
|
-
|
|
24
|
+
<Skeleton class="w-full h-full bg-gray-500/89" />
|
|
25
25
|
{:else if content}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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}11
|
|
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
38
|
{/if}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
3
|
+
import ImgPlaceholderCompany from "../../../../assets/placeholder-company.png";
|
|
4
|
+
|
|
5
|
+
let { logo, isLoading = false }: { logo?: string; isLoading?: boolean } =
|
|
6
|
+
$props();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
{#if isLoading}
|
|
10
|
+
<Skeleton class="w-12 h-12 rounded-lg bg-gray-300" />
|
|
11
|
+
{:else if logo}
|
|
12
|
+
<img
|
|
13
|
+
src={logo}
|
|
14
|
+
alt={logo}
|
|
15
|
+
class="w-12 h-12 rounded-lg"
|
|
16
|
+
onerror={(e) =>
|
|
17
|
+
((e.target as HTMLImageElement).src = ImgPlaceholderCompany)}
|
|
18
|
+
/>
|
|
19
|
+
{/if}
|