espri-vue-select-float 1.0.2 → 1.1.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.
- package/README.md +5 -1
- package/dist/select-float.es.js +27 -42
- package/dist/select-float.umd.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/select-float.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Skeleton as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as _, computed as r, createElementBlock as i, openBlock as t, normalizeClass as u, createBlock as c, createElementVNode as p, unref as o, withCtx as b, createVNode as g, createTextVNode as y, createCommentVNode as k, toDisplayString as m } from "vue";
|
|
2
|
+
import { Skeleton as x, FloatLabel as B, Select as w } from "primevue";
|
|
3
|
+
const C = ["for"], E = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "text-danger"
|
|
6
|
-
},
|
|
6
|
+
}, N = { class: "text-danger" }, q = /* @__PURE__ */ _({
|
|
7
7
|
__name: "select-float",
|
|
8
8
|
props: {
|
|
9
9
|
label: {},
|
|
@@ -21,64 +21,49 @@ const N = ["for"], S = {
|
|
|
21
21
|
modelValue: {}
|
|
22
22
|
},
|
|
23
23
|
emits: ["update:modelValue"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
24
|
+
setup(f, { emit: v }) {
|
|
25
|
+
const e = f, V = v, s = Math.random().toString(16).slice(2), n = r({
|
|
26
26
|
get() {
|
|
27
|
-
return
|
|
27
|
+
return e.modelValue;
|
|
28
28
|
},
|
|
29
|
-
set(
|
|
30
|
-
|
|
29
|
+
set(a) {
|
|
30
|
+
V("update:modelValue", a);
|
|
31
31
|
}
|
|
32
|
-
}),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
for (let l = 0; l < t.length; l++) {
|
|
36
|
-
const o = t[l];
|
|
37
|
-
if (o && o.$invalid && o.$message)
|
|
38
|
-
return o.$message;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return "";
|
|
42
|
-
});
|
|
43
|
-
function v(t) {
|
|
44
|
-
const { value: l = "" } = t;
|
|
45
|
-
d("update:modelValue", l);
|
|
46
|
-
}
|
|
47
|
-
return (t, l) => (s(), m("div", {
|
|
48
|
-
class: p(`field ${n.class || ""}`)
|
|
32
|
+
}), d = r(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
|
|
33
|
+
return (a, l) => (t(), i("div", {
|
|
34
|
+
class: u(`field ${e.class || ""}`)
|
|
49
35
|
}, [
|
|
50
|
-
e.loading ? (
|
|
36
|
+
e.loading ? (t(), c(o(x), {
|
|
51
37
|
key: 0,
|
|
52
38
|
class: "skeleton-input mt-3"
|
|
53
|
-
})) : (
|
|
39
|
+
})) : (t(), c(o(B), {
|
|
54
40
|
key: 1,
|
|
55
41
|
class: "mt-3"
|
|
56
42
|
}, {
|
|
57
|
-
default:
|
|
58
|
-
|
|
59
|
-
modelValue:
|
|
60
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
43
|
+
default: b(() => [
|
|
44
|
+
g(o(w), {
|
|
45
|
+
modelValue: n.value,
|
|
46
|
+
"onUpdate:modelValue": l[0] || (l[0] = (h) => n.value = h),
|
|
61
47
|
options: e.options,
|
|
62
48
|
"option-label": "label",
|
|
63
49
|
"option-value": "value",
|
|
64
|
-
class:
|
|
65
|
-
invalid: !!
|
|
50
|
+
class: u(["w-full", e.classInput]),
|
|
51
|
+
invalid: !!d.value,
|
|
66
52
|
disabled: e.disabled,
|
|
67
53
|
placeholder: e.placeholder,
|
|
68
|
-
"input-id":
|
|
69
|
-
onChange: v
|
|
54
|
+
"input-id": o(s)
|
|
70
55
|
}, null, 8, ["modelValue", "options", "class", "invalid", "disabled", "placeholder", "input-id"]),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
e.required ? (
|
|
74
|
-
], 8,
|
|
56
|
+
p("label", { for: o(s) }, [
|
|
57
|
+
y(m(e.label), 1),
|
|
58
|
+
e.required ? (t(), i("span", E, " *")) : k("", !0)
|
|
59
|
+
], 8, C)
|
|
75
60
|
]),
|
|
76
61
|
_: 1
|
|
77
62
|
})),
|
|
78
|
-
|
|
63
|
+
p("small", N, m(d.value), 1)
|
|
79
64
|
], 2));
|
|
80
65
|
}
|
|
81
66
|
});
|
|
82
67
|
export {
|
|
83
|
-
|
|
68
|
+
q as default
|
|
84
69
|
};
|
package/dist/select-float.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t(require("vue"),require("primevue")):typeof define=="function"&&define.amd?define(["vue","primevue"],t):(e=typeof globalThis<"u"?globalThis:e||self,e.SelectFloat=t(e.Vue,e.PrimeVue))})(this,(function(e,t){"use strict";const d=["for"],r={key:0,class:"text-danger"},c={class:"text-danger"};return e.defineComponent({__name:"select-float",props:{label:{},options:{},classInput:{},disabled:{type:Boolean},required:{type:Boolean},showError:{type:Boolean},rules:{},maxlength:{},placeholder:{},style:{},class:{},loading:{type:Boolean},modelValue:{}},emits:["update:modelValue"],setup(p,{emit:m}){const l=p,u=m,a=Math.random().toString(16).slice(2),s=e.computed({get(){return l.modelValue},set(n){u("update:modelValue",n)}}),i=e.computed(()=>l.showError&&l.rules?.find(o=>o?.$invalid&&o?.$message)?.$message||"");return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`field ${l.class||""}`)},[l.loading?(e.openBlock(),e.createBlock(e.unref(t.Skeleton),{key:0,class:"skeleton-input mt-3"})):(e.openBlock(),e.createBlock(e.unref(t.FloatLabel),{key:1,class:"mt-3"},{default:e.withCtx(()=>[e.createVNode(e.unref(t.Select),{modelValue:s.value,"onUpdate:modelValue":o[0]||(o[0]=f=>s.value=f),options:l.options,"option-label":"label","option-value":"value",class:e.normalizeClass(["w-full",l.classInput]),invalid:!!i.value,disabled:l.disabled,placeholder:l.placeholder,"input-id":e.unref(a)},null,8,["modelValue","options","class","invalid","disabled","placeholder","input-id"]),e.createElementVNode("label",{for:e.unref(a)},[e.createTextVNode(e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",r," *")):e.createCommentVNode("",!0)],8,d)]),_:1})),e.createElementVNode("small",c,e.toDisplayString(i.value),1)],2))}})}));
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "espri-vue-select-float",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0
|
|
5
|
-
"description": "Select
|
|
4
|
+
"version": "1.1.0",
|
|
5
|
+
"description": "Float Select - Vue component",
|
|
6
6
|
"author": "ESPRI Digital",
|
|
7
7
|
"homepage": "https://github.com/ESPRI-Digital/vue-select-float#readme",
|
|
8
8
|
"main": "dist/select-float.umd.js",
|