frst-components 0.28.4 → 0.28.5

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.js CHANGED
@@ -19011,36 +19011,40 @@ const pageButtonList = styled__default["default"].div `
19011
19011
  flex-direction: row;
19012
19012
  gap: 8px;
19013
19013
  `;
19014
- const buttonPage = styled__default["default"].div `
19014
+ const ButtonPage = styled__default["default"].div `
19015
19015
  display: flex;
19016
19016
  justify-content: center;
19017
19017
  align-items: center;
19018
19018
  min-width: 40px;
19019
19019
  height: 40px;
19020
-
19021
19020
  padding: 12px;
19022
19021
  border-radius: 6px;
19023
19022
  cursor: pointer;
19024
19023
 
19025
19024
  user-select: none;
19026
- font-family: 'PT Sans';
19025
+ font-family: 'PT Sans', sans-serif;
19027
19026
  font-size: 16px;
19028
19027
  font-weight: 700;
19029
- color: ${(props) => props.selected ? props.theme.colors.shadeWhite : props.theme.colors.neutralsGrey1};
19030
- background-color: ${(props) => props.selected ? props.theme.colors.primary1 : props.theme.colors.neutralsGrey6};
19031
-
19032
- ${(props) => !props.disabled && styled.css `
19033
- &:hover{
19034
- color: ${({ theme }) => theme.colors.shadeWhite};
19035
- background-color: ${({ theme }) => theme.colors.primary3};
19036
- }
19037
- `};
19038
19028
 
19039
- ${(props) => props.disabled && styled.css `
19040
- color: ${({ theme }) => theme.colors.linkDisabled};
19041
- cursor: not-allowed
19042
- `};
19029
+ color: ${({ selected, theme }) => selected ? theme.colors.shadeWhite : theme.colors.neutralsGrey1};
19030
+
19031
+ background-color: ${({ selected, theme, backgroundColor }) => selected
19032
+ ? (backgroundColor || theme.colors.primary1)
19033
+ : (backgroundColor || theme.colors.neutralsGrey6)};
19034
+
19035
+ ${({ disabled, theme }) => !disabled &&
19036
+ styled.css `
19037
+ &:hover {
19038
+ color: ${theme.colors.shadeWhite};
19039
+ background-color: ${theme.colors.primary3};
19040
+ }
19041
+ `}
19043
19042
 
19043
+ ${({ disabled, theme }) => disabled &&
19044
+ styled.css `
19045
+ color: ${theme.colors.linkDisabled};
19046
+ cursor: not-allowed;
19047
+ `}
19044
19048
  `;
19045
19049
 
19046
19050
  function Pagination(props) {
@@ -19114,12 +19118,7 @@ function Pagination(props) {
19114
19118
  }
19115
19119
  setPaginationElements(elements);
19116
19120
  };
19117
- return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsxs(containerPagination, { style: { ...props.style }, id: 'container-pagination', children: [jsxRuntime.jsx(contentPagination, { id: 'content-pagination', children: props.children }), !IsLoading && Refresh > 0 &&
19118
- jsxRuntime.jsxs(pageButtonList, { id: 'page-button-list', children: [props.showFirstLastButton ?
19119
- jsxRuntime.jsx(buttonPage, { disabled: activePage === 0, onClick: () => activePage > 0 && handleSwitchPage(0), selected: false, children: props.textFirstButton ? props.textFirstButton : 'Primeiro' })
19120
- : null, jsxRuntime.jsx(buttonPage, { disabled: activePage === 0, onClick: () => activePage > 0 && handleSwitchPage(activePage - 1), selected: false, children: jsxRuntime.jsx(BackArrow, { width: '16', height: '16', fill: 'currentColor' }) }), paginationElements.map((item, index) => jsxRuntime.jsx(buttonPage, { disabled: item === '...', onClick: () => item != '...' && handleSwitchPage(item - 1), selected: activePage === item - 1, children: item }, index)), jsxRuntime.jsx(buttonPage, { disabled: activePage === totalPages - 1, onClick: () => activePage < totalPages - 1 && handleSwitchPage(activePage + 1), selected: false, children: jsxRuntime.jsx(FowardArrow, { width: '18', height: '18', fill: 'currentColor' }) }), props.showFirstLastButton ?
19121
- jsxRuntime.jsx(buttonPage, { disabled: activePage === totalPages - 1, onClick: () => activePage < totalPages - 1 && handleSwitchPage(totalPages - 1), selected: false, children: props.textLastButton ? props.textLastButton : 'Último' })
19122
- : null] })] }) }));
19121
+ return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsxs(containerPagination, { style: { ...props.style }, id: "container-pagination", children: [jsxRuntime.jsx(contentPagination, { id: "content-pagination", children: props.children }), !IsLoading && Refresh > 0 && (jsxRuntime.jsxs(pageButtonList, { id: "page-button-list", children: [props.showFirstLastButton ? (jsxRuntime.jsx(ButtonPage, { disabled: activePage === 0, onClick: () => activePage > 0 && handleSwitchPage(0), selected: false, backgroundColor: props.buttonBackgroundColor, children: props.textFirstButton ? props.textFirstButton : 'Primeiro' })) : null, jsxRuntime.jsx(ButtonPage, { disabled: activePage === 0, onClick: () => activePage > 0 && handleSwitchPage(activePage - 1), selected: false, backgroundColor: props.buttonBackgroundColor, children: jsxRuntime.jsx(BackArrow, { width: "16", height: "16", fill: "currentColor" }) }), paginationElements.map((item, index) => (jsxRuntime.jsx(ButtonPage, { disabled: item === '...', onClick: () => item != '...' && handleSwitchPage(item - 1), selected: activePage === item - 1, backgroundColor: props.buttonBackgroundColor, children: item }, index))), jsxRuntime.jsx(ButtonPage, { disabled: activePage === totalPages - 1, onClick: () => activePage < totalPages - 1 && handleSwitchPage(activePage + 1), selected: false, backgroundColor: props.buttonBackgroundColor, children: jsxRuntime.jsx(FowardArrow, { width: "18", height: "18", fill: "currentColor" }) }), props.showFirstLastButton ? (jsxRuntime.jsx(ButtonPage, { disabled: activePage === totalPages - 1, onClick: () => activePage < totalPages - 1 && handleSwitchPage(totalPages - 1), selected: false, backgroundColor: props.buttonBackgroundColor, children: props.textLastButton ? props.textLastButton : 'Último' })) : null] }))] }) }));
19123
19122
  }
19124
19123
 
19125
19124
  const containerThumbContent = styled__default["default"].div `
