negodesign 0.0.51 → 0.0.53

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.
@@ -76,7 +76,7 @@
76
76
  </div>
77
77
  </div>
78
78
 
79
- <div class="h-15 my-2 mb-5 md:mb-0">
79
+ <div class=" my-2 mb-2 md:mb-0">
80
80
  <CardDescription
81
81
  {content}
82
82
  {isLoading}
@@ -86,7 +86,7 @@
86
86
  </div>
87
87
 
88
88
  <CardTags
89
- className="my-6"
89
+ className="mt-1 mb-5"
90
90
  tags={tags ?? []}
91
91
  {isTagBorderBottom}
92
92
  {isLoading}
@@ -74,15 +74,10 @@
74
74
  {isLoading}
75
75
  />
76
76
  </div>
77
- <CardTags
78
- className="my-2"
79
- tags={tags ?? []}
80
- {isTagBorderBottom}
81
- {isLoading}
82
- />
77
+ <CardTags tags={tags ?? []} {isTagBorderBottom} {isLoading} />
83
78
  </div>
84
79
 
85
- <div class="h-15 mb-10 md:mb-0">
80
+ <div class="h-24">
86
81
  <CardDescription
87
82
  {content}
88
83
  {isLoading}
@@ -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}
@@ -29,10 +29,7 @@
29
29
  class="w-full h-7.5 rounded-lg bg-gray-500/80 dark:bg-gray-500/30"
30
30
  />
31
31
  {:else}
