Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

llnet-vue-floating-form

Package Overview
Dependencies
Maintainers
0
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

llnet-vue-floating-form - npm Package Compare versions

Comparing version 0.0.27 to 0.0.28

286

dist/select2.js

@@ -1,2 +0,2 @@

import { ref as w, computed as S, inject as ee, watchEffect as q, onMounted as H, cloneVNode as Ee, h as X, Fragment as W, defineComponent as C, provide as ce, watch as ve, onUnmounted as fe, nextTick as F, toRaw as D, openBlock as N, createElementBlock as V, createElementVNode as j, normalizeClass as Q, unref as R, createVNode as M, isRef as Pe, withCtx as B, toDisplayString as Y, Transition as $e, renderList as ke, createBlock as oe, renderSlot as De, createCommentVNode as z } from "vue";
import { ref as w, computed as S, inject as X, watchEffect as W, onMounted as H, cloneVNode as Ee, h as Y, Fragment as J, defineComponent as C, provide as ce, watch as ve, onUnmounted as fe, nextTick as F, toRaw as D, openBlock as N, createElementBlock as V, normalizeClass as G, unref as T, createVNode as M, isRef as Pe, withCtx as B, createElementVNode as R, toDisplayString as ne, Transition as $e, renderList as ke, createBlock as oe, renderSlot as De, createCommentVNode as z } from "vue";
import { _ as je } from "./Label-eedKib_X.js";

@@ -12,4 +12,4 @@ import { u as Te } from "./index-CwtlZ_c1.js";

