@eturnity/eturnity_reusable_components 1.2.26-EPDM-3412.0 → 1.2.26-EPDM-3412.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.
package/package.json
CHANGED
|
@@ -10,38 +10,40 @@
|
|
|
10
10
|
v-if="infoTextMessage"
|
|
11
11
|
:text="infoTextMessage"
|
|
12
12
|
borderColor="#ccc"
|
|
13
|
-
:size="fontSize ? fontSize : '
|
|
13
|
+
:size="fontSize ? fontSize : '16px'"
|
|
14
14
|
:alignText="infoTextAlign"
|
|
15
15
|
/>
|
|
16
16
|
</label-wrapper>
|
|
17
|
-
<
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<icon
|
|
41
|
-
|
|
42
|
-
|
|
17
|
+
<input-error-wrapper>
|
|
18
|
+
<icon-container>
|
|
19
|
+
<input-container
|
|
20
|
+
:placeholder="placeholder"
|
|
21
|
+
:isError="isError"
|
|
22
|
+
:inputWidth="inputWidth"
|
|
23
|
+
:minWidth="minWidth"
|
|
24
|
+
:value="value"
|
|
25
|
+
@input="onChangeHandler"
|
|
26
|
+
:noBorder="noBorder"
|
|
27
|
+
:disabled="disabled"
|
|
28
|
+
:isDisabled="disabled"
|
|
29
|
+
:fontSize="fontSize"
|
|
30
|
+
:inputType="inputType"
|
|
31
|
+
:type="inputTypeData"
|
|
32
|
+
/>
|
|
33
|
+
<icon-wrapper
|
|
34
|
+
v-if="inputType === 'password' && !isError"
|
|
35
|
+
@click="toggleShowPassword()"
|
|
36
|
+
size="20px"
|
|
37
|
+
>
|
|
38
|
+
<icon name="current_variant" size="20px" />
|
|
39
|
+
</icon-wrapper>
|
|
40
|
+
<icon-wrapper v-if="isError" size="16px">
|
|
41
|
+
<icon name="warning" size="16px" cursor="default" />
|
|
42
|
+
</icon-wrapper>
|
|
43
|
+
</icon-container>
|
|
44
|
+
<error-message v-if="isError">{{ errorMessage }}</error-message>
|
|
45
|
+
</input-error-wrapper>
|
|
43
46
|
</input-wrapper>
|
|
44
|
-
<error-message v-if="isError">{{ errorMessage }}</error-message>
|
|
45
47
|
</container>
|
|
46
48
|
</template>
|
|
47
49
|
|
|
@@ -49,6 +51,7 @@
|
|
|
49
51
|
import styled from 'vue-styled-components'
|
|
50
52
|
import InfoText from '../../infoText'
|
|
51
53
|
import Icon from '../../icon'
|
|
54
|
+
import ErrorMessage from '../../errorMessage'
|
|
52
55
|
|
|
53
56
|
const Container = styled.div`
|
|
54
57
|
width: 100%;
|
|
@@ -69,6 +72,13 @@ const LabelWrapper = styled.div`
|
|
|
69
72
|
justify-content: start;
|
|
70
73
|
`
|
|
71
74
|
|
|
75
|
+
const InputErrorWrapper = styled.div`
|
|
76
|
+
display: inline-grid;
|
|
77
|
+
grid-template-row: auto auto;
|
|
78
|
+
grid-gap: 0px;
|
|
79
|
+
align-items: center;
|
|
80
|
+
`
|
|
81
|
+
|
|
72
82
|
const inputProps = {
|
|
73
83
|
isError: Boolean,
|
|
74
84
|
inputWidth: String,
|
|
@@ -97,7 +107,11 @@ const InputContainer = styled('input', inputProps)`
|
|
|
97
107
|
position: relative;
|
|
98
108
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
|
99
109
|
color: ${(props) =>
|
|
100
|
-
props.isError
|
|
110
|
+
props.isError
|
|
111
|
+
? props.theme.colors.red
|
|
112
|
+
: props.isDisabled
|
|
113
|
+
? props.theme.colors.grey2
|
|
114
|
+
: props.theme.colors.black};
|
|
101
115
|
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
|
102
116
|
min-width: ${(props) => (props.minWidth ? props.minWidth : 'unset')};
|
|
103
117
|
box-sizing: border-box; // to allow width of 100% with padding
|
|
@@ -126,13 +140,6 @@ const InputWrapper = styled('div', inputAttrs)`
|
|
|
126
140
|
props.alignItems === 'vertical' || !props.hasLabel ? '1fr' : 'auto 1fr'};
|
|
127
141
|
`
|
|
128
142
|
|
|
129
|
-
const ErrorMessage = styled.div`
|
|
130
|
-
font-size: 14px;
|
|
131
|
-
color: ${(props) => props.theme.colors.red};
|
|
132
|
-
position: absolute;
|
|
133
|
-
top: calc(100% + 1px);
|
|
134
|
-
`
|
|
135
|
-
|
|
136
143
|
const IconAttrs = { size: String }
|
|
137
144
|
const IconWrapper = styled('div', IconAttrs)`
|
|
138
145
|
position: absolute;
|
|
@@ -175,7 +182,8 @@ export default {
|
|
|
175
182
|
LabelWrapper,
|
|
176
183
|
Icon,
|
|
177
184
|
IconWrapper,
|
|
178
|
-
IconContainer
|
|
185
|
+
IconContainer,
|
|
186
|
+
InputErrorWrapper
|
|
179
187
|
},
|
|
180
188
|
data() {
|
|
181
189
|
return {
|