@astral/ui 4.62.1-rc.1 → 4.62.1
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/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.d.ts +1 -1
- package/components/Autocomplete/styles.d.ts +1 -1
- package/components/CopyTypography/useLogic/useLogic.d.ts +2 -1
- package/components/Description/Value/styles.d.ts +2 -1
- package/components/HintIcon/HintIcon.d.ts +1 -1
- package/components/HintIcon/HintIcon.js +2 -2
- package/components/HintIcon/Icon/Icon.d.ts +1 -1
- package/components/HintIcon/Icon/Icon.js +2 -2
- package/components/HintIcon/types.d.ts +5 -1
- package/components/JsonViewer/NodeValue/styles.d.ts +6 -3
- package/components/MenuItem/MenuItem.js +4 -2
- package/components/MenuItem/constants.d.ts +3 -0
- package/components/MenuItem/constants.js +4 -0
- package/components/MenuItem/index.d.ts +1 -0
- package/components/MenuItem/index.js +1 -0
- package/components/MenuItem/public.d.ts +1 -0
- package/components/MenuItem/public.js +1 -0
- package/components/MenuOrganization/OrganizationItem/styles.d.ts +1 -1
- package/components/NavMenu/Item/ItemButton/styles.d.ts +2 -1
- package/components/OverflowTypography/OverflowTypography.d.ts +2 -1
- package/components/ProductSwitcher/Content/styles.d.ts +1 -1
- package/components/Profile/MenuList/styles.d.ts +1 -1
- package/components/Profile/constants.d.ts +1 -1
- package/components/Profile/constants.js +1 -1
- package/components/Profile/useLogic/useLogic.js +2 -1
- package/components/Select/styles.d.ts +1 -1
- package/components/TextField/styles.d.ts +1 -1
- package/components/Tooltip/Tooltip.js +11 -2
- package/components/Tooltip/constants.d.ts +4 -0
- package/components/Tooltip/constants.js +4 -0
- package/components/Tooltip/styles.js +23 -8
- package/components/Tooltip/types.d.ts +5 -0
- package/components/Tooltip/useLogic/useLogic.d.ts +4 -4
- package/components/Tooltip/useLogic/useLogic.js +7 -1
- package/components/Tree/TreeItem/styles.d.ts +2 -1
- package/components/fileUploading/FileInfo/styles.d.ts +2 -1
- package/node/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.d.ts +1 -1
- package/node/components/Autocomplete/styles.d.ts +1 -1
- package/node/components/CopyTypography/useLogic/useLogic.d.ts +2 -1
- package/node/components/Description/Value/styles.d.ts +2 -1
- package/node/components/HintIcon/HintIcon.d.ts +1 -1
- package/node/components/HintIcon/HintIcon.js +2 -2
- package/node/components/HintIcon/Icon/Icon.d.ts +1 -1
- package/node/components/HintIcon/Icon/Icon.js +2 -2
- package/node/components/HintIcon/types.d.ts +5 -1
- package/node/components/JsonViewer/NodeValue/styles.d.ts +6 -3
- package/node/components/MenuItem/MenuItem.js +4 -2
- package/node/components/MenuItem/constants.d.ts +3 -0
- package/node/components/MenuItem/constants.js +7 -0
- package/node/components/MenuItem/index.d.ts +1 -0
- package/node/components/MenuItem/index.js +3 -0
- package/node/components/MenuItem/public.d.ts +1 -0
- package/node/components/MenuItem/public.js +3 -0
- package/node/components/MenuOrganization/OrganizationItem/styles.d.ts +1 -1
- package/node/components/NavMenu/Item/ItemButton/styles.d.ts +2 -1
- package/node/components/OverflowTypography/OverflowTypography.d.ts +2 -1
- package/node/components/ProductSwitcher/Content/styles.d.ts +1 -1
- package/node/components/Profile/MenuList/styles.d.ts +1 -1
- package/node/components/Profile/constants.d.ts +1 -1
- package/node/components/Profile/constants.js +1 -1
- package/node/components/Profile/useLogic/useLogic.js +2 -1
- package/node/components/Select/styles.d.ts +1 -1
- package/node/components/TextField/styles.d.ts +1 -1
- package/node/components/Tooltip/Tooltip.js +11 -2
- package/node/components/Tooltip/constants.d.ts +4 -0
- package/node/components/Tooltip/constants.js +4 -0
- package/node/components/Tooltip/styles.js +25 -30
- package/node/components/Tooltip/types.d.ts +5 -0
- package/node/components/Tooltip/useLogic/useLogic.d.ts +4 -4
- package/node/components/Tooltip/useLogic/useLogic.js +7 -1
- package/node/components/Tree/TreeItem/styles.d.ts +2 -1
- package/node/components/fileUploading/FileInfo/styles.d.ts +2 -1
- package/package.json +1 -1
|
@@ -321,6 +321,7 @@ export declare const StyledCopyTypography: import("@emotion/styled/dist/declarat
|
|
|
321
321
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
322
322
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
323
323
|
open?: boolean | undefined;
|
|
324
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
324
325
|
size?: import("../..").TooltipSize | undefined;
|
|
325
326
|
componentsProps?: {
|
|
326
327
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -358,7 +359,7 @@ export declare const StyledCopyTypography: import("@emotion/styled/dist/declarat
|
|
|
358
359
|
leaveDelay?: number | undefined;
|
|
359
360
|
leaveTouchDelay?: number | undefined;
|
|
360
361
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
361
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
362
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
362
363
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
363
364
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
364
365
|
withoutContainer?: boolean | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type HintIconProps } from './types';
|
|
2
|
-
export declare const HintIcon: ({ variant, title, note, iconOption, tooltipPlacement, renderIcon, }: HintIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const HintIcon: ({ variant, title, note, iconOption, tooltipPlacement, renderIcon, tooltipWidth, }: HintIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,8 +6,8 @@ const BottomDrawer_1 = require("../BottomDrawer");
|
|
|
6
6
|
const Icon_1 = require("./Icon");
|
|
7
7
|
const styles_1 = require("./styles");
|
|
8
8
|
const useLogic_1 = require("./useLogic");
|
|
9
|
-
const HintIcon = ({ variant, title, note, iconOption, tooltipPlacement = 'bottom', renderIcon, }) => {
|
|
9
|
+
const HintIcon = ({ variant, title, note, iconOption, tooltipPlacement = 'bottom', renderIcon, tooltipWidth, }) => {
|
|
10
10
|
const { handleClose, handleOpen, open } = (0, useLogic_1.useLogic)();
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Icon_1.Icon, { onClick: handleOpen, variant: variant, iconOption: iconOption, note: note, tooltipPlacement: tooltipPlacement, renderIcon: renderIcon }), (0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { title: title, open: open, onClose: handleClose, children: (0, jsx_runtime_1.jsx)(styles_1.DrawerContent, { children: note }) })] }));
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Icon_1.Icon, { onClick: handleOpen, variant: variant, iconOption: iconOption, note: note, tooltipPlacement: tooltipPlacement, renderIcon: renderIcon, tooltipWidth: tooltipWidth }), (0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { title: title, open: open, onClose: handleClose, children: (0, jsx_runtime_1.jsx)(styles_1.DrawerContent, { children: note }) })] }));
|
|
12
12
|
};
|
|
13
13
|
exports.HintIcon = HintIcon;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SyntheticEvent } from 'react';
|
|
2
2
|
import type { HintIconProps, TooltipPlacement } from '../types';
|
|
3
|
-
export type IconProps = Pick<HintIconProps, 'variant' | 'iconOption' | 'note' | 'renderIcon'> & {
|
|
3
|
+
export type IconProps = Pick<HintIconProps, 'variant' | 'iconOption' | 'note' | 'renderIcon' | 'tooltipWidth'> & {
|
|
4
4
|
onClick: (e: SyntheticEvent) => void;
|
|
5
5
|
tooltipPlacement: TooltipPlacement;
|
|
6
6
|
};
|
|
@@ -8,7 +8,7 @@ const styles_1 = require("./styles");
|
|
|
8
8
|
const useLogic_1 = require("./useLogic");
|
|
9
9
|
const Icon = (props) => {
|
|
10
10
|
const { getIcon, iconColor } = (0, useLogic_1.useLogic)(props);
|
|
11
|
-
const { onClick, note, tooltipPlacement } = props;
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: note, placement: tooltipPlacement, children: (0, jsx_runtime_1.jsx)(styles_1.IconWrapper, { onClick: onClick, "$color": iconColor, className: constants_1.hintIconClassnames.iconWrapper, children: getIcon() }) }));
|
|
11
|
+
const { onClick, note, tooltipPlacement, tooltipWidth } = props;
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: note, placement: tooltipPlacement, width: tooltipWidth, children: (0, jsx_runtime_1.jsx)(styles_1.IconWrapper, { onClick: onClick, "$color": iconColor, className: constants_1.hintIconClassnames.iconWrapper, children: getIcon() }) }));
|
|
13
13
|
};
|
|
14
14
|
exports.Icon = Icon;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
2
|
export type TooltipPlacement = 'left' | 'top' | 'right' | 'bottom';
|
|
3
3
|
export type HintIconProps = {
|
|
4
4
|
/**
|
|
@@ -36,4 +36,8 @@ export type HintIconProps = {
|
|
|
36
36
|
* Задание кастомной иконки
|
|
37
37
|
*/
|
|
38
38
|
renderIcon?: () => ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Задает ширину тултипа
|
|
41
|
+
*/
|
|
42
|
+
tooltipWidth?: CSSProperties['width'];
|
|
39
43
|
};
|
|
@@ -290,6 +290,7 @@ export declare const Value: import("@emotion/styled/dist/declarations/src/types"
|
|
|
290
290
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
291
291
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
292
292
|
open?: boolean | undefined;
|
|
293
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
293
294
|
size?: import("../..").TooltipSize | undefined;
|
|
294
295
|
componentsProps?: {
|
|
295
296
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -327,7 +328,7 @@ export declare const Value: import("@emotion/styled/dist/declarations/src/types"
|
|
|
327
328
|
leaveDelay?: number | undefined;
|
|
328
329
|
leaveTouchDelay?: number | undefined;
|
|
329
330
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
330
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
331
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
331
332
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
332
333
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
333
334
|
withoutContainer?: boolean | undefined;
|
|
@@ -651,6 +652,7 @@ export declare const CopyWrapper: import("@emotion/styled/dist/declarations/src/
|
|
|
651
652
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
652
653
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
653
654
|
open?: boolean | undefined;
|
|
655
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
654
656
|
size?: import("../..").TooltipSize | undefined;
|
|
655
657
|
componentsProps?: {
|
|
656
658
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -688,7 +690,7 @@ export declare const CopyWrapper: import("@emotion/styled/dist/declarations/src/
|
|
|
688
690
|
leaveDelay?: number | undefined;
|
|
689
691
|
leaveTouchDelay?: number | undefined;
|
|
690
692
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
691
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
693
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
692
694
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
693
695
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
694
696
|
withoutContainer?: boolean | undefined;
|
|
@@ -988,6 +990,7 @@ export declare const GuidValue: import("@emotion/styled/dist/declarations/src/ty
|
|
|
988
990
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
989
991
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
990
992
|
open?: boolean | undefined;
|
|
993
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
991
994
|
size?: import("../..").TooltipSize | undefined;
|
|
992
995
|
componentsProps?: {
|
|
993
996
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -1025,7 +1028,7 @@ export declare const GuidValue: import("@emotion/styled/dist/declarations/src/ty
|
|
|
1025
1028
|
leaveDelay?: number | undefined;
|
|
1026
1029
|
leaveTouchDelay?: number | undefined;
|
|
1027
1030
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
1028
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
1031
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
1029
1032
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
1030
1033
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
1031
1034
|
withoutContainer?: boolean | undefined;
|
|
@@ -8,8 +8,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
8
8
|
const MenuItem_1 = __importDefault(require("@mui/material/MenuItem"));
|
|
9
9
|
const forwardRefWithGeneric_1 = require("../forwardRefWithGeneric");
|
|
10
10
|
const Tooltip_1 = require("../Tooltip");
|
|
11
|
+
const classNames_1 = require("../utils/classNames");
|
|
12
|
+
const constants_1 = require("./constants");
|
|
11
13
|
const InnerMenuItem = (props, ref) => {
|
|
12
|
-
const { disabledReason, disabled, component = 'div', title, tooltipPlacement = 'left', note, ...rest } = props;
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: disabled ? disabledReason : note, placement: tooltipPlacement, withoutContainer: !disabled, children: (0, jsx_runtime_1.jsx)(MenuItem_1.default, { ...rest, disabled: disabled, title: title, ref: ref, component: component }) }, title) }));
|
|
14
|
+
const { disabledReason, disabled, component = 'div', title, tooltipPlacement = 'left', note, className, ...rest } = props;
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: disabled ? disabledReason : note, placement: tooltipPlacement, withoutContainer: !disabled, children: (0, jsx_runtime_1.jsx)(MenuItem_1.default, { className: (0, classNames_1.classNames)(constants_1.menuItemClassnames.root, className), ...rest, disabled: disabled, title: title, ref: ref, component: component }) }, title) }));
|
|
14
16
|
};
|
|
15
17
|
exports.MenuItem = (0, forwardRefWithGeneric_1.forwardRefWithGeneric)(InnerMenuItem);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.menuItemClassnames = void 0;
|
|
4
|
+
const createUIKitClassname_1 = require("../utils/createUIKitClassname");
|
|
5
|
+
exports.menuItemClassnames = {
|
|
6
|
+
root: (0, createUIKitClassname_1.createUIKitClassname)('menu-item'),
|
|
7
|
+
};
|
|
@@ -14,4 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.menuItemClassnames = void 0;
|
|
17
18
|
__exportStar(require("./MenuItem"), exports);
|
|
19
|
+
var constants_1 = require("./constants");
|
|
20
|
+
Object.defineProperty(exports, "menuItemClassnames", { enumerable: true, get: function () { return constants_1.menuItemClassnames; } });
|
|
@@ -14,4 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.menuItemClassnames = void 0;
|
|
18
|
+
var constants_1 = require("./constants");
|
|
19
|
+
Object.defineProperty(exports, "menuItemClassnames", { enumerable: true, get: function () { return constants_1.menuItemClassnames; } });
|
|
17
20
|
__exportStar(require("./MenuItem"), exports);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare const StyledMenuItem: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("../..").WithoutEmotionSpecific<Omit<import("@mui/material/MenuItem").MenuItemProps, "component">> & {
|
|
3
3
|
disabledReason?: string | undefined;
|
|
4
4
|
note?: string | undefined;
|
|
5
|
-
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "
|
|
5
|
+
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
6
6
|
component?: import("react").ElementType | undefined;
|
|
7
7
|
href?: string | undefined;
|
|
8
8
|
} & import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement> & {
|
|
@@ -579,6 +579,7 @@ export declare const NavMenuItemButtonText: import("@emotion/styled/dist/declara
|
|
|
579
579
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
580
580
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
581
581
|
open?: boolean | undefined;
|
|
582
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
582
583
|
size?: import("../../..").TooltipSize | undefined;
|
|
583
584
|
componentsProps?: {
|
|
584
585
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -616,7 +617,7 @@ export declare const NavMenuItemButtonText: import("@emotion/styled/dist/declara
|
|
|
616
617
|
leaveDelay?: number | undefined;
|
|
617
618
|
leaveTouchDelay?: number | undefined;
|
|
618
619
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
619
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
620
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
620
621
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
621
622
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
622
623
|
withoutContainer?: boolean | undefined;
|
|
@@ -291,6 +291,7 @@ export declare const OverflowTypography: import("react").ForwardRefExoticCompone
|
|
|
291
291
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
292
292
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
293
293
|
open?: boolean | undefined;
|
|
294
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
294
295
|
size?: import("../Tooltip").TooltipSize | undefined;
|
|
295
296
|
componentsProps?: {
|
|
296
297
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -328,7 +329,7 @@ export declare const OverflowTypography: import("react").ForwardRefExoticCompone
|
|
|
328
329
|
leaveDelay?: number | undefined;
|
|
329
330
|
leaveTouchDelay?: number | undefined;
|
|
330
331
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
331
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
332
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
332
333
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
333
334
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
334
335
|
withoutContainer?: boolean | undefined;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare const ProductItem: <TComponent extends import("react").ElementType>(props: import("../..").WithoutEmotionSpecific<Omit<import("@mui/material/MenuItem").MenuItemProps, "component">> & {
|
|
3
3
|
disabledReason?: string | undefined;
|
|
4
4
|
note?: string | undefined;
|
|
5
|
-
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "
|
|
5
|
+
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
6
6
|
component?: TComponent | undefined;
|
|
7
7
|
href?: string | undefined;
|
|
8
8
|
} & import("react").ComponentPropsWithRef<import("react").ElementType extends TComponent ? "li" : TComponent> & import("react").RefAttributes<HTMLLIElement>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
|
|
@@ -7,7 +7,7 @@ export declare const StyledMenu: import("@emotion/styled/dist/declarations/src/t
|
|
|
7
7
|
export declare const ExitMenuItem: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("../..").WithoutEmotionSpecific<Omit<import("@mui/material").MenuItemProps, "component">> & {
|
|
8
8
|
disabledReason?: string | undefined;
|
|
9
9
|
note?: string | undefined;
|
|
10
|
-
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "
|
|
10
|
+
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
11
11
|
component?: import("react").ElementType | undefined;
|
|
12
12
|
href?: string | undefined;
|
|
13
13
|
} & import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement> & {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.profileClassnames = exports.PROFILE_POPOVER_ID = void 0;
|
|
4
4
|
const createUIKitClassname_1 = require("../utils/createUIKitClassname");
|
|
5
|
-
exports.PROFILE_POPOVER_ID = 'profile-popover';
|
|
5
|
+
exports.PROFILE_POPOVER_ID = 'astral-ui-profile-popover';
|
|
6
6
|
exports.profileClassnames = {
|
|
7
7
|
credentials: (0, createUIKitClassname_1.createUIKitClassname)('profile__credentials'),
|
|
8
8
|
button: (0, createUIKitClassname_1.createUIKitClassname)('profile__button'),
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useLogic = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
+
const MenuItem_1 = require("../../MenuItem");
|
|
5
6
|
const personalDataSecurity_1 = require("../../personalDataSecurity");
|
|
6
7
|
const ErrorService_1 = require("../../services/ErrorService");
|
|
7
8
|
const useMenu_1 = require("../../useMenu");
|
|
@@ -15,7 +16,7 @@ const useLogic = ({ menuList, menu: Menu, exitButton, isHidePersonalData, }) =>
|
|
|
15
16
|
const observer = new MutationObserver((_, obs) => {
|
|
16
17
|
const popover = document.getElementById(constants_1.PROFILE_POPOVER_ID);
|
|
17
18
|
if (popover) {
|
|
18
|
-
const menuItems = popover.querySelectorAll(
|
|
19
|
+
const menuItems = popover.querySelectorAll(`.${MenuItem_1.menuItemClassnames.root}`);
|
|
19
20
|
if (menuItems.length > 0) {
|
|
20
21
|
menuItems.forEach((item) => {
|
|
21
22
|
item.onclick = handleCloseMenu;
|
|
@@ -10,7 +10,7 @@ export declare const EndAdornmentWrapper: import("@emotion/styled/dist/declarati
|
|
|
10
10
|
export declare const Placeholder: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("..").WithoutEmotionSpecific<Omit<import("@mui/material").MenuItemProps, "component">> & {
|
|
11
11
|
disabledReason?: string | undefined;
|
|
12
12
|
note?: string | undefined;
|
|
13
|
-
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "
|
|
13
|
+
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
14
14
|
component?: import("react").ElementType | undefined;
|
|
15
15
|
href?: string | undefined;
|
|
16
16
|
} & import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const StyledTextField: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
2
2
|
variant?: import("@mui/material/TextField").TextFieldVariants | undefined;
|
|
3
|
-
} & Omit<import("@mui/material/TextField").OutlinedTextFieldProps | import("@mui/material/TextField").
|
|
3
|
+
} & Omit<import("@mui/material/TextField").OutlinedTextFieldProps | import("@mui/material/TextField").FilledTextFieldProps | import("@mui/material/TextField").StandardTextFieldProps, "variant"> & {
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
}, {}, {}>;
|
|
@@ -3,10 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Tooltip = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const classNames_1 = require("../utils/classNames");
|
|
7
|
+
const cva_1 = require("../utils/cva");
|
|
6
8
|
const constants_1 = require("./constants");
|
|
7
9
|
const styles_1 = require("./styles");
|
|
8
10
|
const useLogic_1 = require("./useLogic");
|
|
11
|
+
const tooltipCva = (0, cva_1.cva)(constants_1.tooltipClassnames.root, {
|
|
12
|
+
variants: {
|
|
13
|
+
withoutMaxWidth: {
|
|
14
|
+
true: constants_1.tooltipClassnames.withoutMaxWidth,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
});
|
|
9
18
|
exports.Tooltip = (0, react_1.forwardRef)((props, ref) => {
|
|
10
|
-
const { title, placement = 'top', size = 'medium', withoutContainer = true, children, className, ...restProps } = (0, useLogic_1.useLogic)(props);
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.StyledTooltip, { ref: ref, title: title, size: size, placement: placement, arrow: true, className: className, ...restProps, children: withoutContainer ? (children) : ((0, jsx_runtime_1.jsx)(styles_1.ContentWrapper, { className: constants_1.tooltipClassnames.contentWrapper, children: children })) }));
|
|
19
|
+
const { title, placement = 'top', size = 'medium', withoutContainer = true, children, className, tooltipStyle, width, ...restProps } = (0, useLogic_1.useLogic)(props);
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.StyledTooltip, { ref: ref, title: title, size: size, placement: placement, arrow: true, className: (0, classNames_1.classNames)(className, tooltipCva({ withoutMaxWidth: Boolean(width) })), style: tooltipStyle, ...restProps, children: withoutContainer ? (children) : ((0, jsx_runtime_1.jsx)(styles_1.ContentWrapper, { className: constants_1.tooltipClassnames.contentWrapper, children: children })) }));
|
|
12
21
|
});
|
|
@@ -3,5 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.tooltipClassnames = void 0;
|
|
4
4
|
const createUIKitClassname_1 = require("../utils/createUIKitClassname");
|
|
5
5
|
exports.tooltipClassnames = {
|
|
6
|
+
root: (0, createUIKitClassname_1.createUIKitClassname)('tooltip'),
|
|
6
7
|
contentWrapper: (0, createUIKitClassname_1.createUIKitClassname)('tooltip__content-wrapper'),
|
|
8
|
+
withoutMaxWidth: (0, createUIKitClassname_1.createUIKitClassname)('tooltip_without-max-width'),
|
|
9
|
+
tooltipLabel: (0, createUIKitClassname_1.createUIKitClassname)('tooltip__label'),
|
|
10
|
+
arrow: (0, createUIKitClassname_1.createUIKitClassname)('tooltip__arrow'),
|
|
7
11
|
};
|
|
@@ -1,34 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
4
|
};
|
|
25
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
6
|
exports.ContentWrapper = exports.StyledTooltip = void 0;
|
|
27
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
-
const Tooltip_1 =
|
|
8
|
+
const Tooltip_1 = __importDefault(require("@mui/material/Tooltip"));
|
|
29
9
|
const styled_1 = require("../styled");
|
|
30
|
-
|
|
31
|
-
|
|
10
|
+
const constants_1 = require("./constants");
|
|
11
|
+
exports.StyledTooltip = (0, styled_1.styled)(({ className, style, ...props }) => ((0, jsx_runtime_1.jsx)(Tooltip_1.default, { ...props, PopperProps: { ...props.PopperProps, style }, classes: {
|
|
12
|
+
...props.classes,
|
|
13
|
+
popper: className,
|
|
14
|
+
tooltip: constants_1.tooltipClassnames.tooltipLabel,
|
|
15
|
+
arrow: constants_1.tooltipClassnames.arrow,
|
|
16
|
+
} }))) `
|
|
17
|
+
--tooltip-width: 0;
|
|
18
|
+
|
|
19
|
+
&.${constants_1.tooltipClassnames.withoutMaxWidth} {
|
|
20
|
+
& .${constants_1.tooltipClassnames.tooltipLabel} {
|
|
21
|
+
width: var(--tooltip-width);
|
|
22
|
+
max-width: none;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
& .${constants_1.tooltipClassnames.tooltipLabel} {
|
|
32
27
|
margin: 0;
|
|
33
28
|
|
|
34
29
|
font-size: ${({ size, theme }) => size === 'small'
|
|
@@ -44,24 +39,24 @@ exports.StyledTooltip = (0, styled_1.styled)(({ className, ...props }) => ((0, j
|
|
|
44
39
|
border-radius: ${({ theme }) => theme.shape.small};
|
|
45
40
|
}
|
|
46
41
|
|
|
47
|
-
& .${
|
|
42
|
+
& .${constants_1.tooltipClassnames.arrow} {
|
|
48
43
|
font-size: ${({ theme }) => theme.typography.caption.fontSize};
|
|
49
44
|
color: ${({ theme }) => theme.palette.grey[900]};
|
|
50
45
|
}
|
|
51
46
|
|
|
52
|
-
&&[data-popper-placement*='top'] .${
|
|
47
|
+
&&[data-popper-placement*='top'] .${constants_1.tooltipClassnames.tooltipLabel} {
|
|
53
48
|
margin-bottom: ${({ theme }) => theme.spacing(2)};
|
|
54
49
|
}
|
|
55
50
|
|
|
56
|
-
&&[data-popper-placement*='bottom'] .${
|
|
51
|
+
&&[data-popper-placement*='bottom'] .${constants_1.tooltipClassnames.tooltipLabel} {
|
|
57
52
|
margin-top: ${({ theme }) => theme.spacing(2)};
|
|
58
53
|
}
|
|
59
54
|
|
|
60
|
-
&&[data-popper-placement*='left'] .${
|
|
55
|
+
&&[data-popper-placement*='left'] .${constants_1.tooltipClassnames.tooltipLabel} {
|
|
61
56
|
margin-right: ${({ theme }) => theme.spacing(2)};
|
|
62
57
|
}
|
|
63
58
|
|
|
64
|
-
&&[data-popper-placement*='right'] .${
|
|
59
|
+
&&[data-popper-placement*='right'] .${constants_1.tooltipClassnames.tooltipLabel} {
|
|
65
60
|
margin-left: ${({ theme }) => theme.spacing(2)};
|
|
66
61
|
}
|
|
67
62
|
`;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type TooltipProps as MuiTooltipProps } from '@mui/material/Tooltip';
|
|
2
|
+
import { type CSSProperties } from 'react';
|
|
2
3
|
import { type WithoutEmotionSpecific } from '../types/WithoutEmotionSpecific';
|
|
3
4
|
export type TooltipSize = 'small' | 'medium';
|
|
4
5
|
export type TooltipProps = WithoutEmotionSpecific<MuiTooltipProps> & {
|
|
@@ -12,4 +13,8 @@ export type TooltipProps = WithoutEmotionSpecific<MuiTooltipProps> & {
|
|
|
12
13
|
* @example <Tooltip withoutContainer={false} ...><Button disabled></Tooltip>
|
|
13
14
|
*/
|
|
14
15
|
withoutContainer?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Задает ширину тултипа и снимает ограничение на максимальную ширину
|
|
18
|
+
*/
|
|
19
|
+
width?: CSSProperties['width'];
|
|
15
20
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="react" />
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
3
2
|
import { type TooltipProps } from '../types';
|
|
4
3
|
export declare const useLogic: (props: TooltipProps) => {
|
|
5
4
|
components?: {
|
|
@@ -27,7 +26,6 @@ export declare const useLogic: (props: TooltipProps) => {
|
|
|
27
26
|
nonce?: string | undefined;
|
|
28
27
|
slot?: string | undefined;
|
|
29
28
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
30
|
-
style?: import("react").CSSProperties | undefined;
|
|
31
29
|
tabIndex?: number | undefined;
|
|
32
30
|
title: import("react").ReactNode;
|
|
33
31
|
translate?: "yes" | "no" | undefined;
|
|
@@ -325,11 +323,13 @@ export declare const useLogic: (props: TooltipProps) => {
|
|
|
325
323
|
leaveDelay?: number | undefined;
|
|
326
324
|
leaveTouchDelay?: number | undefined;
|
|
327
325
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
328
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
326
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
329
327
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
330
328
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
331
329
|
size?: import("../types").TooltipSize | undefined;
|
|
332
330
|
withoutContainer?: boolean | undefined;
|
|
333
331
|
children: import("react").ReactElement<any, any>;
|
|
334
332
|
className: string;
|
|
333
|
+
tooltipStyle: CSSProperties;
|
|
334
|
+
width: import("csstype").Property.Width<string | number> | undefined;
|
|
335
335
|
};
|
|
@@ -4,16 +4,22 @@ exports.useLogic = void 0;
|
|
|
4
4
|
const personalDataSecurity_1 = require("../../personalDataSecurity");
|
|
5
5
|
const classNames_1 = require("../../utils/classNames");
|
|
6
6
|
const useLogic = (props) => {
|
|
7
|
-
const { children, className: propClassName, ...restProps } = props;
|
|
7
|
+
const { children, className: propClassName, width, style, ...restProps } = props;
|
|
8
8
|
const hidePersonalDataClassName = (0, personalDataSecurity_1.useHidePersonalData)({
|
|
9
9
|
type: 'container',
|
|
10
10
|
});
|
|
11
11
|
const className = (0, classNames_1.classNames)(propClassName, {
|
|
12
12
|
[hidePersonalDataClassName]: children.props.className?.includes(hidePersonalDataClassName),
|
|
13
13
|
});
|
|
14
|
+
const tooltipStyle = {
|
|
15
|
+
'--tooltip-width': width,
|
|
16
|
+
...style,
|
|
17
|
+
};
|
|
14
18
|
return {
|
|
15
19
|
children,
|
|
16
20
|
className,
|
|
21
|
+
tooltipStyle,
|
|
22
|
+
width,
|
|
17
23
|
...restProps,
|
|
18
24
|
};
|
|
19
25
|
};
|
|
@@ -341,6 +341,7 @@ export declare const Note: import("@emotion/styled/dist/declarations/src/types")
|
|
|
341
341
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
342
342
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
343
343
|
open?: boolean | undefined;
|
|
344
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
344
345
|
size?: import("../..").TooltipSize | undefined;
|
|
345
346
|
componentsProps?: {
|
|
346
347
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -378,7 +379,7 @@ export declare const Note: import("@emotion/styled/dist/declarations/src/types")
|
|
|
378
379
|
leaveDelay?: number | undefined;
|
|
379
380
|
leaveTouchDelay?: number | undefined;
|
|
380
381
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
381
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
382
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
382
383
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
383
384
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
384
385
|
withoutContainer?: boolean | undefined;
|
|
@@ -295,6 +295,7 @@ export declare const StyledFilename: import("@emotion/styled/dist/declarations/s
|
|
|
295
295
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
296
296
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
297
297
|
open?: boolean | undefined;
|
|
298
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
298
299
|
size?: import("../..").TooltipSize | undefined;
|
|
299
300
|
componentsProps?: {
|
|
300
301
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -332,7 +333,7 @@ export declare const StyledFilename: import("@emotion/styled/dist/declarations/s
|
|
|
332
333
|
leaveDelay?: number | undefined;
|
|
333
334
|
leaveTouchDelay?: number | undefined;
|
|
334
335
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
335
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
336
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
336
337
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
337
338
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
338
339
|
withoutContainer?: boolean | undefined;
|