pge-front-common 14.2.5-beta.5 → 14.2.5-beta.6

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.
Files changed (205) hide show
  1. package/lib/components/Acordion/accordion.stories.d.ts +11 -0
  2. package/lib/components/Acordion/index.d.ts +11 -0
  3. package/lib/components/Acordion/index.types.d.ts +6 -0
  4. package/lib/components/BasicSelect/basicSelect.stories.d.ts +7 -0
  5. package/lib/components/BasicSelect/index.d.ts +3 -0
  6. package/lib/components/BasicSelect/index.types.d.ts +20 -0
  7. package/lib/components/BoxError/boxError.stories.d.ts +6 -0
  8. package/lib/components/BoxError/index.d.ts +7 -0
  9. package/lib/components/BoxSuccess/boxSuccess.stories.d.ts +6 -0
  10. package/lib/components/BoxSuccess/index.d.ts +7 -0
  11. package/lib/components/Button/Button.d.ts +7 -0
  12. package/lib/components/Button/Button.stories.d.ts +9 -0
  13. package/lib/components/ButtonUser/ButtonUser.d.ts +12 -0
  14. package/lib/components/ButtonUserCasc/ButtonUserCasc.d.ts +14 -0
  15. package/lib/components/CheckBox/CheckBox.stories.d.ts +8 -0
  16. package/lib/components/CheckBox/index.d.ts +3 -0
  17. package/lib/components/CheckBox/index.type.d.ts +5 -0
  18. package/lib/components/Chip/chip.stories.d.ts +32 -0
  19. package/lib/components/Chip/index.d.ts +10 -0
  20. package/lib/components/Chip/index.type.d.ts +12 -0
  21. package/lib/components/DropDown/Dropdown.d.ts +29 -0
  22. package/lib/components/Fieldset/fieldset.stories.d.ts +14 -0
  23. package/lib/components/Fieldset/index.d.ts +3 -0
  24. package/lib/components/Fieldset/index.type.d.ts +6 -0
  25. package/lib/components/FloatingMenu/FloatingMenu.stories.d.ts +14 -0
  26. package/lib/components/FloatingMenu/index.d.ts +3 -0
  27. package/lib/components/FloatingMenu/index.type.d.ts +9 -0
  28. package/lib/components/Footer/Footer.stories.d.ts +6 -0
  29. package/lib/components/Footer/index.d.ts +7 -0
  30. package/lib/components/Form/Form.stories.d.ts +13 -0
  31. package/lib/components/Header/Header.d.ts +22 -0
  32. package/lib/components/Header/Header.stories.d.ts +11 -0
  33. package/lib/components/HeaderPge/Header.d.ts +22 -0
  34. package/lib/components/HeaderPge/Header.stories.d.ts +9 -0
  35. package/lib/components/InformativeBox/InformativeBox.stories.d.ts +11 -0
  36. package/lib/components/InformativeBox/index.d.ts +4 -0
  37. package/lib/components/InformativeBox/index.type.d.ts +9 -0
  38. package/lib/components/InputDate/InputDate.stories.d.ts +20 -0
  39. package/lib/components/InputDate/index.d.ts +6 -0
  40. package/lib/components/InputDate/index.type.d.ts +20 -0
  41. package/lib/components/InputDate/installStyles.d.ts +1 -0
  42. package/lib/components/Loading/index.d.ts +7 -0
  43. package/lib/components/Loading/loading.stories.d.ts +8 -0
  44. package/lib/components/Menu/index.d.ts +8 -0
  45. package/lib/components/MenuAction/index.d.ts +6 -0
  46. package/lib/components/MenuAction/menuaction.stories.d.ts +6 -0
  47. package/lib/components/ModalUI/index.d.ts +12 -0
  48. package/lib/components/ModalUI/index.type.d.ts +9 -0
  49. package/lib/components/ModalUI/modalui.stories.d.ts +7 -0
  50. package/lib/components/MultiSelect/components.d.ts +13 -0
  51. package/lib/components/MultiSelect/icons.d.ts +7 -0
  52. package/lib/components/MultiSelect/index.d.ts +4 -0
  53. package/lib/components/MultiSelect/index.types.d.ts +26 -0
  54. package/lib/components/MultiSelect/multiselect.stories.d.ts +9 -0
  55. package/lib/components/MultiSelect/selectColourStyles.d.ts +13 -0
  56. package/lib/components/OverlayLoading/index.d.ts +8 -0
  57. package/lib/components/OverlayLoading/loading.stories.d.ts +8 -0
  58. package/lib/components/Pagination/index.d.ts +9 -0
  59. package/lib/components/Pagination/pagination.stories.d.ts +9 -0
  60. package/lib/components/PaginationV2/index.d.ts +19 -0
  61. package/lib/components/PaginationV2/pagination.stories.d.ts +12 -0
  62. package/lib/components/PaginationV2/selectPagination.d.ts +13 -0
  63. package/lib/components/PgeButton/PgeButton.stories.d.ts +15 -0
  64. package/lib/components/PgeButton/index.d.ts +10 -0
  65. package/lib/components/PgeButton/index.type.d.ts +12 -0
  66. package/lib/components/ProgressCircle/index.d.ts +4 -0
  67. package/lib/components/ProgressCircle/progressCircle.stories.d.ts +12 -0
  68. package/lib/components/ProgressCircle/progressCircle.types.d.ts +8 -0
  69. package/lib/components/RadioButton/RadioButton.d.ts +3 -0
  70. package/lib/components/RadioButton/RadioButton.stories.d.ts +11 -0
  71. package/lib/components/RadioButton/radioButton.types.d.ts +16 -0
  72. package/lib/components/RadioGroup/RadioGroup.d.ts +4 -0
  73. package/lib/components/RadioGroup/RadioGroup.stories.d.ts +7 -0
  74. package/lib/components/RadioGroup/radioGroup.types.d.ts +19 -0
  75. package/lib/components/Select/index.d.ts +4 -0
  76. package/lib/components/Select/index.types.d.ts +26 -0
  77. package/lib/components/Select/select.stories.d.ts +10 -0
  78. package/lib/components/SkeletonLoader/index.d.ts +6 -0
  79. package/lib/components/SkeletonLoader/skeletonloader.stories.d.ts +8 -0
  80. package/lib/components/Switch/index.d.ts +36 -0
  81. package/lib/components/Switch/index.types.d.ts +7 -0
  82. package/lib/components/Switch/switch.stories.d.ts +9 -0
  83. package/lib/components/Table/index.d.ts +4 -0
  84. package/lib/components/Table/index.types.d.ts +26 -0
  85. package/lib/components/Table/table.stories.d.ts +16 -0
  86. package/lib/components/TableV2/TableHeaderContext.d.ts +2 -0
  87. package/lib/components/TableV2/index.d.ts +8 -0
  88. package/lib/components/TableV2/index.types.d.ts +20 -0
  89. package/lib/components/TableV2/table.stories.d.ts +6 -0
  90. package/lib/components/Textarea/Textarea.d.ts +4 -0
  91. package/lib/components/Textarea/Textarea.stories.d.ts +9 -0
  92. package/lib/components/Textarea/textarea.types.d.ts +16 -0
  93. package/lib/components/Title/index.d.ts +6 -0
  94. package/lib/components/Title/title.stories.d.ts +6 -0
  95. package/lib/components/Tooltip/Tooltip.stories.d.ts +6 -0
  96. package/lib/components/Tooltip/index.d.ts +3 -0
  97. package/lib/components/Tooltip/index.type.d.ts +6 -0
  98. package/lib/components/TooltipWithPortal/TooltipWithPortal.stories.d.ts +6 -0
  99. package/lib/components/TooltipWithPortal/index.d.ts +3 -0
  100. package/lib/components/TooltipWithPortal/index.type.d.ts +6 -0
  101. package/lib/components/TreeSelect/TreeSelect.stories.d.ts +16 -0
  102. package/lib/components/TreeSelect/index.d.ts +7 -0
  103. package/lib/components/TreeSelect/index.type.d.ts +22 -0
  104. package/lib/components/TreeSelect/installStyles.d.ts +1 -0
  105. package/lib/components/Upload/FileUpload.stories.d.ts +6 -0
  106. package/lib/components/Upload/index.d.ts +321 -0
  107. package/lib/components/Upload/index.type.d.ts +19 -0
  108. package/lib/components/inputPassword/Input.stories.d.ts +6 -0
  109. package/lib/components/inputPassword/index.d.ts +8 -0
  110. package/lib/components/inputText/Input.stories.d.ts +12 -0
  111. package/lib/components/inputText/index.d.ts +20 -0
  112. package/lib/components/inputText/index.type.d.ts +10 -0
  113. package/lib/components/modal/Modal.d.ts +3 -0
  114. package/lib/components/modal/ModalBody.d.ts +4 -0
  115. package/lib/components/modal/ModalFooter.d.ts +4 -0
  116. package/lib/components/modal/ModalHeader.d.ts +4 -0
  117. package/lib/components/modal/index.d.ts +5 -0
  118. package/lib/components/modal/index.type.d.ts +21 -0
  119. package/lib/components/modal/modal.stories.d.ts +11 -0
  120. package/lib/components/theme.d.ts +3 -0
  121. package/lib/icons/add-cell-icon.d.ts +2 -0
  122. package/lib/icons/add-icon.d.ts +2 -0
  123. package/lib/icons/alert-icon.d.ts +2 -0
  124. package/lib/icons/arrow-expland-icon.d.ts +2 -0
  125. package/lib/icons/arrow-to-recall-icon.d.ts +2 -0
  126. package/lib/icons/attention-icon.d.ts +2 -0
  127. package/lib/icons/calculate-icon.d.ts +2 -0
  128. package/lib/icons/calendar-icon.d.ts +2 -0
  129. package/lib/icons/certidao-regularidade-fiscal.d.ts +2 -0
  130. package/lib/icons/check-circle-icon.d.ts +2 -0
  131. package/lib/icons/check-icon.d.ts +2 -0
  132. package/lib/icons/check-success-icon.d.ts +2 -0
  133. package/lib/icons/circle-expland-icon.d.ts +2 -0
  134. package/lib/icons/circle-to-recall-icon.d.ts +2 -0
  135. package/lib/icons/close-icon.d.ts +2 -0
  136. package/lib/icons/common-dot-icon.d.ts +2 -0
  137. package/lib/icons/debito-fiscal-icon.d.ts +2 -0
  138. package/lib/icons/delete-icon.d.ts +2 -0
  139. package/lib/icons/dots-vertical.d.ts +2 -0
  140. package/lib/icons/download-icon.d.ts +2 -0
  141. package/lib/icons/edit-icon.d.ts +2 -0
  142. package/lib/icons/emissao-darj-icon.d.ts +2 -0
  143. package/lib/icons/error-icon.d.ts +2 -0
  144. package/lib/icons/event-avaliable-icon.d.ts +2 -0
  145. package/lib/icons/exclude-icon.d.ts +2 -0
  146. package/lib/icons/eye-close-icon.d.ts +2 -0
  147. package/lib/icons/eye-open-icon.d.ts +2 -0
  148. package/lib/icons/facebook-icon.d.ts +5 -0
  149. package/lib/icons/footer.d.ts +2 -0
  150. package/lib/icons/footerLight.d.ts +2 -0
  151. package/lib/icons/hour-glass-icon.d.ts +3 -0
  152. package/lib/icons/icons.stories.d.ts +5 -0
  153. package/lib/icons/index.d.ts +65 -0
  154. package/lib/icons/info-round-icon.d.ts +2 -0
  155. package/lib/icons/informative-icon.d.ts +2 -0
  156. package/lib/icons/instagram-icon.d.ts +3 -0
  157. package/lib/icons/invisibility-icon.d.ts +2 -0
  158. package/lib/icons/left-arrow-icon.d.ts +2 -0
  159. package/lib/icons/left-direction-icon.d.ts +2 -0
  160. package/lib/icons/linkedin-icon.d.ts +5 -0
  161. package/lib/icons/logo-casc.d.ts +4 -0
  162. package/lib/icons/logo-divida-ativa.d.ts +3 -0
  163. package/lib/icons/logo-pge-beneficios.d.ts +3 -0
  164. package/lib/icons/logo-pge-rj.d.ts +3 -0
  165. package/lib/icons/logo-rh-digital.d.ts +3 -0
  166. package/lib/icons/logout-icon.d.ts +2 -0
  167. package/lib/icons/mail-icon.d.ts +2 -0
  168. package/lib/icons/menu-icon.d.ts +3 -0
  169. package/lib/icons/new-tab-icon.d.ts +2 -0
  170. package/lib/icons/parcelamento-icon.d.ts +2 -0
  171. package/lib/icons/payment-icon.d.ts +2 -0
  172. package/lib/icons/pdf-icon.d.ts +2 -0
  173. package/lib/icons/print-icon.d.ts +2 -0
  174. package/lib/icons/profile-icon.d.ts +2 -0
  175. package/lib/icons/question-mark-icon.d.ts +2 -0
  176. package/lib/icons/remove-icon.d.ts +2 -0
  177. package/lib/icons/right-arrow-icon.d.ts +2 -0
  178. package/lib/icons/right-direction-icon.d.ts +2 -0
  179. package/lib/icons/search-icon.d.ts +2 -0
  180. package/lib/icons/success-icon.d.ts +2 -0
  181. package/lib/icons/swap-icon.d.ts +2 -0
  182. package/lib/icons/triangle-expand-icon.d.ts +2 -0
  183. package/lib/icons/triangle-to-recall-icon.d.ts +2 -0
  184. package/lib/icons/twitter-icon.d.ts +3 -0
  185. package/lib/icons/two-user-icon.d.ts +2 -0
  186. package/lib/icons/two-user-search-icon.d.ts +2 -0
  187. package/lib/icons/up-arrow-icon.d.ts +2 -0
  188. package/lib/icons/up-down-arrow.d.ts +2 -0
  189. package/lib/icons/upload-file-icon.d.ts +2 -0
  190. package/lib/icons/upload-file.d.ts +2 -0
  191. package/lib/icons/upload-icon.d.ts +2 -0
  192. package/lib/icons/upload-iconV2.d.ts +2 -0
  193. package/lib/icons/user-icon.d.ts +2 -0
  194. package/lib/icons/user-logout-icon.d.ts +2 -0
  195. package/lib/icons/view-icon.d.ts +2 -0
  196. package/lib/icons/visibility-icon.d.ts +2 -0
  197. package/lib/icons/warning-icon.d.ts +2 -0
  198. package/lib/index.d.ts +1063 -0
  199. package/lib/index.esm.js +27669 -0
  200. package/lib/index.esm.js.map +1 -0
  201. package/lib/index.js +27796 -0
  202. package/lib/index.js.map +1 -0
  203. package/lib/utils/useDarkMode.d.ts +1 -0
  204. package/lib/utils/useIsMobile.d.ts +1 -0
  205. package/package.json +1 -1
