@mci-ui/mci-ui 0.0.77 → 0.0.79
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/README.md +273 -2
- package/dist/index.css +1 -1
- package/dist/index.es.js +1882 -1809
- package/dist/index.umd.js +2 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/shared/types/mci-ui.types.d.ts +1 -0
- package/dist/types/shared/types/ui/breadcrumb.types.d.ts +13 -0
- package/dist/types/shared/types/ui/button.types.d.ts +15 -0
- package/dist/types/shared/types/ui/check.types.d.ts +15 -0
- package/dist/types/shared/types/ui/collapse.types.d.ts +9 -0
- package/dist/types/shared/types/ui/drawer.types.d.ts +16 -0
- package/dist/types/shared/types/ui/identity-input.types.d.ts +6 -0
- package/dist/types/shared/types/ui/index.d.ts +21 -0
- package/dist/types/shared/types/ui/input.types.d.ts +25 -0
- package/dist/types/shared/types/ui/loader.types.d.ts +8 -0
- package/dist/types/shared/types/ui/modal.types.d.ts +17 -0
- package/dist/types/shared/types/ui/pagination.types.d.ts +13 -0
- package/dist/types/shared/types/ui/phone.types.d.ts +15 -0
- package/dist/types/shared/types/ui/picker.types.d.ts +24 -0
- package/dist/types/shared/types/ui/select.types.d.ts +25 -0
- package/dist/types/shared/types/ui/skeleton.types.d.ts +6 -0
- package/dist/types/shared/types/ui/tabs.types.d.ts +18 -0
- package/dist/types/shared/types/ui/tag.types.d.ts +10 -0
- package/dist/types/shared/types/ui/textarea.types.d.ts +12 -0
- package/dist/types/shared/types/ui/toast.types.d.ts +10 -0
- package/dist/types/shared/types/ui/toggle.types.d.ts +9 -0
- package/dist/types/shared/types/ui/tooltip.types.d.ts +8 -0
- package/dist/types/shared/types/ui/upload.types.d.ts +27 -0
- package/dist/types/shared/ui/MciModal/MciModal.d.ts +1 -18
- package/dist/types/shared/ui/mciBreadcrumb/MciBreadcrumb.d.ts +1 -14
- package/dist/types/shared/ui/mciButton/MciButton.d.ts +1 -16
- package/dist/types/shared/ui/mciCheck/MciCheck.d.ts +1 -14
- package/dist/types/shared/ui/mciCollapse/MciCollapse.d.ts +1 -10
- package/dist/types/shared/ui/mciDrawer/MciDrawer.d.ts +1 -17
- package/dist/types/shared/ui/mciIdentityInput/MciIdentityInput.d.ts +3 -8
- package/dist/types/shared/ui/mciIdentityInput/mci-identity-input.utils.d.ts +9 -0
- package/dist/types/shared/ui/mciInput/MciInput.d.ts +1 -24
- package/dist/types/shared/ui/mciInput/mci-input.utils.d.ts +19 -0
- package/dist/types/shared/ui/mciLoader/MciLoader.d.ts +1 -9
- package/dist/types/shared/ui/mciPagination/MciPagination.d.ts +1 -14
- package/dist/types/shared/ui/mciPagination/mci-pagination.utils.d.ts +1 -0
- package/dist/types/shared/ui/mciPhone/MciPhone.d.ts +1 -15
- package/dist/types/shared/ui/mciPhone/mci-phone.utils.d.ts +32 -0
- package/dist/types/shared/ui/mciPicker/MciPicker.d.ts +1 -23
- package/dist/types/shared/ui/mciPicker/mci-picker.utils.d.ts +14 -0
- package/dist/types/shared/ui/mciSelect/MciSelect.d.ts +1 -24
- package/dist/types/shared/ui/mciSelect/mci-select.utils.d.ts +39 -0
- package/dist/types/shared/ui/mciSkeleton/MciSkeleton.d.ts +1 -7
- package/dist/types/shared/ui/mciTable/MciTableClamp2.d.ts +7 -0
- package/dist/types/shared/ui/mciTable/mci-table.utils.d.ts +3 -0
- package/dist/types/shared/ui/mciTabs/MciTabs.d.ts +1 -19
- package/dist/types/shared/ui/mciTag/MciTag.d.ts +1 -11
- package/dist/types/shared/ui/mciTextarea/MciTextarea.d.ts +1 -12
- package/dist/types/shared/ui/mciToast/MciToast.d.ts +1 -9
- package/dist/types/shared/ui/mciToast/mci-toast.utils.d.ts +34 -0
- package/dist/types/shared/ui/mciToggle/MciToggle.d.ts +1 -10
- package/dist/types/shared/ui/mciTooltip/MciTooltip.d.ts +1 -9
- package/dist/types/shared/ui/mciUpload/MciUpload.d.ts +1 -27
- package/dist/types/shared/ui/mciUpload/mci-upload.utils.d.ts +5 -0
- package/package.json +1 -1
- package/dist/types/App.d.ts +0 -2
- package/dist/types/main.d.ts +0 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -23,3 +23,4 @@ export { default as MciIdentityInput } from './shared/ui/mciIdentityInput/MciIde
|
|
|
23
23
|
export { default as MciTableColumnsPanel } from './shared/ui/mciTable/MciTableColumnsPanel.tsx';
|
|
24
24
|
export { default as useTableColumnSettings } from './shared/lib/hooks/useTableColumnSettings.ts';
|
|
25
25
|
export type { MciTableColumn, MciTableProps, ColumnKey } from './shared/types/mci-table.types.ts';
|
|
26
|
+
export type * from './shared/types/mci-ui.types.ts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './ui';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type BreadcrumbItem = {
|
|
3
|
+
label: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export type Variant = 'blue' | 'yellow';
|
|
9
|
+
export type MciBreadcrumbProps = {
|
|
10
|
+
items: BreadcrumbItem[];
|
|
11
|
+
variant?: Variant;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type ButtonProps = {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
text?: string;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
iconPosition?: 'left' | 'right';
|
|
7
|
+
size?: 'sm' | 'md' | 'base';
|
|
8
|
+
variant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'tertiary';
|
|
9
|
+
color?: 'blue' | 'yellow';
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
type?: 'button' | 'submit' | 'reset';
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
export type MciCheckProps = {
|
|
3
|
+
type?: 'checkbox' | 'radio';
|
|
4
|
+
label?: string;
|
|
5
|
+
supportText?: string;
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
error?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
variant?: 'blue' | 'yellow';
|
|
13
|
+
name?: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface DrawerProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
position?: 'left' | 'right';
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
footer?: ReactNode;
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
showCloseButton?: boolean;
|
|
11
|
+
drawerClassName?: string;
|
|
12
|
+
contentClassName?: string;
|
|
13
|
+
closeOnOverlayClick?: boolean;
|
|
14
|
+
closeOnEscape?: boolean;
|
|
15
|
+
width?: string | number;
|
|
16
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
import { InputProps } from './input.types';
|
|
3
|
+
export interface MciDocumentInputProps extends Omit<InputProps, 'onChange'> {
|
|
4
|
+
mode: 'passport' | 'pinfl' | 'metirka';
|
|
5
|
+
onChange?: (value: string, e: ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type { ModalProps } from './modal.types';
|
|
2
|
+
export type { BreadcrumbItem, Variant, MciBreadcrumbProps } from './breadcrumb.types';
|
|
3
|
+
export type { ButtonProps } from './button.types';
|
|
4
|
+
export type { MciCheckProps } from './check.types';
|
|
5
|
+
export type { CollapseProps } from './collapse.types';
|
|
6
|
+
export type { DrawerProps } from './drawer.types';
|
|
7
|
+
export type { InputProps } from './input.types';
|
|
8
|
+
export type { MciDocumentInputProps } from './identity-input.types';
|
|
9
|
+
export type { MciLoaderProps } from './loader.types';
|
|
10
|
+
export type { PaginationProps } from './pagination.types';
|
|
11
|
+
export type { PhoneInputProps } from './phone.types';
|
|
12
|
+
export type { DateValue, RangeValue, MciPickerValue, MciPickerProps } from './picker.types';
|
|
13
|
+
export type { Option, SelectProps } from './select.types';
|
|
14
|
+
export type { SkeletonProps } from './skeleton.types';
|
|
15
|
+
export type { Tab, TabsProps } from './tabs.types';
|
|
16
|
+
export type { TagProps } from './tag.types';
|
|
17
|
+
export type { TextareaProps } from './textarea.types';
|
|
18
|
+
export type { ToastType, ToastProps } from './toast.types';
|
|
19
|
+
export type { ToggleProps } from './toggle.types';
|
|
20
|
+
export type { TooltipProps } from './tooltip.types';
|
|
21
|
+
export type { FileInfo, MciUploadProps } from './upload.types';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ChangeEvent, ReactNode } from 'react';
|
|
2
|
+
export type InputProps = {
|
|
3
|
+
label?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
type?: 'text' | 'email' | 'password' | 'number' | 'tel';
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
rightIcon?: ReactNode;
|
|
8
|
+
iconPosition?: 'left' | 'right';
|
|
9
|
+
size?: 'sm' | 'md' | 'base';
|
|
10
|
+
error?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
value?: string;
|
|
14
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
onFocus?: () => void;
|
|
16
|
+
onBlur?: () => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
readOnly?: boolean;
|
|
20
|
+
maxLength?: number;
|
|
21
|
+
onClear?: () => void;
|
|
22
|
+
showClearButton?: boolean;
|
|
23
|
+
step?: string | number;
|
|
24
|
+
autoComplete?: string;
|
|
25
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ModalProps {
|
|
3
|
+
show: boolean;
|
|
4
|
+
setShow: (show: boolean) => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
Header?: ReactNode;
|
|
8
|
+
Body?: ReactNode;
|
|
9
|
+
footer?: ReactNode;
|
|
10
|
+
handleClickOutside?: boolean;
|
|
11
|
+
showCloseIcon?: boolean;
|
|
12
|
+
showHeader?: boolean;
|
|
13
|
+
overlayClassName?: string;
|
|
14
|
+
containerClassName?: string;
|
|
15
|
+
bodyClassName?: string;
|
|
16
|
+
footerClassName?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PaginationProps {
|
|
2
|
+
totalItems: number;
|
|
3
|
+
currentPage: number;
|
|
4
|
+
perPage: number;
|
|
5
|
+
onPageChange: (page: number) => void;
|
|
6
|
+
onPerPageChange?: (value: number) => void;
|
|
7
|
+
siblingCount?: number;
|
|
8
|
+
perPageOptions?: number[];
|
|
9
|
+
showPerPage?: boolean;
|
|
10
|
+
variant?: 'yellow' | 'blue';
|
|
11
|
+
size?: 'medium' | 'large';
|
|
12
|
+
paginationClassName?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type PhoneInputProps = {
|
|
2
|
+
label?: string;
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
size?: 'sm' | 'md' | 'base';
|
|
5
|
+
error?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
value?: string;
|
|
9
|
+
onChange?: (value: string) => void;
|
|
10
|
+
onFocus?: () => void;
|
|
11
|
+
onBlur?: () => void;
|
|
12
|
+
className?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
showIcon?: boolean;
|
|
15
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Locale } from '../../lib/locales';
|
|
2
|
+
export type DateValue = Date | string | null;
|
|
3
|
+
export type RangeValue = [DateValue, DateValue];
|
|
4
|
+
export type MciPickerValue = DateValue | RangeValue;
|
|
5
|
+
export interface MciPickerProps {
|
|
6
|
+
type?: 'date' | 'range';
|
|
7
|
+
value?: MciPickerValue;
|
|
8
|
+
onChange?: (value: MciPickerValue) => void;
|
|
9
|
+
placeholder?: string | [string, string];
|
|
10
|
+
label?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
format?: string;
|
|
15
|
+
minDate?: Date;
|
|
16
|
+
maxDate?: Date;
|
|
17
|
+
error?: string;
|
|
18
|
+
showClear?: boolean;
|
|
19
|
+
allowManualInput?: boolean;
|
|
20
|
+
locale?: Locale;
|
|
21
|
+
startView?: 'day' | 'month' | 'year';
|
|
22
|
+
iconPosition?: 'left' | 'right';
|
|
23
|
+
align?: 'left' | 'right' | 'center' | 'auto';
|
|
24
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type Option = {
|
|
3
|
+
value: string | number;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
export type SelectProps = {
|
|
7
|
+
label?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
options: Option[];
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
iconPosition?: 'left' | 'right';
|
|
12
|
+
size?: 'sm' | 'md' | 'base';
|
|
13
|
+
error?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
value?: string | number;
|
|
17
|
+
onChange?: (value: string | number) => void;
|
|
18
|
+
onFocus?: () => void;
|
|
19
|
+
onBlur?: () => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
clearable?: boolean;
|
|
22
|
+
searchable?: boolean;
|
|
23
|
+
onSearch?: (searchTerm: string) => void;
|
|
24
|
+
name?: string;
|
|
25
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type Tab = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type TabsProps = {
|
|
10
|
+
tabs: Tab[];
|
|
11
|
+
defaultTab?: string;
|
|
12
|
+
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
13
|
+
className?: string;
|
|
14
|
+
tabListClassName?: string;
|
|
15
|
+
contentClassName?: string;
|
|
16
|
+
extra?: ReactNode;
|
|
17
|
+
onChange?: (tabId: string | number) => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type TagProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
variant?: 'success' | 'warning' | 'error' | 'gray' | 'blue';
|
|
5
|
+
size?: 'sm' | 'md' | 'lg';
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
iconPosition?: 'left' | 'right';
|
|
8
|
+
rounded?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type ToastType = 'success' | 'error' | 'warning' | 'info' | 'loading';
|
|
3
|
+
export interface ToastProps {
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
type?: ToastType;
|
|
7
|
+
duration?: number;
|
|
8
|
+
action?: ReactNode;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { UploadLocale } from '../../lib/uploadLanguage';
|
|
2
|
+
export interface FileInfo {
|
|
3
|
+
id: string;
|
|
4
|
+
file: File;
|
|
5
|
+
preview?: string;
|
|
6
|
+
progress: number;
|
|
7
|
+
status: 'uploading' | 'success' | 'error';
|
|
8
|
+
error?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MciUploadProps {
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
accept?: string;
|
|
13
|
+
maxSize?: number;
|
|
14
|
+
maxFiles?: number;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
label?: string;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
error?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
onFilesChange?: (files: File[]) => void;
|
|
21
|
+
onUpload?: (files: FileInfo[]) => Promise<void>;
|
|
22
|
+
showPreview?: boolean;
|
|
23
|
+
locale?: UploadLocale;
|
|
24
|
+
showFileTypeIcon?: boolean;
|
|
25
|
+
customValidator?: (file: File) => string | null;
|
|
26
|
+
variant?: 'yellow' | 'blue';
|
|
27
|
+
}
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
interface ModalProps {
|
|
3
|
-
show: boolean;
|
|
4
|
-
setShow: (show: boolean) => void;
|
|
5
|
-
title?: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
Header?: React.ReactNode;
|
|
8
|
-
Body?: React.ReactNode;
|
|
9
|
-
footer?: React.ReactNode;
|
|
10
|
-
handleClickOutside?: boolean;
|
|
11
|
-
showCloseIcon?: boolean;
|
|
12
|
-
showHeader?: boolean;
|
|
13
|
-
overlayClassName?: string;
|
|
14
|
-
containerClassName?: string;
|
|
15
|
-
bodyClassName?: string;
|
|
16
|
-
footerClassName?: string;
|
|
17
|
-
}
|
|
1
|
+
import { ModalProps } from '../../types/ui/modal.types';
|
|
18
2
|
export default function MciModal({ show, setShow, title, description, Header, Body, footer, handleClickOutside, showCloseIcon, showHeader, overlayClassName, containerClassName, bodyClassName, footerClassName, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export {};
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type BreadcrumbItem = {
|
|
3
|
-
label: string;
|
|
4
|
-
href?: string;
|
|
5
|
-
onClick?: () => void;
|
|
6
|
-
icon?: React.ReactNode;
|
|
7
|
-
};
|
|
8
|
-
type Variant = 'blue' | 'yellow';
|
|
9
|
-
type MciBreadcrumbProps = {
|
|
10
|
-
items: BreadcrumbItem[];
|
|
11
|
-
variant?: Variant;
|
|
12
|
-
className?: string;
|
|
13
|
-
};
|
|
1
|
+
import { MciBreadcrumbProps } from '../../types/ui/breadcrumb.types';
|
|
14
2
|
export default function MciBreadcrumb({ items, variant, className, }: MciBreadcrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type ButtonProps = {
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
text?: string;
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
iconPosition?: 'left' | 'right';
|
|
7
|
-
size?: 'sm' | 'md' | 'base';
|
|
8
|
-
variant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'tertiary';
|
|
9
|
-
color?: 'blue' | 'yellow';
|
|
10
|
-
loading?: boolean;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
onClick?: () => void;
|
|
13
|
-
className?: string;
|
|
14
|
-
type?: 'button' | 'submit' | 'reset';
|
|
15
|
-
};
|
|
1
|
+
import { ButtonProps } from '../../types/ui/button.types';
|
|
16
2
|
export default function MciButton({ children, text, icon, iconPosition, size, variant, color, loading, disabled, onClick, className, type, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
type?: 'checkbox' | 'radio';
|
|
4
|
-
label?: string;
|
|
5
|
-
supportText?: string;
|
|
6
|
-
checked?: boolean;
|
|
7
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
-
error?: string;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
required?: boolean;
|
|
11
|
-
className?: string;
|
|
12
|
-
variant?: 'blue' | 'yellow';
|
|
13
|
-
name?: string;
|
|
14
|
-
value?: string;
|
|
15
|
-
};
|
|
2
|
+
import { MciCheckProps } from '../../types/ui/check.types';
|
|
16
3
|
declare const MciCheck: React.NamedExoticComponent<MciCheckProps>;
|
|
17
4
|
export default MciCheck;
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type CollapseProps = {
|
|
3
|
-
title: React.ReactNode | string;
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
defaultOpen?: boolean;
|
|
6
|
-
icon?: React.ReactNode;
|
|
7
|
-
className?: string;
|
|
8
|
-
contentClassName?: string;
|
|
9
|
-
};
|
|
1
|
+
import { CollapseProps } from '../../types/ui/collapse.types';
|
|
10
2
|
export default function MciCollapse({ title, children, defaultOpen, icon, className, contentClassName, }: CollapseProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
interface DrawerProps {
|
|
3
|
-
isOpen: boolean;
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
position?: 'left' | 'right';
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
footer?: React.ReactNode;
|
|
8
|
-
title?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
showCloseButton?: boolean;
|
|
11
|
-
drawerClassName?: string;
|
|
12
|
-
contentClassName?: string;
|
|
13
|
-
closeOnOverlayClick?: boolean;
|
|
14
|
-
closeOnEscape?: boolean;
|
|
15
|
-
width?: string | number;
|
|
16
|
-
}
|
|
1
|
+
import { DrawerProps } from '../../types/ui/drawer.types';
|
|
17
2
|
export default function MciDrawer({ isOpen, onClose, position, children, footer, title, description, showCloseButton, drawerClassName, contentClassName, closeOnOverlayClick, closeOnEscape, width, }: DrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export {};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { default as React
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
interface MciDocumentInputProps extends Omit<MciInputProps, 'onChange'> {
|
|
5
|
-
mode: 'passport' | 'pinfl' | 'metirka';
|
|
6
|
-
onChange?: (value: string, e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
-
}
|
|
8
|
-
declare const MciIdentityInput: React.ForwardRefExoticComponent<Omit<MciDocumentInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MciDocumentInputProps } from '../../types/ui/identity-input.types';
|
|
3
|
+
declare const MciIdentityInput: React.ForwardRefExoticComponent<MciDocumentInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
9
4
|
export default MciIdentityInput;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MciDocumentInputProps } from '../../types/ui/identity-input.types';
|
|
2
|
+
type IdentityMode = MciDocumentInputProps['mode'];
|
|
3
|
+
export declare function formatPassport(rawValue: string): string;
|
|
4
|
+
export declare function formatPinfl(rawValue: string): string;
|
|
5
|
+
export declare function formatMetirka(rawValue: string): string;
|
|
6
|
+
export declare function formatIdentityValue(mode: IdentityMode, rawValue: string): string;
|
|
7
|
+
export declare function getIdentityPlaceholder(mode: IdentityMode, fallback?: string): string;
|
|
8
|
+
export declare function getIdentityMaxLength(mode: IdentityMode, fallback?: number): number;
|
|
9
|
+
export {};
|
|
@@ -1,27 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
label?: string;
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
type?: 'text' | 'email' | 'password' | 'number' | 'tel';
|
|
6
|
-
icon?: React.ReactNode;
|
|
7
|
-
rightIcon?: React.ReactNode;
|
|
8
|
-
iconPosition?: 'left' | 'right';
|
|
9
|
-
size?: 'sm' | 'md' | 'base';
|
|
10
|
-
error?: string;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
required?: boolean;
|
|
13
|
-
value?: string;
|
|
14
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
-
onFocus?: () => void;
|
|
16
|
-
onBlur?: () => void;
|
|
17
|
-
className?: string;
|
|
18
|
-
name?: string;
|
|
19
|
-
readOnly?: boolean;
|
|
20
|
-
maxLength?: number;
|
|
21
|
-
onClear?: () => void;
|
|
22
|
-
showClearButton?: boolean;
|
|
23
|
-
step?: string | number;
|
|
24
|
-
autoComplete?: string;
|
|
25
|
-
};
|
|
2
|
+
import { InputProps } from '../../types/ui/input.types';
|
|
26
3
|
declare const MciInput: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
27
4
|
export default MciInput;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type InputSizeConfig = {
|
|
2
|
+
input: string;
|
|
3
|
+
icon: string;
|
|
4
|
+
leftIcon: string;
|
|
5
|
+
rightIcon: string;
|
|
6
|
+
labelFont: string;
|
|
7
|
+
iconWrapper: string;
|
|
8
|
+
};
|
|
9
|
+
type InputSizeWithPadding = InputSizeConfig & {
|
|
10
|
+
padding: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function getInputSizes(hasLeftIcon: boolean, hasRightIcon: boolean): {
|
|
13
|
+
sm: InputSizeWithPadding;
|
|
14
|
+
md: InputSizeWithPadding;
|
|
15
|
+
base: InputSizeWithPadding;
|
|
16
|
+
};
|
|
17
|
+
export declare function getInputStateStyles(error?: string): "border-red-600 focus:border-red-600 shadow-red" | "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600";
|
|
18
|
+
export declare function getInputIconColor(disabled: boolean, error: string | undefined, isFocused: boolean): "text-slate-400" | "text-red-600" | "text-black";
|
|
19
|
+
export {};
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
className?: string;
|
|
3
|
-
size?: number;
|
|
4
|
-
iconClassName?: string;
|
|
5
|
-
isLoading?: boolean;
|
|
6
|
-
isFullPage?: boolean;
|
|
7
|
-
variant?: 'yellow' | 'blue';
|
|
8
|
-
}
|
|
1
|
+
import { MciLoaderProps } from '../../types/ui/loader.types';
|
|
9
2
|
export default function MciLoader({ className, size, iconClassName, isLoading, isFullPage, variant }: MciLoaderProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
-
export {};
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
totalItems: number;
|
|
3
|
-
currentPage: number;
|
|
4
|
-
perPage: number;
|
|
5
|
-
onPageChange: (page: number) => void;
|
|
6
|
-
onPerPageChange?: (value: number) => void;
|
|
7
|
-
siblingCount?: number;
|
|
8
|
-
perPageOptions?: number[];
|
|
9
|
-
showPerPage?: boolean;
|
|
10
|
-
variant?: 'yellow' | 'blue';
|
|
11
|
-
size?: 'medium' | 'large';
|
|
12
|
-
paginationClassName?: string;
|
|
13
|
-
}
|
|
1
|
+
import { PaginationProps } from '../../types/ui/pagination.types';
|
|
14
2
|
export default function MciPagination({ totalItems, currentPage, perPage, onPageChange, onPerPageChange, siblingCount, perPageOptions, showPerPage, variant, size, paginationClassName }: PaginationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createPageRange(currentPage: number, siblingCount: number, totalPages: number): Array<number | string>;
|
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
label?: string;
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
size?: 'sm' | 'md' | 'base';
|
|
6
|
-
error?: string;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
required?: boolean;
|
|
9
|
-
value?: string;
|
|
10
|
-
onChange?: (value: string) => void;
|
|
11
|
-
onFocus?: () => void;
|
|
12
|
-
onBlur?: () => void;
|
|
13
|
-
className?: string;
|
|
14
|
-
name?: string;
|
|
15
|
-
showIcon?: boolean;
|
|
16
|
-
};
|
|
2
|
+
import { PhoneInputProps } from '../../types/ui/phone.types';
|
|
17
3
|
declare const MciPhone: React.ForwardRefExoticComponent<PhoneInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
18
4
|
export default MciPhone;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const PHONE_SIZES: {
|
|
2
|
+
readonly sm: {
|
|
3
|
+
readonly input: "h-9 text-sm";
|
|
4
|
+
readonly iconPadding: "pl-8 pr-2";
|
|
5
|
+
readonly defaultPadding: "px-2";
|
|
6
|
+
readonly iconSize: "w-4 h-4";
|
|
7
|
+
readonly iconLeft: "left-2";
|
|
8
|
+
readonly labelFont: "text-sm";
|
|
9
|
+
readonly iconWrapper: "h-4";
|
|
10
|
+
};
|
|
11
|
+
readonly md: {
|
|
12
|
+
readonly input: "h-10 text-sm";
|
|
13
|
+
readonly iconPadding: "pl-10 pr-4";
|
|
14
|
+
readonly defaultPadding: "px-4";
|
|
15
|
+
readonly iconSize: "w-4 h-4";
|
|
16
|
+
readonly iconLeft: "left-3";
|
|
17
|
+
readonly labelFont: "text-base";
|
|
18
|
+
readonly iconWrapper: "h-4";
|
|
19
|
+
};
|
|
20
|
+
readonly base: {
|
|
21
|
+
readonly input: "h-12 text-base";
|
|
22
|
+
readonly iconPadding: "pl-11 pr-4";
|
|
23
|
+
readonly defaultPadding: "px-4";
|
|
24
|
+
readonly iconSize: "w-5 h-5";
|
|
25
|
+
readonly iconLeft: "left-3";
|
|
26
|
+
readonly labelFont: "text-base";
|
|
27
|
+
readonly iconWrapper: "h-5";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare function formatPhoneValue(input: string): string;
|
|
31
|
+
export declare function getPhoneStateStyles(hasError?: string): "border-red-600 focus:border-red-600 shadow-red" | "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600";
|
|
32
|
+
export declare function getPhoneIconColor(disabled: boolean, error: string | undefined, isFocused: boolean): "text-slate-400" | "text-red-600" | "text-black";
|