negodesign 0.0.30 → 0.0.32
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/NegoDesign.svelte +2 -10
- package/dist/components/NegoDesign.svelte.d.ts +2 -7
- package/dist/components/core/banner/CtaCardBanner.svelte +1 -1
- package/dist/components/core/banner/types.d.ts +16 -6
- package/dist/components/core/card/types.d.ts +94 -0
- package/dist/components/core/carousel/grid/media/types.d.ts +11 -1
- package/dist/components/core/carousel/grid/media/ui/CarouselGridMedia.svelte +2 -2
- package/dist/components/core/carousel/grid/media/ui/CarouselGridMedia.svelte.d.ts +2 -2
- package/dist/components/core/carousel/grid/profile/types.d.ts +11 -1
- package/dist/components/core/carousel/grid/profile/ui/CarouselGridProfile.svelte +2 -2
- package/dist/components/core/carousel/grid/profile/ui/CarouselGridProfile.svelte.d.ts +2 -2
- package/dist/components/core/carousel/highlights/types.d.ts +11 -0
- package/dist/components/core/carousel/promotion/types.d.ts +10 -0
- package/dist/components/core/carousel/types.d.ts +56 -0
- package/dist/components/core/datatable/data/data-table.d.ts +25 -0
- package/dist/components/core/footer/types.d.ts +28 -0
- package/dist/components/core/nav/data/nav-menu-sidebar.d.ts +29 -0
- package/dist/components/core/nav/data/nav-menu.d.ts +43 -0
- package/dist/components/core/nav/data/nav-user-sidebar.d.ts +14 -0
- package/dist/components/core/nav/ui/menu-links.svelte +1 -1
- package/dist/components/core/panel/CarouselSlot.svelte +1 -1
- package/dist/components/core/panel/type.d.ts +11 -0
- package/dist/components/core/search/types.d.ts +17 -5
- package/dist/components/core/sidebar/types.d.ts +19 -0
- package/dist/components/core/sidebar/types.js +1 -0
- package/dist/components/core/tabs/data/TabModel.d.ts +11 -0
- package/dist/components/core/tabs/types.d.ts +11 -0
- package/dist/components/core/tabs/types.js +1 -0
- package/dist/components/pages/admin/01/ui/types.d.ts +21 -0
- package/dist/components/pages/admin/01/ui/types.js +1 -0
- package/dist/components/pages/product-details/01/ProductDetails01.svelte +71 -0
- package/dist/components/pages/product-details/01/ProductDetails01.svelte.d.ts +11 -0
- package/dist/components/pages/product-details/02/ProductDetails02.svelte +88 -0
- package/dist/components/pages/product-details/02/ProductDetails02.svelte.d.ts +11 -0
- package/dist/components/pages/product-details/03/ProductDetails03.svelte +77 -0
- package/dist/components/pages/product-details/03/ProductDetails03.svelte.d.ts +11 -0
- package/dist/components/pages/product-details/04/ProductDetails04.svelte +65 -0
- package/dist/components/pages/product-details/04/ProductDetails04.svelte.d.ts +11 -0
- package/dist/components/pages/product-details/ProductDetails.svelte +38 -0
- package/dist/components/pages/product-details/ProductDetails.svelte.d.ts +4 -0
- package/dist/components/pages/product-details/shared/ProductDetailActions.svelte +82 -0
- package/dist/components/pages/product-details/shared/ProductDetailActions.svelte.d.ts +13 -0
- package/dist/components/pages/product-details/shared/ProductDetailBreadcrumb.svelte +46 -0
- package/dist/components/pages/product-details/shared/ProductDetailBreadcrumb.svelte.d.ts +8 -0
- package/dist/components/pages/product-details/shared/ProductDetailDescription.svelte +38 -0
- package/dist/components/pages/product-details/shared/ProductDetailDescription.svelte.d.ts +8 -0
- package/dist/components/pages/product-details/shared/ProductDetailFeatures.svelte +40 -0
- package/dist/components/pages/product-details/shared/ProductDetailFeatures.svelte.d.ts +7 -0
- package/dist/components/pages/product-details/shared/ProductDetailFilesVertical.svelte +72 -0
- package/dist/components/pages/product-details/shared/ProductDetailFilesVertical.svelte.d.ts +9 -0
- package/dist/components/pages/product-details/shared/ProductDetailHeader.svelte +41 -0
- package/dist/components/pages/product-details/shared/ProductDetailHeader.svelte.d.ts +9 -0
- package/dist/components/pages/product-details/shared/ProductDetailImage.svelte +70 -0
- package/dist/components/pages/product-details/shared/ProductDetailImage.svelte.d.ts +9 -0
- package/dist/components/pages/product-details/shared/ProductDetailMap.svelte +57 -0
- package/dist/components/pages/product-details/shared/ProductDetailMap.svelte.d.ts +9 -0
- package/dist/components/pages/product-details/shared/ProductDetailPrice.svelte +44 -0
- package/dist/components/pages/product-details/shared/ProductDetailPrice.svelte.d.ts +9 -0
- package/dist/components/pages/product-details/shared/ProductDetailRating.svelte +42 -0
- package/dist/components/pages/product-details/shared/ProductDetailRating.svelte.d.ts +8 -0
- package/dist/components/pages/product-details/shared/ProductDetailReviews.svelte +70 -0
- package/dist/components/pages/product-details/shared/ProductDetailReviews.svelte.d.ts +8 -0
- package/dist/components/pages/product-details/shared/ProductDetailTabs.svelte +96 -0
- package/dist/components/pages/product-details/shared/ProductDetailTabs.svelte.d.ts +12 -0
- package/dist/components/pages/product-details/shared/ProductDetailTags.svelte +35 -0
- package/dist/components/pages/product-details/shared/ProductDetailTags.svelte.d.ts +8 -0
- package/dist/components/pages/product-details/shared/ProductPurchasePanel.svelte +58 -0
- package/dist/components/pages/product-details/shared/ProductPurchasePanel.svelte.d.ts +11 -0
- package/dist/components/pages/product-details/types.d.ts +170 -0
- package/dist/components/pages/product-details/types.js +1 -0
- package/dist/components/pages/profile-user/01/ProfileUser01.svelte +113 -0
- package/dist/components/pages/profile-user/01/ProfileUser01.svelte.d.ts +27 -0
- package/dist/components/pages/profile-user/02/ProfileUser02.svelte +83 -0
- package/dist/components/pages/profile-user/02/ProfileUser02.svelte.d.ts +20 -0
- package/dist/components/pages/profile-user/03/ProfileUser03.svelte +85 -0
- package/dist/components/pages/profile-user/03/ProfileUser03.svelte.d.ts +20 -0
- package/dist/components/pages/profile-user/ProfileUser.svelte +53 -0
- package/dist/components/pages/profile-user/ProfileUser.svelte.d.ts +4 -0
- package/dist/components/pages/profile-user/shared/ProfileUserAddress.svelte +84 -0
- package/dist/components/pages/profile-user/shared/ProfileUserAddress.svelte.d.ts +8 -0
- package/dist/components/pages/profile-user/shared/ProfileUserHeader.svelte +104 -0
- package/dist/components/pages/profile-user/shared/ProfileUserHeader.svelte.d.ts +9 -0
- package/dist/components/pages/profile-user/shared/ProfileUserResetPassword.svelte +116 -0
- package/dist/components/pages/profile-user/shared/ProfileUserResetPassword.svelte.d.ts +7 -0
- package/dist/components/pages/profile-user/shared/ProfileUserSetting.svelte +176 -0
- package/dist/components/pages/profile-user/shared/ProfileUserSetting.svelte.d.ts +14 -0
- package/dist/components/pages/profile-user/shared/ProfileUserTabs.svelte +78 -0
- package/dist/components/pages/profile-user/shared/ProfileUserTabs.svelte.d.ts +22 -0
- package/dist/components/pages/profile-user/types.d.ts +144 -0
- package/dist/components/pages/profile-user/types.js +1 -0
- package/dist/components/types.d.ts +6 -0
- package/dist/components/types.js +1 -0
- package/dist/globals.css +210 -3
- package/dist/i18n/langs/en.d.ts +83 -0
- package/dist/i18n/langs/en.js +83 -0
- package/dist/i18n/langs/pt.d.ts +83 -0
- package/dist/i18n/langs/pt.js +83 -0
- package/dist/i18n/translations.d.ts +166 -0
- package/dist/index.d.ts +190 -25
- package/dist/index.js +190 -25
- package/dist/types/index.d.ts +159 -5
- package/package.json +1 -1
|
@@ -1,21 +1,50 @@
|
|
|
1
1
|
import type { IconSvgElement } from "@hugeicons/svelte";
|
|
2
|
+
/**
|
|
3
|
+
* Grupo/categoria de menus na sidebar (ex: "Gestão", "Relatórios").
|
|
4
|
+
*/
|
|
2
5
|
export interface GroupMenuSidebarProps {
|
|
6
|
+
/** Nome/título do grupo de menus */
|
|
3
7
|
name: string;
|
|
4
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Submenu de um item principal da sidebar.
|
|
11
|
+
*/
|
|
5
12
|
export interface SubMenuSidebarProps {
|
|
13
|
+
/** Título do submenu */
|
|
6
14
|
title: string;
|
|
15
|
+
/** URL de destino do submenu */
|
|
7
16
|
url: string;
|
|
17
|
+
/** Ícone SVG do submenu */
|
|
8
18
|
icon: IconSvgElement;
|
|
19
|
+
/** Indica se o submenu está ativo/selecionado */
|
|
9
20
|
isActive?: boolean;
|
|
10
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Item de menu principal da sidebar.
|
|
24
|
+
* Pode ser um item simples ou ter submenus.
|
|
25
|
+
*/
|
|
11
26
|
export interface NavMenuSidebarProps {
|
|
27
|
+
/** Título/nome do item de menu */
|
|
12
28
|
title: string;
|
|
29
|
+
/** URL de destino (se não tiver submenus) */
|
|
13
30
|
url?: string;
|
|
31
|
+
/** Ícone SVG do item de menu */
|
|
14
32
|
icon: IconSvgElement;
|
|
33
|
+
/** Indica se o item está ativo/selecionado */
|
|
15
34
|
isActive?: boolean;
|
|
35
|
+
/** Grupo/categoria a que o menu pertence */
|
|
16
36
|
group?: GroupMenuSidebarProps;
|
|
17
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Item de menu com submenus aninhados.
|
|
40
|
+
* Estende NavMenuSidebarProps adicionando suporte a submenus.
|
|
41
|
+
*/
|
|
18
42
|
export interface NavMenuAndSubmenuSidebarProps extends NavMenuSidebarProps {
|
|
43
|
+
/** Lista de submenus abaixo do item principal */
|
|
19
44
|
submenus?: SubMenuSidebarProps[];
|
|
20
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Tipo união para itens da barra lateral — pode ser
|
|
48
|
+
* um item simples ou um item com submenus.
|
|
49
|
+
*/
|
|
21
50
|
export type NavMenuItem = NavMenuSidebarProps | NavMenuAndSubmenuSidebarProps;
|
|
@@ -1,36 +1,79 @@
|
|
|
1
1
|
import type { IconSvgElement } from "@hugeicons/svelte";
|
|
2
|
+
/**
|
|
3
|
+
* Props do logotipo no NavMenu.
|
|
4
|
+
*/
|
|
2
5
|
export interface NavMenuLogoProps {
|
|
6
|
+
/** URL da imagem do logotipo */
|
|
3
7
|
img?: string;
|
|
8
|
+
/** URL de destino ao clicar no logo */
|
|
4
9
|
url?: string;
|
|
10
|
+
/** Texto alternativo / label do logo */
|
|
5
11
|
label: string;
|
|
12
|
+
/** Classe CSS adicional */
|
|
6
13
|
className?: string;
|
|
14
|
+
/** Callback ao clicar no logo */
|
|
7
15
|
onclick?: () => void;
|
|
8
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Props de um link individual no menu de navegação.
|
|
19
|
+
*/
|
|
9
20
|
export interface NavMenuLinksProps {
|
|
21
|
+
/** URL de destino do link */
|
|
10
22
|
url?: string;
|
|
23
|
+
/** Alias de `url` — URL de destino do link (compatibilidade) */
|
|
24
|
+
href?: string;
|
|
25
|
+
/** Texto exibido no link */
|
|
11
26
|
label: string;
|
|
27
|
+
/** Ícone SVG opcional antes do label */
|
|
12
28
|
icon?: IconSvgElement;
|
|
29
|
+
/** Callback ao clicar no link */
|
|
13
30
|
onclick?: () => void;
|
|
14
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Props de um item de ação (botão ou link) no menu de navegação.
|
|
34
|
+
* Usado para login, registo, etc.
|
|
35
|
+
*/
|
|
15
36
|
export interface NavMenuActionsProps {
|
|
37
|
+
/** URL de destino da ação */
|
|
16
38
|
url?: string;
|
|
39
|
+
/** Texto exibido na ação */
|
|
17
40
|
label: string;
|
|
41
|
+
/** Tipo de elemento: botão estilizado ou link simples */
|
|
18
42
|
type?: 'BUTTON' | 'LINK';
|
|
43
|
+
/** Classe CSS adicional */
|
|
19
44
|
className?: string;
|
|
45
|
+
/** Ícone SVG opcional */
|
|
20
46
|
icon?: IconSvgElement;
|
|
47
|
+
/** Callback ao clicar na ação */
|
|
21
48
|
onclick?: () => void;
|
|
22
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Props do componente NavMenu — barra de navegação principal
|
|
52
|
+
* com logo, links, ações (login/registo), language switcher e light switch.
|
|
53
|
+
*/
|
|
23
54
|
export interface NavMenuProps {
|
|
55
|
+
/** Classe CSS adicional para o container do nav */
|
|
24
56
|
navClass?: string;
|
|
57
|
+
/** Classe CSS personalizada para cada link */
|
|
25
58
|
linkClass?: string;
|
|
59
|
+
/** Classe CSS personalizada para o grupo de links/açōes */
|
|
26
60
|
groupClass?: string;
|
|
61
|
+
/** Classe CSS personalizada para os botões */
|
|
27
62
|
buttonClass?: string;
|
|
63
|
+
/** Configuração do logotipo */
|
|
28
64
|
logo?: NavMenuLogoProps;
|
|
65
|
+
/** Lista de links de navegação */
|
|
29
66
|
links: NavMenuLinksProps[];
|
|
67
|
+
/** Lista de ações (ex: Login, Registar) */
|
|
30
68
|
actions?: NavMenuActionsProps[];
|
|
69
|
+
/** Alinhamento dos links e das ações */
|
|
31
70
|
align?: 'LINK_SEPARATED_ACTIONS' | 'LINK_INTO_ACTIONS';
|
|
71
|
+
/** Exibe o interruptor de tema (claro/escuro) */
|
|
32
72
|
isLightSwitch?: boolean;
|
|
73
|
+
/** Exibe o seletor de idioma */
|
|
33
74
|
isLanguageSwitcher?: boolean;
|
|
75
|
+
/** Callback ao clicar no botão Login */
|
|
34
76
|
onclickButtonLogin?: () => void;
|
|
77
|
+
/** Callback ao clicar no botão Registar */
|
|
35
78
|
onclickButtonRegister?: () => void;
|
|
36
79
|
}
|
|
@@ -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
|
}
|
|
@@ -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
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Props base para o componente de input de busca.
|
|
3
|
+
*/
|
|
2
4
|
export interface SearchItemProps {
|
|
3
|
-
/** Callback
|
|
5
|
+
/** Callback acionado ao submeter a busca (enter ou clique no botão) */
|
|
4
6
|
onSubmit?: (q: string) => void;
|
|
5
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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>
|