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.
Files changed (56) hide show
  1. package/components/Avatar/AvatarSBfooter.js +1 -3
  2. package/components/Button/PrimaryButton.js +1 -1
  3. package/components/Cards/DocumentCard.js +126 -126
  4. package/components/Cards/index.js +1 -1
  5. package/components/Content/Content.js +1 -2
  6. package/components/Content/index.js +1 -1
  7. package/components/DesignComponent/StyledComponent/StyledComponent.js +1 -21
  8. package/components/DesignComponent/StyledComponent/index.js +1 -1
  9. package/components/DesignComponent/index.js +1 -1
  10. package/components/ErrorBoundary/ErrorBoundary.js +1 -1
  11. package/components/Footer/Footer.js +1 -2
  12. package/components/Footer/FooterContent.js +1 -3
  13. package/components/Footer/index.js +2 -1
  14. package/components/Form/FormComponent.js +6 -4
  15. package/components/Form/FormWrapper.js +15 -0
  16. package/components/Form/SubmitComponent.js +1 -1
  17. package/components/Form/index.js +3 -0
  18. package/components/GroupButtons/ButtonPopup.js +2 -2
  19. package/components/GroupButtons/GroupButtons.js +1 -1
  20. package/components/GroupButtons/index.js +1 -1
  21. package/components/GroupStatusCircle/GroupStatusCircle.js +1 -1
  22. package/components/Header/Header.js +2 -2
  23. package/components/HyperLink/HyperLink.js +2 -2
  24. package/components/Icon/Icon.js +46 -46
  25. package/components/Inputs/ColorInput.js +47 -46
  26. package/components/Inputs/DropdownSelect.js +18 -14
  27. package/components/Inputs/DropzoneInput.js +1 -1
  28. package/components/Inputs/NumericInput.js +5 -5
  29. package/components/Inputs/PasswordInput.js +5 -5
  30. package/components/Inputs/RadioInput.js +12 -12
  31. package/components/Inputs/Signature.js +1 -1
  32. package/components/Inputs/TextInput.js +4 -4
  33. package/components/Inputs/TimeInput.js +1 -1
  34. package/components/Label/Label.js +8 -8
  35. package/components/Loaders/Loader.js +3 -3
  36. package/components/Modal/ModalComp.js +44 -50
  37. package/components/Overlay/Overlay.js +2 -2
  38. package/components/Pagination/Pagination.js +17 -17
  39. package/components/ProgressSteps/ProgressSteps.js +1 -1
  40. package/components/SecondaryLink/DarkSecondaryLink.js +1 -1
  41. package/components/SecondaryLink/LightSecondaryLink.js +1 -1
  42. package/components/SecondaryLink/index.js +1 -1
  43. package/components/Sidebar/Sidebar.js +1 -1
  44. package/components/Sidebar/index.js +1 -1
  45. package/components/StatusChip/PrimaryStatusChip.js +1 -1
  46. package/components/StatusChip/SecondaryStatusChip.js +1 -1
  47. package/components/StatusChip/SlimPrimaryStatusChip.js +1 -1
  48. package/components/StatusChip/SlimSecondaryStatusChip.js +1 -1
  49. package/components/StatusCircle/StatusCircle.js +1 -1
  50. package/components/Tooltip/Tooltip.js +279 -279
  51. package/components/constants/defaultStyle.js +20 -20
  52. package/components/constants/defaultThemeColor.js +1 -1
  53. package/components/global/FontStyle.js +10 -10
  54. package/dist/index.es.js +305 -309
  55. package/dist/index.js +253 -257
  56. package/package.json +1 -1
@@ -1,7 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
-
3
2
  import React, { useState } from "react";
4
-
5
3
  import styled, { css, useTheme } from 'styled-components';
6
4
  import defaultStyles from '../constants/defaultStyle';
7
5
  import defaultThemeColor from '../constants/defaultThemeColor';
