9 | {files && !isNil(files)
10 | ? files.map((file, index) =>
{file.name}
)
11 | : "Файлов нет."}
12 |
13 | );
14 | };
15 |
16 | UploaderPreviewComponent.displayName = "UploaderPreview";
17 |
18 | export const UploaderPreview = memo(UploaderPreviewComponent);
19 |
--------------------------------------------------------------------------------
/src/uikit/components/Uploader/UploaderPreview/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./UploaderPreview";
2 |
--------------------------------------------------------------------------------
/src/uikit/components/Uploader/UploaderPreview/types.ts:
--------------------------------------------------------------------------------
1 | export type TUploaderPreviewProps = {
2 | files?: File[];
3 | };
4 |
--------------------------------------------------------------------------------
/src/uikit/components/Uploader/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./Uploader";
2 |
--------------------------------------------------------------------------------
/src/uikit/components/Uploader/types.ts:
--------------------------------------------------------------------------------
1 | import type { Accept } from "react-dropzone";
2 |
3 | export type TUploaderConfig = {
4 | accept: Accept;
5 | };
6 |
7 | export type TUploaderProps = {
8 | config?: TUploaderConfig;
9 | onFilesUploadedAll?: (handleFilesAllAdd: File[]) => void;
10 | };
11 |
--------------------------------------------------------------------------------
/src/uikit/constants/format.ts:
--------------------------------------------------------------------------------
1 | export const FORMAT_DATE = "dd.MM.yyyy";
2 |
--------------------------------------------------------------------------------
/src/uikit/constants/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./format";
2 | export * from "./pagination";
3 | export * from "./transition";
4 |
--------------------------------------------------------------------------------
/src/uikit/constants/pagination.ts:
--------------------------------------------------------------------------------
1 | export const DEFAULT_PAGE = 1;
2 | export const DEFAULT_PAGE_SIZE = 10;
3 | export const DEFAULT_PAGE_SIZE_LIST = [5, 10, 25, 50, 100];
4 |
--------------------------------------------------------------------------------
/src/uikit/constants/transition.ts:
--------------------------------------------------------------------------------
1 | export const DEBOUNCE_TIMEOUT = 300;
2 | export const TRANSITION = 300;
3 |
--------------------------------------------------------------------------------
/src/uikit/context/dropDownContext.ts:
--------------------------------------------------------------------------------
1 | import { createContext } from "react";
2 | import type { RefObject } from "react";
3 |
4 | export type TDropDownState = {
5 | isDropDownOpen?: boolean;
6 | onClickButtonDropDown?: () => void;
7 | refButtonDropDown?: RefObject