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,19 +1,28 @@
// components/Select.js
import { $html, $for } from "sigpro";
import { val, joinClass } from "../core/utils.js";
import { val, ui } from "../core/utils.js";
/** SELECT */
/**
* Select component
*
* daisyUI classes used:
* - select, select-bordered, select-primary, select-secondary
* - select-accent, select-info, select-success, select-warning, select-error
* - select-xs, select-sm, select-md, select-lg
* - fieldset-label, flex, flex-col, gap-1, w-full
*/
export const Select = (props) => {
const { label, options, value, ...rest } = props;
const { class: className, label, items, value, ...rest } = props;
const selectEl = $html(
"select",
{
...rest,
class: joinClass("select select-bordered w-full", props.class),
class: ui('select select-bordered w-full', className),
value: value
},
$for(
() => val(options) || [],
() => val(items) || [],
(opt) =>
$html(
"option",
@@ -33,4 +42,4 @@ export const Select = (props) => {
$html("span", {}, label),
selectEl
]);
};
};