@@ -264,7 +262,7 @@ AvatarSBfooter.defaultProps = {
264
262
  /**
265
263
  * inBuiltCss object
266
264
  */
267
- inBuiltCss: PropTypes.object,
265
+ inBuiltCss: PropTypes.object,
268
266
  };
269
267
 
270
268
  AvatarSBfooter.defaultProps = {
@@ -147,7 +147,7 @@ PrimaryButton.propTypes = {
147
147
  * id of the primaryBtn
148
148
  */
149
149
  id: PropTypes.string,
150
-
150
+
151
151
  };
152
152
 
153
153
  StyledButton.defaultProps = {
@@ -8,44 +8,44 @@ import defaultThemeColor from '../constants/defaultThemeColor';
8
8
  */
9
9
 
10
10
  const sizes = {
11
- sm: {
12
- cardWidth: '178px',
13
- cardMinHeight: '88px',
14
- borderRadius: '4px',
15
- border: '0.7px',
16
- bodyHeight: '55px',
17
- footerFontSize: '10px',
18
- footerMinHeight: '31px',
19
- footerPadding: '10.5px 16px',
20
- footerLineHeight: '16px',
21
- lineHeight: '12px',
22
- },
23
- md: {
24
- cardWidth: '215px',
25
- cardMinHeight: '123px',
26
- borderRadius: '6px',
27
- border: '1px',
28
- bodyHeight: '67px',
29
- footerFontSize: '14px',
30
- footerMinHeight: '54px',
31
- footerPadding: '18px 19px',
32
- footerLineHeight: '12px',
33
- lineHeight: '16px',
34
- },
11
+ sm: {
12
+ cardWidth: '178px',
13
+ cardMinHeight: '88px',
14
+ borderRadius: '4px',
15
+ border: '0.7px',
16
+ bodyHeight: '55px',
17
+ footerFontSize: '10px',
18
+ footerMinHeight: '31px',
19
+ footerPadding: '10.5px 16px',
20
+ footerLineHeight: '16px',
21
+ lineHeight: '12px',
22
+ },
23
+ md: {
24
+ cardWidth: '215px',
25
+ cardMinHeight: '123px',
26
+ borderRadius: '6px',
27
+ border: '1px',
28
+ bodyHeight: '67px',
29
+ footerFontSize: '14px',
30
+ footerMinHeight: '54px',
31
+ footerPadding: '18px 19px',
32
+ footerLineHeight: '12px',
33
+ lineHeight: '16px',
34
+ },
35
35
  };
36
36
 
37
37
  const StyledDocumentCard = styled.div`
38
38
  ${({ trimFileName }) => {
39
- if (trimFileName) {
40
- return css`
39
+ if (trimFileName) {
40
+ return css`
41
41
  height: ${({ size }) => sizes[size].cardMinHeight};
42
42
  `;
43
- } else {
44
- return css`
43
+ } else {
44
+ return css`
45
45
  min-height: ${({ size }) => sizes[size].cardMinHeight};
46
46
  `;
47
- }
48
- }}
47
+ }
48
+ }}
49
49
  width: ${({ size }) => sizes[size].cardWidth};
50
50
  border-radius: ${({ size }) => sizes[size].borderRadius};
51
51
  border: ${({ size }) => sizes[size].border} solid
@@ -66,7 +66,7 @@ const StyledDocumentCard = styled.div`
66
66
  const StyledCardBody = styled.div`
67
67
  display: flex;
68
68
  justify-content: ${({ buttons }) =>
69
- buttons !== '11' ? 'center' : 'space-between'};
69
+ buttons !== '11' ? 'center' : 'space-between'};
70
70
  align-items: center;
71
71
  height: ${({ size }) => sizes[size].bodyHeight};
72
72
  margin: 0;
@@ -75,7 +75,7 @@ const StyledCardBody = styled.div`
75
75
  border-top-left-radius: ${({ size }) => sizes[size].borderRadius};
76
76
  border-top-right-radius: ${({ size }) => sizes[size].borderRadius};
77
77
  background-color: ${({ theme, variantBgBody }) =>
78
- theme.variant[variantBgBody]};
78
+ theme.variant[variantBgBody]};
79
79
  background: linear-gradient(
80
80
  0deg,
81
81
  rgba(226, 230, 245, 0.5),
@@ -88,128 +88,128 @@ const StyledCardBody = styled.div`
88
88
 
89
89
  const StyledCardFooter = styled.div`
90
90
  ${({ trimFileName }) => {
91
- if (trimFileName) {
92
- return css`
91
+ if (trimFileName) {
92
+ return css`
93
93
  white-space: nowrap;
94
94
  overflow: hidden;
95
95
  text-overflow: ellipsis;
96
96
  height: ${({ size }) => sizes[size].footerMinHeight};
97
97
  `;
98
- } else {
99
- return css`
98
+ } else {
99
+ return css`
100
100
  display: flex;
101
101
  align-items: center;
102
102
  min-height: ${({ size }) => sizes[size].footerMinHeight};
103
103
  overflow-wrap: anywhere;
104
104
  hyphens: auto;
105
105
  `;
106
- }
107
- }}
106
+ }
107
+ }}
108
108
  font-size: ${({ size }) => sizes[size].footerFontSize};
