negodesign 0.0.50 → 0.0.52
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/card/profile/CardProfile.svelte +3 -3
- package/dist/components/core/card/shared/CardThumbnailVideo.svelte +6 -0
- package/dist/components/core/carousel/grid/media/types.d.ts +6 -0
- package/dist/components/core/carousel/grid/media/ui/CarouselGridMedia.svelte +29 -2
- package/dist/components/core/carousel/grid/product/ui/CarouselGridProduct.svelte +2 -2
- package/dist/components/pages/company-profile/CompanyProfile.svelte +4 -2
- package/dist/globals.css +3 -3
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { CardProfileProps } from "../types";
|
|
3
3
|
import CardProfile01 from "./01/CardProfile01.svelte";
|
|
4
4
|
import CardProfile02 from "./02/CardProfile02.svelte";
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
type Props = {
|
|
7
7
|
variant?: 1 | 2;
|
|
8
8
|
isLoading?: boolean;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
{#if variant === 2}
|
|
15
|
-
<CardProfile02 {...restProps} />
|
|
15
|
+
<CardProfile02 {...restProps} {isLoading} />
|
|
16
16
|
{:else}
|
|
17
|
-
<CardProfile01 {...restProps} />
|
|
17
|
+
<CardProfile01 {...restProps} {isLoading} />
|
|
18
18
|
{/if}
|
|
@@ -134,6 +134,12 @@
|
|
|
134
134
|
class:opacity-0={videoUrl && showVideo}
|
|
135
135
|
onerror={(e) => ((e.target as HTMLImageElement).src = ImgPlaceholder)}
|
|
136
136
|
/>
|
|
137
|
+
{:else}
|
|
138
|
+
<img
|
|
139
|
+
src={ImgPlaceholder}
|
|
140
|
+
alt={imageUrl}
|
|
141
|
+
class="rounded-lg w-50 h-[50px] object-cover object-center"
|
|
142
|
+
/>
|
|
137
143
|
{/if}
|
|
138
144
|
|
|
139
145
|
{#if videoUrl && isVisible}
|
|
@@ -22,4 +22,10 @@ export interface CarouselGridMediaProps {
|
|
|
22
22
|
items: CardMediaProps[];
|
|
23
23
|
/** Estado de carregamento (skeleton) */
|
|
24
24
|
isLoading?: boolean;
|
|
25
|
+
/** Callback acionado ao clicar no botão de favorito */
|
|
26
|
+
onFavoriteClick?: (id: string | number) => void;
|
|
27
|
+
/** Callback acionado ao clicar no botão de perfil */
|
|
28
|
+
onButtonProfile?: (id: string | number) => void;
|
|
29
|
+
/** Callback acionado ao clicar no botão de detalhes */
|
|
30
|
+
onButtonDetails?: (id: string | number) => void;
|
|
25
31
|
}
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
isLoading = false,
|
|
18
18
|
isDescriptionIcon,
|
|
19
19
|
isDescriptionLabel,
|
|
20
|
+
onFavoriteClick,
|
|
21
|
+
onButtonProfile,
|
|
22
|
+
onButtonDetails,
|
|
20
23
|
}: CarouselGridMediaProps = $props();
|
|
21
24
|
|
|
22
25
|
const responsive = useDevice();
|
|
@@ -34,7 +37,7 @@
|
|
|
34
37
|
{#if isLoading}
|
|
35
38
|
{#each Array.from( { length: responsive.isMobile ? 3 : 6 }, ) as _, i (`loading-${i}`)}
|
|
36
39
|
{#if responsive.isMobile}
|
|
37
|
-
<Carousel.Item class="pl-2 basis-auto w-
|
|
40
|
+
<Carousel.Item class="pl-2 basis-auto w-75">
|
|
38
41
|
<CardMedia id={i} {variant} isLoading />
|
|
39
42
|
</Carousel.Item>
|
|
40
43
|
{:else}
|
|
@@ -46,12 +49,24 @@
|
|
|
46
49
|
{:else}
|
|
47
50
|
{#each items as item, i (`media-${item.id ?? i}`)}
|
|
48
51
|
{#if responsive.isMobile}
|
|
49
|
-
<Carousel.Item class="pl-2 basis-auto w-
|
|
52
|
+
<Carousel.Item class="pl-2 basis-auto w-75">
|
|
50
53
|
<CardMedia
|
|
51
54
|
{...item}
|
|
52
55
|
{variant}
|
|
53
56
|
{isDescriptionIcon}
|
|
54
57
|
{isDescriptionLabel}
|
|
58
|
+
onFavoriteClick={(id: string | number) => {
|
|
59
|
+
item?.onFavoriteClick?.(id);
|
|
60
|
+
onFavoriteClick?.(id);
|
|
61
|
+
}}
|
|
62
|
+
onButtonProfile={(id: string | number) => {
|
|
63
|
+
item?.onButtonProfile?.(id);
|
|
64
|
+
onButtonProfile?.(id);
|
|
65
|
+
}}
|
|
66
|
+
onButtonDetails={(id: string | number) => {
|
|
67
|
+
item?.onButtonDetails?.(id);
|
|
68
|
+
onButtonDetails?.(id);
|
|
69
|
+
}}
|
|
55
70
|
/>
|
|
56
71
|
</Carousel.Item>
|
|
57
72
|
{:else}
|
|
@@ -61,6 +76,18 @@
|
|
|
61
76
|
{variant}
|
|
62
77
|
{isDescriptionIcon}
|
|
63
78
|
{isDescriptionLabel}
|
|
79
|
+
onFavoriteClick={(id: string | number) => {
|
|
80
|
+
item?.onFavoriteClick?.(id);
|
|
81
|
+
onFavoriteClick?.(id);
|
|
82
|
+
}}
|
|
83
|
+
onButtonProfile={(id: string | number) => {
|
|
84
|
+
item?.onButtonProfile?.(id);
|
|
85
|
+
onButtonProfile?.(id);
|
|
86
|
+
}}
|
|
87
|
+
onButtonDetails={(id: string | number) => {
|
|
88
|
+
item?.onButtonDetails?.(id);
|
|
89
|
+
onButtonDetails?.(id);
|
|
90
|
+
}}
|
|
64
91
|
/>
|
|
65
92
|
</div>
|
|
66
93
|
{/if}
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
{#if isLoading}
|
|
35
35
|
{#each Array.from( { length: responsive.isMobile ? 3 : 6 }, ) as _, i (`loading-${i}`)}
|
|
36
36
|
{#if responsive.isMobile}
|
|
37
|
-
<Carousel.Item class="pl-2 basis-auto w-
|
|
37
|
+
<Carousel.Item class="pl-2 basis-auto w-75">
|
|
38
38
|
<CardProduct id={i} {variant} isLoading />
|
|
39
39
|
</Carousel.Item>
|
|
40
40
|
{:else}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
{:else}
|
|
47
47
|
{#each items as item, i (`product-${item.id ?? i}`)}
|
|
48
48
|
{#if responsive.isMobile}
|
|
49
|
-
<Carousel.Item class="pl-2 basis-auto w-
|
|
49
|
+
<Carousel.Item class="pl-2 basis-auto w-75">
|
|
50
50
|
<CardProduct
|
|
51
51
|
{...item}
|
|
52
52
|
{variant}
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
items={sections}
|
|
86
86
|
active={activeSection}
|
|
87
87
|
onSelect={scrollToSection}
|
|
88
|
-
className="mt-
|
|
88
|
+
className="mt-2"
|
|
89
89
|
/>
|
|
90
90
|
{/if}
|
|
91
91
|
|
|
@@ -98,7 +98,9 @@
|
|
|
98
98
|
/>
|
|
99
99
|
{/if}
|
|
100
100
|
|
|
101
|
-
<div
|
|
101
|
+
<div
|
|
102
|
+
class="flex min-w-0 flex-1 flex-col gap-6 md:px-5 md:pl-10 lg:pl-12 pt-2 pb-5 md:pb-10"
|
|
103
|
+
>
|
|
102
104
|
<div
|
|
103
105
|
id="banner"
|
|
104
106
|
bind:this={sectionEls["banner"]}
|
package/dist/globals.css
CHANGED
|
@@ -530,9 +530,6 @@
|
|
|
530
530
|
.mt-5 {
|
|
531
531
|
margin-top: calc(var(--spacing) * 5);
|
|
532
532
|
}
|
|
533
|
-
.mt-6 {
|
|
534
|
-
margin-top: calc(var(--spacing) * 6);
|
|
535
|
-
}
|
|
536
533
|
.mt-7 {
|
|
537
534
|
margin-top: calc(var(--spacing) * 7);
|
|
538
535
|
}
|
|
@@ -816,6 +813,9 @@
|
|
|
816
813
|
.h-75 {
|
|
817
814
|
height: calc(var(--spacing) * 75);
|
|
818
815
|
}
|
|
816
|
+
.h-\[50px\] {
|
|
817
|
+
height: 50px;
|
|
818
|
+
}
|
|
819
819
|
.h-\[65px\] {
|
|
820
820
|
height: 65px;
|
|
821
821
|
}
|