@data-c/ui 0.1.24 → 0.1.28

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/dist/index.d.ts CHANGED
@@ -1,16 +1,17 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as _mui_material from '@mui/material';
3
- import { ButtonProps as ButtonProps$1, StackProps, CheckboxProps as CheckboxProps$1, DialogProps as DialogProps$1, IconButtonProps, DrawerProps, TypographyProps, ToolbarProps, TextFieldProps, FilterOptionsState, TooltipProps as TooltipProps$2, BoxProps, PaperProps } from '@mui/material';
3
+ import { ButtonProps as ButtonProps$2, StackProps, CheckboxProps as CheckboxProps$1, DialogProps as DialogProps$1, IconButtonProps, DrawerProps, TypographyProps, ToolbarProps, TextFieldProps, FilterOptionsState, TooltipProps as TooltipProps$2, BoxProps, PaperProps } from '@mui/material';
4
4
  import * as React$1 from 'react';
5
5
  import React__default, { ReactNode, ComponentType } from 'react';
6
6
  import { MUIDataTableProps } from 'mui-datatables';
7
7
  import { PaginationProps, TransportableDataTableProps, CredentialsConfigsInterface, AmbienteDataInterface } from '@data-c/hooks';
8
8
  import * as _mui_material_styles from '@mui/material/styles';
9
+ import { DialogComponent, DialogProps as DialogProps$2 } from '@toolpad/core/useDialogs';
9
10
 
