@factorearth/component-library 5.2.4-alpha.0 → 5.3.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/Accordion/Accordion.js +18 -18
- package/dist/Atoms/Badge/Badge.js +18 -18
- package/dist/Atoms/Box/Box.js +15 -15
- package/dist/Atoms/Buttons/Button.js +23 -23
- package/dist/Atoms/ContentDropdown/ContentDropdown.js +24 -24
- package/dist/Atoms/DateField/DateField.js +94 -94
- package/dist/Atoms/FieldWrapper/FieldWrapper.js +35 -35
- package/dist/Atoms/MoreHorizonButton/MoreHorizonButton.js +52 -52
- package/dist/Atoms/NoteField/NoteField.js +38 -38
- package/dist/Atoms/NumberField/NumberField.js +63 -63
- package/dist/Atoms/OptionsDropdown/OptionsDropdown.js +38 -38
- package/dist/Atoms/Pagination/Pagination.js +25 -25
- package/dist/Atoms/PhoneNumberField/PhoneNumberField.js +4 -4
- package/dist/Atoms/ProgressBar/ProgressBar.js +16 -16
- package/dist/Atoms/SortDropdown/SortDropdown.js +39 -39
- package/dist/Atoms/Tab/Tab.js +18 -18
- package/dist/Atoms/TextField/TextField.js +24 -24
- package/dist/Atoms/Toggle/Toggle.js +11 -11
- package/dist/Atoms/Typography/Typography.js +7 -7
- package/dist/Molecules/Form/Form.js +8 -8
- package/dist/Molecules/NavMenu/NavMenu.js +102 -102
- package/dist/Molecules/TableHeader/TableHeader.js +14 -14
- package/dist/Molecules/TableRow/TableRow.js +27 -27
- package/dist/Molecules/Thumbnail/Thumbnail.d.ts +4 -4
- package/dist/Molecules/Thumbnail/Thumbnail.js +50 -126
- package/dist/Molecules/Thumbnail/Thumbnail.js.map +1 -1
- package/dist/Organisms/Card/Card.js +33 -33
- package/dist/Organisms/EditUserPerms/EditUserPerms.js +67 -67
- package/dist/Organisms/ErrorSplash/ErrorSplash.js +44 -44
- package/dist/Organisms/Modal/Modal.d.ts +5 -0
- package/dist/Organisms/Modal/Modal.js +88 -74
- package/dist/Organisms/Modal/Modal.js.map +1 -1
- package/dist/Organisms/Splash/Splash.d.ts +10 -0
- package/dist/Organisms/Splash/Splash.js +82 -0
- package/dist/Organisms/Splash/Splash.js.map +1 -0
- package/dist/Organisms/TabManager/TabManager.js +13 -13
- package/dist/Organisms/Table/Table.js +14 -14
- package/dist/Organisms/Tutorial/Tutorial.js +51 -51
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/Atoms/Spinner/Spinner.d.ts +0 -7
- package/dist/Atoms/Spinner/Spinner.js +0 -10
- package/dist/Atoms/Spinner/Spinner.js.map +0 -1
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { FiMaximize } from "react-icons/fi";
|
|
4
|
-
const NoteContainer = styled.div `
|
|
5
|
-
display: flex;
|
|
6
|
-
width: 100%;
|
|
7
|
-
justify-content: flex-end;
|
|
4
|
+
const NoteContainer = styled.div `
|
|
5
|
+
display: flex;
|
|
6
|
+
width: 100%;
|
|
7
|
+
justify-content: flex-end;
|
|
8
8
|
`;
|
|
9
|
-
const MaximizeIconContainer = styled.div `
|
|
10
|
-
border-radius: 4px 0px 0px 4px;
|
|
11
|
-
height: 38px;
|
|
12
|
-
width: 40px;
|
|
13
|
-
display: flex;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
align-items: center;
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
18
|
-
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
19
|
-
border-width: 1px;
|
|
20
|
-
border-style: solid;
|
|
21
|
-
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
9
|
+
const MaximizeIconContainer = styled.div `
|
|
10
|
+
border-radius: 4px 0px 0px 4px;
|
|
11
|
+
height: 38px;
|
|
12
|
+
width: 40px;
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
align-items: center;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
18
|
+
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
19
|
+
border-width: 1px;
|
|
20
|
+
border-style: solid;
|
|
21
|
+
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
22
22
|
`;
|
|
23
|
-
const MaximizeIcon = styled(FiMaximize) `
|
|
24
|
-
width: 20px;
|
|
25
|
-
height: 20px;
|
|
23
|
+
const MaximizeIcon = styled(FiMaximize) `
|
|
24
|
+
width: 20px;
|
|
25
|
+
height: 20px;
|
|
26
26
|
`;
|
|
27
|
-
const NoteArea = styled.textarea `
|
|
28
|
-
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
29
|
-
border-style: solid;
|
|
30
|
-
border-width: 1px;
|
|
31
|
-
padding: 8px 16px 0px 16px;
|
|
32
|
-
height: 30px;
|
|
33
|
-
width: 100%;
|
|
34
|
-
min-height: 30px;
|
|
35
|
-
resize: vertical;
|
|
36
|
-
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
37
|
-
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
38
|
-
border-left: none;
|
|
39
|
-
font-size: 16px;
|
|
40
|
-
:focus-visible {
|
|
41
|
-
max-height: 30px;
|
|
42
|
-
}
|
|
43
|
-
${({ moreHorizon }) => moreHorizon && `border-right: none;`}
|
|
27
|
+
const NoteArea = styled.textarea `
|
|
28
|
+
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
29
|
+
border-style: solid;
|
|
30
|
+
border-width: 1px;
|
|
31
|
+
padding: 8px 16px 0px 16px;
|
|
32
|
+
height: 30px;
|
|
33
|
+
width: 100%;
|
|
34
|
+
min-height: 30px;
|
|
35
|
+
resize: vertical;
|
|
36
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
37
|
+
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
38
|
+
border-left: none;
|
|
39
|
+
font-size: 16px;
|
|
40
|
+
:focus-visible {
|
|
41
|
+
max-height: 30px;
|
|
42
|
+
}
|
|
43
|
+
${({ moreHorizon }) => moreHorizon && `border-right: none;`}
|
|
44
44
|
${({ moreHorizon }) => moreHorizon &&
|
|
45
|
-
`border-top-right-radius: 0px; border-bottom-right-radius: 0px;`}
|
|
45
|
+
`border-top-right-radius: 0px; border-bottom-right-radius: 0px;`}
|
|
46
46
|
`;
|
|
47
47
|
export const NoteFieldTextArea = forwardRef((props, ref) => {
|
|
48
48
|
const { colorPalette, toggleFullScreenView, moreHorizon, ...textAreaProps } = props;
|
|
@@ -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,48 +1,48 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect } from "react";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { Typography } from "../Typography/Typography";
|
|
4
|
-
const OptionsDropdownDiv = styled.div `
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: flex-start;
|
|
7
|
-
width: fit-content;
|
|
8
|
-
border-radius: 4px;
|
|
9
|
-
border: ${({ colorPalette }) => colorPalette.text.tertiary} 1px solid;
|
|
4
|
+
const OptionsDropdownDiv = styled.div `
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: flex-start;
|
|
7
|
+
width: fit-content;
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
border: ${({ colorPalette }) => colorPalette.text.tertiary} 1px solid;
|
|
10
10
|
`;
|
|
11
|
-
const CategoryDiv = styled.div `
|
|
12
|
-
padding: 8px;
|
|
13
|
-
border-left: ${({ colorPalette }) => colorPalette.text.tertiary} 1px solid;
|
|
14
|
-
background: ${({ expanded, colorPalette }) => expanded ? colorPalette.text.tertiary : "none"};
|
|
15
|
-
color: ${({ expanded, colorPalette }) => expanded ? colorPalette.background.primary : colorPalette.text.tertiary};
|
|
16
|
-
position: relative;
|
|
17
|
-
|
|
18
|
-
&:first-child {
|
|
19
|
-
border-left: none;
|
|
20
|
-
}
|
|
11
|
+
const CategoryDiv = styled.div `
|
|
12
|
+
padding: 8px;
|
|
13
|
+
border-left: ${({ colorPalette }) => colorPalette.text.tertiary} 1px solid;
|
|
14
|
+
background: ${({ expanded, colorPalette }) => expanded ? colorPalette.text.tertiary : "none"};
|
|
15
|
+
color: ${({ expanded, colorPalette }) => expanded ? colorPalette.background.primary : colorPalette.text.tertiary};
|
|
16
|
+
position: relative;
|
|
17
|
+
|
|
18
|
+
&:first-child {
|
|
19
|
+
border-left: none;
|
|
20
|
+
}
|
|
21
21
|
`;
|
|
22
|
-
const CategoryTitle = styled.div `
|
|
23
|
-
display: inline-flex;
|
|
24
|
-
align-items: flex-start;
|
|
25
|
-
gap: 8px;
|
|
26
|
-
|
|
22
|
+
const CategoryTitle = styled.div `
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
align-items: flex-start;
|
|
25
|
+
gap: 8px;
|
|
26
|
+
|
|
27
27
|
`;
|
|
28
|
-
const AllOptionsDiv = styled.div `
|
|
29
|
-
border-top: ${({ colorPalette }) => colorPalette.background.primary} 1px solid;
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
position: absolute;
|
|
33
|
-
left: ${({ last }) => last ? "-60px" : "0px"};
|
|
34
|
-
top: calc(100% + 1px);
|
|
35
|
-
background: ${({ colorPalette }) => colorPalette.text.tertiary};
|
|
36
|
-
border-radius: 0 0 4px 4px;
|
|
37
|
-
padding: 8px;
|
|
28
|
+
const AllOptionsDiv = styled.div `
|
|
29
|
+
border-top: ${({ colorPalette }) => colorPalette.background.primary} 1px solid;
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
position: absolute;
|
|
33
|
+
left: ${({ last }) => last ? "-60px" : "0px"};
|
|
34
|
+
top: calc(100% + 1px);
|
|
35
|
+
background: ${({ colorPalette }) => colorPalette.text.tertiary};
|
|
36
|
+
border-radius: 0 0 4px 4px;
|
|
37
|
+
padding: 8px;
|
|
38
38
|
`;
|
|
39
|
-
const OptionDiv = styled.div `
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: flex-start;
|
|
42
|
-
align-self: stretch;
|
|
43
|
-
gap: 8px;
|
|
44
|
-
padding: 8px;
|
|
45
|
-
width: max-content;
|
|
39
|
+
const OptionDiv = styled.div `
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: flex-start;
|
|
42
|
+
align-self: stretch;
|
|
43
|
+
gap: 8px;
|
|
44
|
+
padding: 8px;
|
|
45
|
+
width: max-content;
|
|
46
46
|
`;
|
|
47
47
|
;
|
|
48
48
|
export const OptionsDropdown = (props) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
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;
|
|
4
|
+
const PaginationContainer = styled.div `
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
gap: 16px;
|
|
9
9
|
`;
|
|
10
10
|
const PageNumber = styled.div(({ isActive, colorPalette, }) => ({
|
|
11
11
|
height: "14px",
|
|
@@ -22,28 +22,28 @@ const PageNumber = styled.div(({ isActive, colorPalette, }) => ({
|
|
|
22
22
|
fontWeight: 600,
|
|
23
23
|
lineHeight: "100%",
|
|
24
24
|
}));
|
|
25
|
-
const Ellipsis = styled.span `
|
|
26
|
-
height: 35px;
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
justify-content: center;
|
|
30
|
-
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
25
|
+
const Ellipsis = styled.span `
|
|
26
|
+
height: 35px;
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
31
31
|
`;
|
|
32
|
-
const RightButton = styled(FiChevronRight) `
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
display: inline-flex;
|
|
35
|
-
height: 24px;
|
|
36
|
-
justify-content: center;
|
|
37
|
-
align-items: center;
|
|
38
|
-
flex-shrink: 0;
|
|
32
|
+
const RightButton = styled(FiChevronRight) `
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
height: 24px;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
align-items: center;
|
|
38
|
+
flex-shrink: 0;
|
|
39
39
|
`;
|
|
40
|
-
const LeftButton = styled(FiChevronLeft) `
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
display: inline-flex;
|
|
43
|
-
height: 24px;
|
|
44
|
-
justify-content: center;
|
|
45
|
-
align-items: center;
|
|
46
|
-
flex-shrink: 0;
|
|
40
|
+
const LeftButton = styled(FiChevronLeft) `
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
display: inline-flex;
|
|
43
|
+
height: 24px;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
align-items: center;
|
|
46
|
+
flex-shrink: 0;
|
|
47
47
|
`;
|
|
48
48
|
const getMinAndMax = (number, maxVisiblePages) => {
|
|
49
49
|
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, ...htmlProps } = props;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import React from "react";
|
|
3
|
-
const ProgressBarContainer = styled.div `
|
|
4
|
-
width: 100%;
|
|
5
|
-
height: ${({ minimized }) => minimized ? "4px" : "14px"};
|
|
6
|
-
background-color: ${({ colorPalette }) => colorPalette.background.primary};
|
|
7
|
-
border: ${({ colorPalette }) => colorPalette.border.primary};
|
|
8
|
-
border-style: solid;
|
|
9
|
-
border-width: 0.5px;
|
|
10
|
-
border-radius: 12px;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
padding: ${({ minimized }) => minimized ? "0px" : "2px"};
|
|
3
|
+
const ProgressBarContainer = styled.div `
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: ${({ minimized }) => minimized ? "4px" : "14px"};
|
|
6
|
+
background-color: ${({ colorPalette }) => colorPalette.background.primary};
|
|
7
|
+
border: ${({ colorPalette }) => colorPalette.border.primary};
|
|
8
|
+
border-style: solid;
|
|
9
|
+
border-width: 0.5px;
|
|
10
|
+
border-radius: 12px;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
padding: ${({ minimized }) => minimized ? "0px" : "2px"};
|
|
13
13
|
`;
|
|
14
|
-
const ProgressBarFiller = styled.div `
|
|
15
|
-
height: 100%;
|
|
16
|
-
width: ${({ progress }) => progress}%;
|
|
17
|
-
background-color: ${({ colorPalette, variant }) => colorPalette.toastText[variant]};
|
|
18
|
-
border-radius: 12px;
|
|
19
|
-
transition: width 0.3s ease-in-out;
|
|
14
|
+
const ProgressBarFiller = styled.div `
|
|
15
|
+
height: 100%;
|
|
16
|
+
width: ${({ progress }) => progress}%;
|
|
17
|
+
background-color: ${({ colorPalette, variant }) => colorPalette.toastText[variant]};
|
|
18
|
+
border-radius: 12px;
|
|
19
|
+
transition: width 0.3s ease-in-out;
|
|
20
20
|
`;
|
|
21
21
|
const ProgressBar = ({ progress, colorPalette, variant, minimized }) => (React.createElement(ProgressBarContainer, { colorPalette: colorPalette, minimized: minimized || false },
|
|
22
22
|
React.createElement(ProgressBarFiller, { progress: progress, colorPalette: colorPalette, variant: variant })));
|
|
@@ -3,49 +3,49 @@ import styled from '@emotion/styled';
|
|
|
3
3
|
import { FiChevronDown } from "react-icons/fi";
|
|
4
4
|
import { GoSortAsc, GoSortDesc } from "react-icons/go";
|
|
5
5
|
import { TiMinus } from "react-icons/ti";
|
|
6
|
-
const DropdownContainer = styled.div `
|
|
7
|
-
position: relative;
|
|
8
|
-
display: inline-block;
|
|
6
|
+
const DropdownContainer = styled.div `
|
|
7
|
+
position: relative;
|
|
8
|
+
display: inline-block;
|
|
9
9
|
`;
|
|
10
|
-
const DropdownButton = styled.button `
|
|
11
|
-
background: transparent;
|
|
12
|
-
border: none;
|
|
13
|
-
padding: 10px;
|
|
14
|
-
border-radius: 4px;
|
|
15
|
-
cursor: pointer;
|
|
16
|
-
display: flex;
|
|
17
|
-
align-items: center;
|
|
10
|
+
const DropdownButton = styled.button `
|
|
11
|
+
background: transparent;
|
|
12
|
+
border: none;
|
|
13
|
+
padding: 10px;
|
|
14
|
+
border-radius: 4px;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
18
|
`;
|
|
19
|
-
const Menu = styled.div `
|
|
20
|
-
display: ${({ isOpen }) => (isOpen ? 'block' : 'none')};
|
|
21
|
-
position: absolute;
|
|
22
|
-
top: 100%;
|
|
23
|
-
left: 0;
|
|
24
|
-
background-color: #fff;
|
|
25
|
-
border: 1px solid #ccc;
|
|
26
|
-
border-radius: 4px;
|
|
27
|
-
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
|
28
|
-
min-width: 200px;
|
|
29
|
-
z-index: 1000;
|
|
19
|
+
const Menu = styled.div `
|
|
20
|
+
display: ${({ isOpen }) => (isOpen ? 'block' : 'none')};
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 100%;
|
|
23
|
+
left: 0;
|
|
24
|
+
background-color: #fff;
|
|
25
|
+
border: 1px solid #ccc;
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
|
28
|
+
min-width: 200px;
|
|
29
|
+
z-index: 1000;
|
|
30
30
|
`;
|
|
31
|
-
const MenuItem = styled.button `
|
|
32
|
-
background: none;
|
|
33
|
-
border: none;
|
|
34
|
-
padding: 10px;
|
|
35
|
-
width: 100%;
|
|
36
|
-
display: flex;
|
|
37
|
-
align-items: center;
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
transition: background-color 0.2s;
|
|
40
|
-
|
|
41
|
-
&:hover {
|
|
42
|
-
background-color: #f0f0f0;
|
|
43
|
-
}
|
|
31
|
+
const MenuItem = styled.button `
|
|
32
|
+
background: none;
|
|
33
|
+
border: none;
|
|
34
|
+
padding: 10px;
|
|
35
|
+
width: 100%;
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
transition: background-color 0.2s;
|
|
40
|
+
|
|
41
|
+
&:hover {
|
|
42
|
+
background-color: #f0f0f0;
|
|
43
|
+
}
|
|
44
44
|
`;
|
|
45
|
-
const IconContainer = styled.span `
|
|
46
|
-
margin-right: 8px;
|
|
47
|
-
display: flex;
|
|
48
|
-
align-items: center;
|
|
45
|
+
const IconContainer = styled.span `
|
|
46
|
+
margin-right: 8px;
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
49
|
`;
|
|
50
50
|
export const SortDropdown = () => {
|
|
51
51
|
const [isOpen, setIsOpen] = useState(false);
|
package/dist/Atoms/Tab/Tab.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import React from "react";
|
|
3
|
-
const TabDiv = styled.div `
|
|
4
|
-
display: flex;
|
|
5
|
-
padding: 6px 12px;
|
|
6
|
-
justify-content: space-between;
|
|
7
|
-
align-items: center;
|
|
8
|
-
gap: 8px;
|
|
9
|
-
border-radius: 4px 4px 0px 0px;
|
|
10
|
-
background: ${({ colors, selected }) => selected ? colors.tab.selected : colors.tab.notSelected};
|
|
11
|
-
border: .5px solid ${({ colors }) => colors.tab.selected};
|
|
3
|
+
const TabDiv = styled.div `
|
|
4
|
+
display: flex;
|
|
5
|
+
padding: 6px 12px;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 8px;
|
|
9
|
+
border-radius: 4px 4px 0px 0px;
|
|
10
|
+
background: ${({ colors, selected }) => selected ? colors.tab.selected : colors.tab.notSelected};
|
|
11
|
+
border: .5px solid ${({ colors }) => colors.tab.selected};
|
|
12
12
|
`;
|
|
13
|
-
const Label = styled.p `
|
|
14
|
-
color: ${({ colors, selected }) => selected ? colors.tabText.selected : colors.tabText.notSelected};
|
|
15
|
-
font-size: 14px;
|
|
16
|
-
line-height: 150%;
|
|
17
|
-
cursor: ${({ selected }) => selected ? "auto" : "pointer"};
|
|
18
|
-
font-weight: 700;
|
|
19
|
-
margin: 0px;
|
|
20
|
-
max-height: 20px;
|
|
21
|
-
overflow: auto;
|
|
13
|
+
const Label = styled.p `
|
|
14
|
+
color: ${({ colors, selected }) => selected ? colors.tabText.selected : colors.tabText.notSelected};
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
line-height: 150%;
|
|
17
|
+
cursor: ${({ selected }) => selected ? "auto" : "pointer"};
|
|
18
|
+
font-weight: 700;
|
|
19
|
+
margin: 0px;
|
|
20
|
+
max-height: 20px;
|
|
21
|
+
overflow: auto;
|
|
22
22
|
`;
|
|
23
23
|
function Tab(props) {
|
|
24
24
|
const { colors, handleClick, label, selected, closeButton, newTabButton, ...remainingProps } = props;
|
|
@@ -1,30 +1,30 @@
|
|
|
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
|
-
border-color: ${({ colorPalette }) => colorPalette.background.disabledInput};
|
|
26
|
-
background-color: ${({ colorPalette }) => colorPalette.background.disabledInput};
|
|
27
|
-
}
|
|
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
|
+
border-color: ${({ colorPalette }) => colorPalette.background.disabledInput};
|
|
26
|
+
background-color: ${({ colorPalette }) => colorPalette.background.disabledInput};
|
|
27
|
+
}
|
|
28
28
|
`;
|
|
29
29
|
export const TextFieldWrapper = (props) => {
|
|
30
30
|
const { activeEditing, colorPalette, moreHorizon, onChange, value, ...htmlProps } = props;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
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;
|
|
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
10
|
`;
|
|
11
|
-
const ToggleIcon = styled.div `
|
|
12
|
-
width: 16px;
|
|
13
|
-
height: 16px;
|
|
14
|
-
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
11
|
+
const ToggleIcon = styled.div `
|
|
12
|
+
width: 16px;
|
|
13
|
+
height: 16px;
|
|
14
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
15
15
|
`;
|
|
16
16
|
const Toggle = (props) => {
|
|
17
17
|
const { modes, setState, colorPalette, state, ...htmlProps } = props;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import tokens from "../../Theme/tokens.json";
|
|
4
|
-
const StyledText = styled.p `
|
|
5
|
-
color: ${({ textColor }) => textColor};
|
|
6
|
-
font-size: ${({ text }) => text.fontSize};
|
|
7
|
-
line-height: ${({ text }) => text.lineHeight};
|
|
8
|
-
font-weight: ${({ text }) => text.fontWeight};
|
|
9
|
-
padding: none;
|
|
10
|
-
margin: 0px;
|
|
4
|
+
const StyledText = styled.p `
|
|
5
|
+
color: ${({ textColor }) => textColor};
|
|
6
|
+
font-size: ${({ text }) => text.fontSize};
|
|
7
|
+
line-height: ${({ text }) => text.lineHeight};
|
|
8
|
+
font-weight: ${({ text }) => text.fontWeight};
|
|
9
|
+
padding: none;
|
|
10
|
+
margin: 0px;
|
|
11
11
|
`;
|
|
12
12
|
export const Typography = (props) => {
|
|
13
13
|
const { textColor, variant, content, children, ...htmlProps } = props;
|