groundfloor-react-ui 1.0.0 → 1.0.3

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 (34) hide show
  1. package/README.md +9 -2
  2. package/assets/icons/eye-hide.svg +1 -1
  3. package/assets/icons/file-upload.svg +3 -0
  4. package/components/Accordion/Accordion.js +2 -2
  5. package/components/Button/PrimaryButton.js +4 -7
  6. package/components/Button/SecondaryButton.js +7 -8
  7. package/components/Footer/{FooterContentLev3.js → FooterContent.js} +6 -2
  8. package/components/Footer/index.js +1 -1
  9. package/components/Form/FormComponent.js +5 -2
  10. package/components/Form/HeaderComponent.js +1 -6
  11. package/components/Icon/Icon.js +16 -6
  12. package/components/Inputs/CheckBoxInput.js +1 -1
  13. package/components/Inputs/DateSelect.js +3 -4
  14. package/components/Inputs/DropdownSelect.js +292 -289
  15. package/components/Inputs/DropzoneInput.js +225 -137
  16. package/components/Inputs/NumericInput.js +6 -11
  17. package/components/Inputs/PasswordInput.js +192 -0
  18. package/components/Inputs/Signature.js +142 -109
  19. package/components/Inputs/TextArea.js +3 -4
  20. package/components/Inputs/TextInput.js +6 -7
  21. package/components/Inputs/TimeInput.js +5 -6
  22. package/components/Inputs/index.js +1 -0
  23. package/components/Modal/ModalComp.js +80 -46
  24. package/components/Modal/index.js +0 -1
  25. package/components/constants/defaultStyle.js +28 -33
  26. package/components/constants/defaultThemeColor.js +2 -1
  27. package/dist/index.es.js +538 -493
  28. package/dist/index.js +388 -343
  29. package/package.json +1 -1
  30. package/components/Inputs/CheckBoxEditableInput.js +0 -352
  31. package/components/Inputs/CheckBoxInputMS.js +0 -160
  32. package/components/Inputs/TextInputClicable.js +0 -198
  33. package/components/Inputs/TextInputClicableMS.js +0 -255
  34. package/components/Modal/Modal.js +0 -116
