pge-front-common 4.0.5 → 4.0.7
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 +10 -4
- package/lib/components/Input/index.d.ts +3 -1
- package/lib/components/Input/index.types.d.ts +3 -1
- package/lib/components/Input/styles.d.ts +6 -3
- package/lib/components/Select/index.types.d.ts +1 -0
- package/lib/components/Select/styles.d.ts +1 -0
- package/lib/icons/index.d.ts +3 -1
- package/lib/icons/logo-rh-digital.d.ts +3 -0
- package/lib/icons/menu-icon.d.ts +3 -0
- package/lib/index.d.ts +5 -2
- package/lib/index.esm.js +23 -52
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +36 -65
- package/lib/index.js.map +1 -1
- package/lib/variables.css +54 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -24,19 +24,25 @@ npm i pge-front-common
|
|
|
24
24
|
|
|
25
25
|
Instale a biblioteca usando npm:
|
|
26
26
|
|
|
27
|
+
Importar o stykes global para em seu App or layout
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
import "pge-front-common/lib/variables.css";
|
|
31
|
+
```
|
|
32
|
+
|
|
27
33
|
```typescript
|
|
28
|
-
import React from
|
|
29
|
-
import { Button } from
|
|
34
|
+
import React from "react";
|
|
35
|
+
import { Button } from "pge-front-common";
|
|
30
36
|
|
|
31
37
|
const App: React.FC = () => {
|
|
32
38
|
const handleClick = () => {
|
|
33
|
-
alert(
|
|
39
|
+
alert("Button clicked!");
|
|
34
40
|
};
|
|
35
41
|
|
|
36
42
|
return (
|
|
37
43
|
<div>
|
|
38
44
|
<h1>Hello, World!</h1>
|
|
39
|
-
|
|
45
|
+
<Button variant="secondary" text="Text" />
|
|
40
46
|
</div>
|
|
41
47
|
);
|
|
42
48
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import * as S from "./styles";
|
|
2
3
|
import { InputBaseProps } from "./index.types";
|
|
3
|
-
|
|
4
|
+
export type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "capture"> & S.StyledInputProps;
|
|
5
|
+
declare const InputBase: React.FC<InputBaseProps>;
|
|
4
6
|
export default InputBase;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
export type TextAlignType = "start" | "end" | "center";
|
|
2
3
|
export interface InputBaseProps extends Partial<HTMLInputElement> {
|
|
3
4
|
label: string;
|
|
4
5
|
hasError?: boolean;
|
|
6
|
+
hasIcon?: boolean;
|
|
5
7
|
textError?: string;
|
|
6
8
|
message?: string;
|
|
7
9
|
Icon?: React.ReactNode;
|
|
8
|
-
|
|
10
|
+
textAlign: TextAlignType;
|
|
9
11
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
12
|
onClick?: (e: React.MouseEvent<HTMLInputElement>) => void;
|
|
11
13
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TextAlignType } from "./index.types";
|
|
1
2
|
export declare const InputContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
3
|
width?: number;
|
|
3
4
|
}>> & string;
|
|
@@ -5,9 +6,11 @@ export declare const InputWrapper: import("styled-components/dist/types").IStyle
|
|
|
5
6
|
icon?: boolean;
|
|
6
7
|
hasError?: boolean;
|
|
7
8
|
}>> & string;
|
|
8
|
-
export
|
|
9
|
-
textAlign
|
|
10
|
-
|
|
9
|
+
export interface StyledInputProps {
|
|
10
|
+
textAlign: TextAlignType;
|
|
11
|
+
hasIcon?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const StyledInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, StyledInputProps>> & string;
|
|
11
14
|
export declare const Message: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {
|
|
12
15
|
hasError?: boolean;
|
|
13
16
|
}>> & string;
|
|
@@ -7,6 +7,7 @@ export declare const InputWrapper: import("styled-components/dist/types").IStyle
|
|
|
7
7
|
}>> & string;
|
|
8
8
|
export declare const StyledInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
9
9
|
textAlign?: "start" | "end" | "center";
|
|
10
|
+
hasIcon?: boolean;
|
|
10
11
|
}>> & string;
|
|
11
12
|
export declare const Message: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {
|
|
12
13
|
hasError?: boolean;
|
package/lib/icons/index.d.ts
CHANGED
|
@@ -21,4 +21,6 @@ import { IconTriangleExpand } from "./triangle-expand-icon";
|
|
|
21
21
|
import { IconTriangleRecall } from "./triangle-to-recall-icon";
|
|
22
22
|
import { IconSwap } from "./swap-icon";
|
|
23
23
|
import { IconAddCell } from "./add-cell-icon";
|
|
24
|
-
|
|
24
|
+
import { MenuIcon } from "./menu-icon";
|
|
25
|
+
import { LogoRhDigital } from "./logo-rh-digital";
|
|
26
|
+
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, };
|
package/lib/index.d.ts
CHANGED
|
@@ -7,18 +7,20 @@ interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
7
7
|
}
|
|
8
8
|
declare function Button({ variant, text, leftIcon, ...props }: ButtonProps): React$1.JSX.Element;
|
|
9
9
|
|
|
10
|
+
type TextAlignType = "start" | "end" | "center";
|
|
10
11
|
interface InputBaseProps extends Partial<HTMLInputElement> {
|
|
11
12
|
label: string;
|
|
12
13
|
hasError?: boolean;
|
|
14
|
+
hasIcon?: boolean;
|
|
13
15
|
textError?: string;
|
|
14
16
|
message?: string;
|
|
15
17
|
Icon?: React$1.ReactNode;
|
|
16
|
-
|
|
18
|
+
textAlign: TextAlignType;
|
|
17
19
|
onChange?: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
18
20
|
onClick?: (e: React$1.MouseEvent<HTMLInputElement>) => void;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
|
-
declare const InputBase: React$1.FC<
|
|
23
|
+
declare const InputBase: React$1.FC<InputBaseProps>;
|
|
22
24
|
|
|
23
25
|
interface ModalProps {
|
|
24
26
|
isModalOpen: boolean;
|
|
@@ -44,6 +46,7 @@ interface DropdownProps {
|
|
|
44
46
|
textError?: string;
|
|
45
47
|
message?: string;
|
|
46
48
|
placeholder?: string;
|
|
49
|
+
hasIcon?: boolean;
|
|
47
50
|
Icon?: string | React.ReactNode;
|
|
48
51
|
textAling?: "start" | "end" | "center";
|
|
49
52
|
width?: number;
|
package/lib/index.esm.js
CHANGED
|
@@ -4,36 +4,6 @@ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
|
4
4
|
import * as ReactDOM from 'react-dom';
|
|
5
5
|
import ReactDOM__default from 'react-dom';
|
|
6
6
|
|
|
7
|
-
function styleInject(css, ref) {
|
|
8
|
-
if ( ref === void 0 ) ref = {};
|
|
9
|
-
var insertAt = ref.insertAt;
|
|
10
|
-
|
|
11
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
12
|
-
|
|
13
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
14
|
-
var style = document.createElement('style');
|
|
15
|
-
style.type = 'text/css';
|
|
16
|
-
|
|
17
|
-
if (insertAt === 'top') {
|
|
18
|
-
if (head.firstChild) {
|
|
19
|
-
head.insertBefore(style, head.firstChild);
|
|
20
|
-
} else {
|
|
21
|
-
head.appendChild(style);
|
|
22
|
-
}
|
|
23
|
-
} else {
|
|
24
|
-
head.appendChild(style);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (style.styleSheet) {
|
|
28
|
-
style.styleSheet.cssText = css;
|
|
29
|
-
} else {
|
|
30
|
-
style.appendChild(document.createTextNode(css));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
var css_248z$1 = ":root {\r\n --color-primary: #005a92;\r\n --color-hover: #005a92;\r\n --color-icon: #4a4a4b;\r\n --color-success: #198754;\r\n --color-warning: #cb8700;\r\n --color-alert: #cb0a0a;\r\n --color-information: #1a95b0;\r\n --color-border: #d9d9d9;\r\n --color-light-grey: #c3c3c3;\r\n --color-grey: #a0a0a0;\r\n --color-base-white: #ffffff;\r\n --color-base-black: #303030;\r\n}\r\n";
|
|
35
|
-
styleInject(css_248z$1);
|
|
36
|
-
|
|
37
7
|
/*! *****************************************************************************
|
|
38
8
|
Copyright (c) Microsoft Corporation.
|
|
39
9
|
|
|
@@ -89,9 +59,6 @@ function __makeTemplateObject(cooked, raw) {
|
|
|
89
59
|
return cooked;
|
|
90
60
|
}
|
|
91
61
|
|
|
92
|
-
var css_248z = "/* src/styles/button.css */\r\n.button {\r\n all: unset;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 4px;\r\n cursor: pointer;\r\n padding: 12px 16px;\r\n border-radius: 8px;\r\n}\r\n\r\n.button.primary {\r\n width: fit-content;\r\n height: fit-content;\r\n border: 1px solid var(--color-primary);\r\n background: var(--color-primary);\r\n color: var(--color-base-white);\r\n font-weight: 700;\r\n}\r\n\r\n.button.secondary {\r\n width: fit-content;\r\n height: fit-content;\r\n border: 1px solid var(--color-primary);\r\n background: transparent;\r\n color: var(--color-primary);\r\n font-weight: 700;\r\n}\r\n\r\n.button:disabled {\r\n cursor: not-allowed;\r\n}\r\n";
|
|
93
|
-
styleInject(css_248z);
|
|
94
|
-
|
|
95
62
|
function Button(_a) {
|
|
96
63
|
var variant = _a.variant, _b = _a.text, text = _b === void 0 ? "" : _b, leftIcon = _a.leftIcon, props = __rest(_a, ["variant", "text", "leftIcon"]);
|
|
97
64
|
return (React__default.createElement("button", __assign({ className: "button ".concat(variant) }, props),
|
|
@@ -988,15 +955,16 @@ var InputWrapper$1 = pt.div(templateObject_2$2 || (templateObject_2$2 = __makeTe
|
|
|
988
955
|
var hasError = _a.hasError;
|
|
989
956
|
return (hasError ? "#cb0a0a80" : "#0091ea80");
|
|
990
957
|
});
|
|
991
|
-
var StyledInput$1 = pt.input(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n color: #30303090;\n cursor: pointer;\n
|
|
992
|
-
var textAlign = _a.
|
|
993
|
-
|
|
994
|
-
|
|
958
|
+
var StyledInput$1 = pt.input(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n color: #30303090;\n cursor: pointer;\n width: 90%;\n border: none;\n\n ", "\n\n &::placeholder {\n color: #30303020;\n line-height: 20px;\n }\n\n &:focus,\n &:focus-visible,\n &:focus-within {\n outline: none;\n }\n"], ["\n color: #30303090;\n cursor: pointer;\n width: 90%;\n border: none;\n\n ", "\n\n &::placeholder {\n color: #30303020;\n line-height: 20px;\n }\n\n &:focus,\n &:focus-visible,\n &:focus-within {\n outline: none;\n }\n"])), function (_a) {
|
|
959
|
+
var _b = _a.textAlign, textAlign = _b === void 0 ? "start" : _b, _c = _a.hasIcon, hasIcon = _c === void 0 ? false : _c;
|
|
960
|
+
switch (textAlign) {
|
|
961
|
+
case "end":
|
|
962
|
+
return "\n text-align: right;\n margin-left: 25px;\n margin-right: 20px;\n ";
|
|
963
|
+
case "center":
|
|
964
|
+
return "\n text-align: center;\n margin: auto;\n padding-right: 10px;\n ";
|
|
965
|
+
default:
|
|
966
|
+
return "\n text-align: left;\n margin-left: ".concat(hasIcon ? "35px" : "8px", ";\n ");
|
|
995
967
|
}
|
|
996
|
-
if (textAlign === "center") {
|
|
997
|
-
return "\n text-align: center;\n margin:auto;\n padding-right: 10px;\n ";
|
|
998
|
-
}
|
|
999
|
-
return "\n text-align: left;\n margin-left: 25px;\n margin-right: 20px;\n ";
|
|
1000
968
|
});
|
|
1001
969
|
var Message$1 = pt.p(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n color: ", ";\n margin-left: 10px;\n margin-top: 4px;\n\n font-family: Open Sans;\n font-size: 10px;\n font-weight: 700;\n line-height: 15px;\n text-align: left;\n"], ["\n color: ", ";\n margin-left: 10px;\n margin-top: 4px;\n\n font-family: Open Sans;\n font-size: 10px;\n font-weight: 700;\n line-height: 15px;\n text-align: left;\n"])), function (_a) {
|
|
1002
970
|
var hasError = _a.hasError;
|
|
@@ -1007,13 +975,13 @@ var InputContent$1 = pt.div(templateObject_6$2 || (templateObject_6$2 = __makeTe
|
|
|
1007
975
|
var templateObject_1$3, templateObject_2$2, templateObject_3$2, templateObject_4$2, templateObject_5$2, templateObject_6$2;
|
|
1008
976
|
|
|
1009
977
|
var InputBase = function (_a) {
|
|
1010
|
-
var name = _a.name, label = _a.label, value = _a.value, type = _a.type, Icon = _a.Icon, placeholder = _a.placeholder, message = _a.message,
|
|
978
|
+
var name = _a.name, label = _a.label, value = _a.value, type = _a.type, Icon = _a.Icon, placeholder = _a.placeholder, message = _a.message, textAlign = _a.textAlign, textError = _a.textError, hasError = _a.hasError, width = _a.width, hasIcon = _a.hasIcon, props = __rest(_a, ["name", "label", "value", "type", "Icon", "placeholder", "message", "textAlign", "textError", "hasError", "width", "hasIcon"]);
|
|
1011
979
|
return (React__default.createElement(InputContainer$1, { width: width },
|
|
1012
980
|
React__default.createElement(Label$1, { htmlFor: name }, label),
|
|
1013
981
|
React__default.createElement(InputWrapper$1, { icon: !!Icon, hasError: hasError },
|
|
1014
982
|
React__default.createElement(InputContent$1, null,
|
|
1015
983
|
Icon && Icon,
|
|
1016
|
-
React__default.createElement(StyledInput$1, __assign({}, props, { id: name, type: type, placeholder: placeholder, value: value, textAlign:
|
|
984
|
+
React__default.createElement(StyledInput$1, __assign({}, props, { id: name, type: type, placeholder: placeholder, value: value, textAlign: textAlign, hasIcon: hasIcon })))),
|
|
1017
985
|
textError && hasError && (React__default.createElement(Message$1, { hasError: !!textError }, textError)),
|
|
1018
986
|
!hasError && message && React__default.createElement(Message$1, null, message)));
|
|
1019
987
|
};
|
|
@@ -3204,14 +3172,14 @@ var InputWrapper = pt.div(templateObject_2 || (templateObject_2 = __makeTemplate
|
|
|
3204
3172
|
return (hasError ? "#cb0a0a80" : "#0091ea80");
|
|
3205
3173
|
});
|
|
3206
3174
|
var StyledInput = pt.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: #30303090;\n cursor: pointer;\n padding: 14px 0 14px 10px;\n width: 90%;\n\n border: none;\n\n display: flex;\n align-items: center;\n\n ", "\n\n &::placeholder {\n color: #30303020;\n line-height: 20px;\n }\n\n &:focus,\n &:focus-visible,\n &:focus-within {\n outline: none;\n }\n"], ["\n color: #30303090;\n cursor: pointer;\n padding: 14px 0 14px 10px;\n width: 90%;\n\n border: none;\n\n display: flex;\n align-items: center;\n\n ", "\n\n &::placeholder {\n color: #30303020;\n line-height: 20px;\n }\n\n &:focus,\n &:focus-visible,\n &:focus-within {\n outline: none;\n }\n"])), function (_a) {
|
|
3207
|
-
var textAlign = _a.textAlign;
|
|
3175
|
+
var textAlign = _a.textAlign, hasIcon = _a.hasIcon;
|
|
3208
3176
|
if (textAlign === "end") {
|
|
3209
3177
|
return "\n text-align: right;\n margin-left: 25px;\n margin-right: 20px;\n ";
|
|
3210
3178
|
}
|
|
3211
3179
|
if (textAlign === "center") {
|
|
3212
3180
|
return "\n text-align: center;\n margin:auto;\n padding-right: 10px;\n ";
|
|
3213
3181
|
}
|
|
3214
|
-
return "\n text-align: left;\n margin-left:
|
|
3182
|
+
return "\n text-align: left;\n margin-left: ".concat(hasIcon ? "35px" : "8px", ";\n \n ");
|
|
3215
3183
|
});
|
|
3216
3184
|
var Message = pt.p(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n margin-left: 10px;\n margin-top: 4px;\n\n font-family: Open Sans;\n font-size: 10px;\n font-weight: 700;\n line-height: 15px;\n text-align: left;\n"], ["\n color: ", ";\n margin-left: 10px;\n margin-top: 4px;\n\n font-family: Open Sans;\n font-size: 10px;\n font-weight: 700;\n line-height: 15px;\n text-align: left;\n"])), function (_a) {
|
|
3217
3185
|
var hasError = _a.hasError;
|
|
@@ -3219,7 +3187,7 @@ var Message = pt.p(templateObject_4 || (templateObject_4 = __makeTemplateObject(
|
|
|
3219
3187
|
});
|
|
3220
3188
|
var Label = pt.label(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: #303030;\n width: 100%;\n font-family: Open Sans;\n font-size: 14px;\n font-weight: 700;\n line-height: 21px;\n text-align: left;\n cursor: pointer;\n"], ["\n color: #303030;\n width: 100%;\n font-family: Open Sans;\n font-size: 14px;\n font-weight: 700;\n line-height: 21px;\n text-align: left;\n cursor: pointer;\n"])));
|
|
3221
3189
|
var InputContent = pt.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: 46px;\n & > svg {\n width: 20px;\n height: 20px;\n margin: 14px 8px;\n position: absolute;\n }\n"], ["\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: 46px;\n & > svg {\n width: 20px;\n height: 20px;\n margin: 14px 8px;\n position: absolute;\n }\n"])));
|
|
3222
|
-
var ArrowIcon = pt.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: absolute;\n
|
|
3190
|
+
var ArrowIcon = pt.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: absolute;\n margin: auto;\n margin-right: 8px;\n right: 6px;\n rotate: ", ";\n"], ["\n position: absolute;\n margin: auto;\n margin-right: 8px;\n right: 6px;\n rotate: ", ";\n"])), function (props) { return (props.open ? "180deg" : "0deg"); });
|
|
3223
3191
|
var DropDownContainer = pt.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n height: auto;\n\n background-color: #fff;\n margin-top: 5px;\n\n outline: solid #cfcfcffc 1.5px;\n box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;\n border-radius: 8px;\n\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n width: 100%;\n height: auto;\n\n background-color: #fff;\n margin-top: 5px;\n\n outline: solid #cfcfcffc 1.5px;\n box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;\n border-radius: 8px;\n\n ", "\n"])), function (_a) {
|
|
3224
3192
|
var open = _a.open;
|
|
3225
3193
|
return open
|
|
@@ -3290,8 +3258,11 @@ var IconArrowRecall = function (props) { return (React__default.createElement("s
|
|
|
3290
3258
|
var IconTriangleExpand = function (props) { return (React__default.createElement("svg", __assign({ width: "11", height: "6", viewBox: "0 0 11 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
3291
3259
|
React__default.createElement("path", { d: "M0.666504 5.5L5.6665 0.5L10.6665 5.5H0.666504Z", fill: "black" }))); };
|
|
3292
3260
|
|
|
3293
|
-
var IconTriangleRecall = function (props) {
|
|
3294
|
-
|
|
3261
|
+
var IconTriangleRecall = function (props) {
|
|
3262
|
+
var _a, _b, _c;
|
|
3263
|
+
return (React__default.createElement("svg", __assign({ width: (_a = props === null || props === void 0 ? void 0 : props.width) !== null && _a !== void 0 ? _a : "11", height: (_b = props === null || props === void 0 ? void 0 : props.width) !== null && _b !== void 0 ? _b : "6", viewBox: "0 0 11 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
3264
|
+
React__default.createElement("path", { d: "M5.6665 5.5L0.666504 0.5H10.6665L5.6665 5.5Z", fill: (_c = props === null || props === void 0 ? void 0 : props.fill) !== null && _c !== void 0 ? _c : "#4A4A4B" })));
|
|
3265
|
+
};
|
|
3295
3266
|
|
|
3296
3267
|
var IconSwap = function (props) { return (React__default.createElement("svg", __assign({ width: "17", height: "21", viewBox: "0 0 17 21", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
3297
3268
|
React__default.createElement("path", { d: "M4.6665 11.5V4.325L2.0915 6.9L0.666504 5.5L5.6665 0.5L10.6665 5.5L9.2415 6.9L6.6665 4.325V11.5H4.6665ZM11.6665 20.5L6.6665 15.5L8.0915 14.1L10.6665 16.675V9.5H12.6665V16.675L15.2415 14.1L16.6665 15.5L11.6665 20.5Z", fill: "black" }))); };
|
|
@@ -3301,17 +3272,17 @@ var IconAddCell = function (props) { return (React__default.createElement("svg",
|
|
|
3301
3272
|
|
|
3302
3273
|
var Dropdown = function (_a) {
|
|
3303
3274
|
var _b;
|
|
3304
|
-
var name = _a.name; _a.type; var label = _a.label, Icon = _a.Icon, placeholder = _a.placeholder, message = _a.message, textAling = _a.textAling, textError = _a.textError, hasError = _a.hasError, width = _a.width, defaultValue = _a.defaultValue
|
|
3305
|
-
var
|
|
3275
|
+
var name = _a.name; _a.type; var label = _a.label, Icon = _a.Icon, placeholder = _a.placeholder, message = _a.message, textAling = _a.textAling, textError = _a.textError, hasError = _a.hasError, width = _a.width, defaultValue = _a.defaultValue, options = _a.options, onChange = _a.onChange, _c = _a.hasIcon, hasIcon = _c === void 0 ? false : _c, optionState = _a.value;
|
|
3276
|
+
var _d = React__default.useState(false), open = _d[0], setOpen = _d[1];
|
|
3306
3277
|
return (React__default.createElement(InputContainer, { width: width },
|
|
3307
3278
|
React__default.createElement(Label, { htmlFor: name }, label),
|
|
3308
3279
|
React__default.createElement(InputWrapper, { icon: !!Icon, hasError: hasError },
|
|
3309
3280
|
React__default.createElement(InputContent, { onClick: function () { return setOpen(!open); } },
|
|
3310
3281
|
typeof Icon === "string" && React__default.createElement("img", { src: Icon, alt: "Icone" }),
|
|
3311
3282
|
typeof Icon === "object" && Icon,
|
|
3312
|
-
React__default.createElement(StyledInput, { id: name, textAlign: textAling }, (_b = defaultValue !== null && defaultValue !== void 0 ? defaultValue : optionState === null || optionState === void 0 ? void 0 : optionState.label) !== null && _b !== void 0 ? _b : placeholder),
|
|
3283
|
+
React__default.createElement(StyledInput, { hasIcon: hasIcon, id: name, textAlign: textAling }, (_b = defaultValue !== null && defaultValue !== void 0 ? defaultValue : optionState === null || optionState === void 0 ? void 0 : optionState.label) !== null && _b !== void 0 ? _b : placeholder),
|
|
3313
3284
|
React__default.createElement(ArrowIcon, { open: open },
|
|
3314
|
-
React__default.createElement(
|
|
3285
|
+
React__default.createElement(IconTriangleRecall, null)))),
|
|
3315
3286
|
React__default.createElement(DropDownContainer, { open: open }, defaultValue ||
|
|
3316
3287
|
(options && (React__default.createElement(DropDownContent, null,
|
|
3317
3288
|
defaultValue && (React__default.createElement(DropDownItem, { key: "default", onClick: function (e) { return onChange && onChange(e); } }, defaultValue)), options === null || options === void 0 ? void 0 :
|