32
- <Button
33
- class="bg-gradient {isFlex ? 'flex-1' : ''} {className}"
34
- onclick={() => onClick(id)}
35
- >
32
+ <Button class="bg-gradient flex-1 {className}" onclick={() => onClick(id)}>
36
33
  {#if icon}
37
34
  {#if typeof icon === "string"}
38
35
  <i class={icon}></i>
@@ -77,7 +77,7 @@
77
77
  <Popover.Trigger
78
78
  onmouseenter={() => (open = true)}
79
79
  onmouseleave={() => (open = false)}
80
- class="block w-full text-left"
80
+ class="block w-full text-left h-8"
81
81
  >
82
82
  {@render tagsRow()}
83
83
  </Popover.Trigger>
@@ -27,7 +27,7 @@
27
27
  let {
28
28
  imageUrl,
29
29
  videoUrl,
30
- class: className = "h-32 md:w-64 md:h-64",
30
+ class: className = "h-32 w-full md:h-64",
31
31
  isImageButtonMaximized = false,
32
32
  isVideoButtonMaximized = false,
33
33
  isLoading = false,
@@ -130,7 +130,7 @@
130
130
  loading="lazy"
131
131
  decoding="async"
132
132
  alt={imageUrl}
133
- class="absolute inset-0 w-full {className} rounded-md object-cover transition-opacity duration-500"
133
+ class="absolute inset-0 h-full w-full rounded-md object-cover transition-opacity duration-500"
134
134
  class:opacity-0={videoUrl && showVideo}
135
135
  onerror={(e) => ((e.target as HTMLImageElement).src = ImgPlaceholder)}
136
136
  />
@@ -142,7 +142,7 @@
142
142
  src={videoUrl}
143
143
  preload="metadata"
144
144
  onloadedmetadata={onLoadedMetadata}
145
- class="absolute inset-0 w-full {className} rounded-md object-cover transition-opacity duration-500"
145
+ class="absolute inset-0 h-full w-full rounded-md object-cover transition-opacity duration-500"
146
146
  class:opacity-0={imageUrl && !showVideo}
147
147
  muted
148
148
  loop
@@ -22,6 +22,10 @@ export interface CarouselGridMediaProps {
22
22
  items: CardMediaProps[];
23
23
  /** Estado de carregamento (skeleton) */
24
24
  isLoading?: boolean;
25
+ /** Exibe o botão de maximizar no vídeo */
26
+ isVideoButtonMaximized?: boolean;
27
+ /** Exibe o botão de maximizar na imagem */
28
+ isImageButtonMaximized?: boolean;
25
29
  /** Callback acionado ao clicar no botão de favorito */
26
30
  onFavoriteClick?: (id: string | number) => void;
27
31
  /** Callback acionado ao clicar no botão de perfil */
@@ -17,6 +17,8 @@
17
17
  isLoading = false,
18
18
  isDescriptionIcon,
19
19
  isDescriptionLabel,
20
+ isVideoButtonMaximized = false,
21
+ isImageButtonMaximized = false,
20
22
  onFavoriteClick,
21
23
  onButtonProfile,
22
24
  onButtonDetails,
@@ -55,18 +57,11 @@
55
57
  {variant}
56
58
  {isDescriptionIcon}
57
59
  {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
- }}
60
+ {isVideoButtonMaximized}
61
+ {isImageButtonMaximized}
62
+ {onFavoriteClick}
63
+ {onButtonProfile}
64
+ {onButtonDetails}
70
65
  />
71
66
  </Carousel.Item>
72
67
  {:else}
@@ -76,18 +71,11 @@
76
71
  {variant}
77
72
  {isDescriptionIcon}
78
73
  {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
- }}
74
+ {isVideoButtonMaximized}
75
+ {isImageButtonMaximized}
76
+ {onFavoriteClick}
77
+ {onButtonProfile}
78
+ {onButtonDetails}
91
79
  />
92
80
  </div>
93
81
  {/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-[300px]">
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-[300px]">
49
+ <Carousel.Item class="pl-2 basis-auto w-75">
50
50
  <CardProduct
51
51
  {...item}
52
52
  {variant}
@@ -18,6 +18,8 @@ export interface NavMenuLogoProps {
18
18
  * Props de um link individual no menu de navegação.
19
19
  */
20
20
  export interface NavMenuLinksProps {
21
+ /** Key menu */
22
+ key?: string;
21
23
  /** URL de destino do link */
22
24
  url?: string;
23
25
  /** Alias de `url` — URL de destino do link (compatibilidade) */
@@ -52,6 +54,10 @@ export interface NavMenuActionsProps {
52
54
  * com logo, links, ações (login/registo), language switcher e light switch.
53
55
  */
54
56
  export interface NavMenuProps {
57
+ /** Key nav menu */
58
+ menuKey?: string;
59
+ /** Key CSS nav menu */
60
+ activeClass?: string;
55
61
  /** Classe CSS adicional para o container do nav */
56
62
  navClass?: string;
57
63
  /** Classe CSS personalizada para cada link */
@@ -1,28 +1,40 @@
1
1
  <script lang="ts">
2
- import { HugeiconsIcon } from "@hugeicons/svelte";
3
- import type { NavMenuLinksProps } from "../data/nav-menu";
4
-
5
- type Props = {
6
- links: NavMenuLinksProps[];
7
- linkClass?: string;
8
- groupClass?: string;
9
- orientation?: "horizontal" | "vertical";
10
- };
2
+ import { HugeiconsIcon } from "@hugeicons/svelte";
3
+ import type { NavMenuLinksProps } from "../data/nav-menu";
11
4
 
12
- let { links, linkClass, groupClass, orientation }: Props = $props();
5
+ type Props = {
6
+ links: NavMenuLinksProps[];
7
+ linkClass?: string;
8
+ groupClass?: string;
9
+ menuKey?: string;
10
+ activeClass?: string;
11
+ orientation?: "horizontal" | "vertical";
12
+ };
13
+
14
+ let {
15
+ links,
16
+ linkClass,
17
+ groupClass,
18
+ menuKey,
19
+ activeClass = "bg-gradient text-white",
20
+ orientation,
21
+ }: Props = $props();
13
22
  </script>
14
- <ul class={`flex ${orientation === "vertical" ? "flex-col" : "items-center"} gap-2 md:gap-5 lg:gap-15 ${groupClass}`}>
15
- {#each links as item (item.label)}
16
- <li>
17
- <a
18
- class={`flex items-center gap-1 ${linkClass}`}
19
- href={item.url ?? item.href ?? "#"}
20
- >
21
- {#if item.icon}
22
- <HugeiconsIcon icon={item.icon} size={15} />
23
- {/if}
24
- {item.label}
25
- </a>
26
- </li>
27
- {/each}
28
- </ul>
23
+
24
+ <ul
25
+ class={`flex ${orientation === "vertical" ? "flex-col" : "items-center"} gap-2 md:gap-5 lg:gap-15 ${groupClass}`}
26
+ >
27
+ {#each links as item (item.label)}
28
+ <li>
29
+ <a
30
+ class={`flex items-center gap-1 ${linkClass} ${menuKey === item.key ? activeClass : ""}`}
31
+ href={item.url ?? item.href ?? "#"}
32
+ >
33
+ {#if item.icon}
34
+ <HugeiconsIcon icon={item.icon} size={15} />
35
+ {/if}
36
+ {item.label}
37
+ </a>
38
+ </li>
39
+ {/each}
40
+ </ul>
@@ -3,6 +3,8 @@ type Props = {
3
3
  links: NavMenuLinksProps[];
4
4
  linkClass?: string;
5
5
  groupClass?: string;
6
+ menuKey?: string;
7
+ activeClass?: string;
6
8
  orientation?: "horizontal" | "vertical";
7
9
  };
8
10
  declare const MenuLinks: import("svelte").Component<Props, {}, "">;
@@ -14,6 +14,8 @@
14
14
  logo,
15
15
  links,
16
16
  actions,
17
+ menuKey,
18
+ activeClass,
17
19
  navClass = "w-full",
18
20
  linkClass = "",
19
21
  groupClass = "",
@@ -95,11 +97,25 @@
95
97
  {#if responsive.isMobile}
96
98
  <NavMenuDrawer {links} {onclickButtonLogin} {onclickButtonRegister} />
97
99
  {:else if align === "LINK_SEPARATED_ACTIONS"}
98
- <MenuLinks {links} {linkClass} {groupClass} orientation="horizontal" />
100
+ <MenuLinks
101
+ {menuKey}
102
+ {activeClass}
103
+ {links}
104
+ {linkClass}
105
+ {groupClass}
106
+ orientation="horizontal"
107
+ />
99
108
  {@render actionButtons()}
100
109
  {:else if align === "LINK_INTO_ACTIONS"}
101
110
  <div class="flex items-center gap-2">
102
- <MenuLinks {links} {linkClass} {groupClass} orientation="vertical" />
111
+ <MenuLinks
112
+ {menuKey}
113
+ {activeClass}
114
+ {links}
115
+ {linkClass}
116
+ {groupClass}
117
+ orientation="vertical"
118
+ />
103
119
  {@render actionButtons()}
104
120
  </div>
105
121
  {/if}
@@ -85,7 +85,7 @@
85
85
  items={sections}
86
86
  active={activeSection}
87
87
  onSelect={scrollToSection}
88
- className="mt-6"
88
+ className="mt-2"
89
89
  />
90
90
  {/if}
91
91
 
@@ -98,7 +98,9 @@
98
98
  />
99
99
  {/if}
100
100
 
101
- <div class="flex min-w-0 flex-1 flex-col gap-6 md:px-5 md:pl-10 lg:pl-12 pb-5 md:pb-10">
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
@@ -479,9 +479,6 @@
479
479
  .my-2 {
480
480
  margin-block: calc(var(--spacing) * 2);
481
481
  }
482
- .my-6 {
483
- margin-block: calc(var(--spacing) * 6);
484
- }
485
482
  .my-auto {
486
483
  margin-block: auto;
487
484
  }
@@ -530,9 +527,6 @@
530
527
  .mt-5 {
531
528
  margin-top: calc(var(--spacing) * 5);
532
529
  }
533
- .mt-6 {
534
- margin-top: calc(var(--spacing) * 6);
535
- }
536
530
  .mt-7 {
537
531
  margin-top: calc(var(--spacing) * 7);
538
532
  }
@@ -4065,9 +4059,6 @@
4065
4059
  .md\:w-25 {
4066
4060
  width: calc(var(--spacing) * 25);
4067
4061
  }
4068
- .md\:w-64 {
4069
- width: calc(var(--spacing) * 64);
4070
- }
4071
4062
  .md\:w-225 {
4072
4063
  width: calc(var(--spacing) * 225);
4073
4064
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "negodesign",
3
- "version": "0.0.51",
3
+ "version": "0.0.53",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "sideEffects": [