@espri/vue-components 2.2.0 → 2.3.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.
- package/dist/checkbox.css +1 -1
- package/dist/checkbox.es.js +25 -29
- package/dist/select.css +1 -1
- package/dist/select.es.js +16 -14
- package/dist/types/checkbox/interfaces/checkbox-props.interface.d.ts +0 -4
- package/dist/types/input-text/interfaces/input-text-props.interface.d.ts +1 -1
- package/dist/types/select/interfaces/select-props.interface.d.ts +4 -0
- package/package.json +1 -1
package/dist/checkbox.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.error[data-v-
|
|
1
|
+
.error[data-v-8069bff2]{color:var(--p-floatlabel-invalid-color, var(--p-red-600))}
|
package/dist/checkbox.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { _ as
|
|
4
|
-
import './checkbox.css';const
|
|
1
|
+
import { defineComponent as V, computed as n, openBlock as i, createElementBlock as d, normalizeClass as _, createElementVNode as u, createVNode as b, unref as a, toDisplayString as c, createCommentVNode as h } from "vue";
|
|
2
|
+
import { Checkbox as x } from "primevue";
|
|
3
|
+
import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
import './checkbox.css';const C = { class: "flex items-center gap-2" }, g = ["for"], y = { class: "error" }, E = /* @__PURE__ */ V({
|
|
5
5
|
__name: "checkbox",
|
|
6
6
|
props: {
|
|
7
7
|
label: {},
|
|
@@ -11,47 +11,43 @@ import './checkbox.css';const B = { class: "flex items-center gap-2" }, C = ["fo
|
|
|
11
11
|
class: {},
|
|
12
12
|
disabled: { type: Boolean },
|
|
13
13
|
required: { type: Boolean },
|
|
14
|
-
loading: { type: Boolean },
|
|
15
14
|
showError: { type: Boolean },
|
|
16
15
|
size: {},
|
|
17
16
|
rules: {}
|
|
18
17
|
},
|
|
19
18
|
emits: ["update:modelValue"],
|
|
20
|
-
setup(
|
|
21
|
-
const e =
|
|
19
|
+
setup(m, { emit: p }) {
|
|
20
|
+
const e = m, f = p, t = Math.random().toString(16).slice(2), s = n({
|
|
22
21
|
get() {
|
|
23
22
|
return e.modelValue;
|
|
24
23
|
},
|
|
25
|
-
set(
|
|
26
|
-
|
|
24
|
+
set(o) {
|
|
25
|
+
f("update:modelValue", o);
|
|
27
26
|
}
|
|
28
|
-
}),
|
|
29
|
-
return (
|
|
30
|
-
class:
|
|
27
|
+
}), r = n(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
|
|
28
|
+
return (o, l) => (i(), d("div", {
|
|
29
|
+
class: _(`field ${e.class || ""}`)
|
|
31
30
|
}, [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
modelValue: r.value,
|
|
39
|
-
"onUpdate:modelValue": l[0] || (l[0] = (V) => r.value = V),
|
|
40
|
-
"input-id": o(s),
|
|
41
|
-
invalid: !!n.value,
|
|
31
|
+
u("div", C, [
|
|
32
|
+
b(a(x), {
|
|
33
|
+
modelValue: s.value,
|
|
34
|
+
"onUpdate:modelValue": l[0] || (l[0] = (v) => s.value = v),
|
|
35
|
+
"input-id": a(t),
|
|
36
|
+
invalid: !!r.value,
|
|
42
37
|
"false-value": e.falseValue,
|
|
43
38
|
"true-value": e.trueValue,
|
|
39
|
+
disabled: e.disabled,
|
|
44
40
|
binary: ""
|
|
45
|
-
}, null, 8, ["modelValue", "input-id", "invalid", "false-value", "true-value"]),
|
|
46
|
-
e.label ? (
|
|
41
|
+
}, null, 8, ["modelValue", "input-id", "invalid", "false-value", "true-value", "disabled"]),
|
|
42
|
+
e.label ? (i(), d("label", {
|
|
47
43
|
key: 0,
|
|
48
|
-
for:
|
|
49
|
-
},
|
|
44
|
+
for: a(t)
|
|
45
|
+
}, c(e.label), 9, g)) : h("", !0)
|
|
50
46
|
]),
|
|
51
|
-
|
|
47
|
+
u("small", y, c(r.value), 1)
|
|
52
48
|
], 2));
|
|
53
49
|
}
|
|
54
|
-
}),
|
|
50
|
+
}), B = /* @__PURE__ */ k(E, [["__scopeId", "data-v-8069bff2"]]), z = B;
|
|
55
51
|
export {
|
|
56
|
-
|
|
52
|
+
z as default
|
|
57
53
|
};
|
package/dist/select.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.error[data-v-
|
|
1
|
+
.error[data-v-55a0f12b]{color:var(--p-floatlabel-invalid-color, var(--p-red-600))}
|
package/dist/select.es.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Skeleton as
|
|
3
|
-
import { _ as
|
|
4
|
-
import './select.css';const
|
|
1
|
+
import { defineComponent as V, computed as i, openBlock as t, createElementBlock as d, normalizeClass as c, createBlock as p, unref as o, withCtx as b, createVNode as y, createElementVNode as u, createTextVNode as g, toDisplayString as m, createCommentVNode as k } from "vue";
|
|
2
|
+
import { Skeleton as w, FloatLabel as B, Select as C } from "primevue";
|
|
3
|
+
import { _ as x } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
import './select.css';const E = ["for"], S = { key: 0 }, N = { class: "error" }, $ = /* @__PURE__ */ V({
|
|
5
5
|
__name: "select",
|
|
6
6
|
props: {
|
|
7
7
|
label: {},
|
|
8
8
|
options: {},
|
|
9
9
|
disabled: { type: Boolean },
|
|
10
10
|
required: { type: Boolean },
|
|
11
|
+
showClear: { type: Boolean },
|
|
11
12
|
showError: { type: Boolean },
|
|
12
13
|
rules: {},
|
|
13
14
|
maxlength: {},
|
|
@@ -19,28 +20,28 @@ import './select.css';const C = ["for"], w = { key: 0 }, N = { class: "error" },
|
|
|
19
20
|
},
|
|
20
21
|
emits: ["update:modelValue"],
|
|
21
22
|
setup(f, { emit: _ }) {
|
|
22
|
-
const e = f,
|
|
23
|
+
const e = f, h = _, s = Math.random().toString(16).slice(2), n = i({
|
|
23
24
|
get() {
|
|
24
25
|
return e.modelValue;
|
|
25
26
|
},
|
|
26
27
|
set(a) {
|
|
27
|
-
|
|
28
|
+
h("update:modelValue", a);
|
|
28
29
|
}
|
|
29
30
|
}), r = i(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
|
|
30
31
|
return (a, l) => (t(), d("div", {
|
|
31
32
|
class: c(`field ${e.class || ""}`)
|
|
32
33
|
}, [
|
|
33
|
-
e.loading ? (t(), p(o(
|
|
34
|
+
e.loading ? (t(), p(o(w), {
|
|
34
35
|
key: 0,
|
|
35
36
|
class: "skeleton-input mt-3"
|
|
36
|
-
})) : (t(), p(o(
|
|
37
|
+
})) : (t(), p(o(B), {
|
|
37
38
|
key: 1,
|
|
38
39
|
class: "mt-3"
|
|
39
40
|
}, {
|
|
40
41
|
default: b(() => [
|
|
41
|
-
y(o(
|
|
42
|
+
y(o(C), {
|
|
42
43
|
modelValue: n.value,
|
|
43
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
44
|
+
"onUpdate:modelValue": l[0] || (l[0] = (v) => n.value = v),
|
|
44
45
|
options: e.options,
|
|
45
46
|
"option-label": "label",
|
|
46
47
|
"option-value": "value",
|
|
@@ -48,19 +49,20 @@ import './select.css';const C = ["for"], w = { key: 0 }, N = { class: "error" },
|
|
|
48
49
|
invalid: !!r.value,
|
|
49
50
|
disabled: e.disabled,
|
|
50
51
|
placeholder: e.placeholder,
|
|
52
|
+
"show-clear": e.showClear,
|
|
51
53
|
"input-id": o(s)
|
|
52
|
-
}, null, 8, ["modelValue", "options", "class", "invalid", "disabled", "placeholder", "input-id"]),
|
|
54
|
+
}, null, 8, ["modelValue", "options", "class", "invalid", "disabled", "placeholder", "show-clear", "input-id"]),
|
|
53
55
|
u("label", { for: o(s) }, [
|
|
54
56
|
g(m(e.label), 1),
|
|
55
|
-
e.required ? (t(), d("span",
|
|
56
|
-
], 8,
|
|
57
|
+
e.required ? (t(), d("span", S, " *")) : k("", !0)
|
|
58
|
+
], 8, E)
|
|
57
59
|
]),
|
|
58
60
|
_: 1
|
|
59
61
|
})),
|
|
60
62
|
u("small", N, m(r.value), 1)
|
|
61
63
|
], 2));
|
|
62
64
|
}
|
|
63
|
-
}), q = /* @__PURE__ */
|
|
65
|
+
}), q = /* @__PURE__ */ x($, [["__scopeId", "data-v-55a0f12b"]]), F = q;
|
|
64
66
|
export {
|
|
65
67
|
F as default
|
|
66
68
|
};
|
|
@@ -37,10 +37,6 @@ export default interface EspriCheckboxProps {
|
|
|
37
37
|
* Marks the checkbox as required when true.
|
|
38
38
|
*/
|
|
39
39
|
required?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Indicates if the checkbox is in a loading state.
|
|
42
|
-
*/
|
|
43
|
-
loading?: boolean;
|
|
44
40
|
/**
|
|
45
41
|
* Shows error messages when true.
|
|
46
42
|
*/
|
|
@@ -25,6 +25,10 @@ export default interface EspriSelectProps {
|
|
|
25
25
|
* Marks the input as required when true.
|
|
26
26
|
*/
|
|
27
27
|
required?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* When enabled, a clear icon is displayed to clear the value.
|
|
30
|
+
*/
|
|
31
|
+
showClear?: boolean;
|
|
28
32
|
/**
|
|
29
33
|
* Shows error messages when true.
|
|
30
34
|
*/
|