eco-vue-js 0.5.6 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -308,7 +308,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
308
308
  }),
309
309
  onClick: _cache[6] || (_cache[6] = ($event) => _ctx.$emit("click", $event)),
310
310
  onMousedown: _cache[7] || (_cache[7] = withModifiers(($event) => _ctx.$emit("mousedown", $event), ["stop"])),
311
- onSelect: _cache[8] || (_cache[8] = ($event) => _ctx.$emit("select:input", $event))
311
+ onSelect: _cache[8] || (_cache[8] = withModifiers(($event) => _ctx.$emit("select:input", $event), ["stop"]))
312
312
  }, null, 40, ["class", "value", "placeholder", "type", "name", "disabled", "readonly", "autocomplete", "size", "spellcheck"])),
313
313
  createVNode(_sfc_main$1, {
314
314
  loading: _ctx.loading,
@@ -3,6 +3,8 @@ declare const _default: <Item extends string | number = string>(__VLS_props: {
3
3
  required?: boolean | undefined;
4
4
  search: string;
5
5
  title?: string | undefined;
6
+ onFocus?: ((value: FocusEvent) => any) | undefined;
7
+ onBlur?: ((value: FocusEvent) => any) | undefined;
6
8
  onSelect?: ((item: Item) => any) | undefined;
7
9
  icon?: SVGComponent | undefined;
8
10
  disabled?: boolean | undefined;
@@ -48,6 +50,8 @@ declare const _default: <Item extends string | number = string>(__VLS_props: {
48
50
  (e: 'unselect', item: Item): void;
49
51
  (e: 'update:search', value: string): void;
50
52
  (e: 'create:option', value: string): void;
53
+ (e: 'focus', value: FocusEvent): void;
54
+ (e: 'blur', value: FocusEvent): void;
51
55
  };
52
56
  } | undefined, __VLS_expose?: ((exposed: import("vue").ShallowUnwrapRef<{
53
57
  focus: () => void;
@@ -57,6 +61,8 @@ declare const _default: <Item extends string | number = string>(__VLS_props: {
57
61
  required?: boolean | undefined;
58
62
  search: string;
59
63
  title?: string | undefined;
64
+ onFocus?: ((value: FocusEvent) => any) | undefined;
65
+ onBlur?: ((value: FocusEvent) => any) | undefined;
60
66
  onSelect?: ((item: Item) => any) | undefined;
61
67
  icon?: SVGComponent | undefined;
62
68
  disabled?: boolean | undefined;
@@ -106,6 +112,8 @@ declare const _default: <Item extends string | number = string>(__VLS_props: {
106
112
  (e: 'unselect', item: Item): void;
107
113
  (e: 'update:search', value: string): void;
108
114
  (e: 'create:option', value: string): void;
115
+ (e: 'focus', value: FocusEvent): void;
116
+ (e: 'blur', value: FocusEvent): void;
109
117
  };
110
118
  }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
111
119
  [key: string]: any;
@@ -115,6 +123,8 @@ declare const _default: <Item extends string | number = string>(__VLS_props: {
115
123
  required?: boolean | undefined;
116
124
  search: string;
117
125
  title?: string | undefined;
126
+ onFocus?: ((value: FocusEvent) => any) | undefined;
127
+ onBlur?: ((value: FocusEvent) => any) | undefined;
118
128
  onSelect?: ((item: Item) => any) | undefined;
119
129
  icon?: SVGComponent | undefined;
120
130
  disabled?: boolean | undefined;
@@ -164,6 +174,8 @@ declare const _default: <Item extends string | number = string>(__VLS_props: {
164
174
  (e: 'unselect', item: Item): void;
165
175
  (e: 'update:search', value: string): void;
166
176
  (e: 'create:option', value: string): void;
177
+ (e: 'focus', value: FocusEvent): void;
178
+ (e: 'blur', value: FocusEvent): void;
167
179
  };
168
180
  } | undefined;
169
181
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelect.vue"],"names":[],"mappings":"AA0KA;AAEA,OAAO,EAAwC,KAAK,SAAS,EAAC,MAAM,KAAK,CAAA;;;YAwnB/D,MAAM;;;;;;gBADF,IAAI,EAAE;;;;;;;;;;;;;;aAET,IAAI,EAAE;;;gBAOsB,IAAI;;;;;;;;;;WAuBpC,GAAG;;;;;;YArEoB,GAAG;uBACL,GAAG;;;YAxiBzB,QAAQ,QAAQ,IAAI,GAAG,IAAI;YAC3B,UAAU,QAAQ,IAAI,GAAG,IAAI;YAC7B,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;;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iC,IAAI;;;gBA9BjE,MAAM;;;;;;;;oBADF,IAAI,EAAE;;;;;;;;;;;;;;iBAET,IAAI,EAAE;;;oBAOsB,IAAI;;;;;;;;;;;;;SAsB4B,IAAI;WACpE,GAAG;;;;;;YArEoB,GAAG;uBACL,GAAG;;;YA1iBzB,QAAQ,QAAQ,IAAI,GAAG,IAAI;YAC3B,UAAU,QAAQ,IAAI,GAAG,IAAI;YAC7B,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,MAAM,SAAS,UAAU,GAAG,IAAI;;;;;;;;oBA0kB5B,MAAM;;;;;;;;wBADF,IAAI,EAAE;;;;;;;;;;;;;;qBAET,IAAI,EAAE;;;wBAOsB,IAAI;;;;;;;;;;;;;aAsB4B,IAAI;eACpE,GAAG;;;;;;gBArEoB,GAAG;2BACL,GAAG;;;gBA1iBzB,QAAQ,QAAQ,IAAI,GAAG,IAAI;gBAC3B,UAAU,QAAQ,IAAI,GAAG,IAAI;gBAC7B,eAAe,SAAS,MAAM,GAAG,IAAI;gBACrC,eAAe,SAAS,MAAM,GAAG,IAAI;gBACrC,OAAO,SAAS,UAAU,GAAG,IAAI;gBACjC,MAAM,SAAS,UAAU,GAAG,IAAI;;;;AAxCtC,wBAspB2E"}
@@ -42,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
42
  mono: { type: Boolean },
43
43
  hideOptionIcon: { type: Boolean }
44
44
  },
45
- emits: ["select", "unselect", "update:search", "create:option"],
45
+ emits: ["select", "unselect", "update:search", "create:option", "focus", "blur"],
46
46
  setup(__props, { expose: __expose, emit: __emit }) {
47
47
  const props = __props;
48
48
  const emit = __emit;
@@ -181,8 +181,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
181
181
  close();
182
182
  _ctx.$emit("update:search", "");
183
183
  }),
184
- onFocus: _cache[7] || (_cache[7] = ($event) => focused.value = true),
185
- onBlur: _cache[8] || (_cache[8] = ($event) => focused.value = false)
184
+ onFocus: _cache[7] || (_cache[7] = ($event) => {
185
+ focused.value = true;
186
+ _ctx.$emit("focus", $event);
187
+ }),
188
+ onBlur: _cache[8] || (_cache[8] = ($event) => {
189
+ focused.value = false;
190
+ _ctx.$emit("blur", $event);
191
+ })
186
192
  }, createSlots({
187
193
  prefix: withCtx(({ unclickable }) => [
188
194
  (_ctx.hidePrefix ? unref(isMobile) ? unclickable || !focused.value : !isOpen.value : true) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.modelValue, (option) => {
@@ -1 +1 @@
1
- {"version":3,"file":"WSelectAsync.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectAsync.vue"],"names":[],"mappings":"AA6GA;AAEA,OAAO,EAA0B,KAAK,SAAS,EAAC,MAAM,KAAK,CAAA;;;YAic/C,MAAM;;;;;;;0BA4BO,IAAI,KAAK,KAAK;gBA7BvB,KAAK,EAAE;;;;;;;;;;;;iBAIN,WAAW;gBAFZ,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC;2BACnC,OAAO,KAAK,OAAO;;mBA4B3B,QAAQ,WAAW,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;gBApBhD,IAAI;;;;;;;;;;;;;WA4BtC,GAAG;;yBA7UQ,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;0BAC7B;YAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;yBADrF,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;0BAC7B;YAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,QAAQ,EAAE,OA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gBAAC,QAAQ,EAAE,OAAO,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAC;gBAAC,KAAK,EAAE,OAAO,CAAA;aAAC,KAAK,IAAI;;6BADrF,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;8BAC7B;gBAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAC;gBAAC,KAAK,EAAE,OAAO,CAAA;aAAC,KAAK,IAAI;;;gBAvFjG,QAAQ,QAAQ,KAAK,GAAG,IAAI;gBAC5B,UAAU,QAAQ,KAAK,GAAG,IAAI;gBAC9B,eAAe,SAAS,MAAM,GAAG,IAAI;gBACrC,mBAAmB,SAAS,KAAK,EAAE,GAAG,IAAI;gBAC1C,eAAe,SAAS,MAAM,GAAG,IAAI;;;;AAjE3C,wBAqe2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -183,6 +183,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
183
183
  "hide-option-icon": _ctx.hideOptionIcon,
184
184
  "value-getter": _ctx.valueGetter,
185
185
  "query-options": _ctx.queryOptions,
186
+ class: "h-80",
186
187
  onSelect: select,
187
188
  onUnselect: unselect,
188
189
  "onCreate:option": create,
@@ -31,6 +31,7 @@ declare const _default: <Item extends string | number, AllowClear extends boolea
31
31
  searchSize?: number | undefined;
32
32
  "onCreate:option"?: ((value: string) => any) | undefined;
33
33
  allowCreate?: boolean | undefined;
34
+ searchModel?: boolean | undefined;
34
35
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
35
36
  attrs: any;
36
37
  slots: {
@@ -81,6 +82,7 @@ declare const _default: <Item extends string | number, AllowClear extends boolea
81
82
  searchSize?: number | undefined;
82
83
  "onCreate:option"?: ((value: string) => any) | undefined;
83
84
  allowCreate?: boolean | undefined;
85
+ searchModel?: boolean | undefined;
84
86
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
85
87
  expose(exposed: import("vue").ShallowUnwrapRef<{
86
88
  blur: () => void;
@@ -135,6 +137,7 @@ declare const _default: <Item extends string | number, AllowClear extends boolea
135
137
  searchSize?: number | undefined;
136
138
  "onCreate:option"?: ((value: string) => any) | undefined;
137
139
  allowCreate?: boolean | undefined;
140
+ searchModel?: boolean | undefined;
138
141
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
139
142
  expose(exposed: import("vue").ShallowUnwrapRef<{
140
143
  blur: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"WSelectSingle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectSingle.vue"],"names":[],"mappings":"AAoDA;AAEA,OAAO,EAA8B,KAAK,SAAS,EAAC,MAAM,KAAK,CAAA;;;YAuNrD,MAAM;;;;;;gBADF,IAAI,GAAG,IAAI;;;;;;;;;;;;;;aAEd,IAAI,EAAE;;;gBAOsB,IAAI;;;;;;;;WAsBpC,GAAG;;;;;;YAtDmB,GAAG;uBACJ,GAAG;;;YAxJzB,mBAAmB,wDAAoB,IAAI;YAC3C,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;OA0M4B,IAAI;;;gBA7BjE,MAAM;;;;;;oBADF,IAAI,GAAG,IAAI;;;;;;;;;;;;;;iBAEd,IAAI,EAAE;;;oBAOsB,IAAI;;;;;;;;;;SAqB4B,IAAI;WACpE,GAAG;;;;;;YAtDmB,GAAG;uBACJ,GAAG;;;YAxJzB,mBAAmB,wDAAoB,IAAI;YAC3C,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;;;;;oBA6KjC,MAAM;;;;;;wBADF,IAAI,GAAG,IAA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C,eAAe,SAAS,MAAM,GAAG,IAAI;;;;AAvC3C,wBA+P2E"}
@@ -27,7 +27,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
27
  icon: {},
28
28
  mono: { type: Boolean },
29
29
  allowClear: {},
30
- hideOptionIcon: { type: Boolean }
30
+ hideOptionIcon: { type: Boolean },
31
+ searchModel: { type: Boolean }
31
32
  },
32
33
  emits: ["update:modelValue", "update:search", "create:option"],
33
34
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -83,7 +84,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
83
84
  onSelect: _cache[0] || (_cache[0] = ($event) => updateModelValue($event)),
84
85
  onUnselect: _cache[1] || (_cache[1] = ($event) => updateModelValue(_ctx.allowClear ? null : $event)),
85
86
  "onUpdate:search": _cache[2] || (_cache[2] = ($event) => emit("update:search", $event)),
86
- "onCreate:option": _cache[3] || (_cache[3] = ($event) => createOption($event))
87
+ "onCreate:option": _cache[3] || (_cache[3] = ($event) => createOption($event)),
88
+ onFocus: _cache[4] || (_cache[4] = ($event) => _ctx.searchModel && typeof _ctx.modelValue === "string" ? _ctx.$emit("update:search", _ctx.modelValue) : void 0)
87
89
  }, createSlots({
88
90
  option: withCtx(({ option, selected, model }) => [
89
91
  renderSlot(_ctx.$slots, "option", {
@@ -78,7 +78,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
78
78
  return openBlock(), createElementBlock("div", {
79
79
  ref_key: "element",
80
80
  ref: element,
81
- class: normalizeClass(["relative grid grid-cols-[1fr,2.5rem] w-full select-none cursor-pointer py-2 px-[1.0625rem]", {
81
+ class: normalizeClass(["relative grid grid-cols-[1fr,2.5rem] w-full py-2 px-[1.0625rem]", {
82
82
  "bg-primary-light dark:bg-primary-darkest": _ctx.isSelected,
83
83
  "before:opacity-5": !_ctx.loading && _ctx.isCursor && !_ctx.skeleton,
84
84
  "cursor-progress": _ctx.loading || _ctx.skeleton,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rsmple/eco-vue-js.git"
6
6
  },
7
- "version": "0.5.6",
7
+ "version": "0.5.8",
8
8
  "scripts": {
9
9
  "dev": "vite",
10
10
  "build": "run-p type-check build-only",