Update new functions

This commit is contained in:
2026-04-06 03:19:15 +02:00
parent f9095332eb
commit 294547fc56
139 changed files with 2249 additions and 2109 deletions

View File

@@ -1,5 +1,5 @@
// components/Checkbox.js
import { $html } from "../sigpro.js";
import { Tag } from "../sigpro.js";
import { val, ui } from "../core/utils.js";
/**
@@ -16,17 +16,17 @@ import { val, ui } from "../core/utils.js";
export const Checkbox = (props) => {
const { class: className, value, tooltip, toggle, label, ...rest } = props;
const checkEl = $html("input", {
const checkEl = Tag("input", {
...rest,
type: "checkbox",
class: () => ui(val(toggle) ? "toggle" : "checkbox", className),
checked: value
});
const layout = $html("label", { class: "label cursor-pointer justify-start gap-3" }, [
const layout = Tag("label", { class: "label cursor-pointer justify-start gap-3" }, [
checkEl,
label ? $html("span", { class: "label-text" }, label) : null,
label ? Tag("span", { class: "label-text" }, label) : null,
]);
return tooltip ? $html("div", { class: "tooltip", "data-tip": tooltip }, layout) : layout;
return tooltip ? Tag("div", { class: "tooltip", "data-tip": tooltip }, layout) : layout;
};