@carto/meridian-ds 2.9.2 → 2.9.3-alpha-lists.5

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{Alert-C4W0H_uN.cjs → Alert-0VBqBP4P.cjs} +1 -1
  3. package/dist/{Alert-BZPM5zpX.js → Alert-BEzNSCqV.js} +1 -1
  4. package/dist/{MenuItem-DoBJsRR_.cjs → MenuItem-0c7Cz5g_.cjs} +1 -1
  5. package/dist/{MenuItem-Cx5lTXXm.js → MenuItem-D4v_HV1x.js} +1 -1
  6. package/dist/components/index.cjs +255 -7
  7. package/dist/components/index.js +259 -11
  8. package/dist/{css-utils-CH7es90t.cjs → css-utils-B3V0Xzli.cjs} +8 -0
  9. package/dist/{css-utils-CjUBRJVK.js → css-utils-D9LibDjo.js} +12 -4
  10. package/dist/custom-icons/index.cjs +7 -24
  11. package/dist/custom-icons/index.js +7 -24
  12. package/dist/theme/index.cjs +342 -51
  13. package/dist/theme/index.js +344 -53
  14. package/dist/types/components/Avatar/Avatar.stories.d.ts.map +1 -1
  15. package/dist/types/components/List/List.d.ts +24 -0
  16. package/dist/types/components/List/List.d.ts.map +1 -0
  17. package/dist/types/components/List/List.stories.d.ts +452 -0
  18. package/dist/types/components/List/List.stories.d.ts.map +1 -0
  19. package/dist/types/components/List/List.test.d.ts +2 -0
  20. package/dist/types/components/List/List.test.d.ts.map +1 -0
  21. package/dist/types/components/List/ListItem/ListItem.d.ts +9 -0
  22. package/dist/types/components/List/ListItem/ListItem.d.ts.map +1 -0
  23. package/dist/types/components/List/ListItem/ListItem.stories.d.ts +346 -0
  24. package/dist/types/components/List/ListItem/ListItem.stories.d.ts.map +1 -0
  25. package/dist/types/components/List/ListItem/ListItem.test.d.ts +2 -0
  26. package/dist/types/components/List/ListItem/ListItem.test.d.ts.map +1 -0
  27. package/dist/types/components/List/ListItemButton/ListItemButton.d.ts +9 -0
  28. package/dist/types/components/List/ListItemButton/ListItemButton.d.ts.map +1 -0
  29. package/dist/types/components/List/ListItemButton/ListItemButton.test.d.ts +2 -0
  30. package/dist/types/components/List/ListItemButton/ListItemButton.test.d.ts.map +1 -0
  31. package/dist/types/components/List/ListItemRightContent/ListItemRightContent.d.ts +14 -0
  32. package/dist/types/components/List/ListItemRightContent/ListItemRightContent.d.ts.map +1 -0
  33. package/dist/types/components/List/ListItemRightContent/ListItemRightContent.test.d.ts +2 -0
  34. package/dist/types/components/List/ListItemRightContent/ListItemRightContent.test.d.ts.map +1 -0
  35. package/dist/types/components/List/ListSubheader/ListSubheader.d.ts +9 -0
  36. package/dist/types/components/List/ListSubheader/ListSubheader.d.ts.map +1 -0
  37. package/dist/types/components/List/ListSubheader/ListSubheader.test.d.ts +2 -0
  38. package/dist/types/components/List/ListSubheader/ListSubheader.test.d.ts.map +1 -0
  39. package/dist/types/components/List/index.d.ts +12 -0
  40. package/dist/types/components/List/index.d.ts.map +1 -0
  41. package/dist/types/components/List/types.d.ts +3 -0
  42. package/dist/types/components/List/types.d.ts.map +1 -0
  43. package/dist/types/components/Menu/Menu/Menu.stories.d.ts.map +1 -1
  44. package/dist/types/components/index.d.ts +2 -0
  45. package/dist/types/components/index.d.ts.map +1 -1
  46. package/dist/types/custom-icons/SwitchAccessShortcut.d.ts.map +1 -1
  47. package/dist/types/theme/components/data-display.d.ts.map +1 -1
  48. package/dist/types/theme/components/navigation.d.ts.map +1 -1
  49. package/dist/types/theme/types.d.ts +151 -0
  50. package/dist/types/theme/types.d.ts.map +1 -1
  51. package/dist/types/utils/theme-constants.d.ts +4 -0
  52. package/dist/types/utils/theme-constants.d.ts.map +1 -1
  53. package/dist/widgets/index.cjs +2 -2
  54. package/dist/widgets/index.js +2 -2
  55. package/package.json +1 -1
  56. package/dist/types/theme/components/stories/List.stories.d.ts +0 -62
  57. package/dist/types/theme/components/stories/List.stories.d.ts.map +0 -1