@@ -0,0 +1,26 @@
1
+ export interface SelectMultProps {
2
+ name?: string;
3
+ optionsSelect: OptionsProps[];
4
+ value: any[];
5
+ placeholder?: string;
6
+ className?: string;
7
+ label?: string;
8
+ handleChange: (selectedOptions: any) => void;
9
+ handleInputChange?: (inputValue: string) => void;
10
+ fetchOptions?: (query: string) => Promise<OptionsProps[]>;
11
+ isMulti: boolean;
12
+ disabled?: boolean;
13
+ required?: boolean;
14
+ textError?: string;
15
+ hasError?: boolean;
16
+ message?: string;
17
+ Icon?: React.ReactNode;
18
+ isSearchable?: boolean;
19
+ isClearable?: boolean;
20
+ isCheckedAll?: boolean;
21
+ maxMenuHeight?: number;
22
+ }
23
+ export type OptionsProps = {
24
+ label: string;
25
+ value: string;
26
+ };
@@ -0,0 +1,9 @@
1
+ import { Meta } from "@storybook/react";
2
+ import { SelectMultProps } from "./index.types";
3
+ declare const _default: Meta;
4
+ export default _default;
5
+ export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SelectMultProps>;
6
+ export declare const MultiError: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SelectMultProps>;
7
+ export declare const MultiSelect: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SelectMultProps>;
8
+ export declare const Disabled: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SelectMultProps>;
9
+ export declare const CustomMenuHeight: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SelectMultProps>;
@@ -0,0 +1,13 @@
1
+ declare const selectColourStyles: (width?: number, isInvalid?: boolean, maxMenuHeight?: number) => {
2
+ control: (styles: any) => any;
3
+ menu: () => {
4
+ padding: string;
5
+ borderRadius: number;
6
+ boxShadow: string;
7
+ borderColor: string;
8
+ minWidth: number;
9
+ };
10
+ option: (styles: any, { isDisabled, isSelected, isFocused }: any) => any;
11
+ menuList: (styles: any) => any;
12
+ };
13
+ export default selectColourStyles;
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ interface Props {
3
+ isOpen: boolean;
4
+ text?: string;
5
+ mini?: boolean;
6
+ }
7
+ export declare function OverlayLoadingSpinner({ isOpen, text, mini, }: Readonly<Props>): React.JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { OverlayLoadingSpinner } from "./index";
3
+ declare const meta: Meta<typeof OverlayLoadingSpinner>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Hidden: Story;
8
+ export declare const CustomText: Story;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface Props {
3
+ currentPage: number;
4
+ countPage: number;
5
+ itemsVisiblePage?: number;
6
+ handleClickPage?: (page: any) => void;
7
+ }
8
+ declare const PaginationTable: ({ currentPage, countPage, itemsVisiblePage, handleClickPage, }: Omit<Props, "header" | "body" | "footer">) => React.JSX.Element;
9
+ export { PaginationTable };
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { PaginationTable } from "./index";
3
+ declare const meta: Meta<typeof PaginationTable>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const CustomPagesVisible: Story;
8
+ export declare const LastPage: Story;
9
+ export declare const PageWithEllipsis: Story;
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ interface PaginationProps {
3
+ countPage: number;
4
+ currentPage: number;
5
+ totalItems: number;
6
+ itemsPerPage: number;
7
+ handlePrevious: () => void;
8
+ handleNext: () => void;
9
+ handleItemPorPage: (value: number) => void;
10
+ handlePage: (value: number) => void;
11
+ pagina: number;
12
+ defaultOptions?: {
13
+ value: number;
14
+ label: string;
15
+ }[];
16
+ dropdownDirection?: "down" | "up";
17
+ }
18
+ declare const Pagination: ({ countPage, currentPage, totalItems, itemsPerPage, handleNext, handlePrevious, handleItemPorPage, pagina, handlePage, defaultOptions, dropdownDirection, }: PaginationProps) => React.JSX.Element;
19
+ export default Pagination;
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import PaginationV2 from "./index";
3
+ declare const meta: Meta<typeof PaginationV2>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof PaginationV2>;
6
+ export declare const Default: Story;
7
+ export declare const MiddlePage: Story;
8
+ export declare const LastPage: Story;
9
+ export declare const CustomItemsPerPage: Story;
10
+ export declare const LargeDataset: Story;
11
+ export declare const DisabledNavigation: Story;
12
+ export declare const DropdownUp: Story;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ interface SelectProps {
3
+ value: number | string;
4
+ options: Array<{
5
+ value: number | string;
6
+ label: string;
7
+ }>;
8
+ onChange: (value: number | string) => void;
9
+ className?: string;
10
+ direction?: "down" | "up";
11
+ }
12
+ declare const SelectPagination: ({ value, options, onChange, className, direction, }: SelectProps) => React.JSX.Element;
13
+ export default SelectPagination;
@@ -0,0 +1,15 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { PgeButton } from "./index";
3
+ declare const meta: Meta<typeof PgeButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Primary: Story;
8
+ export declare const PrimaryFullWidth: Story;
9
+ export declare const PrimaryDisabled: Story;
10
+ export declare const PrimaryWithIcon: Story;
11
+ export declare const Secondary: Story;
12
+ export declare const SecondaryDisabled: Story;
13
+ export declare const SecondaryDanger: Story;
14
+ export declare const Tertiary: Story;
15
+ export declare const TertiaryDanger: Story;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export declare const PgeButton: React.ForwardRefExoticComponent<{
3
+ variant: "primary" | "secondary" | "tertiary";
4
+ danger?: boolean;
5
+ disabled?: boolean;
6
+ title: string;
7
+ leftIcon?: React.ReactNode;
8
+ rightIcon?: React.ReactNode;
9
+ widthType?: "fit-content" | "full-width";
10
+ } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,12 @@
1
+ type ButtonVariant = "primary" | "secondary" | "tertiary";
2
+ type WidthType = "full-width" | "fit-content";
3
+ export type ButtonProps = {
4
+ variant: ButtonVariant;
5
+ danger?: boolean;
6
+ disabled?: boolean;
7
+ title: string;
8
+ leftIcon?: React.ReactNode;
9
+ rightIcon?: React.ReactNode;
10
+ widthType?: WidthType;
11
+ } & React.ButtonHTMLAttributes<HTMLButtonElement>;
12
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { ProgressCircleProps } from "./progressCircle.types";
3
+ declare function ProgressCircle({ percentage, message, size, infinite, isInProgress, onClose, }: ProgressCircleProps): React.JSX.Element | null;
4
+ export default ProgressCircle;
@@ -0,0 +1,12 @@
1
+ import type { Meta } from "@storybook/react";
2
+ import { ProgressCircleProps } from "./progressCircle.types";
3
+ declare const _default: Meta;
4
+ export default _default;
5
+ export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ProgressCircleProps>;
6
+ export declare const FullProgress: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ProgressCircleProps>;
7
+ export declare const Halfway: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ProgressCircleProps>;
8
+ export declare const LowProgress: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ProgressCircleProps>;
9
+ export declare const SmallSize: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ProgressCircleProps>;
10
+ export declare const MediumSize: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ProgressCircleProps>;
11
+ export declare const LargeSize: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ProgressCircleProps>;
12
+ export declare const Infinite: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ProgressCircleProps>;
@@ -0,0 +1,8 @@
1
+ export interface ProgressCircleProps {
2
+ percentage: number;
3
+ message?: string;
4
+ size?: "small" | "medium" | "large";
5
+ onClose: () => void;
6
+ infinite?: boolean;
7
+ isInProgress?: boolean;
8
+ }
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { RadioButtonProps } from "./radioButton.types";
3
+ export declare const RadioButton: ({ name, label, value, checked, message, textError, hasError, required, disabled, onChange, customClass, id, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, ...props }: RadioButtonProps) => React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import RadioButton from "./RadioButton";
3
+ declare const meta: Meta<typeof RadioButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Checked: Story;
8
+ export declare const WithError: Story;
9
+ export declare const Disabled: Story;
10
+ export declare const Required: Story;
11
+ export declare const WithoutLabel: Story;
@@ -0,0 +1,16 @@
1
+ import { ChangeEvent, InputHTMLAttributes, ReactNode } from "react";
2
+ export interface RadioButtonProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "type" | "checked" | "accept" | "alt" | "capture" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "pattern" | "placeholder" | "readOnly" | "size" | "src" | "step" | "width"> {
3
+ name: string;
4
+ label?: ReactNode;
5
+ value: string;
6
+ checked?: boolean;
7
+ hasError?: boolean;
8
+ textError?: string;
9
+ message?: string;
10
+ onChange: (event: ChangeEvent<HTMLInputElement>) => void;
11
+ customClass?: string;
12
+ required?: boolean;
13
+ disabled?: boolean;
14
+ "aria-label"?: string;
15
+ "aria-describedby"?: string;
16
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { RadioGroupBaseProps } from "./radioGroup.types";
3
+ declare const RadioGroupBase: ({ name, label, value, options, message, textError, hasError, orientation, required, disabled, onInput, customClass, ...props }: RadioGroupBaseProps) => React.JSX.Element;
4
+ export default RadioGroupBase;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import RadioGroupBase from "./RadioGroup";
3
+ declare const meta: Meta<typeof RadioGroupBase>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const WithError: Story;
@@ -0,0 +1,19 @@
1
+ import { ChangeEvent } from "react";
2
+ export interface RadioGroupBaseProps extends Partial<HTMLInputElement> {
3
+ name: string;
4
+ label?: string;
5
+ options: OptionsProps[];
6
+ value: string;
7
+ hasError?: boolean;
8
+ textError?: string;
9
+ message?: string;
10
+ onInput: (event: ChangeEvent<HTMLInputElement>) => void;
11
+ customClass?: string;
12
+ orientation?: "horizontal" | "vertical";
13
+ required?: boolean | false;
14
+ disabled?: boolean | false;
15
+ }
16
+ export type OptionsProps = {
17
+ value: string;
18
+ label: string;
19
+ };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import { SelectDefaultProps } from "./index.types";
3
+ declare const SelectDefault: ({ name, control, optionsSelect, placeholder, isDisabled, label, hasError, handleChange, isRequired, value, handleInputChange, formatOptionLabel, isClearable, maxMenuHeight, noOptionsMessage, }: SelectDefaultProps) => React.JSX.Element;
4
+ export default SelectDefault;
@@ -0,0 +1,26 @@
1
+ import { Control } from "react-hook-form";
2
+ import { FormatOptionLabelMeta } from "react-select";
3
+ export interface SelectDefaultProps {
4
+ name: string;
5
+ optionsSelect: OptionsProps[];
6
+ value: any;
7
+ placeholder?: string;
8
+ className?: string;
9
+ label?: string;
10
+ handleChange: (selectedOptions: OptionsProps) => void;
11
+ handleInputChange?: (inputValue: string) => void;
12
+ isDisabled?: boolean;
13
+ isRequired?: boolean;
14
+ inputRef?: unknown;
15
+ hasError?: boolean;
16
+ control?: Control<any>;
17
+ formatOptionLabel?: ((data: any, formatOptionLabelMeta: FormatOptionLabelMeta<any>) => React.ReactNode) | undefined;
18
+ isClearable?: boolean;
19
+ maxMenuHeight?: number;
20
+ noOptionsMessage?: string;
21
+ }
22
+ export type OptionsProps = {
23
+ label: string;
24
+ value: string;
25
+ isDisabled?: boolean;
26
+ };
@@ -0,0 +1,10 @@
1
+ import { Meta } from "@storybook/react";
2
+ import { SelectDefaultProps } from "./index.types";
3
+ declare const _default: Meta;
4
+ export default _default;
5
+ export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SelectDefaultProps>;
6
+ export declare const DisabledSelect: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SelectDefaultProps>;
7
+ export declare const OptionDisabled: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SelectDefaultProps>;
8
+ export declare const ErrorState: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SelectDefaultProps>;
9
+ export declare const WithFormatOptionLabel: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SelectDefaultProps>;
10
+ export declare const CustomMenuHeight: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SelectDefaultProps>;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ interface SkeletonProps {
3
+ className?: string;
4
+ }
5
+ export declare function SkeletonLoader({ className }: SkeletonProps): React.JSX.Element;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { SkeletonLoader } from "./index";
3
+ declare const meta: Meta<typeof SkeletonLoader>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Avatar: Story;
8
+ export declare const Card: Story;
@@ -0,0 +1,36 @@
1
+ import React from "react";
2
+ import { SwitchProps } from "./index.types";
3
+ /**
4
+ * Componente Switch suportado por eventos de mouse e teclado.
5
+ *
6
+ * @description
7
+ * Componente que mostra um estado boolean, informando se a opção está ligada/desligada.
8
+ *
9
+ * @param {boolean} props.checked - Mostra se o componente está marcado (`true`) ou desmarcado (`false`).
10
+ * @param {(newValue: boolean) => void} props.onChange
11
+ * - Função callback chamada no evento de clique e que retorna o novo estado (`true` ou `false`).
12
+ * @param {boolean} [props.disabled=false] - Se estiver como `true` o usuário fica impossibilitado de interagir com o elemento.
13
+ * @param {...any} [props.props] - Quaisquer outras props suportadas pelo elemento HTML do tipo input (e.g. `id`, `name`, `aria-*`).
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * import React, { useState } from "react";
18
+ * import { Switch } from "pge-front-common";
19
+ *
20
+ * export const Example = () => {
21
+ * const [enabled, setEnabled] = useState(false);
22
+ *
23
+ * return (
24
+ * <div>
25
+ * <Switch
26
+ * checked={enabled}
27
+ * onChange={(newState) => setEnabled(newState)}
28
+ * aria-label="Sim ou não"
29
+ * />
30
+ * <span>{enabled ? "Sim" : "Não"}</span>
31
+ * </div>
32
+ * );
33
+ * };
34
+ * ```
35
+ */
36
+ export declare const Switch: ({ checked, onChange, disabled, className, ...props }: SwitchProps) => React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { InputHTMLAttributes } from "react";
2
+ export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "onChange"> {
3
+ checked: boolean;
4
+ onChange: (newValue: boolean) => void;
5
+ disabled?: boolean;
6
+ className?: string;
7
+ }
@@ -0,0 +1,9 @@
1
+ import { Meta } from "@storybook/react";
2
+ import { Switch } from "./index";
3
+ import type { SwitchProps } from "./index.types";
4
+ declare const _default: Meta<typeof Switch>;
5
+ export default _default;
6
+ export declare const Checked: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SwitchProps>;
7
+ export declare const DisabledUnchecked: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SwitchProps>;
8
+ export declare const DisabledChecked: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SwitchProps>;
9
+ export declare const WithCustomClass: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SwitchProps>;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { TableComponentProps } from "./index.types";
3
+ declare const TableComponent: ({ columns, data, onSort, renderCell, onActionClick, noRecordsMessage, hasIcon, renderActionIconCell, columnIcon, iconColumnName, setBorderTable, hasBottomRounded, renderHeaderCell, textAlignment, getRowClassName, }: TableComponentProps) => React.JSX.Element;
4
+ export default TableComponent;
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+ export interface Column {
3
+ name: string;
4
+ uid: string;
5
+ sortable?: boolean;
6
+ renderCell?: (item: any) => React.ReactNode;
7
+ }
8
+ export interface TableComponentProps {
9
+ columns: Column[];
10
+ data: any[];
11
+ sortDirection: "asc" | "desc";
12
+ onSort: (uid: string) => void;
13
+ renderCell: (item: any, columnUid: string) => React.ReactNode;
14
+ onActionClick?: (item: any) => void;
15
+ actionIcon?: React.ReactNode;
16
+ noRecordsMessage?: string;
17
+ hasIcon?: boolean;
18
+ renderActionIconCell: (item: any) => React.JSX.Element | null;
19
+ columnIcon?: React.ReactNode;
20
+ iconColumnName?: string;
21
+ setBorderTable?: boolean;
22
+ hasBottomRounded?: boolean;
23
+ renderHeaderCell?: (columnName: string, isSortable?: boolean, columnIcon?: React.ReactNode) => React.ReactNode;
24
+ textAlignment?: "left" | "center" | "right";
25
+ getRowClassName?: (item: any, index: number) => string;
26
+ }
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import TableComponent from "./index";
3
+ declare const meta: Meta<typeof TableComponent>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const WithCustomCellRendering: Story;
8
+ export declare const WithActionColumn: Story;
9
+ export declare const EmptyState: Story;
10
+ export declare const LargeDataSet: Story;
11
+ export declare const WithCheckboxColumn: Story;
12
+ export declare const WithSwitchColumn: Story;
13
+ export declare const WithBasicSelectColumn: Story;
14
+ export declare const WithSelectColumn: Story;
15
+ export declare const WithMultiSelectColumn: Story;
16
+ export declare const WithHeaderCheckbox: Story;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const TableHeaderContext: React.Context<boolean>;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { TableBodyProps, TableCellProps, TableFooterProps, TableHeaderProps, TableProps, TableRowProps } from "./index.types";
3
+ export declare const Table: ({ children, className, ...props }: TableProps) => React.JSX.Element;
4
+ export declare const TableHeader: ({ children, ...props }: TableHeaderProps) => React.JSX.Element;
5
+ export declare const TableBody: ({ children, ...props }: TableBodyProps) => React.JSX.Element;
6
+ export declare const TableRow: ({ children, ...props }: TableRowProps) => React.JSX.Element;
7
+ export declare const TableCell: ({ children, ...props }: TableCellProps) => React.JSX.Element;
8
+ export declare const TableFooter: ({ children, ...props }: TableFooterProps) => React.JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from "react";
2
+ export type TableProps = React.HTMLAttributes<HTMLTableElement> & {
3
+ children: ReactNode;
4
+ className?: string;
5
+ };
6
+ export type TableHeaderProps = React.HTMLAttributes<HTMLTableSectionElement> & {
7
+ children: ReactNode;
8
+ };
9
+ export type TableBodyProps = React.HTMLAttributes<HTMLTableSectionElement> & {
10
+ children: ReactNode;
11
+ };
12
+ export type TableRowProps = React.HTMLAttributes<HTMLTableRowElement> & {
13
+ children: ReactNode;
14
+ };
15
+ export type TableCellProps = React.TdHTMLAttributes<HTMLTableCellElement> & {
16
+ children: ReactNode;
17
+ };
18
+ export type TableFooterProps = React.HTMLAttributes<HTMLTableSectionElement> & {
19
+ children: ReactNode;
20
+ };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Table } from "./index";
3
+ declare const meta: Meta<typeof Table>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { TextareaBaseProps } from "./textarea.types";
3
+ declare const TextareaBase: ({ name, label, value, type, Icon, placeholder, message, textAlign, textError, hasError, rows, hasIcon, required, showCounter, ...props }: TextareaBaseProps) => React.JSX.Element;
4
+ export default TextareaBase;
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import TextareaBase from "./Textarea";
3
+ declare const meta: Meta<typeof TextareaBase>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const WithError: Story;
8
+ export declare const WithIcon: Story;
9
+ export declare const WithCounter: Story;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ export type TextAlignType = "start" | "end" | "center";
3
+ export interface TextareaBaseProps extends Partial<HTMLTextAreaElement> {
4
+ label?: string | React.ReactNode;
5
+ hasError?: boolean;
6
+ textError?: string;
7
+ message?: string;
8
+ hasIcon?: boolean;
9
+ Icon?: React.ReactNode;
10
+ textAlign: TextAlignType;
11
+ onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
12
+ onClick?: (e: React.MouseEvent<HTMLTextAreaElement>) => void;
13
+ rows?: number;
14
+ required?: boolean | false;
15
+ showCounter?: boolean;
16
+ }
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ type TitleProps = {
3
+ title: string;
4
+ };
5
+ declare const Title: ({ title }: TitleProps) => React.JSX.Element;
6
+ export default Title;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import Title from "./index";
3
+ declare const meta: Meta<typeof Title>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
@@ -0,0 +1,6 @@
1
+ import { Tooltip } from "./index";
2
+ import { Meta, StoryObj } from "@storybook/react";
3
+ declare const meta: Meta<typeof Tooltip>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Tooltip>;
6
+ export declare const Default: Story;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { TooltipProps } from "./index.type";
3
+ export declare const Tooltip: ({ text, children, forceVisible }: TooltipProps) => React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ export interface TooltipProps {
2
+ text: string;
3
+ children: React.ReactNode;
4
+ forceVisible?: boolean;
5
+ }
6
+ export type Position = "top-right" | "bottom-right" | "bottom-left" | "top-left" | "mobile";
@@ -0,0 +1,6 @@
1
+ import { TooltipWithPortal } from "./index";
2
+ import { Meta, StoryObj } from "@storybook/react";
3
+ declare const meta: Meta<typeof TooltipWithPortal>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TooltipWithPortal>;
6
+ export declare const Default: Story;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { TooltipProps } from "./index.type";
3
+ export declare const TooltipWithPortal: ({ text, children, forceVisible }: TooltipProps) => React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ export interface TooltipProps {
2
+ text: string;
3
+ children: React.ReactNode;
4
+ forceVisible?: boolean;
5
+ }
6
+ export type Position = "top-right" | "bottom-right" | "bottom-left" | "top-left" | "mobile";
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { TreeSelect } from "./index";
3
+ declare const meta: Meta<typeof TreeSelect>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Padrao: Story;
7
+ export declare const ComFiltro: Story;
8
+ export declare const Obrigatorio: Story;
9
+ export declare const ComErro: Story;
10
+ export declare const Desabilitado: Story;
11
+ export declare const ComValorPreSelecionado: Story;
12
+ export declare const ExibicaoEmChips: Story;
13
+ export declare const ComIcones: Story;
14
+ export declare const ComIconesMultiplo: Story;
15
+ export declare const SemOpcoes: Story;
16
+ export declare const TodosOsCenarios: Story;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import "primereact/resources/primereact.css";
3
+ import "primereact/resources/themes/lara-light-blue/theme.css";
4
+ import "primeicons/primeicons.css";
5
+ import { TreeSelectProps } from "./index.type";
6
+ declare const TreeSelect: ({ label, value, restrictionMessage, onChange, isError, disabled, placeholder, required, display, filter, options, selectionMode, }: TreeSelectProps) => React.JSX.Element;
7
+ export { TreeSelect };