This commit is contained in:
2026-03-31 23:41:51 +02:00
parent dcfd7b67b6
commit f3393ee0db
12 changed files with 3624 additions and 22 deletions

18
dist/sigpro-ui.cjs vendored
View File

@@ -996,17 +996,25 @@ var IndicatorModule = /*#__PURE__*/Object.freeze({
/** LIST */
const List = (props) => {
const { items, header, render, keyFn, class: className } = props;
const { items, header, render, keyFn, class: className, ...rest } = props;
const headerItem = header
? sigpro.$html("li", { class: "p-4 pb-2 text-xs opacity-60 tracking-wide" }, [val(header)])
: null;
const listItems = sigpro.$for(
items,
(item, index) => sigpro.$html("li", { class: "list-row" }, [render(item, index)]),
keyFn
);
return sigpro.$html(
"ul",
{
...rest,
class: joinClass("list bg-base-100 rounded-box shadow-md", className),
},
[
sigpro.$if(header, () => sigpro.$html("li", { class: "p-4 pb-2 text-xs opacity-60 tracking-wide" }, [val(header)])),
sigpro.$for(items, (item, index) => sigpro.$html("li", { class: "list-row" }, [render(item, index)]), keyFn),
],
header ? [headerItem, listItems] : listItems
);
};