@@ -0,0 +1,192 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import styled, { css } from 'styled-components';
4
+ import defaultThemeColor from '../constants/defaultThemeColor';
5
+ import defaultStyles from '../constants/defaultStyle';
6
+ import getDefaultStyles from '../constants/utils';
7
+ import { Label } from '../Label';
8
+ import { Icon } from '../Icon';
9
+ import { useState } from 'react';
10
+ import { useEffect } from 'react';
11
+
12
+ const TextWrapper = styled.div`
13
+ //Set the styles from the default styles object
14
+ ${({ theme, defaultWrapperStyle }) => {
15
+ return getDefaultStyles(theme, defaultWrapperStyle);
16
+ }}
17
+
18
+ border: ${({ isValid, themeColor }) =>
19
+ !isValid
20
+ ? '1px solid ' + themeColor.variant['error']
21
+ : '1px solid ' + defaultThemeColor.border};
22
+
23
+ .input-icon svg path {
24
+ fill: ${({ themeColor }) => themeColor.variant['neutral-1']};
25
+ }
26
+ .input-icon {
27
+ cursor: pointer;
28
+ }
29
+
30
+ &:focus-within {
31
+ border: 1px solid ${({ themeColor }) => themeColor.variant['primary-1']};
32
+ outline: none;
33
+
34
+ .input-icon svg path {
35
+ fill: ${({ themeColor }) => themeColor.variant['primary-1']};
36
+ }
37
+ }
38
+
39
+ // custom styles
40
+ ${({ textBoxStyle }) => textBoxStyle}
41
+ `;
42
+
43
+ const Input = styled.input`
44
+ width: inherit;
45
+ //Set the styles from the default styles object
46
+ ${({ theme, defaultInputStyle }) => {
47
+ return getDefaultStyles(theme, defaultInputStyle);
48
+ }}
49
+
50
+ // custom styles
51
+ ${({ inputStyle }) => inputStyle}
52
+
53
+ .sc-furwcr bxRAoq {
54
+ color: ${defaultThemeColor.variant['neutral-3']};
55
+ }
56
+ `;
57
+
58
+ const inline = css`
59
+ display: flex;
60
+ gap: 7px;
61
+ align-items: center;
62
+ `;
63
+
64
+ const Form = styled.div`
65
+ ${({ labelInline }) => (labelInline ? inline : null)}
66
+ .err-text {
67
+ color: ${({ themeColor }) => themeColor.variant['error']};
68
+ margin-top: 5px;
69
+ font-size: 10px;
70
+ }
71
+ `;
72
+
73
+ Form.defaultProps = {
74
+ themeColor: defaultThemeColor,
75
+ };
76
+
77
+ export const PasswordInput = ({
78
+ themeColor,
79
+ textBoxStyle,
80
+ labelStyle,
81
+ inputStyle,
82
+ errMsg,
83
+ required,
84
+ label,
85
+ labelInline,
86
+ isValid,
87
+ ...props
88
+ }) => {
89
+ const [showEye, setShowEye] = useState(false);
90
+
91
+ return (
92
+ <Form labelInline={labelInline} {...props}>
93
+ <div style={{ display: 'flex' }}>
94
+ <Label
95
+ customStyles={labelStyle}
96
+ type={'label-text'}
97
+ labelInline={labelInline}
98
+ text={label}
99
+ errMsg={errMsg}
100
+ style={{
101
+ display: 'flex',
102
+ marginBottom: `${!labelInline ? '7px' : ''}`,
103
+ }}
104
+ {...props}
105
+ />
106
+ {required && (
107
+ <div
108
+ style={{
109
+ marginLeft: '4px',
110
+ color: `${themeColor.variant['error']}`,
111
+ }}
112
+ >
113
+ *
114
+ </div>
115
+ )}
116
+ </div>
117
+ <TextWrapper
118
+ required={required}
119
+ themeColor={defaultThemeColor}
120
+ textBoxStyle={textBoxStyle}
121
+ isValid={isValid}
122
+ theme={defaultStyles}
123
+ defaultWrapperStyle={'textbox-wrapper'}
124
+ {...props}
125
+ >
126
+ <Input
127
+ inputStyle={inputStyle}
128
+ type={showEye ? 'text' : 'password'}
129
+ defaultInputStyle={'input-wrapper'}
130
+ {...props}
131
+ />
132
+ <div className='input-icon' onClick={() => setShowEye(!showEye)}>
133
+ {showEye ? <Icon icon='eye-show' /> : <Icon icon='eye-hide' />}
134
+ </div>
135
+ </TextWrapper>
136
+ {errMsg.length > 0 && <div className='err-text'>{errMsg}</div>}
137
+ </Form>
138
+ );
139
+ };
140
+
141
+ PasswordInput.propTypes = {
142
+ /**
143
+ * Theme props of default in-built css
144
+ */
145
+ theme: PropTypes.object,
146
+ /**
147
+ * Color props of default theme
148
+ */
149
+ themeColor: PropTypes.object,
150
+ /**
151
+ * Label of Input
152
+ */
153
+ label: PropTypes.string,
154
+ /**
155
+ * Is the input required?
156
+ */
157
+ required: PropTypes.bool,
158
+ /**
159
+ * Should label be inline with textbox?
160
+ */
161
+ labelInline: PropTypes.bool,
162
+ /**
163
+ * Error Message
164
+ */
165
+ errMsg: PropTypes.string,
166
+
167
+ /**
168
+ * custom style of textbox Wrapper
169
+ */
170
+ textBoxStyle: PropTypes.object,
171
+ /**
172
+ * custom style of textbox input
173
+ */
174
+ labelStyle: PropTypes.object,
175
+ /**
176
+ * custom style of textbox label
177
+ */
178
+ inputStyle: PropTypes.object,
179
+ };
180
+
181
+ PasswordInput.defaultProps = {
182
+ themeColor: defaultThemeColor,
183
+ theme: defaultStyles,
184
+ label: '',
185
+ required: false,
186
+ isValid: true,
187
+ labelInline: false,
188
+ errMsg: '',
189
+ textBoxStyle: {},
190
+ labelStyle: {},
191
+ inputStyle: {},
192
+ };
@@ -1,120 +1,134 @@
1
- import React, { useState, useRef, useEffect } from "react";
2
- import SignaturePad from 'react-signature-pad-wrapper'
1
+ import React, { useState, useRef, useEffect } from 'react';
2
+ import SignaturePad from 'react-signature-pad-wrapper';
3
3
  import styled from 'styled-components';
