negodesign 0.0.38 → 0.0.39
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/media/01/CardMedia01.svelte +9 -3
- package/dist/components/core/card/media/02/CardMedia02.svelte +9 -3
- package/dist/components/core/card/shared/CardThumbnailVideo.svelte +1 -1
- package/dist/components/core/card/types.d.ts +4 -0
- package/dist/components/core/carousel/grid/media/types.d.ts +4 -0
- package/dist/components/core/carousel/grid/media/ui/CarouselGridMedia.svelte +16 -4
- package/dist/components/core/panel/CarouselSlot.svelte +10 -5
- package/dist/components/pages/product-details/shared/ProductDetailPrice.svelte +1 -1
- package/dist/globals.css +20 -14
- package/package.json +1 -1
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
content,
|
|
24
24
|
imageUrl,
|
|
25
25
|
videoUrl,
|
|
26
|
-
//videoAction,
|
|
27
26
|
startNumber,
|
|
28
27
|
startMax = 5,
|
|
29
28
|
isImageButtonMaximized = false,
|
|
@@ -33,6 +32,8 @@
|
|
|
33
32
|
isLoading = false,
|
|
34
33
|
buttonProfileClass,
|
|
35
34
|
buttonDetailsClass,
|
|
35
|
+
isDescriptionIcon,
|
|
36
|
+
isDescriptionLabel,
|
|
36
37
|
onFavoriteClick,
|
|
37
38
|
onButtonProfile,
|
|
38
39
|
onButtonDetails,
|
|
@@ -75,8 +76,13 @@
|
|
|
75
76
|
</div>
|
|
76
77
|
</div>
|
|
77
78
|
|
|
78
|
-
<div class="h-15 my-2">
|
|
79
|
-
<CardDescription
|
|
79
|
+
<div class="h-15 my-2 mb-5 md:mb-0">
|
|
80
|
+
<CardDescription
|
|
81
|
+
{content}
|
|
82
|
+
{isLoading}
|
|
83
|
+
{isDescriptionIcon}
|
|
84
|
+
{isDescriptionLabel}
|
|
85
|
+
/>
|
|
80
86
|
</div>
|
|
81
87
|
|
|
82
88
|
<CardTags
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
className,
|
|
24
24
|
imageUrl,
|
|
25
25
|
videoUrl,
|
|
26
|
-
//videoAction,
|
|
27
26
|
startNumber,
|
|
28
27
|
startMax = 5,
|
|
29
28
|
isImageButtonMaximized = false,
|
|
@@ -33,6 +32,8 @@
|
|
|
33
32
|
isLoading = false,
|
|
34
33
|
buttonProfileClass,
|
|
35
34
|
buttonDetailsClass,
|
|
35
|
+
isDescriptionIcon,
|
|
36
|
+
isDescriptionLabel,
|
|
36
37
|
onFavoriteClick,
|
|
37
38
|
onButtonProfile,
|
|
38
39
|
onButtonDetails,
|
|
@@ -81,8 +82,13 @@
|
|
|
81
82
|
/>
|
|
82
83
|
</div>
|
|
83
84
|
|
|
84
|
-
<div class="h-15 mb-
|
|
85
|
-
<CardDescription
|
|
85
|
+
<div class="h-15 mb-10 md:mb-0">
|
|
86
|
+
<CardDescription
|
|
87
|
+
{content}
|
|
88
|
+
{isLoading}
|
|
89
|
+
{isDescriptionIcon}
|
|
90
|
+
{isDescriptionLabel}
|
|
91
|
+
/>
|
|
86
92
|
</div>
|
|
87
93
|
|
|
88
94
|
<CardThumbnailVideo
|
|
@@ -48,6 +48,10 @@ export interface CardMediaProps {
|
|
|
48
48
|
isVideoButtonMaximized?: boolean;
|
|
49
49
|
/** Exibe o botão de maximizar na imagem */
|
|
50
50
|
isImageButtonMaximized?: boolean;
|
|
51
|
+
/** Exibe ícone antes da descrição */
|
|
52
|
+
isDescriptionIcon?: boolean;
|
|
53
|
+
/** Exibe etiqueta (label) na descrição */
|
|
54
|
+
isDescriptionLabel?: boolean;
|
|
51
55
|
/** Callback acionado ao clicar no botão de favorito */
|
|
52
56
|
onFavoriteClick?: (id: string | number) => void;
|
|
53
57
|
/** Callback acionado ao clicar no botão de perfil */
|
|
@@ -12,6 +12,10 @@ export interface CarouselGridMediaProps {
|
|
|
12
12
|
slotProps?: CarouselSlotProps;
|
|
13
13
|
/** Classe CSS adicional para o container do grid */
|
|
14
14
|
gridClass?: string;
|
|
15
|
+
/** Exibe ícone antes da descrição */
|
|
16
|
+
isDescriptionIcon?: boolean;
|
|
17
|
+
/** Exibe etiqueta (label) na descrição */
|
|
18
|
+
isDescriptionLabel?: boolean;
|
|
15
19
|
/** Variante visual do card: 1 ou 2 */
|
|
16
20
|
variant?: 1 | 2;
|
|
17
21
|
/** Lista de itens de mídia para exibir nos cards */
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
items,
|
|
16
16
|
variant,
|
|
17
17
|
isLoading = false,
|
|
18
|
+
isDescriptionIcon,
|
|
19
|
+
isDescriptionLabel,
|
|
18
20
|
}: CarouselGridMediaProps = $props();
|
|
19
21
|
|
|
20
22
|
const responsive = useDevice();
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
{#if isLoading}
|
|
33
35
|
{#each Array.from( { length: responsive.isMobile ? 3 : 6 }, ) as _, i (`loading-${i}`)}
|
|
34
36
|
{#if responsive.isMobile}
|
|
35
|
-
<Carousel.Item class="pl-2 basis-auto">
|
|
37
|
+
<Carousel.Item class="pl-2 basis-auto w-[300px]">
|
|
36
38
|
<CardMedia id={i} {variant} isLoading />
|
|
37
39
|
</Carousel.Item>
|
|
38
40
|
{:else}
|
|
@@ -44,12 +46,22 @@
|
|
|
44
46
|
{:else}
|
|
45
47
|
{#each items as item, i (`media-${item.id ?? i}`)}
|
|
46
48
|
{#if responsive.isMobile}
|
|
47
|
-
<Carousel.Item class="pl-2 basis-auto">
|
|
48
|
-
<CardMedia
|
|
49
|
+
<Carousel.Item class="pl-2 basis-auto w-[300px]">
|
|
50
|
+
<CardMedia
|
|
51
|
+
{...item}
|
|
52
|
+
{variant}
|
|
53
|
+
{isDescriptionIcon}
|
|
54
|
+
{isDescriptionLabel}
|
|
55
|
+
/>
|
|
49
56
|
</Carousel.Item>
|
|
50
57
|
{:else}
|
|
51
58
|
<div>
|
|
52
|
-
<CardMedia
|
|
59
|
+
<CardMedia
|
|
60
|
+
{...item}
|
|
61
|
+
{variant}
|
|
62
|
+
{isDescriptionIcon}
|
|
63
|
+
{isDescriptionLabel}
|
|
64
|
+
/>
|
|
53
65
|
</div>
|
|
54
66
|
{/if}
|
|
55
67
|
{/each}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import * as Carousel from "../../ui/carousel/index.js";
|
|
3
|
+
import { useDevice } from "../../../hooks/responsive.svelte";
|
|
3
4
|
import type { CarouselSlotProps } from "./type";
|
|
4
5
|
|
|
5
6
|
const {
|
|
@@ -14,7 +15,9 @@
|
|
|
14
15
|
|
|
15
16
|
const styleTopCenter = "bg-blue-700! text-white! cursor-pointer!";
|
|
16
17
|
const styleCenter =
|
|
17
|
-
"absolute top-1/2 -translate-y-1/2 mt-0.5 mr-0 z-50 bg-blue-700! text-white! cursor-pointer!";
|
|
18
|
+
"absolute top-1/2 -translate-y-1/2 mt-0.5 md:mr-0 z-50 bg-blue-700! text-white! cursor-pointer!";
|
|
19
|
+
|
|
20
|
+
const responsive = useDevice();
|
|
18
21
|
</script>
|
|
19
22
|
|
|
20
23
|
<div
|
|
@@ -26,7 +29,7 @@
|
|
|
26
29
|
>
|
|
27
30
|
{@render children?.()}
|
|
28
31
|
</Carousel.Content>
|
|
29
|
-
{#if positionButtonPreviousAndNext == "center"}
|
|
32
|
+
{#if positionButtonPreviousAndNext == "center" && !responsive.isMobile}
|
|
30
33
|
{#if isButtonPreviousAndNext}
|
|
31
34
|
<Carousel.Previous
|
|
32
35
|
class={`-left-8 ${styleCenter} ${buttonPreviousAndNextClass}`}
|
|
@@ -36,14 +39,16 @@
|
|
|
36
39
|
/>
|
|
37
40
|
{/if}
|
|
38
41
|
{/if}
|
|
39
|
-
{#if positionButtonPreviousAndNext == "top_right"}
|
|
42
|
+
{#if positionButtonPreviousAndNext == "top_right" || responsive.isMobile}
|
|
40
43
|
{#if isButtonPreviousAndNext}
|
|
41
|
-
<div
|
|
44
|
+
<div
|
|
45
|
+
class="absolute -top-16 md:-top-10 right-8 md:right-10 lg:right-12 z-20"
|
|
46
|
+
>
|
|
42
47
|
<Carousel.Previous
|
|
43
48
|
class={`${styleTopCenter} ${buttonPreviousAndNextClass}`}
|
|
44
49
|
/>
|
|
45
50
|
<Carousel.Next
|
|
46
|
-
class={
|
|
51
|
+
class={`start-0 ${styleTopCenter} ${buttonPreviousAndNextClass}`}
|
|
47
52
|
/>
|
|
48
53
|
</div>
|
|
49
54
|
{/if}
|
package/dist/globals.css
CHANGED
|
@@ -297,12 +297,12 @@
|
|
|
297
297
|
.end-2 {
|
|
298
298
|
inset-inline-end: calc(var(--spacing) * 2);
|
|
299
299
|
}
|
|
300
|
-
.-top-6 {
|
|
301
|
-
top: calc(var(--spacing) * -6);
|
|
302
|
-
}
|
|
303
300
|
.-top-12 {
|
|
304
301
|
top: calc(var(--spacing) * -12);
|
|
305
302
|
}
|
|
303
|
+
.-top-16 {
|
|
304
|
+
top: calc(var(--spacing) * -16);
|
|
305
|
+
}
|
|
306
306
|
.top-0 {
|
|
307
307
|
top: 0px;
|
|
308
308
|
}
|
|
@@ -351,8 +351,8 @@
|
|
|
351
351
|
.right-4 {
|
|
352
352
|
right: calc(var(--spacing) * 4);
|
|
353
353
|
}
|
|
354
|
-
.right-
|
|
355
|
-
right: calc(var(--spacing) *
|
|
354
|
+
.right-8 {
|
|
355
|
+
right: calc(var(--spacing) * 8);
|
|
356
356
|
}
|
|
357
357
|
.-bottom-12 {
|
|
358
358
|
bottom: calc(var(--spacing) * -12);
|
|
@@ -552,9 +552,6 @@
|
|
|
552
552
|
.-mr-2 {
|
|
553
553
|
margin-right: calc(var(--spacing) * -2);
|
|
554
554
|
}
|
|
555
|
-
.mr-0 {
|
|
556
|
-
margin-right: 0px;
|
|
557
|
-
}
|
|
558
555
|
.mr-0\.5 {
|
|
559
556
|
margin-right: calc(var(--spacing) * 0.5);
|
|
560
557
|
}
|
|
@@ -814,9 +811,6 @@
|
|
|
814
811
|
.h-50 {
|
|
815
812
|
height: calc(var(--spacing) * 50);
|
|
816
813
|
}
|
|
817
|
-
.h-64 {
|
|
818
|
-
height: calc(var(--spacing) * 64);
|
|
819
|
-
}
|
|
820
814
|
.h-72 {
|
|
821
815
|
height: calc(var(--spacing) * 72);
|
|
822
816
|
}
|
|
@@ -979,9 +973,6 @@
|
|
|
979
973
|
.w-56 {
|
|
980
974
|
width: calc(var(--spacing) * 56);
|
|
981
975
|
}
|
|
982
|
-
.w-64 {
|
|
983
|
-
width: calc(var(--spacing) * 64);
|
|
984
|
-
}
|
|
985
976
|
.w-72 {
|
|
986
977
|
width: calc(var(--spacing) * 72);
|
|
987
978
|
}
|
|
@@ -3980,6 +3971,9 @@
|
|
|
3980
3971
|
}
|
|
3981
3972
|
}
|
|
3982
3973
|
@media (width >= 48rem) {
|
|
3974
|
+
.md\:-top-10 {
|
|
3975
|
+
top: calc(var(--spacing) * -10);
|
|
3976
|
+
}
|
|
3983
3977
|
.md\:right-6 {
|
|
3984
3978
|
right: calc(var(--spacing) * 6);
|
|
3985
3979
|
}
|
|
@@ -4001,9 +3995,15 @@
|
|
|
4001
3995
|
.md\:mt-10 {
|
|
4002
3996
|
margin-top: calc(var(--spacing) * 10);
|
|
4003
3997
|
}
|
|
3998
|
+
.md\:mr-0 {
|
|
3999
|
+
margin-right: 0px;
|
|
4000
|
+
}
|
|
4004
4001
|
.md\:-mb-10 {
|
|
4005
4002
|
margin-bottom: calc(var(--spacing) * -10);
|
|
4006
4003
|
}
|
|
4004
|
+
.md\:mb-0 {
|
|
4005
|
+
margin-bottom: 0px;
|
|
4006
|
+
}
|
|
4007
4007
|
.md\:block {
|
|
4008
4008
|
display: block;
|
|
4009
4009
|
}
|
|
@@ -4031,6 +4031,9 @@
|
|
|
4031
4031
|
.md\:h-50 {
|
|
4032
4032
|
height: calc(var(--spacing) * 50);
|
|
4033
4033
|
}
|
|
4034
|
+
.md\:h-64 {
|
|
4035
|
+
height: calc(var(--spacing) * 64);
|
|
4036
|
+
}
|
|
4034
4037
|
.md\:h-100 {
|
|
4035
4038
|
height: calc(var(--spacing) * 100);
|
|
4036
4039
|
}
|
|
@@ -4064,6 +4067,9 @@
|
|
|
4064
4067
|
.md\:w-25 {
|
|
4065
4068
|
width: calc(var(--spacing) * 25);
|
|
4066
4069
|
}
|
|
4070
|
+
.md\:w-64 {
|
|
4071
|
+
width: calc(var(--spacing) * 64);
|
|
4072
|
+
}
|
|
4067
4073
|
.md\:w-225 {
|
|
4068
4074
|
width: calc(var(--spacing) * 225);
|
|
4069
4075
|
}
|