@@ -782,6 +782,10 @@ const MENU_LIST_MAX_SIZE = 312;
782
782
  const MENU_ITEM_SIZE_DENSE = 24;
783
783
  const MENU_ITEM_SIZE_DEFAULT = 32;
784
784
  const MENU_ITEM_SIZE_EXTENDED = 48;
785
+ const LIST_ITEM_SIZE_DENSE = 52;
786
+ const LIST_ITEM_SIZE_DEFAULT = 68;
787
+ const LIST_MAX_SIZE = 312;
788
+ const LIST_OVERSCAN_ITEMS_COUNT = 5;
785
789
  const FontWeight = {
786
790
  regular: 400,
787
791
  medium: 500,
@@ -5759,6 +5763,10 @@ exports.ICON_SIZE_LARGE = ICON_SIZE_LARGE;
5759
5763
  exports.ICON_SIZE_MEDIUM = ICON_SIZE_MEDIUM;
5760
5764
  exports.ICON_SIZE_SMALL = ICON_SIZE_SMALL;
5761
5765
  exports.IconButton = IconButton;
5766
+ exports.LIST_ITEM_SIZE_DEFAULT = LIST_ITEM_SIZE_DEFAULT;
5767
+ exports.LIST_ITEM_SIZE_DENSE = LIST_ITEM_SIZE_DENSE;
5768
+ exports.LIST_MAX_SIZE = LIST_MAX_SIZE;
5769
+ exports.LIST_OVERSCAN_ITEMS_COUNT = LIST_OVERSCAN_ITEMS_COUNT;
5762
5770
  exports.MENU_ITEM_SIZE_DEFAULT = MENU_ITEM_SIZE_DEFAULT;
5763
5771
  exports.MENU_ITEM_SIZE_DENSE = MENU_ITEM_SIZE_DENSE;
5764
5772
  exports.MENU_ITEM_SIZE_EXTENDED = MENU_ITEM_SIZE_EXTENDED;
@@ -781,6 +781,10 @@ const MENU_LIST_MAX_SIZE = 312;
781
781
  const MENU_ITEM_SIZE_DENSE = 24;
782
782
  const MENU_ITEM_SIZE_DEFAULT = 32;
783
783
  const MENU_ITEM_SIZE_EXTENDED = 48;
784
+ const LIST_ITEM_SIZE_DENSE = 52;
785
+ const LIST_ITEM_SIZE_DEFAULT = 68;
786
+ const LIST_MAX_SIZE = 312;
787
+ const LIST_OVERSCAN_ITEMS_COUNT = 5;
784
788
  const FontWeight = {
785
789
  regular: 400,
786
790
  medium: 500,
@@ -5756,6 +5760,7 @@ export {
5756
5760
  APPBAR_SIZE as A,
5757
5761
  BREAKPOINTS as B,
5758
5762
  ICON_SIZE_LARGE as I,
5763
+ LIST_ITEM_SIZE_DENSE as L,
5759
5764
  MENU_ITEM_SIZE_DEFAULT as M,
5760
5765
  NOTIFICATION_DURATION_IN_MS as N,
5761
5766
  SPACING as S,
@@ -5767,9 +5772,12 @@ export {
5767
5772
  ellipsisStyles as e,
5768
5773
  MENU_ITEM_SIZE_DENSE as f,
5769
5774
  getSpacing as g,
5770
- MENU_ITEM_SIZE_EXTENDED as h,
5771
- IconButton as i,
5772
- useImperativeIntl as j,
5773
- getDefaultExportFromCjs as k,
5775
+ LIST_ITEM_SIZE_DEFAULT as h,
5776
+ MENU_ITEM_SIZE_EXTENDED as i,
5777
+ LIST_MAX_SIZE as j,
5778
+ LIST_OVERSCAN_ITEMS_COUNT as k,
5779
+ IconButton as l,
5780
+ useImperativeIntl as m,
5781
+ getDefaultExportFromCjs as n,
5774
5782
  useTranslationWithFallback as u
5775
5783
  };
@@ -5548,30 +5548,13 @@ function SwatchCircleNone({ width, height, sx, ...props }, ref) {
5548
5548
  );
5549
5549
  }
5550
5550
  const SwatchCircleNone$1 = React.forwardRef(SwatchCircleNone);
5551
- const Icon$y = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: [
5552
- /* @__PURE__ */ jsxRuntime.jsx(
5553
- "mask",
5554
- {
5555
- id: "a",
5556
- width: 24,
5557
- height: 24,
5558
- x: 0,
5559
- y: 0,
5560
- maskUnits: "userSpaceOnUse",
5561
- style: {
5562
- maskType: "alpha"
5563
- },
5564
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "currentColor", d: "M0 0h24v24H0z" })
5565
- }
5566
- ),
5567
- /* @__PURE__ */ jsxRuntime.jsx("g", { mask: "url(#a)", children: /* @__PURE__ */ jsxRuntime.jsx(
5568
- "path",
5569
- {
5570
- fill: "currentColor",
5571
- d: "M15 22q-3.175-1.2-5.087-3.95Q8 15.3 8 11.9q0-2.275.9-4.312A10.95 10.95 0 0 1 11.45 4H8V2h7v7h-2V5.3a9 9 0 0 0-2.213 2.988A8.55 8.55 0 0 0 10 11.9q0 2.55 1.35 4.687A8.64 8.64 0 0 0 15 19.825z"
5572
- }
5573
- ) })
5574
- ] });
5551
+ const Icon$y = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
5552
+ "path",
5553
+ {
5554
+ fill: "currentColor",
5555
+ d: "M15 22q-3.175-1.2-5.087-3.95Q8 15.3 8 11.9q0-2.275.9-4.312A10.95 10.95 0 0 1 11.45 4H8V2h7v7h-2V5.3a9 9 0 0 0-2.213 2.988A8.55 8.55 0 0 0 10 11.9q0 2.55 1.35 4.687A8.64 8.64 0 0 0 15 19.825z"
5556
+ }
5557
+ ) });
5575
5558
  const BaseSvgIcon$y = material.createSvgIcon(Icon$y(), "SwitchAccessShortcut");
