@astral/ui 4.62.1-rc.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 (105) 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 +2 -2
  20. package/components/Profile/constants.d.ts +1 -0
  21. package/components/Profile/constants.js +1 -0
  22. package/components/Profile/useLogic/useLogic.js +18 -9
  23. package/components/Select/styles.d.ts +1 -1
  24. package/components/TextField/styles.d.ts +1 -1
  25. package/components/Tooltip/Tooltip.js +2 -11
  26. package/components/Tooltip/constants.d.ts +0 -4
  27. package/components/Tooltip/constants.js +0 -4
  28. package/components/Tooltip/styles.js +8 -23
  29. package/components/Tooltip/types.d.ts +0 -5
  30. package/components/Tooltip/useLogic/useLogic.d.ts +4 -4
  31. package/components/Tooltip/useLogic/useLogic.js +1 -7
  32. package/components/Tree/TreeItem/styles.d.ts +1 -2
  33. package/components/fileUploading/FileInfo/styles.d.ts +1 -2
  34. package/components/fileUploading/PreviewFileUploader/PreviewFileUploader.d.ts +3 -3
  35. package/node/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.d.ts +1 -1
  36. package/node/components/Autocomplete/styles.d.ts +1 -1
  37. package/node/components/CopyTypography/useLogic/useLogic.d.ts +1 -2
  38. package/node/components/Description/Value/styles.d.ts +1 -2
  39. package/node/components/HintIcon/HintIcon.d.ts +1 -1
  40. package/node/components/HintIcon/HintIcon.js +2 -2
  41. package/node/components/HintIcon/Icon/Icon.d.ts +1 -1
  42. package/node/components/HintIcon/Icon/Icon.js +2 -2
  43. package/node/components/HintIcon/types.d.ts +1 -5
  44. package/node/components/JsonViewer/NodeValue/styles.d.ts +3 -6
  45. package/node/components/Menu/Menu.d.ts +1 -1
  46. package/node/components/Menu/Menu.js +3 -3
  47. package/node/components/MenuOrganization/OrganizationItem/styles.d.ts +1 -1
  48. package/node/components/NavMenu/Item/ItemButton/styles.d.ts +1 -2
  49. package/node/components/OverflowTypography/OverflowTypography.d.ts +1 -2
  50. package/node/components/ProductSwitcher/Content/styles.d.ts +1 -1
  51. package/node/components/Profile/MenuList/MenuList.js +3 -2
  52. package/node/components/Profile/MenuList/styles.d.ts +1 -1
  53. package/node/components/Profile/Profile.js +1 -1
  54. package/node/components/Profile/constants.d.ts +1 -0
  55. package/node/components/Profile/constants.js +2 -1
  56. package/node/components/Profile/useLogic/useLogic.js +18 -9
  57. package/node/components/Select/styles.d.ts +1 -1
  58. package/node/components/TextField/styles.d.ts +1 -1
  59. package/node/components/Tooltip/Tooltip.js +2 -11
  60. package/node/components/Tooltip/constants.d.ts +0 -4
  61. package/node/components/Tooltip/constants.js +0 -4
  62. package/node/components/Tooltip/styles.js +30 -25
  63. package/node/components/Tooltip/types.d.ts +0 -5
  64. package/node/components/Tooltip/useLogic/useLogic.d.ts +4 -4
  65. package/node/components/Tooltip/useLogic/useLogic.js +1 -7
  66. package/node/components/Tree/TreeItem/styles.d.ts +1 -2
  67. package/node/components/fileUploading/FileInfo/styles.d.ts +1 -2
  68. package/node/components/fileUploading/PreviewFileUploader/PreviewFileUploader.d.ts +3 -3
  69. package/package.json +1 -1
  70. package/components/DataGridMinimalisticPagination/styles.d.ts +0 -3
  71. package/components/DataGridMinimalisticPagination/styles.js +0 -5
  72. package/components/NotificationList/SettingsButton/styled.d.ts +0 -5
  73. package/components/NotificationList/SettingsButton/styled.js +0 -8
  74. package/components/TagsList/public.d.ts +0 -2
  75. package/components/TagsList/public.js +0 -2
  76. package/components/fileUploading/index.d.ts +0 -8
  77. package/components/fileUploading/index.js +0 -8
  78. package/components/placeholders/index.d.ts +0 -4
  79. package/components/placeholders/index.js +0 -4
  80. package/components/transitions/index.d.ts +0 -4
  81. package/components/transitions/index.js +0 -4
  82. package/components/types/index.d.ts +0 -4
  83. package/components/types/index.js +0 -4
  84. package/components/utils/index.d.ts +0 -16
  85. package/components/utils/index.js +0 -16
  86. package/hook-form/external.d.ts +0 -1
  87. package/hook-form/external.js +0 -1
  88. package/node/components/DataGridMinimalisticPagination/styles.d.ts +0 -3
  89. package/node/components/DataGridMinimalisticPagination/styles.js +0 -8
  90. package/node/components/NotificationList/SettingsButton/styled.d.ts +0 -5
  91. package/node/components/NotificationList/SettingsButton/styled.js +0 -11
  92. package/node/components/TagsList/public.d.ts +0 -2
  93. package/node/components/TagsList/public.js +0 -18
  94. package/node/components/fileUploading/index.d.ts +0 -8
  95. package/node/components/fileUploading/index.js +0 -21
  96. package/node/components/placeholders/index.d.ts +0 -4
  97. package/node/components/placeholders/index.js +0 -12
  98. package/node/components/transitions/index.d.ts +0 -4
  99. package/node/components/transitions/index.js +0 -11
  100. package/node/components/types/index.d.ts +0 -4
  101. package/node/components/types/index.js +0 -20
  102. package/node/components/utils/index.d.ts +0 -16
  103. package/node/components/utils/index.js +0 -32
  104. package/node/hook-form/external.d.ts +0 -1
  105. package/node/hook-form/external.js +0 -8
