@moderneinc/design-system-components 6.0.0-next.02da4a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -0
- package/dist/ActivityHeader/ActivityHeader.d.ts +58 -0
- package/dist/ActivityIndicatorCell/ActivityIndicatorCell.d.ts +65 -0
- package/dist/Alert/Alert.d.ts +54 -0
- package/dist/Badge/Badge.d.ts +40 -0
- package/dist/Banner/Banner.d.ts +52 -0
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +53 -0
- package/dist/Button/Button.d.ts +56 -0
- package/dist/ButtonTab/ButtonTab.d.ts +16 -0
- package/dist/ButtonTabGroup/ButtonTabGroup.d.ts +31 -0
- package/dist/CanceledIcon/CanceledIcon.d.ts +11 -0
- package/dist/Card/Card.d.ts +32 -0
- package/dist/Checkbox/Checkbox.d.ts +78 -0
- package/dist/CheckboxWithText/CheckboxWithText.d.ts +32 -0
- package/dist/CodeSnippet/CodeSnippet.d.ts +38 -0
- package/dist/DataGrid/DataGrid.d.ts +58 -0
- package/dist/DataGrid/DataGrid.styles.d.ts +14 -0
- package/dist/DataGridCell/DataGridCell.d.ts +120 -0
- package/dist/DataGridColumnsButton/DataGridColumnsButton.d.ts +15 -0
- package/dist/DataGridColumnsPanel/DataGridColumnsPanel.d.ts +31 -0
- package/dist/DataGridFilterPanel/DataGridFilterPanel.d.ts +55 -0
- package/dist/DataGridFiltersButton/DataGridFiltersButton.d.ts +16 -0
- package/dist/DataGridHeaderCell/DataGridHeaderCell.d.ts +8 -0
- package/dist/DataGridHeaderLabel/DataGridHeaderLabel.d.ts +17 -0
- package/dist/DatePicker/DatePicker.d.ts +97 -0
- package/dist/DatePickerListItem/DatePickerListItem.d.ts +4 -0
- package/dist/DatePickerMenu/DatePickerMenu.d.ts +4 -0
- package/dist/DateTimeCell/DateTimeCell.d.ts +17 -0
- package/dist/Divider/Divider.d.ts +30 -0
- package/dist/Dot/Dot.d.ts +36 -0
- package/dist/DownloadToast/DownloadToast.d.ts +45 -0
- package/dist/DropdownInputField/DropdownInputField.d.ts +17 -0
- package/dist/EmptyState/EmptyState.d.ts +17 -0
- package/dist/FilledStatusIcons/FilledStatusIcons.d.ts +41 -0
- package/dist/FilterChip/FilterChip.d.ts +40 -0
- package/dist/Footer/Footer.d.ts +111 -0
- package/dist/GeneralAvatar/GeneralAvatar.d.ts +23 -0
- package/dist/IconButton/IconButton.d.ts +42 -0
- package/dist/IconWrapper/IconWrapper.d.ts +20 -0
- package/dist/InfiniteScrollGrid/InfiniteScrollGrid.d.ts +44 -0
- package/dist/InputField/InputField.d.ts +65 -0
- package/dist/LinkCell/LinkCell.d.ts +17 -0
- package/dist/ListItem/ListItem.d.ts +71 -0
- package/dist/ListItemButton/ListItemButton.d.ts +64 -0
- package/dist/LoadingSpinner/LoadingSpinner.d.ts +28 -0
- package/dist/Menu/Menu.d.ts +30 -0
- package/dist/MenuItem/MenuItem.d.ts +69 -0
- package/dist/ModActionsCell/ModActionsCell.d.ts +9 -0
- package/dist/ModAvatarCell/ModAvatarCell.d.ts +24 -0
- package/dist/ModIconCell/ModIconCell.d.ts +13 -0
- package/dist/ModLogoCell/ModLogoCell.d.ts +23 -0
- package/dist/ModProgressCell/ModProgressCell.d.ts +20 -0
- package/dist/ModStatusCell/ModStatusCell.d.ts +29 -0
- package/dist/Modal/Modal.d.ts +106 -0
- package/dist/NavIconButton/NavIconButton.d.ts +17 -0
- package/dist/NavigationAvatar/NavigationAvatar.d.ts +13 -0
- package/dist/NavigationItem/NavigationItem.d.ts +55 -0
- package/dist/PageContent/PageContent.d.ts +150 -0
- package/dist/PaginatedGrid/PaginatedGrid.d.ts +32 -0
- package/dist/ProgressSpinner/ProgressSpinner.d.ts +17 -0
- package/dist/Progressbar/Progressbar.d.ts +35 -0
- package/dist/QuickFilter/QuickFilter.d.ts +42 -0
- package/dist/Radio/Radio.d.ts +59 -0
- package/dist/RadioButtonWithText/RadioButtonWithText.d.ts +4 -0
- package/dist/RipplingDot/RipplingDot.d.ts +12 -0
- package/dist/SearchChip/SearchChip.d.ts +17 -0
- package/dist/Select/Select.d.ts +24 -0
- package/dist/SelectField/SelectField.d.ts +64 -0
- package/dist/SideNav/ModSideNavContext.d.ts +5 -0
- package/dist/SideNav/SideNav.d.ts +33 -0
- package/dist/Skeleton/Skeleton.d.ts +29 -0
- package/dist/TabPanel/TabPanel.d.ts +47 -0
- package/dist/Table/Table.d.ts +64 -0
- package/dist/Tabs/Tabs.d.ts +28 -0
- package/dist/Tag/Tag.d.ts +51 -0
- package/dist/Toast/Toast.d.ts +66 -0
- package/dist/Toggle/Toggle.d.ts +52 -0
- package/dist/ToggleButton/ToggleButton.d.ts +34 -0
- package/dist/ToggleButtonGroup/ToggleButtonGroup.d.ts +33 -0
- package/dist/ToggleButtonWithText/ToggleButtonWithText.d.ts +4 -0
- package/dist/Toolbar/Toolbar.d.ts +51 -0
- package/dist/Tooltip/Tooltip.d.ts +46 -0
- package/dist/TopNav/TopNav.d.ts +4 -0
- package/dist/TourModal/TourModal.d.ts +4 -0
- package/dist/Tree/Tree.d.ts +38 -0
- package/dist/TypologyControl/TypologyControl.d.ts +19 -0
- package/dist/VibratingDot/VibratingDot.d.ts +12 -0
- package/dist/index.d.ts +3147 -0
- package/dist/index.esm.js +7414 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +7527 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/colorHelpers.d.ts +7 -0
- package/dist/utils/focusRing.d.ts +10 -0
- package/dist/utils/muiProps.d.ts +1 -0
- package/package.json +100 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type SvgIconProps } from '@mui/material/SvgIcon';
|
|
2
|
+
/**
|
|
3
|
+
* Filled status icons — sourced from the published Figma library components
|
|
4
|
+
* Filled_Success / Filled_Queued / Filled_Info / Filled_Warning / Filled_Error /
|
|
5
|
+
* Filled_Neutral / Filled_Canceled.
|
|
6
|
+
*
|
|
7
|
+
* Designed at 16px; size via `fontSize` like any MUI `SvgIcon`. Each ships its
|
|
8
|
+
* intent's status color baked into the silhouette with a white inner glyph — the
|
|
9
|
+
* fill is fixed, so `color`/`htmlColor` are omitted from the props. There is no
|
|
10
|
+
* Filled_Active (the open-arc spinner cannot fill). Use below 18px; above that,
|
|
11
|
+
* prefer the Lucide outline glyph.
|
|
12
|
+
*/
|
|
13
|
+
export type ModFilledStatusIconProps = Omit<SvgIconProps, 'color' | 'htmlColor'>;
|
|
14
|
+
export declare const ModFilledSuccess: {
|
|
15
|
+
(props: ModFilledStatusIconProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const ModFilledQueued: {
|
|
19
|
+
(props: ModFilledStatusIconProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const ModFilledInfo: {
|
|
23
|
+
(props: ModFilledStatusIconProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const ModFilledWarning: {
|
|
27
|
+
(props: ModFilledStatusIconProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const ModFilledError: {
|
|
31
|
+
(props: ModFilledStatusIconProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
34
|
+
export declare const ModFilledNeutral: {
|
|
35
|
+
(props: ModFilledStatusIconProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const ModFilledCanceled: {
|
|
39
|
+
(props: ModFilledStatusIconProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
displayName: string;
|
|
41
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ChipProps } from '@mui/material/Chip';
|
|
2
|
+
export interface ModFilterChipProps extends Omit<ChipProps, 'variant' | 'color' | 'label'> {
|
|
3
|
+
/**
|
|
4
|
+
* The filter label text
|
|
5
|
+
*/
|
|
6
|
+
label: string;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the filter has active selections
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the filter dropdown is expanded
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
expanded?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Value text shown when selected (e.g. "Filter 1, Filter 2")
|
|
19
|
+
*/
|
|
20
|
+
selectedLabel?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Number of active filter selections (shown as badge when selected)
|
|
23
|
+
* @default 0
|
|
24
|
+
*/
|
|
25
|
+
count?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Handler for clearing the filter (shows X icon when provided and selected)
|
|
28
|
+
*/
|
|
29
|
+
onClear?: (e: React.MouseEvent) => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* ModFilterChip - Filter chip for filtering data, based on MUI Chip.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* <ModFilterChip label="Status" selected selectedLabel="Active, Pending" count={2} onClear={handleClear} />
|
|
36
|
+
*/
|
|
37
|
+
export declare const ModFilterChip: {
|
|
38
|
+
({ label, selected, expanded, selectedLabel, count, onClear, onClick, ...props }: ModFilterChipProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
displayName: string;
|
|
40
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface ModFooterProps {
|
|
3
|
+
/**
|
|
4
|
+
* Footer variant
|
|
5
|
+
* - "loading": Shows result count with loading indicator and "Load more" button
|
|
6
|
+
* - "pagination": Shows pagination controls with page range and navigation buttons
|
|
7
|
+
* @default "pagination"
|
|
8
|
+
*/
|
|
9
|
+
variant?: 'loading' | 'pagination';
|
|
10
|
+
/**
|
|
11
|
+
* Whether to show the drop shadow on top of footer (for scrolling effect)
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
showShadow?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether to show the loading indicator (only for "loading" variant)
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Total number of results (for "loading" variant)
|
|
22
|
+
*/
|
|
23
|
+
resultCount?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Callback when "Load more" is clicked (for "loading" variant)
|
|
26
|
+
*/
|
|
27
|
+
onLoadMore?: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Whether there are more results to load (for "loading" variant)
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
hasMore?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Custom pagination info text (for "pagination" variant)
|
|
35
|
+
* If not provided, will attempt to use DataGrid's pagination state
|
|
36
|
+
* @example "1-80 of 120"
|
|
37
|
+
*/
|
|
38
|
+
paginationInfo?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Callback when previous page button is clicked (for "pagination" variant)
|
|
41
|
+
*/
|
|
42
|
+
onPreviousPage?: () => void;
|
|
43
|
+
/**
|
|
44
|
+
* Callback when next page button is clicked (for "pagination" variant)
|
|
45
|
+
*/
|
|
46
|
+
onNextPage?: () => void;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the previous page button is disabled (for "pagination" variant)
|
|
49
|
+
* If not provided, will attempt to use DataGrid's pagination state
|
|
50
|
+
*/
|
|
51
|
+
hasPreviousPage?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Whether the next page button is disabled (for "pagination" variant)
|
|
54
|
+
* If not provided, will attempt to use DataGrid's pagination state
|
|
55
|
+
*/
|
|
56
|
+
hasNextPage?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Whether to show the selected row count on the left side (pagination variant)
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
showSelected?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Custom content to render in the footer
|
|
64
|
+
*/
|
|
65
|
+
children?: ReactNode;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* ModFooter - Footer component for data grids
|
|
69
|
+
*
|
|
70
|
+
* Provides two variants:
|
|
71
|
+
* - "loading": Shows result count with loading indicator and "Load more" button for infinite scroll
|
|
72
|
+
* - "pagination": Shows pagination controls with page range and navigation buttons
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* // Loading variant with load more
|
|
76
|
+
* <ModFooter
|
|
77
|
+
* variant="loading"
|
|
78
|
+
* loading={isLoading}
|
|
79
|
+
* resultCount={40}
|
|
80
|
+
* hasMore={true}
|
|
81
|
+
* onLoadMore={() => loadMore()}
|
|
82
|
+
* />
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* // Pagination variant
|
|
86
|
+
* <ModFooter
|
|
87
|
+
* variant="pagination"
|
|
88
|
+
* paginationInfo="1-80 of 120"
|
|
89
|
+
* hasPreviousPage={false}
|
|
90
|
+
* hasNextPage={true}
|
|
91
|
+
* onPreviousPage={() => goToPrevious()}
|
|
92
|
+
* onNextPage={() => goToNext()}
|
|
93
|
+
* />
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* // Used with DataGrid (automatically reads pagination state)
|
|
97
|
+
* <DataGrid
|
|
98
|
+
* rows={rows}
|
|
99
|
+
* columns={columns}
|
|
100
|
+
* slots={{ footer: ModFooter }}
|
|
101
|
+
* slotProps={{
|
|
102
|
+
* footer: {
|
|
103
|
+
* variant: 'pagination',
|
|
104
|
+
* },
|
|
105
|
+
* }}
|
|
106
|
+
* />
|
|
107
|
+
*/
|
|
108
|
+
export declare const ModFooter: {
|
|
109
|
+
({ variant, showShadow, loading, resultCount, onLoadMore, hasMore, paginationInfo, onPreviousPage, onNextPage, hasPreviousPage, hasNextPage, showSelected, children, }: ModFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
110
|
+
displayName: string;
|
|
111
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type AvatarProps } from '@mui/material/Avatar';
|
|
2
|
+
import { type AvatarColorIndex } from '../utils/colorHelpers';
|
|
3
|
+
type AvatarSize = 'small' | 'medium';
|
|
4
|
+
export interface ModGeneralAvatarProps extends Omit<AvatarProps, 'variant'> {
|
|
5
|
+
/**
|
|
6
|
+
* The size of the avatar
|
|
7
|
+
* @default "medium"
|
|
8
|
+
*/
|
|
9
|
+
size?: AvatarSize;
|
|
10
|
+
/**
|
|
11
|
+
* Explicit initials color index. When omitted, derived deterministically
|
|
12
|
+
* from `alt`. Image avatars ignore it and use the default styling.
|
|
13
|
+
*/
|
|
14
|
+
colorIndex?: AvatarColorIndex;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* ModGeneralAvatar - Avatar with image or colored initials display
|
|
18
|
+
*/
|
|
19
|
+
export declare const ModGeneralAvatar: {
|
|
20
|
+
({ size, colorIndex, alt, src, children, ...props }: ModGeneralAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ButtonBaseProps } from '@mui/material/ButtonBase';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
type IconButtonSize = 'small' | 'medium';
|
|
4
|
+
type IconButtonVariant = 'primary' | 'secondary' | 'destructive' | 'tertiary' | 'nav';
|
|
5
|
+
export interface ModIconButtonProps extends Omit<ButtonBaseProps, 'children' | 'size'> {
|
|
6
|
+
/**
|
|
7
|
+
* The size of the icon button
|
|
8
|
+
* @default "medium"
|
|
9
|
+
*/
|
|
10
|
+
size?: IconButtonSize;
|
|
11
|
+
/**
|
|
12
|
+
* The visual variant of the icon button.
|
|
13
|
+
* - `primary`, `secondary`, `destructive`, `tertiary`: Uses ModButton's hierarchy styling
|
|
14
|
+
* - `nav`: White background with border, used in global navigation
|
|
15
|
+
* @default "tertiary"
|
|
16
|
+
*/
|
|
17
|
+
variant?: IconButtonVariant;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the button is in an active/selected state (e.g., popover is open).
|
|
20
|
+
* Only applies to the `nav` variant.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
active?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Show loading spinner instead of icon.
|
|
26
|
+
* Only applies to hierarchy variants (not `nav`).
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* ModIconButton - Icon-only button component
|
|
34
|
+
*
|
|
35
|
+
* For hierarchy variants (primary/secondary/destructive/tertiary), wraps ModButton with
|
|
36
|
+
* icon-only sizing. For the `nav` variant, uses a standalone MUI IconButton with custom styling.
|
|
37
|
+
*/
|
|
38
|
+
export declare const ModIconButton: {
|
|
39
|
+
({ size, variant, active, loading, children, ...props }: ModIconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
displayName: string;
|
|
41
|
+
};
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type IconWrapperSize = 8 | 12 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96 | 128 | 160 | 192;
|
|
3
|
+
export interface ModIconWrapperProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
4
|
+
/**
|
|
5
|
+
* The size of the icon wrapper in pixels
|
|
6
|
+
* @default 20
|
|
7
|
+
*/
|
|
8
|
+
size?: IconWrapperSize;
|
|
9
|
+
/**
|
|
10
|
+
* Icon element to render inside the wrapper
|
|
11
|
+
*/
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* ModIconWrapper - Flex-centered container that sizes icons
|
|
16
|
+
*/
|
|
17
|
+
export declare const ModIconWrapper: {
|
|
18
|
+
({ size, children, ...props }: ModIconWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { GridSlots } from '@mui/x-data-grid-pro';
|
|
2
|
+
import { type ModDataGridProps } from '../DataGrid/DataGrid';
|
|
3
|
+
export interface ModInfiniteScrollGridProps extends Omit<ModDataGridProps, 'slots'> {
|
|
4
|
+
/**
|
|
5
|
+
* Callback when load more is triggered - either by scrolling or clicking button
|
|
6
|
+
*/
|
|
7
|
+
onLoadMore: () => void;
|
|
8
|
+
/**
|
|
9
|
+
* Whether there are more rows to load
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
hasNextPage?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Scroll threshold (0-1) to trigger auto-load. 0.85 = 85% scrolled
|
|
15
|
+
* @default 0.85
|
|
16
|
+
*/
|
|
17
|
+
loadMoreAtScrollPercent?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Custom slots (merged with design system defaults)
|
|
20
|
+
*/
|
|
21
|
+
slots?: Partial<GridSlots>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* ModInfiniteScrollGrid - DataGrid with infinite scroll and load-more functionality
|
|
25
|
+
*
|
|
26
|
+
* Features:
|
|
27
|
+
* - Auto-loads more data when scrolled to 85% (configurable)
|
|
28
|
+
* - Manual "Load more" button in footer
|
|
29
|
+
* - Shows row count and loading state
|
|
30
|
+
* - Inherits all responsive features from ModDataGrid
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* <ModInfiniteScrollGrid
|
|
34
|
+
* rows={rows}
|
|
35
|
+
* columns={columns}
|
|
36
|
+
* onLoadMore={loadMoreData}
|
|
37
|
+
* hasNextPage={hasMore}
|
|
38
|
+
* loading={isLoading}
|
|
39
|
+
* />
|
|
40
|
+
*/
|
|
41
|
+
export declare function ModInfiniteScrollGrid({ onLoadMore, hasNextPage, loadMoreAtScrollPercent, slots, slotProps: userSlotProps, sx: userSx, ...props }: ModInfiniteScrollGridProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare namespace ModInfiniteScrollGrid {
|
|
43
|
+
var displayName: string;
|
|
44
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type InputBaseProps } from '@mui/material/InputBase';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
type InputFieldSize = 'small' | 'medium';
|
|
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> & {
|
|
6
|
+
size?: InputFieldSize;
|
|
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> & {
|
|
9
|
+
size?: InputFieldSize;
|
|
10
|
+
infoIcon?: boolean;
|
|
11
|
+
}, {}, {}>;
|
|
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> & {
|
|
14
|
+
size?: InputFieldSize;
|
|
15
|
+
}, {}, {}>;
|
|
16
|
+
export interface ModInputFieldProps extends Omit<InputBaseProps, 'size'> {
|
|
17
|
+
/**
|
|
18
|
+
* The size of the input field
|
|
19
|
+
* @default "medium"
|
|
20
|
+
*/
|
|
21
|
+
size?: InputFieldSize;
|
|
22
|
+
/**
|
|
23
|
+
* Show error/destructive state with red styling
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
destructive?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Label text for the input
|
|
29
|
+
*/
|
|
30
|
+
label?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Show required indicator (asterisk)
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
required?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Info icon to display next to the label
|
|
38
|
+
*/
|
|
39
|
+
infoIcon?: ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Helper text displayed below the input (normal state)
|
|
42
|
+
*/
|
|
43
|
+
helperText?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Error message displayed below the input (destructive state)
|
|
46
|
+
* Takes precedence over helperText when destructive is true
|
|
47
|
+
*/
|
|
48
|
+
errorMessage?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Icon to display at the start of the input
|
|
51
|
+
*/
|
|
52
|
+
startIcon?: ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* Icon to display at the end of the input
|
|
55
|
+
* In destructive state, an error icon is automatically shown
|
|
56
|
+
*/
|
|
57
|
+
endIcon?: ReactNode;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* ModInputField - Form input field component using MUI FormControl composition
|
|
61
|
+
*/
|
|
62
|
+
export declare const ModInputField: {
|
|
63
|
+
({ size, destructive, label, required, infoIcon, helperText, errorMessage, startIcon, endIcon, disabled, id, ...props }: ModInputFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
displayName: string;
|
|
65
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the ModLinkCell component
|
|
4
|
+
*/
|
|
5
|
+
export interface ModLinkCellProps {
|
|
6
|
+
/**
|
|
7
|
+
* The content to display inside the component
|
|
8
|
+
*/
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* ModLinkCell — scaffold placeholder, not yet implemented.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ModLinkCell: {
|
|
15
|
+
({ children, ...props }: ModLinkCellProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type ListItemButtonProps } from '@mui/material/ListItemButton';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
declare module '@mui/material/ListItemButton' {
|
|
4
|
+
interface ListItemButtonPropsVariantOverrides {
|
|
5
|
+
size?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge';
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Props for the ModListItem component
|
|
10
|
+
*/
|
|
11
|
+
export interface ModListItemProps extends Omit<ListItemButtonProps, 'children' | 'size' | 'color'> {
|
|
12
|
+
/**
|
|
13
|
+
* The size variant of the list item
|
|
14
|
+
* @default "medium"
|
|
15
|
+
*/
|
|
16
|
+
size?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge';
|
|
17
|
+
/**
|
|
18
|
+
* Primary text content (required)
|
|
19
|
+
*/
|
|
20
|
+
primaryText: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Secondary/supporting text content (optional, shown in large/xlarge/xxlarge/xxxlarge)
|
|
23
|
+
*/
|
|
24
|
+
secondaryText?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Badge content for count display (optional, for xxlarge/xxxlarge link variant)
|
|
27
|
+
*/
|
|
28
|
+
badge?: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Icon or logo element (optional, scales based on size)
|
|
31
|
+
*/
|
|
32
|
+
icon?: ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* The component used for the root node (for polymorphic behavior)
|
|
35
|
+
* @default 'button'
|
|
36
|
+
*/
|
|
37
|
+
component?: React.ElementType;
|
|
38
|
+
/**
|
|
39
|
+
* Whether this is a link variant (applies link styling)
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
isLink?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Trailing element (optional, e.g., chevron icon for navigation)
|
|
45
|
+
* Renders at the end of the list item, typically used for navigation indicators.
|
|
46
|
+
*/
|
|
47
|
+
trailingElement?: ReactNode;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* ModListItem - Flexible list item component with multiple size variants and states
|
|
51
|
+
*
|
|
52
|
+
* A versatile list item component built on MUI's ListItemButton that supports six size variants
|
|
53
|
+
* (small to xxxlarge), interactive states (default, selected, disabled, link), and optional
|
|
54
|
+
* icons/logos, secondary text, and badges.
|
|
55
|
+
*
|
|
56
|
+
* Design Tokens Used:
|
|
57
|
+
* - semanticColors.typography.body (default text)
|
|
58
|
+
* - semanticColors.typography.body-secondary (secondary text)
|
|
59
|
+
* - semanticColors.typography.link.primary (link text)
|
|
60
|
+
* - semanticColors.icon.placeholder (default icon color)
|
|
61
|
+
* - semanticColors.icon.pressed (active icon color)
|
|
62
|
+
* - semanticColors.icon.disabled (disabled icon color)
|
|
63
|
+
* - semanticColors.buttons.secondary.hover-background (active background)
|
|
64
|
+
* - semanticColors.surface.input.background (default background)
|
|
65
|
+
* - semanticColors.surface.input.disabled-background (disabled background)
|
|
66
|
+
* - semanticColors.buttons.tertiary.disabled (disabled text color)
|
|
67
|
+
*/
|
|
68
|
+
export declare const ModListItem: {
|
|
69
|
+
({ size, primaryText, secondaryText, badge, icon, isLink, trailingElement, component, ...props }: ModListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
displayName: string;
|
|
71
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ListItemButtonProps } from '@mui/material/ListItemButton';
|
|
2
|
+
type ListItemButtonVariant = 'card' | 'nav';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the ModListItemButton component
|
|
5
|
+
*/
|
|
6
|
+
export interface ModListItemButtonProps extends ListItemButtonProps {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the list item is selected
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the list item is disabled
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Visual treatment.
|
|
19
|
+
* - `card` (default): bordered card-style for settings/radio-list patterns.
|
|
20
|
+
* Expects ListItemIcon + ListItemText children for full styling support.
|
|
21
|
+
* - `nav`: borderless sidebar nav style with subtle hover/selected
|
|
22
|
+
* highlights. Renders children inline; works with plain text.
|
|
23
|
+
* @default 'card'
|
|
24
|
+
*/
|
|
25
|
+
variant?: ListItemButtonVariant;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* ModListItemButton - Selectable list item with icon and text
|
|
29
|
+
*
|
|
30
|
+
* A selectable list item component that displays an optional icon with primary
|
|
31
|
+
* and secondary text. Supports active (selected), deselected, focus, and disabled states.
|
|
32
|
+
*
|
|
33
|
+
* Uses MUI's ListItemButton as base for proper accessibility and interaction.
|
|
34
|
+
* Compose with ListItemIcon and ListItemText for proper structure.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <ModListItemButton selected>
|
|
39
|
+
* <ListItemIcon>
|
|
40
|
+
* <PanelLeft size={36} />
|
|
41
|
+
* </ListItemIcon>
|
|
42
|
+
* <ListItemText
|
|
43
|
+
* primary="Always pin recipe list to the LEFT"
|
|
44
|
+
* secondary="This will display the recipe topology in a small box to the left of the recipe list"
|
|
45
|
+
* />
|
|
46
|
+
* </ModListItemButton>
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* Design Tokens Used (hex values omitted — they are generated from Figma and drift):
|
|
50
|
+
* - semanticColors.buttons.primary.default - Active border
|
|
51
|
+
* - semanticColors.border.primary - Default/disabled border
|
|
52
|
+
* - semanticColors.icons.default - Active icon color
|
|
53
|
+
* - semanticColors.icons.disabled - Deselected/disabled icon fill (not a text color)
|
|
54
|
+
* - semanticColors.buttons.tertiary.disabled - Deselected text color
|
|
55
|
+
* - semanticColors.typography.bodySecondary - Active secondary text
|
|
56
|
+
* - semanticColors.typography.button.disabled - Disabled text (button-scoped)
|
|
57
|
+
* - typography.body - Active primary text
|
|
58
|
+
* - semanticColors.surface.sunken - Disabled background
|
|
59
|
+
*/
|
|
60
|
+
export declare const ModListItemButton: {
|
|
61
|
+
({ children, selected, disabled, variant, ...props }: ModListItemButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
displayName: string;
|
|
63
|
+
};
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface ModLoadingSpinnerProps {
|
|
2
|
+
/**
|
|
3
|
+
* Size of the spinner in pixels
|
|
4
|
+
* @default 24
|
|
5
|
+
*/
|
|
6
|
+
size?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Color of the spinner
|
|
9
|
+
* @default semanticColors.buttons.primary.default
|
|
10
|
+
*/
|
|
11
|
+
color?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* ModLoadingSpinner - Animated loading spinner component
|
|
15
|
+
*
|
|
16
|
+
* A circular loading spinner with a partial arc that rotates continuously.
|
|
17
|
+
* Based on the Figma design system button loading icon.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <ModLoadingSpinner />
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <ModLoadingSpinner size={32} color="#ff0000" />
|
|
24
|
+
*/
|
|
25
|
+
export declare const ModLoadingSpinner: {
|
|
26
|
+
({ size, color, }: ModLoadingSpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type MenuProps } from '@mui/material/Menu';
|
|
2
|
+
export interface ModMenuProps extends MenuProps {
|
|
3
|
+
/**
|
|
4
|
+
* Menu content (typically ModMenuItem components)
|
|
5
|
+
*/
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* ModMenu - Menu component based on MUI Menu
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
|
14
|
+
* const open = Boolean(anchorEl);
|
|
15
|
+
*
|
|
16
|
+
* <Button onClick={(e) => setAnchorEl(e.currentTarget)}>Open Menu</Button>
|
|
17
|
+
* <ModMenu
|
|
18
|
+
* open={open}
|
|
19
|
+
* anchorEl={anchorEl}
|
|
20
|
+
* onClose={() => setAnchorEl(null)}
|
|
21
|
+
* >
|
|
22
|
+
* <ModMenuItem icon={<Icon />} shortcut="⌘+P">View profile</ModMenuItem>
|
|
23
|
+
* <ModMenuItem>Settings</ModMenuItem>
|
|
24
|
+
* </ModMenu>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const ModMenu: {
|
|
28
|
+
({ children, ...props }: ModMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
2
|
+
import type { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
|
|
3
|
+
type ModMenuItemOwnProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Optional icon to display on the left side
|
|
6
|
+
* Note: Cannot be directly mapped from Figma (ReactNode)
|
|
7
|
+
*/
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Optional keyboard shortcut to display on the right side
|
|
11
|
+
* @example "⌘+P" or "Ctrl+K"
|
|
12
|
+
* Note: Cannot be directly mapped from Figma (ReactNode/string)
|
|
13
|
+
*/
|
|
14
|
+
shortcut?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Optional secondary text to display next to the primary label
|
|
17
|
+
* @example "@username" or supporting text
|
|
18
|
+
* Note: Cannot be directly mapped from Figma (ReactNode/string)
|
|
19
|
+
*/
|
|
20
|
+
secondaryText?: string;
|
|
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).
|
|
26
|
+
*/
|
|
27
|
+
href?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Menu item content (text label)
|
|
30
|
+
*/
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
};
|
|
33
|
+
export type ModMenuItemProps<C extends ElementType = typeof MenuItem> = ModMenuItemOwnProps & Omit<ComponentPropsWithoutRef<C>, keyof ModMenuItemOwnProps> & {
|
|
34
|
+
component?: C;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* ModMenuItem - Menu item component based on MUI MenuItem
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* // With icon and shortcut
|
|
42
|
+
* <ModMenuItem icon={<UserIcon />} shortcut="⌘+P">
|
|
43
|
+
* View profile
|
|
44
|
+
* </ModMenuItem>
|
|
45
|
+
*
|
|
46
|
+
* // With secondary text (user list pattern from Figma node 4305:41844)
|
|
47
|
+
* <ModMenuItem secondaryText="@phoenix">Phoenix Baker</ModMenuItem>
|
|
48
|
+
* <ModMenuItem secondaryText="@olivia">Olivia Rhye</ModMenuItem>
|
|
49
|
+
*
|
|
50
|
+
* // Disabled state
|
|
51
|
+
* <ModMenuItem disabled>Disabled item</ModMenuItem>
|
|
52
|
+
*
|
|
53
|
+
* // As an anchor — middle-click/right-click open in a new tab
|
|
54
|
+
* <ModMenuItem href="/api-explorer">API explorer</ModMenuItem>
|
|
55
|
+
*
|
|
56
|
+
* // External link
|
|
57
|
+
* <ModMenuItem href="https://docs.example.com" target="_blank" rel="noopener noreferrer">
|
|
58
|
+
* Documentation
|
|
59
|
+
* </ModMenuItem>
|
|
60
|
+
*
|
|
61
|
+
* // Client-side routing (Next.js)
|
|
62
|
+
* <ModMenuItem component={NextLink} href="/api-explorer">API explorer</ModMenuItem>
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export declare function ModMenuItem<C extends ElementType = typeof MenuItem>({ icon, shortcut, secondaryText, children, ...rest }: ModMenuItemProps<C>): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export declare namespace ModMenuItem {
|
|
67
|
+
var displayName: string;
|
|
68
|
+
}
|
|
69
|
+
export {};
|