@moderneinc/design-system-components 6.1.0-alpha.f3c8fa → 7.0.0-next.57acda

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.
@@ -43,7 +43,7 @@ export interface ModActivityHeaderProps {
43
43
  * field: 'activity',
44
44
  * headerName: '',
45
45
  * width: 34,
46
- * renderHeader: () => <ModActivityHeader size="condensed" color="commitJob" />,
46
+ * renderHeader: () => <ModActivityHeader size="compact" color="commitJob" />,
47
47
  * renderCell: (params) => (
48
48
  * <ModActivityIndicatorCell
49
49
  * event={params.row.eventType}
@@ -8,7 +8,7 @@ import type { SxProps, Theme } from '@mui/material/styles';
8
8
  * they carry this surface themselves.
9
9
  */
10
10
  export declare const panelSurfaceStyles: {
11
- readonly backgroundColor: "var(--mod-surfaces-white)";
11
+ readonly backgroundColor: "var(--mod-color-surface-raised)";
12
12
  };
13
13
  export declare const getDataGridHeaderStyles: () => SxProps<Theme>;
14
14
  export declare const getDataGridRowStyles: () => SxProps<Theme>;
@@ -1,7 +1,5 @@
1
- import { GridFilterPanel as MuiGridFilterPanel } from '@mui/x-data-grid';
1
+ import { type GridSlotProps, type GridSlotsComponent, GridFilterPanel as MuiGridFilterPanel } from '@mui/x-data-grid';
2
2
  import type React from 'react';
3
- import { ModSelect } from '../Select/Select';
4
- export type { GridFilterItem as FilterItem, GridFilterOperator as FilterOperator, } from '@mui/x-data-grid';
5
3
  /**
6
4
  * Icon components for DataGrid filter panel slots
7
5
  * These must be passed to the DataGrid's slots prop
@@ -18,6 +16,19 @@ export declare const ModDataGridFilterPanelRemoveAllIcon: {
18
16
  (): import("react/jsx-runtime").JSX.Element;
19
17
  displayName: string;
20
18
  };
19
+ export type ModDataGridSelectProps = GridSlotProps['baseSelect'];
20
+ /**
21
+ * ModDataGridSelect - ModSelect adapted to the DataGrid `baseSelect` slot contract.
22
+ *
23
+ * Kept structurally parallel to MUI's own `BaseSelect` (`@mui/x-data-grid/material`) so the two
24
+ * can be diffed on upgrade.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <ModDataGrid rows={rows} columns={columns} slots={{ baseSelect: ModDataGridSelect }} />
29
+ * ```
30
+ */
31
+ export declare const ModDataGridSelect: GridSlotsComponent['baseSelect'];
21
32
  /**
22
33
  * ModDataGridFilterPanel - MUI GridFilterPanel with design system styling and Lucide icons
23
34
  *
@@ -48,7 +59,6 @@ export declare const ModDataGridFilterPanelRemoveAllIcon: {
48
59
  * />
49
60
  * ```
50
61
  */
51
- export { ModSelect as ModDataGridSelect };
52
62
  export declare const ModDataGridFilterPanel: {
53
63
  (props: React.ComponentProps<typeof MuiGridFilterPanel>): import("react/jsx-runtime").JSX.Element;
54
64
  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" | "size" | "children" | "sx" | "className" | "classes" | "disabled" | "variant" | "error" | "fullWidth" | "required" | "focused" | "hiddenLabel"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
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" | "size" | "children" | "sx" | "className" | "classes" | "disabled" | "variant" | "filled" | "error" | "required" | "focused" | "disableAnimation" | "shrink"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
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" | "children" | "sx" | "className" | "classes" | "disabled" | "variant" | "filled" | "error" | "required" | "focused"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
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,18 +19,41 @@ type ModMenuItemOwnProps = {
19
19
  */
20
20
  secondaryText?: string;
21
21
  /**
22
- * URL to navigate to. When provided, the menu item renders as an anchor
23
- * element (via MUI ButtonBase) so users can middle-click or right-click
24
- * to open in a new tab. For client-side routing, also pass
25
- * `component={NextLink}` (or your router's link component).
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;
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
+ */
37
+ target?: string;
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
+ */
42
+ rel?: string;
28
43
  /**
29
44
  * Menu item content (text label)
30
45
  */
31
46
  children?: ReactNode;
32
47
  };
33
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
+ */
34
57
  component?: C;
35
58
  };
36
59
  /**
@@ -50,7 +73,7 @@ export type ModMenuItemProps<C extends ElementType = typeof MenuItem> = ModMenuI
50
73
  * // Disabled state
51
74
  * <ModMenuItem disabled>Disabled item</ModMenuItem>
52
75
  *
53
- * // As an anchor — middle-click/right-click open in a new tab
76
+ * // As an anchor — `href` alone is enough
54
77
  * <ModMenuItem href="/api-explorer">API explorer</ModMenuItem>
55
78
  *
56
79
  * // External link
@@ -58,11 +81,11 @@ export type ModMenuItemProps<C extends ElementType = typeof MenuItem> = ModMenuI
58
81
  * Documentation
59
82
  * </ModMenuItem>
60
83
  *
61
- * // Client-side routing (Next.js)
84
+ * // Client-side routing (Next.js) — an explicit `component` wins over the anchor default
62
85
  * <ModMenuItem component={NextLink} href="/api-explorer">API explorer</ModMenuItem>
63
86
  * ```
64
87
  */
65
- 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;
66
89
  export declare namespace ModMenuItem {
67
90
  var displayName: string;
68
91
  }
@@ -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" | "children" | "sx" | "className" | "aria-label" | "aria-labelledby" | "onChange" | "classes" | "action" | "value" | "variant" | "orientation" | "slots" | "slotProps" | "allowScrollButtonsMobile" | "centered" | "indicatorColor" | "scrollButtons" | "selectionFollowsFocus" | "textColor" | "visibleScrollbar"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
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, "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "nativeButton" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "type" | keyof import("@mui/material").ToggleButtonOwnProps> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style" | "color" | "size" | "children" | "sx" | "className" | "tabIndex" | "onChange" | "onClick" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "nativeButton" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "type" | "disableFocusRipple" | "value" | "fullWidth" | "selected"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
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
  /**