plataforma-fundacao-componentes 2.22.24 → 2.22.25

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.
@@ -5,6 +5,7 @@ interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
5
5
  'tooltip-position'?: TooltipPosition;
6
6
  'tooltip-text'?: string;
7
7
  fluid?: boolean;
8
+ position?: 'fixed' | 'absolute';
8
9
  verticalPadding?: boolean;
9
10
  hasMobileButton?: boolean;
10
11
  hasHeader?: boolean;
@@ -5,4 +5,5 @@ declare namespace _default {
5
5
  export default _default;
6
6
  export function FirstExample(): JSX.Element;
7
7
  export function NoContentExample(): JSX.Element;
8
+ export function ContainerExample(): JSX.Element;
8
9
  import FullHeightContainer from "./FullHeightContainer";
@@ -0,0 +1,2 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ export default function useStorageState<T = any>(storage: Storage, key: string, initialValue?: T | undefined): [T | undefined, Dispatch<SetStateAction<T | undefined>>];
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import useStorageState from './useStorageState';
3
+ declare const _default: {
4
+ title: string;
5
+ component: typeof useStorageState;
6
+ };
7
+ export default _default;
8
+ export declare const LocalStorageExample: () => JSX.Element;
9
+ export declare const SessionStorageExample: () => JSX.Element;
10
+ export declare const ObjectExample: () => JSX.Element;
package/dist/index.css CHANGED
@@ -9698,6 +9698,7 @@ h5 {
9698
9698
  flex-flow: column;
9699
9699
  flex: 1 1 auto;
9700
9700
  overflow-y: overlay;
9701
+ position: relative;
9701
9702
  padding: 0; }
9702
9703
  .full-height-container .full-height-container-row-content.vertical-padding {
9703
9704
  padding-top: 12px;
package/dist/index.d.ts CHANGED
@@ -89,6 +89,7 @@ import useDropOpened from './hooks/useDropOpened/useDropOpened';
89
89
  import useModalManager from './hooks/useModalManager/useModalManager';
90
90
  import useProgressiveCount from './hooks/useProgressiveCount/useProgressiveCount';
91
91
  import useScreenSize from './hooks/useScreenSize/useScreenSize';
92
+ import useStorageState from './hooks/useStorageState/useStorageState';
92
93
  import useTimeElapsed from './hooks/useTimeElapsed/useTimeElapsed';
93
94
  import useToastManager from './hooks/useToastManager/useToastManager';
94
95
  import useValidatedState from './hooks/useValidatedState/useValidatedState';
@@ -110,4 +111,4 @@ export * from './libraries/RadioButtonTheme';
110
111
  export * from './libraries/SicrediLogoThemes';
111
112
  export * from './libraries/Toast';
112
113
  export * from './libraries/Tooltips';
113
- export { Accordion, ActionCard, 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, Tabs, Toast, ToastManager, Tooltip, TooltipManager, TopLoader, VideoItem, VideoPlayer, VideoModal, useCallbackedState, useCarouselBehaviour, useControlledTimer, useDraggableContainer, useDropOpened, useModalManager, useProgressiveCount, useScreenSize, useTimeElapsed, useToastManager, useValidatedState, };
114
+ export { Accordion, ActionCard, 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, Tabs, Toast, ToastManager, Tooltip, TooltipManager, TopLoader, VideoItem, VideoPlayer, VideoModal, useCallbackedState, useCarouselBehaviour, useControlledTimer, useDraggableContainer, useDropOpened, useModalManager, useProgressiveCount, useScreenSize, useStorageState, useTimeElapsed, useToastManager, useValidatedState, };
package/dist/index.js CHANGED
@@ -4016,9 +4016,13 @@ var rootClassName$N = 'component-container';
4016
4016
  function Container(props) {
4017
4017
  var getProps = function getProps() {
4018
4018
  var p = _extends({}, props, {
4019
- className: getMergedClassNames([rootClassName$N, props.className, props.fluid ? 'fluid' : '', props.verticalPadding ? 'vertical-padding' : '', props.hasMobileButton ? 'has-mobile-button' : '', props.hasHeader ? 'has-header' : '', props.hasAdvancedHeader ? 'has-advanced-header' : ''])
4019
+ className: getMergedClassNames([rootClassName$N, props.className, props.fluid ? 'fluid' : '', props.verticalPadding ? 'vertical-padding' : '', props.hasMobileButton ? 'has-mobile-button' : '', props.hasHeader ? 'has-header' : '', props.hasAdvancedHeader ? 'has-advanced-header' : '']),
4020
+ style: _extends({}, props.style, {
4021
+ position: props.position
4022
+ })
4020
4023
  });
4021
4024
 
4025
+ delete p.position;
4022
4026
  delete p.fluid;
4023
4027
  delete p.verticalPadding;
4024
4028
  delete p.hasMobileButton;
@@ -11648,6 +11652,26 @@ function useModalManager() {
11648
11652
  }))), openModal, closeModal];
11649
11653
  }
11650
11654
 
11655
+ function useStorageState(storage, key, initialValue) {
11656
+ var _useState = React.useState(initialValue),
11657
+ value = _useState[0],
11658
+ setValue = _useState[1];
11659
+
11660
+ React.useEffect(function () {
11661
+ if (!initialValue && storage.getItem(key) && storage.getItem(key) !== 'undefined') {
11662
+ try {
11663
+ setValue(JSON.parse(storage.getItem(key)));
11664
+ } catch (e) {
11665
+ console.error(e);
11666
+ }
11667
+ }
11668
+ }, []);
11669
+ React.useEffect(function () {
11670
+ storage.setItem(key, JSON.stringify(value));
11671
+ }, [key, storage, value]);
11672
+ return [value, setValue];
11673
+ }
11674
+
11651
11675
  var rootClassName$23 = 'comp-toast-manager';
11652
11676
  var count$1 = 0;
11653
11677
  function useToastManager(props) {
@@ -12045,6 +12069,7 @@ exports.useDropOpened = useDropOpened;
12045
12069
  exports.useModalManager = useModalManager;
12046
12070
  exports.useProgressiveCount = useProgressiveCount;
12047
12071
  exports.useScreenSize = useScreenSize;
12072
+ exports.useStorageState = useStorageState;
12048
12073
  exports.useTimeElapsed = useTimeElapsed;
12049
12074
  exports.useToastManager = useToastManager;
12050
12075
  exports.useValidatedState = useValidatedState;