@dimah-s3/ui 2.0.0-beta.1 → 2.0.0-beta.11
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/README.md +5 -5
- package/dist/components/dimah-s3/attachment/file-attachment.d.ts +7 -1
- package/dist/components/dimah-s3/attachment/file-attachment.d.ts.map +1 -1
- package/dist/components/dimah-s3/attachment/file-name.d.ts +11 -1
- package/dist/components/dimah-s3/attachment/file-name.d.ts.map +1 -1
- package/dist/components/dimah-s3/attachment/file-type-glyph.d.ts +17 -4
- package/dist/components/dimah-s3/attachment/file-type-glyph.d.ts.map +1 -1
- package/dist/components/dimah-s3/delete/delete-confirm-dialog.d.ts.map +1 -1
- package/dist/components/dimah-s3/delete/delete-toasts.d.ts.map +1 -1
- package/dist/components/dimah-s3/delete/delete-trigger.d.ts +6 -4
- package/dist/components/dimah-s3/delete/delete-trigger.d.ts.map +1 -1
- package/dist/components/dimah-s3/delete/delete.d.ts +22 -9
- package/dist/components/dimah-s3/delete/delete.d.ts.map +1 -1
- package/dist/components/dimah-s3/download/download-progress.d.ts +2 -2
- package/dist/components/dimah-s3/download/download-progress.d.ts.map +1 -1
- package/dist/components/dimah-s3/download/download-trigger.d.ts +1 -0
- package/dist/components/dimah-s3/download/download-trigger.d.ts.map +1 -1
- package/dist/components/dimah-s3/list/object-list-commands.d.ts +26 -0
- package/dist/components/dimah-s3/list/object-list-commands.d.ts.map +1 -0
- package/dist/components/dimah-s3/list/object-list-content.d.ts.map +1 -1
- package/dist/components/dimah-s3/list/object-list-context.d.ts +124 -5
- package/dist/components/dimah-s3/list/object-list-context.d.ts.map +1 -1
- package/dist/components/dimah-s3/list/object-list-controls.d.ts +0 -24
- package/dist/components/dimah-s3/list/object-list-controls.d.ts.map +1 -1
- package/dist/components/dimah-s3/list/object-list-entry.d.ts +10 -5
- package/dist/components/dimah-s3/list/object-list-entry.d.ts.map +1 -1
- package/dist/components/dimah-s3/list/object-list-feedback.d.ts +9 -2
- package/dist/components/dimah-s3/list/object-list-feedback.d.ts.map +1 -1
- package/dist/components/dimah-s3/list/object-list-header.d.ts +18 -14
- package/dist/components/dimah-s3/list/object-list-header.d.ts.map +1 -1
- package/dist/components/dimah-s3/list/object-list-item-menu.d.ts +8 -4
- package/dist/components/dimah-s3/list/object-list-item-menu.d.ts.map +1 -1
- package/dist/components/dimah-s3/list/object-list-keyboard.d.ts +13 -3
- package/dist/components/dimah-s3/list/object-list-keyboard.d.ts.map +1 -1
- package/dist/components/dimah-s3/list/object-list-rename.d.ts +11 -0
- package/dist/components/dimah-s3/list/object-list-rename.d.ts.map +1 -0
- package/dist/components/dimah-s3/list/object-list-search.d.ts +75 -0
- package/dist/components/dimah-s3/list/object-list-search.d.ts.map +1 -0
- package/dist/components/dimah-s3/list/object-list-states.d.ts +7 -2
- package/dist/components/dimah-s3/list/object-list-states.d.ts.map +1 -1
- package/dist/components/dimah-s3/list/object-list.d.ts +11 -5
- package/dist/components/dimah-s3/list/object-list.d.ts.map +1 -1
- package/dist/components/dimah-s3/preview/object-card.d.ts.map +1 -1
- package/dist/components/dimah-s3/preview/object-image.d.ts +6 -4
- package/dist/components/dimah-s3/preview/object-image.d.ts.map +1 -1
- package/dist/components/dimah-s3/upload/avatar-upload.d.ts.map +1 -1
- package/dist/components/dimah-s3/upload/upload-field.d.ts +22 -13
- package/dist/components/dimah-s3/upload/upload-field.d.ts.map +1 -1
- package/dist/components/dimah-s3/upload/upload-file-list.d.ts +3 -1
- package/dist/components/dimah-s3/upload/upload-file-list.d.ts.map +1 -1
- package/dist/components/dimah-s3/upload/upload-status.d.ts +4 -2
- package/dist/components/dimah-s3/upload/upload-status.d.ts.map +1 -1
- package/dist/components/dimah-s3/upload/upload-toasts.d.ts.map +1 -1
- package/dist/components/dimah-s3/upload/upload.d.ts +7 -6
- package/dist/components/dimah-s3/upload/upload.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +1 -1
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/attachment.d.ts +1 -1
- package/dist/components/ui/attachment.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +1 -1
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +1 -1
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/empty.d.ts +6 -7
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/item.d.ts +1 -1
- package/dist/components/ui/item.d.ts.map +1 -1
- package/dist/components/ui/skeleton.d.ts +1 -2
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/spinner.d.ts +1 -3
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/toast.d.ts +1 -1
- package/dist/components/ui/toast.d.ts.map +1 -1
- package/dist/{lib/format-expires-in.d.ts → hooks/use-share-expiry-label.d.ts} +1 -1
- package/dist/hooks/use-share-expiry-label.d.ts.map +1 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1835 -770
- package/dist/index.js.map +1 -1
- package/dist/lib/toast-content.d.ts +19 -0
- package/dist/lib/toast-content.d.ts.map +1 -0
- package/package.json +14 -14
- package/dist/lib/format-expires-in.d.ts.map +0 -1
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
import { type UseObjectListReturn, type UseObjectListSelectionReturn } from "@dimah-s3/react";
|
|
2
3
|
/** Props for {@link ObjectListHeader}. */
|
|
3
4
|
export type ObjectListHeaderProps = {
|
|
4
5
|
/** Trailing controls, such as search, sort, view, and upload. */
|
|
5
6
|
children?: ReactNode;
|
|
6
7
|
/** Show the path. Defaults to the list's `breadcrumb`. */
|
|
7
8
|
breadcrumb?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Show `ObjectListSearchBar` under the bar while a search is on: where
|
|
11
|
+
* it looks, and how many results it found. @default true
|
|
12
|
+
*/
|
|
13
|
+
searchBar?: boolean;
|
|
8
14
|
/** Extra controls on the selection bar. Defaults to the list's `selectionActions`. */
|
|
9
15
|
selectionActions?: ReactNode;
|
|
10
16
|
className?: string;
|
|
11
17
|
};
|
|
12
|
-
/** What {@link ObjectListHeader} shares with the controls inside it. @internal */
|
|
13
|
-
type ObjectListHeaderContextValue = {
|
|
14
|
-
/** A search field inside the header is open and takes the whole bar. */
|
|
15
|
-
setSearchExpanded: (expanded: boolean) => void;
|
|
16
|
-
/** The new-folder field is open and takes the whole bar. */
|
|
17
|
-
setFolderExpanded: (expanded: boolean) => void;
|
|
18
|
-
};
|
|
19
|
-
/** The nearest {@link ObjectListHeader}, or `null` outside one. @internal */
|
|
20
|
-
export declare function useOptionalObjectListHeader(): ObjectListHeaderContextValue | null;
|
|
21
18
|
/**
|
|
22
19
|
* Hides a label below this header width, so the control shows its icon
|
|
23
20
|
* alone. Outside a header the label always shows.
|
|
@@ -37,8 +34,11 @@ export declare const OBJECT_LIST_HEADER_COMPACT_BUTTON = "@max-[36rem]/object-li
|
|
|
37
34
|
* `ObjectListSearch` among `children` shows as a search button, and opens
|
|
38
35
|
* into a field across the whole bar. New folder does the same with its
|
|
39
36
|
* name field: the path and the other controls hide until it closes.
|
|
37
|
+
*
|
|
38
|
+
* While a search is on, `ObjectListSearchBar` sits under the bar: where the
|
|
39
|
+
* search looks (the open folder or everywhere) and how many it found.
|
|
40
40
|
*/
|
|
41
|
-
export declare function ObjectListHeader({ children, breadcrumb, selectionActions, className, }: ObjectListHeaderProps): import("react").JSX.Element;
|
|
41
|
+
export declare function ObjectListHeader({ children, breadcrumb, searchBar, selectionActions, className, }: ObjectListHeaderProps): import("react").JSX.Element;
|
|
42
42
|
/**
|
|
43
43
|
* Checkbox for every loaded entry. With more pages to load, it selects the
|
|
44
44
|
* rows on screen and says so. Hidden without a multiple selection.
|
|
@@ -57,14 +57,19 @@ export type ObjectListSelectionBarProps = {
|
|
|
57
57
|
* Renders nothing while the selection is empty.
|
|
58
58
|
*/
|
|
59
59
|
export declare function ObjectListSelectionBar({ actions, className, }: ObjectListSelectionBarProps): import("react").JSX.Element | null;
|
|
60
|
+
/**
|
|
61
|
+
* "3 selected", or "3 selected on this page" while select-all left pages
|
|
62
|
+
* unloaded. `null` while nothing is selected. @internal
|
|
63
|
+
*/
|
|
64
|
+
export declare function useSelectionCount<TItem>(list: UseObjectListReturn<TItem>, selection: UseObjectListSelectionReturn<TItem> | null): string | null;
|
|
60
65
|
/**
|
|
61
66
|
* Delete button for the selected entries. The list's delete root asks for
|
|
62
67
|
* confirmation. `ObjectListSelectionBar` already has one; use this in a bar
|
|
63
68
|
* of your own.
|
|
64
69
|
*/
|
|
65
70
|
export declare function ObjectListBulkDelete(): import("react").JSX.Element | null;
|
|
66
|
-
/** Props for {@link
|
|
67
|
-
export type
|
|
71
|
+
/** Props for {@link ObjectListNewFolder}. */
|
|
72
|
+
export type ObjectListNewFolderProps = {
|
|
68
73
|
className?: string;
|
|
69
74
|
};
|
|
70
75
|
/**
|
|
@@ -76,6 +81,5 @@ export type NewFolderControlProps = {
|
|
|
76
81
|
* stays inline. Renders nothing when the source has no `createFolder`.
|
|
77
82
|
* `ObjectListHeader` already has one.
|
|
78
83
|
*/
|
|
79
|
-
export declare function
|
|
80
|
-
export {};
|
|
84
|
+
export declare function ObjectListNewFolder({ className }: ObjectListNewFolderProps): import("react").JSX.Element | null;
|
|
81
85
|
//# sourceMappingURL=object-list-header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-list-header.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-header.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"object-list-header.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-header.tsx"],"names":[],"mappings":"AAEA,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf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7C,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,EAAE,wBAAwB,sCAqD1E"}
|
|
@@ -36,8 +36,8 @@ export type ObjectListItemMenuProps = {
|
|
|
36
36
|
*/
|
|
37
37
|
expiresIn?: number;
|
|
38
38
|
/**
|
|
39
|
-
* Extra rows, after Copy link and before Delete.
|
|
40
|
-
* Use this for actions the menu does not provide
|
|
39
|
+
* Extra rows, after Copy link and Rename, and before Delete.
|
|
40
|
+
* Use this for actions the menu does not provide.
|
|
41
41
|
*/
|
|
42
42
|
actions?: readonly ObjectListMenuAction[];
|
|
43
43
|
/** More `DropdownMenuItem`s, after `actions`. */
|
|
@@ -48,9 +48,13 @@ export type ObjectListItemMenuProps = {
|
|
|
48
48
|
/**
|
|
49
49
|
* Overflow menu for one entry.
|
|
50
50
|
*
|
|
51
|
-
* - Files: Download, Copy link,
|
|
51
|
+
* - Files: Download, Copy link, Rename when the source has `renameFile`,
|
|
52
|
+
* your actions, Delete.
|
|
52
53
|
* - Folders: Upload to this folder (the keyboard path to a folder drop),
|
|
53
|
-
*
|
|
54
|
+
* Rename when the source has `renameFolder`, then your actions. Upload
|
|
55
|
+
* is disabled while the list's `upload` is.
|
|
56
|
+
* - Search results that know where they live start with Show in folder,
|
|
57
|
+
* which leaves the search, opens that folder, and focuses the entry.
|
|
54
58
|
*
|
|
55
59
|
* Inside an `ObjectList` every prop is optional: the key, name, size, and
|
|
56
60
|
* hooks come from the entry and the list. Download runs the list's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-list-item-menu.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-item-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"object-list-item-menu.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object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import { type FocusEvent, type KeyboardEvent } from "react";
|
|
2
2
|
import type { UseObjectListReturn, UseObjectListSelectionReturn } from "@dimah-s3/react";
|
|
3
|
-
import type { ObjectListView } from "./object-list-context.js";
|
|
3
|
+
import type { ObjectListEntryStore, ObjectListView } from "./object-list-context.js";
|
|
4
4
|
/**
|
|
5
5
|
* Keys inside the list frame:
|
|
6
|
+
* - The entries are one tab stop: the last entry focused, else the first.
|
|
7
|
+
* Tab and Shift+Tab move through that entry's own controls, then leave
|
|
8
|
+
* the entries.
|
|
6
9
|
* - Arrows, Home, End: move between entries (grid: by row and column).
|
|
10
|
+
* - ArrowLeft, ArrowRight in the list view: move between a row's checkbox,
|
|
11
|
+
* name, and menu.
|
|
7
12
|
* - Space on an entry: toggle its checkbox. Shift extends the range.
|
|
8
13
|
* - Ctrl+A / Cmd+A: select every loaded entry. Escape: clear.
|
|
9
14
|
* - Backspace or Alt+ArrowUp: open the parent folder.
|
|
15
|
+
* - F2: rename the focused row, when the source can.
|
|
16
|
+
* - `/`: open and focus the list's search field. Shift+/ stays with the page.
|
|
10
17
|
*
|
|
11
18
|
* Fields, menus, and dialogs keep their own keys.
|
|
12
19
|
*/
|
|
13
|
-
export declare function useObjectListKeyboard<TItem>({ list, selection, view, }: {
|
|
20
|
+
export declare function useObjectListKeyboard<TItem>({ list, selection, view, store, startRename, }: {
|
|
14
21
|
list: UseObjectListReturn<TItem>;
|
|
15
22
|
selection: UseObjectListSelectionReturn<TItem> | null;
|
|
16
23
|
view: ObjectListView;
|
|
24
|
+
store: ObjectListEntryStore;
|
|
25
|
+
startRename: (key: string) => void;
|
|
17
26
|
}): {
|
|
18
27
|
onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
|
|
19
28
|
onKeyUp: (event: KeyboardEvent<HTMLElement>) => void;
|
|
29
|
+
onFocus: (event: FocusEvent<HTMLElement>) => void;
|
|
20
30
|
};
|
|
21
31
|
//# sourceMappingURL=object-list-keyboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-list-keyboard.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-keyboard.ts"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"object-list-keyboard.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-keyboard.ts"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,KAAK,EACV,mBAAmB,EACnB,4BAA4B,EAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACf,MAAM,gDAAgD,CAAC;AAaxD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,EAC3C,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,KAAK,EACL,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACjC,SAAS,EAAE,4BAA4B,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IACtD,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,oBAAoB,CAAC;IAC5B,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;uBAW2B,aAAa,CAAC,WAAW,CAAC;qBAmF5B,aAAa,CAAC,WAAW,CAAC;qBAO1B,UAAU,CAAC,WAAW,CAAC;EAOhD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ObjectListEntry, type UseObjectListReturn } from "@dimah-s3/react";
|
|
2
|
+
/** True when the source can rename this entry. */
|
|
3
|
+
export declare function canRenameEntry<TItem>(entry: ObjectListEntry<TItem>, list: UseObjectListReturn<TItem>): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* The name field for the entry being renamed. Enter saves, Escape restores
|
|
6
|
+
* the name, and leaving the field saves. Mounted by the default row and tile.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ObjectListRenameField<TItem>({ entry, }: {
|
|
9
|
+
entry: ObjectListEntry<TItem>;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=object-list-rename.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-list-rename.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-rename.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC;AASzB,kDAAkD;AAClD,wBAAgB,cAAc,CAAC,KAAK,EAClC,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,EAC7B,IAAI,EAAE,mBAAmB,CAAC,KAAK,CAAC,GAC/B,OAAO,CAIT;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,EAC3C,KAAK,GACN,EAAE;IACD,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;CAC/B,+BAoKA"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type ObjectListFolder, type UseObjectListReturn } from "@dimah-s3/react";
|
|
2
|
+
/**
|
|
3
|
+
* True when the list can search the open folder or everywhere: the source
|
|
4
|
+
* has both scopes and a folder is open. @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare function canChooseSearchScope<TItem>(list: UseObjectListReturn<TItem>): boolean;
|
|
7
|
+
/** Props for {@link ObjectListSearch}. */
|
|
8
|
+
export type ObjectListSearchProps = {
|
|
9
|
+
/**
|
|
10
|
+
* Placeholder and accessible name. Defaults to where the search looks:
|
|
11
|
+
* "Search files", `Search in “Docs”`, or "Search all files".
|
|
12
|
+
*/
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
/** Milliseconds to wait after typing before the list reloads. @default 250 */
|
|
15
|
+
delay?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Inside `ObjectListHeader`, start as a search button that opens into a
|
|
18
|
+
* field across the whole bar. `false` keeps the field in the bar. Outside
|
|
19
|
+
* a header the field always shows. @default true
|
|
20
|
+
*/
|
|
21
|
+
collapsible?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Search for `list.search`. The query receives the text and
|
|
26
|
+
* `list.searchScope`; the source decides what matches (`memoryObjectSource`
|
|
27
|
+
* and `dbObjectSource` match names in every folder below the open one).
|
|
28
|
+
*
|
|
29
|
+
* Inside `ObjectListHeader` it is a search button. A click, or `/` from
|
|
30
|
+
* the list, opens a field across the whole bar and focuses it; the field
|
|
31
|
+
* stays open while it has text. A spinner shows while results load.
|
|
32
|
+
* ArrowDown moves to the first result once they have loaded. Escape clears
|
|
33
|
+
* the text, then closes the field. Close search clears and closes it, and
|
|
34
|
+
* focus returns to the button. An empty field also closes when focus
|
|
35
|
+
* leaves it, or when the search is cleared from elsewhere, such as by Show
|
|
36
|
+
* in folder. Render it as a direct child of the header; the header shows
|
|
37
|
+
* `ObjectListSearchBar` under it while a search is on.
|
|
38
|
+
*/
|
|
39
|
+
export declare function ObjectListSearch({ placeholder, delay, collapsible, className, }: ObjectListSearchProps): import("react").JSX.Element;
|
|
40
|
+
/**
|
|
41
|
+
* How many results the search found, for the search bar and the list's
|
|
42
|
+
* live region: "12 results", "50+ results" while more pages are left and
|
|
43
|
+
* the source sent no `total`, "No results", or "Searching…". `null` while
|
|
44
|
+
* nothing is searched. @internal
|
|
45
|
+
*/
|
|
46
|
+
export declare function useObjectListSearchStatus<TItem>(list: UseObjectListReturn<TItem>): {
|
|
47
|
+
label: string;
|
|
48
|
+
settled: boolean;
|
|
49
|
+
} | null;
|
|
50
|
+
/** Props for {@link ObjectListSearchBar}. */
|
|
51
|
+
export type ObjectListSearchBarProps = {
|
|
52
|
+
className?: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Where the search looks and what it found, under the header while a
|
|
56
|
+
* search is on. With a source that can search the open folder or
|
|
57
|
+
* everywhere (`searchScopes`), "Search in" picks between the open folder
|
|
58
|
+
* (and the folders in it) and the root. The result count is read out by
|
|
59
|
+
* the list's live region. Renders nothing while nothing is searched.
|
|
60
|
+
* `ObjectListHeader` already shows one.
|
|
61
|
+
*/
|
|
62
|
+
export declare function ObjectListSearchBar({ className }: ObjectListSearchBarProps): import("react").JSX.Element | null;
|
|
63
|
+
/** Props for {@link ObjectListLocation}. */
|
|
64
|
+
export type ObjectListLocationProps = {
|
|
65
|
+
/** Folders from the root down to the one that holds the entry. */
|
|
66
|
+
location: readonly ObjectListFolder[];
|
|
67
|
+
className?: string;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Where a search result lives: `Docs › 2024`, the root label at the root,
|
|
71
|
+
* and `… › Parent › Folder` when it is deeper. Text only, so it fits an
|
|
72
|
+
* entry's description; `title` holds the whole path.
|
|
73
|
+
*/
|
|
74
|
+
export declare function ObjectListLocation({ location, className, }: ObjectListLocationProps): import("react").JSX.Element;
|
|
75
|
+
//# sourceMappingURL=object-list-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-list-search.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-search.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC;AAwBzB;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EACxC,IAAI,EAAE,mBAAmB,CAAC,KAAK,CAAC,GAC/B,OAAO,CAMT;AAED,0CAA0C;AAC1C,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,WAAW,EACX,KAAW,EACX,WAAkB,EAClB,SAAS,GACV,EAAE,qBAAqB,+BAuMvB;AAkBD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAC7C,IAAI,EAAE,mBAAmB,CAAC,KAAK,CAAC,GAC/B;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAoC5C;AAED,6CAA6C;AAC7C,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,EAAE,wBAAwB,sCA4D1E;AAwDD,4CAA4C;AAC5C,MAAM,MAAM,uBAAuB,GAAG;IACpC,kEAAkE;IAClE,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,SAAS,GACV,EAAE,uBAAuB,+BA+BzB"}
|
|
@@ -5,13 +5,18 @@ export type ObjectListEmptyProps = {
|
|
|
5
5
|
/** Defaults to "This folder is empty", or "No results" while searching. */
|
|
6
6
|
title?: ReactNode;
|
|
7
7
|
description?: ReactNode;
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Below the text, such as an upload button. While searching it defaults
|
|
10
|
+
* to Search everywhere (when the search can reach past the open folder)
|
|
11
|
+
* and Clear search.
|
|
12
|
+
*/
|
|
9
13
|
children?: ReactNode;
|
|
10
14
|
className?: string;
|
|
11
15
|
};
|
|
12
16
|
/**
|
|
13
17
|
* Empty state for the open folder. Pass it as `empty` with your own text
|
|
14
|
-
* or a call to action. It reads the search text
|
|
18
|
+
* or a call to action. It reads the search text and where the search
|
|
19
|
+
* looked from the list.
|
|
15
20
|
*/
|
|
16
21
|
export declare function ObjectListEmpty({ title, description, children, className, }: ObjectListEmptyProps): import("react").JSX.Element;
|
|
17
22
|
export declare function ObjectListError({ message, onRetry, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-list-states.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-states.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAe1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;
|
|
1
|
+
{"version":3,"file":"object-list-states.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-states.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAe1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAKrF,yCAAyC;AACzC,MAAM,MAAM,oBAAoB,GAAG;IACjC,2EAA2E;IAC3E,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,WAAW,EACX,QAAQ,EACR,SAAS,GACV,EAAE,oBAAoB,+BAuEtB;AAED,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,OAAO,GACR,EAAE;IACD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC,+BAyBA;AAED,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,EACP,OAAO,GACR,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC,+BAYA;AAcD,wBAAgB,kBAAkB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,+BAmCpE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,IAAI,EACJ,KAAK,GACN,EAAE;IACD,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC;IACxB,+CAA+C;IAC/C,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;CAChB,sCA0DA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import type { AnyDownloadReturn, DeleteResult, ObjectListFolder, UseDeleteReturn, UseDownloadReturn, UseObjectListReturn, UseObjectListSelectionReturn, UseUploadReturn } from "@dimah-s3/react";
|
|
3
|
-
import { type ObjectListRenderers, type ObjectListView } from "./object-list-context.js";
|
|
3
|
+
import { type ObjectListPagination, type ObjectListRenderers, type ObjectListView } from "./object-list-context.js";
|
|
4
|
+
import { type ObjectListCommands } from "./object-list-commands.js";
|
|
4
5
|
/** Props for {@link ObjectList}. */
|
|
5
6
|
export type ObjectListProps<TItem> = ObjectListRenderers<TItem> & {
|
|
6
7
|
/** `useObjectList` return. The component renders it and does not fetch. */
|
|
@@ -69,13 +70,18 @@ export type ObjectListProps<TItem> = ObjectListRenderers<TItem> & {
|
|
|
69
70
|
toolbar?: ReactNode;
|
|
70
71
|
/** Extra controls on the selection bar, beside Delete. */
|
|
71
72
|
selectionActions?: ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Opens New folder and a row menu from outside the list. Create it with
|
|
75
|
+
* `useObjectListCommands`.
|
|
76
|
+
*/
|
|
77
|
+
commands?: ObjectListCommands;
|
|
72
78
|
/** Replaces the empty state. `ObjectListEmpty` takes your own text. */
|
|
73
79
|
empty?: ReactNode;
|
|
74
80
|
/**
|
|
75
|
-
* `auto` loads the next page as the end of the
|
|
76
|
-
* `button` waits for Load more. @default "auto"
|
|
81
|
+
* How later pages load. `auto` loads the next page as the end of the
|
|
82
|
+
* rows comes into view; `button` waits for Load more. @default "auto"
|
|
77
83
|
*/
|
|
78
|
-
|
|
84
|
+
pagination?: ObjectListPagination;
|
|
79
85
|
/**
|
|
80
86
|
* Fixed frame height. The header stays put and the rows scroll inside.
|
|
81
87
|
* A number is pixels. A string is a CSS length, such as `"18rem"`.
|
|
@@ -106,5 +112,5 @@ export type ObjectListProps<TItem> = ObjectListRenderers<TItem> & {
|
|
|
106
112
|
* so the family parts work inside it, and one delete confirmation serves
|
|
107
113
|
* every row and the selection bar.
|
|
108
114
|
*/
|
|
109
|
-
export declare function ObjectList<TItem>({ list, selection, upload, download, share, delete: del, toasts, view: viewProp, defaultView, onViewChange, onOpenItem, resolveFolderKeys, onDeleted, rootLabel, breadcrumb, toolbar, selectionActions, empty,
|
|
115
|
+
export declare function ObjectList<TItem>({ list, selection, upload, download, share, delete: del, toasts, view: viewProp, defaultView, onViewChange, onOpenItem, resolveFolderKeys, onDeleted, rootLabel, breadcrumb, toolbar, selectionActions, commands, empty, pagination, height, maxHeight, className, children, renderEntry, renderActions, renderDescription, renderMeta, }: ObjectListProps<TItem>): import("react").JSX.Element;
|
|
110
116
|
//# sourceMappingURL=object-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-list.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"object-list.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list.tsx"],"names":[],"mappings":"AAEA,OAAO,EAWL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EAGZ,gBAA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E,MAAM,CAAC;IACnB,yDAAyD;IACzD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yEAAyE;IACzE,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,0DAA0D;IAC1D,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,uEAAuE;IACvE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,EAChC,IAAI,EACJ,SAAS,EACT,MAAM,EACN,QAAQ,EACR,KAAK,EACL,MAAM,EAAE,GAAG,EACX,MAAa,EACb,IAAI,EAAE,QAAQ,EACd,WAAoB,EACpB,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,UAAiB,EACjB,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,KAAK,EACL,UAAmB,EACnB,MAAM,EACN,SAAS,EACT,SAAS,EACT,QAAQ,EACR,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,UAAU,GACX,EAAE,eAAe,CAAC,KAAK,CAAC,+BAwZxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-card.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/preview/object-card.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"object-card.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/preview/object-card.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EACZ,eAAe,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,kDAAkD,CAAC;AAW1D,wEAAwE;AACxE,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,mBAAmB,EACnB,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,CACtE,GAAG;IACF,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,0EAA0E;IAC1E,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,qFAAqF;IACrF,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EAAE,GAAG,EACX,SAAS,EACT,WAAW,EACX,OAAO,EACP,GAAG,KAAK,EACT,EAAE,eAAe,+BAmFjB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
2
|
import type { S3Api, S3RouteName } from "@dimah-s3/core";
|
|
3
3
|
/** Props for {@link ObjectImage}. Other props go to the `<img>`. */
|
|
4
|
-
export type ObjectImageProps = Omit<
|
|
4
|
+
export type ObjectImageProps = Omit<ComponentProps<"img">, "src"> & {
|
|
5
5
|
/** Named server route that presigns the GET. */
|
|
6
6
|
route: S3RouteName;
|
|
7
7
|
/** Stored object key. `null` shows `fallback`. */
|
|
@@ -19,12 +19,14 @@ export type ObjectImageProps = Omit<ImgHTMLAttributes<HTMLImageElement>, "src">
|
|
|
19
19
|
* the same object.
|
|
20
20
|
*
|
|
21
21
|
* `fallback` renders instead of the image while there is no key, while the
|
|
22
|
-
* URL is signed, when signing fails
|
|
22
|
+
* URL is signed, and when signing fails. An image that fails to load is
|
|
23
|
+
* signed again once, as a URL that expired while the tab slept would be;
|
|
24
|
+
* when the new URL fails too, `fallback` shows.
|
|
23
25
|
*
|
|
24
26
|
* @example
|
|
25
27
|
* ```tsx
|
|
26
28
|
* <ObjectImage route="avatars" objectKey={user.avatarKey} alt={user.name} />
|
|
27
29
|
* ```
|
|
28
30
|
*/
|
|
29
|
-
export declare function ObjectImage({ route, objectKey, alt, api, fallback, onError, ...props }: ObjectImageProps): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null;
|
|
31
|
+
export declare function ObjectImage({ route, objectKey, alt, api, fallback, onError, onLoad, ...props }: ObjectImageProps): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null;
|
|
30
32
|
//# sourceMappingURL=object-image.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-image.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/preview/object-image.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,
|
|
1
|
+
{"version":3,"file":"object-image.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/preview/object-image.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGzD,oEAAoE;AACpE,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG;IAClE,gDAAgD;IAChD,KAAK,EAAE,WAAW,CAAC;IACnB,kDAAkD;IAClD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,wDAAwD;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,GAAG,CAAC,EAAE,KAAK,CAAC;IACZ,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,SAAS,EACT,GAAG,EACH,GAAG,EACH,QAAe,EACf,OAAO,EACP,MAAM,EACN,GAAG,KAAK,EACT,EAAE,gBAAgB,mTA8BlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar-upload.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/avatar-upload.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAMzB,sCAAsC;AACtC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,4DAA4D;IAC5D,MAAM,EAAE,eAAe,CAAC;IACxB,gEAAgE;IAChE,KAAK,EAAE,WAAW,CAAC;IACnB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8FAA8F;IAC9F,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,GAAG,CAAC,EAAE,KAAK,CAAC;CACb,CAAC;AAgBF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,KAAK,EACL,SAAgB,EAChB,KAAK,EACL,QAAQ,EACR,IAAS,EACT,KAAgB,EAChB,GAAG,EACH,SAAS,GACV,EAAE,iBAAiB,+
|
|
1
|
+
{"version":3,"file":"avatar-upload.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/avatar-upload.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAMzB,sCAAsC;AACtC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,4DAA4D;IAC5D,MAAM,EAAE,eAAe,CAAC;IACxB,gEAAgE;IAChE,KAAK,EAAE,WAAW,CAAC;IACnB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8FAA8F;IAC9F,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,GAAG,CAAC,EAAE,KAAK,CAAC;CACb,CAAC;AAgBF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,KAAK,EACL,SAAgB,EAChB,KAAK,EACL,QAAQ,EACR,IAAS,EACT,KAAgB,EAChB,GAAG,EACH,SAAS,GACV,EAAE,iBAAiB,+BA0GnB"}
|
|
@@ -13,8 +13,9 @@ export type UploadFieldProps = {
|
|
|
13
13
|
/** Runs with the new keys after an upload adds one or `remove` drops one. */
|
|
14
14
|
onValueChange?: (keys: string[]) => void;
|
|
15
15
|
/**
|
|
16
|
-
* Most keys the field holds.
|
|
17
|
-
* fit, counting files
|
|
16
|
+
* Most keys the field holds. The hook takes only the files that still
|
|
17
|
+
* fit, counting files in flight and calls still preparing, on every call:
|
|
18
|
+
* also calls made outside the field. A full field takes no files.
|
|
18
19
|
*/
|
|
19
20
|
maxFiles?: number;
|
|
20
21
|
children: ReactNode;
|
|
@@ -36,7 +37,10 @@ export type UploadFieldContextValue = {
|
|
|
36
37
|
value: readonly string[];
|
|
37
38
|
/** `value` with file details, in the same order. */
|
|
38
39
|
items: readonly UploadFieldItem[];
|
|
39
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Files that still fit, counting files in flight and calls still
|
|
42
|
+
* preparing, or `null` without `maxFiles`.
|
|
43
|
+
*/
|
|
40
44
|
remaining: number | null;
|
|
41
45
|
/** Drops `key` from the value. The stored object is kept. */
|
|
42
46
|
remove: (key: string) => void;
|
|
@@ -45,10 +49,11 @@ export type UploadFieldContextValue = {
|
|
|
45
49
|
* Form field whose value is the keys of the files uploaded through it.
|
|
46
50
|
*
|
|
47
51
|
* Each file that uploads successfully adds its key, so the value grows
|
|
48
|
-
* across calls
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
+
* across calls. The field's calls queue, so a new pick never cancels the
|
|
53
|
+
* files still uploading into it. Files that fail, are cancelled or are
|
|
54
|
+
* still in flight add nothing, and files that uploaded before the field
|
|
55
|
+
* mounted are left out. Every key renders as a hidden
|
|
56
|
+
* `<input name={name}>`, so the field submits with its form.
|
|
52
57
|
*
|
|
53
58
|
* Without `value`, a reset of its form (including React 19's automatic
|
|
54
59
|
* reset after a `<form action>`) restores `defaultValue` and reports it
|
|
@@ -59,12 +64,16 @@ export type UploadFieldContextValue = {
|
|
|
59
64
|
* It wraps its children in `Upload`, so `UploadTrigger`, `UploadDropzone`
|
|
60
65
|
* and `UploadStatus` work inside it. A file moves from the status to the
|
|
61
66
|
* value once it uploads, so it never shows twice: the status keeps only
|
|
62
|
-
* files in flight or failed.
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* files that still fit
|
|
66
|
-
*
|
|
67
|
-
*
|
|
67
|
+
* files in flight or failed.
|
|
68
|
+
*
|
|
69
|
+
* With `maxFiles`, the field sets a `useUploadLimit` on the hook, so every
|
|
70
|
+
* call takes at most the files that still fit (files in flight and calls
|
|
71
|
+
* still preparing count), wherever it comes from: the field's parts,
|
|
72
|
+
* `UploadToasts`, `usePasteFiles` or your own code. The hook rejects the
|
|
73
|
+
* rest with `TOO_MANY_FILES`, and a retry takes only the failed files that
|
|
74
|
+
* fit. Once the field is full, its trigger, dropzone and retry actions stay
|
|
75
|
+
* focusable but are `aria-disabled`, and its picker, drops and pastes do
|
|
76
|
+
* nothing.
|
|
68
77
|
*
|
|
69
78
|
* @example
|
|
70
79
|
* ```tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-field.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-field.tsx"],"names":[],"mappings":"AAEA,OAAO,EASL,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"upload-field.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-field.tsx"],"names":[],"mappings":"AAEA,OAAO,EASL,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAMV,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAOzB,qCAAqC;AACrC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,2DAA2D;IAC3D,MAAM,EAAE,eAAe,CAAC;IACxB,iEAAiE;IACjE,IAA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MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,GAAG;IAC3E,qEAAqE;IACrE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,SAAS,CAAC;CACjD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,qBAAqB,sCAiBvB"}
|
|
@@ -2,7 +2,7 @@ import type { ComponentProps, ReactNode } from "react";
|
|
|
2
2
|
import type { UploadFileState } from "@dimah-s3/react";
|
|
3
3
|
import { type FileAttachmentProps } from "../attachment/file-attachment.js";
|
|
4
4
|
/** Props for {@link UploadFileItem}. Other props go to `FileAttachment`. */
|
|
5
|
-
export type UploadFileItemProps = Omit<FileAttachmentProps, "state" | "fileName" | "fileSize" | "contentType" | "previewUrl" | "percent" | "error" | "onCancel" | "onRetry"> & {
|
|
5
|
+
export type UploadFileItemProps = Omit<FileAttachmentProps, "state" | "fileName" | "fileSize" | "contentType" | "previewUrl" | "percent" | "error" | "onCancel" | "onRetry" | "retryDisabled"> & {
|
|
6
6
|
/** One entry of `upload.files`. */
|
|
7
7
|
file: UploadFileState;
|
|
8
8
|
};
|
|
@@ -11,6 +11,8 @@ export type UploadFileItemProps = Omit<FileAttachmentProps, "state" | "fileName"
|
|
|
11
11
|
* error, with a cancel action while it is queued or in flight and a retry
|
|
12
12
|
* action once it failed. A cancelled file leaves the queue, so focus moves
|
|
13
13
|
* on to the next action; a retried one keeps focus on its cancel action.
|
|
14
|
+
* In a full root, as in a full `UploadField`, the retry action stays
|
|
15
|
+
* focusable but is `aria-disabled`.
|
|
14
16
|
*/
|
|
15
17
|
export declare function UploadFileItem({ file, description, ...props }: UploadFileItemProps): import("react").JSX.Element;
|
|
16
18
|
/** How {@link UploadFileList} lays out its files. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-file-list.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-file-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAmB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,kDAAkD,CAAC;AAO1D,4EAA4E;AAC5E,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,mBAAmB,EACjB,OAAO,GACP,UAAU,GACV,UAAU,GACV,aAAa,GACb,YAAY,GACZ,SAAS,GACT,OAAO,GACP,UAAU,GACV,SAAS,
|
|
1
|
+
{"version":3,"file":"upload-file-list.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-file-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAmB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,kDAAkD,CAAC;AAO1D,4EAA4E;AAC5E,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,mBAAmB,EACjB,OAAO,GACP,UAAU,GACV,UAAU,GACV,aAAa,GACb,YAAY,GACZ,SAAS,GACT,OAAO,GACP,UAAU,GACV,SAAS,GACT,eAAe,CAClB,GAAG;IACF,mCAAmC;IACnC,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,WAAW,EACX,GAAG,KAAK,EACT,EAAE,mBAAmB,+BAoCrB;AAED,qDAAqD;AACrD,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnD,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,GAAG;IACzE;;;OAGG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,SAAS,CAAC;CACjD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAe,EACf,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,mBAAmB,sCA2BrB"}
|
|
@@ -14,8 +14,10 @@ export type UploadStatusProps = Omit<ComponentProps<"div">, "children"> & {
|
|
|
14
14
|
* past 20rem. While files upload the summary offers "Cancel all uploads",
|
|
15
15
|
* and pause when the hook has an `uploadStore` so the uploads can resume;
|
|
16
16
|
* settled, it offers dismiss, and "Retry failed uploads" when files failed.
|
|
17
|
-
* A failed file has its own retry action.
|
|
18
|
-
*
|
|
17
|
+
* A failed file has its own retry action. In a full root, as in a full
|
|
18
|
+
* `UploadField`, the retry actions stay focusable but are `aria-disabled`.
|
|
19
|
+
* With `layout="grid"` the files show as tiles under the summary, also for
|
|
20
|
+
* one file.
|
|
19
21
|
*
|
|
20
22
|
* Inside an `UploadField` (a root with `hideUploaded`), files that uploaded
|
|
21
23
|
* leave the status, since the field's value lists them. When cancel, pause
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-status.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-status.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AAiBvD,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,+CAA+C,CAAC;AAEvD,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACxE,mEAAmE;IACnE,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B,CAAC;AAKF
|
|
1
|
+
{"version":3,"file":"upload-status.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-status.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AAiBvD,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,+CAA+C,CAAC;AAEvD,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACxE,mEAAmE;IACnE,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B,CAAC;AAKF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAe,EACf,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,sCAqEnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-toasts.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-toasts.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAmB,eAAe,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"upload-toasts.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-toasts.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAmB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKxE,sCAAsC;AACtC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,2CAA2C;IAC3C,MAAM,EAAE,eAAe,CAAC;CACzB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,iBAAiB,sCAGzD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,MAAM,EAAE,EAAE,iBAAiB,sCAGhE"}
|
|
@@ -5,10 +5,11 @@ export type UploadProps = {
|
|
|
5
5
|
/** The `useUpload` return its parts read. */
|
|
6
6
|
upload: UseUploadReturn;
|
|
7
7
|
/**
|
|
8
|
-
* Marks the root as full: `UploadTrigger
|
|
9
|
-
*
|
|
10
|
-
* `
|
|
11
|
-
* `
|
|
8
|
+
* Marks the root as full: `UploadTrigger`, `UploadDropzone` and the retry
|
|
9
|
+
* actions of `UploadStatus` and `UploadFileList` stay focusable but are
|
|
10
|
+
* `aria-disabled`. It only changes how they render; the hook decides what
|
|
11
|
+
* it takes. `UploadField` sets it once its `maxFiles` is reached.
|
|
12
|
+
* @default false
|
|
12
13
|
*/
|
|
13
14
|
isFull?: boolean;
|
|
14
15
|
/**
|
|
@@ -22,7 +23,7 @@ export type UploadProps = {
|
|
|
22
23
|
/** What {@link Upload} shares with its parts. */
|
|
23
24
|
export type UploadContextValue = {
|
|
24
25
|
upload: UseUploadReturn;
|
|
25
|
-
/** The root takes no more files, as in a full `UploadField`.
|
|
26
|
+
/** The root takes no more files, as in a full `UploadField`. Its intake and retry parts render `aria-disabled`. */
|
|
26
27
|
isFull: boolean;
|
|
27
28
|
/** Status parts leave out files that uploaded, as in an `UploadField`. */
|
|
28
29
|
hideUploaded: boolean;
|
|
@@ -69,7 +70,7 @@ export declare function useUploadFocus(): UploadFocusValue;
|
|
|
69
70
|
* Call options for files taken in by an upload part.
|
|
70
71
|
*
|
|
71
72
|
* Inside an `ObjectList` whose `upload` is this same hook (by
|
|
72
|
-
* `instanceId`, so
|
|
73
|
+
* `instanceId`, so the copy `UploadField` passes its parts counts), the source's
|
|
73
74
|
* `uploadOptions` for the open folder apply first, so files land in that
|
|
74
75
|
* folder. `call` merges over them: its fields win, and `metadata` merges
|
|
75
76
|
* key by key.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload.tsx"],"names":[],"mappings":"AAEA,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,iBAAiB,EAEjB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAIzB,gCAAgC;AAChC,MAAM,MAAM,WAAW,GAAG;IACxB,6CAA6C;IAC7C,MAAM,EAAE,eAAe,CAAC;IACxB
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload.tsx"],"names":[],"mappings":"AAEA,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,iBAAiB,EAEjB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAIzB,gCAAgC;AAChC,MAAM,MAAM,WAAW,GAAG;IACxB,6CAA6C;IAC7C,MAAM,EAAE,eAAe,CAAC;IACxB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,iDAAiD;AACjD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,eAAe,CAAC;IACxB,mHAAmH;IACnH,MAAM,EAAE,OAAO,CAAC;IAChB,0EAA0E;IAC1E,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAIF,2EAA2E;AAC3E,QAAA,MAAM,gBAAgB,gCAAgC,CAAC;AAEvD,qDAAqD;AACrD,KAAK,gBAAgB,GAAG;IACtB,yEAAyE;IACzE,WAAW,EAAE;QAAE,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,iEAAiE;IACjE,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAmBF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,MAAc,EACd,YAAoB,EACpB,QAAQ,GACT,EAAE,WAAW,+BAqCb;AAED,kFAAkF;AAClF,wBAAgB,gBAAgB,IAAI,kBAAkB,CAQrD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,IAAI,gBAAgB,CAQjD;AAiED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,iBAAiB,GAAG,SAAS,GAClC,iBAAiB,GAAG,SAAS,CAO/B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
3
3
|
import { Button } from "./button.js";
|
|
4
4
|
declare function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGlF,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,qBAEjE;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,qBAI3E;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,MAAM,CAAC,KAAK,qBAIzE;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,QAAQ,CAAC,KAAK,qBAWrC;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,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