@archbase/admin 3.0.8 → 3.0.10

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.
@@ -0,0 +1,43 @@
1
+ import { ArchbaseMantineSidebarProps } from './types';
2
+ import { StandardSidebar } from './variants/StandardSidebar';
3
+ import { MinimalSidebar } from './variants/MinimalSidebar';
4
+ import { RailSidebar } from './variants/RailSidebar';
5
+ /**
6
+ * ArchbaseMantineSidebar - Componente de sidebar moderno baseado em Mantine
7
+ *
8
+ * Este componente substitui o ArchbaseAdvancedSidebar (baseado em react-pro-sidebar)
9
+ * oferecendo 3 variantes de design:
10
+ *
11
+ * - **standard**: Menu completo com accordion, nested menus, search integrado (Notion/Slack style)
12
+ * - **minimal**: Icon-only com tooltips e menus flutuantes (VSCode/Outlook style)
13
+ * - **rail**: Double panel com coluna de grupos e menu detalhado (Discord/Supabase style)
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * // Variante Standard (padrão)
18
+ * <ArchbaseMantineSidebar
19
+ * navigationData={navigationData}
20
+ * variant="standard"
21
+ * showSearch
22
+ * header={<Logo />}
23
+ * footer={<UserProfile />}
24
+ * />
25
+ *
26
+ * // Variante Minimal
27
+ * <ArchbaseMantineSidebar
28
+ * navigationData={navigationData}
29
+ * variant="minimal"
30
+ * width={60}
31
+ * />
32
+ *
33
+ * // Variante Rail (similar ao ArchbaseAdvancedSidebar)
34
+ * <ArchbaseMantineSidebar
35
+ * navigationData={navigationData}
36
+ * variant="rail"
37
+ * groupColumnWidth={80}
38
+ * showGroupLabels
39
+ * />
40
+ * ```
41
+ */
42
+ export declare function ArchbaseMantineSidebar({ variant, ...props }: ArchbaseMantineSidebarProps): import("react/jsx-runtime").JSX.Element;
43
+ export { StandardSidebar, MinimalSidebar, RailSidebar };
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { SidebarBadgeProps } from '../types';
3
+ /**
4
+ * Badge para exibir notificações/contadores em items do sidebar
5
+ */
6
+ export declare function SidebarBadge({ value, color, size, }: SidebarBadgeProps): import("react/jsx-runtime").JSX.Element;
7
+ /**
8
+ * Indicador de ponto para notificações
9
+ * Útil quando não precisa mostrar número
10
+ */
11
+ export declare function SidebarIndicator({ children, show, color, processing, }: {
12
+ children: React.ReactNode;
13
+ show?: boolean;
14
+ color?: string;
15
+ processing?: boolean;
16
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { SidebarGroupProps } from '../types';
3
+ /**
4
+ * Componente de grupo colapsável do sidebar
5
+ * Agrupa items relacionados com header clicável
6
+ */
7
+ export declare function SidebarGroup({ label, icon, children, defaultExpanded, expanded: controlledExpanded, onExpandedChange, groupId, }: SidebarGroupProps): import("react/jsx-runtime").JSX.Element;
8
+ /**
9
+ * Componente de divisor/seção do sidebar
10
+ * Apenas exibe um label sem funcionalidade de colapso
11
+ */
12
+ export declare function SidebarSection({ label, children, }: {
13
+ label: string;
14
+ children?: React.ReactNode;
15
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { SidebarGroupIconProps } from '../types';
2
+ /**
3
+ * Componente de ícone de grupo para a variante Rail
4
+ * Renderiza um ícone clicável com label opcional
5
+ */
6
+ export declare function SidebarGroupIcon({ group, active, onClick, showLabel, activeColor, inactiveColor, }: SidebarGroupIconProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { SidebarItemProps } from '../types';
2
+ /**
3
+ * Componente de item de menu do sidebar
4
+ * Usa NavLink do Mantine com suporte a aninhamento
5
+ */
6
+ export declare function SidebarItem({ item, depth, collapsed, active, onClick, textColor, iconColor, hoverColor, itemHeight, }: SidebarItemProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { SidebarSearchProps } from '../types';
2
+ /**
3
+ * Campo de busca para o sidebar
4
+ * Suporta atalho de teclado e botão de limpar
5
+ */
6
+ export declare function SidebarSearch({ placeholder, value, onChange, onClear, collapsed, }: SidebarSearchProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,45 @@
1
+ export interface SidebarSkeletonProps {
2
+ /** Número de items a exibir */
3
+ itemCount?: number;
4
+ /** Se o sidebar está colapsado */
5
+ collapsed?: boolean;
6
+ /** Cor de fundo */
7
+ backgroundColor?: string;
8
+ /** Altura de cada item */
9
+ itemHeight?: number;
10
+ /** Mostrar grupos */
11
+ showGroups?: boolean;
12
+ /** Número de grupos */
13
+ groupCount?: number;
14
+ }
15
+ /**
16
+ * Skeleton para loading do menu do sidebar
17
+ */
18
+ export declare function SidebarMenuSkeleton({ itemCount, collapsed, backgroundColor, itemHeight, showGroups, groupCount, }: SidebarSkeletonProps): import("react/jsx-runtime").JSX.Element;
19
+ /**
20
+ * Skeleton para a coluna de grupos (Rail variant)
21
+ */
22
+ export declare function SidebarGroupsSkeleton({ groupCount, width, backgroundColor, }: {
23
+ groupCount?: number;
24
+ width?: string | number;
25
+ backgroundColor?: string;
26
+ }): import("react/jsx-runtime").JSX.Element;
27
+ /**
28
+ * Skeleton para o header do sidebar
29
+ */
30
+ export declare function SidebarHeaderSkeleton({ collapsed, }: {
31
+ collapsed?: boolean;
32
+ }): import("react/jsx-runtime").JSX.Element;
33
+ /**
34
+ * Skeleton para o perfil do usuário no footer
35
+ */
36
+ export declare function SidebarUserProfileSkeleton({ collapsed, }: {
37
+ collapsed?: boolean;
38
+ }): import("react/jsx-runtime").JSX.Element;
39
+ /**
40
+ * Mensagem de erro para o sidebar
41
+ */
42
+ export declare function SidebarErrorMessage({ message, backgroundColor, }: {
43
+ message: string;
44
+ backgroundColor?: string;
45
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { SidebarUserProfileProps } from '../types';
2
+ /**
3
+ * Componente de perfil do usuário para o footer do sidebar
4
+ * Exibe avatar, nome e email do usuário
5
+ */
6
+ export declare function SidebarUserProfile({ name, email, avatar, onClick, collapsed, }: SidebarUserProfileProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export { SidebarItem } from './SidebarItem';
2
+ export { SidebarGroup, SidebarSection } from './SidebarGroup';
3
+ export { SidebarGroupIcon } from './SidebarGroupIcon';
4
+ export { SidebarSearch } from './SidebarSearch';
5
+ export { SidebarUserProfile } from './SidebarUserProfile';
6
+ export { SidebarBadge, SidebarIndicator } from './SidebarBadge';
7
+ export { SidebarMenuSkeleton, SidebarGroupsSkeleton, SidebarHeaderSkeleton, SidebarUserProfileSkeleton, SidebarErrorMessage, } from './SidebarSkeleton';
8
+ export type { SidebarSkeletonProps } from './SidebarSkeleton';
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { SidebarContextValue, SidebarProviderProps } from '../types';
3
+ declare const SidebarContext: React.Context<SidebarContextValue>;
4
+ /**
5
+ * Hook para acessar o contexto do Sidebar
6
+ */
7
+ export declare function useSidebar(): SidebarContextValue;
8
+ /**
9
+ * Hook opcional que não lança erro se usado fora do provider
10
+ */
11
+ export declare function useSidebarOptional(): SidebarContextValue | null;
12
+ /**
13
+ * Provider do contexto do Sidebar
14
+ */
15
+ export declare function SidebarProvider({ children, navigationData, variant, defaultCollapsed, collapsed: controlledCollapsed, onCollapsedChange, defaultActiveGroup, activeGroup: controlledActiveGroup, onActiveGroupChange, showKeyboardShortcuts, highlightActiveItem, onMenuItemClick, }: SidebarProviderProps): import("react/jsx-runtime").JSX.Element;
16
+ export { SidebarContext };
@@ -0,0 +1 @@
1
+ export { SidebarProvider, useSidebar, useSidebarOptional, SidebarContext } from './SidebarContext';
@@ -0,0 +1,6 @@
1
+ export { useSidebarNavigation } from './useSidebarNavigation';
2
+ export type { UseSidebarNavigationOptions, UseSidebarNavigationReturn } from './useSidebarNavigation';
3
+ export { useSidebarSearch } from './useSidebarSearch';
4
+ export type { UseSidebarSearchOptions, UseSidebarSearchReturn } from './useSidebarSearch';
5
+ export { useSidebarKeyboard } from './useSidebarKeyboard';
6
+ export type { UseSidebarKeyboardOptions, UseSidebarKeyboardReturn } from './useSidebarKeyboard';
@@ -0,0 +1,20 @@
1
+ import { ArchbaseNavigationItem } from '../../types';
2
+ export interface UseSidebarKeyboardOptions {
3
+ navigationData: ArchbaseNavigationItem[];
4
+ navigateToItem: (item: ArchbaseNavigationItem) => void;
5
+ onToggleSidebar?: () => void;
6
+ enabled?: boolean;
7
+ }
8
+ export interface UseSidebarKeyboardReturn {
9
+ /** Mapa de atalhos registrados */
10
+ shortcuts: Map<string, ArchbaseNavigationItem>;
11
+ /** Verificar se um item tem atalho */
12
+ hasShortcut: (item: ArchbaseNavigationItem) => boolean;
13
+ /** Obter atalho de um item */
14
+ getShortcut: (item: ArchbaseNavigationItem) => string | undefined;
15
+ }
16
+ /**
17
+ * Hook para gerenciar atalhos de teclado do sidebar
18
+ * Registra hotkeys globais para navegação rápida
19
+ */
20
+ export declare function useSidebarKeyboard({ navigationData, navigateToItem, onToggleSidebar, enabled, }: UseSidebarKeyboardOptions): UseSidebarKeyboardReturn;
@@ -0,0 +1,24 @@
1
+ import { ArchbaseNavigationItem } from '../../types';
2
+ export interface UseSidebarNavigationOptions {
3
+ navigationData: ArchbaseNavigationItem[];
4
+ onMenuItemClick?: (item: ArchbaseNavigationItem) => void;
5
+ }
6
+ export interface UseSidebarNavigationReturn {
7
+ /** Item atualmente ativo baseado na rota */
8
+ activeItem: ArchbaseNavigationItem | null;
9
+ /** Caminho da rota atual */
10
+ currentPath: string;
11
+ /** Navegar para um item */
12
+ navigateToItem: (item: ArchbaseNavigationItem) => void;
13
+ /** Verificar se um item está ativo */
14
+ isItemActive: (item: ArchbaseNavigationItem) => boolean;
15
+ /** Verificar se um item ou algum de seus filhos está ativo */
16
+ isItemOrChildActive: (item: ArchbaseNavigationItem) => boolean;
17
+ /** Encontrar o caminho de breadcrumb até o item ativo */
18
+ activeBreadcrumb: ArchbaseNavigationItem[];
19
+ }
20
+ /**
21
+ * Hook para gerenciar a navegação do sidebar
22
+ * Integra com React Router para detectar rota ativa
23
+ */
24
+ export declare function useSidebarNavigation({ navigationData, onMenuItemClick, }: UseSidebarNavigationOptions): UseSidebarNavigationReturn;
@@ -0,0 +1,26 @@
1
+ import { ArchbaseNavigationItem } from '../../types';
2
+ export interface UseSidebarSearchOptions {
3
+ navigationData: ArchbaseNavigationItem[];
4
+ onSearch?: (query: string, results: ArchbaseNavigationItem[]) => void;
5
+ }
6
+ export interface UseSidebarSearchReturn {
7
+ /** Query de busca atual */
8
+ query: string;
9
+ /** Definir query de busca */
10
+ setQuery: (value: string) => void;
11
+ /** Limpar busca */
12
+ clearSearch: () => void;
13
+ /** Items filtrados */
14
+ filteredItems: ArchbaseNavigationItem[];
15
+ /** Se há resultados */
16
+ hasResults: boolean;
17
+ /** Se a busca está ativa (query não vazia) */
18
+ isSearching: boolean;
19
+ /** Total de items encontrados (incluindo aninhados) */
20
+ totalResults: number;
21
+ }
22
+ /**
23
+ * Hook para gerenciar a busca no sidebar
24
+ * Filtra items de navegação com suporte a aninhamento
25
+ */
26
+ export declare function useSidebarSearch({ navigationData, onSearch, }: UseSidebarSearchOptions): UseSidebarSearchReturn;
@@ -0,0 +1,13 @@
1
+ export type { SidebarVariant, SidebarCollapsibleMode, ExtendedNavigationItem, ArchbaseMantineSidebarProps, SidebarContextValue, SidebarItemProps, SidebarGroupProps, SidebarSearchProps, SidebarUserProfileProps, SidebarGroupIconProps, SidebarBadgeProps, SidebarProviderProps, } from './types';
2
+ export { SidebarProvider, useSidebar, useSidebarOptional, SidebarContext } from './context';
3
+ export { useSidebarNavigation, useSidebarSearch, useSidebarKeyboard, } from './hooks';
4
+ export type { UseSidebarNavigationOptions, UseSidebarNavigationReturn, UseSidebarSearchOptions, UseSidebarSearchReturn, UseSidebarKeyboardOptions, UseSidebarKeyboardReturn, } from './hooks';
5
+ export { SidebarItem } from './components/SidebarItem';
6
+ export { SidebarGroup, SidebarSection } from './components/SidebarGroup';
7
+ export { SidebarGroupIcon } from './components/SidebarGroupIcon';
8
+ export { SidebarSearch } from './components/SidebarSearch';
9
+ export { SidebarUserProfile } from './components/SidebarUserProfile';
10
+ export { SidebarBadge, SidebarIndicator } from './components/SidebarBadge';
11
+ export { SidebarMenuSkeleton, SidebarGroupsSkeleton, SidebarHeaderSkeleton, SidebarUserProfileSkeleton, SidebarErrorMessage, } from './components/SidebarSkeleton';
12
+ export type { SidebarSkeletonProps } from './components/SidebarSkeleton';
13
+ export { ArchbaseMantineSidebar, StandardSidebar, MinimalSidebar, RailSidebar } from './ArchbaseMantineSidebar';
@@ -0,0 +1,303 @@
1
+ import { ReactNode } from 'react';
2
+ import { MantineColor, MantineTheme } from '@mantine/core';
3
+ import { ArchbaseNavigationItem, ArchbaseNavigationGroup } from '../types';
4
+ /**
5
+ * Variantes disponíveis para o sidebar
6
+ */
7
+ export type SidebarVariant = 'minimal' | 'standard' | 'rail';
8
+ /**
9
+ * Modo de colapso do sidebar
10
+ */
11
+ export type SidebarCollapsibleMode = 'icon' | 'offcanvas' | 'none';
12
+ /**
13
+ * Extensão do ArchbaseNavigationItem para features avançadas
14
+ */
15
+ export interface ExtendedNavigationItem extends ArchbaseNavigationItem {
16
+ /** Badge de notificação (número ou texto) */
17
+ badge?: string | number;
18
+ /** Cor do badge */
19
+ badgeColor?: MantineColor;
20
+ /** Atalho de teclado (ex: "Ctrl+Shift+H") */
21
+ shortcut?: string;
22
+ /** Tooltip customizado */
23
+ tooltip?: string;
24
+ /** Se o item é um divisor/seção */
25
+ isSection?: boolean;
26
+ /** Label da seção */
27
+ sectionLabel?: string;
28
+ }
29
+ /**
30
+ * Props principais do componente ArchbaseMantineSidebar
31
+ */
32
+ export interface ArchbaseMantineSidebarProps {
33
+ /** Dados de navegação (compatível com API existente) */
34
+ navigationData: ArchbaseNavigationItem[];
35
+ /** Variante do sidebar */
36
+ variant?: SidebarVariant;
37
+ /** Posição do sidebar */
38
+ side?: 'left' | 'right';
39
+ /** Largura do sidebar expandido */
40
+ width?: string | number;
41
+ /** Largura do sidebar colapsado */
42
+ collapsedWidth?: string | number;
43
+ /** Altura do sidebar */
44
+ height?: string | number;
45
+ /** Largura da coluna de grupos (apenas para variante Rail) */
46
+ groupColumnWidth?: string | number;
47
+ /** Estado controlado de colapso */
48
+ collapsed?: boolean;
49
+ /** Estado inicial de colapso */
50
+ defaultCollapsed?: boolean;
51
+ /** Callback quando o estado de colapso muda */
52
+ onCollapsedChange?: (collapsed: boolean) => void;
53
+ /** Grupo ativo (controlado) */
54
+ activeGroup?: string;
55
+ /** Grupo ativo inicial */
56
+ defaultActiveGroup?: string;
57
+ /** Callback quando o grupo ativo muda */
58
+ onActiveGroupChange?: (groupName: string) => void;
59
+ /** Ícone padrão para grupos sem ícone */
60
+ defaultGroupIcon?: ReactNode;
61
+ /** Mostrar labels dos grupos */
62
+ showGroupLabels?: boolean;
63
+ /** Callback quando um item de menu é clicado */
64
+ onMenuItemClick?: (item: ArchbaseNavigationItem) => void;
65
+ /** Mostrar campo de busca */
66
+ showSearch?: boolean;
67
+ /** Placeholder do campo de busca */
68
+ searchPlaceholder?: string;
69
+ /** Callback de busca */
70
+ onSearch?: (query: string, results: ArchbaseNavigationItem[]) => void;
71
+ /** Mostrar área de perfil do usuário */
72
+ showUserProfile?: boolean;
73
+ /** Conteúdo customizado do perfil */
74
+ userProfileContent?: ReactNode;
75
+ /** Callback ao clicar no perfil */
76
+ onUserProfileClick?: () => void;
77
+ /** Mostrar atalhos de teclado */
78
+ showKeyboardShortcuts?: boolean;
79
+ /** Destacar item ativo */
80
+ highlightActiveItem?: boolean;
81
+ /** Fechar sidebar ao clicar em item (mobile) */
82
+ closeOnItemClick?: boolean;
83
+ /** Conteúdo do header */
84
+ header?: ReactNode;
85
+ /** Conteúdo do footer */
86
+ footer?: ReactNode;
87
+ /** Altura do footer */
88
+ footerHeight?: string | number;
89
+ /** Indica se está carregando */
90
+ isLoading?: boolean;
91
+ /** Mensagem de erro */
92
+ loadingError?: string | null;
93
+ /** Componente de loading customizado */
94
+ loadingComponent?: ReactNode;
95
+ /** Componente de erro customizado */
96
+ errorComponent?: ReactNode;
97
+ /** Número de itens no skeleton */
98
+ skeletonItemCount?: number;
99
+ /** Tema do Mantine */
100
+ theme?: MantineTheme;
101
+ /** Cor de fundo (dark mode) */
102
+ backgroundDarkColor?: string;
103
+ /** Cor de fundo (light mode) */
104
+ backgroundLightColor?: string;
105
+ /** Cor do texto (dark mode) */
106
+ textDarkColor?: string;
107
+ /** Cor do texto (light mode) */
108
+ textLightColor?: string;
109
+ /** Cor dos ícones (dark mode) */
110
+ iconDarkColor?: string;
111
+ /** Cor dos ícones (light mode) */
112
+ iconLightColor?: string;
113
+ /** Cor do item ativo */
114
+ activeColor?: MantineColor;
115
+ /** Cor de hover */
116
+ hoverColor?: MantineColor;
117
+ /** Cor de fundo da coluna de grupos */
118
+ groupBackgroundColor?: string;
119
+ /** Cor do grupo selecionado */
120
+ selectedGroupColor?: string;
121
+ /** Cor dos grupos */
122
+ groupColor?: string;
123
+ /** Cor do label do grupo (dark mode) */
124
+ groupLabelDarkColor?: string;
125
+ /** Cor do label do grupo (light mode) */
126
+ groupLabelLightColor?: string;
127
+ /** Mostrar borda */
128
+ withBorder?: boolean;
129
+ /** Mostrar sombra */
130
+ withShadow?: boolean;
131
+ /** Aria label para o sidebar */
132
+ ariaLabel?: string;
133
+ /** Ref para o elemento raiz */
134
+ sidebarRef?: React.Ref<HTMLElement>;
135
+ }
136
+ /**
137
+ * Valor do context interno do Sidebar
138
+ */
139
+ export interface SidebarContextValue {
140
+ /** Se o sidebar está colapsado */
141
+ collapsed: boolean;
142
+ /** Função para alterar o estado de colapso */
143
+ setCollapsed: (value: boolean) => void;
144
+ /** Toggle do estado de colapso */
145
+ toggleCollapsed: () => void;
146
+ /** Nome do grupo ativo */
147
+ activeGroup: string;
148
+ /** Função para alterar o grupo ativo */
149
+ setActiveGroup: (value: string) => void;
150
+ /** Caminho do item ativo atual */
151
+ activeItemPath: string;
152
+ /** Navegar para um item */
153
+ navigateToItem: (item: ArchbaseNavigationItem) => void;
154
+ /** Query de busca */
155
+ searchQuery: string;
156
+ /** Função para alterar a query de busca */
157
+ setSearchQuery: (value: string) => void;
158
+ /** Itens filtrados pela busca */
159
+ filteredItems: ArchbaseNavigationItem[];
160
+ /** IDs dos grupos expandidos */
161
+ expandedGroups: Set<string>;
162
+ /** Toggle de um grupo */
163
+ toggleGroup: (groupId: string) => void;
164
+ /** Expandir um grupo */
165
+ expandGroup: (groupId: string) => void;
166
+ /** Colapsar um grupo */
167
+ collapseGroup: (groupId: string) => void;
168
+ /** Variante atual */
169
+ variant: SidebarVariant;
170
+ /** Se deve mostrar atalhos de teclado */
171
+ showKeyboardShortcuts: boolean;
172
+ /** Se deve destacar item ativo */
173
+ highlightActiveItem: boolean;
174
+ }
175
+ /**
176
+ * Props do componente SidebarItem
177
+ */
178
+ export interface SidebarItemProps {
179
+ /** Item de navegação */
180
+ item: ArchbaseNavigationItem;
181
+ /** Nível de aninhamento (0 = raiz) */
182
+ depth?: number;
183
+ /** Se o sidebar está colapsado */
184
+ collapsed?: boolean;
185
+ /** Se o item está ativo */
186
+ active?: boolean;
187
+ /** Callback ao clicar */
188
+ onClick?: (item: ArchbaseNavigationItem) => void;
189
+ /** Cor do texto */
190
+ textColor?: string;
191
+ /** Cor do ícone */
192
+ iconColor?: string;
193
+ /** Cor de hover/ativo (background) */
194
+ hoverColor?: string;
195
+ /** Altura do item */
196
+ itemHeight?: string | number;
197
+ }
198
+ /**
199
+ * Props do componente SidebarGroup
200
+ */
201
+ export interface SidebarGroupProps {
202
+ /** Label do grupo */
203
+ label: string;
204
+ /** Ícone do grupo */
205
+ icon?: ReactNode;
206
+ /** Conteúdo do grupo (items) */
207
+ children: ReactNode;
208
+ /** Se o grupo inicia expandido */
209
+ defaultExpanded?: boolean;
210
+ /** Estado controlado de expansão */
211
+ expanded?: boolean;
212
+ /** Callback quando a expansão muda */
213
+ onExpandedChange?: (expanded: boolean) => void;
214
+ /** ID único do grupo */
215
+ groupId?: string;
216
+ }
217
+ /**
218
+ * Props do componente SidebarSearch
219
+ */
220
+ export interface SidebarSearchProps {
221
+ /** Placeholder do input */
222
+ placeholder?: string;
223
+ /** Valor controlado */
224
+ value?: string;
225
+ /** Callback de mudança */
226
+ onChange?: (value: string) => void;
227
+ /** Callback ao limpar */
228
+ onClear?: () => void;
229
+ /** Se o sidebar está colapsado */
230
+ collapsed?: boolean;
231
+ }
232
+ /**
233
+ * Props do componente SidebarUserProfile
234
+ */
235
+ export interface SidebarUserProfileProps {
236
+ /** Nome do usuário */
237
+ name?: string;
238
+ /** Email do usuário */
239
+ email?: string;
240
+ /** Avatar (URL ou componente) */
241
+ avatar?: string | ReactNode;
242
+ /** Callback ao clicar */
243
+ onClick?: () => void;
244
+ /** Se o sidebar está colapsado */
245
+ collapsed?: boolean;
246
+ }
247
+ /**
248
+ * Props do componente SidebarGroupIcon (Rail)
249
+ */
250
+ export interface SidebarGroupIconProps {
251
+ /** Dados do grupo */
252
+ group: ArchbaseNavigationGroup;
253
+ /** Se o grupo está ativo */
254
+ active?: boolean;
255
+ /** Callback ao clicar */
256
+ onClick?: () => void;
257
+ /** Mostrar label abaixo do ícone */
258
+ showLabel?: boolean;
259
+ /** Cor quando ativo */
260
+ activeColor?: string;
261
+ /** Cor quando inativo */
262
+ inactiveColor?: string;
263
+ }
264
+ /**
265
+ * Props do componente SidebarBadge
266
+ */
267
+ export interface SidebarBadgeProps {
268
+ /** Valor do badge */
269
+ value: string | number;
270
+ /** Cor do badge */
271
+ color?: MantineColor;
272
+ /** Tamanho do badge */
273
+ size?: 'xs' | 'sm' | 'md';
274
+ }
275
+ /**
276
+ * Props do provider do Sidebar
277
+ */
278
+ export interface SidebarProviderProps {
279
+ /** Filhos */
280
+ children: ReactNode;
281
+ /** Dados de navegação */
282
+ navigationData: ArchbaseNavigationItem[];
283
+ /** Variante do sidebar */
284
+ variant?: SidebarVariant;
285
+ /** Estado inicial de colapso */
286
+ defaultCollapsed?: boolean;
287
+ /** Estado controlado de colapso */
288
+ collapsed?: boolean;
289
+ /** Callback quando colapso muda */
290
+ onCollapsedChange?: (collapsed: boolean) => void;
291
+ /** Grupo ativo inicial */
292
+ defaultActiveGroup?: string;
293
+ /** Grupo ativo controlado */
294
+ activeGroup?: string;
295
+ /** Callback quando grupo ativo muda */
296
+ onActiveGroupChange?: (groupName: string) => void;
297
+ /** Mostrar atalhos de teclado */
298
+ showKeyboardShortcuts?: boolean;
299
+ /** Destacar item ativo */
300
+ highlightActiveItem?: boolean;
301
+ /** Callback ao clicar em item */
302
+ onMenuItemClick?: (item: ArchbaseNavigationItem) => void;
303
+ }
@@ -0,0 +1,13 @@
1
+ import { ArchbaseMantineSidebarProps } from '../types';
2
+ /**
3
+ * MinimalSidebar - Variante minimal/icon-only do sidebar
4
+ *
5
+ * Características:
6
+ * - Exibe apenas ícones
7
+ * - Tooltips com labels no hover
8
+ * - Submenus em Menu flutuante (popover)
9
+ * - Ideal para economizar espaço
10
+ *
11
+ * Inspiração: VSCode, Outlook Web
12
+ */
13
+ export declare function MinimalSidebar(props: Omit<ArchbaseMantineSidebarProps, 'variant'>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { ArchbaseMantineSidebarProps } from '../types';
2
+ /**
3
+ * RailSidebar - Variante com coluna de grupos (Double Panel)
4
+ *
5
+ * Características:
6
+ * - Coluna de ícones de grupos à esquerda
7
+ * - Painel de menu detalhado à direita
8
+ * - Transição suave entre grupos
9
+ * - Suporte a múltiplos grupos de navegação
10
+ *
11
+ * Inspiração: Discord, Supabase, ArchbaseAdvancedSidebar atual
12
+ */
13
+ export declare function RailSidebar(props: Omit<ArchbaseMantineSidebarProps, 'variant'>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { ArchbaseMantineSidebarProps } from '../types';
2
+ /**
3
+ * StandardSidebar - Variante padrão do sidebar
4
+ *
5
+ * Características:
6
+ * - Menu com seções accordion
7
+ * - Suporte a nested menus (até 2+ níveis)
8
+ * - Header/Footer customizáveis
9
+ * - Search integrado
10
+ * - Collapse/expand com transição suave
11
+ */
12
+ export declare function StandardSidebar(props: Omit<ArchbaseMantineSidebarProps, 'variant'>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { StandardSidebar } from './StandardSidebar';
2
+ export { MinimalSidebar } from './MinimalSidebar';
3
+ export { RailSidebar } from './RailSidebar';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archbase/admin",
3
- "version": "3.0.8",
3
+ "version": "3.0.10",
4
4
  "description": "Admin interface components for Archbase React",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -43,12 +43,12 @@
43
43
  "react-router-dom": "^6.28.0",
44
44
  "usehooks-ts": "^2.16.0",
45
45
  "zustand": "^5.0.6",
46
- "@archbase/components": "3.0.8",
47
- "@archbase/core": "3.0.8",
48
- "@archbase/data": "3.0.8",
49
- "@archbase/layout": "3.0.8",
50
- "@archbase/security": "3.0.8",
51
- "@archbase/template": "3.0.8"
46
+ "@archbase/components": "3.0.10",
47
+ "@archbase/core": "3.0.10",
48
+ "@archbase/data": "3.0.10",
49
+ "@archbase/layout": "3.0.10",
50
+ "@archbase/security": "3.0.10",
51
+ "@archbase/template": "3.0.10"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/lodash": "^4.14.200",
Binary file