test-stpr-ui-kit 0.6.9 → 0.6.11
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/dist/lib/components/Accordion/Accordion.d.ts +3 -0
- package/dist/lib/components/Accordion/index.d.ts +2 -0
- package/dist/lib/components/ApplyButtons/ApplyButtons.d.ts +3 -0
- package/dist/lib/components/ApplyButtons/index.d.ts +2 -0
- package/dist/lib/components/AuthProtected/AuthProtected.d.ts +3 -0
- package/dist/lib/components/AuthProtected/index.d.ts +2 -0
- package/dist/lib/components/BaseTooltip/BaseTooltip.d.ts +2 -0
- package/dist/lib/components/BaseTooltip/index.d.ts +2 -0
- package/dist/lib/components/Breadcrumb/Breadcrumb.d.ts +3 -0
- package/dist/lib/components/Breadcrumb/index.d.ts +2 -0
- package/dist/lib/components/Button/Button.d.ts +3 -0
- package/dist/lib/components/Button/index.d.ts +2 -0
- package/dist/lib/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/lib/components/Checkbox/index.d.ts +2 -0
- package/dist/lib/components/Confirm/Confirm.d.ts +3 -0
- package/dist/lib/components/Confirm/index.d.ts +2 -0
- package/dist/lib/components/ContextMenu/ContextMenu.d.ts +3 -0
- package/dist/lib/components/ContextMenu/index.d.ts +2 -0
- package/dist/lib/components/DatePicker/DatePicker.d.ts +3 -0
- package/dist/lib/components/DatePicker/index.d.ts +2 -0
- package/dist/lib/components/DatePickerInput/DatePickerInput.d.ts +2 -0
- package/dist/lib/components/DatePickerInput/index.d.ts +2 -0
- package/dist/lib/components/DefaultDropzone/DefaultDropzone.d.ts +3 -0
- package/dist/lib/components/DefaultDropzone/hooks/useDefaultDropzone.d.ts +1 -0
- package/dist/lib/components/DefaultDropzone/index.d.ts +2 -0
- package/dist/lib/components/Dropdown/Dropdown.d.ts +3 -0
- package/dist/lib/components/Dropdown/index.d.ts +2 -0
- package/dist/lib/components/EllipsisTextWithTooltip/EllipsisTextWithTooltip.d.ts +3 -0
- package/dist/lib/components/EllipsisTextWithTooltip/index.d.ts +2 -0
- package/dist/lib/components/EllipsisTextWithTooltip/utils/index.d.ts +2 -0
- package/dist/lib/components/Form/Form.d.ts +3 -0
- package/dist/lib/components/Form/index.d.ts +2 -0
- package/dist/lib/components/Icons/Icon.d.ts +40 -0
- package/dist/lib/components/Icons/index.d.ts +3 -0
- package/dist/lib/components/Icons/types/index.d.ts +44 -0
- package/dist/lib/components/Input/Input.d.ts +2 -0
- package/dist/lib/components/Input/index.d.ts +2 -0
- package/dist/lib/components/Label/Label.d.ts +3 -0
- package/dist/lib/components/Label/index.d.ts +2 -0
- package/dist/lib/components/Layer/Layer.d.ts +3 -0
- package/dist/lib/components/Layer/index.d.ts +2 -0
- package/dist/lib/components/MediaContextProvider/MediaContextProvider.d.ts +3 -0
- package/dist/lib/components/MediaContextProvider/constants/index.d.ts +3 -0
- package/dist/lib/components/MediaContextProvider/hooks/index.d.ts +7 -0
- package/dist/lib/components/MediaContextProvider/index.d.ts +4 -0
- package/dist/lib/components/Modal/Modal.d.ts +3 -0
- package/dist/lib/components/Modal/hooks/index.d.ts +17 -0
- package/dist/lib/components/Modal/index.d.ts +3 -0
- package/dist/lib/components/Portal/Potral.d.ts +3 -0
- package/dist/lib/components/Portal/index.d.ts +2 -0
- package/dist/lib/components/ProgressWrapper/ProgressWrapper.d.ts +3 -0
- package/dist/lib/components/ProgressWrapper/constants/index.d.ts +1 -0
- package/dist/lib/components/ProgressWrapper/hooks/index.d.ts +4 -0
- package/dist/lib/components/ProgressWrapper/index.d.ts +3 -0
- package/dist/lib/components/Select/Select.d.ts +3 -0
- package/dist/lib/components/Select/constants/index.d.ts +3 -0
- package/dist/lib/components/Select/hooks/useSelect.d.ts +28 -0
- package/dist/lib/components/Select/index.d.ts +2 -0
- package/dist/lib/components/Skeleton/Skeleton.d.ts +3 -0
- package/dist/lib/components/Skeleton/index.d.ts +2 -0
- package/dist/lib/components/Spinner/Spinner.d.ts +3 -0
- package/dist/lib/components/Spinner/index.d.ts +2 -0
- package/dist/lib/components/Table/Table.d.ts +1 -0
- package/dist/lib/components/Table/hooks/index.d.ts +12 -0
- package/dist/lib/components/Table/index.d.ts +3 -0
- package/dist/lib/components/Table/utils/index.d.ts +2 -0
- package/dist/lib/components/Tabs/Tabs.d.ts +3 -0
- package/dist/lib/components/Tabs/index.d.ts +2 -0
- package/dist/lib/components/Text/Text.d.ts +2 -0
- package/dist/lib/components/Text/index.d.ts +2 -0
- package/dist/lib/components/TextWithLabel/TextWithLabel.d.ts +3 -0
- package/dist/lib/components/TextWithLabel/index.d.ts +2 -0
- package/dist/lib/components/Textarea/Textarea.d.ts +2 -0
- package/dist/lib/components/Textarea/index.d.ts +2 -0
- package/dist/lib/components/Tooltip/Tooltip.d.ts +4 -0
- package/dist/lib/components/Tooltip/index.d.ts +3 -0
- package/dist/lib/components/Tooltip/types/index.d.ts +34 -0
- package/dist/lib/components/UploadFiles/UploadFiles.d.ts +3 -0
- package/dist/lib/components/UploadFiles/index.d.ts +2 -0
- package/dist/lib/components/UploadFiles/types/index.d.ts +33 -0
- package/dist/lib/components/UploadFiles/utils/index.d.ts +12 -0
- package/dist/lib/components/ViewImageModal/ViewImageModal.d.ts +3 -0
- package/dist/lib/components/ViewImageModal/index.d.ts +2 -0
- package/dist/lib/test-stpr-ui-kit.d.ts +46 -0
- package/dist/lib/vite-env.d.ts +2 -0
- package/dist/test-stpr-ui-kit.es.d.ts +1 -819
- package/dist/test-stpr-ui-kit.js +5888 -5921
- package/dist/test-stpr-ui-kit.umd.cjs +9 -7
- package/package.json +5 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useDefaultDropzone: (props: TUseDefaultDropzoneProps) => any;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import AddFileIcon from "../../../src/images/add_file.svg?react";
|
|
3
|
+
import AddUserIcon from "../../../src/images/add_user.svg?react";
|
|
4
|
+
import ArrowBottomIcon from "../../../src/images/arrow-bottom.svg?react";
|
|
5
|
+
import CalendarIcon from "../../../src/images/calendar.svg?react";
|
|
6
|
+
import CheckIcon from "../../../src/images/check.svg?react";
|
|
7
|
+
import ChevronDownIcon from "../../../src/images/chevron_down.svg?react";
|
|
8
|
+
import CloseIcon from "../../../src/images/close.svg?react";
|
|
9
|
+
import CopyIcon from "../../../src/images/copy.svg?react";
|
|
10
|
+
import DotsIcon from "../../../src/images/dots.svg?react";
|
|
11
|
+
import DownloadIcon from "../../../src/images/download.svg?react";
|
|
12
|
+
import EditIcon from "../../../src/images/edit.svg?react";
|
|
13
|
+
import FileIcon from "../../../src/images/file.svg?react";
|
|
14
|
+
import FileNotFilledIcon from "../../../src/images/file_not_filled.svg?react";
|
|
15
|
+
import FilterIcon from "../../../src/images/filter.svg?react";
|
|
16
|
+
import FolderIcon from "../../../src/images/folder.svg?react";
|
|
17
|
+
import HistoryClockIcon from "../../../src/images/history_clock.svg?react";
|
|
18
|
+
import InfoIcon from "../../../src/images/info.svg?react";
|
|
19
|
+
import InfoErrorIcon from "../../../src/images/info_error.svg?react";
|
|
20
|
+
import LayersThreeIcon from "../../../src/images/layers-three.svg?react";
|
|
21
|
+
import LinkAngledIcon from "../../../src/images/link-angled.svg?react";
|
|
22
|
+
import LogoutIcon from "../../../src/images/logout.svg?react";
|
|
23
|
+
import MinusIcon from "../../../src/images/minus.svg?react";
|
|
24
|
+
import PlusIcon from "../../../src/images/plus.svg?react";
|
|
25
|
+
import PlusCircleIcon from "../../../src/images/plus_circle.svg?react";
|
|
26
|
+
import PlusSquareIcon from "../../../src/images/plus_square.svg?react";
|
|
27
|
+
import RefreshIcon from "../../../src/images/refresh.svg?react";
|
|
28
|
+
import RefreshDoubleIcon from "../../../src/images/refresh-dbl.svg?react";
|
|
29
|
+
import SaveIcon from "../../../src/images/save.svg?react";
|
|
30
|
+
import SearchIcon from "../../../src/images/search.svg?react";
|
|
31
|
+
import SelectChevronDownIcon from "../../../src/images/select_chevron_down.svg?react";
|
|
32
|
+
import TerminalSquareIcon from "../../../src/images/terminal_square.svg?react";
|
|
33
|
+
import TrashIcon from "../../../src/images/trash.svg?react";
|
|
34
|
+
import UpdateIcon from "../../../src/images/update.svg?react";
|
|
35
|
+
import UploadIcon from "../../../src/images/upload.svg?react";
|
|
36
|
+
import UserRightIcon from "../../../src/images/user-right.svg?react";
|
|
37
|
+
import WarningColorIcon from "../../../src/images/warning_color.svg?react";
|
|
38
|
+
import { IconProps } from "./types";
|
|
39
|
+
export declare const Icon: React.FC<IconProps>;
|
|
40
|
+
export { AddFileIcon, AddUserIcon, ArrowBottomIcon, CalendarIcon, CheckIcon, ChevronDownIcon, CloseIcon, CopyIcon, DotsIcon, DownloadIcon, EditIcon, FileIcon, FileNotFilledIcon, FilterIcon, FolderIcon, HistoryClockIcon, InfoErrorIcon, InfoIcon, LayersThreeIcon, LinkAngledIcon, LogoutIcon, MinusIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, RefreshDoubleIcon, RefreshIcon, SaveIcon, SearchIcon, SelectChevronDownIcon, TerminalSquareIcon, TrashIcon, UpdateIcon, UploadIcon, UserRightIcon, WarningColorIcon, };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { AddFileIcon, AddUserIcon, ArrowBottomIcon, CalendarIcon, CheckIcon, ChevronDownIcon, CloseIcon, CopyIcon, DotsIcon, DownloadIcon, EditIcon, FileIcon, FileNotFilledIcon, FilterIcon, FolderIcon, HistoryClockIcon, Icon, InfoErrorIcon, InfoIcon, LayersThreeIcon, LinkAngledIcon, LogoutIcon, MinusIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, RefreshDoubleIcon, RefreshIcon, SaveIcon, SearchIcon, SelectChevronDownIcon, TerminalSquareIcon, TrashIcon, UpdateIcon, UploadIcon, UserRightIcon, WarningColorIcon, } from "./Icon.tsx";
|
|
2
|
+
export type { IconProps, SVGComponent } from "./types";
|
|
3
|
+
export { EIconName } from "./types";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare enum EIconName {
|
|
3
|
+
ChevronDown = "chevronDown",
|
|
4
|
+
Info = "info",
|
|
5
|
+
Plus = "plus",
|
|
6
|
+
SelectChevronDown = "selectChevronDown",
|
|
7
|
+
Upload = "upload",
|
|
8
|
+
Trash = "trash",
|
|
9
|
+
Check = "check",
|
|
10
|
+
Copy = "copy",
|
|
11
|
+
Close = "close",
|
|
12
|
+
PlusSquare = "plusSquare",
|
|
13
|
+
PlusCircle = "plusCircle",
|
|
14
|
+
WarningColor = "warningColor",
|
|
15
|
+
Dots = "dots",
|
|
16
|
+
HistoryClock = "historyClock",
|
|
17
|
+
Minus = "minus",
|
|
18
|
+
TerminalSquare = "terminalSquare",
|
|
19
|
+
File = "file",
|
|
20
|
+
FileNotFilled = "fileNotFilled",
|
|
21
|
+
InfoError = "infoError",
|
|
22
|
+
Save = "save",
|
|
23
|
+
Refresh = "refresh",
|
|
24
|
+
RefreshDouble = "refreshDouble",
|
|
25
|
+
Logout = "logout",
|
|
26
|
+
Edit = "edit",
|
|
27
|
+
Download = "download",
|
|
28
|
+
AddUser = "addUser",
|
|
29
|
+
AddFile = "addFile",
|
|
30
|
+
Calendar = "calendar",
|
|
31
|
+
ArrowBottom = "arrowBottom",
|
|
32
|
+
UserRight = "userRight",
|
|
33
|
+
Search = "search",
|
|
34
|
+
Update = "update",
|
|
35
|
+
Filter = "filter",
|
|
36
|
+
Folder = "folder",
|
|
37
|
+
LayersThree = "layersThree",
|
|
38
|
+
LinkAngled = "linkAngled"
|
|
39
|
+
}
|
|
40
|
+
export declare type SVGComponent = React.FC<React.SVGProps<SVGSVGElement>>;
|
|
41
|
+
export interface IconProps extends React.SVGProps<SVGSVGElement> {
|
|
42
|
+
name: EIconName;
|
|
43
|
+
rotate?: number;
|
|
44
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface UseModalParams {
|
|
3
|
+
initialValue?: never;
|
|
4
|
+
}
|
|
5
|
+
export declare const useModal: (params?: UseModalParams) => {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
modalData: {
|
|
8
|
+
[name: string]: any;
|
|
9
|
+
} | null;
|
|
10
|
+
onOpenModal: (modalData: {
|
|
11
|
+
[name: string]: unknown;
|
|
12
|
+
}, isKeepRest?: boolean) => void;
|
|
13
|
+
onCloseModal: (_event?: React.MouseEvent<HTMLButtonElement, MouseEvent> | undefined, closeData?: {
|
|
14
|
+
[name: string]: unknown;
|
|
15
|
+
} | undefined) => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_DURATION = 2000;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TOnBlurSelect, TOnChangeSelect, TSelectListStyle, TSelectOption } from "../types";
|
|
3
|
+
export declare type TUseSelectParams = {
|
|
4
|
+
options: TSelectOption[];
|
|
5
|
+
value?: string | null | number;
|
|
6
|
+
name: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
isSearchable?: boolean;
|
|
9
|
+
onChange?: TOnChangeSelect;
|
|
10
|
+
onBlur?: TOnBlurSelect;
|
|
11
|
+
};
|
|
12
|
+
export declare type TUseSelectReturn = {
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
searchQuery: string;
|
|
15
|
+
listStyle: TSelectListStyle;
|
|
16
|
+
refControl: React.RefObject<HTMLDivElement>;
|
|
17
|
+
refListWrapper: React.RefObject<HTMLDivElement>;
|
|
18
|
+
searchInputRef: React.RefObject<HTMLInputElement>;
|
|
19
|
+
selectedOption: TSelectOption | undefined;
|
|
20
|
+
filteredOptions: TSelectOption[];
|
|
21
|
+
listWrapperStyle: React.CSSProperties;
|
|
22
|
+
handleSelect: TOnChangeSelect;
|
|
23
|
+
handleToggle: () => void;
|
|
24
|
+
handleSearchChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
25
|
+
handleSearchClick: (event: React.MouseEvent) => void;
|
|
26
|
+
setSearchQuery: React.Dispatch<React.SetStateAction<string>>;
|
|
27
|
+
};
|
|
28
|
+
export declare function useSelect(params: TUseSelectParams): TUseSelectReturn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Table: <TData extends object>(props: TableProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TClickOnCellAction } from "../types";
|
|
2
|
+
interface IUseTableActionsProps<T> {
|
|
3
|
+
onEdit?: (data: T) => void;
|
|
4
|
+
onDelete?: (key: string) => void;
|
|
5
|
+
onRowClick?: (data: T) => void;
|
|
6
|
+
onCustomAction?: (action: TClickOnCellAction<T>) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const useTableActions: <T extends {
|
|
9
|
+
key?: string | number | undefined;
|
|
10
|
+
id?: string | number | undefined;
|
|
11
|
+
}>({ onEdit, onDelete, onRowClick, onCustomAction, }?: IUseTableActionsProps<T>) => (action: TClickOnCellAction<T>) => void;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BaseTooltipProps } from "../../BaseTooltip";
|
|
3
|
+
export declare enum ETooltipPosition {
|
|
4
|
+
Top = "top",
|
|
5
|
+
TopLeft = "top-left",
|
|
6
|
+
TopRight = "top-right",
|
|
7
|
+
Bottom = "bottom",
|
|
8
|
+
BottomLeft = "bottom-left",
|
|
9
|
+
BottomRight = "bottom-right",
|
|
10
|
+
Left = "left",
|
|
11
|
+
LeftTop = "left-top",
|
|
12
|
+
LeftBottom = "left-bottom",
|
|
13
|
+
Right = "right",
|
|
14
|
+
RightTop = "right-top",
|
|
15
|
+
RightBottom = "right-bottom"
|
|
16
|
+
}
|
|
17
|
+
export interface TooltipProps extends Omit<BaseTooltipProps, "classNameRoot" | "classNameContentRoot"> {
|
|
18
|
+
hover?: boolean;
|
|
19
|
+
isToggleClick?: boolean;
|
|
20
|
+
isVisibleTooltip?: boolean;
|
|
21
|
+
position?: ETooltipPosition;
|
|
22
|
+
/** When true, disables position recalculation — only the passed `position` is used. */
|
|
23
|
+
lockPosition?: boolean;
|
|
24
|
+
trigger?: React.ReactNode;
|
|
25
|
+
triggerAction?: () => void;
|
|
26
|
+
actionOnClose?: () => void;
|
|
27
|
+
classNameTooltip?: string;
|
|
28
|
+
classNameBaseTooltipRoot?: string;
|
|
29
|
+
classNameBaseTooltipContentRoot?: string;
|
|
30
|
+
isStopPropagationClickOnTrigger?: boolean;
|
|
31
|
+
styleTooltip?: React.CSSProperties;
|
|
32
|
+
triggerTooltipGap?: number;
|
|
33
|
+
}
|
|
34
|
+
export declare type InfoTooltipProps = Omit<TooltipProps, "trigger">;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Accept, DropEvent, ErrorCode, FileError, FileRejection } from "react-dropzone";
|
|
2
|
+
import { ETooltipPosition } from "../../Tooltip";
|
|
3
|
+
export interface UploadFilesProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
variant?: "input" | "dropzone";
|
|
6
|
+
name: string;
|
|
7
|
+
onDropFiles: <T extends File>(acceptedFiles: T[], name: string, fileRejections?: FileRejection[], event?: DropEvent) => void;
|
|
8
|
+
label?: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
accept?: Accept;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
files: File[];
|
|
14
|
+
infoTooltipText?: string;
|
|
15
|
+
tooltipPosition?: ETooltipPosition;
|
|
16
|
+
classNameRoot?: string;
|
|
17
|
+
classNameLabel?: string;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
error?: string;
|
|
20
|
+
classNameBaseInfoTooltipRoot?: string;
|
|
21
|
+
maxSizeMb?: number;
|
|
22
|
+
requiredImageDimensionsPx?: TImageDimensionsPx;
|
|
23
|
+
}
|
|
24
|
+
export declare type TImageDimensionsPx = {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
};
|
|
28
|
+
export declare type TLocalErrorFile = {
|
|
29
|
+
file: File;
|
|
30
|
+
errors: readonly FileError[];
|
|
31
|
+
};
|
|
32
|
+
export type { Accept, FileError, FileRejection };
|
|
33
|
+
export { ErrorCode };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TLocalErrorFile } from "../types";
|
|
2
|
+
export declare const getErrorTextFromError: (error: FileError) => "" | "Неверный формат файла" | "Некорректный размер файла";
|
|
3
|
+
export declare const formatFileSize: (bytes: number, options?: {
|
|
4
|
+
decimals?: number;
|
|
5
|
+
space?: boolean;
|
|
6
|
+
}) => string;
|
|
7
|
+
export declare const getKbFromMb: (mb: number) => number;
|
|
8
|
+
export declare const validateAcceptedFilesByImageDimensions: (acceptedFiles: File[], requiredImageDimensionsPx?: any) => Promise<{
|
|
9
|
+
validAcceptedFiles: File[];
|
|
10
|
+
invalidDimensionErrors: TLocalErrorFile[];
|
|
11
|
+
}>;
|
|
12
|
+
export declare const getMostFormat: (accept: Accept) => string;
|