negodesign 0.0.50 → 0.0.51

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.
@@ -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-[300px]">
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-[300px]">
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}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "negodesign",
3
- "version": "0.0.50",
3
+ "version": "0.0.51",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "sideEffects": [