plataforma-fundacao-componentes 2.20.27 → 2.21.2
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/bottomNavigation/BottomNavigation.d.ts +1 -1
- package/dist/components/breadCrumb/BreadCrumb.d.ts +1 -1
- package/dist/components/button/Button.d.ts +3 -2
- package/dist/components/fullHeightContainer/FullHeightContainer.d.ts +3 -3
- package/dist/components/header/Header.d.ts +1 -1
- 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 +43 -24
- package/dist/components/modalManager/ModalManager.d.ts +1 -1
- package/dist/components/notification/Notification.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/components/toastManager/ToastManager.d.ts +1 -1
- package/dist/hooks/useCallbackedState/useCallbackedState.d.ts +2 -0
- package/dist/hooks/useCarouselBehaviour/useCarouselBehaviour.d.ts +1 -1
- package/dist/hooks/useModalManager/useModalManager.d.ts +4 -0
- package/dist/hooks/useModalManager/useModalManager.stories.d.ts +8 -0
- package/dist/hooks/usePosition/usePosition.d.ts +0 -0
- package/dist/hooks/useToastManager/useToastManager.d.ts +19 -0
- package/dist/hooks/useToastManager/useToastManager.stories.d.ts +8 -0
- package/dist/hooks/useValidatedState/useValidatedState.d.ts +8 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +3132 -2823
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +3128 -2824
- 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,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './FullHeightContainer.scss';
|
|
3
3
|
interface FullHeightContainerProps {
|
|
4
|
-
header?: React.
|
|
5
|
-
fixedFooter?: React.
|
|
4
|
+
header?: React.ReactNode;
|
|
5
|
+
fixedFooter?: React.ReactNode;
|
|
6
6
|
verticalPadding?: boolean;
|
|
7
7
|
horizontalPadding?: boolean;
|
|
8
|
-
children?: React.
|
|
8
|
+
children?: React.ReactNode;
|
|
9
9
|
}
|
|
10
10
|
declare function FullHeightContainer(props: FullHeightContainerProps): JSX.Element;
|
|
11
11
|
declare namespace FullHeightContainer {
|
|
@@ -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;
|
|
@@ -1,27 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ModalProps } from './Modal';
|
|
3
|
+
interface AlertModalProps extends ModalProps {
|
|
4
|
+
language?: {
|
|
5
|
+
confirm: string;
|
|
6
|
+
};
|
|
7
|
+
onConfirm: () => void | Promise<any>;
|
|
8
|
+
showIcons?: boolean;
|
|
7
9
|
}
|
|
8
|
-
export function
|
|
9
|
-
export namespace
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const showIcons_1: boolean;
|
|
14
|
-
export { showIcons_1 as showIcons };
|
|
15
|
-
}
|
|
16
|
-
export { defaultProps_1 as defaultProps };
|
|
10
|
+
export declare function AlertModal(props: AlertModalProps): JSX.Element;
|
|
11
|
+
export declare namespace AlertModal {
|
|
12
|
+
var defaultProps: {
|
|
13
|
+
showIcons: boolean;
|
|
14
|
+
};
|
|
17
15
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export { defaultProps_2 as defaultProps };
|
|
16
|
+
interface ConfirmModalProps extends ModalProps {
|
|
17
|
+
language?: {
|
|
18
|
+
confirm: string;
|
|
19
|
+
cancel: string;
|
|
20
|
+
};
|
|
21
|
+
onConfirm: () => void | Promise<any>;
|
|
22
|
+
onCancel: () => void;
|
|
23
|
+
showIcons?: boolean;
|
|
27
24
|
}
|
|
25
|
+
export declare function ConfirmModal(props: ConfirmModalProps): JSX.Element;
|
|
26
|
+
export declare namespace ConfirmModal {
|
|
27
|
+
var defaultProps: {
|
|
28
|
+
showIcons: boolean;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
interface DestructiveModalProps extends ModalProps {
|
|
32
|
+
language?: {
|
|
33
|
+
confirm: string;
|
|
34
|
+
cancel: string;
|
|
35
|
+
};
|
|
36
|
+
onConfirm: () => void | Promise<any>;
|
|
37
|
+
onCancel: () => void;
|
|
38
|
+
showIcons?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare function DestructiveModal(props: DestructiveModalProps): JSX.Element;
|
|
41
|
+
export declare namespace DestructiveModal {
|
|
42
|
+
var defaultProps: {
|
|
43
|
+
showIcons: boolean;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -8,7 +8,7 @@ interface NotificationProps {
|
|
|
8
8
|
verticalOuter?: number;
|
|
9
9
|
horizontalOuter?: number;
|
|
10
10
|
className?: string;
|
|
11
|
-
children: React.
|
|
11
|
+
children: React.ReactNode;
|
|
12
12
|
}
|
|
13
13
|
declare function Notification(props: NotificationProps): JSX.Element;
|
|
14
14
|
declare namespace Notification {
|
|
@@ -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;
|
|
@@ -7,5 +7,5 @@ interface CarouselBehaviourProps {
|
|
|
7
7
|
slides: any[];
|
|
8
8
|
draggable?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare function useCarouselBehaviour(props: CarouselBehaviourProps): [React.
|
|
10
|
+
declare function useCarouselBehaviour(props: CarouselBehaviourProps): [React.ReactNode, (newAtual: number, onScroll: boolean) => void];
|
|
11
11
|
export default useCarouselBehaviour;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './../../components/modal/Modal.scss';
|
|
3
|
+
import './useModalManager.scss';
|
|
4
|
+
export default function useModalManager(): [React.ReactNode, <C extends React.ElementType, P extends React.ComponentProps<C>>(component: C, modalProps: P) => void, (modalKey: string | number) => void];
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ToastProps } from '../../components/toast/Toast';
|
|
3
|
+
export interface ToastManagerProps {
|
|
4
|
+
max?: string | number;
|
|
5
|
+
marginTop?: string | number;
|
|
6
|
+
verticalPosition?: 'top' | 'bottom';
|
|
7
|
+
horizontalPosition?: 'left' | 'right' | 'center';
|
|
8
|
+
reverse?: boolean;
|
|
9
|
+
animateSize?: boolean;
|
|
10
|
+
pauseOnFocusLoss?: boolean;
|
|
11
|
+
}
|
|
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,10 +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';
|
|
85
|
+
import useModalManager from './hooks/useModalManager/useModalManager';
|
|
84
86
|
import useProgressiveCount from './hooks/useProgressiveCount/useProgressiveCount';
|
|
85
87
|
import useTimeElapsed from './hooks/useTimeElapsed/useTimeElapsed';
|
|
88
|
+
import useToastManager from './hooks/useToastManager/useToastManager';
|
|
89
|
+
import useValidatedState from './hooks/useValidatedState/useValidatedState';
|
|
86
90
|
export * from './components/modal/ModalTypes';
|
|
87
91
|
export * from './libraries/BlobFileTypes';
|
|
88
92
|
export * from './libraries/ButtonTheme';
|
|
@@ -98,4 +102,4 @@ export * from './libraries/RadioButtonTheme';
|
|
|
98
102
|
export * from './libraries/SicrediLogoThemes';
|
|
99
103
|
export * from './libraries/Toast';
|
|
100
104
|
export * from './libraries/Tooltips';
|
|
101
|
-
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 };
|
|
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 };
|