@espri/vue-components 2.2.0 → 2.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.
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
|
};
|
|
@@ -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
|
*/
|