let Ne = Symbol("headlessui.useid"), Fe = 0;
function G() {
return ee(Ne, () => `${++Fe}`)();
function q() {
return X(Ne, () => `${++Fe}`)();
}

@@ -23,3 +23,3 @@ function x(e) {

}
function T(e, n, ...l) {
function j(e, n, ...l) {
if (e in n) {

@@ -30,3 +30,3 @@ let a = n[e];

let r = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map((a) => `"${a}"`).join(", ")}.`);
throw Error.captureStackTrace && Error.captureStackTrace(r, T), r;
throw Error.captureStackTrace && Error.captureStackTrace(r, j), r;
}

@@ -56,5 +56,5 @@ var Ce = Object.defineProperty, Ie = (e, n, l) => n in e ? Ce(e, n, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[n] = l, ae = (e, n, l) => (Ie(e, typeof n != "symbol" ? n + "" : n, l), l);

}
}, te = new Ve();
}, ee = new Ve();
function Me(e) {
if (te.isServer)
if (ee.isServer)
return null;

@@ -71,6 +71,6 @@ if (e instanceof Node)

let re = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
var Be = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(Be || {}), He = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(He || {}), Ue = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Ue || {}), le = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(le || {});
var Be = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(Be || {}), He = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(He || {}), Ue = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Ue || {}), te = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(te || {});
function pe(e, n = 0) {
var l;
return e === ((l = Me(e)) == null ? void 0 : l.body) ? !1 : T(n, { 0() {
return e === ((l = Me(e)) == null ? void 0 : l.body) ? !1 : j(n, { 0() {
return e.matches(re);

@@ -112,3 +112,3 @@ }, 1() {

function K(e, n, l) {
te.isServer || q((r) => {
ee.isServer || W((r) => {
document.addEventListener(e, n, l), r(() => document.removeEventListener(e, n, l));

@@ -118,3 +118,3 @@ });

function Ge(e, n, l) {
te.isServer || q((r) => {
ee.isServer || W((r) => {
window.addEventListener(e, n, l), r(() => window.removeEventListener(e, n, l));

@@ -140,3 +140,3 @@ });

}
return !pe(s, le.Loose) && s.tabIndex !== -1 && o.preventDefault(), n(o, s);
return !pe(s, te.Loose) && s.tabIndex !== -1 && o.preventDefault(), n(o, s);
}

@@ -165,3 +165,3 @@ let a = w(null);

l.value = ue(e.value.type, e.value.as);
}), q(() => {
}), W(() => {
var r;

@@ -183,3 +183,3 @@ l.value || x(n) && x(n) instanceof HTMLButtonElement && !((r = x(n)) != null && r.hasAttribute("type")) && (l.value = "button");

}
var J = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(J || {}), Xe = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Xe || {});
var Z = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Z || {}), Xe = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Xe || {});
function I({ visible: e = !0, features: n = 0, ourProps: l, theirProps: r, ...a }) {

@@ -189,14 +189,14 @@ var o;

if (e || n & 2 && t.static)
return Z(s);
return Q(s);
if (n & 1) {
let f = (o = t.unmount) == null || o ? 0 : 1;
return T(f, { 0() {
return j(f, { 0() {
return null;
}, 1() {
return Z({ ...a, props: { ...t, hidden: !0, style: { display: "none" } } });
return Q({ ...a, props: { ...t, hidden: !0, style: { display: "none" } } });
} });
}
return Z(s);
return Q(s);
}
function Z({ props: e, attrs: n, slots: l, slot: r, name: a }) {
function Q({ props: e, attrs: n, slots: l, slot: r, name: a }) {
var o, t;

@@ -225,6 +225,6 @@ let { as: s, ...f } = ge(e, ["unmount", "static"]), c = (o = l.default) == null ? void 0 : o.call(l, r), p = {};

}
return X(s, Object.assign({}, f, p), { default: () => c });
return Y(s, Object.assign({}, f, p), { default: () => c });
}
function be(e) {
return e.flatMap((n) => n.type === W ? be(n.children) : [n]);
return e.flatMap((n) => n.type === J ? be(n.children) : [n]);
}

@@ -278,3 +278,3 @@ function me(...e) {

function lt() {
return ee(he, null);
return X(he, null);
}

@@ -400,3 +400,3 @@ function nt(e) {

function _(e) {
let n = ee(Se, null);
let n = X(Se, null);
if (n === null) {

@@ -414,3 +414,3 @@ let l = new Error(`<${e} /> is missing a parent <Listbox /> component.`);

}
let m = S(() => e.multiple ? 1 : 0), [b, g] = Ae(S(() => e.modelValue), (u) => r("update:modelValue", u), S(() => e.defaultValue)), O = S(() => b.value === void 0 ? T(m.value, { 1: [], 0: void 0 }) : b.value), $ = { listboxState: a, value: O, mode: m, compare(u, v) {
let m = S(() => e.multiple ? 1 : 0), [b, g] = Ae(S(() => e.modelValue), (u) => r("update:modelValue", u), S(() => e.defaultValue)), O = S(() => b.value === void 0 ? j(m.value, { 1: [], 0: void 0 }) : b.value), $ = { listboxState: a, value: O, mode: m, compare(u, v) {
if (typeof e.by == "string") {

@@ -451,3 +451,3 @@ let y = e.by;

}, select(u) {
e.disabled || g(T(m.value, { 0: () => u, 1: () => {
e.disabled || g(j(m.value, { 0: () => u, 1: () => {
let v = D($.value.value).slice(), y = D(u), h = v.findIndex((P) => $.compare(y, D(P)));

@@ -459,4 +459,4 @@ return h === -1 ? v.push(y) : v.splice(h, 1), v;

var y;
$.closeListbox(), pe(v, le.Loose) || (u.preventDefault(), (y = x(t)) == null || y.focus());
}, S(() => a.value === 0)), ce(Se, $), nt(S(() => T(a.value, { 0: U.Open, 1: U.Closed })));
$.closeListbox(), pe(v, te.Loose) || (u.preventDefault(), (y = x(t)) == null || y.focus());
}, S(() => a.value === 0)), ce(Se, $), nt(S(() => j(a.value, { 0: U.Open, 1: U.Closed })));
let k = S(() => {

@@ -480,3 +480,3 @@ var u;

let { name: u, modelValue: v, disabled: y, form: h, ...P } = e, A = { open: a.value === 0, disabled: y, value: O.value };
return X(W, [...u != null && O.value != null ? we({ [u]: O.value }).map(([ne, Le]) => X(tt, Je({ features: ye.Hidden, key: ne, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: h, disabled: y, name: ne, value: Le }))) : [], I({ ourProps: {}, theirProps: { ...l, ...ge(P, ["defaultValue", "onUpdate:modelValue", "horizontal", "multiple", "by"]) }, slot: A, slots: n, attrs: l, name: "Listbox" })]);
return Y(J, [...u != null && O.value != null ? we({ [u]: O.value }).map(([le, Le]) => Y(tt, Je({ features: ye.Hidden, key: le, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: h, disabled: y, name: le, value: Le }))) : [], I({ ourProps: {}, theirProps: { ...l, ...ge(P, ["defaultValue", "onUpdate:modelValue", "horizontal", "multiple", "by"]) }, slot: A, slots: n, attrs: l, name: "Listbox" })]);
};

@@ -486,3 +486,3 @@ } });

var r;
let a = (r = e.id) != null ? r : `headlessui-listbox-label-${G()}`, o = _("ListboxLabel");
let a = (r = e.id) != null ? r : `headlessui-listbox-label-${q()}`, o = _("ListboxLabel");
function t() {

@@ -499,3 +499,3 @@ var s;

var a;
let o = (a = e.id) != null ? a : `headlessui-listbox-button-${G()}`, t = _("ListboxButton");
let o = (a = e.id) != null ? a : `headlessui-listbox-button-${q()}`, t = _("ListboxButton");
r({ el: t.buttonRef, $el: t.buttonRef });

@@ -544,3 +544,3 @@ function s(i) {

var a;
let o = (a = e.id) != null ? a : `headlessui-listbox-options-${G()}`, t = _("ListboxOptions"), s = w(null);
let o = (a = e.id) != null ? a : `headlessui-listbox-options-${q()}`, t = _("ListboxOptions"), s = w(null);
r({ el: t.optionsRef, $el: t.optionsRef });

@@ -562,5 +562,5 @@ function f(i) {

break;
case T(t.orientation.value, { vertical: L.ArrowDown, horizontal: L.ArrowRight }):
case j(t.orientation.value, { vertical: L.ArrowDown, horizontal: L.ArrowRight }):
return i.preventDefault(), i.stopPropagation(), t.goToOption(E.Next);
case T(t.orientation.value, { vertical: L.ArrowUp, horizontal: L.ArrowLeft }):
case j(t.orientation.value, { vertical: L.ArrowUp, horizontal: L.ArrowLeft }):
return i.preventDefault(), i.stopPropagation(), t.goToOption(E.Previous);

@@ -591,9 +591,9 @@ case L.Home:

let m = { open: t.listboxState.value === 0 }, { ...b } = e, g = { "aria-activedescendant": t.activeOptionIndex.value === null || (i = t.options.value[t.activeOptionIndex.value]) == null ? void 0 : i.id, "aria-multiselectable": t.mode.value === 1 ? !0 : void 0, "aria-labelledby": (d = x(t.buttonRef)) == null ? void 0 : d.id, "aria-orientation": t.orientation.value, id: o, onKeydown: f, role: "listbox", tabIndex: 0, ref: t.optionsRef };
return I({ ourProps: g, theirProps: b, slot: m, attrs: n, slots: l, features: J.RenderStrategy | J.Static, visible: p.value, name: "ListboxOptions" });
return I({ ourProps: g, theirProps: b, slot: m, attrs: n, slots: l, features: Z.RenderStrategy | Z.Static, visible: p.value, name: "ListboxOptions" });
};
} }), mt = C({ name: "ListboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: null } }, setup(e, { slots: n, attrs: l, expose: r }) {
var a;
let o = (a = e.id) != null ? a : `headlessui-listbox-option-${G()}`, t = _("ListboxOption"), s = w(null);
let o = (a = e.id) != null ? a : `headlessui-listbox-option-${q()}`, t = _("ListboxOption"), s = w(null);
r({ el: s, $el: s });
let f = S(() => t.activeOptionIndex.value !== null ? t.options.value[t.activeOptionIndex.value].id === o : !1), c = S(() => T(t.mode.value, { 0: () => t.compare(D(t.value.value), D(e.value)), 1: () => D(t.value.value).some((u) => t.compare(D(u), D(e.value))) })), p = S(() => T(t.mode.value, { 1: () => {
let f = S(() => t.activeOptionIndex.value !== null ? t.options.value[t.activeOptionIndex.value].id === o : !1), c = S(() => j(t.mode.value, { 0: () => t.compare(D(t.value.value), D(e.value)), 1: () => D(t.value.value).some((u) => t.compare(D(u), D(e.value))) })), p = S(() => j(t.mode.value, { 1: () => {
var u;

@@ -607,3 +607,3 @@ let v = D(t.value.value);

ve([t.listboxState, c], () => {
t.listboxState.value === 0 && c.value && T(t.mode.value, { 1: () => {
t.listboxState.value === 0 && c.value && j(t.mode.value, { 1: () => {
p.value && t.goToOption(E.Specific, o);

@@ -614,3 +614,3 @@ }, 0: () => {

}, { immediate: !0 });
}), q(() => {
}), W(() => {
t.listboxState.value === 0 && f.value && t.activationTrigger.value !== 0 && F(() => {

@@ -652,3 +652,3 @@ var u, v;

class: "icon"
}, wt = /* @__PURE__ */ j("svg", {
}, wt = /* @__PURE__ */ R("svg", {
xmlns: "http://www.w3.org/2000/svg",

@@ -658,3 +658,3 @@ viewBox: "0 0 16 16",

}, [
/* @__PURE__ */ j("path", {
/* @__PURE__ */ R("path", {
"fill-rule": "evenodd",

@@ -666,3 +666,3 @@ d: "M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z",

wt
], xt = /* @__PURE__ */ j("svg", {
], xt = /* @__PURE__ */ R("svg", {
class: "select",

@@ -674,3 +674,3 @@ fill: "none",

}, [
/* @__PURE__ */ j("path", {
/* @__PURE__ */ R("path", {
"stroke-linecap": "round",

@@ -681,3 +681,3 @@ "stroke-linejoin": "round",

})
], -1), St = /* @__PURE__ */ j("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), Lt = [
], -1), St = /* @__PURE__ */ R("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), Lt = [
St

@@ -760,104 +760,100 @@ ], jt = {

document.body.removeEventListener("click", i), document.body.removeEventListener("focus", i), document.body.removeEventListener("mousedown", i);
}), (d, m) => (N(), V(W, null, [
j("div", {
ref_key: "selectElement",
ref: o,
class: Q(["select2", {
focus: r.value,
empty: R(s) === f.value,
selected: R(s) !== f.value,
"has-info": e.info,
"floating-field": e.layout === "floating-field",
"floating-default": e.layout === "floating-default"
}]),
onClickPassive: m[2] || (m[2] = (b) => t.value = !t.value),
onFocusinPassive: m[3] || (m[3] = (b) => r.value = !0),
onFocusoutPassive: m[4] || (m[4] = (b) => r.value = !1)
}, [
M(R(ft), {
class: "input",
modelValue: R(s),
"onUpdate:modelValue": m[0] || (m[0] = (b) => Pe(s) ? s.value = b : null),
multiple: e.multiple
}, {
default: B(() => [
j("div", gt, [
M(R(pt), null, {
default: B(() => [
j("span", null, Y(p.value) + " ", 1)
]),
_: 1
}),
M($e, {
"leave-active-class": "transition_active",
"leave-from-class": "transition_from",
"leave-to-class": "transition_to"
}, {
default: B(() => [
M(R(bt), {
static: t.value,
unmount: !1
}, {
default: B(() => [
(N(!0), V(W, null, ke(c.value, (b) => (N(), oe(R(mt), {
key: b.label,
value: b.value,
as: "template"
}, {
default: B(({ active: g, selected: O }) => [
j("li", {
class: Q(g ? "active" : void 0)
}, [
De(d.$slots, "option", {
option: b,
active: g,
selected: O
}, () => [
j("span", {
class: Q(["label", [O ? "selected" : void 0]])
}, Y(b.label), 3),
b.desc ? (N(), V("span", {
key: 0,
innerHTML: b.desc
}, null, 8, yt)) : z("", !0)
]),
O ? (N(), V("span", ht, Ot)) : z("", !0)
], 2)
]),
_: 2
}, 1032, ["value"]))), 128))
]),
_: 3
}, 8, ["static"])
]),
_: 3
})
])
]),
_: 3
}, 8, ["modelValue", "multiple"]),
M(je, {
label: e.label,
class: "z-20 block"
}, null, 8, ["label"]),
e.info ? (N(), oe(Re, {
key: 0,
info: e.info,
message: e.infoMessage,
wrapperEl: o.value,
value: R(s)
}, null, 8, ["info", "message", "wrapperEl", "value"])) : z("", !0),
xt,
e.enableEmptyValue && R(s) !== f.value ? (N(), V("svg", {
key: 1,
onClick: m[1] || (m[1] = (b) => s.value = f.value),
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor",
class: "clear"
}, Lt)) : z("", !0)
], 34),
j("pre", null, " " + Y(c.value) + `
`, 1)
], 64));
}), (d, m) => (N(), V("div", {
ref_key: "selectElement",
ref: o,
class: G(["select2", {
focus: r.value,
empty: T(s) === f.value,
selected: T(s) !== f.value,
"has-info": e.info,
"floating-field": e.layout === "floating-field",
"floating-default": e.layout === "floating-default"
}]),
onClickPassive: m[2] || (m[2] = (b) => t.value = !t.value),
onFocusinPassive: m[3] || (m[3] = (b) => r.value = !0),
onFocusoutPassive: m[4] || (m[4] = (b) => r.value = !1)
}, [
M(T(ft), {
class: "input",
modelValue: T(s),
"onUpdate:modelValue": m[0] || (m[0] = (b) => Pe(s) ? s.value = b : null),
multiple: e.multiple
}, {
default: B(() => [
R("div", gt, [
M(T(pt), null, {
default: B(() => [
R("span", null, ne(p.value) + " ", 1)
]),
_: 1
}),
M($e, {
"leave-active-class": "transition_active",
"leave-from-class": "transition_from",
"leave-to-class": "transition_to"
}, {
default: B(() => [
M(T(bt), {
static: t.value,
unmount: !1
}, {
default: B(() => [
(N(!0), V(J, null, ke(c.value, (b) => (N(), oe(T(mt), {
key: b.label,
value: b.value,
as: "template"
}, {
default: B(({ active: g, selected: O }) => [
R("li", {
class: G(g ? "active" : void 0)
}, [
De(d.$slots, "option", {
option: b,
active: g,
selected: O
}, () => [
R("span", {
class: G(["label", [O ? "selected" : void 0]])
}, ne(b.label), 3),
b.desc ? (N(), V("span", {
key: 0,
innerHTML: b.desc
}, null, 8, yt)) : z("", !0)
]),
O ? (N(), V("span", ht, Ot)) : z("", !0)
], 2)
]),
_: 2
}, 1032, ["value"]))), 128))
]),
_: 3
}, 8, ["static"])
]),
_: 3
})
])
]),
_: 3
}, 8, ["modelValue", "multiple"]),
M(je, {
label: e.label,
class: "z-20 block"
}, null, 8, ["label"]),
e.info ? (N(), oe(Re, {
key: 0,
info: e.info,
message: e.infoMessage,
wrapperEl: o.value,
value: T(s)
}, null, 8, ["info", "message", "wrapperEl", "value"])) : z("", !0),
xt,
e.enableEmptyValue && T(s) !== f.value ? (N(), V("svg", {
key: 1,
onClick: m[1] || (m[1] = (b) => s.value = f.value),
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor",
class: "clear"
}, Lt)) : z("", !0)
], 34));
}

@@ -864,0 +860,0 @@ };

{
"name": "llnet-vue-floating-form",
"private": false,
"version": "0.0.27",
"version": "0.0.28",
"type": "module",

@@ -6,0 +6,0 @@ "author": "LLNet",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc