forlogic-core 2.1.5 → 2.2.1

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.
Files changed (196) hide show
  1. package/README.md +53 -1
  2. package/dist/action-plans/components/ActionPlanAttachmentsTab.d.ts +3 -0
  3. package/dist/action-plans/components/ActionPlanCommentsTab.d.ts +3 -0
  4. package/dist/action-plans/components/ActionPlanCostTab.d.ts +5 -0
  5. package/dist/action-plans/components/ActionPlanGeneralTab.d.ts +3 -0
  6. package/dist/action-plans/components/ActionPlanHistoryTab.d.ts +3 -0
  7. package/dist/action-plans/components/ActionPlanPredecessorsTab.d.ts +5 -0
  8. package/dist/action-plans/components/ActionPlanProgressDialog.d.ts +3 -0
  9. package/dist/action-plans/components/ActionPlanProgressTab.d.ts +5 -0
  10. package/dist/action-plans/components/ActionPlanStatusBadge.d.ts +3 -0
  11. package/dist/action-plans/constants.d.ts +24 -0
  12. package/dist/action-plans/hooks/useActionPlan.d.ts +5 -0
  13. package/dist/action-plans/hooks/useActionPlanProgress.d.ts +5 -0
  14. package/dist/action-plans/types.d.ts +60 -0
  15. package/dist/action-plans/utils/formatTime.d.ts +9 -0
  16. package/dist/audit-trail/components/AuditTrailDetails.d.ts +10 -0
  17. package/dist/audit-trail/components/AuditTrailFilter.d.ts +10 -0
  18. package/dist/audit-trail/components/AuditTrailPage.d.ts +10 -0
  19. package/dist/audit-trail/types.d.ts +58 -0
  20. package/dist/audit-trail/utils.d.ts +18 -2
  21. package/dist/auth/components/EditProfileDialog.d.ts +1 -0
  22. package/dist/auth/components/ProtectedRoute.d.ts +5 -0
  23. package/dist/auth/contexts/AuthContext.d.ts +5 -0
  24. package/dist/auth/pages/CallbackPage.d.ts +5 -0
  25. package/dist/auth/services/AuthService.d.ts +5 -0
  26. package/dist/auth/services/TokenManager.d.ts +5 -0
  27. package/dist/auth/services/TokenService.d.ts +10 -0
  28. package/dist/auth/utils/ErrorInterceptor.d.ts +5 -0
  29. package/dist/components/dashboards/dashboard-form.d.ts +15 -0
  30. package/dist/components/dashboards/dashboard-general-view.d.ts +15 -0
  31. package/dist/components/dashboards/dashboard-grid.d.ts +25 -0
  32. package/dist/components/dashboards/dashboard-list.d.ts +10 -0
  33. package/dist/components/dashboards/dashboard-panel-renderer.d.ts +10 -0
  34. package/dist/components/dashboards/dashboard-view.d.ts +10 -0
  35. package/dist/components/dashboards/helpers.d.ts +44 -5
  36. package/dist/components/dashboards/panels/burndown-panel.d.ts +15 -0
  37. package/dist/components/dashboards/panels/cartesian-panel.d.ts +20 -0
  38. package/dist/components/dashboards/panels/list-panel.d.ts +15 -0
  39. package/dist/components/dashboards/panels/matrix-risk-panel.d.ts +25 -0
  40. package/dist/components/dashboards/panels/numeric-panel.d.ts +10 -0
  41. package/dist/components/dashboards/panels/panel-error.d.ts +10 -0
  42. package/dist/components/dashboards/panels/panel-header.d.ts +10 -0
  43. package/dist/components/dashboards/panels/panel-loader.d.ts +10 -0
  44. package/dist/components/dashboards/panels/panel-no-data.d.ts +10 -0
  45. package/dist/components/dashboards/panels/panel-unavailable.d.ts +10 -0
  46. package/dist/components/dashboards/panels/pareto-panel.d.ts +10 -0
  47. package/dist/components/dashboards/panels/performance-panel.d.ts +15 -0
  48. package/dist/components/dashboards/panels/pie-panel.d.ts +10 -0
  49. package/dist/components/dashboards/panels/text-panel.d.ts +10 -0
  50. package/dist/components/dashboards/types.d.ts +230 -0
  51. package/dist/components/modules/AccessDeniedDialog.d.ts +3 -1
  52. package/dist/components/modules/ModuleAccessGuard.d.ts +3 -1
  53. package/dist/components/modules/ModulesContent.d.ts +3 -1
  54. package/dist/components/modules/ModulesDialog.d.ts +1 -1
  55. package/dist/components/modules/ModulesFooterCards.d.ts +3 -1
  56. package/dist/components/modules/types.d.ts +2 -0
  57. package/dist/components/ui/accordion.d.ts +35 -0
  58. package/dist/components/ui/action-button.d.ts +5 -0
  59. package/dist/components/ui/alert-dialog.d.ts +82 -0
  60. package/dist/components/ui/alert.d.ts +32 -0
  61. package/dist/components/ui/avatar.d.ts +30 -0
  62. package/dist/components/ui/badge.d.ts +32 -0
  63. package/dist/components/ui/breadcrumb.d.ts +54 -0
  64. package/dist/components/ui/button-group.d.ts +15 -0
  65. package/dist/components/ui/button.d.ts +55 -0
  66. package/dist/components/ui/calendar.d.ts +16 -0
  67. package/dist/components/ui/card.d.ts +49 -0
  68. package/dist/components/ui/chart.d.ts +35 -0
  69. package/dist/components/ui/checkbox.d.ts +11 -0
  70. package/dist/components/ui/collapsible.d.ts +15 -0
  71. package/dist/components/ui/color-picker.d.ts +5 -0
  72. package/dist/components/ui/combo-tree.d.ts +23 -0
  73. package/dist/components/ui/combobox.d.ts +28 -0
  74. package/dist/components/ui/command.d.ts +66 -0
  75. package/dist/components/ui/context-menu.d.ts +95 -0
  76. package/dist/components/ui/date-picker.d.ts +10 -0
  77. package/dist/components/ui/dialog-wizard.d.ts +22 -4
  78. package/dist/components/ui/dialog.d.ts +181 -0
  79. package/dist/components/ui/drawer.d.ts +72 -0
  80. package/dist/components/ui/dropdown-menu.d.ts +153 -0
  81. package/dist/components/ui/electronic-signature-dialog.d.ts +10 -0
  82. package/dist/components/ui/export-dialog.d.ts +20 -0
  83. package/dist/components/ui/form.d.ts +96 -0
  84. package/dist/components/ui/hover-card.d.ts +15 -0
  85. package/dist/components/ui/icon-picker.d.ts +5 -0
  86. package/dist/components/ui/iframe-dialog.d.ts +10 -0
  87. package/dist/components/ui/input-group.d.ts +16 -0
  88. package/dist/components/ui/input.d.ts +5 -0
  89. package/dist/components/ui/menubar.d.ts +80 -0
  90. package/dist/components/ui/multiselect-permissions.d.ts +25 -0
  91. package/dist/components/ui/navigation-menu.d.ts +45 -0
  92. package/dist/components/ui/onboarding-dialog.d.ts +15 -0
  93. package/dist/components/ui/online-editor-dialog.d.ts +10 -0
  94. package/dist/components/ui/pagination.d.ts +53 -0
  95. package/dist/components/ui/popover.d.ts +8 -0
  96. package/dist/components/ui/radio-group.d.ts +3 -0
  97. package/dist/components/ui/report-request-list.d.ts +20 -0
  98. package/dist/components/ui/resizable.d.ts +15 -0
  99. package/dist/components/ui/rich-text-editor.d.ts +13 -0
  100. package/dist/components/ui/scroll-area.d.ts +3 -0
  101. package/dist/components/ui/select.d.ts +71 -0
  102. package/dist/components/ui/separator.d.ts +13 -0
  103. package/dist/components/ui/sheet.d.ts +76 -0
  104. package/dist/components/ui/sidebar.d.ts +203 -0
  105. package/dist/components/ui/skeleton-variants.d.ts +25 -0
  106. package/dist/components/ui/skeleton.d.ts +12 -0
  107. package/dist/components/ui/slider.d.ts +5 -0
  108. package/dist/components/ui/sonner.d.ts +5 -0
  109. package/dist/components/ui/spinner.d.ts +5 -0
  110. package/dist/components/ui/split-button.d.ts +6 -0
  111. package/dist/components/ui/stack.d.ts +5 -0
  112. package/dist/components/ui/status-badge.d.ts +3 -0
  113. package/dist/components/ui/step-selector.d.ts +5 -0
  114. package/dist/components/ui/stimulsoft-viewer.d.ts +8 -0
  115. package/dist/components/ui/switch.d.ts +21 -0
  116. package/dist/components/ui/tab-page-layout.d.ts +33 -0
  117. package/dist/components/ui/table-resize-handle.d.ts +10 -3
  118. package/dist/components/ui/table.d.ts +102 -0
  119. package/dist/components/ui/tabs.d.ts +59 -0
  120. package/dist/components/ui/terms-of-use-dialog.d.ts +50 -4
  121. package/dist/components/ui/textarea.d.ts +27 -0
  122. package/dist/components/ui/timepicker.d.ts +23 -0
  123. package/dist/components/ui/toggle-group.d.ts +25 -0
  124. package/dist/components/ui/toggle.d.ts +21 -0
  125. package/dist/components/ui/tooltip.d.ts +55 -1
  126. package/dist/components/ui/truncated-cell.d.ts +13 -0
  127. package/dist/components/ui/typography.d.ts +119 -0
  128. package/dist/components/ui/updates-notification.d.ts +33 -0
  129. package/dist/components/ui/users-groups-selector.d.ts +43 -0
  130. package/dist/components/ui/viewer-dialog.d.ts +107 -0
  131. package/dist/crud/components/ActionMenuItems.d.ts +5 -0
  132. package/dist/crud/components/BaseForm.d.ts +46 -0
  133. package/dist/crud/components/ColumnSettingsPopover.d.ts +10 -0
  134. package/dist/crud/components/CrudActionBar.d.ts +20 -0
  135. package/dist/crud/components/CrudGrid.d.ts +10 -0
  136. package/dist/crud/components/CrudPagination.d.ts +5 -0
  137. package/dist/crud/components/CrudTable.d.ts +5 -0
  138. package/dist/crud/components/TableRowActions.d.ts +5 -0
  139. package/dist/crud/createCrudPage.d.ts +41 -8
  140. package/dist/crud/generateCrudConfig.d.ts +13 -8
  141. package/dist/crud/hooks/useBaseForm.d.ts +39 -0
  142. package/dist/crud/hooks/useColumnManager.d.ts +25 -0
  143. package/dist/crud/hooks/useCrud.d.ts +35 -0
  144. package/dist/crud/primitives/ActionMenu.d.ts +41 -0
  145. package/dist/crud/primitives/FilterBar.d.ts +45 -0
  146. package/dist/crud/primitives/Pagination.d.ts +5 -0
  147. package/dist/crud/primitives/Table.d.ts +5 -0
  148. package/dist/crud/primitives/TreeTable.d.ts +5 -0
  149. package/dist/crud/primitives/types.d.ts +57 -0
  150. package/dist/crud/utils/routingHelpers.d.ts +11 -0
  151. package/dist/custom-form-fields/components/CustomFormFields.d.ts +3 -0
  152. package/dist/custom-form-fields/fields/FormDateField.d.ts +3 -0
  153. package/dist/custom-form-fields/fields/FormMultiSelectionField.d.ts +3 -0
  154. package/dist/custom-form-fields/fields/FormNumericField.d.ts +3 -0
  155. package/dist/custom-form-fields/fields/FormQuestionsField.d.ts +3 -0
  156. package/dist/custom-form-fields/fields/FormSingleSelectionField.d.ts +3 -0
  157. package/dist/custom-form-fields/fields/FormTextField.d.ts +3 -0
  158. package/dist/custom-form-fields/fields/FormTimeField.d.ts +3 -0
  159. package/dist/custom-form-fields/fields/FormUrlField.d.ts +3 -0
  160. package/dist/custom-form-fields/fields/ReadOnlyTextField.d.ts +3 -0
  161. package/dist/custom-form-fields/types.d.ts +84 -21
  162. package/dist/exports/integrations.d.ts +1 -0
  163. package/dist/file-upload/components/SingleFileUpload.d.ts +59 -0
  164. package/dist/file-upload/types.d.ts +15 -0
  165. package/dist/file-upload/utils/formatBytes.d.ts +5 -0
  166. package/dist/file-upload/utils/getFileExtension.d.ts +5 -0
  167. package/dist/hooks/useColumnResize.d.ts +24 -0
  168. package/dist/hooks/useRowResize.d.ts +18 -0
  169. package/dist/hooks/useSidebarResize.d.ts +18 -0
  170. package/dist/hooks/useUpdatesNotification.d.ts +16 -0
  171. package/dist/index.css +1 -1
  172. package/dist/index.css.map +1 -1
  173. package/dist/index.esm.js +1 -1
  174. package/dist/index.js +1 -1
  175. package/dist/integrations/clarity/clarityTracking.d.ts +31 -0
  176. package/dist/integrations/clarity/index.d.ts +3 -0
  177. package/dist/integrations/clarity/types.d.ts +46 -0
  178. package/dist/integrations/clarity/useClarity.d.ts +34 -0
  179. package/dist/integrations/index.d.ts +5 -0
  180. package/dist/providers/CoreProviders.d.ts +16 -1
  181. package/dist/qualiex/components/QualiexUserField.d.ts +8 -0
  182. package/dist/qualiex/hooks/useQualiexUsers.d.ts +16 -26
  183. package/dist/qualiex/services/qualiexApi.d.ts +38 -2
  184. package/dist/qualiex/utils/QualiexErrorInterceptor.d.ts +5 -0
  185. package/dist/supabase/SupabaseSingleton.d.ts +34 -0
  186. package/dist/types.d.ts +51 -2
  187. package/dist/vite/index.esm.js +4 -1
  188. package/dist/vite/index.js +4 -1
  189. package/docs/STORAGE_BUCKETS.md +384 -0
  190. package/docs/WORKSPACE_KNOWLEDGE.md +1 -0
  191. package/docs/design-system/README.md +1 -1
  192. package/docs/design-system/dialogs.md +2 -0
  193. package/docs/design-system/patterns/core-providers.md +2 -0
  194. package/docs/design-system/selectors.md +4 -0
  195. package/package.json +7 -1
  196. package/dist/components/ui/__tests__/status-badge.test.d.ts +0 -1