109
109
  padding: ${({ size }) => sizes[size].footerPadding};
110
110
  color: ${({ theme, variant }) => theme.variant[variant]};
111
111
  background-color: ${({ theme, variantBgFooter }) =>
112
- variantBgFooter ? theme.variant[variantBgFooter] : theme['bgColor']};
112
+ variantBgFooter ? theme.variant[variantBgFooter] : theme['bgColor']};
113
113
  box-sizing: border-box;
114
114
  line-height: ${({ size }) => sizes[size].lineHeight};
115
115
  border-bottom-left-radius: inherit;
116
116
  border-bottom-right-radius: inherit;
117
117
  `;
118
118
  export const DocumentCard = ({
119
- variant,
120
- variantBorder,
121
- variantBorderHover,
122
- variantBgBody,
123
- variantBgFooter,
124
- fileName,
125
- bgUrl,
126
- size,
127
- trimFileName,
128
- bodyContent,
129
- ...props
119
+ variant,
120
+ variantBorder,
121
+ variantBorderHover,
122
+ variantBgBody,
123
+ variantBgFooter,
124
+ fileName,
125
+ bgUrl,
126
+ size,
127
+ trimFileName,
128
+ bodyContent,
129
+ ...props
130
130
  }) => {
131
- const activeTheme = useTheme() || defaultThemeColor;
131
+ const activeTheme = useTheme() || defaultThemeColor;
132
132
 
133
- return (
134
- <StyledDocumentCard
135
- variantBorder={variantBorder}
136
- variantBorderHover={variantBorderHover}
137
- variantBgBody={variantBgBody}
138
- size={size}
139
- trimFileName={trimFileName}
140
- theme={activeTheme}
141
- {...props}
142
- >
143
- <StyledCardBody bgUrl={bgUrl} size={size} theme={activeTheme}>
144
- {bodyContent}
145
- </StyledCardBody>
146
- <StyledCardFooter
147
- theme={activeTheme}
148
- title={fileName}
149
- variant={variant}
150
- variantBgFooter={variantBgFooter}
151
- trimFileName={trimFileName}
152
- size={size}
153
- >
154
- {fileName}
155
- </StyledCardFooter>
156
- </StyledDocumentCard>
157
- );
133
+ return (
134
+ <StyledDocumentCard
135
+ variantBorder={variantBorder}
136
+ variantBorderHover={variantBorderHover}
137
+ variantBgBody={variantBgBody}
138
+ size={size}
139
+ trimFileName={trimFileName}
140
+ theme={activeTheme}
141
+ {...props}
142
+ >
143
+ <StyledCardBody bgUrl={bgUrl} size={size} theme={activeTheme}>
144
+ {bodyContent}
145
+ </StyledCardBody>
146
+ <StyledCardFooter
147
+ theme={activeTheme}
148
+ title={fileName}
149
+ variant={variant}
150
+ variantBgFooter={variantBgFooter}
151
+ trimFileName={trimFileName}
152
+ size={size}
153
+ >
154
+ {fileName}
155
+ </StyledCardFooter>
156
+ </StyledDocumentCard>
157
+ );
158
158
  };
159
159
 
160
160
  DocumentCard.propTypes = {
161
- /**
162
- * Color of Footer text. primary-1, 2, error, etc.
163
- */
164
- variant: PropTypes.string,
165
- /**
166
- * Color of DocumentCard border. primary-1, 2, error, etc.
167
- */
168
- variantBorder: PropTypes.string,
169
- /**
170
- * Color of DocumentCard border on hover. primary-1, 2, error, etc.
171
- */
172
- variantBorderHover: PropTypes.string,
173
- /**
174
- * Color of Body background. primary-1, 2, error, etc.
175
- */
176
- variantBgBody: PropTypes.string,
177
- /**
178
- * Color of Footer background. primary-1, 2, error, etc.
179
- */
180
- variantBgFooter: PropTypes.string,
181
- /**
182
- * String to display in the footer
183
- */
184
- fileName: PropTypes.string,
185
- /**
186
- * Url of the picture to display as card body background
187
- */
188
- bgUrl: PropTypes.string,
189
- /**
190
- * Size of the card small or medium
191
- */
192
- size: PropTypes.oneOf(['sm', 'md']),
193
- /**
194
- * If true if the fimeName is longer than the width is trimmed. If false the fileName is wrapped and the footer expands vertically
195
- */
196
- trimFileName: PropTypes.bool,
161
+ /**
162
+ * Color of Footer text. primary-1, 2, error, etc.
163
+ */
164
+ variant: PropTypes.string,
165
+ /**
166
+ * Color of DocumentCard border. primary-1, 2, error, etc.
167
+ */
168
+ variantBorder: PropTypes.string,
169
+ /**
170
+ * Color of DocumentCard border on hover. primary-1, 2, error, etc.
171
+ */
172
+ variantBorderHover: PropTypes.string,
173
+ /**
174
+ * Color of Body background. primary-1, 2, error, etc.
175
+ */
176
+ variantBgBody: PropTypes.string,
177
+ /**
178
+ * Color of Footer background. primary-1, 2, error, etc.
179
+ */
180
+ variantBgFooter: PropTypes.string,
181
+ /**
182
+ * String to display in the footer
183
+ */
184
+ fileName: PropTypes.string,
185
+ /**
186
+ * Url of the picture to display as card body background
187
+ */
188
+ bgUrl: PropTypes.string,
189
+ /**
190
+ * Size of the card small or medium
191
+ */
192
+ size: PropTypes.oneOf(['sm', 'md']),
193
+ /**
194
+ * If true if the fimeName is longer than the width is trimmed. If false the fileName is wrapped and the footer expands vertically
195
+ */
196
+ trimFileName: PropTypes.bool,
197
197
 
198
- /**
199
- * Children component of the Card Body
200
- */
201
- bodyContent: PropTypes.element,
198
+ /**
199
+ * Children component of the Card Body
200
+ */
201
+ bodyContent: PropTypes.element,
202
202
  };
203
203
 
204
204
  DocumentCard.defaultProps = {
205
- variant: 'black',
206
- variantBorder: 'neutral-5',
207
- variantBorderHover: 'primary-1',
208
- variantBgBody: 'neutral-4',
209
- variantBgFooter: null,
210
- fileName: '',
211
- bgUrl: null,
212
- size: 'md',
213
- trimFileName: true,
214
- bodyContent: null,
205
+ variant: 'black',
206
+ variantBorder: 'neutral-5',
207
+ variantBorderHover: 'primary-1',
208
+ variantBgBody: 'neutral-4',
209
+ variantBgFooter: null,
210
+ fileName: '',
211
+ bgUrl: null,
212
+ size: 'md',
213
+ trimFileName: true,
214
+ bodyContent: null,
215
215
  };
@@ -1,5 +1,5 @@
1
1
 
2
- export * from './DocumentCard';
3
2
  export * from './Card';
4
3
  export * from './CardRef';
4
+ export * from './DocumentCard';
5
5
 
@@ -1,9 +1,8 @@
1
- import React from 'react';
2
1
  import PropTypes from 'prop-types';
2
+ import React from 'react';
3
3
  import styled from 'styled-components';
4
4
  import defaultStyles from '../constants/defaultStyle';
5
5
  import getDefaultStyles from '../constants/utils';
6
- // import './../../../App.css'
7
6
 
8
7
  const ContentLayout = styled.div`