4
4
  import defaultThemeColor from '../constants/defaultThemeColor';
5
5
  import defaultStyle from '../constants/defaultStyle';
6
6
  import getDefaultStyles from '../constants/utils';
7
- import PropTypes from "prop-types";
7
+ import PropTypes from 'prop-types';
8
8
 
9
- import { Icon } from "../Icon";
9
+ import { Icon } from '../Icon';
10
10
 
11
11
  const ParentDiv = styled.div`
12
-
13
- //Set the styles from the default styles object
14
- ${({ theme, defaultParentDivStyle }) => {
12
+ //Set the styles from the default styles object
13
+ ${({ theme, defaultParentDivStyle }) => {
15
14
  return getDefaultStyles(theme, defaultParentDivStyle);
16
15
  }}
17
-
18
- border: 1px solid ${({ isMyInputFocused, activeColor, defaultColor }) => isMyInputFocused ? activeColor : defaultColor};
19
-
20
- &:focus-within{
21
- border-color: ${({ activeColor }) => activeColor};
22
- }
16
+
17
+ border: 1px solid ${({ isMyInputFocused, activeColor, defaultColor }) =>
18
+ isMyInputFocused ? activeColor : defaultColor};
19
+
20
+ &:focus-within {
21
+ border-color: ${({ activeColor }) => activeColor};
22
+ }
23
23
  `;
24
24
 
25
25
  const WrapperDiv = styled.div`
26
-
27
- //Set the styles from the default styles object
28
- ${({ theme, defaultWrapperDivStyle }) => {
26
+ //Set the styles from the default styles object
27
+ ${({ theme, defaultWrapperDivStyle }) => {
29
28
  return getDefaultStyles(theme, defaultWrapperDivStyle);
30
29
  }}
31
30
 
32
- flex-direction: ${({ signIcon }) => signIcon ? 'column' : 'initial'};
33
- width: ${({ signIcon }) => signIcon ? 'min-content' : 'calc(100% - 50px) !important'};
34
- max-width: ${({ signIcon }) => signIcon ? '42px' : '490px'};
35
- border-right: 1px solid
36
- ${({ activeColor, defaultColor, isMyInputFocused, signIcon }) =>
37
- signIcon ? isMyInputFocused ? activeColor : defaultColor : 'none'};
38
- border-left: ${({ signIcon }) => !signIcon ? 'none' : ''};
39
- margin-left: ${({ signIcon }) => !signIcon ? '42px' : ''};
40
- position:${({ signIcon }) => !signIcon ? '' : 'absolute'};
41
-
31
+ flex-direction: ${({ signIcon }) => (signIcon ? 'column' : 'initial')};
32
+ width: ${({ signIcon }) =>
33
+ signIcon ? 'min-content' : 'calc(100% - 50px) !important'};
34
+ max-width: ${({ signIcon }) => (signIcon ? '42px' : '490px')};
35
+ border-right: 1px solid
36
+ ${({ activeColor, defaultColor, isMyInputFocused, signIcon }) =>
37
+ signIcon ? (isMyInputFocused ? activeColor : defaultColor) : 'none'};
38
+ border-left: ${({ signIcon }) => (!signIcon ? 'none' : '')};
39
+ margin-left: ${({ signIcon }) => (!signIcon ? '42px' : '')};
40
+ position: ${({ signIcon }) => (!signIcon ? '' : 'absolute')};
42
41
  `;
