@widgetic/file-browser 0.5.38 → 0.5.40
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.
- package/dist/components/FolderTree.svelte +1 -1
- package/dist/components/FolderTree.svelte.d.ts +6 -2
- package/dist/components/core/Dropzone.svelte +147 -109
- package/dist/components/core/FileBrowser.svelte +24 -50
- package/dist/components/core/FileUploader.svelte +33 -38
- package/dist/components/core/Header.svelte +1 -1
- package/dist/components/core/SearchDropdown.svelte +1 -1
- package/dist/components/core/UploadPanel.svelte +4 -7
- package/dist/components/core/UploadRow.svelte +5 -5
- package/dist/components/items/FileItem.svelte +1 -1
- package/dist/components/modals/MoveDialog.svelte +1 -1
- package/dist/components/modals/SearchModal.svelte +2 -2
- package/dist/components/modals/SelectedFilesModal.svelte +2 -2
- package/dist/components/previews/PreviewHeaderBar.svelte +3 -3
- package/dist/components/previews/TextPreview.svelte +1 -1
- package/dist/components/previews/VideoPlayer.svelte +4 -4
- package/dist/components/ui/ControlToolbar.svelte +10 -10
- package/dist/components/ui/DropdownMenu.svelte +5 -5
- package/dist/components/ui/FileIcon.svelte +2 -2
- package/dist/stores/fileStore.d.ts +2 -2
- package/dist/stores/navigationStore.d.ts +1 -1
- package/dist/stores/persistentSelectStore.d.ts +1 -1
- package/package.json +1 -1
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
{#if isCurrentLocation}
|
|
74
74
|
<span class="shrink-0 text-caption text-muted-foreground">{$t('folder.currentLocation')}</span>
|
|
75
75
|
{:else if isSelected}
|
|
76
|
-
<IconArrowBounce class="size-4 shrink-0 stroke-
|
|
76
|
+
<IconArrowBounce class="size-4 shrink-0 stroke-2 text-foreground rtl:rotate-180" aria-hidden="true" />
|
|
77
77
|
{/if}
|
|
78
78
|
</button>
|
|
79
79
|
|
|
@@ -17,10 +17,14 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
17
17
|
z_$$bindings?: Bindings;
|
|
18
18
|
}
|
|
19
19
|
declare const FolderTree: $$__sveltets_2_IsomorphicComponent<{
|
|
20
|
-
folder:
|
|
20
|
+
folder: FileSystemItem & {
|
|
21
|
+
displayChildren?: FileSystemItem[];
|
|
22
|
+
};
|
|
21
23
|
selectedFolder: FileSystemItem | undefined;
|
|
22
24
|
immediateParentId: string | null;
|
|
23
|
-
onSelect: (folder:
|
|
25
|
+
onSelect: (folder: FileSystemItem & {
|
|
26
|
+
displayChildren?: FileSystemItem[];
|
|
27
|
+
}) => void;
|
|
24
28
|
/** Kept for callers; rows use FileIcon instead of dynamic folder artwork. */ getFolderIconForItem: (folder: FileSystemItem) => string;
|
|
25
29
|
customClasses?: string;
|
|
26
30
|
iconSize?: string;
|
|
@@ -2,126 +2,164 @@
|
|
|
2
2
|
Figma: Dropzone (component set 271:971, page File Browser)
|
|
3
3
|
-->
|
|
4
4
|
<script lang="ts">
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { Button, IconButton, Tooltip } from '@widgetic/design-system/components';
|
|
6
|
+
import { IconCloudUpload, IconHelp } from '@widgetic/design-system/icons';
|
|
7
|
+
import { useI18n } from '../../i18n/context';
|
|
8
|
+
import { splitAround } from '../../i18n/text';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
export type DropzoneState = 'idle' | 'hover' | 'drag-valid' | 'drag-invalid';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
interface Props {
|
|
13
|
+
compact?: boolean;
|
|
14
|
+
state?: DropzoneState;
|
|
15
|
+
isDraggingFolder?: boolean;
|
|
16
|
+
allowedTypesDisplayText: string;
|
|
17
|
+
/** Every kind of file is taken: the sentences do not name a kind ("Upload files") */
|
|
18
|
+
acceptsAnyKind?: boolean;
|
|
19
|
+
tooltipTypesText: string;
|
|
20
|
+
showInitialUploading?: boolean;
|
|
21
|
+
onBrowse: () => void;
|
|
22
|
+
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
let {
|
|
25
|
+
compact = false,
|
|
26
|
+
state = 'idle',
|
|
27
|
+
isDraggingFolder = false,
|
|
28
|
+
allowedTypesDisplayText,
|
|
29
|
+
acceptsAnyKind = false,
|
|
30
|
+
tooltipTypesText,
|
|
31
|
+
showInitialUploading = false,
|
|
32
|
+
onBrowse
|
|
33
|
+
}: Props = $props();
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
const { t } = useI18n();
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
const dragInvalid = $derived(state === 'drag-invalid');
|
|
38
|
+
const dragValid = $derived(state === 'drag-valid');
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
// What the zone says when the dragged file cannot be taken (a folder, or a kind the zone does not accept)
|
|
41
|
+
const invalidMessage = $derived(
|
|
42
|
+
isDraggingFolder
|
|
43
|
+
? $t('upload.foldersNotAllowed')
|
|
44
|
+
: $t('upload.invalidType', { types: allowedTypesDisplayText })
|
|
45
|
+
);
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
const zoneClasses = $derived.by(() => {
|
|
48
|
+
const base =
|
|
49
|
+
'relative flex w-full items-center justify-center rounded-xl bg-background transition-colors duration-fast motion-reduce:transition-none';
|
|
50
|
+
if (dragInvalid) return `${base} bg-background`;
|
|
51
|
+
if (dragValid) return `${base} bg-brand-subtle`;
|
|
52
|
+
return `${base} hover:bg-accent`;
|
|
53
|
+
});
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
const outlineClasses = $derived.by(() => {
|
|
56
|
+
// border-style is scoped CSS: Tailwind's border-dashed is not emitted in every host app bundle.
|
|
57
|
+
const base = 'fb-dropzone-outline pointer-events-none absolute inset-0 rounded-xl border';
|
|
58
|
+
if (dragInvalid) return `${base} border-destructive`;
|
|
59
|
+
if (dragValid) return `${base} border-2 border-brand`;
|
|
60
|
+
return `${base} border-muted-foreground/40`;
|
|
61
|
+
});
|
|
59
62
|
</script>
|
|
60
63
|
|
|
61
64
|
<div class={[zoneClasses, { 'h-14': compact, 'h-28': !compact, 'px-4': compact, 'p-4': !compact }]}>
|
|
62
|
-
|
|
65
|
+
<div class={outlineClasses} aria-hidden="true"></div>
|
|
63
66
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
67
|
+
<div
|
|
68
|
+
class="pointer-events-none relative z-[1] flex w-full flex-col items-center gap-2 text-center"
|
|
69
|
+
>
|
|
70
|
+
{#if showInitialUploading}
|
|
71
|
+
<p class="text-caption text-muted-foreground">{$t('upload.uploading')}</p>
|
|
72
|
+
{:else if dragInvalid && compact}
|
|
73
|
+
<!-- Figma Dropzone "Size=Compact, State=Invalid": the icon and the message, both in the destructive colour -->
|
|
74
|
+
<div class="inline-flex max-w-full items-center gap-2 px-4 text-body text-destructive">
|
|
75
|
+
<IconCloudUpload class="size-4 shrink-0 stroke-2" aria-hidden="true" />
|
|
76
|
+
<span>{invalidMessage}</span>
|
|
77
|
+
</div>
|
|
78
|
+
{:else if dragValid}
|
|
79
|
+
<div class="flex items-center gap-2 text-body-medium text-foreground">
|
|
80
|
+
<IconCloudUpload class="size-4 shrink-0 stroke-2" aria-hidden="true" />
|
|
81
|
+
<span
|
|
82
|
+
>{acceptsAnyKind
|
|
83
|
+
? $t('upload.dropActiveAny')
|
|
84
|
+
: $t('upload.dropActive', { types: allowedTypesDisplayText })}</span
|
|
85
|
+
>
|
|
86
|
+
</div>
|
|
87
|
+
{:else if compact}
|
|
88
|
+
{@const compactSentence = splitAround(
|
|
89
|
+
acceptsAnyKind
|
|
90
|
+
? $t('upload.chooseOrDropAny')
|
|
91
|
+
: $t('upload.chooseOrDrop', { types: allowedTypesDisplayText }),
|
|
92
|
+
$t('upload.chooseOrDropLink')
|
|
93
|
+
)}
|
|
94
|
+
<button
|
|
95
|
+
type="button"
|
|
96
|
+
class="pointer-events-auto inline-flex max-w-full items-center gap-2 text-body text-muted-foreground transition-colors duration-fast hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
|
97
|
+
onclick={onBrowse}
|
|
98
|
+
>
|
|
99
|
+
<IconCloudUpload class="size-4 shrink-0 stroke-2" aria-hidden="true" />
|
|
100
|
+
<span>
|
|
101
|
+
{compactSentence.before}{#if compactSentence.link}<span class="text-foreground underline"
|
|
102
|
+
>{compactSentence.link}</span
|
|
103
|
+
>{/if}{compactSentence.after}
|
|
104
|
+
</span>
|
|
105
|
+
</button>
|
|
106
|
+
{:else}
|
|
107
|
+
<Button
|
|
108
|
+
variant="outline"
|
|
109
|
+
size="sm"
|
|
110
|
+
class="press-feedback pointer-events-auto"
|
|
111
|
+
onclick={onBrowse}
|
|
112
|
+
>
|
|
113
|
+
<IconCloudUpload class="size-4 stroke-2" aria-hidden="true" />
|
|
114
|
+
{acceptsAnyKind
|
|
115
|
+
? $t('upload.buttonAny')
|
|
116
|
+
: $t('upload.button', { types: allowedTypesDisplayText })}
|
|
117
|
+
</Button>
|
|
118
|
+
<!-- Figma Dropzone "Size=Page, State=Invalid": the button stays and the hint becomes the message in the destructive colour -->
|
|
119
|
+
<p class="text-caption {dragInvalid ? 'text-destructive' : 'text-muted-foreground'}">
|
|
120
|
+
{#if dragInvalid}
|
|
121
|
+
{invalidMessage}
|
|
122
|
+
{:else}
|
|
123
|
+
{acceptsAnyKind
|
|
124
|
+
? $t('upload.dragHintAny')
|
|
125
|
+
: $t('upload.dragHint', { types: allowedTypesDisplayText })}
|
|
126
|
+
{/if}
|
|
127
|
+
</p>
|
|
128
|
+
{/if}
|
|
129
|
+
</div>
|
|
108
130
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
131
|
+
<div class="absolute end-4 top-1/2 z-[2] -translate-y-1/2">
|
|
132
|
+
<Tooltip.Provider delayDuration={200}>
|
|
133
|
+
<Tooltip.Root>
|
|
134
|
+
<Tooltip.Trigger class="inline-flex">
|
|
135
|
+
{#snippet child({ props }: { props: Record<string, unknown> })}
|
|
136
|
+
<IconButton
|
|
137
|
+
{...props}
|
|
138
|
+
variant="ghost"
|
|
139
|
+
size="default"
|
|
140
|
+
class="size-8 text-muted-foreground hover:text-foreground"
|
|
141
|
+
label={tooltipTypesText}
|
|
142
|
+
>
|
|
143
|
+
<IconHelp class="size-4 stroke-2" aria-hidden="true" />
|
|
144
|
+
</IconButton>
|
|
145
|
+
{/snippet}
|
|
146
|
+
</Tooltip.Trigger>
|
|
147
|
+
<Tooltip.Portal>
|
|
148
|
+
<Tooltip.Content
|
|
149
|
+
side="top"
|
|
150
|
+
sideOffset={8}
|
|
151
|
+
class="max-w-[250px] whitespace-pre-line break-words"
|
|
152
|
+
>
|
|
153
|
+
<p class="text-caption">{tooltipTypesText}</p>
|
|
154
|
+
</Tooltip.Content>
|
|
155
|
+
</Tooltip.Portal>
|
|
156
|
+
</Tooltip.Root>
|
|
157
|
+
</Tooltip.Provider>
|
|
158
|
+
</div>
|
|
127
159
|
</div>
|
|
160
|
+
|
|
161
|
+
<style>
|
|
162
|
+
.fb-dropzone-outline {
|
|
163
|
+
border-style: dashed;
|
|
164
|
+
}
|
|
165
|
+
</style>
|
|
@@ -36,8 +36,7 @@
|
|
|
36
36
|
IconInfoCircle,
|
|
37
37
|
IconArrowUp,
|
|
38
38
|
IconArrowDown,
|
|
39
|
-
IconChevronDown
|
|
40
|
-
IconChevronUp
|
|
39
|
+
IconChevronDown
|
|
41
40
|
} from '@widgetic/design-system/icons';
|
|
42
41
|
|
|
43
42
|
// LOCAL COMPONENT IMPORTS
|
|
@@ -1229,8 +1228,9 @@
|
|
|
1229
1228
|
function handleFolderClick(folder: FolderItemWithCount) {
|
|
1230
1229
|
}
|
|
1231
1230
|
|
|
1232
|
-
|
|
1233
|
-
$:
|
|
1231
|
+
// `$validSelections` is a store that changes whenever a selection does, so both lists follow every click, in every folder.
|
|
1232
|
+
$: allSelectedFiles = $fileStore?.root && filter ? $validSelections(filter, getAllFiles($fileStore.root)) : [];
|
|
1233
|
+
$: currentSelections = $fileStore?.root && filter ? $validSelections(filter, sortedFilteredFiles) : [];
|
|
1234
1234
|
|
|
1235
1235
|
function toggleFileSelection(file: FileSystemItem) {
|
|
1236
1236
|
if (!allowSelecting) return;
|
|
@@ -2581,12 +2581,6 @@
|
|
|
2581
2581
|
{ value: 'size', labelKey: 'sort.size' }
|
|
2582
2582
|
] as const;
|
|
2583
2583
|
|
|
2584
|
-
$: widestFilterLabel = filterOptions.reduce((widest, option) => option.label.length > widest.length ? option.label : widest, '');
|
|
2585
|
-
$: widestSortLabel = sortOptions.reduce((widest, option) => {
|
|
2586
|
-
const label = $t(option.labelKey);
|
|
2587
|
-
return label.length > widest.length ? label : widest;
|
|
2588
|
-
}, '');
|
|
2589
|
-
|
|
2590
2584
|
// Replace the existing reactive statement for filter
|
|
2591
2585
|
$: {
|
|
2592
2586
|
if (persistHistory && filter) {
|
|
@@ -2686,21 +2680,6 @@
|
|
|
2686
2680
|
// Track if VirtualList is initialized
|
|
2687
2681
|
let isVirtualListInitialized = false;
|
|
2688
2682
|
|
|
2689
|
-
// Add a reactive statement to properly update visible selections when filter changes
|
|
2690
|
-
$: {
|
|
2691
|
-
if (filter) {
|
|
2692
|
-
// Force a recomputation of the current and all selected files when filter changes
|
|
2693
|
-
currentSelections = $fileStore?.root ? $validSelections(filter, sortedFilteredFiles) : [];
|
|
2694
|
-
allSelectedFiles = $fileStore?.root ? $validSelections(filter, getAllFiles($fileStore.root)) : [];
|
|
2695
|
-
// if(showLogs && showFiltersLogs) console.log(`Filter changed to ${filter}. Current visible selections:`, currentSelections.length);
|
|
2696
|
-
// if(showLogs && showFiltersLogs) console.log(`Total selected files of type ${filter} across all folders:`, allSelectedFiles.length);
|
|
2697
|
-
if (allSelectedFiles.length > 0) {
|
|
2698
|
-
// Since we don't have direct folder info on the FileSystemItem type, just log the selected files' IDs
|
|
2699
|
-
// if(showLogs && showFiltersLogs) console.log(`Selected files IDs:`, allSelectedFiles.map(f => f.id));
|
|
2700
|
-
}
|
|
2701
|
-
}
|
|
2702
|
-
}
|
|
2703
|
-
|
|
2704
2683
|
// Add a reactive statement to update sourceItems when showMoveDialog changes
|
|
2705
2684
|
$: if (showMoveDialog && !selectedItem) {
|
|
2706
2685
|
const validFileSelections = allSelectedFiles.filter((item) => item?.type === 'file');
|
|
@@ -2826,10 +2805,11 @@ mainGridClass="app-main-grid"
|
|
|
2826
2805
|
title={libraryMode ? (resolvedMediaLibrary?.hasOwnLabel ? resolvedMediaLibrary.label : $t('library.defaultLabel')) : ''}
|
|
2827
2806
|
/>
|
|
2828
2807
|
|
|
2829
|
-
<!-- FILE BROWSER CONTROLS
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2808
|
+
<!-- FILE BROWSER CONTROLS: Figma — full-width search, then compact filter/sort row -->
|
|
2809
|
+
<div
|
|
2810
|
+
class="file-browser-controls flex min-w-0 shrink-0 flex-col gap-2 pb-4 {controlsTopPaddingClass} {edgePaddingClass}"
|
|
2811
|
+
>
|
|
2812
|
+
<div class="search-bar-container relative z-[61] w-full min-w-0">
|
|
2833
2813
|
<SearchDropdown
|
|
2834
2814
|
root={$fileStore.root}
|
|
2835
2815
|
currentFilter={filter}
|
|
@@ -2840,7 +2820,7 @@ mainGridClass="app-main-grid"
|
|
|
2840
2820
|
</div>
|
|
2841
2821
|
|
|
2842
2822
|
{#if showFilters || showSorting}
|
|
2843
|
-
<div class="controls-container flex
|
|
2823
|
+
<div class="controls-container flex min-w-0 max-w-full items-center gap-2 overflow-x-auto">
|
|
2844
2824
|
|
|
2845
2825
|
{#if showFilters}
|
|
2846
2826
|
<div class="filter-controls-container relative z-10 flex items-center">
|
|
@@ -2850,12 +2830,10 @@ mainGridClass="app-main-grid"
|
|
|
2850
2830
|
class="filter-button group flex h-9 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-lg border border-input bg-background px-3 text-start transition-colors duration-fast hover:bg-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
|
2851
2831
|
>
|
|
2852
2832
|
<span class="text-body text-muted-foreground whitespace-nowrap">{$t('filter.by', { type: '\u0001' }).split('\u0001')[0].trim()}</span>
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
<IconChevronDown class="size-4 shrink-0 stroke-[1.333] opacity-50 group-data-[state=open]:hidden" aria-hidden="true" />
|
|
2858
|
-
<IconChevronUp class="hidden size-4 shrink-0 stroke-[1.333] opacity-50 group-data-[state=open]:block" aria-hidden="true" />
|
|
2833
|
+
<!-- The chip is as wide as what it says (Figma: it hugs its text); it used to reserve the widest label and looked stretched. -->
|
|
2834
|
+
<span class="whitespace-nowrap text-body-medium text-foreground">{$t(`filterOption.${filter}`)}</span>
|
|
2835
|
+
<!-- One arrow that turns up while the menu is open, with the motion of the accordion's arrow (it used to swap two icons and jumped). -->
|
|
2836
|
+
<IconChevronDown class="size-4 shrink-0 stroke-2 opacity-50 transition-transform duration-base group-data-[state=open]:rotate-180" aria-hidden="true" />
|
|
2859
2837
|
</DropdownMenu.Trigger>
|
|
2860
2838
|
<DropdownMenu.Content side="bottom" align="start" class="filter-dropdown w-[12.5rem] min-w-0">
|
|
2861
2839
|
{#each filterOptions as option}
|
|
@@ -2867,10 +2845,10 @@ mainGridClass="app-main-grid"
|
|
|
2867
2845
|
<!-- The check slot: only the chosen option shows the check -->
|
|
2868
2846
|
<span class="absolute start-2 flex size-4 items-center justify-center">
|
|
2869
2847
|
{#if filter === option.value}
|
|
2870
|
-
<IconCheck class="size-4 stroke-
|
|
2848
|
+
<IconCheck class="size-4 stroke-2 text-foreground" aria-hidden="true" />
|
|
2871
2849
|
{/if}
|
|
2872
2850
|
</span>
|
|
2873
|
-
<OptionIcon class="size-4 shrink-0 stroke-
|
|
2851
|
+
<OptionIcon class="size-4 shrink-0 stroke-2" aria-hidden="true" />
|
|
2874
2852
|
<span class="text-body min-w-0 flex-1 truncate">{option.label}</span>
|
|
2875
2853
|
</DropdownMenu.Item>
|
|
2876
2854
|
{/each}
|
|
@@ -2888,12 +2866,8 @@ mainGridClass="app-main-grid"
|
|
|
2888
2866
|
class="sort-button group flex h-9 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-lg border border-input bg-background px-3 text-start transition-colors duration-fast hover:bg-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
|
2889
2867
|
>
|
|
2890
2868
|
<span class="text-body text-muted-foreground whitespace-nowrap">{$t('sort.by')}</span>
|
|
2891
|
-
<span class="
|
|
2892
|
-
|
|
2893
|
-
<span class="col-start-1 row-start-1 whitespace-nowrap text-body-medium text-foreground">{$t(`sort.${$sortCriteria}`)}</span>
|
|
2894
|
-
</span>
|
|
2895
|
-
<IconChevronDown class="size-4 shrink-0 stroke-[1.333] opacity-50 group-data-[state=open]:hidden" aria-hidden="true" />
|
|
2896
|
-
<IconChevronUp class="hidden size-4 shrink-0 stroke-[1.333] opacity-50 group-data-[state=open]:block" aria-hidden="true" />
|
|
2869
|
+
<span class="whitespace-nowrap text-body-medium text-foreground">{$t(`sort.${$sortCriteria}`)}</span>
|
|
2870
|
+
<IconChevronDown class="size-4 shrink-0 stroke-2 opacity-50 transition-transform duration-base group-data-[state=open]:rotate-180" aria-hidden="true" />
|
|
2897
2871
|
</DropdownMenu.Trigger>
|
|
2898
2872
|
<DropdownMenu.Content side="bottom" align="start" class="sort-dropdown w-40 min-w-0">
|
|
2899
2873
|
{#each sortOptions as option}
|
|
@@ -2904,7 +2878,7 @@ mainGridClass="app-main-grid"
|
|
|
2904
2878
|
<!-- The check slot: only the chosen option shows the check -->
|
|
2905
2879
|
<span class="absolute start-2 flex size-4 items-center justify-center">
|
|
2906
2880
|
{#if $sortCriteria === option.value}
|
|
2907
|
-
<IconCheck class="size-4 stroke-
|
|
2881
|
+
<IconCheck class="size-4 stroke-2 text-foreground" aria-hidden="true" />
|
|
2908
2882
|
{/if}
|
|
2909
2883
|
</span>
|
|
2910
2884
|
<span class="text-body">{$t(option.labelKey)}</span>
|
|
@@ -2932,9 +2906,9 @@ mainGridClass="app-main-grid"
|
|
|
2932
2906
|
}}
|
|
2933
2907
|
>
|
|
2934
2908
|
{#if $sortDirection === 'asc'}
|
|
2935
|
-
<IconArrowUp class="size-4 stroke-
|
|
2909
|
+
<IconArrowUp class="size-4 stroke-2" aria-hidden="true" />
|
|
2936
2910
|
{:else}
|
|
2937
|
-
<IconArrowDown class="size-4 stroke-
|
|
2911
|
+
<IconArrowDown class="size-4 stroke-2" aria-hidden="true" />
|
|
2938
2912
|
{/if}
|
|
2939
2913
|
</IconButton>
|
|
2940
2914
|
{/snippet}
|
|
@@ -3004,9 +2978,9 @@ mainGridClass="app-main-grid"
|
|
|
3004
2978
|
<!-- Files container -->
|
|
3005
2979
|
{:else}
|
|
3006
2980
|
<!-- Main content container with Files Inside --> <!-- {!showAddToEditor ? 'overflow-y-auto px-6' : ''} -->
|
|
3007
|
-
<WScrollArea class="scroll-area-container min-h-0 flex-1" bind:element={scrollContainer} type="always">
|
|
2981
|
+
<WScrollArea class="scroll-area-container min-h-0 min-w-0 flex-1" bind:element={scrollContainer} type="always">
|
|
3008
2982
|
<!-- The padding is the same on both sides (Figma 24): the scrollbar sits in the end gutter, not on the tiles. -->
|
|
3009
|
-
<div class="main-content-container flex flex-col pb-6 {contentPaddingClass}" style={emptyViewMinHeightStyle} bind:this={contentContainer}>
|
|
2983
|
+
<div class="main-content-container flex min-w-0 flex-col pb-6 {contentPaddingClass}" style={emptyViewMinHeightStyle} bind:this={contentContainer}>
|
|
3010
2984
|
|
|
3011
2985
|
<!-- Drag Select for selecting files -->
|
|
3012
2986
|
{#if allowSelecting}
|
|
@@ -3136,7 +3110,7 @@ mainGridClass="app-main-grid"
|
|
|
3136
3110
|
|
|
3137
3111
|
<!-- FILE BROWSER FOOTER (Figma: a divider, then the selection bar over the dropzone, 12px apart) -->
|
|
3138
3112
|
<div
|
|
3139
|
-
class="file-browser-footer relative z-20 flex shrink-0 flex-col {footerClass} {edgePaddingClass}"
|
|
3113
|
+
class="file-browser-footer relative z-20 flex shrink-0 flex-col overflow-visible {footerClass} {edgePaddingClass}"
|
|
3140
3114
|
bind:this={footerElement}
|
|
3141
3115
|
>
|
|
3142
3116
|
{#if allowSelecting && allSelectedFiles.length > 0}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
const dispatch = createEventDispatcher();
|
|
7
7
|
|
|
8
8
|
// Design system imports
|
|
9
|
-
import { Portal } from '@widgetic/design-system/components';
|
|
10
9
|
import Dropzone from './Dropzone.svelte';
|
|
11
10
|
import UploadPanel, { type UploadPanelItem } from './UploadPanel.svelte';
|
|
12
11
|
import type { UploadRowScope, UploadRowState } from './UploadRow.svelte';
|
|
@@ -1118,9 +1117,41 @@
|
|
|
1118
1117
|
</script>
|
|
1119
1118
|
|
|
1120
1119
|
<div
|
|
1121
|
-
class="file-uploader relative w-full shrink-0"
|
|
1120
|
+
class="file-uploader relative flex w-full shrink-0 flex-col gap-2"
|
|
1122
1121
|
bind:this={uploaderRootEl}
|
|
1123
1122
|
>
|
|
1123
|
+
{#if isUploadsModalOpen && uploadItems.length > 0}
|
|
1124
|
+
<!-- Figma: upload status cards sit above the drop strip, inside the modal footer. -->
|
|
1125
|
+
<div class="uploads-panel-anchor flex w-full min-w-0 justify-stretch">
|
|
1126
|
+
<UploadPanel
|
|
1127
|
+
items={panelItems}
|
|
1128
|
+
summaryScope={panelSummaryScope as UploadRowScope}
|
|
1129
|
+
summaryState={panelSummaryState as UploadRowState}
|
|
1130
|
+
summaryName={panelSummaryName}
|
|
1131
|
+
summaryStatus={panelSummaryStatus}
|
|
1132
|
+
progressValue={overallProgress}
|
|
1133
|
+
progressIndeterminate={panelProgressIndeterminate}
|
|
1134
|
+
progressTone={panelProgressTone}
|
|
1135
|
+
progressDone={panelProgressDone}
|
|
1136
|
+
footerText={panelFooterText}
|
|
1137
|
+
footerDestructive={panelFooterDestructive}
|
|
1138
|
+
footerAction={panelFooterAction}
|
|
1139
|
+
expanded={!isUploadsDrawerCollapsed}
|
|
1140
|
+
onToggleExpand={toggleDrawerCollapse}
|
|
1141
|
+
onSummaryCancel={() => {
|
|
1142
|
+
if (isBatchUpload) cancelActiveUploads();
|
|
1143
|
+
else if (uploadItems[0]) handleCancelUpload(uploadItems[0].id);
|
|
1144
|
+
}}
|
|
1145
|
+
onSummaryRetry={retryAllFailedUploads}
|
|
1146
|
+
onItemCancel={handleCancelUpload}
|
|
1147
|
+
onItemRetry={handleRetryUpload}
|
|
1148
|
+
onFooterAction={retryAllFailedUploads}
|
|
1149
|
+
showClearCompleted={completedUploadCount > 0}
|
|
1150
|
+
onClearCompleted={clearCompletedUploads}
|
|
1151
|
+
/>
|
|
1152
|
+
</div>
|
|
1153
|
+
{/if}
|
|
1154
|
+
|
|
1124
1155
|
<div class="upload-area-ct relative w-full">
|
|
1125
1156
|
<input
|
|
1126
1157
|
type="file"
|
|
@@ -1142,40 +1173,4 @@
|
|
|
1142
1173
|
onBrowse={() => fileInput.click()}
|
|
1143
1174
|
/>
|
|
1144
1175
|
</div>
|
|
1145
|
-
|
|
1146
|
-
{#if isUploadsModalOpen && portalTarget && uploadItems.length > 0}
|
|
1147
|
-
<Portal target={portalTarget}>
|
|
1148
|
-
<div class="pointer-events-none absolute inset-0 z-[9990]">
|
|
1149
|
-
<!-- Floats over the page just above the footer (the portal target), inset like the page -->
|
|
1150
|
-
<div class="uploads-panel-anchor pointer-events-auto absolute bottom-full mb-4 {isCompactUploader ? 'end-4' : 'end-8'}">
|
|
1151
|
-
<UploadPanel
|
|
1152
|
-
items={panelItems}
|
|
1153
|
-
summaryScope={panelSummaryScope as UploadRowScope}
|
|
1154
|
-
summaryState={panelSummaryState as UploadRowState}
|
|
1155
|
-
summaryName={panelSummaryName}
|
|
1156
|
-
summaryStatus={panelSummaryStatus}
|
|
1157
|
-
progressValue={overallProgress}
|
|
1158
|
-
progressIndeterminate={panelProgressIndeterminate}
|
|
1159
|
-
progressTone={panelProgressTone}
|
|
1160
|
-
progressDone={panelProgressDone}
|
|
1161
|
-
footerText={panelFooterText}
|
|
1162
|
-
footerDestructive={panelFooterDestructive}
|
|
1163
|
-
footerAction={panelFooterAction}
|
|
1164
|
-
expanded={!isUploadsDrawerCollapsed}
|
|
1165
|
-
onToggleExpand={toggleDrawerCollapse}
|
|
1166
|
-
onSummaryCancel={() => {
|
|
1167
|
-
if (isBatchUpload) cancelActiveUploads();
|
|
1168
|
-
else if (uploadItems[0]) handleCancelUpload(uploadItems[0].id);
|
|
1169
|
-
}}
|
|
1170
|
-
onSummaryRetry={retryAllFailedUploads}
|
|
1171
|
-
onItemCancel={handleCancelUpload}
|
|
1172
|
-
onItemRetry={handleRetryUpload}
|
|
1173
|
-
onFooterAction={retryAllFailedUploads}
|
|
1174
|
-
showClearCompleted={completedUploadCount > 0}
|
|
1175
|
-
onClearCompleted={clearCompletedUploads}
|
|
1176
|
-
/>
|
|
1177
|
-
</div>
|
|
1178
|
-
</div>
|
|
1179
|
-
</Portal>
|
|
1180
|
-
{/if}
|
|
1181
1176
|
</div>
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
handleToggleSelectedFiles();
|
|
119
119
|
}}
|
|
120
120
|
>
|
|
121
|
-
<IconFiles class="size-4 stroke-
|
|
121
|
+
<IconFiles class="size-4 stroke-2" aria-hidden="true" />
|
|
122
122
|
<Badge
|
|
123
123
|
variant="default"
|
|
124
124
|
class="bg-primary text-primary-foreground absolute -top-1 -end-1 flex h-4 min-w-4 items-center justify-center px-1 text-caption-medium leading-none"
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
{#if index === activeIndex}
|
|
296
296
|
<span class="hidden shrink-0 items-center gap-1 text-caption text-muted-foreground sm:flex">
|
|
297
297
|
{$t('searchModal.jumpToFolder')}
|
|
298
|
-
<IconCornerUpRight class="size-4 stroke-
|
|
298
|
+
<IconCornerUpRight class="size-4 stroke-2 rtl:rotate-180" aria-hidden="true" />
|
|
299
299
|
</span>
|
|
300
300
|
{/if}
|
|
301
301
|
</button>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<script lang="ts">
|
|
5
5
|
import UploadRow, { type UploadRowScope, type UploadRowState } from './UploadRow.svelte';
|
|
6
6
|
import { IconButton, Progress, Tooltip } from '@widgetic/design-system/components';
|
|
7
|
-
import { IconChevronDown
|
|
7
|
+
import { IconChevronDown } from '@widgetic/design-system/icons';
|
|
8
8
|
import { useI18n } from '../../i18n/context';
|
|
9
9
|
|
|
10
10
|
export type UploadPanelItem = {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
</script>
|
|
72
72
|
|
|
73
73
|
<div
|
|
74
|
-
class="upload-panel flex w-
|
|
74
|
+
class="upload-panel flex w-full min-w-0 max-w-[376px] flex-col gap-2 rounded-xl border border-border bg-background p-3 shadow-floating"
|
|
75
75
|
role="region"
|
|
76
76
|
aria-label={$t('upload.panelTitle')}
|
|
77
77
|
>
|
|
@@ -104,11 +104,8 @@
|
|
|
104
104
|
label={expanded ? $t('upload.collapsePanel') : $t('upload.expandPanel')}
|
|
105
105
|
onclick={onToggleExpand}
|
|
106
106
|
>
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
{:else}
|
|
110
|
-
<IconChevronUp class="size-4 stroke-[1.333]" aria-hidden="true" />
|
|
111
|
-
{/if}
|
|
107
|
+
<!-- Down while the panel is open (it collapses), up while it is collapsed (it expands): one arrow that turns, with the motion of the accordion's arrow -->
|
|
108
|
+
<IconChevronDown class="size-4 stroke-2 transition-transform duration-base {expanded ? '' : 'rotate-180'}" aria-hidden="true" />
|
|
112
109
|
</IconButton>
|
|
113
110
|
{/snippet}
|
|
114
111
|
</Tooltip.Trigger>
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
<div class="flex h-9 w-full min-w-0 items-center gap-3">
|
|
58
58
|
{#if scope === 'batch'}
|
|
59
59
|
<div class="flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted">
|
|
60
|
-
<IconFiles class="size-4 stroke-
|
|
60
|
+
<IconFiles class="size-4 stroke-2 text-muted-foreground" aria-hidden="true" />
|
|
61
61
|
</div>
|
|
62
62
|
{:else if file}
|
|
63
63
|
<FileIcon {file} size="sm" class="shrink-0" />
|
|
@@ -75,21 +75,21 @@
|
|
|
75
75
|
<div class="flex shrink-0 items-center gap-1">
|
|
76
76
|
{#if state === 'uploading'}
|
|
77
77
|
<IconButton variant="ghost" size="default" label={$t('upload.cancel')} onclick={() => onCancel?.()}>
|
|
78
|
-
<IconX class="size-4 stroke-
|
|
78
|
+
<IconX class="size-4 stroke-2" aria-hidden="true" />
|
|
79
79
|
</IconButton>
|
|
80
80
|
{:else if state === 'failed'}
|
|
81
81
|
<IconButton variant="ghost" size="default" label={$t('upload.retry')} onclick={() => onRetry?.()}>
|
|
82
|
-
<IconRefresh class="size-4 stroke-
|
|
82
|
+
<IconRefresh class="size-4 stroke-2" aria-hidden="true" />
|
|
83
83
|
</IconButton>
|
|
84
84
|
<IconButton variant="ghost" size="default" label={$t('upload.removeFile')} onclick={() => onCancel?.()}>
|
|
85
|
-
<IconX class="size-4 stroke-
|
|
85
|
+
<IconX class="size-4 stroke-2" aria-hidden="true" />
|
|
86
86
|
</IconButton>
|
|
87
87
|
{:else if done}
|
|
88
88
|
<span
|
|
89
89
|
class="inline-flex size-8 items-center justify-center rounded-lg bg-brand-subtle text-brand"
|
|
90
90
|
aria-label={$t('upload.completedAlt')}
|
|
91
91
|
>
|
|
92
|
-
<IconCheck class="size-4 stroke-
|
|
92
|
+
<IconCheck class="size-4 stroke-2" aria-hidden="true" />
|
|
93
93
|
</span>
|
|
94
94
|
{/if}
|
|
95
95
|
</div>
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
{#if rootIsCurrent}
|
|
364
364
|
<span class="shrink-0 text-caption text-muted-foreground">{$t('folder.currentLocation')}</span>
|
|
365
365
|
{:else if rootIsSelected}
|
|
366
|
-
<IconArrowBounce class="size-4 shrink-0 stroke-
|
|
366
|
+
<IconArrowBounce class="size-4 shrink-0 stroke-2 text-foreground rtl:rotate-180" aria-hidden="true" />
|
|
367
367
|
{/if}
|
|
368
368
|
</button>
|
|
369
369
|
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
/>
|
|
235
235
|
{#if $searchTermStore}
|
|
236
236
|
<IconButton variant="ghost" label={$t('searchModal.clearQuery')} class="size-8 shrink-0" onclick={clearQuery}>
|
|
237
|
-
<IconX class="size-4 stroke-
|
|
237
|
+
<IconX class="size-4 stroke-2" />
|
|
238
238
|
</IconButton>
|
|
239
239
|
{/if}
|
|
240
240
|
</div>
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
{#if index === activeIndex}
|
|
276
276
|
<span class="hidden shrink-0 items-center gap-1 text-caption text-muted-foreground sm:flex">
|
|
277
277
|
{$t('searchModal.jumpToFolder')}
|
|
278
|
-
<IconCornerUpRight class="size-4 stroke-
|
|
278
|
+
<IconCornerUpRight class="size-4 stroke-2 rtl:rotate-180" aria-hidden="true" />
|
|
279
279
|
</span>
|
|
280
280
|
{/if}
|
|
281
281
|
</div>
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
class="size-8"
|
|
183
183
|
onclick={() => jumpToFolder(file)}
|
|
184
184
|
>
|
|
185
|
-
<IconCornerUpRight class="size-4 stroke-
|
|
185
|
+
<IconCornerUpRight class="size-4 stroke-2 rtl:rotate-180" />
|
|
186
186
|
</IconButton>
|
|
187
187
|
<IconButton
|
|
188
188
|
variant="ghost"
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
class="size-8"
|
|
191
191
|
onclick={() => removeFile(file.id)}
|
|
192
192
|
>
|
|
193
|
-
<IconCircleMinus class="size-4 stroke-
|
|
193
|
+
<IconCircleMinus class="size-4 stroke-2" />
|
|
194
194
|
</IconButton>
|
|
195
195
|
</div>
|
|
196
196
|
</li>
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
disabled={!canGoPrevious}
|
|
44
44
|
onclick={() => dispatch('previous')}
|
|
45
45
|
>
|
|
46
|
-
<IconChevronLeft class="size-4 stroke-
|
|
46
|
+
<IconChevronLeft class="size-4 stroke-2 rtl:rotate-180" />
|
|
47
47
|
</IconButton>
|
|
48
48
|
<IconButton
|
|
49
49
|
variant="ghost"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
disabled={!canGoNext}
|
|
52
52
|
onclick={() => dispatch('next')}
|
|
53
53
|
>
|
|
54
|
-
<IconChevronRight class="size-4 stroke-
|
|
54
|
+
<IconChevronRight class="size-4 stroke-2 rtl:rotate-180" />
|
|
55
55
|
</IconButton>
|
|
56
56
|
<Button
|
|
57
57
|
variant="outline"
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
{/if}
|
|
66
66
|
|
|
67
67
|
<IconButton variant="ghost" label={closeLabel} onclick={() => dispatch('close')}>
|
|
68
|
-
<IconX class="size-4 stroke-
|
|
68
|
+
<IconX class="size-4 stroke-2" />
|
|
69
69
|
</IconButton>
|
|
70
70
|
</div>
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
<div class="text-preview-container w-full" style="max-height: {scrolledAreaMaxHeight}px">
|
|
66
66
|
{#if isLoading}
|
|
67
67
|
<div class="flex min-h-[16rem] items-center justify-center gap-3 text-caption text-muted-foreground">
|
|
68
|
-
<IconLoader2 class="size-5 animate-spin stroke-[1.
|
|
68
|
+
<IconLoader2 class="size-5 animate-spin stroke-[1.6] motion-reduce:animate-none" />
|
|
69
69
|
{$t('preview.loading')}
|
|
70
70
|
</div>
|
|
71
71
|
{:else if loadFailed}
|
|
@@ -196,9 +196,9 @@
|
|
|
196
196
|
onclick={togglePlay}
|
|
197
197
|
>
|
|
198
198
|
{#if isPlaying}
|
|
199
|
-
<IconPlayerPause class="size-4 stroke-
|
|
199
|
+
<IconPlayerPause class="size-4 stroke-2" />
|
|
200
200
|
{:else}
|
|
201
|
-
<IconPlayerPlay class="size-4 stroke-
|
|
201
|
+
<IconPlayerPlay class="size-4 stroke-2" />
|
|
202
202
|
{/if}
|
|
203
203
|
</IconButton>
|
|
204
204
|
|
|
@@ -237,9 +237,9 @@
|
|
|
237
237
|
onclick={toggleMute}
|
|
238
238
|
>
|
|
239
239
|
{#if isMuted}
|
|
240
|
-
<IconVolumeOff class="size-4 stroke-
|
|
240
|
+
<IconVolumeOff class="size-4 stroke-2" />
|
|
241
241
|
{:else}
|
|
242
|
-
<IconVolume class="size-4 stroke-
|
|
242
|
+
<IconVolume class="size-4 stroke-2" />
|
|
243
243
|
{/if}
|
|
244
244
|
</IconButton>
|
|
245
245
|
</div>
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
label={$t('action.clearItems')}
|
|
94
94
|
onclick={handleClearItems}
|
|
95
95
|
>
|
|
96
|
-
<IconX class="size-4 stroke-
|
|
96
|
+
<IconX class="size-4 stroke-2" aria-hidden="true" />
|
|
97
97
|
</IconButton>
|
|
98
98
|
</div>
|
|
99
99
|
|
|
@@ -103,11 +103,11 @@
|
|
|
103
103
|
{#if capabilities.rename}
|
|
104
104
|
{#if compact}
|
|
105
105
|
<IconButton variant="ghost" size="default" label={$t('action.rename')} onclick={handleRename}>
|
|
106
|
-
<IconPencil class="size-4 stroke-
|
|
106
|
+
<IconPencil class="size-4 stroke-2" aria-hidden="true" />
|
|
107
107
|
</IconButton>
|
|
108
108
|
{:else}
|
|
109
109
|
<Button variant="ghost" size="sm" onclick={handleRename} aria-label={$t('action.rename')}>
|
|
110
|
-
<IconPencil class="size-4 shrink-0 stroke-
|
|
110
|
+
<IconPencil class="size-4 shrink-0 stroke-2" aria-hidden="true" />
|
|
111
111
|
{$t('action.rename')}
|
|
112
112
|
</Button>
|
|
113
113
|
{/if}
|
|
@@ -115,11 +115,11 @@
|
|
|
115
115
|
{#if capabilities.download}
|
|
116
116
|
{#if compact}
|
|
117
117
|
<IconButton variant="ghost" size="default" label={$t('action.download')} onclick={handleDownload}>
|
|
118
|
-
<IconDownload class="size-4 stroke-
|
|
118
|
+
<IconDownload class="size-4 stroke-2" aria-hidden="true" />
|
|
119
119
|
</IconButton>
|
|
120
120
|
{:else}
|
|
121
121
|
<Button variant="ghost" size="sm" onclick={handleDownload} aria-label={$t('action.download')}>
|
|
122
|
-
<IconDownload class="size-4 shrink-0 stroke-
|
|
122
|
+
<IconDownload class="size-4 shrink-0 stroke-2" aria-hidden="true" />
|
|
123
123
|
{$t('action.download')}
|
|
124
124
|
</Button>
|
|
125
125
|
{/if}
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
label={isSingle ? $t('action.move') : $t('toolbar.moveMany', { count: selectedFiles.length })}
|
|
135
135
|
onclick={handleMove}
|
|
136
136
|
>
|
|
137
|
-
<IconArrowsMove class="size-4 stroke-
|
|
137
|
+
<IconArrowsMove class="size-4 stroke-2" aria-hidden="true" />
|
|
138
138
|
</IconButton>
|
|
139
139
|
{:else}
|
|
140
140
|
<Button
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
onclick={handleMove}
|
|
144
144
|
aria-label={isSingle ? $t('action.move') : $t('toolbar.moveMany', { count: selectedFiles.length })}
|
|
145
145
|
>
|
|
146
|
-
<IconArrowsMove class="size-4 shrink-0 stroke-
|
|
146
|
+
<IconArrowsMove class="size-4 shrink-0 stroke-2 rtl:-scale-x-100" aria-hidden="true" />
|
|
147
147
|
{isSingle ? $t('action.move') : $t('toolbar.moveMany', { count: selectedFiles.length })}
|
|
148
148
|
</Button>
|
|
149
149
|
{/if}
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
onclick={handleDelete}
|
|
159
159
|
class="text-destructive hover:text-destructive"
|
|
160
160
|
>
|
|
161
|
-
<IconTrash class="size-4 stroke-
|
|
161
|
+
<IconTrash class="size-4 stroke-2" aria-hidden="true" />
|
|
162
162
|
</IconButton>
|
|
163
163
|
{:else}
|
|
164
164
|
<Button
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
onclick={handleDelete}
|
|
169
169
|
aria-label={isSingle ? $t('action.delete') : $t('toolbar.deleteMany', { count: selectedFiles.length })}
|
|
170
170
|
>
|
|
171
|
-
<IconTrash class="size-4 shrink-0 stroke-
|
|
171
|
+
<IconTrash class="size-4 shrink-0 stroke-2" aria-hidden="true" />
|
|
172
172
|
{isSingle ? $t('action.delete') : $t('toolbar.deleteMany', { count: selectedFiles.length })}
|
|
173
173
|
</Button>
|
|
174
174
|
{/if}
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
aria-label={confirmAddLabel}
|
|
183
183
|
disabled={confirmAddDisabled}
|
|
184
184
|
>
|
|
185
|
-
<IconCheck class="size-4 shrink-0 stroke-
|
|
185
|
+
<IconCheck class="size-4 shrink-0 stroke-2" aria-hidden="true" />
|
|
186
186
|
{confirmAddLabel}
|
|
187
187
|
</Button>
|
|
188
188
|
{/if}
|
|
@@ -50,25 +50,25 @@
|
|
|
50
50
|
<div class="dropdown-wrapper relative">
|
|
51
51
|
<DropdownMenu.Root>
|
|
52
52
|
<DropdownMenu.Trigger class={triggerClass} aria-label={$t('menu.open')}>
|
|
53
|
-
<IconDots class="size-4 stroke-
|
|
53
|
+
<IconDots class="size-4 stroke-2" aria-hidden="true" />
|
|
54
54
|
<span class="sr-only">{$t('menu.moreOptions')}</span>
|
|
55
55
|
</DropdownMenu.Trigger>
|
|
56
56
|
<DropdownMenu.Content class="more-options-content w-[200px]" align="end" sideOffset={4}>
|
|
57
57
|
{#if canRename}
|
|
58
58
|
<DropdownMenu.Item onclick={() => handleAction('rename')}>
|
|
59
|
-
<IconPencil class="stroke-
|
|
59
|
+
<IconPencil class="stroke-2" />
|
|
60
60
|
{$t('action.rename')}
|
|
61
61
|
</DropdownMenu.Item>
|
|
62
62
|
{/if}
|
|
63
63
|
{#if canDownload}
|
|
64
64
|
<DropdownMenu.Item onclick={() => handleAction('download')}>
|
|
65
|
-
<IconDownload class="stroke-
|
|
65
|
+
<IconDownload class="stroke-2" />
|
|
66
66
|
{$t('action.download')}
|
|
67
67
|
</DropdownMenu.Item>
|
|
68
68
|
{/if}
|
|
69
69
|
{#if canMove}
|
|
70
70
|
<DropdownMenu.Item onclick={() => handleAction('move')}>
|
|
71
|
-
<IconArrowsMove class="stroke-
|
|
71
|
+
<IconArrowsMove class="stroke-2" />
|
|
72
72
|
{$t('action.move')}
|
|
73
73
|
</DropdownMenu.Item>
|
|
74
74
|
{/if}
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
class="text-destructive data-highlighted:text-destructive"
|
|
81
81
|
onclick={() => handleAction('delete')}
|
|
82
82
|
>
|
|
83
|
-
<IconTrash class="stroke-
|
|
83
|
+
<IconTrash class="stroke-2" />
|
|
84
84
|
{$t('action.delete')}
|
|
85
85
|
</DropdownMenu.Item>
|
|
86
86
|
{/if}
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
const SQUARE_CLASSES = { lg: 'size-12', md: 'size-10', sm: 'size-8' } as const;
|
|
84
84
|
const ICON_CLASSES = {
|
|
85
85
|
lg: 'size-5 stroke-[1.667]',
|
|
86
|
-
md: 'size-4 stroke-
|
|
87
|
-
sm: 'size-4 stroke-
|
|
86
|
+
md: 'size-4 stroke-2',
|
|
87
|
+
sm: 'size-4 stroke-2'
|
|
88
88
|
} as const;
|
|
89
89
|
const GLYPH_CLASSES = {
|
|
90
90
|
lg: 'text-heading-page',
|
|
@@ -5,7 +5,7 @@ export declare const fileStore: {
|
|
|
5
5
|
update: (this: void, updater: import("svelte/store").Updater<FileSystemRoot>) => void;
|
|
6
6
|
};
|
|
7
7
|
export declare const currentFolder: import("svelte/store").Writable<string[]>;
|
|
8
|
-
export declare const sortCriteria: import("svelte/store").Writable<"name" | "
|
|
8
|
+
export declare const sortCriteria: import("svelte/store").Writable<"name" | "size" | "date">;
|
|
9
9
|
export declare const sortDirection: import("svelte/store").Writable<"desc" | "asc">;
|
|
10
10
|
export declare const selectedFiles: import("svelte/store").Writable<FileSystemItem[]>;
|
|
11
11
|
export declare const fileFilter: import("svelte/store").Writable<string[]>;
|
|
@@ -13,7 +13,7 @@ export declare const fileFilter: import("svelte/store").Writable<string[]>;
|
|
|
13
13
|
* Derived store that automatically sorts files based on criteria
|
|
14
14
|
* Maintains folder priority (folders always appear before files)
|
|
15
15
|
*/
|
|
16
|
-
export declare const sortedFiles: import("svelte/store").Readable<
|
|
16
|
+
export declare const sortedFiles: import("svelte/store").Readable<FileSystemRoot>;
|
|
17
17
|
/**
|
|
18
18
|
* Initializes or updates the file store with new data
|
|
19
19
|
* Includes validation and error handling
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { currentFolder } from './fileStore';
|
|
2
|
-
export declare const currentPathNames: import("svelte/store").Readable<
|
|
2
|
+
export declare const currentPathNames: import("svelte/store").Readable<string[]>;
|
|
3
3
|
export { currentFolder };
|
|
4
4
|
export declare const navigationActions: import("svelte/store").Writable<{
|
|
5
5
|
navigateToPath: (path: string[]) => void;
|
|
@@ -24,5 +24,5 @@ export declare const persistentSelectStore: {
|
|
|
24
24
|
update(this: void, updater: import("svelte/store").Updater<StoredSelections>): void;
|
|
25
25
|
subscribe(this: void, run: import("svelte/store").Subscriber<StoredSelections>, invalidate?: () => void): import("svelte/store").Unsubscriber;
|
|
26
26
|
};
|
|
27
|
-
export declare const validSelections: import("svelte/store").Readable<(filterType: FileFilterType, files: FileSystemItem[]) =>
|
|
27
|
+
export declare const validSelections: import("svelte/store").Readable<(filterType: FileFilterType, files: FileSystemItem[]) => FileSystemItem[]>;
|
|
28
28
|
export {};
|