@@ -1,21 +1,87 @@
1
+ /**
2
+ * @module Command
3
+ * Menu de comandos (command palette / autocomplete) inspirado no `cmdk`.
4
+ * Composto por `Command` (raiz) + `CommandInput` + `CommandList` (com `CommandGroup`,
5
+ * `CommandItem`, `CommandSeparator`, `CommandEmpty`). Use `CommandDialog` como wrapper modal.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <Command>
10
+ * <CommandInput placeholder="Buscar..." />
11
+ * <CommandList>
12
+ * <CommandEmpty>Nenhum resultado.</CommandEmpty>
13
+ * <CommandGroup heading="Ações">
14
+ * <CommandItem onSelect={() => navigate('/users')}>Ir para usuários</CommandItem>
15
+ * </CommandGroup>
16
+ * </CommandList>
17
+ * </Command>
18
+ * ```
19
+ *
20
+ * @see `docs/design-system/selectors.md`
21
+ */
1
22
  import * as React from "react";
23
+ /**
24
+ * Container raiz do command (popover, fundo `bg-popover`).
25
+ * @example
26
+ * <Command><CommandInput /><CommandList>...</CommandList></Command>
27
+ */
2
28
  declare const Command: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
29
  interface CommandDialogProps {
4
30
  open?: boolean;
5
31
  onOpenChange?: (open: boolean) => void;
6
32
  children: React.ReactNode;
7
33
  }
