Updateing Docs

This commit is contained in:
2026-04-02 19:31:39 +02:00
parent 5a77deb442
commit f0c710f8c2
138 changed files with 25729 additions and 3918 deletions

View File

@@ -1,9 +1,20 @@
// components/Colorpicker.js
import { $, $html, $if } from "sigpro";
import { val } from "../core/utils.js";
import { val, ui } from "../core/utils.js";
/** COLORPICKER */
/**
* Colorpicker component
*
* daisyUI classes used:
* - btn, btn-primary, btn-secondary, btn-accent, btn-ghost
* - bg-base-100, border, border-base-300, shadow-sm, shadow-2xl
* - rounded-box, rounded-sm, fixed, inset-0
* - z-50, z-110, absolute, left-0, mt-2, p-3, w-64
* - grid, grid-cols-8, gap-1, ring, ring-offset-1, ring-primary
* - scale-110, transition-all, hover:scale-125, active:scale-95
*/
export const Colorpicker = (props) => {
const { value, label, ...rest } = props;
const { class: className, value, label, ...rest } = props;
const isOpen = $(false);
const palette = [
@@ -19,7 +30,7 @@ export const Colorpicker = (props) => {
const getColor = () => val(value) || "#000000";
return $html("div", { class: "relative w-fit" }, [
return $html("div", { class: ui('relative w-fit', className) }, [
$html(
"button",
{
@@ -78,4 +89,4 @@ export const Colorpicker = (props) => {
}),
),
]);
};
};