profinansy-ui-lib 3.1.44 → 3.1.45
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/components/uikit/Hint/Hint.d.ts +1 -1
- package/dist/components/uikit/Popup/Popup.d.ts +64 -1
- package/dist/components/uikit/Popup/Popup.stories.d.ts +2 -1
- package/dist/components/uikit/Popup/Popup.styled.d.ts +6 -8
- package/dist/components/uikit/Popup/Popup.typed.d.ts +11 -7
- package/dist/index.js +67 -33
- package/package.json +1 -1
|
@@ -43,7 +43,7 @@ export declare function useHint({ placement }?: HintOptions): {
|
|
|
43
43
|
};
|
|
44
44
|
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
45
45
|
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
46
|
-
getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "
|
|
46
|
+
getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
|
|
47
47
|
active?: boolean;
|
|
48
48
|
selected?: boolean;
|
|
49
49
|
}) => Record<string, unknown>;
|
|
@@ -1,3 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Placement } from '@floating-ui/react';
|
|
1
3
|
import { IPopup } from './Popup.typed';
|
|
2
|
-
declare
|
|
4
|
+
export declare function usePopup({ placement, isHover }: {
|
|
5
|
+
placement?: Placement;
|
|
6
|
+
isHover?: boolean;
|
|
7
|
+
}): {
|
|
8
|
+
labelId: string;
|
|
9
|
+
descriptionId: string;
|
|
10
|
+
setLabelId: React.Dispatch<React.SetStateAction<string>>;
|
|
11
|
+
setDescriptionId: React.Dispatch<React.SetStateAction<string>>;
|
|
12
|
+
placement: Placement;
|
|
13
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
14
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
isPositioned: boolean;
|
|
18
|
+
update: () => void;
|
|
19
|
+
floatingStyles: React.CSSProperties;
|
|
20
|
+
refs: {
|
|
21
|
+
reference: React.MutableRefObject<import("@floating-ui/react-dom").ReferenceType>;
|
|
22
|
+
floating: React.MutableRefObject<HTMLElement>;
|
|
23
|
+
setReference: (node: import("@floating-ui/react-dom").ReferenceType) => void;
|
|
24
|
+
setFloating: (node: HTMLElement) => void;
|
|
25
|
+
} & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
26
|
+
elements: {
|
|
27
|
+
reference: import("@floating-ui/react-dom").ReferenceType;
|
|
28
|
+
floating: HTMLElement;
|
|
29
|
+
} & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
30
|
+
context: {
|
|
31
|
+
placement: Placement;
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
35
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
36
|
+
isPositioned: boolean;
|
|
37
|
+
update: () => void;
|
|
38
|
+
floatingStyles: React.CSSProperties;
|
|
39
|
+
open: boolean;
|
|
40
|
+
onOpenChange: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
|
|
41
|
+
events: import("@floating-ui/react").FloatingEvents;
|
|
42
|
+
dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
|
|
43
|
+
nodeId: string;
|
|
44
|
+
floatingId: string;
|
|
45
|
+
refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
46
|
+
elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
47
|
+
};
|
|
48
|
+
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
49
|
+
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
50
|
+
getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
|
|
51
|
+
active?: boolean;
|
|
52
|
+
selected?: boolean;
|
|
53
|
+
}) => Record<string, unknown>;
|
|
54
|
+
arrowRef: React.MutableRefObject<any>;
|
|
55
|
+
open: boolean;
|
|
56
|
+
setOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
57
|
+
};
|
|
58
|
+
declare const Popup: ({ content, ...restOptions }: IPopup) => JSX.Element;
|
|
59
|
+
export declare const PopupTrigger: ({ isText, targetElement }: {
|
|
60
|
+
isText: boolean;
|
|
61
|
+
targetElement?: React.ReactNode;
|
|
62
|
+
}) => JSX.Element;
|
|
63
|
+
export declare const PopupContent: ({ content }: {
|
|
64
|
+
content: string[];
|
|
65
|
+
}) => JSX.Element;
|
|
3
66
|
export { Popup };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
title: string;
|
|
3
|
-
component: ({ content,
|
|
3
|
+
component: ({ content, ...restOptions }: import("./Popup.typed").IPopup) => JSX.Element;
|
|
4
|
+
tags: string[];
|
|
4
5
|
};
|
|
5
6
|
export default _default;
|
|
6
7
|
export declare const Popup: () => JSX.Element;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
declare const
|
|
3
|
-
width: IPopup['width'];
|
|
4
|
-
}, never>;
|
|
1
|
+
export declare const Tooltip: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const Trigger: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
5
3
|
declare const Content: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const Close: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
6
5
|
declare const Title: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
-
declare const PlayBtn: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
8
6
|
declare const Link: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
9
|
-
declare const Description: import("styled-components").StyledComponent<"
|
|
7
|
+
declare const Description: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
declare const PlayBtn: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
10
9
|
declare const Ifram: import("styled-components").StyledComponent<"iframe", import("styled-components").DefaultTheme, {}, never>;
|
|
11
|
-
declare const Target: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
12
10
|
declare const Text: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
13
11
|
declare const Hint: import("styled-components").StyledComponent<any, import("styled-components").DefaultTheme, object, string | number | symbol>;
|
|
14
|
-
export {
|
|
12
|
+
export { Title, Content, PlayBtn, Link, Description, Ifram, Text, Hint };
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Placement } from '@floating-ui/react';
|
|
2
3
|
export interface IPopup {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
/**Расположение popup*/
|
|
5
|
+
placement?: Placement;
|
|
6
|
+
/**Использовать текстовый триггер*/
|
|
6
7
|
isText?: boolean;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
/**Показывать по наведению на триггер*/
|
|
9
|
+
isHover?: boolean;
|
|
10
|
+
/**Использовать кастомный триггер*/
|
|
11
|
+
targetElement?: React.ReactNode;
|
|
12
|
+
/**Контент подсказки*/
|
|
13
|
+
content: string[];
|
|
10
14
|
}
|