sprintify-ui 0.10.86 → 0.10.87

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.
@@ -105,6 +105,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
105
105
  click: (...args: any[]) => void;
106
106
  focus: (...args: any[]) => void;
107
107
  keydown: (...args: any[]) => void;
108
+ keyup: (...args: any[]) => void;
108
109
  "update:modelValue": (...args: any[]) => void;
109
110
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
110
111
  modelValue: {
@@ -203,6 +204,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
203
204
  onClick?: ((...args: any[]) => any) | undefined;
204
205
  onFocus?: ((...args: any[]) => any) | undefined;
205
206
  onKeydown?: ((...args: any[]) => any) | undefined;
207
+ onKeyup?: ((...args: any[]) => any) | undefined;
206
208
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
207
209
  }>, {
208
210
  class: string | string[];
@@ -56,7 +56,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
56
56
  blur: typeof blur;
57
57
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
58
58
  blur: (...args: any[]) => void;
59
+ click: (...args: any[]) => void;
59
60
  focus: (...args: any[]) => void;
61
+ keydown: (...args: any[]) => void;
62
+ keyup: (...args: any[]) => void;
60
63
  "update:modelValue": (...args: any[]) => void;
61
64
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
62
65
  modelValue: {
@@ -109,7 +112,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
109
112
  };
110
113
  }>> & Readonly<{
111
114
  onBlur?: ((...args: any[]) => any) | undefined;
115
+ onClick?: ((...args: any[]) => any) | undefined;
112
116
  onFocus?: ((...args: any[]) => any) | undefined;
117
+ onKeydown?: ((...args: any[]) => any) | undefined;
118
+ onKeyup?: ((...args: any[]) => any) | undefined;
113
119
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
114
120
  }>, {
115
121
  class: string | string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.10.86",
3
+ "version": "0.10.87",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vue-tsc && vite build",
@@ -181,6 +181,9 @@ const props = defineProps({
181
181
  },
182
182
  });
183
183
 
184
+ const emit = defineEmits(['update:modelValue', 'focus', 'blur', 'click', 'keydown', 'keyup']);
185
+
186
+
184
187
  const input = ref<HTMLInputElement | null>(null);
185
188
  const focus = ref(false);
186
189
 
@@ -222,6 +225,11 @@ const bindings = computed<any>(() => {
222
225
  if (event.code == 'Enter' && props.preventSubmit) {
223
226
  event.preventDefault();
224
227
  }
228
+
229
+ emit('keydown', event);
230
+ },
231
+ onKeyup(event: KeyboardEvent) {
232
+ emit('keyup', event);
225
233
  },
226
234
  onFocus: (e: Event) => {
227
235
  emit('focus', e);
@@ -254,7 +262,6 @@ const maskInternal = computed(() => {
254
262
  return props.mask;
255
263
  });
256
264
 
257
- const emit = defineEmits(['update:modelValue', 'focus', 'blur', 'click', 'keydown']);
258
265
 
259
266
  const { nameInternal, requiredInternal, hasErrorInternal, emitUpdate, sizeInternal } =
260
267
  useField({
@@ -277,10 +284,6 @@ function onClick(event: MouseEvent) {
277
284
  emit('click', event);
278
285
  }
279
286
 
280
- function onKeydown(event: KeyboardEvent) {
281
- emit('keydown', event);
282
- }
283
-
284
287
  const classes = computed(() => {
285
288
  const base = `inline-flex bg-white input-rounded border transition-colors duration-200`;
286
289
  const border = hasErrorInternal.value ? 'border-red-500' : 'border-slate-300';
@@ -10,6 +10,9 @@
10
10
  :rows="rows"
11
11
  :autocomplete="autocomplete ? 'on' : 'off'"
12
12
  :class="classes"
13
+ @click="$emit('click', $event)"
14
+ @keydown="$emit('keydown', $event)"
15
+ @keyup="$emit('keyup', $event)"
13
16
  @input="emitUpdate(transformInputValue($event))"
14
17
  @blur="$emit('blur')"
15
18
  @focus="$emit('focus')"
@@ -78,7 +81,7 @@ const props = defineProps({
78
81
  },
79
82
  });
80
83
 
81
- const emit = defineEmits(['update:modelValue', 'blur', 'focus']);
84
+ const emit = defineEmits(['update:modelValue', 'blur', 'focus', 'click', 'keydown', 'keyup']);
82
85
 
83
86
  const { nameInternal, requiredInternal, hasErrorInternal, emitUpdate, sizeInternal } =
84
87
  useField({