diff --git a/openmetadata-ui-core-components/src/main/resources/ui/package.json b/openmetadata-ui-core-components/src/main/resources/ui/package.json
index b398ddfb1d96..669ab219c816 100644
--- a/openmetadata-ui-core-components/src/main/resources/ui/package.json
+++ b/openmetadata-ui-core-components/src/main/resources/ui/package.json
@@ -75,7 +75,9 @@
"author": "OpenMetadata",
"license": "Apache-2.0",
"dependencies": {
- "@material/material-color-utilities": "^0.3.0"
+ "@material/material-color-utilities": "^0.3.0",
+ "@untitledui/file-icons": "^0.0.9",
+ "motion": "^12.38.0"
},
"peerDependencies": {
"@emotion/react": ">=11.0.0",
diff --git a/openmetadata-ui-core-components/src/main/resources/ui/src/components/application/file-upload/file-upload.tsx b/openmetadata-ui-core-components/src/main/resources/ui/src/components/application/file-upload/file-upload.tsx
index 09462d8a8b5c..c66230c0c1f9 100644
--- a/openmetadata-ui-core-components/src/main/resources/ui/src/components/application/file-upload/file-upload.tsx
+++ b/openmetadata-ui-core-components/src/main/resources/ui/src/components/application/file-upload/file-upload.tsx
@@ -15,12 +15,19 @@
* Source: https://github.com/untitleduico/react/blob/main/components/application/file-upload/file-upload-base.tsx
*/
-import { UploadCloud02 } from '@untitledui/icons';
-import type { DragEvent, ChangeEvent } from 'react';
-import { useId, useRef, useState } from 'react';
import { Button } from '@/components/base/buttons/button';
+import { ButtonUtility } from '@/components/base/buttons/button-utility';
+import { ProgressBar } from '@/components/base/progress-indicators/progress-indicators';
import { FeaturedIcon } from '@/components/foundations/featured-icon/featured-icon';
import { cx } from '@/utils/cx';
+import {
+ CheckCircle,
+ Trash01,
+ UploadCloud02,
+ XCircle,
+} from '@untitledui/icons';
+import type { ChangeEvent, ComponentPropsWithRef, DragEvent } from 'react';
+import { useId, useRef, useState } from 'react';
export const getReadableFileSize = (bytes: number): string => {
if (bytes === 0) {
@@ -240,3 +247,236 @@ export const FileUploadDropZone = ({
};
FileUploadDropZone.displayName = 'FileUploadDropZone';
+
+export interface FileListItemProps {
+ name: string;
+ size: number;
+ progress: number;
+ failed?: boolean;
+ className?: string;
+ completeLabel?: string;
+ uploadingLabel?: string;
+ failedLabel?: string;
+ tryAgainLabel?: string;
+ deleteLabel?: string;
+ onDelete?: () => void;
+ onRetry?: () => void;
+}
+
+export const FileListItemProgressBar = ({
+ className,
+ completeLabel = 'Complete',
+ deleteLabel = 'Delete',
+ failed,
+ failedLabel = 'Failed',
+ name,
+ onDelete,
+ onRetry,
+ progress,
+ size,
+ tryAgainLabel = 'Try again',
+ uploadingLabel = 'Uploading...',
+}: FileListItemProps) => {
+ const isComplete = progress === 100;
+
+ return (
+
+
+
+
+
+
+
+
+
+ {name}
+
+
+
+ {getReadableFileSize(size)}
+
+
+
+ {isComplete && !failed && (
+ <>
+
+
+ {completeLabel}
+
+ >
+ )}
+ {!isComplete && !failed && (
+ <>
+
+
+ {uploadingLabel}
+
+ >
+ )}
+ {failed && (
+ <>
+
+
+ {failedLabel}
+
+ >
+ )}
+
+
+
+
+
+
+ {!failed && (
+
+ )}
+
+ {failed && (
+
+ )}
+
+
+ );
+};
+
+export const FileListItemProgressFill = ({
+ className,
+ deleteLabel = 'Delete',
+ failed,
+ failedLabel = 'Upload failed, please try again',
+ name,
+ onDelete,
+ onRetry,
+ progress,
+ size,
+ tryAgainLabel = 'Try again',
+}: FileListItemProps) => {
+ const isComplete = progress === 100;
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ {name}
+
+
+
+ {failed ? failedLabel : getReadableFileSize(size)}
+
+ {!failed && (
+ <>
+
+
+ {isComplete ? (
+
+ ) : (
+
+ )}
+
{progress}%
+
+ >
+ )}
+
+
+ {failed && (
+
+ )}
+
+
+
+
+ );
+};
+
+const FileUploadRoot = (props: ComponentPropsWithRef<'div'>) => (
+
+);
+
+const FileUploadList = (props: ComponentPropsWithRef<'ul'>) => (
+
+);
+
+export const FileUpload = {
+ DropZone: FileUploadDropZone,
+ List: FileUploadList,
+ ListItemProgressBar: FileListItemProgressBar,
+ ListItemProgressFill: FileListItemProgressFill,
+ Root: FileUploadRoot,
+};
diff --git a/openmetadata-ui-core-components/src/main/resources/ui/src/components/foundations/dot-icon.tsx b/openmetadata-ui-core-components/src/main/resources/ui/src/components/foundations/dot-icon.tsx
index 11b1b91aeac7..04bf658e5301 100644
--- a/openmetadata-ui-core-components/src/main/resources/ui/src/components/foundations/dot-icon.tsx
+++ b/openmetadata-ui-core-components/src/main/resources/ui/src/components/foundations/dot-icon.tsx
@@ -1,6 +1,11 @@
import type { HTMLAttributes } from 'react';
const sizes = {
+ xs: {
+ wh: 6,
+ c: 3,
+ r: 2,
+ },
sm: {
wh: 8,
c: 4,
@@ -16,7 +21,7 @@ const sizes = {
export const Dot = ({
size = 'md',
...props
-}: HTMLAttributes & { size?: 'sm' | 'md' }) => {
+}: HTMLAttributes & { size?: 'sm' | 'md' | 'xs' }) => {
return (