@eturnity/eturnity_reusable_components 1.2.34-3d-master.1 → 1.2.34-3d-master.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.
package/package.json
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
:alignItems="alignItems"
|
6
6
|
>
|
7
7
|
<label-wrapper v-if="label">
|
8
|
-
<input-label :fontSize="fontSize">{{ label }}</input-label>
|
8
|
+
<input-label :labelFontColor="labelFontColor" :fontSize="fontSize">{{ label }}</input-label>
|
9
9
|
<info-text
|
10
10
|
v-if="infoTextMessage"
|
11
11
|
:text="infoTextMessage"
|
@@ -21,6 +21,7 @@
|
|
21
21
|
:isError="isError"
|
22
22
|
:inputWidth="inputWidth"
|
23
23
|
:minWidth="minWidth"
|
24
|
+
:inputHeight="inputHeight"
|
24
25
|
:value="value"
|
25
26
|
@input="onChangeHandler"
|
26
27
|
@blur="onInputBlur"
|
@@ -30,6 +31,8 @@
|
|
30
31
|
:fontSize="fontSize"
|
31
32
|
:inputType="inputType"
|
32
33
|
:type="inputTypeData"
|
34
|
+
:fontColor="fontColor"
|
35
|
+
:backgroundColor="backgroundColor"
|
33
36
|
/>
|
34
37
|
<icon-wrapper
|
35
38
|
v-if="inputType === 'password' && !isError"
|
@@ -61,9 +64,15 @@ const Container = styled.div`
|
|
61
64
|
position: relative;
|
62
65
|
`
|
63
66
|
|
64
|
-
const labelAttrs = { fontSize: String }
|
67
|
+
const labelAttrs = { fontSize: String,labelFontColor:String, }
|
65
68
|
const InputLabel = styled('div', labelAttrs)`
|
66
|
-
color: ${(props) => props.theme.colors.
|
69
|
+
color: ${(props) => props.theme.colors[props.labelFontColor]?
|
70
|
+
props.theme.colors[props.labelFontColor]:
|
71
|
+
props.labelFontColor?
|
72
|
+
props.labelFontColor:
|
73
|
+
props.theme.colors.eturnityGrey
|
74
|
+
};
|
75
|
+
|
67
76
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
|
68
77
|
font-weight: 700;
|
69
78
|
`
|
@@ -90,14 +99,22 @@ const inputProps = {
|
|
90
99
|
noBorder: Boolean,
|
91
100
|
isDisabled: Boolean,
|
92
101
|
fontSize: String,
|
93
|
-
inputType: String
|
102
|
+
inputType: String,
|
103
|
+
fontColor: String,
|
104
|
+
backgroundColor:String,
|
105
|
+
borderColor:String,
|
106
|
+
inputHeight:String,
|
94
107
|
}
|
95
108
|
const InputContainer = styled('input', inputProps)`
|
96
109
|
border: ${(props) =>
|
97
|
-
|
110
|
+
props.isError
|
98
111
|
? '1px solid ' + props.theme.colors.red
|
99
112
|
: props.noBorder
|
100
113
|
? 'none'
|
114
|
+
: props.borderColor ?
|
115
|
+
props.theme.colors[props.borderColor]
|
116
|
+
? '1px solid ' + props.theme.colors[props.borderColor]
|
117
|
+
: '1px solid ' + props.borderColor
|
101
118
|
: '1px solid ' + props.theme.colors.grey4};
|
102
119
|
padding: ${(props) =>
|
103
120
|
props.isError
|
@@ -113,15 +130,20 @@ const InputContainer = styled('input', inputProps)`
|
|
113
130
|
? props.theme.colors.grey6
|
114
131
|
: props.isDisabled
|
115
132
|
? props.theme.colors.grey2
|
133
|
+
: props.fontColor
|
134
|
+
? props.fontColor + ' !important'
|
116
135
|
: props.theme.colors.black};
|
136
|
+
|
117
137
|
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
118
138
|
min-width: ${(props) => (props.minWidth ? props.minWidth : 'unset')};
|
139
|
+
max-height: ${(props) => props.inputHeight};
|
119
140
|
box-sizing: border-box; // to allow width of 100% with padding
|
120
141
|
font-weight: 500;
|
121
142
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'auto')};
|
122
143
|
background-color: ${(props) =>
|
123
|
-
props.isDisabled ? props.theme.colors.grey5 :
|
124
|
-
|
144
|
+
props.isDisabled ? props.theme.colors.grey5 :
|
145
|
+
props.backgroundColor ? props.backgroundColor+' !important' :
|
146
|
+
props.theme.colors.white};
|
125
147
|
&::placeholder {
|
126
148
|
color: ${(props) => props.theme.colors.grey2};
|
127
149
|
}
|
@@ -209,6 +231,10 @@ export default {
|
|
209
231
|
required: false,
|
210
232
|
default: null
|
211
233
|
},
|
234
|
+
inputHeight: {
|
235
|
+
required: false,
|
236
|
+
default: null
|
237
|
+
},
|
212
238
|
minWidth: {
|
213
239
|
required: false,
|
214
240
|
default: null
|
@@ -245,7 +271,22 @@ export default {
|
|
245
271
|
inputType: {
|
246
272
|
required: false,
|
247
273
|
default: 'text'
|
248
|
-
}
|
274
|
+
},
|
275
|
+
labelFontColor:{
|
276
|
+
required:false,
|
277
|
+
default:'black'
|
278
|
+
},
|
279
|
+
backgroundColor:{
|
280
|
+
required:false,
|
281
|
+
default:'white'
|
282
|
+
},
|
283
|
+
fontColor:{
|
284
|
+
required:false,
|
285
|
+
default:'black'
|
286
|
+
},
|
287
|
+
borderColor:{
|
288
|
+
required:false,
|
289
|
+
},
|
249
290
|
},
|
250
291
|
methods: {
|
251
292
|
onChangeHandler($event) {
|
@@ -139,7 +139,7 @@ const selectDropdown = styled('div',selectDropdownAttrs)`
|
|
139
139
|
background-color:${(props) => props.theme.colors[props.bgColor]?props.theme.colors[props.bgColor]:props.bgColor};
|
140
140
|
color:${(props) => props.theme.colors[props.fontColor]?props.theme.colors[props.fontColor]:props.fontColor};
|
141
141
|
max-height:300px;
|
142
|
-
overflow-y:
|
142
|
+
overflow-y:auto;
|
143
143
|
`
|
144
144
|
const DropdownWrapper=styled('div')`
|
145
145
|
position:relative;
|