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,111 +1,127 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
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 { CardMediaProps } 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 CardThumbnailVideo from "../../shared/CardThumbnailVideo.svelte";
|
|
13
|
+
import CardButton from "../../shared/CardButton.svelte";
|
|
14
|
+
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
15
|
+
import Skeleton from "../../../../ui/skeleton/skeleton.svelte";
|
|
16
|
+
import CardLogo from "../../shared/CardLogo.svelte";
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
18
|
+
let {
|
|
19
|
+
id,
|
|
20
|
+
tags,
|
|
21
|
+
logo,
|
|
22
|
+
title,
|
|
23
|
+
content,
|
|
24
|
+
imageUrl,
|
|
25
|
+
videoUrl,
|
|
26
|
+
//videoAction,
|
|
27
|
+
startNumber,
|
|
28
|
+
startMax = 5,
|
|
29
|
+
isImageButtonMaximized = false,
|
|
30
|
+
isVideoButtonMaximized = false,
|
|
31
|
+
isTagBorderBottom = false,
|
|
32
|
+
isFavorite = false,
|
|
33
|
+
isLoading = false,
|
|
34
|
+
buttonProfileClass,
|
|
35
|
+
buttonDetailsClass,
|
|
36
|
+
onFavoriteClick,
|
|
37
|
+
onButtonProfile,
|
|
38
|
+
onButtonDetails,
|
|
39
|
+
}: CardMediaProps = $props();
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
let isShowButtonProfileAndDetails = $derived(
|
|
42
|
+
onButtonProfile != null && onButtonDetails != null,
|
|
43
|
+
);
|
|
44
44
|
</script>
|
|
45
45
|
|
|
46
46
|
<article
|
|
47
|
-
|
|
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
48
|
>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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>
|
|
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
|
+
<CardLogo {logo} {isLoading} />
|
|
53
|
+
</div>
|
|
54
|
+
<div class="flex-col">
|
|
55
|
+
{#if title}
|
|
56
|
+
<div class="text-center font-bold text-lg">{title}</div>
|
|
57
|
+
{:else if isLoading}
|
|
58
|
+
<Skeleton class="w-40 h-5 rounded-lg bg-gray-400 mb-0.5" />
|
|
59
|
+
{/if}
|
|
73
60
|
|
|
74
|
-
|
|
75
|
-
|
|
61
|
+
{#if startNumber}
|
|
62
|
+
<CardStarRating {startNumber} {startMax} {isLoading} />
|
|
63
|
+
{:else if isLoading}
|
|
64
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-300 mt-0.5" />
|
|
65
|
+
{/if}
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="flex justify-end items-center">
|
|
69
|
+
<CardFavorite
|
|
70
|
+
{id}
|
|
71
|
+
{isFavorite}
|
|
72
|
+
{isLoading}
|
|
73
|
+
onFavoriteClick={() => onFavoriteClick!(id)}
|
|
74
|
+
/>
|
|
76
75
|
</div>
|
|
76
|
+
</div>
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
<div class="h-15 my-2">
|
|
79
|
+
<CardDescription {content} {isLoading} />
|
|
80
|
+
</div>
|
|
79
81
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
<CardTags
|
|
83
|
+
className="my-6"
|
|
84
|
+
tags={tags ?? []}
|
|
85
|
+
{isTagBorderBottom}
|
|
86
|
+
{isLoading}
|
|
87
|
+
/>
|
|
86
88
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
89
|
+
<CardThumbnailVideo
|
|
90
|
+
{imageUrl}
|
|
91
|
+
{videoUrl}
|
|
92
|
+
{isImageButtonMaximized}
|
|
93
|
+
{isVideoButtonMaximized}
|
|
94
|
+
{isLoading}
|
|
95
|
+
/>
|
|
96
|
+
|
|
97
|
+
{#if onButtonProfile || onButtonDetails}
|
|
98
|
+
<div class="flex justify-center items-center gap-2 mt-4 w-full">
|
|
99
|
+
{#if onButtonProfile}
|
|
100
|
+
<CardButton
|
|
101
|
+
{id}
|
|
102
|
+
icon={UserIcon}
|
|
103
|
+
className={buttonProfileClass}
|
|
104
|
+
text={$t("label.view.profile")}
|
|
105
|
+
onClick={onButtonProfile}
|
|
106
|
+
isFlex={isShowButtonProfileAndDetails}
|
|
107
|
+
{isLoading}
|
|
108
|
+
/>
|
|
109
|
+
{:else if isLoading}
|
|
110
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
111
|
+
{/if}
|
|
112
|
+
{#if onButtonDetails}
|
|
113
|
+
<CardButton
|
|
114
|
+
{id}
|
|
115
|
+
icon={InformationCircleIcon}
|
|
116
|
+
className={buttonDetailsClass}
|
|
117
|
+
text={$t("label.more.details")}
|
|
118
|
+
onClick={onButtonDetails}
|
|
119
|
+
isFlex={isShowButtonProfileAndDetails}
|
|
120
|
+
{isLoading}
|
|
121
|
+
/>
|
|
122
|
+
{:else if isLoading}
|
|
123
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
124
|
+
{/if}
|
|
125
|
+
</div>
|
|
126
|
+
{/if}
|
|
111
127
|
</article>
|
|
@@ -1,110 +1,126 @@
|
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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 { CardMediaProps } 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 CardThumbnailVideo from "../../shared/CardThumbnailVideo.svelte";
|
|
13
|
+
import CardButton from "../../shared/CardButton.svelte";
|
|
14
|
+
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
15
|
+
import Skeleton from "../../../../ui/skeleton/skeleton.svelte";
|
|
16
|
+
import CardLogo from "../../shared/CardLogo.svelte";
|
|
17
|
+
let {
|
|
18
|
+
id,
|
|
19
|
+
tags,
|
|
20
|
+
logo,
|
|
21
|
+
title,
|
|
22
|
+
content,
|
|
23
|
+
className,
|
|
24
|
+
imageUrl,
|
|
25
|
+
videoUrl,
|
|
26
|
+
//videoAction,
|
|
27
|
+
startNumber,
|
|
28
|
+
startMax = 5,
|
|
29
|
+
isImageButtonMaximized = false,
|
|
30
|
+
isVideoButtonMaximized = false,
|
|
31
|
+
isTagBorderBottom = false,
|
|
32
|
+
isFavorite = false,
|
|
33
|
+
isLoading = false,
|
|
34
|
+
buttonProfileClass,
|
|
35
|
+
buttonDetailsClass,
|
|
36
|
+
onFavoriteClick,
|
|
37
|
+
onButtonProfile,
|
|
38
|
+
onButtonDetails,
|
|
39
|
+
}: CardMediaProps = $props();
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
let isShowButtonProfileAndDetails = $derived(
|
|
42
|
+
onButtonProfile != null && onButtonDetails != null,
|
|
43
|
+
);
|
|
44
44
|
</script>
|
|
45
45
|
|
|
46
46
|
<article
|
|
47
|
-
|
|
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 {className}"
|
|
48
48
|
>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
{#if startNumber}
|
|
61
|
-
<CardStarRating {startNumber} {startMax} />
|
|
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
|
-
/>
|
|
71
|
-
</div>
|
|
72
|
-
<CardTags className="my-4" tags={tags ?? []} {isTagBorderBottom} />
|
|
73
|
-
</div>
|
|
49
|
+
<div class="flex flex-col justify-center items-center w-full relative">
|
|
50
|
+
<div class="flex flex-col justify-start gap-2">
|
|
51
|
+
<div class="flex justify-center items-center">
|
|
52
|
+
<CardLogo {logo} {isLoading} />
|
|
53
|
+
</div>
|
|
54
|
+
<div class="flex flex-col justify-center items-center">
|
|
55
|
+
{#if title}
|
|
56
|
+
<div class="text-center font-bold text-lg">{title}</div>
|
|
57
|
+
{:else if isLoading}
|
|
58
|
+
<Skeleton class="w-40 h-5 rounded-lg bg-gray-400 mb-0.5" />
|
|
59
|
+
{/if}
|
|
74
60
|
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
{#if startNumber}
|
|
62
|
+
<CardStarRating {startNumber} {startMax} {isLoading} />
|
|
63
|
+
{:else if isLoading}
|
|
64
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-300 mt-0.5" />
|
|
65
|
+
{/if}
|
|
66
|
+
</div>
|
|
77
67
|
</div>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{
|
|
81
|
-
{
|
|
82
|
-
{
|
|
83
|
-
{
|
|
68
|
+
<div class="flex justify-end items-center absolute top-0 right-0">
|
|
69
|
+
<CardFavorite
|
|
70
|
+
{id}
|
|
71
|
+
{isFavorite}
|
|
72
|
+
onFavoriteClick={() => onFavoriteClick!(id)}
|
|
73
|
+
{isLoading}
|
|
74
|
+
/>
|
|
75
|
+
</div>
|
|
76
|
+
<CardTags
|
|
77
|
+
className="my-2"
|
|
78
|
+
tags={tags ?? []}
|
|
79
|
+
{isTagBorderBottom}
|
|
80
|
+
{isLoading}
|
|
84
81
|
/>
|
|
82
|
+
</div>
|
|
85
83
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
84
|
+
<div class="h-15 mb-4">
|
|
85
|
+
<CardDescription {content} {isLoading} />
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<CardThumbnailVideo
|
|
89
|
+
{imageUrl}
|
|
90
|
+
{videoUrl}
|
|
91
|
+
{isImageButtonMaximized}
|
|
92
|
+
{isVideoButtonMaximized}
|
|
93
|
+
{isLoading}
|
|
94
|
+
/>
|
|
95
|
+
|
|
96
|
+
{#if onButtonProfile || onButtonDetails}
|
|
97
|
+
<div class="flex justify-center items-center gap-2 mt-4 w-full">
|
|
98
|
+
{#if onButtonProfile}
|
|
99
|
+
<CardButton
|
|
100
|
+
{id}
|
|
101
|
+
icon={UserIcon}
|
|
102
|
+
className={buttonProfileClass}
|
|
103
|
+
text={$t("label.view.profile")}
|
|
104
|
+
onClick={onButtonProfile}
|
|
105
|
+
isFlex={isShowButtonProfileAndDetails}
|
|
106
|
+
{isLoading}
|
|
107
|
+
/>
|
|
108
|
+
{:else if isLoading}
|
|
109
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
110
|
+
{/if}
|
|
111
|
+
{#if onButtonDetails}
|
|
112
|
+
<CardButton
|
|
113
|
+
{id}
|
|
114
|
+
icon={InformationCircleIcon}
|
|
115
|
+
className={buttonDetailsClass}
|
|
116
|
+
text={$t("label.more.details")}
|
|
117
|
+
onClick={onButtonDetails}
|
|
118
|
+
isFlex={isShowButtonProfileAndDetails}
|
|
119
|
+
{isLoading}
|
|
120
|
+
/>
|
|
121
|
+
{:else if isLoading}
|
|
122
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
123
|
+
{/if}
|
|
124
|
+
</div>
|
|
125
|
+
{/if}
|
|
110
126
|
</article>
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { CardMediaProps } from "../types";
|
|
3
|
+
import CardMedia01 from "./01/CardMedia01.svelte";
|
|
4
|
+
import CardMedia02 from "./02/CardMedia02.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 }: CardMediaProps & Props = $props();
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
{#if variant === 2}
|
|
14
|
-
<CardMedia02 {...restProps} />
|
|
15
|
+
<CardMedia02 {...restProps} {isLoading} />
|
|
15
16
|
{:else}
|
|
16
|
-
<CardMedia01 {...restProps} />
|
|
17
|
+
<CardMedia01 {...restProps} {isLoading} />
|
|
17
18
|
{/if}
|