@moderneinc/design-system-components 7.7.0-alpha.6aac59 → 7.7.0-alpha.734c3e
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/README.md +21 -0
- package/dist/DataGrid/DataGrid.d.ts +2 -2
- package/dist/InputField/InputField.d.ts +3 -3
- package/dist/ModActionsCell/ModActionsCell.d.ts +2 -2
- package/dist/PageContent/PageContent.d.ts +7 -1
- package/dist/Tabs/Tabs.d.ts +3 -2
- package/dist/Toolbar/Toolbar.d.ts +7 -1
- package/dist/Tooltip/Tooltip.d.ts +2 -2
- package/dist/Tree/Tree.d.ts +11 -0
- package/dist/TypologyControl/TypologyControl.d.ts +1 -1
- package/dist/index.d.ts +55 -13
- package/dist/index.esm.js +814 -90
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +811 -85
- package/dist/index.js.map +1 -1
- package/dist/utils/OverflowActions.d.ts +14 -0
- package/dist/utils/responsive.d.ts +26 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -57,6 +57,27 @@ a `var()` reference rather than a hex string:
|
|
|
57
57
|
`color-mix(in srgb, ${semanticColors.border.primary} 50%, transparent)`
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
## Theme breakpoints
|
|
61
|
+
|
|
62
|
+
Below `md` the components switch to their phone and tablet layouts (44px touch targets,
|
|
63
|
+
full-screen dialogs, bottom-sheet grid panels). They read `md` and `sm` from your MUI theme, so map
|
|
64
|
+
the token values into it:
|
|
65
|
+
|
|
66
|
+
```javascript
|
|
67
|
+
import { breakpoints } from '@moderneinc/design-system-tokens';
|
|
68
|
+
|
|
69
|
+
createTheme({
|
|
70
|
+
breakpoints: {
|
|
71
|
+
values: { xs: 0, sm: breakpoints.sm, md: breakpoints.md, lg: breakpoints.lg, xl: breakpoints.xl },
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
On MUI's defaults (`md` 900) the compact layouts start at 900px instead of 960px. To switch your
|
|
77
|
+
own layouts at the same point, use `useIsCompact()`, which runs the same query. To give your own
|
|
78
|
+
small control the same 44px hit area below `md` without changing how it looks, spread
|
|
79
|
+
`touchTarget(theme)` into its styles.
|
|
80
|
+
|
|
60
81
|
## Development
|
|
61
82
|
|
|
62
83
|
This package is part of the design-system monorepo.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DataGridProProps, type GridDensity, type GridSlots } from '@mui/x-data-grid-pro';
|
|
2
|
-
import type
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
3
|
export type DataGridSize = GridDensity;
|
|
4
4
|
export interface ModDataGridProps extends Omit<DataGridProProps, 'slots'> {
|
|
5
5
|
/**
|
|
@@ -52,7 +52,7 @@ export interface ModDataGridProps extends Omit<DataGridProProps, 'slots'> {
|
|
|
52
52
|
* footerOffsetSelector="#page-footer"
|
|
53
53
|
* />
|
|
54
54
|
*/
|
|
55
|
-
export declare function ModDataGrid({ autoHeight, toolbar, slots, sx, density, slotProps: userSlotProps, ...props }: ModDataGridProps): import("react").JSX.Element;
|
|
55
|
+
export declare function ModDataGrid({ autoHeight, toolbar, slots, sx, density: densityProp, slotProps: userSlotProps, columns: columnsProp, ...props }: ModDataGridProps): import("react").JSX.Element;
|
|
56
56
|
export declare namespace ModDataGrid {
|
|
57
57
|
var displayName: string;
|
|
58
58
|
}
|
|
@@ -2,15 +2,15 @@ import { type InputBaseProps } from '@mui/material/InputBase';
|
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
type InputFieldSize = 'small' | 'medium';
|
|
4
4
|
export type { InputFieldSize as ModInputFieldSize };
|
|
5
|
-
export declare const StyledFormControl: import("@emotion/styled").StyledComponent<import("@mui/material").FormControlOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "
|
|
5
|
+
export declare const StyledFormControl: import("@emotion/styled").StyledComponent<import("@mui/material").FormControlOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "color" | "margin" | "style" | "disabled" | "size" | "classes" | "className" | "children" | "sx" | "required" | "error" | "variant" | "fullWidth" | "focused" | "hiddenLabel"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
6
6
|
size?: InputFieldSize;
|
|
7
7
|
}, {}, {}>;
|
|
8
|
-
export declare const StyledInputLabel: import("@emotion/styled").StyledComponent<import("@mui/material").InputLabelOwnProps & Pick<import("@mui/material").FormLabelOwnProps, "color" | "filled"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "
|
|
8
|
+
export declare const StyledInputLabel: import("@emotion/styled").StyledComponent<import("@mui/material").InputLabelOwnProps & Pick<import("@mui/material").FormLabelOwnProps, "color" | "filled"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "color" | "margin" | "style" | "disabled" | "size" | "classes" | "className" | "children" | "sx" | "required" | "filled" | "error" | "variant" | "focused" | "disableAnimation" | "shrink"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
9
9
|
size?: InputFieldSize;
|
|
10
10
|
infoIcon?: boolean;
|
|
11
11
|
}, {}, {}>;
|
|
12
12
|
export declare const InfoIconWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
13
|
-
export declare const StyledFormHelperText: import("@emotion/styled").StyledComponent<import("@mui/material").FormHelperTextOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "
|
|
13
|
+
export declare const StyledFormHelperText: import("@emotion/styled").StyledComponent<import("@mui/material").FormHelperTextOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "margin" | "style" | "disabled" | "classes" | "className" | "children" | "sx" | "required" | "filled" | "error" | "variant" | "focused"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
14
14
|
size?: InputFieldSize;
|
|
15
15
|
}, {}, {}>;
|
|
16
16
|
export interface ModInputFieldProps extends Omit<InputBaseProps, 'size'> {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { GridRenderCellParams } from '@mui/x-data-grid';
|
|
2
|
-
import type
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
3
|
export interface ModActionsCellProps extends Omit<GridRenderCellParams, 'api'> {
|
|
4
4
|
api?: GridRenderCellParams['api'];
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
position?: 'bottom-end' | 'bottom-start' | 'top-end' | 'top-start';
|
|
7
7
|
suppressChildrenValidation?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare function ModActionsCell(props: ModActionsCellProps): import("react").JSX.Element;
|
|
9
|
+
export declare function ModActionsCell({ children, ...props }: ModActionsCellProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BoxProps } from '@mui/material/Box';
|
|
2
2
|
import type { Breakpoint } from '@mui/material/styles';
|
|
3
3
|
import type { ElementType, ReactNode } from 'react';
|
|
4
|
+
import { type ModAction } from '../utils/OverflowActions';
|
|
4
5
|
/**
|
|
5
6
|
* Breadcrumb item configuration
|
|
6
7
|
*/
|
|
@@ -49,6 +50,11 @@ export interface ModPageContentProps extends BoxProps {
|
|
|
49
50
|
* Action button displayed in the top-right corner
|
|
50
51
|
*/
|
|
51
52
|
action?: ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* Structured actions shown after `action`. Below `md`, all but the first move into a
|
|
55
|
+
* "More actions" menu.
|
|
56
|
+
*/
|
|
57
|
+
actions?: ModAction[];
|
|
52
58
|
/**
|
|
53
59
|
* Make header sticky on scroll
|
|
54
60
|
* @default false
|
|
@@ -144,7 +150,7 @@ export interface ModPageContentProps extends BoxProps {
|
|
|
144
150
|
* </ModPageContent>
|
|
145
151
|
* ```
|
|
146
152
|
*/
|
|
147
|
-
export declare function ModPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky, contentMaxWidth: contentMaxWidthProp, centerContent, disableGutters: disableGuttersProp, isLoading, showBackToTop, layout, children, sx, ...boxProps }: ModPageContentProps): import("react").JSX.Element;
|
|
153
|
+
export declare function ModPageContent({ pageTitle, subtitle, breadcrumbs, action, actions, sticky, contentMaxWidth: contentMaxWidthProp, centerContent, disableGutters: disableGuttersProp, isLoading, showBackToTop, layout, children, sx, ...boxProps }: ModPageContentProps): import("react").JSX.Element;
|
|
148
154
|
export declare namespace ModPageContent {
|
|
149
155
|
var displayName: string;
|
|
150
156
|
}
|
package/dist/Tabs/Tabs.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type TabProps } from '@mui/material/Tab';
|
|
2
|
-
import type
|
|
2
|
+
import { type TabsProps } from '@mui/material/Tabs';
|
|
3
|
+
import { type ReactNode } from 'react';
|
|
3
4
|
/**
|
|
4
5
|
* ModTabs - Tabs container component based on MUI Tabs
|
|
5
6
|
*/
|
|
6
|
-
export declare const ModTabs: import("
|
|
7
|
+
export declare const ModTabs: import("react").ForwardRefExoticComponent<Omit<TabsProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
8
|
export interface ModTabProps extends Omit<TabProps, 'label'> {
|
|
8
9
|
/**
|
|
9
10
|
* The label for the tab
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { type ToolbarProps } from '@mui/x-data-grid';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
+
import { type ModAction } from '../utils/OverflowActions';
|
|
3
4
|
export interface ModToolbarProps extends ToolbarProps {
|
|
4
5
|
/**
|
|
5
6
|
* Toolbar content (typically ModQuickFilter, ModButton, ModToggle, etc.)
|
|
6
7
|
*/
|
|
7
8
|
children?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Structured actions rendered after `children`. Below `md`, all but the first move into a
|
|
11
|
+
* "More actions" menu.
|
|
12
|
+
*/
|
|
13
|
+
actions?: ModAction[];
|
|
8
14
|
}
|
|
9
15
|
/**
|
|
10
16
|
* ModToolbar - Styled toolbar component for data grid controls
|
|
@@ -46,6 +52,6 @@ export interface ModToolbarProps extends ToolbarProps {
|
|
|
46
52
|
* </ModToolbar>
|
|
47
53
|
*/
|
|
48
54
|
export declare const ModToolbar: {
|
|
49
|
-
({ children, ...props }: ModToolbarProps): import("react").JSX.Element;
|
|
55
|
+
({ children, actions, ...props }: ModToolbarProps): import("react").JSX.Element;
|
|
50
56
|
displayName: string;
|
|
51
57
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type TooltipProps } from '@mui/material/Tooltip';
|
|
2
|
-
import type
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* Variant type for ModTooltip
|
|
5
5
|
*/
|
|
@@ -39,7 +39,7 @@ export interface ModTooltipProps extends Omit<TooltipProps, 'title' | 'variant'>
|
|
|
39
39
|
* - Typography: semanticTypography.tooltip (12px/1.5 line-height), fontWeight.semiBold (600) for the title
|
|
40
40
|
*/
|
|
41
41
|
export declare const ModTooltip: {
|
|
42
|
-
({ variant, title, description, children, arrow, placement, describeChild, ...props }: ModTooltipProps): import("react").JSX.Element;
|
|
42
|
+
({ variant, title, description, children, arrow, placement, describeChild, slotProps, ...props }: ModTooltipProps): import("react").JSX.Element;
|
|
43
43
|
displayName: string;
|
|
44
44
|
};
|
|
45
45
|
export {};
|
package/dist/Tree/Tree.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { type TreeItemProps } from '@mui/x-tree-view/TreeItem';
|
|
2
2
|
import { type RichTreeViewProProps } from '@mui/x-tree-view-pro/RichTreeViewPro';
|
|
3
3
|
import { type ReactNode } from 'react';
|
|
4
|
+
import type { ModAction } from '../utils/OverflowActions';
|
|
5
|
+
/** End actions render icon-only, so each needs an icon. */
|
|
6
|
+
type IconAction = ModAction & {
|
|
7
|
+
icon: ReactNode;
|
|
8
|
+
};
|
|
4
9
|
/**
|
|
5
10
|
* Extended item data that ModTreeItem can read from the items array.
|
|
6
11
|
* Consumers pass these via the `items` prop on ModTreeView.
|
|
@@ -12,6 +17,11 @@ export interface ModTreeItemData {
|
|
|
12
17
|
checkbox?: ReactNode;
|
|
13
18
|
secondaryLabel?: ReactNode;
|
|
14
19
|
endAction?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Trailing actions, each an icon button labelled by `label`. Below `md` they collapse into one
|
|
22
|
+
* "More actions" menu so every row keeps a single full-size touch target.
|
|
23
|
+
*/
|
|
24
|
+
endActions?: IconAction[];
|
|
15
25
|
statusIcon?: ReactNode;
|
|
16
26
|
children?: ModTreeItemData[];
|
|
17
27
|
}
|
|
@@ -36,3 +46,4 @@ export declare const ModTreeView: {
|
|
|
36
46
|
({ slots, ...props }: ModTreeViewProps): import("react").JSX.Element;
|
|
37
47
|
displayName: string;
|
|
38
48
|
};
|
|
49
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ToggleButtonGroupProps } from '@mui/material/ToggleButtonGroup';
|
|
2
|
-
declare const StyledToggleButton: import("@emotion/styled").StyledComponent<import("@mui/material").ToggleButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, keyof import("@mui/material").ToggleButtonOwnProps> & Omit<import("@mui/material").ButtonBaseOwnProps, "type" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "nativeButton" | "onFocusVisible" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | keyof import("@mui/material").ToggleButtonOwnProps> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "
|
|
2
|
+
declare const StyledToggleButton: import("@emotion/styled").StyledComponent<import("@mui/material").ToggleButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, keyof import("@mui/material").ToggleButtonOwnProps> & Omit<import("@mui/material").ButtonBaseOwnProps, "type" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "nativeButton" | "onFocusVisible" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | keyof import("@mui/material").ToggleButtonOwnProps> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "style" | "disabled" | "size" | "classes" | "type" | "className" | "action" | "centerRipple" | "children" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "nativeButton" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "value" | "onChange" | "onClick" | "disableFocusRipple" | "fullWidth" | "selected"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
3
3
|
export interface ModTypologyControlProps extends Omit<ToggleButtonGroupProps, 'orientation'> {
|
|
4
4
|
}
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import react__default, { ReactNode, ElementType, HTMLAttributes, ComponentPropsWithoutRef, ComponentType, FunctionComponent } from 'react';
|
|
2
|
+
import react__default, { ReactNode, ElementType, HTMLAttributes, ComponentPropsWithoutRef, ComponentType, ComponentProps, FunctionComponent } from 'react';
|
|
3
3
|
import { GridColumnsPanelProps, GridDensity as GridDensity$1, DataGridProProps, GridSlots } from '@mui/x-data-grid-pro';
|
|
4
4
|
import { GridDensity, GridFilterPanel, GridSlotsComponent, GridSlotProps, GridRenderCellParams, ToolbarProps } from '@mui/x-data-grid';
|
|
5
5
|
import { AlertProps } from '@mui/material/Alert';
|
|
@@ -11,7 +11,7 @@ import { ToggleButtonGroupProps } from '@mui/material/ToggleButtonGroup';
|
|
|
11
11
|
import { SvgIconProps } from '@mui/material/SvgIcon';
|
|
12
12
|
import { CardProps } from '@mui/material/Card';
|
|
13
13
|
import { CheckboxProps } from '@mui/material/Checkbox';
|
|
14
|
-
import { SxProps, Theme, Breakpoint } from '@mui/material/styles';
|
|
14
|
+
import { SxProps, Theme, Breakpoint, CSSObject } from '@mui/material/styles';
|
|
15
15
|
import { DatePickerProps } from '@mui/x-date-pickers/DatePicker';
|
|
16
16
|
import { PickersShortcutsItem } from '@mui/x-date-pickers/PickersShortcuts';
|
|
17
17
|
import { DateRangePickerProps } from '@mui/x-date-pickers-pro/DateRangePicker';
|
|
@@ -32,14 +32,15 @@ import { BoxProps as BoxProps$1 } from '@mui/material';
|
|
|
32
32
|
import { SelectProps, SelectChangeEvent } from '@mui/material/Select';
|
|
33
33
|
import { SkeletonProps } from '@mui/material/Skeleton';
|
|
34
34
|
import { TableProps } from '@mui/material/Table';
|
|
35
|
-
import * as _mui_system from '@mui/system';
|
|
36
|
-
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
37
35
|
import { TabProps } from '@mui/material/Tab';
|
|
36
|
+
import { TabsProps } from '@mui/material/Tabs';
|
|
38
37
|
import Button from '@mui/material/Button';
|
|
39
38
|
import { SwitchProps } from '@mui/material/Switch';
|
|
40
39
|
import { TooltipProps } from '@mui/material/Tooltip';
|
|
41
40
|
import { TreeItemProps } from '@mui/x-tree-view/TreeItem';
|
|
42
41
|
import { RichTreeViewProProps } from '@mui/x-tree-view-pro/RichTreeViewPro';
|
|
42
|
+
import * as _mui_system from '@mui/system';
|
|
43
|
+
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
46
|
* ModDataGridColumnsPanel - Custom columns panel for ModDataGrid
|
|
@@ -890,7 +891,7 @@ interface ModDataGridProps extends Omit<DataGridProProps, 'slots'> {
|
|
|
890
891
|
* footerOffsetSelector="#page-footer"
|
|
891
892
|
* />
|
|
892
893
|
*/
|
|
893
|
-
declare function ModDataGrid({ autoHeight, toolbar, slots, sx, density, slotProps: userSlotProps, ...props }: ModDataGridProps): react.JSX.Element;
|
|
894
|
+
declare function ModDataGrid({ autoHeight, toolbar, slots, sx, density: densityProp, slotProps: userSlotProps, columns: columnsProp, ...props }: ModDataGridProps): react.JSX.Element;
|
|
894
895
|
declare namespace ModDataGrid {
|
|
895
896
|
var displayName: string;
|
|
896
897
|
}
|
|
@@ -1906,7 +1907,7 @@ interface ModActionsCellProps extends Omit<GridRenderCellParams, 'api'> {
|
|
|
1906
1907
|
position?: 'bottom-end' | 'bottom-start' | 'top-end' | 'top-start';
|
|
1907
1908
|
suppressChildrenValidation?: boolean;
|
|
1908
1909
|
}
|
|
1909
|
-
declare function ModActionsCell(props: ModActionsCellProps): react.JSX.Element;
|
|
1910
|
+
declare function ModActionsCell({ children, ...props }: ModActionsCellProps): react.JSX.Element;
|
|
1910
1911
|
|
|
1911
1912
|
type ModAvatarCellBase = {
|
|
1912
1913
|
disabled?: boolean;
|
|
@@ -2234,6 +2235,15 @@ declare namespace ModNavigationItem {
|
|
|
2234
2235
|
var displayName: string;
|
|
2235
2236
|
}
|
|
2236
2237
|
|
|
2238
|
+
type ModAction = {
|
|
2239
|
+
id: string;
|
|
2240
|
+
label: string;
|
|
2241
|
+
icon?: ReactNode;
|
|
2242
|
+
onClick: () => void;
|
|
2243
|
+
disabled?: boolean;
|
|
2244
|
+
variant?: ComponentProps<typeof ModButton>['variant'];
|
|
2245
|
+
};
|
|
2246
|
+
|
|
2237
2247
|
/**
|
|
2238
2248
|
* Breadcrumb item configuration
|
|
2239
2249
|
*/
|
|
@@ -2282,6 +2292,11 @@ interface ModPageContentProps extends BoxProps {
|
|
|
2282
2292
|
* Action button displayed in the top-right corner
|
|
2283
2293
|
*/
|
|
2284
2294
|
action?: ReactNode;
|
|
2295
|
+
/**
|
|
2296
|
+
* Structured actions shown after `action`. Below `md`, all but the first move into a
|
|
2297
|
+
* "More actions" menu.
|
|
2298
|
+
*/
|
|
2299
|
+
actions?: ModAction[];
|
|
2285
2300
|
/**
|
|
2286
2301
|
* Make header sticky on scroll
|
|
2287
2302
|
* @default false
|
|
@@ -2377,7 +2392,7 @@ interface ModPageContentProps extends BoxProps {
|
|
|
2377
2392
|
* </ModPageContent>
|
|
2378
2393
|
* ```
|
|
2379
2394
|
*/
|
|
2380
|
-
declare function ModPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky, contentMaxWidth: contentMaxWidthProp, centerContent, disableGutters: disableGuttersProp, isLoading, showBackToTop, layout, children, sx, ...boxProps }: ModPageContentProps): react.JSX.Element;
|
|
2395
|
+
declare function ModPageContent({ pageTitle, subtitle, breadcrumbs, action, actions, sticky, contentMaxWidth: contentMaxWidthProp, centerContent, disableGutters: disableGuttersProp, isLoading, showBackToTop, layout, children, sx, ...boxProps }: ModPageContentProps): react.JSX.Element;
|
|
2381
2396
|
declare namespace ModPageContent {
|
|
2382
2397
|
var displayName: string;
|
|
2383
2398
|
}
|
|
@@ -2841,7 +2856,7 @@ declare const ModTabPanel: {
|
|
|
2841
2856
|
/**
|
|
2842
2857
|
* ModTabs - Tabs container component based on MUI Tabs
|
|
2843
2858
|
*/
|
|
2844
|
-
declare const ModTabs:
|
|
2859
|
+
declare const ModTabs: react.ForwardRefExoticComponent<Omit<TabsProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
2845
2860
|
interface ModTabProps extends Omit<TabProps, 'label'> {
|
|
2846
2861
|
/**
|
|
2847
2862
|
* The label for the tab
|
|
@@ -3047,6 +3062,11 @@ interface ModToolbarProps extends ToolbarProps {
|
|
|
3047
3062
|
* Toolbar content (typically ModQuickFilter, ModButton, ModToggle, etc.)
|
|
3048
3063
|
*/
|
|
3049
3064
|
children?: ReactNode;
|
|
3065
|
+
/**
|
|
3066
|
+
* Structured actions rendered after `children`. Below `md`, all but the first move into a
|
|
3067
|
+
* "More actions" menu.
|
|
3068
|
+
*/
|
|
3069
|
+
actions?: ModAction[];
|
|
3050
3070
|
}
|
|
3051
3071
|
/**
|
|
3052
3072
|
* ModToolbar - Styled toolbar component for data grid controls
|
|
@@ -3088,7 +3108,7 @@ interface ModToolbarProps extends ToolbarProps {
|
|
|
3088
3108
|
* </ModToolbar>
|
|
3089
3109
|
*/
|
|
3090
3110
|
declare const ModToolbar: {
|
|
3091
|
-
({ children, ...props }: ModToolbarProps): react.JSX.Element;
|
|
3111
|
+
({ children, actions, ...props }: ModToolbarProps): react.JSX.Element;
|
|
3092
3112
|
displayName: string;
|
|
3093
3113
|
};
|
|
3094
3114
|
|
|
@@ -3131,10 +3151,14 @@ interface ModTooltipProps extends Omit<TooltipProps, 'title' | 'variant'> {
|
|
|
3131
3151
|
* - Typography: semanticTypography.tooltip (12px/1.5 line-height), fontWeight.semiBold (600) for the title
|
|
3132
3152
|
*/
|
|
3133
3153
|
declare const ModTooltip: {
|
|
3134
|
-
({ variant, title, description, children, arrow, placement, describeChild, ...props }: ModTooltipProps): react.JSX.Element;
|
|
3154
|
+
({ variant, title, description, children, arrow, placement, describeChild, slotProps, ...props }: ModTooltipProps): react.JSX.Element;
|
|
3135
3155
|
displayName: string;
|
|
3136
3156
|
};
|
|
3137
3157
|
|
|
3158
|
+
/** End actions render icon-only, so each needs an icon. */
|
|
3159
|
+
type IconAction = ModAction & {
|
|
3160
|
+
icon: ReactNode;
|
|
3161
|
+
};
|
|
3138
3162
|
/**
|
|
3139
3163
|
* Extended item data that ModTreeItem can read from the items array.
|
|
3140
3164
|
* Consumers pass these via the `items` prop on ModTreeView.
|
|
@@ -3146,6 +3170,11 @@ interface ModTreeItemData {
|
|
|
3146
3170
|
checkbox?: ReactNode;
|
|
3147
3171
|
secondaryLabel?: ReactNode;
|
|
3148
3172
|
endAction?: ReactNode;
|
|
3173
|
+
/**
|
|
3174
|
+
* Trailing actions, each an icon button labelled by `label`. Below `md` they collapse into one
|
|
3175
|
+
* "More actions" menu so every row keeps a single full-size touch target.
|
|
3176
|
+
*/
|
|
3177
|
+
endActions?: IconAction[];
|
|
3149
3178
|
statusIcon?: ReactNode;
|
|
3150
3179
|
children?: ModTreeItemData[];
|
|
3151
3180
|
}
|
|
@@ -3171,7 +3200,7 @@ declare const ModTreeView: {
|
|
|
3171
3200
|
displayName: string;
|
|
3172
3201
|
};
|
|
3173
3202
|
|
|
3174
|
-
declare const StyledToggleButton: StyledComponent<_mui_material.ToggleButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, keyof _mui_material.ToggleButtonOwnProps> & Omit<_mui_material.ButtonBaseOwnProps, "type" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "nativeButton" | "onFocusVisible" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | keyof _mui_material.ToggleButtonOwnProps> & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "
|
|
3203
|
+
declare const StyledToggleButton: StyledComponent<_mui_material.ToggleButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, keyof _mui_material.ToggleButtonOwnProps> & Omit<_mui_material.ButtonBaseOwnProps, "type" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "nativeButton" | "onFocusVisible" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | keyof _mui_material.ToggleButtonOwnProps> & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "style" | "disabled" | "size" | "classes" | "type" | "className" | "action" | "centerRipple" | "children" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "nativeButton" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "value" | "onChange" | "onClick" | "disableFocusRipple" | "fullWidth" | "selected"> & _mui_system.MUIStyledCommonProps<_mui_material.Theme>, {}, {}>;
|
|
3175
3204
|
interface ModTypologyControlProps extends Omit<ToggleButtonGroupProps, 'orientation'> {
|
|
3176
3205
|
}
|
|
3177
3206
|
/**
|
|
@@ -3200,6 +3229,19 @@ declare const focusRingStyles: {
|
|
|
3200
3229
|
readonly outlineOffset: "2px";
|
|
3201
3230
|
};
|
|
3202
3231
|
|
|
3232
|
+
/** True below `md`. Takes the desktop branch during SSR so the first desktop paint is unchanged. */
|
|
3233
|
+
declare function useIsCompact(): boolean;
|
|
3234
|
+
/**
|
|
3235
|
+
* Grows a control's hit area to 44×44 below `md` without changing how it looks.
|
|
3236
|
+
*
|
|
3237
|
+
* The host must already be positioned (ButtonBase is) and must not use `pseudo` itself; pass
|
|
3238
|
+
* `'before'` when `::after` is taken. Nesting the media query under the pseudo selector keeps
|
|
3239
|
+
* this from overwriting a `down('md')` block on the host.
|
|
3240
|
+
*/
|
|
3241
|
+
declare function touchTarget(theme: Theme, { pseudo }?: {
|
|
3242
|
+
pseudo?: 'before' | 'after';
|
|
3243
|
+
}): CSSObject;
|
|
3244
|
+
|
|
3203
3245
|
interface ModVibratingDotProps extends BoxProps$1 {
|
|
3204
3246
|
}
|
|
3205
3247
|
/**
|
|
@@ -3234,5 +3276,5 @@ declare module '@mui/x-data-grid-pro' {
|
|
|
3234
3276
|
|
|
3235
3277
|
declare const version: string
|
|
3236
3278
|
|
|
3237
|
-
export { ActivityScene, CIRCLE_RADIUS, ModActionsCell, ModActivityHeader, ModActivityIndicatorCell, ModAlert, ModAvatarCell, ModBadge, ModBanner, ModBreadcrumbLink, ModBreadcrumbs, ModButton, ModButtonTab, ModButtonTabGroup, ModCanceledIcon, ModCard, ModCheckbox, ModCheckboxWithText, ModCodeSnippet, ModDataGrid, ModDataGridCellContent, ModDataGridColumnsButton, ModDataGridColumnsPanel, ModDataGridFilterPanel, ModDataGridFilterPanelAddIcon, ModDataGridFilterPanelDeleteIcon, ModDataGridFilterPanelRemoveAllIcon, ModDataGridFiltersButton, ModDataGridHeaderLabel, ModDataGridSelect, ModDatePicker, ModDivider, ModDot, ModDownloadToast, ModSelect as ModDropdown, ModMenu as ModDropdownMenu, ModMenuItem as ModDropdownMenuItem, ModMenuItem as ModDropdownOption, ModFilledCanceled, ModFilledError, ModFilledInfo, ModFilledNeutral, ModFilledQueued, ModFilledSuccess, ModFilledWarning, ModFilterChip, ModFooter, ModGeneralAvatar, ModIconButton, ModIconCell, ModIconWrapper, ModInfiniteScrollGrid, ModInputField, ModListItem, ModListItemButton, ModLoadingSpinner, ModLogoCell, ModMenu, ModMenuItem, ModModal, ModModalContent, ModModalFooter, ModModalHeader, ModMultiBadgesCell, ModNavigationAvatar, ModNavigationItem, ModPageContent, ModPaginatedGrid, ModProgressCell, ModProgressbar, ModQuickFilter, ModRadio, ModRipplingDot, ModSearchChip, ModSelect, ModSelectField, ModMenuItem as ModSelectOption, ModSideNav, ModSkeleton, ModStatusBadgeCell, ModStatusCell, ModTab, ModTabPanel, ModTable, ModTabs, ModTag, ModToast, ModToastButton, ModToggle, ModToggleButton, ModToggleButtonGroup, ModToolbar, ModTooltip, ModTreeItem, ModTreeView, StyledToggleButton as ModTypologyButton, ModTypologyControl, ModUserAvatarCell, ModVibratingDot, SortedAscendingIcon, SortedDescendingIcon, UnsortedIcon, focusRingStyles, getDataGridHeaderStyles, getDataGridRowStyles, modRowHeights, version };
|
|
3238
|
-
export type { ActivityColor, ActivityEvent, ActivityHeaderSize, BreadcrumbItem, DataGridSize, IconWrapperSize, ModActionsCellProps, ModActivityHeaderProps, ModActivityIndicatorCellProps, ModAlertProps, ModAvatarCellProps, ModBadgeProps, ModBannerProps, ModBreadcrumbLinkProps, ModBreadcrumbsProps, ModButtonProps, ModButtonTabGroupProps, ModButtonTabProps, ModCardLargeProps, ModCardProps, ModCardSize, ModCardSmallProps, ModCheckboxProps, ModCheckboxWithTextProps, ModCodeSnippetProps, ModDataGridCellContentProps, ModDataGridHeaderLabelProps, ModDataGridProps, ModDataGridSelectProps, ModDatePickerProps, ModDividerProps, ModDotProps, ModDownloadToastProps, ModMenuItemProps as ModDropdownMenuItemProps, ModMenuProps as ModDropdownMenuProps, ModSelectProps as ModDropdownProps, ModFilledStatusIconProps, ModFilterChipProps, ModFooterProps, ModGeneralAvatarProps, ModIconButtonProps, ModIconCellProps, ModIconWrapperProps, ModInfiniteScrollGridProps, ModInputFieldProps, ModListItemButtonProps, ModListItemProps, ModLoadingSpinnerProps, ModLogoCellProps, ModMenuItemProps, ModMenuProps, ModModalContentProps, ModModalFooterProps, ModModalHeaderProps, ModModalProps, ModMultiBadgesCellProps, ModNavigationAvatarProps, ModNavigationItemProps, ModPageContentProps, ModPaginatedGridProps, ModProgressCellProps, ModProgressbarProps, ModQuickFilterProps, ModRadioProps, ModRipplingDotProps, ModSearchChipProps, ModSelectFieldChangeEvent, ModSelectFieldOption, ModSelectFieldProps, ModSelectProps, ModSideNavProps, ModSkeletonProps, ModStatusBadgeCellProps, ModStatusCellProps, ModStatusCellVariant, ModTabPanelProps, ModTabProps, ModTableColumn, ModTableProps, ModTagProps, ModToastProps, ModToggleButtonGroupProps, ModToggleButtonProps, ModToggleProps, ModToolbarProps, ModTooltipProps, ModTreeItemData, ModTreeItemProps, ModTreeViewProps, ModTypologyControlProps, ModUserAvatarCellProps, ModVibratingDotProps };
|
|
3279
|
+
export { ActivityScene, CIRCLE_RADIUS, ModActionsCell, ModActivityHeader, ModActivityIndicatorCell, ModAlert, ModAvatarCell, ModBadge, ModBanner, ModBreadcrumbLink, ModBreadcrumbs, ModButton, ModButtonTab, ModButtonTabGroup, ModCanceledIcon, ModCard, ModCheckbox, ModCheckboxWithText, ModCodeSnippet, ModDataGrid, ModDataGridCellContent, ModDataGridColumnsButton, ModDataGridColumnsPanel, ModDataGridFilterPanel, ModDataGridFilterPanelAddIcon, ModDataGridFilterPanelDeleteIcon, ModDataGridFilterPanelRemoveAllIcon, ModDataGridFiltersButton, ModDataGridHeaderLabel, ModDataGridSelect, ModDatePicker, ModDivider, ModDot, ModDownloadToast, ModSelect as ModDropdown, ModMenu as ModDropdownMenu, ModMenuItem as ModDropdownMenuItem, ModMenuItem as ModDropdownOption, ModFilledCanceled, ModFilledError, ModFilledInfo, ModFilledNeutral, ModFilledQueued, ModFilledSuccess, ModFilledWarning, ModFilterChip, ModFooter, ModGeneralAvatar, ModIconButton, ModIconCell, ModIconWrapper, ModInfiniteScrollGrid, ModInputField, ModListItem, ModListItemButton, ModLoadingSpinner, ModLogoCell, ModMenu, ModMenuItem, ModModal, ModModalContent, ModModalFooter, ModModalHeader, ModMultiBadgesCell, ModNavigationAvatar, ModNavigationItem, ModPageContent, ModPaginatedGrid, ModProgressCell, ModProgressbar, ModQuickFilter, ModRadio, ModRipplingDot, ModSearchChip, ModSelect, ModSelectField, ModMenuItem as ModSelectOption, ModSideNav, ModSkeleton, ModStatusBadgeCell, ModStatusCell, ModTab, ModTabPanel, ModTable, ModTabs, ModTag, ModToast, ModToastButton, ModToggle, ModToggleButton, ModToggleButtonGroup, ModToolbar, ModTooltip, ModTreeItem, ModTreeView, StyledToggleButton as ModTypologyButton, ModTypologyControl, ModUserAvatarCell, ModVibratingDot, SortedAscendingIcon, SortedDescendingIcon, UnsortedIcon, focusRingStyles, getDataGridHeaderStyles, getDataGridRowStyles, modRowHeights, touchTarget, useIsCompact, version };
|
|
3280
|
+
export type { ActivityColor, ActivityEvent, ActivityHeaderSize, BreadcrumbItem, DataGridSize, IconWrapperSize, ModAction, ModActionsCellProps, ModActivityHeaderProps, ModActivityIndicatorCellProps, ModAlertProps, ModAvatarCellProps, ModBadgeProps, ModBannerProps, ModBreadcrumbLinkProps, ModBreadcrumbsProps, ModButtonProps, ModButtonTabGroupProps, ModButtonTabProps, ModCardLargeProps, ModCardProps, ModCardSize, ModCardSmallProps, ModCheckboxProps, ModCheckboxWithTextProps, ModCodeSnippetProps, ModDataGridCellContentProps, ModDataGridHeaderLabelProps, ModDataGridProps, ModDataGridSelectProps, ModDatePickerProps, ModDividerProps, ModDotProps, ModDownloadToastProps, ModMenuItemProps as ModDropdownMenuItemProps, ModMenuProps as ModDropdownMenuProps, ModSelectProps as ModDropdownProps, ModFilledStatusIconProps, ModFilterChipProps, ModFooterProps, ModGeneralAvatarProps, ModIconButtonProps, ModIconCellProps, ModIconWrapperProps, ModInfiniteScrollGridProps, ModInputFieldProps, ModListItemButtonProps, ModListItemProps, ModLoadingSpinnerProps, ModLogoCellProps, ModMenuItemProps, ModMenuProps, ModModalContentProps, ModModalFooterProps, ModModalHeaderProps, ModModalProps, ModMultiBadgesCellProps, ModNavigationAvatarProps, ModNavigationItemProps, ModPageContentProps, ModPaginatedGridProps, ModProgressCellProps, ModProgressbarProps, ModQuickFilterProps, ModRadioProps, ModRipplingDotProps, ModSearchChipProps, ModSelectFieldChangeEvent, ModSelectFieldOption, ModSelectFieldProps, ModSelectProps, ModSideNavProps, ModSkeletonProps, ModStatusBadgeCellProps, ModStatusCellProps, ModStatusCellVariant, ModTabPanelProps, ModTabProps, ModTableColumn, ModTableProps, ModTagProps, ModToastProps, ModToggleButtonGroupProps, ModToggleButtonProps, ModToggleProps, ModToolbarProps, ModTooltipProps, ModTreeItemData, ModTreeItemProps, ModTreeViewProps, ModTypologyControlProps, ModUserAvatarCellProps, ModVibratingDotProps };
|