@eturnity/eturnity_reusable_components 1.2.39 → 1.2.40

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.39",
3
+ "version": "1.2.40",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -57,11 +57,9 @@
57
57
  :isError="isError"
58
58
  >{{ unitName }}</unit-container
59
59
  >
60
- <icon
61
- v-if="(isError || inputIcon) && !showLinearUnitName"
62
- :class="inputIconImageClass"
63
- :src="isError ? warningIcon : inputIconImage"
64
- />
60
+ <icon-wrapper v-if="isError && !showLinearUnitName" size="16px">
61
+ <icon name="warning" size="16px" cursor="default" />
62
+ </icon-wrapper>
65
63
  </input-wrapper>
66
64
  <error-message v-if="isError">{{ errorMessage }}</error-message>
67
65
  </container>
@@ -101,6 +99,7 @@ import {
101
99
  import InfoText from '../../infoText'
102
100
  import ErrorMessage from '../../errorMessage'
103
101
  import warningIcon from '../../../assets/icons/error_icon.png'
102
+ import Icon from '../../icon'
104
103
 
105
104
  const inputProps = {
106
105
  isError: Boolean,
@@ -178,15 +177,6 @@ const InputContainer = styled('input', inputProps)`
178
177
  outline: none;
179
178
  }
180
179
  `
181
- const IconProps = {
182
- inputIconHeight: String
183
- }
184
-
185
- const Icon = styled('img', IconProps)`
186
- position: absolute;
187
- right: 10px;
188
- top: 2px;
189
- `
190
180
 
191
181
  const InputWrapper = styled.span`
192
182
  position: relative;
@@ -259,6 +249,16 @@ const LabelText = styled('div', inputProps)`
259
249
  font-weight: 700;
260
250
  `
261
251
 
252
+ const IconAttrs = { size: String }
253
+ const IconWrapper = styled('div', IconAttrs)`
254
+ position: absolute;
255
+ top: 0;
256
+ bottom: 0;
257
+ margin: auto;
258
+ right: 5px;
259
+ height: ${(props) => (props.size ? props.size : 'auto')};
260
+ `
261
+
262
262
  export default {
263
263
  name: 'input-number',
264
264
  components: {
@@ -272,7 +272,8 @@ export default {
272
272
  LabelText,
273
273
  InfoText,
274
274
  Icon,
275
- SlotContainer
275
+ SlotContainer,
276
+ IconWrapper
276
277
  },
277
278
  inheritAttrs: false,
278
279
  data() {
@@ -386,25 +387,10 @@ export default {
386
387
  required: false,
387
388
  default: true
388
389
  },
389
- inputIcon: {
390
- require: false,
391
- type: Boolean,
392
- default: false
393
- },
394
- inputIconImage: {
395
- require: false,
396
- type: String,
397
- default: ''
398
- },
399
390
  allowNegative: {
400
391
  required: false,
401
392
  default: true
402
393
  },
403
- inputIconImageClass: {
404
- require: false,
405
- type: Array,
406
- default: () => []
407
- },
408
394
  slotSize: {
409
395
  required: false
410
396
  },