@community-release/nx-ui 0.0.57 → 0.0.58

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/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "ui",
3
3
  "configKey": "ui",
4
- "version": "0.0.57"
4
+ "version": "0.0.58"
5
5
  }
@@ -17,11 +17,10 @@
17
17
 
18
18
  @change="updateValue($event.target.value)"
19
19
  @input="updateValue($event.target.value)"
20
- @blur="handleBlur($event.target.value)"
20
+ @focus="handleFocusBlur(true, $event.target.value)"
21
+ @blur="handleFocusBlur(false, $event.target.value)"
21
22
  @keyup.enter="updateValue($event.target.value, true, true)"
22
23
 
23
- @focus="haveFocus = true"
24
-
25
24
  formnovalidate
26
25
  spellcheck="false"
27
26
  />
@@ -38,7 +37,7 @@
38
37
  import comProps from '#build/ui.input.mjs';
39
38
 
40
39
  // Misc
41
- const emit = defineEmits(['input', 'enter', 'blur', 'update:modelValue']);
40
+ const emit = defineEmits(['input', 'enter', 'focus', 'blur', 'update:modelValue']);
42
41
  const slots = useSlots();
43
42
 
44
43
  // Data
@@ -109,11 +108,11 @@
109
108
  if (submit) emit('enter', validValue);
110
109
  }
111
110
 
112
- function handleBlur(v) {
113
- haveFocus.value = false;
114
-
115
- emit('blur', v);
116
- updateValue(v);
111
+ function handleFocusBlur(focus, value) {
112
+ haveFocus.value = focus;
113
+ emit(focus ? 'focus' : 'blur', focus);
114
+
115
+ if (!focus) updateValue(value);
117
116
  }
118
117
 
119
118
  const hasSlot = (name) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@community-release/nx-ui",
3
- "version": "0.0.57",
3
+ "version": "0.0.58",
4
4
  "packageManager": "pnpm@10.14.0",
5
5
  "description": "nx-ui - Nuxt UI library",
6
6
  "repository": {