@dimah-s3/ui 1.7.1 → 2.0.0-beta.0
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 +73 -16
- package/css/shadcn.css +57 -23
- package/dist/components/dimah-s3/attachment/circle-progress.d.ts +14 -5
- package/dist/components/dimah-s3/attachment/circle-progress.d.ts.map +1 -1
- package/dist/components/dimah-s3/attachment/dismiss-attachment-action.d.ts +6 -2
- package/dist/components/dimah-s3/attachment/dismiss-attachment-action.d.ts.map +1 -1
- package/dist/components/dimah-s3/attachment/file-attachment.d.ts +33 -18
- package/dist/components/dimah-s3/attachment/file-attachment.d.ts.map +1 -1
- package/dist/components/dimah-s3/attachment/file-name.d.ts +18 -0
- package/dist/components/dimah-s3/attachment/file-name.d.ts.map +1 -0
- package/dist/{lib/file-type-icon.d.ts → components/dimah-s3/attachment/file-type-glyph.d.ts} +5 -11
- package/dist/components/dimah-s3/attachment/file-type-glyph.d.ts.map +1 -0
- package/dist/components/dimah-s3/attachment/folder-glyph.d.ts +9 -0
- package/dist/components/dimah-s3/attachment/folder-glyph.d.ts.map +1 -0
- package/dist/components/dimah-s3/attachment/status-attachment.d.ts +9 -11
- package/dist/components/dimah-s3/attachment/status-attachment.d.ts.map +1 -1
- package/dist/components/dimah-s3/delete/delete-confirm-dialog.d.ts +20 -0
- package/dist/components/dimah-s3/delete/delete-confirm-dialog.d.ts.map +1 -0
- package/dist/components/dimah-s3/delete/delete-toasts.d.ts +34 -0
- package/dist/components/dimah-s3/delete/delete-toasts.d.ts.map +1 -0
- package/dist/components/dimah-s3/delete/delete-trigger.d.ts +18 -0
- package/dist/components/dimah-s3/delete/delete-trigger.d.ts.map +1 -0
- package/dist/components/dimah-s3/delete/delete.d.ts +83 -0
- package/dist/components/dimah-s3/delete/delete.d.ts.map +1 -0
- package/dist/components/dimah-s3/download/download-progress.d.ts +16 -0
- package/dist/components/dimah-s3/download/download-progress.d.ts.map +1 -0
- package/dist/components/dimah-s3/download/download-toasts.d.ts +25 -0
- package/dist/components/dimah-s3/download/download-toasts.d.ts.map +1 -0
- package/dist/components/dimah-s3/download/download-trigger.d.ts +32 -0
- package/dist/components/dimah-s3/download/download-trigger.d.ts.map +1 -0
- package/dist/components/dimah-s3/download/download.d.ts +30 -0
- package/dist/components/dimah-s3/download/download.d.ts.map +1 -0
- package/dist/components/dimah-s3/list/object-list-breadcrumb.d.ts +6 -5
- package/dist/components/dimah-s3/list/object-list-breadcrumb.d.ts.map +1 -1
- package/dist/components/dimah-s3/list/object-list-content.d.ts +8 -0
- package/dist/components/dimah-s3/list/object-list-content.d.ts.map +1 -0
- package/dist/components/dimah-s3/list/object-list-context.d.ts +76 -0
- package/dist/components/dimah-s3/list/object-list-context.d.ts.map +1 -0
- package/dist/components/dimah-s3/list/object-list-controls.d.ts +46 -0
- package/dist/components/dimah-s3/list/object-list-controls.d.ts.map +1 -0
- package/dist/components/dimah-s3/list/object-list-entry.d.ts +28 -0
- package/dist/components/dimah-s3/list/object-list-entry.d.ts.map +1 -0
- package/dist/components/dimah-s3/list/object-list-feedback.d.ts +26 -0
- package/dist/components/dimah-s3/list/object-list-feedback.d.ts.map +1 -0
- package/dist/components/dimah-s3/list/object-list-header.d.ts +81 -0
- package/dist/components/dimah-s3/list/object-list-header.d.ts.map +1 -0
- package/dist/components/dimah-s3/list/object-list-item-menu.d.ts +65 -0
- package/dist/components/dimah-s3/list/object-list-item-menu.d.ts.map +1 -0
- package/dist/components/dimah-s3/list/object-list-keyboard.d.ts +21 -0
- package/dist/components/dimah-s3/list/object-list-keyboard.d.ts.map +1 -0
- package/dist/components/dimah-s3/list/object-list-states.d.ts +25 -11
- package/dist/components/dimah-s3/list/object-list-states.d.ts.map +1 -1
- package/dist/components/dimah-s3/list/object-list-upload.d.ts +29 -6
- package/dist/components/dimah-s3/list/object-list-upload.d.ts.map +1 -1
- package/dist/components/dimah-s3/list/object-list-usage.d.ts +8 -6
- package/dist/components/dimah-s3/list/object-list-usage.d.ts.map +1 -1
- package/dist/components/dimah-s3/list/object-list.d.ts +78 -137
- package/dist/components/dimah-s3/list/object-list.d.ts.map +1 -1
- package/dist/components/dimah-s3/preview/object-card.d.ts +38 -0
- package/dist/components/dimah-s3/preview/object-card.d.ts.map +1 -0
- package/dist/components/dimah-s3/preview/object-image.d.ts +30 -0
- package/dist/components/dimah-s3/preview/object-image.d.ts.map +1 -0
- package/dist/components/dimah-s3/upload/avatar-upload.d.ts +47 -0
- package/dist/components/dimah-s3/upload/avatar-upload.d.ts.map +1 -0
- package/dist/components/dimah-s3/upload/upload-dropzone.d.ts +48 -25
- package/dist/components/dimah-s3/upload/upload-dropzone.d.ts.map +1 -1
- package/dist/components/dimah-s3/upload/upload-field.d.ts +96 -0
- package/dist/components/dimah-s3/upload/upload-field.d.ts.map +1 -0
- package/dist/components/dimah-s3/upload/upload-file-list.d.ts +34 -0
- package/dist/components/dimah-s3/upload/upload-file-list.d.ts.map +1 -0
- package/dist/components/dimah-s3/upload/upload-status.d.ts +25 -20
- package/dist/components/dimah-s3/upload/upload-status.d.ts.map +1 -1
- package/dist/components/dimah-s3/upload/upload-toasts.d.ts +23 -0
- package/dist/components/dimah-s3/upload/upload-toasts.d.ts.map +1 -0
- package/dist/components/dimah-s3/upload/upload-trigger.d.ts +23 -0
- package/dist/components/dimah-s3/upload/upload-trigger.d.ts.map +1 -0
- package/dist/components/dimah-s3/upload/upload.d.ts +79 -0
- package/dist/components/dimah-s3/upload/upload.d.ts.map +1 -0
- package/dist/hooks/use-file-preview.d.ts +7 -0
- package/dist/hooks/use-file-preview.d.ts.map +1 -0
- package/dist/hooks/use-own-drag.d.ts +17 -0
- package/dist/hooks/use-own-drag.d.ts.map +1 -0
- package/dist/hooks/use-paste-files.d.ts +18 -0
- package/dist/hooks/use-paste-files.d.ts.map +1 -0
- package/dist/hooks/use-toast-owner.d.ts +16 -0
- package/dist/hooks/use-toast-owner.d.ts.map +1 -0
- package/dist/index.d.ts +39 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4226 -2676
- package/dist/index.js.map +1 -1
- package/dist/lib/attachment-layout.d.ts +3 -33
- package/dist/lib/attachment-layout.d.ts.map +1 -1
- package/dist/lib/format-expires-in.d.ts +2 -2
- package/dist/lib/format-expires-in.d.ts.map +1 -1
- package/dist/lib/is-field-target.d.ts +6 -0
- package/dist/lib/is-field-target.d.ts.map +1 -0
- package/dist/lib/upload-hints.d.ts +16 -0
- package/dist/lib/upload-hints.d.ts.map +1 -0
- package/package.json +24 -13
- package/styles.css +4 -3
- package/dist/components/dimah-s3/delete/delete-button.d.ts +0 -43
- package/dist/components/dimah-s3/delete/delete-button.d.ts.map +0 -1
- package/dist/components/dimah-s3/download/download-button.d.ts +0 -39
- package/dist/components/dimah-s3/download/download-button.d.ts.map +0 -1
- package/dist/components/dimah-s3/download/progress-download-button.d.ts +0 -44
- package/dist/components/dimah-s3/download/progress-download-button.d.ts.map +0 -1
- package/dist/components/dimah-s3/list/object-list-menu.d.ts +0 -65
- package/dist/components/dimah-s3/list/object-list-menu.d.ts.map +0 -1
- package/dist/components/dimah-s3/list/object-list-rows.d.ts +0 -32
- package/dist/components/dimah-s3/list/object-list-rows.d.ts.map +0 -1
- package/dist/components/dimah-s3/list/object-list-selection-state.d.ts +0 -38
- package/dist/components/dimah-s3/list/object-list-selection-state.d.ts.map +0 -1
- package/dist/components/dimah-s3/list/object-list-selection.d.ts +0 -36
- package/dist/components/dimah-s3/list/object-list-selection.d.ts.map +0 -1
- package/dist/components/dimah-s3/upload/multi-upload-status.d.ts +0 -8
- package/dist/components/dimah-s3/upload/multi-upload-status.d.ts.map +0 -1
- package/dist/components/dimah-s3/upload/upload-button.d.ts +0 -32
- package/dist/components/dimah-s3/upload/upload-button.d.ts.map +0 -1
- package/dist/hooks/use-delete-toast.d.ts +0 -12
- package/dist/hooks/use-delete-toast.d.ts.map +0 -1
- package/dist/hooks/use-delete-ui.d.ts +0 -16
- package/dist/hooks/use-delete-ui.d.ts.map +0 -1
- package/dist/hooks/use-download-toast.d.ts +0 -17
- package/dist/hooks/use-download-toast.d.ts.map +0 -1
- package/dist/hooks/use-download-ui.d.ts +0 -19
- package/dist/hooks/use-download-ui.d.ts.map +0 -1
- package/dist/hooks/use-file-reject-toast.d.ts +0 -7
- package/dist/hooks/use-file-reject-toast.d.ts.map +0 -1
- package/dist/hooks/use-upload-toast.d.ts +0 -7
- package/dist/hooks/use-upload-toast.d.ts.map +0 -1
- package/dist/hooks/use-upload-ui.d.ts +0 -13
- package/dist/hooks/use-upload-ui.d.ts.map +0 -1
- package/dist/lib/file-type-icon.d.ts.map +0 -1
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type UseDeleteReturn } from "@dimah-s3/react";
|
|
2
|
-
import type { AttachmentLayoutAliases } from "../lib/attachment-layout.js";
|
|
3
|
-
export type UseDeleteUiOptions = AttachmentLayoutAliases & {
|
|
4
|
-
toast?: boolean;
|
|
5
|
-
objectKey: string;
|
|
6
|
-
displayName: string;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Toasts + success/error status for a `useDelete` return.
|
|
10
|
-
* Status only renders for the matching `objectKey` so a list can share
|
|
11
|
-
* one hook instance. Dismiss calls `delete.reset()`.
|
|
12
|
-
*/
|
|
13
|
-
export declare function useDeleteUi(del: UseDeleteReturn, { toast: enableToast, objectKey, displayName, attachmentSize, attachmentOrientation, }: UseDeleteUiOptions): {
|
|
14
|
-
statusNode: import("react").JSX.Element | null;
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=use-delete-ui.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-delete-ui.d.ts","sourceRoot":"","sources":["../../src/hooks/use-delete-ui.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAI5E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAGvE,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,GAAG;IACzD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,eAAe,EACpB,EACE,KAAK,EAAE,WAAkB,EACzB,SAAS,EACT,WAAW,EACX,cAAc,EACd,qBAAqB,GACtB,EAAE,kBAAkB;;EAoCtB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type UseDownloadReturn } from "@dimah-s3/react";
|
|
2
|
-
export type DownloadToastTarget = UseDownloadReturn;
|
|
3
|
-
export type DownloadToastOptions = {
|
|
4
|
-
enabled?: boolean;
|
|
5
|
-
/** S3 object key — named `objectKey` because React reserves `key`. */
|
|
6
|
-
objectKey: string;
|
|
7
|
-
fileName?: string;
|
|
8
|
-
fileSize?: number;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Drives toasts from a `useDownload` return.
|
|
12
|
-
* Shared by DownloadButton and ProgressDownloadButton.
|
|
13
|
-
* Only the control whose `objectKey` matches the hook's active key toasts,
|
|
14
|
-
* so a list can share one hook instance.
|
|
15
|
-
*/
|
|
16
|
-
export declare function useDownloadToast(download: DownloadToastTarget, { enabled, objectKey, fileName, fileSize }: DownloadToastOptions): void;
|
|
17
|
-
//# sourceMappingURL=use-download-toast.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-download-toast.d.ts","sourceRoot":"","sources":["../../src/hooks/use-download-toast.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,iBAAiB,CAAC;AAIzB,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAEpD,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,mBAAmB,EAC7B,EAAE,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,oBAAoB,QAiKxE"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type UseDownloadReturn } from "@dimah-s3/react";
|
|
2
|
-
import type { AttachmentLayoutAliases } from "../lib/attachment-layout.js";
|
|
3
|
-
export type UseDownloadUiOptions = AttachmentLayoutAliases & {
|
|
4
|
-
toast?: boolean;
|
|
5
|
-
objectKey: string;
|
|
6
|
-
fileName?: string;
|
|
7
|
-
fileSize?: number;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Toasts + success/error status for a `useDownload` return.
|
|
11
|
-
* Status only renders for the matching `objectKey` so a list can share
|
|
12
|
-
* one hook instance. Dismiss calls `download.reset()`.
|
|
13
|
-
*/
|
|
14
|
-
export declare function useDownloadUi(download: UseDownloadReturn, { toast: enableToast, objectKey, fileName, fileSize, attachmentSize, attachmentOrientation, }: UseDownloadUiOptions): {
|
|
15
|
-
statusNode: null;
|
|
16
|
-
} | {
|
|
17
|
-
statusNode: import("react").JSX.Element;
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=use-download-ui.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-download-ui.d.ts","sourceRoot":"","sources":["../../src/hooks/use-download-ui.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAI9E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAEvE,MAAM,MAAM,oBAAoB,GAAG,uBAAuB,GAAG;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,iBAAiB,EAC3B,EACE,KAAK,EAAE,WAAkB,EACzB,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,qBAAqB,GACtB,EAAE,oBAAoB;;;;EAiDxB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type FileRejection } from "@dimah-s3/react";
|
|
2
|
-
/**
|
|
3
|
-
* Toasts soft dropzone rejections (type / size / count).
|
|
4
|
-
* Shared by UploadButton and UploadDropzone when `toast` is enabled.
|
|
5
|
-
*/
|
|
6
|
-
export declare function useFileRejectToast(fileRejections: readonly FileRejection[], enabled: boolean): void;
|
|
7
|
-
//# sourceMappingURL=use-file-reject-toast.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-file-reject-toast.d.ts","sourceRoot":"","sources":["../../src/hooks/use-file-reject-toast.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA6BtE;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,SAAS,aAAa,EAAE,EACxC,OAAO,EAAE,OAAO,QAyBjB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type UseUploadReturn } from "@dimah-s3/react";
|
|
2
|
-
/**
|
|
3
|
-
* Drives toasts for upload progress/success/error.
|
|
4
|
-
* Shared between UploadButton and UploadDropzone.
|
|
5
|
-
*/
|
|
6
|
-
export declare function useUploadToast(upload: UseUploadReturn, enabled: boolean): void;
|
|
7
|
-
//# sourceMappingURL=use-upload-toast.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-upload-toast.d.ts","sourceRoot":"","sources":["../../src/hooks/use-upload-toast.tsx"],"names":[],"mappings":"AAIA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAWzB;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,QAkJvE"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { UseUploadReturn } from "@dimah-s3/react";
|
|
2
|
-
import type { AttachmentLayoutAliases } from "../lib/attachment-layout.js";
|
|
3
|
-
export type UseUploadUiOptions = AttachmentLayoutAliases & {
|
|
4
|
-
toast?: boolean;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Toasts + default {@link UploadStatus} for a `useUpload` return.
|
|
8
|
-
* Placement of `statusNode` is the control's job (`status` / `resolveStatusSlot`).
|
|
9
|
-
*/
|
|
10
|
-
export declare function useUploadUi(upload: UseUploadReturn, { toast: enableToast, attachmentSize, attachmentOrientation, }?: UseUploadUiOptions): {
|
|
11
|
-
statusNode: import("react").JSX.Element;
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=use-upload-ui.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-upload-ui.d.ts","sourceRoot":"","sources":["../../src/hooks/use-upload-ui.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAEvE,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,GAAG;IACzD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,eAAe,EACvB,EACE,KAAK,EAAE,WAAkB,EACzB,cAAc,EACd,qBAAqB,GACtB,GAAE,kBAAuB;IAMxB,UAAU;EAQb"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-type-icon.d.ts","sourceRoot":"","sources":["../../src/lib/file-type-icon.tsx"],"names":[],"mappings":"AAmJA,+EAA+E;AAC/E,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GACvB,MAAM,GAAG,IAAI,CAYf;AAYD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;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,QAAQ,EACR,MAAe,EACf,SAAS,GACV,EAAE,kBAAkB,+BAmBpB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAiBhE"}
|