forlogic-core 2.2.6 → 2.2.8
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/.note/memory/features/import/attachment-idempotency-registry.md +8 -8
- package/.note/memory/features/import/attachment-strategy.md +30 -30
- package/.note/memory/patterns/admin-i18n-policy.md +20 -20
- package/.note/memory/patterns/alias-url-resolution.md +69 -69
- package/.note/memory/patterns/doc-sync-rule.md +35 -35
- package/.note/memory/patterns/documentation-standard.md +17 -17
- package/.note/memory/patterns/dynamic-supabase-config.md +4 -4
- package/.note/memory/patterns/environment-detection-logic.md +35 -35
- package/.note/memory/patterns/i18n-architecture.md +3 -3
- package/README.md +120 -120
- package/dist/README.md +1079 -0
- package/dist/bin/bootstrap.js +40 -0
- package/dist/bin/pull-docs.js +186 -0
- package/dist/components/ui/color-picker.d.ts +2 -0
- package/dist/components/ui/combo-tree.d.ts +3 -1
- package/dist/components/ui/combobox.d.ts +2 -1
- package/dist/components/ui/icon-picker.d.ts +2 -0
- package/dist/components/ui/select.d.ts +9 -2
- package/dist/docs/KNOWLEDGE.md +109 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/docs/PUBLISH.md +168 -168
- package/docs/STORAGE_BUCKETS.md +456 -456
- package/docs/SUPABASE_SECRETS.md +122 -122
- package/docs/WORKSPACE_KNOWLEDGE.md +154 -154
- package/docs/design-system/buttons-actions.md +130 -130
- package/docs/design-system/charts-dashboards.md +301 -340
- package/docs/design-system/crud.md +114 -174
- package/docs/design-system/data-display.md +106 -106
- package/docs/design-system/dialogs.md +212 -212
- package/docs/design-system/domain.md +329 -319
- package/docs/design-system/examples.md +275 -275
- package/docs/design-system/foundation.md +1 -1
- package/docs/design-system/inputs.md +137 -132
- package/docs/design-system/layout.md +154 -202
- package/docs/design-system/navigation.md +331 -272
- package/docs/design-system/notifications-feedback.md +34 -34
- package/docs/design-system/patterns/README.md +53 -53
- package/docs/design-system/patterns/action-button.md +22 -22
- package/docs/design-system/patterns/alertdialog-deletion.md +46 -46
- package/docs/design-system/patterns/baseform-custom-fields.md +59 -59
- package/docs/design-system/patterns/baseform-usage.md +42 -42
- package/docs/design-system/patterns/body-content-scroll.md +56 -56
- package/docs/design-system/patterns/combo-tree.md +23 -23
- package/docs/design-system/patterns/components-registry.md +17 -17
- package/docs/design-system/patterns/core-providers.md +41 -41
- package/docs/design-system/patterns/crud-bulk-actions.md +12 -12
- package/docs/design-system/patterns/crud-config-props.md +16 -16
- package/docs/design-system/patterns/crud-defaults.md +17 -17
- package/docs/design-system/patterns/crud-toolbar.md +28 -28
- package/docs/design-system/patterns/delete-confirmation.md +40 -40
- package/docs/design-system/patterns/dialog-body-scroll.md +26 -26
- package/docs/design-system/patterns/dialog-structure.md +32 -32
- package/docs/design-system/patterns/dialog-variants.md +41 -41
- package/docs/design-system/patterns/feature-flags.md +81 -81
- package/docs/design-system/patterns/header-metadata.md +57 -57
- package/docs/design-system/patterns/i18n-setup.md +117 -117
- package/docs/design-system/patterns/pagination.md +27 -27
- package/docs/design-system/patterns/single-scroll.md +39 -39
- package/docs/design-system/patterns/vite-tailwind-setup.md +49 -49
- package/docs/design-system/platform.md +18 -18
- package/docs/design-system/selectors.md +296 -260
- package/docs/design-system/tables-grids.md +38 -95
- package/package.json +152 -152
- package/dist/assets/docs-BEwTKYu3.css +0 -1
- package/dist/assets/docs-Bgpz6ETN.js +0 -10752
- package/dist/assets/index-SqMwTzMJ.js +0 -97
- package/dist/index.html +0 -34
|
@@ -11,39 +11,39 @@ Header principal da aplicação com título dinâmico, busca global integrada ao
|
|
|
11
11
|
|
|
12
12
|
**Uso:**
|
|
13
13
|
```tsx
|
|
14
|
-
import { AppLayout, usePageMetadata } from 'forlogic-core';
|
|
15
|
-
|
|
16
|
-
// O AppHeader é renderizado automaticamente pelo AppLayout
|
|
17
|
-
<AppLayout sidebarConfig={sidebarConfig}>
|
|
18
|
-
<Routes>...</Routes>
|
|
19
|
-
</AppLayout>
|
|
20
|
-
|
|
21
|
-
// Para configurar título, subtítulo e breadcrumbs
|
|
22
|
-
function UsersPage() {
|
|
23
|
-
usePageMetadata({
|
|
24
|
-
title: 'Usuários',
|
|
25
|
-
subtitle: 'Gerenciamento de usuários do sistema'
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// Com breadcrumbs
|
|
30
|
-
function EditUserPage() {
|
|
31
|
-
usePageMetadata({
|
|
32
|
-
title: 'Editar Usuário',
|
|
33
|
-
subtitle: 'Atualize os dados cadastrais',
|
|
34
|
-
breadcrumbs: [
|
|
35
|
-
{ label: 'Usuários', href: '/users' },
|
|
36
|
-
{ label: 'João Silva' }
|
|
37
|
-
]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Subtitle com ReactNode
|
|
42
|
-
function DetailPage() {
|
|
43
|
-
usePageMetadata({
|
|
44
|
-
title: 'Detalhes',
|
|
45
|
-
subtitle: <span>Veja a <Link to="/docs">documentação</Link></span>
|
|
46
|
-
});
|
|
14
|
+
import { AppLayout, usePageMetadata } from 'forlogic-core';
|
|
15
|
+
|
|
16
|
+
// O AppHeader é renderizado automaticamente pelo AppLayout
|
|
17
|
+
<AppLayout sidebarConfig={sidebarConfig}>
|
|
18
|
+
<Routes>...</Routes>
|
|
19
|
+
</AppLayout>
|
|
20
|
+
|
|
21
|
+
// Para configurar título, subtítulo e breadcrumbs
|
|
22
|
+
function UsersPage() {
|
|
23
|
+
usePageMetadata({
|
|
24
|
+
title: 'Usuários',
|
|
25
|
+
subtitle: 'Gerenciamento de usuários do sistema'
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Com breadcrumbs
|
|
30
|
+
function EditUserPage() {
|
|
31
|
+
usePageMetadata({
|
|
32
|
+
title: 'Editar Usuário',
|
|
33
|
+
subtitle: 'Atualize os dados cadastrais',
|
|
34
|
+
breadcrumbs: [
|
|
35
|
+
{ label: 'Usuários', href: '/users' },
|
|
36
|
+
{ label: 'João Silva' }
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Subtitle com ReactNode
|
|
42
|
+
function DetailPage() {
|
|
43
|
+
usePageMetadata({
|
|
44
|
+
title: 'Detalhes',
|
|
45
|
+
subtitle: <span>Veja a <Link to="/docs">documentação</Link></span>
|
|
46
|
+
});
|
|
47
47
|
}
|
|
48
48
|
```
|
|
49
49
|
|
|
@@ -56,21 +56,21 @@ function DetailPage() {
|
|
|
56
56
|
|
|
57
57
|
**Exemplos:**
|
|
58
58
|
```tsx
|
|
59
|
-
// Áreas do AppHeader
|
|
60
|
-
// 1. Título: Título da página + Subtítulo + Badge do módulo
|
|
61
|
-
// 2. Busca: Input de busca global (visível quando habilitado)
|
|
62
|
-
// 3. Ações: Botões customizáveis via PageMetadataContext
|
|
63
|
-
// 4. Perfil: UserInfo com dropdown de usuário
|
|
64
|
-
|
|
59
|
+
// Áreas do AppHeader
|
|
60
|
+
// 1. Título: Título da página + Subtítulo + Badge do módulo
|
|
61
|
+
// 2. Busca: Input de busca global (visível quando habilitado)
|
|
62
|
+
// 3. Ações: Botões customizáveis via PageMetadataContext
|
|
63
|
+
// 4. Perfil: UserInfo com dropdown de usuário
|
|
64
|
+
|
|
65
65
|
// Altura fixa: 56px (h-14 no Tailwind)
|
|
66
66
|
```
|
|
67
67
|
```tsx
|
|
68
|
-
// UserInfo com variantes
|
|
68
|
+
// UserInfo com variantes
|
|
69
69
|
<UserInfo variant=
|
|
70
70
|
```
|
|
71
71
|
```tsx
|
|
72
|
-
// Configurar campos pesquisáveis no service
|
|
73
|
-
const userService = createSimpleService({
|
|
72
|
+
// Configurar campos pesquisáveis no service
|
|
73
|
+
const userService = createSimpleService({
|
|
74
74
|
tableName:
|
|
75
75
|
```
|
|
76
76
|
|
|
@@ -94,7 +94,7 @@ const userService = createSimpleService({
|
|
|
94
94
|
- ❌ Não use mais de 3 botões de ação
|
|
95
95
|
- ❌ Não esconda o UserInfo em páginas autenticadas
|
|
96
96
|
|
|
97
|
-
> Fonte: `src
|
|
97
|
+
> Fonte: `src\design-system\docs\components\layout\AppHeaderDoc.tsx`
|
|
98
98
|
|
|
99
99
|
---
|
|
100
100
|
|
|
@@ -104,63 +104,63 @@ Sidebar de navegação principal da aplicação com suporte a pin/unpin, permiss
|
|
|
104
104
|
|
|
105
105
|
**Uso:**
|
|
106
106
|
```tsx
|
|
107
|
-
import { AppLayout } from 'forlogic-core';
|
|
108
|
-
import type { SidebarConfig } from 'forlogic-core';
|
|
109
|
-
import { Home, Users, Settings, Shield, Plus, FileText, Folder } from 'lucide-react';
|
|
110
|
-
|
|
111
|
-
const sidebarConfig: SidebarConfig = {
|
|
112
|
-
appName: 'Minha Aplicação',
|
|
113
|
-
|
|
114
|
-
// Ações do módulo (opcional)
|
|
115
|
-
moduleActions: {
|
|
116
|
-
triggerLabel: 'Criar',
|
|
117
|
-
triggerIcon: Plus,
|
|
118
|
-
actions: [
|
|
119
|
-
{ id: 'new-doc', label: 'Novo Documento', icon: FileText, onClick: () => {} },
|
|
120
|
-
{ id: 'new-folder', label: 'Nova Pasta', icon: Folder, onClick: () => {} },
|
|
121
|
-
],
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
// Navegação (com suporte a hierarquia e separadores)
|
|
125
|
-
navigation: [
|
|
126
|
-
{ label: 'Início', path: '/', icon: Home },
|
|
127
|
-
{ label: 'Usuários', path: '/users', icon: Users },
|
|
128
|
-
{ label: '', path: '', type: 'separator' }, // Linha horizontal separadora
|
|
129
|
-
{
|
|
130
|
-
label: 'Configurações',
|
|
131
|
-
path: '/settings',
|
|
132
|
-
icon: Settings,
|
|
133
|
-
children: [
|
|
134
|
-
{ label: 'Perfil', path: '/settings/profile', icon: Users },
|
|
135
|
-
{ label: 'Segurança', path: '/settings/security', icon: Shield },
|
|
136
|
-
],
|
|
137
|
-
},
|
|
138
|
-
],
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
// Uso via AppLayout (recomendado)
|
|
142
|
-
<AppLayout sidebarConfig={sidebarConfig}>
|
|
143
|
-
<Routes>...</Routes>
|
|
144
|
-
</AppLayout>
|
|
145
|
-
|
|
146
|
-
// Uso direto (casos avançados)
|
|
147
|
-
<AppSidebar
|
|
148
|
-
config={sidebarConfig}
|
|
149
|
-
resizable={true}
|
|
150
|
-
minWidth={224}
|
|
151
|
-
maxWidth={384}
|
|
107
|
+
import { AppLayout } from 'forlogic-core';
|
|
108
|
+
import type { SidebarConfig } from 'forlogic-core';
|
|
109
|
+
import { Home, Users, Settings, Shield, Plus, FileText, Folder } from 'lucide-react';
|
|
110
|
+
|
|
111
|
+
const sidebarConfig: SidebarConfig = {
|
|
112
|
+
appName: 'Minha Aplicação',
|
|
113
|
+
|
|
114
|
+
// Ações do módulo (opcional)
|
|
115
|
+
moduleActions: {
|
|
116
|
+
triggerLabel: 'Criar',
|
|
117
|
+
triggerIcon: Plus,
|
|
118
|
+
actions: [
|
|
119
|
+
{ id: 'new-doc', label: 'Novo Documento', icon: FileText, onClick: () => {} },
|
|
120
|
+
{ id: 'new-folder', label: 'Nova Pasta', icon: Folder, onClick: () => {} },
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
// Navegação (com suporte a hierarquia e separadores)
|
|
125
|
+
navigation: [
|
|
126
|
+
{ label: 'Início', path: '/', icon: Home },
|
|
127
|
+
{ label: 'Usuários', path: '/users', icon: Users },
|
|
128
|
+
{ label: '', path: '', type: 'separator' }, // Linha horizontal separadora
|
|
129
|
+
{
|
|
130
|
+
label: 'Configurações',
|
|
131
|
+
path: '/settings',
|
|
132
|
+
icon: Settings,
|
|
133
|
+
children: [
|
|
134
|
+
{ label: 'Perfil', path: '/settings/profile', icon: Users },
|
|
135
|
+
{ label: 'Segurança', path: '/settings/security', icon: Shield },
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
// Uso via AppLayout (recomendado)
|
|
142
|
+
<AppLayout sidebarConfig={sidebarConfig}>
|
|
143
|
+
<Routes>...</Routes>
|
|
144
|
+
</AppLayout>
|
|
145
|
+
|
|
146
|
+
// Uso direto (casos avançados)
|
|
147
|
+
<AppSidebar
|
|
148
|
+
config={sidebarConfig}
|
|
149
|
+
resizable={true}
|
|
150
|
+
minWidth={224}
|
|
151
|
+
maxWidth={384}
|
|
152
152
|
/>
|
|
153
153
|
```
|
|
154
154
|
|
|
155
155
|
**Exemplos:**
|
|
156
156
|
```tsx
|
|
157
|
-
// Estrutura do AppSidebar
|
|
157
|
+
// Estrutura do AppSidebar
|
|
158
158
|
<Sidebar collapsible=
|
|
159
159
|
```
|
|
160
160
|
```tsx
|
|
161
|
-
// Matching de rota ativa (hierárquico)
|
|
162
|
-
const isActive = (path: string) =>
|
|
163
|
-
location.pathname === path ||
|
|
161
|
+
// Matching de rota ativa (hierárquico)
|
|
162
|
+
const isActive = (path: string) =>
|
|
163
|
+
location.pathname === path ||
|
|
164
164
|
location.pathname.startsWith(path +
|
|
165
165
|
```
|
|
166
166
|
|
|
@@ -187,7 +187,7 @@ const isActive = (path: string) =>
|
|
|
187
187
|
- ❌ Não misture ícones de bibliotecas diferentes
|
|
188
188
|
- ❌ Não use labels com mais de 20 caracteres
|
|
189
189
|
|
|
190
|
-
> Fonte: `src
|
|
190
|
+
> Fonte: `src\design-system\docs\components\layout\AppSidebarDoc.tsx`
|
|
191
191
|
|
|
192
192
|
---
|
|
193
193
|
|
|
@@ -197,28 +197,28 @@ Container principal de página com breadcrumb, background neutro e suporte a mú
|
|
|
197
197
|
|
|
198
198
|
**Uso:**
|
|
199
199
|
```tsx
|
|
200
|
-
import { BodyContent, ContentContainer } from 'forlogic-core';
|
|
201
|
-
|
|
202
|
-
<BodyContent
|
|
203
|
-
breadcrumbs={[
|
|
204
|
-
{ label: 'Módulo', href: '/modulo' },
|
|
205
|
-
{ label: 'Seção', href: '/modulo/secao' },
|
|
206
|
-
{ label: 'Página Atual' }, // Sem href = página atual
|
|
207
|
-
]}
|
|
208
|
-
>
|
|
209
|
-
<ContentContainer
|
|
210
|
-
title="Título do Container"
|
|
211
|
-
subtitle="Subtítulo com informações adicionais"
|
|
212
|
-
>
|
|
213
|
-
<p>Conteúdo principal aqui...</p>
|
|
214
|
-
</ContentContainer>
|
|
200
|
+
import { BodyContent, ContentContainer } from 'forlogic-core';
|
|
201
|
+
|
|
202
|
+
<BodyContent
|
|
203
|
+
breadcrumbs={[
|
|
204
|
+
{ label: 'Módulo', href: '/modulo' },
|
|
205
|
+
{ label: 'Seção', href: '/modulo/secao' },
|
|
206
|
+
{ label: 'Página Atual' }, // Sem href = página atual
|
|
207
|
+
]}
|
|
208
|
+
>
|
|
209
|
+
<ContentContainer
|
|
210
|
+
title="Título do Container"
|
|
211
|
+
subtitle="Subtítulo com informações adicionais"
|
|
212
|
+
>
|
|
213
|
+
<p>Conteúdo principal aqui...</p>
|
|
214
|
+
</ContentContainer>
|
|
215
215
|
</BodyContent>
|
|
216
216
|
```
|
|
217
217
|
|
|
218
218
|
**Exemplos:**
|
|
219
219
|
```tsx
|
|
220
|
-
<BodyContent
|
|
221
|
-
breadcrumbs={[
|
|
220
|
+
<BodyContent
|
|
221
|
+
breadcrumbs={[
|
|
222
222
|
{ label:
|
|
223
223
|
```
|
|
224
224
|
|
|
@@ -226,9 +226,9 @@ import { BodyContent, ContentContainer } from 'forlogic-core';
|
|
|
226
226
|
- O breadcrumb usa a tag nav com aria-label=
|
|
227
227
|
- para identificação por leitores de tela
|
|
228
228
|
- A página atual no breadcrumb é marcada com aria-current=
|
|
229
|
-
- ,
|
|
229
|
+
- ,
|
|
230
230
|
|
|
231
|
-
- ,
|
|
231
|
+
- ,
|
|
232
232
|
|
|
233
233
|
- true
|
|
234
234
|
|
|
@@ -240,63 +240,15 @@ import { BodyContent, ContentContainer } from 'forlogic-core';
|
|
|
240
240
|
- Para integração com React Router, use asChild=true e passe o Link como children
|
|
241
241
|
- O espaçamento entre containers segue o padrão do Design System (space-y-6)
|
|
242
242
|
|
|
243
|
-
> Fonte: `src
|
|
243
|
+
> Fonte: `src\design-system\docs\components\layout\BodyContentDoc.tsx`
|
|
244
244
|
|
|
245
245
|
---
|
|
246
246
|
|
|
247
|
-
###
|
|
247
|
+
### CrudGrid
|
|
248
248
|
|
|
249
|
-
|
|
249
|
+
Componente para exibir dados em formato de grade (cards) com todas as funcionalidades CRUD. Alternativa visual ao CrudTable para listagens com layout mais visual.
|
|
250
250
|
|
|
251
|
-
|
|
252
|
-
```tsx
|
|
253
|
-
import { Grid, Stack, Card } from "forlogic-core"
|
|
254
|
-
|
|
255
|
-
// Grid com 3 colunas fixas
|
|
256
|
-
<Grid cols="3" gap="md">
|
|
257
|
-
<div>Item 1</div>
|
|
258
|
-
<div>Item 2</div>
|
|
259
|
-
<div>Item 3</div>
|
|
260
|
-
</Grid>
|
|
261
|
-
|
|
262
|
-
// Stack vertical
|
|
263
|
-
<Stack direction="column" gap="md">
|
|
264
|
-
<div>Item 1</div>
|
|
265
|
-
<div>Item 2</div>
|
|
266
|
-
</Stack>
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
**Props:**
|
|
270
|
-
| Prop | Tipo | Padrão | Descrição |
|
|
271
|
-
|------|------|--------|-----------|
|
|
272
|
-
| `Stack.wrap` | `boolean` | false | Permite quebra de linha. |
|
|
273
|
-
|
|
274
|
-
**Exemplos:**
|
|
275
|
-
```tsx
|
|
276
|
-
<Stack direction=
|
|
277
|
-
```
|
|
278
|
-
```tsx
|
|
279
|
-
<Stack direction=
|
|
280
|
-
```
|
|
281
|
-
```tsx
|
|
282
|
-
<Stack direction=
|
|
283
|
-
```
|
|
284
|
-
```tsx
|
|
285
|
-
<Stack direction=
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
**Acessibilidade:**
|
|
289
|
-
- Layout responsivo automático
|
|
290
|
-
- Suporte a grid fixo e adaptativo
|
|
291
|
-
- Espaçamentos padronizados
|
|
292
|
-
- Props intuitivas e type-safe
|
|
293
|
-
|
|
294
|
-
**Notas:**
|
|
295
|
-
- **Grid** é ideal para layouts de cards, galerias e grids de conteúdo
|
|
296
|
-
- **Stack** é ideal para listas, formulários e layouts flexíveis
|
|
297
|
-
- Ambos suportam espaçamentos padronizados (xs, sm, md, lg, xl)
|
|
298
|
-
|
|
299
|
-
> Fonte: `src/design-system/docs/components/GridDoc.tsx`
|
|
251
|
+
> Fonte: `src\design-system\docs\components\crud\CrudGridDoc.tsx`
|
|
300
252
|
|
|
301
253
|
---
|
|
302
254
|
|
|
@@ -306,24 +258,24 @@ Painéis redimensionáveis para criar layouts flexíveis e adaptáveis. Baseado
|
|
|
306
258
|
|
|
307
259
|
**Uso:**
|
|
308
260
|
```tsx
|
|
309
|
-
import {
|
|
310
|
-
ResizablePanelGroup,
|
|
311
|
-
ResizablePanel,
|
|
312
|
-
ResizableHandle
|
|
313
|
-
} from 'forlogic-core/modular';
|
|
314
|
-
|
|
315
|
-
function ResizableLayout() {
|
|
316
|
-
return (
|
|
317
|
-
<ResizablePanelGroup direction="horizontal" className="min-h-[200px]">
|
|
318
|
-
<ResizablePanel defaultSize={25}>
|
|
319
|
-
<div className="p-4">Painel Esquerdo</div>
|
|
320
|
-
</ResizablePanel>
|
|
321
|
-
<ResizableHandle withHandle />
|
|
322
|
-
<ResizablePanel defaultSize={75}>
|
|
323
|
-
<div className="p-4">Painel Direito</div>
|
|
324
|
-
</ResizablePanel>
|
|
325
|
-
</ResizablePanelGroup>
|
|
326
|
-
);
|
|
261
|
+
import {
|
|
262
|
+
ResizablePanelGroup,
|
|
263
|
+
ResizablePanel,
|
|
264
|
+
ResizableHandle
|
|
265
|
+
} from 'forlogic-core/modular';
|
|
266
|
+
|
|
267
|
+
function ResizableLayout() {
|
|
268
|
+
return (
|
|
269
|
+
<ResizablePanelGroup direction="horizontal" className="min-h-[200px]">
|
|
270
|
+
<ResizablePanel defaultSize={25}>
|
|
271
|
+
<div className="p-4">Painel Esquerdo</div>
|
|
272
|
+
</ResizablePanel>
|
|
273
|
+
<ResizableHandle withHandle />
|
|
274
|
+
<ResizablePanel defaultSize={75}>
|
|
275
|
+
<div className="p-4">Painel Direito</div>
|
|
276
|
+
</ResizablePanel>
|
|
277
|
+
</ResizablePanelGroup>
|
|
278
|
+
);
|
|
327
279
|
}
|
|
328
280
|
```
|
|
329
281
|
|
|
@@ -340,7 +292,7 @@ function ResizableLayout() {
|
|
|
340
292
|
- A soma de defaultSize dos painéis deve ser 100.
|
|
341
293
|
- Combine com hooks de resize (useColumnResize, useSidebarResize) para casos específicos.
|
|
342
294
|
|
|
343
|
-
> Fonte: `src
|
|
295
|
+
> Fonte: `src\design-system\docs\components\ResizableDoc.tsx`
|
|
344
296
|
|
|
345
297
|
---
|
|
346
298
|
|
|
@@ -350,24 +302,24 @@ function ResizableLayout() {
|
|
|
350
302
|
|
|
351
303
|
**Uso:**
|
|
352
304
|
```tsx
|
|
353
|
-
import { ScrollArea, ScrollBar } from "forlogic-core"
|
|
354
|
-
|
|
355
|
-
<ScrollArea className="h-72 w-48 rounded-md border">
|
|
356
|
-
<div className="p-4">
|
|
357
|
-
{items.map((item) => (
|
|
358
|
-
<div key={item.id}>{item.content}</div>
|
|
359
|
-
))}
|
|
360
|
-
</div>
|
|
361
|
-
</ScrollArea>
|
|
362
|
-
|
|
363
|
-
// Scroll horizontal:
|
|
364
|
-
<ScrollArea className="w-96 whitespace-nowrap rounded-md border">
|
|
365
|
-
<div className="flex w-max space-x-4 p-4">
|
|
366
|
-
{items.map((item) => (
|
|
367
|
-
<div key={item.id} className="w-[150px] shrink-0">{item.content}</div>
|
|
368
|
-
))}
|
|
369
|
-
</div>
|
|
370
|
-
<ScrollBar orientation="horizontal" />
|
|
305
|
+
import { ScrollArea, ScrollBar } from "forlogic-core"
|
|
306
|
+
|
|
307
|
+
<ScrollArea className="h-72 w-48 rounded-md border">
|
|
308
|
+
<div className="p-4">
|
|
309
|
+
{items.map((item) => (
|
|
310
|
+
<div key={item.id}>{item.content}</div>
|
|
311
|
+
))}
|
|
312
|
+
</div>
|
|
313
|
+
</ScrollArea>
|
|
314
|
+
|
|
315
|
+
// Scroll horizontal:
|
|
316
|
+
<ScrollArea className="w-96 whitespace-nowrap rounded-md border">
|
|
317
|
+
<div className="flex w-max space-x-4 p-4">
|
|
318
|
+
{items.map((item) => (
|
|
319
|
+
<div key={item.id} className="w-[150px] shrink-0">{item.content}</div>
|
|
320
|
+
))}
|
|
321
|
+
</div>
|
|
322
|
+
<ScrollBar orientation="horizontal" />
|
|
371
323
|
</ScrollArea>
|
|
372
324
|
```
|
|
373
325
|
|
|
@@ -394,6 +346,6 @@ import { ScrollArea, ScrollBar } from "forlogic-core"
|
|
|
394
346
|
- Usado internamente pela DesignSystemSidebar, AppSidebar, e outros componentes com overflow.
|
|
395
347
|
- Mantém bordas arredondadas do container pai (rounded-[inherit]).
|
|
396
348
|
|
|
397
|
-
> Fonte: `src
|
|
349
|
+
> Fonte: `src\design-system\docs\components\ScrollAreaDoc.tsx`
|
|
398
350
|
|
|
399
351
|
---
|