@astral/ui 4.62.0 → 4.62.1-rc.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.
Files changed (73) hide show
  1. package/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.d.ts +1 -1
  2. package/components/Autocomplete/styles.d.ts +1 -1
  3. package/components/CopyTypography/useLogic/useLogic.d.ts +1 -2
  4. package/components/Description/Value/styles.d.ts +1 -2
  5. package/components/HintIcon/HintIcon.d.ts +1 -1
  6. package/components/HintIcon/HintIcon.js +2 -2
  7. package/components/HintIcon/Icon/Icon.d.ts +1 -1
  8. package/components/HintIcon/Icon/Icon.js +2 -2
  9. package/components/HintIcon/types.d.ts +1 -5
  10. package/components/JsonViewer/NodeValue/styles.d.ts +3 -6
  11. package/components/Menu/Menu.d.ts +1 -1
  12. package/components/Menu/Menu.js +3 -3
  13. package/components/MenuOrganization/OrganizationItem/styles.d.ts +1 -1
  14. package/components/NavMenu/Item/ItemButton/styles.d.ts +1 -2
  15. package/components/OverflowTypography/OverflowTypography.d.ts +1 -2
  16. package/components/ProductSwitcher/Content/styles.d.ts +1 -1
  17. package/components/Profile/MenuList/MenuList.js +3 -2
  18. package/components/Profile/MenuList/styles.d.ts +1 -1
  19. package/components/Profile/Profile.js +5 -17
  20. package/components/Profile/constants.d.ts +1 -0
  21. package/components/Profile/constants.js +1 -0
  22. package/components/Profile/useLogic/index.d.ts +1 -0
  23. package/components/Profile/useLogic/index.js +1 -0
  24. package/components/Profile/useLogic/useLogic.d.ts +11 -0
  25. package/components/Profile/useLogic/useLogic.js +46 -0
  26. package/components/Select/styles.d.ts +1 -1
  27. package/components/TextField/styles.d.ts +1 -1
  28. package/components/Tooltip/Tooltip.js +2 -11
  29. package/components/Tooltip/constants.d.ts +0 -4
  30. package/components/Tooltip/constants.js +0 -4
  31. package/components/Tooltip/styles.js +8 -23
  32. package/components/Tooltip/types.d.ts +0 -5
  33. package/components/Tooltip/useLogic/useLogic.d.ts +4 -4
  34. package/components/Tooltip/useLogic/useLogic.js +1 -7
  35. package/components/Tree/TreeItem/styles.d.ts +1 -2
  36. package/components/fileUploading/FileInfo/styles.d.ts +1 -2
  37. package/node/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.d.ts +1 -1
  38. package/node/components/Autocomplete/styles.d.ts +1 -1
  39. package/node/components/CopyTypography/useLogic/useLogic.d.ts +1 -2
  40. package/node/components/Description/Value/styles.d.ts +1 -2
  41. package/node/components/HintIcon/HintIcon.d.ts +1 -1
  42. package/node/components/HintIcon/HintIcon.js +2 -2
  43. package/node/components/HintIcon/Icon/Icon.d.ts +1 -1
  44. package/node/components/HintIcon/Icon/Icon.js +2 -2
  45. package/node/components/HintIcon/types.d.ts +1 -5
  46. package/node/components/JsonViewer/NodeValue/styles.d.ts +3 -6
  47. package/node/components/Menu/Menu.d.ts +1 -1
  48. package/node/components/Menu/Menu.js +3 -3
  49. package/node/components/MenuOrganization/OrganizationItem/styles.d.ts +1 -1
  50. package/node/components/NavMenu/Item/ItemButton/styles.d.ts +1 -2
  51. package/node/components/OverflowTypography/OverflowTypography.d.ts +1 -2
  52. package/node/components/ProductSwitcher/Content/styles.d.ts +1 -1
  53. package/node/components/Profile/MenuList/MenuList.js +3 -2
  54. package/node/components/Profile/MenuList/styles.d.ts +1 -1
  55. package/node/components/Profile/Profile.js +4 -19
  56. package/node/components/Profile/constants.d.ts +1 -0
  57. package/node/components/Profile/constants.js +2 -1
  58. package/node/components/Profile/useLogic/index.d.ts +1 -0
  59. package/node/components/Profile/useLogic/index.js +17 -0
  60. package/node/components/Profile/useLogic/useLogic.d.ts +11 -0
  61. package/node/components/Profile/useLogic/useLogic.js +50 -0
  62. package/node/components/Select/styles.d.ts +1 -1
  63. package/node/components/TextField/styles.d.ts +1 -1
  64. package/node/components/Tooltip/Tooltip.js +2 -11
  65. package/node/components/Tooltip/constants.d.ts +0 -4
  66. package/node/components/Tooltip/constants.js +0 -4
  67. package/node/components/Tooltip/styles.js +30 -25
  68. package/node/components/Tooltip/types.d.ts +0 -5
  69. package/node/components/Tooltip/useLogic/useLogic.d.ts +4 -4
  70. package/node/components/Tooltip/useLogic/useLogic.js +1 -7
  71. package/node/components/Tree/TreeItem/styles.d.ts +1 -2
  72. package/node/components/fileUploading/FileInfo/styles.d.ts +1 -2
  73. package/package.json +1 -1
