@eturnity/eturnity_reusable_components 1.2.26-EPDM-3412.0 → 1.2.26-EPDM-3412.2
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,42 @@
|
|
|
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">{{
|
|
45
|
+
errorMessage
|
|
46
|
+
}}</error-message>
|
|
47
|
+
</input-error-wrapper>
|
|
43
48
|
</input-wrapper>
|
|
44
|
-
<error-message v-if="isError">{{ errorMessage }}</error-message>
|
|
45
49
|
</container>
|
|
46
50
|
</template>
|
|
47
51
|
|
|
@@ -49,6 +53,7 @@
|
|
|
49
53
|
import styled from 'vue-styled-components'
|
|
50
54
|
import InfoText from '../../infoText'
|
|
51
55
|
import Icon from '../../icon'
|
|
56
|
+
import ErrorMessage from '../../errorMessage'
|
|
52
57
|
|
|
53
58
|
const Container = styled.div`
|
|
54
59
|
width: 100%;
|
|
@@ -69,6 +74,13 @@ const LabelWrapper = styled.div`
|
|
|
69
74
|
justify-content: start;
|
|
70
75
|
`
|
|
71
76
|
|
|
77
|
+
const InputErrorWrapper = styled.div`
|
|
78
|
+
display: inline-grid;
|
|
79
|
+
grid-template-row: auto auto;
|
|
80
|
+
grid-gap: 0px;
|
|
81
|
+
align-items: center;
|
|
82
|
+
`
|
|
83
|
+
|
|
72
84
|
const inputProps = {
|
|
73
85
|
isError: Boolean,
|
|
74
86
|
inputWidth: String,
|
|
@@ -97,7 +109,11 @@ const InputContainer = styled('input', inputProps)`
|
|
|
97
109
|
position: relative;
|
|
98
110
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
|
99
111
|
color: ${(props) =>
|
|
100
|
-
props.isError
|
|
112
|
+
props.isError
|
|
113
|
+
? props.theme.colors.red
|
|
114
|
+
: props.isDisabled
|
|
115
|
+
? props.theme.colors.grey2
|
|
116
|
+
: props.theme.colors.black};
|
|
101
117
|
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
|
102
118
|
min-width: ${(props) => (props.minWidth ? props.minWidth : 'unset')};
|
|
103
119
|
box-sizing: border-box; // to allow width of 100% with padding
|
|
@@ -126,13 +142,6 @@ const InputWrapper = styled('div', inputAttrs)`
|
|
|
126
142
|
props.alignItems === 'vertical' || !props.hasLabel ? '1fr' : 'auto 1fr'};
|
|
127
143
|
`
|
|
128
144
|
|
|
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
145
|
const IconAttrs = { size: String }
|
|
137
146
|
const IconWrapper = styled('div', IconAttrs)`
|
|
138
147
|
position: absolute;
|
|
@@ -175,7 +184,8 @@ export default {
|
|
|
175
184
|
LabelWrapper,
|
|
176
185
|
Icon,
|
|
177
186
|
IconWrapper,
|
|
178
|
-
IconContainer
|
|
187
|
+
IconContainer,
|
|
188
|
+
InputErrorWrapper
|
|
179
189
|
},
|
|
180
190
|
data() {
|
|
181
191
|
return {
|