43
42
 
44
43
  const ControllerDiv = styled.div`
45
- width: 39px;
46
- height:44px;
47
- display: flex;
48
- flex-direction: row;
49
- justify-content: center;
50
- align-items: center;
51
- border-bottom: ${({ penIcon, isMyInputFocused, activeColor, defaultColor, }) =>
52
- penIcon ? isMyInputFocused ? "1px solid " + activeColor : "1px solid " + defaultColor : ''};
53
- background-color:rgba(255, 255, 255, 0.05);
54
- cursor:pointer;
44
+ width: 39px;
45
+ height: 44px;
46
+ display: flex;
47
+ flex-direction: row;
48
+ justify-content: center;
49
+ align-items: center;
50
+ border-bottom: ${({ penIcon, isMyInputFocused, activeColor, defaultColor }) =>
51
+ penIcon
52
+ ? isMyInputFocused
53
+ ? '1px solid ' + activeColor
54
+ : '1px solid ' + defaultColor
55
+ : ''};
56
+ background-color: rgba(255, 255, 255, 0.05);
57
+ cursor: pointer;
55
58
  `;
56
59
 
57
-
58
60
  const InputText = styled.input`
59
- ${({ theme, defaultInputStyle }) => {
61
+ ${({ theme, defaultInputStyle }) => {
60
62
  return getDefaultStyles(theme, defaultInputStyle);
61
63
  }}
62
-
63
- border-bottom: ${({ value, defaultColor, }) =>
64
- value.length > 0 ? 'none' : "1px solid " + defaultColor};
65
-
66
- &::placeholder{
67
- font-size: 17px;
68
- text-align: center;
69
- color: ${({ placeholderColor }) => placeholderColor};
70
- font-family: "Averta";
71
- font-style: normal;
72
- font-weight: normal;
73
- line-height: 22px;
74
- }
75
- &:focus-within {
76
- border: none;
77
- outline: none;
78
-
79
- ::placeholder {
80
- color: transparent;
81
- }
64
+
65
+ border-bottom: ${({ value, defaultColor }) =>
66
+ value.length > 0 ? 'none' : '1px solid ' + defaultColor};
67
+
68
+ &::placeholder {
69
+ font-size: 17px;
70
+ text-align: center;
71
+ color: ${({ placeholderColor }) => placeholderColor};
72
+ font-family: 'Averta';
73
+ font-style: normal;
74
+ font-weight: normal;
75
+ line-height: 22px;
76
+ }
77
+ &:focus-within {
78
+ border: none;
79
+ outline: none;
80
+
81
+ ::placeholder {
82
+ color: transparent;
82
83
  }
83
-
84
- // custom styles
85
- ${({ customInputStyle }) => customInputStyle}
84
+ }
85
+
86
+ // custom styles
87
+ ${({ customInputStyle }) => customInputStyle}
86
88
  `;
87
89
 
88
90
  const SignaturePadDiv = styled.div`
89
- position: relative;
90
- width: inherit;
91
- display: flex;
92
- margin: 4px;
91
+ position: relative;
92
+ width: inherit;
93
+ display: flex;
94
+ margin: 4px;
93
95
  `;
94
96
 
95
97
  const IconDiv = styled.div`
96
- padding-left: 2px;
97
- display: flex;
98
- justify-content: center;
99
- cursor: pointer;
100
- margin-left: ${({ selected }) => selected === 'sign' ? '' : 'auto'};
98
+ padding-left: 2px;
99
+ display: flex;
100
+ justify-content: center;
101
+ cursor: pointer;
101
102
  `;
102
103
 
