@max-ts/components 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/ActionGroup/SecondaryActions/SecondaryActions.d.ts +1 -1
- package/lib/components/ListItemButton/ListItemButton.d.ts +4 -3
- package/lib/components/NavMenu/Item/ItemButton/styles.d.ts +1 -0
- package/lib/components/Profile/MenuList/MenuList.d.ts +0 -3
- package/lib/components/Profile/MenuList/styles.d.ts +2 -2
- package/lib/components/Profile/Profile.d.ts +3 -9
- package/lib/index.mjs +1939 -1951
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementType } from 'react';
|
|
2
2
|
import { ListItemButtonProps, TooltipProps } from '../..';
|
|
3
|
-
export type SecondaryAction<TSecondaryActionComponent extends ElementType> =
|
|
3
|
+
export type SecondaryAction<TSecondaryActionComponent extends ElementType> = ListItemButtonProps<TSecondaryActionComponent> & {
|
|
4
4
|
/**
|
|
5
5
|
* Название действия
|
|
6
6
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ListItemButtonProps as MuiListItemButtonProps } from '@mui/material';
|
|
2
2
|
import { ElementType } from 'react';
|
|
3
3
|
import { TooltipProps } from '../Tooltip';
|
|
4
4
|
import { WithoutEmotionSpecific } from '../types';
|
|
5
|
-
export type ListItemButtonProps<RootComponent extends React.ElementType
|
|
5
|
+
export type ListItemButtonProps<RootComponent extends React.ElementType> = Omit<WithoutEmotionSpecific<MuiListItemButtonProps<RootComponent>>, 'disableRipple'> & {
|
|
6
6
|
tooltipPlacement?: TooltipProps['placement'];
|
|
7
7
|
/**
|
|
8
8
|
* Текст тултипа при заблокированном состоянии элемента меню
|
|
@@ -16,5 +16,6 @@ export type ListItemButtonProps<RootComponent extends React.ElementType = ListIt
|
|
|
16
16
|
* withoutContainer необходим для обратной совместимости и рендерит компонент без тега li
|
|
17
17
|
*/
|
|
18
18
|
withoutContainer?: boolean;
|
|
19
|
+
component?: RootComponent;
|
|
19
20
|
};
|
|
20
|
-
export declare const ListItemButton: <RootComponent extends React.ElementType = ElementType
|
|
21
|
+
export declare const ListItemButton: <RootComponent extends React.ElementType = ElementType>(props: ListItemButtonProps<RootComponent>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,7 @@ export declare const StyledListItemButton: import('@emotion/styled').StyledCompo
|
|
|
3
3
|
disabledReason?: string;
|
|
4
4
|
note?: string;
|
|
5
5
|
withoutContainer?: boolean;
|
|
6
|
+
component?: import('react').ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
6
7
|
} & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
|
|
7
8
|
$isGroupTitleItem: boolean;
|
|
8
9
|
}, {}, {}>;
|
|
@@ -2,9 +2,6 @@ import { MenuProps as MuiMenuProps } from '@mui/material';
|
|
|
2
2
|
import { ProfileMenuItemData } from '../Profile';
|
|
3
3
|
type MenuListProps = MuiMenuProps & {
|
|
4
4
|
menuList?: Array<ProfileMenuItemData>;
|
|
5
|
-
exitButton?: {
|
|
6
|
-
onClick: () => void;
|
|
7
|
-
};
|
|
8
5
|
};
|
|
9
6
|
/**
|
|
10
7
|
* Компонент для рендера menu с помощью массива данных
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const StyledMenu: import('@emotion/styled').StyledComponent<import('../../types').WithoutEmotionSpecific<import('@mui/material').MenuProps> & {
|
|
2
2
|
title?: string;
|
|
3
3
|
} & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const StyledMenuItem: import('@emotion/styled').StyledComponent<import('../../types').WithoutEmotionSpecific<import('@mui/material').MenuItemProps<import('react').ElementType>> & {
|
|
5
5
|
disabledReason?: string;
|
|
6
6
|
note?: string;
|
|
7
7
|
tooltipPlacement?: import('../..').TooltipProps["placement"];
|
|
8
8
|
component?: import('react').ElementType | undefined;
|
|
9
9
|
href?: string;
|
|
10
10
|
} & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
|
|
11
|
-
$
|
|
11
|
+
$divider?: boolean;
|
|
12
12
|
}, {}, {}>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { AvatarProps, MenuProps } from '@mui/material';
|
|
2
|
-
import {
|
|
2
|
+
import { PropsWithChildren, ReactElement, ReactNode } from 'react';
|
|
3
3
|
import { WithoutEmotionSpecific } from '../types';
|
|
4
4
|
export type ProfileMenuItemData = {
|
|
5
5
|
icon: ReactNode;
|
|
6
6
|
title: ReactNode;
|
|
7
7
|
onClick?: () => void;
|
|
8
|
+
divider?: boolean;
|
|
8
9
|
/**
|
|
9
10
|
* @example
|
|
10
11
|
* const renderItem: ProfileMenuItemData['render'] = ({ title, icon }) => (
|
|
@@ -16,7 +17,7 @@ export type ProfileMenuItemData = {
|
|
|
16
17
|
* </MenuItem>
|
|
17
18
|
* );
|
|
18
19
|
*/
|
|
19
|
-
render?:
|
|
20
|
+
render?: (props: Omit<ProfileMenuItemData, 'render'>) => React.ReactElement;
|
|
20
21
|
};
|
|
21
22
|
export type ProfileProps = {
|
|
22
23
|
/**
|
|
@@ -39,12 +40,5 @@ export type ProfileProps = {
|
|
|
39
40
|
* Рендер menu через массив данных. Перекрывает menu и может использоваться с exitButton
|
|
40
41
|
*/
|
|
41
42
|
menuList?: Array<ProfileMenuItemData>;
|
|
42
|
-
/**
|
|
43
|
-
* Отображение кнопки выхода и действие на нее
|
|
44
|
-
*/
|
|
45
|
-
exitButton?: {
|
|
46
|
-
onClick: () => void;
|
|
47
|
-
};
|
|
48
43
|
};
|
|
49
44
|
export declare const Profile: (props: ProfileProps) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
-
export default Profile;
|