groundfloor-react-ui 1.0.21 → 1.2.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.
- package/components/Accordion/Accordion.js +4 -1
- package/components/Accordion/AccordionSB.js +4 -0
- package/components/Accordion/AccordionSBfooter.js +4 -0
- package/components/ArrowBar/ArrowBar.js +1 -1
- package/components/Avatar/AvatarSBfooter.js +40 -6
- package/components/Breadcrumb/Breadcrumb.js +18 -0
- package/components/Button/PrimaryButton.js +8 -0
- package/components/Button/SecondaryButton.js +7 -0
- package/components/Button/TinyButton.js +8 -2
- package/components/DesignComponent/StyledComponent/StyledComponent.js +21 -7
- package/components/Form/FormComponent.js +9 -11
- package/components/Inputs/CheckBoxInput.js +1 -0
- package/components/Inputs/ColorInput.js +144 -0
- package/components/Inputs/DropdownSelect.js +57 -13
- package/components/Inputs/DropzoneInput.js +7 -0
- package/components/Inputs/NumericInput.js +7 -0
- package/components/Inputs/PasswordInput.js +21 -5
- package/components/Inputs/RadioInput.js +22 -3
- package/components/Inputs/SearchInput.js +2 -1
- package/components/Inputs/Signature.js +8 -0
- package/components/Inputs/TextArea.js +7 -0
- package/components/Inputs/TextInput.js +10 -3
- package/components/Inputs/TimeInput.js +7 -1
- package/components/Inputs/ToggleSwitch.js +6 -0
- package/components/Inputs/index.js +10 -9
- package/components/Modal/ModalComp.js +1 -1
- package/components/Tooltip/Tooltip.js +394 -285
- package/components/constants/defaultStyle.js +32 -0
- package/dist/index.es.js +1377 -1307
- package/dist/index.js +1389 -1319
- package/index.js +39 -39
- package/package.json +1 -1
|
@@ -116,11 +116,13 @@ const Wrapper = styled.div`
|
|
|
116
116
|
|
|
117
117
|
.text-main-alt {
|
|
118
118
|
color:${({ theme }) => theme.textColor} !important;
|
|
119
|
-
margin-right:
|
|
119
|
+
margin-right: 0px;
|
|
120
120
|
}
|
|
121
121
|
.text-more-alt{
|
|
122
122
|
font-size:12px;
|
|
123
123
|
color: ${({ theme }) => theme.neutral['neutral-2']};
|
|
124
|
+
padding-right: 0px;
|
|
125
|
+
margin-right: 0px;
|
|
124
126
|
|
|
125
127
|
}
|
|
126
128
|
.css-mohuvp-dummyInput-DummyInput{
|
|
@@ -191,7 +193,7 @@ export const DropdownSelect = ({
|
|
|
191
193
|
isDisabled,
|
|
192
194
|
|
|
193
195
|
isLoading,
|
|
194
|
-
|
|
196
|
+
id,
|
|
195
197
|
...props
|
|
196
198
|
}) => {
|
|
197
199
|
|
|
@@ -199,7 +201,17 @@ export const DropdownSelect = ({
|
|
|
199
201
|
|
|
200
202
|
const DropdownIndicator = (p) => {
|
|
201
203
|
return (
|
|
202
|
-
<components.DropdownIndicator
|
|
204
|
+
<components.DropdownIndicator {...p}>
|
|
205
|
+
<IconDiv>
|
|
206
|
+
<Icon icon='triangle-down' color={'black'} size={8} />
|
|
207
|
+
</IconDiv>
|
|
208
|
+
</components.DropdownIndicator>
|
|
209
|
+
);
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
const ClearIndicator = (p) => {
|
|
213
|
+
return (
|
|
214
|
+
<components.ClearIndicator {...p}>
|
|
203
215
|
{isClearable ? (
|
|
204
216
|
<IconDiv
|
|
205
217
|
onClick={() => {
|
|
@@ -210,10 +222,8 @@ export const DropdownSelect = ({
|
|
|
210
222
|
<Icon icon='cross-icon' color={'black'} size={8} />
|
|
211
223
|
</IconDiv>
|
|
212
224
|
) : null}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
</IconDiv>
|
|
216
|
-
</components.DropdownIndicator>
|
|
225
|
+
|
|
226
|
+
</components.ClearIndicator>
|
|
217
227
|
);
|
|
218
228
|
};
|
|
219
229
|
|
|
@@ -296,6 +306,16 @@ export const DropdownSelect = ({
|
|
|
296
306
|
display: 'flex',
|
|
297
307
|
justifyContent: 'center',
|
|
298
308
|
alignItems: 'center',
|
|
309
|
+
paddingLeft: '0px',
|
|
310
|
+
}),
|
|
311
|
+
clearIndicator: (base) => ({
|
|
312
|
+
...base,
|
|
313
|
+
height: `${height}px`,
|
|
314
|
+
display: 'flex',
|
|
315
|
+
justifyContent: 'center',
|
|
316
|
+
alignItems: 'center',
|
|
317
|
+
paddingLeft: '0px',
|
|
318
|
+
|
|
299
319
|
}),
|
|
300
320
|
valueContainer: (base) => ({
|
|
301
321
|
...base,
|
|
@@ -316,15 +336,20 @@ export const DropdownSelect = ({
|
|
|
316
336
|
boxShadow: '0px 6px 20px rgba(56, 66, 100, 0.15)',
|
|
317
337
|
borderRadius: '4.32px',
|
|
318
338
|
fontSize: fontSize + 'px',
|
|
339
|
+
width: '100%'
|
|
319
340
|
}),
|
|
320
341
|
singleValue: (base) => ({
|
|
321
342
|
...base,
|
|
322
343
|
fontSize: fontSize + 'px',
|
|
323
344
|
marginLeft: '0px',
|
|
345
|
+
width: 'auto'
|
|
346
|
+
|
|
324
347
|
}),
|
|
325
348
|
multiValue: (base) => ({
|
|
326
349
|
...base,
|
|
327
350
|
marginLeft: '0px',
|
|
351
|
+
width: 'auto'
|
|
352
|
+
|
|
328
353
|
}),
|
|
329
354
|
input: (base) => ({
|
|
330
355
|
...base,
|
|
@@ -337,6 +362,8 @@ export const DropdownSelect = ({
|
|
|
337
362
|
padding: '10px',
|
|
338
363
|
cursor: 'pointer',
|
|
339
364
|
color: '#081348',
|
|
365
|
+
width: '100%'
|
|
366
|
+
|
|
340
367
|
}),
|
|
341
368
|
...props.styles,
|
|
342
369
|
};
|
|
@@ -374,11 +401,12 @@ export const DropdownSelect = ({
|
|
|
374
401
|
Option,
|
|
375
402
|
ValueContainer,
|
|
376
403
|
IndicatorSeparator: () => null,
|
|
377
|
-
ClearIndicator
|
|
404
|
+
ClearIndicator,
|
|
378
405
|
}}
|
|
379
406
|
className='select-manage-page'
|
|
380
407
|
classNamePrefix='new-select'
|
|
381
408
|
name={'select-dropdown'}
|
|
409
|
+
id={id}
|
|
382
410
|
onChange={setSelectedValue}
|
|
383
411
|
placeholder={placeHolder}
|
|
384
412
|
value={selectedValue}
|
|
@@ -390,6 +418,8 @@ export const DropdownSelect = ({
|
|
|
390
418
|
closeMenuOnSelect={false}
|
|
391
419
|
isSearchable={true}
|
|
392
420
|
isLoading={isLoading}
|
|
421
|
+
isClearable={isClearable}
|
|
422
|
+
|
|
393
423
|
{...props}
|
|
394
424
|
/>
|
|
395
425
|
) : dropdownType === 'asyncSingleSelect' ? (
|
|
@@ -401,15 +431,18 @@ export const DropdownSelect = ({
|
|
|
401
431
|
components={{
|
|
402
432
|
DropdownIndicator,
|
|
403
433
|
IndicatorSeparator: () => null,
|
|
404
|
-
ClearIndicator
|
|
434
|
+
ClearIndicator,
|
|
405
435
|
}}
|
|
406
436
|
className='select-manage-page'
|
|
407
437
|
classNamePrefix='new-select'
|
|
408
438
|
name={'select-dropdown'}
|
|
439
|
+
id={id}
|
|
409
440
|
placeholder={placeHolder}
|
|
410
441
|
onChange={setSelectedValue}
|
|
411
442
|
isLoading={isLoading}
|
|
412
443
|
isDisabled={isDisabled}
|
|
444
|
+
isClearable={isClearable}
|
|
445
|
+
|
|
413
446
|
{...props}
|
|
414
447
|
/>
|
|
415
448
|
) : dropdownType === 'asyncMultiSelect' ? (
|
|
@@ -420,11 +453,12 @@ export const DropdownSelect = ({
|
|
|
420
453
|
ValueContainer,
|
|
421
454
|
Option,
|
|
422
455
|
IndicatorSeparator: () => null,
|
|
423
|
-
ClearIndicator
|
|
456
|
+
ClearIndicator,
|
|
424
457
|
}}
|
|
425
458
|
className='select-manage-page'
|
|
426
459
|
classNamePrefix='new-select'
|
|
427
460
|
name={'select-dropdown'}
|
|
461
|
+
id={id}
|
|
428
462
|
onChange={setSelectedValue}
|
|
429
463
|
placeholder={placeHolder}
|
|
430
464
|
styles={stylesComp}
|
|
@@ -437,6 +471,8 @@ export const DropdownSelect = ({
|
|
|
437
471
|
loadOptions={loadOptions}
|
|
438
472
|
defaultOptions
|
|
439
473
|
onInputChange={onInputChange}
|
|
474
|
+
isClearable={isClearable}
|
|
475
|
+
|
|
440
476
|
{...props}
|
|
441
477
|
/>
|
|
442
478
|
) : (
|
|
@@ -444,11 +480,12 @@ export const DropdownSelect = ({
|
|
|
444
480
|
components={{
|
|
445
481
|
DropdownIndicator,
|
|
446
482
|
IndicatorSeparator: () => null,
|
|
447
|
-
ClearIndicator
|
|
483
|
+
ClearIndicator,
|
|
448
484
|
}}
|
|
449
485
|
className='select-manage-page'
|
|
450
486
|
classNamePrefix='new-select'
|
|
451
487
|
name={'select-dropdown'}
|
|
488
|
+
id={id}
|
|
452
489
|
options={optionArr}
|
|
453
490
|
placeholder={placeHolder}
|
|
454
491
|
isDisabled={isDisabled}
|
|
@@ -459,6 +496,8 @@ export const DropdownSelect = ({
|
|
|
459
496
|
styles={stylesComp}
|
|
460
497
|
onChange={setSelectedValue}
|
|
461
498
|
isLoading={isLoading}
|
|
499
|
+
isClearable={isClearable}
|
|
500
|
+
|
|
462
501
|
{...props}
|
|
463
502
|
/>
|
|
464
503
|
)}
|
|
@@ -526,7 +565,7 @@ DropdownSelect.propTypes = {
|
|
|
526
565
|
/**
|
|
527
566
|
* default dropdown type
|
|
528
567
|
*/
|
|
529
|
-
dropdownType: PropTypes.
|
|
568
|
+
dropdownType: PropTypes.string,
|
|
530
569
|
/**
|
|
531
570
|
* disabled or not
|
|
532
571
|
*/
|
|
@@ -547,6 +586,10 @@ DropdownSelect.propTypes = {
|
|
|
547
586
|
* clearable or not
|
|
548
587
|
*/
|
|
549
588
|
isClearable: PropTypes.bool,
|
|
589
|
+
/**
|
|
590
|
+
* id of the select
|
|
591
|
+
*/
|
|
592
|
+
id: PropTypes.string,
|
|
550
593
|
|
|
551
594
|
};
|
|
552
595
|
|
|
@@ -569,5 +612,6 @@ DropdownSelect.defaultProps = {
|
|
|
569
612
|
isRequired: false,
|
|
570
613
|
dropdownType: 'singleSelect',
|
|
571
614
|
isDisabled: false,
|
|
572
|
-
isLoading: false
|
|
615
|
+
isLoading: false,
|
|
616
|
+
id: ''
|
|
573
617
|
};
|
|
@@ -125,6 +125,7 @@ export const DropzoneInput = ({
|
|
|
125
125
|
singleFile,
|
|
126
126
|
messageSize,
|
|
127
127
|
additionalText,
|
|
128
|
+
id,
|
|
128
129
|
...props
|
|
129
130
|
}) => {
|
|
130
131
|
const activeTheme = useTheme() || defaultThemeColor;
|
|
@@ -242,6 +243,7 @@ export const DropzoneInput = ({
|
|
|
242
243
|
<InputFile
|
|
243
244
|
ref={fileInputRef}
|
|
244
245
|
type='file'
|
|
246
|
+
id={id}
|
|
245
247
|
multiple={singleFile == true ? false : true}
|
|
246
248
|
onChange={onFilesAdded}
|
|
247
249
|
onClick={(e) => (e.target.value = null)}
|
|
@@ -426,6 +428,10 @@ DropzoneInput.propTypes = {
|
|
|
426
428
|
/**
|
|
427
429
|
* Plus icon after file name is for file from local and cloud icon is for file from server
|
|
428
430
|
*/
|
|
431
|
+
/**
|
|
432
|
+
* id of the file input
|
|
433
|
+
*/
|
|
434
|
+
id: PropTypes.string
|
|
429
435
|
};
|
|
430
436
|
|
|
431
437
|
DropzoneInput.defaultProps = {
|
|
@@ -440,4 +446,5 @@ DropzoneInput.defaultProps = {
|
|
|
440
446
|
customFileNameStyles: {},
|
|
441
447
|
messageSize: 100,
|
|
442
448
|
additionalText: '',
|
|
449
|
+
id: ''
|
|
443
450
|
};
|
|
@@ -96,6 +96,7 @@ export const NumericInput = ({
|
|
|
96
96
|
iconAfter,
|
|
97
97
|
onChange,
|
|
98
98
|
theme,
|
|
99
|
+
id,
|
|
99
100
|
...props
|
|
100
101
|
}) => {
|
|
101
102
|
const handleChange = (e) => {
|
|
@@ -118,6 +119,7 @@ export const NumericInput = ({
|
|
|
118
119
|
value={inputValue}
|
|
119
120
|
onChange={handleChange}
|
|
120
121
|
type='number'
|
|
122
|
+
id={id}
|
|
121
123
|
/>
|
|
122
124
|
<div className='input-icon'>{iconAfter}</div>
|
|
123
125
|
</TextBox>
|
|
@@ -147,6 +149,10 @@ NumericInput.propTypes = {
|
|
|
147
149
|
* custom style of input element
|
|
148
150
|
*/
|
|
149
151
|
inputStyle: PropTypes.object,
|
|
152
|
+
/**
|
|
153
|
+
* id of the number input
|
|
154
|
+
*/
|
|
155
|
+
id: PropTypes.string,
|
|
150
156
|
};
|
|
151
157
|
|
|
152
158
|
NumericInput.defaultProps = {
|
|
@@ -155,4 +161,5 @@ NumericInput.defaultProps = {
|
|
|
155
161
|
labelInline: false,
|
|
156
162
|
inputStyle: {},
|
|
157
163
|
inputValue: null,
|
|
164
|
+
id:''
|
|
158
165
|
};
|
|
@@ -43,7 +43,7 @@ TextWrapper.defaultProps = {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
const Input = styled.input`
|
|
46
|
-
width:
|
|
46
|
+
width: auto;
|
|
47
47
|
-webkit-text-security: ${({ showEye }) => showEye ? 'none' : 'disc'} ;
|
|
48
48
|
|
|
49
49
|
//Set the styles from the default styles object
|
|
@@ -94,6 +94,8 @@ export const PasswordInput = ({
|
|
|
94
94
|
labelInline,
|
|
95
95
|
isValid,
|
|
96
96
|
rulesStyle,
|
|
97
|
+
id,
|
|
98
|
+
showHideIcon,
|
|
97
99
|
...props
|
|
98
100
|
}) => {
|
|
99
101
|
const [showEye, setShowEye] = useState(false);
|
|
@@ -145,17 +147,20 @@ export const PasswordInput = ({
|
|
|
145
147
|
<Input
|
|
146
148
|
inputStyle={inputStyle}
|
|
147
149
|
type={'text'}
|
|
150
|
+
id={id}
|
|
148
151
|
showEye={showEye}
|
|
149
152
|
theme={theme}
|
|
150
153
|
defaultInputStyle={'input-wrapper'}
|
|
151
154
|
inBuiltCss={defaultStyles}
|
|
152
155
|
{...props}
|
|
153
156
|
/>
|
|
157
|
+
{showHideIcon === true ?
|
|
154
158
|
<div className='input-icon' onClick={() => setShowEye(!showEye)}>
|
|
155
|
-
|
|
156
|
-
|
|
159
|
+
{showEye ? <Icon icon='eye-show' /> : <Icon icon='eye-hide' />}
|
|
160
|
+
</div>: ''
|
|
161
|
+
}
|
|
157
162
|
</TextWrapper>
|
|
158
|
-
<div style={{ ...rulesStyle, marginLeft: '5px' }}>{passwordRules}</div>
|
|
163
|
+
{passwordRules ? <div style={{ ...rulesStyle, marginLeft: '5px' }}>{passwordRules}</div> : ''}
|
|
159
164
|
</div>
|
|
160
165
|
{errMsg.length > 0 && <div className='err-text'>{errMsg}</div>}
|
|
161
166
|
</Form>
|
|
@@ -208,6 +213,14 @@ PasswordInput.propTypes = {
|
|
|
208
213
|
* styles of password rules
|
|
209
214
|
*/
|
|
210
215
|
rulesStyle: PropTypes.object,
|
|
216
|
+
/**
|
|
217
|
+
* id of the password input
|
|
218
|
+
*/
|
|
219
|
+
id: PropTypes.string,
|
|
220
|
+
/**
|
|
221
|
+
* hide icon shows or not
|
|
222
|
+
*/
|
|
223
|
+
showHideIcon: PropTypes.bool,
|
|
211
224
|
};
|
|
212
225
|
|
|
213
226
|
PasswordInput.defaultProps = {
|
|
@@ -223,4 +236,7 @@ PasswordInput.defaultProps = {
|
|
|
223
236
|
inputStyle: {},
|
|
224
237
|
passwordRules: '',
|
|
225
238
|
rulesStyle: {},
|
|
226
|
-
|
|
239
|
+
id: '',
|
|
240
|
+
showHideIcon: true
|
|
241
|
+
};
|
|
242
|
+
|
|
@@ -93,6 +93,9 @@ const WrapperDiv = styled.div`
|
|
|
93
93
|
align-items: center;
|
|
94
94
|
display: flex;
|
|
95
95
|
gap: 10px;
|
|
96
|
+
|
|
97
|
+
// custom styles
|
|
98
|
+
${({ WrapperDivStyle }) => WrapperDivStyle}
|
|
96
99
|
`;
|
|
97
100
|
|
|
98
101
|
const ParentDiv = styled.div`
|
|
@@ -117,6 +120,7 @@ export const RadioInput = ({
|
|
|
117
120
|
inline,
|
|
118
121
|
defaultBorderColor,
|
|
119
122
|
defaultOptionColor,
|
|
123
|
+
WrapperDivStyle,
|
|
120
124
|
...props
|
|
121
125
|
}) => {
|
|
122
126
|
const activeTheme = useTheme() || defaultThemeColor;
|
|
@@ -128,7 +132,9 @@ export const RadioInput = ({
|
|
|
128
132
|
{options.map((item, i) => {
|
|
129
133
|
return (
|
|
130
134
|
<WrapperDiv
|
|
135
|
+
WrapperDivStyle={WrapperDivStyle}
|
|
131
136
|
key={i + Math.random() * 101}
|
|
137
|
+
id={item.id}
|
|
132
138
|
inline={inline}
|
|
133
139
|
onClick={() => {
|
|
134
140
|
!item?.disabled && onChange(item.value);
|
|
@@ -206,15 +212,27 @@ RadioInput.propTypes = {
|
|
|
206
212
|
inline: PropTypes.bool,
|
|
207
213
|
/**
|
|
208
214
|
* RadioButton Contents i.e:-
|
|
209
|
-
[
|
|
210
|
-
|
|
211
|
-
|
|
215
|
+
[
|
|
216
|
+
{
|
|
217
|
+
label: 'First Radio Button',
|
|
218
|
+
value: 'first',
|
|
219
|
+
disabled: true,
|
|
220
|
+
disabledColor: '#ae3232',
|
|
221
|
+
id: '1'
|
|
222
|
+
},
|
|
223
|
+
{ label: 'Second Radio Button', value: 'second', id: '2' },
|
|
224
|
+
{ label: 'Third Radio Button', value: 'third', id: '3' },
|
|
225
|
+
]
|
|
212
226
|
*/
|
|
213
227
|
options: PropTypes.array,
|
|
214
228
|
/**
|
|
215
229
|
* RadioButton style object
|
|
216
230
|
*/
|
|
217
231
|
optionStyle: PropTypes.object,
|
|
232
|
+
/**
|
|
233
|
+
* RadioButton wraperdiv style object
|
|
234
|
+
*/
|
|
235
|
+
WrapperDivStyle: PropTypes.object,
|
|
218
236
|
/**
|
|
219
237
|
* RadioButton checked value
|
|
220
238
|
*/
|
|
@@ -269,4 +287,5 @@ RadioInput.defaultProps = {
|
|
|
269
287
|
radioInnerCircleStyle: {},
|
|
270
288
|
width: '14px',
|
|
271
289
|
height: '14px',
|
|
290
|
+
WrapperDivStyle: {}
|
|
272
291
|
};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Icon } from '../Icon';
|
|
3
3
|
import { TextInput } from './TextInput';
|
|
4
4
|
|
|
5
|
-
export const SearchInput = ({ label, placeholder, handleSearch, searchInput, customStylesForm, customStyleObject, textBoxStyle, ...props }) => {
|
|
5
|
+
export const SearchInput = ({ label, placeholder, handleSearch, searchInput, customStylesForm, customStyleObject, textBoxStyle, id, ...props }) => {
|
|
6
6
|
|
|
7
7
|
return <TextInput
|
|
8
8
|
iconAfter={<Icon icon='magnifier-icon' />}
|
|
@@ -11,6 +11,7 @@ export const SearchInput = ({ label, placeholder, handleSearch, searchInput, cus
|
|
|
11
11
|
placeholder={placeholder}
|
|
12
12
|
ref={searchInput}
|
|
13
13
|
onChange={handleSearch}
|
|
14
|
+
id={id}
|
|
14
15
|
{...props}
|
|
15
16
|
/>
|
|
16
17
|
}
|
|
@@ -148,6 +148,7 @@ export const SignatureInput = ({
|
|
|
148
148
|
setValueForSignatureDrawing,
|
|
149
149
|
imageURL,
|
|
150
150
|
setImageURL,
|
|
151
|
+
id,
|
|
151
152
|
...props
|
|
152
153
|
}) => {
|
|
153
154
|
const activeTheme = useTheme() || defaultThemeColor;
|
|
@@ -264,6 +265,7 @@ export const SignatureInput = ({
|
|
|
264
265
|
customInputStyle={customInputStyle}
|
|
265
266
|
onBlur={() => setIsMyInputFocused(false)}
|
|
266
267
|
onFocus={() => setIsMyInputFocused(true)}
|
|
268
|
+
id={id}
|
|
267
269
|
value={value}
|
|
268
270
|
defaultColor={defaultColor}
|
|
269
271
|
theme={activeTheme}
|
|
@@ -280,6 +282,7 @@ export const SignatureInput = ({
|
|
|
280
282
|
>
|
|
281
283
|
<SignaturePad
|
|
282
284
|
ref={pad}
|
|
285
|
+
id={id}
|
|
283
286
|
redrawOnResize
|
|
284
287
|
height={75}
|
|
285
288
|
options={{ minWidth: 1, maxWidth: 1, penColor: '#444444' }}
|
|
@@ -346,6 +349,10 @@ SignatureInput.propTypes = {
|
|
|
346
349
|
* Function that sets Image url of the Signature drawing
|
|
347
350
|
*/
|
|
348
351
|
setImageURL: PropTypes.func,
|
|
352
|
+
/**
|
|
353
|
+
* id of the signature input
|
|
354
|
+
*/
|
|
355
|
+
id: PropTypes.string,
|
|
349
356
|
};
|
|
350
357
|
|
|
351
358
|
SignatureInput.defaultProps = {
|
|
@@ -358,4 +365,5 @@ SignatureInput.defaultProps = {
|
|
|
358
365
|
imageURL: '',
|
|
359
366
|
setImageURL: () => { },
|
|
360
367
|
setValueForSignatureDrawing: () => { },
|
|
368
|
+
id: ''
|
|
361
369
|
};
|
|
@@ -82,6 +82,7 @@ export const TextArea = React.forwardRef(
|
|
|
82
82
|
isValid,
|
|
83
83
|
rows,
|
|
84
84
|
cols,
|
|
85
|
+
id,
|
|
85
86
|
...props
|
|
86
87
|
},
|
|
87
88
|
ref
|
|
@@ -137,6 +138,7 @@ export const TextArea = React.forwardRef(
|
|
|
137
138
|
cols={cols}
|
|
138
139
|
rows={rows}
|
|
139
140
|
inBuiltCss={defaultStyles}
|
|
141
|
+
id={id}
|
|
140
142
|
{...props}
|
|
141
143
|
size='1'
|
|
142
144
|
/>
|
|
@@ -189,6 +191,10 @@ TextArea.propTypes = {
|
|
|
189
191
|
* custom style of textbox label
|
|
190
192
|
*/
|
|
191
193
|
inputStyle: PropTypes.object,
|
|
194
|
+
/**
|
|
195
|
+
* id of the textarea input
|
|
196
|
+
*/
|
|
197
|
+
id: PropTypes.string,
|
|
192
198
|
};
|
|
193
199
|
|
|
194
200
|
TextArea.defaultProps = {
|
|
@@ -204,4 +210,5 @@ TextArea.defaultProps = {
|
|
|
204
210
|
inputStyle: {},
|
|
205
211
|
rows: 3,
|
|
206
212
|
// cols: 100
|
|
213
|
+
id: ''
|
|
207
214
|
};
|
|
@@ -37,7 +37,7 @@ const TextWrapper = styled.div`
|
|
|
37
37
|
`;
|
|
38
38
|
|
|
39
39
|
const Input = styled.input`
|
|
40
|
-
width:
|
|
40
|
+
width: 98%;
|
|
41
41
|
//Set the styles from the default styles object
|
|
42
42
|
${({ inBuiltCss, defaultInputStyle }) => {
|
|
43
43
|
return getDefaultStyles(inBuiltCss, defaultInputStyle);
|
|
@@ -85,6 +85,7 @@ export const TextInput = ({
|
|
|
85
85
|
type,
|
|
86
86
|
theme,
|
|
87
87
|
isDisabled,
|
|
88
|
+
id,
|
|
88
89
|
...props
|
|
89
90
|
}) => {
|
|
90
91
|
|
|
@@ -130,6 +131,7 @@ export const TextInput = ({
|
|
|
130
131
|
inputStyle={inputStyle}
|
|
131
132
|
type={type}
|
|
132
133
|
theme={theme}
|
|
134
|
+
id={id}
|
|
133
135
|
defaultInputStyle={'input-wrapper'}
|
|
134
136
|
isDisabled={isDisabled}
|
|
135
137
|
disabled={isDisabled}
|
|
@@ -195,7 +197,11 @@ TextInput.propTypes = {
|
|
|
195
197
|
* receives theme object
|
|
196
198
|
*/
|
|
197
199
|
theme: PropTypes.object,
|
|
198
|
-
|
|
200
|
+
/**
|
|
201
|
+
* id of the text input
|
|
202
|
+
*/
|
|
203
|
+
id: PropTypes.string,
|
|
204
|
+
|
|
199
205
|
};
|
|
200
206
|
|
|
201
207
|
Input.defaultProps = {
|
|
@@ -224,5 +230,6 @@ TextInput.defaultProps = {
|
|
|
224
230
|
labelStyle: {},
|
|
225
231
|
inputStyle: {},
|
|
226
232
|
type: 'text',
|
|
227
|
-
isDisabled: false
|
|
233
|
+
isDisabled: false,
|
|
234
|
+
id: ''
|
|
228
235
|
};
|
|
@@ -89,6 +89,7 @@ export const TimeInput = ({
|
|
|
89
89
|
minute,
|
|
90
90
|
period,
|
|
91
91
|
onChange,
|
|
92
|
+
id,
|
|
92
93
|
...props
|
|
93
94
|
}) => {
|
|
94
95
|
const activeTheme = useTheme() || defaultThemeColor;
|
|
@@ -121,7 +122,7 @@ export const TimeInput = ({
|
|
|
121
122
|
{label}
|
|
122
123
|
</Label>
|
|
123
124
|
<div>
|
|
124
|
-
<TextBox theme={activeTheme} {...props}>
|
|
125
|
+
<TextBox theme={activeTheme} id={id} {...props}>
|
|
125
126
|
<Input theme={activeTheme} value={hour} onChange={hourChange} />
|
|
126
127
|
:
|
|
127
128
|
<Input theme={activeTheme} value={minute} onChange={minuteChange} />
|
|
@@ -166,6 +167,10 @@ TimeInput.propTypes = {
|
|
|
166
167
|
* Error Message
|
|
167
168
|
*/
|
|
168
169
|
errMsg: PropTypes.string,
|
|
170
|
+
/**
|
|
171
|
+
* id of the time input
|
|
172
|
+
*/
|
|
173
|
+
id: PropTypes.string,
|
|
169
174
|
};
|
|
170
175
|
|
|
171
176
|
TimeInput.defaultProps = {
|
|
@@ -177,4 +182,5 @@ TimeInput.defaultProps = {
|
|
|
177
182
|
labelInline: false,
|
|
178
183
|
isValid: true,
|
|
179
184
|
errMsg: '',
|
|
185
|
+
id: ''
|
|
180
186
|
};
|
|
@@ -70,6 +70,7 @@ export const ToggleSwitch = ({
|
|
|
70
70
|
trueLabel,
|
|
71
71
|
falseLabel,
|
|
72
72
|
optionStyle,
|
|
73
|
+
id,
|
|
73
74
|
...props
|
|
74
75
|
}) => {
|
|
75
76
|
const activeTheme = useTheme() || defaultThemeColor;
|
|
@@ -140,6 +141,10 @@ ToggleSwitch.propTypes = {
|
|
|
140
141
|
* label when toggle state is not checked
|
|
141
142
|
* */
|
|
142
143
|
falseLabel: PropTypes.string,
|
|
144
|
+
/**
|
|
145
|
+
* id of the Toggle switch
|
|
146
|
+
*/
|
|
147
|
+
id: PropTypes.string,
|
|
143
148
|
};
|
|
144
149
|
|
|
145
150
|
ToggleSwitch.defaultProps = {
|
|
@@ -148,4 +153,5 @@ ToggleSwitch.defaultProps = {
|
|
|
148
153
|
falseLabel: 'No',
|
|
149
154
|
customSwitchStyle: {},
|
|
150
155
|
customToggleBoxStyle: {},
|
|
156
|
+
id: ''
|
|
151
157
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
export * from './TextInput';
|
|
2
1
|
export * from './CheckBoxInput';
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './ToggleSwitch';
|
|
5
|
-
export * from './RadioInput';
|
|
6
|
-
export * from './DropzoneInput';
|
|
2
|
+
export * from './ColorInput';
|
|
7
3
|
export * from './DateSelect';
|
|
8
|
-
export * from './Signature';
|
|
9
|
-
export * from './TextArea';
|
|
10
|
-
export * from './NumericInput';
|
|
11
4
|
export * from './DropdownSelect';
|
|
5
|
+
export * from './DropzoneInput';
|
|
6
|
+
export * from './NumericInput';
|
|
7
|
+
export * from './PasswordInput';
|
|
8
|
+
export * from './RadioInput';
|
|
12
9
|
export * from './SearchInput';
|
|
13
|
-
export * from './
|
|
10
|
+
export * from './Signature';
|
|
11
|
+
export * from './TextArea';
|
|
12
|
+
export * from './TextInput';
|
|
13
|
+
export * from './TimeInput';
|
|
14
|
+
export * from './ToggleSwitch';
|
|
14
15
|
|