@effect-app/vue-components 0.1.3 → 0.2.1

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.
@@ -36,6 +36,7 @@ declare const _default: <From, To>(__VLS_props: NonNullable<Awaited<typeof __VLS
36
36
  title: string;
37
37
  value: string;
38
38
  }[];
39
+ onFocusout: () => void;
39
40
  }) => any) | undefined;
40
41
  };
41
42
  emit: {};
@@ -1,12 +1,18 @@
1
1
  import type { InputProps } from "./InputProps";
2
2
  declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
+ readonly onBlur?: ((event: Event) => any) | undefined;
5
+ readonly onFocus?: ((event: Event) => any) | undefined;
6
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onBlur" | "onFocus"> & {
4
7
  inputProps: InputProps<T>;
5
8
  } & Partial<{}>> & import("vue").PublicProps;
6
9
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
7
10
  attrs: any;
8
11
  slots: {};
9
- emit: {};
12
+ emit: {
13
+ (e: "focus", event: Event): void;
14
+ (e: "blur", event: Event): void;
15
+ };
10
16
  }>) => import("vue").VNode & {
11
17
  __ctx?: Awaited<typeof __VLS_setup>;
12
18
  };
@@ -34,6 +34,7 @@ declare const _default: <To>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup
34
34
  title: string;
35
35
  value: string;
36
36
  }[];
37
+ onFocusout: () => void;
37
38
  }) => any) | undefined;
38
39
  };
39
40
  emit: {};
