@carto/meridian-ds 2.8.0 → 2.9.1-alpha-lists.2

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 (82) hide show
  1. package/CHANGELOG.md +13 -2
  2. package/dist/{Alert-C4W0H_uN.cjs → Alert-BDpjbOOk.cjs} +1 -1
  3. package/dist/{Alert-BZPM5zpX.js → Alert-BWe4a9zW.js} +1 -1
  4. package/dist/{MenuItem-CgF4QdGi.cjs → MenuItem-DrvPgr-r.cjs} +15 -1
  5. package/dist/{MenuItem-DRUK149i.js → MenuItem-zaH11xyj.js} +16 -2
  6. package/dist/components/index.cjs +223 -21
  7. package/dist/components/index.js +226 -24
  8. package/dist/{css-utils-CjUBRJVK.js → css-utils-BzztxQJk.js} +8 -4
  9. package/dist/{css-utils-CH7es90t.cjs → css-utils-Do3X_yIr.cjs} +4 -0
  10. package/dist/custom-icons/index.cjs +666 -538
  11. package/dist/custom-icons/index.js +666 -538
  12. package/dist/theme/index.cjs +267 -47
  13. package/dist/theme/index.js +253 -33
  14. package/dist/types/components/Avatar/Avatar.stories.d.ts.map +1 -1
  15. package/dist/types/components/EmptyState/EmptyState.d.ts +4 -0
  16. package/dist/types/components/EmptyState/EmptyState.d.ts.map +1 -0
  17. package/dist/types/components/EmptyState/EmptyState.stories.d.ts +188 -0
  18. package/dist/types/components/EmptyState/EmptyState.stories.d.ts.map +1 -0
  19. package/dist/types/components/EmptyState/EmptyState.styled.d.ts +38 -0
  20. package/dist/types/components/EmptyState/EmptyState.styled.d.ts.map +1 -0
  21. package/dist/types/components/EmptyState/EmptyState.test.d.ts +2 -0
  22. package/dist/types/components/EmptyState/EmptyState.test.d.ts.map +1 -0
  23. package/dist/types/components/EmptyState/index.d.ts +3 -0
  24. package/dist/types/components/EmptyState/index.d.ts.map +1 -0
  25. package/dist/types/components/EmptyState/types.d.ts +82 -0
  26. package/dist/types/components/EmptyState/types.d.ts.map +1 -0
  27. package/dist/types/components/List/List.d.ts +18 -0
  28. package/dist/types/components/List/List.d.ts.map +1 -0
  29. package/dist/types/components/List/List.stories.d.ts +80 -0
  30. package/dist/types/components/List/List.stories.d.ts.map +1 -0
  31. package/dist/types/components/List/List.test.d.ts +2 -0
  32. package/dist/types/components/List/List.test.d.ts.map +1 -0
  33. package/dist/types/components/List/ListSubheader/ListSubheader.d.ts +14 -0
  34. package/dist/types/components/List/ListSubheader/ListSubheader.d.ts.map +1 -0
  35. package/dist/types/components/List/ListSubheader/ListSubheader.test.d.ts +2 -0
  36. package/dist/types/components/List/ListSubheader/ListSubheader.test.d.ts.map +1 -0
  37. package/dist/types/components/List/index.d.ts +5 -0
  38. package/dist/types/components/List/index.d.ts.map +1 -0
  39. package/dist/types/components/ListItem/ListItem.d.ts +33 -0
  40. package/dist/types/components/ListItem/ListItem.d.ts.map +1 -0
  41. package/dist/types/components/ListItem/ListItem.stories.d.ts +235 -0
  42. package/dist/types/components/ListItem/ListItem.stories.d.ts.map +1 -0
  43. package/dist/types/components/ListItem/ListItem.test.d.ts +2 -0
  44. package/dist/types/components/ListItem/ListItem.test.d.ts.map +1 -0
  45. package/dist/types/components/ListItem/ListItemRightContent/ListItemRightContent.d.ts +14 -0
  46. package/dist/types/components/ListItem/ListItemRightContent/ListItemRightContent.d.ts.map +1 -0
  47. package/dist/types/components/ListItem/ListItemRightContent/ListItemRightContent.test.d.ts +2 -0
  48. package/dist/types/components/ListItem/ListItemRightContent/ListItemRightContent.test.d.ts.map +1 -0
  49. package/dist/types/components/ListItem/index.d.ts +5 -0
  50. package/dist/types/components/ListItem/index.d.ts.map +1 -0
  51. package/dist/types/components/Loader/Loader.stories.d.ts +3 -3
  52. package/dist/types/components/Loader/Loader.stories.d.ts.map +1 -1
  53. package/dist/types/components/Menu/Menu/Menu.stories.d.ts.map +1 -1
  54. package/dist/types/components/index.d.ts +6 -0
  55. package/dist/types/components/index.d.ts.map +1 -1
  56. package/dist/types/custom-icons/GroupOff.d.ts +4 -0
  57. package/dist/types/custom-icons/GroupOff.d.ts.map +1 -0
  58. package/dist/types/custom-icons/RunReuse.d.ts +4 -0
  59. package/dist/types/custom-icons/RunReuse.d.ts.map +1 -0
  60. package/dist/types/custom-icons/SearchMap.d.ts +4 -0
  61. package/dist/types/custom-icons/SearchMap.d.ts.map +1 -0
  62. package/dist/types/custom-icons/SwitchAccessShortcut.d.ts +4 -0
  63. package/dist/types/custom-icons/SwitchAccessShortcut.d.ts.map +1 -0
  64. package/dist/types/custom-icons/__docs__/CustomIcons.stories.d.ts +8 -0
  65. package/dist/types/custom-icons/__docs__/CustomIcons.stories.d.ts.map +1 -1
  66. package/dist/types/custom-icons/index.d.ts +4 -0
  67. package/dist/types/custom-icons/index.d.ts.map +1 -1
  68. package/dist/types/theme/components/data-display.d.ts.map +1 -1
  69. package/dist/types/theme/components/navigation.d.ts.map +1 -1
  70. package/dist/types/theme/types.d.ts +86 -0
  71. package/dist/types/theme/types.d.ts.map +1 -1
  72. package/dist/types/utils/theme-constants.d.ts +2 -0
  73. package/dist/types/utils/theme-constants.d.ts.map +1 -1
  74. package/dist/types/utils/theme-utils.d.ts +16 -0
  75. package/dist/types/utils/theme-utils.d.ts.map +1 -1
  76. package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionWidgetUI.test.d.ts +0 -1
  77. package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionWidgetUI.test.d.ts.map +1 -1
  78. package/dist/widgets/index.cjs +2 -2
  79. package/dist/widgets/index.js +2 -2
  80. package/package.json +1 -1
  81. package/dist/types/theme/components/stories/List.stories.d.ts +0 -62
  82. package/dist/types/theme/components/stories/List.stories.d.ts.map +0 -1
