@factorearth/component-library 3.0.25 → 3.0.27-alpha.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/dist/Atoms/Buttons/Button.d.ts +15 -0
- package/dist/Atoms/Buttons/Button.js +28 -0
- package/dist/Atoms/Buttons/Button.js.map +1 -0
- package/dist/Atoms/DateField/DateField.js +5 -1
- package/dist/Atoms/DateField/DateField.js.map +1 -1
- package/dist/Atoms/DropdownField/DropdownField.d.ts +7 -0
- package/dist/Atoms/DropdownField/DropdownField.js +96 -0
- package/dist/Atoms/DropdownField/DropdownField.js.map +1 -0
- package/dist/Atoms/FieldWrapper/FieldWrapper.d.ts +9 -0
- package/dist/Atoms/FieldWrapper/FieldWrapper.js +26 -0
- package/dist/Atoms/FieldWrapper/FieldWrapper.js.map +1 -0
- package/dist/Atoms/MoreHorizonButton/MoreHorizonButton.d.ts +3 -1
- package/dist/Atoms/MoreHorizonButton/MoreHorizonButton.js +4 -3
- package/dist/Atoms/MoreHorizonButton/MoreHorizonButton.js.map +1 -1
- package/dist/Atoms/NumberField/NumberField.d.ts +4 -1
- package/dist/Atoms/NumberField/NumberField.js +16 -9
- package/dist/Atoms/NumberField/NumberField.js.map +1 -1
- package/dist/Atoms/TextField/TextField.d.ts +9 -0
- package/dist/Atoms/TextField/TextField.js +40 -0
- package/dist/Atoms/TextField/TextField.js.map +1 -0
- package/dist/Molecules/Thumbnail/Thumbnail.d.ts +16 -0
- package/dist/Molecules/Thumbnail/Thumbnail.js +104 -0
- package/dist/Molecules/Thumbnail/Thumbnail.js.map +1 -0
- package/dist/Theme/ThemeProvider.d.ts +3 -90
- package/dist/Theme/ThemeProvider.js +36 -0
- package/dist/Theme/ThemeProvider.js.map +1 -1
- package/dist/Theme/types.d.ts +17 -4
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CSSObject } from "@emotion/styled";
|
|
3
|
+
import { Colors } from "../../Theme/types";
|
|
4
|
+
type ButtonVariants = "success" | "destructive" | "outlined" | "filled";
|
|
5
|
+
interface ButtonProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
6
|
+
colorPalette: Colors & string;
|
|
7
|
+
styles?: CSSObject;
|
|
8
|
+
icon?: JSX.Element;
|
|
9
|
+
variant: ButtonVariants;
|
|
10
|
+
label?: string;
|
|
11
|
+
buttonTheme?: "primary" | "secondary" | "tertiary";
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const Button: (props: ButtonProps) => React.JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled from "@emotion/styled";
|
|
3
|
+
const DivButton = styled.div `
|
|
4
|
+
height: 14px;
|
|
5
|
+
background-color: ${({ color, variant }) => color.buttonBackground[variant]};
|
|
6
|
+
color: ${({ color, variant }) => color.buttonText[variant]};
|
|
7
|
+
display: flex;
|
|
8
|
+
padding: 8px 9.5px;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 8px;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
border-radius: 4px;
|
|
14
|
+
border-style: solid;
|
|
15
|
+
border-width: 1px;
|
|
16
|
+
font-size: 14px;
|
|
17
|
+
font-weight: 700;
|
|
18
|
+
border-color: ${({ color, variant }) => color.buttonBorder[variant]};
|
|
19
|
+
${({ styles }) => styles && styles}
|
|
20
|
+
`;
|
|
21
|
+
export const Button = (props) => {
|
|
22
|
+
const { colorPalette, styles, icon, variant, label, children } = props;
|
|
23
|
+
return (React.createElement(DivButton, { ...props, color: colorPalette, styles: styles, variant: variant },
|
|
24
|
+
icon && icon,
|
|
25
|
+
label && label,
|
|
26
|
+
children && children));
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../lib/Atoms/Buttons/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AACvD,OAAO,MAAqB,MAAM,iBAAiB,CAAC;AAKpD,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAgE;;qBAEvE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC;UACnE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAE,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC;;;;;;;;;;;;iBAY3C,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAE,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC;GAClE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,IAAI,MAAM;CAClC,CAAC;AAYF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAE,EAAE;IAC5C,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACvE,OAAO,CACN,oBAAC,SAAS,OAAK,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;QACzE,IAAI,IAAI,IAAI;QACZ,KAAK,IAAI,KAAK;QACd,QAAQ,IAAI,QAAQ,CACV,CACZ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -19,7 +19,11 @@ const DateIcon = styled(FiCalendar) `
|
|
|
19
19
|
const DateFieldContainer = styled.div `
|
|
20
20
|
display: flex;
|
|
21
21
|
background: ${({ color }) => color.background.primary};
|
|
22
|
+
width: 100%;
|
|
22
23
|
|
|
24
|
+
.react-datepicker__wrapper {
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
23
27
|
.react-datepicker {
|
|
24
28
|
border-color: ${({ color }) => color.border.primary};
|
|
25
29
|
background: ${({ color }) => color.background.primary};
|
|
@@ -38,7 +42,7 @@ const DateFieldContainer = styled.div `
|
|
|
38
42
|
border-radius: 4px 0px 0px 4px;
|
|
39
43
|
font-size: 14px;
|
|
40
44
|
text-align: center;
|
|
41
|
-
width:
|
|
45
|
+
width: 100%;
|
|
42
46
|
padding: 0;
|
|
43
47
|
margin: 0;
|
|
44
48
|
&:focus-visible {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateField.js","sourceRoot":"","sources":["../../../lib/Atoms/DateField/DateField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,4CAA4C,CAAC;AAEpD,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAmB;UAC5C,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO;eAC5B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO;;;iBAGrC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO;;;;;;;CAOnD,CAAC;AAEF,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAmB;;eAEzC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO
|
|
1
|
+
{"version":3,"file":"DateField.js","sourceRoot":"","sources":["../../../lib/Atoms/Date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AE,YAAY,GACvB;QACF,oBAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,GAAI,CACvC,CACrB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Select from "react-select";
|
|
3
|
+
export const DropdownField = (props) => {
|
|
4
|
+
const { colorPalette } = props;
|
|
5
|
+
const styles = {
|
|
6
|
+
control: (provided, state) => ({
|
|
7
|
+
paddingLeft: "12px",
|
|
8
|
+
justifyContent: "center",
|
|
9
|
+
gap: "10px",
|
|
10
|
+
alignSelf: "stretch",
|
|
11
|
+
backgroundColor: colorPalette.background.primary,
|
|
12
|
+
cursor: "pointer",
|
|
13
|
+
borderRadius: "4px",
|
|
14
|
+
display: "flex",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
fontSize: "14px",
|
|
17
|
+
zIndex: "1000",
|
|
18
|
+
height: "40px",
|
|
19
|
+
color: colorPalette.text.primary,
|
|
20
|
+
border: state.isFocused
|
|
21
|
+
? `1px solid ${colorPalette.border.primary}`
|
|
22
|
+
: `1px solid ${colorPalette.border.primary}`,
|
|
23
|
+
":hover": {
|
|
24
|
+
...provided[":hover"],
|
|
25
|
+
border: `1px solid ${colorPalette.border.primary}`,
|
|
26
|
+
boxShadow: "none",
|
|
27
|
+
},
|
|
28
|
+
":active": {
|
|
29
|
+
...provided[":active"],
|
|
30
|
+
border: `1px solid ${colorPalette.border.primary}`,
|
|
31
|
+
boxShadow: "none",
|
|
32
|
+
},
|
|
33
|
+
":focus": {
|
|
34
|
+
...provided[":focus"],
|
|
35
|
+
border: `1px solid ${colorPalette.border.primary}`,
|
|
36
|
+
boxShadow: "none",
|
|
37
|
+
},
|
|
38
|
+
"::placeholder": {
|
|
39
|
+
color: colorPalette.text.secondary,
|
|
40
|
+
},
|
|
41
|
+
boxShadow: "none",
|
|
42
|
+
}),
|
|
43
|
+
input: (provided, state) => ({
|
|
44
|
+
...provided,
|
|
45
|
+
color: colorPalette.text.primary,
|
|
46
|
+
height: "40px",
|
|
47
|
+
}),
|
|
48
|
+
container: (provided, state) => ({
|
|
49
|
+
...provided,
|
|
50
|
+
width: "100%",
|
|
51
|
+
margin: "auto",
|
|
52
|
+
}),
|
|
53
|
+
option: (provided, state) => ({
|
|
54
|
+
...provided,
|
|
55
|
+
backgroundColor: state.isFocused
|
|
56
|
+
? colorPalette.background.primary
|
|
57
|
+
: colorPalette.background.primary,
|
|
58
|
+
color: colorPalette.text.primary,
|
|
59
|
+
cursor: "pointer",
|
|
60
|
+
zIndex: "1000",
|
|
61
|
+
}),
|
|
62
|
+
menu: (provided, state) => ({
|
|
63
|
+
...provided,
|
|
64
|
+
backgroundColor: colorPalette.background.primary,
|
|
65
|
+
color: colorPalette.text.primary,
|
|
66
|
+
border: `1px solid ${colorPalette.border.primary}`,
|
|
67
|
+
}),
|
|
68
|
+
menuPortal: (provided, state) => ({
|
|
69
|
+
...provided,
|
|
70
|
+
zIndex: "1000",
|
|
71
|
+
}),
|
|
72
|
+
valueContainer: (provided, state) => ({
|
|
73
|
+
...provided,
|
|
74
|
+
overflow: "none",
|
|
75
|
+
}),
|
|
76
|
+
multiValue: (provided, state) => ({
|
|
77
|
+
...provided,
|
|
78
|
+
backgroundColor: colorPalette.background.primary,
|
|
79
|
+
color: colorPalette.text.tertiary,
|
|
80
|
+
}),
|
|
81
|
+
multiValueLabel: (provided, state) => ({
|
|
82
|
+
...provided,
|
|
83
|
+
color: colorPalette.text.tertiary,
|
|
84
|
+
}),
|
|
85
|
+
singleValue: (provided, state) => ({
|
|
86
|
+
...provided,
|
|
87
|
+
backgroundColor: colorPalette.background.primary,
|
|
88
|
+
color: colorPalette.text.primary,
|
|
89
|
+
}),
|
|
90
|
+
indicatorSeparator: (provided, state) => ({
|
|
91
|
+
display: "none",
|
|
92
|
+
})
|
|
93
|
+
};
|
|
94
|
+
return React.createElement(Select, { styles: styles, ...props });
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=DropdownField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownField.js","sourceRoot":"","sources":["../../../lib/Atoms/DropdownField/DropdownField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,cAAc,CAAC;AAQlC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;IACvD,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAClC,MAAM,MAAM,GAAG;QACd,OAAO,EAAE,CAAC,QAAa,EAAE,KAAU,EAAE,EAAE,CAAC,CAAC;YACxC,WAAW,EAAE,MAAM;YACnB,cAAc,EAAE,QAAQ;YACxB,GAAG,EAAE,MAAM;YACX,SAAS,EAAE,SAAS;YACpB,eAAe,EAAE,YAAY,CAAC,UAAU,CAAC,OAAO;YAChD,MAAM,EAAE,SAAS;YACjB,YAAY,EAAE,KAAK;YACnB,OAAO,EAAE,MAAM;YACf,UAAU,EAAE,QAAQ;YACpB,QAAQ,EAAE,MAAM;YAChB,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO;YAChC,MAAM,EAAE,KAAK,CAAC,SAAS;gBACtB,CAAC,CAAC,aAAa,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE;gBAC5C,CAAC,CAAC,aAAa,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE;YAC7C,QAAQ,EAAE;gBACT,GAAG,QAAQ,CAAC,QAAQ,CAAC;gBACrB,MAAM,EAAE,aAAa,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE;gBAClD,SAAS,EAAE,MAAM;aACjB;YACD,SAAS,EAAE;gBACV,GAAG,QAAQ,CAAC,SAAS,CAAC;gBACtB,MAAM,EAAE,aAAa,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE;gBAClD,SAAS,EAAE,MAAM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;YACX,MAAM,EAAE,MAAM;SACd,CAAC;QACF,cAAc,EAAE,CAAC,QAAa,EAAE,KAAU,EAAE,EAAE,CAAC,CAAC;YAC/C,GAAG,QAAQ;YACX,QAAQ,EAAE,MAAM;SAChB,CAAC;QACF,UAAU,EAAE,CAAC,QAAa,EAAE,KAAU,EAAE,EAAE,CAAC,CAAC;YAC3C,GAAG,QAAQ;YACX,eAAe,EAAE,YAAY,CAAC,UAAU,CAAC,OAAO;YAChD,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,QAAQ;SACjC,CAAC;QACF,eAAe,EAAE,CAAC,QAAa,EAAE,KAAU,EAAE,EAAE,CAAC,CAAC;YAChD,GAAG,QAAQ;YACX,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,QAAQ;SACjC,CAAC;QACF,WAAW,EAAE,CAAC,QAAa,EAAE,KAAU,EAAE,EAAE,CAAC,CAAC;YAC5C,GAAG,QAAQ;YACX,eAAe,EAAE,YAAY,CAAC,UAAU,CAAC,OAAO;YAChD,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO;SAChC,CAAC;QACF,kBAAkB,EAAE,CAAC,QAAa,EAAE,KAAU,EAAE,EAAE,CAAC,CAAC;YACnD,OAAO,EAAE,MAAM;SACf,CAAC;KACF,CAAC;IACF,OAAO,oBAAC,MAAM,IAAC,MAAM,EAAE,MAAM,KAAM,KAAK,GAAG,CAAC;AAC7C,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Colors } from "Theme/types";
|
|
3
|
+
interface FieldWrapperProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
colorPalette: Colors;
|
|
7
|
+
}
|
|
8
|
+
export declare const FieldWrapper: ({ children, label, ...props }: FieldWrapperProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled from "@emotion/styled";
|
|
3
|
+
const FieldWrapperContainer = styled.div `
|
|
4
|
+
display: flex;
|
|
5
|
+
width: 100%;
|
|
6
|
+
`;
|
|
7
|
+
const LabelContainer = styled.label `
|
|
8
|
+
display: flex;
|
|
9
|
+
height: 56px;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 16px;
|
|
12
|
+
text-overflow: ellipsis;
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
font-style: normal;
|
|
15
|
+
font-weight: 700;
|
|
16
|
+
line-height: 125%;
|
|
17
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
18
|
+
width: 50%;
|
|
19
|
+
`;
|
|
20
|
+
export const FieldWrapper = ({ children, label, ...props }) => {
|
|
21
|
+
const { colorPalette } = props;
|
|
22
|
+
return (React.createElement(FieldWrapperContainer, { colorPalette: colorPalette },
|
|
23
|
+
label && (React.createElement(LabelContainer, { colorPalette: colorPalette }, label)),
|
|
24
|
+
children));
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=FieldWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldWrapper.js","sourceRoot":"","sources":["../../../lib/Atoms/FieldWrapper/FieldWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAGrC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAA0B;;;CAGjE,CAAC;AACF,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAA0B;;;;;;;;;;UAUnD,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO;;CAExD,CAAC;AAMF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACW,EAAE,EAAE;IACvB,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAC/B,OAAO,CACN,oBAAC,qBAAqB,IAAC,YAAY,EAAE,YAAY;QAC/C,KAAK,IAAI,CACT,oBAAC,cAAc,IAAC,YAAY,EAAE,YAAY,IAAG,KAAK,CAAkB,CACpE;QACA,QAAQ,CACc,CACxB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { CSSObject } from "@emotion/styled";
|
|
2
3
|
import { Colors } from "@../../Theme/types";
|
|
3
4
|
interface MoreHorizonButtonProps {
|
|
4
5
|
colorPalette: Colors;
|
|
5
6
|
handleToggleHistory: () => void;
|
|
6
7
|
handleRefreshField: () => void;
|
|
8
|
+
styles?: CSSObject;
|
|
7
9
|
}
|
|
8
|
-
export declare const MoreHorizonButton: ({ colorPalette, handleToggleHistory, handleRefreshField, }: MoreHorizonButtonProps) => React.JSX.Element;
|
|
10
|
+
export declare const MoreHorizonButton: ({ colorPalette, handleToggleHistory, handleRefreshField, styles, }: MoreHorizonButtonProps) => React.JSX.Element;
|
|
9
11
|
export {};
|
|
@@ -19,7 +19,7 @@ const MoreHorizonIcon = styled.div `
|
|
|
19
19
|
`;
|
|
20
20
|
const MoreHorizonContainer = styled.div `
|
|
21
21
|
display: flex;
|
|
22
|
-
height:
|
|
22
|
+
height: 14px;
|
|
23
23
|
width: 16px;
|
|
24
24
|
padding: 12px 8px;
|
|
25
25
|
align-items: center;
|
|
@@ -30,6 +30,7 @@ const MoreHorizonContainer = styled.div `
|
|
|
30
30
|
border-style: solid;
|
|
31
31
|
border-width: 1px;
|
|
32
32
|
background-color: ${({ colorPalette }) => colorPalette.background.primary};
|
|
33
|
+
${({ styles }) => styles && styles}
|
|
33
34
|
`;
|
|
34
35
|
const MoreHorizonOption = styled.div `
|
|
35
36
|
padding: 6px 12px;
|
|
@@ -62,7 +63,7 @@ const MoreHorizonMenu = styled.div `
|
|
|
62
63
|
z-index: 1000;
|
|
63
64
|
transform-origin: top left;
|
|
64
65
|
`;
|
|
65
|
-
export const MoreHorizonButton = ({ colorPalette, handleToggleHistory, handleRefreshField, }) => {
|
|
66
|
+
export const MoreHorizonButton = ({ colorPalette, handleToggleHistory, handleRefreshField, styles, }) => {
|
|
66
67
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
67
68
|
const [loading, setLoading] = useState(false);
|
|
68
69
|
const [yPosition, setYPosition] = useState("up");
|
|
@@ -104,7 +105,7 @@ export const MoreHorizonButton = ({ colorPalette, handleToggleHistory, handleRef
|
|
|
104
105
|
const toggleMenu = () => {
|
|
105
106
|
setMenuOpen(!menuOpen);
|
|
106
107
|
};
|
|
107
|
-
return (React.createElement(MoreHorizonContainer, { colorPalette: colorPalette, ref: buttonRef, onClick: toggleMenu, tabIndex: -1, onBlur: () => setMenuOpen(false) },
|
|
108
|
+
return (React.createElement(MoreHorizonContainer, { colorPalette: colorPalette, ref: buttonRef, onClick: toggleMenu, tabIndex: -1, onBlur: () => setMenuOpen(false), styles: styles },
|
|
108
109
|
React.createElement(MoreHorizonIcon, { menuOpen: menuOpen },
|
|
109
110
|
React.createElement(FiMoreVertical, { color: colorPalette.text.primary })),
|
|
110
111
|
React.createElement(MoreHorizonMenu, { menuOpen: menuOpen && !loading, colorPalette: colorPalette, ref: menuRef, yPosition: yPosition, xPosition: xPosition },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoreHorizonButton.js","sourceRoot":"","sources":["../../../lib/Atoms/MoreHorizonButton/MoreHorizonButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"MoreHorizonButton.js","sourceRoot":"","sources":["../../../lib/Atoms/MoreHorizonButton/MoreHorizonButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3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AClC,oBAAC,cAAc,IAAC,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO,GAAI,CACnC;QAClB,oBAAC,eAAe,IACf,QAAQ,EAAE,QAAQ,IAAI,CAAC,OAAO,EAC9B,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS;YAEpB,oBAAC,iBAAiB,IACjB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,mBAAmB;gBAE5B,oBAAC,OAAO,OAAG;0BAEQ;YACpB,oBAAC,eAAe,IAAC,YAAY,EAAE,YAAY,QAAqB;YAChE,oBAAC,iBAAiB,IACjB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,kBAAkB;gBAE3B,oBAAC,WAAW,OAAG;0BAEI,CACH,CACI,CACvB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { CSSObject } from "@emotion/styled";
|
|
2
3
|
import { Colors } from "Theme/types";
|
|
3
4
|
interface NumberFieldProps {
|
|
4
5
|
colorPalette: Colors & string;
|
|
@@ -12,6 +13,8 @@ interface NumberFieldProps {
|
|
|
12
13
|
fromTable?: boolean;
|
|
13
14
|
value: string | number | undefined;
|
|
14
15
|
placeholder?: string;
|
|
16
|
+
styles?: CSSObject;
|
|
17
|
+
noHistory?: boolean;
|
|
15
18
|
}
|
|
16
|
-
export declare const NumberField: ({ colorPalette, handleChange, handleBlur, fromTable, value, placeholder, }: NumberFieldProps) => React.JSX.Element;
|
|
19
|
+
export declare const NumberField: ({ colorPalette, handleChange, handleBlur, fromTable, value, placeholder, styles, noHistory, }: NumberFieldProps) => React.JSX.Element;
|
|
17
20
|
export {};
|
|
@@ -4,14 +4,16 @@ import { FiPlus, FiMinus } from "react-icons/fi";
|
|
|
4
4
|
const NumberFieldContainer = styled.div `
|
|
5
5
|
display: flex;
|
|
6
6
|
align-items: center;
|
|
7
|
-
|
|
7
|
+
width: 100%;
|
|
8
|
+
${({ styles }) => styles && styles}
|
|
8
9
|
`;
|
|
9
10
|
const NumberInput = styled.input `
|
|
10
11
|
display: flex;
|
|
11
12
|
justify-content: center;
|
|
12
13
|
align-items: center;
|
|
13
14
|
text-align: center;
|
|
14
|
-
min-width:
|
|
15
|
+
min-width: 50px;
|
|
16
|
+
width: 100%;
|
|
15
17
|
gap: 10px;
|
|
16
18
|
align-self: stretch;
|
|
17
19
|
color: ${({ color }) => color.text.primary};
|
|
@@ -37,7 +39,7 @@ const DecrementButton = styled.div `
|
|
|
37
39
|
cursor: pointer;
|
|
38
40
|
display: flex;
|
|
39
41
|
width: 16px;
|
|
40
|
-
height:
|
|
42
|
+
height: 22px;
|
|
41
43
|
padding: 8px 16px;
|
|
42
44
|
justify-content: center;
|
|
43
45
|
align-items: center;
|
|
@@ -52,7 +54,7 @@ const IncrementButton = styled.div `
|
|
|
52
54
|
cursor: pointer;
|
|
53
55
|
display: flex;
|
|
54
56
|
width: 16px;
|
|
55
|
-
height:
|
|
57
|
+
height: 22px;
|
|
56
58
|
padding: 8px 16px;
|
|
57
59
|
justify-content: center;
|
|
58
60
|
align-items: center;
|
|
@@ -61,9 +63,10 @@ const IncrementButton = styled.div `
|
|
|
61
63
|
border-color: ${({ color }) => color.border.primary};
|
|
62
64
|
background: ${({ color }) => color.background.primary};
|
|
63
65
|
color: ${({ color }) => color.text.primary};
|
|
64
|
-
border-
|
|
66
|
+
${({ noHistory }) => noHistory && `border-radius: 0px 4px 4px 0px;`}
|
|
67
|
+
${({ noHistory }) => !noHistory && `border-right: none;`}
|
|
65
68
|
`;
|
|
66
|
-
export const NumberField = ({ colorPalette, handleChange, handleBlur, fromTable, value, placeholder, }) => {
|
|
69
|
+
export const NumberField = ({ colorPalette, handleChange, handleBlur, fromTable, value, placeholder, styles, noHistory, }) => {
|
|
67
70
|
const inputRef = useRef(null);
|
|
68
71
|
const [numberValue, setNumberValue] = useState(value ? Number(value) : "");
|
|
69
72
|
useEffect(() => {
|
|
@@ -113,11 +116,15 @@ export const NumberField = ({ colorPalette, handleChange, handleBlur, fromTable,
|
|
|
113
116
|
}
|
|
114
117
|
handleChange(e);
|
|
115
118
|
};
|
|
116
|
-
return (React.createElement(NumberFieldContainer, { color: colorPalette },
|
|
117
|
-
React.createElement(DecrementButton, { color: colorPalette, onClick: handleDecrement, tabIndex: -1, onBlur: () => {
|
|
119
|
+
return (React.createElement(NumberFieldContainer, { color: colorPalette, styles: styles },
|
|
120
|
+
React.createElement(DecrementButton, { color: colorPalette, onClick: handleDecrement, tabIndex: -1, onBlur: () => {
|
|
121
|
+
handleBlur(inputRef.current?.value || "");
|
|
122
|
+
} },
|
|
118
123
|
React.createElement(FiMinus, null)),
|
|
119
124
|
React.createElement(NumberInput, { name: "number", value: numberValue, onChange: handleNumberChange, onBlur: (e) => handleBlur(e.target.value), color: colorPalette, ref: inputRef, onFocus: handleFocus, placeholder: placeholder, pattern: "^[\\+\\-]?\\d+(\\.\\d*)?([eE][\\+\\-]?\\d+)?$" }),
|
|
120
|
-
React.createElement(IncrementButton, { color: colorPalette, onClick: handleIncrement, tabIndex: -1, onBlur: () => {
|
|
125
|
+
React.createElement(IncrementButton, { color: colorPalette, onClick: handleIncrement, tabIndex: -1, onBlur: () => {
|
|
126
|
+
handleBlur(inputRef.current?.value || "");
|
|
127
|
+
}, noHistory: noHistory },
|
|
121
128
|
React.createElement(FiPlus, null))));
|
|
122
129
|
};
|
|
123
130
|
//# sourceMappingURL=NumberField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberField.js","sourceRoot":"","sources":["../../../lib/Atoms/NumberField/NumberField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"NumberField.js","sourceRoot":"","sources":["../../../lib/Atoms/NumberField/Num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C,CAAC;QACvB,CAAC;QACD,YAAY,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,OAAO,CACN,oBAAC,oBAAoB,IAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;QACxD,oBAAC,eAAe,IACf,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,CAAC,CAAC,EACZ,MAAM,EAAE,GAAG,EAAE;gBACZ,UAAU,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;YAC3C,CAAC;YAED,oBAAC,OAAO,OAAG,CACM;QAClB,oBAAC,WAAW,IACX,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,kBAAkB,EAC5B,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACzC,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,QAAQ,EACb,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAC,+CAAuC,GAC9C;QACF,oBAAC,eAAe,IACf,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,CAAC,CAAC,EACZ,MAAM,EAAE,GAAG,EAAE;gBACZ,UAAU,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;YAC3C,CAAC,EACD,SAAS,EAAE,SAAS;YAEpB,oBAAC,MAAM,OAAG,CACO,CACI,CACvB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Colors } from "../../Theme/types";
|
|
3
|
+
interface TextFieldWrapperProps extends React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
4
|
+
activeEditing: boolean;
|
|
5
|
+
colorPalette: Colors & string;
|
|
6
|
+
noHistory: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const TextFieldWrapper: (props: TextFieldWrapperProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
2
|
+
import styled from "@emotion/styled";
|
|
3
|
+
const InputWrapper = styled.input `
|
|
4
|
+
width: 100%;
|
|
5
|
+
min-width: 60px;
|
|
6
|
+
min-height: 30px;
|
|
7
|
+
font-weight: 600;
|
|
8
|
+
${({ noHistory }) => noHistory &&
|
|
9
|
+
`border-top-right-radius: 0px;border-bottom-right-radius: 0px;`}
|
|
10
|
+
background-color: ${({ colorPalette }) => colorPalette.background.primary};
|
|
11
|
+
border-radius: 4px;
|
|
12
|
+
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
13
|
+
border-style: solid;
|
|
14
|
+
border-width: 1px;
|
|
15
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
16
|
+
padding-left: 16px;
|
|
17
|
+
${({ noHistory }) => !noHistory && `border-right: none;`}
|
|
18
|
+
height: 40px;
|
|
19
|
+
margin: 8px 0;
|
|
20
|
+
`;
|
|
21
|
+
export const TextFieldWrapper = (props) => {
|
|
22
|
+
const { activeEditing, value, onChange, noHistory } = props;
|
|
23
|
+
const [cursor, setCursor] = useState(null);
|
|
24
|
+
const ref = useRef(null);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
const input = ref.current;
|
|
27
|
+
if (activeEditing && cursor) {
|
|
28
|
+
if (input && cursor) {
|
|
29
|
+
input.setSelectionRange(cursor, cursor);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}, [cursor, activeEditing, value]);
|
|
33
|
+
const handleChange = (e) => {
|
|
34
|
+
setCursor(e.target.selectionStart);
|
|
35
|
+
if (onChange)
|
|
36
|
+
onChange(e);
|
|
37
|
+
};
|
|
38
|
+
return (React.createElement(InputWrapper, { ...props, ref: ref, onChange: handleChange, noHistory: noHistory }));
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=TextField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../lib/Atoms/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAA8C;;;;;GAK5E,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CACnB,SAAS;IACT,+DAA+D;qBAC5C,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO;;iBAEzD,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO;;;UAGxD,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO;;GAEtD,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC,SAAS,IAAI,qBAAqB;;;CAGxD,CAAC;AAWF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;IAChE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAC5D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAC3C,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC;QAC1B,IAAI,aAAa,IAAI,MAAM,EAAE,CAAC;YAC7B,IAAI,KAAK,IAAI,MAAM,EAAE,CAAC;gBACrB,KAAK,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACzC,CAAC;QACF,CAAC;IACF,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IAEnC,MAAM,YAAY,GAAG,CAAC,CAAsC,EAAE,EAAE;QAC/D,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACnC,IAAI,QAAQ;YAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACN,oBAAC,YAAY,OACR,KAAK,EACT,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,SAAS,GACnB,CACF,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { ReactNode, Dispatch, SetStateAction } from "react";
|
|
2
|
+
import { Colors } from "Theme/types";
|
|
3
|
+
export declare const Thumbnail: ({ colorPalette, handleSubmit, settingsChildren, showImage, setShowImage, fieldInstance, s3Key, signedUrl, uploadButtonText, handleRemove, changed, handleClick }: {
|
|
4
|
+
colorPalette: Colors & string;
|
|
5
|
+
handleSubmit: () => void;
|
|
6
|
+
handleClick: (event: any) => void;
|
|
7
|
+
settingsChildren: ReactNode;
|
|
8
|
+
showImage: boolean;
|
|
9
|
+
setShowImage: Dispatch<SetStateAction<boolean>>;
|
|
10
|
+
fieldInstance: any;
|
|
11
|
+
s3Key: string;
|
|
12
|
+
signedUrl: any;
|
|
13
|
+
uploadButtonText: string;
|
|
14
|
+
handleRemove?: () => void;
|
|
15
|
+
changed: boolean;
|
|
16
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import React, { useState, useRef, } from "react";
|
|
2
|
+
import styled from "@emotion/styled";
|
|
3
|
+
import { FiTrash2, FiEye, FiEyeOff, FiSettings } from "react-icons/fi";
|
|
4
|
+
import { Button } from "../../Atoms/Buttons/Button";
|
|
5
|
+
const Container = styled.div `
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
align-items: end;
|
|
9
|
+
justify-content: start;
|
|
10
|
+
gap: 16px;
|
|
11
|
+
flex-shrink: 0;
|
|
12
|
+
background-color: ${({ color }) => color.background.primary};
|
|
13
|
+
${({ showImage, showSettings }) => showImage && `height: 278px; width: 200px`}
|
|
14
|
+
`;
|
|
15
|
+
const InputArea = styled.div `
|
|
16
|
+
width: 150px;
|
|
17
|
+
height: 132px;
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
background-color: ${({ color }) => color.background.tertiary};
|
|
22
|
+
border-style: solid;
|
|
23
|
+
border-width: 1px;
|
|
24
|
+
border-color: ${({ color }) => color.border.primary};
|
|
25
|
+
position: relative;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
border-radius: 4px;
|
|
29
|
+
padding: 24px;
|
|
30
|
+
`;
|
|
31
|
+
const SettingsArea = styled.div `
|
|
32
|
+
width: 168px;
|
|
33
|
+
height: 148px;
|
|
34
|
+
display: flex;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
align-items: center;
|
|
37
|
+
background-color: ${({ color }) => color.background.secondary};
|
|
38
|
+
border-style: solid;
|
|
39
|
+
border-width: 1px;
|
|
40
|
+
border-color: ${({ color }) => color.border.primary};
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
border-radius: 4px;
|
|
44
|
+
gap: 16px;
|
|
45
|
+
padding: 16px;
|
|
46
|
+
`;
|
|
47
|
+
const PreviewImage = styled.img `
|
|
48
|
+
width: 100%;
|
|
49
|
+
height: 100%;
|
|
50
|
+
object-fit: cover;
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 0;
|
|
53
|
+
left: 0;
|
|
54
|
+
z-index: 1;
|
|
55
|
+
`;
|
|
56
|
+
export const Thumbnail = ({ colorPalette, handleSubmit, settingsChildren, showImage, setShowImage, fieldInstance, s3Key, signedUrl, uploadButtonText, handleRemove, changed, handleClick }) => {
|
|
57
|
+
const [selectedImage, setSelectedImage] = useState(null);
|
|
58
|
+
const [showSettings, setShowSettings] = useState(false);
|
|
59
|
+
const acceptedFileTypes = ["image/jpeg", "image/png", "image/webp", "image/gif"];
|
|
60
|
+
const inputRef = useRef(null);
|
|
61
|
+
const handleImageUpload = (event) => {
|
|
62
|
+
const file = event.target.files?.[0];
|
|
63
|
+
if (file) {
|
|
64
|
+
const imageUrl = URL.createObjectURL(file);
|
|
65
|
+
setSelectedImage(imageUrl);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const handleDrop = (event) => {
|
|
69
|
+
event.preventDefault();
|
|
70
|
+
const file = event.dataTransfer.files[0];
|
|
71
|
+
if (file) {
|
|
72
|
+
const imageUrl = URL.createObjectURL(file);
|
|
73
|
+
setSelectedImage(imageUrl);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const handleDragOver = (event) => {
|
|
77
|
+
event.preventDefault();
|
|
78
|
+
};
|
|
79
|
+
const handleBrowseClick = (event) => {
|
|
80
|
+
if (inputRef && inputRef.current)
|
|
81
|
+
inputRef.current.click();
|
|
82
|
+
handleClick(event);
|
|
83
|
+
};
|
|
84
|
+
const handleToggleImage = () => {
|
|
85
|
+
setShowImage(!showImage);
|
|
86
|
+
setShowSettings(false);
|
|
87
|
+
};
|
|
88
|
+
const handleToggleSettings = () => {
|
|
89
|
+
setShowSettings(!showSettings);
|
|
90
|
+
};
|
|
91
|
+
return (React.createElement(Container, { color: colorPalette, showImage: showImage, showSettings: showSettings, key: `thumbnail_${fieldInstance.id}` },
|
|
92
|
+
React.createElement("div", { style: { display: "flex" } },
|
|
93
|
+
React.createElement(Button, { colorPalette: colorPalette, icon: !showImage ? React.createElement(FiEye, null) : React.createElement(FiEyeOff, null), variant: "outlined", onClick: handleToggleImage }),
|
|
94
|
+
selectedImage && (React.createElement(React.Fragment, null,
|
|
95
|
+
React.createElement(Button, { colorPalette: colorPalette, icon: React.createElement(FiSettings, null), variant: "outlined", styles: { borderColor: "transparent" }, onClick: handleToggleSettings }),
|
|
96
|
+
signedUrl !== null && signedUrl !== "" && handleRemove && (React.createElement(Button, { colorPalette: colorPalette, icon: React.createElement(FiTrash2, null), variant: "destructive", onClick: handleRemove }))))),
|
|
97
|
+
showImage && !showSettings && (React.createElement(InputArea, { onDrop: handleDrop, onDragOver: handleDragOver, color: colorPalette },
|
|
98
|
+
selectedImage && (React.createElement(PreviewImage, { alt: s3Key || "Uploaded Image", color: colorPalette, src: signedUrl && typeof signedUrl === "string" ? signedUrl : URL.createObjectURL(signedUrl.files[0]) || selectedImage })),
|
|
99
|
+
React.createElement(Button, { colorPalette: colorPalette, label: "Browse", styles: { input: { display: "none" } }, variant: "filled", onClick: handleBrowseClick },
|
|
100
|
+
React.createElement("input", { type: "file", accept: acceptedFileTypes.join(","), onChange: handleImageUpload, ref: inputRef, id: `upload-image-${fieldInstance.id}`, name: "key", multiple: false })))),
|
|
101
|
+
showSettings && showImage && (React.createElement(SettingsArea, { color: colorPalette }, settingsChildren)),
|
|
102
|
+
changed && (React.createElement(Button, { colorPalette: colorPalette, onClick: handleSubmit, variant: "filled", styles: { margin: "0 auto" } }, uploadButtonText))));
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=Thumbnail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Thumbnail.js","sourceRoot":"","sources":["../../../lib/Molecules/Thumbnail/Thumbnail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACb,QAAQ,EAER,MAAM,GAGN,MAAM,OAAO,CAAC;AACf,OAAO,MAAqB,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,M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K,CAAC,CAAC,CAAC,CAAC,IAAI,aAAa,GAErH,CACF;YACD,oBAAC,MAAM,IACN,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAC,QAAQ,EACd,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EACtC,OAAO,EAAC,QAAQ,EAChB,OAAO,EAAE,iBAAiB;gBAE1B,+BACC,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,EACnC,QAAQ,EAAE,iBAAiB,EAC3B,GAAG,EAAE,QAAQ,EACb,EAAE,EAAE,gBAAgB,aAAa,CAAC,EAAE,EAAE,EACtC,IAAI,EAAC,KAAK,EACV,QAAQ,EAAE,KAAK,GACd,CACM,CACE,CACZ;QACA,YAAY,IAAI,SAAS,IAAI,CAC7B,oBAAC,YAAY,IAAC,KAAK,EAAE,YAAY,IAAG,gBAAgB,CAAgB,CACpE;QACA,OAAO,IAAI,CACX,oBAAC,MAAM,IACN,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,YAAY,EACrB,OAAO,EAAC,QAAQ,EAChB,MAAM,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,IAE3B,gBAAgB,CACT,CACT,CACU,CACZ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,96 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Colors } from "Theme/types";
|
|
3
|
-
export declare const lightTheme:
|
|
4
|
-
|
|
5
|
-
primary: string;
|
|
6
|
-
secondary: string;
|
|
7
|
-
tertiary: string;
|
|
8
|
-
badge: string;
|
|
9
|
-
};
|
|
10
|
-
background: {
|
|
11
|
-
primary: string;
|
|
12
|
-
secondary: string;
|
|
13
|
-
tertiary: string;
|
|
14
|
-
tableRow: string;
|
|
15
|
-
};
|
|
16
|
-
border: {
|
|
17
|
-
primary: string;
|
|
18
|
-
secondary: string;
|
|
19
|
-
tertiary: string;
|
|
20
|
-
};
|
|
21
|
-
highlight: {
|
|
22
|
-
primary: string;
|
|
23
|
-
secondary: string;
|
|
24
|
-
};
|
|
25
|
-
utils: {
|
|
26
|
-
success: string;
|
|
27
|
-
error: string;
|
|
28
|
-
icon: string;
|
|
29
|
-
disabled: string;
|
|
30
|
-
};
|
|
31
|
-
theme: string;
|
|
32
|
-
};
|
|
33
|
-
export declare const darkTheme: {
|
|
34
|
-
text: {
|
|
35
|
-
primary: string;
|
|
36
|
-
secondary: string;
|
|
37
|
-
tertiary: string;
|
|
38
|
-
badge: string;
|
|
39
|
-
};
|
|
40
|
-
background: {
|
|
41
|
-
primary: string;
|
|
42
|
-
secondary: string;
|
|
43
|
-
tertiary: string;
|
|
44
|
-
tableRow: string;
|
|
45
|
-
};
|
|
46
|
-
border: {
|
|
47
|
-
primary: string;
|
|
48
|
-
secondary: string;
|
|
49
|
-
tertiary: string;
|
|
50
|
-
};
|
|
51
|
-
highlight: {
|
|
52
|
-
primary: string;
|
|
53
|
-
secondary: string;
|
|
54
|
-
};
|
|
55
|
-
utils: {
|
|
56
|
-
success: string;
|
|
57
|
-
error: string;
|
|
58
|
-
icon: string;
|
|
59
|
-
disabled: string;
|
|
60
|
-
};
|
|
61
|
-
theme: string;
|
|
62
|
-
};
|
|
3
|
+
export declare const lightTheme: Colors;
|
|
4
|
+
export declare const darkTheme: Colors;
|
|
63
5
|
export declare const useTheme: () => {
|
|
64
|
-
theme:
|
|
65
|
-
text: {
|
|
66
|
-
primary: string;
|
|
67
|
-
secondary: string;
|
|
68
|
-
tertiary: string;
|
|
69
|
-
badge: string;
|
|
70
|
-
};
|
|
71
|
-
background: {
|
|
72
|
-
primary: string;
|
|
73
|
-
secondary: string;
|
|
74
|
-
tertiary: string;
|
|
75
|
-
tableRow: string;
|
|
76
|
-
};
|
|
77
|
-
border: {
|
|
78
|
-
primary: string;
|
|
79
|
-
secondary: string;
|
|
80
|
-
tertiary: string;
|
|
81
|
-
};
|
|
82
|
-
highlight: {
|
|
83
|
-
primary: string;
|
|
84
|
-
secondary: string;
|
|
85
|
-
};
|
|
86
|
-
utils: {
|
|
87
|
-
success: string;
|
|
88
|
-
error: string;
|
|
89
|
-
icon: string;
|
|
90
|
-
disabled: string;
|
|
91
|
-
};
|
|
92
|
-
theme: string;
|
|
93
|
-
};
|
|
6
|
+
theme: Colors;
|
|
94
7
|
setTheme: (themeName: "light" | "dark") => void;
|
|
95
8
|
};
|
|
96
9
|
export declare const ThemeProvider: ({ children, themeValue }: {
|
|
@@ -48,6 +48,24 @@ export const lightTheme = {
|
|
|
48
48
|
icon: grey["700"],
|
|
49
49
|
disabled: grey["500"],
|
|
50
50
|
},
|
|
51
|
+
buttonText: {
|
|
52
|
+
filled: grey["200"],
|
|
53
|
+
outlined: blue["700"],
|
|
54
|
+
destructive: grey["200"],
|
|
55
|
+
success: green["500"],
|
|
56
|
+
},
|
|
57
|
+
buttonBorder: {
|
|
58
|
+
filled: blue["700"],
|
|
59
|
+
outlined: blue["700"],
|
|
60
|
+
destructive: red["500"],
|
|
61
|
+
success: green["500"],
|
|
62
|
+
},
|
|
63
|
+
buttonBackground: {
|
|
64
|
+
filled: blue["700"],
|
|
65
|
+
outlined: grey["200"],
|
|
66
|
+
destructive: red["500"],
|
|
67
|
+
success: green["500"],
|
|
68
|
+
},
|
|
51
69
|
theme: "light",
|
|
52
70
|
};
|
|
53
71
|
export const darkTheme = {
|
|
@@ -78,6 +96,24 @@ export const darkTheme = {
|
|
|
78
96
|
icon: grey["200"],
|
|
79
97
|
disabled: grey["700"],
|
|
80
98
|
},
|
|
99
|
+
buttonText: {
|
|
100
|
+
filled: grey["700"],
|
|
101
|
+
outlined: grey["200"],
|
|
102
|
+
destructive: grey["200"],
|
|
103
|
+
success: green["500"],
|
|
104
|
+
},
|
|
105
|
+
buttonBorder: {
|
|
106
|
+
filled: blue["700"],
|
|
107
|
+
outlined: grey["200"],
|
|
108
|
+
destructive: red["500"],
|
|
109
|
+
success: green["500"]
|
|
110
|
+
},
|
|
111
|
+
buttonBackground: {
|
|
112
|
+
filled: grey["200"],
|
|
113
|
+
outlined: grey["700"],
|
|
114
|
+
destructive: red["500"],
|
|
115
|
+
success: green["500"],
|
|
116
|
+
},
|
|
81
117
|
theme: "dark",
|
|
82
118
|
};
|
|
83
119
|
const ThemeContext = createContext({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","sourceRoot":"","sources":["../../lib/Theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,MAAM,MAAM,eAAe,CAAC;AAInC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAoB;IACnD,IAAI,EAAE;QACL,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAAC,KAAK;QACzD,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,iBAAiB,CAAC,CAAC,KAAK;QAC1D,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAAC,KAAK;QACzD,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAAC,KAAK;QACzD,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAAC,KAAK;QACzD,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK;KACnD;IACD,IAAI,EAAE;QACL,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAAC,KAAK;QACzD,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK;KACnD;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EAAE,CAAC;YAC3B,QAAQ,CAAC,UAAU,CAAC,CAAC;YACrB,OAAO;QACR,CAAC;QACD,QAAQ,CAAC,SAAS,CAAC,CAAC;IACrB,CAAC,CAAC;IAEF,OAAO,CACN,oBAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE;QACzE,6BACC,KAAK,EAAE;gBACN,eAAe,EAAE,KAAK,CAAC,UAAU,CAAC,OAAO;gBACzC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO;aACzB,IAEA,QAAQ,CACJ,CACiB,CACxB,CAAC;AACH,CAAC,CAAC"}
|
package/dist/Theme/types.d.ts
CHANGED
|
@@ -40,10 +40,23 @@ export interface Colors {
|
|
|
40
40
|
secondary: string;
|
|
41
41
|
tertiary: string;
|
|
42
42
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
buttonText: {
|
|
44
|
+
outlined: string;
|
|
45
|
+
filled: string;
|
|
46
|
+
destructive: string;
|
|
47
|
+
success: string;
|
|
48
|
+
};
|
|
49
|
+
buttonBorder: {
|
|
50
|
+
outlined: string;
|
|
51
|
+
filled: string;
|
|
52
|
+
destructive: string;
|
|
53
|
+
success: string;
|
|
54
|
+
};
|
|
55
|
+
buttonBackground: {
|
|
56
|
+
outlined: string;
|
|
57
|
+
filled: string;
|
|
58
|
+
destructive: string;
|
|
59
|
+
success: string;
|
|
47
60
|
};
|
|
48
61
|
highlight: {
|
|
49
62
|
primary: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,3 +2,8 @@ export * from "./Atoms/MoreHorizonButton/MoreHorizonButton";
|
|
|
2
2
|
export * from "./Atoms/NumberField/NumberField";
|
|
3
3
|
export * from "./Atoms/Pagination/Pagination";
|
|
4
4
|
export * from "./Atoms/DateField/DateField";
|
|
5
|
+
export * from "./Atoms/TextField/TextField";
|
|
6
|
+
export * from "./Atoms/Buttons/Button";
|
|
7
|
+
export * from "./Atoms/FieldWrapper/FieldWrapper";
|
|
8
|
+
export * from "./Atoms/DropdownField/DropdownField";
|
|
9
|
+
export * from "./Molecules/Thumbnail/Thumbnail";
|
package/dist/index.js
CHANGED
|
@@ -4,4 +4,9 @@ export * from "./Atoms/NumberField/NumberField";
|
|
|
4
4
|
export * from "./Atoms/Pagination/Pagination";
|
|
5
5
|
// export * from "./Atoms/SortDropdown/SortDropdown";
|
|
6
6
|
export * from "./Atoms/DateField/DateField";
|
|
7
|
+
export * from "./Atoms/TextField/TextField";
|
|
8
|
+
export * from "./Atoms/Buttons/Button";
|
|
9
|
+
export * from "./Atoms/FieldWrapper/FieldWrapper";
|
|
10
|
+
export * from "./Atoms/DropdownField/DropdownField";
|
|
11
|
+
export * from "./Molecules/Thumbnail/Thumbnail";
|
|
7
12
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iCAAiC,CAAC;AAChD,6DAA6D;AAC7D,cAAc,+BAA+B,CAAC;AAC9C,qDAAqD;AACrD,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iCAAiC,CAAC;AAChD,6DAA6D;AAC7D,cAAc,+BAA+B,CAAC;AAC9C,qDAAqD;AACrD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@factorearth/component-library",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.27-alpha.0",
|
|
4
4
|
"description": " A storybook component library for FactorEarth",
|
|
5
5
|
"author": "madtrx <marlin.makori@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/FactorEarth/RecordMiddleware#readme",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"access": "public",
|
|
46
46
|
"registry": "https://registry.npmjs.org/"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "af0f437860668d434074f77d2fe1a65185f0300f",
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@emotion/react": "^11.13.0",
|
|
51
51
|
"@emotion/styled": "^11.13.0",
|