negodesign 0.0.30 → 0.0.31

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.
Files changed (94) hide show
  1. package/dist/components/core/banner/CtaCardBanner.svelte +1 -1
  2. package/dist/components/core/banner/types.d.ts +16 -6
  3. package/dist/components/core/card/types.d.ts +94 -0
  4. package/dist/components/core/carousel/grid/media/types.d.ts +10 -0
  5. package/dist/components/core/carousel/grid/profile/types.d.ts +10 -0
  6. package/dist/components/core/carousel/highlights/types.d.ts +11 -0
  7. package/dist/components/core/carousel/promotion/types.d.ts +10 -0
  8. package/dist/components/core/carousel/types.d.ts +56 -0
  9. package/dist/components/core/datatable/data/data-table.d.ts +25 -0
  10. package/dist/components/core/footer/types.d.ts +28 -0
  11. package/dist/components/core/nav/data/nav-menu-sidebar.d.ts +29 -0
  12. package/dist/components/core/nav/data/nav-menu.d.ts +43 -0
  13. package/dist/components/core/nav/data/nav-user-sidebar.d.ts +14 -0
  14. package/dist/components/core/nav/ui/menu-links.svelte +1 -1
  15. package/dist/components/core/panel/CarouselSlot.svelte +1 -1
  16. package/dist/components/core/panel/type.d.ts +11 -0
  17. package/dist/components/core/search/types.d.ts +17 -5
  18. package/dist/components/core/sidebar/types.d.ts +19 -0
  19. package/dist/components/core/sidebar/types.js +1 -0
  20. package/dist/components/core/tabs/data/TabModel.d.ts +11 -0
  21. package/dist/components/core/tabs/types.d.ts +11 -0
  22. package/dist/components/core/tabs/types.js +1 -0
  23. package/dist/components/pages/admin/01/ui/types.d.ts +21 -0
  24. package/dist/components/pages/admin/01/ui/types.js +1 -0
  25. package/dist/components/pages/product-details/01/ProductDetails01.svelte +71 -0
  26. package/dist/components/pages/product-details/01/ProductDetails01.svelte.d.ts +11 -0
  27. package/dist/components/pages/product-details/02/ProductDetails02.svelte +88 -0
  28. package/dist/components/pages/product-details/02/ProductDetails02.svelte.d.ts +11 -0
  29. package/dist/components/pages/product-details/03/ProductDetails03.svelte +77 -0
  30. package/dist/components/pages/product-details/03/ProductDetails03.svelte.d.ts +11 -0
  31. package/dist/components/pages/product-details/04/ProductDetails04.svelte +65 -0
  32. package/dist/components/pages/product-details/04/ProductDetails04.svelte.d.ts +11 -0
  33. package/dist/components/pages/product-details/ProductDetails.svelte +38 -0
  34. package/dist/components/pages/product-details/ProductDetails.svelte.d.ts +4 -0
  35. package/dist/components/pages/product-details/shared/ProductDetailActions.svelte +82 -0
  36. package/dist/components/pages/product-details/shared/ProductDetailActions.svelte.d.ts +13 -0
  37. package/dist/components/pages/product-details/shared/ProductDetailBreadcrumb.svelte +46 -0
  38. package/dist/components/pages/product-details/shared/ProductDetailBreadcrumb.svelte.d.ts +8 -0
  39. package/dist/components/pages/product-details/shared/ProductDetailDescription.svelte +38 -0
  40. package/dist/components/pages/product-details/shared/ProductDetailDescription.svelte.d.ts +8 -0
  41. package/dist/components/pages/product-details/shared/ProductDetailFeatures.svelte +40 -0
  42. package/dist/components/pages/product-details/shared/ProductDetailFeatures.svelte.d.ts +7 -0
  43. package/dist/components/pages/product-details/shared/ProductDetailFilesVertical.svelte +72 -0
  44. package/dist/components/pages/product-details/shared/ProductDetailFilesVertical.svelte.d.ts +9 -0
  45. package/dist/components/pages/product-details/shared/ProductDetailHeader.svelte +41 -0
  46. package/dist/components/pages/product-details/shared/ProductDetailHeader.svelte.d.ts +9 -0
  47. package/dist/components/pages/product-details/shared/ProductDetailImage.svelte +70 -0
  48. package/dist/components/pages/product-details/shared/ProductDetailImage.svelte.d.ts +9 -0
  49. package/dist/components/pages/product-details/shared/ProductDetailMap.svelte +57 -0
  50. package/dist/components/pages/product-details/shared/ProductDetailMap.svelte.d.ts +9 -0
  51. package/dist/components/pages/product-details/shared/ProductDetailPrice.svelte +44 -0
  52. package/dist/components/pages/product-details/shared/ProductDetailPrice.svelte.d.ts +9 -0
  53. package/dist/components/pages/product-details/shared/ProductDetailRating.svelte +42 -0
  54. package/dist/components/pages/product-details/shared/ProductDetailRating.svelte.d.ts +8 -0
  55. package/dist/components/pages/product-details/shared/ProductDetailReviews.svelte +70 -0
  56. package/dist/components/pages/product-details/shared/ProductDetailReviews.svelte.d.ts +8 -0
  57. package/dist/components/pages/product-details/shared/ProductDetailTabs.svelte +96 -0
  58. package/dist/components/pages/product-details/shared/ProductDetailTabs.svelte.d.ts +12 -0
  59. package/dist/components/pages/product-details/shared/ProductDetailTags.svelte +35 -0
  60. package/dist/components/pages/product-details/shared/ProductDetailTags.svelte.d.ts +8 -0
  61. package/dist/components/pages/product-details/shared/ProductPurchasePanel.svelte +58 -0
  62. package/dist/components/pages/product-details/shared/ProductPurchasePanel.svelte.d.ts +11 -0
  63. package/dist/components/pages/product-details/types.d.ts +170 -0
  64. package/dist/components/pages/product-details/types.js +1 -0
  65. package/dist/components/pages/profile-user/01/ProfileUser01.svelte +113 -0
  66. package/dist/components/pages/profile-user/01/ProfileUser01.svelte.d.ts +27 -0
  67. package/dist/components/pages/profile-user/02/ProfileUser02.svelte +83 -0
  68. package/dist/components/pages/profile-user/02/ProfileUser02.svelte.d.ts +20 -0
  69. package/dist/components/pages/profile-user/03/ProfileUser03.svelte +85 -0
  70. package/dist/components/pages/profile-user/03/ProfileUser03.svelte.d.ts +20 -0
  71. package/dist/components/pages/profile-user/ProfileUser.svelte +53 -0
  72. package/dist/components/pages/profile-user/ProfileUser.svelte.d.ts +4 -0
  73. package/dist/components/pages/profile-user/shared/ProfileUserAddress.svelte +84 -0
  74. package/dist/components/pages/profile-user/shared/ProfileUserAddress.svelte.d.ts +8 -0
  75. package/dist/components/pages/profile-user/shared/ProfileUserHeader.svelte +104 -0
  76. package/dist/components/pages/profile-user/shared/ProfileUserHeader.svelte.d.ts +9 -0
  77. package/dist/components/pages/profile-user/shared/ProfileUserResetPassword.svelte +116 -0
  78. package/dist/components/pages/profile-user/shared/ProfileUserResetPassword.svelte.d.ts +7 -0
  79. package/dist/components/pages/profile-user/shared/ProfileUserSetting.svelte +176 -0
  80. package/dist/components/pages/profile-user/shared/ProfileUserSetting.svelte.d.ts +14 -0
  81. package/dist/components/pages/profile-user/shared/ProfileUserTabs.svelte +78 -0
  82. package/dist/components/pages/profile-user/shared/ProfileUserTabs.svelte.d.ts +22 -0
  83. package/dist/components/pages/profile-user/types.d.ts +144 -0
  84. package/dist/components/pages/profile-user/types.js +1 -0
  85. package/dist/globals.css +210 -3
  86. package/dist/i18n/langs/en.d.ts +83 -0
  87. package/dist/i18n/langs/en.js +83 -0
  88. package/dist/i18n/langs/pt.d.ts +83 -0
  89. package/dist/i18n/langs/pt.js +83 -0
  90. package/dist/i18n/translations.d.ts +166 -0
  91. package/dist/index.d.ts +190 -25
  92. package/dist/index.js +190 -25
  93. package/dist/types/index.d.ts +196 -5
  94. package/package.json +1 -1