@@ -295,7 +295,6 @@ 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;
299
298
  size?: import("../..").TooltipSize | undefined;
300
299
  componentsProps?: {
301
300
  popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
@@ -333,7 +332,7 @@ export declare const StyledFilename: import("../../styled").StyledComponent<Omit
333
332
  leaveDelay?: number | undefined;
334
333
  leaveTouchDelay?: number | undefined;
335
334
  onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
336
- placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
335
+ placement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | undefined;
337
336
  PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
338
337
  PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
339
338
  withoutContainer?: boolean | undefined;
@@ -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" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
318
+ tooltipPlacement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | 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("@emotion/styled/dist/declarations/src/types").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" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
6
+ tooltipPlacement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | 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,7 +589,6 @@ 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;
593
592
  size?: import("../..").TooltipSize | undefined;
594
593
  componentsProps?: {
595
594
  popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
@@ -627,7 +626,7 @@ export declare const useLogic: ({ children, copyPosition, copyText, isShowCopyTe
627
626
  leaveDelay?: number | undefined;
628
627
  leaveTouchDelay?: number | undefined;
629
628
  onOpen?: ((event: SyntheticEvent<Element, Event>) => void) | undefined;
630
- placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
629
+ placement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | undefined;
631
630
  PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
632
631
  PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
633
632
  withoutContainer?: boolean | undefined;
@@ -321,7 +321,6 @@ 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;
325
324
  size?: import("../..").TooltipSize | undefined;
326
325
  componentsProps?: {
327
326
  popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
@@ -359,7 +358,7 @@ export declare const StyledCopyTypography: import("@emotion/styled/dist/declarat
359
358
  leaveDelay?: number | undefined;
360
359
  leaveTouchDelay?: number | undefined;
361
360
  onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
362
- placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
361
+ placement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | undefined;
363
362
  PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
364
363
  PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
365
364
  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, tooltipWidth, }: HintIconProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const HintIcon: ({ variant, title, note, iconOption, tooltipPlacement, renderIcon, }: 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, tooltipWidth, }) => {
9
+ const HintIcon = ({ variant, title, note, iconOption, tooltipPlacement = 'bottom', renderIcon, }) => {
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, 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 }) })] }));
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 }) })] }));
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' | 'tooltipWidth'> & {
3
+ export type IconProps = Pick<HintIconProps, 'variant' | 'iconOption' | 'note' | 'renderIcon'> & {
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, 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() }) }));
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() }) }));
13
13
  };
14
14
  exports.Icon = Icon;
