groundfloor-react-ui 1.2.9 → 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 +432 -422
  2. package/dist/index.js +444 -434
  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 -341
  130. package/components/Inputs/ColorInput.js +0 -145
  131. package/components/Inputs/DateSelect.js +0 -461
  132. package/components/Inputs/DropdownSelect.js +0 -689
  133. package/components/Inputs/DropzoneInput.js +0 -450
  134. package/components/Inputs/NumericInput.js +0 -177
  135. package/components/Inputs/PasswordInput.js +0 -267
  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 -251
  141. package/components/Inputs/TimeInput.js +0 -186
  142. package/components/Inputs/ToggleSwitch.js +0 -189
  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 -804
  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,689 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react';
3
- import Select, { components } from 'react-select';
4
- import AsyncSelect from 'react-select/async';
5
- import styled, { useTheme } from 'styled-components';
6
- import defaultStyles from '../constants/defaultStyle';
7
- import defaultThemeColor from '../constants/defaultThemeColor';
8
- import getDefaultStyles from '../constants/utils';
9
- import { Icon } from '../Icon';
10
- import { Label } from '../Label';
11
-
12
- const Wrapper = styled.div`
13
-
14
- .master-dropdown,
15
- .new-select {
16
- .master-dropdown__menu,
17
- .new-select__menu {
18
- margin: 0 0 0;
19
- padding: 0;
20
- border: 0;
21
- box-shadow: 0px 8px 40px rgba(56, 66, 100, 0.228174);
22
- border-bottom-left-radius: 4.32px;
23
- border-bottom-right-radius: 4.32px;select-manage-page
24
- border-top-left-radius: 0;
25
- border-top-right-radius: 0;
26
- width: 100%;
27
- }
28
-
29
- .new-select__dropdown-indicator{
30
- padding-top:0px;
31
- }
32
-
33
-
34
- .master-dropdown__single-value {
35
- .input-label {
36
- max-width: 250px;
37
- overflow: hidden;
38
- text-overflow: ellipsis;
39
-
40
- &:hover {
41
- max-width: 100%;
42
- overflow: visible;
43
- }
44
- }
45
- }
46
-
47
- .master-dropdown__menu-list,
48
- .new-select__menu-list {
49
- margin: 0;
50
- padding: 0;
51
- }
52
-
53
- .master-dropdown__menu-list {
54
- max-height: 110px;
55
- }
56
-
57
-
58
-
59
- .master-dropdown__option,
60
- .new-select__option {
61
- color: ${({ theme }) => theme.textColor};
62
- padding-top: 3px;
63
- padding-bottom: 3px;
64
- margin: 8px 0;
65
- }
66
-
67
- .get-selection__option:first-child {
68
- margin-top: -113px;
69
- }
70
-
71
- .master-dropdown__option--is-focused,
72
- .master-dropdown__option:hover,
73
- .new-select__option--is-focused,
74
- .new-select__option:hover {
75
- background-color: ${({ theme }) => theme.neutral['neutral-5']};
76
- cursor: pointer;
77
- }
78
-
79
- .new-select__control:hover,
80
- .new-select__control--is-focused {
81
-
82
- box-shadow: none;
83
- }
84
-
85
-
86
- .master-dropdown__option--is-selected,
87
- .new-select__option--is-selected {
88
- background: transparent;
89
- }
90
-
91
- .master-dropdown__value-container,
92
- .new-select__value-container {
93
- padding: 0.375rem 0.75rem 0.5rem;
94
- }
95
- }
96
-
97
- .default-select {
98
- .default-select__control {
99
- height: 39px;
100
- }
101
-
102
- .default-select__value-container--has-value {
103
- padding: 0 8px 4px 8px;
104
- }
105
-
106
- .default-select__indicator {
107
- padding: 0 8px 0 8px;
108
- padding-top: 0px;
109
- }
110
-
111
- .default-select__control--is-focused {
112
- outline: none;
113
- }
114
- }
115
-
116
-
117
-
118
- .text-main-alt {
119
- color:${({ theme }) => theme.textColor} !important;
120
- margin-right: 0px;
121
- }
122
- .text-main-alt-value {
123
- color:${({ theme }) => theme.textColor} !important;
124
- white-space: nowrap;
125
- overflow: hidden;
126
- text-overflow: ellipsis;
127
- width: 57%;
128
- }
129
- .text-more-alt{
130
- font-size:12px;
131
- color: ${({ theme }) => theme.neutral['neutral-2']};
132
- padding-right: 0px;
133
-
134
-
135
- }
136
- .css-mohuvp-dummyInput-DummyInput{
137
- height:0px;
138
- }
139
-
140
- .css-6j8wv5-Input{
141
- margin:0px;
142
- padding-top:0px;
143
- }
144
- .new-select__menu {
145
- z-Index: 2;
146
- }
147
-
148
- .new-select__input-container{
149
- margin:0px;
150
- padding:0px;
151
- }
152
- .new-select__input{
153
- margin:0px;
154
- padding:0px;
155
- }
156
- .new-select__control:hover,
157
- .new-select__control--is-focused {
158
- border: 1px solid ${({ theme }) => theme.primary['primary-1']};
159
- }
160
-
161
- .css-ry76bm-singleValue {
162
- margin-right: 5px;
163
- max-width: 80%;
164
- }
165
- `;
166
-
167
- Wrapper.defaultProps = {
168
- theme: defaultThemeColor,
169
- };
170
-
171
- const LabelWrapper = styled.div`
172
- // Default style
173
- display: flex;
174
-
175
- //Set the styles from the default styles object
176
- ${({ inBuiltCss, labelWrapperStyle }) => {
177
- return getDefaultStyles(inBuiltCss, labelWrapperStyle);
178
- }}
179
- // custom styles
180
- ${({ customLabelStyles }) => customLabelStyles}
181
- `;
182
- const IconDiv = styled.div`
183
- margin-left: 6px;
184
- margin-top: -14px;
185
- cursor: pointer;
186
- `;
187
-
188
- const LeftIcon = ({ getValue, children, ...props }) => {
189
- const len = getValue().length;
190
-
191
- return (
192
- <components.ValueContainer {...props}>
193
- {/* {leftIcon === '' ? null : (
194
-
195
- <div style={{ marginRight: '6px', marginTop: '-6px' }}><Icon icon={leftIcon} color={leftIconColor} size={leftIconSize} /></div>
196
-
197
- )} */}
198
-
199
- {children}
200
- {len > 1 && <span className={`text-more-alt`}>&amp; {len - 1} more</span>}
201
- </components.ValueContainer>
202
- );
203
- };
204
-
205
- export const DropdownSelect = ({
206
- label,
207
- labelStyle,
208
- optionArr,
209
- selectedValue,
210
- setSelectedValue,
211
- placeHolder,
212
- isClearable,
213
- isValid,
214
- height,
215
- fontSize,
216
- loadOptions,
217
- onInputChange,
218
- clearSelected,
219
- customWrapperStyles,
220
- customLabelStyles,
221
- isRequired,
222
- dropdownType,
223
- isDisabled,
224
- isLoading,
225
- id,
226
- iconName,
227
- iconColor,
228
- iconSize,
229
- showIndicator,
230
- leftIcon,
231
- leftIconColor,
232
- leftIconSize,
233
- ...props
234
- }) => {
235
- const activeTheme = useTheme() || defaultThemeColor;
236
-
237
- const DropdownIndicator = (p) => {
238
- const dropdown = (
239
- <components.DropdownIndicator {...p}>
240
- <IconDiv>
241
- <Icon icon={iconName} color={iconColor} size={iconSize} />
242
- </IconDiv>
243
- </components.DropdownIndicator>
244
- );
245
- return showIndicator === true ? dropdown : null;
246
- };
247
-
248
- const ClearIndicator = (p) => {
249
- return (
250
- <components.ClearIndicator {...p}>
251
- {isClearable ? (
252
- <IconDiv
253
- onClick={() => {
254
- clearSelected();
255
- p.clearValue();
256
- }}
257
- >
258
- <Icon icon='cross-icon' color={'black'} size={8} />
259
- </IconDiv>
260
- ) : null}
261
- </components.ClearIndicator>
262
- );
263
- };
264
-
265
- const Option = (p) => {
266
- const checkboxStyle = {
267
- width: '15px',
268
- height: '15px',
269
- borderRadius: '2px',
270
- padding: '4px',
271
- fontSize: '8px',
272
- lineHeight: '10px',
273
- minWidth: '15px',
274
- minHeight: '15px',
275
- };
276
- const checked = (
277
- <div
278
- style={{
279
- ...checkboxStyle,
280
- backgroundColor: p?.data?.color ?? activeTheme.primary['primary-1'],
281
- }}
282
- >
283
- <Icon icon='check-icon' color='white' />
284
- </div>
285
- );
286
- const unchecked = (
287
- <div style={{ ...checkboxStyle, backgroundColor: '#e0e7ff' }}></div>
288
- );
289
- return (
290
- <components.Option {...p}>
291
- <div
292
- style={{
293
- display: 'flex',
294
- justifyContent: 'start',
295
- alignItems: 'center',
296
- width: '100%',
297
- }}
298
- >
299
- {p.isSelected ? checked : unchecked}
300
- <div className='text-main-alt' style={{ marginLeft: '10px' }}>
301
- {p.label}
302
- </div>
303
- </div>
304
- </components.Option>
305
- );
306
- };
307
-
308
- const MultiValue = ({ index, ...p }) => {
309
- const firstSelected = p?.data?.label || 'Select';
310
- return (
311
- !index && <span className='text-main-alt-value'>{firstSelected}</span>
312
- );
313
- };
314
-
315
- const stylesComp = {
316
- control: (base, state) => ({
317
- ...base,
318
- border: !isValid
319
- ? '1px solid ' + activeTheme.ui['error']
320
- : '1px solid ' + activeTheme.border,
321
- minWidth: '226px',
322
- height: `${height}px`,
323
- minHeight: `${height}px`,
324
- boxShadow: (state.isSelected || state.isFocused) && 'none',
325
- }),
326
- placeholder: (base) => ({
327
- ...base,
328
- fontSize: fontSize + 'px',
329
- marginLeft: '0px',
330
- }),
331
- dropdownIndicator: (base) => ({
332
- ...base,
333
- height: `${height}px`,
334
- display: 'flex',
335
- justifyContent: 'center',
336
- alignItems: 'center',
337
- paddingLeft: '0px',
338
- }),
339
- clearIndicator: (base) => ({
340
- ...base,
341
- height: `${height}px`,
342
- display: 'flex',
343
- justifyContent: 'center',
344
- alignItems: 'center',
345
- paddingLeft: '0px',
346
- }),
347
- valueContainer: (base) => ({
348
- ...base,
349
- display: 'flex',
350
- justifyContent: 'space-between',
351
- fontSize: fontSize + 'px',
352
- }),
353
- indicatorsContainer: (base) => ({
354
- ...base,
355
- padding: 0,
356
- height: `${height}px`,
357
- }),
358
- menu: (base) => ({
359
- ...base,
360
- border: 'none',
361
- marginTop: '1px',
362
- borderTopRightRadius: '0px',
363
- borderTopLeftRadius: '0px',
364
- outline: 'none',
365
- boxShadow: '0px 6px 20px rgba(56, 66, 100, 0.15)',
366
- borderRadius: '4.32px',
367
- fontSize: fontSize + 'px',
368
- width: '100%',
369
- minWidth: '226px',
370
- }),
371
- singleValue: (base) => ({
372
- ...base,
373
- fontSize: fontSize + 'px',
374
- marginLeft: '0px',
375
- width: 'auto',
376
- }),
377
- multiValue: (base) => ({
378
- ...base,
379
- marginLeft: '0px',
380
- width: 'auto',
381
- }),
382
- input: (base) => ({
383
- ...base,
384
- fontSize: fontSize + 'px',
385
- }),
386
- option: (provided, state) => ({
387
- ...provided,
388
- backgroundColor:
389
- state.isSelected || state.isFocused
390
- ? activeTheme.neutral['neutral-5']
391
- : activeTheme.bgColor,
392
- padding: '10px',
393
- cursor: 'pointer',
394
- color: '#081348',
395
- width: 'inherit',
396
- }),
397
-
398
- ...props.styles,
399
- };
400
- return (
401
- <Wrapper
402
- style={customWrapperStyles}
403
- isValid={isValid}
404
- fontSize={fontSize}
405
- theme={activeTheme}
406
- >
407
- {label && (
408
- <LabelWrapper
409
- inBuiltCss={defaultStyles}
410
- labelWrapperStyle={'selectComp-label-wrapper'}
411
- style={customLabelStyles}
412
- >
413
- <Label
414
- customStyles={labelStyle}
415
- type={'label-text'}
416
- text={label}
417
- style={{ marginBottom: '7px', paddingBottom: '0px' }}
418
- />
419
- {isRequired && (
420
- <div
421
- style={{
422
- marginLeft: '4px',
423
- color: `${activeTheme.ui['error']}`,
424
- }}
425
- >
426
- *
427
- </div>
428
- )}
429
- </LabelWrapper>
430
- )}
431
- {dropdownType === 'multiSelect' ? (
432
- <Select
433
- components={{
434
- DropdownIndicator,
435
- MultiValue,
436
- Option,
437
- ValueContainer: LeftIcon,
438
- // ValueContainer,
439
- IndicatorSeparator: () => null,
440
- ClearIndicator,
441
- }}
442
- className='select-manage-page'
443
- classNamePrefix='new-select'
444
- name={'select-dropdown'}
445
- onChange={setSelectedValue}
446
- placeholder={placeHolder}
447
- value={selectedValue}
448
- options={optionArr}
449
- styles={stylesComp}
450
- isMulti={true}
451
- isDisabled={isDisabled}
452
- hideSelectedOptions={false}
453
- closeMenuOnSelect={false}
454
- isSearchable={true}
455
- isLoading={isLoading}
456
- id={id}
457
- isClearable={isClearable}
458
- {...props}
459
- />
460
- ) : dropdownType === 'asyncSingleSelect' ? (
461
- <AsyncSelect
462
- loadOptions={loadOptions}
463
- defaultOptions
464
- onInputChange={onInputChange}
465
- styles={stylesComp}
466
- components={{
467
- DropdownIndicator,
468
- ValueContainer: LeftIcon,
469
- // ValueContainer,
470
-
471
- IndicatorSeparator: () => null,
472
- ClearIndicator,
473
- }}
474
- className='select-manage-page'
475
- classNamePrefix='new-select'
476
- name={'select-dropdown'}
477
- placeholder={placeHolder}
478
- onChange={setSelectedValue}
479
- isLoading={isLoading}
480
- isDisabled={isDisabled}
481
- id={id}
482
- isClearable={isClearable}
483
- {...props}
484
- />
485
- ) : dropdownType === 'asyncMultiSelect' ? (
486
- <AsyncSelect
487
- components={{
488
- DropdownIndicator,
489
- MultiValue,
490
- ValueContainer: LeftIcon,
491
- // ValueContainer,
492
- Option,
493
- IndicatorSeparator: () => null,
494
- ClearIndicator,
495
- }}
496
- className='select-manage-page'
497
- classNamePrefix='new-select'
498
- name={'select-dropdown'}
499
- onChange={setSelectedValue}
500
- placeholder={placeHolder}
501
- styles={stylesComp}
502
- isMulti={true}
503
- isDisabled={isDisabled}
504
- hideSelectedOptions={false}
505
- closeMenuOnSelect={false}
506
- isSearchable={true}
507
- isLoading={isLoading}
508
- loadOptions={loadOptions}
509
- defaultOptions
510
- onInputChange={onInputChange}
511
- id={id}
512
- isClearable={isClearable}
513
- {...props}
514
- />
515
- ) : (
516
- <Select
517
- components={{
518
- DropdownIndicator,
519
- ValueContainer: LeftIcon,
520
- // ValueContainer,
521
- IndicatorSeparator: () => null,
522
- ClearIndicator,
523
- }}
524
- className='select-manage-page'
525
- classNamePrefix='new-select'
526
- name={'select-dropdown'}
527
- options={optionArr}
528
- placeholder={placeHolder}
529
- isDisabled={isDisabled}
530
- value={{
531
- value: selectedValue ? selectedValue.value : '',
532
- label: selectedValue ? selectedValue.label : '',
533
- }}
534
- styles={stylesComp}
535
- onChange={setSelectedValue}
536
- isLoading={isLoading}
537
- id={id}
538
- isClearable={isClearable}
539
- {...props}
540
- />
541
- )}
542
- </Wrapper>
543
- );
544
- };
545
-
546
- DropdownSelect.propTypes = {
547
- /**
548
- * Label of SelectBox
549
- */
550
- label: PropTypes.string,
551
- /**
552
- * Label Style of SelectBox
553
- */
554
- labelStyle: PropTypes.object,
555
- /**
556
- * SelectBox Options
557
- */
558
- optionArr: PropTypes.array,
559
- /**
560
- * SelectBox Selected value. This is a array of object must be with this format:
561
- [{
562
- label:string,
563
- value:string
564
- }]
565
- */
566
- selectedValue: PropTypes.object,
567
- /**
568
- * Function to set selected value
569
- */
570
- setSelectedValue: PropTypes.func,
571
- /**
572
- * SelectBox Placeholder
573
- */
574
- placeHolder: PropTypes.string,
575
- /**
576
- * SelectBox Placeholder's font size
577
- */
578
- fontSize: PropTypes.number,
579
- /**
580
- * This Function will be called if cross button pressed
581
- */
582
- clearSelected: PropTypes.func,
583
- /**
584
- * callback function to get value
585
- */
586
- loadOptions: PropTypes.func,
587
- /**
588
- * onchange function
589
- */
590
- onInputChange: PropTypes.func,
591
- /**
592
- * wrapper styles
593
- */
594
- customWrapperStyles: PropTypes.object,
595
- /**
596
- * label styles
597
- */
598
- customLabelStyles: PropTypes.object,
599
- /**
600
- * Mandatory or not
601
- */
602
- isRequired: PropTypes.bool,
603
- /**
604
- * default dropdown type
605
- */
606
- dropdownType: PropTypes.string,
607
- /**
608
- * disabled or not
609
- */
610
- isDisabled: PropTypes.bool,
611
- /**
612
- * show loader or not
613
- */
614
- isLoading: PropTypes.bool,
615
- /**
616
- * valid or not
617
- */
618
- isValid: PropTypes.bool,
619
- /**
620
- * height of the component
621
- */
622
- height: PropTypes.number,
623
- /**
624
- * clearable or not
625
- */
626
- isClearable: PropTypes.bool,
627
- /**
628
- * id of the select
629
- */
630
- id: PropTypes.string,
631
- /**
632
- * iconName of the select
633
- */
634
- iconName: PropTypes.string,
635
- /**
636
- * iconColor of the select
637
- */
638
- iconColor: PropTypes.string,
639
- /**
640
- * iconSize of the select
641
- */
642
- iconSize: PropTypes.number,
643
- /**
644
- * leftIcon of the select
645
- */
646
- leftIcon: PropTypes.string,
647
- /**
648
- * iconColor of the select
649
- */
650
- leftIconColor: PropTypes.string,
651
- /**
652
- * iconSize of the select
653
- */
654
- leftIconSize: PropTypes.number,
655
- /**
656
- * to show or hide indicator
657
- */
658
- showIndicator: PropTypes.bool,
659
- };
660
-
661
- DropdownSelect.defaultProps = {
662
- label: '',
663
- labelStyle: {},
664
- optionArr: [],
665
- selectedValue: {},
666
- setSelectedValue: undefined,
667
- placeHolder: 'Select an option',
668
- isValid: true,
669
- isClearable: false,
670
- height: 31,
671
- fontSize: 14,
672
- loadOptions: () => { },
673
- onInputChange: () => { },
674
- clearSelected: () => { },
675
- customWrapperStyles: () => { },
676
- customLabelStyles: () => { },
677
- isRequired: false,
678
- dropdownType: 'singleSelect',
679
- isDisabled: false,
680
- isLoading: false,
681
- id: '',
682
- iconName: 'triangle-down',
683
- iconColor: 'black',
684
- iconSize: 8,
685
- leftIcon: '',
686
- leftIconColor: 'black',
687
- leftIconSize: 10,
688
- showIndicator: true,
689
- };