9
8
  //Set the styles from the default styles object
@@ -1 +1 @@
1
- export * from './Content';
1
+ export * from './Content';
@@ -309,24 +309,4 @@ export const MultiColumnDiv = styled.div`
309
309
  max-width: 48%;
310
310
  min-width: 48%;
311
311
 
312
- `;
313
-
314
-
315
-
316
-
317
- export const FormWrapper = ({ customStyles }) => {
318
-
319
- const Wrapper = styled.form`
320
- width: 40vw;
321
- display: flex;
322
- justify-content: center;
323
- flex-direction: column;
324
- gap: 20px;
325
- ${({ customStyles }) => customStyles}
326
- `;
327
- return (
328
- <Wrapper customStyles={customStyles}>
329
- </Wrapper>
330
- );
331
- };
332
-
312
+ `;
@@ -1 +1 @@
1
- export * from './StyledComponent';
1
+ export * from './StyledComponent';
@@ -1 +1 @@
1
- export * from './StyledComponent';
1
+ export * from './StyledComponent';
@@ -1,5 +1,5 @@
1
- import React, { Component, Fragment } from 'react';
2
1
  import PropTypes from "prop-types";
2
+ import React, { Component, Fragment } from 'react';
3
3
  import { PrimaryButton } from '../Button';
4
4
 
5
5
  export class ErrorBoundary extends Component {
@@ -1,9 +1,8 @@
1
- import React, { forwardRef } from 'react';
2
1
  import PropTypes from 'prop-types';
2
+ import React, { forwardRef } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import defaultStyles from '../constants/defaultStyle';
5
5
  import getDefaultStyles from '../constants/utils';
6
- // import { FooterContext } from '../../../routes/Level2';
7
6
 
8
7
  /**
9
8
  * Primary UI component for user interaction
@@ -1,7 +1,5 @@
1
- import React, { useContext } from 'react';
1
+ import React from 'react';
2
2
  import styled, { css } from 'styled-components';
3
- import defaultThemeColor from '../constants/defaultThemeColor';
4
- // import { FooterContext } from '../../../routes/Level2'
5
3
 
6
4
  const StyledOutsideContainer = styled.div`
