@mirweb/mir-web-components 2.2.8 → 2.2.10

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.
@@ -19,9 +19,7 @@
19
19
  :required="required"
20
20
  :disabled="disabled"
21
21
  :name="fieldName"
22
- @input="
23
- $emit('update:modelValue', ($event.target as HTMLInputElement).value)
24
- "
22
+ @input="handleInput"
25
23
  />
26
24
  <i
27
25
  role="button"
@@ -46,9 +44,7 @@
46
44
  ]"
47
45
  :disabled="disabled"
48
46
  :name="fieldName"
49
- @input="
50
- $emit('update:modelValue', ($event.target as HTMLInputElement).value)
51
- "
47
+ @input="handleInput"
52
48
  />
53
49
  <button v-if="search" class="search"></button>
54
50
  <strong v-if="errorMessage" class="errorMessage">{{ errorMessage }}</strong>
@@ -103,7 +99,7 @@ const props = withDefaults(defineProps<Props>(), {
103
99
 
104
100
  const selectedType = computed(() => TYPES[props.type]);
105
101
 
106
- defineEmits(["update:modelValue"]);
102
+ const emit = defineEmits(["update:modelValue"]);
107
103
 
108
104
  const hidePassword = ref(true);
109
105
  const passwordFieldIcon = computed(() =>
@@ -112,6 +108,11 @@ const passwordFieldIcon = computed(() =>
112
108
  const passwordFieldType = computed(() =>
113
109
  hidePassword.value ? "password" : "text",
114
110
  );
111
+
112
+ const handleInput = (event: Event) => {
113
+ const target = event.target as HTMLInputElement;
114
+ emit("update:modelValue", target.value);
115
+ };
115
116
  </script>
116
117
 
117
118
  <style scoped lang="scss">
@@ -45,10 +45,6 @@ defineProps({
45
45
  default: false,
46
46
  },
47
47
  });
48
-
49
- defineOptions({
50
- inheritAttrs: false,
51
- });
52
48
  </script>
53
49
 
54
50
  <style scoped lang="scss">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mirweb/mir-web-components",
3
3
  "private": false,
4
- "version": "2.2.8",
4
+ "version": "2.2.10",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"