profinansy-ui-lib 2.0.1 → 2.0.2

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 (49) hide show
  1. package/dist/assets/avatar-icon.d.ts +3 -0
  2. package/dist/assets/close-gray.d.ts +3 -0
  3. package/dist/components/footer/footer.d.ts +1 -1
  4. package/dist/components/header/constants.d.ts +8 -8
  5. package/dist/components/header/header.d.ts +1 -1
  6. package/dist/components/uikit/Avatar/Avatar.d.ts +3 -0
  7. package/dist/components/uikit/Avatar/Avatar.stories.d.ts +6 -0
  8. package/dist/components/uikit/Avatar/Avatar.styled.d.ts +6 -0
  9. package/dist/components/uikit/Avatar/Avatar.typed.d.ts +4 -0
  10. package/dist/components/uikit/Avatar/index.d.ts +1 -0
  11. package/dist/components/uikit/ErrorText/ErrorText.d.ts +3 -0
  12. package/dist/components/uikit/ErrorText/ErrorText.stories.d.ts +6 -0
  13. package/dist/components/uikit/ErrorText/ErrorText.styled.d.ts +1 -0
  14. package/dist/components/uikit/ErrorText/ErrorText.typed.d.ts +5 -0
  15. package/dist/components/uikit/ErrorText/index.d.ts +1 -0
  16. package/dist/components/uikit/Input/Input.const.d.ts +4 -0
  17. package/dist/components/uikit/Input/Input.d.ts +4 -0
  18. package/dist/components/uikit/Input/Input.stories.d.ts +7 -0
  19. package/dist/components/uikit/Input/Input.styled.d.ts +17 -0
  20. package/dist/components/uikit/Input/Input.typed.d.ts +26 -0
  21. package/dist/components/uikit/Input/Input.utils.d.ts +1 -0
  22. package/dist/components/uikit/Input/index.d.ts +2 -0
  23. package/dist/components/uikit/Modal/Modal.d.ts +3 -0
  24. package/dist/components/uikit/Modal/Modal.stories.d.ts +6 -0
  25. package/dist/components/uikit/Modal/Modal.styled.d.ts +21 -0
  26. package/dist/components/uikit/Modal/Modal.typed.d.ts +32 -0
  27. package/dist/components/uikit/Modal/index.d.ts +1 -0
  28. package/dist/components/uikit/Scroll/Scroll.d.ts +1 -0
  29. package/dist/components/uikit/Textarea/Textarea.d.ts +4 -0
  30. package/dist/components/uikit/Textarea/Textarea.stories.d.ts +7 -0
  31. package/dist/components/uikit/Textarea/Textarea.styled.d.ts +11 -0
  32. package/dist/components/uikit/Textarea/Textarea.typed.d.ts +14 -0
  33. package/dist/components/uikit/Textarea/index.d.ts +1 -0
  34. package/dist/components/uikit/Tooltip/Tooltip.d.ts +4 -0
  35. package/dist/components/uikit/Tooltip/Tooltip.stories.d.ts +7 -0
  36. package/dist/components/uikit/Tooltip/Tooltip.styled.d.ts +5 -0
  37. package/dist/components/uikit/Tooltip/Tooltip.typed.d.ts +15 -0
  38. package/dist/components/uikit/Tooltip/components/DefaultTooltip/DefaultTooltip.d.ts +6 -0
  39. package/dist/components/uikit/Tooltip/components/DefaultTooltip/DefaultTooltip.styled.d.ts +1 -0
  40. package/dist/components/uikit/Tooltip/index.d.ts +2 -0
  41. package/dist/hooks/useBlockScroll.d.ts +2 -0
  42. package/dist/hooks/useClickOutside.d.ts +3 -0
  43. package/dist/hooks/useEscKeydownHandler.d.ts +1 -0
  44. package/dist/hooks/useHidingChat.d.ts +2 -0
  45. package/dist/hooks/useTransitionModal.d.ts +7 -0
  46. package/dist/index.d.ts +14 -9
  47. package/dist/index.js +255 -59
  48. package/package.json +13 -2
  49. package/dist/hooks/useDisableScroll.d.ts +0 -3
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { IconsInterface } from '../common.types';
3
+ export declare const AvatarIcon: FC<IconsInterface>;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { IconsInterface } from '../common.types';
3
+ export declare const CloseGrayIcon: FC<IconsInterface>;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { UserRole } from '../../common.types';
2
+ import { UserRole } from '@src/common.types';
3
3
  export type FooterProps = {
4
4
  userRole: UserRole;
5
5
  clubAccess: boolean;
@@ -1,4 +1,4 @@
1
- import { HeaderLinkType, UserRole } from '../../common.types';
1
+ import { HeaderLinkType, UserRole } from '@src/common.types';
2
2
  export declare const getMainLinks: (profinansyHostname: string, isTest: boolean, leaderBoardPermission: boolean) => Record<UserRole, HeaderLinkType[]>;
3
3
  export declare const LeaderBoardLinks: (permission: boolean, profinansyHostname: string, isGuest?: boolean) => ({
4
4
  name: string;
@@ -17,7 +17,7 @@ export declare const LeaderBoardLinks: (permission: boolean, profinansyHostname:
17
17
  export declare const getClubLinks: (access: boolean, profinansyHostname: string) => {
18
18
  name: string;
19
19
  href: string;
20
- Icon: import("react").FC<import("../../common.types").IconsInterface>;
20
+ Icon: import("react").FC<import("@src/common.types").IconsInterface>;
21
21
  iconSize: {
22
22
  width: number;
23
23
  height: number;
@@ -31,14 +31,14 @@ export declare const getClubLinks: (access: boolean, profinansyHostname: string)
31
31
  export declare const guestLinks: (profinansyHostname: string) => HeaderLinkType[];
32
32
  export declare const authorizedLinks: (profinansyHostname: string, isTest: boolean, leaderBoardPermission: boolean) => ({
33
33
  name: string;
34
- Icon: import("react").FC<import("../../common.types").IconsInterface>;
34
+ Icon: import("react").FC<import("@src/common.types").IconsInterface>;
35
35
  href: string;
36
36
  subPages: any[];
37
37
  iconSize?: undefined;
38
38
  innerPages?: undefined;
39
39
  } | {
40
40
  name: string;
41
- Icon: import("react").FC<import("../../common.types").IconsInterface>;
41
+ Icon: import("react").FC<import("@src/common.types").IconsInterface>;
42
42
  iconSize: {
43
43
  width: number;
44
44
  height: number;
@@ -66,7 +66,7 @@ export declare const authorizedLinks: (profinansyHostname: string, isTest: boole
66
66
  innerPages: string[];
67
67
  } | {
68
68
  name: string;
69
- Icon: import("react").FC<import("../../common.types").IconsInterface>;
69
+ Icon: import("react").FC<import("@src/common.types").IconsInterface>;
70
70
  iconSize: {
71
71
  width: number;
72
72
  height: number;
@@ -95,14 +95,14 @@ export declare const authorizedLinks: (profinansyHostname: string, isTest: boole
95
95
  })[];
96
96
  export declare const paidLinks: (profinansyHostname: string, isTest: boolean, leaderBoardPermission: boolean) => ({
97
97
  name: string;
98
- Icon: import("react").FC<import("../../common.types").IconsInterface>;
98
+ Icon: import("react").FC<import("@src/common.types").IconsInterface>;
99
99
  href: string;
100
100
  subPages: any[];
101
101
  iconSize?: undefined;
102
102
  innerPages?: undefined;
103
103
  } | {
104
104
  name: string;
105
- Icon: import("react").FC<import("../../common.types").IconsInterface>;
105
+ Icon: import("react").FC<import("@src/common.types").IconsInterface>;
106
106
  iconSize: {
107
107
  width: number;
108
108
  height: number;
@@ -130,7 +130,7 @@ export declare const paidLinks: (profinansyHostname: string, isTest: boolean, le
130
130
  innerPages: string[];
131
131
  } | {
132
132
  name: string;
133
- Icon: import("react").FC<import("../../common.types").IconsInterface>;
133
+ Icon: import("react").FC<import("@src/common.types").IconsInterface>;
134
134
  iconSize: {
135
135
  width: number;
136
136
  height: number;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { UserRole } from '../../common.types';
2
+ import { UserRole } from '@src/common.types';
3
3
  type Props = {
4
4
  userRole: UserRole;
5
5
  avatarUrl?: string;
@@ -0,0 +1,3 @@
1
+ import { IAvatar } from './Avatar.typed';
2
+ declare const Avatar: ({ link, size }: IAvatar) => JSX.Element;
3
+ export { Avatar };
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ title: string;
3
+ component: ({ link, size }: import("./Avatar.typed").IAvatar) => JSX.Element;
4
+ };
5
+ export default _default;
6
+ export declare const Avatar: () => JSX.Element;
@@ -0,0 +1,6 @@
1
+ export declare const Avatar: import("styled-components").StyledComponent<"img", any, {
2
+ size: string;
3
+ }, never>;
4
+ export declare const NotAvatar: import("styled-components").StyledComponent<"div", any, {
5
+ size: string;
6
+ }, never>;
@@ -0,0 +1,4 @@
1
+ export interface IAvatar {
2
+ link?: string;
3
+ size: string;
4
+ }
@@ -0,0 +1 @@
1
+ export { Avatar } from './Avatar';
@@ -0,0 +1,3 @@
1
+ import { IErrorText } from './ErrorText.typed';
2
+ declare const ErrorText: ({ text }: IErrorText) => JSX.Element;
3
+ export { ErrorText };
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ title: string;
3
+ component: ({ text }: import("./ErrorText.typed").IErrorText) => JSX.Element;
4
+ };
5
+ export default _default;
6
+ export declare const ErrorText: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const Text: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export interface IErrorText {
3
+ /**Текст ошибки*/
4
+ text: React.ReactNode | string;
5
+ }
@@ -0,0 +1 @@
1
+ export { ErrorText } from './ErrorText';
@@ -0,0 +1,4 @@
1
+ export declare const RegexPattern: {
2
+ NUMBER: RegExp;
3
+ FLOAT_NUMBER: RegExp;
4
+ };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IInput } from './Input.typed';
3
+ declare const Input: React.ForwardRefExoticComponent<IInput & React.RefAttributes<HTMLInputElement>>;
4
+ export { Input };
@@ -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,2 @@
1
+ export { Input } from './Input';
2
+ export { RegexPattern } from './Input.const';
@@ -0,0 +1,3 @@
1
+ import { IModal } from './Modal.typed';
2
+ declare const Modal: (props: IModal) => JSX.Element;
3
+ export { Modal };
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ title: string;
3
+ component: (props: import("./Modal.typed").IModal) => JSX.Element;
4
+ };
5
+ export default _default;
6
+ export declare const Modal: () => JSX.Element;
@@ -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,4 @@
1
+ import React from 'react';
2
+ import { ITextarea } from './Textarea.typed';
3
+ declare const Textarea: React.ForwardRefExoticComponent<ITextarea & React.RefAttributes<HTMLTextAreaElement>>;
4
+ export { Textarea };
@@ -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,4 @@
1
+ import React from 'react';
2
+ import { IRefTooltip, ITooltip } from './Tooltip.typed';
3
+ declare const Tooltip: React.ForwardRefExoticComponent<ITooltip & React.RefAttributes<IRefTooltip>>;
4
+ export { Tooltip };
@@ -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,5 @@
1
+ export declare const Container: import("styled-components").StyledComponent<"div", any, {
2
+ y: number;
3
+ x: number;
4
+ }, never>;
5
+ export declare const PopupContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -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,6 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ children: React.ReactNode;
4
+ }
5
+ declare const DefaultTooltip: ({ children }: IProps) => JSX.Element;
6
+ export { DefaultTooltip };
@@ -0,0 +1 @@
1
+ export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,2 @@
1
+ export { Tooltip } from './Tooltip';
2
+ export { DefaultTooltip } from './components/DefaultTooltip/DefaultTooltip';
@@ -0,0 +1,2 @@
1
+ export declare const useBlockScroll: (open: boolean) => void;
2
+ export default useBlockScroll;
@@ -0,0 +1,3 @@
1
+ import { RefObject } from 'react';
2
+ declare function useClickOutside(open: boolean, callback: () => void, ref: RefObject<HTMLDivElement>, ignoreElemClasses?: string[], ignoreParentClass?: string): void;
3
+ export default useClickOutside;
@@ -0,0 +1 @@
1
+ export declare const useEscKeydownHandler: (onClose: () => void) => void;
@@ -0,0 +1,2 @@
1
+ export declare const useHidingChat: (open: boolean) => void;
2
+ export default useHidingChat;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ declare function useTransitionModal(isOpen: boolean, children: ReactNode, onClose: () => void): {
3
+ animation: boolean;
4
+ content: any;
5
+ showModal: boolean;
6
+ };
7
+ export { useTransitionModal };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,14 @@
1
- import { Header } from './components/header/header';
2
- import { Footer } from './components/footer';
3
- import { CheckboxSize, Checkbox, CheckboxForm } from './components/uikit/Checkbox';
4
- import { Radio, RadioSize } from './components/uikit/Radio';
5
- import { Portal } from './components/uikit/Portal';
6
- import { Loader, SizeLoader } from './components/uikit/Loader';
7
- import { ButtonTheme, ButtonSize, Button } from './components/uikit/Button';
8
- import { TextButtonTheme, TextButton } from './components/uikit/TextButton';
9
- export { Footer, Header, CheckboxForm, CheckboxSize, Checkbox, Radio, RadioSize, Portal, Loader, SizeLoader, Button, ButtonSize, ButtonTheme, TextButton, TextButtonTheme };
1
+ import { Header } from '@components/header';
2
+ import { Footer } from '@components/footer';
3
+ import { CheckboxSize, Checkbox, CheckboxForm } from '@components/uikit/Checkbox';
4
+ import { Radio, RadioSize } from '@components/uikit/Radio';
5
+ import { Portal } from '@components/uikit/Portal';
6
+ import { Loader, SizeLoader } from '@components/uikit/Loader';
7
+ import { ButtonTheme, ButtonSize, Button } from '@components/uikit/Button';
8
+ import { TextButtonTheme, TextButton } from '@components/uikit/TextButton';
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 };