103
-
104
- export const SignatureInput = ({ onChange, activeColor, defaultColor, placeholderColor, placeholderText, customInputStyle, pointsArray, setPointsArray, value, setValue, valueForSignatureDrawing, setValueForSignatureDrawing, imageURL, setImageURL, ...props }) => {
104
+ export const SignatureInput = ({
105
+ onChange,
106
+ activeColor,
107
+ defaultColor,
108
+ placeholderColor,
109
+ placeholderText,
110
+ customInputStyle,
111
+ pointsArray,
112
+ setPointsArray,
113
+ value,
114
+ setValue,
115
+ valueForSignatureDrawing,
116
+ setValueForSignatureDrawing,
117
+ imageURL,
118
+ setImageURL,
119
+ ...props
120
+ }) => {
105
121
  const [selected, setSelected] = useState('default');
106
122
  const [isMyInputFocused, setIsMyInputFocused] = useState(false);
107
123
  const [dirty, setDirty] = useState(false);
108
124
  const pad = useRef(null);
109
125
 
110
- // const theme = defaultStyle;
111
-
112
126
  useEffect(() => {
113
127
  if (dirty) {
114
128
  save();
115
129
  setValueForSignatureDrawing(pad.current);
116
130
  }
117
- }, [dirty === true])
131
+ }, [dirty === true]);
118
132
 
119
133
  const onClear = () => {
120
134
  setValue('');
@@ -124,13 +138,13 @@ export const SignatureInput = ({ onChange, activeColor, defaultColor, placeholde
124
138
  }
125
139
  setIsMyInputFocused(false);
126
140
  setDirty(false);
127
- }
141
+ };
128
142
 
129
143
  const save = () => {
130
144
  setPointsArray(pad.current.toData());
131
- setImageURL(pad.current.toDataURL("image/png"));
145
+ setImageURL(pad.current.toDataURL('image/png'));
132
146
  return [imageURL, pointsArray];
133
- }
147
+ };
134
148
 