34
+ /**
35
+ * Wrapper modal do `Command`. Aplica estilos cmdk para uso em command palette.
36
+ * @example
37
+ * <CommandDialog open={open} onOpenChange={setOpen}><CommandInput />...</CommandDialog>
38
+ */
8
39
  declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => import("react/jsx-runtime").JSX.Element;
40
+ /**
41
+ * Campo de busca do command. Usa `<input>` nativo com ícone slot.
42
+ * @example
43
+ * <CommandInput placeholder="Pesquisar comando..." value={q} onChange={...} />
44
+ */
9
45
  declare const CommandInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
46
+ /**
47
+ * Lista scrollável (max 300px). Container dos `CommandGroup` / `CommandItem`.
48
+ * @example
49
+ * <CommandList><CommandGroup>...</CommandGroup></CommandList>
50
+ */
10
51
  declare const CommandList: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
52
+ /**
53
+ * Estado vazio (exibido quando não há resultados na busca).
54
+ * @example
55
+ * <CommandEmpty>Nenhum resultado encontrado.</CommandEmpty>
56
+ */
11
57
  declare const CommandEmpty: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
58
+ /**
59
+ * Grupo de items com cabeçalho opcional (`heading`).
60
+ * @example
61
+ * <CommandGroup heading="Sugestões"><CommandItem>...</CommandItem></CommandGroup>
62
+ */
12
63
  declare const CommandGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
