profinansy-ui-lib 2.0.7 → 2.0.8
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/about-icon.d.ts +3 -3
- package/dist/assets/apple-icon.d.ts +3 -3
- package/dist/assets/avatar-icon.d.ts +3 -3
- package/dist/assets/burger-icon-dark.d.ts +3 -3
- package/dist/assets/burger-icon.d.ts +3 -3
- package/dist/assets/capital-icon.d.ts +3 -3
- package/dist/assets/channels-icon.d.ts +3 -3
- package/dist/assets/chats-icon.d.ts +3 -3
- package/dist/assets/checkmark-icon.d.ts +3 -3
- package/dist/assets/chevron-icon-small.d.ts +3 -3
- package/dist/assets/chevron-icon.d.ts +3 -3
- package/dist/assets/close-gray.d.ts +3 -3
- package/dist/assets/close-icon.d.ts +3 -3
- package/dist/assets/club-icon.d.ts +3 -3
- package/dist/assets/edit-icon.d.ts +3 -3
- package/dist/assets/education-icon.d.ts +3 -3
- package/dist/assets/expenses-icon.d.ts +3 -3
- package/dist/assets/favorites-icon.d.ts +3 -3
- package/dist/assets/feed-icon.d.ts +3 -3
- package/dist/assets/google-store-icon.d.ts +3 -3
- package/dist/assets/huawei-store-icon.d.ts +3 -3
- package/dist/assets/investments-icon.d.ts +3 -3
- package/dist/assets/lock-icon-dark.d.ts +3 -3
- package/dist/assets/lock-icon.d.ts +3 -3
- package/dist/assets/logout-icon-new.d.ts +3 -3
- package/dist/assets/logout-icon.d.ts +3 -3
- package/dist/assets/notifications-icon.d.ts +3 -3
- package/dist/assets/plus-icon.d.ts +3 -3
- package/dist/assets/profile-icon.d.ts +3 -3
- package/dist/assets/purchases-icon.d.ts +3 -3
- package/dist/assets/purrple-logo-dark.d.ts +3 -3
- package/dist/assets/purrple-logo.d.ts +3 -3
- package/dist/assets/remove-icon.d.ts +3 -3
- package/dist/assets/tariffs-icon.d.ts +3 -3
- package/dist/assets/telegram-icon.d.ts +3 -3
- package/dist/assets/vk-icon.d.ts +3 -3
- package/dist/assets/youtube-icon copy.d.ts +3 -3
- package/dist/common.types.d.ts +37 -37
- package/dist/components/footer/Footer.stories.d.ts +11 -11
- package/dist/components/footer/constants.d.ts +16 -16
- package/dist/components/footer/footer.d.ts +11 -11
- package/dist/components/footer/footer.styled.d.ts +31 -31
- package/dist/components/footer/index.d.ts +1 -1
- package/dist/components/header/Header.stories.d.ts +24 -22
- package/dist/components/header/constants.d.ts +148 -148
- package/dist/components/header/header-link-item/header-link-item.d.ts +12 -12
- package/dist/components/header/header-link-item/header-link-item.styled.d.ts +43 -43
- package/dist/components/header/header-link-item/header-sub-link.d.ts +17 -17
- package/dist/components/header/header.d.ts +18 -17
- package/dist/components/header/header.styled.d.ts +19 -19
- package/dist/components/header/index.d.ts +1 -1
- package/dist/components/header/user-dropdown-menu/constants.d.ts +5 -5
- package/dist/components/header/user-dropdown-menu/user-dropdown-menu.d.ts +13 -13
- package/dist/components/header/user-dropdown-menu/user-dropdown-menu.styled.d.ts +15 -15
- package/dist/components/icon-wrapper/icon-wrapper.d.ts +7 -7
- package/dist/components/uikit/Avatar/Avatar.d.ts +3 -3
- package/dist/components/uikit/Avatar/Avatar.stories.d.ts +6 -6
- package/dist/components/uikit/Avatar/Avatar.styled.d.ts +6 -6
- package/dist/components/uikit/Avatar/Avatar.typed.d.ts +4 -4
- package/dist/components/uikit/Avatar/index.d.ts +1 -1
- package/dist/components/uikit/Button/Button.const.d.ts +135 -135
- package/dist/components/uikit/Button/Button.d.ts +4 -4
- package/dist/components/uikit/Button/Button.stories.d.ts +7 -7
- package/dist/components/uikit/Button/Button.styled.d.ts +22 -22
- package/dist/components/uikit/Button/Button.typed.d.ts +31 -31
- package/dist/components/uikit/Button/index.d.ts +2 -2
- package/dist/components/uikit/Checkbox/Checkbox.d.ts +3 -3
- package/dist/components/uikit/Checkbox/Checkbox.stories.d.ts +6 -6
- package/dist/components/uikit/Checkbox/Checkbox.styled.d.ts +18 -18
- package/dist/components/uikit/Checkbox/Checkbox.typed.d.ts +24 -24
- package/dist/components/uikit/Checkbox/index.d.ts +2 -2
- package/dist/components/uikit/ErrorText/ErrorText.d.ts +3 -3
- package/dist/components/uikit/ErrorText/ErrorText.stories.d.ts +6 -6
- package/dist/components/uikit/ErrorText/ErrorText.styled.d.ts +1 -1
- package/dist/components/uikit/ErrorText/ErrorText.typed.d.ts +5 -5
- package/dist/components/uikit/ErrorText/index.d.ts +1 -1
- package/dist/components/uikit/Input/Input.const.d.ts +4 -4
- package/dist/components/uikit/Input/Input.d.ts +4 -4
- package/dist/components/uikit/Input/Input.stories.d.ts +7 -7
- package/dist/components/uikit/Input/Input.styled.d.ts +17 -17
- package/dist/components/uikit/Input/Input.typed.d.ts +26 -26
- package/dist/components/uikit/Input/Input.utils.d.ts +1 -1
- package/dist/components/uikit/Input/index.d.ts +2 -2
- package/dist/components/uikit/Loader/Loader.d.ts +3 -3
- package/dist/components/uikit/Loader/Loader.stories.d.ts +6 -6
- package/dist/components/uikit/Loader/Loader.styled.d.ts +9 -9
- package/dist/components/uikit/Loader/Loader.typed.d.ts +10 -10
- package/dist/components/uikit/Loader/index.d.ts +2 -2
- package/dist/components/uikit/Modal/Modal.d.ts +3 -3
- package/dist/components/uikit/Modal/Modal.stories.d.ts +6 -6
- package/dist/components/uikit/Modal/Modal.styled.d.ts +21 -21
- package/dist/components/uikit/Modal/Modal.typed.d.ts +32 -32
- package/dist/components/uikit/Modal/index.d.ts +1 -1
- package/dist/components/uikit/Portal/Portal.d.ts +3 -3
- package/dist/components/uikit/Portal/Portal.stories.d.ts +6 -6
- package/dist/components/uikit/Portal/Portal.typed.d.ts +5 -5
- package/dist/components/uikit/Portal/index.d.ts +1 -1
- package/dist/components/uikit/Portal/usePortal.d.ts +2 -2
- package/dist/components/uikit/Radio/Radio.d.ts +3 -3
- package/dist/components/uikit/Radio/Radio.stories.d.ts +6 -6
- package/dist/components/uikit/Radio/Radio.styled.d.ts +16 -16
- package/dist/components/uikit/Radio/Radio.typed.d.ts +16 -16
- package/dist/components/uikit/Radio/index.d.ts +2 -2
- package/dist/components/uikit/Scroll/Scroll.d.ts +1 -1
- package/dist/components/uikit/Skeleton/Skeleton.d.ts +3 -3
- package/dist/components/uikit/Skeleton/Skeleton.stories.d.ts +6 -6
- package/dist/components/uikit/Skeleton/Skeleton.styled.d.ts +3 -3
- package/dist/components/uikit/Skeleton/Skeleton.typed.d.ts +15 -15
- package/dist/components/uikit/Skeleton/index.d.ts +1 -1
- package/dist/components/uikit/TextButton/TextButton.const.d.ts +30 -30
- package/dist/components/uikit/TextButton/TextButton.d.ts +3 -3
- package/dist/components/uikit/TextButton/TextButton.stories.d.ts +6 -6
- package/dist/components/uikit/TextButton/TextButton.styled.d.ts +5 -5
- package/dist/components/uikit/TextButton/TextButton.typed.d.ts +16 -16
- package/dist/components/uikit/TextButton/index.d.ts +2 -2
- package/dist/components/uikit/Textarea/Textarea.d.ts +4 -4
- package/dist/components/uikit/Textarea/Textarea.stories.d.ts +7 -7
- package/dist/components/uikit/Textarea/Textarea.styled.d.ts +11 -11
- package/dist/components/uikit/Textarea/Textarea.typed.d.ts +14 -14
- package/dist/components/uikit/Textarea/index.d.ts +1 -1
- package/dist/components/uikit/Tooltip/Tooltip.d.ts +4 -4
- package/dist/components/uikit/Tooltip/Tooltip.stories.d.ts +7 -7
- package/dist/components/uikit/Tooltip/Tooltip.styled.d.ts +5 -5
- package/dist/components/uikit/Tooltip/Tooltip.typed.d.ts +15 -15
- package/dist/components/uikit/Tooltip/components/DefaultTooltip/DefaultTooltip.d.ts +6 -6
- package/dist/components/uikit/Tooltip/components/DefaultTooltip/DefaultTooltip.styled.d.ts +1 -1
- package/dist/components/uikit/Tooltip/index.d.ts +2 -2
- package/dist/components/uikit/storybook/StoryDescription/StoryDescription.d.ts +5 -5
- package/dist/components/uikit/storybook/StoryDescription/StoryDescription.styled.d.ts +1 -1
- package/dist/components/uikit/storybook/StoryExample/StoryExample.d.ts +6 -6
- package/dist/components/uikit/storybook/StoryExample/StoryExample.styled.d.ts +1 -1
- package/dist/components/uikit/storybook/StoryTitle/StoryTitle.d.ts +6 -6
- package/dist/components/uikit/storybook/StoryTitle/StoryTitle.styled.d.ts +1 -1
- package/dist/hooks/useBlockScroll.d.ts +2 -2
- package/dist/hooks/useBreakpoints.d.ts +6 -6
- package/dist/hooks/useClickOutside.d.ts +3 -3
- package/dist/hooks/useCurrentPath.d.ts +4 -4
- package/dist/hooks/useEscKeydownHandler.d.ts +1 -1
- package/dist/hooks/useHidingChat.d.ts +2 -2
- package/dist/hooks/useListenOutsideClick.d.ts +3 -3
- package/dist/hooks/useTransitionModal.d.ts +7 -7
- package/dist/index.d.ts +14 -14
- package/dist/index.js +11 -4
- package/dist/utils.d.ts +6 -6
- package/package.json +59 -59
- package/readme.md +10 -10
|
@@ -1,7 +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;
|
|
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;
|
|
@@ -1,11 +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 {};
|
|
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 {};
|
|
@@ -1,14 +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
|
-
}
|
|
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
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Textarea } from './Textarea';
|
|
1
|
+
export { Textarea } from './Textarea';
|
|
@@ -1,4 +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 };
|
|
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 };
|
|
@@ -1,7 +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;
|
|
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;
|
|
@@ -1,5 +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>;
|
|
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>;
|
|
@@ -1,15 +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
|
-
}
|
|
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
|
+
}
|
|
@@ -1,6 +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 };
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
declare const DefaultTooltip: ({ children }: IProps) => JSX.Element;
|
|
6
|
+
export { DefaultTooltip };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
1
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Tooltip } from './Tooltip';
|
|
2
|
-
export { DefaultTooltip } from './components/DefaultTooltip/DefaultTooltip';
|
|
1
|
+
export { Tooltip } from './Tooltip';
|
|
2
|
+
export { DefaultTooltip } from './components/DefaultTooltip/DefaultTooltip';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
interface IProps {
|
|
2
|
-
text: string;
|
|
3
|
-
}
|
|
4
|
-
declare const StoryDescription: ({ text }: IProps) => JSX.Element;
|
|
5
|
-
export { StoryDescription };
|
|
1
|
+
interface IProps {
|
|
2
|
+
text: string;
|
|
3
|
+
}
|
|
4
|
+
declare const StoryDescription: ({ text }: IProps) => JSX.Element;
|
|
5
|
+
export { StoryDescription };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Component: import("styled-components").StyledComponent<"p", any, {}, never>;
|
|
1
|
+
export declare const Component: import("styled-components").StyledComponent<"p", any, {}, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface IProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
}
|
|
5
|
-
declare const StoryExample: ({ children }: IProps) => JSX.Element;
|
|
6
|
-
export { StoryExample };
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
declare const StoryExample: ({ children }: IProps) => JSX.Element;
|
|
6
|
+
export { StoryExample };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Block: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
1
|
+
export declare const Block: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface IProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
}
|
|
5
|
-
declare const StoryTitle: ({ children }: IProps) => JSX.Element;
|
|
6
|
-
export { StoryTitle };
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
declare const StoryTitle: ({ children }: IProps) => JSX.Element;
|
|
6
|
+
export { StoryTitle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const H2: import("styled-components").StyledComponent<"h2", any, {}, never>;
|
|
1
|
+
export declare const H2: import("styled-components").StyledComponent<"h2", any, {}, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useBlockScroll: (open: boolean) => void;
|
|
2
|
-
export default useBlockScroll;
|
|
1
|
+
export declare const useBlockScroll: (open: boolean) => void;
|
|
2
|
+
export default useBlockScroll;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const useBreakpoints: () => {
|
|
2
|
-
xs: boolean;
|
|
3
|
-
sm: boolean;
|
|
4
|
-
md: boolean;
|
|
5
|
-
lg: boolean;
|
|
6
|
-
};
|
|
1
|
+
export declare const useBreakpoints: () => {
|
|
2
|
+
xs: boolean;
|
|
3
|
+
sm: boolean;
|
|
4
|
+
md: boolean;
|
|
5
|
+
lg: boolean;
|
|
6
|
+
};
|
|
@@ -1,3 +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;
|
|
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const useCurrentPath: () => {
|
|
2
|
-
currentPathname: any;
|
|
3
|
-
currentHref: any;
|
|
4
|
-
};
|
|
1
|
+
export declare const useCurrentPath: () => {
|
|
2
|
+
currentPathname: any;
|
|
3
|
+
currentHref: any;
|
|
4
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useEscKeydownHandler: (onClose: () => void) => void;
|
|
1
|
+
export declare const useEscKeydownHandler: (onClose: () => void) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useHidingChat: (open: boolean) => void;
|
|
2
|
-
export default useHidingChat;
|
|
1
|
+
export declare const useHidingChat: (open: boolean) => void;
|
|
2
|
+
export default useHidingChat;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const useListenOutsideClick: ({ onOutsideClick }: {
|
|
2
|
-
onOutsideClick: () => void;
|
|
3
|
-
}) => void;
|
|
1
|
+
export declare const useListenOutsideClick: ({ onOutsideClick }: {
|
|
2
|
+
onOutsideClick: () => void;
|
|
3
|
+
}) => void;
|
|
@@ -1,7 +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 };
|
|
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,14 +1,14 @@
|
|
|
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 };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -481,7 +481,6 @@
|
|
|
481
481
|
display: flex;
|
|
482
482
|
align-items: center;
|
|
483
483
|
gap: 16px;
|
|
484
|
-
|
|
485
484
|
`,t.HeaderRight=a.default.div`
|
|
486
485
|
display: flex;
|
|
487
486
|
align-items: center;
|
|
@@ -562,15 +561,23 @@
|
|
|
562
561
|
line-height: 28px;
|
|
563
562
|
}
|
|
564
563
|
`,t.PartnerButton=a.default.button`
|
|
565
|
-
|
|
566
|
-
padding: 2px 8.5px;
|
|
564
|
+
padding: 2px 8px;
|
|
567
565
|
color: #fff;
|
|
568
566
|
background: linear-gradient(121deg, #6553f5 0%, #ee2cff 100%);
|
|
569
567
|
border-radius: 8px;
|
|
570
568
|
font-size: 15px;
|
|
571
569
|
line-height: 24px;
|
|
572
570
|
font-weight: 500;
|
|
573
|
-
|
|
571
|
+
outline: none;
|
|
572
|
+
cursor: pointer;
|
|
573
|
+
border: none;
|
|
574
|
+
&:hover {
|
|
575
|
+
background: #9b8eff;
|
|
576
|
+
}
|
|
577
|
+
&:active {
|
|
578
|
+
background: #6553f5;
|
|
579
|
+
}
|
|
580
|
+
`},402:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Header=void 0;const i=o(n(8156)),u=n(2149),s=n(1277),c=n(216),d=n(550),f=n(9140),p=n(4781),h=n(4072),m=n(7286),g=n(6726),v=n(7756),b=n(8897),y=n(3284),C=n(3168),x=n(9316),k=n(6700),w=n(2258),L=n(2188),_=n(7493),E=l(n(6234));t.Header=({userRole:e,avatarUrl:t,clubAccess:n,onRouteChange:r,isProfinansy:a,onLogout:o,SearchBox:l,isTest:S,blackVersion:M,leaderBoardPermission:P,isPartner:O,isConfirmPartner:F})=>{var z;const[T,j]=(0,i.useState)(!1),I=a?"":S?"https://test.profinansy.ru":"https://profinansy.ru",D=(0,u.getMainLinks)(I,S,P),B=(0,u.getClubLinks)(n,I),{sm:H}=(0,d.useBreakpoints)(),{currentHref:N}=(0,k.useCurrentPath)(),R=null===window||void 0===window?void 0:window.location.pathname.includes("/feed");(0,i.useEffect)((()=>{j(!1)}),[N]);const V=e=>{r?r(e):window.location=e},A=()=>{const e=a?"/market/dashboard":window.location.href;V(I+"/authorization?redirect="+e)},$=()=>{"guest"===e?V(`${I}/authorization?redirect=/feed/create-publication`):window.open(`${I}/feed/create-publication`,"_blank")};(0,p.useListenOutsideClick)({onOutsideClick:()=>j(!1)}),(0,E.default)(T);const Z=M?"#C0C0C0":"#898989",U=M?"#9B8EFF":"#6553F5",W=M?m.BurgerIcon:C.BurgerIconDark;return i.default.createElement(c.HeaderRoot,{blackVersion:M},H&&i.default.createElement(c.HeaderLeft,null,i.default.createElement(c.BurgerBtn,{onClick:e=>{e.stopPropagation(),j((e=>!e))}},T?i.default.createElement(h.CloseIcon,{width:21,height:19}):i.default.createElement(W,{width:21,height:16}))),i.default.createElement(c.LogoBtn,{onClick:()=>V(I+"/market/dashboard")},M?i.default.createElement(y.PurpleLogoDark,{width:H?128:161,height:H?20:28}):i.default.createElement(b.PurpleLogo,{width:H?128:161,height:H?20:28})),i.default.createElement(c.LinkList,{blackVersion:M,onClick:e=>e.stopPropagation(),opened:T},!!l&&i.default.createElement(c.SearchBoxWrapper,null,l()),R&&i.default.createElement(c.MobileCreateBtn,null,i.default.createElement(_.TextButton,{text:"Создать публикацию",iconLeft:i.default.createElement(L.PlusIcon,null),onClick:$})),null===(z=D[e])||void 0===z?void 0:z.map(((e,t)=>i.default.createElement(s.HeaderLinkItem,Object.assign({mainColor:Z,activeColor:U,blackVersion:M,closeBurger:()=>j(!1),onRouteChange:V,key:t,burgerOpened:T},e)))),i.default.createElement(s.HeaderLinkItem,Object.assign({mainColor:Z,activeColor:U,blackVersion:M,closeBurger:()=>j(!1),onRouteChange:V,burgerOpened:T},B)),"guest"!==e&&H&&i.default.createElement(c.LogoutBtn,{blackVersion:M,onClick:o},i.default.createElement(v.LogoutIconNew,{width:19,height:19}),i.default.createElement("span",null,"Выйти"))),i.default.createElement(c.HeaderRight,null,R&&i.default.createElement(c.CreateBtn,null,i.default.createElement(w.Button,{text:"Создать",iconLeft:i.default.createElement(L.PlusIcon,null),theme:w.ButtonTheme.Tertiary,size:w.ButtonSize.S,onClick:$})),O&&!R&&i.default.createElement(c.PartnerButton,{onClick:()=>{F?V(I+"/ref-account"):window.open("https://sites.profinansy.ru/partnership","_blank")}},"Я партнер"),"guest"!==e&&i.default.createElement(c.FavoritesButton,{onClick:()=>V(I+"/account/favorite/instruments")},i.default.createElement(x.FavoritesIcon,null)),"guest"===e?i.default.createElement(i.default.Fragment,null,H?i.default.createElement(g.LogoutIcon,{onClick:A,width:18,height:18}):i.default.createElement(w.Button,{onClick:A,text:"Войти",size:w.ButtonSize.S})):i.default.createElement(f.UserDropdownMenu,{mainColor:Z,activeColor:U,blackVersion:M,closeBurger:()=>j(!1),profinansyHostname:I,avatarUrl:t,onRouteChange:V,onLogout:o})))}},6802:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),a(n(402),t)},4537:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDropdownLinks=void 0;const r=n(4262),a=n(5209),o=n(8024),l=n(8438),i=n(3704);t.getDropdownLinks=e=>[{name:"Профиль",href:e+"/account/profile",Icon:l.ProfileIcon},{name:"Учебные группы",href:e+"/account/chats",Icon:a.ChatsIcon},{name:"Каналы",href:e+"/account/channels",Icon:r.ChannelsIcon},{name:"История покупок",href:e+"/account/purchase-history",Icon:i.PurchasesIcon},{name:"Уведомления",href:e+"/account/notifications?",Icon:o.NotificationsIcon}]},4022:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Line=t.UserMenuText=t.UserMenuItem=t.UserMenu=t.UserMenuWrapper=t.UserAvatar=t.UserDropdownRoot=void 0;const a=r(n(2788));t.UserDropdownRoot=a.default.div`
|
|
574
581
|
position: relative;
|
|
575
582
|
`,t.UserAvatar=a.default.img`
|
|
576
583
|
position: relative;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const getBreakPointsValues: (screenWidth: number) => {
|
|
2
|
-
xs: boolean;
|
|
3
|
-
sm: boolean;
|
|
4
|
-
md: boolean;
|
|
5
|
-
lg: boolean;
|
|
6
|
-
};
|
|
1
|
+
export declare const getBreakPointsValues: (screenWidth: number) => {
|
|
2
|
+
xs: boolean;
|
|
3
|
+
sm: boolean;
|
|
4
|
+
md: boolean;
|
|
5
|
+
lg: boolean;
|
|
6
|
+
};
|
package/package.json
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "profinansy-ui-lib",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"main": "./dist/index.js",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"devDependencies": {
|
|
7
|
-
"@babel/preset-env": "^7.22.5",
|
|
8
|
-
"@babel/preset-react": "^7.22.5",
|
|
9
|
-
"@babel/preset-typescript": "^7.22.5",
|
|
10
|
-
"@storybook/addon-essentials": "7.0.24",
|
|
11
|
-
"@storybook/addon-interactions": "7.0.24",
|
|
12
|
-
"@storybook/addon-links": "7.0.24",
|
|
13
|
-
"@storybook/blocks": "7.0.24",
|
|
14
|
-
"@storybook/react": "7.0.24",
|
|
15
|
-
"@storybook/react-webpack5": "7.0.24",
|
|
16
|
-
"@storybook/testing-library": "0.0.14-next.2",
|
|
17
|
-
"@types/react": "^18.0.27",
|
|
18
|
-
"@types/styled-components": "^5.1.26",
|
|
19
|
-
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
|
20
|
-
"@typescript-eslint/parser": "^6.2.0",
|
|
21
|
-
"classnames": "^2.3.2",
|
|
22
|
-
"css-loader": "^6.7.3",
|
|
23
|
-
"eslint": "^8.45.0",
|
|
24
|
-
"eslint-plugin-react": "^7.33.0",
|
|
25
|
-
"husky": "^8.0.3",
|
|
26
|
-
"prettier": "2.8.8",
|
|
27
|
-
"prop-types": "15.8.1",
|
|
28
|
-
"react": "18.2.0",
|
|
29
|
-
"react-dom": "18.2.0",
|
|
30
|
-
"sass": "^1.57.1",
|
|
31
|
-
"sass-loader": "^13.2.0",
|
|
32
|
-
"storybook": "7.0.24",
|
|
33
|
-
"style-loader": "^3.3.1",
|
|
34
|
-
"styled-components": "^5.3.6",
|
|
35
|
-
"ts-loader": "^9.4.2",
|
|
36
|
-
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
|
37
|
-
"typescript": "^4.9.4",
|
|
38
|
-
"webpack": "^5.75.0",
|
|
39
|
-
"webpack-cli": "^5.0.1"
|
|
40
|
-
},
|
|
41
|
-
"scripts": {
|
|
42
|
-
"build": "webpack",
|
|
43
|
-
"pub": "webpack && npm version patch && npm publish",
|
|
44
|
-
"lint": "eslint .",
|
|
45
|
-
"lint:fix": "eslint --fix",
|
|
46
|
-
"types": "tsc",
|
|
47
|
-
"storybook": "storybook dev -p 6006",
|
|
48
|
-
"build-storybook": "storybook build",
|
|
49
|
-
"prepare": "husky install",
|
|
50
|
-
"checks:pre-commit": "yarn lint"
|
|
51
|
-
},
|
|
52
|
-
"peerDependencies": {
|
|
53
|
-
"react": "^17",
|
|
54
|
-
"styled-components": "^5.3.6"
|
|
55
|
-
},
|
|
56
|
-
"files": [
|
|
57
|
-
"dist"
|
|
58
|
-
]
|
|
59
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "profinansy-ui-lib",
|
|
3
|
+
"version": "2.0.8",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"devDependencies": {
|
|
7
|
+
"@babel/preset-env": "^7.22.5",
|
|
8
|
+
"@babel/preset-react": "^7.22.5",
|
|
9
|
+
"@babel/preset-typescript": "^7.22.5",
|
|
10
|
+
"@storybook/addon-essentials": "7.0.24",
|
|
11
|
+
"@storybook/addon-interactions": "7.0.24",
|
|
12
|
+
"@storybook/addon-links": "7.0.24",
|
|
13
|
+
"@storybook/blocks": "7.0.24",
|
|
14
|
+
"@storybook/react": "7.0.24",
|
|
15
|
+
"@storybook/react-webpack5": "7.0.24",
|
|
16
|
+
"@storybook/testing-library": "0.0.14-next.2",
|
|
17
|
+
"@types/react": "^18.0.27",
|
|
18
|
+
"@types/styled-components": "^5.1.26",
|
|
19
|
+
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
|
20
|
+
"@typescript-eslint/parser": "^6.2.0",
|
|
21
|
+
"classnames": "^2.3.2",
|
|
22
|
+
"css-loader": "^6.7.3",
|
|
23
|
+
"eslint": "^8.45.0",
|
|
24
|
+
"eslint-plugin-react": "^7.33.0",
|
|
25
|
+
"husky": "^8.0.3",
|
|
26
|
+
"prettier": "2.8.8",
|
|
27
|
+
"prop-types": "15.8.1",
|
|
28
|
+
"react": "18.2.0",
|
|
29
|
+
"react-dom": "18.2.0",
|
|
30
|
+
"sass": "^1.57.1",
|
|
31
|
+
"sass-loader": "^13.2.0",
|
|
32
|
+
"storybook": "7.0.24",
|
|
33
|
+
"style-loader": "^3.3.1",
|
|
34
|
+
"styled-components": "^5.3.6",
|
|
35
|
+
"ts-loader": "^9.4.2",
|
|
36
|
+
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
|
37
|
+
"typescript": "^4.9.4",
|
|
38
|
+
"webpack": "^5.75.0",
|
|
39
|
+
"webpack-cli": "^5.0.1"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "webpack",
|
|
43
|
+
"pub": "webpack && npm version patch && npm publish",
|
|
44
|
+
"lint": "eslint .",
|
|
45
|
+
"lint:fix": "eslint --fix",
|
|
46
|
+
"types": "tsc",
|
|
47
|
+
"storybook": "storybook dev -p 6006",
|
|
48
|
+
"build-storybook": "storybook build",
|
|
49
|
+
"prepare": "husky install",
|
|
50
|
+
"checks:pre-commit": "yarn lint"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"react": "^17",
|
|
54
|
+
"styled-components": "^5.3.6"
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"dist"
|
|
58
|
+
]
|
|
59
|
+
}
|
package/readme.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# Флоу работы
|
|
2
|
-
1. Создать ветку от master
|
|
3
|
-
2. Сделать изменения, обновить версию в package.json, выполнить команду yarn build, запушить в гитлаб и открыть МР в мастер(прикрепляете ссылку на задачу в МР и кидаете его в группу в телеге)
|
|
4
|
-
3. Ревьювер посмотрит на МР, если это апрув, примет МР в main, и выполнит у себя локально команду npm publish
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
# Как смотреть изменения
|
|
8
|
-
1. Надо расшарить локально репу общих компонентов, для этого в терминале в корневой директории проекта **profinansy-react-components** запустить команду **yarn link**
|
|
9
|
-
2. В своем проекте, в котором используется эта репа(profinansy, к примеру),надо выполнить команду **yarn remove profinansy-ui-lib**, затем **yarn link profinansy-ui-lib**. Для применения изменений выполняйте команду **yarn build** в репозитории **profinansy-react-components**. Возможно то, что typescript будет кидать ошибки JSX типа "**cannot be used as a JSX component**", пока вы не отвяжете локальную привязку
|
|
10
|
-
3. После завершения работы над компонентами, надо отвязать привязку: **yarn unlink profinansy-ui-lib**, затем **yarn add --force profinansy-ui-lib**
|
|
1
|
+
# Флоу работы
|
|
2
|
+
1. Создать ветку от master
|
|
3
|
+
2. Сделать изменения, обновить версию в package.json, выполнить команду yarn build, запушить в гитлаб и открыть МР в мастер(прикрепляете ссылку на задачу в МР и кидаете его в группу в телеге)
|
|
4
|
+
3. Ревьювер посмотрит на МР, если это апрув, примет МР в main, и выполнит у себя локально команду npm publish
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# Как смотреть изменения
|
|
8
|
+
1. Надо расшарить локально репу общих компонентов, для этого в терминале в корневой директории проекта **profinansy-react-components** запустить команду **yarn link**
|
|
9
|
+
2. В своем проекте, в котором используется эта репа(profinansy, к примеру),надо выполнить команду **yarn remove profinansy-ui-lib**, затем **yarn link profinansy-ui-lib**. Для применения изменений выполняйте команду **yarn build** в репозитории **profinansy-react-components**. Возможно то, что typescript будет кидать ошибки JSX типа "**cannot be used as a JSX component**", пока вы не отвяжете локальную привязку
|
|
10
|
+
3. После завершения работы над компонентами, надо отвязать привязку: **yarn unlink profinansy-ui-lib**, затем **yarn add --force profinansy-ui-lib**
|