@avakhula/ui 0.0.87 → 0.0.89

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": "@avakhula/ui",
3
- "version": "0.0.87",
3
+ "version": "0.0.89",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
@@ -135,6 +135,9 @@ export default {
135
135
  type: [String, Number],
136
136
  default: "",
137
137
  },
138
+ modelValue: {
139
+ type: [String, Number],
140
+ },
138
141
  settingsVerticalPosition: {
139
142
  type: String,
140
143
  default: verticalPosition.bottom,
@@ -146,7 +149,7 @@ export default {
146
149
  },
147
150
  data() {
148
151
  return {
149
- actualValue: this.value,
152
+ actualValue: this.modelValue || this.value,
150
153
  showPassword: false,
151
154
  };
152
155
  },
@@ -156,19 +159,21 @@ export default {
156
159
  },
157
160
  clearInput() {
158
161
  this.actualValue = "";
162
+ this.$emit("update:modelValue", this.actualValue);
159
163
  this.$emit("input", this.actualValue);
160
164
  },
161
- onBlur(e) {
162
- this.$emit("blur", e.target.value);
165
+ onBlur() {
166
+ this.$emit("blur", this.actualValue);
163
167
  },
164
- onFocus(e) {
165
- this.$emit("focus", e.target.value);
168
+ onFocus() {
169
+ this.$emit("focus", this.actualValue);
166
170
  },
167
- onInput(e) {
171
+ onInput() {
168
172
  if (this.debounce) {
169
- this.delayedInput(e.target.value);
173
+ this.delayedInput(this.actualValue);
170
174
  } else {
171
- this.$emit("input", e.target.value);
175
+ this.$emit("update:modelValue", this.actualValue);
176
+ this.$emit("input", this.actualValue);
172
177
  }
173
178
  },
174
179
  delayedInput(value) {
@@ -179,6 +184,7 @@ export default {
179
184
 
180
185
  this.timer = setTimeout(() => {
181
186
  this.$emit("input", value);
187
+ this.$emit("update:modelValue", value);
182
188
  }, this.debounce);
183
189
  },
184
190
  },