64
+ /**
65
+ * Linha divisória entre grupos.
66
+ * @example
67
+ * <CommandSeparator />
68
+ */
13
69
  declare const CommandSeparator: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
70
+ /**
71
+ * Item selecionável do command. Recebe `value` e `onSelect(value)`.
72
+ * @example
73
+ * <CommandItem value="users" onSelect={(v) => navigate(`/${v}`)}>Usuários</CommandItem>
74
+ */
14
75
  declare const CommandItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
15
76
  disabled?: boolean;
16
77
  onSelect?: (value: string) => void;
17
78
  value?: string;
18
79
  } & React.RefAttributes<HTMLDivElement>>;
80
+ /**
81
+ * Atalho de teclado exibido à direita do item (estilo monospace, muted).
82
+ * @example
83
+ * <CommandItem>Salvar<CommandShortcut>⌘S</CommandShortcut></CommandItem>
84
+ */
19
85
  declare const CommandShortcut: {
20
86
  ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
21
87
  displayName: string;
@@ -1,25 +1,120 @@
1
+ /**
2
+ * @module ContextMenu
3
+ * Menu acionado por clique direito (right-click). Composto por `ContextMenu` + `ContextMenuTrigger`
4
+ * (área que captura o right-click) + `ContextMenuContent` (com `ContextMenuItem`,
5
+ * `ContextMenuCheckboxItem`, `ContextMenuRadioItem`, `ContextMenuSub`, etc).
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <ContextMenu>
10
+ * <ContextMenuTrigger>Clique direito aqui</ContextMenuTrigger>
11
+ * <ContextMenuContent>
12
+ * <ContextMenuItem onSelect={onCopy}>Copiar<ContextMenuShortcut>⌘C</ContextMenuShortcut></ContextMenuItem>
13
+ * <ContextMenuSeparator />
14
+ * <ContextMenuItem onSelect={onDelete}>Excluir</ContextMenuItem>
15
+ * </ContextMenuContent>
16
+ * </ContextMenu>
17
+ * ```
18
+ *
19
+ * @see `docs/design-system/navigation.md`
20
+ */
1
21
  import * as React from "react";
2
22
  import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
23
+ /**
24
+ * Raiz do ContextMenu. Controla estado open/onOpenChange.
25
+ * @example
26
+ * <ContextMenu><ContextMenuTrigger>...</ContextMenuTrigger><ContextMenuContent>...</ContextMenuContent></ContextMenu>
27
+ */
3
28
  declare const ContextMenu: React.FC<ContextMenuPrimitive.ContextMenuProps>;
29
+ /**
30
+ * Área que captura o right-click. Use `asChild` para customizar.
31
+ * @example
32
+ * <ContextMenuTrigger asChild><div>Right-click here</div></ContextMenuTrigger>
33
+ */
4
34
  declare const ContextMenuTrigger: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
35
+ /**
36
+ * Agrupa items relacionados (sem visual próprio, apenas semântico).
37
+ * @example
38
+ * <ContextMenuGroup><ContextMenuItem>...</ContextMenuItem></ContextMenuGroup>
39
+ */
5
40
  declare const ContextMenuGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
41
+ /**
42
+ * Portal que renderiza o conteúdo fora da árvore DOM atual.
43
+ * @example
44
+ * <ContextMenuPortal><ContextMenuContent>...</ContextMenuContent></ContextMenuPortal>
45
+ */
6
46
  declare const ContextMenuPortal: React.FC<ContextMenuPrimitive.ContextMenuPortalProps>;
47
+ /**
48
+ * Submenu aninhado. Use com `ContextMenuSubTrigger` e `ContextMenuSubContent`.
49
+ * @example
50
+ * <ContextMenuSub><ContextMenuSubTrigger>Mais</ContextMenuSubTrigger><ContextMenuSubContent>...</ContextMenuSubContent></ContextMenuSub>
51
+ */
7
52
  declare const ContextMenuSub: React.FC<ContextMenuPrimitive.ContextMenuSubProps>;
53
+ /**
54
+ * Grupo de `ContextMenuRadioItem` (seleção única).
55
+ * @example
56
+ * <ContextMenuRadioGroup value={view} onValueChange={setView}>...</ContextMenuRadioGroup>
57
+ */
8
58
  declare const ContextMenuRadioGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
59
+ /**
60
+ * Trigger de submenu (mostra ChevronRight à direita). Use dentro de `ContextMenuSub`.
61
+ * @example
62
+ * <ContextMenuSubTrigger>Compartilhar</ContextMenuSubTrigger>
63
+ */
9
64
  declare const ContextMenuSubTrigger: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
65
  inset?: boolean;
11
66
  } & React.RefAttributes<HTMLDivElement>>;
