negodesign 0.0.29 → 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.
- package/dist/assets/lonely-404.mp4 +0 -0
- package/dist/components/core/banner/AdCardBanner.svelte.d.ts +4 -0
- package/dist/components/core/banner/CtaCardBanner.svelte +118 -0
- package/dist/components/core/banner/CtaCardBanner.svelte.d.ts +4 -0
- package/dist/components/core/banner/{BannerNotification.svelte → NotificationBanner.svelte} +4 -3
- package/dist/components/core/banner/NotificationBanner.svelte.d.ts +4 -0
- package/dist/components/core/banner/types.d.ts +38 -7
- package/dist/components/core/card/highlight/01/CardHighlight01.svelte +15 -26
- package/dist/components/core/card/highlight/02/CardHighlight02.svelte +13 -24
- package/dist/components/core/card/media/01/CardMedia01.svelte +2 -12
- package/dist/components/core/card/media/02/CardMedia02.svelte +2 -12
- package/dist/components/core/card/promotion/CardPromotion.svelte +5 -1
- package/dist/components/core/card/shared/CardButton.svelte +9 -3
- package/dist/components/core/card/shared/CardButton.svelte.d.ts +1 -1
- package/dist/components/core/card/shared/CardLogo.svelte +19 -0
- package/dist/components/core/card/shared/CardLogo.svelte.d.ts +7 -0
- package/dist/components/core/card/shared/CardThumbnailVideo.svelte +3 -0
- package/dist/components/core/card/types.d.ts +97 -0
- package/dist/components/core/carousel/grid/media/types.d.ts +11 -0
- package/dist/components/core/carousel/grid/media/ui/CarouselGridMedia.svelte +2 -1
- package/dist/components/core/carousel/grid/profile/types.d.ts +11 -0
- package/dist/components/core/carousel/grid/profile/ui/CarouselGridProfile.svelte +3 -5
- package/dist/components/core/carousel/grid/shared/ui/CarouselGridSlot.svelte +4 -9
- package/dist/components/core/carousel/grid/shared/ui/CarouselGridSlot.svelte.d.ts +1 -0
- 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 +51 -0
- package/dist/components/core/footer/types.js +1 -0
- package/dist/components/core/footer/ui/01/Footer01.svelte +76 -0
- package/dist/components/core/footer/ui/01/Footer01.svelte.d.ts +4 -0
- package/dist/components/core/footer/ui/02/Footer02.svelte +53 -0
- package/dist/components/core/footer/ui/02/Footer02.svelte.d.ts +4 -0
- package/dist/components/core/footer/ui/Footer.svelte +18 -0
- package/dist/components/core/footer/ui/Footer.svelte.d.ts +7 -0
- package/dist/components/core/footer/ui/shared/FooterColumn.svelte +18 -0
- package/dist/components/core/footer/ui/shared/FooterColumn.svelte.d.ts +4 -0
- package/dist/components/core/footer/ui/shared/FooterNewsLetter.svelte +57 -0
- package/dist/components/core/footer/ui/shared/FooterNewsLetter.svelte.d.ts +9 -0
- package/dist/components/core/footer/ui/shared/FooterSocialIcon.svelte +62 -0
- package/dist/components/core/footer/ui/shared/FooterSocialIcon.svelte.d.ts +4 -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 +2 -2
- package/dist/components/core/panel/LeftHero.svelte +2 -2
- 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/globals.css +319 -4
- package/dist/i18n/langs/en.d.ts +87 -0
- package/dist/i18n/langs/en.js +87 -0
- package/dist/i18n/langs/pt.d.ts +87 -0
- package/dist/i18n/langs/pt.js +93 -6
- package/dist/i18n/translations.d.ts +174 -0
- package/dist/index.d.ts +194 -27
- package/dist/index.js +194 -27
- package/dist/styles/globals.css +1 -1
- package/dist/types/index.d.ts +196 -5
- package/package.json +1 -1
- package/dist/components/core/banner/BannerNotification.svelte.d.ts +0 -4
- package/dist/components/core/banner/CardAdBanner.svelte.d.ts +0 -4
- /package/dist/components/core/banner/{CardAdBanner.svelte → AdCardBanner.svelte} +0 -0
|
@@ -1,82 +1,179 @@
|
|
|
1
1
|
import type { IconSvgElement } from "@hugeicons/svelte";
|
|
2
|
+
/**
|
|
3
|
+
* Props de uma tag individual usada nos cards.
|
|
4
|
+
* Usada em CardMedia, CardProfile, CardPromotion e CardHighlight.
|
|
5
|
+
*/
|
|
2
6
|
export interface CardTagsProps {
|
|
7
|
+
/** Ícone opcional exibido antes do texto da tag */
|
|
3
8
|
icon?: IconSvgElement;
|
|
9
|
+
/** Texto exibido na tag */
|
|
4
10
|
text: string;
|
|
5
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Props do CardMedia — card de mídia com imagem ou vídeo,
|
|
14
|
+
* tags, rating, botões de perfil e detalhes.
|
|
15
|
+
*/
|
|
6
16
|
export interface CardMediaProps {
|
|
17
|
+
/** Identificador único do item */
|
|
7
18
|
id: string | number;
|
|
19
|
+
/** URL do logotipo da empresa/organização */
|
|
8
20
|
logo?: string;
|
|
21
|
+
/** Título do card (nome do produto, serviço, etc.) */
|
|
9
22
|
title?: string;
|
|
23
|
+
/** Descrição/conteúdo do card */
|
|
10
24
|
content?: string;
|
|
25
|
+
/** Valor máximo da classificação por estrelas (ex: 5) */
|
|
11
26
|
startMax?: number;
|
|
27
|
+
/** URL da imagem de capa */
|
|
12
28
|
imageUrl?: string;
|
|
29
|
+
/** URL do vídeo (substitui a imagem quando fornecido) */
|
|
13
30
|
videoUrl?: string;
|
|
31
|
+
/** Classe CSS adicional para o container */
|
|
14
32
|
className?: string;
|
|
33
|
+
/** Lista de tags exibidas no card */
|
|
15
34
|
tags?: CardTagsProps[];
|
|
35
|
+
/** Indica se o item está marcado como favorito */
|
|
16
36
|
isFavorite?: boolean;
|
|
37
|
+
/** Indica estado de carregamento (skeleton) */
|
|
17
38
|
isLoading?: boolean;
|
|
39
|
+
/** Valor atual da classificação por estrelas (ex: 4.5) */
|
|
18
40
|
startNumber?: number;
|
|
41
|
+
/** Exibe borda inferior nas tags */
|
|
19
42
|
isTagBorderBottom?: boolean;
|
|
43
|
+
/** Classe CSS personalizada para o botão de perfil */
|
|
20
44
|
buttonProfileClass?: string;
|
|
45
|
+
/** Classe CSS personalizada para o botão de detalhes */
|
|
21
46
|
buttonDetailsClass?: string;
|
|
47
|
+
/** Exibe o botão de maximizar no vídeo */
|
|
22
48
|
isVideoButtonMaximized?: boolean;
|
|
49
|
+
/** Exibe o botão de maximizar na imagem */
|
|
23
50
|
isImageButtonMaximized?: boolean;
|
|
51
|
+
/** Callback acionado ao clicar no botão de favorito */
|
|
24
52
|
onFavoriteClick?: (id: string | number) => void;
|
|
53
|
+
/** Callback acionado ao clicar no botão de perfil */
|
|
25
54
|
onButtonProfile?: (id: string | number) => void;
|
|
55
|
+
/** Callback acionado ao clicar no botão de detalhes */
|
|
26
56
|
onButtonDetails?: (id: string | number) => void;
|
|
57
|
+
/** Comportamento do vídeo: iniciar reprodução automática ou no hover */
|
|
27
58
|
videoAction?: 'START_REPRODUCTION' | 'HOVER_REPRODUCTION';
|
|
28
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Props do CardProfile — card de perfil de organização/guia
|
|
62
|
+
* com logo, descrição, tags, rating e botões.
|
|
63
|
+
*/
|
|
29
64
|
export interface CardProfileProps {
|
|
65
|
+
/** Identificador único do perfil */
|
|
30
66
|
id: string | number;
|
|
67
|
+
/** URL do logotipo/avatar */
|
|
31
68
|
logo?: string;
|
|
69
|
+
/** Nome/título do perfil */
|
|
32
70
|
title?: string;
|
|
71
|
+
/** Descrição do perfil */
|
|
33
72
|
content?: string;
|
|
73
|
+
/** Valor máximo da classificação por estrelas */
|
|
34
74
|
startMax?: number;
|
|
75
|
+
/** Classe CSS adicional */
|
|
35
76
|
className?: string;
|
|
77
|
+
/** Lista de tags do perfil */
|
|
36
78
|
tags?: CardTagsProps[];
|
|
79
|
+
/** Indica se está marcado como favorito */
|
|
37
80
|
isFavorite?: boolean;
|
|
81
|
+
/** Valor da classificação por estrelas */
|
|
38
82
|
startNumber?: number;
|
|
83
|
+
/** Estado de carregamento (skeleton) */
|
|
39
84
|
isLoading?: boolean;
|
|
85
|
+
/** Exibe borda inferior nas tags */
|
|
40
86
|
isTagBorderBottom?: boolean;
|
|
87
|
+
/** Classe CSS personalizada para botão de perfil */
|
|
41
88
|
buttonProfileClass?: string;
|
|
89
|
+
/** Classe CSS personalizada para botão de detalhes */
|
|
42
90
|
buttonDetailsClass?: string;
|
|
91
|
+
/** Callback ao clicar no botão favorito */
|
|
43
92
|
onFavoriteClick?: (id: string | number) => void;
|
|
93
|
+
/** Callback ao clicar no botão perfil */
|
|
44
94
|
onButtonProfile?: (id: string | number) => void;
|
|
95
|
+
/** Callback ao clicar no botão detalhes */
|
|
45
96
|
onButtonDetails?: (id: string | number) => void;
|
|
46
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Props do CardPromotion — card de promoção com preço antigo/novo,
|
|
100
|
+
* botão de comprar, favoritar e adicionar ao carrinho.
|
|
101
|
+
*/
|
|
47
102
|
export interface CardPromotionProps {
|
|
103
|
+
/** Identificador único da promoção */
|
|
48
104
|
id: string | number;
|
|
105
|
+
/** URL do logotipo */
|
|
49
106
|
logo?: string;
|
|
107
|
+
/** URL da imagem do produto em promoção */
|
|
50
108
|
imageUrl?: string;
|
|
109
|
+
/** Nome/título da promoção */
|
|
51
110
|
title?: string;
|
|
111
|
+
/** Descrição da promoção */
|
|
52
112
|
content?: string;
|
|
113
|
+
/** Classe CSS adicional */
|
|
53
114
|
className?: string;
|
|
115
|
+
/** Indica se o botão de carrinho está ativo */
|
|
54
116
|
isCart?: boolean;
|
|
117
|
+
/** Estado de carregamento (skeleton) */
|
|
55
118
|
isLoading?: boolean;
|
|
119
|
+
/** Indica se está marcado como favorito */
|
|
56
120
|
isFavorite?: boolean;
|
|
121
|
+
/** Lista de tags */
|
|
57
122
|
tags?: CardTagsProps[];
|
|
123
|
+
/** Preço original (antes do desconto) */
|
|
58
124
|
oldPrice?: string | number;
|
|
125
|
+
/** Preço promocional */
|
|
59
126
|
newPrice?: string | number;
|
|
127
|
+
/** Texto do botão de compra (padrão: "Comprar") */
|
|
60
128
|
buttonBuyText?: string;
|
|
129
|
+
/** Classe CSS personalizada para o botão comprar */
|
|
130
|
+
buttonBuyClass?: string;
|
|
131
|
+
/** Exibe ícone antes da descrição */
|
|
61
132
|
isDescriptionIcon?: boolean;
|
|
133
|
+
/** Exibe etiqueta (label) na descrição */
|
|
62
134
|
isDescriptionLabel?: boolean;
|
|
135
|
+
/** Callback ao clicar no botão comprar */
|
|
63
136
|
onClickBuy?: (id: string | number) => void;
|
|
137
|
+
/** Callback ao clicar no botão carrinho */
|
|
64
138
|
onClickShop?: (id: string | number) => void;
|
|
139
|
+
/** Callback ao clicar no botão favorito */
|
|
65
140
|
onClickFavorite?: (id: string | number) => void;
|
|
66
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Props do CardHighlight — card de destaque/organização
|
|
144
|
+
* com imagem, logo, botão de ação expandida.
|
|
145
|
+
*/
|
|
67
146
|
export interface CardHighlightProps {
|
|
147
|
+
/** Identificador único do destaque */
|
|
68
148
|
id: string | number;
|
|
149
|
+
/** URL do logotipo */
|
|
69
150
|
logo?: string;
|
|
151
|
+
/** URL da imagem de destaque */
|
|
70
152
|
imageUrl?: string;
|
|
153
|
+
/** Título/nome do destaque */
|
|
71
154
|
title?: string;
|
|
155
|
+
/** Classe CSS adicional */
|
|
72
156
|
className?: string;
|
|
157
|
+
/** Indica se está marcado como favorito */
|
|
73
158
|
isFavorite?: boolean;
|
|
159
|
+
/** Estado de carregamento (skeleton) */
|
|
74
160
|
isLoading?: boolean;
|
|
161
|
+
/** Exibe botão expandir/ver mais */
|
|
162
|
+
isExpandButton?: boolean;
|
|
163
|
+
/** Descrição do destaque */
|
|
75
164
|
content?: string;
|
|
165
|
+
/** Texto do botão de ação principal */
|
|
76
166
|
buttonText?: string;
|
|
167
|
+
/** Classe CSS personalizada para o botão */
|
|
168
|
+
buttonClass?: string;
|
|
169
|
+
/** Exibe ícone antes da descrição */
|
|
77
170
|
isDescriptionIcon?: boolean;
|
|
171
|
+
/** Exibe etiqueta (label) na descrição */
|
|
78
172
|
isDescriptionLabel?: boolean;
|
|
173
|
+
/** Lista de tags */
|
|
79
174
|
tags?: CardTagsProps[];
|
|
175
|
+
/** Callback ao clicar no botão favorito */
|
|
80
176
|
onClickFavorite?: (id: string | number) => void;
|
|
177
|
+
/** Callback ao clicar no botão principal */
|
|
81
178
|
onClickBtn?: (id: string | number) => void;
|
|
82
179
|
}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import type { CardMediaProps } from "../../../card/types";
|
|
2
2
|
import type { CarouselSlotProps } from "../../../panel/type";
|
|
3
3
|
import type { CarouselHeaderProps } from "../../types";
|
|
4
|
+
/**
|
|
5
|
+
* Props do CarouselGridMedia — layout em grid de cards de mídia
|
|
6
|
+
* (imagens/vídeos). Em telas mobile o grid vira carousel com swipe.
|
|
7
|
+
*/
|
|
4
8
|
export interface CarouselMediaProps {
|
|
9
|
+
/** Props do cabeçalho do carousel (título, descrição, etc.) */
|
|
5
10
|
headerProps?: CarouselHeaderProps;
|
|
11
|
+
/** Props do slot/container do carousel (botões navegação, plugins) */
|
|
6
12
|
slotProps?: CarouselSlotProps;
|
|
13
|
+
/** Classe CSS adicional para o container do grid */
|
|
14
|
+
gridClass?: string;
|
|
15
|
+
/** Variante visual do card: 1 ou 2 */
|
|
7
16
|
variant?: 1 | 2;
|
|
17
|
+
/** Lista de itens de mídia para exibir nos cards */
|
|
8
18
|
items: CardMediaProps[];
|
|
19
|
+
/** Estado de carregamento (skeleton) */
|
|
9
20
|
isLoading?: boolean;
|
|
10
21
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
const {
|
|
10
10
|
headerProps,
|
|
11
11
|
slotProps,
|
|
12
|
+
gridClass,
|
|
12
13
|
items,
|
|
13
14
|
variant,
|
|
14
15
|
isLoading = false,
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
</script>
|
|
19
20
|
|
|
20
21
|
<CarouselHeader {...headerProps}>
|
|
21
|
-
<CarouselGridSlot {slotProps} totalItems={items.length}>
|
|
22
|
+
<CarouselGridSlot {slotProps} {gridClass} totalItems={items.length}>
|
|
22
23
|
{#if isLoading}
|
|
23
24
|
{#each Array.from( { length: responsive.isMobile ? 5 : 9 }, ) as _, i (`loading-${i}`)}
|
|
24
25
|
{#if responsive.isMobile}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import type { CardProfileProps } from "../../../card/types";
|
|
2
2
|
import type { CarouselSlotProps } from "../../../panel/type";
|
|
3
3
|
import type { CarouselHeaderProps } from "../../types";
|
|
4
|
+
/**
|
|
5
|
+
* Props do CarouselGridProfile — layout em grid de cards de perfil
|
|
6
|
+
* (guias, intérpretes, organizações). Em mobile vira carousel com swipe.
|
|
7
|
+
*/
|
|
4
8
|
export interface CarouselProfileProps {
|
|
9
|
+
/** Props do cabeçalho do carousel (título, descrição, etc.) */
|
|
5
10
|
headerProps?: CarouselHeaderProps;
|
|
11
|
+
/** Props do slot/container do carousel (botões navegação, plugins) */
|
|
6
12
|
slotProps?: CarouselSlotProps;
|
|
13
|
+
/** Classe CSS adicional para o container do grid */
|
|
14
|
+
gridClass?: string;
|
|
15
|
+
/** Variante visual do card: 1 ou 2 */
|
|
7
16
|
variant?: 1 | 2;
|
|
17
|
+
/** Lista de perfis para exibir nos cards */
|
|
8
18
|
items: CardProfileProps[];
|
|
19
|
+
/** Estado de carregamento (skeleton) */
|
|
9
20
|
isLoading?: boolean;
|
|
10
21
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
const {
|
|
10
10
|
headerProps,
|
|
11
11
|
slotProps,
|
|
12
|
+
gridClass,
|
|
12
13
|
items,
|
|
13
14
|
variant,
|
|
14
15
|
isLoading = false,
|
|
@@ -18,12 +19,9 @@
|
|
|
18
19
|
</script>
|
|
19
20
|
|
|
20
21
|
<CarouselHeader {...headerProps}>
|
|
21
|
-
<CarouselGridSlot
|
|
22
|
-
{slotProps}
|
|
23
|
-
totalItems={items.length}
|
|
24
|
-
>
|
|
22
|
+
<CarouselGridSlot {slotProps} {gridClass} totalItems={items.length}>
|
|
25
23
|
{#if isLoading}
|
|
26
|
-
{#each Array.from({ length: responsive.isMobile ? 5 : 9 }) as _, i (`loading-${i}`)}
|
|
24
|
+
{#each Array.from( { length: responsive.isMobile ? 5 : 9 }, ) as _, i (`loading-${i}`)}
|
|
27
25
|
{#if responsive.isMobile}
|
|
28
26
|
<Carousel.Item class="pl-2 basis-auto">
|
|
29
27
|
<CardProfile id={i} {variant} isLoading />
|
|
@@ -8,20 +8,15 @@
|
|
|
8
8
|
type Props = {
|
|
9
9
|
slotProps?: CarouselSlotProps;
|
|
10
10
|
totalItems: number;
|
|
11
|
+
gridClass?: string;
|
|
11
12
|
children: Snippet;
|
|
12
13
|
};
|
|
13
14
|
|
|
14
|
-
const {
|
|
15
|
-
slotProps,
|
|
16
|
-
totalItems,
|
|
17
|
-
children,
|
|
18
|
-
}: Props = $props();
|
|
15
|
+
const { slotProps, totalItems, gridClass, children }: Props = $props();
|
|
19
16
|
|
|
20
17
|
const responsive = useDevice();
|
|
21
18
|
|
|
22
|
-
const colsClass = $derived(
|
|
23
|
-
totalItems <= 4 ? "grid-cols-2" : "grid-cols-3"
|
|
24
|
-
);
|
|
19
|
+
const colsClass = $derived(totalItems <= 2 ? "grid-cols-2" : "grid-cols-3");
|
|
25
20
|
</script>
|
|
26
21
|
|
|
27
22
|
{#if responsive.isMobile}
|
|
@@ -32,7 +27,7 @@
|
|
|
32
27
|
{@render children()}
|
|
33
28
|
</CarouselSlot>
|
|
34
29
|
{:else}
|
|
35
|
-
<div class="grid {colsClass} gap-4 p-2">
|
|
30
|
+
<div class="grid {colsClass} gap-4 p-2 {gridClass}">
|
|
36
31
|
{@render children()}
|
|
37
32
|
</div>
|
|
38
33
|
{/if}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import type { CardHighlightProps } from "../../card/types";
|
|
2
2
|
import type { CarouselSlotProps } from "../../panel/type";
|
|
3
3
|
import type { CarouselHeaderProps } from "../types";
|
|
4
|
+
/**
|
|
5
|
+
* Props do CarouselHighlights — carousel de cards de destaque
|
|
6
|
+
* (organizações, serviços em evidência).
|
|
7
|
+
*/
|
|
4
8
|
export interface CarouselHighlightsProps {
|
|
9
|
+
/** Props do cabeçalho do carousel (título, descrição, etc.) */
|
|
5
10
|
headerProps?: CarouselHeaderProps;
|
|
11
|
+
/** Props do slot/container do carousel (botões navegação, plugins) */
|
|
6
12
|
slotProps?: CarouselSlotProps;
|
|
13
|
+
/** Lista de itens de destaque */
|
|
7
14
|
items: CardHighlightProps[];
|
|
15
|
+
/** Variante visual do card: 1 ou 2 */
|
|
8
16
|
varient?: 1 | 2;
|
|
17
|
+
/** Estado de carregamento (skeleton) */
|
|
9
18
|
isLoading?: boolean;
|
|
19
|
+
/** Exibe ícone antes da descrição do card */
|
|
10
20
|
isDescriptionIcon?: boolean;
|
|
21
|
+
/** Exibe etiqueta (label) na descrição do card */
|
|
11
22
|
isDescriptionLabel?: boolean;
|
|
12
23
|
}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import type { CardPromotionProps } from "../../card/types";
|
|
2
2
|
import type { CarouselSlotProps } from "../../panel/type";
|
|
3
3
|
import type { CarouselHeaderProps } from "../types";
|
|
4
|
+
/**
|
|
5
|
+
* Props do CarouselPromotion — carousel de cards de promoção
|
|
6
|
+
* com preços antigo/novo e botões de compra.
|
|
7
|
+
*/
|
|
4
8
|
export interface CarouselPromotionProps {
|
|
9
|
+
/** Props do cabeçalho do carousel (título, descrição, etc.) */
|
|
5
10
|
headerProps?: CarouselHeaderProps;
|
|
11
|
+
/** Props do slot/container do carousel (botões navegação, plugins) */
|
|
6
12
|
slotProps?: CarouselSlotProps;
|
|
13
|
+
/** Lista de promoções para exibir */
|
|
7
14
|
items: CardPromotionProps[];
|
|
15
|
+
/** Exibe ícone antes da descrição do card */
|
|
8
16
|
isDescriptionIcon?: boolean;
|
|
17
|
+
/** Exibe etiqueta (label) na descrição do card */
|
|
9
18
|
isDescriptionLabel?: boolean;
|
|
19
|
+
/** Estado de carregamento (skeleton) */
|
|
10
20
|
isLoading?: boolean;
|
|
11
21
|
}
|
|
@@ -1,48 +1,104 @@
|
|
|
1
1
|
import type { IconSvgElement } from "@hugeicons/svelte";
|
|
2
2
|
import type { NavMenuProps } from "../nav/data/nav-menu";
|
|
3
|
+
/**
|
|
4
|
+
* Item individual do CarouselBadge — categoria/opção com ícone,
|
|
5
|
+
* imagem, label e callback de clique.
|
|
6
|
+
*/
|
|
3
7
|
export interface ItemCarousel {
|
|
8
|
+
/** Valor único do item (usado para identificar seleção) */
|
|
4
9
|
value: string;
|
|
10
|
+
/** Texto exibido no item */
|
|
5
11
|
label: string;
|
|
12
|
+
/** URL da imagem opcional do item */
|
|
6
13
|
image?: string;
|
|
14
|
+
/** URL de navegação opcional */
|
|
7
15
|
link?: string;
|
|
16
|
+
/** Ícone SVG opcional do item */
|
|
8
17
|
icon?: IconSvgElement | string;
|
|
18
|
+
/** Indica se o item está ativo/selecionado */
|
|
9
19
|
isActive?: boolean;
|
|
20
|
+
/** Callback acionado ao clicar no item */
|
|
10
21
|
onClick?: (value: string) => void;
|
|
11
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Props do CarouselHeader — cabeçalho de carousel com título,
|
|
25
|
+
* descrição e botão "Ver tudo".
|
|
26
|
+
*/
|
|
12
27
|
export interface CarouselHeaderProps {
|
|
28
|
+
/** Título do carousel */
|
|
13
29
|
title?: string;
|
|
30
|
+
/** Descrição/subtítulo abaixo do título */
|
|
14
31
|
description?: string;
|
|
32
|
+
/** Classe CSS personalizada para o título */
|
|
15
33
|
titleClass?: string;
|
|
34
|
+
/** Classe CSS personalizada para a descrição */
|
|
16
35
|
descriptionClass?: string;
|
|
36
|
+
/** Classe CSS adicional para o container do header */
|
|
17
37
|
containerClass?: string;
|
|
38
|
+
/** Callback ao clicar no botão "Ver tudo" */
|
|
18
39
|
onButtonViewAll?: () => void;
|
|
40
|
+
/** Posição dos botões anterior/próximo */
|
|
19
41
|
positionButtonPreviousAndNext?: "center" | "top_right";
|
|
42
|
+
/** Exibe borda inferior no header */
|
|
20
43
|
isBorder?: boolean;
|
|
21
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Props do CarouselBadge — carousel de badges/categorias
|
|
47
|
+
* com orientação horizontal ou vertical.
|
|
48
|
+
*/
|
|
22
49
|
export interface CarouselBadgeProps {
|
|
50
|
+
/** Lista de itens do carousel de badges */
|
|
23
51
|
items: ItemCarousel[];
|
|
52
|
+
/** Orientação do layout: horizontal (padrão) ou vertical */
|
|
24
53
|
orientation?: "horizontal" | "vertical";
|
|
54
|
+
/** Classe CSS personalizada para a imagem */
|
|
25
55
|
imageClass?: string;
|
|
56
|
+
/** Classe CSS personalizada para o ícone */
|
|
26
57
|
iconClass?: string;
|
|
58
|
+
/** Classe CSS personalizada para o label */
|
|
27
59
|
labelClass?: string;
|
|
60
|
+
/** Classe CSS personalizada para o estado ativo */
|
|
28
61
|
activeClass?: string;
|
|
62
|
+
/** Valor do item ativo por padrão */
|
|
29
63
|
valueActive?: string;
|
|
64
|
+
/** Estado de carregamento (skeleton) */
|
|
30
65
|
isLoading?: boolean;
|
|
66
|
+
/** Exibe borda em cada item */
|
|
31
67
|
isBorderItem?: boolean;
|
|
68
|
+
/** Exibe borda inferior no container */
|
|
32
69
|
isBorderBottom?: boolean;
|
|
70
|
+
/** Classe CSS adicional para cada item do carousel */
|
|
33
71
|
itemCarouselClass?: string;
|
|
72
|
+
/** Exibe botões anterior/próximo */
|
|
34
73
|
isButtonPreviousAndNext?: boolean;
|
|
74
|
+
/** Classe CSS personalizada para botões anterior/próximo */
|
|
35
75
|
buttonPreviousAndNextClass?: string;
|
|
36
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Item individual do CarouselHero — slide com imagem,
|
|
79
|
+
* título e descrição.
|
|
80
|
+
*/
|
|
37
81
|
export interface CarouselHeroItem {
|
|
82
|
+
/** Título do slide hero */
|
|
38
83
|
title: string;
|
|
84
|
+
/** URL da imagem de fundo do slide */
|
|
39
85
|
image: string;
|
|
86
|
+
/** Descrição do slide */
|
|
40
87
|
description: string;
|
|
41
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Props do CarouselHero — carousel hero principal (ex: página de login)
|
|
91
|
+
* com slides em fullscreen e menu de navegação sobreposto.
|
|
92
|
+
*/
|
|
42
93
|
export interface CarouselHeroProps {
|
|
94
|
+
/** Lista de slides do hero */
|
|
43
95
|
items: CarouselHeroItem[];
|
|
96
|
+
/** Configuração do menu de navegação sobreposto */
|
|
44
97
|
navMenu: NavMenuProps;
|
|
98
|
+
/** Classe CSS adicional para o container */
|
|
45
99
|
className?: string;
|
|
100
|
+
/** Classe CSS personalizada para o título */
|
|
46
101
|
titleClass?: string;
|
|
102
|
+
/** Classe CSS personalizada para a descrição */
|
|
47
103
|
descriptionClass?: string;
|
|
48
104
|
}
|
|
@@ -1,19 +1,44 @@
|
|
|
1
1
|
import type { CellContext, HeaderContext } from "@tanstack/table-core";
|
|
2
2
|
import type { Component } from "svelte";
|
|
3
|
+
/**
|
|
4
|
+
* Definição completa de uma tabela de dados genérica.
|
|
5
|
+
* Usada pelo DataTableCore para renderizar colunas, cabeçalhos,
|
|
6
|
+
* células, badges, ações por linha e filtros.
|
|
7
|
+
*
|
|
8
|
+
* @template T Tipo genérico dos itens/linhas da tabela.
|
|
9
|
+
*/
|
|
3
10
|
export interface DataTableItem<T = unknown> {
|
|
11
|
+
/** Definição das colunas da tabela */
|
|
4
12
|
config: {
|
|
13
|
+
/** Chave de acesso ao valor na linha (ex: "name", "email") */
|
|
5
14
|
accessorKey: string;
|
|
15
|
+
/** Cabeçalho da coluna: string estática ou função que renderiza componente customizado */
|
|
6
16
|
header: string | ((context: HeaderContext<T, unknown>) => any);
|
|
17
|
+
/** Conteúdo da célula: string (valor simples) ou função que renderiza componente customizado */
|
|
7
18
|
cell: string | ((context: CellContext<T, unknown>) => any);
|
|
19
|
+
/** Habilita/desabilita ordenação nesta coluna */
|
|
8
20
|
enableSorting?: boolean;
|
|
21
|
+
/** Habilita/desabilita ocultação da coluna */
|
|
9
22
|
enableHiding?: boolean;
|
|
23
|
+
/** Configuração opcional de badges (etiquetas coloridas) renderizadas na célula */
|
|
10
24
|
badge?: {
|
|
25
|
+
/** Classe CSS adicional para o badge */
|
|
11
26
|
className?: string;
|
|
27
|
+
/** Valor que ativa este badge (comparado com o valor da célula) */
|
|
12
28
|
value: string;
|
|
29
|
+
/** Label exibida no badge (se omitido, usa o próprio valor) */
|
|
13
30
|
label?: string;
|
|
14
31
|
}[];
|
|
15
32
|
}[];
|
|
33
|
+
/** Chave da coluna usada para o filtro de pesquisa global/list filter */
|
|
16
34
|
columnFilter?: keyof T & string;
|
|
35
|
+
/** Componente Svelte renderizado na coluna de ações de cada linha */
|
|
17
36
|
actions?: Component<any>;
|
|
37
|
+
/** Array de itens/linhas para popular a tabela */
|
|
18
38
|
items?: T[];
|
|
19
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Alias de DataTableItem<T> — props do componente DataTableCore.
|
|
42
|
+
* @template T Tipo genérico dos itens/linhas.
|
|
43
|
+
*/
|
|
44
|
+
export type DataTableCoreProps<T = unknown> = DataTableItem<T>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Item de link individual exibido numa coluna do footer.
|
|
3
|
+
*/
|
|
4
|
+
export interface FooterLinkItem {
|
|
5
|
+
/** Texto exibido no link */
|
|
6
|
+
text: string;
|
|
7
|
+
/** URL de destino (href) */
|
|
8
|
+
href?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Item de rede social do footer com ícone, texto e link.
|
|
12
|
+
*/
|
|
13
|
+
export interface FooterSocialItem {
|
|
14
|
+
/** Ícone da rede social — nome do ícone pré-definido */
|
|
15
|
+
icon: "facebook" | "instagram" | "x" | "github" | "youtube" | "linkedin";
|
|
16
|
+
/** Texto usado como aria-label / tooltip */
|
|
17
|
+
text: string;
|
|
18
|
+
/** URL do perfil/rede social */
|
|
19
|
+
href?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Coluna do footer com título e lista de links.
|
|
23
|
+
*/
|
|
24
|
+
export interface FooterColumnProps {
|
|
25
|
+
/** Título da coluna (ex: "Empresa", "Recursos") */
|
|
26
|
+
title: string;
|
|
27
|
+
/** Lista de links dentro da coluna */
|
|
28
|
+
items: FooterLinkItem[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Props do componente Footer — rodapé completo com múltiplas colunas,
|
|
32
|
+
* logo, newsletter opcional e ícones de redes sociais.
|
|
33
|
+
*/
|
|
34
|
+
export interface FooterProps {
|
|
35
|
+
/** Lista de colunas de navegação do rodapé */
|
|
36
|
+
items: FooterColumnProps[];
|
|
37
|
+
/** URL do logotipo da empresa */
|
|
38
|
+
logo?: string;
|
|
39
|
+
/** Habilita/desabilita o formulário de newsletter */
|
|
40
|
+
isNewsletter?: boolean;
|
|
41
|
+
/** Lista de ícones das redes sociais */
|
|
42
|
+
socialsMedia: FooterSocialItem[];
|
|
43
|
+
/** Nome da empresa (exibido no copyright e newsletter) */
|
|
44
|
+
companyName?: string;
|
|
45
|
+
/** Título da seção de newsletter */
|
|
46
|
+
newsletterTitle?: string;
|
|
47
|
+
/** Descrição/texto auxiliar da newsletter */
|
|
48
|
+
newsletterDescription?: string;
|
|
49
|
+
/** Callback acionado ao submeter o email da newsletter */
|
|
50
|
+
onSubscribe?: (email: string) => void;
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { t } from "../../../../../i18n";
|
|
3
|
+
import type { FooterProps } from "../../types";
|
|
4
|
+
import FooterColumn from "../shared/FooterColumn.svelte";
|
|
5
|
+
import FooterNewsLetter from "../shared/FooterNewsLetter.svelte";
|
|
6
|
+
import SocialIcon from "../shared/FooterSocialIcon.svelte";
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
items,
|
|
10
|
+
logo,
|
|
11
|
+
isNewsletter = false,
|
|
12
|
+
socialsMedia,
|
|
13
|
+
companyName,
|
|
14
|
+
newsletterTitle,
|
|
15
|
+
newsletterDescription,
|
|
16
|
+
onSubscribe,
|
|
17
|
+
}: FooterProps = $props();
|
|
18
|
+
|
|
19
|
+
let email = $state("");
|
|
20
|
+
const year = new Date().getFullYear();
|
|
21
|
+
|
|
22
|
+
function handleSubscribe(e: SubmitEvent) {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
const value = email.trim();
|
|
25
|
+
if (!value) return;
|
|
26
|
+
onSubscribe?.(value);
|
|
27
|
+
email = "";
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<footer class="p-10">
|
|
32
|
+
<div
|
|
33
|
+
class="flex flex-col gap-10 md:flex-row md:items-start md:justify-between"
|
|
34
|
+
>
|
|
35
|
+
<div class="shrink-0">
|
|
36
|
+
{#if logo}
|
|
37
|
+
<img src={logo} alt="" class="h-10 w-auto" />
|
|
38
|
+
{/if}
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div class="flex flex-1 flex-wrap justify-between gap-10">
|
|
42
|
+
{#each items as column, i (i)}
|
|
43
|
+
<FooterColumn title={column.title} items={column.items} />
|
|
44
|
+
{/each}
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
{#if isNewsletter}
|
|
49
|
+
<div
|
|
50
|
+
class="mt-10 flex flex-col gap-4 border-t border-gray/10 pt-8 md:flex-row md:items-center md:justify-between"
|
|
51
|
+
>
|
|
52
|
+
<FooterNewsLetter
|
|
53
|
+
{isNewsletter}
|
|
54
|
+
{newsletterTitle}
|
|
55
|
+
{newsletterDescription}
|
|
56
|
+
{onSubscribe}
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
{/if}
|
|
60
|
+
|
|
61
|
+
<div
|
|
62
|
+
class="mt-10 flex flex-col gap-4 border-t border-gray/10 pt-6 md:flex-row md:items-center md:justify-between"
|
|
63
|
+
>
|
|
64
|
+
<p class="text-sm">
|
|
65
|
+
©
|
|
66
|
+
{year}
|
|
67
|
+
{companyName}
|
|
68
|
+
{$t("footer.copyr")}
|
|
69
|
+
</p>
|
|
70
|
+
<div class="flex items-center gap-4">
|
|
71
|
+
{#each socialsMedia as social, i (i)}
|
|
72
|
+
<SocialIcon {...social} />
|
|
73
|
+
{/each}
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</footer>
|