profinansy-ui-lib 2.0.1 → 2.0.3
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/assets/avatar-icon.d.ts +3 -0
- package/dist/assets/close-gray.d.ts +3 -0
- package/dist/components/uikit/Avatar/Avatar.d.ts +3 -0
- package/dist/components/uikit/Avatar/Avatar.stories.d.ts +6 -0
- package/dist/components/uikit/Avatar/Avatar.styled.d.ts +6 -0
- package/dist/components/uikit/Avatar/Avatar.typed.d.ts +4 -0
- package/dist/components/uikit/Avatar/index.d.ts +1 -0
- package/dist/components/uikit/ErrorText/ErrorText.d.ts +3 -0
- package/dist/components/uikit/ErrorText/ErrorText.stories.d.ts +6 -0
- package/dist/components/uikit/ErrorText/ErrorText.styled.d.ts +1 -0
- package/dist/components/uikit/ErrorText/ErrorText.typed.d.ts +5 -0
- package/dist/components/uikit/ErrorText/index.d.ts +1 -0
- package/dist/components/uikit/Input/Input.const.d.ts +4 -0
- package/dist/components/uikit/Input/Input.d.ts +4 -0
- package/dist/components/uikit/Input/Input.stories.d.ts +7 -0
- package/dist/components/uikit/Input/Input.styled.d.ts +17 -0
- package/dist/components/uikit/Input/Input.typed.d.ts +26 -0
- package/dist/components/uikit/Input/Input.utils.d.ts +1 -0
- package/dist/components/uikit/Input/index.d.ts +2 -0
- package/dist/components/uikit/Modal/Modal.d.ts +3 -0
- package/dist/components/uikit/Modal/Modal.stories.d.ts +6 -0
- package/dist/components/uikit/Modal/Modal.styled.d.ts +21 -0
- package/dist/components/uikit/Modal/Modal.typed.d.ts +32 -0
- package/dist/components/uikit/Modal/index.d.ts +1 -0
- package/dist/components/uikit/Scroll/Scroll.d.ts +1 -0
- package/dist/components/uikit/Textarea/Textarea.d.ts +4 -0
- package/dist/components/uikit/Textarea/Textarea.stories.d.ts +7 -0
- package/dist/components/uikit/Textarea/Textarea.styled.d.ts +11 -0
- package/dist/components/uikit/Textarea/Textarea.typed.d.ts +14 -0
- package/dist/components/uikit/Textarea/index.d.ts +1 -0
- package/dist/components/uikit/Tooltip/Tooltip.d.ts +4 -0
- package/dist/components/uikit/Tooltip/Tooltip.stories.d.ts +7 -0
- package/dist/components/uikit/Tooltip/Tooltip.styled.d.ts +5 -0
- package/dist/components/uikit/Tooltip/Tooltip.typed.d.ts +15 -0
- package/dist/components/uikit/Tooltip/components/DefaultTooltip/DefaultTooltip.d.ts +6 -0
- package/dist/components/uikit/Tooltip/components/DefaultTooltip/DefaultTooltip.styled.d.ts +1 -0
- package/dist/components/uikit/Tooltip/index.d.ts +2 -0
- package/dist/hooks/useBlockScroll.d.ts +2 -0
- package/dist/hooks/useClickOutside.d.ts +3 -0
- package/dist/hooks/useEscKeydownHandler.d.ts +1 -0
- package/dist/hooks/useHidingChat.d.ts +2 -0
- package/dist/hooks/useTransitionModal.d.ts +7 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +255 -59
- package/package.json +13 -2
- package/dist/hooks/useDisableScroll.d.ts +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Avatar } from './Avatar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Text: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ErrorText } from './ErrorText';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.ForwardRefExoticComponent<import("./Input.typed").IInput & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Input: () => JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const Content: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const Icon: import("styled-components").StyledComponent<"span", any, {
|
|
4
|
+
iconBorder: boolean;
|
|
5
|
+
} & {
|
|
6
|
+
iconBorder: boolean;
|
|
7
|
+
}, never>;
|
|
8
|
+
export declare const RightText: import("styled-components").StyledComponent<"span", any, {
|
|
9
|
+
iconBorder: boolean;
|
|
10
|
+
} & {
|
|
11
|
+
iconBorder: boolean;
|
|
12
|
+
rightTextColor: string;
|
|
13
|
+
}, never>;
|
|
14
|
+
export declare const Input: import("styled-components").StyledComponent<"input", any, {
|
|
15
|
+
icon: boolean;
|
|
16
|
+
error: boolean;
|
|
17
|
+
}, never>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export interface IInput {
|
|
3
|
+
/**Значение инпута*/
|
|
4
|
+
value: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type?: 'text' | 'password' | 'number';
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
autoFocus?: boolean;
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
numAfterDot?: number;
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
rightText?: string;
|
|
15
|
+
rightTextColor?: string;
|
|
16
|
+
autoComplete?: 'on' | 'off';
|
|
17
|
+
inputClassName?: string;
|
|
18
|
+
iconBorder?: boolean;
|
|
19
|
+
pattern?: RegExp;
|
|
20
|
+
error?: boolean | string | React.ReactNode;
|
|
21
|
+
onChange?: (val: string, evt: React.ChangeEvent<HTMLInputElement>) => void;
|
|
22
|
+
onFocus?: () => void;
|
|
23
|
+
onBlur?: () => void;
|
|
24
|
+
onKeyDown?: (evt: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
25
|
+
onClick?: () => void;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const numberWithSpaces: (val: string) => string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
open: boolean;
|
|
3
|
+
}, never>;
|
|
4
|
+
export declare const Layout: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const Content: import("styled-components").StyledComponent<"div", any, {
|
|
6
|
+
theme: 'light' | 'dark';
|
|
7
|
+
}, never>;
|
|
8
|
+
export declare const Header: import("styled-components").StyledComponent<"div", any, {
|
|
9
|
+
borderHeader: boolean;
|
|
10
|
+
}, never>;
|
|
11
|
+
export declare const HeaderFirstLine: import("styled-components").StyledComponent<"div", any, {
|
|
12
|
+
onlyCloseIcon: boolean;
|
|
13
|
+
}, never>;
|
|
14
|
+
export declare const Title: import("styled-components").StyledComponent<"h2", any, {
|
|
15
|
+
theme: 'light' | 'dark';
|
|
16
|
+
titlePosition: 'left' | 'center';
|
|
17
|
+
}, never>;
|
|
18
|
+
export declare const Subtitle: import("styled-components").StyledComponent<"span", any, {
|
|
19
|
+
theme: 'light' | 'dark';
|
|
20
|
+
}, never>;
|
|
21
|
+
export declare const CloseButton: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export interface IModal {
|
|
3
|
+
/** Состояние попапа. */
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** Действие при закрытии попапа. */
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
/** Контент попапа. */
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** Показывать ли кнопку закрытия. */
|
|
10
|
+
showCloseButton?: boolean;
|
|
11
|
+
/** Показывать ли бордер у title. */
|
|
12
|
+
borderHeader?: boolean;
|
|
13
|
+
/** Заголовок модалки */
|
|
14
|
+
title?: string;
|
|
15
|
+
/** Подзаголовок модалки */
|
|
16
|
+
subtitle?: string;
|
|
17
|
+
/** Тема */
|
|
18
|
+
theme?: 'light' | 'dark';
|
|
19
|
+
/** инлайновые стили для контента попапа */
|
|
20
|
+
styleContent?: CSSProperties;
|
|
21
|
+
/** инлайновые стили для фона попапа */
|
|
22
|
+
styleBackground?: CSSProperties;
|
|
23
|
+
/** класс для фона попапа */
|
|
24
|
+
classNameBackground?: string;
|
|
25
|
+
/** класс для контента попапа */
|
|
26
|
+
classNameContent?: string;
|
|
27
|
+
/** класс для хедера попапа */
|
|
28
|
+
classNameHeader?: string;
|
|
29
|
+
classNameWrapper?: string;
|
|
30
|
+
/** центрирование заголовка */
|
|
31
|
+
titlePosition?: 'left' | 'center';
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Modal } from './Modal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Scroll = "\n scrollbar-color: #a398f9 rgba(224, 224, 224, 0.2);\n scrollbar-width: thin;\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n };\n &::-webkit-scrollbar-track {\n background: #ffffff;\n border-radius: 12px;\n };\n &::-webkit-scrollbar-thumb {\n background: #a398f9;\n border-radius: 12px;\n };\n &::-webkit-scrollbar-thumb:hover {\n background: #6553f5;\n };\n";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.ForwardRefExoticComponent<import("./Textarea.typed").ITextarea & React.RefAttributes<HTMLTextAreaElement>>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Textarea: () => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ITextarea } from './Textarea.typed';
|
|
2
|
+
interface IProps {
|
|
3
|
+
error: boolean;
|
|
4
|
+
height: number;
|
|
5
|
+
resize: ITextarea['resize'];
|
|
6
|
+
}
|
|
7
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const Content: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const Length: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
10
|
+
export declare const Textarea: import("styled-components").StyledComponent<"textarea", any, IProps, never>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ITextarea {
|
|
3
|
+
value: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
height?: number;
|
|
6
|
+
name: string;
|
|
7
|
+
error?: boolean | string | React.ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
autoFocus?: boolean;
|
|
10
|
+
resize?: 'both' | 'horizontal' | 'vertical' | 'none';
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
onChange: (value: string, e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
13
|
+
containerClass?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Textarea } from './Textarea';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.ForwardRefExoticComponent<import("./Tooltip.typed").ITooltip & React.RefAttributes<import("./Tooltip.typed").IRefTooltip>>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Tooltip: () => JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ITooltip {
|
|
3
|
+
data: React.ReactElement;
|
|
4
|
+
children: React.ReactElement;
|
|
5
|
+
isHover?: boolean;
|
|
6
|
+
/** callback который вызывается, когда меняется закрыт или открыт тултип */
|
|
7
|
+
onOpenTooltip?: (val: boolean) => void;
|
|
8
|
+
closeClickOutSide?: boolean;
|
|
9
|
+
classNameContent?: string;
|
|
10
|
+
/** Нужно ли, чтобы тултип открывался по клику. Иногда нужно отключить, например, когда нам надо повесить тултип на ссылку */
|
|
11
|
+
isClick?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface IRefTooltip {
|
|
14
|
+
handleClose: () => void;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useEscKeydownHandler: (onClose: () => void) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Header } from './components/header
|
|
1
|
+
import { Header } from './components/header';
|
|
2
2
|
import { Footer } from './components/footer';
|
|
3
3
|
import { CheckboxSize, Checkbox, CheckboxForm } from './components/uikit/Checkbox';
|
|
4
4
|
import { Radio, RadioSize } from './components/uikit/Radio';
|
|
@@ -6,4 +6,9 @@ import { Portal } from './components/uikit/Portal';
|
|
|
6
6
|
import { Loader, SizeLoader } from './components/uikit/Loader';
|
|
7
7
|
import { ButtonTheme, ButtonSize, Button } from './components/uikit/Button';
|
|
8
8
|
import { TextButtonTheme, TextButton } from './components/uikit/TextButton';
|
|
9
|
-
|
|
9
|
+
import { RegexPattern, Input } from './components/uikit/Input';
|
|
10
|
+
import { ErrorText } from './components/uikit/ErrorText';
|
|
11
|
+
import { Avatar } from './components/uikit/Avatar';
|
|
12
|
+
import { Tooltip, DefaultTooltip } from './components/uikit/Tooltip';
|
|
13
|
+
import { Modal } from './components/uikit/Modal';
|
|
14
|
+
export { Footer, Header, CheckboxForm, CheckboxSize, Checkbox, Radio, RadioSize, Portal, Loader, SizeLoader, Button, ButtonSize, ButtonTheme, TextButton, TextButtonTheme, RegexPattern, Input, ErrorText, Avatar, Tooltip, DefaultTooltip, Modal };
|