7
5
  font-size: 14px;
@@ -1,2 +1,3 @@
1
1
  export * from './Footer';
2
- export * from './FooterContent'
2
+ export * from './FooterContent';
3
+
@@ -3,7 +3,7 @@ import { PrimaryButton, SecondaryButton, TinyButton } from '../Button';
3
3
  import defaultThemeColor from '../constants/defaultThemeColor';
4
4
  import {
5
5
  FormContainer,
6
- FormWrapper, MultiColumnDiv, MultiColumnWrapper
6
+ MultiColumnDiv, MultiColumnWrapper
7
7
  } from '../DesignComponent';
8
8
  import { Header } from '../Header';
9
9
  import {
@@ -23,9 +23,11 @@ import {
23
23
  import { Label } from '../Label';
24
24
  import { Rating } from '../Rating';
25
25
  import { Table } from '../Tables';
26
+ import { FormWrapper } from './FormWrapper';
26
27
  import { HeaderComponent } from './HeaderComponent';
27
28
 
28
- export const FormComponent = ({ formData, ...props }) => {
29
+
30
+ export const FormComponent = ({ formData, customStyles, ...props }) => {
29
31
  const header = (item) => {
30
32
  return (
31
33
  <Fragment>
@@ -211,8 +213,8 @@ export const FormComponent = ({ formData, ...props }) => {
211
213
 
212
214
  return (
213
215
  <Fragment>
214
- <FormContainer defaultThemeColor={defaultThemeColor} >
215
- <FormWrapper onSubmit={handleSubmit} >
216
+ <FormContainer defaultThemeColor={defaultThemeColor}>
217
+ <FormWrapper onSubmit={handleSubmit} customStyles={customStyles} >
216
218
  {formData.map((row, i) => {
217
219
  if (row.length > 1) {
218
220
  return (
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ const Wrapper = styled.form`
5
+ width: 40vw;
6
+ display: flex;
7
+ justify-content: center;
8
+ flex-direction: column;
9
+ gap: 20px;
10
+ ${({ customStyles }) => customStyles}
11
+ `;
12
+
13
+ export const FormWrapper = ({ customStyles }) => {
14
+ return <Wrapper customStyles={customStyles}></Wrapper>;
15
+ };
@@ -1,4 +1,4 @@
1
- import React, { Fragment, useState } from 'react'
1
+ import React, { Fragment } from 'react';
2
2
  import { PrimaryButton, SecondaryButton } from '../Button';
3
3
  import { SubmitButtonContainer } from '../DesignComponent';
4
4
 
@@ -1,3 +1,6 @@
1
1
  export * from './FormComponent';
2
+ export * from './FormWrapper';
2
3
  export * from './HeaderComponent';
3
4
  export * from './SubmitComponent';
5
+
6
+
@@ -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, { useTheme } from 'styled-components';
4
5
  import defaultThemeColor from '../constants/defaultThemeColor';
5
- import { usePopperTooltip } from 'react-popper-tooltip';
6
6
 
7
7
  /**
8
8
  * Primary UI component for user interaction
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import PropTypes from 'prop-types';
2
+ import React from 'react';
3
3
  import styled, { useTheme } from 'styled-components';
4
4
  import defaultThemeColor from '../constants/defaultThemeColor';
5
5
 
@@ -1,3 +1,3 @@
1
+ export * from './ButtonPopup';
1
2
  export * from './GroupButtons';
2
3
  export * from './GroupButtonsPopup';
3
- export * from './ButtonPopup';
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import PropTypes from 'prop-types';
2
+ import React from 'react';
3
3
  import styled, { useTheme } from 'styled-components';
4
4
  import defaultThemeColor from '../constants/defaultThemeColor';
5
5
  import { StatusCircle } from '../StatusCircle';
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import PropTypes from 'prop-types';
2
+ import React from 'react';
3
3
  import styled from 'styled-components';
4
4
  import defaultStyles from '../constants/defaultStyle';
5
5
  import getDefaultStyles from '../constants/utils';
@@ -11,7 +11,7 @@ import getDefaultStyles from '../constants/utils';
11
11
  const StyledHeader = styled.header`
12
12
  //Set the styles from the default styles object
13
13
  ${({ theme, type }) => {
14
- return getDefaultStyles(theme,type);
14
+ return getDefaultStyles(theme, type);
15
15
  }}
16
16
  // custom styles
17
17
  ${({ customStyles }) => customStyles}
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
1
  import PropTypes from 'prop-types';
3
- import styled, { useTheme, css } from 'styled-components';
2
+ import React from 'react';
3
+ import styled, { css, useTheme } from 'styled-components';
4
4
  import defaultThemeColor from '../constants/defaultThemeColor';
5
5
 
6
6
  /**