@@ -1,10 +1,10 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(o,t){const a=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(a&&a.call(this),this.shadowRoot){const i=document.createElement("style");i.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),this.shadowRoot.appendChild(i)}},e.call(window.customElements,o,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { defineComponent as A, getCurrentInstance as B, useId as C, computed as n, watch as _, onMounted as L, ref as O, watchEffect as P, useAttrs as S, renderSlot as D, normalizeProps as M, guardReactiveProps as R, createBlock as T, createCommentVNode as U, unref as z, openBlock as F, mergeProps as N } from "vue";
3
- import { useStore as j } from "@tanstack/vue-form";
4
- import { useOmegaErrors as G } from "./vue-components.es4.js";
5
- import H from "./vue-components.es18.js";
2
+ import { defineComponent as C, getCurrentInstance as L, useId as O, computed as n, watch as q, onMounted as S, ref as A, watchEffect as D, renderSlot as F, mergeProps as E, createBlock as M, createCommentVNode as P, unref as T, openBlock as U } from "vue";
3
+ import { useStore as N } from "@tanstack/vue-form";
4
+ import { useOmegaErrors as R } from "./vue-components.es4.js";
5
+ import j from "./vue-components.es18.js";
6
6
 
7
- const Y = /* @__PURE__ */ A({
7
+ const Q = /* @__PURE__ */ C({
8
8
  inheritAttrs: !1,
9
9
  __name: "OmegaInternalInput",
10
10
  props: {
@@ -15,73 +15,73 @@ const Y = /* @__PURE__ */ A({
15
15
  type: {},
16
16
  validators: {}
17
17
  },
18
- setup(q) {
19
- const e = q, l = B(), E = l == null ? void 0 : l.appContext.components.VTextField, o = C(), u = e.field, a = j(u.store, (t) => t), i = n(() => {
18
+ setup(I) {
19
+ const e = I, l = L(), $ = l == null ? void 0 : l.appContext.components.VTextField, o = O(), u = e.field, a = N(u.store, (t) => t), i = n(() => {
20
20
  var t, r;
21
21
  return e.type ? e.type : ((t = e.meta) == null ? void 0 : t.type) === "string" ? e.meta.format === "email" ? "email" : "string" : ((r = e.meta) == null ? void 0 : r.type) || "unknown";
22
- }), s = n(() => a.value.value), p = n(
22
+ }), m = n(() => a.value.value), p = n(
23
23
  () => (
24
24
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
25
  a.value.meta.errors.map((t) => t == null ? void 0 : t.message).filter(Boolean)
26
26
  )
27
27
  );
28
- _(
29
- () => [!!s.value],
28
+ q(
29
+ () => [!!m.value],
30
30
  () => {
31
31
  var t, r;
32
- p.value.length && !s.value && !((t = e.meta) != null && t.required) && u.setValue(
32
+ p.value.length && !m.value && !((t = e.meta) != null && t.required) && u.setValue(
33
33
  ((r = e.meta) == null ? void 0 : r.nullableOrUndefined) === "undefined" ? void 0 : null
34
34
  );
35
35
  }
36
- ), L(() => {
36
+ ), S(() => {
37
37
  var t, r;
38
- !s.value && !((t = e.meta) != null && t.required) && ((r = e.meta) == null ? void 0 : r.nullableOrUndefined) === "null" && u.setValue(null);
38
+ !m.value && !((t = e.meta) != null && t.required) && ((r = e.meta) == null ? void 0 : r.nullableOrUndefined) === "null" && u.setValue(null);
39
39
  });
40
- const m = O(!1), I = () => {
41
- m.value = !0;
42
- }, { addError: $, formSubmissionAttempts: k, removeError: w } = G();
43
- P(() => {
44
- k.value > 0 && (m.value = !0);
40
+ const s = A(!1), f = () => {
41
+ s.value = !0;
42
+ }, { addError: k, formSubmissionAttempts: w, removeError: B } = R();
43
+ D(() => {
44
+ w.value > 0 && (s.value = !0);
45
45
  });
46
- const f = n(() => !m.value && i.value !== "select" ? [] : p.value);
47
- _(
46
+ const d = n(() => !s.value && i.value !== "select" ? [] : p.value);
47
+ q(
48
48
  () => a.value.meta.errors,
49
49
  () => {
50
- a.value.meta.errors.length ? $({
50
+ a.value.meta.errors.length ? k({
51
51
  inputId: o,
52
52
  errors: a.value.meta.errors.map((t) => t.message).filter(Boolean),
53
53
  label: e.label
54
- }) : w(o);
54
+ }) : B(o);
55
55
  }
56
- ), S();
57
- const d = n(() => {
58
- var t, r, c, v, g, y, h, b, x, V;
56
+ );
57
+ const c = n(() => {
58
+ var t, r, v, g, y, h, b, x, V, _;
59
59
  return {
60
60
  id: o,
61
61
  required: (t = e.meta) == null ? void 0 : t.required,
62
- minLength: ((r = e.meta) == null ? void 0 : r.type) === "string" && ((c = e.meta) == null ? void 0 : c.minLength),
63
- maxLength: ((v = e.meta) == null ? void 0 : v.type) === "string" && ((g = e.meta) == null ? void 0 : g.maxLength),
64
- max: ((y = e.meta) == null ? void 0 : y.type) === "number" && ((h = e.meta) == null ? void 0 : h.maximum),
65
- min: ((b = e.meta) == null ? void 0 : b.type) === "number" && ((x = e.meta) == null ? void 0 : x.minimum),
62
+ minLength: ((r = e.meta) == null ? void 0 : r.type) === "string" && ((v = e.meta) == null ? void 0 : v.minLength),
63
+ maxLength: ((g = e.meta) == null ? void 0 : g.type) === "string" && ((y = e.meta) == null ? void 0 : y.maxLength),
64
+ max: ((h = e.meta) == null ? void 0 : h.type) === "number" && ((b = e.meta) == null ? void 0 : b.maximum),
65
+ min: ((x = e.meta) == null ? void 0 : x.type) === "number" && ((V = e.meta) == null ? void 0 : V.minimum),
66
66
  name: e.field.name,
67
67
  modelValue: e.field.state.value,
68
- errorMessages: f.value,
69
- error: !!f.value.length,
68
+ errorMessages: d.value,
69
+ error: !!d.value.length,
70
70
  field: e.field,
71
- setRealDirty: I,
71
+ setRealDirty: f,
72
72
  type: i.value,
73
- label: `${e.label}${(V = e.meta) != null && V.required ? " *" : ""}`,
73
+ label: `${e.label}${(_ = e.meta) != null && _.required ? " *" : ""}`,
74
74
  options: e.options
75
75
  };
76
76
  });
77
- return (t, r) => D(t.$slots, "default", M(R(d.value)), () => [
78
- z(E) ? (F(), T(H, N({
77
+ return (t, r) => F(t.$slots, "default", E(c.value, { onFocusout: f }), () => [
78
+ T($) ? (U(), M(j, E({
79
79
  key: 0,
80
- "input-props": d.value
81
- }, t.$attrs), null, 16, ["input-props"])) : U("", !0)
80
+ "input-props": c.value
81
+ }, t.$attrs), null, 16, ["input-props"])) : P("", !0)
82
82
  ]);
83
83
  }
84
84
  });
85
85
  export {
86
- Y as default
86
+ Q as default
87
87
  };
@@ -1,17 +1,35 @@
1
- import { defineComponent as V, resolveComponent as n, createElementBlock as m, openBlock as r, createBlock as l, createCommentVNode as p, mergeProps as i, normalizeClass as g, createVNode as s, unref as t, withCtx as v } from "vue";
2
- import { mdiRefresh as u } from "@mdi/js";
3
- const q = { class: "omega-input" }, U = /* @__PURE__ */ V({
1
+ import { defineComponent as k, resolveComponent as i, createElementBlock as m, openBlock as p, createBlock as l, createCommentVNode as n, mergeProps as s, normalizeClass as v, createVNode as u, unref as t, withCtx as y } from "vue";
2
+ import { mdiRefresh as a } from "@mdi/js";
3
+ const U = /* @__PURE__ */ k({
4
+ inheritAttrs: !1,
4
5
  __name: "OmegaInputVuetify",
5
6
  props: {
6
7
  inputProps: {}
7
8
  },
9
+ emits: ["focus", "blur"],
8
10
  setup(C) {
9
- return (e, o) => {
10
- const d = n("v-text-field"), h = n("v-textarea"), f = n("v-select"), P = n("v-icon"), y = n("v-btn"), b = n("v-autocomplete");
11
- return r(), m("div", q, [
12
- e.inputProps.type === "email" || e.inputProps.type === "string" ? (r(), l(d, i({
11
+ return (e, r) => {
12
+ const b = i("v-checkbox"), d = i("v-text-field"), h = i("v-textarea"), f = i("v-select"), P = i("v-icon"), g = i("v-btn"), V = i("v-autocomplete");
13
+ return p(), m("div", {
14
+ class: "omega-input",
15
+ onFocusout: r[4] || (r[4] = (o) => e.$emit("blur", o)),
16
+ onFocusin: r[5] || (r[5] = (o) => e.$emit("focus", o))
17
+ }, [
18
+ e.inputProps.type === "boolean" ? (p(), l(b, s({
13
19
  key: 0,
14
20
  id: e.inputProps.id,
21
+ name: e.inputProps.name,
22
+ label: e.inputProps.label,
23
+ "model-value": e.inputProps.modelValue,
24
+ "error-messages": e.inputProps.errorMessages,
25
+ error: e.inputProps.error
26
+ }, e.$attrs, {
27
+ ripple: "",
28
+ onChange: r[0] || (r[0] = (o) => e.inputProps.field.handleChange(o.target.checked))
29
+ }), null, 16, ["id", "name", "label", "model-value", "error-messages", "error"])) : n("", !0),
30
+ e.inputProps.type === "email" || e.inputProps.type === "string" ? (p(), l(d, s({
31
+ key: 1,
32
+ id: e.inputProps.id,
15
33
  required: e.inputProps.required,
16
34
  "min-length": e.inputProps.minLength,
17
35
  "max-length": e.inputProps.maxLength,
@@ -22,10 +40,9 @@ const q = { class: "omega-input" }, U = /* @__PURE__ */ V({
22
40
  "error-messages": e.inputProps.errorMessages,
23
41
  error: e.inputProps.error
24
42
  }, e.$attrs, {
25
- "onUpdate:modelValue": e.inputProps.field.handleChange,
26
- onBlur: e.inputProps.setRealDirty
27
- }), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "model-value", "error-messages", "error", "onUpdate:modelValue", "onBlur"])) : p("", !0),
28
- e.inputProps.type === "text" ? (r(), l(h, i({ key: 1 }, e.$attrs, {
43
+ "onUpdate:modelValue": e.inputProps.field.handleChange
44
+ }), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "model-value", "error-messages", "error", "onUpdate:modelValue"])) : n("", !0),
45
+ e.inputProps.type === "text" ? (p(), l(h, s({ key: 2 }, e.$attrs, {
29
46
  id: e.inputProps.id,
30
47
  required: e.inputProps.required,
31
48
  "min-length": e.inputProps.minLength,
@@ -36,11 +53,10 @@ const q = { class: "omega-input" }, U = /* @__PURE__ */ V({
36
53
  "model-value": e.inputProps.modelValue,
37
54
  "error-messages": e.inputProps.errorMessages,
38
55
  error: e.inputProps.error,
39
- "onUpdate:modelValue": e.inputProps.field.handleChange,
40
- onBlur: e.inputProps.setRealDirty
41
- }), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "model-value", "error-messages", "error", "onUpdate:modelValue", "onBlur"])) : p("", !0),
42
- e.inputProps.type === "number" ? (r(), l(d, i({
43
- key: 2,
56
+ "onUpdate:modelValue": e.inputProps.field.handleChange
57
+ }), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "model-value", "error-messages", "error", "onUpdate:modelValue"])) : n("", !0),
58
+ e.inputProps.type === "number" ? (p(), l(d, s({
59
+ key: 3,
44
60
  id: e.inputProps.id,
45
61
  required: e.inputProps.required,
46
62
  min: e.inputProps.min,
@@ -52,16 +68,15 @@ const q = { class: "omega-input" }, U = /* @__PURE__ */ V({
52
68
  "error-messages": e.inputProps.errorMessages,
53
69
  error: e.inputProps.error
54
70
  }, e.$attrs, {
55
- "onUpdate:modelValue": o[0] || (o[0] = (a) => {
56
- e.inputProps.field.handleChange(Number(a));
57
- }),
58
- onBlur: e.inputProps.setRealDirty
59
- }), null, 16, ["id", "required", "min", "max", "type", "name", "label", "model-value", "error-messages", "error", "onBlur"])) : p("", !0),
60
- e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (r(), m("div", {
61
- key: 3,
62
- class: g(e.inputProps.type !== "multiple" && "d-flex")
71
+ "onUpdate:modelValue": r[1] || (r[1] = (o) => {
72
+ e.inputProps.field.handleChange(Number(o));
73
+ })
74
+ }), null, 16, ["id", "required", "min", "max", "type", "name", "label", "model-value", "error-messages", "error"])) : n("", !0),
75
+ e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (p(), m("div", {
76
+ key: 4,
77
+ class: v(e.inputProps.type !== "multiple" && "d-flex")
63
78
  }, [
64
- s(f, i({
79
+ u(f, s({
65
80
  id: e.inputProps.id,
66
81
  required: e.inputProps.required,
67
82
  multiple: e.inputProps.type === "multiple",
@@ -73,28 +88,27 @@ const q = { class: "omega-input" }, U = /* @__PURE__ */ V({
73
88
  "error-messages": e.inputProps.errorMessages,
74
89
  error: e.inputProps.error
75
90
  }, e.$attrs, {
76
- "onUpdate:modelValue": e.inputProps.field.handleChange,
77
- onBlur: e.inputProps.setRealDirty
78
- }), null, 16, ["id", "required", "multiple", "chips", "name", "model-value", "label", "items", "error-messages", "error", "onUpdate:modelValue", "onBlur"]),
79
- e.inputProps.type === "select" ? (r(), l(y, {
91
+ "onUpdate:modelValue": e.inputProps.field.handleChange
92
+ }), null, 16, ["id", "required", "multiple", "chips", "name", "model-value", "label", "items", "error-messages", "error", "onUpdate:modelValue"]),
93
+ e.inputProps.type === "select" ? (p(), l(g, {
80
94
  key: 0,
81
95
  "variant-btn": "secondary",
82
- "variant-icon": t(u),
96
+ "variant-icon": t(a),
83
97
  class: "mr-2",
84
98
  title: "Reset",
85
- onClick: o[1] || (o[1] = (a) => e.inputProps.field.handleChange(void 0))
99
+ onClick: r[2] || (r[2] = (o) => e.inputProps.field.handleChange(void 0))
86
100
  }, {
87
- default: v(() => [
88
- s(P, { icon: t(u) }, null, 8, ["icon"])
101
+ default: y(() => [
102
+ u(P, { icon: t(a) }, null, 8, ["icon"])
89
103
  ]),
90
104
  _: 1
91
- }, 8, ["variant-icon"])) : p("", !0)
92
- ], 2)) : p("", !0),
93
- e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (r(), m("div", {
94
- key: 4,
95
- class: g(e.inputProps.type !== "autocompletemultiple" && "d-flex")
105
+ }, 8, ["variant-icon"])) : n("", !0)
106
+ ], 2)) : n("", !0),
107
+ e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (p(), m("div", {
108
+ key: 5,
109
+ class: v(e.inputProps.type !== "autocompletemultiple" && "d-flex")
96
110
  }, [
97
- s(b, i({
111
+ u(V, s({
98
112
  id: e.inputProps.id,
99
113
  multiple: e.inputProps.type === "autocompletemultiple",
100
114
  required: e.inputProps.required,
@@ -106,24 +120,23 @@ const q = { class: "omega-input" }, U = /* @__PURE__ */ V({
106
120
  error: e.inputProps.error,
107
121
  chips: e.inputProps.type === "autocompletemultiple"
108
122
  }, e.$attrs, {
109
- "onUpdate:modelValue": e.inputProps.field.handleChange,
110
- onBlur: e.inputProps.setRealDirty
111
- }), null, 16, ["id", "multiple", "required", "name", "model-value", "label", "items", "error-messages", "error", "chips", "onUpdate:modelValue", "onBlur"]),
112
- e.inputProps.type === "autocomplete" ? (r(), l(y, {
123
+ "onUpdate:modelValue": e.inputProps.field.handleChange
124
+ }), null, 16, ["id", "multiple", "required", "name", "model-value", "label", "items", "error-messages", "error", "chips", "onUpdate:modelValue"]),
125
+ e.inputProps.type === "autocomplete" ? (p(), l(g, {
113
126
  key: 0,
114
127
  "variant-btn": "secondary",
115
- "variant-icon": t(u),
128
+ "variant-icon": t(a),
116
129
  class: "mr-2",
117
130
  title: "Reset",
118
- onClick: o[2] || (o[2] = (a) => e.inputProps.field.handleChange(void 0))
131
+ onClick: r[3] || (r[3] = (o) => e.inputProps.field.handleChange(void 0))
119
132
  }, {
120
- default: v(() => [
121
- s(P, { icon: t(u) }, null, 8, ["icon"])
133
+ default: y(() => [
134
+ u(P, { icon: t(a) }, null, 8, ["icon"])
122
135
  ]),
123
136
  _: 1
124
- }, 8, ["variant-icon"])) : p("", !0)
125
- ], 2)) : p("", !0)
126
- ]);
137
+ }, 8, ["variant-icon"])) : n("", !0)
138
+ ], 2)) : n("", !0)
139
+ ], 32);
127
140
  };
128
141
  }
129
142
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/vue-components",
3
- "version": "0.1.3",
3
+ "version": "0.2.1",
4
4
  "peerDependencies": {
5
5
  "@mdi/js": "^7.4.47",
6
6
  "@tanstack/vue-form": "^1.2.4",
@@ -1,5 +1,21 @@
1
1
  <template>
2
- <div class="omega-input">
2
+ <div
3
+ class="omega-input"
4
+ @focusout="$emit('blur', $event)"
5
+ @focusin="$emit('focus', $event)"
6
+ >
7
+ <v-checkbox
8
+ v-if="inputProps.type === 'boolean'"
9
+ :id="inputProps.id"
10
+ :name="inputProps.name"
11
+ :label="inputProps.label"
12
+ :model-value="inputProps.modelValue"
13
+ :error-messages="inputProps.errorMessages"
14
+ :error="inputProps.error"
15
+ v-bind="$attrs"
16
+ ripple
17
+ @change="(e: any) => inputProps.field.handleChange(e.target.checked)"
18
+ />
3
19
  <v-text-field
4
20
  v-if="inputProps.type === 'email' || inputProps.type === 'string'"
5
21
  :id="inputProps.id"
@@ -14,7 +30,6 @@
14
30
  :error="inputProps.error"
15
31
  v-bind="$attrs"
16
32
  @update:model-value="inputProps.field.handleChange"
17
- @blur="inputProps.setRealDirty"
18
33
  />
19
34
  <v-textarea
20
35
  v-if="inputProps.type === 'text'"
@@ -30,7 +45,6 @@
30
45
  :error-messages="inputProps.errorMessages"
31
46
  :error="inputProps.error"
32
47
  @update:model-value="inputProps.field.handleChange"
33
- @blur="inputProps.setRealDirty"
34
48
  />
35
49
  <v-text-field
36
50
  v-if="inputProps.type === 'number'"
@@ -50,7 +64,6 @@
50
64
  inputProps.field.handleChange(Number(e))
51
65
  }
52
66
  "
53
- @blur="inputProps.setRealDirty"
54
67
  />
55
68
  <div
56
69
  v-if="inputProps.type === 'select' || inputProps.type === 'multiple'"
@@ -69,7 +82,6 @@
69
82
  :error="inputProps.error"
70
83
  v-bind="$attrs"
71
84
  @update:model-value="inputProps.field.handleChange"
72
- @blur="inputProps.setRealDirty"
73
85
  />
74
86
  <v-btn
75
87
  v-if="inputProps.type === 'select'"
@@ -103,7 +115,6 @@
103
115
  :chips="inputProps.type === 'autocompletemultiple'"
104
116
  v-bind="$attrs"
105
117
  @update:model-value="inputProps.field.handleChange"
106
- @blur="inputProps.setRealDirty"
107
118
  />
108
119
  <v-btn
109
120
  v-if="inputProps.type === 'autocomplete'"
@@ -126,6 +137,15 @@ import type { InputProps } from "./InputProps"
126
137
  defineProps<{
127
138
  inputProps: InputProps<T>
128
139
  }>()
140
+
141
+ defineEmits<{
142
+ (e: "focus", event: Event): void
143
+ (e: "blur", event: Event): void
144
+ }>()
145
+
146
+ defineOptions({
147
+ inheritAttrs: false,
148
+ })
129
149
  </script>
130
150
 
131
151
  <style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <slot v-bind="inputProps">
2
+ <slot v-bind="inputProps" @focusout="setRealDirty">
3
3
  <OmegaInputVuetify
4
4
  v-if="vuetified"
5
5
  :input-props="inputProps"
@@ -11,7 +11,6 @@
11
11
  <script setup lang="ts" generic="To">
12
12
  import { useStore } from "@tanstack/vue-form"
13
13
  import {
14
- useAttrs,
15
14
  useId,
16
15
  computed,
17
16
  watch,
@@ -128,8 +127,6 @@ watch(
128
127
  },
129
128
  )
130
129
 
131
- const otherAttrs = useAttrs()
132
-
133
130
  const inputProps: ComputedRef<InputProps<To>> = computed(() => ({
134
131
  id,
135
132
  required: props.meta?.required,