@v-c/select 0.0.1 → 0.0.3

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.
@@ -81,13 +81,11 @@ var SelectInput = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs, expo
81
81
  if (!shouldPreventClose) toggleOpen.value?.();
82
82
  } else if (triggerOpen.value) toggleOpen.value?.(false);
83
83
  }
84
- const onMouseDown = attrs.onMousedown;
85
- onMouseDown?.(event);
84
+ props?.onMouseDown?.(event);
86
85
  };
87
86
  const onInternalBlur = (event) => {
88
87
  toggleOpen.value?.(false);
89
- const onBlur = attrs.onBlur;
90
- onBlur?.(event);
88
+ props?.onBlur?.(event);
91
89
  };
92
90
  require_context.useSelectInputProvider((0, vue.computed)(() => ({
93
91
  ...props,
@@ -95,7 +93,14 @@ var SelectInput = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs, expo
95
93
  })));
96
94
  return () => {
97
95
  const RootComponent = components.value?.root;
98
- const domProps = (0, __v_c_util_dist_omit.default)({ ...attrs }, DEFAULT_OMIT_PROPS);
96
+ const domProps = (0, __v_c_util_dist_omit.default)({
97
+ ...attrs,
98
+ onFocus: props.onFocus,
99
+ onBlur: props.onBlur,
100
+ onKeydown: props.onKeyDown,
101
+ onKeyup: props.onKeyUp,
102
+ onMousedown: props.onMouseDown
103
+ }, DEFAULT_OMIT_PROPS);
99
104
  if (RootComponent) {
100
105
  if ((0, vue.isVNode)(RootComponent)) return (0, vue.createVNode)(RootComponent, {
101
106
  ...domProps,
@@ -108,6 +113,9 @@ var SelectInput = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs, expo
108
113
  "class": className.value,
109
114
  "style": style.value,
110
115
  "onMousedown": onInternalMouseDown,
116
+ "onKeydown": props.onKeyDown,
117
+ "onKeyup": props.onKeyUp,
118
+ "onFocus": props.onFocus,
111
119
  "onBlur": onInternalBlur
112
120
  }), [
113
121
  (0, vue.createVNode)(require_Affix.default, {
@@ -77,13 +77,11 @@ var SelectInput_default = /* @__PURE__ */ defineComponent((props, { attrs, expos
77
77
  if (!shouldPreventClose) toggleOpen.value?.();
78
78
  } else if (triggerOpen.value) toggleOpen.value?.(false);
79
79
  }
80
- const onMouseDown = attrs.onMousedown;
81
- onMouseDown?.(event);
80
+ props?.onMouseDown?.(event);
82
81
  };
83
82
  const onInternalBlur = (event) => {
84
83
  toggleOpen.value?.(false);
85
- const onBlur = attrs.onBlur;
86
- onBlur?.(event);
84
+ props?.onBlur?.(event);
87
85
  };
88
86
  useSelectInputProvider(computed(() => ({
89
87
  ...props,
@@ -91,7 +89,14 @@ var SelectInput_default = /* @__PURE__ */ defineComponent((props, { attrs, expos
91
89
  })));
92
90
  return () => {
93
91
  const RootComponent = components.value?.root;
94
- const domProps = omit({ ...attrs }, DEFAULT_OMIT_PROPS);
92
+ const domProps = omit({
93
+ ...attrs,
94
+ onFocus: props.onFocus,
95
+ onBlur: props.onBlur,
96
+ onKeydown: props.onKeyDown,
97
+ onKeyup: props.onKeyUp,
98
+ onMousedown: props.onMouseDown
99
+ }, DEFAULT_OMIT_PROPS);
95
100
  if (RootComponent) {
96
101
  if (isVNode(RootComponent)) return createVNode(RootComponent, {
97
102
  ...domProps,
@@ -104,6 +109,9 @@ var SelectInput_default = /* @__PURE__ */ defineComponent((props, { attrs, expos
104
109
  "class": className.value,
105
110
  "style": style.value,
106
111
  "onMousedown": onInternalMouseDown,
112
+ "onKeydown": props.onKeyDown,
113
+ "onKeyup": props.onKeyUp,
114
+ "onFocus": props.onFocus,
107
115
  "onBlur": onInternalBlur
108
116
  }), [
109
117
  createVNode(Affix_default, {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@v-c/select",
3
3
  "type": "module",
4
- "version": "0.0.1",
4
+ "version": "0.0.3",
5
5
  "description": "",
6
6
  "author": "",
7
7
  "license": "MIT",
@@ -31,8 +31,8 @@
31
31
  "dependencies": {
32
32
  "@v-c/trigger": "^1.0.1",
33
33
  "@v-c/overflow": "^1.0.0",
34
- "@v-c/virtual-list": "^1.0.0",
35
- "@v-c/util": "^1.0.1"
34
+ "@v-c/util": "^1.0.2",
35
+ "@v-c/virtual-list": "^1.0.3"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "vite build",