@astral/ui 4.62.1-rc.1 → 4.62.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/ToggleButton/styles.js +19 -15
- 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/ToggleButton/styles.js +19 -15
- 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
|
@@ -315,7 +315,7 @@ export declare const useMainActions: <TMainActionComponent extends ElementType>(
|
|
|
315
315
|
divider?: boolean | undefined;
|
|
316
316
|
disabledReason?: string | undefined;
|
|
317
317
|
note?: string | undefined;
|
|
318
|
-
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "
|
|
318
|
+
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
319
319
|
component?: ElementType | undefined;
|
|
320
320
|
href?: string | undefined;
|
|
321
321
|
css?: import("@emotion/serialize").Interpolation<import("@emotion/react").Theme>;
|
|
@@ -3,7 +3,7 @@ import MuiAutocomplete from '@mui/material/Autocomplete';
|
|
|
3
3
|
export declare const StyledMenuItem: import("../styled").StyledComponent<import("..").WithoutEmotionSpecific<Omit<import("@mui/material").MenuItemProps, "component">> & {
|
|
4
4
|
disabledReason?: string | undefined;
|
|
5
5
|
note?: string | undefined;
|
|
6
|
-
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "
|
|
6
|
+
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
7
7
|
component?: import("react").ElementType | undefined;
|
|
8
8
|
href?: string | undefined;
|
|
9
9
|
} & import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement> & {
|
|
@@ -589,6 +589,7 @@ export declare const useLogic: ({ children, copyPosition, copyText, isShowCopyTe
|
|
|
589
589
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
590
590
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
591
591
|
open?: boolean | undefined;
|
|
592
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
592
593
|
size?: import("../..").TooltipSize | undefined;
|
|
593
594
|
componentsProps?: {
|
|
594
595
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -626,7 +627,7 @@ export declare const useLogic: ({ children, copyPosition, copyText, isShowCopyTe
|
|
|
626
627
|
leaveDelay?: number | undefined;
|
|
627
628
|
leaveTouchDelay?: number | undefined;
|
|
628
629
|
onOpen?: ((event: SyntheticEvent<Element, Event>) => void) | undefined;
|
|
629
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
630
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
630
631
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
631
632
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
632
633
|
withoutContainer?: boolean | undefined;
|
|
@@ -321,6 +321,7 @@ export declare const StyledCopyTypography: import("../../styled").StyledComponen
|
|
|
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("../../styled").StyledComponen
|
|
|
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;
|
|
@@ -3,7 +3,7 @@ import { BottomDrawer } from '../BottomDrawer';
|
|
|
3
3
|
import { Icon } from './Icon';
|
|
4
4
|
import { DrawerContent } from './styles';
|
|
5
5
|
import { useLogic } from './useLogic';
|
|
6
|
-
export const HintIcon = ({ variant, title, note, iconOption, tooltipPlacement = 'bottom', renderIcon, }) => {
|
|
6
|
+
export const HintIcon = ({ variant, title, note, iconOption, tooltipPlacement = 'bottom', renderIcon, tooltipWidth, }) => {
|
|
7
7
|
const { handleClose, handleOpen, open } = useLogic();
|
|
8
|
-
return (_jsxs(_Fragment, { children: [_jsx(Icon, { onClick: handleOpen, variant: variant, iconOption: iconOption, note: note, tooltipPlacement: tooltipPlacement, renderIcon: renderIcon }), _jsx(BottomDrawer, { title: title, open: open, onClose: handleClose, children: _jsx(DrawerContent, { children: note }) })] }));
|
|
8
|
+
return (_jsxs(_Fragment, { children: [_jsx(Icon, { onClick: handleOpen, variant: variant, iconOption: iconOption, note: note, tooltipPlacement: tooltipPlacement, renderIcon: renderIcon, tooltipWidth: tooltipWidth }), _jsx(BottomDrawer, { title: title, open: open, onClose: handleClose, children: _jsx(DrawerContent, { children: note }) })] }));
|
|
9
9
|
};
|
|
@@ -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
|
};
|
|
@@ -5,6 +5,6 @@ import { IconWrapper } from './styles';
|
|
|
5
5
|
import { useLogic } from './useLogic';
|
|
6
6
|
export const Icon = (props) => {
|
|
7
7
|
const { getIcon, iconColor } = useLogic(props);
|
|
8
|
-
const { onClick, note, tooltipPlacement } = props;
|
|
9
|
-
return (_jsx(Tooltip, { title: note, placement: tooltipPlacement, children: _jsx(IconWrapper, { onClick: onClick, "$color": iconColor, className: hintIconClassnames.iconWrapper, children: getIcon() }) }));
|
|
8
|
+
const { onClick, note, tooltipPlacement, tooltipWidth } = props;
|
|
9
|
+
return (_jsx(Tooltip, { title: note, placement: tooltipPlacement, width: tooltipWidth, children: _jsx(IconWrapper, { onClick: onClick, "$color": iconColor, className: hintIconClassnames.iconWrapper, children: getIcon() }) }));
|
|
10
10
|
};
|
|
@@ -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("../../styled").StyledComponent<import("../..
|
|
|
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("../../styled").StyledComponent<import("../..
|
|
|
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("../../styled").StyledComponent<import(
|
|
|
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("../../styled").StyledComponent<import(
|
|
|
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("../../styled").StyledComponent<import(".
|
|
|
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("../../styled").StyledComponent<import(".
|
|
|
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;
|
|
@@ -2,8 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import MuiMenuItem from '@mui/material/MenuItem';
|
|
3
3
|
import { forwardRefWithGeneric } from '../forwardRefWithGeneric';
|
|
4
4
|
import { Tooltip } from '../Tooltip';
|
|
5
|
+
import { classNames } from '../utils/classNames';
|
|
6
|
+
import { menuItemClassnames } from './constants';
|
|
5
7
|
const InnerMenuItem = (props, ref) => {
|
|
6
|
-
const { disabledReason, disabled, component = 'div', title, tooltipPlacement = 'left', note, ...rest } = props;
|
|
7
|
-
return (_jsx("li", { children: _jsx(Tooltip, { title: disabled ? disabledReason : note, placement: tooltipPlacement, withoutContainer: !disabled, children: _jsx(MuiMenuItem, { ...rest, disabled: disabled, title: title, ref: ref, component: component }) }, title) }));
|
|
8
|
+
const { disabledReason, disabled, component = 'div', title, tooltipPlacement = 'left', note, className, ...rest } = props;
|
|
9
|
+
return (_jsx("li", { children: _jsx(Tooltip, { title: disabled ? disabledReason : note, placement: tooltipPlacement, withoutContainer: !disabled, children: _jsx(MuiMenuItem, { className: classNames(menuItemClassnames.root, className), ...rest, disabled: disabled, title: title, ref: ref, component: component }) }, title) }));
|
|
8
10
|
};
|
|
9
11
|
export const MenuItem = forwardRefWithGeneric(InnerMenuItem);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare const StyledMenuItem: import("../../styled").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("../../../styled").StyledComp
|
|
|
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("../../../styled").StyledComp
|
|
|
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("../../styled").StyledComponent<import("
|
|
|
7
7
|
export declare const ExitMenuItem: import("../../styled").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> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createUIKitClassname } from '../utils/createUIKitClassname';
|
|
2
|
-
export const PROFILE_POPOVER_ID = 'profile-popover';
|
|
2
|
+
export const PROFILE_POPOVER_ID = 'astral-ui-profile-popover';
|
|
3
3
|
export const profileClassnames = {
|
|
4
4
|
credentials: createUIKitClassname('profile__credentials'),
|
|
5
5
|
button: createUIKitClassname('profile__button'),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
+
import { menuItemClassnames } from '../../MenuItem';
|
|
2
3
|
import { useHidePersonalData } from '../../personalDataSecurity';
|
|
3
4
|
import { ErrorService } from '../../services/ErrorService';
|
|
4
5
|
import { useMenu } from '../../useMenu';
|
|
@@ -12,7 +13,7 @@ export const useLogic = ({ menuList, menu: Menu, exitButton, isHidePersonalData,
|
|
|
12
13
|
const observer = new MutationObserver((_, obs) => {
|
|
13
14
|
const popover = document.getElementById(PROFILE_POPOVER_ID);
|
|
14
15
|
if (popover) {
|
|
15
|
-
const menuItems = popover.querySelectorAll(
|
|
16
|
+
const menuItems = popover.querySelectorAll(`.${menuItemClassnames.root}`);
|
|
16
17
|
if (menuItems.length > 0) {
|
|
17
18
|
menuItems.forEach((item) => {
|
|
18
19
|
item.onclick = handleCloseMenu;
|
|
@@ -10,7 +10,7 @@ export declare const EndAdornmentWrapper: import("../styled").StyledComponent<{
|
|
|
10
10
|
export declare const Placeholder: import("../styled").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("../styled").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
|
}, {}, {}>;
|
|
@@ -41,7 +41,7 @@ const getBorderColor = ({ state = 'default', color = 'primary', theme, isSelecte
|
|
|
41
41
|
if (state === 'active' || isSelected) {
|
|
42
42
|
return theme.palette[color][800];
|
|
43
43
|
}
|
|
44
|
-
return theme.palette.
|
|
44
|
+
return theme.palette.components.border.default;
|
|
45
45
|
};
|
|
46
46
|
const toggleButtonColorStyle = ({ theme, color, selected, disabled, state = 'default', variant = 'transparent', }) => css `
|
|
47
47
|
color: ${getColor({ theme, color, isSelected: selected, isDisabled: disabled, state })};
|
|
@@ -97,35 +97,35 @@ export const StyledToggleButton = styled(MuiToggleButton, {
|
|
|
97
97
|
&.${buttonBaseClasses.root}.${toggleButtonGroupClasses.grouped}:not(:first-of-type) {
|
|
98
98
|
border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color })};
|
|
99
99
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
&:hover {
|
|
101
|
+
border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color, state: 'hover' })};
|
|
102
|
+
}
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
&:active {
|
|
105
|
+
border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color, state: 'active' })};
|
|
106
|
+
}
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
&.${toggleButtonClasses.selected} {
|
|
109
|
+
border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color, isSelected: true })};
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
&:hover {
|
|
112
|
+
border-left-color: ${({ theme, $color }) => getBorderColor({
|
|
113
113
|
theme,
|
|
114
114
|
color: $color,
|
|
115
115
|
isSelected: true,
|
|
116
116
|
state: 'hover',
|
|
117
117
|
})};
|
|
118
|
-
|
|
118
|
+
}
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
&:active {
|
|
121
|
+
border-left-color: ${({ theme, $color }) => getBorderColor({
|
|
122
122
|
theme,
|
|
123
123
|
color: $color,
|
|
124
124
|
isSelected: true,
|
|
125
125
|
state: 'active',
|
|
126
126
|
})};
|
|
127
|
+
}
|
|
127
128
|
}
|
|
128
|
-
}
|
|
129
129
|
|
|
130
130
|
&.${buttonClasses.focusVisible} {
|
|
131
131
|
z-index: 3;
|
|
@@ -133,4 +133,8 @@ export const StyledToggleButton = styled(MuiToggleButton, {
|
|
|
133
133
|
border-left-color: ${({ theme }) => theme.palette.components.focused};
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
+
|
|
137
|
+
&.${buttonClasses.disabled} {
|
|
138
|
+
border-color: ${({ theme }) => theme.palette.components.border.default};
|
|
139
|
+
}
|
|
136
140
|
`;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
+
import { classNames } from '../utils/classNames';
|
|
4
|
+
import { cva } from '../utils/cva';
|
|
3
5
|
import { tooltipClassnames } from './constants';
|
|
4
6
|
import { ContentWrapper, StyledTooltip } from './styles';
|
|
5
7
|
import { useLogic } from './useLogic';
|
|
8
|
+
const tooltipCva = cva(tooltipClassnames.root, {
|
|
9
|
+
variants: {
|
|
10
|
+
withoutMaxWidth: {
|
|
11
|
+
true: tooltipClassnames.withoutMaxWidth,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|
|
6
15
|
export const Tooltip = forwardRef((props, ref) => {
|
|
7
|
-
const { title, placement = 'top', size = 'medium', withoutContainer = true, children, className, ...restProps } = useLogic(props);
|
|
8
|
-
return (_jsx(StyledTooltip, { ref: ref, title: title, size: size, placement: placement, arrow: true, className: className, ...restProps, children: withoutContainer ? (children) : (_jsx(ContentWrapper, { className: tooltipClassnames.contentWrapper, children: children })) }));
|
|
16
|
+
const { title, placement = 'top', size = 'medium', withoutContainer = true, children, className, tooltipStyle, width, ...restProps } = useLogic(props);
|
|
17
|
+
return (_jsx(StyledTooltip, { ref: ref, title: title, size: size, placement: placement, arrow: true, className: classNames(className, tooltipCva({ withoutMaxWidth: Boolean(width) })), style: tooltipStyle, ...restProps, children: withoutContainer ? (children) : (_jsx(ContentWrapper, { className: tooltipClassnames.contentWrapper, children: children })) }));
|
|
9
18
|
});
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { createUIKitClassname } from '../utils/createUIKitClassname';
|
|
2
2
|
export const tooltipClassnames = {
|
|
3
|
+
root: createUIKitClassname('tooltip'),
|
|
3
4
|
contentWrapper: createUIKitClassname('tooltip__content-wrapper'),
|
|
5
|
+
withoutMaxWidth: createUIKitClassname('tooltip_without-max-width'),
|
|
6
|
+
tooltipLabel: createUIKitClassname('tooltip__label'),
|
|
7
|
+
arrow: createUIKitClassname('tooltip__arrow'),
|
|
4
8
|
};
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import Tooltip
|
|
2
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
3
|
import { styled } from '../styled';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { tooltipClassnames } from './constants';
|
|
5
|
+
export const StyledTooltip = styled(({ className, style, ...props }) => (_jsx(Tooltip, { ...props, PopperProps: { ...props.PopperProps, style }, classes: {
|
|
6
|
+
...props.classes,
|
|
7
|
+
popper: className,
|
|
8
|
+
tooltip: tooltipClassnames.tooltipLabel,
|
|
9
|
+
arrow: tooltipClassnames.arrow,
|
|
10
|
+
} }))) `
|
|
11
|
+
--tooltip-width: 0;
|
|
12
|
+
|
|
13
|
+
&.${tooltipClassnames.withoutMaxWidth} {
|
|
14
|
+
& .${tooltipClassnames.tooltipLabel} {
|
|
15
|
+
width: var(--tooltip-width);
|
|
16
|
+
max-width: none;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
& .${tooltipClassnames.tooltipLabel} {
|
|
6
21
|
margin: 0;
|
|
7
22
|
|
|
8
23
|
font-size: ${({ size, theme }) => size === 'small'
|
|
@@ -18,24 +33,24 @@ export const StyledTooltip = styled(({ className, ...props }) => (_jsx(Tooltip,
|
|
|
18
33
|
border-radius: ${({ theme }) => theme.shape.small};
|
|
19
34
|
}
|
|
20
35
|
|
|
21
|
-
& .${
|
|
36
|
+
& .${tooltipClassnames.arrow} {
|
|
22
37
|
font-size: ${({ theme }) => theme.typography.caption.fontSize};
|
|
23
38
|
color: ${({ theme }) => theme.palette.grey[900]};
|
|
24
39
|
}
|
|
25
40
|
|
|
26
|
-
&&[data-popper-placement*='top'] .${
|
|
41
|
+
&&[data-popper-placement*='top'] .${tooltipClassnames.tooltipLabel} {
|
|
27
42
|
margin-bottom: ${({ theme }) => theme.spacing(2)};
|
|
28
43
|
}
|
|
29
44
|
|
|
30
|
-
&&[data-popper-placement*='bottom'] .${
|
|
45
|
+
&&[data-popper-placement*='bottom'] .${tooltipClassnames.tooltipLabel} {
|
|
31
46
|
margin-top: ${({ theme }) => theme.spacing(2)};
|
|
32
47
|
}
|
|
33
48
|
|
|
34
|
-
&&[data-popper-placement*='left'] .${
|
|
49
|
+
&&[data-popper-placement*='left'] .${tooltipClassnames.tooltipLabel} {
|
|
35
50
|
margin-right: ${({ theme }) => theme.spacing(2)};
|
|
36
51
|
}
|
|
37
52
|
|
|
38
|
-
&&[data-popper-placement*='right'] .${
|
|
53
|
+
&&[data-popper-placement*='right'] .${tooltipClassnames.tooltipLabel} {
|
|
39
54
|
margin-left: ${({ theme }) => theme.spacing(2)};
|
|
40
55
|
}
|
|
41
56
|
`;
|
|
@@ -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
|
};
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { useHidePersonalData } from '../../personalDataSecurity';
|
|
2
2
|
import { classNames } from '../../utils/classNames';
|
|
3
3
|
export const useLogic = (props) => {
|
|
4
|
-
const { children, className: propClassName, ...restProps } = props;
|
|
4
|
+
const { children, className: propClassName, width, style, ...restProps } = props;
|
|
5
5
|
const hidePersonalDataClassName = useHidePersonalData({
|
|
6
6
|
type: 'container',
|
|
7
7
|
});
|
|
8
8
|
const className = classNames(propClassName, {
|
|
9
9
|
[hidePersonalDataClassName]: children.props.className?.includes(hidePersonalDataClassName),
|
|
10
10
|
});
|
|
11
|
+
const tooltipStyle = {
|
|
12
|
+
'--tooltip-width': width,
|
|
13
|
+
...style,
|
|
14
|
+
};
|
|
11
15
|
return {
|
|
12
16
|
children,
|
|
13
17
|
className,
|
|
18
|
+
tooltipStyle,
|
|
19
|
+
width,
|
|
14
20
|
...restProps,
|
|
15
21
|
};
|
|
16
22
|
};
|
|
@@ -341,6 +341,7 @@ export declare const Note: import("../../styled").StyledComponent<import("../../
|
|
|
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("../../styled").StyledComponent<import("../../
|
|
|
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("../../styled").StyledComponent<Omit
|
|
|
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("../../styled").StyledComponent<Omit
|
|
|
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;
|