@astral/ui 4.97.0 → 4.99.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.
Files changed (79) hide show
  1. package/components/fileUploading/FileInfo/FileInfo.d.ts +5 -1
  2. package/components/fileUploading/FileInfo/FileInfo.js +11 -2
  3. package/components/fileUploading/FileInfo/constants.d.ts +4 -0
  4. package/components/fileUploading/FileInfo/constants.js +5 -0
  5. package/components/fileUploading/FileInfo/index.d.ts +1 -0
  6. package/components/fileUploading/FileInfo/index.js +1 -0
  7. package/components/fileUploading/FileInfo/styles.js +19 -0
  8. package/components/fileUploading/FileUploader/FIleList/styles.js +4 -0
  9. package/components/fileUploading/FileUploaderDropzone/DropzoneWrapper/styles.js +3 -0
  10. package/components/fileUploading/FileUploaderDropzone/FileUploaderContainer/FileUploaderContainer.js +2 -1
  11. package/components/fileUploading/FileUploaderDropzone/FileUploaderContainer/styles.d.ts +5 -0
  12. package/components/fileUploading/FileUploaderDropzone/FileUploaderContainer/styles.js +6 -0
  13. package/components/fileUploading/FileUploaderDropzone/HintPlaceholder/HintPlaceholder.js +3 -3
  14. package/components/fileUploading/FileUploaderDropzone/HintPlaceholder/styles.d.ts +4 -0
  15. package/components/fileUploading/FileUploaderDropzone/HintPlaceholder/styles.js +5 -0
  16. package/components/fileUploading/FileUploaderFile/Actions/Actions.js +4 -2
  17. package/components/fileUploading/FileUploaderFile/FileUploaderFile.js +1 -1
  18. package/components/fileUploading/FileUploaderFile/styles.js +7 -0
  19. package/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/HintPlaceholder.js +2 -2
  20. package/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/styles.d.ts +4 -0
  21. package/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/styles.js +5 -0
  22. package/components/fileUploading/PreviewFileUploaderDropZone/PlaceholderWrapper/styles.js +4 -0
  23. package/components/fileUploading/PreviewFileUploaderFile/FileError/FileError.js +2 -2
  24. package/components/fileUploading/PreviewFileUploaderFile/FileError/styles.d.ts +15 -0
  25. package/components/fileUploading/PreviewFileUploaderFile/FileError/styles.js +17 -4
  26. package/components/fileUploading/PreviewFileUploaderFile/FileLoading/FileLoading.js +1 -1
  27. package/components/fileUploading/PreviewFileUploaderFile/FilePreview/FilePreview.js +4 -9
  28. package/components/fileUploading/PreviewFileUploaderFile/FilePreview/styles.d.ts +1 -0
  29. package/components/fileUploading/PreviewFileUploaderFile/FilePreview/styles.js +39 -13
  30. package/components/fileUploading/PreviewFileUploaderFile/FilePreview/useLogic/useLogic.d.ts +49 -14
  31. package/components/fileUploading/PreviewFileUploaderFile/FilePreview/useLogic/useLogic.js +60 -8
  32. package/icons/CarOutlineMd/CarOutlineMd.d.ts +3 -0
  33. package/icons/CarOutlineMd/CarOutlineMd.js +3 -0
  34. package/icons/CarOutlineMd/index.d.ts +1 -0
  35. package/icons/CarOutlineMd/index.js +1 -0
  36. package/icons/CarOutlineMd/public.d.ts +1 -0
  37. package/icons/CarOutlineMd/public.js +1 -0
  38. package/icons/index.d.ts +1 -0
  39. package/icons/index.js +1 -0
  40. package/node/components/fileUploading/FileInfo/FileInfo.d.ts +5 -1
  41. package/node/components/fileUploading/FileInfo/FileInfo.js +11 -2
  42. package/node/components/fileUploading/FileInfo/constants.d.ts +4 -0
  43. package/node/components/fileUploading/FileInfo/constants.js +8 -0
  44. package/node/components/fileUploading/FileInfo/index.d.ts +1 -0
  45. package/node/components/fileUploading/FileInfo/index.js +3 -0
  46. package/node/components/fileUploading/FileInfo/styles.js +19 -0
  47. package/node/components/fileUploading/FileUploader/FIleList/styles.js +4 -0
  48. package/node/components/fileUploading/FileUploaderDropzone/DropzoneWrapper/styles.js +3 -0
  49. package/node/components/fileUploading/FileUploaderDropzone/FileUploaderContainer/FileUploaderContainer.js +2 -1
  50. package/node/components/fileUploading/FileUploaderDropzone/FileUploaderContainer/styles.d.ts +5 -0
  51. package/node/components/fileUploading/FileUploaderDropzone/FileUploaderContainer/styles.js +9 -0
  52. package/node/components/fileUploading/FileUploaderDropzone/HintPlaceholder/HintPlaceholder.js +2 -2
  53. package/node/components/fileUploading/FileUploaderDropzone/HintPlaceholder/styles.d.ts +4 -0
  54. package/node/components/fileUploading/FileUploaderDropzone/HintPlaceholder/styles.js +6 -1
  55. package/node/components/fileUploading/FileUploaderFile/Actions/Actions.js +3 -1
  56. package/node/components/fileUploading/FileUploaderFile/FileUploaderFile.js +1 -1
  57. package/node/components/fileUploading/FileUploaderFile/styles.js +7 -0
  58. package/node/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/HintPlaceholder.js +1 -1
  59. package/node/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/styles.d.ts +4 -0
  60. package/node/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/styles.js +6 -1
  61. package/node/components/fileUploading/PreviewFileUploaderDropZone/PlaceholderWrapper/styles.js +4 -0
  62. package/node/components/fileUploading/PreviewFileUploaderFile/FileError/FileError.js +1 -1
  63. package/node/components/fileUploading/PreviewFileUploaderFile/FileError/styles.d.ts +15 -0
  64. package/node/components/fileUploading/PreviewFileUploaderFile/FileError/styles.js +18 -5
  65. package/node/components/fileUploading/PreviewFileUploaderFile/FileLoading/FileLoading.js +1 -1
  66. package/node/components/fileUploading/PreviewFileUploaderFile/FilePreview/FilePreview.js +3 -8
  67. package/node/components/fileUploading/PreviewFileUploaderFile/FilePreview/styles.d.ts +1 -0
  68. package/node/components/fileUploading/PreviewFileUploaderFile/FilePreview/styles.js +39 -13
  69. package/node/components/fileUploading/PreviewFileUploaderFile/FilePreview/useLogic/useLogic.d.ts +49 -14
  70. package/node/components/fileUploading/PreviewFileUploaderFile/FilePreview/useLogic/useLogic.js +60 -8
  71. package/node/icons/CarOutlineMd/CarOutlineMd.d.ts +3 -0
  72. package/node/icons/CarOutlineMd/CarOutlineMd.js +7 -0
  73. package/node/icons/CarOutlineMd/index.d.ts +1 -0
  74. package/node/icons/CarOutlineMd/index.js +5 -0
  75. package/node/icons/CarOutlineMd/public.d.ts +1 -0
  76. package/node/icons/CarOutlineMd/public.js +5 -0
  77. package/node/icons/index.d.ts +1 -0
  78. package/node/icons/index.js +4 -2
  79. package/package.json +1 -1
