negodesign 0.0.29 → 0.0.31
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.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/{BannerNotification.svelte → NotificationBanner.svelte} +4 -3
- package/dist/components/core/banner/NotificationBanner.svelte.d.ts +4 -0
- package/dist/components/core/banner/types.d.ts +38 -7
- package/dist/components/core/card/highlight/01/CardHighlight01.svelte +15 -26
- package/dist/components/core/card/highlight/02/CardHighlight02.svelte +13 -24
- package/dist/components/core/card/media/01/CardMedia01.svelte +2 -12
- package/dist/components/core/card/media/02/CardMedia02.svelte +2 -12
- package/dist/components/core/card/promotion/CardPromotion.svelte +5 -1
- package/dist/components/core/card/shared/CardButton.svelte +9 -3
- package/dist/components/core/card/shared/CardButton.svelte.d.ts +1 -1
- 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/CardThumbnailVideo.svelte +3 -0
- package/dist/components/core/card/types.d.ts +97 -0
- package/dist/components/core/carousel/grid/media/types.d.ts +11 -0
- package/dist/components/core/carousel/grid/media/ui/CarouselGridMedia.svelte +2 -1
- package/dist/components/core/carousel/grid/profile/types.d.ts +11 -0
- package/dist/components/core/carousel/grid/profile/ui/CarouselGridProfile.svelte +3 -5
- package/dist/components/core/carousel/grid/shared/ui/CarouselGridSlot.svelte +4 -9
- package/dist/components/core/carousel/grid/shared/ui/CarouselGridSlot.svelte.d.ts +1 -0
- package/dist/components/core/carousel/highlights/types.d.ts +11 -0
- package/dist/components/core/carousel/promotion/types.d.ts +10 -0
- package/dist/components/core/carousel/types.d.ts +56 -0
- package/dist/components/core/datatable/data/data-table.d.ts +25 -0
- package/dist/components/core/footer/types.d.ts +51 -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/nav/data/nav-menu-sidebar.d.ts +29 -0
- package/dist/components/core/nav/data/nav-menu.d.ts +43 -0
- package/dist/components/core/nav/data/nav-user-sidebar.d.ts +14 -0
- package/dist/components/core/nav/ui/menu-links.svelte +1 -1
- package/dist/components/core/panel/CarouselSlot.svelte +2 -2
- package/dist/components/core/panel/LeftHero.svelte +2 -2
- package/dist/components/core/panel/type.d.ts +11 -0
- package/dist/components/core/search/types.d.ts +17 -5
- package/dist/components/core/sidebar/types.d.ts +19 -0
- package/dist/components/core/sidebar/types.js +1 -0
- package/dist/components/core/tabs/data/TabModel.d.ts +11 -0
- package/dist/components/core/tabs/types.d.ts +11 -0
- package/dist/components/core/tabs/types.js +1 -0
- package/dist/components/pages/admin/01/ui/types.d.ts +21 -0
- package/dist/components/pages/admin/01/ui/types.js +1 -0
- package/dist/components/pages/product-details/01/ProductDetails01.svelte +71 -0
- package/dist/components/pages/product-details/01/ProductDetails01.svelte.d.ts +11 -0
- package/dist/components/pages/product-details/02/ProductDetails02.svelte +88 -0
- package/dist/components/pages/product-details/02/ProductDetails02.svelte.d.ts +11 -0
- package/dist/components/pages/product-details/03/ProductDetails03.svelte +77 -0
- package/dist/components/pages/product-details/03/ProductDetails03.svelte.d.ts +11 -0
- package/dist/components/pages/product-details/04/ProductDetails04.svelte +65 -0
- package/dist/components/pages/product-details/04/ProductDetails04.svelte.d.ts +11 -0
- package/dist/components/pages/product-details/ProductDetails.svelte +38 -0
- package/dist/components/pages/product-details/ProductDetails.svelte.d.ts +4 -0
- package/dist/components/pages/product-details/shared/ProductDetailActions.svelte +82 -0
- package/dist/components/pages/product-details/shared/ProductDetailActions.svelte.d.ts +13 -0
- package/dist/components/pages/product-details/shared/ProductDetailBreadcrumb.svelte +46 -0
- package/dist/components/pages/product-details/shared/ProductDetailBreadcrumb.svelte.d.ts +8 -0
- package/dist/components/pages/product-details/shared/ProductDetailDescription.svelte +38 -0
- package/dist/components/pages/product-details/shared/ProductDetailDescription.svelte.d.ts +8 -0
- package/dist/components/pages/product-details/shared/ProductDetailFeatures.svelte +40 -0
- package/dist/components/pages/product-details/shared/ProductDetailFeatures.svelte.d.ts +7 -0
- package/dist/components/pages/product-details/shared/ProductDetailFilesVertical.svelte +72 -0
- package/dist/components/pages/product-details/shared/ProductDetailFilesVertical.svelte.d.ts +9 -0
- package/dist/components/pages/product-details/shared/ProductDetailHeader.svelte +41 -0
- package/dist/components/pages/product-details/shared/ProductDetailHeader.svelte.d.ts +9 -0
- package/dist/components/pages/product-details/shared/ProductDetailImage.svelte +70 -0
- package/dist/components/pages/product-details/shared/ProductDetailImage.svelte.d.ts +9 -0
- package/dist/components/pages/product-details/shared/ProductDetailMap.svelte +57 -0
- package/dist/components/pages/product-details/shared/ProductDetailMap.svelte.d.ts +9 -0
- package/dist/components/pages/product-details/shared/ProductDetailPrice.svelte +44 -0
- package/dist/components/pages/product-details/shared/ProductDetailPrice.svelte.d.ts +9 -0
- package/dist/components/pages/product-details/shared/ProductDetailRating.svelte +42 -0
- package/dist/components/pages/product-details/shared/ProductDetailRating.svelte.d.ts +8 -0
- package/dist/components/pages/product-details/shared/ProductDetailReviews.svelte +70 -0
- package/dist/components/pages/product-details/shared/ProductDetailReviews.svelte.d.ts +8 -0
- package/dist/components/pages/product-details/shared/ProductDetailTabs.svelte +96 -0
- package/dist/components/pages/product-details/shared/ProductDetailTabs.svelte.d.ts +12 -0
- package/dist/components/pages/product-details/shared/ProductDetailTags.svelte +35 -0
- package/dist/components/pages/product-details/shared/ProductDetailTags.svelte.d.ts +8 -0
- package/dist/components/pages/product-details/shared/ProductPurchasePanel.svelte +58 -0
- package/dist/components/pages/product-details/shared/ProductPurchasePanel.svelte.d.ts +11 -0
- package/dist/components/pages/product-details/types.d.ts +170 -0
- package/dist/components/pages/product-details/types.js +1 -0
- package/dist/components/pages/profile-user/01/ProfileUser01.svelte +113 -0
- package/dist/components/pages/profile-user/01/ProfileUser01.svelte.d.ts +27 -0
- package/dist/components/pages/profile-user/02/ProfileUser02.svelte +83 -0
- package/dist/components/pages/profile-user/02/ProfileUser02.svelte.d.ts +20 -0
- package/dist/components/pages/profile-user/03/ProfileUser03.svelte +85 -0
- package/dist/components/pages/profile-user/03/ProfileUser03.svelte.d.ts +20 -0
- package/dist/components/pages/profile-user/ProfileUser.svelte +53 -0
- package/dist/components/pages/profile-user/ProfileUser.svelte.d.ts +4 -0
- package/dist/components/pages/profile-user/shared/ProfileUserAddress.svelte +84 -0
- package/dist/components/pages/profile-user/shared/ProfileUserAddress.svelte.d.ts +8 -0
- package/dist/components/pages/profile-user/shared/ProfileUserHeader.svelte +104 -0
- package/dist/components/pages/profile-user/shared/ProfileUserHeader.svelte.d.ts +9 -0
- package/dist/components/pages/profile-user/shared/ProfileUserResetPassword.svelte +116 -0
- package/dist/components/pages/profile-user/shared/ProfileUserResetPassword.svelte.d.ts +7 -0
- package/dist/components/pages/profile-user/shared/ProfileUserSetting.svelte +176 -0
- package/dist/components/pages/profile-user/shared/ProfileUserSetting.svelte.d.ts +14 -0
- package/dist/components/pages/profile-user/shared/ProfileUserTabs.svelte +78 -0
- package/dist/components/pages/profile-user/shared/ProfileUserTabs.svelte.d.ts +22 -0
- package/dist/components/pages/profile-user/types.d.ts +144 -0
- package/dist/components/pages/profile-user/types.js +1 -0
- package/dist/globals.css +319 -4
- package/dist/i18n/langs/en.d.ts +87 -0
- package/dist/i18n/langs/en.js +87 -0
- package/dist/i18n/langs/pt.d.ts +87 -0
- package/dist/i18n/langs/pt.js +93 -6
- package/dist/i18n/translations.d.ts +174 -0
- package/dist/index.d.ts +194 -27
- package/dist/index.js +194 -27
- package/dist/styles/globals.css +1 -1
- package/dist/types/index.d.ts +196 -5
- package/package.json +1 -1
- package/dist/components/core/banner/BannerNotification.svelte.d.ts +0 -4
- package/dist/components/core/banner/CardAdBanner.svelte.d.ts +0 -4
- /package/dist/components/core/banner/{CardAdBanner.svelte → AdCardBanner.svelte} +0 -0
|
Binary file
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { CtaCardBannerProps } from "./types";
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
title,
|
|
6
|
+
description,
|
|
7
|
+
primaryText,
|
|
8
|
+
secondaryText,
|
|
9
|
+
onClickPrimary,
|
|
10
|
+
onClickSecondary,
|
|
11
|
+
primaryHref,
|
|
12
|
+
secondaryHref,
|
|
13
|
+
class: className = "",
|
|
14
|
+
rings: customRings = [],
|
|
15
|
+
}: CtaCardBannerProps = $props();
|
|
16
|
+
|
|
17
|
+
// Painter's-algorithm rings: largest/darkest first, smallest/lightest last.
|
|
18
|
+
const rings = $derived(
|
|
19
|
+
customRings && customRings.length > 0
|
|
20
|
+
? customRings
|
|
21
|
+
: [
|
|
22
|
+
{ size: 920, color: "#2563EB" },
|
|
23
|
+
{ size: 760, color: "#3B76ED" },
|
|
24
|
+
{ size: 610, color: "#548BF0" },
|
|
25
|
+
{ size: 470, color: "#7FA6F3" },
|
|
26
|
+
{ size: 340, color: "#A9C2F6" },
|
|
27
|
+
{ size: 220, color: "#CFDEFA" },
|
|
28
|
+
{ size: 110, color: "#EEF3FD" },
|
|
29
|
+
],
|
|
30
|
+
);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
{#snippet pill(
|
|
34
|
+
label: string,
|
|
35
|
+
onClick: (() => void) | undefined,
|
|
36
|
+
href: string | undefined,
|
|
37
|
+
)}
|
|
38
|
+
{#snippet inner()}
|
|
39
|
+
<span class="whitespace-nowrap">{label}</span>
|
|
40
|
+
<span
|
|
41
|
+
class="flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-white"
|
|
42
|
+
>
|
|
43
|
+
<svg
|
|
44
|
+
width="12"
|
|
45
|
+
height="12"
|
|
46
|
+
viewBox="0 0 24 24"
|
|
47
|
+
fill="none"
|
|
48
|
+
stroke="#111"
|
|
49
|
+
stroke-width="2.2"
|
|
50
|
+
stroke-linecap="round"
|
|
51
|
+
stroke-linejoin="round"
|
|
52
|
+
aria-hidden="true"
|
|
53
|
+
>
|
|
54
|
+
<path d="M7 17 L17 7" />
|
|
55
|
+
<path d="M8 7 L17 7 L17 16" />
|
|
56
|
+
</svg>
|
|
57
|
+
</span>
|
|
58
|
+
{/snippet}
|
|
59
|
+
|
|
60
|
+
{#if href}
|
|
61
|
+
<a
|
|
62
|
+
{href}
|
|
63
|
+
class="inline-flex items-center gap-3 rounded-full bg-neutral-900 py-3 pr-2 pl-5 text-sm font-medium text-white transition-colors hover:bg-neutral-800"
|
|
64
|
+
>
|
|
65
|
+
{@render inner()}
|
|
66
|
+
</a>
|
|
67
|
+
{:else}
|
|
68
|
+
<button
|
|
69
|
+
type="button"
|
|
70
|
+
onclick={() => onClick?.()}
|
|
71
|
+
class="inline-flex items-center gap-3 rounded-full bg-neutral-900 py-3 pr-2 pl-5 text-sm font-medium text-white transition-colors hover:bg-neutral-800"
|
|
72
|
+
>
|
|
73
|
+
{@render inner()}
|
|
74
|
+
</button>
|
|
75
|
+
{/if}
|
|
76
|
+
{/snippet}
|
|
77
|
+
|
|
78
|
+
<article
|
|
79
|
+
class="relative isolate overflow-hidden rounded-lg bg-gradient p-1 shadow-sm {className}"
|
|
80
|
+
>
|
|
81
|
+
<div
|
|
82
|
+
class="relative overflow-hidden rounded-[1.35rem] px-6 py-10 sm:px-10 sm:py-12"
|
|
83
|
+
>
|
|
84
|
+
<!-- Concentric ring decoration -->
|
|
85
|
+
<div class="pointer-events-none absolute inset-0 -z-10" aria-hidden="true">
|
|
86
|
+
{#each rings as ring (ring.size)}
|
|
87
|
+
<div
|
|
88
|
+
class="absolute top-1/2 right-0 rounded-full"
|
|
89
|
+
style="
|
|
90
|
+
width: {ring.size}px;
|
|
91
|
+
height: {ring.size}px;
|
|
92
|
+
background: {ring.color};
|
|
93
|
+
transform: translate(45%, -50%);
|
|
94
|
+
"
|
|
95
|
+
></div>
|
|
96
|
+
{/each}
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<div class="relative z-10 max-w-md">
|
|
100
|
+
<h2 class="text-3xl font-extrabold text-white sm:text-4xl">
|
|
101
|
+
{title}
|
|
102
|
+
</h2>
|
|
103
|
+
|
|
104
|
+
{#if description}
|
|
105
|
+
<p class="mt-3 text-sm leading-relaxed text-white/85 sm:text-base">
|
|
106
|
+
{description}
|
|
107
|
+
</p>
|
|
108
|
+
{/if}
|
|
109
|
+
|
|
110
|
+
<div class="mt-7 flex flex-wrap items-center gap-3">
|
|
111
|
+
{@render pill(primaryText, onClickPrimary, primaryHref)}
|
|
112
|
+
{#if secondaryText}
|
|
113
|
+
{@render pill(secondaryText, onClickSecondary, secondaryHref)}
|
|
114
|
+
{/if}
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</article>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { NotificationBannerProps } from "./types";
|
|
3
3
|
|
|
4
4
|
let {
|
|
5
5
|
strongText,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
textClass = "text-gray-100",
|
|
13
13
|
ctaClass,
|
|
14
14
|
class: className = "",
|
|
15
|
-
}:
|
|
15
|
+
}: NotificationBannerProps = $props();
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<div
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
<strong class="font-semibold">{strongText}</strong><svg
|
|
46
46
|
viewBox="0 0 2 2"
|
|
47
47
|
aria-hidden="true"
|
|
48
|
-
class="mx-2 inline size-0.5 fill-current"
|
|
48
|
+
class="mx-2 inline size-0.5 fill-current"
|
|
49
|
+
><circle r="1" cx="1" cy="1" /></svg
|
|
49
50
|
>
|
|
50
51
|
{/if}
|
|
51
52
|
{description}
|
|
@@ -1,25 +1,35 @@
|
|
|
1
|
+
/** Props do componente AdCardBanner — banner de anúncio com faixa lateral colorida e CTA. */
|
|
1
2
|
export type BannerProps = {
|
|
2
|
-
/**
|
|
3
|
+
/** Texto mostrado na faixa lateral colorida, ex: "Este anúncio pode ser seu." */
|
|
3
4
|
tagText: string;
|
|
4
|
-
/**
|
|
5
|
+
/** Primeira parte do título (renderizada na cor de destaque âmbar) */
|
|
5
6
|
titleHighlight: string;
|
|
6
|
-
/**
|
|
7
|
+
/** Segunda parte do título (renderizada na cor verde de destaque) */
|
|
7
8
|
titleMain: string;
|
|
8
|
-
/**
|
|
9
|
+
/** Texto do botão CTA */
|
|
9
10
|
buttonText?: string;
|
|
10
|
-
/**
|
|
11
|
+
/** Chamado quando o botão CTA é clicado */
|
|
11
12
|
onClickButton?: () => void;
|
|
12
|
-
/**
|
|
13
|
+
/** href opcional — se fornecido, todo o card navega ao clicar */
|
|
13
14
|
href?: string;
|
|
15
|
+
/** Classe CSS adicional para o container */
|
|
14
16
|
class?: string;
|
|
17
|
+
/** Classe CSS para a parte highlight do título */
|
|
15
18
|
titleHighlightClass?: string;
|
|
19
|
+
/** Classe CSS para a parte principal do título */
|
|
16
20
|
titleMainClass?: string;
|
|
21
|
+
/** Classe CSS para o fundo do título */
|
|
17
22
|
titleBgClass?: string;
|
|
23
|
+
/** Classe CSS para o texto da tag lateral */
|
|
18
24
|
tagTextClass?: string;
|
|
25
|
+
/** Classe CSS para o botão */
|
|
19
26
|
buttonClass?: string;
|
|
27
|
+
/** Classe CSS para o fundo da tag lateral */
|
|
20
28
|
tagBgClass?: string;
|
|
21
29
|
};
|
|
22
|
-
|
|
30
|
+
/** Alias para BannerProps — props do componente AdCardBanner. */
|
|
31
|
+
export type AdCardBannerProps = BannerProps;
|
|
32
|
+
export type NotificationBannerProps = {
|
|
23
33
|
/** Strong text before the separator, e.g. "GeneriCon 2023" */
|
|
24
34
|
strongText?: string;
|
|
25
35
|
/** Main description text */
|
|
@@ -40,3 +50,24 @@ export type BannerNotificationProps = {
|
|
|
40
50
|
ctaClass?: string;
|
|
41
51
|
class?: string;
|
|
42
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* "Let's get in touch" style CTA banner: bold title, supporting copy,
|
|
55
|
+
* and up to two pill-shaped action buttons, with a concentric-ring
|
|
56
|
+
* decoration bleeding off the right edge.
|
|
57
|
+
* @component
|
|
58
|
+
*/
|
|
59
|
+
export type CtaCardBannerProps = {
|
|
60
|
+
title: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
primaryText: string;
|
|
63
|
+
secondaryText?: string;
|
|
64
|
+
onClickPrimary?: () => void;
|
|
65
|
+
onClickSecondary?: () => void;
|
|
66
|
+
primaryHref?: string;
|
|
67
|
+
secondaryHref?: string;
|
|
68
|
+
class?: string;
|
|
69
|
+
rings?: Array<{
|
|
70
|
+
size: number;
|
|
71
|
+
color: string;
|
|
72
|
+
}>;
|
|
73
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import Button from "../../../../ui/button/button.svelte";
|
|
3
2
|
import Skeleton from "../../../../ui/skeleton/skeleton.svelte";
|
|
4
|
-
import
|
|
3
|
+
import ImgPlaceholder from "../../../../../assets/placeholder-image.png";
|
|
5
4
|
import CardDescription from "../../shared/CardDescription.svelte";
|
|
6
5
|
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
7
6
|
import CardTags from "../../shared/CardTags.svelte";
|
|
8
|
-
import ImgPlaceholderCompany from "../../../../../assets/placeholder-company.png";
|
|
9
|
-
import ImgPlaceholder from "../../../../../assets/placeholder-image.png";
|
|
10
7
|
|
|
11
8
|
/**
|
|
12
9
|
* Card component with a title and content.
|
|
13
10
|
* @component
|
|
14
11
|
*/
|
|
15
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
16
|
|
|
17
17
|
let {
|
|
18
18
|
id,
|
|
@@ -24,8 +24,10 @@
|
|
|
24
24
|
isLoading = false,
|
|
25
25
|
isFavorite = false,
|
|
26
26
|
buttonText,
|
|
27
|
+
buttonClass,
|
|
27
28
|
isDescriptionIcon,
|
|
28
29
|
isDescriptionLabel,
|
|
30
|
+
isExpandButton = false,
|
|
29
31
|
onClickBtn,
|
|
30
32
|
onClickFavorite,
|
|
31
33
|
}: CardHighlightProps = $props();
|
|
@@ -36,21 +38,7 @@
|
|
|
36
38
|
>
|
|
37
39
|
<aside class="relative rounded-lg border h-50">
|
|
38
40
|
<div class="absolute top-3 left-1 z-2 flex gap-1 w-50">
|
|
39
|
-
{
|
|
40
|
-
<Skeleton class="w-hull h-full rounded-lg" />
|
|
41
|
-
{:else if logo}
|
|
42
|
-
<img
|
|
43
|
-
src={logo}
|
|
44
|
-
alt={`Logo company ${title}`}
|
|
45
|
-
class="rounded-lg w-8 h-8 object-cover object-center"
|
|
46
|
-
/>
|
|
47
|
-
{:else}
|
|
48
|
-
<img
|
|
49
|
-
src={ImgPlaceholderCompany}
|
|
50
|
-
alt={logo}
|
|
51
|
-
class="rounded-lg w-8 h-8 object-cover object-center"
|
|
52
|
-
/>
|
|
53
|
-
{/if}
|
|
41
|
+
<CardLogo {isLoading} {logo} />
|
|
54
42
|
</div>
|
|
55
43
|
|
|
56
44
|
<div class="absolute top-3 right-1 z-2">
|
|
@@ -103,12 +91,13 @@
|
|
|
103
91
|
</div>
|
|
104
92
|
{/if}
|
|
105
93
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
94
|
+
<CardButton
|
|
95
|
+
{id}
|
|
96
|
+
{isLoading}
|
|
97
|
+
className={buttonClass}
|
|
98
|
+
isFlex={isExpandButton}
|
|
99
|
+
onClick={() => onClickBtn!(id)}
|
|
100
|
+
text={buttonText || $t("label.buy")}
|
|
101
|
+
/>
|
|
113
102
|
</div>
|
|
114
103
|
</article>
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
* @component
|
|
13
13
|
*/
|
|
14
14
|
import type { CardHighlightProps } from "../../types";
|
|
15
|
+
import CardButton from "../../shared/CardButton.svelte";
|
|
16
|
+
import CardLogo from "../../shared/CardLogo.svelte";
|
|
15
17
|
|
|
16
18
|
let {
|
|
17
19
|
id,
|
|
@@ -24,7 +26,9 @@
|
|
|
24
26
|
isFavorite = false,
|
|
25
27
|
isDescriptionIcon,
|
|
26
28
|
isDescriptionLabel,
|
|
29
|
+
isExpandButton = false,
|
|
27
30
|
buttonText,
|
|
31
|
+
buttonClass,
|
|
28
32
|
onClickBtn,
|
|
29
33
|
onClickFavorite,
|
|
30
34
|
}: CardHighlightProps = $props();
|
|
@@ -35,23 +39,7 @@
|
|
|
35
39
|
>
|
|
36
40
|
<aside class="relative rounded-lg border h-36">
|
|
37
41
|
<div class="absolute top-3 left-1 z-2 flex gap-1">
|
|
38
|
-
{
|
|
39
|
-
<Skeleton class="w-full h-full rounded-lg" />
|
|
40
|
-
{:else if logo}
|
|
41
|
-
<img
|
|
42
|
-
src={logo}
|
|
43
|
-
alt={logo}
|
|
44
|
-
class="rounded-lg w-8 h-8 object-cover object-center"
|
|
45
|
-
onerror={(e) =>
|
|
46
|
-
((e.target as HTMLImageElement).src = ImgPlaceholderCompany)}
|
|
47
|
-
/>
|
|
48
|
-
{:else}
|
|
49
|
-
<img
|
|
50
|
-
src={ImgPlaceholderCompany}
|
|
51
|
-
alt={logo}
|
|
52
|
-
class="rounded-lg w-8 h-8 object-cover object-center"
|
|
53
|
-
/>
|
|
54
|
-
{/if}
|
|
42
|
+
<CardLogo {isLoading} {logo} />
|
|
55
43
|
</div>
|
|
56
44
|
|
|
57
45
|
<div class="absolute top-3 right-1 z-2">
|
|
@@ -99,12 +87,13 @@
|
|
|
99
87
|
</div>
|
|
100
88
|
{/if}
|
|
101
89
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
90
|
+
<CardButton
|
|
91
|
+
{id}
|
|
92
|
+
{isLoading}
|
|
93
|
+
className={buttonClass}
|
|
94
|
+
isFlex={isExpandButton}
|
|
95
|
+
onClick={() => onClickBtn!(id)}
|
|
96
|
+
text={buttonText || $t("label.buy")}
|
|
97
|
+
/>
|
|
109
98
|
</div>
|
|
110
99
|
</article>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import CardButton from "../../shared/CardButton.svelte";
|
|
14
14
|
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
15
15
|
import Skeleton from "../../../../ui/skeleton/skeleton.svelte";
|
|
16
|
-
import
|
|
16
|
+
import CardLogo from "../../shared/CardLogo.svelte";
|
|
17
17
|
|
|
18
18
|
let {
|
|
19
19
|
id,
|
|
@@ -49,17 +49,7 @@
|
|
|
49
49
|
<div class="flex justify-between items-center w-full mb-4">
|
|
50
50
|
<div class="flex justify-start gap-2">
|
|
51
51
|
<div class="flex justify-center items-center">
|
|
52
|
-
{
|
|
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}
|
|
52
|
+
<CardLogo {logo} {isLoading} />
|
|
63
53
|
</div>
|
|
64
54
|
<div class="flex-col">
|
|
65
55
|
{#if title}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import CardButton from "../../shared/CardButton.svelte";
|
|
14
14
|
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
15
15
|
import Skeleton from "../../../../ui/skeleton/skeleton.svelte";
|
|
16
|
-
import
|
|
16
|
+
import CardLogo from "../../shared/CardLogo.svelte";
|
|
17
17
|
let {
|
|
18
18
|
id,
|
|
19
19
|
tags,
|
|
@@ -49,17 +49,7 @@
|
|
|
49
49
|
<div class="flex flex-col justify-center items-center w-full relative">
|
|
50
50
|
<div class="flex flex-col justify-start gap-2">
|
|
51
51
|
<div class="flex justify-center items-center">
|
|
52
|
-
{
|
|
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}
|
|
52
|
+
<CardLogo {logo} {isLoading} />
|
|
63
53
|
</div>
|
|
64
54
|
<div class="flex flex-col justify-center items-center">
|
|
65
55
|
{#if title}
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
oldPrice,
|
|
30
30
|
content,
|
|
31
31
|
buttonBuyText,
|
|
32
|
+
buttonBuyClass,
|
|
32
33
|
isDescriptionIcon,
|
|
33
34
|
isDescriptionLabel,
|
|
34
35
|
onClickBuy,
|
|
@@ -127,7 +128,10 @@
|
|
|
127
128
|
{#if isLoading}
|
|
128
129
|
<Skeleton class="h-9 w-full rounded-md" />
|
|
129
130
|
{:else}
|
|
130
|
-
<Button
|
|
131
|
+
<Button
|
|
132
|
+
onclick={() => onClickBuy!(id)}
|
|
133
|
+
class="w-full bottom-0 bg-gradient {buttonBuyClass}"
|
|
134
|
+
>
|
|
131
135
|
{buttonBuyText || $t("label.buy")}
|
|
132
136
|
</Button>
|
|
133
137
|
{/if}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
type CardButtonProps = {
|
|
7
7
|
id: string | number;
|
|
8
|
-
icon
|
|
8
|
+
icon?: IconSvgElement | string;
|
|
9
9
|
isFlex?: boolean;
|
|
10
10
|
className?: string;
|
|
11
11
|
text: string;
|
|
@@ -30,10 +30,16 @@
|
|
|
30
30
|
/>
|
|
31
31
|
{:else}
|
|
32
32
|
<Button
|
|
33
|
-
class="{isFlex ? 'flex-1' : ''} {className}"
|
|
33
|
+
class="bg-gradient {isFlex ? 'flex-1' : ''} {className}"
|
|
34
34
|
onclick={() => onClick(id)}
|
|
35
35
|
>
|
|
36
|
-
|
|
36
|
+
{#if icon}
|
|
37
|
+
{#if typeof icon === "string"}
|
|
38
|
+
<i class={icon}></i>
|
|
39
|
+
{:else}
|
|
40
|
+
<HugeiconsIcon {icon} />
|
|
41
|
+
{/if}
|
|
42
|
+
{/if}
|
|
37
43
|
<span>{text}</span>
|
|
38
44
|
</Button>
|
|
39
45
|
{/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}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
} from "@hugeicons/core-free-icons";
|
|
14
14
|
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
15
15
|
import ImgPlaceholder from "../../../../assets/placeholder-image.png";
|
|
16
|
+
import VideoPlaceholder from "../../../../assets/lonely-404.mp4";
|
|
16
17
|
|
|
17
18
|
type Props = {
|
|
18
19
|
imageUrl?: string;
|
|
@@ -146,6 +147,8 @@
|
|
|
146
147
|
muted
|
|
147
148
|
loop
|
|
148
149
|
playsinline
|
|
150
|
+
onerror={(e) =>
|
|
151
|
+
((e.target as HTMLImageElement).src = VideoPlaceholder)}
|
|
149
152
|
></video>
|
|
150
153
|
{/if}
|
|
151
154
|
|