This commit is contained in:
2026-04-06 18:07:39 +02:00
parent 294547fc56
commit 071a215393
80 changed files with 593 additions and 2085 deletions

View File

@@ -1,5 +1,5 @@
// components/Fileinput.js
import { $, Tag, If, For } from "../sigpro.js";
// import { $, Tag, If, For } from "../sigpro.js";
import { ui, getIcon } from "../core/utils.js";
/**
@@ -20,7 +20,7 @@ import { ui, getIcon } from "../core/utils.js";
* - btn, btn-ghost, btn-xs, btn-circle
*/
export const Fileinput = (props) => {
const { class: className, tooltip, max = 2, accept = "*", onSelect, ...rest } = props;
const { class: className, tooltip, max = 2, accept = "*", onselect, ...rest } = props;
const selectedFiles = $([]);
const isDragging = $(false);
@@ -38,13 +38,13 @@ export const Fileinput = (props) => {
}
selectedFiles([...selectedFiles(), ...fileList]);
onSelect?.(selectedFiles());
onselect?.(selectedFiles());
};
const removeFile = (index) => {
const updated = selectedFiles().filter((_, i) => i !== index);
selectedFiles(updated);
onSelect?.(updated);
onselect?.(updated);
};
return Tag("fieldset", { ...rest, class: ui('fieldset w-full p-0', className) }, [