plataforma-fundacao-componentes 2.20.26 → 2.21.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 (30) hide show
  1. package/dist/components/bannerPesquisaCpfCnpj/BannerPesquisaCpfCnpj.d.ts +1 -0
  2. package/dist/components/bannerPesquisaCpfCnpj/BannerPesquisaCpfCnpj.stories.d.ts +1 -0
  3. package/dist/components/bottomNavigation/BottomNavigation.d.ts +1 -1
  4. package/dist/components/breadCrumb/BreadCrumb.d.ts +1 -1
  5. package/dist/components/fullHeightContainer/FullHeightContainer.d.ts +3 -3
  6. package/dist/components/header/Header.d.ts +1 -1
  7. package/dist/components/input/Input.stories.d.ts +18 -18
  8. package/dist/components/modal/ModalTypes.d.ts +43 -24
  9. package/dist/components/modalManager/ModalManager.d.ts +1 -1
  10. package/dist/components/notification/Notification.d.ts +1 -1
  11. package/dist/components/table/Table.d.ts +26 -7
  12. package/dist/components/table/Table.stories.d.ts +13 -11
  13. package/dist/components/toastManager/ToastManager.d.ts +1 -1
  14. package/dist/hooks/useCallbackedState/useCallbackedState.d.ts +2 -0
  15. package/dist/hooks/useCarouselBehaviour/useCarouselBehaviour.d.ts +1 -1
  16. package/dist/hooks/useModalManager/useModalManager.d.ts +4 -0
  17. package/dist/hooks/useModalManager/useModalManager.stories.d.ts +8 -0
  18. package/dist/hooks/usePosition/usePosition.d.ts +0 -0
  19. package/dist/hooks/useToastManager/useToastManager.d.ts +19 -0
  20. package/dist/hooks/useToastManager/useToastManager.stories.d.ts +8 -0
  21. package/dist/hooks/useValidatedState/useValidatedState.d.ts +8 -0
  22. package/dist/index.css +4 -0
  23. package/dist/index.d.ts +6 -2
  24. package/dist/index.js +328 -72
  25. package/dist/index.js.map +1 -1
  26. package/dist/index.modern.js +324 -73
  27. package/dist/index.modern.js.map +1 -1
  28. package/dist/utils/ValidationUtils.d.ts +10 -8
  29. package/package.json +8 -8
  30. package/dist/utils/ArrayUtils.d.ts +0 -1
@@ -7,6 +7,7 @@ interface BannerPesquisaCpfCnpjProps {
7
7
  inputProps?: InputProps;
8
8
  urlImg?: string;
9
9
  theme?: 'white' | 'secondary-light' | 'secondary-lighter';
10
+ captcha?: React.ReactNode;
10
11
  }
11
12
  declare function BannerPesquisaCpfCnpj(props: BannerPesquisaCpfCnpjProps): JSX.Element;
