groundfloor-react-ui 1.0.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.
Files changed (185) hide show
  1. package/README.md +20 -0
  2. package/assets/fonts/Averta/Averta-Black.woff2 +0 -0
  3. package/assets/fonts/Averta/Averta-BlackItalic.woff2 +0 -0
  4. package/assets/fonts/Averta/Averta-Bold.woff2 +0 -0
  5. package/assets/fonts/Averta/Averta-BoldItalic.woff2 +0 -0
  6. package/assets/fonts/Averta/Averta-ExtraBold.woff2 +0 -0
  7. package/assets/fonts/Averta/Averta-ExtraBoldItalic.woff2 +0 -0
  8. package/assets/fonts/Averta/Averta-ExtraThin.woff2 +0 -0
  9. package/assets/fonts/Averta/Averta-ExtraThinItalic.woff2 +0 -0
  10. package/assets/fonts/Averta/Averta-Light.woff2 +0 -0
  11. package/assets/fonts/Averta/Averta-LightItalic.woff2 +0 -0
  12. package/assets/fonts/Averta/Averta-Regular.woff2 +0 -0
  13. package/assets/fonts/Averta/Averta-RegularItalic.woff2 +0 -0
  14. package/assets/fonts/Averta/Averta-SemiBold.woff2 +0 -0
  15. package/assets/fonts/Averta/Averta-SemiBoldItalic.woff2 +0 -0
  16. package/assets/fonts/Averta/Averta-Thin.woff2 +0 -0
  17. package/assets/fonts/Averta/Averta-ThinItalic.woff2 +0 -0
  18. package/assets/fonts/Beauty/BeautyDemo.woff +0 -0
  19. package/assets/icons/app-logo.svg +3 -0
  20. package/assets/icons/arrow-down.svg +3 -0
  21. package/assets/icons/arrow-rotate.svg +1 -0
  22. package/assets/icons/arrow-up.svg +3 -0
  23. package/assets/icons/bell.svg +3 -0
  24. package/assets/icons/check.svg +3 -0
  25. package/assets/icons/checkmark.svg +3 -0
  26. package/assets/icons/chevron-down.svg +3 -0
  27. package/assets/icons/chevron-left.svg +3 -0
  28. package/assets/icons/chevron-right.svg +3 -0
  29. package/assets/icons/cloud-icon.svg +3 -0
  30. package/assets/icons/connection.svg +3 -0
  31. package/assets/icons/cross-icon.svg +3 -0
  32. package/assets/icons/door-internal-active.svg +1 -0
  33. package/assets/icons/edit-icon.svg +3 -0
  34. package/assets/icons/ellipses-horizontal.svg +3 -0
  35. package/assets/icons/ellipses.svg +3 -0
  36. package/assets/icons/email.svg +3 -0
  37. package/assets/icons/eye-hide-view.svg +1 -0
  38. package/assets/icons/eye-hide.svg +1 -0
  39. package/assets/icons/file-attach-white.svg +3 -0
  40. package/assets/icons/file-attach.svg +3 -0
  41. package/assets/icons/functional-equation-regular.svg +147 -0
  42. package/assets/icons/hamburger-menu.svg +3 -0
  43. package/assets/icons/heart.svg +18 -0
  44. package/assets/icons/image.svg +3 -0
  45. package/assets/icons/info.svg +3 -0
  46. package/assets/icons/jpg-icon.svg +3 -0
  47. package/assets/icons/magnifier.svg +3 -0
  48. package/assets/icons/menu-ellipse-two.svg +1 -0
  49. package/assets/icons/menu-ellipse.svg +53 -0
  50. package/assets/icons/pause-all.svg +1 -0
  51. package/assets/icons/pdf-icon.svg +3 -0
  52. package/assets/icons/pen-icon.svg +3 -0
  53. package/assets/icons/plus-outlined.svg +3 -0
  54. package/assets/icons/resume.svg +1 -0
  55. package/assets/icons/sign-icon.svg +3 -0
  56. package/assets/icons/star.svg +3 -0
  57. package/assets/icons/trash-icon.svg +59 -0
  58. package/assets/icons/triangle-down.svg +3 -0
  59. package/assets/icons/users.svg +11 -0
  60. package/assets/icons/view.svg +3 -0
  61. package/assets/icons/watcher.svg +3 -0
  62. package/assets/icons/zoom-in-white.svg +1 -0
  63. package/assets/styles/global.css +0 -0
  64. package/assets/styles/global.scss +0 -0
  65. package/components/Accordion/Accordion.js +114 -0
  66. package/components/Accordion/AccordionSB.js +168 -0
  67. package/components/Accordion/AccordionSBfooter.js +171 -0
  68. package/components/Accordion/index.js +4 -0
  69. package/components/ArrowBar/ArrowBar.js +293 -0
  70. package/components/ArrowBar/index.js +2 -0
  71. package/components/Avatar/Avatar.js +167 -0
  72. package/components/Avatar/AvatarSB.js +226 -0
  73. package/components/Avatar/AvatarSBfooter.js +226 -0
  74. package/components/Avatar/index.js +4 -0
  75. package/components/Banner/Banner.js +65 -0
  76. package/components/Banner/index.js +2 -0
  77. package/components/Breadcrumb/Breadcrumb.js +192 -0
  78. package/components/Breadcrumb/index.js +2 -0
  79. package/components/Button/PrimaryButton.js +125 -0
  80. package/components/Button/SecondaryButton.js +114 -0
  81. package/components/Button/TinyButton.js +94 -0
  82. package/components/Button/index.js +6 -0
  83. package/components/Cards/Card.js +48 -0
  84. package/components/Cards/CardRef.js +64 -0
  85. package/components/Cards/DocumentCard.js +221 -0
  86. package/components/Cards/index.js +5 -0
  87. package/components/Content/Content.js +51 -0
  88. package/components/Content/index.js +1 -0
  89. package/components/Divider/Divider.js +63 -0
  90. package/components/Divider/index.js +2 -0
  91. package/components/Drawer/Drawer.js +93 -0
  92. package/components/Drawer/index.js +2 -0
  93. package/components/ErrorBoundary/ErrorBoundary.js +44 -0
  94. package/components/ErrorBoundary/index.js +1 -0
  95. package/components/FilterChip/FilterChip.js +68 -0
  96. package/components/FilterChip/index.js +1 -0
  97. package/components/Footer/Footer.js +58 -0
  98. package/components/Footer/FooterContentLev3.js +96 -0
  99. package/components/Footer/index.js +2 -0
  100. package/components/Form/FormComponent.js +273 -0
  101. package/components/Form/HeaderComponent.js +39 -0
  102. package/components/Form/StyledComponent.js +323 -0
  103. package/components/Form/SubmitComponent.js +63 -0
  104. package/components/Form/index.js +4 -0
  105. package/components/GroupAvatars/GroupAvatars.js +143 -0
  106. package/components/GroupAvatars/index.js +1 -0
  107. package/components/GroupButtons/ButtonPopup.js +192 -0
  108. package/components/GroupButtons/GroupButtons.js +150 -0
  109. package/components/GroupButtons/GroupButtonsPopup.js +169 -0
  110. package/components/GroupButtons/index.js +3 -0
  111. package/components/GroupStatusCircle/GroupStatusCircle.js +135 -0
  112. package/components/GroupStatusCircle/index.js +1 -0
  113. package/components/Header/Header.js +58 -0
  114. package/components/Header/index.js +1 -0
  115. package/components/HyperLink/HyperLink.js +114 -0
  116. package/components/HyperLink/index.js +1 -0
  117. package/components/Icon/Icon.js +161 -0
  118. package/components/Icon/index.js +1 -0
  119. package/components/Images/Image.js +112 -0
  120. package/components/Images/index.js +2 -0
  121. package/components/Inputs/CheckBoxEditableInput.js +352 -0
  122. package/components/Inputs/CheckBoxInput.js +195 -0
  123. package/components/Inputs/CheckBoxInputMS.js +160 -0
  124. package/components/Inputs/DateSelect.js +411 -0
  125. package/components/Inputs/DropdownSelect.js +466 -0
  126. package/components/Inputs/DropzoneInput.js +335 -0
  127. package/components/Inputs/NumericInput.js +155 -0
  128. package/components/Inputs/RadioInput.js +205 -0
  129. package/components/Inputs/SearchInput.js +18 -0
  130. package/components/Inputs/Signature.js +278 -0
  131. package/components/Inputs/TextArea.js +196 -0
  132. package/components/Inputs/TextInput.js +182 -0
  133. package/components/Inputs/TextInputClicable.js +198 -0
  134. package/components/Inputs/TextInputClicableMS.js +255 -0
  135. package/components/Inputs/TimeInput.js +181 -0
  136. package/components/Inputs/ToggleSwitch.js +123 -0
  137. package/components/Inputs/index.js +13 -0
  138. package/components/Label/Label.js +48 -0
  139. package/components/Label/index.js +1 -0
  140. package/components/Loaders/Loader.js +179 -0
  141. package/components/Loaders/index.js +2 -0
  142. package/components/Modal/Modal.js +116 -0
  143. package/components/Modal/ModalComp.js +158 -0
  144. package/components/Modal/index.js +2 -0
  145. package/components/Overlay/Overlay.js +159 -0
  146. package/components/Overlay/index.js +1 -0
  147. package/components/Pagination/Pagination.js +83 -0
  148. package/components/Pagination/index.js +1 -0
  149. package/components/ProgressBar/ProgressBar.js +84 -0
  150. package/components/ProgressBar/index.js +1 -0
  151. package/components/ProgressSteps/ProgressSteps.js +121 -0
  152. package/components/ProgressSteps/index.js +1 -0
  153. package/components/Rating/Rating.js +264 -0
  154. package/components/Rating/index.js +1 -0
  155. package/components/SecondaryLink/DarkSecondaryLink.js +97 -0
  156. package/components/SecondaryLink/LightSecondaryLink.js +93 -0
  157. package/components/SecondaryLink/index.js +3 -0
  158. package/components/Sidebar/Navbar.js +328 -0
  159. package/components/Sidebar/Sidebar.js +180 -0
  160. package/components/Sidebar/index.js +3 -0
  161. package/components/StatusChip/PrimaryStatusChip.js +78 -0
  162. package/components/StatusChip/SecondaryStatusChip.js +78 -0
  163. package/components/StatusChip/SlimPrimaryStatusChip.js +92 -0
  164. package/components/StatusChip/SlimSecondaryStatusChip.js +93 -0
  165. package/components/StatusChip/index.js +6 -0
  166. package/components/StatusCircle/StatusCircle.js +64 -0
  167. package/components/StatusCircle/index.js +1 -0
  168. package/components/Tables/Table.js +156 -0
  169. package/components/Tables/index.js +1 -0
  170. package/components/Tooltip/Tooltip.js +479 -0
  171. package/components/Tooltip/index.js +1 -0
  172. package/components/Typography/Typography.js +78 -0
  173. package/components/Typography/index.js +2 -0
  174. package/components/constants/colors.js +33 -0
  175. package/components/constants/defaultStyle.js +781 -0
  176. package/components/constants/defaultThemeColor.js +15 -0
  177. package/components/constants/index.js +7 -0
  178. package/components/constants/utils.js +31 -0
  179. package/components/global/FontStyle.js +131 -0
  180. package/components/global/index.js +1 -0
  181. package/dist/index.es.js +2302 -0
  182. package/dist/index.js +2302 -0
  183. package/index.js +40 -0
  184. package/package.json +67 -0
  185. package/rollup.config.js +53 -0
