@moderneinc/design-system-components 7.6.0 → 7.6.1-next.51e1c2

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 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 { BadgeInfo, 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';
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(BadgeInfo, { size: 24 }),
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));
@@ -3091,11 +3094,13 @@ const ActionButton = styled(IconButton)({
3091
3094
  */
3092
3095
  const ModDownloadToast = ({ title, fileName, progress, showClose = true, showPause = true, onClose, onPause, actions, ...props }) => {
3093
3096
  const renderActions = () => {
3094
- if (actions)
3097
+ if (actions) {
3095
3098
  return actions;
3099
+ }
3096
3100
  const hasActions = showPause || showClose;
3097
- if (!hasActions)
3101
+ if (!hasActions) {
3098
3102
  return null;
3103
+ }
3099
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 }) }))] }));
3100
3105
  };
3101
3106
  return (jsxs(StyledRoot$1, { elevation: 0, role: "status", ...props, children: [jsxs(Stack, { direction: "row", sx: {
@@ -4449,8 +4454,9 @@ const CellRoot = styled('div', {
4449
4454
  * ModIconCell — Icon cell for DataGrid. Renders an icon centered in the cell.
4450
4455
  */
4451
4456
  const ModIconCell = ({ icon, ariaLabel, disabled = false }) => {
4452
- if (!icon)
4457
+ if (!icon) {
4453
4458
  return null;
4459
+ }
4454
4460
  return (jsx(CellRoot, { disabled: disabled, "aria-label": ariaLabel, children: jsx(ModIconWrapper, { size: 16, children: icon }) }));
4455
4461
  };
4456
4462
  ModIconCell.displayName = 'ModIconCell';
@@ -4940,8 +4946,9 @@ function ModPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky = fal
4940
4946
  const containerRef = useRef(null);
4941
4947
  // Intersection observer for back to top button
4942
4948
  useEffect(() => {
4943
- if (!showBackToTop || !headerRef.current)
4949
+ if (!showBackToTop || !headerRef.current) {
4944
4950
  return;
4951
+ }
4945
4952
  const observer = new IntersectionObserver(([entry]) => {
4946
4953
  setShowBackToTopButton(!entry.isIntersecting);
4947
4954
  }, {