5576
5559
  function SwitchAccessShortcut({ width, height, sx, ...props }, ref) {
5577
5560
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -5546,30 +5546,13 @@ function SwatchCircleNone({ width, height, sx, ...props }, ref) {
5546
5546
  );
5547
5547
  }
5548
5548
  const SwatchCircleNone$1 = forwardRef(SwatchCircleNone);
5549
- const Icon$y = () => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: [
5550
- /* @__PURE__ */ jsx(
5551
- "mask",
5552
- {
5553
- id: "a",
5554
- width: 24,
5555
- height: 24,
5556
- x: 0,
5557
- y: 0,
5558
- maskUnits: "userSpaceOnUse",
5559
- style: {
5560
- maskType: "alpha"
5561
- },
5562
- children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M0 0h24v24H0z" })
5563
- }
5564
- ),
5565
- /* @__PURE__ */ jsx("g", { mask: "url(#a)", children: /* @__PURE__ */ jsx(
5566
- "path",
5567
- {
5568
- fill: "currentColor",
5569
- d: "M15 22q-3.175-1.2-5.087-3.95Q8 15.3 8 11.9q0-2.275.9-4.312A10.95 10.95 0 0 1 11.45 4H8V2h7v7h-2V5.3a9 9 0 0 0-2.213 2.988A8.55 8.55 0 0 0 10 11.9q0 2.55 1.35 4.687A8.64 8.64 0 0 0 15 19.825z"
5570
- }
5571
- ) })
5572
- ] });
5549
+ const Icon$y = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx(
5550
+ "path",
5551
+ {
5552
+ fill: "currentColor",
5553
+ d: "M15 22q-3.175-1.2-5.087-3.95Q8 15.3 8 11.9q0-2.275.9-4.312A10.95 10.95 0 0 1 11.45 4H8V2h7v7h-2V5.3a9 9 0 0 0-2.213 2.988A8.55 8.55 0 0 0 10 11.9q0 2.55 1.35 4.687A8.64 8.64 0 0 0 15 19.825z"
5554
+ }
5555
+ ) });
5573
5556
  const BaseSvgIcon$y = createSvgIcon(Icon$y(), "SwitchAccessShortcut");