@@ -1,11 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import { type UsePreviewFileUploaderParams } from '../hooks/usePreviewFileUploader';
3
3
  export type PreviewFileUploaderProps = UsePreviewFileUploaderParams;
4
- export declare const PreviewFileUploader: import("react").ForwardRefExoticComponent<Pick<import("..").FileUploaderProps, "className" | "label" | "name" | "placeholder" | "isDisabled" | "isError" | "inputRef" | "helperText" | "maxFileSize" | "onUploadFile" | "getErrorMessage" | "restrictions" | "notify" | "onDeleteFile" | "onView" | "generateDownloadLink"> & {
5
- value: import("..").UploadFile | null | undefined;
4
+ export declare const PreviewFileUploader: import("react").ForwardRefExoticComponent<Pick<import("../types").FileUploaderProps, "className" | "label" | "name" | "placeholder" | "isDisabled" | "isError" | "inputRef" | "helperText" | "maxFileSize" | "onUploadFile" | "getErrorMessage" | "restrictions" | "notify" | "onDeleteFile" | "onView" | "generateDownloadLink"> & {
5
+ value: import("../types").UploadFile | null | undefined;
6
6
  accept?: string[] | undefined;
7
7
  placeholderImgSrc?: string | undefined;
8
8
  isHidePersonalData?: boolean | undefined;
9
9
  PdfViewer?: import("react").LazyExoticComponent<(props: import("../../PdfViewer").PdfViewerProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>> | ((props: import("../../PdfViewer").PdfViewerProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>) | undefined;
10
- onChange: (value: import("..").UploadFile | null) => void;
10
+ onChange: (value: import("../types").UploadFile | null) => void;
11
11
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -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> & {
@@ -14,7 +14,7 @@ const Profile = (props) => {
14
14
  if (isLoading) {
15
15
  return (0, jsx_runtime_1.jsx)(ProfileSkeleton_1.ProfileSkeleton, {});
16
16
  }
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, { 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: {
18
18
  vertical: 'bottom',
19
19
  horizontal: 'right',
20
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'),
@@ -3,28 +3,37 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useLogic = void 0;
4
4
  const react_1 = require("react");
5
5
  const personalDataSecurity_1 = require("../../personalDataSecurity");
6
+ const ErrorService_1 = require("../../services/ErrorService");
6
7
  const useMenu_1 = require("../../useMenu");
8
+ const constants_1 = require("../constants");
7
9
  const useLogic = ({ menuList, menu: Menu, exitButton, isHidePersonalData, }) => {
8
10
  const { open, anchorRef, handleOpenMenu, handleCloseMenu } = (0, useMenu_1.useMenu)();
9
11
  (0, react_1.useEffect)(() => {
10
12
  if (!open) {
11
13
  return;
12
14
  }
13
- const timer = setTimeout(() => {
14
- const popover = document.querySelector('[role="presentation"]');
15
+ const observer = new MutationObserver((_, obs) => {
16
+ const popover = document.getElementById(constants_1.PROFILE_POPOVER_ID);
15
17
  if (popover) {
16
18
  const menuItems = popover.querySelectorAll('[role="menuitem"]');
17
- menuItems.forEach((item) => {
18
- item.onclick = handleCloseMenu;
19
- });
19
+ if (menuItems.length > 0) {
20
+ menuItems.forEach((item) => {
21
+ item.onclick = handleCloseMenu;
22
+ });
23
+ obs.disconnect();
24
+ }
20
25
  }
21
- }, 0);
22
- return () => clearTimeout(timer);
26
+ });
27
+ observer.observe(document.body, {
28
+ childList: true,
29
+ subtree: true,
30
+ });
31
+ return () => observer.disconnect();
23
32
  }, [open, handleCloseMenu]);
24
33
  (0, react_1.useEffect)(() => {
34
+ const errorService = ErrorService_1.ErrorService.getInstance();
25
35
  if (!Menu && !menuList && !exitButton) {
26
- // biome-ignore lint/suspicious/noConsole: Ошибка для интеграторов
27
- console.error('Profile должен иметь один из следующих props: menu, menuList, exitButton');
36
+ errorService.logError('Profile', 'Profile должен иметь один из следующих props: menu, menuList, exitButton');
28
37
  }
29
38
  }, []);
30
39
  const hidePersonalDataClassname = (0, personalDataSecurity_1.useHidePersonalData)({
@@ -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
  `;
@@ -1,5 +1,4 @@
1
1
  import { type TooltipProps as MuiTooltipProps } from '@mui/material/Tooltip';
2
- import { type CSSProperties } from 'react';
3
2
  import { type WithoutEmotionSpecific } from '../types/WithoutEmotionSpecific';
4
3
  export type TooltipSize = 'small' | 'medium';
5
4
  export type TooltipProps = WithoutEmotionSpecific<MuiTooltipProps> & {
@@ -13,8 +12,4 @@ export type TooltipProps = WithoutEmotionSpecific<MuiTooltipProps> & {
13
12
  * @example <Tooltip withoutContainer={false} ...><Button disabled></Tooltip>
14
13
  */
15
14
  withoutContainer?: boolean;
16
- /**
17
- * Задает ширину тултипа и снимает ограничение на максимальную ширину
18
- */
19
- width?: CSSProperties['width'];
20
15
  };
@@ -1,4 +1,5 @@
1
- import { type CSSProperties } from 'react';
1
+ /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  import { type TooltipProps } from '../types';
3
4
  export declare const useLogic: (props: TooltipProps) => {
4
5
  components?: {
@@ -26,6 +27,7 @@ export declare const useLogic: (props: TooltipProps) => {
26
27
  nonce?: string | undefined;
27
28
  slot?: string | undefined;
28
29
  spellCheck?: (boolean | "true" | "false") | undefined;
30
+ style?: import("react").CSSProperties | undefined;
29
31
  tabIndex?: number | undefined;
30
32
  title: import("react").ReactNode;
31
33
  translate?: "yes" | "no" | undefined;
@@ -323,13 +325,11 @@ export declare const useLogic: (props: TooltipProps) => {
323
325
  leaveDelay?: number | undefined;
324
326
  leaveTouchDelay?: number | undefined;
325
327
  onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
326
- placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
328
+ placement?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | undefined;
327
329
  PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
328
330
  PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
329
331
  size?: import("../types").TooltipSize | undefined;
330
332
  withoutContainer?: boolean | undefined;
331
333
  children: import("react").ReactElement<any, any>;
332
334
  className: string;
333
- tooltipStyle: CSSProperties;
334
- width: import("csstype").Property.Width<string | number> | undefined;
335
335
  };
@@ -4,22 +4,16 @@ 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, width, style, ...restProps } = props;
7
+ const { children, className: propClassName, ...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
- };
18
14
  return {
19
15
  children,
20
16
  className,
21
- tooltipStyle,
22
- width,
23
17
  ...restProps,
24
18
  };
25
19
  };