pge-front-common 8.0.0 → 8.0.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.
package/README.md CHANGED
@@ -34,7 +34,7 @@ import "pge-front-common/lib/variables.css";
34
34
  import React from "react";
35
35
  import { Button } from "pge-front-common";
36
36
 
37
- const App: React.FC = () => {
37
+ const App = () => {
38
38
  const handleClick = () => {
39
39
  alert("Button clicked!");
40
40
  };
@@ -3,5 +3,8 @@ export interface UserButtonProps {
3
3
  name: string;
4
4
  userName: string;
5
5
  handleLogout: () => void;
6
+ isPortalServidor?: boolean;
7
+ isCASC?: boolean;
8
+ profile?: string;
6
9
  }
7
- export default function UserButton({ name, userName, handleLogout, }: UserButtonProps): React.JSX.Element;
10
+ export default function UserButton({ name, userName, handleLogout, isCASC, isPortalServidor, profile, }: UserButtonProps): React.JSX.Element;
@@ -25,5 +25,5 @@ type DropDownProps = React.HTMLProps<HTMLDivElement> & {
25
25
  toggleDropDown: Function;
26
26
  optionSelection: (name: string, id: number) => void;
27
27
  };
28
- declare const DropDown: React.FC<DropDownProps>;
28
+ declare const DropDown: ({ options, optionSelection, ...restProps }: DropDownProps) => JSX.Element;
29
29
  export default DropDown;
@@ -2,12 +2,14 @@ import React from "react";
2
2
  import { IFuncoesMenuHorizontal } from "../DropDown/Dropdown";
3
3
  export interface HeaderProps {
4
4
  isRHDigital: boolean;
5
- isCASC: boolean;
5
+ isCASC?: boolean;
6
+ isPortalServidor?: boolean;
6
7
  options: IFuncoesMenuHorizontal[];
7
8
  optionSelection: (name: string, id: number) => void;
8
9
  name: string;
9
10
  userName: string;
10
11
  handleLogout: () => void;
12
+ profile?: string;
11
13
  }
12
- declare const Header: React.FC<HeaderProps>;
14
+ declare const Header: ({ isRHDigital, isCASC, optionSelection, options, name, userName, handleLogout, isPortalServidor, profile, }: HeaderProps) => React.JSX.Element;
13
15
  export default Header;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { InputBaseProps } from "./input.types";
3
- declare const InputBase: React.FC<InputBaseProps>;
3
+ declare const InputBase: ({ name, label, value, type, Icon, placeholder, message, textAlign, textError, hasError, width, hasIcon, required, ...props }: InputBaseProps) => React.JSX.Element;
4
4
  export default InputBase;
@@ -4,5 +4,5 @@ export interface MenuProps {
4
4
  options: IFuncoesMenuHorizontal[];
5
5
  optionSelection: (name: string, id: number) => void;
6
6
  }
7
- declare const Menu: React.FC<MenuProps>;
7
+ declare const Menu: ({ options, optionSelection }: MenuProps) => React.JSX.Element;
8
8
  export default Menu;
@@ -20,7 +20,7 @@ declare const meta: {
20
20
  };
21
21
  args: {
22
22
  isModalOpen: false;
23
- onOpenChange: import("@vitest/spy").Mock<[value: React.SetStateAction<boolean>], void>;
23
+ onOpenChange: import("@vitest/spy").Mock<(...args: any[]) => any>;
24
24
  children: string;
25
25
  title: string;
26
26
  };
@@ -4,4 +4,4 @@ export interface ModalConfirmProps {
4
4
  onOpenChange: React.Dispatch<React.SetStateAction<boolean>>;
5
5
  children: React.ReactNode;
6
6
  }
7
- export declare const ModalConfirm: React.FC<ModalConfirmProps>;
7
+ export declare const ModalConfirm: ({ isModalOpen, onOpenChange, children, }: ModalConfirmProps) => React.JSX.Element;
@@ -2,13 +2,13 @@ import React from "react";
2
2
  import type { StoryObj } from "@storybook/react";
3
3
  declare const meta: {
4
4
  title: string;
5
- component: React.FC<import("./ModalConfirm").ModalConfirmProps>;
5
+ component: ({ isModalOpen, onOpenChange, children, }: import("./ModalConfirm").ModalConfirmProps) => React.JSX.Element;
6
6
  parameters: {
7
7
  layout: string;
8
8
  };
9
9
  args: {
10
10
  isModalOpen: false;
11
- onOpenChange: import("@vitest/spy").Mock<[value: React.SetStateAction<boolean>], void>;
11
+ onOpenChange: import("@vitest/spy").Mock<(...args: any[]) => any>;
12
12
  children: string;
13
13
  };
14
14
  };
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
2
  import { DropdownProps } from "./select.types";
3
- export declare const Select: React.FC<DropdownProps>;
3
+ export declare const Select: ({ name, label, placeholder, message, textAlign, textError, hasError, width, defaultValue, options, selectedValue, handleSelect, open, handleOpen, hasIconRequired, }: DropdownProps) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  interface IconProps extends React.SVGProps<SVGSVGElement> {
3
3
  }
4
- declare const IconFacebookLogo: React.FC<IconProps>;
4
+ declare const IconFacebookLogo: (props: IconProps) => React.JSX.Element;
5
5
  export default IconFacebookLogo;
@@ -1,5 +1,5 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  interface IconProps extends React.SVGProps<SVGSVGElement> {
3
3
  }
4
- declare const IconLinkedinLogo: React.FC<IconProps>;
4
+ declare const IconLinkedinLogo: (props: IconProps) => React.JSX.Element;
5
5
  export default IconLinkedinLogo;
package/lib/index.d.ts CHANGED
@@ -20,7 +20,7 @@ interface InputBaseProps extends Partial<HTMLInputElement> {
20
20
  onClick?: (e: React.MouseEvent<HTMLInputElement>) => void;
21
21
  }
22
22
 
23
- declare const InputBase: React.FC<InputBaseProps>;
23
+ declare const InputBase: ({ name, label, value, type, Icon, placeholder, message, textAlign, textError, hasError, width, hasIcon, required, ...props }: InputBaseProps) => React.JSX.Element;
24
24
 
25
25
  type TextAlignType = "start" | "end" | "center";
26
26
  interface TextareaBaseProps extends Partial<HTMLTextAreaElement> {
@@ -73,7 +73,7 @@ interface ModalConfirmProps {
73
73
  onOpenChange: React.Dispatch<React.SetStateAction<boolean>>;
74
74
  children: React.ReactNode;
75
75
  }
76
- declare const ModalConfirm: React.FC<ModalConfirmProps>;
76
+ declare const ModalConfirm: ({ isModalOpen, onOpenChange, children, }: ModalConfirmProps) => React.JSX.Element;
77
77
 
78
78
  interface DropdownProps {
79
79
  label: string;
@@ -101,7 +101,7 @@ type OptionsProps = {
101
101
  value: string;
102
102
  };
103
103
 
104
- declare const Select: React.FC<DropdownProps>;
104
+ declare const Select: ({ name, label, placeholder, message, textAlign, textError, hasError, width, defaultValue, options, selectedValue, handleSelect, open, handleOpen, hasIconRequired, }: DropdownProps) => React.JSX.Element;
105
105
 
106
106
  interface IFuncionalidade {
107
107
  id: number;
@@ -126,14 +126,16 @@ interface IFuncoesMenuHorizontal {
126
126
 
127
127
  interface HeaderProps {
128
128
  isRHDigital: boolean;
129
- isCASC: boolean;
129
+ isCASC?: boolean;
130
+ isPortalServidor?: boolean;
130
131
  options: IFuncoesMenuHorizontal[];
131
132
  optionSelection: (name: string, id: number) => void;
132
133
  name: string;
133
134
  userName: string;
134
135
  handleLogout: () => void;
136
+ profile?: string;
135
137
  }
136
- declare const Header: React.FC<HeaderProps>;
138
+ declare const Header: ({ isRHDigital, isCASC, optionSelection, options, name, userName, handleLogout, isPortalServidor, profile, }: HeaderProps) => React.JSX.Element;
137
139
 
138
140
  declare function FooterComponent(): React.JSX.Element;
139
141