135
149
  return (
136
150
  <ParentDiv
@@ -139,7 +153,8 @@ export const SignatureInput = ({ onChange, activeColor, defaultColor, placeholde
139
153
  isMyInputFocused={isMyInputFocused}
140
154
  selected={selected}
141
155
  activeColor={activeColor}
142
- defaultColor={defaultColor}>
156
+ defaultColor={defaultColor}
157
+ >
143
158
  <WrapperDiv
144
159
  theme={defaultStyle}
145
160
  defaultWrapperDivStyle={'signature-wrapper-div'}
@@ -147,27 +162,37 @@ export const SignatureInput = ({ onChange, activeColor, defaultColor, placeholde
147
162
  defaultColor={defaultColor}
148
163
  selected={selected}
149
164
  isMyInputFocused={isMyInputFocused}
150
- signIcon={true}>
165
+ signIcon={true}
166
+ >
151
167
  <ControllerDiv
152
168
  activeColor={activeColor}
153
169
  defaultColor={defaultColor}
154
170
  isMyInputFocused={isMyInputFocused}
155
171
  penIcon={true}
156
- onClick={() => { setSelected('default') }}>
172
+ onClick={() => {
173
+ setSelected('default');
174
+ onClear();
175
+ }}
176
+ >
157
177
  <Icon
158
178
  icon='pen-icon'
159
- color={selected === 'default' ?
160
- activeColor : 'black'} />
179
+ color={selected === 'default' ? activeColor : 'black'}
180
+ />
161
181
  </ControllerDiv>
162
182
  <ControllerDiv
163
- activeColor={activeColor} defaultColor={defaultColor}
183
+ activeColor={activeColor}
184
+ defaultColor={defaultColor}
164
185
  isMyInputFocused={isMyInputFocused}
165
186
  penIcon={false}
166
- onClick={() => { setSelected('sign') }}>
187
+ onClick={() => {
188
+ setSelected('sign');
189
+ onClear();
190
+ }}
191
+ >
167
192
  <Icon
168
193
  icon='sign-icon'
169
- color={selected !== 'default' ?
170
- activeColor : 'black'} />
194
+ color={selected !== 'default' ? activeColor : 'black'}
195
+ />
171
196
  </ControllerDiv>
172
197
  </WrapperDiv>
173
198
  <WrapperDiv
@@ -178,10 +203,14 @@ export const SignatureInput = ({ onChange, activeColor, defaultColor, placeholde
178
203
  selected={selected}
179
204
  isMyInputFocused={isMyInputFocused}
180
205
  signIcon={false}
181
- onTouchStart={() => { console.log('touchstart') }}>
182
- {selected === 'default' ?
206
+ onTouchStart={() => {
207
+ console.log('touchstart');
208
+ }}
209
+ >
210
+ {selected === 'default' ? (
183
211
  <InputText
184
- theme={defaultStyle} defaultInputStyle={'signature-input-text'}
212
+ theme={defaultStyle}
213
+ defaultInputStyle={'signature-input-text'}
185
214
  placeholder={placeholderText}
186
215
  placeholderColor={placeholderColor}
187
216
  customInputStyle={customInputStyle}
@@ -189,29 +218,34 @@ export const SignatureInput = ({ onChange, activeColor, defaultColor, placeholde
189
218
  onFocus={() => setIsMyInputFocused(true)}
190
219
  value={value}
191
220
  defaultColor={defaultColor}
192
- onChange={(e) => setValue(e.target.value)} />
193
- : <SignaturePadDiv
221
+ onChange={(e) => setValue(e.target.value)}
222
+ />
223
+ ) : (
224
+ <SignaturePadDiv
194
225
  onMouseEnter={() => setIsMyInputFocused(true)}
195
226
  onMouseLeave={() => setIsMyInputFocused(false)}
196
- onClick={() => { setDirty(true); save(); }}>
227
+ onClick={() => {
228
+ setDirty(true);
229
+ save();
230
+ }}
231
+ >
197
232
  <SignaturePad
198
233
  ref={pad}
199
234
  redrawOnResize
200
235
  height={75}
201
- options={{ minWidth: 1, maxWidth: 1, penColor: '#444444' }} />
236
+ options={{ minWidth: 1, maxWidth: 1, penColor: '#444444' }}
237
+ />
202
238
  </SignaturePadDiv>
203
- }
204
- {(value || dirty) && <IconDiv selected={selected} onClick={() => onClear()}>
205
- <Icon
206
- icon='cross-icon'
207
- color={defaultColor}
208
- />
209
- </IconDiv>
210
- }
239
+ )}
240
+ {(value || dirty) && (
241
+ <IconDiv selected={selected} onClick={() => onClear()}>
242
+ <Icon icon='cross-icon' color={defaultColor} />
243
+ </IconDiv>
244
+ )}
211
245
  </WrapperDiv>
212
246
  </ParentDiv>
213
- )
214
- }
247
+ );
248
+ };
215
249
 
216
250
  SignatureInput.propTypes = {
217
251
  /**
@@ -257,9 +291,8 @@ SignatureInput.propTypes = {
257
291
  /**
258
292
  * Function that sets Image url of the Signature drawing
259
293
  */
260
- setImageURL: PropTypes.func
261
-
262
- }
294
+ setImageURL: PropTypes.func,
295
+ };
263
296
 
264
297
  SignatureInput.defaultProps = {
265
298
  activeColor: `${defaultThemeColor.primary['primary-1']}`,
@@ -269,10 +302,10 @@ SignatureInput.defaultProps = {
269
302
  placeholderText: 'Type your signature here',
270
303
  pointsArray: null,
271
304
  setPointsArray: () => { },
272
- value: "",
305
+ value: '',
273
306
  setValue: () => { },
274
307
  imageURL: '',
275
308
  setImageURL: () => { },
276
309
  setValueForSignatureDrawing: () => { },
277
- }
310
+ };
278
311
 
@@ -6,7 +6,6 @@ import defaultStyles from '../constants/defaultStyle';
6
6
  import getDefaultStyles from '../constants/utils';
7
7
  import { Label } from '../Label';
8
8
 
9
- const border = `#D4D7E3`;
10
9
 
11
10
  const TextWrapper = styled.div`
12
11
  //Set the styles from the default styles object
@@ -15,7 +14,7 @@ const TextWrapper = styled.div`
15
14
  }}
16
15
 
17
16
  border: ${({ isValid, themeColor }) => !isValid ? '1px solid ' + themeColor.variant['error'] :
18
- '1px solid ' + border};
17
+ '1px solid ' + defaultThemeColor.border};
19
18
 
20
19
  .input-icon svg path {
21
20
  fill: ${({ themeColor }) => themeColor.variant['neutral-1']};
@@ -53,7 +52,7 @@ const Input = styled.textarea`
53
52
 
54
53
  const inline = css`
55
54
  display: flex;
56
- gap: 10px;
55
+ gap: 7px;
57
56
  align-items: center;
58
57
  `
59
58
 
@@ -90,7 +89,7 @@ export const TextArea = React.forwardRef(({ themeColor, customStylesForm, textAr
90
89
  errMsg={errMsg}
91
90
  style={{
92
91
  'display': 'flex',
93
- 'paddingBottom': `${!labelInline ? '10px' : ''}`,
92
+ 'paddingBottom': `${!labelInline ? '7px' : ''}`,
94
93
  }}
95
94
  {...props} />
96
95
  {required && <div style={{
@@ -6,7 +6,6 @@ import defaultStyles from '../constants/defaultStyle';
6
6
  import getDefaultStyles from '../constants/utils';
7
7
  import { Label } from '../Label';
8
8
 
9
- const border = `#D4D7E3`;
10
9
 
11
10
  const TextWrapper = styled.div`
12
11
  //Set the styles from the default styles object
@@ -15,7 +14,7 @@ const TextWrapper = styled.div`
15
14
  }}
