groundfloor-react-ui 1.2.8 → 1.2.10

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 (186) hide show
  1. package/dist/index.es.js +461 -430
  2. package/dist/index.js +469 -438
  3. package/package.json +15 -43
  4. package/rollup.config.js +6 -6
  5. package/assets/fonts/Averta/Averta-Black.woff2 +0 -0
  6. package/assets/fonts/Averta/Averta-BlackItalic.woff2 +0 -0
  7. package/assets/fonts/Averta/Averta-Bold.woff2 +0 -0
  8. package/assets/fonts/Averta/Averta-BoldItalic.woff2 +0 -0
  9. package/assets/fonts/Averta/Averta-ExtraBold.woff2 +0 -0
  10. package/assets/fonts/Averta/Averta-ExtraBoldItalic.woff2 +0 -0
  11. package/assets/fonts/Averta/Averta-ExtraThin.woff2 +0 -0
  12. package/assets/fonts/Averta/Averta-ExtraThinItalic.woff2 +0 -0
  13. package/assets/fonts/Averta/Averta-Light.woff2 +0 -0
  14. package/assets/fonts/Averta/Averta-LightItalic.woff2 +0 -0
  15. package/assets/fonts/Averta/Averta-Regular.woff2 +0 -0
  16. package/assets/fonts/Averta/Averta-RegularItalic.woff2 +0 -0
  17. package/assets/fonts/Averta/Averta-SemiBold.woff2 +0 -0
  18. package/assets/fonts/Averta/Averta-SemiBoldItalic.woff2 +0 -0
  19. package/assets/fonts/Averta/Averta-Thin.woff2 +0 -0
  20. package/assets/fonts/Averta/Averta-ThinItalic.woff2 +0 -0
  21. package/assets/fonts/Beauty/BeautyDemo.woff +0 -0
  22. package/assets/icons/app-logo.svg +0 -3
  23. package/assets/icons/arrow-down.svg +0 -3
  24. package/assets/icons/arrow-rotate.svg +0 -1
  25. package/assets/icons/arrow-up.svg +0 -3
  26. package/assets/icons/bell.svg +0 -3
  27. package/assets/icons/check.svg +0 -3
  28. package/assets/icons/checkmark.svg +0 -3
  29. package/assets/icons/chevron-down.svg +0 -3
  30. package/assets/icons/chevron-left.svg +0 -3
  31. package/assets/icons/chevron-right.svg +0 -3
  32. package/assets/icons/cloud-icon.svg +0 -3
  33. package/assets/icons/connection.svg +0 -3
  34. package/assets/icons/cross-icon.svg +0 -3
  35. package/assets/icons/default.svg +0 -1
  36. package/assets/icons/door-internal-active.svg +0 -1
  37. package/assets/icons/edit-icon.svg +0 -3
  38. package/assets/icons/ellipses-horizontal.svg +0 -3
  39. package/assets/icons/ellipses.svg +0 -3
  40. package/assets/icons/email.svg +0 -3
  41. package/assets/icons/eye-hide-view.svg +0 -1
  42. package/assets/icons/eye-hide.svg +0 -1
  43. package/assets/icons/file-attach-white.svg +0 -3
  44. package/assets/icons/file-attach.svg +0 -3
  45. package/assets/icons/file-icon.svg +0 -1
  46. package/assets/icons/file-upload.svg +0 -3
  47. package/assets/icons/functional-equation-regular.svg +0 -147
  48. package/assets/icons/hamburger-menu.svg +0 -3
  49. package/assets/icons/heart.svg +0 -18
  50. package/assets/icons/image.svg +0 -3
  51. package/assets/icons/info.svg +0 -3
  52. package/assets/icons/jpg-icon.svg +0 -3
  53. package/assets/icons/magnifier.svg +0 -3
  54. package/assets/icons/menu-ellipse-two.svg +0 -1
  55. package/assets/icons/menu-ellipse.svg +0 -53
  56. package/assets/icons/pause-all.svg +0 -1
  57. package/assets/icons/pdf-icon.svg +0 -3
  58. package/assets/icons/pen-icon.svg +0 -3
  59. package/assets/icons/plus-outlined.svg +0 -3
  60. package/assets/icons/resume.svg +0 -1
  61. package/assets/icons/sign-icon.svg +0 -3
  62. package/assets/icons/star.svg +0 -3
  63. package/assets/icons/trash-icon.svg +0 -59
  64. package/assets/icons/triangle-down.svg +0 -3
  65. package/assets/icons/users.svg +0 -11
  66. package/assets/icons/view.svg +0 -3
  67. package/assets/icons/watcher.svg +0 -3
  68. package/assets/icons/zoom-in-white.svg +0 -1
  69. package/assets/styles/global.css +0 -0
  70. package/assets/styles/global.scss +0 -0
  71. package/components/Accordion/Accordion.js +0 -167
  72. package/components/Accordion/AccordionSB.js +0 -170
  73. package/components/Accordion/AccordionSBfooter.js +0 -171
  74. package/components/Accordion/index.js +0 -4
  75. package/components/ArrowBar/ArrowBar.js +0 -276
  76. package/components/ArrowBar/index.js +0 -2
  77. package/components/Avatar/Avatar.js +0 -171
  78. package/components/Avatar/AvatarSB.js +0 -255
  79. package/components/Avatar/AvatarSBfooter.js +0 -279
  80. package/components/Avatar/index.js +0 -4
  81. package/components/Banner/Banner.js +0 -70
  82. package/components/Banner/index.js +0 -2
  83. package/components/Breadcrumb/Breadcrumb.js +0 -225
  84. package/components/Breadcrumb/index.js +0 -2
  85. package/components/Button/PrimaryButton.js +0 -167
  86. package/components/Button/SecondaryButton.js +0 -156
  87. package/components/Button/TinyButton.js +0 -101
  88. package/components/Button/index.js +0 -6
  89. package/components/Cards/Card.js +0 -43
  90. package/components/Cards/CardRef.js +0 -71
  91. package/components/Cards/DocumentCard.js +0 -215
  92. package/components/Cards/index.js +0 -5
  93. package/components/Content/Content.js +0 -50
  94. package/components/Content/index.js +0 -1
  95. package/components/DesignComponent/StyledComponent/StyledComponent.js +0 -326
  96. package/components/DesignComponent/StyledComponent/index.js +0 -1
  97. package/components/DesignComponent/index.js +0 -1
  98. package/components/Divider/Divider.js +0 -56
  99. package/components/Divider/index.js +0 -2
  100. package/components/Drawer/Drawer.js +0 -84
  101. package/components/Drawer/index.js +0 -2
  102. package/components/ErrorBoundary/ErrorBoundary.js +0 -44
  103. package/components/ErrorBoundary/index.js +0 -1
  104. package/components/FilterChip/FilterChip.js +0 -70
  105. package/components/FilterChip/index.js +0 -1
  106. package/components/Footer/Footer.js +0 -57
  107. package/components/Footer/FooterContent.js +0 -98
  108. package/components/Footer/index.js +0 -3
  109. package/components/Form/FormComponent.js +0 -244
  110. package/components/Form/HeaderComponent.js +0 -64
  111. package/components/Form/SubmitComponent.js +0 -63
  112. package/components/Form/index.js +0 -5
  113. package/components/GroupAvatars/GroupAvatars.js +0 -139
  114. package/components/GroupAvatars/index.js +0 -1
  115. package/components/GroupButtons/ButtonPopup.js +0 -191
  116. package/components/GroupButtons/GroupButtons.js +0 -150
  117. package/components/GroupButtons/GroupButtonsPopup.js +0 -163
  118. package/components/GroupButtons/index.js +0 -3
  119. package/components/GroupStatusCircle/GroupStatusCircle.js +0 -135
  120. package/components/GroupStatusCircle/index.js +0 -1
  121. package/components/Header/Header.js +0 -58
  122. package/components/Header/index.js +0 -1
  123. package/components/HyperLink/HyperLink.js +0 -114
  124. package/components/HyperLink/index.js +0 -1
  125. package/components/Icon/Icon.js +0 -176
  126. package/components/Icon/index.js +0 -1
  127. package/components/Images/Image.js +0 -107
  128. package/components/Images/index.js +0 -2
  129. package/components/Inputs/CheckBoxInput.js +0 -339
  130. package/components/Inputs/ColorInput.js +0 -145
  131. package/components/Inputs/DateSelect.js +0 -461
  132. package/components/Inputs/DropdownSelect.js +0 -690
  133. package/components/Inputs/DropzoneInput.js +0 -450
  134. package/components/Inputs/NumericInput.js +0 -166
  135. package/components/Inputs/PasswordInput.js +0 -242
  136. package/components/Inputs/RadioInput.js +0 -292
  137. package/components/Inputs/SearchInput.js +0 -19
  138. package/components/Inputs/Signature.js +0 -369
  139. package/components/Inputs/TextArea.js +0 -214
  140. package/components/Inputs/TextInput.js +0 -235
  141. package/components/Inputs/TimeInput.js +0 -186
  142. package/components/Inputs/ToggleSwitch.js +0 -157
  143. package/components/Inputs/index.js +0 -15
  144. package/components/Label/Label.js +0 -48
  145. package/components/Label/index.js +0 -1
  146. package/components/Loaders/Loader.js +0 -179
  147. package/components/Loaders/index.js +0 -2
  148. package/components/Modal/ModalComp.js +0 -216
  149. package/components/Modal/index.js +0 -1
  150. package/components/Overlay/Overlay.js +0 -158
  151. package/components/Overlay/index.js +0 -1
  152. package/components/Pagination/Pagination.js +0 -59
  153. package/components/Pagination/index.js +0 -1
  154. package/components/ProgressBar/ProgressBar.js +0 -101
  155. package/components/ProgressBar/index.js +0 -1
  156. package/components/ProgressSteps/ProgressSteps.js +0 -121
  157. package/components/ProgressSteps/index.js +0 -1
  158. package/components/Rating/Rating.js +0 -258
  159. package/components/Rating/index.js +0 -1
  160. package/components/SecondaryLink/DarkSecondaryLink.js +0 -97
  161. package/components/SecondaryLink/LightSecondaryLink.js +0 -93
  162. package/components/SecondaryLink/index.js +0 -3
  163. package/components/Sidebar/Navbar.js +0 -306
  164. package/components/Sidebar/Sidebar.js +0 -207
  165. package/components/Sidebar/index.js +0 -3
  166. package/components/StatusChip/PrimaryStatusChip.js +0 -78
  167. package/components/StatusChip/SecondaryStatusChip.js +0 -78
  168. package/components/StatusChip/SlimPrimaryStatusChip.js +0 -92
  169. package/components/StatusChip/SlimSecondaryStatusChip.js +0 -93
  170. package/components/StatusChip/index.js +0 -6
  171. package/components/StatusCircle/StatusCircle.js +0 -64
  172. package/components/StatusCircle/index.js +0 -1
  173. package/components/Tables/Table.js +0 -178
  174. package/components/Tables/index.js +0 -1
  175. package/components/Tooltip/Tooltip.js +0 -581
  176. package/components/Tooltip/index.js +0 -1
  177. package/components/Typography/Typography.js +0 -77
  178. package/components/Typography/index.js +0 -2
  179. package/components/constants/colors.js +0 -33
  180. package/components/constants/defaultStyle.js +0 -801
  181. package/components/constants/defaultThemeColor.js +0 -16
  182. package/components/constants/index.js +0 -7
  183. package/components/constants/utils.js +0 -31
  184. package/components/global/FontStyle.js +0 -131
  185. package/components/global/index.js +0 -1
  186. package/index.js +0 -41
