forlogic-core 2.1.4 → 2.2.0
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 -68
- package/dist/action-plans/components/ActionPlanAttachmentsTab.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanCommentsTab.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanCostTab.d.ts +5 -0
- package/dist/action-plans/components/ActionPlanGeneralTab.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanHistoryTab.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanPredecessorsTab.d.ts +5 -0
- package/dist/action-plans/components/ActionPlanProgressDialog.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanProgressTab.d.ts +5 -0
- package/dist/action-plans/components/ActionPlanStatusBadge.d.ts +9 -2
- package/dist/action-plans/constants.d.ts +24 -0
- package/dist/action-plans/hooks/useActionPlan.d.ts +5 -0
- package/dist/action-plans/hooks/useActionPlanProgress.d.ts +5 -0
- package/dist/action-plans/types.d.ts +60 -0
- package/dist/action-plans/utils/formatTime.d.ts +9 -0
- package/dist/audit-trail/components/AuditTrailDetails.d.ts +10 -0
- package/dist/audit-trail/components/AuditTrailFilter.d.ts +10 -0
- package/dist/audit-trail/components/AuditTrailPage.d.ts +10 -0
- package/dist/audit-trail/types.d.ts +58 -0
- package/dist/audit-trail/utils.d.ts +18 -2
- package/dist/auth/components/EditProfileDialog.d.ts +1 -0
- package/dist/auth/components/ProtectedRoute.d.ts +5 -0
- package/dist/auth/contexts/AuthContext.d.ts +5 -0
- package/dist/auth/pages/CallbackPage.d.ts +5 -0
- package/dist/auth/services/AuthService.d.ts +5 -0
- package/dist/auth/services/TokenManager.d.ts +5 -0
- package/dist/auth/services/TokenService.d.ts +10 -0
- package/dist/auth/utils/ErrorInterceptor.d.ts +5 -0
- package/dist/components/dashboards/dashboard-form.d.ts +15 -0
- package/dist/components/dashboards/dashboard-general-view.d.ts +15 -0
- package/dist/components/dashboards/dashboard-grid.d.ts +25 -0
- package/dist/components/dashboards/dashboard-list.d.ts +10 -0
- package/dist/components/dashboards/dashboard-panel-renderer.d.ts +10 -0
- package/dist/components/dashboards/dashboard-view.d.ts +10 -0
- package/dist/components/dashboards/helpers.d.ts +44 -5
- package/dist/components/dashboards/panels/burndown-panel.d.ts +15 -0
- package/dist/components/dashboards/panels/cartesian-panel.d.ts +20 -0
- package/dist/components/dashboards/panels/list-panel.d.ts +15 -0
- package/dist/components/dashboards/panels/matrix-risk-panel.d.ts +25 -0
- package/dist/components/dashboards/panels/numeric-panel.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-error.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-header.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-loader.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-no-data.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-unavailable.d.ts +10 -0
- package/dist/components/dashboards/panels/pareto-panel.d.ts +10 -0
- package/dist/components/dashboards/panels/performance-panel.d.ts +15 -0
- package/dist/components/dashboards/panels/pie-panel.d.ts +10 -0
- package/dist/components/dashboards/panels/text-panel.d.ts +10 -0
- package/dist/components/dashboards/types.d.ts +230 -0
- package/dist/components/modules/AccessDeniedDialog.d.ts +3 -1
- package/dist/components/modules/ModuleAccessGuard.d.ts +3 -1
- package/dist/components/modules/ModulesContent.d.ts +3 -1
- package/dist/components/modules/ModulesDialog.d.ts +1 -1
- package/dist/components/modules/ModulesFooterCards.d.ts +3 -1
- package/dist/components/modules/types.d.ts +2 -0
- package/dist/components/ui/accordion.d.ts +35 -0
- package/dist/components/ui/action-button.d.ts +5 -0
- package/dist/components/ui/alert-dialog.d.ts +82 -0
- package/dist/components/ui/alert.d.ts +32 -0
- package/dist/components/ui/avatar.d.ts +30 -0
- package/dist/components/ui/badge.d.ts +32 -0
- package/dist/components/ui/breadcrumb.d.ts +54 -0
- package/dist/components/ui/button-group.d.ts +15 -0
- package/dist/components/ui/button.d.ts +55 -0
- package/dist/components/ui/calendar.d.ts +16 -0
- package/dist/components/ui/card.d.ts +49 -0
- package/dist/components/ui/chart.d.ts +35 -0
- package/dist/components/ui/checkbox.d.ts +11 -0
- package/dist/components/ui/collapsible.d.ts +15 -0
- package/dist/components/ui/color-picker.d.ts +5 -0
- package/dist/components/ui/combo-tree.d.ts +23 -0
- package/dist/components/ui/combobox.d.ts +28 -0
- package/dist/components/ui/command.d.ts +66 -0
- package/dist/components/ui/context-menu.d.ts +95 -0
- package/dist/components/ui/date-picker.d.ts +10 -0
- package/dist/components/ui/dialog-wizard.d.ts +22 -4
- package/dist/components/ui/dialog.d.ts +181 -0
- package/dist/components/ui/drawer.d.ts +72 -0
- package/dist/components/ui/dropdown-menu.d.ts +153 -0
- package/dist/components/ui/electronic-signature-dialog.d.ts +10 -0
- package/dist/components/ui/export-dialog.d.ts +20 -0
- package/dist/components/ui/form.d.ts +96 -0
- package/dist/components/ui/hover-card.d.ts +15 -0
- package/dist/components/ui/icon-picker.d.ts +5 -0
- package/dist/components/ui/iframe-dialog.d.ts +10 -0
- package/dist/components/ui/input-group.d.ts +16 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/menubar.d.ts +80 -0
- package/dist/components/ui/multiselect-permissions.d.ts +25 -0
- package/dist/components/ui/navigation-menu.d.ts +45 -0
- package/dist/components/ui/onboarding-dialog.d.ts +15 -0
- package/dist/components/ui/online-editor-dialog.d.ts +10 -0
- package/dist/components/ui/pagination.d.ts +53 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/radio-group.d.ts +3 -0
- package/dist/components/ui/report-request-list.d.ts +20 -0
- package/dist/components/ui/resizable.d.ts +15 -0
- package/dist/components/ui/rich-text-editor.d.ts +13 -0
- package/dist/components/ui/scroll-area.d.ts +3 -0
- package/dist/components/ui/select.d.ts +71 -0
- package/dist/components/ui/separator.d.ts +13 -0
- package/dist/components/ui/sheet.d.ts +76 -0
- package/dist/components/ui/sidebar.d.ts +203 -0
- package/dist/components/ui/skeleton-variants.d.ts +25 -0
- package/dist/components/ui/skeleton.d.ts +12 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/sonner.d.ts +5 -0
- package/dist/components/ui/spinner.d.ts +5 -0
- package/dist/components/ui/split-button.d.ts +6 -0
- package/dist/components/ui/stack.d.ts +5 -0
- package/dist/components/ui/status-badge.d.ts +52 -0
- package/dist/components/ui/step-selector.d.ts +5 -0
- package/dist/components/ui/stimulsoft-viewer.d.ts +8 -0
- package/dist/components/ui/switch.d.ts +21 -0
- package/dist/components/ui/tab-page-layout.d.ts +33 -0
- package/dist/components/ui/table-resize-handle.d.ts +10 -3
- package/dist/components/ui/table.d.ts +102 -0
- package/dist/components/ui/tabs.d.ts +59 -0
- package/dist/components/ui/terms-of-use-dialog.d.ts +50 -4
- package/dist/components/ui/textarea.d.ts +27 -0
- package/dist/components/ui/timepicker.d.ts +23 -0
- package/dist/components/ui/toggle-group.d.ts +25 -0
- package/dist/components/ui/toggle.d.ts +21 -0
- package/dist/components/ui/tooltip.d.ts +48 -0
- package/dist/components/ui/truncated-cell.d.ts +13 -0
- package/dist/components/ui/typography.d.ts +119 -0
- package/dist/components/ui/updates-notification.d.ts +33 -0
- package/dist/components/ui/users-groups-selector.d.ts +43 -0
- package/dist/components/ui/viewer-dialog.d.ts +107 -0
- package/dist/crud/components/ActionMenuItems.d.ts +5 -0
- package/dist/crud/components/BaseForm.d.ts +46 -0
- package/dist/crud/components/ColumnSettingsPopover.d.ts +10 -0
- package/dist/crud/components/CrudActionBar.d.ts +20 -0
- package/dist/crud/components/CrudGrid.d.ts +10 -0
- package/dist/crud/components/CrudPagination.d.ts +5 -0
- package/dist/crud/components/CrudTable.d.ts +5 -0
- package/dist/crud/components/TableRowActions.d.ts +5 -0
- package/dist/crud/createCrudPage.d.ts +41 -8
- package/dist/crud/generateCrudConfig.d.ts +13 -8
- package/dist/crud/hooks/useBaseForm.d.ts +39 -0
- package/dist/crud/hooks/useColumnManager.d.ts +25 -0
- package/dist/crud/hooks/useCrud.d.ts +35 -0
- package/dist/crud/primitives/ActionMenu.d.ts +41 -0
- package/dist/crud/primitives/FilterBar.d.ts +45 -0
- package/dist/crud/primitives/Pagination.d.ts +5 -0
- package/dist/crud/primitives/Table.d.ts +6 -1
- package/dist/crud/primitives/TreeTable.d.ts +5 -0
- package/dist/crud/primitives/types.d.ts +63 -0
- package/dist/crud/utils/routingHelpers.d.ts +11 -0
- package/dist/custom-form-fields/components/CustomFormFields.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormDateField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormMultiSelectionField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormNumericField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormQuestionsField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormSingleSelectionField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormTextField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormTimeField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormUrlField.d.ts +3 -0
- package/dist/custom-form-fields/fields/ReadOnlyTextField.d.ts +3 -0
- package/dist/custom-form-fields/types.d.ts +84 -21
- package/dist/exports/crud.d.ts +5 -0
- package/dist/exports/integrations.d.ts +1 -0
- package/dist/exports/ui.d.ts +1 -0
- package/dist/file-upload/components/SingleFileUpload.d.ts +59 -0
- package/dist/file-upload/types.d.ts +15 -0
- package/dist/file-upload/utils/formatBytes.d.ts +5 -0
- package/dist/file-upload/utils/getFileExtension.d.ts +5 -0
- package/dist/hooks/useColumnResize.d.ts +24 -0
- package/dist/hooks/useRowResize.d.ts +18 -0
- package/dist/hooks/useSidebarResize.d.ts +18 -0
- package/dist/hooks/useUpdatesNotification.d.ts +16 -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/dist/integrations/clarity/clarityTracking.d.ts +31 -0
- package/dist/integrations/clarity/index.d.ts +3 -0
- package/dist/integrations/clarity/types.d.ts +46 -0
- package/dist/integrations/clarity/useClarity.d.ts +34 -0
- package/dist/integrations/index.d.ts +5 -0
- package/dist/providers/CoreProviders.d.ts +16 -1
- package/dist/qualiex/components/QualiexUserField.d.ts +8 -0
- package/dist/qualiex/hooks/useQualiexUsers.d.ts +16 -26
- package/dist/qualiex/services/qualiexApi.d.ts +38 -2
- package/dist/qualiex/utils/QualiexErrorInterceptor.d.ts +5 -0
- package/dist/supabase/SupabaseSingleton.d.ts +34 -0
- package/dist/types.d.ts +51 -2
- package/dist/utils/color.d.ts +26 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/vite/index.esm.js +4 -1
- package/dist/vite/index.js +4 -1
- package/docs/PUBLISH.md +168 -0
- package/docs/STORAGE_BUCKETS.md +384 -0
- package/docs/WORKSPACE_KNOWLEDGE.md +120 -119
- package/docs/design-system/README.md +1 -1
- package/docs/design-system/buttons-actions.md +130 -130
- package/docs/design-system/charts-dashboards.md +340 -301
- package/docs/design-system/crud.md +174 -114
- package/docs/design-system/data-display.md +108 -103
- package/docs/design-system/dialogs.md +212 -212
- package/docs/design-system/domain.md +317 -317
- package/docs/design-system/examples.md +275 -275
- package/docs/design-system/foundation.md +1 -1
- package/docs/design-system/inputs.md +131 -131
- package/docs/design-system/layout.md +202 -154
- package/docs/design-system/navigation.md +271 -325
- 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 -39
- 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 +24 -20
- 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 +48 -48
- package/docs/design-system/platform.md +18 -18
- package/docs/design-system/selectors.md +240 -236
- package/docs/design-system/tables-grids.md +95 -38
- package/package.json +150 -144
- package/dist/README.md +0 -1079
- package/dist/bin/bootstrap.js +0 -40
- package/dist/bin/pull-docs.js +0 -186
- package/dist/docs/KNOWLEDGE.md +0 -109
|
@@ -11,11 +11,11 @@ Um elemento de imagem com fallback para representar o usuário.
|
|
|
11
11
|
|
|
12
12
|
**Uso:**
|
|
13
13
|
```tsx
|
|
14
|
-
import { Avatar, AvatarImage, AvatarFallback } from "forlogic-core"
|
|
15
|
-
|
|
16
|
-
<Avatar>
|
|
17
|
-
<AvatarImage src="https://github.com/shadcn.png" alt="@shadcn" />
|
|
18
|
-
<AvatarFallback>CN</AvatarFallback>
|
|
14
|
+
import { Avatar, AvatarImage, AvatarFallback } from "forlogic-core"
|
|
15
|
+
|
|
16
|
+
<Avatar>
|
|
17
|
+
<AvatarImage src="https://github.com/shadcn.png" alt="@shadcn" />
|
|
18
|
+
<AvatarFallback>CN</AvatarFallback>
|
|
19
19
|
</Avatar>
|
|
20
20
|
```
|
|
21
21
|
|
|
@@ -27,12 +27,12 @@ import { Avatar, AvatarImage, AvatarFallback } from "forlogic-core"
|
|
|
27
27
|
|
|
28
28
|
**Exemplos:**
|
|
29
29
|
```tsx
|
|
30
|
-
<Avatar>
|
|
30
|
+
<Avatar>
|
|
31
31
|
<AvatarImage src=
|
|
32
32
|
```
|
|
33
33
|
```tsx
|
|
34
|
-
<Avatar>
|
|
35
|
-
<AvatarFallback>JD</AvatarFallback>
|
|
34
|
+
<Avatar>
|
|
35
|
+
<AvatarFallback>JD</AvatarFallback>
|
|
36
36
|
</Avatar>
|
|
37
37
|
```
|
|
38
38
|
|
|
@@ -41,7 +41,7 @@ import { Avatar, AvatarImage, AvatarFallback } from "forlogic-core"
|
|
|
41
41
|
- Fallback garante que o conteúdo seja sempre exibido
|
|
42
42
|
- Estrutura HTML semântica
|
|
43
43
|
|
|
44
|
-
> Fonte: `src
|
|
44
|
+
> Fonte: `src/design-system/docs/components/AvatarDoc.tsx`
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
@@ -51,25 +51,30 @@ Exibe um badge ou um componente que se parece com um badge.
|
|
|
51
51
|
|
|
52
52
|
**Uso:**
|
|
53
53
|
```tsx
|
|
54
|
-
import { Badge } from "forlogic-core"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<Badge
|
|
58
|
-
<Badge variant="
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
import { Badge, StatusBadge, createStatusConfig } from "forlogic-core"
|
|
55
|
+
|
|
56
|
+
// Badge genérico
|
|
57
|
+
<Badge>Badge</Badge>
|
|
58
|
+
<Badge variant="success">Aprovado</Badge>
|
|
59
|
+
|
|
60
|
+
// Status Badge — uso direto
|
|
61
|
+
<StatusBadge label="Em Execução" color="#2E7D5B" icon={Play} />
|
|
62
|
+
|
|
63
|
+
// Status Badge — com createStatusConfig
|
|
64
|
+
const getStatus = createStatusConfig({
|
|
65
|
+
pending: { label: 'Pendente', color: '#8B7355', icon: Clock },
|
|
66
|
+
approved: { label: 'Aprovado', color: '#3D7A40', icon: CheckCircle2 },
|
|
67
|
+
});
|
|
68
|
+
<StatusBadge {...getStatus('pending')} />
|
|
64
69
|
```
|
|
65
70
|
|
|
66
71
|
**Exemplos:**
|
|
67
72
|
```tsx
|
|
68
|
-
<Badge>Default</Badge>
|
|
73
|
+
<Badge>Default</Badge>
|
|
69
74
|
<Badge variant=
|
|
70
75
|
```
|
|
71
76
|
```tsx
|
|
72
|
-
|
|
77
|
+
import { StatusBadge, createStatusConfig } from
|
|
73
78
|
```
|
|
74
79
|
```tsx
|
|
75
80
|
<Badge variant=
|
|
@@ -86,7 +91,7 @@ import { Badge } from "forlogic-core"
|
|
|
86
91
|
- Funciona com leitores de tela
|
|
87
92
|
- Pode ser tornado interativo com labels ARIA adequadas se necessário
|
|
88
93
|
|
|
89
|
-
> Fonte: `src
|
|
94
|
+
> Fonte: `src/design-system/docs/components/BadgeDoc.tsx`
|
|
90
95
|
|
|
91
96
|
---
|
|
92
97
|
|
|
@@ -96,19 +101,19 @@ Exibe um card com cabeçalho, conteúdo e rodapé.
|
|
|
96
101
|
|
|
97
102
|
**Uso:**
|
|
98
103
|
```tsx
|
|
99
|
-
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "forlogic-core"
|
|
100
|
-
|
|
101
|
-
<Card>
|
|
102
|
-
<CardHeader>
|
|
103
|
-
<CardTitle>Card Title</CardTitle>
|
|
104
|
-
<CardDescription>Card Description</CardDescription>
|
|
105
|
-
</CardHeader>
|
|
106
|
-
<CardContent>
|
|
107
|
-
<p>Card Content</p>
|
|
108
|
-
</CardContent>
|
|
109
|
-
<CardFooter>
|
|
110
|
-
<p>Card Footer</p>
|
|
111
|
-
</CardFooter>
|
|
104
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "forlogic-core"
|
|
105
|
+
|
|
106
|
+
<Card>
|
|
107
|
+
<CardHeader>
|
|
108
|
+
<CardTitle>Card Title</CardTitle>
|
|
109
|
+
<CardDescription>Card Description</CardDescription>
|
|
110
|
+
</CardHeader>
|
|
111
|
+
<CardContent>
|
|
112
|
+
<p>Card Content</p>
|
|
113
|
+
</CardContent>
|
|
114
|
+
<CardFooter>
|
|
115
|
+
<p>Card Footer</p>
|
|
116
|
+
</CardFooter>
|
|
112
117
|
</Card>
|
|
113
118
|
```
|
|
114
119
|
|
|
@@ -123,7 +128,7 @@ import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter }
|
|
|
123
128
|
- Contraste de cores acessível
|
|
124
129
|
- Funciona com leitores de tela
|
|
125
130
|
|
|
126
|
-
> Fonte: `src
|
|
131
|
+
> Fonte: `src/design-system/docs/components/CardDoc.tsx`
|
|
127
132
|
|
|
128
133
|
---
|
|
129
134
|
|
|
@@ -133,18 +138,18 @@ Sistema de lista de dados com composição de componentes. Ideal para exibir inf
|
|
|
133
138
|
|
|
134
139
|
**Uso:**
|
|
135
140
|
```tsx
|
|
136
|
-
import { DataList, Badge } from "forlogic-core"
|
|
137
|
-
|
|
138
|
-
<DataList.Root>
|
|
139
|
-
<DataList.Item onClick={() => console.log('clicked')}>
|
|
140
|
-
<DataList.Field label="Nome" value="João Silva" />
|
|
141
|
-
<DataList.Field label="Email" value="joao@exemplo.com" />
|
|
142
|
-
<DataList.Field label="Status" value={<Badge>Ativo</Badge>} />
|
|
143
|
-
</DataList.Item>
|
|
144
|
-
<DataList.Item>
|
|
145
|
-
<DataList.Field label="Nome" value="Maria Santos" />
|
|
146
|
-
<DataList.Field label="Email" value="maria@exemplo.com" />
|
|
147
|
-
</DataList.Item>
|
|
141
|
+
import { DataList, Badge } from "forlogic-core"
|
|
142
|
+
|
|
143
|
+
<DataList.Root>
|
|
144
|
+
<DataList.Item onClick={() => console.log('clicked')}>
|
|
145
|
+
<DataList.Field label="Nome" value="João Silva" />
|
|
146
|
+
<DataList.Field label="Email" value="joao@exemplo.com" />
|
|
147
|
+
<DataList.Field label="Status" value={<Badge>Ativo</Badge>} />
|
|
148
|
+
</DataList.Item>
|
|
149
|
+
<DataList.Item>
|
|
150
|
+
<DataList.Field label="Nome" value="Maria Santos" />
|
|
151
|
+
<DataList.Field label="Email" value="maria@exemplo.com" />
|
|
152
|
+
</DataList.Item>
|
|
148
153
|
</DataList.Root>
|
|
149
154
|
```
|
|
150
155
|
|
|
@@ -167,7 +172,7 @@ import { DataList, Badge } from "forlogic-core"
|
|
|
167
172
|
- 💡 Field.value aceita ReactNode - use Badge, Button, etc.
|
|
168
173
|
- 💡 onClick em Item adiciona hover state automaticamente
|
|
169
174
|
|
|
170
|
-
> Fonte: `src
|
|
175
|
+
> Fonte: `src/design-system/docs/components/DataListDoc.tsx`
|
|
171
176
|
|
|
172
177
|
---
|
|
173
178
|
|
|
@@ -177,40 +182,40 @@ Componente para exibir estados vazios com ícone, mensagem e ação opcional.
|
|
|
177
182
|
|
|
178
183
|
**Uso:**
|
|
179
184
|
```tsx
|
|
180
|
-
import { EmptyState } from "forlogic-core"
|
|
181
|
-
|
|
182
|
-
// Estado vazio padrão
|
|
183
|
-
<EmptyState
|
|
184
|
-
title="Nenhum item encontrado"
|
|
185
|
-
description="Adicione seu primeiro item para começar"
|
|
186
|
-
action={{
|
|
187
|
-
label: "Adicionar Item",
|
|
188
|
-
onClick: () => handleAddItem()
|
|
189
|
-
}}
|
|
190
|
-
/>
|
|
191
|
-
|
|
192
|
-
// Sem resultados de busca
|
|
193
|
-
<EmptyState
|
|
194
|
-
variant="search"
|
|
195
|
-
title="Nenhum resultado encontrado"
|
|
196
|
-
description="Tente ajustar sua busca"
|
|
197
|
-
/>
|
|
198
|
-
|
|
199
|
-
// Estado de erro
|
|
200
|
-
<EmptyState
|
|
201
|
-
variant="error"
|
|
202
|
-
title="Erro ao carregar dados"
|
|
203
|
-
description="Não foi possível carregar as informações"
|
|
204
|
-
action={{
|
|
205
|
-
label: "Tentar Novamente",
|
|
206
|
-
onClick: () => refetch()
|
|
207
|
-
}}
|
|
208
|
-
/>
|
|
209
|
-
|
|
210
|
-
// Ícone customizado
|
|
211
|
-
<EmptyState
|
|
212
|
-
icon={<Package className="h-8 w-8" />}
|
|
213
|
-
title="Sem produtos"
|
|
185
|
+
import { EmptyState } from "forlogic-core"
|
|
186
|
+
|
|
187
|
+
// Estado vazio padrão
|
|
188
|
+
<EmptyState
|
|
189
|
+
title="Nenhum item encontrado"
|
|
190
|
+
description="Adicione seu primeiro item para começar"
|
|
191
|
+
action={{
|
|
192
|
+
label: "Adicionar Item",
|
|
193
|
+
onClick: () => handleAddItem()
|
|
194
|
+
}}
|
|
195
|
+
/>
|
|
196
|
+
|
|
197
|
+
// Sem resultados de busca
|
|
198
|
+
<EmptyState
|
|
199
|
+
variant="search"
|
|
200
|
+
title="Nenhum resultado encontrado"
|
|
201
|
+
description="Tente ajustar sua busca"
|
|
202
|
+
/>
|
|
203
|
+
|
|
204
|
+
// Estado de erro
|
|
205
|
+
<EmptyState
|
|
206
|
+
variant="error"
|
|
207
|
+
title="Erro ao carregar dados"
|
|
208
|
+
description="Não foi possível carregar as informações"
|
|
209
|
+
action={{
|
|
210
|
+
label: "Tentar Novamente",
|
|
211
|
+
onClick: () => refetch()
|
|
212
|
+
}}
|
|
213
|
+
/>
|
|
214
|
+
|
|
215
|
+
// Ícone customizado
|
|
216
|
+
<EmptyState
|
|
217
|
+
icon={<Package className="h-8 w-8" />}
|
|
218
|
+
title="Sem produtos"
|
|
214
219
|
/>
|
|
215
220
|
```
|
|
216
221
|
|
|
@@ -229,7 +234,7 @@ import { EmptyState } from "forlogic-core"
|
|
|
229
234
|
- Centralizado e responsivo
|
|
230
235
|
- Suporte a ícone customizado
|
|
231
236
|
|
|
232
|
-
> Fonte: `src
|
|
237
|
+
> Fonte: `src/design-system/docs/components/EmptyStateDoc.tsx`
|
|
233
238
|
|
|
234
239
|
---
|
|
235
240
|
|
|
@@ -239,9 +244,9 @@ Separa visual ou semanticamente o conteúdo.
|
|
|
239
244
|
|
|
240
245
|
**Uso:**
|
|
241
246
|
```tsx
|
|
242
|
-
import { Separator } from "forlogic-core"
|
|
243
|
-
|
|
244
|
-
<Separator />
|
|
247
|
+
import { Separator } from "forlogic-core"
|
|
248
|
+
|
|
249
|
+
<Separator />
|
|
245
250
|
<Separator orientation="vertical" />
|
|
246
251
|
```
|
|
247
252
|
|
|
@@ -263,7 +268,7 @@ import { Separator } from "forlogic-core"
|
|
|
263
268
|
- Pode ser decorativo ou estrutural
|
|
264
269
|
- Atributos ARIA adequados
|
|
265
270
|
|
|
266
|
-
> Fonte: `src
|
|
271
|
+
> Fonte: `src/design-system/docs/components/SeparatorDoc.tsx`
|
|
267
272
|
|
|
268
273
|
---
|
|
269
274
|
|
|
@@ -273,8 +278,8 @@ Exibe um indicador mostrando o progresso de conclusão de uma tarefa, tipicament
|
|
|
273
278
|
|
|
274
279
|
**Uso:**
|
|
275
280
|
```tsx
|
|
276
|
-
import { Progress } from "forlogic-core"
|
|
277
|
-
|
|
281
|
+
import { Progress } from "forlogic-core"
|
|
282
|
+
|
|
278
283
|
<Progress value={60} />
|
|
279
284
|
```
|
|
280
285
|
|
|
@@ -301,7 +306,7 @@ import { Progress } from "forlogic-core"
|
|
|
301
306
|
- Ajuste a altura via className (h-1, h-2, h-4) para diferentes contextos
|
|
302
307
|
- Para uploads, mostre tamanho atual e total junto com o percentual
|
|
303
308
|
|
|
304
|
-
> Fonte: `src
|
|
309
|
+
> Fonte: `src/design-system/docs/components/ProgressDoc.tsx`
|
|
305
310
|
|
|
306
311
|
---
|
|
307
312
|
|
|
@@ -311,17 +316,17 @@ Componentes para estados de carregamento: Skeleton (placeholders), Spinner (indi
|
|
|
311
316
|
|
|
312
317
|
**Uso:**
|
|
313
318
|
```tsx
|
|
314
|
-
import { Skeleton, Spinner, LoadingState } from "forlogic-core"
|
|
315
|
-
|
|
316
|
-
// Skeleton básico
|
|
317
|
-
<Skeleton className="h-4 w-[200px]" />
|
|
318
|
-
|
|
319
|
-
// Spinner
|
|
320
|
-
<Spinner size="md" />
|
|
321
|
-
|
|
322
|
-
// LoadingState declarativo
|
|
323
|
-
<LoadingState isLoading={isLoading} type="spinner">
|
|
324
|
-
<div>Conteúdo carregado</div>
|
|
319
|
+
import { Skeleton, Spinner, LoadingState } from "forlogic-core"
|
|
320
|
+
|
|
321
|
+
// Skeleton básico
|
|
322
|
+
<Skeleton className="h-4 w-[200px]" />
|
|
323
|
+
|
|
324
|
+
// Spinner
|
|
325
|
+
<Spinner size="md" />
|
|
326
|
+
|
|
327
|
+
// LoadingState declarativo
|
|
328
|
+
<LoadingState isLoading={isLoading} type="spinner">
|
|
329
|
+
<div>Conteúdo carregado</div>
|
|
325
330
|
</LoadingState>
|
|
326
331
|
```
|
|
327
332
|
|
|
@@ -355,6 +360,6 @@ import { Skeleton, Spinner, LoadingState } from "forlogic-core"
|
|
|
355
360
|
- **type=
|
|
356
361
|
- **: Mostra um placeholder animado no lugar dos children.
|
|
357
362
|
|
|
358
|
-
> Fonte: `src
|
|
363
|
+
> Fonte: `src/design-system/docs/components/SkeletonDoc.tsx`
|
|
359
364
|
|
|
360
365
|
---
|