@moderneinc/design-system-components 6.1.0-alpha.f3c8fa → 7.0.0-next.4ff15f
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/DataGrid/DataGrid.styles.d.ts +1 -1
- package/dist/DataGridFilterPanel/DataGridFilterPanel.d.ts +14 -4
- package/dist/InputField/InputField.d.ts +3 -3
- package/dist/ListItem/ListItem.d.ts +8 -0
- package/dist/MenuItem/MenuItem.d.ts +30 -7
- package/dist/Tabs/Tabs.d.ts +1 -1
- package/dist/Tooltip/Tooltip.d.ts +3 -4
- package/dist/TypologyControl/TypologyControl.d.ts +1 -1
- package/dist/index.d.ts +237 -164
- package/dist/index.esm.js +734 -1627
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +765 -1664
- package/dist/index.js.map +1 -1
- package/dist/utils/focusRing.d.ts +1 -1
- package/package.json +7 -26
- package/dist/DatePickerListItem/DatePickerListItem.d.ts +0 -4
- package/dist/DatePickerMenu/DatePickerMenu.d.ts +0 -4
- package/dist/RadioButtonWithText/RadioButtonWithText.d.ts +0 -4
- package/dist/ToggleButtonWithText/ToggleButtonWithText.d.ts +0 -4
- package/dist/TopNav/TopNav.d.ts +0 -4
- package/dist/TourModal/TourModal.d.ts +0 -4
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, GridSlotProps, 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,15 +12,11 @@ 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
16
|
import { DatePickerProps } from '@mui/x-date-pickers/DatePicker';
|
|
17
17
|
import { PickersShortcutsItem } from '@mui/x-date-pickers/PickersShortcuts';
|
|
18
18
|
import { DateRangePickerProps } from '@mui/x-date-pickers-pro/DateRangePicker';
|
|
19
19
|
import { DateRange } from '@mui/x-date-pickers-pro/models';
|
|
20
|
-
import * as _mui_system from '@mui/system';
|
|
21
|
-
import * as _mui_material from '@mui/material';
|
|
22
|
-
import { BoxProps as BoxProps$1 } from '@mui/material';
|
|
23
20
|
import { DividerProps } from '@mui/material/Divider';
|
|
24
21
|
import { PaperProps } from '@mui/material/Paper';
|
|
25
22
|
import { AvatarProps } from '@mui/material/Avatar';
|
|
@@ -31,9 +28,12 @@ import { DialogProps } from '@mui/material/Dialog';
|
|
|
31
28
|
import { BoxProps } from '@mui/material/Box';
|
|
32
29
|
import { LinearProgressProps } from '@mui/material/LinearProgress';
|
|
33
30
|
import { RadioProps } from '@mui/material/Radio';
|
|
31
|
+
import * as _mui_material from '@mui/material';
|
|
32
|
+
import { BoxProps as BoxProps$1 } from '@mui/material';
|
|
34
33
|
import { SelectProps, SelectChangeEvent } from '@mui/material/Select';
|
|
35
34
|
import { SkeletonProps } from '@mui/material/Skeleton';
|
|
36
35
|
import { TableProps } from '@mui/material/Table';
|
|
36
|
+
import * as _mui_system from '@mui/system';
|
|
37
37
|
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
38
38
|
import { TabProps } from '@mui/material/Tab';
|
|
39
39
|
import Button from '@mui/material/Button';
|
|
@@ -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
|
*
|
|
@@ -996,142 +1034,64 @@ declare namespace ModDataGridColumnsButton {
|
|
|
996
1034
|
}
|
|
997
1035
|
|
|
998
1036
|
/**
|
|
999
|
-
*
|
|
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
|
|
1037
|
+
* Icon components for DataGrid filter panel slots
|
|
1038
|
+
* These must be passed to the DataGrid's slots prop
|
|
1016
1039
|
*/
|
|
1017
|
-
|
|
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;
|
|
1040
|
+
declare const ModDataGridFilterPanelAddIcon: {
|
|
1041
|
+
(): react_jsx_runtime.JSX.Element;
|
|
1026
1042
|
displayName: string;
|
|
1027
1043
|
};
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
* Optional icon to display on the left side
|
|
1032
|
-
* Note: Cannot be directly mapped from Figma (ReactNode)
|
|
1033
|
-
*/
|
|
1034
|
-
icon?: ReactNode;
|
|
1035
|
-
/**
|
|
1036
|
-
* Optional keyboard shortcut to display on the right side
|
|
1037
|
-
* @example "⌘+P" or "Ctrl+K"
|
|
1038
|
-
* Note: Cannot be directly mapped from Figma (ReactNode/string)
|
|
1039
|
-
*/
|
|
1040
|
-
shortcut?: string;
|
|
1041
|
-
/**
|
|
1042
|
-
* Optional secondary text to display next to the primary label
|
|
1043
|
-
* @example "@username" or supporting text
|
|
1044
|
-
* Note: Cannot be directly mapped from Figma (ReactNode/string)
|
|
1045
|
-
*/
|
|
1046
|
-
secondaryText?: string;
|
|
1047
|
-
/**
|
|
1048
|
-
* URL to navigate to. When provided, the menu item renders as an anchor
|
|
1049
|
-
* element (via MUI ButtonBase) so users can middle-click or right-click
|
|
1050
|
-
* to open in a new tab. For client-side routing, also pass
|
|
1051
|
-
* `component={NextLink}` (or your router's link component).
|
|
1052
|
-
*/
|
|
1053
|
-
href?: string;
|
|
1054
|
-
/**
|
|
1055
|
-
* Menu item content (text label)
|
|
1056
|
-
*/
|
|
1057
|
-
children?: ReactNode;
|
|
1044
|
+
declare const ModDataGridFilterPanelDeleteIcon: {
|
|
1045
|
+
(): react_jsx_runtime.JSX.Element;
|
|
1046
|
+
displayName: string;
|
|
1058
1047
|
};
|
|
1059
|
-
|
|
1060
|
-
|
|
1048
|
+
declare const ModDataGridFilterPanelRemoveAllIcon: {
|
|
1049
|
+
(): react_jsx_runtime.JSX.Element;
|
|
1050
|
+
displayName: string;
|
|
1061
1051
|
};
|
|
1052
|
+
type ModDataGridSelectProps = GridSlotProps['baseSelect'];
|
|
1062
1053
|
/**
|
|
1063
|
-
*
|
|
1054
|
+
* ModDataGridSelect - ModSelect adapted to the DataGrid `baseSelect` slot contract.
|
|
1055
|
+
*
|
|
1056
|
+
* Kept structurally parallel to MUI's own `BaseSelect` (`@mui/x-data-grid/material`) so the two
|
|
1057
|
+
* can be diffed on upgrade.
|
|
1064
1058
|
*
|
|
1065
1059
|
* @example
|
|
1066
1060
|
* ```tsx
|
|
1067
|
-
*
|
|
1068
|
-
* <ModMenuItem icon={<UserIcon />} shortcut="⌘+P">
|
|
1069
|
-
* View profile
|
|
1070
|
-
* </ModMenuItem>
|
|
1071
|
-
*
|
|
1072
|
-
* // With secondary text (user list pattern from Figma node 4305:41844)
|
|
1073
|
-
* <ModMenuItem secondaryText="@phoenix">Phoenix Baker</ModMenuItem>
|
|
1074
|
-
* <ModMenuItem secondaryText="@olivia">Olivia Rhye</ModMenuItem>
|
|
1075
|
-
*
|
|
1076
|
-
* // Disabled state
|
|
1077
|
-
* <ModMenuItem disabled>Disabled item</ModMenuItem>
|
|
1078
|
-
*
|
|
1079
|
-
* // As an anchor — middle-click/right-click open in a new tab
|
|
1080
|
-
* <ModMenuItem href="/api-explorer">API explorer</ModMenuItem>
|
|
1081
|
-
*
|
|
1082
|
-
* // External link
|
|
1083
|
-
* <ModMenuItem href="https://docs.example.com" target="_blank" rel="noopener noreferrer">
|
|
1084
|
-
* Documentation
|
|
1085
|
-
* </ModMenuItem>
|
|
1086
|
-
*
|
|
1087
|
-
* // Client-side routing (Next.js)
|
|
1088
|
-
* <ModMenuItem component={NextLink} href="/api-explorer">API explorer</ModMenuItem>
|
|
1061
|
+
* <ModDataGrid rows={rows} columns={columns} slots={{ baseSelect: ModDataGridSelect }} />
|
|
1089
1062
|
* ```
|
|
1090
1063
|
*/
|
|
1091
|
-
declare
|
|
1092
|
-
declare namespace ModMenuItem {
|
|
1093
|
-
var displayName: string;
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
type ModSelectProps = SelectProps;
|
|
1064
|
+
declare const ModDataGridSelect: GridSlotsComponent['baseSelect'];
|
|
1097
1065
|
/**
|
|
1098
|
-
*
|
|
1066
|
+
* ModDataGridFilterPanel - MUI GridFilterPanel with design system styling and Lucide icons
|
|
1099
1067
|
*
|
|
1100
|
-
* A styled version of MUI's
|
|
1101
|
-
*
|
|
1068
|
+
* A styled version of MUI's GridFilterPanel that applies design system tokens.
|
|
1069
|
+
* The per-row delete icon uses Lucide Trash2 internally.
|
|
1070
|
+
*
|
|
1071
|
+
* For footer button icons ("Add filter" and "Remove all"), you must also pass the icon components
|
|
1072
|
+
* to the DataGrid's slots prop.
|
|
1102
1073
|
*
|
|
1103
1074
|
* @example
|
|
1104
1075
|
* ```tsx
|
|
1105
|
-
* import {
|
|
1106
|
-
*
|
|
1107
|
-
*
|
|
1108
|
-
*
|
|
1109
|
-
*
|
|
1110
|
-
*
|
|
1076
|
+
* import {
|
|
1077
|
+
* ModDataGridFilterPanel,
|
|
1078
|
+
* FilterPanelAddIcon,
|
|
1079
|
+
* FilterPanelDeleteIcon,
|
|
1080
|
+
* FilterPanelRemoveAllIcon
|
|
1081
|
+
* } from '@moderneinc/design-system-components'
|
|
1082
|
+
*
|
|
1083
|
+
* <DataGridPro
|
|
1084
|
+
* rows={rows}
|
|
1085
|
+
* columns={columns}
|
|
1086
|
+
* slots={{
|
|
1087
|
+
* filterPanel: ModDataGridFilterPanel,
|
|
1088
|
+
* filterPanelAddIcon: FilterPanelAddIcon,
|
|
1089
|
+
* filterPanelDeleteIcon: FilterPanelDeleteIcon,
|
|
1090
|
+
* filterPanelRemoveAllIcon: FilterPanelRemoveAllIcon,
|
|
1091
|
+
* }}
|
|
1092
|
+
* />
|
|
1111
1093
|
* ```
|
|
1112
1094
|
*/
|
|
1113
|
-
declare const ModSelect: {
|
|
1114
|
-
(props: ModSelectProps): react_jsx_runtime.JSX.Element;
|
|
1115
|
-
displayName: string;
|
|
1116
|
-
};
|
|
1117
|
-
|
|
1118
|
-
/**
|
|
1119
|
-
* Icon components for DataGrid filter panel slots
|
|
1120
|
-
* These must be passed to the DataGrid's slots prop
|
|
1121
|
-
*/
|
|
1122
|
-
declare const ModDataGridFilterPanelAddIcon: {
|
|
1123
|
-
(): react_jsx_runtime.JSX.Element;
|
|
1124
|
-
displayName: string;
|
|
1125
|
-
};
|
|
1126
|
-
declare const ModDataGridFilterPanelDeleteIcon: {
|
|
1127
|
-
(): react_jsx_runtime.JSX.Element;
|
|
1128
|
-
displayName: string;
|
|
1129
|
-
};
|
|
1130
|
-
declare const ModDataGridFilterPanelRemoveAllIcon: {
|
|
1131
|
-
(): react_jsx_runtime.JSX.Element;
|
|
1132
|
-
displayName: string;
|
|
1133
|
-
};
|
|
1134
|
-
|
|
1135
1095
|
declare const ModDataGridFilterPanel: {
|
|
1136
1096
|
(props: React__default.ComponentProps<typeof GridFilterPanel>): react_jsx_runtime.JSX.Element;
|
|
1137
1097
|
displayName: string;
|
|
@@ -1273,16 +1233,6 @@ declare const ModDatePicker: {
|
|
|
1273
1233
|
displayName: string;
|
|
1274
1234
|
};
|
|
1275
1235
|
|
|
1276
|
-
/**
|
|
1277
|
-
* ModDatePickerListItem
|
|
1278
|
-
*/
|
|
1279
|
-
declare const ModDatePickerListItem: StyledComponent<_mui_system.MUIStyledCommonProps<_mui_material.Theme>, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
1280
|
-
|
|
1281
|
-
/**
|
|
1282
|
-
* ModDatePickerMenu
|
|
1283
|
-
*/
|
|
1284
|
-
declare const ModDatePickerMenu: StyledComponent<_mui_system.MUIStyledCommonProps<_mui_material.Theme>, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
1285
|
-
|
|
1286
1236
|
interface ModDividerProps extends DividerProps {
|
|
1287
1237
|
}
|
|
1288
1238
|
/**
|
|
@@ -1536,6 +1486,26 @@ declare const ModIconButton: {
|
|
|
1536
1486
|
displayName: string;
|
|
1537
1487
|
};
|
|
1538
1488
|
|
|
1489
|
+
type IconWrapperSize = 8 | 12 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96 | 128 | 160 | 192;
|
|
1490
|
+
interface ModIconWrapperProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
1491
|
+
/**
|
|
1492
|
+
* The size of the icon wrapper in pixels
|
|
1493
|
+
* @default 20
|
|
1494
|
+
*/
|
|
1495
|
+
size?: IconWrapperSize;
|
|
1496
|
+
/**
|
|
1497
|
+
* Icon element to render inside the wrapper
|
|
1498
|
+
*/
|
|
1499
|
+
children?: ReactNode;
|
|
1500
|
+
}
|
|
1501
|
+
/**
|
|
1502
|
+
* ModIconWrapper - Flex-centered container that sizes icons
|
|
1503
|
+
*/
|
|
1504
|
+
declare const ModIconWrapper: {
|
|
1505
|
+
({ size, children, ...props }: ModIconWrapperProps): react_jsx_runtime.JSX.Element;
|
|
1506
|
+
displayName: string;
|
|
1507
|
+
};
|
|
1508
|
+
|
|
1539
1509
|
interface ModInfiniteScrollGridProps extends Omit<ModDataGridProps, 'slots'> {
|
|
1540
1510
|
/**
|
|
1541
1511
|
* Callback when load more is triggered - either by scrolling or clicking button
|
|
@@ -1672,6 +1642,14 @@ interface ModListItemProps extends Omit<ListItemButtonProps, 'children' | 'size'
|
|
|
1672
1642
|
* @default false
|
|
1673
1643
|
*/
|
|
1674
1644
|
isLink?: boolean;
|
|
1645
|
+
/**
|
|
1646
|
+
* URL to navigate to. MUI's ListItemButton promotes its root to an anchor on its
|
|
1647
|
+
* own when `href` is set, so `component="a"` is not required.
|
|
1648
|
+
*
|
|
1649
|
+
* Declared explicitly: `ListItemButtonProps` only exposes anchor attributes
|
|
1650
|
+
* through MUI's polymorphic generic, which this component does not thread through.
|
|
1651
|
+
*/
|
|
1652
|
+
href?: string;
|
|
1675
1653
|
/**
|
|
1676
1654
|
* Trailing element (optional, e.g., chevron icon for navigation)
|
|
1677
1655
|
* Renders at the end of the list item, typically used for navigation indicators.
|
|
@@ -1824,6 +1802,96 @@ declare const ModMenu: {
|
|
|
1824
1802
|
displayName: string;
|
|
1825
1803
|
};
|
|
1826
1804
|
|
|
1805
|
+
type ModMenuItemOwnProps = {
|
|
1806
|
+
/**
|
|
1807
|
+
* Optional icon to display on the left side
|
|
1808
|
+
* Note: Cannot be directly mapped from Figma (ReactNode)
|
|
1809
|
+
*/
|
|
1810
|
+
icon?: ReactNode;
|
|
1811
|
+
/**
|
|
1812
|
+
* Optional keyboard shortcut to display on the right side
|
|
1813
|
+
* @example "⌘+P" or "Ctrl+K"
|
|
1814
|
+
* Note: Cannot be directly mapped from Figma (ReactNode/string)
|
|
1815
|
+
*/
|
|
1816
|
+
shortcut?: string;
|
|
1817
|
+
/**
|
|
1818
|
+
* Optional secondary text to display next to the primary label
|
|
1819
|
+
* @example "@username" or supporting text
|
|
1820
|
+
* Note: Cannot be directly mapped from Figma (ReactNode/string)
|
|
1821
|
+
*/
|
|
1822
|
+
secondaryText?: string;
|
|
1823
|
+
/**
|
|
1824
|
+
* URL to navigate to. Supplying `href` roots the item at an anchor instead of the `li`
|
|
1825
|
+
* MUI defaults to, so it navigates and offers the browser's open-in-new-tab on middle-
|
|
1826
|
+
* or right-click. Pass `component` explicitly (e.g. a router link such as Next.js
|
|
1827
|
+
* `Link`) to override that default.
|
|
1828
|
+
*
|
|
1829
|
+
* The anchor then sits directly inside `MenuList`'s `ul`. `role="menuitem"` keeps that
|
|
1830
|
+
* correct for ARIA, but `ul`'s content model permits only `li`, so HTML validators and
|
|
1831
|
+
* axe-core's `list` rule flag it. This is the pattern MUI's own docs use for link menu
|
|
1832
|
+
* items, and what `ModListItem` already produces inside `List`.
|
|
1833
|
+
*/
|
|
1834
|
+
href?: string;
|
|
1835
|
+
/**
|
|
1836
|
+
* Anchor `target`, e.g. `_blank`. Only meaningful with `href` — without one the item
|
|
1837
|
+
* roots at `li` and this renders as an inert attribute, the same trap as #722.
|
|
1838
|
+
*/
|
|
1839
|
+
target?: string;
|
|
1840
|
+
/**
|
|
1841
|
+
* Anchor `rel`, e.g. `noopener noreferrer`. Only meaningful with `href` — without one
|
|
1842
|
+
* the item roots at `li` and this renders as an inert attribute.
|
|
1843
|
+
*/
|
|
1844
|
+
rel?: string;
|
|
1845
|
+
/**
|
|
1846
|
+
* Menu item content (text label)
|
|
1847
|
+
*/
|
|
1848
|
+
children?: ReactNode;
|
|
1849
|
+
};
|
|
1850
|
+
type ModMenuItemProps<C extends ElementType = typeof MenuItem> = ModMenuItemOwnProps & Omit<ComponentPropsWithoutRef<C>, keyof ModMenuItemOwnProps> & {
|
|
1851
|
+
/**
|
|
1852
|
+
* Root element or component. Naming one bypasses the `href` → anchor default, so pass
|
|
1853
|
+
* a link component (`'a'`, Next.js `Link`, …) if the item still has to navigate:
|
|
1854
|
+
* `component="div"` with an `href` renders an inert attribute. `component="button"` is
|
|
1855
|
+
* the exception — ButtonBase promotes a `button` root to an anchor itself.
|
|
1856
|
+
*
|
|
1857
|
+
* @default 'li', or 'a' when `href` is set
|
|
1858
|
+
*/
|
|
1859
|
+
component?: C;
|
|
1860
|
+
};
|
|
1861
|
+
/**
|
|
1862
|
+
* ModMenuItem - Menu item component based on MUI MenuItem
|
|
1863
|
+
*
|
|
1864
|
+
* @example
|
|
1865
|
+
* ```tsx
|
|
1866
|
+
* // With icon and shortcut
|
|
1867
|
+
* <ModMenuItem icon={<UserIcon />} shortcut="⌘+P">
|
|
1868
|
+
* View profile
|
|
1869
|
+
* </ModMenuItem>
|
|
1870
|
+
*
|
|
1871
|
+
* // With secondary text (user list pattern from Figma node 4305:41844)
|
|
1872
|
+
* <ModMenuItem secondaryText="@phoenix">Phoenix Baker</ModMenuItem>
|
|
1873
|
+
* <ModMenuItem secondaryText="@olivia">Olivia Rhye</ModMenuItem>
|
|
1874
|
+
*
|
|
1875
|
+
* // Disabled state
|
|
1876
|
+
* <ModMenuItem disabled>Disabled item</ModMenuItem>
|
|
1877
|
+
*
|
|
1878
|
+
* // As an anchor — `href` alone is enough
|
|
1879
|
+
* <ModMenuItem href="/api-explorer">API explorer</ModMenuItem>
|
|
1880
|
+
*
|
|
1881
|
+
* // External link
|
|
1882
|
+
* <ModMenuItem href="https://docs.example.com" target="_blank" rel="noopener noreferrer">
|
|
1883
|
+
* Documentation
|
|
1884
|
+
* </ModMenuItem>
|
|
1885
|
+
*
|
|
1886
|
+
* // Client-side routing (Next.js) — an explicit `component` wins over the anchor default
|
|
1887
|
+
* <ModMenuItem component={NextLink} href="/api-explorer">API explorer</ModMenuItem>
|
|
1888
|
+
* ```
|
|
1889
|
+
*/
|
|
1890
|
+
declare function ModMenuItem<C extends ElementType = typeof MenuItem>({ icon, shortcut, secondaryText, children, component, href, ...rest }: ModMenuItemProps<C>): react_jsx_runtime.JSX.Element;
|
|
1891
|
+
declare namespace ModMenuItem {
|
|
1892
|
+
var displayName: string;
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1827
1895
|
interface ModActionsCellProps extends Omit<GridRenderCellParams, 'api'> {
|
|
1828
1896
|
api?: GridRenderCellParams['api'];
|
|
1829
1897
|
children: ReactNode;
|
|
@@ -2472,11 +2540,6 @@ declare const ModRadio: {
|
|
|
2472
2540
|
displayName: string;
|
|
2473
2541
|
};
|
|
2474
2542
|
|
|
2475
|
-
/**
|
|
2476
|
-
* ModRadioButtonWithText
|
|
2477
|
-
*/
|
|
2478
|
-
declare const ModRadioButtonWithText: StyledComponent<_mui_system.MUIStyledCommonProps<_mui_material.Theme>, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
2479
|
-
|
|
2480
2543
|
interface ModRipplingDotProps extends BoxProps$1 {
|
|
2481
2544
|
}
|
|
2482
2545
|
/**
|
|
@@ -2505,6 +2568,28 @@ declare const ModSearchChip: {
|
|
|
2505
2568
|
displayName: string;
|
|
2506
2569
|
};
|
|
2507
2570
|
|
|
2571
|
+
type ModSelectProps = SelectProps;
|
|
2572
|
+
/**
|
|
2573
|
+
* ModSelect - Select component with design system styling
|
|
2574
|
+
*
|
|
2575
|
+
* A styled version of MUI's Select that uses design system tokens, Lucide ChevronDown icon,
|
|
2576
|
+
* and ModMenu/ModMenuItem for the dropdown list.
|
|
2577
|
+
*
|
|
2578
|
+
* @example
|
|
2579
|
+
* ```tsx
|
|
2580
|
+
* import { ModSelect, ModSelectOption } from '@moderneinc/design-system-components'
|
|
2581
|
+
*
|
|
2582
|
+
* <ModSelect value={value} onChange={handleChange}>
|
|
2583
|
+
* <ModSelectOption value="option1">Option 1</ModSelectOption>
|
|
2584
|
+
* <ModSelectOption value="option2">Option 2</ModSelectOption>
|
|
2585
|
+
* </ModSelect>
|
|
2586
|
+
* ```
|
|
2587
|
+
*/
|
|
2588
|
+
declare const ModSelect: {
|
|
2589
|
+
(props: ModSelectProps): react_jsx_runtime.JSX.Element;
|
|
2590
|
+
displayName: string;
|
|
2591
|
+
};
|
|
2592
|
+
|
|
2508
2593
|
interface ModSelectFieldOption {
|
|
2509
2594
|
value: string | number;
|
|
2510
2595
|
label: ReactNode;
|
|
@@ -2738,7 +2823,7 @@ declare const ModTabPanel: {
|
|
|
2738
2823
|
/**
|
|
2739
2824
|
* ModTabs - Tabs container component based on MUI Tabs
|
|
2740
2825
|
*/
|
|
2741
|
-
declare const ModTabs: StyledComponent<_mui_material.TabsOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style" | "
|
|
2826
|
+
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
2827
|
interface ModTabProps extends Omit<TabProps, 'label'> {
|
|
2743
2828
|
/**
|
|
2744
2829
|
* The label for the tab
|
|
@@ -2939,11 +3024,6 @@ declare const ModToggleButtonGroup: {
|
|
|
2939
3024
|
displayName: string;
|
|
2940
3025
|
};
|
|
2941
3026
|
|
|
2942
|
-
/**
|
|
2943
|
-
* ModToggleButtonWithText
|
|
2944
|
-
*/
|
|
2945
|
-
declare const ModToggleButtonWithText: StyledComponent<_mui_system.MUIStyledCommonProps<_mui_material.Theme>, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
2946
|
-
|
|
2947
3027
|
interface ModToolbarProps extends ToolbarProps {
|
|
2948
3028
|
/**
|
|
2949
3029
|
* Toolbar content (typically ModQuickFilter, ModButton, ModToggle, etc.)
|
|
@@ -3013,9 +3093,8 @@ interface ModTooltipProps extends Omit<TooltipProps, 'title' | 'variant'> {
|
|
|
3013
3093
|
*/
|
|
3014
3094
|
title: ReactNode;
|
|
3015
3095
|
/**
|
|
3016
|
-
* Optional supporting description text. When provided, shows
|
|
3017
|
-
*
|
|
3018
|
-
* description (12px medium).
|
|
3096
|
+
* Optional supporting description text. When provided, shows the title
|
|
3097
|
+
* (semibold) above a muted description (regular weight).
|
|
3019
3098
|
* @default undefined
|
|
3020
3099
|
*/
|
|
3021
3100
|
description?: string;
|
|
@@ -3031,23 +3110,13 @@ interface ModTooltipProps extends Omit<TooltipProps, 'title' | 'variant'> {
|
|
|
3031
3110
|
* - Dark: surfaces.white, typography.body
|
|
3032
3111
|
* - Brand: surfaces.snackbarBrand, typography.linkWhite (both fixed across modes)
|
|
3033
3112
|
* - Shadow: neutralMedium (0px 8px 15px 0px rgba(31,41,55,0.1))
|
|
3034
|
-
* - Typography:
|
|
3113
|
+
* - Typography: semanticTypography.tooltip (12px/1.5 line-height), fontWeight.semiBold (600) for the title
|
|
3035
3114
|
*/
|
|
3036
3115
|
declare const ModTooltip: {
|
|
3037
3116
|
({ variant, title, description, children, arrow, placement, ...props }: ModTooltipProps): react_jsx_runtime.JSX.Element;
|
|
3038
3117
|
displayName: string;
|
|
3039
3118
|
};
|
|
3040
3119
|
|
|
3041
|
-
/**
|
|
3042
|
-
* ModTopNav
|
|
3043
|
-
*/
|
|
3044
|
-
declare const ModTopNav: StyledComponent<_mui_system.MUIStyledCommonProps<_mui_material.Theme>, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3045
|
-
|
|
3046
|
-
/**
|
|
3047
|
-
* ModTourModal
|
|
3048
|
-
*/
|
|
3049
|
-
declare const ModTourModal: StyledComponent<_mui_system.MUIStyledCommonProps<_mui_material.Theme>, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3050
|
-
|
|
3051
3120
|
/**
|
|
3052
3121
|
* Extended item data that ModTreeItem can read from the items array.
|
|
3053
3122
|
* Consumers pass these via the `items` prop on ModTreeView.
|
|
@@ -3084,7 +3153,7 @@ declare const ModTreeView: {
|
|
|
3084
3153
|
displayName: string;
|
|
3085
3154
|
};
|
|
3086
3155
|
|
|
3087
|
-
declare const StyledToggleButton: StyledComponent<_mui_material.ToggleButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, keyof _mui_material.ToggleButtonOwnProps> & Omit<_mui_material.ButtonBaseOwnProps, "
|
|
3156
|
+
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
3157
|
interface ModTypologyControlProps extends Omit<ToggleButtonGroupProps, 'orientation'> {
|
|
3089
3158
|
}
|
|
3090
3159
|
/**
|
|
@@ -3109,7 +3178,7 @@ declare const ModTypologyControl: {
|
|
|
3109
3178
|
* Produces a double-ring effect: a white inner gap (via outline-offset) and a colored outer ring.
|
|
3110
3179
|
*/
|
|
3111
3180
|
declare const focusRingStyles: {
|
|
3112
|
-
readonly outline: "2px solid var(--mod-border-focus)";
|
|
3181
|
+
readonly outline: "2px solid var(--mod-color-border-focus)";
|
|
3113
3182
|
readonly outlineOffset: "2px";
|
|
3114
3183
|
};
|
|
3115
3184
|
|
|
@@ -3132,16 +3201,20 @@ declare const ModVibratingDot: FunctionComponent<ModVibratingDotProps>;
|
|
|
3132
3201
|
|
|
3133
3202
|
|
|
3134
3203
|
|
|
3135
|
-
//
|
|
3204
|
+
// MUI types `slotProps.<slot>` against its own component, so a custom slot's extra
|
|
3205
|
+
// props (e.g. the columns panel's `showSearch`) are rejected even when that slot is
|
|
3206
|
+
// installed. MUI's `*PropsOverrides` interfaces are the mechanism for declaring them.
|
|
3136
3207
|
declare module '@mui/x-data-grid' {
|
|
3137
3208
|
interface FooterPropsOverrides extends ModFooterProps {}
|
|
3209
|
+
interface ColumnsPanelPropsOverrides extends ModDataGridColumnsPanelProps {}
|
|
3138
3210
|
}
|
|
3139
3211
|
|
|
3140
3212
|
declare module '@mui/x-data-grid-pro' {
|
|
3141
3213
|
interface FooterPropsOverrides extends ModFooterProps {}
|
|
3214
|
+
interface ColumnsPanelPropsOverrides extends ModDataGridColumnsPanelProps {}
|
|
3142
3215
|
}
|
|
3143
3216
|
|
|
3144
3217
|
declare const version: string
|
|
3145
3218
|
|
|
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 };
|
|
3219
|
+
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 };
|
|
3220
|
+
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 };
|