@@ -1,14 +1,28 @@
1
1
  import type { IconSvgElement } from "@hugeicons/svelte";
2
+ /**
3
+ * Props do bloco de usuário logado na sidebar.
4
+ * Contém dados do usuário (nome, email, avatar), ações rápidas
5
+ * e callback de logout.
6
+ */
2
7
  export interface NavUserSidebarProps {
8
+ /** Dados do utilizador autenticado */
3
9
  user: {
10
+ /** Nome completo do utilizador */
4
11
  name: string;
12
+ /** Email do utilizador */
5
13
  email: string;
14
+ /** URL da imagem de perfil/avatar (opcional) */
6
15
  avatar?: string;
7
16
  };
17
+ /** Lista de ações rápidas (ex: "Perfil", "Definições") */
8
18
  actions?: {
19
+ /** Texto exibido na ação */
9
20
  label: string;
21
+ /** Ícone SVG da ação */
10
22
  icon: IconSvgElement;
23
+ /** Callback acionado ao clicar na ação */
11
24
  onclick?: () => void;
12
25
  }[];
26
+ /** Callback acionado ao clicar no botão de terminar sessão */
13
27
  onLogout?: () => void;
14
28
  }
@@ -16,7 +16,7 @@
16
16
  <li>
17
17
  <a