@@ -11,6 +11,10 @@ type FileInfoProps = {
11
11
  * Размер файла в байтах
12
12
  */
13
13
  fileSize?: number;
14
+ /**
15
+ * Флаг загрузки файла
16
+ */
17
+ isLoading?: boolean;
14
18
  };
15
- export declare const FileInfo: ({ className, fileName, fileSize }: FileInfoProps) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const FileInfo: ({ className, fileName, fileSize, isLoading, }: FileInfoProps) => import("react/jsx-runtime").JSX.Element;
16
20
  export {};
@@ -1,6 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { formatFileSizeToView } from '@astral/utils/file/formatFileSizeToView';
3
+ import { cva } from '../../utils/cva';
4
+ import { fileSizeClassnames } from './constants';
3
5
  import { DotIcon, FileSize, StyledFilename, Wrapper } from './styles';
4
- export const FileInfo = ({ className, fileName, fileSize }) => {
5
- return (_jsxs(Wrapper, { className: className, children: [_jsx(StyledFilename, { children: fileName }), fileSize && (_jsxs(FileSize, { children: [_jsx(DotIcon, {}), formatFileSizeToView(fileSize)] }))] }));
6
+ const fileSizeCva = cva(fileSizeClassnames.fileSize, {
7
+ variants: {
8
+ isLoading: {
9
+ true: fileSizeClassnames.isLoading,
10
+ },
11
+ },
12
+ });
13
+ export const FileInfo = ({ className, fileName, fileSize, isLoading, }) => {
14
+ return (_jsxs(Wrapper, { className: className, children: [_jsx(StyledFilename, { children: fileName }), _jsxs(FileSize, { className: fileSizeCva({ isLoading }), children: [_jsx(DotIcon, {}), formatFileSizeToView(fileSize)] })] }));
6
15
  };
@@ -0,0 +1,4 @@
1
+ export declare const fileSizeClassnames: {
2
+ isLoading: string;
3
+ fileSize: string;
4
+ };
@@ -0,0 +1,5 @@
1
+ import { createUIKitClassname } from '../../utils/createUIKitClassname';
2
+ export const fileSizeClassnames = {
3
+ isLoading: createUIKitClassname('file-info_loading'),
4
+ fileSize: createUIKitClassname('file-info_file_size'),
5
+ };
@@ -1 +1,2 @@
1
1
  export * from './FileInfo';
2
+ export { fileSizeClassnames } from './constants';
@@ -1 +1,2 @@
1
1
  export * from './FileInfo';
2
+ export { fileSizeClassnames } from './constants';
@@ -2,12 +2,17 @@ import { DotOutlineSm } from '../../../icons/DotOutlineSm';
2
2
  import { Filename } from '../../Filename';
3
3
  import { styled } from '../../styled';
4
4
  import { Typography } from '../../Typography';
5
+ import { fileSizeClassnames } from './constants';
5
6
  export const Wrapper = styled.div `
6
7
  overflow: hidden;
7
8
  display: flex;
8
9
  gap: ${({ theme }) => theme.spacing(1)};
9
10
 
10
11
  width: 100%;
12
+
13
+ ${({ theme }) => theme.breakpoints.down('sm')} {
14
+ flex-direction: column;
15
+ }
11
16
  `;
12
17
  export const StyledFilename = styled(Filename) `
13
18
  overflow: hidden;
@@ -18,8 +23,22 @@ export const FileSize = styled(Typography) `
18
23
  align-items: center;
19
24
 
20
25
  white-space: nowrap;
26
+
27
+ ${({ theme }) => theme.breakpoints.down('sm')} {
28
+ font-size: ${({ theme }) => theme.typography.caption.fontSize};
29
+ line-height: ${({ theme }) => theme.typography.caption.lineHeight};
30
+ color: ${({ theme }) => theme.palette.grey[600]};
31
+
32
+ &.${fileSizeClassnames.isLoading} {
33
+ display: none;
34
+ }
35
+ }
21
36
  `;
22
37
  export const DotIcon = styled(DotOutlineSm) `
23
38
  width: 16px;
24
39
  height: 16px;
40
+
41
+ ${({ theme }) => theme.breakpoints.down('sm')} {
42
+ display: none;
43
+ }
25
44
  `;
@@ -6,4 +6,8 @@ export const Wrapper = styled('ul') `
6
6
  grid-gap: ${({ theme }) => theme.spacing(2)};
7
7
 
8
8
  margin-bottom: ${({ theme, $isMultiple }) => $isMultiple ? theme.spacing(5) : 0};
9
+
10
+ ${({ theme }) => theme.breakpoints.down('sm')} {
11
+ margin-bottom: ${({ theme, $isMultiple }) => $isMultiple ? theme.spacing(4) : 0};
12
+ }
9
13
  `;
@@ -23,4 +23,7 @@ export const Wrapper = styled.div `
23
23
  transition: ${({ theme }) => theme.transitions.create(['background', 'border'], {
24
24
  duration: theme.transitions.duration.short,
25
25
  })};
26
+ ${({ theme }) => theme.breakpoints.down('sm')} {
27
+ padding: ${({ theme }) => theme.spacing(5, 4)};
28
+ }
26
29
  `;
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { FileUploaderLabel } from '../../FileUploaderLabel';
3
3
  import { HelperText } from '../../HelperText';
4
- export const FileUploaderContainer = ({ className, label, children, isError, helperText, }) => (_jsxs("div", { className: className, children: [label && _jsx(FileUploaderLabel, { children: label }), children, isError && _jsx(HelperText, { isError: isError, children: helperText })] }));
4
+ import { Wrapper } from './styles';
5
+ export const FileUploaderContainer = ({ className, label, children, isError, helperText, }) => (_jsxs(Wrapper, { className: className, children: [label && _jsx(FileUploaderLabel, { children: label }), children, isError && _jsx(HelperText, { isError: isError, children: helperText })] }));
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const Wrapper: import("../../../styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,6 @@
1
+ import { styled } from '../../../styled';
2
+ export const Wrapper = styled.div `
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: ${({ theme }) => theme.spacing(1)};
6
+ `;
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { formatFileSizeToView } from '@astral/utils/file/formatFileSizeToView';
3
3
  import { Typography } from '../../../Typography';
4
4
  import { declensionFile } from '../../utils/declensionFile';
5
- import { Extensions } from './styles';
5
+ import { Extensions, MobileWrapper } from './styles';
6
6
  import { useLogic } from './useLogic';
7
7
  export const HintPlaceholder = (props) => {
8
8
  const { extensions, className, isMultiple, maxFileCount, maxFileSize, placeholder, } = useLogic(props);
@@ -13,7 +13,7 @@ export const HintPlaceholder = (props) => {
13
13
  return placeholder;
14
14
  }
15
15
  if (isMultiple) {
16
- return (_jsxs(Typography, { className: className, color: "grey", colorIntensity: "600", variant: "caption", align: "center", children: ["\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0438\u043B\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B. \u041D\u0435 \u0431\u043E\u043B\u0435\u0435 ", maxFileCount, ' ', declensionFile(maxFileCount), " \u0440\u0430\u0437\u043C\u0435\u0440\u043E\u043C \u043D\u0435 \u0431\u043E\u043B\u0435\u0435", ' ', formatFileSizeToView(maxFileSize), extensions && ' в формате ', _jsx(Extensions, { children: extensions })] }));
16
+ return (_jsxs(Typography, { className: className, color: "grey", colorIntensity: "600", variant: "caption", align: "center", children: [_jsx(MobileWrapper, { children: "\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0438\u043B\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B. " }), "\u041D\u0435 \u0431\u043E\u043B\u0435\u0435", ' ', maxFileCount, " ", declensionFile(maxFileCount), " \u0440\u0430\u0437\u043C\u0435\u0440\u043E\u043C \u043D\u0435 \u0431\u043E\u043B\u0435\u0435", ' ', formatFileSizeToView(maxFileSize), extensions && ' в формате ', _jsx(Extensions, { children: extensions })] }));
17
17
  }
18
- return (_jsxs(Typography, { className: className, color: "grey", colorIntensity: "600", variant: "caption", align: "center", children: ["\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0438\u043B\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B. \u0420\u0430\u0437\u043C\u0435\u0440\u043E\u043C \u043D\u0435 \u0431\u043E\u043B\u0435\u0435", ' ', formatFileSizeToView(maxFileSize), extensions && ' в формате ', _jsx(Extensions, { children: extensions })] }));
18
+ return (_jsxs(Typography, { className: className, color: "grey", colorIntensity: "600", variant: "caption", align: "center", children: [_jsx(MobileWrapper, { children: "\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0438\u043B\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B. " }), "\u0420\u0430\u0437\u043C\u0435\u0440", _jsx(MobileWrapper, { children: "\u043E\u043C" }), " \u043D\u0435 \u0431\u043E\u043B\u0435\u0435", ' ', formatFileSizeToView(maxFileSize), extensions && ' в формате ', _jsx(Extensions, { children: extensions })] }));
19
19
  };
@@ -3,3 +3,7 @@ export declare const Extensions: import("../../../styled").StyledComponent<{
3
3
  theme?: import("@emotion/react").Theme | undefined;
4
4
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
5
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
6
+ export declare const MobileWrapper: import("../../../styled").StyledComponent<{
7
+ theme?: import("@emotion/react").Theme | undefined;
8
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
9
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -2,3 +2,8 @@ import { styled } from '../../../styled';
2
2
  export const Extensions = styled.span `
3
3
  text-transform: uppercase;
4
4
  `;
5
+ export const MobileWrapper = styled.span `
6
+ ${({ theme }) => theme.breakpoints.down('sm')} {
7
+ display: none;
8
+ }
9
+ `;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { BinOutlineMd } from '../../../../icons/BinOutlineMd';
3
3
  import { CrossOutlineMd } from '../../../../icons/CrossOutlineMd';
4
4
  import { DownloadOutlineMd } from '../../../../icons/DownloadOutlineMd';
@@ -6,10 +6,12 @@ import { EyeOutlineMd } from '../../../../icons/EyeOutlineMd';
6
6
  import { RetryOutlineMd } from '../../../../icons/RetryOutlineMd';
7
7
  import { IconButton } from '../../../IconButton';
8
8
  import { Tooltip } from '../../../Tooltip';
9
+ import { useViewportType } from '../../../useViewportType';
9
10
  import { Wrapper } from './styles';
10
11
  import { useLogic } from './useLogic';
11
12
  export const Actions = (props) => {
12
13
  const { downloadButtonProps, viewButtonProps, isVisibleAbortButton, isVisibleRetryButton, handleAbort, handleDelete, handleRetry, isLoading, isError, isDeletingFile, fileName, } = useLogic(props);
14
+ const { isMobile } = useViewportType();
13
15
  if (isLoading) {
14
16
  return (_jsx(Wrapper, { children: isVisibleAbortButton && (_jsx(Tooltip, { title: "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443", children: _jsx(IconButton, { variant: "text", onClick: handleAbort, children: _jsx(CrossOutlineMd, {}) }) })) }));
15
17
  }
@@ -17,5 +19,5 @@ export const Actions = (props) => {
17
19
  return (_jsxs(Wrapper, { children: [isVisibleRetryButton && (_jsx(Tooltip, { title: "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443", children: _jsx(IconButton, { variant: "text", onClick: handleRetry, children: _jsx(RetryOutlineMd, {}) }) })), _jsx(Tooltip, { title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", children: _jsx(IconButton, { variant: "text", onClick: handleDelete, loading: isDeletingFile, children: _jsx(CrossOutlineMd, {}) }) })] }));
18
20
  }
19
21
  const { isShowViewButton, ...restViewButtonProps } = viewButtonProps;
20
- return (_jsxs(Wrapper, { children: [isShowViewButton && (_jsx(Tooltip, { title: "\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C", children: _jsx(IconButton, { variant: "text", ...restViewButtonProps, children: _jsx(EyeOutlineMd, {}) }) })), _jsx(Tooltip, { title: "\u0421\u043A\u0430\u0447\u0430\u0442\u044C", children: _jsx(IconButton, { component: "a", variant: "text", download: fileName, ...downloadButtonProps, children: _jsx(DownloadOutlineMd, {}) }) }), _jsx(Tooltip, { title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", children: _jsx(IconButton, { variant: "text", onClick: handleDelete, loading: isDeletingFile, children: _jsx(BinOutlineMd, {}) }) })] }));
22
+ return (_jsxs(Wrapper, { children: [!isMobile && (_jsxs(_Fragment, { children: [isShowViewButton && (_jsx(Tooltip, { title: "\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C", children: _jsx(IconButton, { variant: "text", ...restViewButtonProps, children: _jsx(EyeOutlineMd, {}) }) })), _jsx(Tooltip, { title: "\u0421\u043A\u0430\u0447\u0430\u0442\u044C", children: _jsx(IconButton, { component: "a", variant: "text", download: fileName, ...downloadButtonProps, children: _jsx(DownloadOutlineMd, {}) }) })] })), _jsx(Tooltip, { title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", children: _jsx(IconButton, { variant: "text", onClick: handleDelete, loading: isDeletingFile, children: _jsx(BinOutlineMd, {}) }) })] }));
21
23
  };
@@ -9,5 +9,5 @@ export const FileUploaderFile = (props) => {
9
9
  const { id, name, file, url, size, status, ...actions } = props;
10
10
  const { isLoading, isUploadError, isRestrictionError, errorMsg, progress } = status || {};
11
11
  const isError = isUploadError || isRestrictionError;
12
- return (_jsx(Grow, { in: true, children: _jsxs(Wrapper, { "$isLoading": isLoading, "$isError": isError, children: [_jsxs(Content, { children: [_jsx(FileInfo, { fileName: name, fileSize: size }), isLoading && _jsx(Progress, { progress: progress }), isError && (_jsx(Typography, { variant: "caption", color: "error", children: errorMsg }))] }), _jsx(Actions, { fileId: id, file: file, fileName: name, fileUrl: url, isLoading: isLoading, isError: isError, isUploadError: isUploadError, ...actions })] }) }));
12
+ return (_jsx(Grow, { in: true, children: _jsxs(Wrapper, { "$isLoading": isLoading, "$isError": isError, children: [_jsxs(Content, { children: [_jsx(FileInfo, { fileName: name, fileSize: size, isLoading: isLoading }), isLoading && _jsx(Progress, { progress: progress }), isError && (_jsx(Typography, { variant: "caption", color: "error", children: errorMsg }))] }), _jsx(Actions, { fileId: id, file: file, fileName: name, fileUrl: url, isLoading: isLoading, isError: isError, isUploadError: isUploadError, ...actions })] }) }));
13
13
  };
@@ -21,6 +21,13 @@ export const Wrapper = styled('div', {
21
21
 
22
22
  border: ${({ theme, $isLoading, $isError }) => `1px solid ${getBorderColor(theme, $isLoading, $isError)}`};
23
23
  border-radius: ${({ theme }) => theme.shape.medium};
24
+
25
+ ${({ theme }) => theme.breakpoints.down('sm')} {
26
+ grid-template-columns: ${({ $isLoading }) => ($isLoading ? '1fr 32px' : '1fr auto')};
27
+ gap: ${({ theme }) => theme.spacing(3)};
28
+
29
+ padding: ${({ theme }) => theme.spacing(3, 3, 3, 4)};
30
+ }
24
31
 
25
32
  &:not(:last-of-type) {
26
33
  margin-bottom: ${({ theme }) => theme.spacing(2)};
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { formatFileSizeToView } from '@astral/utils/file/formatFileSizeToView';
3
3
  import { Typography } from '../../../Typography';
4
- import { Extensions, Wrapper } from './styles';
4
+ import { Extensions, MobileWrapper, Wrapper } from './styles';
5
5
  import { useLogic } from './useLogic';
6
6
  export const HintPlaceholder = (props) => {
7
7
  const { extensions, imageProps, maxFileSize, placeholder, className, RenderImage, } = useLogic(props);
8
8
  const renderPlaceholder = () => {
9
9
  if (!placeholder) {
10
- return (_jsxs(Typography, { component: "p", color: "textSecondary", variant: "caption", align: "center", children: ["\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0438\u043B\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B. \u0420\u0430\u0437\u043C\u0435\u0440\u043E\u043C \u043D\u0435 \u0431\u043E\u043B\u0435\u0435", ' ', formatFileSizeToView(maxFileSize), extensions && ' в формате ', _jsx(Extensions, { children: extensions })] }));
10
+ return (_jsxs(Typography, { component: "p", color: "textSecondary", variant: "caption", align: "center", children: [_jsx(MobileWrapper, { children: "\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0438\u043B\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B. " }), "\u0420\u0430\u0437\u043C\u0435\u0440", _jsx(MobileWrapper, { children: "\u043E\u043C" }), " \u043D\u0435 \u0431\u043E\u043B\u0435\u0435", ' ', formatFileSizeToView(maxFileSize), extensions && ' в формате ', _jsx(Extensions, { children: extensions })] }));
11
11
  }
12
12
  if (typeof placeholder === 'string') {
13
13
  return (_jsx(Typography, { component: "p", color: "textSecondary", variant: "caption", align: "center", children: placeholder }));
@@ -27,3 +27,7 @@ export declare const Extensions: import("../../../styled").StyledComponent<{
27
27
  theme?: import("@emotion/react").Theme | undefined;
28
28
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
29
29
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
30
+ export declare const MobileWrapper: import("../../../styled").StyledComponent<{
31
+ theme?: import("@emotion/react").Theme | undefined;
32
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
33
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -17,3 +17,8 @@ export const setDefaultImageStyles = Image.withComponent;
17
17
  export const Extensions = styled.span `
18
18
  text-transform: uppercase;
19
19
  `;
20
+ export const MobileWrapper = styled.span `
21
+ ${({ theme }) => theme.breakpoints.down('sm')} {
22
+ display: none;
23
+ }
24
+ `;
@@ -7,4 +7,8 @@ export const Wrapper = styled.div `
7
7
  padding: ${({ theme }) => theme.spacing(4)};
8
8
 
9
9
  text-align: center;
10
+
11
+ ${({ theme }) => theme.breakpoints.down('sm')} {
12
+ padding: ${({ theme }) => theme.spacing(5, 8)};
13
+ }
10
14
  `;
@@ -5,10 +5,10 @@ import { IconButton } from '../../../IconButton';
5
5
  import { Tooltip } from '../../../Tooltip';
6
6
  import { Typography } from '../../../Typography';
7
7
  import { previewFileUploaderClassnames } from '../../constants';
8
- import { Actions, Details, StyledFileInfo, Wrapper } from './styles';
8
+ import { Actions, ButtonMobile, Details, StyledFileInfo, Temp, Wrapper, } from './styles';
9
9
  import { useLogic } from './useLogic';
10
10
  export const FileError = (props) => {
11
11
  const { isVisibleRetryButton, imageProps, deleteButtonProps, retryButtonProps, RenderImage, } = useLogic(props);
12
12
  const { fileName, fileSize, errorMsg } = props;
13
- return (_jsxs(Wrapper, { children: [_jsx(RenderImage, { ...imageProps, alt: "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u044B\u0439 \u0444\u0430\u0439\u043B" }), _jsx(Typography, { variant: "caption", color: "error", children: errorMsg }), _jsxs(Details, { className: previewFileUploaderClassnames.details, children: [_jsx(StyledFileInfo, { fileName: fileName, fileSize: fileSize }), _jsxs(Actions, { children: [isVisibleRetryButton && (_jsx(Tooltip, { title: "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443", disableInteractive: true, children: _jsx(IconButton, { variant: "light", color: "grey", ...retryButtonProps, children: _jsx(RetryOutlineMd, {}) }) })), _jsx(Tooltip, { title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", disableInteractive: true, children: _jsx(IconButton, { variant: "light", color: "grey", ...deleteButtonProps, children: _jsx(CrossOutlineMd, {}) }) })] })] })] }));
13
+ return (_jsxs(Wrapper, { children: [_jsx(RenderImage, { ...imageProps, alt: "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u044B\u0439 \u0444\u0430\u0439\u043B" }), _jsx(Temp, { children: _jsx(Typography, { variant: "caption", color: "error", children: errorMsg }) }), _jsx(ButtonMobile, { ...deleteButtonProps, color: "error", children: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C" }), _jsxs(Details, { className: previewFileUploaderClassnames.details, children: [_jsx(StyledFileInfo, { fileName: fileName, fileSize: fileSize }), _jsxs(Actions, { children: [isVisibleRetryButton && (_jsx(Tooltip, { title: "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443", disableInteractive: true, children: _jsx(IconButton, { variant: "light", color: "grey", ...retryButtonProps, children: _jsx(RetryOutlineMd, {}) }) })), _jsx(Tooltip, { title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", disableInteractive: true, children: _jsx(IconButton, { variant: "light", color: "grey", ...deleteButtonProps, children: _jsx(CrossOutlineMd, {}) }) })] })] })] }));
14
14
  };
@@ -3,6 +3,20 @@ export declare const Wrapper: import("../../../styled").StyledComponent<{
3
3
  theme?: import("@emotion/react").Theme | undefined;
4
4
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
5
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
+ export declare const ButtonMobile: import("../../../styled").StyledComponent<Omit<import("../../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "component" | "size" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
7
+ variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
8
+ loading?: boolean | undefined;
9
+ color?: "primary" | "success" | "warning" | "error" | "grey" | undefined;
10
+ component?: import("react").ElementType | undefined;
11
+ selected?: boolean | undefined;
12
+ size?: "large" | "medium" | undefined;
13
+ } & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
14
+ theme?: import("@emotion/react").Theme | undefined;
15
+ }, {}, {}>;
16
+ export declare const Temp: import("../../../styled").StyledComponent<{
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
19
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
20
  export declare const Image: import("../../../styled").StyledComponent<{
7
21
  theme?: import("@emotion/react").Theme | undefined;
8
22
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
@@ -31,6 +45,7 @@ export declare const StyledFileInfo: import("../../../styled").StyledComponent<{
31
45
  className?: string | undefined;
32
46
  fileName: string;
33
47
  fileSize?: number | undefined;
48
+ isLoading?: boolean | undefined;
34
49
  } & {
35
50
  theme?: import("@emotion/react").Theme | undefined;
36
51
  }, {}, {}>;
@@ -1,3 +1,4 @@
1
+ import { Button } from '../../../Button';
1
2
  import { styled } from '../../../styled';
2
3
  import { previewFileUploaderClassnames } from '../../constants';
3
4
  import { FileInfo } from '../../FileInfo';
@@ -6,19 +7,31 @@ export const Wrapper = styled.div `
6
7
  display: flex;
7
8
  flex-direction: column;
8
9
  flex-grow: 1;
10
+ gap: ${({ theme }) => theme.spacing(4)};
9
11
  align-items: center;
10
12
  justify-content: center;
11
13
 
12
14
  width: 100%;
15
+ height: 1000px;
13
16
  padding: ${({ theme }) => theme.spacing(4)};
14
17
 
15
- &:hover {
16
- .${previewFileUploaderClassnames.details} {
17
- visibility: visible;
18
- opacity: 1;
18
+ ${({ theme }) => theme.breakpoints.up('sm')} {
19
+ &:hover {
20
+ .${previewFileUploaderClassnames.details} {
21
+ visibility: visible;
22
+ opacity: 1;
23
+ }
19
24
  }
20
25
  }
21
26
  `;
27
+ export const ButtonMobile = styled(Button) `
28
+ ${({ theme }) => theme.breakpoints.up('sm')} {
29
+ display: none;
30
+ }
31
+ `;
32
+ export const Temp = styled.div `
33
+ text-align: center;
34
+ `;
22
35
  export const Image = styled.img `
23
36
  display: block;
24
37
 
@@ -7,5 +7,5 @@ import { Content, Wrapper } from './styles';
7
7
  import { useLogic } from './useLogic';
8
8
  export const FileLoading = (props) => {
9
9
  const { abortButtonProps, fileName, fileSize, progress } = useLogic(props);
10
- return (_jsxs(Wrapper, { children: [_jsx(Typography, { variant: "h5", children: "\u0418\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0430..." }), _jsxs(Content, { children: [_jsx(FileInfo, { fileName: fileName, fileSize: fileSize }), _jsx(Progress, { progress: progress })] }), _jsx(Button, { variant: "light", color: "grey", ...abortButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443" })] }));
10
+ return (_jsxs(Wrapper, { children: [_jsx(Typography, { variant: "h5", children: "\u0418\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0430..." }), _jsxs(Content, { children: [_jsx(FileInfo, { fileName: fileName, fileSize: fileSize, isLoading: true }), _jsx(Progress, { progress: progress })] }), _jsx(Button, { variant: "light", color: "grey", ...abortButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443" })] }));
11
11
  };
@@ -1,19 +1,14 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { BinOutlineMd } from '../../../../icons/BinOutlineMd';
3
- import { DownloadOutlineMd } from '../../../../icons/DownloadOutlineMd';
4
- import { EyeOutlineMd } from '../../../../icons/EyeOutlineMd';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
2
  import { Button } from '../../../Button';
6
3
  import { IconButton } from '../../../IconButton';
7
4
  import { Tooltip } from '../../../Tooltip';
8
5
  import { Typography } from '../../../Typography';
9
- import { useViewportType } from '../../../useViewportType';
10
6
  import { previewFileUploaderClassnames } from '../../constants';
11
7
  import { Preview } from './Preview';
12
8
  import { Actions, Details, StyledFileInfo, Wrapper } from './styles';
13
9
  import { useLogic } from './useLogic';
14
10
  export const FilePreview = (props) => {
15
- const { viewButtonProps, downloadButtonProps, deleteButtonProps, isImageFile, isPdfFile, isOtherFile, } = useLogic(props);
16
- const { file, fileName, fileSize, fileUrl, generateDownloadLink, isHidePersonalData, PdfViewer, isDeletingFile, } = props;
17
- const { isMobile } = useViewportType();
18
- return (_jsxs(Wrapper, { children: [_jsx(Preview, { isImageFile: isImageFile, isPdfFile: isPdfFile, file: file, fileUrl: fileUrl, generateDownloadLink: generateDownloadLink, isHidePersonalData: isHidePersonalData, PdfViewer: PdfViewer }), _jsxs(Details, { className: previewFileUploaderClassnames.details, "$isOtherFile": isOtherFile, children: [isOtherFile && _jsx(Typography, { variant: "h6", children: "\u0424\u0430\u0439\u043B \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D" }), _jsx(StyledFileInfo, { "$isOtherFile": isOtherFile, fileName: fileName, fileSize: fileSize }), _jsx(Actions, { children: isMobile && isOtherFile ? (_jsx(Button, { variant: "light", color: "grey", loading: isDeletingFile, ...deleteButtonProps, children: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C" })) : (_jsxs(_Fragment, { children: [!isOtherFile && (_jsx(Tooltip, { title: "\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C", disableInteractive: true, children: _jsx(IconButton, { variant: "light", color: "grey", ...viewButtonProps, children: _jsx(EyeOutlineMd, {}) }) })), _jsx(Tooltip, { title: "\u0421\u043A\u0430\u0447\u0430\u0442\u044C", disableInteractive: true, children: _jsx(IconButton, { component: "a", variant: "light", color: "grey", download: fileName, ...downloadButtonProps, children: _jsx(DownloadOutlineMd, {}) }) }), _jsx(Tooltip, { title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", disableInteractive: true, children: _jsx(IconButton, { variant: "light", color: "grey", loading: isDeletingFile, ...deleteButtonProps, children: _jsx(BinOutlineMd, {}) }) })] })) })] })] }));
11
+ const { getActionsList, isImageFile, isPdfFile, isOtherFile } = useLogic(props);
12
+ const { file, fileName, fileSize, fileUrl, generateDownloadLink, isHidePersonalData, PdfViewer, } = props;
13
+ return (_jsxs(Wrapper, { children: [!isOtherFile && (_jsx(Preview, { isImageFile: isImageFile, isPdfFile: isPdfFile, file: file, fileUrl: fileUrl, generateDownloadLink: generateDownloadLink, isHidePersonalData: isHidePersonalData, PdfViewer: PdfViewer })), _jsxs(Details, { className: previewFileUploaderClassnames.details, "$isOtherFile": isOtherFile, children: [isOtherFile && _jsx(Typography, { variant: "h6", children: "\u0424\u0430\u0439\u043B \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D" }), _jsx(StyledFileInfo, { "$isOtherFile": isOtherFile, fileName: fileName, fileSize: fileSize }), _jsx(Actions, { children: getActionsList().map(({ type, ...action }) => (_jsx(Tooltip, { title: action.tooltip, disableInteractive: true, children: type === 'iconButton' ? (_jsx(IconButton, { ...action, children: action.icon })) : (_jsx(Button, { ...action, children: 'title' in action ? action.title : '' })) }, action.tooltip))) })] })] }));
19
14
  };
@@ -13,6 +13,7 @@ export declare const StyledFileInfo: import("../../../styled").StyledComponent<{
13
13
  className?: string | undefined;
14
14
  fileName: string;
15
15
  fileSize?: number | undefined;
16
+ isLoading?: boolean | undefined;
16
17
  } & {
17
18
  theme?: import("@emotion/react").Theme | undefined;
18
19
  } & {
@@ -20,34 +20,60 @@ export const Wrapper = styled.div `
20
20
  }
21
21
  `;
22
22
  export const Details = styled.div `
23
- position: absolute;
24
- inset: 0;
23
+ ${({ theme }) => theme.breakpoints.up('sm')} {
24
+ position: absolute;
25
+ inset: 0;
25
26
 
26
- overflow: hidden;
27
- display: flex;
28
- flex-direction: column;
29
- gap: ${({ theme, $isOtherFile }) => (!$isOtherFile ? theme.spacing(4) : 0)};
30
- align-items: center;
31
- justify-content: center;
27
+ overflow: hidden;
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: ${({ theme, $isOtherFile }) => (!$isOtherFile ? theme.spacing(4) : 0)};
31
+ align-items: center;
32
+ justify-content: center;
32
33
 
33
- padding: ${({ theme }) => theme.spacing(4)};
34
+ padding: ${({ theme }) => theme.spacing(4)};
34
35
 
35
- visibility: ${({ $isOtherFile }) => ($isOtherFile ? 'visible' : 'hidden')};
36
- opacity: ${({ $isOtherFile }) => ($isOtherFile ? 1 : 0)};
37
- background-color: ${({ theme, $isOtherFile }) => !$isOtherFile ? theme.palette.background.modalShadow : 'none'};
36
+ visibility: ${({ $isOtherFile }) => ($isOtherFile ? 'visible' : 'hidden')};
37
+ opacity: ${({ $isOtherFile }) => ($isOtherFile ? 1 : 0)};
38
+ background-color: ${({ theme, $isOtherFile }) => !$isOtherFile ? theme.palette.background.modalShadow : 'none'};
38
39
 
39
- transition: ${({ theme }) => {
40
+ transition: ${({ theme }) => {
40
41
  return theme.transitions.create(['opacity', 'visibility'], {
41
42
  duration: theme.transitions.duration.standard,
42
43
  });
43
44
  }};
45
+ }
46
+
47
+ ${({ theme, $isOtherFile }) => !$isOtherFile && theme.breakpoints.down('sm')} {
48
+ position: absolute;
49
+ top: 0;
50
+ right: 0;
51
+
52
+ overflow: hidden;
53
+
54
+ padding: ${({ theme }) => theme.spacing(4)};
55
+
56
+ visibility: visible;
57
+ opacity: 1;
58
+ }
59
+
60
+ ${({ theme, $isOtherFile }) => $isOtherFile && theme.breakpoints.down('sm')} {
61
+ text-align: center;
62
+ }
44
63
  `;
45
64
  export const StyledFileInfo = styled(FileInfo) `
65
+ align-items: center;
46
66
  justify-content: center;
47
67
 
48
68
  margin: ${({ theme, $isOtherFile }) => $isOtherFile ? theme.spacing(6, 0, 11) : 0};
49
69
 
50
70
  color: ${({ theme, $isOtherFile }) => !$isOtherFile ? theme.palette.primary.contrastText : 'none'};
71
+
72
+ ${({ theme }) => theme.breakpoints.down('sm')} {
73
+ display: ${({ $isOtherFile }) => !$isOtherFile && 'none'};
74
+
75
+ margin: ${({ theme, $isOtherFile }) => $isOtherFile ? theme.spacing(6, 0, 8) : 0};
76
+ }
51
77
  `;
52
78
  export const Actions = styled.div `
53
79
  display: flex;
@@ -1,26 +1,61 @@
1
1
  /// <reference types="react" />
2
2
  import { type FilePreviewProps } from '../FilePreview';
3
3
  type UseLogicParams = FilePreviewProps;
4
- export declare const useLogic: ({ fileId, file, fileUrl, generateDownloadLink, onDelete, onView, fileType, }: UseLogicParams) => {
5
- deleteButtonProps: {
4
+ export declare const useLogic: ({ fileId, file, fileUrl, fileName, generateDownloadLink, onDelete, onView, fileType, isDeletingFile, }: UseLogicParams) => {
5
+ isImageFile: boolean;
6
+ isPdfFile: boolean;
7
+ /**
8
+ * Формат файла отличающийся от pdf и изображения
9
+ */
10
+ isOtherFile: boolean;
11
+ getActionsList: () => {
12
+ type: string;
13
+ tooltip: string;
14
+ title: string;
15
+ variant: "light";
16
+ color: "grey";
17
+ icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
18
+ loading: boolean | undefined;
6
19
  onClick: () => void;
7
- };
8
- downloadButtonProps: {
9
- href: string;
10
- };
11
- viewButtonProps: {
20
+ }[] | ({
12
21
  component: import("react").ElementType;
13
22
  href: string;
14
23
  target: string;
15
24
  rel: string;
25
+ type: string;
26
+ tooltip: string;
27
+ variant: "light";
28
+ color: "grey";
29
+ icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
16
30
  } | {
17
31
  onClick: () => void | undefined;
18
- };
19
- isImageFile: boolean;
20
- isPdfFile: boolean;
21
- /**
22
- * Формат файла отличающийся от pdf и изображения
23
- */
24
- isOtherFile: boolean;
32
+ type: string;
33
+ tooltip: string;
34
+ variant: "light";
35
+ color: "grey";
36
+ icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
37
+ } | {
38
+ type: string;
39
+ tooltip: string;
40
+ component: "a";
41
+ variant: "light";
42
+ color: "grey";
43
+ icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
44
+ download: string;
45
+ href: string;
46
+ loading?: undefined;
47
+ onClick?: undefined;
48
+ } | {
49
+ type: string;
50
+ tooltip: string;
51
+ variant: "light";
52
+ color: "grey";
53
+ icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
54
+ loading: boolean | undefined;
55
+ onClick: () => void;
56
+ component?: undefined;
57
+ download?: undefined;
58
+ href?: undefined;
59
+ })[];
25
60
  };
26
61
  export {};