@v-c/input 0.0.2 → 1.0.0

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/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { default as BaseInput } from './BaseInput';
2
2
  import { default as useCount } from './hooks/useCount';
3
3
  import { default as Input } from './input';
4
- export type { CountConfig, InputProps, InputRef, ShowCountFormatter } from './interface';
4
+ export type { BaseInputProps, CommonInputProps, CountConfig, InputProps, InputRef, ShowCountFormatter, } from './interface';
5
5
  export { BaseInput };
6
6
  export { useCount, };
7
7
  export { resolveOnChange } from './utils/commonUtils';
package/dist/input.cjs CHANGED
@@ -7,6 +7,7 @@ let vue = require("vue");
7
7
  let __v_c_util = require("@v-c/util");
8
8
  let __v_c_util_dist_props_util = require("@v-c/util/dist/props-util");
9
9
  let __v_c_util_dist_Dom_focus = require("@v-c/util/dist/Dom/focus");
10
+ let __v_c_util_dist_KeyCode = require("@v-c/util/dist/KeyCode");
10
11
  let __v_c_util_dist_omit = require("@v-c/util/dist/omit");
11
12
  __v_c_util_dist_omit = require_rolldown_runtime.__toESM(__v_c_util_dist_omit);
12
13
  function _isSlot(s) {
@@ -83,7 +84,7 @@ var Input = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots, expose, at
83
84
  props?.onCompositionEnd?.(e);
84
85
  };
85
86
  const handleKeyDown = (e) => {
86
- if (e.key === "Enter" && !keyLockRef.value && !e.isComposing) {
87
+ if (e.key === __v_c_util_dist_KeyCode.KeyCodeStr.Enter && !keyLockRef.value && !e.isComposing) {
87
88
  keyLockRef.value = true;
88
89
  props.onPressEnter?.(e);
89
90
  }
@@ -175,7 +176,6 @@ var Input = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots, expose, at
175
176
  "autocomplete": autoComplete,
176
177
  "ref": inputRef,
177
178
  "value": formatValue.value,
178
- "onChange": onInternalChange,
179
179
  "onInput": onInternalChange,
180
180
  "onFocus": handleFocus,
181
181
  "onBlur": handleBlur,
package/dist/input.js CHANGED
@@ -5,6 +5,7 @@ import { Fragment, computed, createVNode, defineComponent, isVNode, mergeDefault
5
5
  import { clsx } from "@v-c/util";
6
6
  import { toPropsRefs } from "@v-c/util/dist/props-util";
7
7
  import { triggerFocus } from "@v-c/util/dist/Dom/focus";
8
+ import { KeyCodeStr } from "@v-c/util/dist/KeyCode";
8
9
  import omit from "@v-c/util/dist/omit";
9
10
  function _isSlot(s) {
10
11
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
@@ -80,7 +81,7 @@ var input_default = /* @__PURE__ */ defineComponent((props, { slots, expose, att
80
81
  props?.onCompositionEnd?.(e);
81
82
  };
82
83
  const handleKeyDown = (e) => {
83
- if (e.key === "Enter" && !keyLockRef.value && !e.isComposing) {
84
+ if (e.key === KeyCodeStr.Enter && !keyLockRef.value && !e.isComposing) {
84
85
  keyLockRef.value = true;
85
86
  props.onPressEnter?.(e);
86
87
  }
@@ -172,7 +173,6 @@ var input_default = /* @__PURE__ */ defineComponent((props, { slots, expose, att
172
173
  "autocomplete": autoComplete,
173
174
  "ref": inputRef,
174
175
  "value": formatValue.value,
175
- "onChange": onInternalChange,
176
176
  "onInput": onInternalChange,
177
177
  "onFocus": handleFocus,
178
178
  "onBlur": handleBlur,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@v-c/input",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "1.0.0",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -24,12 +24,13 @@
24
24
  "vue": "^3.0.0"
25
25
  },
26
26
  "dependencies": {
27
- "@v-c/util": "^0.0.19"
27
+ "@v-c/util": "^1.0.1"
28
28
  },
29
29
  "scripts": {
30
30
  "build": "vite build",
31
31
  "prepublish": "pnpm build",
32
32
  "test": "vitest run",
33
- "bump": "bumpp --release patch"
33
+ "patch": "bumpp --release patch",
34
+ "bump": "bumpp"
34
35
  }
35
36
  }