@makolabs/ripple 0.0.1-dev.58 → 0.0.1-dev.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
class: className = '',
|
|
10
10
|
dropzoneClass = '',
|
|
11
11
|
id = 'file-upload',
|
|
12
|
-
onfiles
|
|
12
|
+
onfiles,
|
|
13
|
+
uploadContent
|
|
13
14
|
}: FileUploadProps = $props();
|
|
14
15
|
|
|
15
16
|
const disabled = $derived(maxFiles <= 0);
|
|
@@ -111,10 +112,14 @@
|
|
|
111
112
|
</div>
|
|
112
113
|
|
|
113
114
|
<!-- Upload Text -->
|
|
114
|
-
|
|
115
|
-
<
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
{#if !uploadContent}
|
|
116
|
+
<div class="text-sm">
|
|
117
|
+
<span class="text-primary-500 font-medium">Click here</span>
|
|
118
|
+
<span class="text-default-600"> to upload your file or drag and drop.</span>
|
|
119
|
+
</div>
|
|
120
|
+
{:else}
|
|
121
|
+
{@render uploadContent()}
|
|
122
|
+
{/if}
|
|
118
123
|
|
|
119
124
|
<!-- File Type Info -->
|
|
120
125
|
<div class="text-default-500 text-xs">
|
package/dist/index.d.ts
CHANGED
|
@@ -560,6 +560,10 @@ export interface FileUploadProps {
|
|
|
560
560
|
* Callback when files are selected or dropped
|
|
561
561
|
*/
|
|
562
562
|
onfiles?: (files: FileList | File[]) => void;
|
|
563
|
+
/**
|
|
564
|
+
* Content to display when no files are uploaded
|
|
565
|
+
*/
|
|
566
|
+
uploadContent?: Snippet;
|
|
563
567
|
}
|
|
564
568
|
export interface FilePreviewProps {
|
|
565
569
|
files: UploadedFile[];
|
|
@@ -421,7 +421,7 @@
|
|
|
421
421
|
<thead class={theadClasses}>
|
|
422
422
|
<tr>
|
|
423
423
|
{#if selectable}
|
|
424
|
-
<th class={thClasses}>
|
|
424
|
+
<th class={cn(thClasses, 'text-center')}>
|
|
425
425
|
<input
|
|
426
426
|
type="checkbox"
|
|
427
427
|
onchange={() => {
|
|
@@ -558,7 +558,7 @@
|
|
|
558
558
|
aria-selected={selectable && isRowSelected(row)}
|
|
559
559
|
>
|
|
560
560
|
{#if selectable}
|
|
561
|
-
<td class={tdClasses}>
|
|
561
|
+
<td class={cn(tdClasses, 'text-center')}>
|
|
562
562
|
<input
|
|
563
563
|
type="checkbox"
|
|
564
564
|
checked={isRowSelected(row)}
|