Format documents
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 6s

This commit is contained in:
2026-05-03 16:11:43 +02:00
parent a1da9fb440
commit 817de6a0ee
12 changed files with 103 additions and 184 deletions

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

@@ -680,25 +680,10 @@ var Autocomplete = ({ items, value, onselect, placeholder = "...", ...props }) =
onselect?.(item);
hide();
};
return Dropdown({ class: "w-full" }, [
h("div", { tabindex: "0", role: "button", class: "w-full" }, Input({
...props,
placeholder,
value: query,
left: h("span", { class: "icon-[lucide--search]" }),
oninput: (e) => {
query(e.target.value);
if (isFunc(value))
value(e.target.value);
}
})),
return Dropdown({ class: "w-80" }, [
h("div", { tabindex: "0", role: "button", class: "w-full" }, Input({ ...props, placeholder, value: query, left: Icon("icon-[lucide--search]") })),
DropdownContent({ class: "p-2 bg-base-100 rounded-box shadow-xl w-full max-h-60 overflow-y-auto border border-base-300 z-50" }, h("ul", { class: "menu flex-col flex-nowrap w-full p-0" }, [
each(filtered, (item) => h("li", {}, [
h("a", {
onmousedown: (e) => e.preventDefault(),
onclick: () => pick(item)
}, getBy(item))
]), "value"),
each(filtered, (item) => h("li", {}, [h("a", { onmousedown: (e) => e.preventDefault(), onclick: () => pick(item) }, getBy(item))]), "value"),
() => filtered().length === 0 ? h("li", { class: "p-4 opacity-50 text-center" }, "Sin resultados") : null
]))
]);
@@ -823,12 +808,9 @@ var Colorpicker = (p) => {
h("div", { class: "size-5 rounded-sm", style: () => `background-color: ${current()}` }),
p.label && h("span", {}, p.label)
]),
DropdownContent({ class: "p-0" }, ColorPalette({
value: p.value,
onchange: (c) => {
isFunc(p.value) ? p.value(c) : p.onchange?.(c);
}
}))
DropdownContent({ class: "p-0" }, ColorPalette({ value: p.value, onchange: (c) => {
isFunc(p.value) ? p.value(c) : p.onchange?.(c);
} }))
]);
};
var ColorPalette = (p) => {
@@ -969,12 +951,7 @@ var Datepicker = (p) => {
}
}, h("span", { class: "icon-[lucide--x] opacity-50" })) : null
]),
DropdownContent({ class: "p-0" }, Calendar({
value: p.value,
range: rangeMode(),
hour: p.hour,
onChange: handleChange
}))
DropdownContent({ class: "p-0" }, Calendar({ value: p.value, range: rangeMode(), hour: p.hour, onChange: handleChange }))
]);
};
var Drawer = (p, c) => div({ ...p, class: cls("drawer", p.class) }, c);
@@ -1114,13 +1091,7 @@ var Modal = (p) => {
isOpen ? dialogRef.showModal() : dialogRef.hide();
});
const close = () => isFunc(p.open) && p.open(false);
return h("dialog", {
...p,
ref: (el) => dialogRef = el,
class: cls("modal", p.class),
onclose: close,
oncancel: close
}, [
return h("dialog", { ...p, ref: (el) => dialogRef = el, class: cls("modal", p.class), onclose: close, oncancel: close }, [
h("div", { class: "modal-box" }, [
p.title && h("h3", { class: "text-lg font-bold" }, p.title),
p.children,
@@ -1243,10 +1214,7 @@ var Timeline = (p, c) => h("ul", { ...p, class: cls("timeline", p.class) }, c);
var Toast = (message, type = "alert-success", duration = 3500) => {
let container = document.getElementById("sigpro-toast-container");
if (!container) {
container = h("div", {
id: "sigpro-toast-container",
class: "fixed top-0 right-0 z-[9999] p-4 flex flex-col items-end gap-2 pointer-events-none"
});
container = h("div", { id: "sigpro-toast-container", class: "fixed top-0 right-0 z-[9999] p-4 flex flex-col items-end gap-2 pointer-events-none" });
document.body.appendChild(container);
}
const host = h("div", { style: "display: contents" });