plataforma-fundacao-componentes 2.20.28 → 2.21.3
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/assets/icons/ThreeDotsLoader.d.ts +9 -13
- package/dist/components/button/Button.d.ts +3 -2
- package/dist/components/input/Input.stories.d.ts +18 -18
- package/dist/components/modal/Modal.d.ts +1 -1
- package/dist/components/modal/ModalTypes.d.ts +3 -3
- package/dist/components/modulosTitle/ModulosTitle.d.ts +1 -1
- package/dist/components/table/Table.d.ts +26 -7
- package/dist/components/table/Table.stories.d.ts +13 -11
- package/dist/hooks/useCallbackedState/useCallbackedState.d.ts +2 -0
- package/dist/hooks/useToastManager/useToastManager.d.ts +9 -3
- package/dist/hooks/useValidatedState/useValidatedState.d.ts +8 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2911 -2804
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +2909 -2805
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/ValidationUtils.d.ts +10 -8
- package/package.json +8 -8
- package/dist/utils/ArrayUtils.d.ts +0 -1
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export { theme_1 as theme };
|
|
10
|
-
const size_1: number;
|
|
11
|
-
export { size_1 as size };
|
|
12
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './ThreeDotsLoader.scss';
|
|
3
|
+
export declare type ThreeDotsThemes = 'primary' | 'secondary' | 'dark';
|
|
4
|
+
export declare type ThreeDotsSizes = 1 | 2 | 3 | 4;
|
|
5
|
+
export interface ThreeDotsProps {
|
|
6
|
+
theme?: ThreeDotsThemes;
|
|
7
|
+
size?: 1 | 2 | 3 | 4;
|
|
8
|
+
style?: any;
|
|
13
9
|
}
|
|
14
|
-
|
|
10
|
+
export declare const ThreeDotsLoader: (props: ThreeDotsProps) => JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { ThreeDotsSizes, ThreeDotsThemes } from '../../assets/icons/ThreeDotsLoader';
|
|
2
3
|
import { ButtonThemesType } from '../../libraries/ButtonTheme';
|
|
3
4
|
import { TooltipPositionTypes } from '../../libraries/Tooltips';
|
|
4
5
|
import './Button.scss';
|
|
@@ -14,8 +15,8 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
14
15
|
mobileBottomPage?: boolean;
|
|
15
16
|
loader?: {
|
|
16
17
|
loading: boolean;
|
|
17
|
-
loaderTheme:
|
|
18
|
-
loaderSize:
|
|
18
|
+
loaderTheme: ThreeDotsThemes;
|
|
19
|
+
loaderSize: ThreeDotsSizes;
|
|
19
20
|
};
|
|
20
21
|
children?: React.ReactNode;
|
|
21
22
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
|
|
6
|
+
export declare const Primary: () => JSX.Element;
|
|
7
|
+
export declare const PrimaryFormat: () => JSX.Element;
|
|
8
|
+
export declare const RightObject: () => JSX.Element;
|
|
9
|
+
export declare const ButtonLoading: () => JSX.Element;
|
|
10
|
+
export declare const Counter: () => JSX.Element;
|
|
11
|
+
export declare const CounterAndMaxLength: () => JSX.Element;
|
|
12
|
+
export declare const Error: () => JSX.Element;
|
|
13
|
+
export declare const Loading: () => JSX.Element;
|
|
14
|
+
export declare const LoadingWithValue: () => JSX.Element;
|
|
15
|
+
export declare const Disabled: () => JSX.Element;
|
|
16
|
+
export declare const DisabledWithValue: () => JSX.Element;
|
|
17
|
+
export declare const DisabledAndLoading: () => JSX.Element;
|
|
18
|
+
export declare const ForceFocus: () => JSX.Element;
|
|
19
|
+
export declare const WithValidationState: () => JSX.Element;
|
|
@@ -12,7 +12,7 @@ export interface ModalProps {
|
|
|
12
12
|
onClose?: (modalKey?: string | number) => void;
|
|
13
13
|
size?: ModalSizes;
|
|
14
14
|
mobileOnXS?: boolean;
|
|
15
|
-
footer?:
|
|
15
|
+
footer?: ButtonProps[] | any;
|
|
16
16
|
children?: any;
|
|
17
17
|
}
|
|
18
18
|
declare function Modal(props: ModalProps): JSX.Element;
|
|
@@ -4,7 +4,7 @@ interface AlertModalProps extends ModalProps {
|
|
|
4
4
|
language?: {
|
|
5
5
|
confirm: string;
|
|
6
6
|
};
|
|
7
|
-
onConfirm: () => void
|
|
7
|
+
onConfirm: () => void | Promise<any>;
|
|
8
8
|
showIcons?: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare function AlertModal(props: AlertModalProps): JSX.Element;
|
|
@@ -18,7 +18,7 @@ interface ConfirmModalProps extends ModalProps {
|
|
|
18
18
|
confirm: string;
|
|
19
19
|
cancel: string;
|
|
20
20
|
};
|
|
21
|
-
onConfirm: () => void
|
|
21
|
+
onConfirm: () => void | Promise<any>;
|
|
22
22
|
onCancel: () => void;
|
|
23
23
|
showIcons?: boolean;
|
|
24
24
|
}
|
|
@@ -33,7 +33,7 @@ interface DestructiveModalProps extends ModalProps {
|
|
|
33
33
|
confirm: string;
|
|
34
34
|
cancel: string;
|
|
35
35
|
};
|
|
36
|
-
onConfirm: () => void
|
|
36
|
+
onConfirm: () => void | Promise<any>;
|
|
37
37
|
onCancel: () => void;
|
|
38
38
|
showIcons?: boolean;
|
|
39
39
|
}
|
|
@@ -3,7 +3,7 @@ import './ModulosTitle.scss';
|
|
|
3
3
|
interface ModulosTitleProps {
|
|
4
4
|
children: any;
|
|
5
5
|
showBackButton?: boolean;
|
|
6
|
-
onBackClick
|
|
6
|
+
onBackClick?: (event?: any) => void;
|
|
7
7
|
}
|
|
8
8
|
declare function ModulosTitle(props: ModulosTitleProps): JSX.Element;
|
|
9
9
|
declare namespace ModulosTitle {
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './Table.scss';
|
|
3
|
-
|
|
3
|
+
declare type indexes = string | number;
|
|
4
|
+
declare type AceptedValue = string | React.ReactNode | number;
|
|
5
|
+
export interface TableCell extends React.HTMLAttributes<HTMLTableCellElement> {
|
|
6
|
+
align?: 'left' | 'center' | 'right' | 'justify' | 'char';
|
|
7
|
+
}
|
|
8
|
+
export declare type ColumnObject<R extends indexes | undefined = undefined> = {
|
|
9
|
+
key: R extends indexes ? R : indexes;
|
|
10
|
+
value: AceptedValue;
|
|
11
|
+
props?: TableCell;
|
|
12
|
+
};
|
|
13
|
+
export declare type LineObject<R extends indexes | undefined = undefined> = R extends indexes ? {
|
|
14
|
+
[key in R]: AceptedValue;
|
|
15
|
+
} : any;
|
|
16
|
+
interface BasicTableProps {
|
|
17
|
+
columns: unknown[];
|
|
18
|
+
lines?: unknown[];
|
|
4
19
|
className?: string;
|
|
5
|
-
columns?: {
|
|
6
|
-
key: string;
|
|
7
|
-
value: any;
|
|
8
|
-
props?: any;
|
|
9
|
-
}[];
|
|
10
|
-
lines?: object[];
|
|
11
20
|
sortable?: boolean;
|
|
12
21
|
onSort?: (event?: {
|
|
13
22
|
oldIndex: number;
|
|
@@ -25,4 +34,14 @@ export interface TableProps {
|
|
|
25
34
|
}[];
|
|
26
35
|
};
|
|
27
36
|
}
|
|
37
|
+
export interface TableProps extends BasicTableProps {
|
|
38
|
+
columns: ColumnObject[] | ColumnObject<indexes>[];
|
|
39
|
+
lines?: LineObject[] | LineObject<indexes>[];
|
|
40
|
+
}
|
|
41
|
+
export interface TypedTableProps<R extends indexes> extends BasicTableProps {
|
|
42
|
+
columns: ColumnObject<R>[];
|
|
43
|
+
lines?: LineObject<R>[];
|
|
44
|
+
}
|
|
45
|
+
export declare function TypedTable<R extends indexes>(props: TypedTableProps<R>): JSX.Element;
|
|
28
46
|
export default function Table(props: TableProps): JSX.Element;
|
|
47
|
+
export {};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import Table from './Table';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Table;
|
|
6
|
+
};
|
|
5
7
|
export default _default;
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
|
|
8
|
+
export declare const Example: () => JSX.Element;
|
|
9
|
+
export declare const TableLikeZeplin: () => JSX.Element;
|
|
10
|
+
export declare const Draggable: () => JSX.Element;
|
|
11
|
+
export declare const ConfirmSort: () => JSX.Element;
|
|
12
|
+
export declare const WithActions: () => JSX.Element;
|
|
13
|
+
export declare const UpperHeader: () => JSX.Element;
|
|
14
|
+
export declare const Typed: () => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ToastProps } from '../../components/toast/Toast';
|
|
3
|
-
interface ToastManagerProps {
|
|
3
|
+
export interface ToastManagerProps {
|
|
4
4
|
max?: string | number;
|
|
5
5
|
marginTop?: string | number;
|
|
6
6
|
verticalPosition?: 'top' | 'bottom';
|
|
@@ -9,5 +9,11 @@ interface ToastManagerProps {
|
|
|
9
9
|
animateSize?: boolean;
|
|
10
10
|
pauseOnFocusLoss?: boolean;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
declare function useToastManager(props: ToastManagerProps): [React.ReactNode, (toast: ToastProps) => void, () => void];
|
|
13
|
+
declare namespace useToastManager {
|
|
14
|
+
var defaultProps: {
|
|
15
|
+
verticalPosition: string;
|
|
16
|
+
horizontalPosition: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export default useToastManager;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
export default function useValidatedState<T = any>(validation: (value: T | undefined) => {
|
|
3
|
+
error: boolean;
|
|
4
|
+
text?: string;
|
|
5
|
+
}, initialValue?: T | undefined): [T | undefined, Dispatch<SetStateAction<T | undefined>>, {
|
|
6
|
+
error: boolean;
|
|
7
|
+
text?: string;
|
|
8
|
+
}];
|
package/dist/index.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ import Select from './components/select/Select';
|
|
|
66
66
|
import Switch from './components/switch/Switch';
|
|
67
67
|
import { ActionsColumn } from './components/table/components/actionsColumn/ActionsColumn';
|
|
68
68
|
import { LeftCheckboxWithLabel } from './components/table/components/leftCheckboxWithLabel/LeftCheckboxWithLabel';
|
|
69
|
-
import Table from './components/table/Table';
|
|
69
|
+
import Table, { TypedTable } from './components/table/Table';
|
|
70
70
|
import TableActions from './components/tableActions/TableActions';
|
|
71
71
|
import TableFileNameAndAction from './components/tableFileNameAndAction/TableFileNameAndAction';
|
|
72
72
|
import TableWithOverflow from './components/tableWithOverflow/TableWithOverflow';
|
|
@@ -79,12 +79,14 @@ import TopLoader from './components/topLoader/TopLoader';
|
|
|
79
79
|
import VideoItem from './components/videoItem/VideoItem';
|
|
80
80
|
import VideoModal from './components/videoModal/VideoModal';
|
|
81
81
|
import VideoPlayer from './components/videoPlayer/VideoPlayer';
|
|
82
|
+
import useCallbackedState from './hooks/useCallbackedState/useCallbackedState';
|
|
82
83
|
import useCarouselBehaviour from './hooks/useCarouselBehaviour/useCarouselBehaviour';
|
|
83
84
|
import useDraggableContainer from './hooks/useDraggableContainer/useDraggableContainer';
|
|
84
85
|
import useModalManager from './hooks/useModalManager/useModalManager';
|
|
85
86
|
import useProgressiveCount from './hooks/useProgressiveCount/useProgressiveCount';
|
|
86
87
|
import useTimeElapsed from './hooks/useTimeElapsed/useTimeElapsed';
|
|
87
88
|
import useToastManager from './hooks/useToastManager/useToastManager';
|
|
89
|
+
import useValidatedState from './hooks/useValidatedState/useValidatedState';
|
|
88
90
|
export * from './components/modal/ModalTypes';
|
|
89
91
|
export * from './libraries/BlobFileTypes';
|
|
90
92
|
export * from './libraries/ButtonTheme';
|
|
@@ -100,4 +102,4 @@ export * from './libraries/RadioButtonTheme';
|
|
|
100
102
|
export * from './libraries/SicrediLogoThemes';
|
|
101
103
|
export * from './libraries/Toast';
|
|
102
104
|
export * from './libraries/Tooltips';
|
|
103
|
-
export { Accordion, AdvancedSemiHeader, AssembleiaItem, AssembleiaPauta, Aconteceu, AnimatedLink, Banner, BannerAssembleia, BannerPesquisaCpfCnpj, BigBlockButton, BlocoDeNotas, BreadCrumb, Button, ButtonFileUpload, BlocoMinhasAssembleias, BottomNavigation, Card, Carousel, CarouselPersona, CarouselTouchFrendly, Checkbox, Col, Collapse, Container, DatePicker, Doughnut, DoughnutSquare, DropdownItem, DropdownMenu, EditableVideoItem, ElementPaginator, Etapas, Etiqueta, FileLoader, FileUpload, FooterSicredi, FullHeightContainer, Header, HeaderSeparator, HeaderSearchField, IconButton, IconButtonWithLabel, Information, Input, InputArea, ItemDropdownDownload, InformativoAssembleiasComImagem, InformativoAssembleiasComVideo, Menu, MenuItem, Modal, ModalManager, ModulosTitle, MoneyByMonth, MoneyMonthLineChart, NotaEdit, Notification, PageSubTitle, PageTitle, Paginator, PreviaVideo, ProgressBar, RadioButton, Row, SearchBlocoDeNotas, Select, Switch, Table, TableFileNameAndAction, TableActions, TableWithOverflow, TextEditor, LeftCheckboxWithLabel, ActionsColumn, Toast, ToastManager, Tooltip, TooltipManager, TopLoader, VideoItem, VideoPlayer, VideoModal, useProgressiveCount, useCarouselBehaviour, useDraggableContainer, useTimeElapsed, useModalManager, useToastManager };
|
|
105
|
+
export { Accordion, AdvancedSemiHeader, AssembleiaItem, AssembleiaPauta, Aconteceu, AnimatedLink, Banner, BannerAssembleia, BannerPesquisaCpfCnpj, BigBlockButton, BlocoDeNotas, BreadCrumb, Button, ButtonFileUpload, BlocoMinhasAssembleias, BottomNavigation, Card, Carousel, CarouselPersona, CarouselTouchFrendly, Checkbox, Col, Collapse, Container, DatePicker, Doughnut, DoughnutSquare, DropdownItem, DropdownMenu, EditableVideoItem, ElementPaginator, Etapas, Etiqueta, FileLoader, FileUpload, FooterSicredi, FullHeightContainer, Header, HeaderSeparator, HeaderSearchField, IconButton, IconButtonWithLabel, Information, Input, InputArea, ItemDropdownDownload, InformativoAssembleiasComImagem, InformativoAssembleiasComVideo, Menu, MenuItem, Modal, ModalManager, ModulosTitle, MoneyByMonth, MoneyMonthLineChart, NotaEdit, Notification, PageSubTitle, PageTitle, Paginator, PreviaVideo, ProgressBar, RadioButton, Row, SearchBlocoDeNotas, Select, Switch, Table, TypedTable, TableFileNameAndAction, TableActions, TableWithOverflow, TextEditor, LeftCheckboxWithLabel, ActionsColumn, Toast, ToastManager, Tooltip, TooltipManager, TopLoader, VideoItem, VideoPlayer, VideoModal, useProgressiveCount, useCarouselBehaviour, useDraggableContainer, useTimeElapsed, useModalManager, useToastManager, useCallbackedState, useValidatedState };
|