@@ -1,4 +1,4 @@
1
- import { type CSSProperties, type ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  export type TooltipPlacement = 'left' | 'top' | 'right' | 'bottom';
3
3
  export type HintIconProps = {
4
4
  /**
@@ -36,8 +36,4 @@ export type HintIconProps = {
36
36
  * Задание кастомной иконки
37
37
  */
38
38
  renderIcon?: () => ReactNode;
39
- /**
40
- * Задает ширину тултипа
41
- */
42
- tooltipWidth?: CSSProperties['width'];
43
39
  };
@@ -290,7 +290,6 @@ 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;
294
293
  size?: import("../..").TooltipSize | undefined;
295
294
  componentsProps?: {
296
295
  popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
@@ -328,7 +327,7 @@ export declare const Value: import("@emotion/styled/dist/declarations/src/types"
328
327
  leaveDelay?: number | undefined;
329
328
  leaveTouchDelay?: number | undefined;
330
329
  onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
331
- placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
330
+ placement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | undefined;
332
331
  PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
333
332
  PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
334
333
  withoutContainer?: boolean | undefined;
@@ -652,7 +651,6 @@ export declare const CopyWrapper: import("@emotion/styled/dist/declarations/src/
652
651
  onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
653
652
  onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
654
653
  open?: boolean | undefined;
655
- width?: import("csstype").Property.Width<string | number> | undefined;
656
654
  size?: import("../..").TooltipSize | undefined;
657
655
  componentsProps?: {
658
656
  popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
@@ -690,7 +688,7 @@ export declare const CopyWrapper: import("@emotion/styled/dist/declarations/src/
690
688
  leaveDelay?: number | undefined;
691
689
  leaveTouchDelay?: number | undefined;
692
690
  onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
693
- placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
691
+ placement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | undefined;
694
692
  PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
695
693
  PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
696
694
  withoutContainer?: boolean | undefined;
@@ -990,7 +988,6 @@ export declare const GuidValue: import("@emotion/styled/dist/declarations/src/ty
990
988
  onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
991
989
  onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
992
990
  open?: boolean | undefined;
993
- width?: import("csstype").Property.Width<string | number> | undefined;
994
991
  size?: import("../..").TooltipSize | undefined;
995
992
  componentsProps?: {
996
993
  popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
@@ -1028,7 +1025,7 @@ export declare const GuidValue: import("@emotion/styled/dist/declarations/src/ty
1028
1025
  leaveDelay?: number | undefined;
1029
1026
  leaveTouchDelay?: number | undefined;
1030
1027
  onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
1031
- placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
1028
+ placement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | undefined;
1032
1029
  PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
1033
1030
  PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
1034
1031
  withoutContainer?: boolean | undefined;
@@ -6,4 +6,4 @@ export type MenuProps = WithoutEmotionSpecific<MuiMenuProps> & {
6
6
  */
7
7
  title?: string;
8
8
  };
9
- export declare const Menu: ({ children, onClose, open, title, ...restProps }: MenuProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const Menu: ({ children, onClose, open, title, MenuListProps, ...restProps }: MenuProps) => import("react/jsx-runtime").JSX.Element;
@@ -9,11 +9,11 @@ const Menu_1 = __importDefault(require("@mui/material/Menu"));
9
9
  const BottomDrawer_1 = require("../BottomDrawer");
10
10
  const MenuList_1 = require("../MenuList");
11
11
  const useViewportType_1 = require("../useViewportType");
12
- const Menu = ({ children, onClose, open, title, ...restProps }) => {
12
+ const Menu = ({ children, onClose, open, title, MenuListProps, ...restProps }) => {
13
13
  const { isMobile } = (0, useViewportType_1.useViewportType)();
14
14
  if (isMobile) {
15
- return ((0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { title: title, onClose: onClose, open: open, children: (0, jsx_runtime_1.jsx)(MenuList_1.MenuList, { children: children }) }));
15
+ return ((0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { title: title, onClose: onClose, open: open, id: MenuListProps?.id, children: (0, jsx_runtime_1.jsx)(MenuList_1.MenuList, { children: children }) }));
16
16
  }
17
- return ((0, jsx_runtime_1.jsx)(Menu_1.default, { open: open, onClose: onClose, ...restProps, children: children }));
17
+ return ((0, jsx_runtime_1.jsx)(Menu_1.default, { open: open, onClose: onClose, MenuListProps: MenuListProps, ...restProps, children: children }));
18
18
  };
19
19
  exports.Menu = Menu;
@@ -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" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
5
+ tooltipPlacement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | 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,7 +579,6 @@ 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;
583
582
  size?: import("../../..").TooltipSize | undefined;
584
583
  componentsProps?: {
585
584
  popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
@@ -617,7 +616,7 @@ export declare const NavMenuItemButtonText: import("@emotion/styled/dist/declara
617
616
  leaveDelay?: number | undefined;
618
617
  leaveTouchDelay?: number | undefined;
619
618
  onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
620
- placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
619
+ placement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | undefined;
621
620
  PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
622
621
  PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
623
622
  withoutContainer?: boolean | undefined;
@@ -291,7 +291,6 @@ 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;
295
294
  size?: import("../Tooltip").TooltipSize | undefined;
296
295
  componentsProps?: {
297
296
  popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
@@ -329,7 +328,7 @@ export declare const OverflowTypography: import("react").ForwardRefExoticCompone
329
328
  leaveDelay?: number | undefined;
330
329
  leaveTouchDelay?: number | undefined;
331
330
  onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
332
- placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
331
+ placement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | undefined;
333
332
  PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
334
333
  PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
335
334
  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" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
5
+ tooltipPlacement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | 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;
@@ -11,6 +11,7 @@ const ListItemText_1 = require("../../ListItemText");
11
11
  const MenuItem_1 = require("../../MenuItem");
12
12
  const OverflowTypography_1 = require("../../OverflowTypography");
13
13
  const useViewportType_1 = require("../../useViewportType");
14
+ const constants_1 = require("../constants");
14
15
  const styles_1 = require("./styles");
15
16
  /**
16
17
  * Компонент для рендера menu с помощью массива данных
@@ -34,8 +35,8 @@ const MenuList = (props) => {
34
35
  return items;
35
36
  };
36
37
  if (isMobile) {
37
- return ((0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { title: displayName, onClose: onClose, open: open, children: (0, jsx_runtime_1.jsx)(styles_1.StyledMenuList, { children: renderMenuList() }) }));
38
+ return ((0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { id: constants_1.PROFILE_POPOVER_ID, title: displayName, onClose: onClose, open: open, children: (0, jsx_runtime_1.jsx)(styles_1.StyledMenuList, { children: renderMenuList() }) }));
38
39
  }
39
- return ((0, jsx_runtime_1.jsx)(styles_1.StyledMenu, { open: open, onClose: onClose, ...restProps, children: renderMenuList() }));
40
+ return ((0, jsx_runtime_1.jsx)(styles_1.StyledMenu, { MenuListProps: { id: constants_1.PROFILE_POPOVER_ID }, open: open, onClose: onClose, ...restProps, children: renderMenuList() }));
40
41
  };
41
42
  exports.MenuList = MenuList;
@@ -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" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
10
+ tooltipPlacement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | 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,35 +1,20 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.Profile = void 0;
7
4
  const jsx_runtime_1 = require("react/jsx-runtime");
8
- const ClickAwayListener_1 = __importDefault(require("@mui/material/ClickAwayListener"));
9
- const react_1 = require("react");
10
- const personalDataSecurity_1 = require("../personalDataSecurity");
11
5
  const Typography_1 = require("../Typography");
12
- const useMenu_1 = require("../useMenu");
13
6
  const constants_1 = require("./constants");
14
7
  const MenuList_1 = require("./MenuList");
15
8
  const ProfileSkeleton_1 = require("./ProfileSkeleton");
16
9
  const styles_1 = require("./styles");
10
+ const useLogic_1 = require("./useLogic");
17
11
  const Profile = (props) => {
18
- const { displayName, annotation, avatar = {}, menu: Menu, menuList, exitButton, isHidePersonalData, isLoading, } = props;
19
- const { open, anchorRef, handleOpenMenu, handleCloseMenu } = (0, useMenu_1.useMenu)();
20
- (0, react_1.useEffect)(() => {
21
- if (!Menu && !menuList && !exitButton) {
22
- // biome-ignore lint/suspicious/noConsole: Ошибка для интеграторов
23
- console.error('Profile должен иметь один из следующих props: menu, menuList, exitButton');
24
- }
25
- }, []);
26
- const hidePersonalDataClassname = (0, personalDataSecurity_1.useHidePersonalData)({
27
- isEnabled: isHidePersonalData,
28
- });
12
+ const { displayName, annotation, avatar = {}, menu: Menu, menuList, exitButton, isLoading, } = props;
13
+ const { open, anchorRef, handleOpenMenu, handleCloseMenu, hidePersonalDataClassname, } = (0, useLogic_1.useLogic)(props);
29
14
  if (isLoading) {
30
15
  return (0, jsx_runtime_1.jsx)(ProfileSkeleton_1.ProfileSkeleton, {});
31
16
  }
32
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ClickAwayListener_1.default, { onClickAway: handleCloseMenu, children: (0, jsx_runtime_1.jsxs)(styles_1.ProfileRoot, { ref: anchorRef, variant: "text", onClick: handleOpenMenu, className: constants_1.profileClassnames.button, children: [(0, jsx_runtime_1.jsx)(styles_1.StyledAvatar, { ...avatar, className: constants_1.profileClassnames.avatar }), (0, jsx_runtime_1.jsxs)(styles_1.User, { className: constants_1.profileClassnames.user, children: [(0, jsx_runtime_1.jsxs)(styles_1.Credentials, { className: hidePersonalDataClassname, children: [(0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "body1", className: constants_1.profileClassnames.credentials, children: displayName }), (0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "textSecondary", className: constants_1.profileClassnames.credentials, children: annotation })] }), (0, jsx_runtime_1.jsx)(styles_1.StyledChevron, { isActive: open })] })] }) }), Menu ? ((0, jsx_runtime_1.jsx)(Menu, { open: open, anchorEl: anchorRef.current, onClose: handleCloseMenu, anchorOrigin: {
17
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(styles_1.ProfileRoot, { ref: anchorRef, variant: "text", onClick: handleOpenMenu, className: constants_1.profileClassnames.button, children: [(0, jsx_runtime_1.jsx)(styles_1.StyledAvatar, { ...avatar, className: constants_1.profileClassnames.avatar }), (0, jsx_runtime_1.jsxs)(styles_1.User, { className: constants_1.profileClassnames.user, children: [(0, jsx_runtime_1.jsxs)(styles_1.Credentials, { className: hidePersonalDataClassname, children: [(0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "body1", className: constants_1.profileClassnames.credentials, children: displayName }), (0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "textSecondary", className: constants_1.profileClassnames.credentials, children: annotation })] }), (0, jsx_runtime_1.jsx)(styles_1.StyledChevron, { isActive: open })] })] }), Menu ? ((0, jsx_runtime_1.jsx)(Menu, { MenuListProps: { id: constants_1.PROFILE_POPOVER_ID }, open: open, anchorEl: anchorRef.current, onClose: handleCloseMenu, anchorOrigin: {
33
18
  vertical: 'bottom',
34
19
  horizontal: 'right',
35
20
  }, transformOrigin: {
@@ -1,3 +1,4 @@
1
+ export declare const PROFILE_POPOVER_ID = "profile-popover";
1
2
  export declare const profileClassnames: {
2
3
  credentials: string;
3
4
  button: string;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.profileClassnames = void 0;
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
6
  exports.profileClassnames = {
6
7
  credentials: (0, createUIKitClassname_1.createUIKitClassname)('profile__credentials'),
7
8
  button: (0, createUIKitClassname_1.createUIKitClassname)('profile__button'),
@@ -0,0 +1 @@
1
+ export * from './useLogic';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./useLogic"), exports);
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { type ProfileProps } from '../types';
3
+ type UseLogicParams = ProfileProps;
4
+ export declare const useLogic: ({ menuList, menu: Menu, exitButton, isHidePersonalData, }: UseLogicParams) => {
5
+ open: boolean;
6
+ anchorRef: import("react").MutableRefObject<HTMLButtonElement | null>;
7
+ handleOpenMenu: () => void;
8
+ handleCloseMenu: () => void;
9
+ hidePersonalDataClassname: string;
10
+ };
11
+ export {};
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useLogic = void 0;
4
+ const react_1 = require("react");
5
+ const personalDataSecurity_1 = require("../../personalDataSecurity");
6
+ const ErrorService_1 = require("../../services/ErrorService");
7
+ const useMenu_1 = require("../../useMenu");
8
+ const constants_1 = require("../constants");
9
+ const useLogic = ({ menuList, menu: Menu, exitButton, isHidePersonalData, }) => {
10
+ const { open, anchorRef, handleOpenMenu, handleCloseMenu } = (0, useMenu_1.useMenu)();
11
+ (0, react_1.useEffect)(() => {
12
+ if (!open) {
13
+ return;
14
+ }
15
+ const observer = new MutationObserver((_, obs) => {
16
+ const popover = document.getElementById(constants_1.PROFILE_POPOVER_ID);
17
+ if (popover) {
18
+ const menuItems = popover.querySelectorAll('[role="menuitem"]');
19
+ if (menuItems.length > 0) {
20
+ menuItems.forEach((item) => {
21
+ item.onclick = handleCloseMenu;
22
+ });
23
+ obs.disconnect();
24
+ }
25
+ }
26
+ });
27
+ observer.observe(document.body, {
28
+ childList: true,
29
+ subtree: true,
30
+ });
31
+ return () => observer.disconnect();
32
+ }, [open, handleCloseMenu]);
33
+ (0, react_1.useEffect)(() => {
34
+ const errorService = ErrorService_1.ErrorService.getInstance();
35
+ if (!Menu && !menuList && !exitButton) {
36
+ errorService.logError('Profile', 'Profile должен иметь один из следующих props: menu, menuList, exitButton');
37
+ }
38
+ }, []);
39
+ const hidePersonalDataClassname = (0, personalDataSecurity_1.useHidePersonalData)({
40
+ isEnabled: isHidePersonalData,
41
+ });
42
+ return {
43
+ open,
44
+ anchorRef,
45
+ handleOpenMenu,
46
+ handleCloseMenu,
47
+ hidePersonalDataClassname,
48
+ };
49
+ };
50
+ exports.useLogic = useLogic;
@@ -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" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
13
+ tooltipPlacement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | 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").FilledTextFieldProps | import("@mui/material/TextField").StandardTextFieldProps, "variant"> & {
3
+ } & Omit<import("@mui/material/TextField").OutlinedTextFieldProps | import("@mui/material/TextField").StandardTextFieldProps | import("@mui/material/TextField").FilledTextFieldProps, "variant"> & {
4
4
  theme?: import("@emotion/react").Theme | undefined;
5
5
  }, {}, {}>;
@@ -3,19 +3,10 @@ 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");
8
6
  const constants_1 = require("./constants");
9
7
  const styles_1 = require("./styles");
10
8
  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
- });
18
9
  exports.Tooltip = (0, react_1.forwardRef)((props, ref) => {
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 })) }));
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 })) }));
21
12
  });
@@ -1,7 +1,3 @@
1
1
  export declare const tooltipClassnames: {
2
- root: string;
3
2
  contentWrapper: string;
4
- withoutMaxWidth: string;
5
- tooltipLabel: string;
6
- arrow: string;
7
3
  };
@@ -3,9 +3,5 @@ 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'),
7
6
  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'),
11
7
  };
@@ -1,29 +1,34 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
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;
4
24
  };
5
25
  Object.defineProperty(exports, "__esModule", { value: true });
6
26
  exports.ContentWrapper = exports.StyledTooltip = void 0;
7
27
  const jsx_runtime_1 = require("react/jsx-runtime");
8
- const Tooltip_1 = __importDefault(require("@mui/material/Tooltip"));
28
+ const Tooltip_1 = __importStar(require("@mui/material/Tooltip"));
9
29
  const styled_1 = require("../styled");
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} {
30
+ exports.StyledTooltip = (0, styled_1.styled)(({ className, ...props }) => ((0, jsx_runtime_1.jsx)(Tooltip_1.default, { ...props, classes: { popper: className } }))) `
31
+ & .${Tooltip_1.tooltipClasses.tooltip} {
27
32
  margin: 0;
28
33
 
29
34
  font-size: ${({ size, theme }) => size === 'small'
@@ -39,24 +44,24 @@ exports.StyledTooltip = (0, styled_1.styled)(({ className, style, ...props }) =>
39
44
  border-radius: ${({ theme }) => theme.shape.small};
40
45
  }
41
46
 
42
- & .${constants_1.tooltipClassnames.arrow} {
47
+ & .${Tooltip_1.tooltipClasses.arrow} {
43
48
  font-size: ${({ theme }) => theme.typography.caption.fontSize};
44
49
  color: ${({ theme }) => theme.palette.grey[900]};
45
50
  }
46
51
 
47
- &&[data-popper-placement*='top'] .${constants_1.tooltipClassnames.tooltipLabel} {
52
+ &&[data-popper-placement*='top'] .${Tooltip_1.tooltipClasses.tooltip} {
48
53
  margin-bottom: ${({ theme }) => theme.spacing(2)};
49
54
  }
50
55
 
51
- &&[data-popper-placement*='bottom'] .${constants_1.tooltipClassnames.tooltipLabel} {
56
+ &&[data-popper-placement*='bottom'] .${Tooltip_1.tooltipClasses.tooltip} {
52
57
  margin-top: ${({ theme }) => theme.spacing(2)};
53
58
  }
54
59
 
55
- &&[data-popper-placement*='left'] .${constants_1.tooltipClassnames.tooltipLabel} {
60
+ &&[data-popper-placement*='left'] .${Tooltip_1.tooltipClasses.tooltip} {
56
61
  margin-right: ${({ theme }) => theme.spacing(2)};
57
62
  }
58
63
 
59
- &&[data-popper-placement*='right'] .${constants_1.tooltipClassnames.tooltipLabel} {
64
+ &&[data-popper-placement*='right'] .${Tooltip_1.tooltipClasses.tooltip} {
60
65
  margin-left: ${({ theme }) => theme.spacing(2)};
61
66
  }
62
67
  `;