18
18
  class={`flex items-center gap-1 ${linkClass}`}
19
- href={item.url || "#"}
19
+ href={item.url ?? item.href ?? "#"}
20
20
  >
21
21
  {#if item.icon}
22
22
  <HugeiconsIcon icon={item.icon} size={15} />
@@ -24,7 +24,7 @@
24
24
  <Carousel.Content
25
25
  class={positionButtonPreviousAndNext == "top_right" ? "" : "ml-0"}
26
26
  >
27
- {@render children()}
27
+ {@render children?.()}
28
28
  </Carousel.Content>
29
29
  {#if positionButtonPreviousAndNext == "center"}
30
30
  {#if isButtonPreviousAndNext}
@@ -1,11 +1,22 @@
1
1
  import type { CarouselPlugins } from "../../ui/carousel/context";
2
2
  import type { Snippet } from "svelte";
3
+ /**
4
+ * Props do slot/container de carousel (CarouselSlot).
5
+ * Controla botões de navegação, bordas, plugins e conteúdo customizado.
6
+ */
3
7
  export type CarouselSlotProps = {
8
+ /** Posição dos botões anterior/próximo: centro ou canto superior direito */
4
9
  positionButtonPreviousAndNext?: "center" | "top_right";
10
+ /** Classe CSS personalizada para botões anterior/próximo */
5
11
  buttonPreviousAndNextClass?: string;
12
+ /** Exibe os botões anterior/próximo */
6
13
  isButtonPreviousAndNext?: boolean;
14
+ /** Exibe borda inferior no slot */
7
15
  isBorderBottom?: boolean;
16
+ /** Classe CSS adicional para o container */
8
17
  containerClass?: string;
18
+ /** Plugins do carousel (ex: autoplay, loop) */
9
19
  plugins?: CarouselPlugins;
20
+ /** Snippet de conteúdo customizado renderizado dentro do slot */
10
21
  children?: Snippet;
11
22
  };
@@ -1,15 +1,27 @@
1
- /** Props for the search input component. */
1
+ /**
2
+ * Props base para o componente de input de busca.
3
+ */
2
4
  export interface SearchItemProps {
3
- /** Callback fired when the user submits the search. */
5
+ /** Callback acionado ao submeter a busca (enter ou clique no botão) */
4
6
  onSubmit?: (q: string) => void;
5
- /** Placeholder text for the input field. */
7
+ /** Classe CSS personalizada para o botão de busca */
6
8
  buttonClass?: string;
9
+ /** Placeholder exibido no campo de input */
7
10
  placeholder?: string;
11
+ /** Classe CSS personalizada para o campo de input */
8
12
  inputClass?: string;
13
+ /** Classe CSS personalizada para o ícone de busca */
9
14
  iconClass?: string;
10
15
  }
11
- /** Extended search input props with a visual variant option. */
16
+ /**
17
+ * Props do SearchInput — input de busca completo com duas variantes visuais.
18
+ * @extends SearchItemProps
19
+ */
12
20
  export interface SearchInputProps extends SearchItemProps {
13
- /** Visual variant: 1 = full border, 2 = bottom border only. */
21
+ /**
22
+ * Variante visual do input de busca.
23
+ * 1 = borda completa ao redor;
24
+ * 2 = apenas borda inferior (underline style).
25
+ */
14
26
  variant?: 1 | 2;
15
27
  }
@@ -0,0 +1,19 @@
1
+ import type { Snippet } from "svelte";
2
+ import type { NavUserSidebarProps } from "../nav/data/nav-user-sidebar";
3
+ import type { NavMenuItem, NavMenuSidebarProps } from "../nav/data/nav-menu-sidebar";
4
+ /**
5
+ * Props do componente MenuBarSidebar — sidebar de navegação admin
6
+ * com menus, usuário logado e botões de ação (ex: logout).
7
+ */
8
+ export interface MenuBarSidebarProps {
9
+ /** Botões do rodapé da sidebar (ex: logout) */
10
+ menusButtons?: NavMenuSidebarProps[];
11
+ /** Itens de navegação principal */
12
+ menus: NavMenuItem[];
13
+ /** Dados do usuário logado */
14
+ user: NavUserSidebarProps;
15
+ /** Snippet customizado para o footer da sidebar */
16
+ footer?: Snippet;
17
+ /** Snippet customizado para o header da sidebar */
18
+ header?: Snippet;
19
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,9 +1,20 @@
1
1
  import type { Snippet } from "svelte";
2
+ /**
3
+ * Item básico de uma aba — valor identificador e label visível.
4
+ */
2
5
  export interface TabItem {
6
+ /** Texto exibido na aba */
3
7
  label: string;
8
+ /** Valor único identificador da aba */
4
9
  value: string;
5
10
  }
11
+ /**
12
+ * Props completas de uma aba no TabUnderline — item (label/value)
13
+ * mais o conteúdo (Snippet) renderizado quando a aba está ativa.
14
+ */
6
15
  export interface TabProps {
16
+ /** Dados da aba (label + valor) */
7
17
  item: TabItem;
18
+ /** Snippet com o conteúdo exibido ao selecionar a aba */
8
19
  children?: Snippet;
9
20
  }
@@ -0,0 +1,11 @@
1
+ import type { TabProps } from "./data/TabModel";
2
+ /**
3
+ * Props do componente TabUnderline — abas com estilo underline
4
+ * que trocam o conteúdo conforme a aba selecionada.
5
+ */
6
+ export interface TabUnderlineProps {
7
+ /** Lista de abas com seu conteúdo (Snippet) */
8
+ items?: TabProps[];
9
+ /** Classe CSS adicional para o container */
10
+ className?: string;
11
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ import type { Snippet } from "svelte";
2
+ /**
3
+ * Props do componente AdminPanel — layout principal de administração
4
+ * com sidebar, header (breadcrumb, language switcher, light switch) e área de conteúdo.
5
+ */
6
+ export interface AdminPanelProps {
7
+ /** Snippet com a sidebar da aplicação */
8
+ appsidebar?: Snippet;
9
+ /** Snippet com o conteúdo principal */
10
+ content?: Snippet;
11
+ /** Snippet com a navegação breadcrumb */
12
+ breadcrumb?: Snippet;
13
+ }
14
+ /**
15
+ * Props do componente AdminContent — wrapper de conteúdo
16
+ * para páginas admin com padding e layout flex.
17
+ */
18
+ export interface AdminContentProps {
19
+ /** Snippet com o conteúdo interno da página */
20
+ children?: Snippet;
21
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,71 @@
1
+ <script lang="ts" module>
2
+ /**
3
+ * Variante 01 da página de detalhes do produto.
4
+ * Layout de duas colunas: galeria à esquerda e informações/compra à direita.
5
+ * @component
6
+ * @example
7
+ * ```svelte
8
+ * <ProductDetails01 {data} {onBuy} {onFavorite} {onCart} />
9
+ * ```
10
+ */
11
+ </script>
12
+
13
+ <script lang="ts">
14
+ import ProductDetailBreadcrumb from "../shared/ProductDetailBreadcrumb.svelte";
15
+ import ProductDetailDescription from "../shared/ProductDetailDescription.svelte";
16
+ import ProductDetailFeatures from "../shared/ProductDetailFeatures.svelte";
17
+ import ProductDetailHeader from "../shared/ProductDetailHeader.svelte";
18
+ import ProductDetailImage from "../shared/ProductDetailImage.svelte";
19
+ import ProductDetailMap from "../shared/ProductDetailMap.svelte";
20
+ import ProductDetailTags from "../shared/ProductDetailTags.svelte";
21
+ import ProductPurchasePanel from "../shared/ProductPurchasePanel.svelte";
22
+ import type { ProductDetailsData } from "../types";
23
+
24
+ let {
25
+ data,
26
+ isLoading = false,
27
+ onBuy,
28
+ onFavorite,
29
+ onCart,
30
+ }: {
31
+ data: ProductDetailsData;
32
+ isLoading?: boolean;
33
+ onBuy?: (id: string | number) => void;
34
+ onFavorite?: (id: string | number) => void;
35
+ onCart?: (id: string | number) => void;
36
+ } = $props();
37
+ </script>
38
+
39
+ <div class="mx-auto max-w-7xl px-6 py-10">
40
+ <div class="mb-8">
41
+ <ProductDetailBreadcrumb items={data.breadcrumb} {isLoading} />
42
+ </div>
43
+
44
+ <div class="grid gap-10 lg:grid-cols-2">
45
+ <ProductDetailImage images={data.gallery} {isLoading} />
46
+
47
+ <div class="flex flex-col gap-5">
48
+ <ProductDetailHeader title={data.title} subtitle={data.subtitle} {isLoading} />
49
+
50
+ <ProductDetailTags tags={data.tags} {isLoading} />
51
+
52
+ <ProductDetailDescription
53
+ description={data.description}
54
+ longDescription={data.longDescription}
55
+ {isLoading}
56
+ />
57
+
58
+ {#if data.features}
59
+ <ProductDetailFeatures features={data.features} {isLoading} />
60
+ {/if}
61
+
62
+ <ProductPurchasePanel {data} {isLoading} {onBuy} {onFavorite} {onCart} />
63
+ </div>
64
+ </div>
65
+
66
+ {#if data.location}
67
+ <div class="mt-12">
68
+ <ProductDetailMap location={data.location} {isLoading} />
69
+ </div>
70
+ {/if}
71
+ </div>
@@ -0,0 +1,11 @@
1
+ import type { ProductDetailsData } from "../types";
2
+ type $$ComponentProps = {
3
+ data: ProductDetailsData;
4
+ isLoading?: boolean;
5
+ onBuy?: (id: string | number) => void;
6
+ onFavorite?: (id: string | number) => void;
7
+ onCart?: (id: string | number) => void;
8
+ };
9
+ declare const ProductDetails01: import("svelte").Component<$$ComponentProps, {}, "">;
10
+ type ProductDetails01 = ReturnType<typeof ProductDetails01>;
11
+ export default ProductDetails01;
@@ -0,0 +1,88 @@
1
+ <script lang="ts" module>
2
+ /**
3
+ * Variante 02 da página de detalhes do produto.
4
+ * Layout com galeria em destaque e conteúdo em coluna centralizada.
5
+ * @component
6
+ * @example
7
+ * ```svelte
8
+ * <ProductDetails02 {data} {onBuy} {onFavorite} {onCart} />
9
+ * ```
10
+ */
11
+ </script>
12
+
13
+ <script lang="ts">
14
+ import ProductDetailBreadcrumb from "../shared/ProductDetailBreadcrumb.svelte";
15
+ import ProductDetailDescription from "../shared/ProductDetailDescription.svelte";
16
+ import ProductDetailFeatures from "../shared/ProductDetailFeatures.svelte";
17
+ import ProductDetailFilesVertical from "../shared/ProductDetailFilesVertical.svelte";
18
+ import ProductDetailHeader from "../shared/ProductDetailHeader.svelte";
19
+ import ProductDetailMap from "../shared/ProductDetailMap.svelte";
20
+ import ProductDetailTags from "../shared/ProductDetailTags.svelte";
21
+ import ProductPurchasePanel from "../shared/ProductPurchasePanel.svelte";
22
+ import type { ProductDetailsData } from "../types";
23
+
24
+ let {
25
+ data,
26
+ isLoading = false,
27
+ onBuy,
28
+ onFavorite,
29
+ onCart,
30
+ }: {
31
+ data: ProductDetailsData;
32
+ isLoading?: boolean;
33
+ onBuy?: (id: string | number) => void;
34
+ onFavorite?: (id: string | number) => void;
35
+ onCart?: (id: string | number) => void;
36
+ } = $props();
37
+ </script>
38
+
39
+ <div class="bg-background">
40
+ <ProductDetailFilesVertical
41
+ images={data.gallery}
42
+ className="mx-auto max-w-5xl px-6 pt-10"
43
+ {isLoading}
44
+ />
45
+
46
+ <div class="mx-auto max-w-3xl px-6 py-12">
47
+ <div class="flex flex-col gap-6">
48
+ <div class="flex justify-center">
49
+ <ProductDetailBreadcrumb items={data.breadcrumb} {isLoading} />
50
+ </div>
51
+
52
+ <ProductDetailHeader
53
+ title={data.title}
54
+ subtitle={data.subtitle}
55
+ className="items-center text-center"
56
+ {isLoading}
57
+ />
58
+
59
+ <div class="flex justify-center">
60
+ <ProductDetailTags tags={data.tags} {isLoading} />
61
+ </div>
62
+
63
+ <ProductDetailDescription
64
+ description={data.description}
65
+ longDescription={data.longDescription}
66
+ {isLoading}
67
+ />
68
+
69
+ {#if data.features}
70
+ <div class="mx-auto w-full max-w-md">
71
+ <ProductDetailFeatures features={data.features} {isLoading} />
72
+ </div>
73
+ {/if}
74
+
75
+ <div class="flex justify-center">
76
+ <div class="w-full max-w-sm">
77
+ <ProductPurchasePanel {data} {isLoading} {onBuy} {onFavorite} {onCart} />
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </div>
82
+
83
+ {#if data.location}
84
+ <div class="mx-auto max-w-3xl px-6 pb-12">
85
+ <ProductDetailMap location={data.location} {isLoading} />
86
+ </div>
87
+ {/if}
88
+ </div>
@@ -0,0 +1,11 @@
1
+ import type { ProductDetailsData } from "../types";
2
+ type $$ComponentProps = {
3
+ data: ProductDetailsData;
4
+ isLoading?: boolean;
5
+ onBuy?: (id: string | number) => void;
6
+ onFavorite?: (id: string | number) => void;
7
+ onCart?: (id: string | number) => void;
8
+ };
9
+ declare const ProductDetails02: import("svelte").Component<$$ComponentProps, {}, "">;
10
+ type ProductDetails02 = ReturnType<typeof ProductDetails02>;
11
+ export default ProductDetails02;
@@ -0,0 +1,77 @@
1
+ <script lang="ts" module>
2
+ /**
3
+ * Variante 03 da página de detalhes do produto.
4
+ * Layout com galeria, conteúdo expandido e painel de compra sticky.
5
+ * @component
6
+ * @example
7
+ * ```svelte
8
+ * <ProductDetails03 {data} {onBuy} {onFavorite} {onCart} />
9
+ * ```
10
+ */
11
+ </script>
12
+
13
+ <script lang="ts">
14
+ import ProductDetailBreadcrumb from "../shared/ProductDetailBreadcrumb.svelte";
15
+ import ProductDetailDescription from "../shared/ProductDetailDescription.svelte";
16
+ import ProductDetailFeatures from "../shared/ProductDetailFeatures.svelte";
17
+ import ProductDetailFilesVertical from "../shared/ProductDetailFilesVertical.svelte";
18
+ import ProductDetailHeader from "../shared/ProductDetailHeader.svelte";
19
+ import ProductDetailMap from "../shared/ProductDetailMap.svelte";
20
+ import ProductDetailTags from "../shared/ProductDetailTags.svelte";
21
+ import ProductPurchasePanel from "../shared/ProductPurchasePanel.svelte";
22
+ import type { ProductDetailsData } from "../types";
23
+
24
+ let {
25
+ data,
26
+ isLoading = false,
27
+ onBuy,
28
+ onFavorite,
29
+ onCart,
30
+ }: {
31
+ data: ProductDetailsData;
32
+ isLoading?: boolean;
33
+ onBuy?: (id: string | number) => void;
34
+ onFavorite?: (id: string | number) => void;
35
+ onCart?: (id: string | number) => void;
36
+ } = $props();
37
+ </script>
38
+
39
+ <div class="mx-auto max-w-7xl px-6 py-10">
40
+ <div class="mb-8">
41
+ <ProductDetailBreadcrumb items={data.breadcrumb} {isLoading} />
42
+ </div>
43
+
44
+ <div class="grid gap-10 lg:grid-cols-[1fr_22rem]">
45
+ <div class="flex flex-col gap-8">
46
+ <ProductDetailFilesVertical images={data.gallery} {isLoading} />
47
+
48
+ <div class="flex flex-col gap-5">
49
+ <ProductDetailHeader title={data.title} subtitle={data.subtitle} {isLoading} />
50
+
51
+ <ProductDetailTags tags={data.tags} {isLoading} />
52
+
53
+ <ProductDetailDescription
54
+ description={data.description}
55
+ longDescription={data.longDescription}
56
+ {isLoading}
57
+ />
58
+
59
+ {#if data.features}
60
+ <ProductDetailFeatures features={data.features} {isLoading} />
61
+ {/if}
62
+ </div>
63
+ </div>
64
+
65
+ <aside class="lg:sticky lg:top-8 lg:self-start">
66
+ <div class="rounded-lg border p-6">
67
+ <ProductPurchasePanel {data} {isLoading} {onBuy} {onFavorite} {onCart} />
68
+ </div>
69
+ </aside>
70
+ </div>
71
+
72
+ {#if data.location}
73
+ <div class="mt-12">
74
+ <ProductDetailMap location={data.location} {isLoading} />
75
+ </div>
76
+ {/if}
77
+ </div>
@@ -0,0 +1,11 @@
1
+ import type { ProductDetailsData } from "../types";
2
+ type $$ComponentProps = {
3
+ data: ProductDetailsData;
4
+ isLoading?: boolean;
5
+ onBuy?: (id: string | number) => void;
6
+ onFavorite?: (id: string | number) => void;
7
+ onCart?: (id: string | number) => void;
8
+ };
9
+ declare const ProductDetails03: import("svelte").Component<$$ComponentProps, {}, "">;
10
+ type ProductDetails03 = ReturnType<typeof ProductDetails03>;
11
+ export default ProductDetails03;
@@ -0,0 +1,65 @@
1
+ <script lang="ts" module>
2
+ /**
3
+ * Variante 04 da página de detalhes do produto.
4
+ * Layout com galeria, informações e abas de conteúdo (descrição,
5
+ * avaliações) abaixo dos dados principais.
6
+ * @component
7
+ * @example
8
+ * ```svelte
9
+ * <ProductDetails04 {data} {onBuy} {onFavorite} {onCart} />
10
+ * ```
11
+ */
12
+ </script>
13
+
14
+ <script lang="ts">
15
+ import ProductDetailBreadcrumb from "../shared/ProductDetailBreadcrumb.svelte";
16
+ import ProductDetailHeader from "../shared/ProductDetailHeader.svelte";
17
+ import ProductDetailImage from "../shared/ProductDetailImage.svelte";
18
+ import ProductDetailMap from "../shared/ProductDetailMap.svelte";
19
+ import ProductDetailTags from "../shared/ProductDetailTags.svelte";
20
+ import ProductDetailTabs from "../shared/ProductDetailTabs.svelte";
21
+ import ProductPurchasePanel from "../shared/ProductPurchasePanel.svelte";
22
+ import type { ProductDetailsData } from "../types";
23
+
24
+ let {
25
+ data,
26
+ isLoading = false,
27
+ onBuy,
28
+ onFavorite,
29
+ onCart,
30
+ }: {
31
+ data: ProductDetailsData;
32
+ isLoading?: boolean;
33
+ onBuy?: (id: string | number) => void;
34
+ onFavorite?: (id: string | number) => void;
35
+ onCart?: (id: string | number) => void;
36
+ } = $props();
37
+ </script>
38
+
39
+ <div class="mx-auto max-w-7xl px-6 py-10">
40
+ <div class="mb-8">
41
+ <ProductDetailBreadcrumb items={data.breadcrumb} {isLoading} />
42
+ </div>
43
+
44
+ <div class="grid gap-10 lg:grid-cols-2">
45
+ <ProductDetailImage images={data.gallery} {isLoading} />
46
+
47
+ <div class="flex flex-col gap-5">
48
+ <ProductDetailHeader title={data.title} subtitle={data.subtitle} {isLoading} />
49
+
50
+ <ProductDetailTags tags={data.tags} {isLoading} />
51
+
52
+ <ProductPurchasePanel {data} {isLoading} {onBuy} {onFavorite} {onCart} />
53
+ </div>
54
+ </div>
55
+
56
+ <div class="mt-12 border-t pt-8">
57
+ <ProductDetailTabs tabs={data.tabs} {data} {isLoading} />
58
+ </div>
59
+
60
+ {#if data.location}
61
+ <div class="mt-12">
62
+ <ProductDetailMap location={data.location} {isLoading} />
63
+ </div>
64
+ {/if}
65
+ </div>
@@ -0,0 +1,11 @@
1
+ import type { ProductDetailsData } from "../types";
2
+ type $$ComponentProps = {
3
+ data: ProductDetailsData;
4
+ isLoading?: boolean;
5
+ onBuy?: (id: string | number) => void;
6
+ onFavorite?: (id: string | number) => void;
7
+ onCart?: (id: string | number) => void;
8
+ };
9
+ declare const ProductDetails04: import("svelte").Component<$$ComponentProps, {}, "">;
10
+ type ProductDetails04 = ReturnType<typeof ProductDetails04>;
11
+ export default ProductDetails04;
@@ -0,0 +1,38 @@
1
+ <script lang="ts" module>
2
+ /**
3
+ * Página de detalhes do produto com seleção de layout.
4
+ * Permite escolher entre quatro variantes:
5
+ * - **1**: Duas colunas (galeria à esquerda, info à direita).
6
+ * - **2**: Galeria em destaque com conteúdo centralizado.
7
+ * - **3**: Painel de compra sticky no lado direito.
8
+ * - **4**: Abas de conteúdo (descrição e avaliações) abaixo da info.
9
+ *
10
+ * @component
11
+ * @example
12
+ * ```svelte
13
+ * <ProductDetails varient={1} data={productData} />
14
+ *
15
+ * <ProductDetails varient={3} data={productData} onBuy={(id) => console.log(id)} />
16
+ * ```
17
+ */
18
+ </script>
19
+
20
+ <script lang="ts">
21
+ import type { ProductDetailsProps } from "./types";
22
+ import ProductDetails01 from "./01/ProductDetails01.svelte";
23
+ import ProductDetails02 from "./02/ProductDetails02.svelte";
24
+ import ProductDetails03 from "./03/ProductDetails03.svelte";
25
+ import ProductDetails04 from "./04/ProductDetails04.svelte";
26
+
27
+ let { varient = 1, data, isLoading = false, onBuy, onFavorite, onCart }: ProductDetailsProps = $props();
28
+ </script>
29
+
30
+ {#if varient === 2}
31
+ <ProductDetails02 {data} {isLoading} {onBuy} {onFavorite} {onCart} />
32
+ {:else if varient === 3}
33
+ <ProductDetails03 {data} {isLoading} {onBuy} {onFavorite} {onCart} />
34
+ {:else if varient === 4}
35
+ <ProductDetails04 {data} {isLoading} {onBuy} {onFavorite} {onCart} />
36
+ {:else}
37
+ <ProductDetails01 {data} {isLoading} {onBuy} {onFavorite} {onCart} />
38
+ {/if}
@@ -0,0 +1,4 @@
1
+ import type { ProductDetailsProps } from "./types";
2
+ declare const ProductDetails: import("svelte").Component<ProductDetailsProps, {}, "">;
3
+ type ProductDetails = ReturnType<typeof ProductDetails>;
4
+ export default ProductDetails;