pge-front-common 5.0.0 → 6.0.0
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/lib/components/Select/Select.stories.d.ts +4 -3
- package/lib/components/Select/index.d.ts +1 -1
- package/lib/components/Select/index.types.d.ts +6 -4
- package/lib/index.d.ts +46 -45
- package/lib/index.esm.js +126 -93
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +139 -106
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import {
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { Select } from "./index";
|
|
3
|
+
declare const meta: Meta<typeof Select>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const WithError: Story;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const WithSelectedValue: Story;
|
|
9
|
+
export declare const OpenDropdown: Story;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export interface DropdownProps {
|
|
2
3
|
label: string;
|
|
3
4
|
name: string;
|
|
4
|
-
type: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
hasError?: boolean;
|
|
7
7
|
textError?: string;
|
|
@@ -12,10 +12,12 @@ export interface DropdownProps {
|
|
|
12
12
|
textAling?: "start" | "end" | "center";
|
|
13
13
|
width?: number;
|
|
14
14
|
defaultValue?: string;
|
|
15
|
-
options
|
|
16
|
-
value: OptionsProps;
|
|
17
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
options: OptionsProps[];
|
|
18
16
|
onClick?: (e: React.MouseEvent<HTMLInputElement>) => void;
|
|
17
|
+
selectedValue: string;
|
|
18
|
+
handleSelect: (value: string) => void;
|
|
19
|
+
open: boolean;
|
|
20
|
+
handleOpen: () => void;
|
|
19
21
|
}
|
|
20
22
|
export type OptionsProps = {
|
|
21
23
|
label: string;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React, { SVGProps } from 'react';
|
|
2
2
|
|
|
3
|
-
interface ButtonProps extends React
|
|
3
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
4
|
variant: "primary" | "secondary";
|
|
5
5
|
text: string;
|
|
6
|
-
leftIcon?: React
|
|
6
|
+
leftIcon?: React.ReactNode;
|
|
7
7
|
}
|
|
8
|
-
declare function Button({ variant, text, leftIcon, ...props }: ButtonProps): React
|
|
8
|
+
declare function Button({ variant, text, leftIcon, ...props }: ButtonProps): React.JSX.Element;
|
|
9
9
|
|
|
10
10
|
type TextAlignType = "start" | "end" | "center";
|
|
11
11
|
interface InputBaseProps extends Partial<HTMLInputElement> {
|
|
@@ -14,33 +14,32 @@ interface InputBaseProps extends Partial<HTMLInputElement> {
|
|
|
14
14
|
hasIcon?: boolean;
|
|
15
15
|
textError?: string;
|
|
16
16
|
message?: string;
|
|
17
|
-
Icon?: React
|
|
17
|
+
Icon?: React.ReactNode;
|
|
18
18
|
textAlign: TextAlignType;
|
|
19
|
-
onChange?: (e: React
|
|
20
|
-
onClick?: (e: React
|
|
19
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
20
|
+
onClick?: (e: React.MouseEvent<HTMLInputElement>) => void;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
declare const InputBase: React
|
|
23
|
+
declare const InputBase: React.FC<InputBaseProps>;
|
|
24
24
|
|
|
25
25
|
interface ModalProps {
|
|
26
26
|
isModalOpen: boolean;
|
|
27
|
-
onOpenChange: React
|
|
28
|
-
children: React
|
|
27
|
+
onOpenChange: React.Dispatch<React.SetStateAction<boolean>>;
|
|
28
|
+
children: React.ReactNode;
|
|
29
29
|
title: string;
|
|
30
30
|
}
|
|
31
|
-
declare const Modal: ({ isModalOpen, onOpenChange, children, title, }: ModalProps) => React
|
|
31
|
+
declare const Modal: ({ isModalOpen, onOpenChange, children, title, }: ModalProps) => React.JSX.Element;
|
|
32
32
|
|
|
33
33
|
interface ModalConfirmProps {
|
|
34
34
|
isModalOpen: boolean;
|
|
35
|
-
onOpenChange: React
|
|
36
|
-
children: React
|
|
35
|
+
onOpenChange: React.Dispatch<React.SetStateAction<boolean>>;
|
|
36
|
+
children: React.ReactNode;
|
|
37
37
|
}
|
|
38
|
-
declare const ModalConfirm: React
|
|
38
|
+
declare const ModalConfirm: React.FC<ModalConfirmProps>;
|
|
39
39
|
|
|
40
40
|
interface DropdownProps {
|
|
41
41
|
label: string;
|
|
42
42
|
name: string;
|
|
43
|
-
type: string;
|
|
44
43
|
disabled?: boolean;
|
|
45
44
|
hasError?: boolean;
|
|
46
45
|
textError?: string;
|
|
@@ -51,17 +50,19 @@ interface DropdownProps {
|
|
|
51
50
|
textAling?: "start" | "end" | "center";
|
|
52
51
|
width?: number;
|
|
53
52
|
defaultValue?: string;
|
|
54
|
-
options
|
|
55
|
-
value: OptionsProps;
|
|
56
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
53
|
+
options: OptionsProps[];
|
|
57
54
|
onClick?: (e: React.MouseEvent<HTMLInputElement>) => void;
|
|
55
|
+
selectedValue: string;
|
|
56
|
+
handleSelect: (value: string) => void;
|
|
57
|
+
open: boolean;
|
|
58
|
+
handleOpen: () => void;
|
|
58
59
|
}
|
|
59
60
|
type OptionsProps = {
|
|
60
61
|
label: string;
|
|
61
62
|
value: string;
|
|
62
63
|
};
|
|
63
64
|
|
|
64
|
-
declare const
|
|
65
|
+
declare const Select: React.FC<DropdownProps>;
|
|
65
66
|
|
|
66
67
|
interface IFuncionalidade {
|
|
67
68
|
id: number;
|
|
@@ -92,54 +93,54 @@ interface HeaderProps {
|
|
|
92
93
|
userName: string;
|
|
93
94
|
handleLogout: () => void;
|
|
94
95
|
}
|
|
95
|
-
declare const Header: React
|
|
96
|
+
declare const Header: React.FC<HeaderProps>;
|
|
96
97
|
|
|
97
|
-
declare function FooterComponent(): React
|
|
98
|
+
declare function FooterComponent(): React.JSX.Element;
|
|
98
99
|
|
|
99
|
-
declare const IconDownload: (props?: SVGProps<SVGSVGElement>) => React
|
|
100
|
+
declare const IconDownload: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
100
101
|
|
|
101
|
-
declare const IconVisibillity: (props?: SVGProps<SVGSVGElement>) => React
|
|
102
|
+
declare const IconVisibillity: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
102
103
|
|
|
103
|
-
declare const IconEdit: (props?: SVGProps<SVGSVGElement>) => React
|
|
104
|
+
declare const IconEdit: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
104
105
|
|
|
105
|
-
declare const IconDelete: (props?: SVGProps<SVGSVGElement>) => React
|
|
106
|
+
declare const IconDelete: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
106
107
|
|
|
107
|
-
declare const IconCalendar: (props?: SVGProps<SVGSVGElement>) => React
|
|
108
|
+
declare const IconCalendar: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
108
109
|
|
|
109
|
-
declare const IconProfile: (props?: SVGProps<SVGSVGElement>) => React
|
|
110
|
+
declare const IconProfile: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
110
111
|
|
|
111
|
-
declare const IconUpload: (props?: SVGProps<SVGSVGElement>) => React
|
|
112
|
+
declare const IconUpload: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
112
113
|
|
|
113
|
-
declare const IconNewTab: (props?: SVGProps<SVGSVGElement>) => React
|
|
114
|
+
declare const IconNewTab: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
114
115
|
|
|
115
|
-
declare const IconWarning: (props?: SVGProps<SVGSVGElement>) => React
|
|
116
|
+
declare const IconWarning: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
116
117
|
|
|
117
|
-
declare const IconCheckCircle: (props?: SVGProps<SVGSVGElement>) => React
|
|
118
|
+
declare const IconCheckCircle: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
118
119
|
|
|
119
|
-
declare const IconEventAvaliable: (props?: SVGProps<SVGSVGElement>) => React
|
|
120
|
+
declare const IconEventAvaliable: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
120
121
|
|
|
121
|
-
declare const IconLogout: (props?: SVGProps<SVGSVGElement>) => React
|
|
122
|
+
declare const IconLogout: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
122
123
|
|
|
123
|
-
declare const IconCLose: (props?: SVGProps<SVGSVGElement>) => React
|
|
124
|
+
declare const IconCLose: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
124
125
|
|
|
125
|
-
declare const IconAdd: (props?: SVGProps<SVGSVGElement>) => React
|
|
126
|
+
declare const IconAdd: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
126
127
|
|
|
127
|
-
declare const IconRemove: (props?: SVGProps<SVGSVGElement>) => React
|
|
128
|
+
declare const IconRemove: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
128
129
|
|
|
129
|
-
declare const IconCircleExpland: (props?: SVGProps<SVGSVGElement>) => React
|
|
130
|
+
declare const IconCircleExpland: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
130
131
|
|
|
131
|
-
declare const IconCircleRecall: (props?: SVGProps<SVGSVGElement>) => React
|
|
132
|
+
declare const IconCircleRecall: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
132
133
|
|
|
133
|
-
declare const IconArrowExpland: (props?: SVGProps<SVGSVGElement>) => React
|
|
134
|
+
declare const IconArrowExpland: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
134
135
|
|
|
135
|
-
declare const IconArrowRecall: (props?: SVGProps<SVGSVGElement>) => React
|
|
136
|
+
declare const IconArrowRecall: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
136
137
|
|
|
137
|
-
declare const IconTriangleExpand: (props?: SVGProps<SVGSVGElement>) => React
|
|
138
|
+
declare const IconTriangleExpand: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
138
139
|
|
|
139
|
-
declare const IconTriangleRecall: (props?: SVGProps<SVGSVGElement>) => React
|
|
140
|
+
declare const IconTriangleRecall: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
140
141
|
|
|
141
|
-
declare const IconSwap: (props?: SVGProps<SVGSVGElement>) => React
|
|
142
|
+
declare const IconSwap: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
142
143
|
|
|
143
|
-
declare const IconAddCell: (props?: SVGProps<SVGSVGElement>) => React
|
|
144
|
+
declare const IconAddCell: (props?: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
144
145
|
|
|
145
|
-
export { Button, type ButtonProps,
|
|
146
|
+
export { Button, type ButtonProps, type DropdownProps, 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 InputBaseProps, Modal, ModalConfirm, type ModalConfirmProps, type ModalProps, type OptionsProps, Select };
|