groundfloor-react-ui 1.0.22 → 1.2.1

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 (32) hide show
  1. package/components/Accordion/Accordion.js +4 -1
  2. package/components/Accordion/AccordionSB.js +4 -0
  3. package/components/Accordion/AccordionSBfooter.js +4 -0
  4. package/components/ArrowBar/ArrowBar.js +1 -1
  5. package/components/Avatar/AvatarSBfooter.js +40 -6
  6. package/components/Breadcrumb/Breadcrumb.js +18 -0
  7. package/components/Button/PrimaryButton.js +8 -0
  8. package/components/Button/SecondaryButton.js +7 -0
  9. package/components/Button/TinyButton.js +8 -2
  10. package/components/DesignComponent/StyledComponent/StyledComponent.js +21 -7
  11. package/components/Form/FormComponent.js +9 -11
  12. package/components/Inputs/CheckBoxInput.js +1 -0
  13. package/components/Inputs/ColorInput.js +144 -0
  14. package/components/Inputs/DropdownSelect.js +140 -13
  15. package/components/Inputs/DropzoneInput.js +7 -0
  16. package/components/Inputs/NumericInput.js +7 -0
  17. package/components/Inputs/PasswordInput.js +21 -5
  18. package/components/Inputs/RadioInput.js +22 -3
  19. package/components/Inputs/SearchInput.js +2 -1
  20. package/components/Inputs/Signature.js +8 -0
  21. package/components/Inputs/TextArea.js +7 -0
  22. package/components/Inputs/TextInput.js +9 -2
  23. package/components/Inputs/TimeInput.js +7 -1
  24. package/components/Inputs/ToggleSwitch.js +6 -0
  25. package/components/Inputs/index.js +10 -9
  26. package/components/Modal/ModalComp.js +1 -1
  27. package/components/Tooltip/Tooltip.js +394 -285
  28. package/components/constants/defaultStyle.js +32 -0
  29. package/dist/index.es.js +1377 -1307
  30. package/dist/index.js +1390 -1320
  31. package/index.js +39 -39
  32. 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: 2px;
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{
@@ -171,6 +173,7 @@ const IconDiv = styled.div`
171
173
  `;
172
174
 
173
175
  export const DropdownSelect = ({
176
+
174
177
  label,
175
178
  labelStyle,
176
179
  optionArr,
@@ -191,15 +194,37 @@ export const DropdownSelect = ({
191
194
  isDisabled,
192
195
 
193
196
  isLoading,
194
-
197
+ id,
198
+ iconName,
199
+ iconColor,
200
+ iconSize,
201
+ showIndicator,
202
+ leftIcon,
203
+ leftIconColor,
204
+ leftIconSize,
195
205
  ...props
196
206
  }) => {
197
207
 
198
208
  const activeTheme = useTheme() || defaultThemeColor
199
209
 
200
210
  const DropdownIndicator = (p) => {
211
+
212
+ const drpdwn = <components.DropdownIndicator {...p}>
213
+
214
+
215
+ <IconDiv>
216
+ <Icon icon={iconName} color={iconColor} size={iconSize} />
217
+ {/* <Icon icon='triangle-down' color={'black'} size={8} /> */}
218
+ </IconDiv>
219
+
220
+ </components.DropdownIndicator>
221
+ return showIndicator === true ? drpdwn : null;
222
+
223
+ };
224
+
225
+ const ClearIndicator = (p) => {
201
226
  return (
202
- <components.DropdownIndicator {...p}>
227
+ <components.ClearIndicator {...p}>
203
228
  {isClearable ? (
204
229
  <IconDiv
205
230
  onClick={() => {
@@ -210,10 +235,22 @@ export const DropdownSelect = ({
210
235
  <Icon icon='cross-icon' color={'black'} size={8} />
211
236
  </IconDiv>
212
237
  ) : null}
213
- <IconDiv>
214
- <Icon icon='triangle-down' color={'black'} size={8} />
238
+
239
+ </components.ClearIndicator>
240
+ );
241
+
242
+ };
243
+
244
+ const LeftIcon = (props) => {
245
+ return (
246
+ <components.ValueContainer {...props}>
247
+ {leftIcon === '' ? null : <IconDiv style={{ paddingTop: '10px', paddingRight: '8px', marginLeft: '0', marginTop: '-16px' }}>
248
+ <Icon icon={leftIcon} color={leftIconColor} size={leftIconSize} />
215
249
  </IconDiv>
216
- </components.DropdownIndicator>
250
+ }
251
+
252
+ {props.children}
253
+ </components.ValueContainer>
217
254
  );
218
255
  };
219
256
 
@@ -225,6 +262,8 @@ export const DropdownSelect = ({
225
262
  padding: '4px',
226
263
  fontSize: '8px',
227
264
  lineHeight: '10px',
265
+ minWidth: '15px',
266
+ minHeight: '15px'
228
267
  };
229
268
  const checked = (
230
269
  <div
@@ -279,8 +318,7 @@ export const DropdownSelect = ({
279
318
  border: !isValid
280
319
  ? '1px solid ' + activeTheme.ui['error']
281
320
  : '1px solid ' + activeTheme.border,
282
- // border: state.isFocused ? '4px solid red' : '4px solid green',
283
-
321
+ minWidth: '215px',
284
322
  height: `${height}px`,
285
323
  minHeight: `${height}px`,
286
324
  boxShadow: (state.isSelected || state.isFocused) && 'none',
@@ -296,9 +334,20 @@ export const DropdownSelect = ({
296
334
  display: 'flex',
297
335
  justifyContent: 'center',
298
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
+
299
347
  }),
300
348
  valueContainer: (base) => ({
301
349
  ...base,
350
+ display: 'flex',
302
351
  fontSize: fontSize + 'px',
303
352
  }),
304
353
  indicatorsContainer: (base) => ({
@@ -316,15 +365,22 @@ export const DropdownSelect = ({
316
365
  boxShadow: '0px 6px 20px rgba(56, 66, 100, 0.15)',
317
366
  borderRadius: '4.32px',
318
367
  fontSize: fontSize + 'px',
368
+ width: '100%',
369
+
370
+
319
371
  }),
320
372
  singleValue: (base) => ({
321
373
  ...base,
322
374
  fontSize: fontSize + 'px',
323
375
  marginLeft: '0px',
376
+ width: 'auto'
377
+
324
378
  }),
325
379
  multiValue: (base) => ({
326
380
  ...base,
327
381
  marginLeft: '0px',
382
+ width: 'auto'
383
+
328
384
  }),
329
385
  input: (base) => ({
330
386
  ...base,
@@ -337,7 +393,11 @@ export const DropdownSelect = ({
337
393
  padding: '10px',
338
394
  cursor: 'pointer',
339
395
  color: '#081348',
396
+ width: 'inherit',
397
+
340
398
  }),
399
+
400
+
341
401
  ...props.styles,
342
402
  };
343
403
  return (
@@ -372,9 +432,10 @@ export const DropdownSelect = ({
372
432
  DropdownIndicator,
373
433
  MultiValue,
374
434
  Option,
435
+ // ValueContainer: LeftIcon,
375
436
  ValueContainer,
376
437
  IndicatorSeparator: () => null,
377
- ClearIndicator: () => null,
438
+ ClearIndicator,
378
439
  }}
379
440
  className='select-manage-page'
380
441
  classNamePrefix='new-select'
@@ -390,6 +451,12 @@ export const DropdownSelect = ({
390
451
  closeMenuOnSelect={false}
391
452
  isSearchable={true}
392
453
  isLoading={isLoading}
454
+
455
+ id={id}
456
+
457
+ isClearable={isClearable}
458
+
459
+
393
460
  {...props}
394
461
  />
395
462
  ) : dropdownType === 'asyncSingleSelect' ? (
@@ -400,8 +467,10 @@ export const DropdownSelect = ({
400
467
  styles={stylesComp}
401
468
  components={{
402
469
  DropdownIndicator,
470
+ // ValueContainer: LeftIcon,
471
+ ValueContainer,
403
472
  IndicatorSeparator: () => null,
404
- ClearIndicator: () => null,
473
+ ClearIndicator,
405
474
  }}
406
475
  className='select-manage-page'
407
476
  classNamePrefix='new-select'
@@ -410,6 +479,12 @@ export const DropdownSelect = ({
410
479
  onChange={setSelectedValue}
411
480
  isLoading={isLoading}
412
481
  isDisabled={isDisabled}
482
+
483
+ id={id}
484
+
485
+ isClearable={isClearable}
486
+
487
+
413
488
  {...props}
414
489
  />
415
490
  ) : dropdownType === 'asyncMultiSelect' ? (
@@ -417,10 +492,11 @@ export const DropdownSelect = ({
417
492
  components={{
418
493
  DropdownIndicator,
419
494
  MultiValue,
495
+ // ValueContainer: LeftIcon,
420
496
  ValueContainer,
421
497
  Option,
422
498
  IndicatorSeparator: () => null,
423
- ClearIndicator: () => null,
499
+ ClearIndicator,
424
500
  }}
425
501
  className='select-manage-page'
426
502
  classNamePrefix='new-select'
@@ -437,14 +513,22 @@ export const DropdownSelect = ({
437
513
  loadOptions={loadOptions}
438
514
  defaultOptions
439
515
  onInputChange={onInputChange}
516
+
517
+ id={id}
518
+
519
+ isClearable={isClearable}
520
+
521
+
440
522
  {...props}
441
523
  />
442
524
  ) : (
443
525
  <Select
444
526
  components={{
445
527
  DropdownIndicator,
528
+ // ValueContainer: LeftIcon,
529
+ ValueContainer,
446
530
  IndicatorSeparator: () => null,
447
- ClearIndicator: () => null,
531
+ ClearIndicator,
448
532
  }}
449
533
  className='select-manage-page'
450
534
  classNamePrefix='new-select'
@@ -459,6 +543,12 @@ export const DropdownSelect = ({
459
543
  styles={stylesComp}
460
544
  onChange={setSelectedValue}
461
545
  isLoading={isLoading}
546
+
547
+ id={id}
548
+
549
+ isClearable={isClearable}
550
+
551
+
462
552
  {...props}
463
553
  />
464
554
  )}
@@ -547,6 +637,35 @@ DropdownSelect.propTypes = {
547
637
  * clearable or not
548
638
  */
549
639
  isClearable: PropTypes.bool,
640
+ /**
641
+ * id of the select
642
+ */
643
+ id: PropTypes.string,
644
+ /**
645
+ * iconName of the select
646
+ */
647
+ iconName: PropTypes.string,
648
+ /**
649
+ * iconColor of the select
650
+ */
651
+ iconColor: PropTypes.string,
652
+ /**
653
+ * iconSize of the select
654
+ */
655
+ iconSize: PropTypes.number,
656
+ /**
657
+ * leftIcon of the select
658
+ */
659
+ leftIcon: PropTypes.string,
660
+ /**
661
+ * iconColor of the select
662
+ */
663
+ leftIconColor: PropTypes.string,
664
+ /**
665
+ * iconSize of the select
666
+ */
667
+ leftIconSize: PropTypes.number,
668
+ showIndicator: PropTypes.bool
550
669
 
551
670
  };
552
671
 
@@ -569,5 +688,13 @@ DropdownSelect.defaultProps = {
569
688
  isRequired: false,
570
689
  dropdownType: 'singleSelect',
571
690
  isDisabled: false,
572
- isLoading: false
691
+ isLoading: false,
692
+ id: '',
693
+ iconName: 'triangle-down',
694
+ iconColor: 'black',
695
+ iconSize: 8,
696
+ leftIcon: 'magnifier-icon',
697
+ leftIconColor: 'black',
698
+ leftIconSize: 10,
699
+ showIndicator: true
573
700
  };
@@ -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: inherit;
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
- {showEye ? <Icon icon='eye-show' /> : <Icon icon='eye-hide' />}
156
- </div>
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
- [{ label: "First Radio Button", value: "first", disabled:true, disabledColor: '#ae3232' },
210
- { label: "Second Radio Button", value: "second" },
211
- { label: "Third Radio Button", value: "third" }]
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
  };
@@ -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
  };