@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "1.2.26-EPDM-3412.0",
3
+ "version": "1.2.26-EPDM-3412.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -22,7 +22,7 @@ const TextOverlay = styled.div`
22
22
  padding: 10px;
23
23
  width: max-content;
24
24
  max-width: 100%;
25
- min-width: 200px;
25
+ min-width: min-content;
26
26
  font-size: 11px;
27
27
  font-weight: 400;
28
28
  border-radius: 4px;
@@ -10,38 +10,42 @@
10
10
  v-if="infoTextMessage"
11
11
  :text="infoTextMessage"
12
12
  borderColor="#ccc"
13
- :size="fontSize ? fontSize : '16'"
13
+ :size="fontSize ? fontSize : '16px'"
14
14
  :alignText="infoTextAlign"
15
15
  />
16
16
  </label-wrapper>
17
- <icon-container>
18
- <input-container
19
- :placeholder="placeholder"
20
- :isError="isError"
21
- :inputWidth="inputWidth"
22
- :minWidth="minWidth"
23
- :value="value"
24
- @input="onChangeHandler"
25
- :noBorder="noBorder"
26
- :disabled="disabled"
27
- :isDisabled="disabled"
28
- :fontSize="fontSize"
29
- :inputType="inputType"
30
- :type="inputTypeData"
31
- />
32
- <icon-wrapper
33
- v-if="inputType === 'password' && !isError"
34
- @click="toggleShowPassword()"
35
- size="20px"
36
- >
37
- <icon name="current_variant" size="20px" />
38
- </icon-wrapper>
39
- <icon-wrapper v-if="isError" size="16px">
40
- <icon name="warning" size="16px" cursor="default" />
41
- </icon-wrapper>
42
- </icon-container>
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 ? props.theme.colors.red : props.theme.colors.black};
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 {