@@ -3,12 +3,12 @@ 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-DrvPgr-r.cjs");
6
7
  const jsxRuntime = require("react/jsx-runtime");
7
- const cssUtils = require("../css-utils-CH7es90t.cjs");
8
+ const cssUtils = require("../css-utils-Do3X_yIr.cjs");
8
9
  const iconsMaterial = require("@mui/icons-material");
9
10
  const ArrowDown = require("../ArrowDown-DJ0vhbsw.cjs");
10
11
  const xDatePickers = require("@mui/x-date-pickers");
11
- const MenuItem = require("../MenuItem-CgF4QdGi.cjs");
12
12
  const themeShadows = [
13
13
  "none",
14
14
  // 0
@@ -44,11 +44,6 @@ const themeShadows = [
44
44
  "0px 11px 15px -7px rgba(44, 48, 50, 0.12), 0px 24px 38px 3px rgba(44, 48, 50, 0.08), 0px 9px 46px 8px rgba(44, 48, 50, 0.04)"
45
45
  // 24
46
46
  ];
47
- function getPixelToRem(px) {
48
- const fontBase = 16;
49
- const rem = 1 / fontBase * px + "rem";
50
- return rem;
51
- }
52
47
  const baseTypography = {
53
48
  htmlFontSize: 16,
54
49
  fontFamily: "Inter, sans-serif",
@@ -62,77 +57,77 @@ const baseTypography = {
62
57
  h1: {
63
58
  fontFamily: "Inter, sans-serif",
64
59
  fontWeight: 600,
65
- fontSize: getPixelToRem(96),
60
+ fontSize: MenuItem.getPixelToRem(96),
66
61
  lineHeight: 1.167,
67
62
  letterSpacing: "-1.5px"
68
63
  },
69
64
  h2: {
70
65
  fontFamily: "Inter, sans-serif",
71
66
  fontWeight: 600,
72
- fontSize: getPixelToRem(60),
67
+ fontSize: MenuItem.getPixelToRem(60),
73
68
  lineHeight: 1.2,
74
69
  letterSpacing: "-0.5px"
75
70
  },
76
71
  h3: {
77
72
  fontFamily: "Inter, sans-serif",
78
73
  fontWeight: 600,
79
- fontSize: getPixelToRem(48),
74
+ fontSize: MenuItem.getPixelToRem(48),
80
75
  lineHeight: 1.167,
81
76
  letterSpacing: 0
82
77
  },
83
78
  h4: {
84
79
  fontFamily: "Inter, sans-serif",
85
80
  fontWeight: 600,
86
- fontSize: getPixelToRem(32),
81
+ fontSize: MenuItem.getPixelToRem(32),
87
82
  lineHeight: 1.25,
88
83
  letterSpacing: 0
89
84
  },
90
85
  h5: {
91
86
  fontFamily: "Inter, sans-serif",
92
87
  fontWeight: 600,
93
- fontSize: getPixelToRem(24),
88
+ fontSize: MenuItem.getPixelToRem(24),
94
89
  lineHeight: 1.167,
95
90
  letterSpacing: 0
96
91
  },
97
92
  h6: {
98
93
  fontFamily: "Inter, sans-serif",
99
94
  fontWeight: 500,
100
- fontSize: getPixelToRem(18),
95
+ fontSize: MenuItem.getPixelToRem(18),
101
96
  lineHeight: 1.333,
102
97
  letterSpacing: 0
103
98
  },
104
99
  subtitle1: {
105
100
  fontFamily: "Inter, sans-serif",
106
101
  fontWeight: 500,
107
- fontSize: getPixelToRem(16),
102
+ fontSize: MenuItem.getPixelToRem(16),
108
103
  lineHeight: 1.5,
109
104
  letterSpacing: 0
110
105
  },
111
106
  subtitle2: {
112
107
  fontFamily: "Inter, sans-serif",
113
108
  fontWeight: 600,
114
- fontSize: getPixelToRem(13),
109
+ fontSize: MenuItem.getPixelToRem(13),
115
110
  lineHeight: 1.538,
116
111
  letterSpacing: 0
117
112
  },
118
113
  body1: {
119
114
  fontFamily: "Inter, sans-serif",
120
115
  fontWeight: 400,
121
- fontSize: getPixelToRem(16),
116
+ fontSize: MenuItem.getPixelToRem(16),
122
117
  lineHeight: 1.5,
123
118
  letterSpacing: 0
124
119
  },
125
120
  body2: {
126
121
  fontFamily: "Inter, sans-serif",
127
122
  fontWeight: 400,
128
- fontSize: getPixelToRem(13),
123
+ fontSize: MenuItem.getPixelToRem(13),
129
124
  lineHeight: 1.538,
130
125
  letterSpacing: 0
131
126
  },
132
127
  button: {
133
128
  fontFamily: "Inter, sans-serif",
134
129
  fontWeight: 500,
135
- fontSize: getPixelToRem(13),
130
+ fontSize: MenuItem.getPixelToRem(13),
136
131
  lineHeight: 1.538,
137
132
  letterSpacing: 0,
138
133
  textTransform: "inherit"
@@ -140,14 +135,14 @@ const baseTypography = {
140
135
  caption: {
141
136
  fontFamily: "Inter, sans-serif",
142
137
  fontWeight: 400,
143
- fontSize: getPixelToRem(11),
138
+ fontSize: MenuItem.getPixelToRem(11),
144
139
  lineHeight: 1.454,
145
140
  letterSpacing: 0
146
141
  },
147
142
  overline: {
148
143
  fontFamily: "Inter, sans-serif",
149
144
  fontWeight: 500,
150
- fontSize: getPixelToRem(10),
145
+ fontSize: MenuItem.getPixelToRem(10),
151
146
  lineHeight: 1.2,
152
147
  letterSpacing: "1.2px",
153
148
  textTransform: "uppercase"
@@ -167,7 +162,7 @@ const customTypography = {
167
162
  code1: {
168
163
  fontFamily: '"Overpass Mono", monospace',
169
164
  fontWeight: 400,
170
- fontSize: getPixelToRem(16),
165
+ fontSize: MenuItem.getPixelToRem(16),
171
166
  lineHeight: 1.5,
172
167
  letterSpacing: 0,
173
168
  fontVariantLigatures: "no-common-ligatures"
@@ -175,7 +170,7 @@ const customTypography = {
175
170
  code2: {
176
171
  fontFamily: '"Overpass Mono", monospace',
177
172
  fontWeight: 400,
178
- fontSize: getPixelToRem(14),
173
+ fontSize: MenuItem.getPixelToRem(14),
179
174
  lineHeight: 1.428,
180
175
  letterSpacing: 0,
181
176
  fontVariantLigatures: "no-common-ligatures"
@@ -183,7 +178,7 @@ const customTypography = {
183
178
  code3: {
184
179
  fontFamily: '"Overpass Mono", monospace',
185
180
  fontWeight: 400,
186
- fontSize: getPixelToRem(12),
181
+ fontSize: MenuItem.getPixelToRem(12),
187
182
  lineHeight: 1.333,
188
183
  letterSpacing: 0,
189
184
  fontVariantLigatures: "no-common-ligatures"
@@ -660,8 +655,19 @@ const dataDisplayOverrides = {
660
655
  styleOverrides: {
661
656
  root: ({ theme: theme2, ownerState }) => ({
662
657
  overflow: "initial",
658
+ position: "relative",
663
659
  color: theme2.palette.secondary.contrastText,
664
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
+ },
665
671
  // Default fallback image override
666
672
  // https://github.com/mui/material-ui/issues/33229
667
673
  "& .MuiAvatar-fallback": {
@@ -698,11 +704,25 @@ const dataDisplayOverrides = {
698
704
  },
699
705
  // Disabled styles
700
706
  ...ownerState.disabled && {
701
- 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
+ }
702
720
  }
703
721
  }),
704
- img: ({ theme: theme2 }) => ({
705
- boxShadow: `0 0 0 1px ${theme2.palette.default.outlinedBorder}`
722
+ img: ({ ownerState }) => ({
723
+ ...ownerState.disabled && {
724
+ opacity: 0.6
725
+ }
706
726
  }),
707
727
  circular: () => ({
708
728
  borderRadius: avatarCircularRadius,
@@ -2325,6 +2345,72 @@ const formsOverrides = {
2325
2345
  }
2326
2346
  }
2327
2347
  };
2348
+ const getListItemAdornmentStyles = (theme2) => ({
2349
+ display: "flex",
2350
+ alignItems: "center",
2351
+ justifyContent: "center",
2352
+ gap: theme2.spacing(1.5),
2353
+ minHeight: cssUtils.MENU_ITEM_SIZE_DEFAULT,
2354
+ minWidth: cssUtils.MENU_ITEM_SIZE_DEFAULT
2355
+ });
2356
+ const getListItemStyles = (ownerState, theme2) => ({
2357
+ gap: theme2.spacing(1.5),
2358
+ minHeight: cssUtils.MENU_ITEM_SIZE_DEFAULT,
2359
+ padding: theme2.spacing(1, 2),
2360
+ // Checkbox and radio button styles
2361
+ "& .MuiCheckbox-root, & .MuiRadio-root": {
2362
+ ...getListItemAdornmentStyles(theme2),
2363
+ // Override the default icon size coming from MUI definition
2364
+ "& .MuiSvgIcon-fontSizeMedium": {
2365
+ fontSize: cssUtils.ICON_SIZE_LARGE,
2366
+ width: cssUtils.ICON_SIZE_LARGE,
2367
+ minWidth: cssUtils.ICON_SIZE_LARGE,
2368
+ height: cssUtils.ICON_SIZE_LARGE
2369
+ }
2370
+ },
2371
+ // Height: fixedHeight true (or undefined, which defaults to true) + dense true: 52px, dense false: 68px
2372
+ // fixedHeight false: adapts to content
2373
+ // Use data attribute selector since fixedHeight is not passed to MUI component to avoid DOM warning
2374
+ height: ownerState.dense ? cssUtils.LIST_ITEM_SIZE_DENSE : cssUtils.LIST_ITEM_SIZE_DEFAULT,
2375
+ '&[data-fixed-height="false"]': {
2376
+ height: "auto"
2377
+ },
2378
+ // Outlined variant styles
2379
+ ...ownerState.variant === "outlined" && {
2380
+ backgroundColor: theme2.palette.background.paper,
2381
+ boxShadow: `inset 0 0 0 1px ${theme2.palette.divider}`,
2382
+ borderRadius: theme2.spacing(1),
2383
+ "&.MuiListItemButton-root:hover": {
2384
+ backgroundColor: theme2.palette.background.paper,
2385
+ boxShadow: `inset 0 0 0 1px ${theme2.palette.text.hint}`
2386
+ }
2387
+ },
2388
+ // Disable gutters styles
2389
+ ...ownerState.disableGutters && {
2390
+ paddingLeft: 0,
2391
+ paddingRight: 0
2392
+ },
2393
+ // Disable padding styles
2394
+ ...ownerState.disablePadding && {
2395
+ padding: 0
2396
+ },
2397
+ // Disabled styles
2398
+ ...ownerState.disabled && {
2399
+ opacity: "1 !important",
2400
+ color: theme2.palette.text.disabled,
2401
+ backgroundColor: ownerState.variant === "outlined" ? theme2.palette.background.paper : "transparent",
2402
+ borderColor: ownerState.variant === "outlined" ? theme2.palette.divider : "transparent",
2403
+ ".MuiTypography-root": {
2404
+ color: theme2.palette.text.disabled
2405
+ },
2406
+ svg: {
2407
+ color: theme2.palette.text.disabled,
2408
+ path: {
2409
+ fill: theme2.palette.text.disabled
2410
+ }
2411
+ }
2412
+ }
2413
+ });
2328
2414
  const navigationOverrides = {
2329
2415
  // Menu
2330
2416
  MuiMenu: {
@@ -2444,9 +2530,15 @@ const navigationOverrides = {
2444
2530
  },
2445
2531
  // List
2446
2532
  MuiList: {
2533
+ defaultProps: {
2534
+ variant: "standard"
2535
+ },
2447
2536
  styleOverrides: {
2448
- root: ({ theme: theme2 }) => ({
2449
- paddingTop: 0,
2537
+ root: ({ theme: theme2, ownerState }) => ({
2538
+ display: "flex",
2539
+ flexDirection: "column",
2540
+ gap: theme2.spacing(ownerState.spacing ?? 0),
2541
+ padding: 0,
2450
2542
  ".MuiPopover-root &, .MuiPopper-root &, .base-Popper-root &": {
2451
2543
  minWidth: theme2.spacing(8),
2452
2544
  // 64px, defined by design
@@ -2461,13 +2553,30 @@ const navigationOverrides = {
2461
2553
  ".MuiDivider-root": {
2462
2554
  margin: theme2.spacing(1, 0)
2463
2555
  },
2556
+ ".MuiListSubheader-root": {
2557
+ // We need to offset the margin to avoid double spacing between subheaders and regular list items when using spacing prop.
2558
+ marginBottom: theme2.spacing(-(ownerState.spacing ?? 0))
2559
+ },
2560
+ // Outlined-list variant: border on the list container and in the list items
2561
+ ...ownerState.variant === "outlined-list" && {
2562
+ "& .MuiListItem-root, & .MuiListItemButton-root": {
2563
+ border: `1px solid ${theme2.palette.divider}`
2564
+ },
2565
+ // First list item has rounded top corners
2566
+ "& .MuiListItem-root:first-of-type, & .MuiListItemButton-root:first-of-type": {
2567
+ borderRadius: theme2.spacing(1, 1, 0, 0)
2568
+ },
2569
+ // Last list item has rounded bottom corners
2570
+ "& .MuiListItem-root:last-of-type, & .MuiListItemButton-root:last-of-type": {
2571
+ borderRadius: theme2.spacing(0, 0, 1, 1)
2572
+ },
2573
+ "& .MuiListItem-root + .MuiListItem-root, & .MuiListItemButton-root + .MuiListItemButton-root": {
2574
+ borderTop: "none"
2575
+ }
2576
+ },
2577
+ // TODO: old code, to be reviewed once we support sublevels in Figma specs.
2464
2578
  // Indent sublevels, ugly but needed to avoid issues with hover
2465
2579
  "& .MuiList-root": {
2466
- paddingTop: 0,
2467
- paddingBottom: 0,
2468
- "& .MuiListItem-root": {
2469
- paddingLeft: theme2.spacing(4)
2470
- },
2471
2580
  "& .MuiList-root": {
2472
2581
  "& .MuiListItem-root": {
2473
2582
  paddingLeft: theme2.spacing(6)
@@ -2493,32 +2602,105 @@ const navigationOverrides = {
2493
2602
  }
2494
2603
  },
2495
2604
  // List Item
2605
+ MuiListItem: {
2606
+ defaultProps: {
2607
+ dense: true,
2608
+ variant: "standard",
2609
+ disablePadding: false
2610
+ },
2611
+ styleOverrides: {
2612
+ root: ({ theme: theme2, ownerState }) => ({
2613
+ ...getListItemStyles(ownerState, theme2),
2614
+ // Add padding right when contains SecondaryAction to simulate spacing between the action and the content
2615
+ "&:has(.MuiListItemSecondaryAction-root)": {
2616
+ paddingRight: theme2.spacing(7.5)
2617
+ },
2618
+ // Reset padding when contains ListItemButton
2619
+ "&:has(.MuiListItemButton-root)": {
2620
+ padding: 0,
2621
+ '&.MuiListItem-root[data-variant="outlined"]': {
2622
+ boxShadow: "none",
2623
+ "&:hover": {
2624
+ backgroundColor: theme2.palette.background.paper,
2625
+ boxShadow: "none"
2626
+ }
2627
+ }
2628
+ }
2629
+ })
2630
+ }
2631
+ },
2632
+ // List Item Button
2633
+ MuiListItemButton: {
2634
+ defaultProps: {
2635
+ dense: true,
2636
+ variant: "standard",
2637
+ component: "button"
2638
+ },
2639
+ styleOverrides: {
2640
+ root: ({ theme: theme2, ownerState }) => ({
2641
+ ...getListItemStyles(ownerState, theme2),
2642
+ // Add padding right when contains SecondaryAction to simulate spacing between the action and the content
2643
+ "&:has(.MuiListItemSecondaryAction-root)": {
2644
+ paddingRight: theme2.spacing(7.5)
2645
+ },
2646
+ // Reset padding when inside ListItem, but keep padding left
2647
+ ".MuiListItem-root > &.MuiListItemButton-root": {
2648
+ padding: 0,
2649
+ paddingLeft: theme2.spacing(2),
2650
+ "&:hover": {
2651
+ backgroundColor: theme2.palette.action.hover
2652
+ }
2653
+ },
2654
+ // Outlined variant hover when inside ListItem
2655
+ '.MuiListItem-root[data-variant="outlined"] > &.MuiListItemButton-root': {
2656
+ boxShadow: `inset 0 0 0 1px ${theme2.palette.divider}`,
2657
+ borderRadius: theme2.spacing(1),
2658
+ "&:hover": {
2659
+ backgroundColor: theme2.palette.background.paper,
2660
+ boxShadow: `inset 0 0 0 1px ${theme2.palette.text.hint}`
2661
+ }
2662
+ },
2663
+ // Add padding right when inside ListItem that has SecondaryAction to simulate spacing between the action and the content
2664
+ ".MuiListItem-root:has(.MuiListItemSecondaryAction-root) > &.MuiListItemButton-root": {
2665
+ paddingRight: theme2.spacing(7.5)
2666
+ }
2667
+ })
2668
+ }
2669
+ },
2496
2670
  MuiListItemText: {
2497
2671
  defaultProps: {
2498
2672
  primaryTypographyProps: {
2499
- variant: "body2",
2673
+ variant: "button",
2500
2674
  noWrap: true,
2501
2675
  component: "span"
2502
2676
  },
2503
- secondaryTypographyProps: { variant: "caption" }
2677
+ secondaryTypographyProps: {
2678
+ variant: "caption",
2679
+ color: "text.secondary"
2680
+ }
2504
2681
  },
2505
2682
  styleOverrides: {
2506
- root: ({ theme: theme2 }) => ({
2507
- paddingRight: theme2.spacing(2),
2508
- "& + .MuiBox-root": {
2509
- marginRight: theme2.spacing(1)
2510
- }
2683
+ root: () => ({
2684
+ display: "flex",
2685
+ flexDirection: "column",
2686
+ justifyContent: "center",
2687
+ flex: 1,
2688
+ minHeight: cssUtils.MENU_ITEM_SIZE_DEFAULT,
2689
+ margin: 0
2511
2690
  })
2512
2691
  }
2513
2692
  },
2514
2693
  MuiListItemIcon: {
2515
2694
  styleOverrides: {
2516
2695
  root: ({ theme: theme2 }) => ({
2517
- display: "flex",
2518
- alignItems: "center",
2519
- gap: theme2.spacing(2),
2520
- "& .MuiSvgIcon-root": {
2521
- fontSize: cssUtils.ICON_SIZE_LARGE
2696
+ ...getListItemAdornmentStyles(theme2),
2697
+ // Apply styles to SVGs, but exclude those inside Radio or Checkbox components
2698
+ "&:not(:has(.MuiRadio-root)):not(:has(.MuiCheckbox-root)) svg": {
2699
+ color: theme2.palette.text.secondary,
2700
+ fontSize: cssUtils.ICON_SIZE_LARGE,
2701
+ width: cssUtils.ICON_SIZE_LARGE,
2702
+ minWidth: cssUtils.ICON_SIZE_LARGE,
2703
+ height: cssUtils.ICON_SIZE_LARGE
2522
2704
  },
2523
2705
  ".MuiMenuItem-root.MuiButtonBase-root &": {
2524
2706
  minWidth: cssUtils.ICON_SIZE_MEDIUM
@@ -2529,9 +2711,10 @@ const navigationOverrides = {
2529
2711
  MuiListItemAvatar: {
2530
2712
  styleOverrides: {
2531
2713
  root: ({ theme: theme2 }) => ({
2714
+ ...getListItemAdornmentStyles(theme2),
2532
2715
  "& .MuiAvatar-root": {
2533
- height: theme2.spacing(4),
2534
- width: theme2.spacing(4)
2716
+ height: cssUtils.MENU_ITEM_SIZE_DEFAULT,
2717
+ width: cssUtils.MENU_ITEM_SIZE_DEFAULT
2535
2718
  },
2536
2719
  "& .MuiSvgIcon-root": {
2537
2720
  fontSize: cssUtils.ICON_SIZE_MEDIUM
@@ -2539,6 +2722,41 @@ const navigationOverrides = {
2539
2722
  })
2540
2723
  }
2541
2724
  },
2725
+ MuiListItemSecondaryAction: {
2726
+ styleOverrides: {
2727
+ root: ({ theme: theme2 }) => ({
2728
+ ...getListItemAdornmentStyles(theme2)
2729
+ })
2730
+ }
2731
+ },
2732
+ MuiListSubheader: {
2733
+ defaultProps: {
2734
+ disableGutters: true,
2735
+ color: "default",
2736
+ component: "div"
2737
+ },
2738
+ styleOverrides: {
2739
+ root: ({ theme: theme2 }) => ({
2740
+ display: "flex",
2741
+ alignItems: "center",
2742
+ justifyContent: "flex-start",
2743
+ height: theme2.spacing(3),
2744
+ ...theme2.typography.caption,
2745
+ // Use data attribute selector since backgroundColor is not passed to MUI component to avoid DOM warning
2746
+ backgroundColor: theme2.palette.background.default,
2747
+ '&[data-background-color="paper"]': {
2748
+ backgroundColor: theme2.palette.background.paper
2749
+ },
2750
+ '&[data-background-color="inherit"]': {
2751
+ backgroundColor: "inherit"
2752
+ },
2753
+ // Padding for ListSubHeader when List is variant="standard"
2754
+ '[data-variant="standard"] &': {
2755
+ padding: theme2.spacing(0, 2)
2756
+ }
2757
+ })
2758
+ }
2759
+ },
2542
2760
  // Tabs
2543
2761
  MuiTabs: {
2544
2762
  styleOverrides: {
@@ -3268,6 +3486,8 @@ exports.BREAKPOINTS = cssUtils.BREAKPOINTS;
3268
3486
  exports.ICON_SIZE_LARGE = cssUtils.ICON_SIZE_LARGE;
3269
3487
  exports.ICON_SIZE_MEDIUM = cssUtils.ICON_SIZE_MEDIUM;
3270
3488
  exports.ICON_SIZE_SMALL = cssUtils.ICON_SIZE_SMALL;
3489
+ exports.LIST_ITEM_SIZE_DEFAULT = cssUtils.LIST_ITEM_SIZE_DEFAULT;
3490
+ exports.LIST_ITEM_SIZE_DENSE = cssUtils.LIST_ITEM_SIZE_DENSE;
3271
3491
  exports.MENU_ITEM_SIZE_DEFAULT = cssUtils.MENU_ITEM_SIZE_DEFAULT;
3272
3492
  exports.MENU_ITEM_SIZE_DENSE = cssUtils.MENU_ITEM_SIZE_DENSE;
3273
3493
  exports.MENU_ITEM_SIZE_EXTENDED = cssUtils.MENU_ITEM_SIZE_EXTENDED;