negodesign 0.0.28 → 0.0.29
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/BannerNotification.svelte +94 -0
- package/dist/components/core/banner/BannerNotification.svelte.d.ts +4 -0
- package/dist/components/core/banner/CardAdBanner.svelte +74 -0
- package/dist/components/core/banner/CardAdBanner.svelte.d.ts +4 -0
- package/dist/components/core/banner/types.d.ts +42 -0
- package/dist/components/core/banner/types.js +1 -0
- package/dist/components/core/card/highlight/01/CardHighlight01.svelte +5 -1
- package/dist/components/core/card/highlight/02/CardHighlight02.svelte +5 -3
- package/dist/components/core/card/highlight/data.js +1 -4
- package/dist/components/core/card/media/01/CardMedia01.svelte +124 -98
- package/dist/components/core/card/media/02/CardMedia02.svelte +125 -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 +6 -4
- package/dist/components/core/card/shared/CardButton.svelte +30 -21
- package/dist/components/core/card/shared/CardButton.svelte.d.ts +1 -0
- package/dist/components/core/card/shared/CardDescription.svelte +30 -30
- 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 +207 -148
- package/dist/components/core/card/shared/CardThumbnailVideo.svelte.d.ts +1 -0
- package/dist/components/core/card/types.d.ts +2 -0
- package/dist/components/core/carousel/grid/media/types.d.ts +10 -0
- package/dist/components/core/carousel/grid/media/types.js +1 -0
- package/dist/components/core/carousel/grid/media/ui/CarouselGridMedia.svelte +48 -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 +10 -0
- package/dist/components/core/carousel/grid/profile/types.js +1 -0
- package/dist/components/core/carousel/grid/profile/ui/CarouselGridProfile.svelte +51 -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 +38 -0
- package/dist/components/core/carousel/grid/shared/ui/CarouselGridSlot.svelte.d.ts +10 -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/panel/CarouselSlot.svelte +3 -14
- package/dist/components/core/panel/CarouselSlot.svelte.d.ts +2 -12
- package/dist/components/core/panel/type.d.ts +11 -0
- package/dist/components/core/panel/type.js +1 -0
- package/dist/globals.css +351 -43
- package/dist/index.d.ts +15 -5
- package/dist/index.js +15 -5
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { BannerNotificationProps } from "./types";
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
strongText,
|
|
6
|
+
description,
|
|
7
|
+
ctaText,
|
|
8
|
+
ctaHref,
|
|
9
|
+
onCtaClick,
|
|
10
|
+
onDismiss,
|
|
11
|
+
bgClass = "bg-gray-800/50",
|
|
12
|
+
textClass = "text-gray-100",
|
|
13
|
+
ctaClass,
|
|
14
|
+
class: className = "",
|
|
15
|
+
}: BannerNotificationProps = $props();
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<div
|
|
19
|
+
class="relative isolate flex items-center gap-x-6 overflow-hidden {bgClass} px-6 py-2.5 after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-px after:bg-white/10 sm:px-3.5 sm:before:flex-1 {className}"
|
|
20
|
+
>
|
|
21
|
+
<!-- Blur decorations -->
|
|
22
|
+
<div
|
|
23
|
+
aria-hidden="true"
|
|
24
|
+
class="absolute top-1/2 left-[max(-7rem,calc(50%-52rem))] -z-10 -translate-y-1/2 transform-gpu blur-2xl"
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
style="clip-path: polygon(74.8% 41.9%, 97.2% 73.2%, 100% 34.9%, 92.5% 0.4%, 87.5% 0%, 75% 28.6%, 58.5% 54.6%, 50.1% 56.8%, 46.9% 44%, 48.3% 17.4%, 24.7% 53.9%, 0% 27.9%, 11.9% 74.2%, 24.9% 54.1%, 68.6% 100%, 74.8% 41.9%)"
|
|
28
|
+
class="aspect-577/310 w-144.25 bg-linear-to-r from-[#ff80b5] to-[#9089fc] opacity-40"
|
|
29
|
+
></div>
|
|
30
|
+
</div>
|
|
31
|
+
<div
|
|
32
|
+
aria-hidden="true"
|
|
33
|
+
class="absolute top-1/2 left-[max(45rem,calc(50%+8rem))] -z-10 -translate-y-1/2 transform-gpu blur-2xl"
|
|
34
|
+
>
|
|
35
|
+
<div
|
|
36
|
+
style="clip-path: polygon(74.8% 41.9%, 97.2% 73.2%, 100% 34.9%, 92.5% 0.4%, 87.5% 0%, 75% 28.6%, 58.5% 54.6%, 50.1% 56.8%, 46.9% 44%, 48.3% 17.4%, 24.7% 53.9%, 0% 27.9%, 11.9% 74.2%, 24.9% 54.1%, 68.6% 100%, 74.8% 41.9%)"
|
|
37
|
+
class="aspect-577/310 w-144.25 bg-linear-to-r from-[#ff80b5] to-[#9089fc] opacity-40"
|
|
38
|
+
></div>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<!-- Content -->
|
|
42
|
+
<div class="flex flex-wrap items-center gap-x-4 gap-y-2">
|
|
43
|
+
<p class="text-sm/6 {textClass}">
|
|
44
|
+
{#if strongText}
|
|
45
|
+
<strong class="font-semibold">{strongText}</strong><svg
|
|
46
|
+
viewBox="0 0 2 2"
|
|
47
|
+
aria-hidden="true"
|
|
48
|
+
class="mx-2 inline size-0.5 fill-current"><circle r="1" cx="1" cy="1" /></svg
|
|
49
|
+
>
|
|
50
|
+
{/if}
|
|
51
|
+
{description}
|
|
52
|
+
</p>
|
|
53
|
+
{#if ctaText}
|
|
54
|
+
{#if ctaHref}
|
|
55
|
+
<a
|
|
56
|
+
href={ctaHref}
|
|
57
|
+
class="flex-none rounded-full bg-white/10 px-3.5 py-1 text-sm font-semibold text-white shadow-xs inset-ring-white/20 hover:bg-white/15 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white {ctaClass}"
|
|
58
|
+
>
|
|
59
|
+
{ctaText} <span aria-hidden="true">→</span>
|
|
60
|
+
</a>
|
|
61
|
+
{:else}
|
|
62
|
+
<button
|
|
63
|
+
type="button"
|
|
64
|
+
onclick={onCtaClick}
|
|
65
|
+
class="flex-none rounded-full bg-white/10 px-3.5 py-1 text-sm font-semibold text-white shadow-xs inset-ring-white/20 hover:bg-white/15 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white {ctaClass}"
|
|
66
|
+
>
|
|
67
|
+
{ctaText} <span aria-hidden="true">→</span>
|
|
68
|
+
</button>
|
|
69
|
+
{/if}
|
|
70
|
+
{/if}
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<!-- Dismiss -->
|
|
74
|
+
<div class="flex flex-1 justify-end">
|
|
75
|
+
<button
|
|
76
|
+
type="button"
|
|
77
|
+
onclick={onDismiss}
|
|
78
|
+
class="-m-3 p-3 focus-visible:-outline-offset-4"
|
|
79
|
+
>
|
|
80
|
+
<span class="sr-only">Dismiss</span>
|
|
81
|
+
<svg
|
|
82
|
+
viewBox="0 0 20 20"
|
|
83
|
+
fill="currentColor"
|
|
84
|
+
data-slot="icon"
|
|
85
|
+
aria-hidden="true"
|
|
86
|
+
class="size-5 text-gray-100"
|
|
87
|
+
>
|
|
88
|
+
<path
|
|
89
|
+
d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"
|
|
90
|
+
/>
|
|
91
|
+
</svg>
|
|
92
|
+
</button>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
3
|
+
import Button from "../../ui/button/button.svelte";
|
|
4
|
+
import type { BannerProps } from "./types";
|
|
5
|
+
import { AdvertisimentIcon } from "@hugeicons/core-free-icons";
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
tagText,
|
|
9
|
+
titleHighlight,
|
|
10
|
+
titleMain,
|
|
11
|
+
buttonText = "Saiba mais",
|
|
12
|
+
onClickButton,
|
|
13
|
+
href,
|
|
14
|
+
class: className = "",
|
|
15
|
+
titleHighlightClass,
|
|
16
|
+
titleMainClass,
|
|
17
|
+
tagTextClass,
|
|
18
|
+
buttonClass,
|
|
19
|
+
titleBgClass,
|
|
20
|
+
tagBgClass,
|
|
21
|
+
}: BannerProps = $props();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
{#snippet content()}
|
|
25
|
+
<article
|
|
26
|
+
class="relative flex w-full items-stretch overflow-hidden rounded-lg border border-transparent {className}"
|
|
27
|
+
>
|
|
28
|
+
<!-- Left accent strip -->
|
|
29
|
+
<aside
|
|
30
|
+
class="flex w-28 shrink-0 flex-col justify-center gap-1 {tagBgClass ||
|
|
31
|
+
'bg-blue-400'} px-3 py-2 sm:w-32"
|
|
32
|
+
>
|
|
33
|
+
<HugeiconsIcon
|
|
34
|
+
icon={AdvertisimentIcon}
|
|
35
|
+
size={30}
|
|
36
|
+
color="#ffffff"
|
|
37
|
+
strokeWidth={1}
|
|
38
|
+
/>
|
|
39
|
+
<p
|
|
40
|
+
class={`text-sm leading-tight font-bold ${tagTextClass || "text-[#dce9e7]"}`}
|
|
41
|
+
>
|
|
42
|
+
{tagText}
|
|
43
|
+
</p>
|
|
44
|
+
</aside>
|
|
45
|
+
|
|
46
|
+
<!-- Main content -->
|
|
47
|
+
<div
|
|
48
|
+
class="flex flex-1 flex-wrap items-center justify-between gap-3 {titleBgClass ||
|
|
49
|
+
'bg-[#dabc16]'} px-4 py-3 sm:px-6"
|
|
50
|
+
>
|
|
51
|
+
<h3 class="text-lg font-extrabold tracking-tight sm:text-2xl">
|
|
52
|
+
<span class="{titleHighlightClass || 'text-white'} pr-2"
|
|
53
|
+
>{titleHighlight}</span
|
|
54
|
+
>
|
|
55
|
+
<span class={titleMainClass || "text-gray-200"}>{titleMain}</span>
|
|
56
|
+
</h3>
|
|
57
|
+
|
|
58
|
+
<Button
|
|
59
|
+
onclick={() => onClickButton?.()}
|
|
60
|
+
class="shrink-0 rounded-md bg-white px-4 py-2 text-sm font-medium text-indigo-600 hover:bg-white/90 {buttonClass}"
|
|
61
|
+
>
|
|
62
|
+
{buttonText}
|
|
63
|
+
</Button>
|
|
64
|
+
</div>
|
|
65
|
+
</article>
|
|
66
|
+
{/snippet}
|
|
67
|
+
|
|
68
|
+
{#if href}
|
|
69
|
+
<a {href} class="block">
|
|
70
|
+
{@render content()}
|
|
71
|
+
</a>
|
|
72
|
+
{:else}
|
|
73
|
+
{@render content()}
|
|
74
|
+
{/if}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type BannerProps = {
|
|
2
|
+
/** Text shown stacked inside the amber side strip, e.g. "Este anúncio pode ser seu." */
|
|
3
|
+
tagText: string;
|
|
4
|
+
/** First part of the headline (rendered in the amber accent color) */
|
|
5
|
+
titleHighlight: string;
|
|
6
|
+
/** Second part of the headline (rendered in the green accent color) */
|
|
7
|
+
titleMain: string;
|
|
8
|
+
/** CTA button label */
|
|
9
|
+
buttonText?: string;
|
|
10
|
+
/** Called when the CTA button is clicked */
|
|
11
|
+
onClickButton?: () => void;
|
|
12
|
+
/** Optional href — if provided, the whole card navigates on click */
|
|
13
|
+
href?: string;
|
|
14
|
+
class?: string;
|
|
15
|
+
titleHighlightClass?: string;
|
|
16
|
+
titleMainClass?: string;
|
|
17
|
+
titleBgClass?: string;
|
|
18
|
+
tagTextClass?: string;
|
|
19
|
+
buttonClass?: string;
|
|
20
|
+
tagBgClass?: string;
|
|
21
|
+
};
|
|
22
|
+
export type BannerNotificationProps = {
|
|
23
|
+
/** Strong text before the separator, e.g. "GeneriCon 2023" */
|
|
24
|
+
strongText?: string;
|
|
25
|
+
/** Main description text */
|
|
26
|
+
description: string;
|
|
27
|
+
/** CTA button label */
|
|
28
|
+
ctaText?: string;
|
|
29
|
+
/** CTA button href */
|
|
30
|
+
ctaHref?: string;
|
|
31
|
+
/** Called when the CTA button is clicked */
|
|
32
|
+
onCtaClick?: () => void;
|
|
33
|
+
/** Called when the dismiss button is clicked */
|
|
34
|
+
onDismiss?: () => void;
|
|
35
|
+
/** Background class, default: bg-gray-800/50 */
|
|
36
|
+
bgClass?: string;
|
|
37
|
+
/** Text class for the description */
|
|
38
|
+
textClass?: string;
|
|
39
|
+
/** CTA button class */
|
|
40
|
+
ctaClass?: string;
|
|
41
|
+
class?: string;
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -97,7 +97,11 @@
|
|
|
97
97
|
/>
|
|
98
98
|
</div>
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
{#if tags && tags.length > 0}
|
|
101
|
+
<div class="w-full mb-2">
|
|
102
|
+
<CardTags {tags} />
|
|
103
|
+
</div>
|
|
104
|
+
{/if}
|
|
101
105
|
|
|
102
106
|
{#if isLoading}
|
|
103
107
|
<Skeleton class="h-10 w-full rounded-md mt-2 md:mt-3" />
|
|
@@ -93,9 +93,11 @@
|
|
|
93
93
|
/>
|
|
94
94
|
</div>
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
<
|
|
98
|
-
|
|
96
|
+
{#if tags && tags.length > 0}
|
|
97
|
+
<div class="my-2">
|
|
98
|
+
<CardTags {tags} {isLoading} />
|
|
99
|
+
</div>
|
|
100
|
+
{/if}
|
|
99
101
|
|
|
100
102
|
{#if isLoading}
|
|
101
103
|
<Skeleton class="h-10 w-full rounded-md mt-2 md:mt-3" />
|
|
@@ -14,8 +14,7 @@ const items = [
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
id: 2,
|
|
17
|
-
|
|
18
|
-
imageUrl: undefined,
|
|
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',
|
|
19
18
|
title: 'Miramar Suites',
|
|
20
19
|
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",
|
|
21
20
|
tags: [
|
|
@@ -24,7 +23,6 @@ const items = [
|
|
|
24
23
|
{ icon: NecklaceIcon, text: 'Rua 19', },
|
|
25
24
|
]
|
|
26
25
|
},
|
|
27
|
-
/*
|
|
28
26
|
{
|
|
29
27
|
id: 3,
|
|
30
28
|
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',
|
|
@@ -60,6 +58,5 @@ const items = [
|
|
|
60
58
|
{ icon: NecklaceIcon, text: 'Rua 19', },
|
|
61
59
|
]
|
|
62
60
|
},
|
|
63
|
-
*/
|
|
64
61
|
];
|
|
65
62
|
export default items;
|
|
@@ -1,111 +1,137 @@
|
|
|
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 ImgPlaceholderCompany from "../../../../../assets/placeholder-company.png";
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
+
{#if isLoading}
|
|
53
|
+
<Skeleton class="w-12 h-12 rounded-lg bg-gray-300" />
|
|
54
|
+
{:else if logo}
|
|
55
|
+
<img
|
|
56
|
+
src={logo}
|
|
57
|
+
alt={logo}
|
|
58
|
+
class="w-12 h-12 rounded-lg"
|
|
59
|
+
onerror={(e) =>
|
|
60
|
+
((e.target as HTMLImageElement).src = ImgPlaceholderCompany)}
|
|
61
|
+
/>
|
|
62
|
+
{/if}
|
|
63
|
+
</div>
|
|
64
|
+
<div class="flex-col">
|
|
65
|
+
{#if title}
|
|
66
|
+
<div class="text-center font-bold text-lg">{title}</div>
|
|
67
|
+
{:else if isLoading}
|
|
68
|
+
<Skeleton class="w-40 h-5 rounded-lg bg-gray-400 mb-0.5" />
|
|
69
|
+
{/if}
|
|
73
70
|
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
{#if startNumber}
|
|
72
|
+
<CardStarRating {startNumber} {startMax} {isLoading} />
|
|
73
|
+
{:else if isLoading}
|
|
74
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-300 mt-0.5" />
|
|
75
|
+
{/if}
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="flex justify-end items-center">
|
|
79
|
+
<CardFavorite
|
|
80
|
+
{id}
|
|
81
|
+
{isFavorite}
|
|
82
|
+
{isLoading}
|
|
83
|
+
onFavoriteClick={() => onFavoriteClick!(id)}
|
|
84
|
+
/>
|
|
76
85
|
</div>
|
|
86
|
+
</div>
|
|
77
87
|
|
|
78
|
-
|
|
88
|
+
<div class="h-15 my-2">
|
|
89
|
+
<CardDescription {content} {isLoading} />
|
|
90
|
+
</div>
|
|
79
91
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
92
|
+
<CardTags
|
|
93
|
+
className="my-6"
|
|
94
|
+
tags={tags ?? []}
|
|
95
|
+
{isTagBorderBottom}
|
|
96
|
+
{isLoading}
|
|
97
|
+
/>
|
|
86
98
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
99
|
+
<CardThumbnailVideo
|
|
100
|
+
{imageUrl}
|
|
101
|
+
{videoUrl}
|
|
102
|
+
{isImageButtonMaximized}
|
|
103
|
+
{isVideoButtonMaximized}
|
|
104
|
+
{isLoading}
|
|
105
|
+
/>
|
|
106
|
+
|
|
107
|
+
{#if onButtonProfile || onButtonDetails}
|
|
108
|
+
<div class="flex justify-center items-center gap-2 mt-4 w-full">
|
|
109
|
+
{#if onButtonProfile}
|
|
110
|
+
<CardButton
|
|
111
|
+
{id}
|
|
112
|
+
icon={UserIcon}
|
|
113
|
+
className={buttonProfileClass}
|
|
114
|
+
text={$t("label.view.profile")}
|
|
115
|
+
onClick={onButtonProfile}
|
|
116
|
+
isFlex={isShowButtonProfileAndDetails}
|
|
117
|
+
{isLoading}
|
|
118
|
+
/>
|
|
119
|
+
{:else if isLoading}
|
|
120
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
121
|
+
{/if}
|
|
122
|
+
{#if onButtonDetails}
|
|
123
|
+
<CardButton
|
|
124
|
+
{id}
|
|
125
|
+
icon={InformationCircleIcon}
|
|
126
|
+
className={buttonDetailsClass}
|
|
127
|
+
text={$t("label.more.details")}
|
|
128
|
+
onClick={onButtonDetails}
|
|
129
|
+
isFlex={isShowButtonProfileAndDetails}
|
|
130
|
+
{isLoading}
|
|
131
|
+
/>
|
|
132
|
+
{:else if isLoading}
|
|
133
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
134
|
+
{/if}
|
|
135
|
+
</div>
|
|
136
|
+
{/if}
|
|
111
137
|
</article>
|