@moderneinc/design-system-components 6.0.1-next.66db2f → 6.0.1-next.71460e
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/DataGridFilterPanel/DataGridFilterPanel.d.ts +0 -1
- package/dist/MenuItem/MenuItem.d.ts +30 -11
- package/dist/index.d.ts +34 -45
- package/dist/index.esm.js +12 -37
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -42
- package/dist/index.js.map +1 -1
- package/package.json +3 -22
- 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
|
@@ -1,7 +1,6 @@
|
|
|
1
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
|
-
export type { GridFilterItem as FilterItem, GridFilterOperator as FilterOperator, } from '@mui/x-data-grid';
|
|
5
4
|
/**
|
|
6
5
|
* Icon components for DataGrid filter panel slots
|
|
7
6
|
* These must be passed to the DataGrid's slots prop
|
|
@@ -19,15 +19,26 @@ type ModMenuItemOwnProps = {
|
|
|
19
19
|
*/
|
|
20
20
|
secondaryText?: string;
|
|
21
21
|
/**
|
|
22
|
-
* URL to navigate to.
|
|
23
|
-
* MUI
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* URL to navigate to. Supplying `href` roots the item at an anchor instead of the `li`
|
|
23
|
+
* MUI defaults to, so it navigates and offers the browser's open-in-new-tab on middle-
|
|
24
|
+
* or right-click. Pass `component` explicitly (e.g. a router link such as Next.js
|
|
25
|
+
* `Link`) to override that default.
|
|
26
|
+
*
|
|
27
|
+
* The anchor then sits directly inside `MenuList`'s `ul`. `role="menuitem"` keeps that
|
|
28
|
+
* correct for ARIA, but `ul`'s content model permits only `li`, so HTML validators and
|
|
29
|
+
* axe-core's `list` rule flag it. This is the pattern MUI's own docs use for link menu
|
|
30
|
+
* items, and what `ModListItem` already produces inside `List`.
|
|
26
31
|
*/
|
|
27
32
|
href?: string;
|
|
28
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Anchor `target`, e.g. `_blank`. Only meaningful with `href` — without one the item
|
|
35
|
+
* roots at `li` and this renders as an inert attribute, the same trap as #722.
|
|
36
|
+
*/
|
|
29
37
|
target?: string;
|
|
30
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Anchor `rel`, e.g. `noopener noreferrer`. Only meaningful with `href` — without one
|
|
40
|
+
* the item roots at `li` and this renders as an inert attribute.
|
|
41
|
+
*/
|
|
31
42
|
rel?: string;
|
|
32
43
|
/**
|
|
33
44
|
* Menu item content (text label)
|
|
@@ -35,6 +46,14 @@ type ModMenuItemOwnProps = {
|
|
|
35
46
|
children?: ReactNode;
|
|
36
47
|
};
|
|
37
48
|
export type ModMenuItemProps<C extends ElementType = typeof MenuItem> = ModMenuItemOwnProps & Omit<ComponentPropsWithoutRef<C>, keyof ModMenuItemOwnProps> & {
|
|
49
|
+
/**
|
|
50
|
+
* Root element or component. Naming one bypasses the `href` → anchor default, so pass
|
|
51
|
+
* a link component (`'a'`, Next.js `Link`, …) if the item still has to navigate:
|
|
52
|
+
* `component="div"` with an `href` renders an inert attribute. `component="button"` is
|
|
53
|
+
* the exception — ButtonBase promotes a `button` root to an anchor itself.
|
|
54
|
+
*
|
|
55
|
+
* @default 'li', or 'a' when `href` is set
|
|
56
|
+
*/
|
|
38
57
|
component?: C;
|
|
39
58
|
};
|
|
40
59
|
/**
|
|
@@ -54,19 +73,19 @@ export type ModMenuItemProps<C extends ElementType = typeof MenuItem> = ModMenuI
|
|
|
54
73
|
* // Disabled state
|
|
55
74
|
* <ModMenuItem disabled>Disabled item</ModMenuItem>
|
|
56
75
|
*
|
|
57
|
-
* // As an anchor — `
|
|
58
|
-
* <ModMenuItem
|
|
76
|
+
* // As an anchor — `href` alone is enough
|
|
77
|
+
* <ModMenuItem href="/api-explorer">API explorer</ModMenuItem>
|
|
59
78
|
*
|
|
60
79
|
* // External link
|
|
61
|
-
* <ModMenuItem
|
|
80
|
+
* <ModMenuItem href="https://docs.example.com" target="_blank" rel="noopener noreferrer">
|
|
62
81
|
* Documentation
|
|
63
82
|
* </ModMenuItem>
|
|
64
83
|
*
|
|
65
|
-
* // Client-side routing (Next.js)
|
|
84
|
+
* // Client-side routing (Next.js) — an explicit `component` wins over the anchor default
|
|
66
85
|
* <ModMenuItem component={NextLink} href="/api-explorer">API explorer</ModMenuItem>
|
|
67
86
|
* ```
|
|
68
87
|
*/
|
|
69
|
-
export declare function ModMenuItem<C extends ElementType = typeof MenuItem>({ icon, shortcut, secondaryText, children, ...rest }: ModMenuItemProps<C>): import("react/jsx-runtime").JSX.Element;
|
|
88
|
+
export declare function ModMenuItem<C extends ElementType = typeof MenuItem>({ icon, shortcut, secondaryText, children, component, href, ...rest }: ModMenuItemProps<C>): import("react/jsx-runtime").JSX.Element;
|
|
70
89
|
export declare namespace ModMenuItem {
|
|
71
90
|
var displayName: string;
|
|
72
91
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,9 +18,6 @@ import { DatePickerProps } from '@mui/x-date-pickers/DatePicker';
|
|
|
18
18
|
import { PickersShortcutsItem } from '@mui/x-date-pickers/PickersShortcuts';
|
|
19
19
|
import { DateRangePickerProps } from '@mui/x-date-pickers-pro/DateRangePicker';
|
|
20
20
|
import { DateRange } from '@mui/x-date-pickers-pro/models';
|
|
21
|
-
import * as _mui_system from '@mui/system';
|
|
22
|
-
import * as _mui_material from '@mui/material';
|
|
23
|
-
import { BoxProps as BoxProps$1 } from '@mui/material';
|
|
24
21
|
import { DividerProps } from '@mui/material/Divider';
|
|
25
22
|
import { PaperProps } from '@mui/material/Paper';
|
|
26
23
|
import { AvatarProps } from '@mui/material/Avatar';
|
|
@@ -32,8 +29,11 @@ import { DialogProps } from '@mui/material/Dialog';
|
|
|
32
29
|
import { BoxProps } from '@mui/material/Box';
|
|
33
30
|
import { LinearProgressProps } from '@mui/material/LinearProgress';
|
|
34
31
|
import { RadioProps } from '@mui/material/Radio';
|
|
32
|
+
import * as _mui_material from '@mui/material';
|
|
33
|
+
import { BoxProps as BoxProps$1 } from '@mui/material';
|
|
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';
|
|
@@ -1052,15 +1052,26 @@ type ModMenuItemOwnProps = {
|
|
|
1052
1052
|
*/
|
|
1053
1053
|
secondaryText?: string;
|
|
1054
1054
|
/**
|
|
1055
|
-
* URL to navigate to.
|
|
1056
|
-
* MUI
|
|
1057
|
-
*
|
|
1058
|
-
*
|
|
1055
|
+
* URL to navigate to. Supplying `href` roots the item at an anchor instead of the `li`
|
|
1056
|
+
* MUI defaults to, so it navigates and offers the browser's open-in-new-tab on middle-
|
|
1057
|
+
* or right-click. Pass `component` explicitly (e.g. a router link such as Next.js
|
|
1058
|
+
* `Link`) to override that default.
|
|
1059
|
+
*
|
|
1060
|
+
* The anchor then sits directly inside `MenuList`'s `ul`. `role="menuitem"` keeps that
|
|
1061
|
+
* correct for ARIA, but `ul`'s content model permits only `li`, so HTML validators and
|
|
1062
|
+
* axe-core's `list` rule flag it. This is the pattern MUI's own docs use for link menu
|
|
1063
|
+
* items, and what `ModListItem` already produces inside `List`.
|
|
1059
1064
|
*/
|
|
1060
1065
|
href?: string;
|
|
1061
|
-
/**
|
|
1066
|
+
/**
|
|
1067
|
+
* Anchor `target`, e.g. `_blank`. Only meaningful with `href` — without one the item
|
|
1068
|
+
* roots at `li` and this renders as an inert attribute, the same trap as #722.
|
|
1069
|
+
*/
|
|
1062
1070
|
target?: string;
|
|
1063
|
-
/**
|
|
1071
|
+
/**
|
|
1072
|
+
* Anchor `rel`, e.g. `noopener noreferrer`. Only meaningful with `href` — without one
|
|
1073
|
+
* the item roots at `li` and this renders as an inert attribute.
|
|
1074
|
+
*/
|
|
1064
1075
|
rel?: string;
|
|
1065
1076
|
/**
|
|
1066
1077
|
* Menu item content (text label)
|
|
@@ -1068,6 +1079,14 @@ type ModMenuItemOwnProps = {
|
|
|
1068
1079
|
children?: ReactNode;
|
|
1069
1080
|
};
|
|
1070
1081
|
type ModMenuItemProps<C extends ElementType = typeof MenuItem> = ModMenuItemOwnProps & Omit<ComponentPropsWithoutRef<C>, keyof ModMenuItemOwnProps> & {
|
|
1082
|
+
/**
|
|
1083
|
+
* Root element or component. Naming one bypasses the `href` → anchor default, so pass
|
|
1084
|
+
* a link component (`'a'`, Next.js `Link`, …) if the item still has to navigate:
|
|
1085
|
+
* `component="div"` with an `href` renders an inert attribute. `component="button"` is
|
|
1086
|
+
* the exception — ButtonBase promotes a `button` root to an anchor itself.
|
|
1087
|
+
*
|
|
1088
|
+
* @default 'li', or 'a' when `href` is set
|
|
1089
|
+
*/
|
|
1071
1090
|
component?: C;
|
|
1072
1091
|
};
|
|
1073
1092
|
/**
|
|
@@ -1087,19 +1106,19 @@ type ModMenuItemProps<C extends ElementType = typeof MenuItem> = ModMenuItemOwnP
|
|
|
1087
1106
|
* // Disabled state
|
|
1088
1107
|
* <ModMenuItem disabled>Disabled item</ModMenuItem>
|
|
1089
1108
|
*
|
|
1090
|
-
* // As an anchor — `
|
|
1091
|
-
* <ModMenuItem
|
|
1109
|
+
* // As an anchor — `href` alone is enough
|
|
1110
|
+
* <ModMenuItem href="/api-explorer">API explorer</ModMenuItem>
|
|
1092
1111
|
*
|
|
1093
1112
|
* // External link
|
|
1094
|
-
* <ModMenuItem
|
|
1113
|
+
* <ModMenuItem href="https://docs.example.com" target="_blank" rel="noopener noreferrer">
|
|
1095
1114
|
* Documentation
|
|
1096
1115
|
* </ModMenuItem>
|
|
1097
1116
|
*
|
|
1098
|
-
* // Client-side routing (Next.js)
|
|
1117
|
+
* // Client-side routing (Next.js) — an explicit `component` wins over the anchor default
|
|
1099
1118
|
* <ModMenuItem component={NextLink} href="/api-explorer">API explorer</ModMenuItem>
|
|
1100
1119
|
* ```
|
|
1101
1120
|
*/
|
|
1102
|
-
declare function ModMenuItem<C extends ElementType = typeof MenuItem>({ icon, shortcut, secondaryText, children, ...rest }: ModMenuItemProps<C>): react_jsx_runtime.JSX.Element;
|
|
1121
|
+
declare function ModMenuItem<C extends ElementType = typeof MenuItem>({ icon, shortcut, secondaryText, children, component, href, ...rest }: ModMenuItemProps<C>): react_jsx_runtime.JSX.Element;
|
|
1103
1122
|
declare namespace ModMenuItem {
|
|
1104
1123
|
var displayName: string;
|
|
1105
1124
|
}
|
|
@@ -1325,16 +1344,6 @@ declare const ModDatePicker: {
|
|
|
1325
1344
|
displayName: string;
|
|
1326
1345
|
};
|
|
1327
1346
|
|
|
1328
|
-
/**
|
|
1329
|
-
* ModDatePickerListItem
|
|
1330
|
-
*/
|
|
1331
|
-
declare const ModDatePickerListItem: StyledComponent<_mui_system.MUIStyledCommonProps<_mui_material.Theme>, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
1332
|
-
|
|
1333
|
-
/**
|
|
1334
|
-
* ModDatePickerMenu
|
|
1335
|
-
*/
|
|
1336
|
-
declare const ModDatePickerMenu: StyledComponent<_mui_system.MUIStyledCommonProps<_mui_material.Theme>, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
1337
|
-
|
|
1338
1347
|
interface ModDividerProps extends DividerProps {
|
|
1339
1348
|
}
|
|
1340
1349
|
/**
|
|
@@ -2552,11 +2561,6 @@ declare const ModRadio: {
|
|
|
2552
2561
|
displayName: string;
|
|
2553
2562
|
};
|
|
2554
2563
|
|
|
2555
|
-
/**
|
|
2556
|
-
* ModRadioButtonWithText
|
|
2557
|
-
*/
|
|
2558
|
-
declare const ModRadioButtonWithText: StyledComponent<_mui_system.MUIStyledCommonProps<_mui_material.Theme>, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
2559
|
-
|
|
2560
2564
|
interface ModRipplingDotProps extends BoxProps$1 {
|
|
2561
2565
|
}
|
|
2562
2566
|
/**
|
|
@@ -3019,11 +3023,6 @@ declare const ModToggleButtonGroup: {
|
|
|
3019
3023
|
displayName: string;
|
|
3020
3024
|
};
|
|
3021
3025
|
|
|
3022
|
-
/**
|
|
3023
|
-
* ModToggleButtonWithText
|
|
3024
|
-
*/
|
|
3025
|
-
declare const ModToggleButtonWithText: StyledComponent<_mui_system.MUIStyledCommonProps<_mui_material.Theme>, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3026
|
-
|
|
3027
3026
|
interface ModToolbarProps extends ToolbarProps {
|
|
3028
3027
|
/**
|
|
3029
3028
|
* Toolbar content (typically ModQuickFilter, ModButton, ModToggle, etc.)
|
|
@@ -3118,16 +3117,6 @@ declare const ModTooltip: {
|
|
|
3118
3117
|
displayName: string;
|
|
3119
3118
|
};
|
|
3120
3119
|
|
|
3121
|
-
/**
|
|
3122
|
-
* ModTopNav
|
|
3123
|
-
*/
|
|
3124
|
-
declare const ModTopNav: StyledComponent<_mui_system.MUIStyledCommonProps<_mui_material.Theme>, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3125
|
-
|
|
3126
|
-
/**
|
|
3127
|
-
* ModTourModal
|
|
3128
|
-
*/
|
|
3129
|
-
declare const ModTourModal: StyledComponent<_mui_system.MUIStyledCommonProps<_mui_material.Theme>, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3130
|
-
|
|
3131
3120
|
/**
|
|
3132
3121
|
* Extended item data that ModTreeItem can read from the items array.
|
|
3133
3122
|
* Consumers pass these via the `items` prop on ModTreeView.
|
|
@@ -3227,5 +3216,5 @@ declare module '@mui/x-data-grid-pro' {
|
|
|
3227
3216
|
|
|
3228
3217
|
declare const version: string
|
|
3229
3218
|
|
|
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,
|
|
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 };
|
|
3231
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, 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 };
|
package/dist/index.esm.js
CHANGED
|
@@ -1854,20 +1854,25 @@ const Shortcut = styled('span')(({ theme }) => ({
|
|
|
1854
1854
|
* // Disabled state
|
|
1855
1855
|
* <ModMenuItem disabled>Disabled item</ModMenuItem>
|
|
1856
1856
|
*
|
|
1857
|
-
* // As an anchor — `
|
|
1858
|
-
* <ModMenuItem
|
|
1857
|
+
* // As an anchor — `href` alone is enough
|
|
1858
|
+
* <ModMenuItem href="/api-explorer">API explorer</ModMenuItem>
|
|
1859
1859
|
*
|
|
1860
1860
|
* // External link
|
|
1861
|
-
* <ModMenuItem
|
|
1861
|
+
* <ModMenuItem href="https://docs.example.com" target="_blank" rel="noopener noreferrer">
|
|
1862
1862
|
* Documentation
|
|
1863
1863
|
* </ModMenuItem>
|
|
1864
1864
|
*
|
|
1865
|
-
* // Client-side routing (Next.js)
|
|
1865
|
+
* // Client-side routing (Next.js) — an explicit `component` wins over the anchor default
|
|
1866
1866
|
* <ModMenuItem component={NextLink} href="/api-explorer">API explorer</ModMenuItem>
|
|
1867
1867
|
* ```
|
|
1868
1868
|
*/
|
|
1869
|
-
function ModMenuItem({ icon, shortcut, secondaryText, children, ...rest }) {
|
|
1870
|
-
|
|
1869
|
+
function ModMenuItem({ icon, shortcut, secondaryText, children, component, href, ...rest }) {
|
|
1870
|
+
// MUI roots MenuItem at `li`, and ButtonBase only swaps in a link component when the
|
|
1871
|
+
// root is `button` (as of @mui/material 9.2) — so an `href` on the default root lands as
|
|
1872
|
+
// an attribute on the `<li>` and never navigates (#722). Root at an anchor instead,
|
|
1873
|
+
// unless the caller named a component (e.g. a router link) themselves.
|
|
1874
|
+
const rootProps = { ...rest, href, component: component ?? (href ? 'a' : undefined) };
|
|
1875
|
+
return (jsx(StyledMenuItem, { ...rootProps, children: jsxs(MenuItemContent, { children: [icon && jsx(IconWrapper$1, { children: icon }), jsxs(LabelContainer$3, { children: [jsx(Label$3, { children: children }), secondaryText && jsx(SecondaryLabel, { children: secondaryText })] }), shortcut && jsx(Shortcut, { children: shortcut })] }) }));
|
|
1871
1876
|
}
|
|
1872
1877
|
ModMenuItem.displayName = 'ModMenuItem';
|
|
1873
1878
|
|
|
@@ -2884,16 +2889,6 @@ const ModDatePicker = ({ type = 'single', open, label, value, rangeValue, onChan
|
|
|
2884
2889
|
};
|
|
2885
2890
|
ModDatePicker.displayName = 'ModDatePicker';
|
|
2886
2891
|
|
|
2887
|
-
/**
|
|
2888
|
-
* ModDatePickerListItem
|
|
2889
|
-
*/
|
|
2890
|
-
const ModDatePickerListItem = styled('div')({});
|
|
2891
|
-
|
|
2892
|
-
/**
|
|
2893
|
-
* ModDatePickerMenu
|
|
2894
|
-
*/
|
|
2895
|
-
const ModDatePickerMenu = styled('div')({});
|
|
2896
|
-
|
|
2897
2892
|
const StyledDivider = styled(Divider)(() => ({
|
|
2898
2893
|
borderColor: semanticColors.border.secondary,
|
|
2899
2894
|
marginTop: spacing.spacing_1,
|
|
@@ -5238,11 +5233,6 @@ const ModRadio = ({ size = 'medium', label, helperText, disabled, ...props }) =>
|
|
|
5238
5233
|
};
|
|
5239
5234
|
ModRadio.displayName = 'ModRadio';
|
|
5240
5235
|
|
|
5241
|
-
/**
|
|
5242
|
-
* ModRadioButtonWithText
|
|
5243
|
-
*/
|
|
5244
|
-
const ModRadioButtonWithText = styled('div')({});
|
|
5245
|
-
|
|
5246
5236
|
// Box-breathing rhythm: appear (inhale) → hold → expand+fade (exhale) → rest.
|
|
5247
5237
|
// Max scale is capped so the ring fits within a parent row's line-height.
|
|
5248
5238
|
const ripple = keyframes `
|
|
@@ -6190,11 +6180,6 @@ const ModToggleButtonGroup = ({ size = 'medium', variant = 'default', children,
|
|
|
6190
6180
|
};
|
|
6191
6181
|
ModToggleButtonGroup.displayName = 'ModToggleButtonGroup';
|
|
6192
6182
|
|
|
6193
|
-
/**
|
|
6194
|
-
* ModToggleButtonWithText
|
|
6195
|
-
*/
|
|
6196
|
-
const ModToggleButtonWithText = styled('div')({});
|
|
6197
|
-
|
|
6198
6183
|
const StyledToolbar = styled(Toolbar)(({ theme }) => ({
|
|
6199
6184
|
backgroundColor: semanticColors.surfaces.white,
|
|
6200
6185
|
minHeight: 'auto',
|
|
@@ -6252,16 +6237,6 @@ const ModToolbar = ({ children, ...props }) => {
|
|
|
6252
6237
|
};
|
|
6253
6238
|
ModToolbar.displayName = 'ModToolbar';
|
|
6254
6239
|
|
|
6255
|
-
/**
|
|
6256
|
-
* ModTopNav
|
|
6257
|
-
*/
|
|
6258
|
-
const ModTopNav = styled('div')({});
|
|
6259
|
-
|
|
6260
|
-
/**
|
|
6261
|
-
* ModTourModal
|
|
6262
|
-
*/
|
|
6263
|
-
const ModTourModal = styled('div')({});
|
|
6264
|
-
|
|
6265
6240
|
/**
|
|
6266
6241
|
* Custom label component that reads extra slot data from the item model.
|
|
6267
6242
|
* Used as `slots.label` on the TreeItem.
|
|
@@ -6489,5 +6464,5 @@ ModVibratingDot.displayName = 'ModVibratingDot';
|
|
|
6489
6464
|
|
|
6490
6465
|
const version = '0.0.0-development';
|
|
6491
6466
|
|
|
6492
|
-
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,
|
|
6467
|
+
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 };
|
|
6493
6468
|
//# sourceMappingURL=index.esm.js.map
|