67
+ /**
68
+ * Conteúdo do submenu. Renderizado com animação de slide.
69
+ * @example
70
+ * <ContextMenuSubContent><ContextMenuItem>...</ContextMenuItem></ContextMenuSubContent>
71
+ */
12
72
  declare const ContextMenuSubContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
73
+ /**
74
+ * Conteúdo principal do ContextMenu. Renderizado em Portal automaticamente.
75
+ * @example
76
+ * <ContextMenuContent><ContextMenuItem>...</ContextMenuItem></ContextMenuContent>
77
+ */
13
78
  declare const ContextMenuContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
79
+ /**
80
+ * Item clicável. Use `inset` para alinhar com items que têm ícone/checkbox.
81
+ * @example
82
+ * <ContextMenuItem onSelect={onCopy}>Copiar</ContextMenuItem>
83
+ */
14
84
  declare const ContextMenuItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
85
  inset?: boolean;
16
86
  } & React.RefAttributes<HTMLDivElement>>;
87
+ /**
88
+ * Item com checkbox. Suporta `checked` controlado e `onCheckedChange`.
89
+ * @example
90
+ * <ContextMenuCheckboxItem checked={visible} onCheckedChange={setVisible}>Mostrar</ContextMenuCheckboxItem>
91
+ */
17
92
  declare const ContextMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
93
+ /**
94
+ * Item radio (seleção única). Deve estar dentro de `ContextMenuRadioGroup`.
95
+ * @example
96
+ * <ContextMenuRadioItem value="grid">Grid</ContextMenuRadioItem>
97
+ */
18
98
  declare const ContextMenuRadioItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
99
+ /**
100
+ * Label não-clicável (cabeçalho de seção dentro do menu).
101
+ * @example
102
+ * <ContextMenuLabel>Ações</ContextMenuLabel>
103
+ */
19
104
  declare const ContextMenuLabel: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
105
  inset?: boolean;
21
106
  } & React.RefAttributes<HTMLDivElement>>;
107
+ /**
108
+ * Linha divisória entre grupos de items.
109
+ * @example
110
+ * <ContextMenuSeparator />
111
+ */
22
112
  declare const ContextMenuSeparator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
