@moderneinc/design-system-components 7.6.0-next.f37256 → 7.6.1-next.3dd0ae
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/index.esm.js +20 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +19 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -7,7 +7,7 @@ import MuiAvatar from '@mui/material/Avatar';
|
|
|
7
7
|
import SvgIcon from '@mui/material/SvgIcon';
|
|
8
8
|
import Alert, { alertClasses } from '@mui/material/Alert';
|
|
9
9
|
import ButtonBase, { buttonBaseClasses } from '@mui/material/ButtonBase';
|
|
10
|
-
import {
|
|
10
|
+
import { Info, WifiOff, TriangleAlert, CircleAlert, CircleCheckBig, X, ChevronRight, Square, SquareCheck, SquareMinus, Search, ChevronDown, Plus, Trash2, ArrowUp, ArrowDown, ChevronsUpDown, Columns3, ListFilter, HelpCircle, CalendarDays, Minus, ChevronLeft, AlertCircle, ChevronUp } from 'lucide-react';
|
|
11
11
|
import IconButton, { iconButtonClasses } from '@mui/material/IconButton';
|
|
12
12
|
import React, { useState, useRef, useCallback, useMemo, forwardRef, useEffect, createContext, useContext, useLayoutEffect, Children, isValidElement, cloneElement } from 'react';
|
|
13
13
|
import Breadcrumbs, { breadcrumbsClasses } from '@mui/material/Breadcrumbs';
|
|
@@ -557,7 +557,7 @@ const iconMap = {
|
|
|
557
557
|
error: jsx(CircleAlert, { size: 24 }),
|
|
558
558
|
warning: jsx(TriangleAlert, { size: 24 }),
|
|
559
559
|
offline: jsx(WifiOff, { size: 24 }),
|
|
560
|
-
info: jsx(
|
|
560
|
+
info: jsx(Info, { size: 24 }),
|
|
561
561
|
};
|
|
562
562
|
/**
|
|
563
563
|
* ModAlert - Alert component for displaying contextual status messages
|
|
@@ -943,8 +943,9 @@ function useTabAriaSync() {
|
|
|
943
943
|
observerRef.current.disconnect();
|
|
944
944
|
observerRef.current = null;
|
|
945
945
|
}
|
|
946
|
-
if (!node)
|
|
946
|
+
if (!node) {
|
|
947
947
|
return;
|
|
948
|
+
}
|
|
948
949
|
const sync = () => {
|
|
949
950
|
node.setAttribute('role', 'tab');
|
|
950
951
|
node.setAttribute('aria-selected', String(node.classList.contains('Mui-selected')));
|
|
@@ -1764,8 +1765,9 @@ sx: _sx, theme: _theme, ...props }) => {
|
|
|
1764
1765
|
const [searchText, setSearchText] = useState('');
|
|
1765
1766
|
// Filter columns based on search
|
|
1766
1767
|
const filteredColumns = useMemo(() => {
|
|
1767
|
-
if (!searchText)
|
|
1768
|
+
if (!searchText) {
|
|
1768
1769
|
return columns;
|
|
1770
|
+
}
|
|
1769
1771
|
const search = searchText.toLowerCase();
|
|
1770
1772
|
return columns.filter(col => {
|
|
1771
1773
|
const headerName = col.headerName || col.field;
|
|
@@ -1798,8 +1800,9 @@ sx: _sx, theme: _theme, ...props }) => {
|
|
|
1798
1800
|
disableUnderline: true,
|
|
1799
1801
|
},
|
|
1800
1802
|
} })), filteredColumns.map(column => {
|
|
1801
|
-
if (column.hideable === false)
|
|
1803
|
+
if (column.hideable === false) {
|
|
1802
1804
|
return null;
|
|
1805
|
+
}
|
|
1803
1806
|
const isVisible = columnVisibilityModel[column.field] !== false;
|
|
1804
1807
|
const headerName = column.headerName || column.field;
|
|
1805
1808
|
return (jsx(ColumnItemContainer, { onClick: () => handleColumnToggle(column.field), children: jsxs(MenuItemContent$1, { children: [jsx(ModCheckbox, { checked: isVisible, size: "small", disableRipple: true }), jsx(MenuItemLabel, { children: headerName })] }) }, column.field));
|
|
@@ -1853,6 +1856,10 @@ const IconWrapper$1 = styled('span')(({ theme }) => ({
|
|
|
1853
1856
|
flexShrink: 0,
|
|
1854
1857
|
fontSize: theme.typography.pxToRem(iconSize.lg),
|
|
1855
1858
|
color: semanticColors.color.icon.default,
|
|
1859
|
+
'& > svg': {
|
|
1860
|
+
width: iconSize.lg,
|
|
1861
|
+
height: iconSize.lg,
|
|
1862
|
+
},
|
|
1856
1863
|
}));
|
|
1857
1864
|
const LabelContainer$3 = styled('div')({
|
|
1858
1865
|
flex: 1,
|
|
@@ -3087,11 +3094,13 @@ const ActionButton = styled(IconButton)({
|
|
|
3087
3094
|
*/
|
|
3088
3095
|
const ModDownloadToast = ({ title, fileName, progress, showClose = true, showPause = true, onClose, onPause, actions, ...props }) => {
|
|
3089
3096
|
const renderActions = () => {
|
|
3090
|
-
if (actions)
|
|
3097
|
+
if (actions) {
|
|
3091
3098
|
return actions;
|
|
3099
|
+
}
|
|
3092
3100
|
const hasActions = showPause || showClose;
|
|
3093
|
-
if (!hasActions)
|
|
3101
|
+
if (!hasActions) {
|
|
3094
3102
|
return null;
|
|
3103
|
+
}
|
|
3095
3104
|
return (jsxs(Stack, { direction: "row", sx: { alignItems: 'center', gap: `${spacing.spacing_2}px` }, children: [showPause && (jsx(ActionButton, { size: "small", onClick: onPause, "aria-label": "Pause download", children: jsx(Minus, { size: spacing.spacing_2 }) })), showClose && (jsx(ActionButton, { size: "small", onClick: onClose, "aria-label": "Close", children: jsx(X, { size: spacing.spacing_2 }) }))] }));
|
|
3096
3105
|
};
|
|
3097
3106
|
return (jsxs(StyledRoot$1, { elevation: 0, role: "status", ...props, children: [jsxs(Stack, { direction: "row", sx: {
|
|
@@ -4445,8 +4454,9 @@ const CellRoot = styled('div', {
|
|
|
4445
4454
|
* ModIconCell — Icon cell for DataGrid. Renders an icon centered in the cell.
|
|
4446
4455
|
*/
|
|
4447
4456
|
const ModIconCell = ({ icon, ariaLabel, disabled = false }) => {
|
|
4448
|
-
if (!icon)
|
|
4457
|
+
if (!icon) {
|
|
4449
4458
|
return null;
|
|
4459
|
+
}
|
|
4450
4460
|
return (jsx(CellRoot, { disabled: disabled, "aria-label": ariaLabel, children: jsx(ModIconWrapper, { size: 16, children: icon }) }));
|
|
4451
4461
|
};
|
|
4452
4462
|
ModIconCell.displayName = 'ModIconCell';
|
|
@@ -4936,8 +4946,9 @@ function ModPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky = fal
|
|
|
4936
4946
|
const containerRef = useRef(null);
|
|
4937
4947
|
// Intersection observer for back to top button
|
|
4938
4948
|
useEffect(() => {
|
|
4939
|
-
if (!showBackToTop || !headerRef.current)
|
|
4949
|
+
if (!showBackToTop || !headerRef.current) {
|
|
4940
4950
|
return;
|
|
4951
|
+
}
|
|
4941
4952
|
const observer = new IntersectionObserver(([entry]) => {
|
|
4942
4953
|
setShowBackToTopButton(!entry.isIntersecting);
|
|
4943
4954
|
}, {
|