@centreon/ui 25.1.11 → 25.2.0
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/package.json
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
ButtonProps,
|
|
3
|
+
DialogContentText,
|
|
4
|
+
DialogContentTextProps,
|
|
5
|
+
Typography
|
|
6
|
+
} from '@mui/material';
|
|
2
7
|
|
|
3
8
|
import Dialog, { Props as DialogProps } from '..';
|
|
4
9
|
|
|
@@ -8,7 +13,7 @@ type Props = DialogProps & {
|
|
|
8
13
|
labelSecondMessage?: string | null;
|
|
9
14
|
restCancelButtonProps?: ButtonProps;
|
|
10
15
|
restConfirmButtonProps?: ButtonProps;
|
|
11
|
-
dialogContentTextProps?:DialogContentTextProps
|
|
16
|
+
dialogContentTextProps?: DialogContentTextProps;
|
|
12
17
|
};
|
|
13
18
|
|
|
14
19
|
const Confirm = ({
|
package/src/Dialog/index.tsx
CHANGED
|
@@ -38,7 +38,7 @@ export type Props = {
|
|
|
38
38
|
className?: string;
|
|
39
39
|
confirmDisabled?: boolean;
|
|
40
40
|
contentWidth?: number;
|
|
41
|
-
dialogTitleProps?:DialogTitleProps
|
|
41
|
+
dialogTitleProps?: DialogTitleProps;
|
|
42
42
|
dialogActionsClassName?: string;
|
|
43
43
|
dialogConfirmButtonClassName?: string;
|
|
44
44
|
dialogContentClassName?: string;
|
|
@@ -93,7 +93,9 @@ const Dialog = ({
|
|
|
93
93
|
{...rest}
|
|
94
94
|
>
|
|
95
95
|
{labelTitle && (
|
|
96
|
-
<DialogTitle className={dialogTitleClassName} {...dialogTitleProps}>
|
|
96
|
+
<DialogTitle className={dialogTitleClassName} {...dialogTitleProps}>
|
|
97
|
+
{labelTitle}
|
|
98
|
+
</DialogTitle>
|
|
97
99
|
)}
|
|
98
100
|
{children && (
|
|
99
101
|
<DialogContent
|
|
@@ -183,10 +183,10 @@ const DraggableAutocomplete = (
|
|
|
183
183
|
helperText={error}
|
|
184
184
|
textFieldSlotsAndSlotProps={{
|
|
185
185
|
slotProps: {
|
|
186
|
-
input:{
|
|
186
|
+
input: {
|
|
187
187
|
...renderProps?.InputProps
|
|
188
188
|
},
|
|
189
|
-
inputLabel:{
|
|
189
|
+
inputLabel: {
|
|
190
190
|
...renderProps?.inputLabel
|
|
191
191
|
},
|
|
192
192
|
htmlInput: {
|
|
@@ -7,7 +7,9 @@ import {
|
|
|
7
7
|
Accordion,
|
|
8
8
|
AccordionDetails,
|
|
9
9
|
AccordionSummary,
|
|
10
|
-
|
|
10
|
+
AccordionSummaryProps,
|
|
11
|
+
Typography,
|
|
12
|
+
TypographyProps
|
|
11
13
|
} from '@mui/material';
|
|
12
14
|
|
|
13
15
|
import { useCollapsibleItemStyles } from './useCollapsibleItemStyles';
|
|
@@ -18,6 +20,7 @@ export interface Props {
|
|
|
18
20
|
dataTestId?: string;
|
|
19
21
|
defaultExpanded?: boolean;
|
|
20
22
|
title: string | JSX.Element;
|
|
23
|
+
titleProps?: TypographyProps;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
export const CollapsibleItem = ({
|
|
@@ -25,8 +28,10 @@ export const CollapsibleItem = ({
|
|
|
25
28
|
children,
|
|
26
29
|
defaultExpanded,
|
|
27
30
|
compact = false,
|
|
28
|
-
dataTestId = ''
|
|
29
|
-
|
|
31
|
+
dataTestId = '',
|
|
32
|
+
titleProps,
|
|
33
|
+
...rest
|
|
34
|
+
}: Props & AccordionSummaryProps): JSX.Element => {
|
|
30
35
|
const { classes, cx } = useCollapsibleItemStyles();
|
|
31
36
|
|
|
32
37
|
const isStringTitle = equals(type(title), 'String');
|
|
@@ -56,9 +61,10 @@ export const CollapsibleItem = ({
|
|
|
56
61
|
}}
|
|
57
62
|
data-testid={`${dataTestId}-summary`}
|
|
58
63
|
expandIcon={<ExpandMoreIcon color="primary" />}
|
|
64
|
+
{...rest}
|
|
59
65
|
>
|
|
60
66
|
{isStringTitle && (
|
|
61
|
-
<Typography color="primary" variant="h6">
|
|
67
|
+
<Typography color="primary" variant="h6" {...titleProps}>
|
|
62
68
|
{title}
|
|
63
69
|
</Typography>
|
|
64
70
|
)}
|