Correct components errors
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 3s

This commit is contained in:
2026-04-29 17:49:29 +02:00
parent 77732dc3f7
commit 5cfa3a231e
22 changed files with 2298 additions and 1358 deletions

333
dist/sigpro-ui.esm.js vendored
View File

@@ -94,10 +94,10 @@ __export(exports_sigpro_ui, {
// node_modules/sigpro/dist/sigpro.esm.min.js
var w = (e) => typeof e === "function";
var B = (e) => e && typeof e === "object";
var b = Array.isArray;
var g = Array.isArray;
var E = typeof document < "u" ? document : null;
var V = (e) => e?._isRuntime ? e.container : e instanceof Node ? e : E.createTextNode(e == null ? "" : String(e));
var u = null;
var d = null;
var _ = null;
var N = false;
var R = 0;
@@ -108,17 +108,17 @@ var k = new WeakMap;
var W = "http://www.w3.org/2000/svg";
var M = "http://www.w3.org/1999/xlink";
var q = new Set("svg,path,circle,rect,line,polyline,polygon,g,defs,text,textPath,tspan,use,symbol,image,marker,ellipse".split(","));
var S = (e) => {
var b = (e) => {
if (!e || e._disposed)
return;
e._disposed = true;
let o = [e];
while (o.length) {
let n = o.pop();
let s = [e];
while (s.length) {
let n = s.pop();
if (n._cleanups)
n._cleanups.forEach((r) => r()), n._cleanups.clear();
if (n._children)
n._children.forEach((r) => o.push(r)), n._children.clear();
n._children.forEach((r) => s.push(r)), n._children.clear();
if (n._deps)
n._deps.forEach((r) => r.delete(n)), n._deps.clear();
}
@@ -128,15 +128,15 @@ var v = (e) => {
(_._cleanups ||= new Set).add(e);
};
var K = (e) => {
let o = u;
u = null;
let s = d;
d = null;
try {
return e();
} finally {
u = o;
d = s;
}
};
var x = (e, o = false) => {
var x = (e, s = false) => {
let n = () => {
if (n._disposed)
return;
@@ -144,17 +144,17 @@ var x = (e, o = false) => {
n._deps.forEach((i) => i.delete(n));
if (n._cleanups)
n._cleanups.forEach((i) => i()), n._cleanups.clear();
let r = u, s = _;
u = _ = n;
let r = d, o = _;
d = _ = n;
try {
return n._result = e();
} catch (i) {
console.error("[SigPro]", i);
} finally {
u = r, _ = s;
d = r, _ = o;
}
};
if (n._deps = n._cleanups = n._children = null, n._disposed = false, n._isComputed = o, n._depth = u ? u._depth + 1 : 0, n._mounts = [], n._parent = _, _)
if (n._deps = n._cleanups = n._children = null, n._disposed = false, n._isComputed = s, n._depth = d ? d._depth + 1 : 0, n._mounts = [], n._parent = _, _)
(_._children ||= new Set).add(n);
return n;
};
@@ -162,11 +162,11 @@ var $ = () => {
if (N)
return;
N = true;
let e = Array.from(O).sort((o, n) => o._depth - n._depth);
let e = Array.from(O).sort((s, n) => s._depth - n._depth);
O.clear();
for (let o of e)
if (!o._disposed)
o();
for (let s of e)
if (!s._disposed)
s();
N = false;
};
var z = (e) => {
@@ -178,13 +178,13 @@ var z = (e) => {
$();
}
};
var m = (e, o = false) => {
if (!o && u && !u._disposed)
e.add(u), (u._deps ||= new Set).add(e);
else if (o && e.size > 0) {
var m = (e, s = false) => {
if (!s && d && !d._disposed)
e.add(d), (d._deps ||= new Set).add(e);
else if (s && e.size > 0) {
let n = false;
for (let r of e) {
if (r === u || r._disposed)
if (r === d || r._disposed)
continue;
if (r._isComputed) {
if (r._dirty = true, r._subs)
@@ -196,36 +196,36 @@ var m = (e, o = false) => {
queueMicrotask($);
}
};
var P = (e, o = null) => {
var P = (e, s = null) => {
let n = new Set;
if (w(e)) {
let r, s = () => {
if (s._dirty) {
let i = u;
u = s;
let r, o = () => {
if (o._dirty) {
let i = d;
d = o;
try {
let t = e();
if (!Object.is(r, t))
r = t, m(n, true);
} finally {
u = i;
d = i;
}
s._dirty = false;
o._dirty = false;
}
return m(n), r;
};
return s._isComputed = true, s._subs = n, s._dirty = true, s._deps = null, s._disposed = false, s;
return o._isComputed = true, o._subs = n, o._dirty = true, o._deps = null, o._disposed = false, o;
}
if (o)
if (s)
try {
e = JSON.parse(localStorage.getItem(o)) ?? e;
e = JSON.parse(localStorage.getItem(s)) ?? e;
} catch (r) {}
return (...r) => {
if (r.length) {
let s = w(r[0]) ? r[0](e) : r[0];
if (!Object.is(e, s)) {
if (e = s, o)
localStorage.setItem(o, JSON.stringify(e));
let o = w(r[0]) ? r[0](e) : r[0];
if (!Object.is(e, o)) {
if (e = o, s)
localStorage.setItem(s, JSON.stringify(e));
m(n, true);
}
}
@@ -235,25 +235,25 @@ var P = (e, o = null) => {
var D = (e) => {
if (!B(e))
return e;
let o = I.get(e);
if (o)
return o;
let s = I.get(e);
if (s)
return s;
let n = new Map, r = (i) => {
let t = n.get(i);
if (!t)
n.set(i, t = new Set);
return t;
}, s = new Proxy(e, { get(i, t, c) {
}, o = new Proxy(e, { get(i, t, c) {
if (typeof t !== "symbol")
m(r(t));
return D(Reflect.get(i, t, c));
}, set(i, t, c, l) {
let a = Reflect.has(i, t), f = Reflect.get(i, t, l), d = Reflect.set(i, t, c, l);
if (d && !Object.is(f, c)) {
let a = Reflect.has(i, t), f = Reflect.get(i, t, l), u = Reflect.set(i, t, c, l);
if (u && !Object.is(f, c)) {
if (m(r(t), true), !a)
m(r(j), true);
}
return d;
return u;
}, deleteProperty(i, t) {
let c = Reflect.deleteProperty(i, t);
if (c)
@@ -262,111 +262,115 @@ var D = (e) => {
}, ownKeys(i) {
return m(r(j)), Reflect.ownKeys(i);
} });
return I.set(e, s), s;
return I.set(e, o), o;
};
var T = (e, o) => {
if (o === undefined) {
var T = (e, s) => {
if (s === undefined) {
let r = x(e);
return r(), () => S(r);
return r(), () => b(r);
}
let n = x(() => {
let r = Array.isArray(e) ? e.map((s) => s()) : e();
K(() => o(r));
let r = Array.isArray(e) ? e.map((o) => o()) : e();
K(() => s(r));
});
return n(), () => S(n);
return n(), () => b(n);
};
var U = (e) => {
if (!e)
return;
if (e._cleanups)
e._cleanups.forEach((o) => o()), e._cleanups.clear();
e._cleanups.forEach((s) => s()), e._cleanups.clear();
if (e._ownerEffect)
S(e._ownerEffect);
b(e._ownerEffect);
if (e.childNodes)
e.childNodes.forEach((o) => U(o));
e.childNodes.forEach((s) => U(s));
};
var J = /^\s*(javascript|data|vbscript):/i;
var Q = new Set(["src", "href", "formaction", "action", "background", "code", "archive"]);
var X = (e) => Q.has(e) || e.startsWith("on");
var L = (e, o) => {
if (o == null || o === false)
var L = (e, s) => {
if (s == null || s === false)
return null;
if (X(e)) {
let n = String(o);
let n = String(s);
if (J.test(n))
return console.warn(`[SigPro] Bloqueado protocolo peligroso en ${e}`), "#";
}
return o;
return s;
};
var A = (e, o = {}, n = []) => {
if (o instanceof Node || b(o) || !B(o))
n = o, o = {};
var A = (e, s = {}, n = []) => {
if (s instanceof Node || g(s) || !B(s))
n = s, s = {};
if (w(e)) {
let t = x(() => {
let f = e(o, { children: n, emit: (d, ...h) => o[`on${d[0].toUpperCase()}${d.slice(1)}`]?.(...h) });
let f = e(s, { children: n, emit: (u, ...h) => s[`on${u[0].toUpperCase()}${u.slice(1)}`]?.(...h) });
return t._result = f, f;
});
t();
let c = t._result;
if (c == null)
return null;
let l = c instanceof Node || b(c) && c.every((f) => f instanceof Node) ? c : E.createTextNode(String(c)), a = (f) => {
let l = c instanceof Node || g(c) && c.every((f) => f instanceof Node) ? c : E.createTextNode(String(c)), a = (f) => {
if (B(f) && !f._isRuntime)
f._mounts = t._mounts || [], f._cleanups = t._cleanups || new Set, f._ownerEffect = t;
};
return b(l) ? l.forEach(a) : a(l), l;
return g(l) ? l.forEach(a) : a(l), l;
}
let r = q.has(e), s = r ? E.createElementNS(W, e) : E.createElement(e);
s._cleanups = new Set;
for (let t of Object.keys(o)) {
let c = o[t];
let r = q.has(e), o = r ? E.createElementNS(W, e) : E.createElement(e);
o._cleanups = new Set;
for (let t of Object.keys(s)) {
let c = s[t];
if (t === "ref") {
w(c) ? c(s) : c.current = s;
w(c) ? c(o) : c.current = o;
continue;
}
if (r && t.startsWith("xlink:")) {
let l = L(t.slice(6), c);
l == null ? s.removeAttributeNS(M, t.slice(6)) : s.setAttributeNS(M, t.slice(6), l);
l == null ? o.removeAttributeNS(M, t.slice(6)) : o.setAttributeNS(M, t.slice(6), l);
continue;
}
if (t.startsWith("on")) {
let l = t.slice(2).toLowerCase();
s.addEventListener(l, c);
let a = () => s.removeEventListener(l, c);
s._cleanups.add(a), v(a);
o.addEventListener(l, c);
let a = () => o.removeEventListener(l, c);
o._cleanups.add(a), v(a);
} else if (w(c)) {
let l = x(() => {
let a = L(t, c());
if (t === "class")
s.className = a || "";
o.className = a || "";
else if (a == null)
s.removeAttribute(t);
else if (t in s && !r)
s[t] = a;
o.removeAttribute(t);
else if (t === "style" && typeof a === "string")
o.setAttribute("style", a);
else if (t in o && !r)
o[t] = a;
else
s.setAttribute(t, a === true ? "" : a);
o.setAttribute(t, a === true ? "" : a);
});
if (l(), s._cleanups.add(() => S(l)), v(() => S(l)), /^(INPUT|TEXTAREA|SELECT)$/.test(s.tagName) && (t === "value" || t === "checked")) {
if (l(), o._cleanups.add(() => b(l)), v(() => b(l)), /^(INPUT|TEXTAREA|SELECT)$/.test(o.tagName) && (t === "value" || t === "checked")) {
let a = t === "checked" ? "change" : "input";
s.addEventListener(a, (f) => c(f.target[t]));
o.addEventListener(a, (f) => c(f.target[t]));
}
} else {
let l = L(t, c);
if (l != null)
if (t in s && !r)
s[t] = l;
if (t === "style" && typeof l === "string")
o.setAttribute("style", l);
else if (t in o && !r)
o[t] = l;
else
s.setAttribute(t, l === true ? "" : l);
o.setAttribute(t, l === true ? "" : l);
}
}
let i = (t) => {
if (b(t))
if (g(t))
return t.forEach(i);
if (w(t)) {
let c = E.createTextNode("");
s.appendChild(c);
o.appendChild(c);
let l = [], a = x(() => {
let f = t(), d = (b(f) ? f : [f]).map(V);
let f = t(), u = (g(f) ? f : [f]).map(V);
l.forEach((p) => {
if (p._isRuntime)
p.destroy();
@@ -376,88 +380,88 @@ var A = (e, o = {}, n = []) => {
p.remove();
});
let h = c;
for (let p = d.length - 1;p >= 0; p--) {
let y = d[p];
for (let p = u.length - 1;p >= 0; p--) {
let y = u[p];
if (y.parentNode !== h.parentNode)
h.parentNode?.insertBefore(y, h);
if (y._mounts)
y._mounts.forEach((G) => G());
h = y;
}
l = d;
l = u;
});
a(), s._cleanups.add(() => S(a)), v(() => S(a));
a(), o._cleanups.add(() => b(a)), v(() => b(a));
} else {
let c = V(t);
if (s.appendChild(c), c._mounts)
if (o.appendChild(c), c._mounts)
c._mounts.forEach((l) => l());
}
};
return i(n), s;
return i(n), o;
};
var C = (e) => {
let o = new Set, n = _, r = u, s = E.createElement("div");
s.style.display = "contents", s.setAttribute("role", "presentation"), _ = { _cleanups: o }, u = null;
let s = new Set, n = _, r = d, o = E.createElement("div");
o.style.display = "contents", o.setAttribute("role", "presentation"), _ = { _cleanups: s }, d = null;
let i = (t) => {
if (!t)
return;
if (t._isRuntime)
o.add(t.destroy), s.appendChild(t.container);
else if (b(t))
s.add(t.destroy), o.appendChild(t.container);
else if (g(t))
t.forEach(i);
else
s.appendChild(t instanceof Node ? t : E.createTextNode(String(t == null ? "" : t)));
o.appendChild(t instanceof Node ? t : E.createTextNode(String(t == null ? "" : t)));
};
try {
i(e({ onCleanup: (t) => o.add(t) }));
i(e({ onCleanup: (t) => s.add(t) }));
} finally {
_ = n, u = r;
_ = n, d = r;
}
return { _isRuntime: true, container: s, destroy: () => {
o.forEach((t) => t()), U(s), s.remove();
return { _isRuntime: true, container: o, destroy: () => {
s.forEach((t) => t()), U(o), o.remove();
} };
};
var F = (e, o, n = null) => {
let r = E.createTextNode(""), s = A("div", { style: "display:contents" }, [r]), i = null;
var F = (e, s, n = null) => {
let r = E.createTextNode(""), o = A("div", { style: "display:contents" }, [r]), i = null;
return T(() => !!(w(e) ? e() : e), (t) => {
if (i)
i.destroy(), i = null;
let c = t ? o : n;
let c = t ? s : n;
if (c)
i = C(() => w(c) ? c() : c), s.insertBefore(i.container, r);
}), v(() => i?.destroy()), s;
i = C(() => w(c) ? c() : c), o.insertBefore(i.container, r);
}), v(() => i?.destroy()), o;
};
var H = (e, o, n) => {
let r = E.createTextNode(""), s = A("div", { style: "display:contents" }, [r]), i = new Map;
var H = (e, s, n) => {
let r = E.createTextNode(""), o = A("div", { style: "display:contents" }, [r]), i = new Map;
return T(() => (w(e) ? e() : e) || [], (t) => {
let c = new Map, l = [], a = t || [];
for (let d = 0;d < a.length; d++) {
let h = a[d], p = n ? h?.[n] ?? d : h?.id ?? d, y = i.get(p);
for (let u = 0;u < a.length; u++) {
let h = a[u], p = n ? h?.[n] ?? u : h?.id ?? u, y = i.get(p);
if (!y)
y = C(() => o(h, d));
y = C(() => s(h, u));
else
i.delete(p);
c.set(p, y), l.push(y);
}
i.forEach((d) => d.destroy());
i.forEach((u) => u.destroy());
let f = r;
for (let d = l.length - 1;d >= 0; d--) {
let p = l[d].container;
for (let u = l.length - 1;u >= 0; u--) {
let p = l[u].container;
if (p.nextSibling !== f)
s.insertBefore(p, f);
o.insertBefore(p, f);
f = p;
}
i = c;
}), s;
}), o;
};
var g = (e) => {
let o = () => window.location.hash.slice(1) || "/", n = P(o()), r = () => n(o());
var S = (e) => {
let s = () => window.location.hash.slice(1) || "/", n = P(s()), r = () => n(s());
window.addEventListener("hashchange", r), v(() => window.removeEventListener("hashchange", r));
let s = A("div", { class: "router-hook" }), i = null;
let o = A("div", { class: "router-hook" }), i = null;
return T([n], () => {
let t = n(), c = e.find((l) => {
let a = l.path.split("/").filter(Boolean), f = t.split("/").filter(Boolean);
return a.length === f.length && a.every((d, h) => d[0] === ":" || d === f[h]);
return a.length === f.length && a.every((u, h) => u[0] === ":" || u === f[h]);
}) || e.find((l) => l.path === "*");
if (c) {
i?.destroy();
@@ -465,16 +469,16 @@ var g = (e) => {
c.path.split("/").filter(Boolean).forEach((a, f) => {
if (a[0] === ":")
l[a.slice(1)] = t.split("/").filter(Boolean)[f];
}), g.params(l), i = C(() => w(c.component) ? c.component(l) : c.component), s.replaceChildren(i.container);
}), S.params(l), i = C(() => w(c.component) ? c.component(l) : c.component), o.replaceChildren(i.container);
}
}), s;
}), o;
};
g.params = P({});
g.to = (e) => window.location.hash = e.replace(/^#?\/?/, "#/");
g.back = () => window.history.back();
g.path = () => window.location.hash.replace(/^#/, "") || "/";
var Y = (e, o) => {
let n = typeof o === "string" ? E.querySelector(o) : o;
S.params = P({});
S.to = (e) => window.location.hash = e.replace(/^#?\/?/, "#/");
S.back = () => window.history.back();
S.path = () => window.location.hash.replace(/^#/, "") || "/";
var Y = (e, s) => {
let n = typeof s === "string" ? E.querySelector(s) : s;
if (!n)
return;
if (k.has(n))
@@ -483,8 +487,8 @@ var Y = (e, o) => {
return n.replaceChildren(r.container), k.set(n, r), r;
};
if (typeof window < "u")
Object.assign(window, { $: P, $$: D, watch: T, h: A, when: F, each: H, router: g, mount: Y, batch: z }), "a abbr article aside audio b blockquote br button canvas caption cite code col colgroup datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 header hr i iframe img input ins kbd label legend li main mark meter nav object ol optgroup option output p picture pre progress section select slot small source span strong sub summary sup svg table tbody td template textarea tfoot th thead time tr u ul video".split(" ").forEach((e) => {
window[e] = (o, n) => A(e, o, n);
Object.assign(window, { $: P, $$: D, watch: T, h: A, when: F, each: H, router: S, mount: Y, batch: z }), "a abbr article aside audio b blockquote br button canvas caption cite code col colgroup datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 header hr i iframe img input ins kbd label legend li main mark meter nav object ol optgroup option output p picture pre progress section select slot small source span strong sub summary sup svg table tbody td template textarea tfoot th thead time tr u ul video".split(" ").forEach((e) => {
window[e] = (s, n) => A(e, s, n);
});
// sigpro-helpers.js
@@ -494,7 +498,7 @@ var cls = (...classes) => classes.filter(Boolean).join(" ").trim();
var isFn = (f) => typeof f === "function";
var filterBy = (items, query, field = "label", q2 = String(query).toLowerCase()) => !query ? get(items) : get(items).filter((item) => String(item && typeof item === "object" ? item[field] : item).toLowerCase().includes(q2));
var rand = (r) => `${r}-${Math.random().toString(36).slice(2, 9)}`;
var close = () => document.activeElement?.blur();
var hide = () => document.activeElement?.blur();
// sigpro-ui.js
var Accordion = (p) => {
@@ -508,7 +512,7 @@ var Accordion = (p) => {
});
};
var Alert = (p, c) => A("div", { ...p, class: cls("alert", p.class) }, c);
var Avatar = (p, c) => A("div", { ...p, class: cls("avatar", p.class) }, c);
var Avatar = (p, c) => A("div", { class: "avatar" }, A("div", { class: p.class }, c));
var AvatarGroup = (p, c) => A("div", { ...p, class: cls("avatar-group -space-x-6", p.class) }, c);
var Autocomplete = ({ items, value, onselect, placeholder = "...", ...props }) => {
const query = P(get(value) || "");
@@ -520,7 +524,7 @@ var Autocomplete = ({ items, value, onselect, placeholder = "...", ...props }) =
if (isFn(value))
value(actual);
onselect?.(item);
close();
hide();
};
return Dropdown({ class: "w-full" }, [
A("div", { tabindex: "0", role: "button", class: "w-full" }, Input({
@@ -555,7 +559,7 @@ var Calendar = (p) => {
const endHour = P(0);
const now = new Date;
const todayStr = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}-${String(now.getDate()).padStart(2, "0")}`;
const fmt = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
const fmt = (d2) => `${d2.getFullYear()}-${String(d2.getMonth() + 1).padStart(2, "0")}-${String(d2.getDate()).padStart(2, "0")}`;
const rangeMode = () => get(p.range) === true;
const current = () => get(p.value);
const selectDate = (date) => {
@@ -578,12 +582,12 @@ var Calendar = (p) => {
}
};
const move = (m2) => {
const d = internalDate();
internalDate(new Date(d.getFullYear(), d.getMonth() + m2, 1));
const d2 = internalDate();
internalDate(new Date(d2.getFullYear(), d2.getMonth() + m2, 1));
};
const moveYear = (y) => {
const d = internalDate();
internalDate(new Date(d.getFullYear() + y, d.getMonth(), 1));
const d2 = internalDate();
internalDate(new Date(d2.getFullYear() + y, d2.getMonth(), 1));
};
const HourSlider = ({ value: hVal, onChange: onH }) => A("div", { class: "flex-1" }, [
A("div", { class: "flex gap-2 items-center" }, [
@@ -606,9 +610,9 @@ var Calendar = (p) => {
])
]),
A("div", { class: "grid grid-cols-7 gap-1", onmouseleave: () => hoverDate(null) }, [
...["L", "M", "X", "J", "V", "S", "D"].map((d) => A("div", { class: "text-[10px] opacity-40 font-bold text-center" }, d)),
...["L", "M", "X", "J", "V", "S", "D"].map((d2) => A("div", { class: "text-[10px] opacity-40 font-bold text-center" }, d2)),
() => {
const d = internalDate(), y = d.getFullYear(), m2 = d.getMonth();
const d2 = internalDate(), y = d2.getFullYear(), m2 = d2.getMonth();
const firstDay = new Date(y, m2, 1).getDay();
const offset = firstDay === 0 ? 6 : firstDay - 1;
const dim = new Date(y, m2 + 1, 0).getDate();
@@ -665,9 +669,12 @@ var Colorpicker = (p) => {
A("div", { class: "size-5 rounded-sm", style: () => `background-color: ${current()}` }),
p.label && A("span", {}, p.label)
]),
DropdownContent({ class: "p-3 bg-base-100 rounded-box shadow-xl w-64" }, ColorPalette({ value: p.value, onchange: (c) => {
isFn(p.value) ? p.value(c) : p.onchange?.(c);
} }))
DropdownContent({ class: "p-0" }, ColorPalette({
value: p.value,
onchange: (c) => {
isFn(p.value) ? p.value(c) : p.onchange?.(c);
}
}))
]);
};
var ColorPalette = (p) => {
@@ -738,8 +745,13 @@ var ColorPalette = (p) => {
"#d946ef",
"#fae8ff"
];
const pick = (c) => isFn(p.value) ? p.value(c) : p.onchange?.(c);
return A("div", { class: "grid grid-cols-8 gap-1" }, palette.map((c) => A("button", {
const pick = (c) => {
isFn(p.value) ? p.value(c) : p.onchange?.(c);
hide();
};
return A("div", {
class: cls("p-3 bg-base-100 rounded-box shadow w-64", p.class)
}, A("div", { class: "grid grid-cols-8 gap-1" }, palette.map((c) => A("button", {
type: "button",
style: `background-color: ${c}`,
class: () => {
@@ -748,9 +760,8 @@ var ColorPalette = (p) => {
},
onclick: () => {
pick(c);
close();
}
})));
}))));
};
var Datepicker = (p) => {
const displayValue = P("");
@@ -778,7 +789,7 @@ var Datepicker = (p) => {
else
p.onChange?.(val);
if (!rangeMode() || val?.end != null)
close();
hide();
};
return Dropdown({ class: cls("w-full", p.class) }, [
A("label", {
@@ -804,7 +815,7 @@ var Datepicker = (p) => {
}
}, A("span", { class: "icon-[lucide--x] opacity-50" })) : null
]),
DropdownContent({ class: "p-0 bg-base-100 rounded-box shadow-xl" }, Calendar({
DropdownContent({ class: "p-0" }, Calendar({
value: p.value,
range: rangeMode(),
hour: p.hour,
@@ -866,7 +877,7 @@ var Fileinput = (p) => {
}, [
A("div", { class: "flex items-center gap-3 w-full" }, [
A("span", { class: "icon-[lucide--upload]" }),
A("span", { class: "text-sm opacity-70 truncate grow text-left" }, "Arrastra o selecciona archivos..."),
A("span", { class: "text-sm opacity-70 truncate grow text-left" }, "Drag and drop..."),
A("span", { class: "text-[10px] opacity-40 shrink-0" }, `Máx ${p.max || 2}MB`)
]),
A("input", {
@@ -946,21 +957,21 @@ var Modal = (p) => {
const isOpen = get(p.open);
if (!dialogRef)
return;
isOpen ? dialogRef.showModal() : dialogRef.close();
isOpen ? dialogRef.showModal() : dialogRef.hide();
});
const close2 = () => isFn(p.open) && p.open(false);
const close = () => isFn(p.open) && p.open(false);
return A("dialog", {
...p,
ref: (el) => dialogRef = el,
class: cls("modal", p.class),
onclose: close2,
oncancel: close2
onclose: close,
oncancel: close
}, [
A("div", { class: "modal-box" }, [
p.title && A("h3", { class: "text-lg font-bold" }, p.title),
p.children,
A("div", { class: "modal-action" }, [
p.actions || Button({ class: "btn", onclick: close2 }, "Cerrar")
p.actions || Button({ class: "btn", onclick: close }, "Cerrar")
])
]),
A("form", { method: "dialog", class: "modal-backdrop" }, [
@@ -970,7 +981,7 @@ var Modal = (p) => {
};
var Navbar = (p, c) => A("div", { ...p, class: cls("navbar", p.class) }, c);
var Progress = (p) => A("progress", { ...p, class: cls("progress", p.class) });
var Radial = (p, c) => A("div", { ...p, class: cls("radial-progress", p.class), style: `--value:${p.value ?? 0};${p.style ?? ""}`, role: "progressbar", "aria-valuenow": p.value ?? 0 }, c ?? `${p.value ?? 0}%`);
var Radial = (p, c) => A("div", { class: cls("radial-progress", p.class), style: `--value:${get(p.value) ?? 0};`, role: "progressbar", "aria-valuenow": p.value }, c);
var Radio = (p) => A("input", { ...p, type: "radio", class: cls("radio", p.class) });
var Range = (p) => A("input", { ...p, type: "range", class: cls("range", p.class) });
var Rating = (p, c) => A("div", { ...p, class: "rating" }, c);
@@ -1073,7 +1084,7 @@ var Tabs = (p, c) => {
});
};
var Textarea = (p) => A("textarea", { ...p, class: cls("textarea", p.class) });
var Textrotate = (p, c) => A("span", { ...p, class: cls("text-rotate", p.class) }, c);
var Textrotate = (p, c) => A("span", { ...p, class: cls("text-rotate", p.class) }, A("span", {}, c));
var Timeline = (p, c) => A("ul", { ...p, class: cls("timeline", p.class) }, c);
var Toast = (message, type = "alert-success", duration = 3500) => {
let container = document.getElementById("sigpro-toast-container");
@@ -1371,7 +1382,7 @@ var Editor = (p) => {
})
]),
A("div", { class: "px-3 py-1 border-t border-base-300 bg-base-100/50 text-[10px] text-right text-base-content/60 italic" }, [
A("span", () => `${count()} caracteres`)
A("span", () => `${count()}`)
])
]);
};
@@ -1406,7 +1417,9 @@ var Components = {
};
var Utils = {
Locale,
tt
tt,
hide,
get
};
if (typeof window !== "undefined") {
Object.entries({ ...Components, ...Utils }).forEach(([name, value]) => {