pge-front-common 10.2.0 → 10.2.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.
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Checkbox } from "./index";
3
+ declare const meta: Meta<typeof Checkbox>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Unchecked: Story;
8
+ export declare const Disabled: Story;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { CheckboxProps } from "./index.type";
3
+ export declare const Checkbox: ({ checked, disabled, onChange }: CheckboxProps) => React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ export type CheckboxProps = {
2
+ checked?: boolean;
3
+ disabled?: boolean;
4
+ onChange?: (checked: boolean) => void;
5
+ };
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { InformativeBoxProps } from "./index.type";
3
- declare const InformativeBox: ({ infoType, title, message, onClose, ...props }: InformativeBoxProps) => React.JSX.Element;
3
+ declare const InformativeBox: ({ infoType, title, message, onClose, hasDismissButton, ...props }: InformativeBoxProps) => React.JSX.Element;
4
4
  export { InformativeBox };
@@ -3,5 +3,6 @@ export interface InformativeBoxProps extends HtmlHTMLAttributes<HTMLDivElement>
3
3
  infoType: 'success' | 'alert' | 'warning' | 'informative';
4
4
  title: string;
5
5
  message: string;
6
+ hasDismissButton?: boolean;
6
7
  onClose?: () => void;
7
8
  }
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { TableComponentProps } from "./index.types";
3
- declare const TableComponent: ({ columns, data, onSort, renderCell, onActionClick, noRecordsMessage, hasIcon, renderActionIconCell, }: TableComponentProps) => React.JSX.Element;
3
+ declare const TableComponent: ({ columns, data, onSort, renderCell, onActionClick, noRecordsMessage, hasIcon, renderActionIconCell, columnIcon }: TableComponentProps) => React.JSX.Element;
4
4
  export default TableComponent;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  export interface Column {
2
3
  name: string;
3
4
  uid: string;
@@ -16,4 +17,5 @@ export interface TableComponentProps {
16
17
  noRecordsMessage?: string;
17
18
  hasIcon?: boolean;
18
19
  renderActionIconCell: (item: any) => React.JSX.Element | null;
20
+ columnIcon?: React.ReactNode;
19
21
  }
@@ -0,0 +1,2 @@
1
+ import React, { SVGProps } from "react";
2
+ export declare const IconCheck: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
@@ -26,4 +26,7 @@ import { LogoRhDigital } from "./logo-rh-digital";
26
26
  import { LogoPGERG } from "./logo-pge-rj";
27
27
  import { IconInvisibility } from "./invisibility-icon";
28
28
  import { IconPdf } from "./pdf-icon";
29
- export { IconDownload, IconVisibility, IconEdit, IconDelete, IconCalendar, IconProfile, IconUpload, IconNewTab, IconWarning, IconCheckCircle, IconEventAvaliable, IconLogout, IconCLose, IconAdd, IconRemove, IconCircleExpland, IconCircleRecall, IconArrowExpland, IconArrowRecall, IconTriangleExpand, IconTriangleRecall, IconSwap, IconAddCell, MenuIcon, LogoRhDigital, LogoPGERG, IconInvisibility, IconPdf };
29
+ import { IconSearch } from "./search-icon";
30
+ import { IconUpAndDownArror } from "./up-down-arrow";
31
+ import { IconCheck } from "./check-icon";
32
+ export { IconDownload, IconVisibility, IconEdit, IconDelete, IconCalendar, IconProfile, IconUpload, IconNewTab, IconWarning, IconCheckCircle, IconEventAvaliable, IconLogout, IconCLose, IconAdd, IconRemove, IconCircleExpland, IconCircleRecall, IconArrowExpland, IconArrowRecall, IconTriangleExpand, IconTriangleRecall, IconSwap, IconAddCell, MenuIcon, LogoRhDigital, LogoPGERG, IconInvisibility, IconPdf, IconSearch, IconUpAndDownArror, IconCheck };
@@ -0,0 +1,2 @@
1
+ import React, { SVGProps } from "react";
2
+ export declare const IconSearch: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React, { SVGProps } from "react";
2
+ export declare const IconUpAndDownArror: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
package/lib/index.d.ts CHANGED
@@ -25,10 +25,19 @@ interface InformativeBoxProps extends HtmlHTMLAttributes<HTMLDivElement> {
25
25
  infoType: 'success' | 'alert' | 'warning' | 'informative';
26
26
  title: string;
27
27
  message: string;
28
+ hasDismissButton?: boolean;
28
29
  onClose?: () => void;
29
30
  }
30
31
 
31
- declare const InformativeBox: ({ infoType, title, message, onClose, ...props }: InformativeBoxProps) => React__default.JSX.Element;
32
+ declare const InformativeBox: ({ infoType, title, message, onClose, hasDismissButton, ...props }: InformativeBoxProps) => React__default.JSX.Element;
33
+
34
+ type CheckboxProps = {
35
+ checked?: boolean;
36
+ disabled?: boolean;
37
+ onChange?: (checked: boolean) => void;
38
+ };
39
+
40
+ declare const Checkbox: ({ checked, disabled, onChange }: CheckboxProps) => React__default.JSX.Element;
32
41
 
33
42
  interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
34
43
  customClass?: string;
@@ -161,6 +170,23 @@ interface Props {
161
170
  }
162
171
  declare const PaginationTable: ({ currentPage, countPage, itemsVisiblePage, handleClickPage, }: Omit<Props, "header" | "body" | "footer">) => React__default.JSX.Element;
163
172
 
173
+ interface PaginationProps {
174
+ countPage: number;
175
+ currentPage: number;
176
+ totalItems: number;
177
+ itemsPerPage: number;
178
+ handlePrevious: () => void;
179
+ handleNext: () => void;
180
+ handleItemPorPage: (value: number) => void;
181
+ handlePage: (value: number) => void;
182
+ pagina: number;
183
+ defaultOptions?: {
184
+ value: number;
185
+ label: string;
186
+ }[];
187
+ }
188
+ declare const Pagination: React__default.FC<PaginationProps>;
189
+
164
190
  interface SelectMultProps {
165
191
  name: string;
166
192
  optionsSelect: OptionsProps[];
@@ -193,7 +219,7 @@ interface Column {
193
219
  name: string;
194
220
  uid: string;
195
221
  sortable?: boolean;
196
- renderCell?: (item: any) => React.ReactNode;
222
+ renderCell?: (item: any) => React__default.ReactNode;
197
223
  }
198
224
  interface TableComponentProps {
199
225
  columns: Column[];
@@ -201,15 +227,16 @@ interface TableComponentProps {
201
227
  sortedColumn: string;
202
228
  sortDirection: "asc" | "desc";
203
229
  onSort: (uid: string) => void;
204
- renderCell: (item: any, columnUid: string) => React.ReactNode;
230
+ renderCell: (item: any, columnUid: string) => React__default.ReactNode;
205
231
  onActionClick?: (item: any) => void;
206
- actionIcon?: React.ReactNode;
232
+ actionIcon?: React__default.ReactNode;
207
233
  noRecordsMessage?: string;
208
234
  hasIcon?: boolean;
209
- renderActionIconCell: (item: any) => React.JSX.Element | null;
235
+ renderActionIconCell: (item: any) => React__default.JSX.Element | null;
236
+ columnIcon?: React__default.ReactNode;
210
237
  }
211
238
 
212
- declare const TableComponent: ({ columns, data, onSort, renderCell, onActionClick, noRecordsMessage, hasIcon, renderActionIconCell, }: TableComponentProps) => React__default.JSX.Element;
239
+ declare const TableComponent: ({ columns, data, onSort, renderCell, onActionClick, noRecordsMessage, hasIcon, renderActionIconCell, columnIcon }: TableComponentProps) => React__default.JSX.Element;
213
240
 
214
241
  declare const IconDownload: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
215
242
 
@@ -259,4 +286,10 @@ declare const IconAddCell: (props?: SVGProps<SVGSVGElement>) => React__default.J
259
286
 
260
287
  declare const IconInvisibility: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
261
288
 
262
- export { Accordion, AccordionItem, type AccordionItemProps, BoxError, BoxSuccess, Button, type ButtonProps, type Column, FooterComponent as Footer, Header, IconAdd, IconAddCell, IconArrowExpland, IconArrowRecall, IconCLose, IconCalendar, IconCheckCircle, IconCircleExpland, IconCircleRecall, IconDelete, IconDownload, IconEdit, IconEventAvaliable, IconInvisibility, IconLogout, IconNewTab, IconProfile, IconRemove, IconSwap, IconTriangleExpand, IconTriangleRecall, IconUpload, IconVisibility, IconWarning, InformativeBox, type InformativeBoxProps, InputBase, type InputProps, LoadingSpinner, SelectMult as Multiselect, type OptionsProps, PaginationTable, PasswordInput, RadioGroupBase, type RadioGroupBaseProps, type SelectMultProps, TableComponent, type TableComponentProps, TextareaBase, type TextareaBaseProps, Title };
289
+ declare const IconSearch: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
290
+
291
+ declare const IconUpAndDownArror: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
292
+
293
+ declare const IconCheck: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
294
+
295
+ export { Accordion, AccordionItem, type AccordionItemProps, BoxError, BoxSuccess, Button, type ButtonProps, Checkbox, type Column, FooterComponent as Footer, Header, IconAdd, IconAddCell, IconArrowExpland, IconArrowRecall, IconCLose, IconCalendar, IconCheck, IconCheckCircle, IconCircleExpland, IconCircleRecall, IconDelete, IconDownload, IconEdit, IconEventAvaliable, IconInvisibility, IconLogout, IconNewTab, IconProfile, IconRemove, IconSearch, IconSwap, IconTriangleExpand, IconTriangleRecall, IconUpAndDownArror, IconUpload, IconVisibility, IconWarning, InformativeBox, type InformativeBoxProps, InputBase, type InputProps, LoadingSpinner, SelectMult as Multiselect, type OptionsProps, PaginationTable, Pagination as PaginationV2, PasswordInput, RadioGroupBase, type RadioGroupBaseProps, type SelectMultProps, TableComponent, type TableComponentProps, TextareaBase, type TextareaBaseProps, Title };