@factorearth/component-library 5.3.1-alpha.0 → 5.3.1
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.d.ts +1 -0
- package/dist/Molecules/NavMenu/NavMenu.js +117 -104
- package/dist/Molecules/NavMenu/NavMenu.js.map +1 -1
- 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 +53 -131
- 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/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
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# `componentLibrary`
|
|
2
|
-
|
|
3
|
-
> TODO: description
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
const componentlibrary = require('componentLibrary');
|
|
9
|
-
|
|
10
|
-
// TODO: DEMONSTRATE API
|
|
11
|
-
```
|
|
1
|
+
# `componentLibrary`
|
|
2
|
+
|
|
3
|
+
> TODO: description
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
const componentlibrary = require('componentLibrary');
|
|
9
|
+
|
|
10
|
+
// TODO: DEMONSTRATE API
|
|
11
|
+
```
|
|
@@ -3,27 +3,27 @@ import React, { useState } from "react";
|
|
|
3
3
|
import { FiChevronDown, FiChevronUp } from "react-icons/fi";
|
|
4
4
|
import { Typography } from "../Typography/Typography";
|
|
5
5
|
import * as FiIcons from 'react-icons/fi';
|
|
6
|
-
const Container = styled.div `
|
|
7
|
-
background: ${({ expanded, colors }) => expanded ? colors.background.tertiary : colors.background.primary};
|
|
8
|
-
padding: 8px;
|
|
9
|
-
border-top: ${({ colors }) => `${colors.background.secondary} 1px solid`};
|
|
10
|
-
cursor: pointer
|
|
6
|
+
const Container = styled.div `
|
|
7
|
+
background: ${({ expanded, colors }) => expanded ? colors.background.tertiary : colors.background.primary};
|
|
8
|
+
padding: 8px;
|
|
9
|
+
border-top: ${({ colors }) => `${colors.background.secondary} 1px solid`};
|
|
10
|
+
cursor: pointer
|
|
11
11
|
`;
|
|
12
|
-
const Header = styled.div `
|
|
13
|
-
display: flex;
|
|
14
|
-
padding: 8px;
|
|
15
|
-
flex-direction: row;
|
|
16
|
-
align-items: center;
|
|
17
|
-
gap: 8px;
|
|
18
|
-
align-self: stretch;
|
|
12
|
+
const Header = styled.div `
|
|
13
|
+
display: flex;
|
|
14
|
+
padding: 8px;
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
align-self: stretch;
|
|
19
19
|
`;
|
|
20
|
-
const ContentContainer = styled.div `
|
|
21
|
-
align-self: stretch;
|
|
22
|
-
padding-bottom: 16px;
|
|
20
|
+
const ContentContainer = styled.div `
|
|
21
|
+
align-self: stretch;
|
|
22
|
+
padding-bottom: 16px;
|
|
23
23
|
`;
|
|
24
|
-
const Step = styled.div `
|
|
25
|
-
padding: 4px 16px;
|
|
26
|
-
align-self: stretch;
|
|
24
|
+
const Step = styled.div `
|
|
25
|
+
padding: 4px 16px;
|
|
26
|
+
align-self: stretch;
|
|
27
27
|
`;
|
|
28
28
|
;
|
|
29
29
|
function Accordion(props) {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import React from "react";
|
|
3
|
-
const BadgeContainer = styled.div `
|
|
4
|
-
display: flex;
|
|
5
|
-
padding: 6px 8px;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
gap: 4px;
|
|
9
|
-
border-radius: 32px;
|
|
10
|
-
background-color: ${({ colorPalette, variant }) => colorPalette.badgeBackground[variant]};
|
|
11
|
-
color: ${({ colorPalette, variant }) => colorPalette.badgeText[variant]};
|
|
12
|
-
border-width: 1px;
|
|
13
|
-
border-style: solid;
|
|
14
|
-
border-color: ${({ colorPalette, variant }) => colorPalette.badgeBorder[variant]};
|
|
15
|
-
min-width: 80px;
|
|
3
|
+
const BadgeContainer = styled.div `
|
|
4
|
+
display: flex;
|
|
5
|
+
padding: 6px 8px;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 4px;
|
|
9
|
+
border-radius: 32px;
|
|
10
|
+
background-color: ${({ colorPalette, variant }) => colorPalette.badgeBackground[variant]};
|
|
11
|
+
color: ${({ colorPalette, variant }) => colorPalette.badgeText[variant]};
|
|
12
|
+
border-width: 1px;
|
|
13
|
+
border-style: solid;
|
|
14
|
+
border-color: ${({ colorPalette, variant }) => colorPalette.badgeBorder[variant]};
|
|
15
|
+
min-width: 80px;
|
|
16
16
|
`;
|
|
17
|
-
const Label = styled.p `
|
|
18
|
-
margin: 0px;
|
|
19
|
-
font-size: 12px;
|
|
20
|
-
font-weight: 600;
|
|
21
|
-
color: ${({ colorPalette, variant }) => colorPalette.badgeText[variant]};
|
|
17
|
+
const Label = styled.p `
|
|
18
|
+
margin: 0px;
|
|
19
|
+
font-size: 12px;
|
|
20
|
+
font-weight: 600;
|
|
21
|
+
color: ${({ colorPalette, variant }) => colorPalette.badgeText[variant]};
|
|
22
22
|
`;
|
|
23
23
|
export const Badge = (props) => {
|
|
24
24
|
const { icon, label, theme, variant, ...htmlProps } = props;
|
package/dist/Atoms/Box/Box.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
|
-
const BoxDiv = styled.div `
|
|
4
|
-
display: flex;
|
|
5
|
-
padding: 24px;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: flex-start;
|
|
8
|
-
gap: 16px;
|
|
9
|
-
border-radius: 4px;
|
|
10
|
-
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
11
|
-
border-width: 1px;
|
|
12
|
-
border-style: solid;
|
|
13
|
-
border-color: ${({ colorPalette }) => colorPalette.background.secondary};
|
|
14
|
-
|
|
15
|
-
&:hover {
|
|
16
|
-
background-color: ${({ colorPalette }) => colorPalette.background.tertiary};
|
|
17
|
-
}
|
|
3
|
+
const BoxDiv = styled.div `
|
|
4
|
+
display: flex;
|
|
5
|
+
padding: 24px;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: flex-start;
|
|
8
|
+
gap: 16px;
|
|
9
|
+
border-radius: 4px;
|
|
10
|
+
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
11
|
+
border-width: 1px;
|
|
12
|
+
border-style: solid;
|
|
13
|
+
border-color: ${({ colorPalette }) => colorPalette.background.secondary};
|
|
14
|
+
|
|
15
|
+
&:hover {
|
|
16
|
+
background-color: ${({ colorPalette }) => colorPalette.background.tertiary};
|
|
17
|
+
}
|
|
18
18
|
`;
|
|
19
19
|
export const Box = (props) => {
|
|
20
20
|
const { children, colorPalette, ...htmlProps } = props;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import React from "react";
|
|
3
|
-
const StyledButton = styled.button `
|
|
4
|
-
height: 33px;
|
|
5
|
-
background-color: ${({ colors, variant }) => colors.buttonBackground[variant]};
|
|
6
|
-
color: ${({ colors, variant }) => colors.buttonText[variant]};
|
|
7
|
-
display: flex;
|
|
8
|
-
padding: 6px 8px;
|
|
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: ${({ colors, variant }) => colors.buttonBorder[variant]};
|
|
19
|
-
|
|
20
|
-
&: disabled {
|
|
21
|
-
border-color: ${({ colors }) => colors.buttonBorder.disabled};
|
|
22
|
-
background-color: ${({ colors }) => colors.buttonBackground.disabled};
|
|
23
|
-
color: ${({ colors }) => colors.buttonText.disabled};
|
|
24
|
-
cursor: not-allowed;
|
|
25
|
-
}
|
|
3
|
+
const StyledButton = styled.button `
|
|
4
|
+
height: 33px;
|
|
5
|
+
background-color: ${({ colors, variant }) => colors.buttonBackground[variant]};
|
|
6
|
+
color: ${({ colors, variant }) => colors.buttonText[variant]};
|
|
7
|
+
display: flex;
|
|
8
|
+
padding: 6px 8px;
|
|
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: ${({ colors, variant }) => colors.buttonBorder[variant]};
|
|
19
|
+
|
|
20
|
+
&: disabled {
|
|
21
|
+
border-color: ${({ colors }) => colors.buttonBorder.disabled};
|
|
22
|
+
background-color: ${({ colors }) => colors.buttonBackground.disabled};
|
|
23
|
+
color: ${({ colors }) => colors.buttonText.disabled};
|
|
24
|
+
cursor: not-allowed;
|
|
25
|
+
}
|
|
26
26
|
`;
|
|
27
27
|
export const Button = (props) => {
|
|
28
28
|
const { colorPalette, icon, variant, label, children, ...htmlProps } = props;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FiChevronDown, FiChevronUp } from "react-icons/fi";
|
|
4
|
-
const Container = styled.div `
|
|
5
|
-
display: flex;
|
|
6
|
-
width: 100%;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
background-color: ${({ colorPalette }) => colorPalette.buttonBackground.outlined};
|
|
9
|
-
border-width: 1px;
|
|
10
|
-
border-style: solid;
|
|
11
|
-
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
12
|
-
border-left: none;
|
|
13
|
-
border-right: none;
|
|
14
|
-
${({ expanded }) => expanded && `border-bottom: none;`};
|
|
4
|
+
const Container = styled.div `
|
|
5
|
+
display: flex;
|
|
6
|
+
width: 100%;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
background-color: ${({ colorPalette }) => colorPalette.buttonBackground.outlined};
|
|
9
|
+
border-width: 1px;
|
|
10
|
+
border-style: solid;
|
|
11
|
+
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
12
|
+
border-left: none;
|
|
13
|
+
border-right: none;
|
|
14
|
+
${({ expanded }) => expanded && `border-bottom: none;`};
|
|
15
15
|
`;
|
|
16
|
-
const PseudoButton = styled.div `
|
|
17
|
-
display: flex;
|
|
18
|
-
padding: 8px 16px;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
align-items: center;
|
|
21
|
-
gap: 10px;
|
|
22
|
-
border-radius: 4px;
|
|
16
|
+
const PseudoButton = styled.div `
|
|
17
|
+
display: flex;
|
|
18
|
+
padding: 8px 16px;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 10px;
|
|
22
|
+
border-radius: 4px;
|
|
23
23
|
`;
|
|
24
|
-
const Label = styled.p `
|
|
25
|
-
color: ${({ colorPalette }) => colorPalette.buttonText.outlined};
|
|
26
|
-
font-size: 20.992px;
|
|
27
|
-
font-style: normal;
|
|
28
|
-
font-weight: 700;
|
|
29
|
-
line-height: 150%;
|
|
24
|
+
const Label = styled.p `
|
|
25
|
+
color: ${({ colorPalette }) => colorPalette.buttonText.outlined};
|
|
26
|
+
font-size: 20.992px;
|
|
27
|
+
font-style: normal;
|
|
28
|
+
font-weight: 700;
|
|
29
|
+
line-height: 150%;
|
|
30
30
|
`;
|
|
31
31
|
function ContentDropdown(props) {
|
|
32
32
|
const { colorPalette, expanded, handleClick, icon, label, ...htmlProps } = props;
|
|
@@ -3,101 +3,101 @@ import styled from "@emotion/styled";
|
|
|
3
3
|
import { FiCalendar } from "react-icons/fi";
|
|
4
4
|
import DatePicker from "react-datepicker";
|
|
5
5
|
import "react-datepicker/dist/react-datepicker.css";
|
|
6
|
-
const DateIcon = styled(FiCalendar) `
|
|
7
|
-
color: ${({ colorpalette }) => colorpalette.text.primary};
|
|
8
|
-
background: ${({ colorpalette }) => colorpalette.background.primary};
|
|
9
|
-
border-width: 1px;
|
|
10
|
-
border-style: solid;
|
|
11
|
-
border-color: ${({ colorpalette }) => colorpalette.border.primary};
|
|
12
|
-
border-left: none;
|
|
13
|
-
width: 24px;
|
|
14
|
-
height: 38px;
|
|
15
|
-
padding-right: 8px;
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
border-radius: 0px 4px 4px 0px;
|
|
18
|
-
${({ morehorizon }) => morehorizon === "true" && `border-right: none; border-radius: 0px;`};
|
|
6
|
+
const DateIcon = styled(FiCalendar) `
|
|
7
|
+
color: ${({ colorpalette }) => colorpalette.text.primary};
|
|
8
|
+
background: ${({ colorpalette }) => colorpalette.background.primary};
|
|
9
|
+
border-width: 1px;
|
|
10
|
+
border-style: solid;
|
|
11
|
+
border-color: ${({ colorpalette }) => colorpalette.border.primary};
|
|
12
|
+
border-left: none;
|
|
13
|
+
width: 24px;
|
|
14
|
+
height: 38px;
|
|
15
|
+
padding-right: 8px;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
border-radius: 0px 4px 4px 0px;
|
|
18
|
+
${({ morehorizon }) => morehorizon === "true" && `border-right: none; border-radius: 0px;`};
|
|
19
19
|
`;
|
|
20
|
-
const DateFieldContainer = styled.div `
|
|
21
|
-
display: flex;
|
|
22
|
-
background: ${({ colorpalette }) => colorpalette.background.primary};
|
|
23
|
-
width: 100%;
|
|
24
|
-
|
|
25
|
-
.react-datepicker-wrapper {
|
|
26
|
-
width: 100% !important;
|
|
27
|
-
}
|
|
28
|
-
.react-datepicker {
|
|
29
|
-
border-color: ${({ colorpalette }) => colorpalette.border.primary};
|
|
30
|
-
background: ${({ colorpalette }) => colorpalette.background.primary};
|
|
31
|
-
left: 33px;
|
|
32
|
-
border-radius: 4px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.react-datepicker__input-container > input {
|
|
36
|
-
height: 38px;
|
|
37
|
-
border-width: 1px;
|
|
38
|
-
border-style: solid;
|
|
39
|
-
border-color: ${({ colorpalette }) => colorpalette.border.primary};
|
|
40
|
-
color: ${({ colorpalette }) => colorpalette.text.primary};
|
|
41
|
-
background: ${({ colorpalette }) => colorpalette.background.primary};
|
|
42
|
-
border-radius: 4px;
|
|
43
|
-
border-right: none;
|
|
44
|
-
font-size: 14px;
|
|
45
|
-
text-align: center;
|
|
46
|
-
width: 100%;
|
|
47
|
-
padding: 0;
|
|
48
|
-
margin: 0;
|
|
49
|
-
&:focus-visible {
|
|
50
|
-
outline: none;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.react-datepicker__header {
|
|
55
|
-
background-color: ${({ colorpalette }) => colorpalette.background.secondary};
|
|
56
|
-
border-bottom: none;
|
|
57
|
-
padding: 10px;
|
|
58
|
-
border-radius: 4px 4px 0 0;
|
|
59
|
-
}
|
|
60
|
-
.react-datepicker__month-container {
|
|
61
|
-
background-color: ${({ colorpalette }) => colorpalette.background.primary};
|
|
62
|
-
}
|
|
63
|
-
.react-datepicker__day {
|
|
64
|
-
background-color: ${({ colorpalette }) => colorpalette.background.primary};
|
|
65
|
-
color: ${({ colorpalette }) => colorpalette.text.primary};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.react-datepicker__current-month {
|
|
69
|
-
color: ${({ colorpalette }) => colorpalette.text.primary};
|
|
70
|
-
font-weight: bold;
|
|
71
|
-
font-size: 16px;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.react-datepicker__navigation {
|
|
75
|
-
color: ${({ colorpalette }) => colorpalette.text.primary};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.react-datepicker__day-name {
|
|
79
|
-
color: ${({ colorpalette }) => colorpalette.text.primary};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.react-datepicker__day--selected,
|
|
83
|
-
.react-datepicker__day--keyboard-selected {
|
|
84
|
-
background-color: ${({ colorpalette }) => colorpalette.background.secondary};
|
|
85
|
-
color: ${({ colorpalette }) => colorpalette.text.primary};
|
|
86
|
-
border-radius: 50%;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.react-datepicker__day:hover {
|
|
90
|
-
background-color: ${({ colorpalette }) => colorpalette.background.secondary};
|
|
91
|
-
border-radius: 50%;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.react-datepicker__day--outside-month {
|
|
95
|
-
color: ${({ colorpalette }) => colorpalette.text.secondary};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.react-datepicker__triangle {
|
|
99
|
-
display: none;
|
|
100
|
-
}
|
|
20
|
+
const DateFieldContainer = styled.div `
|
|
21
|
+
display: flex;
|
|
22
|
+
background: ${({ colorpalette }) => colorpalette.background.primary};
|
|
23
|
+
width: 100%;
|
|
24
|
+
|
|
25
|
+
.react-datepicker-wrapper {
|
|
26
|
+
width: 100% !important;
|
|
27
|
+
}
|
|
28
|
+
.react-datepicker {
|
|
29
|
+
border-color: ${({ colorpalette }) => colorpalette.border.primary};
|
|
30
|
+
background: ${({ colorpalette }) => colorpalette.background.primary};
|
|
31
|
+
left: 33px;
|
|
32
|
+
border-radius: 4px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.react-datepicker__input-container > input {
|
|
36
|
+
height: 38px;
|
|
37
|
+
border-width: 1px;
|
|
38
|
+
border-style: solid;
|
|
39
|
+
border-color: ${({ colorpalette }) => colorpalette.border.primary};
|
|
40
|
+
color: ${({ colorpalette }) => colorpalette.text.primary};
|
|
41
|
+
background: ${({ colorpalette }) => colorpalette.background.primary};
|
|
42
|
+
border-radius: 4px;
|
|
43
|
+
border-right: none;
|
|
44
|
+
font-size: 14px;
|
|
45
|
+
text-align: center;
|
|
46
|
+
width: 100%;
|
|
47
|
+
padding: 0;
|
|
48
|
+
margin: 0;
|
|
49
|
+
&:focus-visible {
|
|
50
|
+
outline: none;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.react-datepicker__header {
|
|
55
|
+
background-color: ${({ colorpalette }) => colorpalette.background.secondary};
|
|
56
|
+
border-bottom: none;
|
|
57
|
+
padding: 10px;
|
|
58
|
+
border-radius: 4px 4px 0 0;
|
|
59
|
+
}
|
|
60
|
+
.react-datepicker__month-container {
|
|
61
|
+
background-color: ${({ colorpalette }) => colorpalette.background.primary};
|
|
62
|
+
}
|
|
63
|
+
.react-datepicker__day {
|
|
64
|
+
background-color: ${({ colorpalette }) => colorpalette.background.primary};
|
|
65
|
+
color: ${({ colorpalette }) => colorpalette.text.primary};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.react-datepicker__current-month {
|
|
69
|
+
color: ${({ colorpalette }) => colorpalette.text.primary};
|
|
70
|
+
font-weight: bold;
|
|
71
|
+
font-size: 16px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.react-datepicker__navigation {
|
|
75
|
+
color: ${({ colorpalette }) => colorpalette.text.primary};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.react-datepicker__day-name {
|
|
79
|
+
color: ${({ colorpalette }) => colorpalette.text.primary};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.react-datepicker__day--selected,
|
|
83
|
+
.react-datepicker__day--keyboard-selected {
|
|
84
|
+
background-color: ${({ colorpalette }) => colorpalette.background.secondary};
|
|
85
|
+
color: ${({ colorpalette }) => colorpalette.text.primary};
|
|
86
|
+
border-radius: 50%;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.react-datepicker__day:hover {
|
|
90
|
+
background-color: ${({ colorpalette }) => colorpalette.background.secondary};
|
|
91
|
+
border-radius: 50%;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.react-datepicker__day--outside-month {
|
|
95
|
+
color: ${({ colorpalette }) => colorpalette.text.secondary};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.react-datepicker__triangle {
|
|
99
|
+
display: none;
|
|
100
|
+
}
|
|
101
101
|
`;
|
|
102
102
|
export const DateFieldPicker = ({ colorPalette, handleBlur, handleChange, value, placeholder, moreHorizon, }) => {
|
|
103
103
|
const [selectedDate, setSelectedDate] = useState(null);
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import React from "react";
|
|
3
|
-
const FieldWrapperContainer = styled.div `
|
|
4
|
-
display: flex;
|
|
5
|
-
width: 100%;
|
|
6
|
-
gap: 16px;
|
|
7
|
-
@media (max-width: 500px) {
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
gap: 8px;
|
|
10
|
-
}
|
|
3
|
+
const FieldWrapperContainer = styled.div `
|
|
4
|
+
display: flex;
|
|
5
|
+
width: 100%;
|
|
6
|
+
gap: 16px;
|
|
7
|
+
@media (max-width: 500px) {
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
gap: 8px;
|
|
10
|
+
}
|
|
11
11
|
`;
|
|
12
|
-
const LabelContainer = styled.label `
|
|
13
|
-
display: flex;
|
|
14
|
-
min-height: 56px;
|
|
15
|
-
align-items: flex-start;
|
|
16
|
-
padding-top: 8px;
|
|
17
|
-
gap: 16px;
|
|
18
|
-
text-overflow: ellipsis;
|
|
19
|
-
font-size: 16px;
|
|
20
|
-
font-style: normal;
|
|
21
|
-
font-weight: 700;
|
|
22
|
-
line-height: 125%;
|
|
23
|
-
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
24
|
-
width: 50%;
|
|
25
|
-
align-items: center;
|
|
26
|
-
@media (max-width: 630px) {
|
|
27
|
-
min-height: 16px;
|
|
28
|
-
padding-top: 0;
|
|
29
|
-
width: 100%;
|
|
30
|
-
}
|
|
12
|
+
const LabelContainer = styled.label `
|
|
13
|
+
display: flex;
|
|
14
|
+
min-height: 56px;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
padding-top: 8px;
|
|
17
|
+
gap: 16px;
|
|
18
|
+
text-overflow: ellipsis;
|
|
19
|
+
font-size: 16px;
|
|
20
|
+
font-style: normal;
|
|
21
|
+
font-weight: 700;
|
|
22
|
+
line-height: 125%;
|
|
23
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
24
|
+
width: 50%;
|
|
25
|
+
align-items: center;
|
|
26
|
+
@media (max-width: 630px) {
|
|
27
|
+
min-height: 16px;
|
|
28
|
+
padding-top: 0;
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
31
|
`;
|
|
32
|
-
const FieldActionContainer = styled.div `
|
|
33
|
-
display: flex;
|
|
34
|
-
width: 100%;
|
|
35
|
-
padding: 8px 0;
|
|
36
|
-
align-items: center;
|
|
37
|
-
@media (max-width: 500px) {
|
|
38
|
-
padding: 0;
|
|
39
|
-
}
|
|
32
|
+
const FieldActionContainer = styled.div `
|
|
33
|
+
display: flex;
|
|
34
|
+
width: 100%;
|
|
35
|
+
padding: 8px 0;
|
|
36
|
+
align-items: center;
|
|
37
|
+
@media (max-width: 500px) {
|
|
38
|
+
padding: 0;
|
|
39
|
+
}
|
|
40
40
|
`;
|
|
41
41
|
export const FieldWrapper = (props) => {
|
|
42
42
|
const { colorPalette, label, children, link, ...htmlProps } = props;
|
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect } from "react";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { FiClock, FiMoreVertical, FiRefreshCw } from "react-icons/fi";
|
|
4
|
-
const MoreHorizonPipe = styled.div `
|
|
5
|
-
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
font-family: Arial;
|
|
10
|
-
font-size: 12px;
|
|
11
|
-
font-style: normal;
|
|
12
|
-
font-weight: 700;
|
|
13
|
-
line-height: normal;
|
|
4
|
+
const MoreHorizonPipe = styled.div `
|
|
5
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
font-family: Arial;
|
|
10
|
+
font-size: 12px;
|
|
11
|
+
font-style: normal;
|
|
12
|
+
font-weight: 700;
|
|
13
|
+
line-height: normal;
|
|
14
14
|
`;
|
|
15
|
-
const MoreHorizonIcon = styled.div `
|
|
16
|
-
position: relative;
|
|
17
|
-
left: ${({ menuOpen }) => (menuOpen ? "95px" : "0px")};
|
|
18
|
-
display: flex;
|
|
15
|
+
const MoreHorizonIcon = styled.div `
|
|
16
|
+
position: relative;
|
|
17
|
+
left: ${({ menuOpen }) => (menuOpen ? "95px" : "0px")};
|
|
18
|
+
display: flex;
|
|
19
19
|
`;
|
|
20
|
-
const MoreHorizonContainer = styled.div `
|
|
21
|
-
display: flex;
|
|
22
|
-
height: 14px;
|
|
23
|
-
width: 16px;
|
|
24
|
-
padding: 12px 8px;
|
|
25
|
-
align-items: center;
|
|
26
|
-
justify-content: center;
|
|
27
|
-
flex-shrink: 0;
|
|
28
|
-
border-radius: 0px 4px 4px 0px;
|
|
29
|
-
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
30
|
-
border-style: solid;
|
|
31
|
-
border-width: 1px;
|
|
32
|
-
background-color: ${({ colorPalette }) => colorPalette.background.primary};
|
|
20
|
+
const MoreHorizonContainer = styled.div `
|
|
21
|
+
display: flex;
|
|
22
|
+
height: 14px;
|
|
23
|
+
width: 16px;
|
|
24
|
+
padding: 12px 8px;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
border-radius: 0px 4px 4px 0px;
|
|
29
|
+
border-color: ${({ colorPalette }) => colorPalette.border.primary};
|
|
30
|
+
border-style: solid;
|
|
31
|
+
border-width: 1px;
|
|
32
|
+
background-color: ${({ colorPalette }) => colorPalette.background.primary};
|
|
33
33
|
`;
|
|
34
|
-
const MoreHorizonOption = styled.div `
|
|
35
|
-
padding: 6px 12px;
|
|
36
|
-
display: flex;
|
|
37
|
-
align-items: center;
|
|
38
|
-
justify-content: center;
|
|
39
|
-
gap: 4px;
|
|
40
|
-
width: 69px;
|
|
41
|
-
height: 21px;
|
|
42
|
-
font-size: 14px;
|
|
43
|
-
font-style: normal;
|
|
44
|
-
font-weight: 700;
|
|
45
|
-
line-height: 150%;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
34
|
+
const MoreHorizonOption = styled.div `
|
|
35
|
+
padding: 6px 12px;
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
gap: 4px;
|
|
40
|
+
width: 69px;
|
|
41
|
+
height: 21px;
|
|
42
|
+
font-size: 14px;
|
|
43
|
+
font-style: normal;
|
|
44
|
+
font-weight: 700;
|
|
45
|
+
line-height: 150%;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
48
48
|
`;
|
|
49
|
-
const MoreHorizonMenu = styled.div `
|
|
50
|
-
display: ${({ menuOpen }) => (menuOpen ? "flex" : "none")};
|
|
51
|
-
position: relative;
|
|
52
|
-
top: ${({ yPosition }) => (yPosition === "down" ? "40px " : "-40px")};
|
|
49
|
+
const MoreHorizonMenu = styled.div `
|
|
50
|
+
display: ${({ menuOpen }) => (menuOpen ? "flex" : "none")};
|
|
51
|
+
position: relative;
|
|
52
|
+
top: ${({ yPosition }) => (yPosition === "down" ? "40px " : "-40px")};
|
|
53
53
|
left: ${({ xPosition }) => xPosition === "center"
|
|
54
54
|
? "-8px !important"
|
|
55
55
|
: xPosition === "right"
|
|
56
56
|
? "70px"
|
|
57
|
-
: "-85px"};
|
|
58
|
-
flex-direction: row;
|
|
59
|
-
background-color: ${({ colorPalette }) => colorPalette.highlight.secondary};
|
|
60
|
-
border-radius: 4px;
|
|
61
|
-
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
|
|
62
|
-
z-index: 1000;
|
|
63
|
-
transform-origin: top left;
|
|
57
|
+
: "-85px"};
|
|
58
|
+
flex-direction: row;
|
|
59
|
+
background-color: ${({ colorPalette }) => colorPalette.highlight.secondary};
|
|
60
|
+
border-radius: 4px;
|
|
61
|
+
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
|
|
62
|
+
z-index: 1000;
|
|
63
|
+
transform-origin: top left;
|
|
64
64
|
`;
|
|
65
65
|
export const MoreHorizonButton = (props) => {
|
|
66
66
|
const { colorPalette, handleToggleHistory, handleRefreshField, ...htmlProps } = props;
|