@eturnity/eturnity_reusable_components 1.2.22 → 1.2.23

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.22",
3
+ "version": "1.2.23",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -19,6 +19,7 @@
19
19
  // color="red"
20
20
  // hoveredColor="blue"
21
21
  // size="60px" by default, this is 30px
22
+ // cursor="default"
22
23
  // />
23
24
 
24
25
  import styled from 'vue-styled-components'
@@ -14,29 +14,32 @@
14
14
  :alignText="infoTextAlign"
15
15
  />
16
16
  </label-wrapper>
17
- <input-container
18
- :placeholder="placeholder"
19
- :isError="isError"
20
- :inputWidth="inputWidth"
21
- :minWidth="minWidth"
22
- :value="value"
23
- @input="onChangeHandler"
24
- :noBorder="noBorder"
25
- :disabled="disabled"
26
- :isDisabled="disabled"
27
- :fontSize="fontSize"
28
- :inputType="inputType"
29
- :type="inputTypeData"
30
- />
31
- <icon-wrapper
32
- v-if="inputType === 'password' && !isError"
33
- @click="toggleShowPassword()"
34
- >
35
- <icon name="current_variant" size="20px" />
36
- </icon-wrapper>
37
- <icon-wrapper v-if="isError">
38
- <icon name="warning" size="16px" />
39
- </icon-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>
40
43
  </input-wrapper>
41
44
  <error-message v-if="isError">{{ errorMessage }}</error-message>
42
45
  </container>
@@ -90,6 +93,7 @@ const InputContainer = styled('input', inputProps)`
90
93
  ? '11px 25px 11px 10px'
91
94
  : '11px 5px 11px 10px'};
92
95
  border-radius: 4px;
96
+ position: relative;
93
97
  font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
94
98
  color: ${(props) =>
95
99
  props.isError ? props.theme.colors.red : props.theme.colors.black};
@@ -128,10 +132,18 @@ const ErrorMessage = styled.div`
128
132
  top: calc(100% + 1px);
129
133
  `
130
134
 
131
- const IconWrapper = styled.div`
135
+ const IconAttrs = { size: String }
136
+ const IconWrapper = styled('div', IconAttrs)`
132
137
  position: absolute;
133
- top: 55%;
138
+ top: 0;
139
+ bottom: 0;
140
+ margin: auto;
134
141
  right: 5px;
142
+ height: ${(props) => (props.size ? props.size : 'auto')};
143
+ `
144
+
145
+ const IconContainer = styled.div`
146
+ position: relative;
135
147
  `
136
148
 
137
149
  export default {
@@ -161,7 +173,8 @@ export default {
161
173
  InputLabel,
162
174
  LabelWrapper,
163
175
  Icon,
164
- IconWrapper
176
+ IconWrapper,
177
+ IconContainer
165
178
  },
166
179
  data() {
167
180
  return {