12
13
  declare namespace BannerPesquisaCpfCnpj {
@@ -4,4 +4,5 @@ declare namespace _default {
4
4
  }
5
5
  export default _default;
6
6
  export function FirstExample(): JSX.Element;
7
+ export function CaptchaExample(): JSX.Element;
7
8
  import BannerPesquisaCpfCnpj from "./BannerPesquisaCpfCnpj";
@@ -4,7 +4,7 @@ interface BottomNavigationProps {
4
4
  atual: number;
5
5
  setAtual: (newAtual: number) => void;
6
6
  itens: {
7
- icon: React.ReactElement;
7
+ icon: React.ReactNode;
8
8
  label: string;
9
9
  notificationCount?: number;
10
10
  }[];
@@ -3,7 +3,7 @@ import './BreadCrumb.scss';
3
3
  interface BreadCrumbProps {
4
4
  path: {
5
5
  label: string;
6
- onClick: () => void;
6
+ onClick?: () => void;
7
7
  }[];
8
8
  }
9
9
  declare function BreadCrumb(props: BreadCrumbProps): JSX.Element;
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import './FullHeightContainer.scss';
3
3
  interface FullHeightContainerProps {
4
- header?: React.ReactElement;
5
- fixedFooter?: React.ReactElement;
4
+ header?: React.ReactNode;
5
+ fixedFooter?: React.ReactNode;
6
6
  verticalPadding?: boolean;
7
7
  horizontalPadding?: boolean;
8
- children?: React.ReactElement;
8
+ children?: React.ReactNode;
9
9
  }
10
10
  declare function FullHeightContainer(props: FullHeightContainerProps): JSX.Element;
11
11
  declare namespace FullHeightContainer {
@@ -18,7 +18,7 @@ interface HeaderProps {
18
18
  show: boolean;
19
19
  label: string;
20
20
  link: string;
21
- icon: React.ReactElement;
21
+ icon: React.ReactNode;
22
22
  target?: '_blank';
23
23
  };
24
24
  separator?: {
@@ -1,19 +1,19 @@
1
- declare namespace _default {
2
- export const title: string;
3
- export { Input as component };
4
- }
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
5
  export default _default;
6
- export function Primary(): JSX.Element;
7
- export function PrimaryFormat(): JSX.Element;
8
- export function RightObject(): JSX.Element;
9
- export function ButtonLoading(): JSX.Element;
10
- export function Counter(): JSX.Element;
11
- export function CounterAndMaxLength(): JSX.Element;
12
- export function Error(): JSX.Element;
13
- export function Loading(): JSX.Element;
14
- export function LoadingWithValue(): JSX.Element;
15
- export function Disabled(): JSX.Element;
16
- export function DisabledWithValue(): JSX.Element;
17
- export function DisabledAndLoading(): JSX.Element;
18
- export function ForceFocus(): JSX.Element;
19
- import Input from "./Input";
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;
@@ -1,27 +1,46 @@
1
- export function AlertModal(props: any): JSX.Element;
2
- export namespace AlertModal {
3
- export const propTypes: any;
4
- export namespace defaultProps {
5
- export const showIcons: boolean;
6
- }
1
+ /// <reference types="react" />
2
+ import { ModalProps } from './Modal';
3
+ interface AlertModalProps extends ModalProps {
4
+ language?: {
5
+ confirm: string;
6
+ };
7
+ onConfirm: () => void;
8
+ showIcons?: boolean;
7
9
  }
8
- export function ConfirmModal(props: any): JSX.Element;
9
- export namespace ConfirmModal {
10
- const propTypes_1: any;
11
- export { propTypes_1 as propTypes };
12
- export namespace defaultProps_1 {
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
- export function DestructiveModal(props: any): JSX.Element;
19
- export namespace DestructiveModal {
20
- const propTypes_2: any;
21
- export { propTypes_2 as propTypes };
22
- export namespace defaultProps_2 {
23
- const showIcons_2: boolean;
24
- export { showIcons_2 as showIcons };
25
- }
26
- export { defaultProps_2 as defaultProps };
16
+ interface ConfirmModalProps extends ModalProps {
17
+ language?: {
18
+ confirm: string;
19
+ cancel: string;
20
+ };
21
+ onConfirm: () => void;
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;
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 {};
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
+ import './../../hooks/useModalManager/useModalManager.scss';
2
3
  import './../modal/Modal.scss';
3
- import './ModalManager.scss';
4
4
  export declare const ModalManager: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
@@ -8,7 +8,7 @@ interface NotificationProps {
8
8
  verticalOuter?: number;
9
9
  horizontalOuter?: number;
10
10
  className?: string;
11
- children: React.ReactElement;
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
- export interface TableProps {
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
- declare namespace _default {
2
- export const title: string;
3
- export { Table as component };
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 function Example(): JSX.Element;
7
- export function TableLikeZeplin(): JSX.Element;
8
- export function Draggable(): JSX.Element;
9
- export function ConfirmSort(): JSX.Element;
10
- export function WithActions(): JSX.Element;
11
- export function UpperHeader(): JSX.Element;
12
- import Table from "./Table";
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,5 +1,5 @@
1
1
  import React from 'react';
2
- import './ToastManager.scss';
2
+ import './../../hooks/useToastManager/useToastManager.scss';
3
3
  interface ToastManagerProps {
4
4
  max?: string | number;
5
5
  marginTop?: string | number;
@@ -0,0 +1,2 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ export default function useCallbackedState<T = any>(callback: (newValue: any) => void, initialValue?: T | undefined): [T | undefined, Dispatch<SetStateAction<T | undefined>>];
@@ -7,5 +7,5 @@ interface CarouselBehaviourProps {
7
7
  slides: any[];
8
8
  draggable?: boolean;
9
9
  }
10
- declare function useCarouselBehaviour(props: CarouselBehaviourProps): [React.ReactElement, (newAtual: number, onScroll: boolean) => void];
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];
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import useModalManager from './useModalManager';
3
+ declare const _default: {
4
+ title: string;
5
+ component: typeof useModalManager;
6
+ };
7
+ export default _default;
8
+ export declare const Default: () => JSX.Element;
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
+ /// <reference types="react" />
2
+ import useToastManager from './useToastManager';
3
+ declare const _default: {
4
+ title: string;
5
+ component: typeof useToastManager;
6
+ };
7
+ export default _default;
8
+ export declare const Default: () => JSX.Element;
@@ -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.css CHANGED
@@ -3553,6 +3553,8 @@ h5 {
3553
3553
  padding: 3%;
3554
3554
  height: 412px;
3555
3555
  width: 50%; }
3556
+ .banner-pesquisa-cpf-cnpj .banner-pesquisa-cpf-cnpj-left.plus {
3557
+ height: 500px; }
3556
3558
  @media screen and (max-width: 767.98px) {
3557
3559
  .banner-pesquisa-cpf-cnpj .banner-pesquisa-cpf-cnpj-left {
3558
3560
  width: 100%;
@@ -3579,6 +3581,8 @@ h5 {
3579
3581
  width: 50%;
3580
3582
  background-size: cover;
3581
3583
  background-position: center; }
3584
+ .banner-pesquisa-cpf-cnpj .banner-pesquisa-cpf-cnpj-image.plus {
3585
+ height: 500px; }
3582
3586
  .banner-pesquisa-cpf-cnpj .banner-pesquisa-cpf-cnpj-image img {
3583
3587
  display: none; }
3584
3588
  @media screen and (max-width: 767.98px) {
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 };