@@ -0,0 +1,92 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import styled, { useTheme } from 'styled-components';
4
+ import defaultThemeColor from '../constants/defaultThemeColor';
5
+
6
+ /**
7
+ * Primary UI component for user interaction
8
+ */
9
+
10
+ const sizes = {
11
+ xsm: {
12
+ width: '88px'
13
+ },
14
+ sm: {
15
+ width: '93px'
16
+ },
17
+ md: {
18
+ width: '111px'
19
+ },
20
+ lg: {
21
+ width: '129px'
22
+ },
23
+ }
24
+
25
+ const StyledStatusChip = styled.div`
26
+ background: ${({ theme, variant, bgColor }) => bgColor ? bgColor : theme.variant[variant]};
27
+ color: ${({ theme, textColor }) => textColor ? textColor : theme.bgColor};
28
+ border-radius: 13.5px;
29
+ font-size: 14px;
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+ width: ${({ block, size }) => block ? 'auto' : sizes[size].width};
34
+ height: 28px;
35
+ box-sizing: border-box;
36
+ overflow: hidden;
37
+ `;
38
+
39
+ export const SlimPrimaryStatusChip = ({ block, style, variant, textColor, bgColor, ...props }) => {
40
+ const theme = useTheme() || defaultThemeColor;
41
+ return (
42
+ <StyledStatusChip
43
+ block={block}
44
+ variant={variant}
45
+ textColor={textColor}
46
+ bgColor={bgColor}
47
+ style={style}
48
+ {...props}
49
+ >
50
+ {props.children}
51
+ </StyledStatusChip>
52
+ );
53
+ };
54
+
55
+ SlimPrimaryStatusChip.propTypes = {
56
+ /**
57
+ * background color of SlimStatusChip. primary-1, 2, error, etc.
58
+ */
59
+ variant: PropTypes.string,
60
+ /**
61
+ * How wide should the SlimStatusChip be?
62
+ */
63
+ size: PropTypes.oneOf(['xsm', 'sm', 'md', 'lg']),
64
+ /**
65
+ * Block width of SlimStatusChip
66
+ */
67
+ block: PropTypes.bool,
68
+ /**
69
+ * Theme object
70
+ */
71
+ theme: PropTypes.object,
72
+ /**
73
+ * Optional custom text color
74
+ */
75
+ textColor: PropTypes.string,
76
+ /**
77
+ * Optional custom background color
78
+ */
79
+ bgColor: PropTypes.string,
80
+ };
81
+
82
+ StyledStatusChip.defaultProps = {
83
+ theme: defaultThemeColor,
84
+ }
85
+
86
+ SlimPrimaryStatusChip.defaultProps = {
87
+ theme: defaultThemeColor,
88
+ variant: 'primary-1',
89
+ block: false,
90
+ size: 'sm'
91
+ };
92
+
@@ -0,0 +1,93 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import styled, { useTheme } from 'styled-components';
4
+ import defaultThemeColor from '../constants/defaultThemeColor';
5
+
6
+ /**
7
+ * Primary UI component for user interaction
8
+ */
9
+
10
+ const sizes = {
11
+ xsm: {
12
+ width: '88px'
13
+ },
14
+ sm: {
15
+ width: '93px'
16
+ },
17
+ md: {
18
+ width: '111px'
19
+ },
20
+ lg: {
21
+ width: '129px'
22
+ },
23
+ }
24
+
25
+ const StyledStatusChip = styled.div`
26
+ background: ${({ theme }) => theme.bgColor};
27
+ color: ${({ theme, variant, textColor }) => textColor ? textColor : theme.variant[variant]};
28
+ border: 1px solid ${({ theme, variant, borderColor }) => borderColor ? borderColor : theme.variant[variant]};
29
+ border-radius: 13.5px;
30
+ font-size: 14px;
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ width: ${({ block, size }) => block ? 'auto' : sizes[size].width};
35
+ height: 27px;
36
+ box-sizing: border-box;
37
+ overflow: hidden;
38
+ `;
39
+
40
+ export const SlimSecondaryStatusChip = ({ block, style, variant, textColor, borderColor, ...props }) => {
41
+ const theme = useTheme() || defaultThemeColor;
42
+ return (
43
+ <StyledStatusChip
44
+ block={block}
45
+ variant={variant}
46
+ textColor={textColor}
47
+ borderColor={borderColor}
48
+ style={style}
49
+ {...props}
50
+ >
51
+ {props.children}
52
+ </StyledStatusChip>
53
+ );
54
+ };
55
+
56
+ SlimSecondaryStatusChip.propTypes = {
57
+ /**
58
+ * Color of SlimStatusChip. primary-1, 2, error, etc.
59
+ */
60
+ variant: PropTypes.string,
61
+ /**
62
+ * How wide should the SlimStatusChip be?
63
+ */
64
+ size: PropTypes.oneOf(['xsm', 'sm', 'md', 'lg']),
65
+ /**
66
+ * Block width of SlimStatusChip
67
+ */
68
+ block: PropTypes.bool,
69
+ /**
70
+ * Theme object
71
+ */
72
+ theme: PropTypes.object,
73
+ /**
74
+ * Optional custom text color
75
+ */
76
+ textColor: PropTypes.string,
77
+ /**
78
+ * Optional custom border color
79
+ */
80
+ borderColor: PropTypes.string,
81
+ };
82
+
83
+ StyledStatusChip.defaultProps = {
84
+ theme: defaultThemeColor,
85
+ }
86
+
87
+ SlimSecondaryStatusChip.defaultProps = {
88
+ theme: defaultThemeColor,
89
+ variant: 'primary-1',
90
+ block: false,
91
+ size: 'sm'
92
+ };
93
+
@@ -0,0 +1,6 @@
1
+ export * from './PrimaryStatusChip';
2
+ export * from './SecondaryStatusChip';
3
+ export * from './SlimPrimaryStatusChip';
4
+ export * from './SlimSecondaryStatusChip';
5
+
6
+
@@ -0,0 +1,64 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import styled, { useTheme } from 'styled-components';
4
+ import defaultThemeColor from '../constants/defaultThemeColor';
5
+
6
+ /**
7
+ * Primary UI component for user interaction
8
+ */
9
+
10
+ const StyledStatusCircle = styled.div`
11
+ background: ${({ theme, variant, bgColor }) => bgColor ? bgColor : theme.variant[variant]};
12
+ border: 1.3px solid ${({ theme, variant, borderColor }) => borderColor ? borderColor : theme.variant[variant]};
13
+ border-radius: 50%;
14
+ width: ${({ size }) => size}px;
15
+ height: ${({ size }) => size}px;
16
+ box-sizing: border-box;
17
+ `;
18
+
19
+ export const StatusCircle = ({ variant, bgColor, borderColor, ...props }) => {
20
+ const theme = useTheme() || defaultThemeColor;
21
+ return (
22
+ <StyledStatusCircle
23
+ variant={variant}
24
+ borderColor={borderColor}
25
+ bgColor={bgColor}
26
+ {...props}
27
+ >
28
+ </StyledStatusCircle>
29
+ );
30
+ };
31
+
32
+ StatusCircle.propTypes = {
33
+ /**
34
+ * Color of StatusCircle base on the available one among variant theme. primary-1, 2, error, etc.
35
+ */
36
+ variant: PropTypes.string,
37
+ /**
38
+ * Size of the circle
39
+ */
40
+ size: PropTypes.number,
41
+ /**
42
+ * Theme object
43
+ */
44
+ theme: PropTypes.object,
45
+ /**
46
+ * Optional custom border color
47
+ */
48
+ borderColor: PropTypes.string,
49
+ /**
50
+ * Optional custom background color
51
+ */
52
+ bgColor: PropTypes.string,
53
+ };
54
+
55
+ StyledStatusCircle.defaultProps = {
56
+ theme: defaultThemeColor,
57
+ }
58
+
59
+ StatusCircle.defaultProps = {
60
+ theme: defaultThemeColor,
61
+ variant: 'primary-1',
62
+ size: 11
63
+ };
64
+
@@ -0,0 +1 @@
1
+ export * from './StatusCircle';
@@ -0,0 +1,156 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import DataTable from "react-data-table-component";
4
+ import defaultStyles from '../constants/defaultStyle';
5
+ import { Icon } from '../Icon';
6
+
7
+ /**
8
+ * Primary UI component for user interaction
9
+ */
10
+
11
+ export const Table = ({
12
+ theme,
13
+ customStyles,
14
+ type = 'table',
15
+ sortIcon,
16
+ data,
17
+ tableColumns,
18
+ progressPending,
19
+ defaultSortFieldId,
20
+ handleOnSort,
21
+ sortServer,
22
+ progressComponent,
23
+ responsive,
24
+ conditionalRowStyles,
25
+ fixedHeader,
26
+ fixedHeaderScrollHeight,
27
+ ...props }) => {
28
+
29
+ let tableStyle = {}
30
+
31
+ if (theme) {
32
+ if (theme[type]) {
33
+
34
+ tableStyle = theme[type];
35
+ }
36
+ }
37
+
38
+
39
+ if (customStyles) {
40
+ for (const property in customStyles) {
41
+ tableStyle[property] = customStyles[property]
42
+ }
43
+ }
44
+
45
+ return (
46
+
47
+ <DataTable
48
+ responsive={responsive}
49
+ data={data}
50
+ columns={tableColumns}
51
+ noHeader={true}
52
+ highlightOnHover
53
+ sortIcon={sortIcon}
54
+ progressPending={progressPending}
55
+ customStyles={tableStyle}
56
+ defaultSortFieldId={defaultSortFieldId}
57
+ progressComponent={progressComponent ? progressComponent : undefined}
58
+ sortServer={sortServer}
59
+ onSort={(columnInfo, direction, event) => {
60
+ handleOnSort(columnInfo, direction, event)
61
+ }}
62
+ conditionalRowStyles={conditionalRowStyles}
63
+ fixedHeader={fixedHeader}
64
+ fixedHeaderScrollHeight={fixedHeaderScrollHeight}
65
+ {...props}
66
+ />
67
+
68
+
69
+
70
+
71
+ );
72
+ };
73
+
74
+ Table.propTypes = {
75
+ /**
76
+ * Theme object
77
+ */
78
+ theme: PropTypes.object,
79
+ /**
80
+ * Optional component to override the default sorting icon (must be downward)
81
+ */
82
+ sortIcon: PropTypes.any,
83
+ /**
84
+ * Data array of the actual data to display.
85
+ */
86
+ data: PropTypes.array,
87
+ /**
88
+ * Data array of the columns to display.
89
+ */
90
+ tableColumns: PropTypes.array,
91
+ /**
92
+ * Optional display a message while data are loading
93
+ */
94
+ progressPending: PropTypes.bool,
95
+ /**
96
+ * Custom component to display while data are loading
97
+ */
98
+ progressComponent: PropTypes.any,
99
+ /**
100
+ * Optional to set a column to be pre-sorted
101
+ */
102
+ defaultSortFieldId: PropTypes.number,
103
+ /**
104
+ * Optional disables internal sorting for use with server-side/remote sorting
105
+ */
106
+ sortServer: PropTypes.bool,
107
+ /**
108
+ * Optional function that is triggered when a column is sort
109
+ */
110
+ handleOnSort: PropTypes.any,
111
+ /**
112
+ * Optional makes the table horizontally scrollable on smaller screen widths
113
+ */
114
+ responsive: PropTypes.bool,
115
+ /**
116
+ * Optional array of objects that allow apply conditional style base on data value
117
+ */
118
+ conditionalRowStyles: PropTypes.array,
119
+ /**
120
+ * Optional makes the table header fixed allowing you to scroll the table body
121
+ */
122
+ fixedHeader: PropTypes.bool,
123
+ /**
124
+ * Optional to set height of the table
125
+ */
126
+ fixedHeaderScrollHeight: PropTypes.string,
127
+ /**
128
+ * Optional to override style of the table
129
+ * Default style:
130
+ * https://github.com/jbetancur/react-data-table-component/blob/master/src/DataTable/styles.ts
131
+ */
132
+ customStyle: PropTypes.object,
133
+ };
134
+
135
+ Table.defaultProps = {
136
+ theme: defaultStyles,
137
+ sortIcon: <Icon
138
+ icon={'arrow-down'}
139
+ size={11}
140
+ color={'#333333'}
141
+ style={{
142
+ transform: 'scaleX(0.7) scaleY(0.7) translate(5px, -3px)',
143
+ }}
144
+ />,
145
+ data: [],
146
+ tableColumns: [],
147
+ progressPending: false,
148
+ defaultSortFieldId: null,
149
+ handleOnSort: (columnInfo, direction, event) => { console.log(columnInfo, direction, event) },
150
+ sortServer: null,
151
+ progressComponent: undefined,
152
+ responsive: true,
153
+ fixedHeader: true,
154
+ fixedHeaderScrollHeight: '100vh',
155
+ };
156
+
@@ -0,0 +1 @@
1
+ export * from './Table';