@eturnity/eturnity_reusable_components 1.2.22-3d-master.6 → 1.2.22-3d-master.9
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<Wrapper :isDisabled="disabled" :size="size" :cursor="cursor">
|
|
3
3
|
<icon-image
|
|
4
4
|
:disabled="disabled"
|
|
5
5
|
:size="size"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
require(`!html-loader!./../../assets/svgIcons/${name.toLowerCase()}.svg`)
|
|
10
10
|
"
|
|
11
11
|
></icon-image>
|
|
12
|
-
</
|
|
12
|
+
</Wrapper>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<script>
|
|
@@ -50,7 +50,8 @@ const IconImage = styled('div', IconImageProps)`
|
|
|
50
50
|
export default {
|
|
51
51
|
name: 'icon',
|
|
52
52
|
components: {
|
|
53
|
-
IconImage
|
|
53
|
+
IconImage,
|
|
54
|
+
Wrapper
|
|
54
55
|
},
|
|
55
56
|
props: {
|
|
56
57
|
disabled: {
|
|
@@ -26,12 +26,14 @@
|
|
|
26
26
|
@blur="onInputBlur($event)"
|
|
27
27
|
@focus="focusInput()"
|
|
28
28
|
@keyup.enter="$emit('on-enter-click')"
|
|
29
|
+
@input="onInput($event)"
|
|
29
30
|
:disabled="disabled"
|
|
30
31
|
:isDisabled="disabled"
|
|
31
32
|
:noBorder="noBorder"
|
|
32
33
|
:textAlign="textAlign"
|
|
33
34
|
:fontSize="fontSize"
|
|
34
35
|
:fontColor="fontColor"
|
|
36
|
+
:backgroundColor="backgroundColor"
|
|
35
37
|
v-on="$listeners"
|
|
36
38
|
:hasSlot="hasSlot"
|
|
37
39
|
:slotSize="slotSize"
|
|
@@ -101,6 +103,7 @@ const inputProps = {
|
|
|
101
103
|
textAlign: String,
|
|
102
104
|
fontSize: String,
|
|
103
105
|
fontColor: String,
|
|
106
|
+
backgroundColor:String,
|
|
104
107
|
hasSlot: Boolean,
|
|
105
108
|
slotSize: String,
|
|
106
109
|
inputHeight:String
|
|
@@ -124,8 +127,6 @@ const InputContainer = styled('input', inputProps)`
|
|
|
124
127
|
padding-right: ${(props) =>
|
|
125
128
|
props.slotSize
|
|
126
129
|
? 'calc(' + props.slotSize + ' + 10px)'
|
|
127
|
-
: props.hasUnit
|
|
128
|
-
? '40px'
|
|
129
130
|
: '5px'};
|
|
130
131
|
border-radius: 4px;
|
|
131
132
|
text-align: ${(props) => props.textAlign};
|
|
@@ -137,6 +138,9 @@ const InputContainer = styled('input', inputProps)`
|
|
|
137
138
|
: props.fontColor
|
|
138
139
|
? props.fontColor + ' !important'
|
|
139
140
|
: props.theme.colors.black};
|
|
141
|
+
background-color:${(props) => props.backgroundColor
|
|
142
|
+
? props.backgroundColor+' !important'
|
|
143
|
+
: props.theme.colors.white};
|
|
140
144
|
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
|
141
145
|
min-width: ${(props) => (props.minWidth ? props.minWidth : 'unset')};
|
|
142
146
|
background-color: ${(props) =>
|
|
@@ -324,6 +328,10 @@ export default {
|
|
|
324
328
|
required: false,
|
|
325
329
|
default: null
|
|
326
330
|
},
|
|
331
|
+
backgroundColor: {
|
|
332
|
+
required: false,
|
|
333
|
+
default: null
|
|
334
|
+
},
|
|
327
335
|
numberToStringEnabled: {
|
|
328
336
|
required: false,
|
|
329
337
|
default: true
|
|
@@ -401,6 +409,10 @@ export default {
|
|
|
401
409
|
}
|
|
402
410
|
return evaluated
|
|
403
411
|
},
|
|
412
|
+
onInput(value){
|
|
413
|
+
let evaluatedInput = this.onEvaluateCode(value)
|
|
414
|
+
this.$emit('on-input',evaluatedInput)
|
|
415
|
+
},
|
|
404
416
|
onInputBlur(e) {
|
|
405
417
|
this.isFocused = false
|
|
406
418
|
let value = e.target.value
|