@dimah-s3/ui 1.5.6 → 1.5.8
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/LICENSE +1 -1
- package/dist/components/dimah-s3/attachment/file-attachment.d.ts +1 -1
- package/dist/components/dimah-s3/attachment/file-attachment.d.ts.map +1 -1
- package/dist/components/dimah-s3/attachment/status-attachment.d.ts +1 -1
- package/dist/components/dimah-s3/delete/delete-button.d.ts +2 -2
- package/dist/components/dimah-s3/download/download-button.d.ts +2 -2
- package/dist/components/dimah-s3/download/progress-download-button.d.ts +2 -2
- package/dist/components/dimah-s3/upload/multi-upload-status.d.ts +1 -1
- package/dist/components/dimah-s3/upload/upload-button.d.ts +2 -2
- package/dist/components/dimah-s3/upload/upload-dropzone.d.ts +1 -1
- package/dist/components/dimah-s3/upload/upload-status.d.ts +1 -1
- package/dist/components/ui/alert-dialog.d.ts +2 -2
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/attachment.d.ts +2 -2
- package/dist/components/ui/attachment.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/hooks/use-delete-ui.d.ts +1 -1
- package/dist/hooks/use-download-ui.d.ts +1 -1
- package/dist/hooks/use-upload-ui.d.ts +1 -1
- package/dist/index.d.ts +19 -19
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/attachment-layout.d.ts +1 -1
- package/dist/lib/attachment-layout.d.ts.map +1 -1
- package/package.json +27 -26
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import { type APIError } from "@dimah-s3/core";
|
|
3
|
-
import { type AttachmentOrientation, type AttachmentSize, type AttachmentState } from "../../../lib/attachment-layout";
|
|
3
|
+
import { type AttachmentOrientation, type AttachmentSize, type AttachmentState } from "../../../lib/attachment-layout.d.ts";
|
|
4
4
|
export type FileAttachmentProps = {
|
|
5
5
|
/** @default "sm" */
|
|
6
6
|
size?: AttachmentSize;
|
|
@@ -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,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAGL,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAexB,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAYjC,MAAM,MAAM,mBAAmB,GAAG;IAChC,oBAAoB;IACpB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAW,EACX,WAAW,EACX,KAAK,EACL,QAAQ,EACR,OAAO,EACP,SAAS,EACT,IAAW,EACX,WAA0B,EAC1B,SAAS,GACV,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,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAGL,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAexB,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAYjC,MAAM,MAAM,mBAAmB,GAAG;IAChC,oBAAoB;IACpB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAW,EACX,WAAW,EACX,KAAK,EACL,QAAQ,EACR,OAAO,EACP,SAAS,EACT,IAAW,EACX,WAA0B,EAC1B,SAAS,GACV,EAAE,mBAAmB,+BAoHrB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import { type AttachmentOrientation, type AttachmentSize, type AttachmentState } from "../../../lib/attachment-layout";
|
|
2
|
+
import { type AttachmentOrientation, type AttachmentSize, type AttachmentState } from "../../../lib/attachment-layout.d.ts";
|
|
3
3
|
export type StatusAttachmentProps = {
|
|
4
4
|
/** @default "sm" */
|
|
5
5
|
size?: AttachmentSize;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import type { UseDeleteReturn } from "@dimah-s3/react";
|
|
3
|
-
import { type AttachmentLayoutAliases, type StatusSlot } from "../../../lib/attachment-layout";
|
|
4
|
-
import { Button } from "../../ui/button";
|
|
3
|
+
import { type AttachmentLayoutAliases, type StatusSlot } from "../../../lib/attachment-layout.d.ts";
|
|
4
|
+
import { Button } from "../../ui/button.d.ts";
|
|
5
5
|
/** Props for {@link DeleteButton}. Pass a {@link UseDeleteReturn} as `delete`. */
|
|
6
6
|
export type DeleteButtonProps = AttachmentLayoutAliases & {
|
|
7
7
|
delete: UseDeleteReturn;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import type { UseNavigateDownloadReturn } from "@dimah-s3/react";
|
|
3
|
-
import { type AttachmentLayoutAliases, type StatusSlot } from "../../../lib/attachment-layout";
|
|
4
|
-
import { Button } from "../../ui/button";
|
|
3
|
+
import { type AttachmentLayoutAliases, type StatusSlot } from "../../../lib/attachment-layout.d.ts";
|
|
4
|
+
import { Button } from "../../ui/button.d.ts";
|
|
5
5
|
/** Props for {@link DownloadButton}. Pass a {@link UseNavigateDownloadReturn} as `download`. */
|
|
6
6
|
export type DownloadButtonProps = AttachmentLayoutAliases & {
|
|
7
7
|
download: UseNavigateDownloadReturn;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import type { UseFetchDownloadReturn } from "@dimah-s3/react";
|
|
3
|
-
import { type AttachmentLayoutAliases, type StatusSlot } from "../../../lib/attachment-layout";
|
|
4
|
-
import { Button } from "../../ui/button";
|
|
3
|
+
import { type AttachmentLayoutAliases, type StatusSlot } from "../../../lib/attachment-layout.d.ts";
|
|
4
|
+
import { Button } from "../../ui/button.d.ts";
|
|
5
5
|
/** Props for {@link ProgressDownloadButton}. Pass a {@link UseFetchDownloadReturn} as `download`. */
|
|
6
6
|
export type ProgressDownloadButtonProps = AttachmentLayoutAliases & {
|
|
7
7
|
download: UseFetchDownloadReturn;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UseUploadReturn } from "@dimah-s3/react";
|
|
2
|
-
import type { AttachmentLayoutAliases } from "../../../lib/attachment-layout";
|
|
2
|
+
import type { AttachmentLayoutAliases } from "../../../lib/attachment-layout.d.ts";
|
|
3
3
|
export type MultiUploadStatusProps = AttachmentLayoutAliases & {
|
|
4
4
|
upload: UseUploadReturn;
|
|
5
5
|
className?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import type { UseUploadReturn } from "@dimah-s3/react";
|
|
3
|
-
import { Button } from "../../ui/button";
|
|
4
|
-
import { type AttachmentLayoutAliases, type StatusSlot } from "../../../lib/attachment-layout";
|
|
3
|
+
import { Button } from "../../ui/button.d.ts";
|
|
4
|
+
import { type AttachmentLayoutAliases, type StatusSlot } from "../../../lib/attachment-layout.d.ts";
|
|
5
5
|
/** Props for {@link UploadButton}. Pass a {@link UseUploadReturn} as `upload`. */
|
|
6
6
|
export type UploadButtonProps = AttachmentLayoutAliases & {
|
|
7
7
|
upload: UseUploadReturn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import { type UseUploadReturn } from "@dimah-s3/react";
|
|
3
|
-
import { type AttachmentLayoutAliases, type StatusSlot } from "../../../lib/attachment-layout";
|
|
3
|
+
import { type AttachmentLayoutAliases, type StatusSlot } from "../../../lib/attachment-layout.d.ts";
|
|
4
4
|
/** Props for {@link UploadDropzone}. Pass a {@link UseUploadReturn} as `upload`. */
|
|
5
5
|
export type UploadDropzoneProps = AttachmentLayoutAliases & {
|
|
6
6
|
upload: UseUploadReturn;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { APIError, UploadFileState, UploadPhase, UseUploadReturn } from "@dimah-s3/react";
|
|
2
|
-
import type { AttachmentLayoutAliases, AttachmentLayoutProps } from "../../../lib/attachment-layout";
|
|
2
|
+
import type { AttachmentLayoutAliases, AttachmentLayoutProps } from "../../../lib/attachment-layout.d.ts";
|
|
3
3
|
export type UploadFileStatusProps = AttachmentLayoutProps & {
|
|
4
4
|
phase: UploadPhase;
|
|
5
5
|
error: APIError | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react";
|
|
1
|
+
import type * as React from "react";
|
|
2
2
|
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
3
|
-
import { Button } from "./button";
|
|
3
|
+
import { Button } from "./button.d.ts";
|
|
4
4
|
declare function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props): React.JSX.Element;
|
|
5
5
|
declare function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props): React.JSX.Element;
|
|
6
6
|
declare function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.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,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.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,oBAAoB,CAAC,KAAK,CAAC,qBAWzD;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,WAAW,CAAC,qBAW/D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,qBAQrC;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,GACjC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,qBAS9D;AAED,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GACnB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from "react";
|
|
1
|
+
import type * as React from "react";
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
3
|
import { type VariantProps } from "class-variance-authority";
|
|
4
|
-
import { Button } from "./button";
|
|
4
|
+
import { Button } from "./button.d.ts";
|
|
5
5
|
declare const attachmentVariants: (props?: ({
|
|
6
6
|
size?: "default" | "sm" | "xs" | null | undefined;
|
|
7
7
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../../src/components/ui/attachment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../../src/components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C,EACxB,SAAS,EACT,OAAO,EACP,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,qBAUrC;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,MAAM,EACN,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,QAAQ,CAAC,0EAepC;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW5E;AAED,OAAO,EACL,UAAU,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,GAClB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from "react";
|
|
1
|
+
import type * as React from "react";
|
|
2
2
|
import { Toast as ToastPrimitive } from "@base-ui/react/toast";
|
|
3
3
|
declare const toast: import("@base-ui/react").ToastManager<any>;
|
|
4
4
|
declare function ToastProvider({ ...props }: ToastPrimitive.Provider.Props): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toast.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toast.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAY/D,QAAA,MAAM,KAAK,4CAAsC,CAAC;AAElD,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,QAAQ,CAAC,KAAK,qBAEjE;AAED,iBAAS,WAAW,CAAC,EA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@@
|
|
|
1
1
|
import { type UseDeleteReturn } from "@dimah-s3/react";
|
|
2
|
-
import type { AttachmentLayoutAliases } from "../lib/attachment-layout";
|
|
2
|
+
import type { AttachmentLayoutAliases } from "../lib/attachment-layout.d.ts";
|
|
3
3
|
export type UseDeleteUiOptions = AttachmentLayoutAliases & {
|
|
4
4
|
toast?: boolean;
|
|
5
5
|
objectKey: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type UseDownloadReturn } from "@dimah-s3/react";
|
|
2
|
-
import type { AttachmentLayoutAliases } from "../lib/attachment-layout";
|
|
2
|
+
import type { AttachmentLayoutAliases } from "../lib/attachment-layout.d.ts";
|
|
3
3
|
export type UseDownloadUiOptions = AttachmentLayoutAliases & {
|
|
4
4
|
toast?: boolean;
|
|
5
5
|
objectKey: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UseUploadReturn } from "@dimah-s3/react";
|
|
2
|
-
import type { AttachmentLayoutAliases } from "../lib/attachment-layout";
|
|
2
|
+
import type { AttachmentLayoutAliases } from "../lib/attachment-layout.d.ts";
|
|
3
3
|
export type UseUploadUiOptions = AttachmentLayoutAliases & {
|
|
4
4
|
toast?: boolean;
|
|
5
5
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export { UploadButton, type UploadButtonProps, } from "./components/dimah-s3/upload/upload-button";
|
|
2
|
-
export { UploadDropzone, type UploadDropzoneProps, } from "./components/dimah-s3/upload/upload-dropzone";
|
|
3
|
-
export { UploadStatus, UploadFileStatus, type UploadStatusProps, type UploadFileStatusProps, } from "./components/dimah-s3/upload/upload-status";
|
|
4
|
-
export { MultiUploadStatus, type MultiUploadStatusProps, } from "./components/dimah-s3/upload/multi-upload-status";
|
|
5
|
-
export { DownloadButton, type DownloadButtonProps, } from "./components/dimah-s3/download/download-button";
|
|
6
|
-
export { ProgressDownloadButton, type ProgressDownloadButtonProps, } from "./components/dimah-s3/download/progress-download-button";
|
|
7
|
-
export { DeleteButton, type DeleteButtonProps, } from "./components/dimah-s3/delete/delete-button";
|
|
8
|
-
export { FileAttachment, type FileAttachmentProps, } from "./components/dimah-s3/attachment/file-attachment";
|
|
9
|
-
export { StatusAttachment, type StatusAttachmentProps, } from "./components/dimah-s3/attachment/status-attachment";
|
|
10
|
-
export type { AttachmentState, AttachmentSize, AttachmentOrientation, AttachmentLayoutProps, AttachmentLayoutAliases, StatusSlot, } from "./lib/attachment-layout";
|
|
11
|
-
export { resolveStatusSlot } from "./lib/attachment-layout";
|
|
12
|
-
export { Toaster, toast } from "./components/ui/toast";
|
|
13
|
-
export { useUploadToast } from "./hooks/use-upload-toast";
|
|
14
|
-
export { useFileRejectToast } from "./hooks/use-file-reject-toast";
|
|
15
|
-
export { useDownloadToast } from "./hooks/use-download-toast";
|
|
16
|
-
export { useDeleteToast } from "./hooks/use-delete-toast";
|
|
17
|
-
export { useUploadUi } from "./hooks/use-upload-ui";
|
|
18
|
-
export { useDownloadUi } from "./hooks/use-download-ui";
|
|
19
|
-
export { useDeleteUi } from "./hooks/use-delete-ui";
|
|
1
|
+
export { UploadButton, type UploadButtonProps, } from "./components/dimah-s3/upload/upload-button.d.ts";
|
|
2
|
+
export { UploadDropzone, type UploadDropzoneProps, } from "./components/dimah-s3/upload/upload-dropzone.d.ts";
|
|
3
|
+
export { UploadStatus, UploadFileStatus, type UploadStatusProps, type UploadFileStatusProps, } from "./components/dimah-s3/upload/upload-status.d.ts";
|
|
4
|
+
export { MultiUploadStatus, type MultiUploadStatusProps, } from "./components/dimah-s3/upload/multi-upload-status.d.ts";
|
|
5
|
+
export { DownloadButton, type DownloadButtonProps, } from "./components/dimah-s3/download/download-button.d.ts";
|
|
6
|
+
export { ProgressDownloadButton, type ProgressDownloadButtonProps, } from "./components/dimah-s3/download/progress-download-button.d.ts";
|
|
7
|
+
export { DeleteButton, type DeleteButtonProps, } from "./components/dimah-s3/delete/delete-button.d.ts";
|
|
8
|
+
export { FileAttachment, type FileAttachmentProps, } from "./components/dimah-s3/attachment/file-attachment.d.ts";
|
|
9
|
+
export { StatusAttachment, type StatusAttachmentProps, } from "./components/dimah-s3/attachment/status-attachment.d.ts";
|
|
10
|
+
export type { AttachmentState, AttachmentSize, AttachmentOrientation, AttachmentLayoutProps, AttachmentLayoutAliases, StatusSlot, } from "./lib/attachment-layout.d.ts";
|
|
11
|
+
export { resolveStatusSlot } from "./lib/attachment-layout.d.ts";
|
|
12
|
+
export { Toaster, toast } from "./components/ui/toast.d.ts";
|
|
13
|
+
export { useUploadToast } from "./hooks/use-upload-toast.d.ts";
|
|
14
|
+
export { useFileRejectToast } from "./hooks/use-file-reject-toast.d.ts";
|
|
15
|
+
export { useDownloadToast } from "./hooks/use-download-toast.d.ts";
|
|
16
|
+
export { useDeleteToast } from "./hooks/use-delete-toast.d.ts";
|
|
17
|
+
export { useUploadUi } from "./hooks/use-upload-ui.d.ts";
|
|
18
|
+
export { useDownloadUi } from "./hooks/use-download-ui.d.ts";
|
|
19
|
+
export { useDeleteUi } from "./hooks/use-delete-ui.d.ts";
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -516,7 +516,6 @@ function FileAttachment({
|
|
|
516
516
|
const t = useTranslations();
|
|
517
517
|
const formatError = useFormatDimahError();
|
|
518
518
|
const errorText = error == null ? null : typeof error === "string" ? error : formatError(error);
|
|
519
|
-
const hasPreview = Boolean(previewUrl);
|
|
520
519
|
const progress = PROGRESS_BY_SIZE[size];
|
|
521
520
|
const resolvedDescription = description ?? (state === "error" ? errorText ?? t("Upload failed", { note: "status" }) : fileSize != null ? formatFileSize(fileSize) : null);
|
|
522
521
|
const inFlight = state === "uploading" || state === "processing";
|
|
@@ -547,7 +546,7 @@ function FileAttachment({
|
|
|
547
546
|
className
|
|
548
547
|
),
|
|
549
548
|
children: [
|
|
550
|
-
|
|
549
|
+
previewUrl ? /* @__PURE__ */ jsxs(AttachmentMedia, { variant: "image", children: [
|
|
551
550
|
/* @__PURE__ */ jsx("img", { src: previewUrl, alt: "" }),
|
|
552
551
|
mediaOverlay
|
|
553
552
|
] }) : /* @__PURE__ */ jsxs(AttachmentMedia, { children: [
|
|
@@ -1786,7 +1785,7 @@ function ProgressDownloadButton({
|
|
|
1786
1785
|
download.cancel();
|
|
1787
1786
|
return;
|
|
1788
1787
|
}
|
|
1789
|
-
download.download(objectKey, fileName);
|
|
1788
|
+
void download.download(objectKey, fileName);
|
|
1790
1789
|
};
|
|
1791
1790
|
const computedPercentFromFileSize = fileSize && fileSize > 0 ? Math.min(100, Math.round(download.progress.loaded / fileSize * 100)) : null;
|
|
1792
1791
|
const fillPercent = !isPendingThis ? null : download.phase === "presigning" ? 12 : download.progress.total > 0 ? download.progress.percent : computedPercentFromFileSize;
|