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