llnet-vue-floating-form
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -1,4 +0,4 @@ | ||
import { _ as f } from "./Number-BwJO61Z4.js"; | ||
import { _ as f } from "./Number-HX3kEubD.js"; | ||
export { | ||
f as default | ||
}; |
@@ -1,4 +0,4 @@ | ||
import { _ as f } from "./Number-BwJO61Z4.js"; | ||
import { _ as f } from "./Number-HX3kEubD.js"; | ||
export { | ||
f as default | ||
}; |
@@ -1,5 +0,5 @@ | ||
import { ref as L, computed as x, openBlock as n, createElementBlock as s, normalizeClass as S, unref as u, withDirectives as _, createElementVNode as m, isRef as C, createVNode as p, withCtx as A, Fragment as b, renderList as v, toDisplayString as M, createCommentVNode as h, vModelSelect as O } from "vue"; | ||
import { a as B, u as E, c as D } from "./index-Ci4F7pjy.js"; | ||
import { _ as G } from "./Label-eedKib_X.js"; | ||
const N = ["value"], R = ["label"], T = ["label"], F = /* @__PURE__ */ m("svg", { | ||
import { ref as d, computed as x, openBlock as n, createElementBlock as i, normalizeClass as C, unref as u, withDirectives as E, createElementVNode as m, isRef as M, createVNode as p, withCtx as A, Fragment as h, renderList as V, toDisplayString as B, createCommentVNode as b, vModelSelect as O, createBlock as D } from "vue"; | ||
import { a as F, u as G, c as N } from "./index-Ci4F7pjy.js"; | ||
import { a as R, _ as T } from "./InfoIcon-8VRJprQ4.js"; | ||
const $ = ["value"], I = ["label"], _ = ["label"], z = /* @__PURE__ */ m("svg", { | ||
class: "select", | ||
@@ -17,5 +17,5 @@ fill: "none", | ||
}) | ||
], -1), I = /* @__PURE__ */ m("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" }, null, -1), $ = [ | ||
I | ||
], J = { | ||
], -1), U = /* @__PURE__ */ m("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" }, null, -1), Z = [ | ||
U | ||
], Q = { | ||
__name: "Select", | ||
@@ -46,63 +46,91 @@ props: { | ||
default: null | ||
}, | ||
info: { | ||
type: Function, | ||
default: null | ||
}, | ||
infoMessage: { | ||
type: String, | ||
default: "" | ||
}, | ||
layout: { | ||
type: String, | ||
default: "floating-field", | ||
validator: (t) => ["floating-field", "floating-default"].includes(t) | ||
} | ||
}, | ||
emits: ["update:modelValue"], | ||
setup(o, { emit: k }) { | ||
const w = L(null); | ||
B(); | ||
const i = o, r = E(i, "modelValue", k), [V, f] = D(), c = x(() => { | ||
let d = [], l = [], t = Array.isArray(i.options); | ||
return typeof i.options == "object" ? ((t ? i.options : Object.entries(i.options)).forEach((g, j) => { | ||
const { key: y, value: e } = t ? { key: j, value: g } : { key: g[0], value: g[1] }; | ||
typeof e != "object" ? d.push( | ||
t ? { label: e, value: e, group: null } : { label: e, value: y, group: null } | ||
) : typeof e == "object" && (d.push({ value: (e == null ? void 0 : e.value) ?? y, label: (e == null ? void 0 : e.label) ?? y, group: (e == null ? void 0 : e.group) ?? null }), e != null && e.group && !l.includes(e.group) && l.push(e.group)); | ||
setup(t, { emit: j }) { | ||
const k = d(null); | ||
F(); | ||
const w = d(null); | ||
d(null), d(null); | ||
const r = t, a = G(r, "modelValue", j), [S, g] = N(), f = x(() => { | ||
let c = [], o = [], l = Array.isArray(r.options); | ||
return typeof r.options == "object" ? ((l ? r.options : Object.entries(r.options)).forEach((y, L) => { | ||
const { key: v, value: e } = l ? { key: L, value: y } : { key: y[0], value: y[1] }; | ||
typeof e != "object" ? c.push( | ||
l ? { label: e, value: e, group: null } : { label: e, value: v, group: null } | ||
) : typeof e == "object" && (c.push({ value: (e == null ? void 0 : e.value) ?? v, label: (e == null ? void 0 : e.label) ?? v, group: (e == null ? void 0 : e.group) ?? null }), e != null && e.group && !o.includes(e.group) && o.push(e.group)); | ||
}), { | ||
options: d, | ||
groups: l | ||
options: c, | ||
groups: o | ||
}) : { options: [], groups: [] }; | ||
}); | ||
return (d, l) => (n(), s("div", { | ||
class: S(["floating-field", o.emptyValue === u(r) ? "empty" : "selected"]) | ||
return (c, o) => (n(), i("div", { | ||
class: C([ | ||
t.emptyValue === u(a) ? "empty" : "selected", | ||
t.layout === "floating-field" ? "floating-field" : "floating-default", | ||
t.info ? "has-info" : void 0 | ||
]), | ||
ref_key: "wrapperEl", | ||
ref: w | ||
}, [ | ||
_(m("select", { | ||
E(m("select", { | ||
ref_key: "selectItem", | ||
ref: w, | ||
ref: k, | ||
class: "input", | ||
"onUpdate:modelValue": l[0] || (l[0] = (t) => C(r) ? r.value = t : null), | ||
"onUpdate:modelValue": o[0] || (o[0] = (l) => M(a) ? a.value = l : null), | ||
placeholder: " " | ||
}, [ | ||
p(u(V), null, { | ||
default: A(({ options: t }) => [ | ||
(n(!0), s(b, null, v(t, (a) => (n(), s("option", { | ||
value: a.value, | ||
key: a.value | ||
}, M(a.label), 9, N))), 128)) | ||
p(u(S), null, { | ||
default: A(({ options: l }) => [ | ||
(n(!0), i(h, null, V(l, (s) => (n(), i("option", { | ||
value: s.value, | ||
key: s.value | ||
}, B(s.label), 9, $))), 128)) | ||
]), | ||
_: 1 | ||
}), | ||
o.noneGroupedLabel !== null ? (n(), s("optgroup", { | ||
t.noneGroupedLabel !== null ? (n(), i("optgroup", { | ||
key: 0, | ||
label: o.noneGroupedLabel | ||
label: t.noneGroupedLabel | ||
}, [ | ||
p(u(f), { | ||
options: c.value.options.filter((t) => t.group === null) | ||
p(u(g), { | ||
options: f.value.options.filter((l) => l.group === null) | ||
}, null, 8, ["options"]) | ||
], 8, R)) : h("", !0), | ||
p(u(f), { | ||
], 8, I)) : b("", !0), | ||
p(u(g), { | ||
"e-else": "", | ||
options: c.value.options.filter((t) => t.group === null) | ||
options: f.value.options.filter((l) => l.group === null) | ||
}, null, 8, ["options"]), | ||
(n(!0), s(b, null, v(c.value.groups, (t) => (n(), s("optgroup", { label: t }, [ | ||
p(u(f), { | ||
options: c.value.options.filter((a) => a.group === t) | ||
(n(!0), i(h, null, V(f.value.groups, (l) => (n(), i("optgroup", { label: l }, [ | ||
p(u(g), { | ||
options: f.value.options.filter((s) => s.group === l) | ||
}, null, 8, ["options"]) | ||
], 8, T))), 256)) | ||
], 8, _))), 256)) | ||
], 512), [ | ||
[O, u(r)] | ||
[O, u(a)] | ||
]), | ||
F, | ||
u(r) !== o.emptyValue ? (n(), s("svg", { | ||
t.info ? (n(), D(R, { | ||
key: 0, | ||
onClick: l[1] || (l[1] = (t) => r.value = o.emptyValue), | ||
info: t.info, | ||
value: u(a), | ||
"input-el": k.value, | ||
"wrapper-el": w.value | ||
}, null, 8, ["info", "value", "input-el", "wrapper-el"])) : b("", !0), | ||
z, | ||
u(a) !== t.emptyValue ? (n(), i("svg", { | ||
key: 1, | ||
onClick: o[1] || (o[1] = (l) => a.value = t.emptyValue), | ||
xmlns: "http://www.w3.org/2000/svg", | ||
@@ -112,4 +140,4 @@ viewBox: "0 0 20 20", | ||
class: "clear" | ||
}, $)) : h("", !0), | ||
p(G, { label: o.label }, null, 8, ["label"]) | ||
}, Z)) : b("", !0), | ||
p(T, { label: t.label }, null, 8, ["label"]) | ||
], 2)); | ||
@@ -119,3 +147,3 @@ } | ||
export { | ||
J as default | ||
Q as default | ||
}; |
@@ -1,5 +0,5 @@ | ||
import { openBlock as i, createElementBlock as r, normalizeClass as m, unref as o, withDirectives as u, createElementVNode as d, isRef as p, vModelText as c, createVNode as f } from "vue"; | ||
import { u as V } from "./index-Ci4F7pjy.js"; | ||
import { _ as b } from "./Label-eedKib_X.js"; | ||
const M = { | ||
import { ref as t, openBlock as f, createElementBlock as s, normalizeClass as p, unref as a, withDirectives as m, createElementVNode as c, isRef as g, vModelText as y, createVNode as v, createBlock as V, createCommentVNode as k } from "vue"; | ||
import { u as E } from "./index-Ci4F7pjy.js"; | ||
import { _ as b, a as w } from "./InfoIcon-8VRJprQ4.js"; | ||
const C = { | ||
__name: "Text", | ||
@@ -18,21 +18,51 @@ props: { | ||
default: () => ({}) | ||
}, | ||
layout: { | ||
type: String, | ||
default: "floating-field", | ||
validator: (e) => ["floating-field", "floating-default"].includes(e) | ||
}, | ||
info: { | ||
type: Function, | ||
default: () => null | ||
}, | ||
infoMessage: { | ||
type: String, | ||
default: "" | ||
} | ||
}, | ||
emits: ["update:modelValue"], | ||
setup(t, { emit: n }) { | ||
const e = V(t, "modelValue", n); | ||
return (x, l) => { | ||
var a; | ||
return i(), r("div", { | ||
class: m(["floating-field", ((a = o(e)) == null ? void 0 : a.length) === 0 ? "empty" : "has-content"]) | ||
setup(e, { emit: r }) { | ||
const n = t(null), i = t(null); | ||
t(null); | ||
const l = E(e, "modelValue", r); | ||
return (M, o) => { | ||
var u; | ||
return f(), s("div", { | ||
class: p([ | ||
((u = a(l)) == null ? void 0 : u.length) === 0 ? "empty" : "has-content", | ||
e.layout === "floating-field" ? "floating-field" : "floating-default", | ||
e.info ? "has-info" : void 0 | ||
]), | ||
ref_key: "wrapperEl", | ||
ref: n | ||
}, [ | ||
u(d("input", { | ||
m(c("input", { | ||
ref_key: "inputEl", | ||
ref: i, | ||
type: "text", | ||
class: "input", | ||
placeholder: " ", | ||
"onUpdate:modelValue": l[0] || (l[0] = (s) => p(e) ? e.value = s : null) | ||
"onUpdate:modelValue": o[0] || (o[0] = (d) => g(l) ? l.value = d : null) | ||
}, null, 512), [ | ||
[c, o(e)] | ||
[y, a(l)] | ||
]), | ||
f(b, { label: t.label }, null, 8, ["label"]) | ||
v(b, { label: e.label }, null, 8, ["label"]), | ||
e.info ? (f(), V(w, { | ||
key: 0, | ||
info: e.info, | ||
"input-el": i.value, | ||
"wrapper-el": n.value, | ||
value: a(l) | ||
}, null, 8, ["info", "input-el", "wrapper-el", "value"])) : k("", !0) | ||
], 2); | ||
@@ -43,3 +73,3 @@ }; | ||
export { | ||
M as default | ||
C as default | ||
}; |
@@ -1,5 +0,5 @@ | ||
import { openBlock as s, createElementBlock as i, normalizeClass as m, unref as o, withDirectives as d, createElementVNode as u, isRef as p, vModelText as c, createVNode as f } from "vue"; | ||
import { _ as V } from "./Label-eedKib_X.js"; | ||
import { u as b } from "./index-Ci4F7pjy.js"; | ||
const M = { | ||
import { ref as t, openBlock as f, createElementBlock as m, normalizeClass as p, unref as a, withDirectives as c, createElementVNode as g, isRef as y, vModelText as v, createVNode as V, createBlock as k, createCommentVNode as E, renderSlot as b } from "vue"; | ||
import { _ as w, a as S } from "./InfoIcon-8VRJprQ4.js"; | ||
import { u as h } from "./index-Ci4F7pjy.js"; | ||
const C = { | ||
__name: "Textarea", | ||
@@ -18,20 +18,51 @@ props: { | ||
default: () => ({}) | ||
}, | ||
info: { | ||
type: Function, | ||
default: null | ||
}, | ||
infoMessage: { | ||
type: String, | ||
default: "" | ||
}, | ||
layout: { | ||
type: String, | ||
default: "floating-field", | ||
validator: (e) => ["floating-field", "floating-default"].includes(e) | ||
} | ||
}, | ||
emits: ["update:modelValue"], | ||
setup(t, { emit: n }) { | ||
const e = b(t, "modelValue", n); | ||
return (x, l) => { | ||
var a; | ||
return s(), i("div", { | ||
class: m(["floating-field", ((a = o(e)) == null ? void 0 : a.length) === 0 ? "empty" : "has-content"]) | ||
setup(e, { emit: r }) { | ||
const n = t(null), o = t(null); | ||
t(null); | ||
const l = h(e, "modelValue", r); | ||
return (d, i) => { | ||
var u; | ||
return f(), m("div", { | ||
ref_key: "wrapperEl", | ||
ref: n, | ||
class: p([ | ||
((u = a(l)) == null ? void 0 : u.length) === 0 ? "empty" : "has-content", | ||
e.layout === "floating-field" ? "floating-field" : "floating-default", | ||
e.info ? "has-info" : void 0 | ||
]) | ||
}, [ | ||
d(u("textarea", { | ||
c(g("textarea", { | ||
class: "input", | ||
placeholder: " ", | ||
"onUpdate:modelValue": l[0] || (l[0] = (r) => p(e) ? e.value = r : null) | ||
"onUpdate:modelValue": i[0] || (i[0] = (s) => y(l) ? l.value = s : null), | ||
ref_key: "inputEl", | ||
ref: o | ||
}, null, 512), [ | ||
[c, o(e)] | ||
[v, a(l)] | ||
]), | ||
f(V, { label: t.label }, null, 8, ["label"]) | ||
V(w, { label: e.label }, null, 8, ["label"]), | ||
e.info ? (f(), k(S, { | ||
key: 0, | ||
info: e.info, | ||
"input-el": o.value, | ||
"wrapper-el": n.value, | ||
value: a(l) | ||
}, null, 8, ["info", "input-el", "wrapper-el", "value"])) : E("", !0), | ||
b(d.$slots, "default") | ||
], 2); | ||
@@ -42,3 +73,3 @@ }; | ||
export { | ||
M as default | ||
C as default | ||
}; |
{ | ||
"name": "llnet-vue-floating-form", | ||
"private": false, | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"type": "module", | ||
@@ -51,2 +51,3 @@ "author": "LLNet", | ||
"devDependencies": { | ||
"@floating-ui/vue": "^1.1.2", | ||
"@vitejs/plugin-vue": "^5.0.4", | ||
@@ -53,0 +54,0 @@ "autoprefixer": "^10.4.19", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
7
60008
8
23
1003
1