@moderneinc/design-system-components 6.0.0 → 6.0.1-next.18d0a9
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/dist/ActivityHeader/ActivityHeader.d.ts +1 -1
- package/dist/DataGridFilterPanel/DataGridFilterPanel.d.ts +13 -2
- package/dist/InputField/InputField.d.ts +3 -3
- package/dist/ListItem/ListItem.d.ts +8 -0
- package/dist/MenuItem/MenuItem.d.ts +11 -7
- package/dist/Tabs/Tabs.d.ts +1 -1
- package/dist/TypologyControl/TypologyControl.d.ts +1 -1
- package/dist/index.d.ts +132 -48
- package/dist/index.esm.js +55 -976
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +96 -1017
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -43,7 +43,7 @@ export interface ModActivityHeaderProps {
|
|
|
43
43
|
* field: 'activity',
|
|
44
44
|
* headerName: '',
|
|
45
45
|
* width: 34,
|
|
46
|
-
* renderHeader: () => <ModActivityHeader size="
|
|
46
|
+
* renderHeader: () => <ModActivityHeader size="compact" color="commitJob" />,
|
|
47
47
|
* renderCell: (params) => (
|
|
48
48
|
* <ModActivityIndicatorCell
|
|
49
49
|
* event={params.row.eventType}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridFilterPanel as MuiGridFilterPanel } from '@mui/x-data-grid';
|
|
1
|
+
import { type GridSlotsComponent, GridFilterPanel as MuiGridFilterPanel } from '@mui/x-data-grid';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import { ModSelect } from '../Select/Select';
|
|
4
4
|
export type { GridFilterItem as FilterItem, GridFilterOperator as FilterOperator, } from '@mui/x-data-grid';
|
|
@@ -18,6 +18,18 @@ export declare const ModDataGridFilterPanelRemoveAllIcon: {
|
|
|
18
18
|
(): import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
displayName: string;
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* ModSelect, typed for the DataGrid `baseSelect` slot.
|
|
23
|
+
*
|
|
24
|
+
* The grid's own `SelectProps` shares MUI's prop names and semantics, but types
|
|
25
|
+
* `onChange` as a bare `ChangeEventHandler` and adds `aria-*`/`data-*` index
|
|
26
|
+
* signatures — structurally incompatible, behaviourally identical. Asserted
|
|
27
|
+
* once here rather than at every call site; #721 tracks replacing the assertion
|
|
28
|
+
* with a real adapter. Intersected rather than replaced so direct consumers keep
|
|
29
|
+
* `ModSelectProps` — casting to the slot type alone drops `variant`, `MenuProps`
|
|
30
|
+
* and the `SelectChangeEvent` signature.
|
|
31
|
+
*/
|
|
32
|
+
export declare const ModDataGridSelect: typeof ModSelect & GridSlotsComponent["baseSelect"];
|
|
21
33
|
/**
|
|
22
34
|
* ModDataGridFilterPanel - MUI GridFilterPanel with design system styling and Lucide icons
|
|
23
35
|
*
|
|
@@ -48,7 +60,6 @@ export declare const ModDataGridFilterPanelRemoveAllIcon: {
|
|
|
48
60
|
* />
|
|
49
61
|
* ```
|
|
50
62
|
*/
|
|
51
|
-
export { ModSelect as ModDataGridSelect };
|
|
52
63
|
export declare const ModDataGridFilterPanel: {
|
|
53
64
|
(props: React.ComponentProps<typeof MuiGridFilterPanel>): import("react/jsx-runtime").JSX.Element;
|
|
54
65
|
displayName: string;
|
|
@@ -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>, "style" | "color" | "margin" | "
|
|
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>, "style" | "color" | "margin" | "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>, "style" | "color" | "margin" | "
|
|
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>, "style" | "color" | "margin" | "disabled" | "size" | "classes" | "className" | "children" | "sx" | "required" | "error" | "filled" | "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>, "style" | "margin" | "
|
|
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>, "style" | "margin" | "disabled" | "classes" | "className" | "children" | "sx" | "required" | "error" | "filled" | "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'> {
|
|
@@ -40,6 +40,14 @@ export interface ModListItemProps extends Omit<ListItemButtonProps, 'children' |
|
|
|
40
40
|
* @default false
|
|
41
41
|
*/
|
|
42
42
|
isLink?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* URL to navigate to. MUI's ListItemButton promotes its root to an anchor on its
|
|
45
|
+
* own when `href` is set, so `component="a"` is not required.
|
|
46
|
+
*
|
|
47
|
+
* Declared explicitly: `ListItemButtonProps` only exposes anchor attributes
|
|
48
|
+
* through MUI's polymorphic generic, which this component does not thread through.
|
|
49
|
+
*/
|
|
50
|
+
href?: string;
|
|
43
51
|
/**
|
|
44
52
|
* Trailing element (optional, e.g., chevron icon for navigation)
|
|
45
53
|
* Renders at the end of the list item, typically used for navigation indicators.
|
|
@@ -19,12 +19,16 @@ type ModMenuItemOwnProps = {
|
|
|
19
19
|
*/
|
|
20
20
|
secondaryText?: string;
|
|
21
21
|
/**
|
|
22
|
-
* URL to navigate to.
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* URL to navigate to. **Requires `component="a"`** (or a router link component):
|
|
23
|
+
* MUI's MenuItem roots at `li`, and ButtonBase only swaps in an anchor when the
|
|
24
|
+
* root is `button`, so `href` alone lands on the `li` and does not navigate.
|
|
25
|
+
* See #722.
|
|
26
26
|
*/
|
|
27
27
|
href?: string;
|
|
28
|
+
/** Anchor target, e.g. `_blank`. Needs `href` and `component="a"`. */
|
|
29
|
+
target?: string;
|
|
30
|
+
/** Anchor `rel`, e.g. `noopener noreferrer`. Needs `href` and `component="a"`. */
|
|
31
|
+
rel?: string;
|
|
28
32
|
/**
|
|
29
33
|
* Menu item content (text label)
|
|
30
34
|
*/
|
|
@@ -50,11 +54,11 @@ export type ModMenuItemProps<C extends ElementType = typeof MenuItem> = ModMenuI
|
|
|
50
54
|
* // Disabled state
|
|
51
55
|
* <ModMenuItem disabled>Disabled item</ModMenuItem>
|
|
52
56
|
*
|
|
53
|
-
* // As an anchor —
|
|
54
|
-
* <ModMenuItem href="/api-explorer">API explorer</ModMenuItem>
|
|
57
|
+
* // As an anchor — `component="a"` is required, see #722
|
|
58
|
+
* <ModMenuItem component="a" href="/api-explorer">API explorer</ModMenuItem>
|
|
55
59
|
*
|
|
56
60
|
* // External link
|
|
57
|
-
* <ModMenuItem href="https://docs.example.com" target="_blank" rel="noopener noreferrer">
|
|
61
|
+
* <ModMenuItem component="a" href="https://docs.example.com" target="_blank" rel="noopener noreferrer">
|
|
58
62
|
* Documentation
|
|
59
63
|
* </ModMenuItem>
|
|
60
64
|
*
|
package/dist/Tabs/Tabs.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { ReactNode } from 'react';
|
|
|
3
3
|
/**
|
|
4
4
|
* ModTabs - Tabs container component based on MUI Tabs
|
|
5
5
|
*/
|
|
6
|
-
export declare const ModTabs: import("@emotion/styled").StyledComponent<import("@mui/material").TabsOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style" | "
|
|
6
|
+
export declare const ModTabs: import("@emotion/styled").StyledComponent<import("@mui/material").TabsOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style" | "classes" | "slots" | "slotProps" | "className" | "action" | "children" | "sx" | "value" | "aria-label" | "aria-labelledby" | "onChange" | "orientation" | "variant" | "allowScrollButtonsMobile" | "centered" | "indicatorColor" | "scrollButtons" | "selectionFollowsFocus" | "textColor" | "visibleScrollbar"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
7
7
|
export interface ModTabProps extends Omit<TabProps, 'label'> {
|
|
8
8
|
/**
|
|
9
9
|
* The label for the tab
|
|
@@ -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, "
|
|
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>, "style" | "color" | "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,7 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { GridColumnsPanelProps, GridDensity as GridDensity$1, DataGridProProps, GridSlots } from '@mui/x-data-grid-pro';
|
|
2
3
|
import * as React$1 from 'react';
|
|
3
4
|
import React__default, { ReactNode, ElementType, HTMLAttributes, ComponentPropsWithoutRef, ComponentType, FunctionComponent } from 'react';
|
|
4
|
-
import { GridDensity, GridFilterPanel, GridRenderCellParams, ToolbarProps } from '@mui/x-data-grid';
|
|
5
|
+
import { GridDensity, GridFilterPanel, GridSlotsComponent, GridRenderCellParams, ToolbarProps } from '@mui/x-data-grid';
|
|
5
6
|
import { AlertProps } from '@mui/material/Alert';
|
|
6
7
|
import Chip, { ChipProps } from '@mui/material/Chip';
|
|
7
8
|
import { LinkProps } from '@mui/material/Link';
|
|
@@ -11,8 +12,8 @@ import { ToggleButtonGroupProps } from '@mui/material/ToggleButtonGroup';
|
|
|
11
12
|
import { SvgIconProps } from '@mui/material/SvgIcon';
|
|
12
13
|
import { CardProps } from '@mui/material/Card';
|
|
13
14
|
import { CheckboxProps } from '@mui/material/Checkbox';
|
|
14
|
-
import { GridDensity as GridDensity$1, DataGridProProps, GridSlots, GridColumnsPanelProps } from '@mui/x-data-grid-pro';
|
|
15
15
|
import { SxProps, Theme, Breakpoint } from '@mui/material/styles';
|
|
16
|
+
import { SelectProps, SelectChangeEvent } from '@mui/material/Select';
|
|
16
17
|
import { DatePickerProps } from '@mui/x-date-pickers/DatePicker';
|
|
17
18
|
import { PickersShortcutsItem } from '@mui/x-date-pickers/PickersShortcuts';
|
|
18
19
|
import { DateRangePickerProps } from '@mui/x-date-pickers-pro/DateRangePicker';
|
|
@@ -31,7 +32,6 @@ import { DialogProps } from '@mui/material/Dialog';
|
|
|
31
32
|
import { BoxProps } from '@mui/material/Box';
|
|
32
33
|
import { LinearProgressProps } from '@mui/material/LinearProgress';
|
|
33
34
|
import { RadioProps } from '@mui/material/Radio';
|
|
34
|
-
import { SelectProps, SelectChangeEvent } from '@mui/material/Select';
|
|
35
35
|
import { SkeletonProps } from '@mui/material/Skeleton';
|
|
36
36
|
import { TableProps } from '@mui/material/Table';
|
|
37
37
|
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
@@ -42,6 +42,37 @@ import { TooltipProps } from '@mui/material/Tooltip';
|
|
|
42
42
|
import { TreeItemProps } from '@mui/x-tree-view/TreeItem';
|
|
43
43
|
import { RichTreeViewProProps } from '@mui/x-tree-view-pro/RichTreeViewPro';
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* ModDataGridColumnsPanel - Custom columns panel for ModDataGrid matching Figma design
|
|
47
|
+
*
|
|
48
|
+
* A styled columns panel that integrates with MUI DataGrid's column visibility system.
|
|
49
|
+
* Features:
|
|
50
|
+
* - Search input with Lucide icon (matches ModQuickFilter)
|
|
51
|
+
* - Checkbox list with design system styling (12px checkboxes)
|
|
52
|
+
* - Show/Hide all toggle
|
|
53
|
+
* - Reset button
|
|
54
|
+
*
|
|
55
|
+
* Design Tokens Used:
|
|
56
|
+
* - surfaces.white - Background color
|
|
57
|
+
* - surfaces.listHover - Item hover background (#f9fafb)
|
|
58
|
+
* - input.background - Search input background
|
|
59
|
+
* - border.input - Search input border
|
|
60
|
+
* - buttons.primary.default - Search input focus border
|
|
61
|
+
* - typography.body - Column label text
|
|
62
|
+
* - border.primary - Divider color
|
|
63
|
+
*/
|
|
64
|
+
interface ModDataGridColumnsPanelProps extends GridColumnsPanelProps {
|
|
65
|
+
/**
|
|
66
|
+
* If true, shows the search input field
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
showSearch?: boolean;
|
|
70
|
+
}
|
|
71
|
+
declare const ModDataGridColumnsPanel: {
|
|
72
|
+
({ showSearch, sx: _sx, theme: _theme, ...props }: ModDataGridColumnsPanelProps): react_jsx_runtime.JSX.Element;
|
|
73
|
+
displayName: string;
|
|
74
|
+
};
|
|
75
|
+
|
|
45
76
|
interface ModFooterProps {
|
|
46
77
|
/**
|
|
47
78
|
* Footer variant
|
|
@@ -197,7 +228,7 @@ interface ModActivityHeaderProps {
|
|
|
197
228
|
* field: 'activity',
|
|
198
229
|
* headerName: '',
|
|
199
230
|
* width: 34,
|
|
200
|
-
* renderHeader: () => <ModActivityHeader size="
|
|
231
|
+
* renderHeader: () => <ModActivityHeader size="compact" color="commitJob" />,
|
|
201
232
|
* renderCell: (params) => (
|
|
202
233
|
* <ModActivityIndicatorCell
|
|
203
234
|
* event={params.row.eventType}
|
|
@@ -910,6 +941,13 @@ declare const ModDataGridCellContent: {
|
|
|
910
941
|
({ children, ...props }: ModDataGridCellContentProps): react_jsx_runtime.JSX.Element;
|
|
911
942
|
displayName: string;
|
|
912
943
|
};
|
|
944
|
+
/**
|
|
945
|
+
* Row height configuration for DataGrid size variants (from Figma specs)
|
|
946
|
+
* - compact: 42px
|
|
947
|
+
* - standard: 48px
|
|
948
|
+
* - comfortable: 56px
|
|
949
|
+
*/
|
|
950
|
+
declare const modRowHeights: Record<GridDensity, number>;
|
|
913
951
|
/**
|
|
914
952
|
* StatusBadgeCell - Ready-to-use cell component for status badges
|
|
915
953
|
*
|
|
@@ -995,37 +1033,6 @@ declare namespace ModDataGridColumnsButton {
|
|
|
995
1033
|
var displayName: string;
|
|
996
1034
|
}
|
|
997
1035
|
|
|
998
|
-
/**
|
|
999
|
-
* ModDataGridColumnsPanel - Custom columns panel for ModDataGrid matching Figma design
|
|
1000
|
-
*
|
|
1001
|
-
* A styled columns panel that integrates with MUI DataGrid's column visibility system.
|
|
1002
|
-
* Features:
|
|
1003
|
-
* - Search input with Lucide icon (matches ModQuickFilter)
|
|
1004
|
-
* - Checkbox list with design system styling (12px checkboxes)
|
|
1005
|
-
* - Show/Hide all toggle
|
|
1006
|
-
* - Reset button
|
|
1007
|
-
*
|
|
1008
|
-
* Design Tokens Used:
|
|
1009
|
-
* - surfaces.white - Background color
|
|
1010
|
-
* - surfaces.listHover - Item hover background (#f9fafb)
|
|
1011
|
-
* - input.background - Search input background
|
|
1012
|
-
* - border.input - Search input border
|
|
1013
|
-
* - buttons.primary.default - Search input focus border
|
|
1014
|
-
* - typography.body - Column label text
|
|
1015
|
-
* - border.primary - Divider color
|
|
1016
|
-
*/
|
|
1017
|
-
interface ModDataGridColumnsPanelProps extends GridColumnsPanelProps {
|
|
1018
|
-
/**
|
|
1019
|
-
* If true, shows the search input field
|
|
1020
|
-
* @default false
|
|
1021
|
-
*/
|
|
1022
|
-
showSearch?: boolean;
|
|
1023
|
-
}
|
|
1024
|
-
declare const ModDataGridColumnsPanel: {
|
|
1025
|
-
({ showSearch, sx: _sx, theme: _theme, ...props }: ModDataGridColumnsPanelProps): react_jsx_runtime.JSX.Element;
|
|
1026
|
-
displayName: string;
|
|
1027
|
-
};
|
|
1028
|
-
|
|
1029
1036
|
type ModMenuItemOwnProps = {
|
|
1030
1037
|
/**
|
|
1031
1038
|
* Optional icon to display on the left side
|
|
@@ -1045,12 +1052,16 @@ type ModMenuItemOwnProps = {
|
|
|
1045
1052
|
*/
|
|
1046
1053
|
secondaryText?: string;
|
|
1047
1054
|
/**
|
|
1048
|
-
* URL to navigate to.
|
|
1049
|
-
*
|
|
1050
|
-
*
|
|
1051
|
-
*
|
|
1055
|
+
* URL to navigate to. **Requires `component="a"`** (or a router link component):
|
|
1056
|
+
* MUI's MenuItem roots at `li`, and ButtonBase only swaps in an anchor when the
|
|
1057
|
+
* root is `button`, so `href` alone lands on the `li` and does not navigate.
|
|
1058
|
+
* See #722.
|
|
1052
1059
|
*/
|
|
1053
1060
|
href?: string;
|
|
1061
|
+
/** Anchor target, e.g. `_blank`. Needs `href` and `component="a"`. */
|
|
1062
|
+
target?: string;
|
|
1063
|
+
/** Anchor `rel`, e.g. `noopener noreferrer`. Needs `href` and `component="a"`. */
|
|
1064
|
+
rel?: string;
|
|
1054
1065
|
/**
|
|
1055
1066
|
* Menu item content (text label)
|
|
1056
1067
|
*/
|
|
@@ -1076,11 +1087,11 @@ type ModMenuItemProps<C extends ElementType = typeof MenuItem> = ModMenuItemOwnP
|
|
|
1076
1087
|
* // Disabled state
|
|
1077
1088
|
* <ModMenuItem disabled>Disabled item</ModMenuItem>
|
|
1078
1089
|
*
|
|
1079
|
-
* // As an anchor —
|
|
1080
|
-
* <ModMenuItem href="/api-explorer">API explorer</ModMenuItem>
|
|
1090
|
+
* // As an anchor — `component="a"` is required, see #722
|
|
1091
|
+
* <ModMenuItem component="a" href="/api-explorer">API explorer</ModMenuItem>
|
|
1081
1092
|
*
|
|
1082
1093
|
* // External link
|
|
1083
|
-
* <ModMenuItem href="https://docs.example.com" target="_blank" rel="noopener noreferrer">
|
|
1094
|
+
* <ModMenuItem component="a" href="https://docs.example.com" target="_blank" rel="noopener noreferrer">
|
|
1084
1095
|
* Documentation
|
|
1085
1096
|
* </ModMenuItem>
|
|
1086
1097
|
*
|
|
@@ -1131,7 +1142,48 @@ declare const ModDataGridFilterPanelRemoveAllIcon: {
|
|
|
1131
1142
|
(): react_jsx_runtime.JSX.Element;
|
|
1132
1143
|
displayName: string;
|
|
1133
1144
|
};
|
|
1134
|
-
|
|
1145
|
+
/**
|
|
1146
|
+
* ModSelect, typed for the DataGrid `baseSelect` slot.
|
|
1147
|
+
*
|
|
1148
|
+
* The grid's own `SelectProps` shares MUI's prop names and semantics, but types
|
|
1149
|
+
* `onChange` as a bare `ChangeEventHandler` and adds `aria-*`/`data-*` index
|
|
1150
|
+
* signatures — structurally incompatible, behaviourally identical. Asserted
|
|
1151
|
+
* once here rather than at every call site; #721 tracks replacing the assertion
|
|
1152
|
+
* with a real adapter. Intersected rather than replaced so direct consumers keep
|
|
1153
|
+
* `ModSelectProps` — casting to the slot type alone drops `variant`, `MenuProps`
|
|
1154
|
+
* and the `SelectChangeEvent` signature.
|
|
1155
|
+
*/
|
|
1156
|
+
declare const ModDataGridSelect: typeof ModSelect & GridSlotsComponent["baseSelect"];
|
|
1157
|
+
/**
|
|
1158
|
+
* ModDataGridFilterPanel - MUI GridFilterPanel with design system styling and Lucide icons
|
|
1159
|
+
*
|
|
1160
|
+
* A styled version of MUI's GridFilterPanel that applies design system tokens.
|
|
1161
|
+
* The per-row delete icon uses Lucide Trash2 internally.
|
|
1162
|
+
*
|
|
1163
|
+
* For footer button icons ("Add filter" and "Remove all"), you must also pass the icon components
|
|
1164
|
+
* to the DataGrid's slots prop.
|
|
1165
|
+
*
|
|
1166
|
+
* @example
|
|
1167
|
+
* ```tsx
|
|
1168
|
+
* import {
|
|
1169
|
+
* ModDataGridFilterPanel,
|
|
1170
|
+
* FilterPanelAddIcon,
|
|
1171
|
+
* FilterPanelDeleteIcon,
|
|
1172
|
+
* FilterPanelRemoveAllIcon
|
|
1173
|
+
* } from '@moderneinc/design-system-components'
|
|
1174
|
+
*
|
|
1175
|
+
* <DataGridPro
|
|
1176
|
+
* rows={rows}
|
|
1177
|
+
* columns={columns}
|
|
1178
|
+
* slots={{
|
|
1179
|
+
* filterPanel: ModDataGridFilterPanel,
|
|
1180
|
+
* filterPanelAddIcon: FilterPanelAddIcon,
|
|
1181
|
+
* filterPanelDeleteIcon: FilterPanelDeleteIcon,
|
|
1182
|
+
* filterPanelRemoveAllIcon: FilterPanelRemoveAllIcon,
|
|
1183
|
+
* }}
|
|
1184
|
+
* />
|
|
1185
|
+
* ```
|
|
1186
|
+
*/
|
|
1135
1187
|
declare const ModDataGridFilterPanel: {
|
|
1136
1188
|
(props: React__default.ComponentProps<typeof GridFilterPanel>): react_jsx_runtime.JSX.Element;
|
|
1137
1189
|
displayName: string;
|
|
@@ -1536,6 +1588,26 @@ declare const ModIconButton: {
|
|
|
1536
1588
|
displayName: string;
|
|
1537
1589
|
};
|
|
1538
1590
|
|
|
1591
|
+
type IconWrapperSize = 8 | 12 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96 | 128 | 160 | 192;
|
|
1592
|
+
interface ModIconWrapperProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
1593
|
+
/**
|
|
1594
|
+
* The size of the icon wrapper in pixels
|
|
1595
|
+
* @default 20
|
|
1596
|
+
*/
|
|
1597
|
+
size?: IconWrapperSize;
|
|
1598
|
+
/**
|
|
1599
|
+
* Icon element to render inside the wrapper
|
|
1600
|
+
*/
|
|
1601
|
+
children?: ReactNode;
|
|
1602
|
+
}
|
|
1603
|
+
/**
|
|
1604
|
+
* ModIconWrapper - Flex-centered container that sizes icons
|
|
1605
|
+
*/
|
|
1606
|
+
declare const ModIconWrapper: {
|
|
1607
|
+
({ size, children, ...props }: ModIconWrapperProps): react_jsx_runtime.JSX.Element;
|
|
1608
|
+
displayName: string;
|
|
1609
|
+
};
|
|
1610
|
+
|
|
1539
1611
|
interface ModInfiniteScrollGridProps extends Omit<ModDataGridProps, 'slots'> {
|
|
1540
1612
|
/**
|
|
1541
1613
|
* Callback when load more is triggered - either by scrolling or clicking button
|
|
@@ -1672,6 +1744,14 @@ interface ModListItemProps extends Omit<ListItemButtonProps, 'children' | 'size'
|
|
|
1672
1744
|
* @default false
|
|
1673
1745
|
*/
|
|
1674
1746
|
isLink?: boolean;
|
|
1747
|
+
/**
|
|
1748
|
+
* URL to navigate to. MUI's ListItemButton promotes its root to an anchor on its
|
|
1749
|
+
* own when `href` is set, so `component="a"` is not required.
|
|
1750
|
+
*
|
|
1751
|
+
* Declared explicitly: `ListItemButtonProps` only exposes anchor attributes
|
|
1752
|
+
* through MUI's polymorphic generic, which this component does not thread through.
|
|
1753
|
+
*/
|
|
1754
|
+
href?: string;
|
|
1675
1755
|
/**
|
|
1676
1756
|
* Trailing element (optional, e.g., chevron icon for navigation)
|
|
1677
1757
|
* Renders at the end of the list item, typically used for navigation indicators.
|
|
@@ -2738,7 +2818,7 @@ declare const ModTabPanel: {
|
|
|
2738
2818
|
/**
|
|
2739
2819
|
* ModTabs - Tabs container component based on MUI Tabs
|
|
2740
2820
|
*/
|
|
2741
|
-
declare const ModTabs: StyledComponent<_mui_material.TabsOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style" | "
|
|
2821
|
+
declare const ModTabs: StyledComponent<_mui_material.TabsOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style" | "classes" | "slots" | "slotProps" | "className" | "action" | "children" | "sx" | "value" | "aria-label" | "aria-labelledby" | "onChange" | "orientation" | "variant" | "allowScrollButtonsMobile" | "centered" | "indicatorColor" | "scrollButtons" | "selectionFollowsFocus" | "textColor" | "visibleScrollbar"> & _mui_system.MUIStyledCommonProps<_mui_material.Theme>, {}, {}>;
|
|
2742
2822
|
interface ModTabProps extends Omit<TabProps, 'label'> {
|
|
2743
2823
|
/**
|
|
2744
2824
|
* The label for the tab
|
|
@@ -3084,7 +3164,7 @@ declare const ModTreeView: {
|
|
|
3084
3164
|
displayName: string;
|
|
3085
3165
|
};
|
|
3086
3166
|
|
|
3087
|
-
declare const StyledToggleButton: StyledComponent<_mui_material.ToggleButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, keyof _mui_material.ToggleButtonOwnProps> & Omit<_mui_material.ButtonBaseOwnProps, "
|
|
3167
|
+
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$1.DetailedHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style" | "color" | "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>, {}, {}>;
|
|
3088
3168
|
interface ModTypologyControlProps extends Omit<ToggleButtonGroupProps, 'orientation'> {
|
|
3089
3169
|
}
|
|
3090
3170
|
/**
|
|
@@ -3132,16 +3212,20 @@ declare const ModVibratingDot: FunctionComponent<ModVibratingDotProps>;
|
|
|
3132
3212
|
|
|
3133
3213
|
|
|
3134
3214
|
|
|
3135
|
-
//
|
|
3215
|
+
// MUI types `slotProps.<slot>` against its own component, so a custom slot's extra
|
|
3216
|
+
// props (e.g. the columns panel's `showSearch`) are rejected even when that slot is
|
|
3217
|
+
// installed. MUI's `*PropsOverrides` interfaces are the mechanism for declaring them.
|
|
3136
3218
|
declare module '@mui/x-data-grid' {
|
|
3137
3219
|
interface FooterPropsOverrides extends ModFooterProps {}
|
|
3220
|
+
interface ColumnsPanelPropsOverrides extends ModDataGridColumnsPanelProps {}
|
|
3138
3221
|
}
|
|
3139
3222
|
|
|
3140
3223
|
declare module '@mui/x-data-grid-pro' {
|
|
3141
3224
|
interface FooterPropsOverrides extends ModFooterProps {}
|
|
3225
|
+
interface ColumnsPanelPropsOverrides extends ModDataGridColumnsPanelProps {}
|
|
3142
3226
|
}
|
|
3143
3227
|
|
|
3144
3228
|
declare const version: string
|
|
3145
3229
|
|
|
3146
|
-
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,
|
|
3147
|
-
export type { ActivityColor, ActivityEvent, ActivityHeaderSize, BreadcrumbItem, DataGridSize, ModActionsCellProps, ModActivityHeaderProps, ModActivityIndicatorCellProps, ModAlertProps, ModAvatarCellProps, ModBadgeProps, ModBannerProps, ModBreadcrumbLinkProps, ModBreadcrumbsProps, ModButtonProps, ModButtonTabGroupProps, ModButtonTabProps, ModCardLargeProps, ModCardProps, ModCardSize, ModCardSmallProps, ModCheckboxProps, ModCheckboxWithTextProps, ModCodeSnippetProps, ModDataGridCellContentProps, ModDataGridHeaderLabelProps, ModDataGridProps, ModDatePickerProps, ModDividerProps, ModDotProps, ModDownloadToastProps, ModMenuItemProps as ModDropdownMenuItemProps, ModMenuProps as ModDropdownMenuProps, ModSelectProps as ModDropdownProps, ModFilledStatusIconProps, ModFilterChipProps, ModFooterProps, ModGeneralAvatarProps, ModIconButtonProps, ModIconCellProps, 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 };
|
|
3230
|
+
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, ModDatePickerListItem, ModDatePickerMenu, 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, ModRadioButtonWithText, ModRipplingDot, ModSearchChip, ModSelect, ModSelectField, ModMenuItem as ModSelectOption, ModSideNav, ModSkeleton, ModStatusBadgeCell, ModStatusCell, ModTab, ModTabPanel, ModTable, ModTabs, ModTag, ModToast, ModToastButton, ModToggle, ModToggleButton, ModToggleButtonGroup, ModToggleButtonWithText, ModToolbar, ModTooltip, ModTopNav, ModTourModal, ModTreeItem, ModTreeView, StyledToggleButton as ModTypologyButton, ModTypologyControl, ModUserAvatarCell, ModVibratingDot, SortedAscendingIcon, SortedDescendingIcon, UnsortedIcon, focusRingStyles, getDataGridHeaderStyles, getDataGridRowStyles, modRowHeights, version };
|
|
3231
|
+
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, 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 };
|