10
- interface ButtonProps extends ButtonProps$1 {
11
+ interface ButtonProps$1 extends ButtonProps$2 {
11
12
  isLoading?: boolean;
12
13
  }
13
- declare const Button: (props: ButtonProps) => react_jsx_runtime.JSX.Element;
14
+ declare const Button: (props: ButtonProps$1) => react_jsx_runtime.JSX.Element;
14
15
 
15
16
  declare function ButtonContainer(props: StackProps): react_jsx_runtime.JSX.Element;
16
17
 
@@ -40,8 +41,8 @@ interface DialogProps extends DialogProps$1 {
40
41
  onConfirm?: () => void;
41
42
  dialogActionsProps?: DialogActionsProps;
42
43
  }
43
- declare function Dialog(props: DialogProps): react_jsx_runtime.JSX.Element;
44
- declare namespace Dialog {
44
+ declare function Dialog$1(props: DialogProps): react_jsx_runtime.JSX.Element;
45
+ declare namespace Dialog$1 {
45
46
  var defaultProps: {
46
47
  fullWidth: boolean;
47
48
  type: string;
@@ -130,7 +131,7 @@ interface FilterProps {
130
131
  children: ReactNode;
131
132
  triggerButton?: 'none' | React__default.ReactNode;
132
133
  triggerButtonLabel?: string;
133
- triggerButtonProps?: ButtonProps$1;
134
+ triggerButtonProps?: ButtonProps$2;
134
135
  title?: string;
135
136
  onApplyFilters?: (filters: any) => void;
136
137
  renderLabel?: (filterLabel: string, filterValue: any) => React__default.ReactNode;
@@ -161,7 +162,7 @@ interface FormContainerProps {
161
162
  onSubmitForm?: (formValues: any) => void;
162
163
  view?: 'dialog' | 'plain';
163
164
  triggerButton?: 'none' | React__default.ReactNode;
164
- triggerButtonProps?: ButtonProps$1;
165
+ triggerButtonProps?: ButtonProps$2;
165
166
  triggerButtonLabel?: string;
166
167
  confirmButtonLabel?: string;
167
168
  actions?: ReactNode;
@@ -245,7 +246,7 @@ interface AlterarSenhaProps {
245
246
  email?: string;
246
247
  senhaAtual?: string;
247
248
  isOpen: boolean;
248
- onClose: () => void;
249
+ onClose: () => Promise<void>;
249
250
  onSuccess?: () => void;
250
251
  onFailed?: (err: any) => void;
251
252
  }
@@ -292,4 +293,66 @@ declare function Surface(props: PaperProps): react_jsx_runtime.JSX.Element;
292
293
 
293
294
  declare const theme: _mui_material_styles.Theme;
294
295
 
295
- export { AlterarSenha, AlterarSenhaProps, Button, ButtonContainer, Checkbox, CheckboxProps, ColorsGrid, Content, ContentProps, CurrencyCellStyle, CurrencyTextField, DataTable, DataTableOptions, DataTableOptionsProps, DataTableProps, DeleteContainer, DeleteContainerProps, Dialog, DialogProps, DrawerMenu, DrawerMenuProps, Editable, EditableProps, FilterContainer, FilterControl, FilterProps, Flag, FormContainer, FormContainerProps, LabelValue, LabelValueProps, MenuItemProps, MioAuth, MioAuthProps, OptionStyles, PageTitle, PasswordTextField, SearchTextField, Surface, Tooltip, TooltipProps, Transporter, TransporterProps, theme };
296
+ interface RootProps extends Omit<DialogProps$1, 'onClose'> {
297
+ height?: number | string;
298
+ children: ReactNode;
299
+ onClose: (result: any) => Promise<void>;
300
+ }
301
+ declare function DialogRoot({ children, height, fullWidth, ...rest }: RootProps): react_jsx_runtime.JSX.Element;
302
+
303
+ interface DialogProviderProps {
304
+ children: React__default.ReactNode;
305
+ }
306
+ declare function DialogProvider({ children }: DialogProviderProps): react_jsx_runtime.JSX.Element;
307
+
308
+ interface DialogAdicionarButtonProps<T> extends Omit<ButtonProps$2, 'onClick'> {
309
+ dialogComponent: DialogComponent<any, any>;
310
+ payload: T;
311
+ label?: string;
312
+ }
313
+ declare function DialogAdicionarButton<T>(props: DialogAdicionarButtonProps<T>): react_jsx_runtime.JSX.Element;
314
+
315
+ declare function DialogHeader(props: StackProps): react_jsx_runtime.JSX.Element;
316
+
317
+ declare function Title(props: TypographyProps): react_jsx_runtime.JSX.Element;
318
+
319
+ interface DialogActionCloseProps {
320
+ onClose: (result?: any) => Promise<void>;
321
+ }
322
+ declare function DialogActionClose({ onClose }: DialogActionCloseProps): react_jsx_runtime.JSX.Element;
323
+
324
+ declare function DialogContent({ children, ...rest }: StackProps): react_jsx_runtime.JSX.Element;
325
+
326
+ declare function Footer(props: StackProps): react_jsx_runtime.JSX.Element;
327
+
328
+ declare function DialogActions(props: StackProps): react_jsx_runtime.JSX.Element;
329
+
330
+ declare function DialogActionCancelar$1({ children, ...rest }: ButtonProps$2): react_jsx_runtime.JSX.Element;
331
+
332
+ type ButtonProps = {
333
+ isLoading: boolean;
334
+ label?: string;
335
+ } & ButtonProps$2;
336
+ declare function DialogActionCancelar({ children, label, ...rest }: ButtonProps): react_jsx_runtime.JSX.Element;
337
+
338
+ declare function DialogConfirmDelete({ open, onClose, payload, }: DialogProps$2<{
339
+ identificador: any;
340
+ useRemover: any;
341
+ }>): react_jsx_runtime.JSX.Element;
342
+
343
+ declare const Dialog: {
344
+ Root: typeof DialogRoot;
345
+ Provider: typeof DialogProvider;
346
+ AdicionarButton: typeof DialogAdicionarButton;
347
+ Header: typeof DialogHeader;
348
+ Title: typeof Title;
349
+ ActionClose: typeof DialogActionClose;
350
+ Content: typeof DialogContent;
351
+ Footer: typeof Footer;
352
+ Actions: typeof DialogActions;
353
+ ActionCancelar: typeof DialogActionCancelar$1;
354
+ ActionSalvar: typeof DialogActionCancelar;
355
+ ConfirmDelete: typeof DialogConfirmDelete;
356
+ };
357
+
358
+ export { AlterarSenha, AlterarSenhaProps, Button, ButtonContainer, Checkbox, CheckboxProps, ColorsGrid, Content, ContentProps, CurrencyCellStyle, CurrencyTextField, DataTable, DataTableOptions, DataTableOptionsProps, DataTableProps, DeleteContainer, DeleteContainerProps, Dialog$1 as Dialog, DialogProps, Dialog as DialogV2, DrawerMenu, DrawerMenuProps, Editable, EditableProps, FilterContainer, FilterControl, FilterProps, Flag, FormContainer, FormContainerProps, LabelValue, LabelValueProps, MenuItemProps, MioAuth, MioAuthProps, OptionStyles, PageTitle, PasswordTextField, SearchTextField, Surface, Tooltip, TooltipProps, Transporter, TransporterProps, theme };