@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
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# @dimah-s3/ui
|
|
2
2
|
|
|
3
|
-
**2.0 beta.** Install with `@beta`. `@latest` stays on 1.x, and betas can include breaking changes until 2.0.0.
|
|
3
|
+
**2.0 beta.** Install with `@beta`. `@latest` stays on 1.x ([v1.s3.dimah.dev](https://v1.s3.dimah.dev/docs)), and betas can include breaking changes until 2.0.0.
|
|
4
4
|
|
|
5
5
|
Optional prebuilt UI for `dimah-s3`, on top of `@dimah-s3/react` and
|
|
6
6
|
[shadcn/ui](https://ui.shadcn.com).
|
|
7
7
|
|
|
8
|
-
Full documentation: [
|
|
9
|
-
[llms.txt](https://
|
|
8
|
+
Full documentation: [s3.dimah.dev/docs/react/ui](https://s3.dimah.dev/docs/react/ui) ·
|
|
9
|
+
[llms.txt](https://s3.dimah.dev/llms.txt)
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ pnpm add @dimah-s3/ui@beta @dimah-s3/core@beta @dimah-s3/react@beta @fuma-transl
|
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
Requires React 19.2. Or copy items from the shadcn registry — see
|
|
18
|
-
[UI Setup](https://
|
|
18
|
+
[UI Setup](https://s3.dimah.dev/docs/react/ui).
|
|
19
19
|
|
|
20
20
|
## Styles
|
|
21
21
|
|
|
@@ -40,7 +40,7 @@ The tokens are `background`, `foreground`, `card`, `card-foreground`,
|
|
|
40
40
|
`border`, `ring`, `destructive`, `success` and `warning`. `success` and
|
|
41
41
|
`warning` read your theme's `--success` / `--warning` when it defines them, and
|
|
42
42
|
fall back to a green and an amber otherwise. See
|
|
43
|
-
[Theming](https://
|
|
43
|
+
[Theming](https://s3.dimah.dev/docs/react/ui/customization/theming).
|
|
44
44
|
|
|
45
45
|
## Quick start
|
|
46
46
|
|
|
@@ -21,6 +21,12 @@ export type FileAttachmentProps = Omit<ComponentProps<"div">, "children"> & {
|
|
|
21
21
|
* cancel, so focus stays on it once the file is back in flight.
|
|
22
22
|
*/
|
|
23
23
|
onRetry?: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* Shows the retry action as unavailable, as in a full `UploadField`: it
|
|
26
|
+
* stays focusable but is `aria-disabled`, and `onRetry` does not run.
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
retryDisabled?: boolean;
|
|
24
30
|
/** Shows a dismiss action when `state` is `done` or `error`. Typically the hook `reset()`. */
|
|
25
31
|
onDismiss?: () => void;
|
|
26
32
|
/** Extra controls, usually `AttachmentAction`s, placed before cancel and dismiss. */
|
|
@@ -39,5 +45,5 @@ export type FileAttachmentProps = Omit<ComponentProps<"div">, "children"> & {
|
|
|
39
45
|
* 9rem content width it stacks the media above the text (for example
|
|
40
46
|
* `className="w-32"`), otherwise it lays out as a row.
|
|
41
47
|
*/
|
|
42
|
-
export declare function FileAttachment({ state, fileName, fileSize, contentType, previewUrl, percent, description, error, onCancel, onRetry, onDismiss, actions, trigger, className, ...props }: FileAttachmentProps): import("react").JSX.Element;
|
|
48
|
+
export declare function FileAttachment({ state, fileName, fileSize, contentType, previewUrl, percent, description, error, onCancel, onRetry, retryDisabled, onDismiss, actions, trigger, className, ...props }: FileAttachmentProps): import("react").JSX.Element;
|
|
43
49
|
//# sourceMappingURL=file-attachment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/attachment/file-attachment.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAiB/C,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IAC1E,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uFAAuF;IACvF,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;IACjC,mHAAmH;IACnH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,8FAA8F;IAC9F,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,qFAAqF;IACrF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,UAAU,EACV,OAAW,EACX,WAAW,EACX,KAAK,EACL,QAAQ,EACR,OAAO,EACP,SAAS,EACT,OAAO,EACP,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,mBAAmB,+
|
|
1
|
+
{"version":3,"file":"file-attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/attachment/file-attachment.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAiB/C,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IAC1E,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uFAAuF;IACvF,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;IACjC,mHAAmH;IACnH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,8FAA8F;IAC9F,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,qFAAqF;IACrF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,UAAU,EACV,OAAW,EACX,WAAW,EACX,KAAK,EACL,QAAQ,EACR,OAAO,EACP,aAAqB,EACrB,SAAS,EACT,OAAO,EACP,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,mBAAmB,+BAiIrB"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { ComponentProps } from "react";
|
|
2
|
+
/** The stem, and a short extension kept visible while the stem shortens. */
|
|
3
|
+
export declare function splitFileName(name: string): {
|
|
4
|
+
stem: string;
|
|
5
|
+
extension: string;
|
|
6
|
+
};
|
|
2
7
|
/** Props for {@link FileName}. Other props go to the outer `<span>`. */
|
|
3
8
|
export type FileNameProps = Omit<ComponentProps<"span">, "children"> & {
|
|
4
9
|
name: string;
|
|
@@ -7,6 +12,11 @@ export type FileNameProps = Omit<ComponentProps<"span">, "children"> & {
|
|
|
7
12
|
* folder names. @default true
|
|
8
13
|
*/
|
|
9
14
|
extension?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Search text to mark in the name. It matches the way list search does:
|
|
17
|
+
* case, accents, and look-alike letters do not count.
|
|
18
|
+
*/
|
|
19
|
+
highlight?: string;
|
|
10
20
|
};
|
|
11
21
|
/**
|
|
12
22
|
* A file name that fits the width it has: the stem ends in an ellipsis and
|
|
@@ -14,5 +24,5 @@ export type FileNameProps = Omit<ComponentProps<"span">, "children"> & {
|
|
|
14
24
|
* (`dir="auto"`), so the name keeps its own direction inside the sentence or
|
|
15
25
|
* row around it, and `title` holds the whole name.
|
|
16
26
|
*/
|
|
17
|
-
export declare function FileName({ name, extension: keepExtension, className, ...props }: FileNameProps): import("react").JSX.Element;
|
|
27
|
+
export declare function FileName({ name, extension: keepExtension, highlight, className, ...props }: FileNameProps): import("react").JSX.Element;
|
|
18
28
|
//# sourceMappingURL=file-name.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-name.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/attachment/file-name.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"file-name.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/attachment/file-name.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AAOvD,4EAA4E;AAC5E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAMA;AAED,wEAAwE;AACxE,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACrE,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA+BF;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,SAAS,EAAE,aAAoB,EAC/B,SAAS,EACT,SAAS,EACT,GAAG,KAAK,EACT,EAAE,aAAa,+BAqBf"}
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { FileIconProps } from "react-file-icon";
|
|
2
|
+
/** What {@link FileTypeGlyph} draws for a file. @internal */
|
|
3
|
+
export type FileTypeGlyphStyle = {
|
|
4
|
+
/** The label on the glyph, or `null` for none. */
|
|
5
|
+
label: string | null;
|
|
6
|
+
styles: Partial<FileIconProps>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The glyph for a file. A known content type picks the style and label,
|
|
10
|
+
* else the file's own extension does. A type with no glyph of its own uses
|
|
11
|
+
* its family's (`image/*`), and anything else a plain document. The label
|
|
12
|
+
* is never another type's: `song.flac` reads `flac`.
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveFileTypeGlyph(fileName: string, contentType?: string | null): FileTypeGlyphStyle;
|
|
3
16
|
export type FileTypeGlyphProps = {
|
|
4
17
|
fileName: string;
|
|
5
18
|
/** MIME type. It wins over the file extension when it is known. */
|
|
@@ -13,8 +26,8 @@ export type FileTypeGlyphProps = {
|
|
|
13
26
|
className?: string;
|
|
14
27
|
};
|
|
15
28
|
/**
|
|
16
|
-
* Colored file glyph for attachment media (no image preview)
|
|
17
|
-
*
|
|
29
|
+
* Colored file glyph for attachment media (no image preview), drawn by
|
|
30
|
+
* `react-file-icon` and labelled with the file's extension.
|
|
18
31
|
*/
|
|
19
32
|
export declare function FileTypeGlyph({ fileName, contentType, layout, className, }: FileTypeGlyphProps): import("react").JSX.Element;
|
|
20
33
|
//# sourceMappingURL=file-type-glyph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-type-glyph.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/attachment/file-type-glyph.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-type-glyph.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/attachment/file-type-glyph.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAwB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAgF3E,6DAA6D;AAC7D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,kDAAkD;IAClD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;CAChC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAC1B,kBAAkB,CAQpB;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,WAAW,EACX,MAAe,EACf,SAAS,GACV,EAAE,kBAAkB,+BAiBpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-confirm-dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/delete/delete-confirm-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAwBzD,iFAAiF;AACjF,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,WAAW,EACX,YAAY,EACZ,WAAW,GACZ,EAAE,wBAAwB,+
|
|
1
|
+
{"version":3,"file":"delete-confirm-dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/delete/delete-confirm-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAwBzD,iFAAiF;AACjF,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,WAAW,EACX,YAAY,EACZ,WAAW,GACZ,EAAE,wBAAwB,+BAkF1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-toasts.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/delete/delete-toasts.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAMzB,sCAAsC;AACtC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,mCAAmC;IACnC,MAAM,EAAE,eAAe,CAAC;CACzB,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,CAAC;AAQF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,iBAAiB,QAG9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,eAAe,EACpB,OAAO,GAAE;IACP,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC3C,GACL,IAAI,
|
|
1
|
+
{"version":3,"file":"delete-toasts.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/delete/delete-toasts.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAMzB,sCAAsC;AACtC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,mCAAmC;IACnC,MAAM,EAAE,eAAe,CAAC;CACzB,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,CAAC;AAQF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,iBAAiB,QAG9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,eAAe,EACpB,OAAO,GAAE;IACP,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC3C,GACL,IAAI,CAgEN"}
|
|
@@ -10,9 +10,11 @@ export type DeleteTriggerProps = ComponentProps<typeof Button> & DeleteTarget &
|
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* Button that asks the nearest `Delete` root to delete one object. It is
|
|
13
|
-
* disabled, and shows a spinner, while that object
|
|
14
|
-
* replace the default icon and label
|
|
15
|
-
*
|
|
13
|
+
* disabled, and shows a spinner, while a delete of that object runs.
|
|
14
|
+
* Children replace the default icon and label; an icon-size button shows
|
|
15
|
+
* the icon alone, so give it an `aria-label`. An `onClick` that prevents
|
|
16
|
+
* the default stops the request. `data-phase` carries the phase of the
|
|
17
|
+
* newest delete of the key.
|
|
16
18
|
*/
|
|
17
|
-
export declare function DeleteTrigger({ objectKey, fileName, fileSize, note, tooltip, variant, disabled, focusableWhenDisabled, onClick, children, ...props }: DeleteTriggerProps): import("react").JSX.Element;
|
|
19
|
+
export declare function DeleteTrigger({ objectKey, fileName, fileSize, note, tooltip, variant, size, disabled, focusableWhenDisabled, onClick, children, ...props }: DeleteTriggerProps): import("react").JSX.Element;
|
|
18
20
|
//# sourceMappingURL=delete-trigger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-trigger.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/delete/delete-trigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAMhD,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,qCAAqC,CAAC;AAE7C,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,GAC5D,YAAY,GAAG;IACb,2CAA2C;IAC3C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,gDAAgD;IAChD,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEJ
|
|
1
|
+
{"version":3,"file":"delete-trigger.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/delete/delete-trigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAMhD,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,qCAAqC,CAAC;AAE7C,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,GAC5D,YAAY,GAAG;IACb,2CAA2C;IAC3C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,gDAAgD;IAChD,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEJ;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,OAAuB,EACvB,IAAI,EACJ,QAAQ,EACR,qBAAqB,EACrB,OAAO,EACP,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,+BAoDpB"}
|
|
@@ -20,6 +20,11 @@ export type DeleteRequestOptions = {
|
|
|
20
20
|
* dialog closes. Defaults to the focused element.
|
|
21
21
|
*/
|
|
22
22
|
trigger?: HTMLElement | null;
|
|
23
|
+
/**
|
|
24
|
+
* Called once this request's delete settles, after the root's
|
|
25
|
+
* `onDeleted`. Not called when the dialog is dismissed.
|
|
26
|
+
*/
|
|
27
|
+
onDeleted?: (result: DeleteResult) => void;
|
|
23
28
|
};
|
|
24
29
|
/** Props for {@link Delete}. */
|
|
25
30
|
export type DeleteProps = {
|
|
@@ -29,7 +34,10 @@ export type DeleteProps = {
|
|
|
29
34
|
confirm?: boolean;
|
|
30
35
|
/** Replaces the default {@link DeleteConfirmDialog}. */
|
|
31
36
|
dialog?: ReactNode;
|
|
32
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Called once per confirmed delete, with every key's outcome. A throw is
|
|
39
|
+
* reported (`reportError`) and does not fail the delete.
|
|
40
|
+
*/
|
|
33
41
|
onDeleted?: (result: DeleteResult) => void;
|
|
34
42
|
/**
|
|
35
43
|
* Where focus goes after the dialog closes. Return `null` to use the
|
|
@@ -43,23 +51,28 @@ export type DeleteProps = {
|
|
|
43
51
|
export type DeleteContextValue = {
|
|
44
52
|
/** The root's `useDelete` return. */
|
|
45
53
|
delete: UseDeleteReturn;
|
|
46
|
-
/** The
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
} | null;
|
|
54
|
+
/** The request the dialog asks about, or `null` while it is closed. */
|
|
55
|
+
confirmation: DeleteConfirmation | null;
|
|
56
|
+
/** `true` while the confirmed request deletes. The dialog stays open. */
|
|
57
|
+
isDeleting: boolean;
|
|
51
58
|
/**
|
|
52
59
|
* Asks to delete `targets`. Opens the confirm dialog, or deletes at once
|
|
53
60
|
* when the root has `confirm={false}`. Replaces a pending request.
|
|
54
61
|
*/
|
|
55
62
|
request: (targets: DeleteTarget | readonly DeleteTarget[], options?: DeleteRequestOptions) => void;
|
|
56
63
|
/**
|
|
57
|
-
* Deletes the
|
|
58
|
-
* the delete runs return the same promise.
|
|
64
|
+
* Deletes the targets of `confirmation`, then closes the dialog. Calls
|
|
65
|
+
* made while the delete runs return the same promise. It never rejects.
|
|
59
66
|
*/
|
|
60
67
|
confirm: () => Promise<DeleteResult>;
|
|
61
68
|
/** Closes the dialog without deleting. Does nothing while deleting. */
|
|
62
|
-
|
|
69
|
+
dismiss: () => void;
|
|
70
|
+
};
|
|
71
|
+
/** A request waiting for confirmation. */
|
|
72
|
+
export type DeleteConfirmation = {
|
|
73
|
+
targets: readonly DeleteTarget[];
|
|
74
|
+
/** Extra content for the dialog, from {@link DeleteRequestOptions.note}. */
|
|
75
|
+
note?: ReactNode;
|
|
63
76
|
};
|
|
64
77
|
/**
|
|
65
78
|
* Root of the delete family. Holds a `useDelete` return and one confirm
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/delete/delete.tsx"],"names":[],"mappings":"AAEA,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGrE,4BAA4B;AAC5B,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kCAAkC;IACl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AAS,YAAY,EAAE,KAAK,WAAW,GAAG,IAAI,CAAC;IACxE,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,6CAA6C;AAC7C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,qCAAqC;IACrC,MAAM,EAAE,eAAe,CAAC;IACxB,uEAAuE;IACvE,YAAY,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACxC,yEAAyE;IACzE,UAAU,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,OAAO,EAAE,CACP,OAAO,EAAE,YAAY,GAAG,SAAS,YAAY,EAAE,EAC/C,OAAO,CAAC,EAAE,oBAAoB,KAC3B,IAAI,CAAC;IACV;;;OAGG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;IACrC,uEAAuE;IACvE,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,0CAA0C;AAC1C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;IACjC,4EAA4E;IAC5E,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAwBF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,YAAmB,EAC5B,MAAM,EACN,SAAS,EACT,YAAY,EACZ,QAAQ,GACT,EAAE,WAAW,+BA4Hb;AAED,uEAAuE;AACvE,wBAAgB,gBAAgB,IAAI,kBAAkB,CAQrD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
2
|
/** Props for {@link DownloadProgress}. Other props go to the progressbar element. */
|
|
3
3
|
export type DownloadProgressProps = {
|
|
4
4
|
/** S3 object key whose download to show. */
|
|
5
5
|
objectKey: string;
|
|
6
|
-
} &
|
|
6
|
+
} & ComponentProps<"div">;
|
|
7
7
|
/**
|
|
8
8
|
* Progress bar for the running `useFetchDownload` call of one key, with the
|
|
9
9
|
* file name and the bytes received. It has `role="progressbar"` and is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download-progress.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/download/download-progress.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAW5C,qFAAqF;AACrF,MAAM,MAAM,qBAAqB,GAAG;IAClC,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"download-progress.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/download/download-progress.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAW5C,qFAAqF;AACrF,MAAM,MAAM,qBAAqB,GAAG;IAClC,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE1B;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,SAAS,EACT,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,qBAAqB,sCAiEvB"}
|
|
@@ -26,6 +26,7 @@ export type DownloadTriggerProps = ComponentProps<typeof Button> & {
|
|
|
26
26
|
* icon-size button shows only the cancel icon.
|
|
27
27
|
*
|
|
28
28
|
* `children` replace the default icon and label while no cancel is offered.
|
|
29
|
+
* An icon-size button shows the icon alone, so give it an `aria-label`.
|
|
29
30
|
* `data-phase` carries the phase of the newest call for the key.
|
|
30
31
|
*/
|
|
31
32
|
export declare function DownloadTrigger({ objectKey, fileName, fileSize, tooltip, children, className, disabled, focusableWhenDisabled, onClick, variant, size, "aria-label": ariaLabel, ...props }: DownloadTriggerProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download-trigger.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/download/download-trigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAQhD,yEAAyE;AACzE,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IACjE;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kGAAkG;IAClG,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gDAAgD;IAChD,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"download-trigger.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/download/download-trigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAQhD,yEAAyE;AACzE,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IACjE;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kGAAkG;IAClG,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gDAAgD;IAChD,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,qBAAqB,EACrB,OAAO,EACP,OAAmB,EACnB,IAAI,EACJ,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,oBAAoB,+BAuGtB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Opens list UI that lives inside `ObjectList` from a shortcut or menu
|
|
3
|
+
* outside it. Create it with {@link useObjectListCommands} and pass it to
|
|
4
|
+
* `ObjectList` as `commands`. Calls before the list mounts do nothing.
|
|
5
|
+
*/
|
|
6
|
+
export type ObjectListCommands = {
|
|
7
|
+
/**
|
|
8
|
+
* Opens the New folder name field. Does nothing when the source has no
|
|
9
|
+
* `createFolder`.
|
|
10
|
+
*/
|
|
11
|
+
startNewFolder: () => void;
|
|
12
|
+
/**
|
|
13
|
+
* Opens the actions menu of the entry with this key. Does nothing when
|
|
14
|
+
* that entry is not on screen.
|
|
15
|
+
*/
|
|
16
|
+
openMenu: (entryKey: string) => void;
|
|
17
|
+
};
|
|
18
|
+
type CommandHost = {
|
|
19
|
+
startNewFolder: () => void;
|
|
20
|
+
openMenu: (entryKey: string) => void;
|
|
21
|
+
};
|
|
22
|
+
export declare function useObjectListCommands(): ObjectListCommands;
|
|
23
|
+
/** Points `commands` at the mounted list. `null` detaches it. @internal */
|
|
24
|
+
export declare function bindObjectListCommands(commands: ObjectListCommands, host: CommandHost | null): void;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=object-list-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-list-commands.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-commands.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B;;;OAGG;IACH,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAC;AAqBF,wBAAgB,qBAAqB,IAAI,kBAAkB,CAG1D;AAED,2EAA2E;AAC3E,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,kBAAkB,EAC5B,IAAI,EAAE,WAAW,GAAG,IAAI,GACvB,IAAI,CAGN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-list-content.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"object-list-content.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-content.tsx"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAuDtE"}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { AnyDownloadReturn, ObjectListEntry, ObjectListFolder, UseDeleteReturn, UseDownloadReturn, UseObjectListReturn, UseObjectListSelectionReturn, UseUploadReturn } from "@dimah-s3/react";
|
|
2
|
+
import type { AnyDownloadReturn, DropTargetProps, ObjectListEntry, ObjectListFolder, UseDeleteReturn, UseDownloadReturn, UseObjectListReturn, UseObjectListSelectionReturn, UseUploadReturn } from "@dimah-s3/react";
|
|
3
3
|
/** `list` draws one row per entry. `grid` draws tiles with larger previews. */
|
|
4
4
|
export type ObjectListView = "list" | "grid";
|
|
5
|
+
/** `auto` loads the next page on scroll; `button` waits for Load more. */
|
|
6
|
+
export type ObjectListPagination = "auto" | "button";
|
|
5
7
|
/** Per-entry render hooks. Each returns the default when left out. */
|
|
6
8
|
export type ObjectListRenderers<TItem> = {
|
|
7
9
|
/** Replaces the whole row or tile. Compose `ObjectListRow` or `ObjectListTile` to keep selection. */
|
|
8
10
|
renderEntry?: (entry: ObjectListEntry<TItem>) => ReactNode;
|
|
9
11
|
/**
|
|
10
12
|
* Trailing controls. Defaults to `ObjectListItemMenu` on files when the
|
|
11
|
-
* list has `download`, `share`, or `
|
|
12
|
-
* can be uploaded into them
|
|
13
|
+
* list has `download`, `share`, `delete`, or `renameFile`, and on folders
|
|
14
|
+
* when files can be uploaded into them or the source has `renameFolder`.
|
|
15
|
+
* Return `null` to hide them.
|
|
13
16
|
*/
|
|
14
17
|
renderActions?: (entry: ObjectListEntry<TItem>) => ReactNode;
|
|
15
18
|
/**
|
|
@@ -51,13 +54,110 @@ export type ObjectListContextValue<TItem> = ObjectListRenderers<TItem> & {
|
|
|
51
54
|
showBreadcrumb: boolean;
|
|
52
55
|
selectionActions: ReactNode;
|
|
53
56
|
empty: ReactNode;
|
|
54
|
-
|
|
57
|
+
pagination: ObjectListPagination;
|
|
55
58
|
onOpenItem: ((item: TItem) => void) | undefined;
|
|
56
59
|
/** Object keys stored in a folder. Lets bulk delete include folders. */
|
|
57
60
|
resolveFolderKeys: ((folder: ObjectListFolder) => Promise<readonly string[]>) | undefined;
|
|
61
|
+
/** Entry key whose name is a field, or `null`. */
|
|
62
|
+
renamingKey: string | null;
|
|
63
|
+
/** The New folder name field is open. */
|
|
64
|
+
newFolderOpen: boolean;
|
|
65
|
+
/** Opens or closes the New folder name field. */
|
|
66
|
+
setNewFolderOpen: (open: boolean) => void;
|
|
67
|
+
/** Turn that entry's name into the rename field. */
|
|
68
|
+
startRename: (key: string) => void;
|
|
69
|
+
/**
|
|
70
|
+
* Close the rename field of entry `key`, if it is still the one open.
|
|
71
|
+
* With `focus`, the row takes focus once its button is back.
|
|
72
|
+
*/
|
|
73
|
+
endRename: (key: string, focus?: boolean) => void;
|
|
74
|
+
/**
|
|
75
|
+
* Leave the search and open the folder that holds a search result (its
|
|
76
|
+
* `location`), then focus the entry there once it loads.
|
|
77
|
+
*/
|
|
78
|
+
revealEntry: (entry: ObjectListEntry<TItem>) => void;
|
|
58
79
|
};
|
|
59
|
-
|
|
80
|
+
/**
|
|
81
|
+
* What rows, tiles, and their menus read. It changes only when a feature,
|
|
82
|
+
* a renderer, or a command changes, not on every upload tick, so memoized
|
|
83
|
+
* rows skip those renders. Per-entry state comes from `store`. @internal
|
|
84
|
+
*/
|
|
85
|
+
export type ObjectListEntryScope<TItem> = Omit<ObjectListRenderers<TItem>, "renderEntry"> & {
|
|
86
|
+
store: ObjectListEntryStore;
|
|
87
|
+
/**
|
|
88
|
+
* Keys of the entries the selection can select. It changes with the
|
|
89
|
+
* entries, so a new entry draws with its checkbox at once.
|
|
90
|
+
*/
|
|
91
|
+
selectable: ReadonlySet<string>;
|
|
92
|
+
/** File rows open: `onOpenItem` is set. */
|
|
93
|
+
opensFiles: boolean;
|
|
94
|
+
/** Files can be uploaded into folder rows. */
|
|
95
|
+
folderUploads: boolean;
|
|
96
|
+
/** The list has `download`. */
|
|
97
|
+
download: boolean;
|
|
98
|
+
/** Copy link can sign: `share`, or a navigate-mode `download`. */
|
|
99
|
+
share: boolean;
|
|
100
|
+
/** The list has `delete`. */
|
|
101
|
+
delete: boolean;
|
|
102
|
+
renameFile: boolean;
|
|
103
|
+
renameFolder: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* The search text while a search is on, else `""`. Entries mark it in
|
|
106
|
+
* their names and show where they live.
|
|
107
|
+
*/
|
|
108
|
+
search: string;
|
|
109
|
+
/** Opens a folder in place, or calls `onOpenItem` for a file. */
|
|
110
|
+
open: (entry: ObjectListEntry<TItem>) => void;
|
|
111
|
+
/** `selection.toggle`. */
|
|
112
|
+
toggle: (key: string, options?: {
|
|
113
|
+
range?: boolean;
|
|
114
|
+
value?: boolean;
|
|
115
|
+
}) => void;
|
|
116
|
+
/** Drop handlers that upload into folder `id`, with the latest options. */
|
|
117
|
+
folderDropTarget: (id: string) => DropTargetProps;
|
|
118
|
+
startRename: (key: string) => void;
|
|
119
|
+
endRename: (key: string, focus?: boolean) => void;
|
|
120
|
+
revealEntry: (entry: ObjectListEntry<TItem>) => void;
|
|
121
|
+
};
|
|
122
|
+
/** State each entry reads by its key. @internal */
|
|
123
|
+
export type ObjectListEntryState = {
|
|
124
|
+
selected: ReadonlySet<string>;
|
|
125
|
+
/** Any entry is selected. */
|
|
126
|
+
selecting: boolean;
|
|
127
|
+
/** The entry whose name is a field. */
|
|
128
|
+
renaming: string | null;
|
|
129
|
+
/** The entry whose actions menu is open. */
|
|
130
|
+
menu: string | null;
|
|
131
|
+
/** The entry whose trigger takes Tab: the last one focused, else the first. */
|
|
132
|
+
tabStop: string | null;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Holds {@link ObjectListEntryState}. An entry subscribes to its own key,
|
|
136
|
+
* so a selection, a rename, or an arrow key draws only the entries whose
|
|
137
|
+
* state changed. @internal
|
|
138
|
+
*/
|
|
139
|
+
export type ObjectListEntryStore = {
|
|
140
|
+
get: () => ObjectListEntryState;
|
|
141
|
+
set: (next: Partial<ObjectListEntryState>) => void;
|
|
142
|
+
subscribe: (listener: () => void) => () => void;
|
|
143
|
+
};
|
|
144
|
+
/** @internal */
|
|
145
|
+
export declare function createObjectListEntryStore(initial: ObjectListEntryState): ObjectListEntryStore;
|
|
146
|
+
/** What `ObjectListHeader` shares with the controls inside it. @internal */
|
|
147
|
+
export type ObjectListHeaderContextValue = {
|
|
148
|
+
/** A search field inside the header is open and takes the whole bar. */
|
|
149
|
+
setSearchExpanded: (expanded: boolean) => void;
|
|
150
|
+
/** The new-folder field is open and takes the whole bar. */
|
|
151
|
+
setFolderExpanded: (expanded: boolean) => void;
|
|
152
|
+
};
|
|
153
|
+
/** @internal */
|
|
154
|
+
export declare const ObjectListHeaderContext: import("react").Context<ObjectListHeaderContextValue | null>;
|
|
155
|
+
/** The nearest `ObjectListHeader`, or `null` outside one. @internal */
|
|
156
|
+
export declare function useOptionalObjectListHeader(): ObjectListHeaderContextValue | null;
|
|
157
|
+
export declare function ObjectListProvider<TItem>({ value, scope, children, }: {
|
|
60
158
|
value: ObjectListContextValue<TItem>;
|
|
159
|
+
/** What entries read. Parts that draw no entries can do without it. */
|
|
160
|
+
scope?: ObjectListEntryScope<TItem>;
|
|
61
161
|
children: ReactNode;
|
|
62
162
|
}): import("react").JSX.Element;
|
|
63
163
|
export declare function ObjectListEntryProvider<TItem>({ entry, children, }: {
|
|
@@ -73,4 +173,23 @@ export declare function useObjectListContext<TItem = unknown>(): ObjectListConte
|
|
|
73
173
|
export declare function useOptionalObjectListContext<TItem = unknown>(): ObjectListContextValue<TItem> | null;
|
|
74
174
|
/** The entry a row or tile renders. `null` outside one. */
|
|
75
175
|
export declare function useObjectListEntry<TItem = unknown>(): ObjectListEntry<TItem> | null;
|
|
176
|
+
/** The nearest list's {@link ObjectListEntryScope}, or `null`. @internal */
|
|
177
|
+
export declare function useOptionalObjectListEntryScope<TItem = unknown>(): ObjectListEntryScope<TItem> | null;
|
|
178
|
+
/** Like {@link useOptionalObjectListEntryScope}, inside a list only. @internal */
|
|
179
|
+
export declare function useObjectListEntryScope<TItem = unknown>(): ObjectListEntryScope<TItem>;
|
|
180
|
+
/** What one entry shows. @internal */
|
|
181
|
+
export type ObjectListEntryStatus = {
|
|
182
|
+
selectable: boolean;
|
|
183
|
+
selected: boolean;
|
|
184
|
+
/** Any entry in the list is selected. */
|
|
185
|
+
selecting: boolean;
|
|
186
|
+
renaming: boolean;
|
|
187
|
+
/** This entry's trigger takes Tab. */
|
|
188
|
+
tabStop: boolean;
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* The state of entry `key`. Renders again only when that entry's state
|
|
192
|
+
* changes. @internal
|
|
193
|
+
*/
|
|
194
|
+
export declare function useObjectListEntryStatus(key: string): ObjectListEntryStatus;
|
|
76
195
|
//# sourceMappingURL=object-list-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-list-context.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-context.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"object-list-context.d.ts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,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAYA;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,EAC7C,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAMA;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,GAAG,OAAO,KACZ,sBAAsB,CAAC,KAAK,CAAC,CAQjC;AAED,6EAA6E;AAC7E,wBAAgB,4BAA4B,CAC1C,KAAK,GAAG,OAAO,KACZ,sBAAsB,CAAC,KAAK,CAAC,GAAG,IAAI,CAExC;AAED,2DAA2D;AAC3D,wBAAgB,kBAAkB,CAChC,KAAK,GAAG,OAAO,KACZ,eAAe,CAAC,KAAK,CAAC,GAAG,IAAI,CAEjC;AAED,4EAA4E;AAC5E,wBAAgB,+BAA+B,CAC7C,KAAK,GAAG,OAAO,KACZ,oBAAoB,CAAC,KAAK,CAAC,GAAG,IAAI,CAItC;AAED,kFAAkF;AAClF,wBAAgB,uBAAuB,CACrC,KAAK,GAAG,OAAO,KACZ,oBAAoB,CAAC,KAAK,CAAC,CAQ/B;AAOD,sCAAsC;AACtC,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,yCAAyC;IACzC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAY3E"}
|
|
@@ -1,28 +1,4 @@
|
|
|
1
1
|
import type { ObjectListSortDirection } from "@dimah-s3/react";
|
|
2
|
-
/** Props for {@link ObjectListSearch}. */
|
|
3
|
-
export type ObjectListSearchProps = {
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
/** Milliseconds to wait after typing before the list reloads. @default 250 */
|
|
6
|
-
delay?: number;
|
|
7
|
-
/**
|
|
8
|
-
* Inside `ObjectListHeader`, start as a search button that opens into a
|
|
9
|
-
* field across the whole bar. `false` keeps the field in the bar. Outside
|
|
10
|
-
* a header the field always shows. @default true
|
|
11
|
-
*/
|
|
12
|
-
collapsible?: boolean;
|
|
13
|
-
className?: string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Search for `list.search`. The query receives the text; the source
|
|
17
|
-
* decides what matches (`memoryObjectSource` matches names).
|
|
18
|
-
*
|
|
19
|
-
* Inside `ObjectListHeader` it is a search button. A click opens a field
|
|
20
|
-
* across the whole bar and focuses it; the field stays open while it has
|
|
21
|
-
* text. Escape clears the text, then closes the field. Close search clears
|
|
22
|
-
* and closes it, and focus returns to the button. An empty field also
|
|
23
|
-
* closes when focus leaves it. Render it as a direct child of the header.
|
|
24
|
-
*/
|
|
25
|
-
export declare function ObjectListSearch({ placeholder, delay, collapsible, className, }: ObjectListSearchProps): import("react").JSX.Element;
|
|
26
2
|
/** One choice in {@link ObjectListSortMenu}. */
|
|
27
3
|
export type ObjectListSortOption = {
|
|
28
4
|
/** Sent to the query as `sort.field`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-list-controls.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-controls.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"object-list-controls.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-controls.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAqB/D,gDAAgD;AAChD,MAAM,MAAM,oBAAoB,GAAG;IACjC,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,SAAS,GACV,EAAE;IACD,OAAO,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BA+EA;AAED,mDAAmD;AACnD,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAyCzE"}
|
|
@@ -14,15 +14,20 @@ export type ObjectListEntryProps<TItem> = {
|
|
|
14
14
|
media?: ReactNode;
|
|
15
15
|
};
|
|
16
16
|
/** Checkbox for an entry or the select-all control. Reports Shift. */
|
|
17
|
-
export declare function ObjectListCheckbox({ checked, indeterminate, label, onCheckedChange, className, }: {
|
|
17
|
+
export declare function ObjectListCheckbox({ checked, indeterminate, label, onCheckedChange, tabIndex, className, }: {
|
|
18
18
|
checked: boolean;
|
|
19
19
|
indeterminate?: boolean;
|
|
20
20
|
label: string;
|
|
21
21
|
onCheckedChange: (checked: boolean, shiftKey: boolean) => void;
|
|
22
|
+
/** `-1` inside an entry: arrow keys and Tab from the entry reach it. */
|
|
23
|
+
tabIndex?: number;
|
|
22
24
|
className?: string;
|
|
23
25
|
}): import("react").JSX.Element;
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
/**
|
|
27
|
+
* One row in the `list` view. Memoized: it draws again when its props or
|
|
28
|
+
* its own state change, not on every change of the list.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ObjectListRow: <TItem>(props: ObjectListEntryProps<TItem>) => ReactNode;
|
|
31
|
+
/** One tile in the `grid` view. Memoized like {@link ObjectListRow}. */
|
|
32
|
+
export declare const ObjectListTile: <TItem>(props: ObjectListEntryProps<TItem>) => ReactNode;
|
|
28
33
|
//# sourceMappingURL=object-list-entry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-list-entry.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-entry.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"object-list-entry.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-entry.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,iBAAiB,CAAC;AAezB,wEAAwE;AACxE,MAAM,MAAM,oBAAoB,CAAC,KAAK,IAAI;IACxC,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,iEAAiE;IACjE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,iDAAiD;IACjD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,sCAAsC;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,sEAAsE;AACtE,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,aAAa,EACb,KAAK,EACL,eAAe,EACf,QAAQ,EACR,SAAS,GACV,EAAE;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/D,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAwBA;AASD;;;GAGG;AACH,eAAO,MAAM,aAAa,EAkFpB,CAAC,KAAK,EAAE,KAAK,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC;AAE/D,wEAAwE;AACxE,eAAO,MAAM,cAAc,EAmFrB,CAAC,KAAK,EAAE,KAAK,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC"}
|
|
@@ -19,8 +19,15 @@ export declare function useObjectListAnnouncement(): {
|
|
|
19
19
|
announcement: ObjectListAnnouncement | null;
|
|
20
20
|
announce: (feedback: ObjectListFeedback) => void;
|
|
21
21
|
};
|
|
22
|
-
/**
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* The list's polite live region, mounted with the list so a change is read
|
|
24
|
+
* out from the first one. It reads `status`, such as the selection count,
|
|
25
|
+
* and `search`, the result count, whenever they change, and list feedback
|
|
26
|
+
* while the list's toasts are off. @internal
|
|
27
|
+
*/
|
|
28
|
+
export declare function ObjectListAnnouncer({ announcement, status, search, }: {
|
|
24
29
|
announcement: ObjectListAnnouncement | null;
|
|
30
|
+
status: string | null;
|
|
31
|
+
search?: string | null;
|
|
25
32
|
}): import("react").JSX.Element;
|
|
26
33
|
//# sourceMappingURL=object-list-feedback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-list-feedback.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-feedback.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,gDAAgD,CAAC;AAExD;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,CACvC,QAAQ,EAAE,kBAAkB,KACzB,IAAI,CAUR;AAED,2DAA2D;AAC3D,MAAM,MAAM,sBAAsB,GAAG;IACnC,iEAAiE;IACjE,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,kBAAkB,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,yBAAyB;;yBAGC,kBAAkB;EAO3D;AAED
|
|
1
|
+
{"version":3,"file":"object-list-feedback.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/list/object-list-feedback.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,gDAAgD,CAAC;AAExD;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,CACvC,QAAQ,EAAE,kBAAkB,KACzB,IAAI,CAUR;AAED,2DAA2D;AAC3D,MAAM,MAAM,sBAAsB,GAAG;IACnC,iEAAiE;IACjE,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,kBAAkB,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,yBAAyB;;yBAGC,kBAAkB;EAO3D;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,YAAY,EACZ,MAAM,EACN,MAAa,GACd,EAAE;IACD,YAAY,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC5C,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,+BAmBA"}
|