negodesign 0.0.63 → 0.0.64

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,6 +22,7 @@ export interface CarouselBadgeProps {
22
22
  btnNavClass?: string;
23
23
  isBorderInline?: boolean;
24
24
  showButton?: boolean;
25
+ menuKey?: string;
25
26
  itemStyle?: 'BORDER' | 'INLINE' | 'DEFAULT';
26
27
  onClick?: (value: string | number) => void;
27
28
  }
@@ -18,6 +18,7 @@
18
18
  isLoading = false,
19
19
  btnNavClass,
20
20
  itemClass,
21
+ menuKey,
21
22
  onClick,
22
23
  }: CarouselBadgeProps = $props();
23
24
 
@@ -31,7 +32,7 @@
31
32
  const responsive = useDevice();
32
33
  const skeletonCount = $derived(responsive.isMobile ? 2 : 8);
33
34
 
34
- let selectedValue = $state<unknown>(undefined);
35
+ let selectedValue = $state<string | undefined>(menuKey ?? "");
35
36
 
36
37
  function isSelected(item: (typeof items)[number]) {
37
38
  return item.value !== undefined && item.value === selectedValue;
@@ -1,4 +1,5 @@
1
- import type { MenuVarientProps } from "../../nav/data/types";
1
+ import type { SimpleMenuProps } from "../../../../types";
2
+ import type { ComplexMenuProps, MenuProps } from "../../nav/data/types";
2
3
  /**
3
4
  * Item individual do CarouselHero — slide com imagem,
4
5
  * título e descrição.
@@ -19,7 +20,9 @@ export interface CarouselHeroProps {
19
20
  /** Lista de slides do hero */
20
21
  items: CarouselHeroItem[];
21
22
  /** Configuração do menu de navegação sobreposto */
22
- navMenu: MenuVarientProps;
23
+ complexMenu?: ComplexMenuProps;
24
+ simpleMenu?: SimpleMenuProps;
25
+ menusProps?: MenuProps;
23
26
  /** Classe CSS adicional para o container */
24
27
  className?: string;
25
28
  /** Classe CSS personalizada para o título */
@@ -2,10 +2,14 @@
2
2
  import type { Snippet } from "svelte";
3
3
  import Menu from "../../../nav/ui/Menu.svelte";
4
4
  import type { CarouselHeroItem, CarouselHeroProps } from "../types";
5
+ import SimpleMenu from "../../../nav/ui/SimpleMenu.svelte";
6
+ import ComplexMenu from "../../../nav/ui/ComplexMenu.svelte";
5
7
 
6
8
  let {
7
9
  items,
8
- navMenu,
10
+ menusProps,
11
+ simpleMenu,
12
+ complexMenu,
9
13
  children,
10
14
  className,
11
15
  titleClass,
@@ -110,7 +114,21 @@
110
114
  ></div>
111
115
 
112
116
  <div class="relative z-10 w-full flex flex-col items-center flex-1">
113
- <Menu {navMenu} />
117
+ {#if menusProps}
118
+ {#if simpleMenu}
119
+ <Menu navMenu={simpleMenu} {...menusProps} />
120
+ {/if}
121
+ {#if complexMenu}
122
+ <Menu navMenu={complexMenu} {...menusProps} />
123
+ {/if}
124
+ {:else}
125
+ {#if simpleMenu}
126
+ <SimpleMenu {...simpleMenu} />
127
+ {/if}
128
+ {#if complexMenu}
129
+ <ComplexMenu {...complexMenu} />
130
+ {/if}
131
+ {/if}
114
132
 
115
133
  <section
116
134
  class="flex flex-col justify-center items-center flex-1 w-full h-auto text-center px-4 {sectionClass}"
@@ -44,7 +44,6 @@ export type ComplexMenuProps = IMenuProps & {
44
44
  export type MenuVarientProps = ComplexMenuProps | SimpleMenuProps;
45
45
  export type MenuProps = IMenuProps & {
46
46
  logo?: NavMenuLogoProps;
47
- navMenu: MenuVarientProps;
48
47
  navMenuButton?: NavMenuButtonProps;
49
48
  isBorder?: boolean;
50
49
  /** Exibe o interruptor de tema (claro/escuro) */
@@ -18,7 +18,9 @@
18
18
  navMenuButton,
19
19
  isLightSwitch,
20
20
  isLanguageSwitcher,
21
- }: MenuProps = $props();
21
+ }: MenuProps & {
22
+ navMenu: MenuVarientProps;
23
+ } = $props();
22
24
 
23
25
  function isLinks(item: MenuVarientProps): item is SimpleMenuProps {
24
26
  return "links" in item;
@@ -1,4 +1,7 @@
1
- import type { MenuProps } from "../data/types";
2
- declare const Menu: import("svelte").Component<MenuProps, {}, "">;
1
+ import type { MenuProps, MenuVarientProps } from "../data/types";
2
+ type $$ComponentProps = MenuProps & {
3
+ navMenu: MenuVarientProps;
4
+ };
5
+ declare const Menu: import("svelte").Component<$$ComponentProps, {}, "">;
3
6
  type Menu = ReturnType<typeof Menu>;
4
7
  export default Menu;
package/dist/globals.css CHANGED
@@ -1395,6 +1395,11 @@
1395
1395
  margin-block-start: calc(var(--spacing) * var(--tw-space-y-reverse));
1396
1396
  margin-block-end: calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)));
1397
1397
  }
1398
+ :where(.space-y-2 > :not(:last-child)) {
1399
+ --tw-space-y-reverse: 0;
1400
+ margin-block-start: calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));
1401
+ margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)));
1402
+ }
1398
1403
  :where(.space-y-3 > :not(:last-child)) {
1399
1404
  --tw-space-y-reverse: 0;
1400
1405
  margin-block-start: calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));
@@ -4346,6 +4351,9 @@
4346
4351
  .md\:w-3\/5 {
4347
4352
  width: calc(3 / 5 * 100%);
4348
4353
  }
4354
+ .md\:w-4\/5 {
4355
+ width: calc(4 / 5 * 100%);
4356
+ }
4349
4357
  .md\:w-4\/12 {
4350
4358
  width: calc(4 / 12 * 100%);
4351
4359
  }
@@ -4576,12 +4584,18 @@
4576
4584
  .lg\:h-44 {
4577
4585
  height: calc(var(--spacing) * 44);
4578
4586
  }
4587
+ .lg\:h-100 {
4588
+ height: calc(var(--spacing) * 100);
4589
+ }
4579
4590
  .lg\:h-105 {
4580
4591
  height: calc(var(--spacing) * 105);
4581
4592
  }
4582
4593
  .lg\:h-225 {
4583
4594
  height: calc(var(--spacing) * 225);
4584
4595
  }
4596
+ .lg\:w-11\/12 {
4597
+ width: calc(11 / 12 * 100%);
4598
+ }
4585
4599
  .lg\:w-20 {
4586
4600
  width: calc(var(--spacing) * 20);
4587
4601
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "negodesign",
3
- "version": "0.0.63",
3
+ "version": "0.0.64",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "sideEffects": [