@espri/vue-components 2.0.1 → 2.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.
@@ -1,15 +1,15 @@
1
- import { defineComponent as b, computed as m, openBlock as o, createElementBlock as d, normalizeClass as u, createBlock as c, unref as a, withCtx as V, createVNode as _, createElementVNode as p, createTextVNode as h, toDisplayString as f, createCommentVNode as v } from "vue";
2
- import { Skeleton as k, FloatLabel as B, InputNumber as N } from "primevue";
3
- const D = ["for"], E = {
1
+ import { defineComponent as b, computed as m, openBlock as i, createElementBlock as d, normalizeClass as u, createBlock as c, unref as a, withCtx as V, createVNode as _, createElementVNode as p, createTextVNode as h, toDisplayString as f, createCommentVNode as v } from "vue";
2
+ import { Skeleton as k, FloatLabel as B, InputNumber as C } from "primevue";
3
+ const N = ["for"], D = {
4
4
  key: 0,
5
5
  class: "text-danger"
6
- }, F = { class: "text-danger" }, C = /* @__PURE__ */ b({
6
+ }, E = { class: "text-danger" }, F = /* @__PURE__ */ b({
7
7
  __name: "input-number",
8
8
  props: {
9
9
  label: {},
10
10
  modelValue: {},
11
11
  class: {},
12
- classInput: {},
12
+ inputClass: {},
13
13
  disabled: { type: Boolean },
14
14
  required: { type: Boolean },
15
15
  step: {},
@@ -27,29 +27,29 @@ const D = ["for"], E = {
27
27
  },
28
28
  emits: ["update:modelValue"],
29
29
  setup(x, { emit: g }) {
30
- const e = x, i = g, n = Math.random().toString(16).slice(2), s = m({
30
+ const e = x, o = g, n = Math.random().toString(16).slice(2), s = m({
31
31
  get() {
32
- return (e.modelValue || e.modelValue === 0) && (typeof e.min == "number" && e.modelValue < e.min || typeof e.max == "number" && e.modelValue > e.max) ? (i("update:modelValue", null), null) : e.modelValue;
32
+ return (e.modelValue || e.modelValue === 0) && (typeof e.min == "number" && e.modelValue < e.min || typeof e.max == "number" && e.modelValue > e.max) ? (o("update:modelValue", null), null) : e.modelValue;
33
33
  },
34
34
  set(t) {
35
- (t || t === 0) && (typeof e.min == "number" && t < e.min || typeof e.max == "number" && t > e.max) && (t = null), i("update:modelValue", t);
35
+ (t || t === 0) && (typeof e.min == "number" && t < e.min || typeof e.max == "number" && t > e.max) && (t = null), o("update:modelValue", t);
36
36
  }
37
37
  }), r = m(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
38
- return (t, l) => (o(), d("div", {
38
+ return (t, l) => (i(), d("div", {
39
39
  class: u(`field ${e.class || ""}`)
40
40
  }, [
41
- e.loading ? (o(), c(a(k), {
41
+ e.loading ? (i(), c(a(k), {
42
42
  key: 0,
43
43
  class: "skeleton-input mt-3"
44
- })) : (o(), c(a(B), {
44
+ })) : (i(), c(a(B), {
45
45
  key: 1,
46
46
  class: "mt-3"
47
47
  }, {
48
48
  default: V(() => [
49
- _(a(N), {
49
+ _(a(C), {
50
50
  modelValue: s.value,
51
51
  "onUpdate:modelValue": l[0] || (l[0] = (y) => s.value = y),
52
- class: u(["w-full", e.classInput]),
52
+ class: u(["w-full", e.class]),
53
53
  min: e.min,
54
54
  max: e.max,
55
55
  mode: e.mode,
@@ -59,21 +59,22 @@ const D = ["for"], E = {
59
59
  currency: e.currency,
60
60
  suffix: e.suffix,
61
61
  invalid: !!r.value,
62
+ "input-class": e.inputClass,
62
63
  disabled: e.disabled,
63
64
  placeholder: e.placeholder,
64
65
  "input-id": a(n)
65
- }, null, 8, ["modelValue", "min", "max", "mode", "step", "min-fraction-digits", "max-fraction-digits", "currency", "suffix", "invalid", "class", "disabled", "placeholder", "input-id"]),
66
+ }, null, 8, ["modelValue", "min", "max", "mode", "step", "min-fraction-digits", "max-fraction-digits", "currency", "suffix", "invalid", "class", "input-class", "disabled", "placeholder", "input-id"]),
66
67
  p("label", { for: a(n) }, [
67
68
  h(f(e.label), 1),
68
- e.required ? (o(), d("span", E, " *")) : v("", !0)
69
- ], 8, D)
69
+ e.required ? (i(), d("span", D, " *")) : v("", !0)
70
+ ], 8, N)
70
71
  ]),
71
72
  _: 1
72
73
  })),
73
- p("small", F, f(r.value), 1)
74
+ p("small", E, f(r.value), 1)
74
75
  ], 2));
75
76
  }
76
- }), S = C;
77
+ }), q = F;
77
78
  export {
78
- S as default
79
+ q as default
79
80
  };
@@ -3,13 +3,12 @@ import { Skeleton as y, FloatLabel as B, InputText as E } from "primevue";
3
3
  const w = ["for"], C = {
4
4
  key: 0,
5
5
  class: "text-danger"
6
- }, I = { class: "text-danger" }, N = /* @__PURE__ */ V({
6
+ }, N = { class: "text-danger" }, $ = /* @__PURE__ */ V({
7
7
  __name: "input-text",
8
8
  props: {
9
9
  label: {},
10
10
  modelValue: {},
11
11
  class: {},
12
- classInput: {},
13
12
  disabled: { type: Boolean },
14
13
  required: { type: Boolean },
15
14
  loading: { type: Boolean },
@@ -42,7 +41,7 @@ const w = ["for"], C = {
42
41
  v(t(E), {
43
42
  modelValue: n.value,
44
43
  "onUpdate:modelValue": l[0] || (l[0] = (x) => n.value = x),
45
- class: u(["w-full", e.classInput]),
44
+ class: u(["w-full", e.class]),
46
45
  invalid: !!d.value,
47
46
  maxlength: e.maxlength,
48
47
  disabled: e.disabled,
@@ -56,10 +55,10 @@ const w = ["for"], C = {
56
55
  ]),
57
56
  _: 1
58
57
  })),
59
- m("small", I, p(d.value), 1)
58
+ m("small", N, p(d.value), 1)
60
59
  ], 2));
61
60
  }
62
- }), T = N;
61
+ }), q = $;
63
62
  export {
64
- T as default
63
+ q as default
65
64
  };
package/dist/select.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as _, computed as r, openBlock as o, createElementBlock as i, normalizeClass as c, createBlock as u, unref as t, withCtx as b, createVNode as g, createElementVNode as p, createTextVNode as y, toDisplayString as m, createCommentVNode as k } from "vue";
1
+ import { defineComponent as _, computed as r, openBlock as t, createElementBlock as i, normalizeClass as c, createBlock as u, unref as o, withCtx as b, createVNode as g, createElementVNode as p, createTextVNode as y, toDisplayString as m, createCommentVNode as k } from "vue";
2
2
  import { Skeleton as x, FloatLabel as B, Select as E } from "primevue";
3
3
  const S = ["for"], w = {
4
4
  key: 0,
@@ -8,7 +8,6 @@ const S = ["for"], w = {
8
8
  props: {
9
9
  label: {},
10
10
  options: {},
11
- classInput: {},
12
11
  disabled: { type: Boolean },
13
12
  required: { type: Boolean },
14
13
  showError: { type: Boolean },
@@ -30,32 +29,32 @@ const S = ["for"], w = {
30
29
  V("update:modelValue", a);
31
30
  }
32
31
  }), d = r(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
33
- return (a, l) => (o(), i("div", {
32
+ return (a, l) => (t(), i("div", {
34
33
  class: c(`field ${e.class || ""}`)
35
34
  }, [
36
- e.loading ? (o(), u(t(x), {
35
+ e.loading ? (t(), u(o(x), {
37
36
  key: 0,
38
37
  class: "skeleton-input mt-3"
39
- })) : (o(), u(t(B), {
38
+ })) : (t(), u(o(B), {
40
39
  key: 1,
41
40
  class: "mt-3"
42
41
  }, {
43
42
  default: b(() => [
44
- g(t(E), {
43
+ g(o(E), {
45
44
  modelValue: n.value,
46
45
  "onUpdate:modelValue": l[0] || (l[0] = (h) => n.value = h),
47
46
  options: e.options,
48
47
  "option-label": "label",
49
48
  "option-value": "value",
50
- class: c(["w-full", e.classInput]),
49
+ class: c(["w-full", e.class]),
51
50
  invalid: !!d.value,
52
51
  disabled: e.disabled,
53
52
  placeholder: e.placeholder,
54
- "input-id": t(s)
53
+ "input-id": o(s)
55
54
  }, null, 8, ["modelValue", "options", "class", "invalid", "disabled", "placeholder", "input-id"]),
56
- p("label", { for: t(s) }, [
55
+ p("label", { for: o(s) }, [
57
56
  y(m(e.label), 1),
58
- e.required ? (o(), i("span", w, " *")) : k("", !0)
57
+ e.required ? (t(), i("span", w, " *")) : k("", !0)
59
58
  ], 8, S)
60
59
  ]),
61
60
  _: 1
@@ -63,7 +62,7 @@ const S = ["for"], w = {
63
62
  p("small", C, m(d.value), 1)
64
63
  ], 2));
65
64
  }
66
- }), I = N;
65
+ }), R = N;
67
66
  export {
68
- I as default
67
+ R as default
69
68
  };
@@ -6,7 +6,7 @@ export default interface EspriInputNumberProps {
6
6
  /**
7
7
  * Model value representing the current state of the input.
8
8
  */
9
- modelValue: number;
9
+ modelValue: number | null;
10
10
  /**
11
11
  * Class of the component.
12
12
  */
@@ -14,7 +14,7 @@ export default interface EspriInputNumberProps {
14
14
  /**
15
15
  * Optional CSS class applied to the input element.
16
16
  */
17
- classInput?: string;
17
+ inputClass?: string;
18
18
  /**
19
19
  * Disables the input when true.
20
20
  */
@@ -6,15 +6,11 @@ export default interface EspriInputTextProps {
6
6
  /**
7
7
  * Model value representing the current state of the input.
8
8
  */
9
- modelValue: string;
9
+ modelValue: string | null;
10
10
  /**
11
11
  * Class of the component.
12
12
  */
13
13
  class?: any;
14
- /**
15
- * Optional CSS class applied to the input element.
16
- */
17
- classInput?: string;
18
14
  /**
19
15
  * Disables the input when true.
20
16
  */
@@ -17,10 +17,6 @@ export default interface EspriSelectProps {
17
17
  * Array of options available for selection.
18
18
  */
19
19
  options: Array<EspriSelectOption>;
20
- /**
21
- * Optional CSS class applied to the input element.
22
- */
23
- classInput?: string;
24
20
  /**
25
21
  * Disables the input when true.
26
22
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@espri/vue-components",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "ESPRI Digital - Vue components library",
5
5
  "author": "ESPRI Digital",
6
6
  "homepage": "https://github.com/ESPRI-Digital/vue-select#readme",