groundfloor-react-ui 1.2.3 → 1.2.5
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/components/Avatar/AvatarSBfooter.js +1 -3
- package/components/Button/PrimaryButton.js +1 -1
- package/components/Cards/DocumentCard.js +126 -126
- package/components/Cards/index.js +1 -1
- package/components/Content/Content.js +1 -2
- package/components/Content/index.js +1 -1
- package/components/DesignComponent/StyledComponent/StyledComponent.js +1 -21
- package/components/DesignComponent/StyledComponent/index.js +1 -1
- package/components/DesignComponent/index.js +1 -1
- package/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/components/Footer/Footer.js +1 -2
- package/components/Footer/FooterContent.js +1 -3
- package/components/Footer/index.js +2 -1
- package/components/Form/FormComponent.js +6 -4
- package/components/Form/FormWrapper.js +15 -0
- package/components/Form/SubmitComponent.js +1 -1
- package/components/Form/index.js +3 -0
- package/components/GroupButtons/ButtonPopup.js +2 -2
- package/components/GroupButtons/GroupButtons.js +1 -1
- package/components/GroupButtons/index.js +1 -1
- package/components/GroupStatusCircle/GroupStatusCircle.js +1 -1
- package/components/Header/Header.js +2 -2
- package/components/HyperLink/HyperLink.js +2 -2
- package/components/Icon/Icon.js +46 -46
- package/components/Inputs/ColorInput.js +47 -46
- package/components/Inputs/DropdownSelect.js +18 -14
- package/components/Inputs/DropzoneInput.js +1 -1
- package/components/Inputs/NumericInput.js +5 -5
- package/components/Inputs/PasswordInput.js +5 -5
- package/components/Inputs/RadioInput.js +12 -12
- package/components/Inputs/Signature.js +1 -1
- package/components/Inputs/TextInput.js +4 -4
- package/components/Inputs/TimeInput.js +1 -1
- package/components/Label/Label.js +8 -8
- package/components/Loaders/Loader.js +3 -3
- package/components/Modal/ModalComp.js +44 -50
- package/components/Overlay/Overlay.js +2 -2
- package/components/Pagination/Pagination.js +17 -17
- package/components/ProgressSteps/ProgressSteps.js +1 -1
- package/components/SecondaryLink/DarkSecondaryLink.js +1 -1
- package/components/SecondaryLink/LightSecondaryLink.js +1 -1
- package/components/SecondaryLink/index.js +1 -1
- package/components/Sidebar/Sidebar.js +1 -1
- package/components/Sidebar/index.js +1 -1
- package/components/StatusChip/PrimaryStatusChip.js +1 -1
- package/components/StatusChip/SecondaryStatusChip.js +1 -1
- package/components/StatusChip/SlimPrimaryStatusChip.js +1 -1
- package/components/StatusChip/SlimSecondaryStatusChip.js +1 -1
- package/components/StatusCircle/StatusCircle.js +1 -1
- package/components/Tooltip/Tooltip.js +279 -279
- package/components/constants/defaultStyle.js +20 -20
- package/components/constants/defaultThemeColor.js +1 -1
- package/components/global/FontStyle.js +10 -10
- package/dist/index.es.js +305 -309
- package/dist/index.js +253 -257
- package/package.json +1 -1
|
@@ -7,26 +7,6 @@ import defaultThemeColor from '../constants/defaultThemeColor';
|
|
|
7
7
|
import getDefaultStyles from '../constants/utils';
|
|
8
8
|
import { Icon } from '../Icon';
|
|
9
9
|
|
|
10
|
-
const customStyles = {
|
|
11
|
-
overlay: {
|
|
12
|
-
zIndex: '999999',
|
|
13
|
-
backgroundColor: 'rgb(0 0 0 / 30%)'
|
|
14
|
-
},
|
|
15
|
-
content: {
|
|
16
|
-
borderColor: defaultThemeColor.border,
|
|
17
|
-
top: '50%',
|
|
18
|
-
left: '50%',
|
|
19
|
-
right: 'auto',
|
|
20
|
-
bottom: 'auto',
|
|
21
|
-
marginRight: '-50%',
|
|
22
|
-
padding: '0px',
|
|
23
|
-
transform: 'translate(-50%, -50%)',
|
|
24
|
-
minWidth: '40vw',
|
|
25
|
-
maxHeight: '85vh',
|
|
26
|
-
overflow: 'hidden',
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
|
|
30
10
|
const ModalClose = styled.button`
|
|
31
11
|
//Set the styles from the default styles object
|
|
32
12
|
${({ theme, type }) => {
|
|
@@ -35,29 +15,19 @@ const ModalClose = styled.button`
|
|
|
35
15
|
// custom styles
|
|
36
16
|
${({ customModalCloseStyle }) => customModalCloseStyle}
|
|
37
17
|
//Set the styles from the default styles object
|
|
38
|
-
&:focus{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
18
|
+
&:focus {
|
|
19
|
+
outline: none;
|
|
20
|
+
border: none;
|
|
21
|
+
}
|
|
42
22
|
`;
|
|
43
23
|
|
|
44
24
|
const ModalHeader = styled.div`
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
gap: 10px;
|
|
48
|
-
align-items: center;
|
|
49
|
-
}
|
|
50
|
-
.header-description {
|
|
51
|
-
margin-top: 5px;
|
|
52
|
-
}
|
|
53
|
-
h4 {
|
|
54
|
-
margin-bottom: 0;
|
|
55
|
-
}
|
|
25
|
+
margin-top: 10px;
|
|
26
|
+
|
|
56
27
|
// custom styles
|
|
57
28
|
${({ customModalHeaderStyle }) => customModalHeaderStyle}
|
|
58
29
|
`;
|
|
59
30
|
const ModalBody = styled.div`
|
|
60
|
-
|
|
61
31
|
//Set the styles from the default styles object
|
|
62
32
|
${({ theme, type }) => {
|
|
63
33
|
return getDefaultStyles(theme, type);
|
|
@@ -69,7 +39,7 @@ const ModalBody = styled.div`
|
|
|
69
39
|
const ContentWrapper = styled.div`
|
|
70
40
|
max-height: 60vh;
|
|
71
41
|
overflow-y: auto;
|
|
72
|
-
|
|
42
|
+
`;
|
|
73
43
|
|
|
74
44
|
const ModalFooter = styled.div`
|
|
75
45
|
//Set the styles from the default styles object
|
|
@@ -81,27 +51,23 @@ const ModalFooter = styled.div`
|
|
|
81
51
|
`;
|
|
82
52
|
|
|
83
53
|
const CommonDiv = styled.div`
|
|
84
|
-
|
|
54
|
+
padding: 0.5rem 3rem 0rem 3rem;
|
|
85
55
|
`;
|
|
86
56
|
|
|
87
57
|
const HeaderWrapper = styled.div`
|
|
88
58
|
position: sticky;
|
|
89
|
-
background-color: ${({ theme }) => theme.bgColor};
|
|
90
|
-
width: 100%;
|
|
59
|
+
background-color: ${({ theme }) => theme.bgColor};
|
|
60
|
+
width: 100%;
|
|
91
61
|
top: 0px;
|
|
92
|
-
border-bottom: 1px solid
|
|
93
|
-
|
|
94
|
-
`
|
|
95
|
-
|
|
62
|
+
border-bottom: 1px solid ${({ theme }) => theme.border};
|
|
63
|
+
`;
|
|
96
64
|
|
|
97
65
|
try {
|
|
98
|
-
Modal.setAppElement('#root')
|
|
99
|
-
|
|
66
|
+
Modal.setAppElement('#root');
|
|
100
67
|
} catch (error) {
|
|
101
|
-
Modal.setAppElement('#__next')
|
|
68
|
+
Modal.setAppElement('#__next');
|
|
102
69
|
}
|
|
103
70
|
|
|
104
|
-
|
|
105
71
|
export const ModalComp = ({
|
|
106
72
|
modalIsOpen,
|
|
107
73
|
toggleModal,
|
|
@@ -113,10 +79,35 @@ export const ModalComp = ({
|
|
|
113
79
|
customModalHeaderStyle,
|
|
114
80
|
customModalBodyStyle,
|
|
115
81
|
customModalFooterStyle,
|
|
82
|
+
customWidth,
|
|
83
|
+
customMinWidth,
|
|
84
|
+
customMaxWidth,
|
|
116
85
|
...props
|
|
117
86
|
}) => {
|
|
118
87
|
const activeTheme = useTheme() || defaultThemeColor;
|
|
119
88
|
|
|
89
|
+
const customStyles = {
|
|
90
|
+
overlay: {
|
|
91
|
+
zIndex: '999999',
|
|
92
|
+
backgroundColor: 'rgb(0 0 0 / 30%)',
|
|
93
|
+
},
|
|
94
|
+
content: {
|
|
95
|
+
borderColor: defaultThemeColor.border,
|
|
96
|
+
top: '50%',
|
|
97
|
+
left: '50%',
|
|
98
|
+
right: 'auto',
|
|
99
|
+
bottom: 'auto',
|
|
100
|
+
marginRight: '-50%',
|
|
101
|
+
padding: '0px',
|
|
102
|
+
transform: 'translate(-50%, -50%)',
|
|
103
|
+
minWidth: customMinWidth,
|
|
104
|
+
maxHeight: '85vh',
|
|
105
|
+
overflow: 'hidden',
|
|
106
|
+
width: customWidth && customWidth,
|
|
107
|
+
maxWidth: customMaxWidth && customMaxWidth,
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
|
|
120
111
|
return (
|
|
121
112
|
<Modal
|
|
122
113
|
isOpen={modalIsOpen}
|
|
@@ -149,8 +140,7 @@ export const ModalComp = ({
|
|
|
149
140
|
type={'modalComp-modal-body'}
|
|
150
141
|
style={customModalBodyStyle}
|
|
151
142
|
>
|
|
152
|
-
<CommonDiv>
|
|
153
|
-
</CommonDiv>
|
|
143
|
+
<CommonDiv> {bodyContent}</CommonDiv>
|
|
154
144
|
</ModalBody>
|
|
155
145
|
|
|
156
146
|
<ModalFooter
|
|
@@ -206,6 +196,7 @@ ModalComp.propTypes = {
|
|
|
206
196
|
* Modal Footer custom styles
|
|
207
197
|
*/
|
|
208
198
|
customModalFooterStyle: PropTypes.object,
|
|
199
|
+
customMinWidth: PropTypes.string,
|
|
209
200
|
};
|
|
210
201
|
|
|
211
202
|
ModalComp.defaultProps = {
|
|
@@ -219,4 +210,7 @@ ModalComp.defaultProps = {
|
|
|
219
210
|
customModalHeaderStyle: {},
|
|
220
211
|
customModalBodyStyle: {},
|
|
221
212
|
customModalFooterStyle: {},
|
|
213
|
+
customMinWidth: '40vw',
|
|
214
|
+
customWidth: '',
|
|
215
|
+
customMaxWidth: '',
|
|
222
216
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { usePopperTooltip } from 'react-popper-tooltip';
|
|
3
4
|
import styled from 'styled-components';
|
|
4
5
|
import defaultStyles from '../constants/defaultStyle';
|
|
5
|
-
import { usePopperTooltip } from 'react-popper-tooltip';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Primary UI component for user interaction
|
|
@@ -10,24 +10,24 @@ const StyledPagination = styled.div`
|
|
|
10
10
|
`;
|
|
11
11
|
|
|
12
12
|
export const Pagination = ({ ...props }) => {
|
|
13
|
-
|
|
13
|
+
const activeTheme = useTheme() || defaultThemeColor;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
return (
|
|
16
|
+
<StyledPagination theme={activeTheme}>{props.children}</StyledPagination>
|
|
17
|
+
);
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const Item = styled.div`
|
|
21
21
|
font-size: 14px;
|
|
22
22
|
color: ${({ selected, theme }) =>
|
|
23
|
-
|
|
23
|
+
selected ? theme.variant['primary-1'] : null};
|
|
24
24
|
|
|
25
25
|
svg {
|
|
26
26
|
width: 14px;
|
|
27
27
|
height: 14px;
|
|
28
28
|
path {
|
|
29
29
|
fill: ${({ selected, theme }) =>
|
|
30
|
-
|
|
30
|
+
selected ? theme.variant['primary-1'] : theme.variant['neutral-2']};
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -38,22 +38,22 @@ const Item = styled.div`
|
|
|
38
38
|
`;
|
|
39
39
|
|
|
40
40
|
Pagination.PageItem = function PageItem({ selected, ...props }) {
|
|
41
|
-
|
|
41
|
+
const activeTheme = useTheme() || defaultThemeColor;
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
return (
|
|
44
|
+
<Item selected={selected} theme={activeTheme} {...props}>
|
|
45
|
+
{props.children}
|
|
46
|
+
</Item>
|
|
47
|
+
);
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
Pagination.PageItem.propTypes = {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Is Page selected?
|
|
53
|
+
*/
|
|
54
|
+
selected: PropTypes.bool,
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
Pagination.PageItem.defaultProps = {
|
|
58
|
-
|
|
58
|
+
selected: false,
|
|
59
59
|
};
|