@factorearth/component-library 3.3.13-alpha.0 → 3.6.0-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/README.md +11 -11
- package/dist/Atoms/Buttons/Button.d.ts +1 -1
- package/dist/Atoms/Buttons/Button.js +17 -17
- package/dist/Atoms/Buttons/Button.js.map +1 -1
- package/dist/Atoms/DateField/DateField.d.ts +1 -1
- package/dist/Atoms/DateField/DateField.js +94 -94
- package/dist/Atoms/DateField/DateField.js.map +1 -1
- package/dist/Atoms/DropdownField/DropdownField.d.ts +1 -1
- package/dist/Atoms/FieldWrapper/FieldWrapper.js +21 -21
- package/dist/Atoms/MoreHorizonButton/MoreHorizonButton.js +52 -52
- package/dist/Atoms/NoteField/NoteField.js +38 -38
- package/dist/Atoms/NumberField/NumberField.d.ts +1 -1
- package/dist/Atoms/NumberField/NumberField.js +63 -63
- package/dist/Atoms/NumberField/NumberField.js.map +1 -1
- package/dist/Atoms/Pagination/Pagination.js +26 -26
- package/dist/Atoms/PhoneNumberField/PhoneNumberField.d.ts +1 -1
- package/dist/Atoms/PhoneNumberField/PhoneNumberField.js +6 -8
- package/dist/Atoms/PhoneNumberField/PhoneNumberField.js.map +1 -1
- package/dist/Atoms/SelectField/SelectField.d.ts +1 -1
- package/dist/Atoms/SelectField/SelectField.js +14 -1
- package/dist/Atoms/SelectField/SelectField.js.map +1 -1
- package/dist/Atoms/SortDropdown/SortDropdown.js +39 -39
- package/dist/Atoms/TextField/TextField.d.ts +1 -1
- package/dist/Atoms/TextField/TextField.js +20 -23
- package/dist/Atoms/TextField/TextField.js.map +1 -1
- package/dist/Atoms/Toggle/Toggle.d.ts +13 -0
- package/dist/Atoms/Toggle/Toggle.js +59 -0
- package/dist/Atoms/Toggle/Toggle.js.map +1 -0
- package/dist/Molecules/NavMenu/NavMenu.d.ts +38 -0
- package/dist/Molecules/NavMenu/NavMenu.js +178 -0
- package/dist/Molecules/NavMenu/NavMenu.js.map +1 -0
- package/dist/Molecules/Thumbnail/Thumbnail.d.ts +1 -1
- package/dist/Molecules/Thumbnail/Thumbnail.js +51 -51
- package/dist/Molecules/Thumbnail/Thumbnail.js.map +1 -1
- package/dist/Organisms/Card/Card.d.ts +1 -1
- package/dist/Organisms/Card/Card.js +36 -36
- package/dist/Organisms/Card/Card.js.map +1 -1
- package/dist/Organisms/Modal/Modal.d.ts +2 -2
- package/dist/Organisms/Modal/Modal.js +68 -68
- package/dist/Organisms/Modal/Modal.js.map +1 -1
- package/dist/Theme/ThemeProvider.js +15 -43
- package/dist/Theme/ThemeProvider.js.map +1 -1
- package/dist/Theme/tokens.json +105 -36
- package/dist/Theme/types.d.ts +2 -22
- package/dist/index.d.ts +2 -5
- package/dist/index.js +2 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/Atoms/ContentDropdown/ContentDropdown.d.ts +0 -11
- package/dist/Atoms/ContentDropdown/ContentDropdown.js +0 -37
- package/dist/Atoms/ContentDropdown/ContentDropdown.js.map +0 -1
- package/dist/Atoms/Tab/Tab.d.ts +0 -10
- package/dist/Atoms/Tab/Tab.js +0 -26
- package/dist/Atoms/Tab/Tab.js.map +0 -1
- package/dist/Molecules/Form/Form.d.ts +0 -14
- package/dist/Molecules/Form/Form.js +0 -16
- package/dist/Molecules/Form/Form.js.map +0 -1
- package/dist/Organisms/TabManager/TabManager.d.ts +0 -9
- package/dist/Organisms/TabManager/TabManager.js +0 -46
- package/dist/Organisms/TabManager/TabManager.js.map +0 -1
|
@@ -1,72 +1,72 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect } from "react";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { FiPlus, FiMinus } from "react-icons/fi";
|
|
4
|
-
const NumberFieldContainer = styled.div `
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
width: 100%;
|
|
4
|
+
const NumberFieldContainer = styled.div `
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
width: 100%;
|
|
8
8
|
`;
|
|
9
|
-
const NumberInput = styled.input `
|
|
10
|
-
display: flex;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
align-items: center;
|
|
13
|
-
text-align: center;
|
|
14
|
-
min-width: 67px;
|
|
15
|
-
height: 38px;
|
|
16
|
-
width: 100%;
|
|
17
|
-
gap: 10px;
|
|
18
|
-
align-self: stretch;
|
|
19
|
-
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
20
|
-
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
21
|
-
border-width: 1px;
|
|
22
|
-
border-style: solid;
|
|
23
|
-
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
24
|
-
border-right: none;
|
|
25
|
-
border-left: none;
|
|
26
|
-
border-radius: 0px;
|
|
27
|
-
padding: 0;
|
|
28
|
-
&:focus-visible {
|
|
29
|
-
outline: none;
|
|
30
|
-
}
|
|
31
|
-
&::-webkit-inner-spin-button,
|
|
32
|
-
::-webkit-outer-spin-button {
|
|
33
|
-
-webkit-appearance: none;
|
|
34
|
-
margin: 0;
|
|
35
|
-
}
|
|
36
|
-
::placeholder {
|
|
37
|
-
font-size: 14px;
|
|
38
|
-
}
|
|
9
|
+
const NumberInput = styled.input `
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
text-align: center;
|
|
14
|
+
min-width: 67px;
|
|
15
|
+
height: 38px;
|
|
16
|
+
width: 100%;
|
|
17
|
+
gap: 10px;
|
|
18
|
+
align-self: stretch;
|
|
19
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
20
|
+
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
21
|
+
border-width: 1px;
|
|
22
|
+
border-style: solid;
|
|
23
|
+
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
24
|
+
border-right: none;
|
|
25
|
+
border-left: none;
|
|
26
|
+
border-radius: 0px;
|
|
27
|
+
padding: 0;
|
|
28
|
+
&:focus-visible {
|
|
29
|
+
outline: none;
|
|
30
|
+
}
|
|
31
|
+
&::-webkit-inner-spin-button,
|
|
32
|
+
::-webkit-outer-spin-button {
|
|
33
|
+
-webkit-appearance: none;
|
|
34
|
+
margin: 0;
|
|
35
|
+
}
|
|
36
|
+
::placeholder {
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
}
|
|
39
39
|
`;
|
|
40
|
-
const DecrementButton = styled.div `
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
display: flex;
|
|
43
|
-
width: 16px;
|
|
44
|
-
height: 22px;
|
|
45
|
-
padding: 8px 16px;
|
|
46
|
-
justify-content: center;
|
|
47
|
-
align-items: center;
|
|
48
|
-
border-radius: 4px 0px 0px 4px;
|
|
49
|
-
border-width: 1px;
|
|
50
|
-
border-style: solid;
|
|
51
|
-
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
52
|
-
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
53
|
-
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
40
|
+
const DecrementButton = styled.div `
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
display: flex;
|
|
43
|
+
width: 16px;
|
|
44
|
+
height: 22px;
|
|
45
|
+
padding: 8px 16px;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
align-items: center;
|
|
48
|
+
border-radius: 4px 0px 0px 4px;
|
|
49
|
+
border-width: 1px;
|
|
50
|
+
border-style: solid;
|
|
51
|
+
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
52
|
+
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
53
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
54
54
|
`;
|
|
55
|
-
const IncrementButton = styled.div `
|
|
56
|
-
cursor: pointer;
|
|
57
|
-
display: flex;
|
|
58
|
-
width: 16px;
|
|
59
|
-
height: 22px;
|
|
60
|
-
padding: 8px 16px;
|
|
61
|
-
justify-content: center;
|
|
62
|
-
align-items: center;
|
|
63
|
-
border-width: 1px;
|
|
64
|
-
border-style: solid;
|
|
65
|
-
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
66
|
-
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
67
|
-
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
68
|
-
${({ moreHorizon }) => !moreHorizon && `border-radius: 0px 4px 4px 0px;`}
|
|
69
|
-
${({ moreHorizon }) => moreHorizon && `border-right: none;`}
|
|
55
|
+
const IncrementButton = styled.div `
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
display: flex;
|
|
58
|
+
width: 16px;
|
|
59
|
+
height: 22px;
|
|
60
|
+
padding: 8px 16px;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
align-items: center;
|
|
63
|
+
border-width: 1px;
|
|
64
|
+
border-style: solid;
|
|
65
|
+
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
66
|
+
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
67
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
68
|
+
${({ moreHorizon }) => !moreHorizon && `border-radius: 0px 4px 4px 0px;`}
|
|
69
|
+
${({ moreHorizon }) => moreHorizon && `border-right: none;`}
|
|
70
70
|
`;
|
|
71
71
|
export const NumberField = (props) => {
|
|
72
72
|
const { colorPalette, handleChange, handleBlur, fromTable, moreHorizon, value, ...inputProps } = props;
|
|
@@ -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,MAAqB,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGjD,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,
|
|
1
|
+
{"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
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { FiChevronLeft, FiChevronRight } from "react-icons/fi";
|
|
4
|
-
const PaginationContainer = styled.div `
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
gap: 16px;
|
|
9
|
-
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
4
|
+
const PaginationContainer = styled.div `
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
gap: 16px;
|
|
9
|
+
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
10
10
|
`;
|
|
11
11
|
const PageNumber = styled.div(({ isActive, colorPalette, }) => ({
|
|
12
12
|
height: "14px",
|
|
@@ -27,28 +27,28 @@ const PageNumber = styled.div(({ isActive, colorPalette, }) => ({
|
|
|
27
27
|
fontWeight: 600,
|
|
28
28
|
lineHeight: "100%",
|
|
29
29
|
}));
|
|
30
|
-
const Ellipsis = styled.span `
|
|
31
|
-
height: 35px;
|
|
32
|
-
display: flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
30
|
+
const Ellipsis = styled.span `
|
|
31
|
+
height: 35px;
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
36
36
|
`;
|
|
37
|
-
const RightButton = styled(FiChevronRight) `
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
display: inline-flex;
|
|
40
|
-
height: 24px;
|
|
41
|
-
justify-content: center;
|
|
42
|
-
align-items: center;
|
|
43
|
-
flex-shrink: 0;
|
|
37
|
+
const RightButton = styled(FiChevronRight) `
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
height: 24px;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
align-items: center;
|
|
43
|
+
flex-shrink: 0;
|
|
44
44
|
`;
|
|
45
|
-
const LeftButton = styled(FiChevronLeft) `
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
display: inline-flex;
|
|
48
|
-
height: 24px;
|
|
49
|
-
justify-content: center;
|
|
50
|
-
align-items: center;
|
|
51
|
-
flex-shrink: 0;
|
|
45
|
+
const LeftButton = styled(FiChevronLeft) `
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
height: 24px;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
align-items: center;
|
|
51
|
+
flex-shrink: 0;
|
|
52
52
|
`;
|
|
53
53
|
const getMinAndMax = (number, maxVisiblePages) => {
|
|
54
54
|
const min = Math.floor(number / maxVisiblePages) * maxVisiblePages + 1;
|
|
@@ -3,10 +3,10 @@ import { AsYouType, getCountries, getCountryCallingCode, } from "libphonenumber-
|
|
|
3
3
|
import React, { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { DropdownSelect } from "../DropdownField/DropdownField";
|
|
5
5
|
import { TextFieldWrapper } from "../TextField/TextField";
|
|
6
|
-
const PhoneNumberContainer = styled.div `
|
|
7
|
-
display: flex;
|
|
8
|
-
background-color: ${({ colorPalette }) => colorPalette.background.primary};
|
|
9
|
-
width: 100%;
|
|
6
|
+
const PhoneNumberContainer = styled.div `
|
|
7
|
+
display: flex;
|
|
8
|
+
background-color: ${({ colorPalette }) => colorPalette.background.primary};
|
|
9
|
+
width: 100%;
|
|
10
10
|
`;
|
|
11
11
|
export const PhoneNumberField = (props) => {
|
|
12
12
|
const { activeEditing, handleBlur, handleChange, moreHorizon, placeholder, initialValue, colorPalette, ...remainderProps } = props;
|
|
@@ -66,8 +66,7 @@ export const PhoneNumberField = (props) => {
|
|
|
66
66
|
};
|
|
67
67
|
},
|
|
68
68
|
control: (provided, _state) => {
|
|
69
|
-
return {
|
|
70
|
-
...provided, paddingLeft: "8px",
|
|
69
|
+
return { ...provided, paddingLeft: "8px",
|
|
71
70
|
justifyContent: "center",
|
|
72
71
|
alignSelf: "stretch",
|
|
73
72
|
backgroundColor: colorPalette.background.primary,
|
|
@@ -107,8 +106,7 @@ export const PhoneNumberField = (props) => {
|
|
|
107
106
|
boxShadow: "none",
|
|
108
107
|
borderRight: `1px solid ${colorPalette.border.primary}`,
|
|
109
108
|
},
|
|
110
|
-
boxShadow: "none",
|
|
111
|
-
};
|
|
109
|
+
boxShadow: "none", };
|
|
112
110
|
},
|
|
113
111
|
}, containerStyle: { width: "150px" } }),
|
|
114
112
|
React.createElement(TextFieldWrapper, { style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneNumberField.js","sourceRoot":"","sources":["../../../lib/Atoms/PhoneNumberField/PhoneNumberField.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EACN,SAAS,EAET,YAAY,EACZ,qBAAqB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"PhoneNumberField.js","sourceRoot":"","sources":["../../../lib/Atoms/PhoneNumberField/PhoneNumberField.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EACN,SAAS,EAET,YAAY,EACZ,qBAAqB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EA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SAAS,CAAC;4BACtB,MAAM,EAAE,aAAa,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE;4BAClD,eAAe,EAAE,YAAY,CAAC,UAAU,CAAC,OAAO;4BAChD,SAAS,EAAE,MAAM;4BACjB,WAAW,EAAE,aAAa,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE;yBACvD;wBACD,QAAQ,EAAE;4BACT,GAAG,QAAQ,CAAC,QAAQ,CAAC;4BACrB,MAAM,EAAE,aAAa,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE;4BAClD,eAAe,EAAE,YAAY,CAAC,UAAU,CAAC,OAAO;4BAChD,SAAS,EAAE,MAAM;4BACjB,WAAW,EAAE,aAAa,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE;yBACvD;wBACD,SAAS,EAAE,MAAM,GAAG,CAAC;gBACvB,CAAC;aACD,EACD,cAAc,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,GACjC;QACF,oBAAC,gBAAgB,IAChB,KAAK,EAAE;gBACN,UAAU,EAAE,MAAM;gBAClB,WAAW,EAAE,MAAM;gBACnB,YAAY,EAAE,KAAK;aACnB,KACG,cAAc,EAClB,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAC,SAAS,EACnB,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,uBAAuB,EACjC,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,KAAK,GACT;QACD,WAAW,IAAI,WAAW,CACL,CACvB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -6,7 +6,7 @@ export interface CheckboxFieldValues {
|
|
|
6
6
|
}
|
|
7
7
|
interface SelectFieldProps {
|
|
8
8
|
handleChange(e: React.ChangeEvent<HTMLInputElement>): void;
|
|
9
|
-
colorPalette: Colors;
|
|
9
|
+
colorPalette: Colors & string;
|
|
10
10
|
options: Option[];
|
|
11
11
|
moreHorizon?: JSX.Element;
|
|
12
12
|
values: CheckboxFieldValues | Option[] | undefined;
|
|
@@ -15,9 +15,22 @@ export const SelectField = (props) => {
|
|
|
15
15
|
const { handleChange, colorPalette, options, moreHorizon, values, type } = props;
|
|
16
16
|
const [open, setOpen] = useState(false);
|
|
17
17
|
const [selectedValues, setSelectedValues] = useState([]);
|
|
18
|
+
const [selectedId, setSelectedId] = useState(Array.isArray(selectedValues) && selectedValues.length === 1 ? selectedValues[0].id || "" : "");
|
|
18
19
|
useEffect(() => {
|
|
19
20
|
setSelectedValues(values && type === "checkbox" ? Object.values(values) : values || []);
|
|
20
21
|
}, [values]);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (Array.isArray(selectedValues) && selectedValues.length === 1) {
|
|
24
|
+
setSelectedId(selectedValues[0].id);
|
|
25
|
+
}
|
|
26
|
+
}, [selectedValues]);
|
|
27
|
+
function onClick(id) {
|
|
28
|
+
if (type === "radio" && id === selectedId) {
|
|
29
|
+
setSelectedId("");
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
handleChange({ target: { value: "", id: "" } });
|
|
32
|
+
}
|
|
33
|
+
}
|
|
21
34
|
return (React.createElement(React.Fragment, null,
|
|
22
35
|
React.createElement(DropdownSelect, { components: {
|
|
23
36
|
DropdownIndicator: type === "radio" ? RadioIndicator : CheckBoxIndicator,
|
|
@@ -59,7 +72,7 @@ export const SelectField = (props) => {
|
|
|
59
72
|
gap: "8px",
|
|
60
73
|
paddingBottom: "16px",
|
|
61
74
|
} },
|
|
62
|
-
React.createElement("input", { type: type, id: option.linkedId || option.id, defaultValue: option.value || "", checked: checked, onChange: handleChange }),
|
|
75
|
+
React.createElement("input", { type: type, id: option.linkedId || option.id, defaultValue: option.value || "", checked: checked, onChange: handleChange, onClick: () => { onClick(option.linkedId || option.id); } }),
|
|
63
76
|
React.createElement("label", { htmlFor: option.label }, option.label)));
|
|
64
77
|
})))));
|
|
65
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectField.js","sourceRoot":"","sources":["../../../lib/Atoms/SelectField/SelectField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,UAAU,EAA0B,MAAM,cAAc,CAAC;AAIlE,MAAM,cAAc,GAAG,CAAC,KAA6B,EAAE,EAAE;IACxD,OAAO,CACN,oBAAC,UAAU,CAAC,iBAAiB,OAAK,KAAK;QACtC,oBAAC,aAAa,OAAG,CACa,CAC/B,CAAC;AACH,CAAC,CAAC;AACF,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAE,EAAE;IAC3D,OAAO,CACN,oBAAC,UAAU,CAAC,iBAAiB,OAAK,KAAK;QACtC,oBAAC,aAAa,OAAG,CACa,CAC/B,CAAC;AACH,CAAC,CAAC;AAeF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAE,EAAE;IACtD,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,GACvE,KAAK,CAAC;IACP,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAElD,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectField.js","sourceRoot":"","sources":["../../../lib/Atoms/SelectField/SelectField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;A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OAAO,EAAE,MAAM;wBACf,cAAc,EAAE,QAAQ;wBACxB,UAAU,EAAE,OAAO;wBACnB,GAAG,EAAE,KAAK;wBACV,aAAa,EAAE,MAAM;qBACrB;oBAED,+BACC,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,EAAE,EAChC,YAAY,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,EAChC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GACxD;oBACF,+BAAO,OAAO,EAAE,MAAM,CAAC,KAAK,IAAG,MAAM,CAAC,KAAK,CAAS,CAC/C,CACN,CAAC;YACH,CAAC,CAAC,CACG,CACC,CACN,CACH,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -2,49 +2,49 @@ import React, { useState, useRef, useEffect } from 'react';
|
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { GoSortAsc, GoSortDesc } from "react-icons/go";
|
|
4
4
|
import { TiMinus } from "react-icons/ti";
|
|
5
|
-
const DropdownContainer = styled.div `
|
|
6
|
-
position: relative;
|
|
7
|
-
display: inline-block;
|
|
5
|
+
const DropdownContainer = styled.div `
|
|
6
|
+
position: relative;
|
|
7
|
+
display: inline-block;
|
|
8
8
|
`;
|
|
9
|
-
const DropdownButton = styled.button `
|
|
10
|
-
background-color: #f0f0f0;
|
|
11
|
-
border: none;
|
|
12
|
-
padding: 10px;
|
|
13
|
-
border-radius: 4px;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
9
|
+
const DropdownButton = styled.button `
|
|
10
|
+
background-color: #f0f0f0;
|
|
11
|
+
border: none;
|
|
12
|
+
padding: 10px;
|
|
13
|
+
border-radius: 4px;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
17
|
`;
|
|
18
|
-
const Menu = styled.div `
|
|
19
|
-
display: ${({ isOpen }) => (isOpen ? 'block' : 'none')};
|
|
20
|
-
position: absolute;
|
|
21
|
-
top: 100%;
|
|
22
|
-
left: 0;
|
|
23
|
-
background-color: #fff;
|
|
24
|
-
border: 1px solid #ccc;
|
|
25
|
-
border-radius: 4px;
|
|
26
|
-
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
|
27
|
-
min-width: 200px;
|
|
28
|
-
z-index: 1000;
|
|
18
|
+
const Menu = styled.div `
|
|
19
|
+
display: ${({ isOpen }) => (isOpen ? 'block' : 'none')};
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 100%;
|
|
22
|
+
left: 0;
|
|
23
|
+
background-color: #fff;
|
|
24
|
+
border: 1px solid #ccc;
|
|
25
|
+
border-radius: 4px;
|
|
26
|
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
|
27
|
+
min-width: 200px;
|
|
28
|
+
z-index: 1000;
|
|
29
29
|
`;
|
|
30
|
-
const MenuItem = styled.button `
|
|
31
|
-
background: none;
|
|
32
|
-
border: none;
|
|
33
|
-
padding: 10px;
|
|
34
|
-
width: 100%;
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
transition: background-color 0.2s;
|
|
39
|
-
|
|
40
|
-
&:hover {
|
|
41
|
-
background-color: #f0f0f0;
|
|
42
|
-
}
|
|
30
|
+
const MenuItem = styled.button `
|
|
31
|
+
background: none;
|
|
32
|
+
border: none;
|
|
33
|
+
padding: 10px;
|
|
34
|
+
width: 100%;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
transition: background-color 0.2s;
|
|
39
|
+
|
|
40
|
+
&:hover {
|
|
41
|
+
background-color: #f0f0f0;
|
|
42
|
+
}
|
|
43
43
|
`;
|
|
44
|
-
const IconContainer = styled.span `
|
|
45
|
-
margin-right: 8px;
|
|
46
|
-
display: flex;
|
|
47
|
-
align-items: center;
|
|
44
|
+
const IconContainer = styled.span `
|
|
45
|
+
margin-right: 8px;
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
48
|
`;
|
|
49
49
|
export const SortDropdown = () => {
|
|
50
50
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { Colors } from "../../Theme/types";
|
|
3
3
|
interface TextFieldWrapperProps extends React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
4
4
|
activeEditing?: boolean;
|
|
5
|
-
colorPalette: Colors;
|
|
5
|
+
colorPalette: Colors & string;
|
|
6
6
|
moreHorizon?: JSX.Element;
|
|
7
7
|
}
|
|
8
8
|
export declare const TextFieldWrapper: (props: TextFieldWrapperProps) => React.JSX.Element;
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
|
2
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
|
-
border-radius: 4px;
|
|
9
|
-
cursor: text;
|
|
3
|
+
const InputWrapper = styled.input `
|
|
4
|
+
width: 100%;
|
|
5
|
+
min-width: 60px;
|
|
6
|
+
min-height: 30px;
|
|
7
|
+
font-weight: 600;
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
cursor: text;
|
|
10
10
|
${({ moreHorizon }) => moreHorizon &&
|
|
11
|
-
`border-top-right-radius: 0px;border-bottom-right-radius: 0px;`}
|
|
12
|
-
background-color: ${({ colorPalette }) => colorPalette.background.primary};
|
|
13
|
-
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
14
|
-
border-style: solid;
|
|
15
|
-
border-width: 1px;
|
|
16
|
-
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
17
|
-
padding: 0;
|
|
18
|
-
padding-left: 16px;
|
|
19
|
-
${({ moreHorizon }) => moreHorizon && `border-right: none;`}
|
|
20
|
-
height: 38px;
|
|
21
|
-
::placeholder {
|
|
22
|
-
font-weight: 500;
|
|
23
|
-
}
|
|
24
|
-
:disabled {
|
|
25
|
-
background-color: ${({ colorPalette }) => colorPalette.background.disabledInput}
|
|
26
|
-
}
|
|
11
|
+
`border-top-right-radius: 0px;border-bottom-right-radius: 0px;`}
|
|
12
|
+
background-color: ${({ colorPalette }) => colorPalette.background.primary};
|
|
13
|
+
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
14
|
+
border-style: solid;
|
|
15
|
+
border-width: 1px;
|
|
16
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
17
|
+
padding: 0;
|
|
18
|
+
padding-left: 16px;
|
|
19
|
+
${({ moreHorizon }) => moreHorizon && `border-right: none;`}
|
|
20
|
+
height: 38px;
|
|
21
|
+
::placeholder {
|
|
22
|
+
font-weight: 500;
|
|
23
|
+
}
|
|
27
24
|
`;
|
|
28
25
|
export const TextFieldWrapper = (props) => {
|
|
29
26
|
const { activeEditing, colorPalette, moreHorizon, onChange, value, ...remainderProps } = props;
|
|
@@ -1 +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,CAG/B;;;;;;;GAOC,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CACrB,WAAW;IACX,+DAA+D;qBAC5C,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAA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,CAAC,CAAC;IAE1D,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,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;QAC7C,oBAAC,YAAY,OACR,cAAc,EAClB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EACvC,YAAY,EAAE,YAAY,GACzB;QACD,WAAW,IAAI,WAAW,CACtB,CACN,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Colors } from "../../Theme/types";
|
|
3
|
+
interface ToggleProps {
|
|
4
|
+
colorPalette: Colors;
|
|
5
|
+
modes: [Mode, Mode];
|
|
6
|
+
setState?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
7
|
+
}
|
|
8
|
+
interface Mode {
|
|
9
|
+
mode: string;
|
|
10
|
+
icon?: JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
declare const Toggle: (props: ToggleProps) => React.JSX.Element;
|
|
13
|
+
export default Toggle;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
const ToggleLabel = styled.div `
|
|
4
|
+
font-size: 14px;
|
|
5
|
+
font-style: normal;
|
|
6
|
+
font-weight: 700;
|
|
7
|
+
line-height: 21px;
|
|
8
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
9
|
+
text-align: right;
|
|
10
|
+
`;
|
|
11
|
+
const ToggleIcon = styled.div `
|
|
12
|
+
width: 16px;
|
|
13
|
+
height: 16px;
|
|
14
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
15
|
+
`;
|
|
16
|
+
const Toggle = (props) => {
|
|
17
|
+
const { modes, setState, colorPalette } = props;
|
|
18
|
+
const [isActive, setIsActive] = useState(false);
|
|
19
|
+
if (modes.length !== 2)
|
|
20
|
+
throw new Error("Incorrect number of modes provided");
|
|
21
|
+
const toggleSwitch = () => {
|
|
22
|
+
setIsActive(!isActive);
|
|
23
|
+
setState && setState(!isActive);
|
|
24
|
+
};
|
|
25
|
+
return (React.createElement("div", { style: {
|
|
26
|
+
display: 'flex',
|
|
27
|
+
padding: '8px',
|
|
28
|
+
justifyContent: 'center',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
gap: '8px',
|
|
31
|
+
alignSelf: 'stretch',
|
|
32
|
+
} },
|
|
33
|
+
React.createElement(ToggleIcon, { colorPalette: colorPalette }, modes[0].icon),
|
|
34
|
+
React.createElement(ToggleLabel, { colorPalette: colorPalette }, modes[0].mode),
|
|
35
|
+
React.createElement("button", { onClick: toggleSwitch, style: {
|
|
36
|
+
position: 'relative',
|
|
37
|
+
width: '45px',
|
|
38
|
+
height: '26px',
|
|
39
|
+
backgroundColor: isActive ? colorPalette.text.tertiary : '#ccc',
|
|
40
|
+
borderRadius: '20px',
|
|
41
|
+
cursor: 'pointer',
|
|
42
|
+
transition: 'background-color 0.3s ease',
|
|
43
|
+
border: "none",
|
|
44
|
+
} },
|
|
45
|
+
React.createElement("div", { style: {
|
|
46
|
+
position: 'absolute',
|
|
47
|
+
top: '3px',
|
|
48
|
+
left: isActive ? '22px' : '3px',
|
|
49
|
+
width: '20px',
|
|
50
|
+
height: '20px',
|
|
51
|
+
backgroundColor: `${colorPalette.background.primary}`,
|
|
52
|
+
borderRadius: '50%',
|
|
53
|
+
transition: 'left 0.3s ease',
|
|
54
|
+
} })),
|
|
55
|
+
React.createElement(ToggleLabel, { colorPalette: colorPalette }, modes[1].mode),
|
|
56
|
+
React.createElement(ToggleIcon, { colorPalette: colorPalette }, modes[1].icon)));
|
|
57
|
+
};
|
|
58
|
+
export default Toggle;
|
|
59
|
+
//# sourceMappingURL=Toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toggle.js","sourceRoot":"","sources":["../../../lib/Atoms/Toggle/Toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAexC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAA0B;;;;;WAK7C,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO;;CAEzD,CAAC;AAEF,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAA0B;;;WAG5C,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO;CACzD,CAAA;AAED,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAE,EAAE;IAEpC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,KAAK,CAAA;IAE/C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,IAAG,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IA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AW,IAAC,YAAY,EAAE,YAAY,IAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAe;QACtE,oBAAC,UAAU,IAAC,YAAY,EAAE,YAAY,IAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAc,CAChE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Colors } from "../../Theme/types";
|
|
3
|
+
interface NavBarProps {
|
|
4
|
+
colorPalette: Colors & string;
|
|
5
|
+
locations: [Location];
|
|
6
|
+
appInfo: appInfo;
|
|
7
|
+
}
|
|
8
|
+
interface Location {
|
|
9
|
+
name: string;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
reqPerm?: string;
|
|
12
|
+
icon?: JSX.Element;
|
|
13
|
+
}
|
|
14
|
+
interface appInfo {
|
|
15
|
+
name: string;
|
|
16
|
+
versionNum: string;
|
|
17
|
+
headerLogo?: string;
|
|
18
|
+
menuLogo?: string;
|
|
19
|
+
menuLogoDark?: string;
|
|
20
|
+
copyRight?: string;
|
|
21
|
+
dropdown?: boolean;
|
|
22
|
+
dropdownOptions?: [{
|
|
23
|
+
label: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}];
|
|
26
|
+
offlineCapabale?: boolean;
|
|
27
|
+
setTheme: React.Dispatch<React.SetStateAction<boolean>>;
|
|
28
|
+
online: boolean;
|
|
29
|
+
setOnline: React.Dispatch<React.SetStateAction<boolean>>;
|
|
30
|
+
selectedProject: boolean;
|
|
31
|
+
setSelectedProject: React.Dispatch<React.SetStateAction<string>>;
|
|
32
|
+
}
|
|
33
|
+
declare const Location: import("@emotion/styled").StyledComponent<{
|
|
34
|
+
theme?: import("@emotion/react").Theme;
|
|
35
|
+
as?: React.ElementType;
|
|
36
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
37
|
+
declare const NavBar: (props: NavBarProps) => React.JSX.Element;
|
|
38
|
+
export default NavBar;
|