|
@@ -359,53 +359,49 @@ export const FileSelectBox = React.forwardRef<FileSelectBoxDerivedElement, FileS |
|
|
&& ( |
|
|
&& ( |
|
|
<React.Fragment key={lastUpdated}> |
|
|
<React.Fragment key={lastUpdated}> |
|
|
<div className="sm:absolute top-0 left-0 w-full h-full pointer-events-none pb-12 box-border overflow-hidden pt-8"> |
|
|
<div className="sm:absolute top-0 left-0 w-full h-full pointer-events-none pb-12 box-border overflow-hidden pt-8"> |
|
|
<div |
|
|
|
|
|
className="pointer-events-auto w-full h-full px-4 pb-4 box-border" |
|
|
|
|
|
> |
|
|
|
|
|
{multiple |
|
|
|
|
|
&& ( |
|
|
|
|
|
<div className="w-full h-full overflow-auto"> |
|
|
|
|
|
<div className="w-full grid gap-2 grid-cols-3"> |
|
|
|
|
|
{Array.from(fileList ?? []).map((file) => ( |
|
|
|
|
|
<div |
|
|
|
|
|
key={file.name} |
|
|
|
|
|
data-testid="selectedFileItem" |
|
|
|
|
|
className="w-full p-2 aspect-square rounded overflow-hidden relative before:absolute before:content-[''] before:bg-current before:top-0 before:left-0 before:w-full before:h-full before:opacity-10" |
|
|
|
|
|
> |
|
|
|
|
|
<FilePreviewComponent |
|
|
|
|
|
file={file} |
|
|
|
|
|
enhanced={clientSide} |
|
|
|
|
|
disabled={disabled} |
|
|
|
|
|
mini |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
))} |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
)} |
|
|
|
|
|
{!multiple |
|
|
|
|
|
&& Array.from(fileList ?? []).map((file) => ( |
|
|
|
|
|
<div |
|
|
|
|
|
key={file.name} |
|
|
|
|
|
className="w-full h-full" |
|
|
|
|
|
> |
|
|
|
|
|
<div |
|
|
|
|
|
data-testid="selectedFileItem" |
|
|
|
|
|
className="h-full w-full p-4 box-border rounded overflow-hidden relative before:absolute before:content-[''] before:bg-current before:top-0 before:left-0 before:w-full before:h-full before:opacity-10" |
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
{multiple |
|
|
|
|
|
&& ( |
|
|
|
|
|
<div className="pointer-events-auto w-full h-full overflow-auto px-4 box-border"> |
|
|
|
|
|
<div className="w-full grid gap-2 grid-cols-3"> |
|
|
|
|
|
{Array.from(fileList ?? []).map((file) => ( |
|
|
<div |
|
|
<div |
|
|
className="w-full h-full relative" |
|
|
|
|
|
|
|
|
key={file.name} |
|
|
|
|
|
data-testid="selectedFileItem" |
|
|
|
|
|
className="w-full p-2 aspect-square rounded overflow-hidden relative before:absolute before:content-[''] before:bg-current before:top-0 before:left-0 before:w-full before:h-full before:opacity-10" |
|
|
> |
|
|
> |
|
|
<FilePreviewComponent |
|
|
<FilePreviewComponent |
|
|
file={file} |
|
|
file={file} |
|
|
enhanced={clientSide} |
|
|
enhanced={clientSide} |
|
|
disabled={disabled} |
|
|
disabled={disabled} |
|
|
|
|
|
mini |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
))} |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
)} |
|
|
|
|
|
{!multiple |
|
|
|
|
|
&& Array.from(fileList ?? []).map((file) => ( |
|
|
|
|
|
<div |
|
|
|
|
|
key={file.name} |
|
|
|
|
|
className="pointer-events-auto w-full h-full px-4 box-border" |
|
|
|
|
|
> |
|
|
|
|
|
<div |
|
|
|
|
|
data-testid="selectedFileItem" |
|
|
|
|
|
className="h-full w-full p-4 box-border rounded overflow-hidden relative before:absolute before:content-[''] before:bg-current before:top-0 before:left-0 before:w-full before:h-full before:opacity-10" |
|
|
|
|
|
> |
|
|
|
|
|
<div |
|
|
|
|
|
className="w-full h-full relative" |
|
|
|
|
|
> |
|
|
|
|
|
<FilePreviewComponent |
|
|
|
|
|
file={file} |
|
|
|
|
|
enhanced={clientSide} |
|
|
|
|
|
disabled={disabled} |
|
|
|
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
))} |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
))} |
|
|
</div> |
|
|
</div> |
|
|
<div className="absolute bottom-0 left-0 w-full text-center h-12 box-border flex"> |
|
|
<div className="absolute bottom-0 left-0 w-full text-center h-12 box-border flex"> |
|
|
<div className="w-0 flex-auto flex flex-col items-center justify-center h-full"> |
|
|
<div className="w-0 flex-auto flex flex-col items-center justify-center h-full"> |
|
|