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,27 +11,27 @@ Dialog para navegação entre módulos do sistema.
|
|
|
11
11
|
|
|
12
12
|
**Uso:**
|
|
13
13
|
```tsx
|
|
14
|
-
import { useState } from 'react';
|
|
15
|
-
import { Button, ModulesDialog } from 'forlogic-core';
|
|
16
|
-
import { LayoutGrid } from 'lucide-react';
|
|
17
|
-
|
|
18
|
-
function App() {
|
|
19
|
-
const [open, setOpen] = useState(false);
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<>
|
|
23
|
-
<Button onClick={() => setOpen(true)}>
|
|
24
|
-
<LayoutGrid className="h-4 w-4 mr-2" />
|
|
25
|
-
Módulos
|
|
26
|
-
</Button>
|
|
27
|
-
|
|
28
|
-
<ModulesDialog
|
|
29
|
-
open={open}
|
|
30
|
-
onOpenChange={setOpen}
|
|
31
|
-
onModuleClick={(module) => console.log(module)}
|
|
32
|
-
/>
|
|
33
|
-
</>
|
|
34
|
-
);
|
|
14
|
+
import { useState } from 'react';
|
|
15
|
+
import { Button, ModulesDialog } from 'forlogic-core';
|
|
16
|
+
import { LayoutGrid } from 'lucide-react';
|
|
17
|
+
|
|
18
|
+
function App() {
|
|
19
|
+
const [open, setOpen] = useState(false);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<>
|
|
23
|
+
<Button onClick={() => setOpen(true)}>
|
|
24
|
+
<LayoutGrid className="h-4 w-4 mr-2" />
|
|
25
|
+
Módulos
|
|
26
|
+
</Button>
|
|
27
|
+
|
|
28
|
+
<ModulesDialog
|
|
29
|
+
open={open}
|
|
30
|
+
onOpenChange={setOpen}
|
|
31
|
+
onModuleClick={(module) => console.log(module)}
|
|
32
|
+
/>
|
|
33
|
+
</>
|
|
34
|
+
);
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
@@ -47,11 +47,11 @@ function App() {
|
|
|
47
47
|
**Acessibilidade:**
|
|
48
48
|
- Dialog acessível com role=
|
|
49
49
|
- e aria-modal=
|
|
50
|
-
- ,
|
|
50
|
+
- ,
|
|
51
51
|
|
|
52
|
-
- ,
|
|
52
|
+
- ,
|
|
53
53
|
|
|
54
|
-
- ,
|
|
54
|
+
- ,
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
**Notas:**
|
|
@@ -61,7 +61,7 @@ function App() {
|
|
|
61
61
|
- Grid Responsivo: 4 colunas em XL, 3 em MD, 2 em base
|
|
62
62
|
- Cards no Rodapé: Forlogic Educa, Saber Gestão e Wiki
|
|
63
63
|
|
|
64
|
-
> Fonte: `src
|
|
64
|
+
> Fonte: `src/design-system/docs/components/ModulesDialogDoc.tsx`
|
|
65
65
|
|
|
66
66
|
---
|
|
67
67
|
|
|
@@ -71,13 +71,13 @@ Exibe uma mensagem de destaque para chamar a atenção do usuário. O componente
|
|
|
71
71
|
|
|
72
72
|
**Uso:**
|
|
73
73
|
```tsx
|
|
74
|
-
import { Alert, AlertDescription, AlertTitle } from "forlogic-core"
|
|
75
|
-
|
|
76
|
-
<Alert variant="info">
|
|
77
|
-
<AlertTitle>Informação</AlertTitle>
|
|
78
|
-
<AlertDescription>
|
|
79
|
-
Esta é uma mensagem informativa para o usuário.
|
|
80
|
-
</AlertDescription>
|
|
74
|
+
import { Alert, AlertDescription, AlertTitle } from "forlogic-core"
|
|
75
|
+
|
|
76
|
+
<Alert variant="info">
|
|
77
|
+
<AlertTitle>Informação</AlertTitle>
|
|
78
|
+
<AlertDescription>
|
|
79
|
+
Esta é uma mensagem informativa para o usuário.
|
|
80
|
+
</AlertDescription>
|
|
81
81
|
</Alert>
|
|
82
82
|
```
|
|
83
83
|
|
|
@@ -111,7 +111,7 @@ import { Alert, AlertDescription, AlertTitle } from "forlogic-core"
|
|
|
111
111
|
- Estrutura HTML semântica com título e descrição claramente definidos
|
|
112
112
|
- Contraste de cores adequado para acessibilidade visual
|
|
113
113
|
|
|
114
|
-
> Fonte: `src
|
|
114
|
+
> Fonte: `src/design-system/docs/components/AlertDoc.tsx`
|
|
115
115
|
|
|
116
116
|
---
|
|
117
117
|
|
|
@@ -121,19 +121,19 @@ Exibe um card com cabeçalho, conteúdo e rodapé.
|
|
|
121
121
|
|
|
122
122
|
**Uso:**
|
|
123
123
|
```tsx
|
|
124
|
-
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "forlogic-core"
|
|
125
|
-
|
|
126
|
-
<Card>
|
|
127
|
-
<CardHeader>
|
|
128
|
-
<CardTitle>Card Title</CardTitle>
|
|
129
|
-
<CardDescription>Card Description</CardDescription>
|
|
130
|
-
</CardHeader>
|
|
131
|
-
<CardContent>
|
|
132
|
-
<p>Card Content</p>
|
|
133
|
-
</CardContent>
|
|
134
|
-
<CardFooter>
|
|
135
|
-
<p>Card Footer</p>
|
|
136
|
-
</CardFooter>
|
|
124
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "forlogic-core"
|
|
125
|
+
|
|
126
|
+
<Card>
|
|
127
|
+
<CardHeader>
|
|
128
|
+
<CardTitle>Card Title</CardTitle>
|
|
129
|
+
<CardDescription>Card Description</CardDescription>
|
|
130
|
+
</CardHeader>
|
|
131
|
+
<CardContent>
|
|
132
|
+
<p>Card Content</p>
|
|
133
|
+
</CardContent>
|
|
134
|
+
<CardFooter>
|
|
135
|
+
<p>Card Footer</p>
|
|
136
|
+
</CardFooter>
|
|
137
137
|
</Card>
|
|
138
138
|
```
|
|
139
139
|
|
|
@@ -148,7 +148,7 @@ import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter }
|
|
|
148
148
|
- Contraste de cores acessível
|
|
149
149
|
- Funciona com leitores de tela
|
|
150
150
|
|
|
151
|
-
> Fonte: `src
|
|
151
|
+
> Fonte: `src/design-system/docs/components/CardDoc.tsx`
|
|
152
152
|
|
|
153
153
|
---
|
|
154
154
|
|
|
@@ -158,51 +158,51 @@ Exibe conteúdo rico em um portal, acionado por um botão.
|
|
|
158
158
|
|
|
159
159
|
**Uso:**
|
|
160
160
|
```tsx
|
|
161
|
-
import {
|
|
162
|
-
Popover,
|
|
163
|
-
PopoverContent,
|
|
164
|
-
PopoverTrigger,
|
|
165
|
-
Button,
|
|
166
|
-
Input,
|
|
167
|
-
Label
|
|
168
|
-
} from 'forlogic-core';
|
|
169
|
-
|
|
170
|
-
function DimensionsPopover() {
|
|
171
|
-
return (
|
|
172
|
-
<Popover>
|
|
173
|
-
<PopoverTrigger asChild>
|
|
174
|
-
<Button variant="outline">Abrir popover</Button>
|
|
175
|
-
</PopoverTrigger>
|
|
176
|
-
<PopoverContent className="w-80">
|
|
177
|
-
<div className="grid gap-4">
|
|
178
|
-
<div className="space-y-2">
|
|
179
|
-
<h4 className="font-medium leading-none">Dimensões</h4>
|
|
180
|
-
<p className="text-sm text-muted-foreground">
|
|
181
|
-
Defina as dimensões para a camada.
|
|
182
|
-
</p>
|
|
183
|
-
</div>
|
|
184
|
-
<div className="grid gap-2">
|
|
185
|
-
<div className="grid grid-cols-3 items-center gap-4">
|
|
186
|
-
<Label htmlFor="width">Largura</Label>
|
|
187
|
-
<Input id="width" defaultValue="100%" className="col-span-2 h-8" />
|
|
188
|
-
</div>
|
|
189
|
-
<div className="grid grid-cols-3 items-center gap-4">
|
|
190
|
-
<Label htmlFor="maxWidth">Máx. largura</Label>
|
|
191
|
-
<Input id="maxWidth" defaultValue="300px" className="col-span-2 h-8" />
|
|
192
|
-
</div>
|
|
193
|
-
<div className="grid grid-cols-3 items-center gap-4">
|
|
194
|
-
<Label htmlFor="height">Altura</Label>
|
|
195
|
-
<Input id="height" defaultValue="25px" className="col-span-2 h-8" />
|
|
196
|
-
</div>
|
|
197
|
-
<div className="grid grid-cols-3 items-center gap-4">
|
|
198
|
-
<Label htmlFor="maxHeight">Máx. altura</Label>
|
|
199
|
-
<Input id="maxHeight" defaultValue="none" className="col-span-2 h-8" />
|
|
200
|
-
</div>
|
|
201
|
-
</div>
|
|
202
|
-
</div>
|
|
203
|
-
</PopoverContent>
|
|
204
|
-
</Popover>
|
|
205
|
-
);
|
|
161
|
+
import {
|
|
162
|
+
Popover,
|
|
163
|
+
PopoverContent,
|
|
164
|
+
PopoverTrigger,
|
|
165
|
+
Button,
|
|
166
|
+
Input,
|
|
167
|
+
Label
|
|
168
|
+
} from 'forlogic-core';
|
|
169
|
+
|
|
170
|
+
function DimensionsPopover() {
|
|
171
|
+
return (
|
|
172
|
+
<Popover>
|
|
173
|
+
<PopoverTrigger asChild>
|
|
174
|
+
<Button variant="outline">Abrir popover</Button>
|
|
175
|
+
</PopoverTrigger>
|
|
176
|
+
<PopoverContent className="w-80">
|
|
177
|
+
<div className="grid gap-4">
|
|
178
|
+
<div className="space-y-2">
|
|
179
|
+
<h4 className="font-medium leading-none">Dimensões</h4>
|
|
180
|
+
<p className="text-sm text-muted-foreground">
|
|
181
|
+
Defina as dimensões para a camada.
|
|
182
|
+
</p>
|
|
183
|
+
</div>
|
|
184
|
+
<div className="grid gap-2">
|
|
185
|
+
<div className="grid grid-cols-3 items-center gap-4">
|
|
186
|
+
<Label htmlFor="width">Largura</Label>
|
|
187
|
+
<Input id="width" defaultValue="100%" className="col-span-2 h-8" />
|
|
188
|
+
</div>
|
|
189
|
+
<div className="grid grid-cols-3 items-center gap-4">
|
|
190
|
+
<Label htmlFor="maxWidth">Máx. largura</Label>
|
|
191
|
+
<Input id="maxWidth" defaultValue="300px" className="col-span-2 h-8" />
|
|
192
|
+
</div>
|
|
193
|
+
<div className="grid grid-cols-3 items-center gap-4">
|
|
194
|
+
<Label htmlFor="height">Altura</Label>
|
|
195
|
+
<Input id="height" defaultValue="25px" className="col-span-2 h-8" />
|
|
196
|
+
</div>
|
|
197
|
+
<div className="grid grid-cols-3 items-center gap-4">
|
|
198
|
+
<Label htmlFor="maxHeight">Máx. altura</Label>
|
|
199
|
+
<Input id="maxHeight" defaultValue="none" className="col-span-2 h-8" />
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
</PopoverContent>
|
|
204
|
+
</Popover>
|
|
205
|
+
);
|
|
206
206
|
}
|
|
207
207
|
```
|
|
208
208
|
|
|
@@ -237,7 +237,7 @@ function DimensionsPopover() {
|
|
|
237
237
|
- O prop asChild permite usar qualquer elemento como trigger.
|
|
238
238
|
- Combine com formulários para edição inline de campos.
|
|
239
239
|
|
|
240
|
-
> Fonte: `src
|
|
240
|
+
> Fonte: `src/design-system/docs/components/PopoverDoc.tsx`
|
|
241
241
|
|
|
242
242
|
---
|
|
243
243
|
|
|
@@ -247,22 +247,22 @@ Um popup que exibe informações relacionadas a um elemento quando o elemento re
|
|
|
247
247
|
|
|
248
248
|
**Uso:**
|
|
249
249
|
```tsx
|
|
250
|
-
import {
|
|
251
|
-
Tooltip,
|
|
252
|
-
TooltipContent,
|
|
253
|
-
TooltipProvider,
|
|
254
|
-
TooltipTrigger,
|
|
255
|
-
} from 'forlogic-core';
|
|
256
|
-
|
|
257
|
-
<TooltipProvider>
|
|
258
|
-
<Tooltip>
|
|
259
|
-
<TooltipTrigger asChild>
|
|
260
|
-
<Button variant="outline">Hover</Button>
|
|
261
|
-
</TooltipTrigger>
|
|
262
|
-
<TooltipContent>
|
|
263
|
-
<p>Adicionar à biblioteca</p>
|
|
264
|
-
</TooltipContent>
|
|
265
|
-
</Tooltip>
|
|
250
|
+
import {
|
|
251
|
+
Tooltip,
|
|
252
|
+
TooltipContent,
|
|
253
|
+
TooltipProvider,
|
|
254
|
+
TooltipTrigger,
|
|
255
|
+
} from 'forlogic-core';
|
|
256
|
+
|
|
257
|
+
<TooltipProvider>
|
|
258
|
+
<Tooltip>
|
|
259
|
+
<TooltipTrigger asChild>
|
|
260
|
+
<Button variant="outline">Hover</Button>
|
|
261
|
+
</TooltipTrigger>
|
|
262
|
+
<TooltipContent>
|
|
263
|
+
<p>Adicionar à biblioteca</p>
|
|
264
|
+
</TooltipContent>
|
|
265
|
+
</Tooltip>
|
|
266
266
|
</TooltipProvider>
|
|
267
267
|
```
|
|
268
268
|
|
|
@@ -280,30 +280,30 @@ import {
|
|
|
280
280
|
|
|
281
281
|
**Exemplos:**
|
|
282
282
|
```tsx
|
|
283
|
-
<TooltipProvider>
|
|
284
|
-
<Tooltip>
|
|
285
|
-
<TooltipTrigger asChild>
|
|
283
|
+
<TooltipProvider>
|
|
284
|
+
<Tooltip>
|
|
285
|
+
<TooltipTrigger asChild>
|
|
286
286
|
<Info className=
|
|
287
287
|
```
|
|
288
288
|
```tsx
|
|
289
289
|
<TooltipContent side=
|
|
290
290
|
```
|
|
291
291
|
```tsx
|
|
292
|
-
// Sem delay
|
|
293
|
-
<TooltipProvider delayDuration={0}>
|
|
294
|
-
<Tooltip>...</Tooltip>
|
|
295
|
-
</TooltipProvider>
|
|
296
|
-
|
|
297
|
-
// Delay de 1 segundo
|
|
298
|
-
<TooltipProvider delayDuration={1000}>
|
|
299
|
-
<Tooltip>...</Tooltip>
|
|
292
|
+
// Sem delay
|
|
293
|
+
<TooltipProvider delayDuration={0}>
|
|
294
|
+
<Tooltip>...</Tooltip>
|
|
295
|
+
</TooltipProvider>
|
|
296
|
+
|
|
297
|
+
// Delay de 1 segundo
|
|
298
|
+
<TooltipProvider delayDuration={1000}>
|
|
299
|
+
<Tooltip>...</Tooltip>
|
|
300
300
|
</TooltipProvider>
|
|
301
301
|
```
|
|
302
302
|
```tsx
|
|
303
|
-
// Provider compartilhado - mover entre tooltips é instantâneo
|
|
304
|
-
<TooltipProvider delayDuration={100} skipDelayDuration={0}>
|
|
305
|
-
<Tooltip>
|
|
306
|
-
<TooltipTrigger asChild>
|
|
303
|
+
// Provider compartilhado - mover entre tooltips é instantâneo
|
|
304
|
+
<TooltipProvider delayDuration={100} skipDelayDuration={0}>
|
|
305
|
+
<Tooltip>
|
|
306
|
+
<TooltipTrigger asChild>
|
|
307
307
|
<Button variant=
|
|
308
308
|
```
|
|
309
309
|
```tsx
|
|
@@ -325,7 +325,7 @@ import {
|
|
|
325
325
|
- Combine com ícones de informação para ajuda contextual
|
|
326
326
|
- Use delayDuration={0} para exibição instantânea quando necessário
|
|
327
327
|
|
|
328
|
-
> Fonte: `src
|
|
328
|
+
> Fonte: `src/design-system/docs/components/TooltipDoc.tsx`
|
|
329
329
|
|
|
330
330
|
---
|
|
331
331
|
|
|
@@ -335,30 +335,30 @@ Módulo completo para upload, edição e renderização de imagens e vídeos. In
|
|
|
335
335
|
|
|
336
336
|
**Uso:**
|
|
337
337
|
```tsx
|
|
338
|
-
// Exemplo básico de upload de imagem
|
|
339
|
-
const { upload, uploading, progress } = useMediaUpload({
|
|
340
|
-
uploadFunction: async (file, options) => {
|
|
341
|
-
// Implementação do upload para seu storage
|
|
342
|
-
const url = await uploadToStorage(file, options);
|
|
343
|
-
return { url, path: file.name };
|
|
344
|
-
}
|
|
345
|
-
});
|
|
346
|
-
|
|
347
|
-
// Renderizar uma imagem
|
|
348
|
-
<ImageRenderer
|
|
349
|
-
content={{
|
|
350
|
-
imageUrl: 'https://example.com/image.jpg',
|
|
351
|
-
caption: 'Legenda da imagem',
|
|
352
|
-
alignment: 'center'
|
|
353
|
-
}}
|
|
354
|
-
/>
|
|
355
|
-
|
|
356
|
-
// Renderizar um vídeo
|
|
357
|
-
<VideoRenderer
|
|
358
|
-
content={{
|
|
359
|
-
videoUrl: 'https://youtube.com/watch?v=...',
|
|
360
|
-
controls: true
|
|
361
|
-
}}
|
|
338
|
+
// Exemplo básico de upload de imagem
|
|
339
|
+
const { upload, uploading, progress } = useMediaUpload({
|
|
340
|
+
uploadFunction: async (file, options) => {
|
|
341
|
+
// Implementação do upload para seu storage
|
|
342
|
+
const url = await uploadToStorage(file, options);
|
|
343
|
+
return { url, path: file.name };
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
// Renderizar uma imagem
|
|
348
|
+
<ImageRenderer
|
|
349
|
+
content={{
|
|
350
|
+
imageUrl: 'https://example.com/image.jpg',
|
|
351
|
+
caption: 'Legenda da imagem',
|
|
352
|
+
alignment: 'center'
|
|
353
|
+
}}
|
|
354
|
+
/>
|
|
355
|
+
|
|
356
|
+
// Renderizar um vídeo
|
|
357
|
+
<VideoRenderer
|
|
358
|
+
content={{
|
|
359
|
+
videoUrl: 'https://youtube.com/watch?v=...',
|
|
360
|
+
controls: true
|
|
361
|
+
}}
|
|
362
362
|
/>
|
|
363
363
|
```
|
|
364
364
|
|
|
@@ -401,7 +401,7 @@ import { useMediaUpload, getSupabaseClient } from
|
|
|
401
401
|
- O módulo não inclui implementação de storage - use Supabase, S3, etc.
|
|
402
402
|
- Helpers de imagem usam Canvas API para compressão e resize
|
|
403
403
|
|
|
404
|
-
> Fonte: `src
|
|
404
|
+
> Fonte: `src/design-system/docs/components/MediaDoc.tsx`
|
|
405
405
|
|
|
406
406
|
---
|
|
407
407
|
|
|
@@ -411,27 +411,27 @@ Dialog para navegação entre módulos do sistema.
|
|
|
411
411
|
|
|
412
412
|
**Uso:**
|
|
413
413
|
```tsx
|
|
414
|
-
import { useState } from 'react';
|
|
415
|
-
import { Button, ModulesDialog } from 'forlogic-core';
|
|
416
|
-
import { LayoutGrid } from 'lucide-react';
|
|
417
|
-
|
|
418
|
-
function App() {
|
|
419
|
-
const [open, setOpen] = useState(false);
|
|
420
|
-
|
|
421
|
-
return (
|
|
422
|
-
<>
|
|
423
|
-
<Button onClick={() => setOpen(true)}>
|
|
424
|
-
<LayoutGrid className="h-4 w-4 mr-2" />
|
|
425
|
-
Módulos
|
|
426
|
-
</Button>
|
|
427
|
-
|
|
428
|
-
<ModulesDialog
|
|
429
|
-
open={open}
|
|
430
|
-
onOpenChange={setOpen}
|
|
431
|
-
onModuleClick={(module) => console.log(module)}
|
|
432
|
-
/>
|
|
433
|
-
</>
|
|
434
|
-
);
|
|
414
|
+
import { useState } from 'react';
|
|
415
|
+
import { Button, ModulesDialog } from 'forlogic-core';
|
|
416
|
+
import { LayoutGrid } from 'lucide-react';
|
|
417
|
+
|
|
418
|
+
function App() {
|
|
419
|
+
const [open, setOpen] = useState(false);
|
|
420
|
+
|
|
421
|
+
return (
|
|
422
|
+
<>
|
|
423
|
+
<Button onClick={() => setOpen(true)}>
|
|
424
|
+
<LayoutGrid className="h-4 w-4 mr-2" />
|
|
425
|
+
Módulos
|
|
426
|
+
</Button>
|
|
427
|
+
|
|
428
|
+
<ModulesDialog
|
|
429
|
+
open={open}
|
|
430
|
+
onOpenChange={setOpen}
|
|
431
|
+
onModuleClick={(module) => console.log(module)}
|
|
432
|
+
/>
|
|
433
|
+
</>
|
|
434
|
+
);
|
|
435
435
|
}
|
|
436
436
|
```
|
|
437
437
|
|
|
@@ -447,11 +447,11 @@ function App() {
|
|
|
447
447
|
**Acessibilidade:**
|
|
448
448
|
- Dialog acessível com role=
|
|
449
449
|
- e aria-modal=
|
|
450
|
-
- ,
|
|
450
|
+
- ,
|
|
451
451
|
|
|
452
|
-
- ,
|
|
452
|
+
- ,
|
|
453
453
|
|
|
454
|
-
- ,
|
|
454
|
+
- ,
|
|
455
455
|
|
|
456
456
|
|
|
457
457
|
**Notas:**
|
|
@@ -461,7 +461,7 @@ function App() {
|
|
|
461
461
|
- Grid Responsivo: 4 colunas em XL, 3 em MD, 2 em base
|
|
462
462
|
- Cards no Rodapé: Forlogic Educa, Saber Gestão e Wiki
|
|
463
463
|
|
|
464
|
-
> Fonte: `src
|
|
464
|
+
> Fonte: `src/design-system/docs/components/ModulesDialogDoc.tsx`
|
|
465
465
|
|
|
466
466
|
---
|
|
467
467
|
|
|
@@ -471,41 +471,41 @@ Componente para fluxos de onboarding em múltiplos passos. Suporta imagens está
|
|
|
471
471
|
|
|
472
472
|
**Uso:**
|
|
473
473
|
```tsx
|
|
474
|
-
import { useState } from "react";
|
|
475
|
-
import { OnboardingDialog, OnboardingStep, Button } from "forlogic-core";
|
|
476
|
-
|
|
477
|
-
function App() {
|
|
478
|
-
const [open, setOpen] = useState(false);
|
|
479
|
-
|
|
480
|
-
const steps: OnboardingStep[] = [
|
|
481
|
-
{
|
|
482
|
-
id: "welcome",
|
|
483
|
-
title: "Bem-vindo ao Sistema",
|
|
484
|
-
description: "Neste espaço, você irá adicionar o texto que explica o processo de onboarding.",
|
|
485
|
-
},
|
|
486
|
-
{
|
|
487
|
-
id: "features",
|
|
488
|
-
title: "Conheça as Funcionalidades",
|
|
489
|
-
description: "Descubra todas as ferramentas disponíveis para você.",
|
|
490
|
-
},
|
|
491
|
-
{
|
|
492
|
-
id: "start",
|
|
493
|
-
title: "Comece Agora",
|
|
494
|
-
description: "Você está pronto para começar a usar o sistema!",
|
|
495
|
-
},
|
|
496
|
-
];
|
|
497
|
-
|
|
498
|
-
return (
|
|
499
|
-
<>
|
|
500
|
-
<Button onClick={() => setOpen(true)}>Iniciar Onboarding</Button>
|
|
501
|
-
<OnboardingDialog
|
|
502
|
-
open={open}
|
|
503
|
-
onOpenChange={setOpen}
|
|
504
|
-
steps={steps}
|
|
505
|
-
onComplete={() => console.log("Onboarding concluído!")}
|
|
506
|
-
/>
|
|
507
|
-
</>
|
|
508
|
-
);
|
|
474
|
+
import { useState } from "react";
|
|
475
|
+
import { OnboardingDialog, OnboardingStep, Button } from "forlogic-core";
|
|
476
|
+
|
|
477
|
+
function App() {
|
|
478
|
+
const [open, setOpen] = useState(false);
|
|
479
|
+
|
|
480
|
+
const steps: OnboardingStep[] = [
|
|
481
|
+
{
|
|
482
|
+
id: "welcome",
|
|
483
|
+
title: "Bem-vindo ao Sistema",
|
|
484
|
+
description: "Neste espaço, você irá adicionar o texto que explica o processo de onboarding.",
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
id: "features",
|
|
488
|
+
title: "Conheça as Funcionalidades",
|
|
489
|
+
description: "Descubra todas as ferramentas disponíveis para você.",
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
id: "start",
|
|
493
|
+
title: "Comece Agora",
|
|
494
|
+
description: "Você está pronto para começar a usar o sistema!",
|
|
495
|
+
},
|
|
496
|
+
];
|
|
497
|
+
|
|
498
|
+
return (
|
|
499
|
+
<>
|
|
500
|
+
<Button onClick={() => setOpen(true)}>Iniciar Onboarding</Button>
|
|
501
|
+
<OnboardingDialog
|
|
502
|
+
open={open}
|
|
503
|
+
onOpenChange={setOpen}
|
|
504
|
+
steps={steps}
|
|
505
|
+
onComplete={() => console.log("Onboarding concluído!")}
|
|
506
|
+
/>
|
|
507
|
+
</>
|
|
508
|
+
);
|
|
509
509
|
}
|
|
510
510
|
```
|
|
511
511
|
|
|
@@ -529,7 +529,7 @@ function App() {
|
|
|
529
529
|
- O botão
|
|
530
530
|
- só aparece a partir do segundo step.
|
|
531
531
|
|
|
532
|
-
> Fonte: `src
|
|
532
|
+
> Fonte: `src/design-system/docs/components/OnboardingDialogDoc.tsx`
|
|
533
533
|
|
|
534
534
|
---
|
|
535
535
|
|
|
@@ -577,7 +577,7 @@ import { TermsOfUseDialog, TermsOfUseViewer } from 'forlogic-core';
|
|
|
577
577
|
**Notas:**
|
|
578
578
|
- TermsOfUseViewer oculta botão automaticamente quando hasUserSignature=true
|
|
579
579
|
|
|
580
|
-
> Fonte: `src
|
|
580
|
+
> Fonte: `src/design-system/docs/components/TermsOfUseDoc.tsx`
|
|
581
581
|
|
|
582
582
|
---
|
|
583
583
|
|