@@ -1,16 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  interface IPagination {
3
- /**
4
- * @prop {number} totalRegistry: Quantidade total de registros a serem paginados
5
- */
6
3
  totalRegistry: number;
7
- /**
8
- * @prop {number} registryPerPage: Quantidade de registros a serem exibidos por página
9
- */
10
4
  registryPerPage: number;
11
- /**
12
- * @prop {number} qtdNumberShowPagination: Quantidade de botões a serem exibidos na paginação
13
- */
14
5
  qtdNumberShowPagination: number;
15
6
  showFirstLastButton?: boolean;
16
7
  isLoading?: boolean;
@@ -19,6 +10,7 @@ interface IPagination {
19
10
  children: React.ReactNode;
20
11
  onLoadPage: (page: number) => void;
21
12
  style?: React.CSSProperties;
13
+ buttonBackgroundColor?: string;
22
14
  }
23
15
  export default function Pagination(props: IPagination): import("react/jsx-runtime").JSX.Element;
24
16
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/IJ/pagination/index.tsx"],"names":[],"mappings":";AAMA,UAAU,WAAW;IACjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,uBAAuB,EAAE,MAAM,CAAA;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,UAAU,EAAE,CAAC,IAAI,EAAG,MAAM,KAAK,IAAI,CAAA;IAEnC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAE9B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAE,KAAK,EAAG,WAAW,2CA0HtD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/IJ/pagination/index.tsx"],"names":[],"mappings":";AAMA,UAAU,WAAW;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,uBAAuB,EAAE,MAAM,CAAA;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAA;CACjC;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,WAAW,2CAyIpD"}
@@ -1,10 +1,11 @@
1
- interface buttonProps {
1
+ interface ButtonProps {
2
2
  selected: boolean;
3
3
  disabled: boolean;
4
+ backgroundColor?: string;
4
5
  }
5
6
  export declare const containerPagination: import("styled-components").StyledComponent<"div", any, {}, never>;
6
7
  export declare const contentPagination: import("styled-components").StyledComponent<"div", any, {}, never>;
7
8
  export declare const pageButtonList: import("styled-components").StyledComponent<"div", any, {}, never>;
8
- export declare const buttonPage: import("styled-components").StyledComponent<"div", any, buttonProps, never>;
9
+ export declare const ButtonPage: import("styled-components").StyledComponent<"div", any, ButtonProps, never>;
9
10
  export {};
10
11
  //# sourceMappingURL=paginationStyles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"paginationStyles.d.ts","sourceRoot":"","sources":["../../../../../src/components/IJ/pagination/paginationStyles.ts"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;CACpB;AAED,eAAO,MAAM,mBAAmB,oEAK/B,CAAA;AAED,eAAO,MAAM,iBAAiB,oEAM7B,CAAA;AAED,eAAO,MAAM,cAAc,oEAM1B,CAAA;AAED,eAAO,MAAM,UAAU,6EA8BtB,CAAA"}
1
+ {"version":3,"file":"paginationStyles.d.ts","sourceRoot":"","sources":["../../../../../src/components/IJ/pagination/paginationStyles.ts"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,mBAAmB,oEAK/B,CAAA;AAED,eAAO,MAAM,iBAAiB,oEAM7B,CAAA;AAED,eAAO,MAAM,cAAc,oEAM1B,CAAA;AAED,eAAO,MAAM,UAAU,6EAsCtB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "frst-components",
3
3
  "homepage": "http://FRST-Falconi.github.io/storybook.frstfalconi.com",
4
- "version": "0.28.4",
4
+ "version": "0.28.5",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",