113
+ /**
114
+ * Atalho de teclado exibido à direita do item (estilo monospace, muted).
115
+ * @example
116
+ * <ContextMenuItem>Copiar<ContextMenuShortcut>⌘C</ContextMenuShortcut></ContextMenuItem>
117
+ */
23
118
  declare const ContextMenuShortcut: {
24
119
  ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
25
120
  displayName: string;
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Tipo `DatePickerProps` exportado pela lib.
3
+ * @example
4
+ * const value: DatePickerProps = {} as DatePickerProps;
5
+ */
1
6
  export interface DatePickerProps {
2
7
  date?: Date;
3
8
  onDateChange?: (date: Date | undefined) => void;
@@ -6,4 +11,9 @@ export interface DatePickerProps {
6
11
  className?: string;
7
12
  disabledDates?: (date: Date) => boolean;
8
13
  }
14
+ /**
15
+ * Função utilitária `DatePicker`.
16
+ * @example
17
+ * DatePicker();
18
+ */
9
19
  export declare function DatePicker({ date, onDateChange, placeholder, disabled, className, disabledDates, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,20 @@
1
1
  import * as React from 'react';
2
2
  import { type DialogVariant, type DialogSize } from './dialog';
3
3
  /**
4
- * DialogWizard — Dialog com stepper vertical lateral (padrão v2)
4
+ * DialogWizard — Dialog multi-step com stepper vertical lateral (padrão v2 da lib).
5
5
  *
6
- * Substitui o padrão anterior de StepSelector horizontal no footer.
7
- * Renderiza uma sidebar à esquerda com círculos numerados sobre fundo primário
8
- * e área de conteúdo à direita com header, body scrollável e footer com navegação.
6
+ * Substitui o padrão anterior de `StepSelector` horizontal no footer. Renderiza uma sidebar
7
+ * azul (`bg-primary`) à esquerda com círculos numerados marcando completude, etapa atual e
8
+ * etapas inacessíveis; à direita, área de conteúdo com header, body scrollável e footer
9
+ * com navegação automática (Voltar / Próximo / Salvar).
10
+ *
11
+ * **Quando usar:** fluxos com 3+ etapas. Para 1-2 etapas, prefira `Dialog` simples.
12
+ *
13
+ * **Validação por etapa:** use `canGoToStep(targetStep)` para bloquear avanço.
14
+ * Voltar para etapas anteriores é sempre permitido (UX padrão de wizard).
15
+ *
16
+ * **Confirmação de descarte:** se `isDirty=true`, fechar o diálogo dispara o
17
+ * AlertDialog de "alterações não salvas" herdado de `DialogContent` (variant='form').
9
18
  *
10
19
  * @example
11
20
  * ```tsx
@@ -16,6 +25,8 @@ import { type DialogVariant, type DialogSize } from './dialog';
16
25
  * onStepChange={setStep}
17
26
  * steps={['Geral', 'Formulário', 'Configuração']}
18
27
  * title={t('new_document')}
28
+ * isDirty={form.formState.isDirty}
29
+ * canGoToStep={(s) => s <= 2 ? form.formState.isValid : true}
19
30
  * onSave={handleSave}
20
31
  * >
21
32
  * {step === 1 && <StepOneContent />}
@@ -23,6 +34,8 @@ import { type DialogVariant, type DialogSize } from './dialog';
23
34
  * {step === 3 && <StepThreeContent />}
24
35
  * </DialogWizard>
25
36
  * ```
37
+ *
38
+ * @see {@link Dialog} Para diálogos sem etapas.
26
39
  */
27
40
  export interface DialogWizardProps {
28
41
  /** Controla se o dialog está aberto */
@@ -78,5 +91,10 @@ export interface DialogWizardProps {
78
91
  /** Conteúdo extra no footer (à esquerda dos botões de navegação) */
79
92
  footerLeft?: React.ReactNode;
80
93
  }
94
+ /**
95
+ * Função utilitária `DialogWizard`.
96
+ * @example
97
+ * DialogWizard();
98
+ */
81
99
  declare function DialogWizard({ open, onOpenChange, currentStep, onStepChange, steps, canGoToStep, children, title, description, onSave, saveLabel, nextLabel, backLabel, variant, isDirty, size, unsavedChangesTitle, unsavedChangesDescription, cancelText, leaveWithoutSavingText, className, disableNext, hideNavigation, footerLeft, }: DialogWizardProps): import("react/jsx-runtime").JSX.Element;
82
100
  export { DialogWizard };
@@ -1,12 +1,126 @@
1
1
  import * as React from "react";
2
2
  import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ /**
4
+ * Dialog — Modal acessível baseado em Radix UI Dialog (composição padrão da lib).
5
+ *
6
+ * Estrutura recomendada (obrigatória para garantir scroll e visibilidade do footer):
7
+ *
8
+ * ```tsx
9
+ * <Dialog open={open} onOpenChange={setOpen}>
10
+ * <DialogContent size="md" variant="form" isDirty={form.formState.isDirty}>
11
+ * <DialogHeader>
12
+ * <DialogTitle>Editar usuário</DialogTitle>
13
+ * <DialogDescription>Atualize os dados do usuário.</DialogDescription>
14
+ * </DialogHeader>
15
+ * <DialogBody>
16
+ * {/* conteúdo scrollável *\/}
17
+ * </DialogBody>
18
+ * <DialogFooter>
19
+ * <Button variant="outline" onClick={() => setOpen(false)}>Cancelar</Button>
20
+ * <Button onClick={handleSave}>Salvar</Button>
21
+ * </DialogFooter>
22
+ * </DialogContent>
23
+ * </Dialog>
24
+ * ```
25
+ *
26
+ * **Variantes do `DialogContent`:**
27
+ * - `informative` (default): fecha ao clicar fora ou ESC.
28
+ * - `form`: bloqueia clique fora; com `isDirty=true` exibe alerta "alterações não salvas" ao tentar fechar.
29
+ * - `destructive`: bloqueia clique fora E ESC, oculta o botão de fechar (ações irreversíveis).
30
+ *
31
+ * **Tamanhos pré-definidos:** `sm` (320–480px), `md` (480–720px, default), `lg` (1440px / 85vh).
32
+ * Use `customWidth/customHeight/...` para casos específicos.
33
+ *
34
+ * **Importante:** Sempre embrulhar conteúdo em `<DialogBody>` quando houver `<DialogFooter>` —
35
+ * caso contrário o footer pode ser empurrado para fora do viewport (em dev, um warning é emitido).
36
+ *
37
+ * @see {@link DialogWizard} Para diálogos com múltiplas etapas (3+ passos).
38
+ * @see https://ui.shadcn.com/docs/components/dialog
39
+ *
40
+ * @example
41
+ * <Dialog />
42
+ */
3
43
  declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
44
+ /**
45
+ * Elemento que dispara a abertura do Dialog. Use `asChild` para reaproveitar seu próprio botão.
46
+ *
47
+ * @example
48
+ * <DialogTrigger asChild>
49
+ * <Button variant="outline">Editar</Button>
50
+ * </DialogTrigger>
51
+ */
4
52
  declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
53
+ /**
54
+ * Portal onde o Dialog é renderizado (geralmente `document.body`).
55
+ * Você raramente precisa usar diretamente — `DialogContent` já o utiliza internamente.
56
+ *
57
+ * @example
58
+ * <DialogPortal container={containerRef.current}>
59
+ * <DialogOverlay />
60
+ * <DialogContent>...</DialogContent>
61
+ * </DialogPortal>
62
+ */
5
63
  declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
64
+ /**
65
+ * Botão programático para fechar o Dialog. Útil em ações dentro do body/footer.
66
+ * Use `asChild` para envolver seu próprio botão.
67
+ *
68
+ * @example
69
+ * <DialogClose asChild>
70
+ * <Button variant="outline">Cancelar</Button>
71
+ * </DialogClose>
72
+ */
6
73
  declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
74
+ /**
75
+ * Camada semitransparente atrás do Dialog. Renderizada automaticamente pelo `DialogContent` —
76
+ * use diretamente apenas se estiver compondo um Portal customizado.
77
+ *
78
+ * @example
79
+ * <DialogPortal>
80
+ * <DialogOverlay className="bg-black/60" />
81
+ * <DialogContent>...</DialogContent>
82
+ * </DialogPortal>
83
+ */
7
84
  declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
85
+ /**
86
+ * Tamanhos pré-definidos do `DialogContent`:
87
+ * - `sm` — 320–480px, ideal para confirmações curtas.
88
+ * - `md` — 480–720px (default), formulários comuns.
89
+ * - `lg` — 1440px / 85vh, conteúdo extenso (wizards, listas).
90
+ *
91
+ * Para tamanhos arbitrários, use `customWidth/customHeight` em `DialogContentProps`.
92
+ *
93
+ * @example
94
+ * <DialogContent size="lg">...</DialogContent>
95
+ */
8
96
  type DialogSize = 'sm' | 'md' | 'lg';
97
+ /**
98
+ * Variante do `DialogContent`, controla comportamento de fechamento:
99
+ * - `informative` (default) — fecha ao clicar fora ou ESC.
100
+ * - `form` — bloqueia clique fora; com `isDirty=true` confirma "alterações não salvas".
101
+ * - `destructive` — bloqueia ESC e clique fora; oculta o `X` (ações irreversíveis).
102
+ *
103
+ * @example
104
+ * <DialogContent variant="form" isDirty={form.formState.isDirty}>...</DialogContent>
105
+ */
9
106
  type DialogVariant = 'informative' | 'form' | 'destructive';
107
+ /**
108
+ * Props do `DialogContent`.
109
+ *
110
+ * @property size — Tamanho pré-definido: `sm`, `md` (default), `lg`. Ignorado se `customWidth/Height` forem usados.
111
+ * @property variant — `informative` (default) | `form` (confirma `isDirty` ao fechar) | `destructive` (bloqueia ESC).
112
+ * @property isDirty — Quando `variant='form'` e `isDirty=true`, exibe AlertDialog de confirmação ao tentar fechar.
113
+ * @property customWidth — Width customizado (ex: `'600px'`, `'40vw'`). Sobrescreve `size`.
114
+ * @property customMaxHeight — Limite de altura. Útil para conteúdo muito longo dentro de `DialogBody`.
115
+ *
116
+ * @example
117
+ * const props: DialogContentProps = {
118
+ * size: 'lg',
119
+ * variant: 'form',
120
+ * isDirty: form.formState.isDirty,
121
+ * customMaxHeight: '80vh',
122
+ * };
123
+ */
10
124
  interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
11
125
  size?: DialogSize;
12
126
  variant?: DialogVariant;
@@ -26,23 +140,90 @@ interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof Dialo
26
140
  /** i18n: Leave without saving button text */
27
141
  leaveWithoutSavingText?: string;
28
142
  }
143
+ /**
144
+ * Container principal do Dialog. Aplica tamanho, variante e (quando `variant='form'`)
145
+ * o fluxo de confirmação de "alterações não salvas". Sempre coloque
146
+ * `DialogHeader` + `DialogBody` + `DialogFooter` como filhos diretos.
147
+ *
148
+ * @example
149
+ * <DialogContent size="md" variant="form" isDirty={form.formState.isDirty}>
150
+ * <DialogHeader>
151
+ * <DialogTitle>Editar usuário</DialogTitle>
152
+ * </DialogHeader>
153
+ * <DialogBody>{/* form fields *\/}</DialogBody>
154
+ * <DialogFooter>
155
+ * <Button variant="outline" onClick={() => setOpen(false)}>Cancelar</Button>
156
+ * <Button onClick={handleSave}>Salvar</Button>
157
+ * </DialogFooter>
158
+ * </DialogContent>
159
+ */
29
160
  declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
30
161
  interface DialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
162
+ /** Se `true`, exibe uma linha separadora abaixo do título (default: `false`). */
31
163
  showSeparator?: boolean;
32
164
  }
165
+ /**
166
+ * Header do Dialog. Contém `DialogTitle` e opcionalmente `DialogDescription`.
167
+ * Sempre o primeiro filho dentro de `DialogContent`. Não rola — fica fixo no topo.
168
+ *
169
+ * @example
170
+ * <DialogHeader showSeparator>
171
+ * <DialogTitle>Editar usuário</DialogTitle>
172
+ * <DialogDescription>Atualize os dados abaixo.</DialogDescription>
173
+ * </DialogHeader>
174
+ */
33
175
  declare const DialogHeader: {
34
176
  ({ className, showSeparator, children, ...props }: DialogHeaderProps): import("react/jsx-runtime").JSX.Element;
35
177
  displayName: string;
36
178
  };
179
+ /**
180
+ * Container scrollável do Dialog (área entre header e footer).
181
+ *
182
+ * **Obrigatório quando há `DialogFooter`** — sem ele, o footer pode sair do viewport.
183
+ * Usa `px-2 -mx-2` para não recortar focus rings de inputs próximos à borda.
184
+ *
185
+ * @example
186
+ * <DialogBody>
187
+ * <Form {...form}>
188
+ * <FormField name="email" render={...} />
189
+ * </Form>
190
+ * </DialogBody>
191
+ */
37
192
  declare const DialogBody: {
38
193
  ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
39
194
  displayName: string;
40
195
  };
196
+ /**
197
+ * Footer do Dialog com separador automático e alinhamento à direita.
198
+ * Tipicamente contém botões de ação (Cancelar, Salvar). Fica fixo no rodapé.
199
+ *
200
+ * @example
201
+ * <DialogFooter>
202
+ * <Button variant="outline" onClick={() => setOpen(false)}>Cancelar</Button>
203
+ * <Button onClick={handleSave} disabled={form.formState.isSubmitting}>Salvar</Button>
204
+ * </DialogFooter>
205
+ */
41
206
  declare const DialogFooter: {
42
207
  ({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
43
208
  displayName: string;
44
209
  };
210
+ /**
211
+ * Título do Dialog. Renderizado como `<h2>` com estilo `text-xl font-semibold`.
212
+ * **Obrigatório por acessibilidade** — Radix usa o título para `aria-labelledby` do dialog.
213
+ *
214
+ * @example
215
+ * <DialogTitle>Excluir usuário</DialogTitle>
216
+ */
45
217
  declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
218
+ /**
219
+ * Descrição opcional do Dialog (subtítulo). Exibida em texto muted abaixo do título.
220
+ * Mapeada para `aria-describedby` automaticamente pelo Radix.
221
+ *
222
+ * @example
223
+ * <DialogDescription>
224
+ * Esta ação não pode ser desfeita. O usuário será removido permanentemente.
225
+ * </DialogDescription>
226
+ */
46
227
  declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
47
228
  export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogBody, DialogFooter, DialogTitle, DialogDescription };
48
229
  export type { DialogVariant, DialogSize, DialogContentProps };
@@ -1,22 +1,94 @@
1
+ /**
2
+ * @module Drawer
3
+ * Painel slide-up mobile-first baseado em `vaul`. Use para fluxos mobile ou painéis
4
+ * secundários que devem ocupar a base da viewport.
5
+ *
6
+ * Para painéis laterais desktop (sidesheets), prefira `Sheet`.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * <Drawer>
11
+ * <DrawerTrigger asChild><Button>Abrir</Button></DrawerTrigger>
12
+ * <DrawerContent>
13
+ * <DrawerHeader>
14
+ * <DrawerTitle>Filtros</DrawerTitle>
15
+ * <DrawerDescription>Refine os resultados</DrawerDescription>
16
+ * </DrawerHeader>
17
+ * {children}
18
+ * <DrawerFooter><Button>Aplicar</Button></DrawerFooter>
19
+ * </DrawerContent>
20
+ * </Drawer>
21
+ * ```
22
+ */
1
23
  import * as React from "react";
2
24
  import { Drawer as DrawerPrimitive } from "vaul";
25
+ /**
26
+ * Componente `Drawer` da lib.
27
+ * @example
28
+ * <Drawer />
29
+ */
3
30
  declare const Drawer: {
4
31
  ({ shouldScaleBackground, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
32
  displayName: string;
6
33
  };
34
+ /**
35
+ * Componente `DrawerTrigger` da lib.
36
+ * @example
37
+ * <DrawerTrigger />
38
+ */
7
39
  declare const DrawerTrigger: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
40
+ /**
41
+ * Componente `DrawerPortal` da lib.
42
+ * @example
43
+ * <DrawerPortal />
44
+ */
8
45
  declare const DrawerPortal: typeof import("vaul").Portal;
46
+ /**
47
+ * Componente `DrawerClose` da lib.
48
+ * @example
49
+ * <DrawerClose />
50
+ */
9
51
  declare const DrawerClose: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
52
+ /**
53
+ * Componente `DrawerOverlay` da lib.
54
+ * @example
55
+ * <DrawerOverlay />
56
+ */
10
57
  declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
58
+ /**
59
+ * Componente `DrawerContent` da lib.
60
+ * @example
61
+ * <DrawerContent />
62
+ */
11
63
  declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
64
+ /**
65
+ * Componente `DrawerHeader` da lib.
66
+ * @example
67
+ * <DrawerHeader />
68
+ */
12
69
  declare const DrawerHeader: {
13
70
  ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
14
71
  displayName: string;
15
72
  };
73
+ /**
74
+ * Componente `DrawerFooter` da lib.
75
+ * @example
76
+ * <DrawerFooter />
77
+ */
16
78
  declare const DrawerFooter: {
17
79
  ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
18
80
  displayName: string;
19
81
  };
82
+ /**
83
+ * Componente `DrawerTitle` da lib.
84
+ * @example
85
+ * <DrawerTitle />
86
+ */
20
87
  declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
88
+ /**
89
+ * Componente `DrawerDescription` da lib.
90
+ * @example
91
+ * <DrawerDescription />
92
+ */
21
93
  declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
22
94
  export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };