@effect-app/vue-components 0.7.7 → 0.8.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.
@@ -15,7 +15,7 @@ export type OmegaInputProps<From, To> = {
15
15
  }[];
16
16
  type?: TypeOverride;
17
17
  };
18
- export type TypeOverride = "string" | "text" | "number" | "select" | "multiple" | "boolean" | "autocomplete" | "autocompletemultiple" | "switch";
18
+ export type TypeOverride = "string" | "text" | "number" | "select" | "multiple" | "boolean" | "autocomplete" | "autocompletemultiple" | "switch" | "range";
19
19
  export interface OmegaError {
20
20
  label: string;
21
21
  inputId: string;
@@ -1,5 +1,5 @@
1
- import { defineComponent as d, resolveComponent as s, createElementBlock as P, openBlock as o, createBlock as n, createCommentVNode as l, resolveDynamicComponent as g, mergeProps as i } from "vue";
2
- const b = /* @__PURE__ */ d({
1
+ import { defineComponent as P, resolveComponent as s, createElementBlock as g, openBlock as o, createBlock as n, createCommentVNode as l, resolveDynamicComponent as u, mergeProps as i } from "vue";
2
+ const b = /* @__PURE__ */ P({
3
3
  inheritAttrs: !1,
4
4
  __name: "OmegaInputVuetify",
5
5
  props: {
@@ -9,13 +9,13 @@ const b = /* @__PURE__ */ d({
9
9
  emits: ["focus", "blur"],
10
10
  setup(y) {
11
11
  return (e, r) => {
12
- const u = s("v-text-field"), a = s("v-textarea"), t = s("v-select"), m = s("v-autocomplete");
13
- return o(), P("div", {
12
+ const a = s("v-text-field"), t = s("v-textarea"), m = s("v-select"), d = s("v-autocomplete");
13
+ return o(), g("div", {
14
14
  class: "omega-input",
15
15
  onFocusout: r[4] || (r[4] = (p) => e.$emit("blur", p)),
16
16
  onFocusin: r[5] || (r[5] = (p) => e.$emit("focus", p))
17
17
  }, [
18
- e.inputProps.type === "boolean" || e.inputProps.type === "switch" ? (o(), n(g(e.inputProps.type === "boolean" ? "v-checkbox" : "v-switch"), i({
18
+ e.inputProps.type === "boolean" || e.inputProps.type === "switch" ? (o(), n(u(e.inputProps.type === "boolean" ? "v-checkbox" : "v-switch"), i({
19
19
  key: 0,
20
20
  id: e.inputProps.id,
21
21
  name: e.inputProps.name,
@@ -27,7 +27,7 @@ const b = /* @__PURE__ */ d({
27
27
  "model-value": e.vuetifyValue,
28
28
  onChange: r[0] || (r[0] = (p) => e.inputProps.field.handleChange(p.target.checked))
29
29
  }), null, 16, ["id", "name", "label", "error-messages", "error", "model-value"])) : l("", !0),
30
- e.inputProps.type === "email" || e.inputProps.type === "string" ? (o(), n(u, i({
30
+ e.inputProps.type === "email" || e.inputProps.type === "string" ? (o(), n(a, i({
31
31
  key: 1,
32
32
  id: e.inputProps.id,
33
33
  required: e.inputProps.required,
@@ -42,7 +42,7 @@ const b = /* @__PURE__ */ d({
42
42
  "model-value": e.vuetifyValue,
43
43
  "onUpdate:modelValue": e.inputProps.field.handleChange
44
44
  }), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
45
- e.inputProps.type === "text" ? (o(), n(a, i({
45
+ e.inputProps.type === "text" ? (o(), n(t, i({
46
46
  key: 2,
47
47
  id: e.inputProps.id,
48
48
  required: e.inputProps.required,
@@ -57,7 +57,7 @@ const b = /* @__PURE__ */ d({
57
57
  "model-value": e.vuetifyValue,
58
58
  "onUpdate:modelValue": e.inputProps.field.handleChange
59
59
  }), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
60
- e.inputProps.type === "number" ? (o(), n(u, i({
60
+ e.inputProps.type === "number" || e.inputProps.type === "range" ? (o(), n(u(e.inputProps.type === "range" ? "v-slider" : "v-text-field"), i({
61
61
  key: 3,
62
62
  id: e.inputProps.id,
63
63
  required: e.inputProps.required,
@@ -74,7 +74,7 @@ const b = /* @__PURE__ */ d({
74
74
  e.inputProps.field.handleChange(Number(p));
75
75
  })
76
76
  }), null, 16, ["id", "required", "min", "max", "type", "name", "label", "error-messages", "error", "model-value"])) : l("", !0),
77
- e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (o(), n(t, i({
77
+ e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (o(), n(m, i({
78
78
  key: 4,
79
79
  id: e.inputProps.id,
80
80
  clearable: e.inputProps.type === "select",
@@ -91,7 +91,7 @@ const b = /* @__PURE__ */ d({
91
91
  onClear: r[2] || (r[2] = (p) => e.inputProps.field.handleChange(void 0)),
92
92
  "onUpdate:modelValue": e.inputProps.field.handleChange
93
93
  }), null, 16, ["id", "clearable", "required", "multiple", "chips", "name", "label", "items", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
94
- e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (o(), n(m, i({
94
+ e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (o(), n(d, i({
95
95
  key: 5,
96
96
  id: e.inputProps.id,
97
97
  clearable: e.inputProps.type === "autocomplete",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/vue-components",
3
- "version": "0.7.7",
3
+ "version": "0.8.0",
4
4
  "peerDependencies": {
5
5
  "@mdi/js": "^7.4.47",
6
6
  "@tanstack/vue-form": "^1.2.4",
@@ -39,6 +39,7 @@ export type TypeOverride =
39
39
  | "autocomplete"
40
40
  | "autocompletemultiple"
41
41
  | "switch"
42
+ | "range"
42
43
 
43
44
  export interface OmegaError {
44
45
  label: string
@@ -47,8 +47,9 @@
47
47
  :model-value="vuetifyValue"
48
48
  @update:model-value="inputProps.field.handleChange"
49
49
  />
50
- <v-text-field
51
- v-if="inputProps.type === 'number'"
50
+ <component
51
+ :is="inputProps.type === 'range' ? 'v-slider' : 'v-text-field'"
52
+ v-if="inputProps.type === 'number' || inputProps.type === 'range'"
52
53
  :id="inputProps.id"
53
54
  :required="inputProps.required"
54
55
  :min="inputProps.min"