@eturnity/eturnity_reusable_components 1.1.92 → 1.1.95
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
|
@@ -267,6 +267,10 @@ export default {
|
|
|
267
267
|
required: false,
|
|
268
268
|
default: null,
|
|
269
269
|
},
|
|
270
|
+
numberToStringEnabled: {
|
|
271
|
+
required: false,
|
|
272
|
+
default: true
|
|
273
|
+
}
|
|
270
274
|
},
|
|
271
275
|
methods: {
|
|
272
276
|
onChangeHandler(event) {
|
|
@@ -337,7 +341,7 @@ export default {
|
|
|
337
341
|
: this.minNumber || this.minNumber === 0
|
|
338
342
|
? this.minNumber
|
|
339
343
|
: ""
|
|
340
|
-
if ((adjustedMinValue || adjustedMinValue === 0) && !this.isFocused) {
|
|
344
|
+
if ((adjustedMinValue || adjustedMinValue === 0) && !this.isFocused && this.numberToStringEnabled) {
|
|
341
345
|
let input = numberToString({
|
|
342
346
|
value: adjustedMinValue,
|
|
343
347
|
numberPrecision: this.numberPrecision,
|
|
@@ -346,11 +350,13 @@ export default {
|
|
|
346
350
|
return input + " " + unit
|
|
347
351
|
} else if (!adjustedMinValue && adjustedMinValue !== 0) {
|
|
348
352
|
return ""
|
|
349
|
-
} else {
|
|
353
|
+
} else if (this.numberToStringEnabled) {
|
|
350
354
|
return numberToString({
|
|
351
355
|
value: adjustedMinValue,
|
|
352
356
|
numberPrecision: this.numberPrecision,
|
|
353
357
|
})
|
|
358
|
+
} else {
|
|
359
|
+
return adjustedMinValue
|
|
354
360
|
}
|
|
355
361
|
},
|
|
356
362
|
},
|
|
@@ -98,7 +98,7 @@ const InputWrapper = styled("div", inputAttrs)`
|
|
|
98
98
|
position: relative;
|
|
99
99
|
display: grid;
|
|
100
100
|
align-items: center;
|
|
101
|
-
gap:
|
|
101
|
+
gap: 8px;
|
|
102
102
|
grid-template-columns: ${(props) =>
|
|
103
103
|
!props.hasLabel
|
|
104
104
|
? "1fr"
|
|
@@ -111,7 +111,7 @@ const ErrorMessage = styled.div`
|
|
|
111
111
|
font-size: 14px;
|
|
112
112
|
color: ${(props) => props.theme.colors.red};
|
|
113
113
|
position: absolute;
|
|
114
|
-
|
|
114
|
+
top: calc(100% + 1px);
|
|
115
115
|
`
|
|
116
116
|
|
|
117
117
|
const InputLabel = styled.div`
|