toggle-components-library 1.33.0-beta.1 → 1.33.0-beta.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/dist/toggle-components-library.common.js +55 -23
- package/dist/toggle-components-library.common.js.map +1 -1
- package/dist/toggle-components-library.css +1 -1
- package/dist/toggle-components-library.umd.js +55 -23
- package/dist/toggle-components-library.umd.js.map +1 -1
- package/dist/toggle-components-library.umd.min.js +1 -1
- package/dist/toggle-components-library.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/forms/ToggleInputCurrency.vue +8 -2
- package/src/components/forms/ToggleInputPercentage.vue +15 -4
- package/src/components/forms/ToggleInputText.vue +1 -1
- package/src/sass/includes/_as_inputs.scss +4 -0
package/package.json
CHANGED
|
@@ -12,11 +12,12 @@
|
|
|
12
12
|
</label>
|
|
13
13
|
<input
|
|
14
14
|
:name="name ? name : 'ToggleInputCurrency' "
|
|
15
|
-
:class="[ 'toggle-input', size]"
|
|
15
|
+
:class="[ 'toggle-input', {'toggle-input-is-readonly':readonly, size}]"
|
|
16
16
|
:placeholder="placeholder ? placeholder : '' "
|
|
17
17
|
:autocomplete="autocomplete ? 'on' : 'off' "
|
|
18
18
|
:required="required"
|
|
19
19
|
:disabled="disabled"
|
|
20
|
+
:readonly="readonly"
|
|
20
21
|
v-model="inputVal"
|
|
21
22
|
@blur="isInputActive = false"
|
|
22
23
|
@focus="isInputActive = true"
|
|
@@ -98,6 +99,11 @@ export default {
|
|
|
98
99
|
required: false,
|
|
99
100
|
default: false
|
|
100
101
|
},
|
|
102
|
+
readonly: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
required: false,
|
|
105
|
+
default: false
|
|
106
|
+
},
|
|
101
107
|
},
|
|
102
108
|
|
|
103
109
|
created : function(){
|
|
@@ -115,7 +121,7 @@ export default {
|
|
|
115
121
|
|
|
116
122
|
get: function() {
|
|
117
123
|
|
|
118
|
-
if (this.isInputActive) {
|
|
124
|
+
if (this.isInputActive && !this.readonly) {
|
|
119
125
|
if((this.value === '' || this.value === null) && this.allowBlank)
|
|
120
126
|
return '';
|
|
121
127
|
// Cursor is inside the input field. unformat display value for user
|
|
@@ -10,13 +10,14 @@
|
|
|
10
10
|
</label>
|
|
11
11
|
<input
|
|
12
12
|
:name="name ? name : 'ToggleInputPercentage' "
|
|
13
|
-
:class="[ 'toggle-input', size]"
|
|
13
|
+
:class="[ 'toggle-input', {'toggle-input-is-readonly':readonly, size}]"
|
|
14
14
|
:placeholder="placeholder ? placeholder : '' "
|
|
15
15
|
:autocomplete="autocomplete ? 'on' : 'off' "
|
|
16
16
|
:required="required"
|
|
17
17
|
v-model="inputVal"
|
|
18
18
|
@blur="isInputActive = false"
|
|
19
|
-
@focus="isInputActive = true"
|
|
19
|
+
@focus="isInputActive = true"
|
|
20
|
+
:readonly="readonly"
|
|
20
21
|
/>
|
|
21
22
|
<label
|
|
22
23
|
class="toggle-input-label-error"
|
|
@@ -77,7 +78,17 @@ export default {
|
|
|
77
78
|
allowFloat: {
|
|
78
79
|
type: Boolean,
|
|
79
80
|
default: false
|
|
80
|
-
}
|
|
81
|
+
},
|
|
82
|
+
readonly: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
required: false,
|
|
85
|
+
default: false
|
|
86
|
+
},
|
|
87
|
+
disabled: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
required: false,
|
|
90
|
+
default: false
|
|
91
|
+
},
|
|
81
92
|
},
|
|
82
93
|
|
|
83
94
|
created : function(){
|
|
@@ -100,7 +111,7 @@ export default {
|
|
|
100
111
|
inputVal: {
|
|
101
112
|
|
|
102
113
|
get: function() {
|
|
103
|
-
if (this.isInputActive) {
|
|
114
|
+
if (this.isInputActive && !this.readonly) {
|
|
104
115
|
// Cursor is inside the input field. unformat display value for user
|
|
105
116
|
return this.value.toString()
|
|
106
117
|
} else {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<input
|
|
12
12
|
:type="type"
|
|
13
13
|
:name="name ? name : 'ToggleInputText' "
|
|
14
|
-
:class="[ 'toggle-input', size]"
|
|
14
|
+
:class="['toggle-input', {'toggle-input-is-readonly':readonly, size}]"
|
|
15
15
|
:placeholder="placeholder ? placeholder : '' "
|
|
16
16
|
:autocomplete="autocomplete ? 'on' : 'off' "
|
|
17
17
|
:required="required"
|