pge-front-common 10.1.0 → 10.1.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 { InformativeBox } from "./index";
3
+ declare const meta: Meta<typeof InformativeBox>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Success: Story;
8
+ export declare const Warning: Story;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { InformativeBoxProps } from "./index.type";
3
+ declare const InformativeBox: ({ infoType, title, message, onClose, ...props }: InformativeBoxProps) => React.JSX.Element;
4
+ export { InformativeBox };
@@ -0,0 +1,7 @@
1
+ import { HtmlHTMLAttributes } from "react";
2
+ export interface InformativeBoxProps extends HtmlHTMLAttributes<HTMLDivElement> {
3
+ infoType: 'success' | 'alert' | 'warning' | 'informative';
4
+ title: string;
5
+ message: string;
6
+ onClose?: () => void;
7
+ }
@@ -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, actionIcon, noRecordsMessage, }: TableComponentProps) => React.JSX.Element;
3
+ declare const TableComponent: ({ columns, data, onSort, renderCell, onActionClick, noRecordsMessage, hasIcon, renderActionIconCell, }: TableComponentProps) => React.JSX.Element;
4
4
  export default TableComponent;
@@ -14,4 +14,6 @@ export interface TableComponentProps {
14
14
  onActionClick?: (item: any) => void;
15
15
  actionIcon?: React.ReactNode;
16
16
  noRecordsMessage?: string;
17
+ hasIcon?: boolean;
18
+ renderActionIconCell: (item: any) => React.JSX.Element | null;
17
19
  }
@@ -4,5 +4,7 @@ declare const meta: Meta<typeof InputBase>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Default: Story;
7
- export declare const WithIcon: Story;
7
+ export declare const WithLeftIcon: Story;
8
+ export declare const WithRightIcon: Story;
9
+ export declare const WithTwoIcons: Story;
8
10
  export declare const WithError: Story;
@@ -1,4 +1,12 @@
1
- import React from "react";
2
- import { InputProps } from "./index.type";
3
- declare const InputBase: React.FC<InputProps>;
1
+ import React, { InputHTMLAttributes, ReactNode } from "react";
2
+ interface InputBaseProps extends InputHTMLAttributes<HTMLInputElement> {
3
+ customClass?: string;
4
+ restrictionMessage?: string;
5
+ label?: string;
6
+ leftIcon?: ReactNode;
7
+ rightIcon?: ReactNode;
8
+ onRightIconClick?: () => void;
9
+ style?: React.CSSProperties;
10
+ }
11
+ declare const InputBase: React.FC<InputBaseProps>;
4
12
  export { InputBase };
@@ -1,5 +1,5 @@
1
1
  import { IconDownload } from "./download-icon";
2
- import { IconVisibillity } from "./visibillity-icon";
2
+ import { IconVisibility } from "./visibility-icon";
3
3
  import { IconEdit } from "./edit-icon";
4
4
  import { IconDelete } from "./delete-icon";
5
5
  import { IconCalendar } from "./calendar-icon";
@@ -24,4 +24,6 @@ import { IconAddCell } from "./add-cell-icon";
24
24
  import { MenuIcon } from "./menu-icon";
25
25
  import { LogoRhDigital } from "./logo-rh-digital";
26
26
  import { LogoPGERG } from "./logo-pge-rj";
27
- export { IconDownload, IconVisibillity, IconEdit, IconDelete, IconCalendar, IconProfile, IconUpload, IconNewTab, IconWarning, IconCheckCircle, IconEventAvaliable, IconLogout, IconCLose, IconAdd, IconRemove, IconCircleExpland, IconCircleRecall, IconArrowExpland, IconArrowRecall, IconTriangleExpand, IconTriangleRecall, IconSwap, IconAddCell, MenuIcon, LogoRhDigital, LogoPGERG, };
27
+ import { IconInvisibility } from "./invisibility-icon";
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 };
@@ -0,0 +1,2 @@
1
+ import React, { SVGProps } from "react";
2
+ export declare const IconInvisibility: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React, { SVGProps } from "react";
2
+ export declare const IconVisibility: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { InputHTMLAttributes, ChangeEvent, SVGProps } from 'react';
2
+ import React__default, { InputHTMLAttributes, ReactNode, HtmlHTMLAttributes, ChangeEvent, SVGProps } from 'react';
3
3
  import { Control } from 'react-hook-form';
4
4
 
5
5
  interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -9,6 +9,26 @@ interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElem
9
9
  }
10
10
  declare function Button({ variant, text, leftIcon, ...props }: ButtonProps): React__default.JSX.Element;
11
11
 
12
+ interface InputBaseProps extends InputHTMLAttributes<HTMLInputElement> {
13
+ customClass?: string;
14
+ restrictionMessage?: string;
15
+ label?: string;
16
+ leftIcon?: ReactNode;
17
+ rightIcon?: ReactNode;
18
+ onRightIconClick?: () => void;
19
+ style?: React__default.CSSProperties;
20
+ }
21
+ declare const InputBase: React__default.FC<InputBaseProps>;
22
+
23
+ interface InformativeBoxProps extends HtmlHTMLAttributes<HTMLDivElement> {
24
+ infoType: 'success' | 'alert' | 'warning' | 'informative';
25
+ title: string;
26
+ message: string;
27
+ onClose?: () => void;
28
+ }
29
+
30
+ declare const InformativeBox: ({ infoType, title, message, onClose, ...props }: InformativeBoxProps) => React__default.JSX.Element;
31
+
12
32
  interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
13
33
  customClass?: string;
14
34
  restrictionMessage?: string;
@@ -18,8 +38,6 @@ interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
18
38
  inputRef?: unknown;
19
39
  }
20
40
 
21
- declare const InputBase: React__default.FC<InputProps>;
22
-
23
41
  interface PasswordInputProps extends InputProps {
24
42
  showPassword: boolean;
25
43
  togglePasswordVisibility: VoidFunction;
@@ -186,13 +204,15 @@ interface TableComponentProps {
186
204
  onActionClick?: (item: any) => void;
187
205
  actionIcon?: React.ReactNode;
188
206
  noRecordsMessage?: string;
207
+ hasIcon?: boolean;
208
+ renderActionIconCell: (item: any) => React.JSX.Element | null;
189
209
  }
190
210
 
191
- declare const TableComponent: ({ columns, data, onSort, renderCell, onActionClick, actionIcon, noRecordsMessage, }: TableComponentProps) => React__default.JSX.Element;
211
+ declare const TableComponent: ({ columns, data, onSort, renderCell, onActionClick, noRecordsMessage, hasIcon, renderActionIconCell, }: TableComponentProps) => React__default.JSX.Element;
192
212
 
193
213
  declare const IconDownload: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
194
214
 
195
- declare const IconVisibillity: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
215
+ declare const IconVisibility: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
196
216
 
197
217
  declare const IconEdit: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
198
218
 
@@ -236,4 +256,6 @@ declare const IconSwap: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.
236
256
 
237
257
  declare const IconAddCell: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
238
258
 
239
- 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, IconLogout, IconNewTab, IconProfile, IconRemove, IconSwap, IconTriangleExpand, IconTriangleRecall, IconUpload, IconVisibillity, IconWarning, InputBase, type InputProps, LoadingSpinner, SelectMult as Multiselect, type OptionsProps, PaginationTable, PasswordInput, RadioGroupBase, type RadioGroupBaseProps, type SelectMultProps, TableComponent, type TableComponentProps, TextareaBase, type TextareaBaseProps, Title };
259
+ declare const IconInvisibility: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
260
+
261
+ 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 };