16
15
 
17
16
  border: ${({ isValid, themeColor }) => !isValid ? '1px solid ' + themeColor.variant['error'] :
18
- '1px solid ' + border};
17
+ '1px solid ' + defaultThemeColor.border};
19
18
 
20
19
  .input-icon svg path {
21
20
  fill: ${({ themeColor }) => themeColor.variant['neutral-1']};
@@ -36,6 +35,8 @@ const TextWrapper = styled.div`
36
35
  `;
37
36
 
38
37
  const Input = styled.input`
38
+ width:inherit;
39
+
39
40
  //Set the styles from the default styles object
40
41
  ${({ theme, defaultInputStyle }) => {
41
42
  return getDefaultStyles(theme, defaultInputStyle);
@@ -52,7 +53,7 @@ const Input = styled.input`
52
53
 
53
54
  const inline = css`
54
55
  display: flex;
55
- gap: 10px;
56
+ gap: 7px;
56
57
  align-items: center;
57
58
  `
58
59
 
@@ -69,13 +70,11 @@ Form.defaultProps = {
69
70
  themeColor: defaultThemeColor,
70
71
  }
71
72
 
72
-
73
73
  export const TextInput = ({ themeColor, textBoxStyle, labelStyle, inputStyle, errMsg, required, label, labelInline, iconBefore, iconAfter, isValid, type, ...props }) => {
74
74
  return (
75
75
  <Form labelInline={labelInline} {...props}>
76
76
  <div style={{ display: 'flex' }}>
77
77
  <Label
78
- themeColor={defaultThemeColor}
79
78
  customStyles={labelStyle}
80
79
  type={'label-text'}
81
80
  labelInline={labelInline}
@@ -83,7 +82,7 @@ export const TextInput = ({ themeColor, textBoxStyle, labelStyle, inputStyle, er
83
82
  errMsg={errMsg}
84
83
  style={{
85
84
  'display': 'flex',
86
- 'paddingBottom': `${!labelInline ? '10px' : ''}`,
85
+ 'marginBottom': `${!labelInline ? '7px' : ''}`,
87
86
  }}
88
87
  {...props} />
89
88
  {required && <div style={{
@@ -179,4 +178,4 @@ TextInput.defaultProps = {
179
178
  labelStyle: {},
180
179
  inputStyle: {},
181
180
  type: 'text'
182
- }
181
+ }