@@ -1,306 +0,0 @@
1
- import React, { useState } from 'react';
2
- import styled, { useTheme } from 'styled-components';
3
- import { AccordionSB, AccordionSBfooter } from '../Accordion';
4
- import { AvatarSB } from '../Avatar';
5
- import defaultThemeColor from '../constants/defaultThemeColor';
6
-
7
- const StyledHeader = styled.div`
8
- min-height: 51px;
9
- display: flex;
10
- background-color: ${({ theme }) => theme.primary['primary-1']};
11
- align-items: center;
12
- padding-left: 24.5px;
13
-
14
- &::hover {
15
- & > .chevron-navbar {
16
- background-color: ${({ theme }) => theme.bgColor};
17
- color: ${({ theme }) => theme.primary['primary-1']};
18
- cursor: pointer;
19
- }
20
- }
21
-
22
- ${({ headerStyles }) => headerStyles}
23
- `;
24
-
25
- const StyledBody = styled.div`
26
- display: flex;
27
- background-color: transparent;
28
- flex-direction: column;
29
- align-items: center;
30
- width: 100%;
31
- `;
32
-
33
- const ListElement = styled.div`
34
- display: flex;
35
- align-items: center;
36
- cursor: pointer;
37
-
38
- &:hover {
39
- p {
40
- ${({ listElementStyle }) => listElementStyle}
41
- }
42
- }
43
-
44
- span {
45
- width: 7px;
46
- height: 7px;
47
- border-radius: 50%;
48
- background-color: ${({ theme }) => theme.bgColor};
49
- margin-right: 31px;
50
- }
51
-
52
- p {
53
- margin: 8.25px 0px;
54
- }
55
- `;
56
-
57
- const StyledFooter = styled.div`
58
- display: flex;
59
- background-color: transparent;
60
- flex-direction: column;
61
- align-items: center;
62
- width: 100%;
63
- margin-top: auto;
64
- `;
65
-
66
- const ListElementFooter = styled.div`
67
- display: flex;
68
- align-items: center;
69
- cursor: pointer;
70
-
71
- &:hover {
72
- p {
73
- ${({ listElementStyle }) => listElementStyle}
74
- }
75
- }
76
-
77
- span {
78
- width: 7px;
79
- height: 7px;
80
- border-radius: 50%;
81
- background-color: ${({ theme }) => theme.bgColor};
82
- margin-right: 31px;
83
- }
84
-
85
- p {
86
- margin: 8.25px 31px;
87
- }
88
- `;
89
-
90
- export const Navbar = ({
91
- headerContent,
92
- bodyContent,
93
- footerContent,
94
- selectedApp,
95
- setApp,
96
- toggleSideBarOpen,
97
- headerStyles,
98
- selectedStyle,
99
- notSelectedStyle,
100
- customStylesNameHover,
101
- listElementStyle,
102
- customSelectCardColor,
103
- user,
104
- firstBottomContent,
105
- secondBottomContent,
106
- ...props
107
- }) => {
108
- const activeTheme = useTheme() || defaultThemeColor;
109
-
110
- const [accordionOpen, setAccordionOpen] = useState(null);
111
- const [accordionFooterOpen, setAccordionFooterOpen] = useState(null);
112
-
113
- function handleClick(index) {
114
- setAccordionFooterOpen(null);
115
- setAccordionOpen(index);
116
- }
117
-
118
- function handleClickFooter(index) {
119
- setAccordionOpen(null);
120
- setAccordionFooterOpen(index);
121
- }
122
-
123
- return (
124
- <div
125
- onMouseLeave={() => {
126
- setAccordionOpen(null);
127
- setAccordionFooterOpen(null);
128
- }}
129
- style={{
130
- display: 'flex',
131
- flexDirection: 'column',
132
- height: '98vh',
133
- }}
134
- >
135
- <StyledHeader theme={activeTheme} headerStyles={headerStyles}>
136
- {headerContent}
137
- </StyledHeader>
138
- <StyledBody>
139
- {bodyContent?.map((app, i) => {
140
- return (
141
- <AccordionSB
142
- key={app.id}
143
- index={i}
144
- handleClick={(index) => {
145
- handleClick(index);
146
- }}
147
- isAccordionOpen={i === accordionOpen}
148
- isSelected={app.userName === selectedApp.lev1}
149
- customSelectCardColor={customSelectCardColor}
150
- customStylesAccordionContainer={{
151
- padding: '0',
152
- 'box-shadow': 'none',
153
- 'border-radius': '0px',
154
- 'background-color': 'transparent',
155
- }}
156
- customStylesAccordionTogggle={{
157
- padding: '0',
158
- 'box-shadow': 'none',
159
- 'border-radius': '0px',
160
- 'background-color': 'transparent',
161
- 'padding-left': '16px',
162
- 'padding-top': '7.5px',
163
- 'padding-bottom': '7.5px',
164
- cursor: 'pointer',
165
- }}
166
- customStylesAccordionContent={{
167
- transition: 'height ease 0.2s', //transform ease 95ms',
168
- overflow: 'hidden',
169
- padding: '0',
170
- 'background-color': 'transparent',
171
- color: 'white',
172
- position: 'relative',
173
- 'box-shadow': 'none',
174
- }}
175
- contentToggle={
176
- <AvatarSB
177
- selectedStyle={selectedStyle}
178
- notSelectedStyle={notSelectedStyle}
179
- toggleName={toggleSideBarOpen} //isOpen} //true}
180
- customStylesName={{
181
- 'white-space': 'nowrap',
182
- overflow: 'hidden',
183
- 'text-overflow': 'ellipsis',
184
- color: 'white',
185
- 'font-weight':
186
- app.userName === selectedApp.lev1 ? '600' : '400',
187
- }}
188
- customStylesNameHover={customStylesNameHover}
189
- size={'LG'}
190
- user={app}
191
- isSelected={app.userName === selectedApp.lev1}
192
- />
193
- }
194
- content={
195
- <div
196
- style={{
197
- margin: '0',
198
- padding: '0',
199
- paddingLeft: '32px',
200
- marginBottom: '18.25px',
201
- }}
202
- >
203
- {app.subdirectory?.map((sub, i) => {
204
- return (
205
- <ListElement
206
- listElementStyle={listElementStyle}
207
- key={app.id + sub}
208
- onClick={() => {
209
- setApp({ lev1: `${app.userName}`, lev2: `${sub}` });
210
- }}
211
- >
212
- <span
213
- style={{
214
- visibility:
215
- selectedApp.lev2 === sub ? 'visible' : 'hidden',
216
- }}
217
- ></span>
218
- <p style={{ marginTop: i === 0 && '0px' }}>{sub}</p>
219
- </ListElement>
220
- );
221
- })}
222
- </div>
223
- }
224
- />
225
- );
226
- })}
227
- </StyledBody>
228
- <StyledFooter>
229
- <AccordionSBfooter
230
- index={0}
231
- handleClick={(index) => {
232
- handleClickFooter(index);
233
- }}
234
- isAccordionOpen={0 === accordionFooterOpen}
235
- customStylesAccordionContainer={{
236
- padding: '0',
237
- 'box-shadow': 'none',
238
- 'border-radius': '0px',
239
- 'background-color': 'transparent',
240
- }}
241
- customStylesAccordionTogggle={{
242
- padding: '0',
243
- 'box-shadow': 'none',
244
- 'border-radius': '0px',
245
- 'background-color': 'transparent',
246
- 'padding-left': '16px',
247
- 'padding-top': '7.5px',
248
- 'padding-bottom': '7.5px',
249
- cursor: 'pointer',
250
- }}
251
- customStylesAccordionContent={{
252
- transition: 'height ease 0.2s', //transform ease 95ms',
253
- overflow: 'hidden',
254
- padding: '0',
255
- 'background-color': 'transparent',
256
- color: 'white',
257
- position: 'relative',
258
- 'box-shadow': 'none',
259
- }}
260
- contentToggle={
261
- <AvatarSB
262
- selectedStyle={selectedStyle}
263
- notSelectedStyle={notSelectedStyle}
264
- toggleName={toggleSideBarOpen} //isOpen}//} //true}
265
- customStylesName={{
266
- 'white-space': 'nowrap',
267
- overflow: 'hidden',
268
- 'text-overflow': 'ellipsis',
269
- color: 'white',
270
- 'font-weight': '400',
271
- }}
272
- customStylesNameHover={customStylesNameHover}
273
- size={'LG'}
274
- user={{
275
- fullName: user.fullName || 'My Account',
276
- userName: user.userName || 'My Account',
277
- url: user.imgUrl,
278
- }}
279
- />
280
- }
281
- content={
282
- <div
283
- style={{
284
- margin: '0',
285
- padding: '0',
286
- paddingLeft: '32px',
287
- marginBottom: '18.25px',
288
- }}
289
- >
290
- <ListElementFooter
291
- listElementStyle={listElementStyle}
292
- >
293
- {firstBottomContent}
294
-
295
- </ListElementFooter>
296
- <ListElementFooter onClick={() => { }}>
297
-
298
- {secondBottomContent}
299
- </ListElementFooter>
300
- </div>
301
- }
302
- />
303
- </StyledFooter>
304
- </div>
305
- );
306
- };
@@ -1,207 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react';
3
- import styled, { useTheme } from 'styled-components';
4
- import defaultStyles from '../constants/defaultStyle';
5
- import defaultThemeColor from '../constants/defaultThemeColor';
6
- import getDefaultStyles from '../constants/utils';
7
-
8
- /**
9
- * Primary UI component for user interaction
10
- */
11
-
12
- const StyledContainer = styled.div`
13
- background-color: ${({ theme }) => theme.variant['primary-1']} !important;
14
- color: ${({ theme }) => theme.bgColor};
15
- overflow-y: auto;
16
- ${({ inBuiltCss, type }) => {
17
- return getDefaultStyles(inBuiltCss, 'sidebar-container');
18
- }}
19
- ${({ customStylesContainer }) => customStylesContainer}
20
-
21
- ${({
22
- isOpen,
23
- forceOpen,
24
- inBuiltCss,
25
- type,
26
- customStylesContainerOpen,
27
- customStylesContainerClose,
28
- }) => {
29
- if (isOpen || forceOpen) {
30
- return {
31
- ...getDefaultStyles(inBuiltCss, 'sidebar-container-open'),
32
- ...customStylesContainerOpen,
33
- };
34
- } else {
35
- return {
36
- ...getDefaultStyles(inBuiltCss, 'sidebar-container-close'),
37
- ...customStylesContainerClose,
38
- };
39
- }
40
- }}
41
-
42
- @media (max-width: 980px) {
43
- ${({
44
- isOpen,
45
- inBuiltCss,
46
- type,
47
- customStylesContainerMobileOpen,
48
- customStylesContainerMobileClose,
49
- }) => {
50
- // if (isOpen) {
51
- // return { ...getDefaultStyles(inBuiltCss, 'sidebar-container-mobile-open'), ...customStylesContainerMobileOpen };
52
- // } else {
53
- // return { ...getDefaultStyles(inBuiltCss, 'sidebar-container-mobile-close'), ...customStylesContainerMobileClose };
54
- // }
55
- }}
56
- }
57
- `;
58
-
59
- const StyledPusher = styled.div`
60
- ${({ inBuiltCss, type }) => {
61
- return getDefaultStyles(inBuiltCss, 'sidebar-pusher');
62
- }}
63
- ${({ customStylesPusher }) => customStylesPusher}
64
-
65
- ${({
66
- forceOpen,
67
- inBuiltCss,
68
- type,
69
- customStylesPusherOpen,
70
- customStylesPusherClose,
71
- }) => {
72
- if (forceOpen) {
73
- return {
74
- ...getDefaultStyles(inBuiltCss, 'sidebar-pusher-open'),
75
- ...customStylesPusherOpen,
76
- };
77
- } else {
78
- return {
79
- ...getDefaultStyles(inBuiltCss, 'sidebar-pusher-close'),
80
- ...customStylesPusherClose,
81
- };
82
- }
83
- }}
84
-
85
- @media (max-width: 980px) {
86
- ${({ inBuiltCss, type, customStylesPusherMobile }) => {
87
- return {
88
- ...getDefaultStyles(inBuiltCss, 'sidebar-pusher-mobile'),
89
- ...customStylesPusherMobile,
90
- };
91
- }}}
92
- }
93
- `;
94
-
95
- export const Sidebar = ({
96
- customStylesContainer,
97
- customStylesContainerOpen,
98
- customStylesContainerClose,
99
- customStylesContainerMobileOpen,
100
- customStylesContainerMobileClose,
101
- customStylesPusher,
102
- customStylesPusherOpen,
103
- customStylesPusherClose,
104
- customStylesPusherMobile,
105
- forceOpen,
106
- forceClose,
107
- handleSidebar,
108
- toggleSideBarOpen,
109
- pinner,
110
- ...props
111
- }) => {
112
- function handleMouse(flag) {
113
- handleSidebar(flag);
114
- }
115
- const activeTheme = useTheme() || defaultThemeColor;
116
-
117
- return (
118
- <StyledContainer
119
- theme={activeTheme}
120
- inBuiltCss={defaultStyles}
121
- customStyles={customStylesContainer}
122
- type={'sidebarContainer'}
123
- onMouseEnter={() => {
124
- if (forceOpen) {
125
- } else {
126
- handleMouse(true);
127
- }
128
- }}
129
- onMouseLeave={() => {
130
- handleMouse(false);
131
- forceClose();
132
- }}
133
- forceOpen={forceOpen}
134
- isOpen={toggleSideBarOpen} //true}
135
- {...props}
136
- >
137
- <StyledPusher />
138
- {props.children}
139
- {pinner}
140
- </StyledContainer>
141
- );
142
- };
143
-
144
- Sidebar.propTypes = {
145
- /**
146
- * Custom style of container
147
- */
148
- customStylesContainer: PropTypes.object,
149
- /**
150
- * Custom style of container when open
151
- */
152
- customStylesContainerOpen: PropTypes.object,
153
- /**
154
- * Custom style of container when close
155
- */
156
- customStylesContainerClose: PropTypes.object,
157
- /**
158
- * Custom style of container when open in small screen
159
- */
160
- customStylesContainerMobileOpen: PropTypes.object,
161
- /**
162
- * Custom style of container when close in small screen
163
- */
164
- customStylesContainerMobileClose: PropTypes.object,
165
- /**
166
- * Custom style of pusher
167
- */
168
- customStylesPusher: PropTypes.object,
169
- /**
170
- * Custom style of pusher when open
171
- */
172
- customStylesPusherOpen: PropTypes.object,
173
- /**
174
- * Custom style of pusher when close
175
- */
176
- customStylesPusherClose: PropTypes.object,
177
- /**
178
- * Custom style of pusher in small screen
179
- */
180
- customStylesPusherMobile: PropTypes.object,
181
- /**
182
- * Boolean to open the sidebar
183
- */
184
- forceOpen: PropTypes.bool,
185
- /**
186
- * Function to close the sidebar
187
- */
188
- forceClose: PropTypes.func,
189
- /**
190
- * Function to toggle the sidebar
191
- */
192
- handleSidebar: PropTypes.func,
193
- /**
194
- * Boolean to know the sidebar status
195
- */
196
- toggleSideBarOpen: PropTypes.bool,
197
- /**
198
- * Component to pin the sidebar on large screen
199
- */
200
- pinner: PropTypes.any,
201
- };
202
-
203
-
204
- Sidebar.defaultProps = {
205
- forceClose: () => { },
206
- forceOpen: false,
207
- };
@@ -1,3 +0,0 @@
1
- export * from './Navbar';
2
- export * from './Sidebar';
3
-
@@ -1,78 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react';
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
- sm: {
12
- fontSize: '14px',
13
- padding: '11px 36px'
14
- },
15
- md: {
16
- fontSize: '16px',
17
- padding: '10px 24px'
18
- },
19
- lg: {
20
- fontSize: '22px',
21
- padding: '6px 29px'
22
- },
23
- }
24
-
25
- const StyledStatusChip = styled.div`
26
- background: ${({ theme, variant }) => theme.variant[variant]};
27
- color: ${({ theme }) => theme.bgColor};
28
- padding: ${({ size }) => sizes[size].padding};
29
- border: 1px solid ${({ theme, variant }) => theme.variant[variant]};
30
- border-radius: 42px;
31
- font-size: ${({ size }) => sizes[size].fontSize};
32
- font-weight: 600;
33
- display: flex;
34
- align-items: center;
35
- width: ${({ block }) => block ? 'auto' : 'fit-content'};
36
- box-sizing: border-box;
37
-
38
- `;
39
-
40
- export const PrimaryStatusChip = ({ block, style, variant, ...props }) => {
41
- const theme = useTheme() || defaultThemeColor;
42
- return (
43
- <StyledStatusChip
44
- block={block}
45
- variant={variant}
46
- style={style}
47
- {...props}
48
- >
49
- {props.children}
50
- </StyledStatusChip>
51
- );
52
- };
53
-
54
- PrimaryStatusChip.propTypes = {
55
- /**
56
- * Color of StatusChip. primary-1, 2, error, etc.
57
- */
58
- variant: PropTypes.string,
59
- /**
60
- * Width of StatusChip
61
- */
62
- block: PropTypes.bool,
63
- /**
64
- * Theme object
65
- */
66
- theme: PropTypes.object,
67
- };
68
-
69
- StyledStatusChip.defaultProps = {
70
- theme: defaultThemeColor,
71
- }
72
-
73
- PrimaryStatusChip.defaultProps = {
74
- theme: defaultThemeColor,
75
- variant: 'primary-1',
76
- block: false,
77
- };
78
-
@@ -1,78 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react';
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
- sm: {
12
- fontSize: '14px',
13
- padding: '11px 36px'
14
- },
15
- md: {
16
- fontSize: '16px',
17
- padding: '10px 24px'
18
- },
19
- lg: {
20
- fontSize: '22px',
21
- padding: '6px 29px'
22
- },
23
- }
24
-
25
- const StyledStatusChip = styled.div`
26
- color: ${({ theme, variant }) => theme.variant[variant]};
27
- background: ${({ theme }) => theme.bgColor};
28
- padding: ${({ size }) => sizes[size].padding};
29
- border: 1px solid ${({ theme, variant }) => theme.variant[variant]};
30
- border-radius: 42px;
31
- font-size: ${({ size }) => sizes[size].fontSize};
32
- font-weight: 600;
33
- display: flex;
34
- align-items: center;
35
- width: ${({ block }) => block ? 'auto' : 'fit-content'};
36
- box-sizing: border-box;
37
-
38
- `;
39
-
40
- export const SecondaryStatusChip = ({ block, style, variant, ...props }) => {
41
- const theme = useTheme() || defaultThemeColor;
42
- return (
43
- <StyledStatusChip
44
- block={block}
45
- variant={variant}
46
- style={style}
47
- {...props}
48
- >
49
- {props.children}
50
- </StyledStatusChip>
51
- );
52
- };
53
-
54
- SecondaryStatusChip.propTypes = {
55
- /**
56
- * Color of StatusChip. primary-1, 2, error, etc.
57
- */
58
- variant: PropTypes.string,
59
- /**
60
- * Width of StatusChip
61
- */
62
- block: PropTypes.bool,
63
- /**
64
- * Theme object
65
- */
66
- theme: PropTypes.object,
67
- };
68
-
69
- StyledStatusChip.defaultProps = {
70
- theme: defaultThemeColor,
71
- }
72
-
73
- SecondaryStatusChip.defaultProps = {
74
- theme: defaultThemeColor,
75
- variant: 'primary-1',
76
- block: false,
77
- };
78
-