pge-front-common 10.4.6 → 10.4.8

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,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,24 @@
1
+ /**
2
+ * Elemento de tooltip, que aparecerá na tela de forma dinâmica quando o usuário passar o mouse sob o item
3
+ *
4
+ * @component
5
+ * @example
6
+ * ```tsx
7
+ * import { Tooltip } from 'pge-front-common';
8
+ *
9
+ * const App = () => (
10
+ * <Tooltip text="Texto que aparecerá na tooltip">
11
+ * <span>Passe o mouse aqui</span>
12
+ * </Tooltip>
13
+ * );
14
+ * ```
15
+ *
16
+ * @param {TooltipProps} props - Props para o componente de tooltip
17
+ * @param {string} props.text - O texto que será exibido dentro da tooltip
18
+ * @param {React.ReactNode} props.children - O elemento html que mostrará a tooltip quando o mouse passar por cima
19
+ *
20
+ * @returns {JSX.Element} O retorno é um JSX Element
21
+ */
22
+ import React from "react";
23
+ import { TooltipProps } from "./index.type";
24
+ export declare const Tooltip: ({ text, children }: TooltipProps) => React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ export interface TooltipProps {
2
+ text: string;
3
+ children: React.ReactNode;
4
+ }
5
+ export type Position = "top-right" | "bottom-right" | "bottom-left" | "top-left";
@@ -38,4 +38,5 @@ import { IconAttention } from "./attention-icon";
38
38
  import { IconAlert } from "./alert-icon";
39
39
  import { IconCheckSuccess } from "./check-success-icon";
40
40
  import { IconInformative } from "./informative-icon";
41
- export { IconInformative, IconCheckSuccess, IconAlert, IconAttention, IconPrint, 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, IconHourglass, IconSearch, IconUpAndDownArror, IconCheck, IconUploadFile, LogoDividaAtiva, IconUploadV2, };
41
+ import { IconQuestionMark } from "./question-mark-icon";
42
+ export { IconInformative, IconCheckSuccess, IconAlert, IconAttention, IconPrint, 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, IconHourglass, IconSearch, IconUpAndDownArror, IconCheck, IconUploadFile, LogoDividaAtiva, IconUploadV2, IconQuestionMark };
@@ -0,0 +1,2 @@
1
+ import React, { SVGProps } from "react";
2
+ export declare const IconQuestionMark: ({ className, ...props }: SVGProps<SVGSVGElement>) => React.JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import React, { SVGProps } from "react";
2
- export declare const IconSearch: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
2
+ export declare const IconSearch: ({ className, ...props }: SVGProps<SVGSVGElement>) => React.JSX.Element;
package/lib/index.d.ts CHANGED
@@ -77,6 +77,35 @@ interface UploadFileProps {
77
77
 
78
78
  declare const FileUpload: ({ fileTypes, onFileSelect, title }: UploadFileProps) => React__default.JSX.Element;
79
79
 
80
+ interface TooltipProps {
81
+ text: string;
82
+ children: React.ReactNode;
83
+ }
84
+
85
+ /**
86
+ * Elemento de tooltip, que aparecerá na tela de forma dinâmica quando o usuário passar o mouse sob o item
87
+ *
88
+ * @component
89
+ * @example
90
+ * ```tsx
91
+ * import { Tooltip } from 'pge-front-common';
92
+ *
93
+ * const App = () => (
94
+ * <Tooltip text="Texto que aparecerá na tooltip">
95
+ * <span>Passe o mouse aqui</span>
96
+ * </Tooltip>
97
+ * );
98
+ * ```
99
+ *
100
+ * @param {TooltipProps} props - Props para o componente de tooltip
101
+ * @param {string} props.text - O texto que será exibido dentro da tooltip
102
+ * @param {React.ReactNode} props.children - O elemento html que mostrará a tooltip quando o mouse passar por cima
103
+ *
104
+ * @returns {JSX.Element} O retorno é um JSX Element
105
+ */
106
+
107
+ declare const Tooltip: ({ text, children }: TooltipProps) => React__default.JSX.Element;
108
+
80
109
  type TextAlignType = "start" | "end" | "center";
81
110
  interface TextareaBaseProps extends Partial<HTMLTextAreaElement> {
82
111
  label?: string;
@@ -331,7 +360,7 @@ declare const IconPdf: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.E
331
360
 
332
361
  declare const IconHourglass: (props: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
333
362
 
334
- declare const IconSearch: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
363
+ declare const IconSearch: ({ className, ...props }: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
335
364
 
336
365
  declare const IconUpAndDownArror: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
337
366
 
@@ -343,4 +372,6 @@ declare const IconUploadFile: (props?: SVGProps<SVGSVGElement>) => React__defaul
343
372
 
344
373
  declare const IconUploadV2: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
345
374
 
346
- export { Accordion, AccordionItem, type AccordionItemProps, BoxError, BoxSuccess, Button, type ButtonProps$1 as ButtonProps, Checkbox, type Column, FileUpload, FooterComponent as Footer, Header, HeaderPge, IconAdd, IconAddCell, IconArrowExpland, IconArrowRecall, IconCLose, IconCalendar, IconCheck, IconCheckCircle, IconCircleExpland, IconCircleRecall, IconDelete, IconDownload, IconEdit, IconEventAvaliable, IconHourglass, IconInvisibility, IconLogout, IconNewTab, IconPdf, IconPrint, IconProfile, IconRemove, IconSearch, IconSwap, IconTriangleExpand, IconTriangleRecall, IconUpAndDownArror, IconUpload, IconUploadFile, IconUploadV2, IconVisibility, IconWarning, InformativeBox, type InformativeBoxProps, InputBase, type InputProps, LoadingSpinner, SelectMult as Multiselect, type OptionsProps, PaginationTable, Pagination as PaginationV2, PasswordInput, PgeButton, RadioGroupBase, type RadioGroupBaseProps, type SelectMultProps, TableComponent, type TableComponentProps, TextareaBase, type TextareaBaseProps, Title };
375
+ declare const IconQuestionMark: ({ className, ...props }: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
376
+
377
+ export { Accordion, AccordionItem, type AccordionItemProps, BoxError, BoxSuccess, Button, type ButtonProps$1 as ButtonProps, Checkbox, type Column, FileUpload, FooterComponent as Footer, Header, HeaderPge, IconAdd, IconAddCell, IconArrowExpland, IconArrowRecall, IconCLose, IconCalendar, IconCheck, IconCheckCircle, IconCircleExpland, IconCircleRecall, IconDelete, IconDownload, IconEdit, IconEventAvaliable, IconHourglass, IconInvisibility, IconLogout, IconNewTab, IconPdf, IconPrint, IconProfile, IconQuestionMark, IconRemove, IconSearch, IconSwap, IconTriangleExpand, IconTriangleRecall, IconUpAndDownArror, IconUpload, IconUploadFile, IconUploadV2, IconVisibility, IconWarning, InformativeBox, type InformativeBoxProps, InputBase, type InputProps, LoadingSpinner, SelectMult as Multiselect, type OptionsProps, PaginationTable, Pagination as PaginationV2, PasswordInput, PgeButton, RadioGroupBase, type RadioGroupBaseProps, type SelectMultProps, TableComponent, type TableComponentProps, TextareaBase, type TextareaBaseProps, Title, Tooltip };