5574
5557
  function SwitchAccessShortcut({ width, height, sx, ...props }, ref) {
5575
5558
  return /* @__PURE__ */ jsx(
@@ -3,9 +3,9 @@ var _a, _b, _c, _d, _e, _f, _g, _h;
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const material = require("@mui/material");
5
5
  const paletteUtils = require("../palette-utils-B9ybmwiI.cjs");
6
- const MenuItem = require("../MenuItem-DoBJsRR_.cjs");
6
+ const MenuItem = require("../MenuItem-0c7Cz5g_.cjs");
7
7
  const jsxRuntime = require("react/jsx-runtime");
8
- const cssUtils = require("../css-utils-CH7es90t.cjs");
8
+ const cssUtils = require("../css-utils-B3V0Xzli.cjs");
9
9
  const iconsMaterial = require("@mui/icons-material");
10
10
  const ArrowDown = require("../ArrowDown-DJ0vhbsw.cjs");
11
11
  const xDatePickers = require("@mui/x-date-pickers");
@@ -655,8 +655,19 @@ const dataDisplayOverrides = {
655
655
  styleOverrides: {
656
656
  root: ({ theme: theme2, ownerState }) => ({
657
657
  overflow: "initial",
658
+ position: "relative",
658
659
  color: theme2.palette.secondary.contrastText,
659
660
  backgroundColor: theme2.palette.secondary.main,
661
+ // Overlay border on top of all content using ::after pseudo-element
662
+ "&::after": {
663
+ content: '""',
664
+ position: "absolute",
665
+ inset: 0,
666
+ boxShadow: `inset 0 0 0 1px ${theme2.palette.default.outlinedBorder}`,
667
+ pointerEvents: "none",
668
+ borderRadius: "inherit",
669
+ zIndex: 1
670
+ },
660
671
  // Default fallback image override
661
672
  // https://github.com/mui/material-ui/issues/33229
662
673
  "& .MuiAvatar-fallback": {
@@ -693,11 +704,25 @@ const dataDisplayOverrides = {
693
704
  },
694
705
  // Disabled styles
695
706
  ...ownerState.disabled && {
696
- opacity: 0.6
707
+ opacity: 1,
708
+ color: theme2.palette.text.disabled,
709
+ backgroundColor: theme2.palette.action.disabledBackground,
710
+ // Overlay border on top of all content using ::after pseudo-element
711
+ "&::after": {
712
+ content: '""',
713
+ position: "absolute",
714
+ inset: 0,
715
+ boxShadow: `inset 0 0 0 1px ${theme2.palette.divider}`,
716
+ pointerEvents: "none",
717
+ borderRadius: "inherit",
718
+ zIndex: 1
719
+ }
697
720
  }
698
721
  }),
699
- img: ({ theme: theme2 }) => ({
700
- boxShadow: `0 0 0 1px ${theme2.palette.default.outlinedBorder}`
722
+ img: ({ ownerState }) => ({
723
+ ...ownerState.disabled && {
724
+ opacity: 0.6
725
+ }
701
726
  }),
702
727
  circular: () => ({
703
728
  borderRadius: avatarCircularRadius,
@@ -2320,6 +2345,83 @@ const formsOverrides = {
2320
2345
  }
2321
2346
  }
2322
2347
  };
2348
+ const getBoxedVariantStyles = (theme2) => ({
2349
+ backgroundColor: theme2.palette.background.paper,
2350
+ boxShadow: `inset 0 0 0 1px ${theme2.palette.divider}`,
2351
+ borderRadius: theme2.spacing(1),
2352
+ "&.MuiListItemButton-root:hover": {
2353
+ backgroundColor: theme2.palette.background.paper,
2354
+ boxShadow: `inset 0 0 0 1px ${theme2.palette.text.hint}`
2355
+ }
2356
+ });
2357
+ const getListItemAdornmentStyles = (theme2) => ({
2358
+ display: "flex",
2359
+ alignItems: "center",
2360
+ justifyContent: "center",
2361
+ gap: theme2.spacing(1.5),
2362
+ minHeight: cssUtils.MENU_ITEM_SIZE_DEFAULT,
2363
+ minWidth: cssUtils.MENU_ITEM_SIZE_DEFAULT
2364
+ });
2365
+ const getListItemStyles = (ownerState, theme2) => ({
2366
+ gap: theme2.spacing(1.5),
2367
+ minHeight: cssUtils.MENU_ITEM_SIZE_DEFAULT,
2368
+ width: "100%",
2369
+ padding: theme2.spacing(1, ownerState.dense ? 1.5 : 2),
2370
+ // Checkbox and radio button styles
2371
+ "& .MuiCheckbox-root, & .MuiRadio-root": {
2372
+ ...getListItemAdornmentStyles(theme2),
2373
+ // Override the default icon size coming from MUI definition
2374
+ "& .MuiSvgIcon-fontSizeMedium": {
2375
+ fontSize: cssUtils.ICON_SIZE_LARGE,
2376
+ width: cssUtils.ICON_SIZE_LARGE,
2377
+ minWidth: cssUtils.ICON_SIZE_LARGE,
2378
+ height: cssUtils.ICON_SIZE_LARGE
2379
+ }
2380
+ },
2381
+ // fixedHeight true (or undefined, which defaults to true)
2382
+ // + dense true: 52px
2383
+ // + dense false: 68px
2384
+ // fixedHeight false: adapts to content
2385
+ // Use data attribute selector since fixedHeight is not passed to MUI component to avoid DOM warning
2386
+ height: ownerState.dense ? cssUtils.LIST_ITEM_SIZE_DENSE : cssUtils.LIST_ITEM_SIZE_DEFAULT,
2387
+ '&[data-fixed-height="false"], [data-fixed-height="false"] &': {
2388
+ height: "auto"
2389
+ },
2390
+ // Handle disablePadding and disableGutters via data attributes for ListItemButton
2391
+ // (since these props are not valid for ListItemButton and would leak to DOM)
2392
+ '&[data-disable-padding="true"]': {
2393
+ padding: "0 !important"
2394
+ },
2395
+ '&[data-disable-gutters="true"]': {
2396
+ paddingLeft: "0 !important",
2397
+ paddingRight: "0 !important"
2398
+ },
2399
+ // Boxed variant styles - applied via data-variant attribute (from ListItem or parent List)
2400
+ '&[data-variant="boxed"], [data-variant="boxed"] &': getBoxedVariantStyles(theme2),
2401
+ // Disable gutters styles
2402
+ ...ownerState.disableGutters && {
2403
+ paddingLeft: 0,
2404
+ paddingRight: 0
2405
+ },
2406
+ // Disable padding styles
2407
+ ...ownerState.disablePadding && {
2408
+ padding: 0
2409
+ },
2410
+ // Disabled styles
2411
+ ...ownerState.disabled && {
2412
+ opacity: "1 !important",
2413
+ color: theme2.palette.text.disabled,
2414
+ ".MuiTypography-root": {
2415
+ color: theme2.palette.text.disabled
2416
+ },
2417
+ svg: {
2418
+ color: theme2.palette.text.disabled,
2419
+ path: {
2420
+ fill: theme2.palette.text.disabled
2421
+ }
2422
+ }
2423
+ }
2424
+ });
2323
2425
  const navigationOverrides = {
2324
2426
  // Menu
2325
2427
  MuiMenu: {
@@ -2439,44 +2541,101 @@ const navigationOverrides = {
2439
2541
  },
2440
2542
  // List
2441
2543
  MuiList: {
2544
+ defaultProps: {
2545
+ variant: "standard",
2546
+ direction: "column"
2547
+ },
2442
2548
  styleOverrides: {
2443
- root: ({ theme: theme2 }) => ({
2444
- paddingTop: 0,
2445
- ".MuiPopover-root &, .MuiPopper-root &, .base-Popper-root &": {
2446
- minWidth: theme2.spacing(8),
2447
- // 64px, defined by design
2448
- maxHeight: cssUtils.MENU_LIST_MAX_SIZE,
2449
- // 312px, defined by design
2450
- overflowY: "auto",
2451
- "&:focus-visible": {
2452
- outline: "none !important",
2453
- boxShadow: "none !important"
2549
+ root: ({ theme: theme2, ownerState }) => ({
2550
+ display: "flex",
2551
+ flexDirection: ownerState.direction,
2552
+ gap: theme2.spacing(ownerState.spacing ?? 0),
2553
+ padding: 0,
2554
+ // When direction is column, apply styles for menu-like behavior
2555
+ ...ownerState.direction === "column" && {
2556
+ ".MuiPopover-root &, .MuiPopper-root &, .base-Popper-root &": {
2557
+ minWidth: theme2.spacing(8),
2558
+ // 64px, defined by design
2559
+ maxHeight: cssUtils.MENU_LIST_MAX_SIZE,
2560
+ // 312px, defined by design
2561
+ overflowY: "auto",
2562
+ "&:focus-visible": {
2563
+ outline: "none !important",
2564
+ boxShadow: "none !important"
2565
+ }
2566
+ },
2567
+ ".MuiDivider-root": {
2568
+ margin: theme2.spacing(1, 0)
2569
+ },
2570
+ ".MuiListSubheader-root": {
2571
+ // We need to offset the margin to avoid double spacing between subheaders and regular list items when using spacing prop.
2572
+ marginBottom: theme2.spacing(-(ownerState.spacing ?? 0))
2454
2573
  }
2455
2574
  },
2456
- ".MuiDivider-root": {
2457
- margin: theme2.spacing(1, 0)
2458
- },
2459
- // Indent sublevels, ugly but needed to avoid issues with hover
2460
- "& .MuiList-root": {
2461
- paddingTop: 0,
2462
- paddingBottom: 0,
2463
- "& .MuiListItem-root": {
2464
- paddingLeft: theme2.spacing(4)
2575
+ // Outlined variant: border on the list container and in the list items
2576
+ ...ownerState.variant === "outlined" && {
2577
+ "& > .MuiListItem-root, & > .MuiListItemButton-root": {
2578
+ border: `1px solid ${theme2.palette.divider}`,
2579
+ "& .MuiListItemButton-root": {
2580
+ border: "none"
2581
+ }
2582
+ },
2583
+ // First list item has rounded top corners
2584
+ "& > .MuiListItem-root:first-of-type, & > .MuiListItemButton-root:first-of-type": {
2585
+ borderRadius: theme2.spacing(1, 1, 0, 0)
2586
+ },
2587
+ // Last list item has rounded bottom corners
2588
+ "& > .MuiListItem-root:last-of-type, & > .MuiListItemButton-root:last-of-type": {
2589
+ borderRadius: theme2.spacing(0, 0, 1, 1)
2590
+ },
2591
+ "& > .MuiListItem-root + .MuiListItem-root, & > .MuiListItemButton-root + .MuiListItemButton-root": {
2592
+ borderTop: "none"
2465
2593
  },
2466
- "& .MuiList-root": {
2467
- "& .MuiListItem-root": {
2468
- paddingLeft: theme2.spacing(6)
2594
+ // When direction is column reverse, rounded corners should be on the top and bottom
2595
+ ...ownerState.direction === "column-reverse" && {
2596
+ // First list item has rounded bottom corners
2597
+ "& > .MuiListItem-root:first-of-type, & > .MuiListItemButton-root:first-of-type": {
2598
+ borderRadius: theme2.spacing(0, 0, 1, 1)
2469
2599
  },
2470
- "& .MuiList-root": {
2471
- "& .MuiListItem-root": {
2472
- paddingLeft: theme2.spacing(8)
2473
- },
2474
- "& .MuiList-root": {
2475
- "& .MuiListItem-root": {
2476
- paddingLeft: theme2.spacing(10)
2477
- }
2478
- }
2600
+ // Last list item has rounded top corners
2601
+ "& > .MuiListItem-root:last-of-type, & > .MuiListItemButton-root:last-of-type": {
2602
+ borderRadius: theme2.spacing(1, 1, 0, 0)
2603
+ },
2604
+ "& > .MuiListItem-root + .MuiListItem-root, & > .MuiListItemButton-root + .MuiListItemButton-root": {
2605
+ borderBottom: "none"
2479
2606
  }
2607
+ },
2608
+ // When direction is row, rounded corners should be on the left and right
2609
+ ...ownerState.direction === "row" && {
2610
+ // First list item has rounded left corners
2611
+ "& > .MuiListItem-root:first-of-type, & > .MuiListItemButton-root:first-of-type": {
2612
+ borderRadius: theme2.spacing(1, 0, 0, 1)
2613
+ },
2614
+ // Last list item has rounded right corners
2615
+ "& > .MuiListItem-root:last-of-type, & > .MuiListItemButton-root:last-of-type": {
2616
+ borderRadius: theme2.spacing(0, 1, 1, 0)
2617
+ },
2618
+ "& > .MuiListItem-root + .MuiListItem-root, & > .MuiListItemButton-root + .MuiListItemButton-root": {
2619
+ borderLeft: "none"
2620
+ }
2621
+ },
2622
+ // When direction is row-reverse, rounded corners should be on the right and left
2623
+ ...ownerState.direction === "row-reverse" && {
2624
+ // First list item has rounded right corners
2625
+ "& > .MuiListItem-root:first-of-type, & > .MuiListItemButton-root:first-of-type": {
2626
+ borderRadius: theme2.spacing(0, 1, 1, 0)
2627
+ },
2628
+ // Last list item has rounded left corners
2629
+ "& > .MuiListItem-root:last-of-type, & > .MuiListItemButton-root:last-of-type": {
2630
+ borderRadius: theme2.spacing(1, 0, 0, 1)
2631
+ },
2632
+ "& > .MuiListItem-root + .MuiListItem-root, & > .MuiListItemButton-root + .MuiListItemButton-root": {
2633
+ borderRight: "none"
2634
+ }
2635
+ },
2636
+ // When li is the only item in the list (direct children only, excludes nested ListItemButton inside ListItem)
2637
+ "& > .MuiListItem-root:only-of-type, & > .MuiListItemButton-root:only-of-type": {
2638
+ borderRadius: theme2.spacing(1)
2480
2639
  }
2481
2640
  },
2482
2641
  "& .MuiListItemButton-root": {
@@ -2488,32 +2647,114 @@ const navigationOverrides = {
2488
2647
  }
2489
2648
  },
2490
2649
  // List Item
2650
+ MuiListItem: {
2651
+ defaultProps: {
2652
+ dense: true,
2653
+ variant: "standard",
2654
+ disablePadding: false
2655
+ },
2656
+ styleOverrides: {
2657
+ root: ({ theme: theme2, ownerState }) => ({
2658
+ ...getListItemStyles(ownerState, theme2),
2659
+ // Reset padding when contains ListItemButton
2660
+ "&:has(.MuiListItemButton-root)": {
2661
+ padding: 0,
2662
+ '&.MuiListItem-root[data-variant="boxed"]': {
2663
+ boxShadow: "none",
2664
+ "&:hover": {
2665
+ backgroundColor: theme2.palette.background.paper,
2666
+ boxShadow: "none"
2667
+ }
2668
+ }
2669
+ },
2670
+ // Add padding right to ListItem when has child ListItemSecondaryAction and not ListItemButton as child
2671
+ "&:has(.MuiListItemSecondaryAction-root):not(:has(.MuiListItemButton-root))": {
2672
+ paddingRight: theme2.spacing(7.5),
2673
+ '&[data-disable-padding="true"], &[data-disable-gutters="true"]': {
2674
+ paddingRight: `${theme2.spacing(5.5)} !important`
2675
+ }
2676
+ },
2677
+ // Reset padding to ListItemButton when inside ListItem, but keep padding left
2678
+ "& > .MuiListItemButton-root": {
2679
+ paddingRight: 0,
2680
+ paddingLeft: theme2.spacing(ownerState.dense ? 1.5 : 2),
2681
+ "&:hover": {
2682
+ backgroundColor: theme2.palette.action.hover
2683
+ }
2684
+ },
2685
+ // Boxed variant hover when inside ListItem
2686
+ '&[data-variant="boxed"] > .MuiListItemButton-root': {
2687
+ boxShadow: `inset 0 0 0 1px ${theme2.palette.divider}`,
2688
+ borderRadius: theme2.spacing(1),
2689
+ "&:hover": {
2690
+ backgroundColor: theme2.palette.background.paper,
2691
+ boxShadow: `inset 0 0 0 1px ${theme2.palette.text.hint}`
2692
+ }
2693
+ },
2694
+ // Add padding right to ListItemButton when sibling ListItemSecondaryAction is present to simulate spacing between the action and the content
2695
+ "&:has(.MuiListItemSecondaryAction-root)": {
2696
+ "& > .MuiListItemButton-root": {
2697
+ paddingRight: theme2.spacing(7.5),
2698
+ '&[data-disable-padding="true"], &[data-disable-gutters="true"]': {
2699
+ paddingRight: `${theme2.spacing(5.5)} !important`
2700
+ }
2701
+ }
2702
+ }
2703
+ })
2704
+ }
2705
+ },
2706
+ // List Item Button
2707
+ MuiListItemButton: {
2708
+ defaultProps: {
2709
+ dense: true,
2710
+ variant: "standard",
2711
+ component: "button"
2712
+ },
2713
+ styleOverrides: {
2714
+ root: ({ theme: theme2, ownerState }) => ({
2715
+ ...getListItemStyles(ownerState, theme2)
2716
+ })
2717
+ }
2718
+ },
2719
+ // List Item Text
2491
2720
  MuiListItemText: {
2492
2721
  defaultProps: {
2493
2722
  primaryTypographyProps: {
2494
- variant: "body2",
2723
+ variant: "button",
2724
+ color: "text.primary",
2725
+ fontWeight: 500,
2495
2726
  noWrap: true,
2496
2727
  component: "span"
2497
2728
  },
2498
- secondaryTypographyProps: { variant: "caption" }
2729
+ secondaryTypographyProps: {
2730
+ variant: "caption",
2731
+ color: "text.secondary",
2732
+ noWrap: true
2733
+ }
2499
2734
  },
2500
2735
  styleOverrides: {
2501
- root: ({ theme: theme2 }) => ({
2502
- paddingRight: theme2.spacing(2),
2503
- "& + .MuiBox-root": {
2504
- marginRight: theme2.spacing(1)
2505
- }
2736
+ root: () => ({
2737
+ display: "flex",
2738
+ flexDirection: "column",
2739
+ justifyContent: "center",
2740
+ flex: 1,
2741
+ minHeight: theme.spacing(2.5),
2742
+ margin: 0
2506
2743
  })
2507
2744
  }
2508
2745
  },
2746
+ // List Item Icon
2509
2747
  MuiListItemIcon: {
2510
2748
  styleOverrides: {
2511
2749
  root: ({ theme: theme2 }) => ({
2512
- display: "flex",
2513
- alignItems: "center",
2514
- gap: theme2.spacing(2),
2515
- "& .MuiSvgIcon-root": {
2516
- fontSize: cssUtils.ICON_SIZE_LARGE
2750
+ ...getListItemAdornmentStyles(theme2),
2751
+ // Apply styles to SVGs, but exclude those inside Radio or Checkbox components
2752
+ "&:not(:has(.MuiRadio-root)):not(:has(.MuiCheckbox-root)) svg": {
2753
+ color: theme2.palette.text.secondary,
2754
+ fontSize: cssUtils.ICON_SIZE_LARGE,
2755
+ width: cssUtils.ICON_SIZE_LARGE,
2756
+ minWidth: cssUtils.ICON_SIZE_LARGE,
2757
+ height: cssUtils.ICON_SIZE_LARGE
2517
2758
  },
2518
2759
  ".MuiMenuItem-root.MuiButtonBase-root &": {
2519
2760
  minWidth: cssUtils.ICON_SIZE_MEDIUM
@@ -2521,12 +2762,14 @@ const navigationOverrides = {
2521
2762
  })
2522
2763
  }
2523
2764
  },
2765
+ // List Item Avatar
2524
2766
  MuiListItemAvatar: {
2525
2767
  styleOverrides: {
2526
2768
  root: ({ theme: theme2 }) => ({
2769
+ ...getListItemAdornmentStyles(theme2),
2527
2770
  "& .MuiAvatar-root": {
2528
- height: theme2.spacing(4),
2529
- width: theme2.spacing(4)
2771
+ height: cssUtils.MENU_ITEM_SIZE_DEFAULT,
2772
+ width: cssUtils.MENU_ITEM_SIZE_DEFAULT
2530
2773
  },
2531
2774
  "& .MuiSvgIcon-root": {
2532
2775
  fontSize: cssUtils.ICON_SIZE_MEDIUM
@@ -2534,6 +2777,50 @@ const navigationOverrides = {
2534
2777
  })
2535
2778
  }
2536
2779
  },
2780
+ // List Item Secondary Action
2781
+ MuiListItemSecondaryAction: {
2782
+ styleOverrides: {
2783
+ root: ({ theme: theme2 }) => ({
2784
+ ...getListItemAdornmentStyles(theme2),
2785
+ // if parent ListItem has disableGutters or disablePadding, reset padding
2786
+ '[data-disable-padding="true"] &, [data-disable-gutters="true"] &': {
2787
+ right: 0
2788
+ }
2789
+ })
2790
+ }
2791
+ },
2792
+ // List Subheader
2793
+ MuiListSubheader: {
2794
+ defaultProps: {
2795
+ disableGutters: true,
2796
+ component: "div"
2797
+ },
2798
+ styleOverrides: {
2799
+ root: ({ theme: theme2 }) => ({
2800
+ display: "flex",
2801
+ alignItems: "center",
2802
+ justifyContent: "flex-start",
2803
+ height: theme2.spacing(3),
2804
+ padding: 0,
2805
+ ...theme2.typography.caption,
2806
+ // Use data attribute selector since backgroundColor is not passed to MUI component to avoid DOM warning
2807
+ backgroundColor: theme2.palette.background.default,
2808
+ '&[data-background-color="paper"]': {
2809
+ backgroundColor: theme2.palette.background.paper
2810
+ },
2811
+ '&[data-background-color="inherit"]': {
2812
+ backgroundColor: "inherit"
2813
+ },
2814
+ // Adapt padding when List is variant="standard"
2815
+ '[data-variant="standard"] &': {
2816
+ padding: theme2.spacing(0, 2),
2817
+ '&[data-dense="true"]': {
2818
+ padding: theme2.spacing(0, 1.5)
2819
+ }
2820
+ }
2821
+ })
2822
+ }
2823
+ },
2537
2824
  // Tabs
2538
2825
  MuiTabs: {
2539
2826
  styleOverrides: {
@@ -3263,6 +3550,10 @@ exports.BREAKPOINTS = cssUtils.BREAKPOINTS;
3263
3550
  exports.ICON_SIZE_LARGE = cssUtils.ICON_SIZE_LARGE;
3264
3551
  exports.ICON_SIZE_MEDIUM = cssUtils.ICON_SIZE_MEDIUM;
3265
3552
  exports.ICON_SIZE_SMALL = cssUtils.ICON_SIZE_SMALL;
3553
+ exports.LIST_ITEM_SIZE_DEFAULT = cssUtils.LIST_ITEM_SIZE_DEFAULT;
3554
+ exports.LIST_ITEM_SIZE_DENSE = cssUtils.LIST_ITEM_SIZE_DENSE;
3555
+ exports.LIST_MAX_SIZE = cssUtils.LIST_MAX_SIZE;
3556
+ exports.LIST_OVERSCAN_ITEMS_COUNT = cssUtils.LIST_OVERSCAN_ITEMS_COUNT;
3266
3557
  exports.MENU_ITEM_SIZE_DEFAULT = cssUtils.MENU_ITEM_SIZE_DEFAULT;
3267
3558
  exports.MENU_ITEM_SIZE_DENSE = cssUtils.MENU_ITEM_SIZE_DENSE;
3268
3559
  exports.MENU_ITEM_SIZE_EXTENDED = cssUtils.MENU_ITEM_SIZE_EXTENDED;