Format documents
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 6s
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 6s
This commit is contained in:
50
dist/sigpro-ui.js
vendored
50
dist/sigpro-ui.js
vendored
@@ -681,25 +681,10 @@
|
||||
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
|
||||
]))
|
||||
]);
|
||||
@@ -824,12 +809,9 @@
|
||||
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) => {
|
||||
@@ -970,12 +952,7 @@
|
||||
}
|
||||
}, 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);
|
||||
@@ -1115,13 +1092,7 @@
|
||||
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,
|
||||
@@ -1244,10 +1215,7 @@
|
||||
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" });
|
||||
|
||||
Reference in New Issue
Block a user