@ozen-ui/kit 0.6.0 → 0.7.0
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/Paper/package.json +5 -0
- package/__inner__/cjs/components/Alert/Alert.css +0 -5
- package/__inner__/cjs/components/Alert/Alert.js +3 -2
- package/__inner__/cjs/components/Breadcrumbs/Breadcrumbs.css +4 -0
- package/__inner__/cjs/components/Card/Card.css +9 -21
- package/__inner__/cjs/components/Card/Card.d.ts +3 -4
- package/__inner__/cjs/components/Card/Card.js +11 -1
- package/__inner__/cjs/components/Dialog/Dialog.css +0 -2
- package/__inner__/cjs/components/Dialog/Dialog.d.ts +21 -1
- package/__inner__/cjs/components/Drawer/Drawer.css +0 -1
- package/__inner__/cjs/components/Drawer/Drawer.d.ts +23 -1
- package/__inner__/cjs/components/Menu/components/MenuItem/MenuItem.js +3 -2
- package/__inner__/cjs/components/Modal/Modal.css +4 -3
- package/__inner__/cjs/components/Modal/Modal.d.ts +58 -5
- package/__inner__/cjs/components/Modal/Modal.js +2 -1
- package/__inner__/cjs/components/Paper/Paper.css +44 -0
- package/__inner__/cjs/components/Paper/Paper.d.ts +19 -0
- package/__inner__/cjs/components/Paper/Paper.js +25 -0
- package/__inner__/cjs/components/Paper/index.d.ts +1 -0
- package/__inner__/cjs/components/Paper/index.js +4 -0
- package/__inner__/cjs/components/Popover/Popover.css +1 -11
- package/__inner__/cjs/components/Popover/Popover.d.ts +2 -3
- package/__inner__/cjs/components/Popover/Popover.js +4 -3
- package/__inner__/cjs/components/Popover/components/PopoverArrow.js +2 -2
- package/__inner__/cjs/components/Popover/components/types.d.ts +0 -3
- package/__inner__/cjs/components/Popover/components/types.js +1 -2
- package/__inner__/cjs/components/Popover/constants.d.ts +1 -0
- package/__inner__/cjs/components/Popover/constants.js +3 -1
- package/__inner__/cjs/components/Popover/types.d.ts +8 -4
- package/__inner__/cjs/components/Portal/Portal.d.ts +8 -8
- package/__inner__/cjs/components/Portal/Portal.js +7 -6
- package/__inner__/cjs/components/Snackbar/SnackbarProvider.d.ts +4 -1
- package/__inner__/cjs/components/Snackbar/components/Snackbar/Snackbar.d.ts +6 -1
- package/__inner__/cjs/components/ThemeProvider/ThemeProvider.d.ts +2 -1
- package/__inner__/cjs/components/ThemeProvider/types.d.ts +2 -0
- package/__inner__/cjs/components/Tooltip/Tooltip.css +11 -16
- package/__inner__/cjs/components/Tooltip/Tooltip.js +1 -2
- package/__inner__/cjs/components/Tooltip/constants.d.ts +1 -0
- package/__inner__/cjs/components/Tooltip/constants.js +3 -1
- package/__inner__/cjs/components/Tooltip/types.d.ts +3 -2
- package/__inner__/cjs/components/Typography/Typography.css +36 -0
- package/__inner__/cjs/components/Typography/Typography.d.ts +1 -1
- package/__inner__/cjs/components/Typography/Typography.js +12 -0
- package/__inner__/esm/components/Alert/Alert.css +0 -5
- package/__inner__/esm/components/Alert/Alert.js +3 -2
- package/__inner__/esm/components/Breadcrumbs/Breadcrumbs.css +4 -0
- package/__inner__/esm/components/Card/Card.css +9 -21
- package/__inner__/esm/components/Card/Card.d.ts +3 -4
- package/__inner__/esm/components/Card/Card.js +11 -1
- package/__inner__/esm/components/Dialog/Dialog.css +0 -2
- package/__inner__/esm/components/Dialog/Dialog.d.ts +21 -1
- package/__inner__/esm/components/Drawer/Drawer.css +0 -1
- package/__inner__/esm/components/Drawer/Drawer.d.ts +23 -1
- package/__inner__/esm/components/Menu/components/MenuItem/MenuItem.js +3 -2
- package/__inner__/esm/components/Modal/Modal.css +4 -3
- package/__inner__/esm/components/Modal/Modal.d.ts +58 -5
- package/__inner__/esm/components/Modal/Modal.js +2 -1
- package/__inner__/esm/components/Paper/Paper.css +44 -0
- package/__inner__/esm/components/Paper/Paper.d.ts +19 -0
- package/__inner__/esm/components/Paper/Paper.js +22 -0
- package/__inner__/esm/components/Paper/index.d.ts +1 -0
- package/__inner__/esm/components/Paper/index.js +1 -0
- package/__inner__/esm/components/Popover/Popover.css +1 -11
- package/__inner__/esm/components/Popover/Popover.d.ts +2 -3
- package/__inner__/esm/components/Popover/Popover.js +6 -5
- package/__inner__/esm/components/Popover/components/PopoverArrow.js +2 -2
- package/__inner__/esm/components/Popover/components/types.d.ts +0 -3
- package/__inner__/esm/components/Popover/components/types.js +0 -1
- package/__inner__/esm/components/Popover/constants.d.ts +1 -0
- package/__inner__/esm/components/Popover/constants.js +2 -0
- package/__inner__/esm/components/Popover/types.d.ts +8 -4
- package/__inner__/esm/components/Portal/Portal.d.ts +8 -8
- package/__inner__/esm/components/Portal/Portal.js +7 -6
- package/__inner__/esm/components/Snackbar/SnackbarProvider.d.ts +4 -1
- package/__inner__/esm/components/Snackbar/components/Snackbar/Snackbar.d.ts +6 -1
- package/__inner__/esm/components/ThemeProvider/ThemeProvider.d.ts +2 -1
- package/__inner__/esm/components/ThemeProvider/types.d.ts +2 -0
- package/__inner__/esm/components/Tooltip/Tooltip.css +11 -16
- package/__inner__/esm/components/Tooltip/Tooltip.js +3 -4
- package/__inner__/esm/components/Tooltip/constants.d.ts +1 -0
- package/__inner__/esm/components/Tooltip/constants.js +2 -0
- package/__inner__/esm/components/Tooltip/types.d.ts +3 -2
- package/__inner__/esm/components/Typography/Typography.css +36 -0
- package/__inner__/esm/components/Typography/Typography.d.ts +1 -1
- package/__inner__/esm/components/Typography/Typography.js +12 -0
- package/package.json +1 -1
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
inset-inline-start: 50%;
|
|
23
23
|
transform: translate(-50%, -50%);
|
|
24
24
|
inline-size: 400px;
|
|
25
|
-
background-color: var(--color-background-main);
|
|
26
25
|
box-sizing: border-box;
|
|
27
26
|
border: 2px solid black;
|
|
28
27
|
padding: var(--space-2xl);
|
|
@@ -39,7 +38,8 @@
|
|
|
39
38
|
|
|
40
39
|
.Modal_animation-enter-active .Modal-Window, .Modal_animation-appear-active .Modal-Window {
|
|
41
40
|
opacity: 1;
|
|
42
|
-
transition:
|
|
41
|
+
transition:
|
|
42
|
+
opacity var(--transition-slow),
|
|
43
43
|
transform var(--transition-slow);
|
|
44
44
|
transform: translate(-50%, -50%) translateY(0);
|
|
45
45
|
}
|
|
@@ -58,7 +58,8 @@
|
|
|
58
58
|
.Modal_animation-exit-active .Modal-Window {
|
|
59
59
|
opacity: 0;
|
|
60
60
|
visibility: visible;
|
|
61
|
-
transition:
|
|
61
|
+
transition:
|
|
62
|
+
opacity var(--transition-slow),
|
|
62
63
|
transform var(--transition-slow);
|
|
63
64
|
transform: translate(-50%, -50%) translateY(100px);
|
|
64
65
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import './Modal.css';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { ReactNode
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
4
|
import { CSSTransitionProps } from 'react-transition-group/CSSTransition';
|
|
5
|
-
import { BackdropProps } from '../Backdrop';
|
|
6
|
-
import {
|
|
5
|
+
import { type BackdropProps } from '../Backdrop';
|
|
6
|
+
import { type PaperProps } from '../Paper';
|
|
7
|
+
import { type PortalProps, type PortalRef } from '../Portal';
|
|
7
8
|
export declare const cnModal: import("@bem-react/classname").ClassNameFormatter;
|
|
8
9
|
export type ModalProps = {
|
|
9
10
|
/** Признак по которому компонент будет представлен */
|
|
@@ -38,7 +39,7 @@ export type ModalProps = {
|
|
|
38
39
|
'data-testid'?: string;
|
|
39
40
|
};
|
|
40
41
|
/** Свойства окна с контентом */
|
|
41
|
-
windowProps?:
|
|
42
|
+
windowProps?: PaperProps & {
|
|
42
43
|
'data-testid'?: string;
|
|
43
44
|
};
|
|
44
45
|
/** Кастомный класс контейнера модального окна */
|
|
@@ -49,4 +50,56 @@ export type ModalProps = {
|
|
|
49
50
|
container?: PortalProps['container'];
|
|
50
51
|
} & PortalProps;
|
|
51
52
|
export type ModalRef = PortalRef;
|
|
52
|
-
export declare const Modal: React.ForwardRefExoticComponent<
|
|
53
|
+
export declare const Modal: React.ForwardRefExoticComponent<{
|
|
54
|
+
/** Признак по которому компонент будет представлен */
|
|
55
|
+
open?: boolean | undefined;
|
|
56
|
+
/** Содержимое модального окна */
|
|
57
|
+
children: ReactNode;
|
|
58
|
+
/** Функция обратного вызова которая будет вызвана до начала
|
|
59
|
+
* перехода компонента в состояние представлен */
|
|
60
|
+
onEnter?: (() => void) | undefined;
|
|
61
|
+
/** Функция обратного вызова которая будет вызвана после завершения
|
|
62
|
+
* перехода компонента в состояние представлен */
|
|
63
|
+
onEntered?: (() => void) | undefined;
|
|
64
|
+
/** Функция обратного вызова которая будет вызвана до начала
|
|
65
|
+
* перехода компонента в состояние не представлен */
|
|
66
|
+
onExit?: (() => void) | undefined;
|
|
67
|
+
/** Функция обратного вызова которая будет вызвана после
|
|
68
|
+
* завершения перехода в состояние не представлен */
|
|
69
|
+
onExited?: (() => void) | undefined;
|
|
70
|
+
/** Функция обратного вызова которая будет вызвана когда компонент запрашивает
|
|
71
|
+
* закрытие (нажатие на клавишу {ESC}, клик по подложке Backdrop) */
|
|
72
|
+
onClose?: (() => void) | undefined;
|
|
73
|
+
/** Если {true} скрывает подложку */
|
|
74
|
+
hideBackdrop?: boolean | undefined;
|
|
75
|
+
/** Если {true} предотвращает размонтирование компонента при событии закрыть */
|
|
76
|
+
keepMounted?: boolean | undefined;
|
|
77
|
+
/** Свойства компонента Backdrop (подложка) */
|
|
78
|
+
backdropProps?: (import("../Backdrop").BackdropBaseProps & {
|
|
79
|
+
as?: "div" | undefined;
|
|
80
|
+
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
81
|
+
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
82
|
+
}, keyof import("../Backdrop").BackdropBaseProps> & {
|
|
83
|
+
'data-testid'?: string | undefined;
|
|
84
|
+
}) | undefined;
|
|
85
|
+
/** Свойства по управлению анимацией перехода */
|
|
86
|
+
transitionProps?: (Partial<CSSTransitionProps<undefined>> & {
|
|
87
|
+
'data-testid'?: string | undefined;
|
|
88
|
+
}) | undefined;
|
|
89
|
+
/** Свойства окна с контентом */
|
|
90
|
+
windowProps?: (import("../Paper").PaperBaseProps & {
|
|
91
|
+
as?: "div" | undefined;
|
|
92
|
+
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
93
|
+
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
94
|
+
}, keyof import("../Paper").PaperBaseProps> & {
|
|
95
|
+
'data-testid'?: string | undefined;
|
|
96
|
+
}) | undefined;
|
|
97
|
+
/** Кастомный класс контейнера модального окна */
|
|
98
|
+
className?: string | undefined;
|
|
99
|
+
/** Идентификатор компонента для тестов */
|
|
100
|
+
'data-testid'?: string | undefined;
|
|
101
|
+
/** Контейнер для монтирования всплывающего окна */
|
|
102
|
+
container?: PortalProps['container'];
|
|
103
|
+
} & import("../Portal").PortalBaseProps & {
|
|
104
|
+
as?: "div" | undefined;
|
|
105
|
+
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "container"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -9,6 +9,7 @@ import { useMultiRef } from '../../hooks/useMultiRef';
|
|
|
9
9
|
import { cn } from '../../utils/classname';
|
|
10
10
|
import { isKey } from '../../utils/isKey';
|
|
11
11
|
import { Backdrop } from '../Backdrop';
|
|
12
|
+
import { Paper } from '../Paper';
|
|
12
13
|
import { Portal } from '../Portal';
|
|
13
14
|
import { useModalManager } from './index';
|
|
14
15
|
export var cnModal = cn('Modal');
|
|
@@ -77,6 +78,6 @@ export var Modal = forwardRef(function (_a, ref) {
|
|
|
77
78
|
return (React.createElement(CSSTransition, __assign({ classNames: cnModal({ animation: true }), timeout: 300 }, transitionProps, { "in": openState, onEnter: onEnter, onEntered: onEntered, onExit: onExit, onExited: onExited, unmountOnExit: !keepMounted, appear: true }),
|
|
78
79
|
React.createElement(Portal, __assign({}, other, { className: cnModal({ hidden: keepMounted && !openState, hasBackdrop: hasBackdrop }, [className]), ref: useMultiRef([modalInnerRef, ref]) }),
|
|
79
80
|
!hideBackdrop && (React.createElement(Backdrop, __assign({ zIndex: -1 }, backdropProps, { onClick: onClose, open: openState, className: backdropProps === null || backdropProps === void 0 ? void 0 : backdropProps.className }))),
|
|
80
|
-
React.createElement(
|
|
81
|
+
React.createElement(Paper, __assign({ radius: "s", background: "main" }, windowProps, { className: cnModal('Window', [windowProps === null || windowProps === void 0 ? void 0 : windowProps.className]), tabIndex: -1, ref: useMultiRef([trapRef, windowProps === null || windowProps === void 0 ? void 0 : windowProps.ref]) }), children))));
|
|
81
82
|
});
|
|
82
83
|
Modal.displayName = 'Modal';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.Paper {
|
|
2
|
+
--paper-background-color: none;
|
|
3
|
+
--paper-border-radius: none;
|
|
4
|
+
--paper-box-shadow: none;
|
|
5
|
+
background-color: var(--paper-background-color);
|
|
6
|
+
border-radius: var(--paper-border-radius);
|
|
7
|
+
box-shadow: var(--paper-box-shadow);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.Paper_radius_xs {
|
|
11
|
+
--paper-border-radius: var(--border-radius-xs);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.Paper_radius_s {
|
|
15
|
+
--paper-border-radius: var(--border-radius-m);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.Paper_radius_l {
|
|
19
|
+
--paper-border-radius: var(--border-radius-l);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.Paper_background_main {
|
|
23
|
+
--paper-background-color: var(--color-background-main);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.Paper_background_main-inverse {
|
|
27
|
+
--paper-background-color: var(--color-background-main-inverse);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.Paper_background_action-light {
|
|
31
|
+
--paper-background-color: var(--color-background-action-light);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.Paper_background_accent {
|
|
35
|
+
--paper-background-color: var(--color-accent-main);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.Paper_shadow_m {
|
|
39
|
+
--paper-box-shadow: var(--shadow-m);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.Paper_shadow_l {
|
|
43
|
+
--paper-box-shadow: var(--shadow-l);
|
|
44
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import './Paper.css';
|
|
2
|
+
import { type ComponentRef, type ElementType } from 'react';
|
|
3
|
+
import { type PolymorphicComponentPropsWithRef } from '../../utils/polymorphicComponentWithRef';
|
|
4
|
+
export declare const PAPER_DEFAULT_TAG = "div";
|
|
5
|
+
export declare const paperRadiusVariant: readonly ["xs", "s", "l"];
|
|
6
|
+
export type PaperRadiusVariant = (typeof paperRadiusVariant)[number];
|
|
7
|
+
export declare const paperBackgroundVariant: readonly ["main", "main-inverse", "action-light", "accent"];
|
|
8
|
+
export type PaperBackgroundVariant = (typeof paperBackgroundVariant)[number];
|
|
9
|
+
export declare const paperShadowVariant: readonly ["m", "l"];
|
|
10
|
+
export type PaperShadowVariant = (typeof paperShadowVariant)[number];
|
|
11
|
+
export type PaperBaseProps = {
|
|
12
|
+
radius?: PaperRadiusVariant;
|
|
13
|
+
background?: PaperBackgroundVariant;
|
|
14
|
+
shadow?: PaperShadowVariant;
|
|
15
|
+
};
|
|
16
|
+
export type PaperProps<As extends ElementType = typeof PAPER_DEFAULT_TAG> = PolymorphicComponentPropsWithRef<PaperBaseProps, As>;
|
|
17
|
+
export type PaperRef = ComponentRef<typeof PAPER_DEFAULT_TAG>;
|
|
18
|
+
export declare const cnPaper: import("@bem-react/classname").ClassNameFormatter;
|
|
19
|
+
export declare const Paper: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<PaperBaseProps, "div">;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __assign, __rest } from "tslib";
|
|
2
|
+
import './Paper.css';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useThemeProps } from '../../hooks/useThemeProps';
|
|
5
|
+
import { cn } from '../../utils/classname';
|
|
6
|
+
import { polymorphicComponentWithRef, } from '../../utils/polymorphicComponentWithRef';
|
|
7
|
+
export var PAPER_DEFAULT_TAG = 'div';
|
|
8
|
+
export var paperRadiusVariant = ['xs', 's', 'l'];
|
|
9
|
+
export var paperBackgroundVariant = [
|
|
10
|
+
'main',
|
|
11
|
+
'main-inverse',
|
|
12
|
+
'action-light',
|
|
13
|
+
'accent',
|
|
14
|
+
];
|
|
15
|
+
export var paperShadowVariant = ['m', 'l'];
|
|
16
|
+
export var cnPaper = cn('Paper');
|
|
17
|
+
export var Paper = polymorphicComponentWithRef(function (inProps, ref) {
|
|
18
|
+
var props = useThemeProps({ props: inProps, name: 'Paper' });
|
|
19
|
+
var _a = props.as, Tag = _a === void 0 ? PAPER_DEFAULT_TAG : _a, children = props.children, radius = props.radius, background = props.background, shadow = props.shadow, className = props.className, other = __rest(props, ["as", "children", "radius", "background", "shadow", "className"]);
|
|
20
|
+
return (React.createElement(Tag, __assign({}, other, { className: cnPaper({ radius: radius, background: background, shadow: shadow }, [className]), ref: ref }), children));
|
|
21
|
+
});
|
|
22
|
+
Paper.displayName = 'Paper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Paper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Paper';
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
.Popover {
|
|
2
|
-
box-shadow: var(--shadow-l);
|
|
3
|
-
border-radius: var(--border-radius-xs);
|
|
4
|
-
background-color: var(--color-background-main);
|
|
5
2
|
z-index: var(--z-index-popover);
|
|
6
3
|
inline-size: auto;
|
|
7
4
|
box-sizing: border-box;
|
|
@@ -10,16 +7,9 @@
|
|
|
10
7
|
|
|
11
8
|
.Popover-Arrow {
|
|
12
9
|
display: flex;
|
|
10
|
+
color: var(--paper-background-color);
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
.Popover-Arrow_variant_light {
|
|
16
|
-
color: var(--color-background-main);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.Popover-Arrow_variant_dark {
|
|
20
|
-
color: var(--color-background-main-inverse);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
13
|
.Popover[data-popper-placement^='top'] > .Popover-Arrow_size_xs {
|
|
24
14
|
inset-block-end: -9px;
|
|
25
15
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import './Popover.css';
|
|
3
|
-
import type {
|
|
2
|
+
import type { PopoverBaseProps } from './types';
|
|
4
3
|
export declare const cnPopover: import("@bem-react/classname").ClassNameFormatter;
|
|
5
|
-
export declare const Popover:
|
|
4
|
+
export declare const Popover: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<PopoverBaseProps, import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<import("../Paper").PaperBaseProps, "div">>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __assign, __read, __rest, __spreadArray } from "tslib";
|
|
2
|
-
import React, { useCallback, useMemo, useEffect, useRef, useState,
|
|
2
|
+
import React, { useCallback, useMemo, useEffect, useRef, useState, } from 'react';
|
|
3
3
|
import { usePopper } from 'react-popper';
|
|
4
4
|
import { CSSTransition } from 'react-transition-group';
|
|
5
5
|
import './Popover.css';
|
|
@@ -10,13 +10,14 @@ import { useMultiRef } from '../../hooks/useMultiRef';
|
|
|
10
10
|
import { useThemeProps } from '../../hooks/useThemeProps';
|
|
11
11
|
import { cn } from '../../utils/classname';
|
|
12
12
|
import { isKey } from '../../utils/isKey';
|
|
13
|
+
import { polymorphicComponentWithRef } from '../../utils/polymorphicComponentWithRef';
|
|
13
14
|
import { Portal } from '../Portal';
|
|
14
15
|
import { PopoverArrow } from './components';
|
|
15
|
-
import { POPOVER_DEFAULT_ARROW, POPOVER_DEFAULT_DISABLE_ENFORCE_FOCUS, POPOVER_DEFAULT_DISABLE_INTERACTIVE, POPOVER_DEFAULT_DISABLE_RETURN_FOCUS, POPOVER_DEFAULT_OPEN, POPOVER_DEFAULT_PLACEMENT, } from './constants';
|
|
16
|
+
import { POPOVER_DEFAULT_ARROW, POPOVER_DEFAULT_DISABLE_ENFORCE_FOCUS, POPOVER_DEFAULT_DISABLE_INTERACTIVE, POPOVER_DEFAULT_DISABLE_RETURN_FOCUS, POPOVER_DEFAULT_OPEN, POPOVER_DEFAULT_PLACEMENT, POPOVER_DEFAULT_TAG, } from './constants';
|
|
16
17
|
import { usePopoverManager } from './index';
|
|
17
18
|
import { PopoverContext } from './PopoverContext';
|
|
18
19
|
export var cnPopover = cn('Popover');
|
|
19
|
-
export var Popover =
|
|
20
|
+
export var Popover = polymorphicComponentWithRef(function (inProps, ref) {
|
|
20
21
|
var props = useThemeProps({ props: inProps, name: 'Popover' });
|
|
21
22
|
var _a = props.arrow, arrow = _a === void 0 ? POPOVER_DEFAULT_ARROW : _a, _b = props.open, open = _b === void 0 ? POPOVER_DEFAULT_OPEN : _b, _c = props.disableInteractive, disableInteractive = _c === void 0 ? POPOVER_DEFAULT_DISABLE_INTERACTIVE : _c, _d = props.disableEnforceFocus, disableEnforceFocus = _d === void 0 ? POPOVER_DEFAULT_DISABLE_ENFORCE_FOCUS : _d, _e = props.disableReturnFocus, disableReturnFocus = _e === void 0 ? POPOVER_DEFAULT_DISABLE_RETURN_FOCUS : _e, _f = props.placement, placement = _f === void 0 ? POPOVER_DEFAULT_PLACEMENT : _f, ignoreClickOutsideRefs = props.ignoreClickOutsideRefs, arrowProps = props.arrowProps, anchorRef = props.anchorRef, equalAnchorWidth = props.equalAnchorWidth, offset = props.offset, children = props.children, transitionProps = props.transitionProps, onClose = props.onClose, onEnter = props.onEnter, onEntered = props.onEntered, onExit = props.onExit, onExitedProp = props.onExited, className = props.className, position = props.position, style = props.style, setUpdate = props.setUpdate, other = __rest(props, ["arrow", "open", "disableInteractive", "disableEnforceFocus", "disableReturnFocus", "placement", "ignoreClickOutsideRefs", "arrowProps", "anchorRef", "equalAnchorWidth", "offset", "children", "transitionProps", "onClose", "onEnter", "onEntered", "onExit", "onExited", "className", "position", "style", "setUpdate"]);
|
|
22
23
|
var isClickOutSide = useRef(null);
|
|
@@ -140,8 +141,8 @@ export var Popover = forwardRef(function (inProps, ref) {
|
|
|
140
141
|
var portalRef = useMultiRef([ref, popoverRef, trapRef, setPopperElement]);
|
|
141
142
|
return (React.createElement(PopoverContext.Provider, { value: { isTop: isTop } },
|
|
142
143
|
React.createElement(CSSTransition, __assign({ classNames: cnPopover({ animation: true }), timeout: 120 }, transitionProps, { "in": openState, onEnter: onEnter, onEntered: onEntered, onExit: onExit, onExited: onExited, unmountOnExit: true }),
|
|
143
|
-
React.createElement(Portal, __assign({}, other, { style: __assign(__assign({}, style), styles.popper), ref: portalRef, className: cnPopover({ disableInteractive: disableInteractive }, [className]) }, attributes.popper),
|
|
144
|
+
React.createElement(Portal, __assign({ as: POPOVER_DEFAULT_TAG, radius: "xs", shadow: "l", background: "main" }, other, { style: __assign(__assign({}, style), styles.popper), ref: portalRef, className: cnPopover({ disableInteractive: disableInteractive }, [className]) }, attributes.popper),
|
|
144
145
|
children,
|
|
145
|
-
arrow && (React.createElement(PopoverArrow, __assign({
|
|
146
|
+
arrow && (React.createElement(PopoverArrow, __assign({}, arrowProps, { style: __assign(__assign({}, arrowProps === null || arrowProps === void 0 ? void 0 : arrowProps.style), styles.arrow), "data-popper-arrow": true })))))));
|
|
146
147
|
});
|
|
147
148
|
Popover.displayName = 'Popover';
|
|
@@ -2,8 +2,8 @@ import { __assign, __rest } from "tslib";
|
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import { cnPopover } from '../Popover';
|
|
4
4
|
export var PopoverArrow = forwardRef(function (_a, ref) {
|
|
5
|
-
var _b = _a.size, size = _b === void 0 ? 's' : _b, className = _a.className, style = _a.style,
|
|
6
|
-
return (React.createElement("div", __assign({ className: cnPopover('Arrow', {
|
|
5
|
+
var _b = _a.size, size = _b === void 0 ? 's' : _b, className = _a.className, style = _a.style, other = __rest(_a, ["size", "className", "style"]);
|
|
6
|
+
return (React.createElement("div", __assign({ className: cnPopover('Arrow', { size: size }, [className]), style: style }, other, { ref: ref }), size === 'xs' ? (React.createElement("svg", { width: "6", height: "12", viewBox: "0 0 6 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
7
7
|
React.createElement("path", { d: "M6 12L6 0C6 0 6 1.5 4 3L1.06594 5.20054C0.532609 5.60054 0.532609 6.39946 1.06594 6.79946L4 9C6 10.5 6 12 6 12Z", fill: "currentColor" }))) : (React.createElement("svg", { width: "8", height: "16", viewBox: "0 0 8 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
8
8
|
React.createElement("path", { d: "M8 16L8 0C8 0 8 2 5.33333 4L2.13256 6.40058C1.06589 7.20058 1.06589 8.79942 2.13256 9.59942L5.33333 12C8 14 8 16 8 16Z", fill: "currentColor" })))));
|
|
9
9
|
});
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import type { HTMLAttributes, Ref } from 'react';
|
|
2
2
|
export declare const popoverArrowSizeVariant: readonly ["xs", "s"];
|
|
3
3
|
export type PopoverArrowSizeVariant = (typeof popoverArrowSizeVariant)[number];
|
|
4
|
-
export declare const popoverArrowVariant: readonly ["light", "dark"];
|
|
5
|
-
export type PopoverArrowVariant = (typeof popoverArrowVariant)[number];
|
|
6
4
|
export type PopoverArrowProps = {
|
|
7
5
|
size?: PopoverArrowSizeVariant;
|
|
8
|
-
variant?: PopoverArrowVariant;
|
|
9
6
|
className?: string;
|
|
10
7
|
ref?: Ref<HTMLDivElement>;
|
|
11
8
|
} & HTMLAttributes<HTMLDivElement> & {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const POPOVER_DEFAULT_TAG: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<import("../Paper").PaperBaseProps, "div">;
|
|
1
2
|
export declare const POPOVER_DEFAULT_ARROW = false;
|
|
2
3
|
export declare const POPOVER_DEFAULT_OPEN = false;
|
|
3
4
|
export declare const POPOVER_DEFAULT_DISABLE_INTERACTIVE = false;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { RefObject
|
|
1
|
+
import React, { ComponentRef, ElementType } from 'react';
|
|
2
|
+
import type { RefObject } from 'react';
|
|
3
3
|
import PopperJS from '@popperjs/core';
|
|
4
4
|
import type { CSSTransitionProps } from 'react-transition-group/CSSTransition';
|
|
5
|
+
import type { PolymorphicComponentPropsWithRef } from '../../utils/polymorphicComponentWithRef';
|
|
5
6
|
import type { PortalProps } from '../Portal';
|
|
6
7
|
import type { PopoverArrowProps } from './components';
|
|
8
|
+
import { POPOVER_DEFAULT_TAG } from './constants';
|
|
7
9
|
export type VirtualElement = {
|
|
8
10
|
getBoundingClientRect: () => DOMRect;
|
|
9
11
|
contextElement?: Element;
|
|
10
12
|
};
|
|
11
13
|
export declare const popoverPlacementVariant: readonly ["top-start", "top-end", "bottom-start", "bottom-end", "right-start", "right-end", "left-start", "left-end", "auto", "auto-start", "auto-end", "top", "bottom", "right", "left"];
|
|
12
14
|
export type PopoverPlacementVariant = (typeof popoverPlacementVariant)[number];
|
|
13
|
-
export type
|
|
15
|
+
export type PopoverBaseProps = {
|
|
14
16
|
/** Признак по которому компонент будет представлен */
|
|
15
17
|
open?: boolean;
|
|
16
18
|
/** Ссылка на элемент, относительно которого будет позиционироваться поповер */
|
|
@@ -67,4 +69,6 @@ export type PopoverProps = {
|
|
|
67
69
|
setUpdate?: (update: PopperJS.Instance['update'] | null) => void;
|
|
68
70
|
/** Контейнер для монтирования всплывающего окна */
|
|
69
71
|
container?: PortalProps['container'];
|
|
70
|
-
}
|
|
72
|
+
};
|
|
73
|
+
export type PopoverRef = ComponentRef<typeof POPOVER_DEFAULT_TAG>;
|
|
74
|
+
export type PopoverProps<As extends ElementType = typeof POPOVER_DEFAULT_TAG> = PolymorphicComponentPropsWithRef<PopoverBaseProps, As>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
declare const
|
|
4
|
-
export type PortalRef = ComponentRef<typeof
|
|
5
|
-
export type
|
|
1
|
+
import type { ComponentRef, ElementType } from 'react';
|
|
2
|
+
import { type PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphicComponentWithRef';
|
|
3
|
+
export declare const PORTAL_DEFAULT_TAG = "div";
|
|
4
|
+
export type PortalRef = ComponentRef<typeof PORTAL_DEFAULT_TAG>;
|
|
5
|
+
export type PortalBaseProps = {
|
|
6
6
|
/** Контейнер для монтирования портала */
|
|
7
7
|
container?: Element | DocumentFragment | null;
|
|
8
|
-
}
|
|
9
|
-
export
|
|
10
|
-
export
|
|
8
|
+
};
|
|
9
|
+
export type PortalProps<As extends ElementType = typeof PORTAL_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<PortalBaseProps, As>;
|
|
10
|
+
export declare const Portal: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<PortalBaseProps, "div">;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { __assign, __rest } from "tslib";
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import { useThemeProps } from '../../hooks/useThemeProps';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
export var
|
|
5
|
+
import { polymorphicComponentWithRef, } from '../../utils/polymorphicComponentWithRef';
|
|
6
|
+
import { useTheme, ThemeProvider } from '../ThemeProvider';
|
|
7
|
+
export var PORTAL_DEFAULT_TAG = 'div';
|
|
8
|
+
export var Portal = polymorphicComponentWithRef(function (inProps, ref) {
|
|
8
9
|
var _a = useThemeProps({
|
|
9
10
|
props: inProps,
|
|
10
11
|
name: 'Portal'
|
|
11
|
-
}), children = _a.children, container = _a.container, className = _a.className, other = __rest(_a, ["children", "container", "className"]);
|
|
12
|
+
}), children = _a.children, container = _a.container, className = _a.className, _b = _a.as, Tag = _b === void 0 ? PORTAL_DEFAULT_TAG : _b, other = __rest(_a, ["children", "container", "className", "as"]);
|
|
12
13
|
var theme = useTheme();
|
|
13
14
|
var portalContainer = container || window.document.body;
|
|
14
|
-
return createPortal(React.createElement(ThemeProvider, __assign({ theme: theme, className: className }, other, { ref: ref }), children), portalContainer);
|
|
15
|
+
return createPortal(React.createElement(ThemeProvider, __assign({ theme: theme, className: className, as: Tag }, other, { ref: ref }), children), portalContainer);
|
|
15
16
|
});
|
|
16
17
|
Portal.displayName = 'Portal';
|
|
@@ -7,4 +7,7 @@ export type SnackbarProviderProps = Partial<SnackbarProps> & SnackbarCommonProps
|
|
|
7
7
|
/** Максимальное количество одновременно отображенных сообщений */
|
|
8
8
|
maxMessages?: number;
|
|
9
9
|
};
|
|
10
|
-
export declare const SnackbarProvider: React.ForwardRefExoticComponent<
|
|
10
|
+
export declare const SnackbarProvider: React.ForwardRefExoticComponent<Partial<SnackbarProps> & SnackbarCommonProps & {
|
|
11
|
+
/** Максимальное количество одновременно отображенных сообщений */
|
|
12
|
+
maxMessages?: number | undefined;
|
|
13
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -8,4 +8,9 @@ export type SnackbarProps = PortalProps & {
|
|
|
8
8
|
/** Расположение сообщения относительно контейнера */
|
|
9
9
|
anchorOrigin: SnackbarAnchorOrigin;
|
|
10
10
|
};
|
|
11
|
-
export declare const Snackbar: React.ForwardRefExoticComponent<
|
|
11
|
+
export declare const Snackbar: React.ForwardRefExoticComponent<import("../../../Portal").PortalBaseProps & {
|
|
12
|
+
as?: "div" | undefined;
|
|
13
|
+
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "container"> & {
|
|
14
|
+
/** Расположение сообщения относительно контейнера */
|
|
15
|
+
anchorOrigin: SnackbarAnchorOrigin;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './ThemeProvider.css';
|
|
2
|
-
import React, { ElementType } from 'react';
|
|
2
|
+
import React, { ComponentRef, ElementType } from 'react';
|
|
3
3
|
import { type PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphicComponentWithRef';
|
|
4
4
|
import type { Theme } from './types';
|
|
5
5
|
export declare const THEME_DEFAULT_TAG = "div";
|
|
@@ -11,4 +11,5 @@ export type ThemeProviderBaseProps = {
|
|
|
11
11
|
};
|
|
12
12
|
export declare const cnThemeProvider: import("@bem-react/classname").ClassNameFormatter;
|
|
13
13
|
export type ThemeProviderProps<As extends ElementType = typeof THEME_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<ThemeProviderBaseProps, As>;
|
|
14
|
+
export type ThemeProviderRef = ComponentRef<typeof THEME_DEFAULT_TAG>;
|
|
14
15
|
export declare const ThemeProvider: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<ThemeProviderBaseProps, "div">;
|
|
@@ -27,6 +27,7 @@ import type { LoaderProps } from '../Loader';
|
|
|
27
27
|
import type { MenuProps, MenuItemProps, MenuListProps } from '../Menu';
|
|
28
28
|
import type { ModalProps } from '../Modal';
|
|
29
29
|
import type { PaginationProps } from '../Pagination';
|
|
30
|
+
import type { PaperProps } from '../Paper';
|
|
30
31
|
import type { PopoverProps } from '../Popover';
|
|
31
32
|
import type { PortalProps } from '../Portal';
|
|
32
33
|
import type { RadioProps } from '../Radio';
|
|
@@ -91,6 +92,7 @@ export type Theme = {
|
|
|
91
92
|
MenuList?: Partial<MenuListProps>;
|
|
92
93
|
Modal?: Partial<ModalProps>;
|
|
93
94
|
Pagination?: Partial<PaginationProps>;
|
|
95
|
+
Paper?: Partial<PaperProps>;
|
|
94
96
|
Popover?: Partial<PopoverProps>;
|
|
95
97
|
Portal?: Partial<PortalProps>;
|
|
96
98
|
Radio?: Partial<RadioProps>;
|
|
@@ -1,33 +1,28 @@
|
|
|
1
1
|
/* stylelint-disable */
|
|
2
|
-
.
|
|
2
|
+
.Tooltip {
|
|
3
3
|
max-inline-size: 300px;
|
|
4
|
-
box-shadow: var(--shadow-m);
|
|
5
4
|
}
|
|
6
|
-
.
|
|
7
|
-
|
|
8
|
-
color: var(--color-content-primary-inverse);
|
|
9
|
-
}
|
|
10
|
-
.Popover.Tooltip_variant_light {
|
|
11
|
-
background: var(--color-background-main);
|
|
12
|
-
color: var(--color-content-primary);
|
|
13
|
-
}
|
|
14
|
-
.Popover.Tooltip_size_xs {
|
|
15
|
-
padding: 8px 12px;
|
|
5
|
+
.Tooltip_size_xs {
|
|
6
|
+
padding: var(--space-s) var(--space-m);
|
|
16
7
|
|
|
17
8
|
font: var(--typography-text-xs-font);
|
|
18
9
|
|
|
19
10
|
letter-spacing: var(--typography-text-xs-letter_spacing, 0);
|
|
20
11
|
|
|
21
12
|
text-transform: var(--typography-text-xs-text_transform, none);
|
|
22
|
-
border-radius: var(--border-radius-s);
|
|
23
13
|
}
|
|
24
|
-
.
|
|
25
|
-
padding:
|
|
14
|
+
.Tooltip_size_s {
|
|
15
|
+
padding: var(--space-m) var(--space-l);
|
|
26
16
|
|
|
27
17
|
font: var(--typography-text-s-font);
|
|
28
18
|
|
|
29
19
|
letter-spacing: var(--typography-text-s-letter_spacing, 0);
|
|
30
20
|
|
|
31
21
|
text-transform: var(--typography-text-s-text_transform, none);
|
|
32
|
-
|
|
22
|
+
}
|
|
23
|
+
.Tooltip_variant_light {
|
|
24
|
+
color: var(--color-content-primary);
|
|
25
|
+
}
|
|
26
|
+
.Tooltip_variant_dark {
|
|
27
|
+
color: var(--color-content-primary-inverse);
|
|
33
28
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __assign, __read, __rest } from "tslib";
|
|
2
2
|
import './Tooltip.css';
|
|
3
|
-
import React, { forwardRef, useRef, useMemo, useState, useEffect } from 'react';
|
|
3
|
+
import React, { forwardRef, useRef, useMemo, useState, useEffect, } from 'react';
|
|
4
4
|
import { useControlled } from '../../hooks/useControlled';
|
|
5
5
|
import { useDebounceCallback } from '../../hooks/useDebounceCallback';
|
|
6
6
|
import { useMultiRef } from '../../hooks/useMultiRef';
|
|
7
7
|
import { useThemeProps } from '../../hooks/useThemeProps';
|
|
8
8
|
import { cn } from '../../utils/classname';
|
|
9
9
|
import { Popover } from '../Popover';
|
|
10
|
-
import { TOOLTIP_DEFAULT_ARROW, TOOLTIP_DEFAULT_DELAY_ENTER, TOOLTIP_DEFAULT_DELAY_LEAVE, TOOLTIP_DEFAULT_DISABLED, TOOLTIP_DEFAULT_OFFSET, TOOLTIP_DEFAULT_SHOULD_WRAP_CHILDREN, TOOLTIP_DEFAULT_SIZE, TOOLTIP_DEFAULT_TRIGGER, TOOLTIP_DEFAULT_VARIANT, } from './constants';
|
|
10
|
+
import { TOOLTIP_DEFAULT_ARROW, TOOLTIP_DEFAULT_DELAY_ENTER, TOOLTIP_DEFAULT_DELAY_LEAVE, TOOLTIP_DEFAULT_DISABLED, TOOLTIP_DEFAULT_OFFSET, TOOLTIP_DEFAULT_SHOULD_WRAP_CHILDREN, TOOLTIP_DEFAULT_SIZE, TOOLTIP_DEFAULT_TAG, TOOLTIP_DEFAULT_TRIGGER, TOOLTIP_DEFAULT_VARIANT, } from './constants';
|
|
11
11
|
export var cnTooltip = cn('Tooltip');
|
|
12
12
|
export var Tooltip = forwardRef(function (inProps, ref) {
|
|
13
13
|
var props = useThemeProps({ props: inProps, name: 'Tooltip' });
|
|
@@ -111,8 +111,7 @@ export var Tooltip = forwardRef(function (inProps, ref) {
|
|
|
111
111
|
]);
|
|
112
112
|
return (React.createElement(React.Fragment, null,
|
|
113
113
|
React.cloneElement(resolveChildren, composeChildrenProps),
|
|
114
|
-
React.createElement(Popover, __assign({ anchorRef: anchorRef }, other, { ref: ref, offset: offset, placement: placement, open: openState && !disabled, onClose: handleClose, className: cnTooltip({ size: size, variant: variant }, [className]), disableInteractive: disableInteractive, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, arrow: arrow, arrowProps: {
|
|
115
|
-
variant: variant,
|
|
114
|
+
React.createElement(Popover, __assign({ anchorRef: anchorRef, as: TOOLTIP_DEFAULT_TAG, background: variant === 'light' ? 'main' : 'main-inverse', radius: size }, other, { ref: ref, offset: offset, placement: placement, open: openState && !disabled, onClose: handleClose, className: cnTooltip({ size: size, variant: variant }, [className]), disableInteractive: disableInteractive, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, arrow: arrow, arrowProps: {
|
|
116
115
|
size: size
|
|
117
116
|
}, disableEnforceFocus: true, disableReturnFocus: true }), label)));
|
|
118
117
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const TOOLTIP_DEFAULT_TAG: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<import("../Paper").PaperBaseProps, "div">;
|
|
1
2
|
export declare const TOOLTIP_DEFAULT_TRIGGER = "hover";
|
|
2
3
|
export declare const TOOLTIP_DEFAULT_SIZE = "s";
|
|
3
4
|
export declare const TOOLTIP_DEFAULT_VARIANT = "dark";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Ref, ReactNode, ReactElement, ComponentPropsWithRef } from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PopoverBaseProps } from '../Popover';
|
|
3
|
+
import { TOOLTIP_DEFAULT_TAG } from './constants';
|
|
3
4
|
export declare const tooltipSizeVariant: readonly ["xs", "s"];
|
|
4
5
|
export type TooltipSizeVariant = (typeof tooltipSizeVariant)[number];
|
|
5
6
|
export declare const tooltipVariant: readonly ["light", "dark"];
|
|
@@ -39,4 +40,4 @@ export type TooltipProps = {
|
|
|
39
40
|
'data-testid'?: string;
|
|
40
41
|
/** Дополнительные CSS-классы */
|
|
41
42
|
className?: string;
|
|
42
|
-
} & Pick<
|
|
43
|
+
} & Pick<PopoverBaseProps, 'offset' | 'placement' | 'arrow' | 'anchorRef' | 'ignoreClickOutsideRefs' | 'disableInteractive' | 'onEnter' | 'onEntered' | 'onExit' | 'onExited' | 'setUpdate'> & ComponentPropsWithRef<typeof TOOLTIP_DEFAULT_TAG>;
|