@carto/meridian-ds 2.9.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.
- package/CHANGELOG.md +7 -1
- package/dist/{Alert-C4W0H_uN.cjs → Alert-BDpjbOOk.cjs} +1 -1
- package/dist/{Alert-BZPM5zpX.js → Alert-BWe4a9zW.js} +1 -1
- package/dist/{MenuItem-DoBJsRR_.cjs → MenuItem-DrvPgr-r.cjs} +1 -1
- package/dist/{MenuItem-Cx5lTXXm.js → MenuItem-zaH11xyj.js} +1 -1
- package/dist/components/index.cjs +92 -7
- package/dist/components/index.js +95 -10
- package/dist/{css-utils-CjUBRJVK.js → css-utils-BzztxQJk.js} +8 -4
- package/dist/{css-utils-CH7es90t.cjs → css-utils-Do3X_yIr.cjs} +4 -0
- package/dist/custom-icons/index.cjs +666 -538
- package/dist/custom-icons/index.js +666 -538
- package/dist/theme/index.cjs +251 -26
- package/dist/theme/index.js +253 -28
- package/dist/types/components/Avatar/Avatar.stories.d.ts.map +1 -1
- package/dist/types/components/List/List.d.ts +18 -0
- package/dist/types/components/List/List.d.ts.map +1 -0
- package/dist/types/components/List/List.stories.d.ts +80 -0
- package/dist/types/components/List/List.stories.d.ts.map +1 -0
- package/dist/types/components/List/List.test.d.ts +2 -0
- package/dist/types/components/List/List.test.d.ts.map +1 -0
- package/dist/types/components/List/ListSubheader/ListSubheader.d.ts +14 -0
- package/dist/types/components/List/ListSubheader/ListSubheader.d.ts.map +1 -0
- package/dist/types/components/List/ListSubheader/ListSubheader.test.d.ts +2 -0
- package/dist/types/components/List/ListSubheader/ListSubheader.test.d.ts.map +1 -0
- package/dist/types/components/List/index.d.ts +5 -0
- package/dist/types/components/List/index.d.ts.map +1 -0
- package/dist/types/components/ListItem/ListItem.d.ts +33 -0
- package/dist/types/components/ListItem/ListItem.d.ts.map +1 -0
- package/dist/types/components/ListItem/ListItem.stories.d.ts +235 -0
- package/dist/types/components/ListItem/ListItem.stories.d.ts.map +1 -0
- package/dist/types/components/ListItem/ListItem.test.d.ts +2 -0
- package/dist/types/components/ListItem/ListItem.test.d.ts.map +1 -0
- package/dist/types/components/ListItem/ListItemRightContent/ListItemRightContent.d.ts +14 -0
- package/dist/types/components/ListItem/ListItemRightContent/ListItemRightContent.d.ts.map +1 -0
- package/dist/types/components/ListItem/ListItemRightContent/ListItemRightContent.test.d.ts +2 -0
- package/dist/types/components/ListItem/ListItemRightContent/ListItemRightContent.test.d.ts.map +1 -0
- package/dist/types/components/ListItem/index.d.ts +5 -0
- package/dist/types/components/ListItem/index.d.ts.map +1 -0
- package/dist/types/components/Menu/Menu/Menu.stories.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +4 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/custom-icons/GroupOff.d.ts +4 -0
- package/dist/types/custom-icons/GroupOff.d.ts.map +1 -0
- package/dist/types/custom-icons/RunReuse.d.ts +4 -0
- package/dist/types/custom-icons/RunReuse.d.ts.map +1 -0
- package/dist/types/custom-icons/SearchMap.d.ts +4 -0
- package/dist/types/custom-icons/SearchMap.d.ts.map +1 -0
- package/dist/types/custom-icons/SwitchAccessShortcut.d.ts +4 -0
- package/dist/types/custom-icons/SwitchAccessShortcut.d.ts.map +1 -0
- package/dist/types/custom-icons/index.d.ts +4 -0
- package/dist/types/custom-icons/index.d.ts.map +1 -1
- package/dist/types/theme/components/data-display.d.ts.map +1 -1
- package/dist/types/theme/components/navigation.d.ts.map +1 -1
- package/dist/types/theme/types.d.ts +86 -0
- package/dist/types/theme/types.d.ts.map +1 -1
- package/dist/types/utils/theme-constants.d.ts +2 -0
- package/dist/types/utils/theme-constants.d.ts.map +1 -1
- package/dist/widgets/index.cjs +2 -2
- package/dist/widgets/index.js +2 -2
- package/package.json +1 -1
- package/dist/types/theme/components/stories/List.stories.d.ts +0 -62
- package/dist/types/theme/components/stories/List.stories.d.ts.map +0 -1
package/dist/theme/index.js
CHANGED
|
@@ -2,10 +2,10 @@ var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
|
2
2
|
import { alpha, Tooltip, responsiveFontSizes, createTheme } from "@mui/material";
|
|
3
3
|
import { c as commonPalette } from "../palette-utils-BHqJlHm9.js";
|
|
4
4
|
import { g } from "../palette-utils-BHqJlHm9.js";
|
|
5
|
-
import { g as getPixelToRem, M as MenuItem } from "../MenuItem-
|
|
5
|
+
import { g as getPixelToRem, M as MenuItem } from "../MenuItem-zaH11xyj.js";
|
|
6
6
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
7
|
-
import { T as Typography, a as TablePaginationActions, I as ICON_SIZE_LARGE, b as ICON_SIZE_MEDIUM, c as ICON_SIZE_SMALL, g as getSpacing, e as ellipsisStyles, M as MENU_ITEM_SIZE_DEFAULT, d as MENU_LIST_MAX_SIZE, f as MENU_ITEM_SIZE_DENSE, A as APPBAR_SIZE, B as BREAKPOINTS, S as SPACING } from "../css-utils-
|
|
8
|
-
import {
|
|
7
|
+
import { T as Typography, a as TablePaginationActions, I as ICON_SIZE_LARGE, b as ICON_SIZE_MEDIUM, c as ICON_SIZE_SMALL, g as getSpacing, e as ellipsisStyles, M as MENU_ITEM_SIZE_DEFAULT, d as MENU_LIST_MAX_SIZE, f as MENU_ITEM_SIZE_DENSE, L as LIST_ITEM_SIZE_DENSE, h as LIST_ITEM_SIZE_DEFAULT, A as APPBAR_SIZE, B as BREAKPOINTS, S as SPACING } from "../css-utils-BzztxQJk.js";
|
|
8
|
+
import { i, N } from "../css-utils-BzztxQJk.js";
|
|
9
9
|
import { Cancel, EventOutlined, ChevronRightOutlined, ChevronLeftOutlined, ExpandMoreOutlined, CheckCircleOutlined, InfoOutlined } from "@mui/icons-material";
|
|
10
10
|
import { A as ArrowDown } from "../ArrowDown-d6bxUL0F.js";
|
|
11
11
|
import { renderDigitalClockTimeView } from "@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:
|
|
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: ({
|
|
700
|
-
|
|
722
|
+
img: ({ ownerState }) => ({
|
|
723
|
+
...ownerState.disabled && {
|
|
724
|
+
opacity: 0.6
|
|
725
|
+
}
|
|
701
726
|
}),
|
|
702
727
|
circular: () => ({
|
|
703
728
|
borderRadius: avatarCircularRadius,
|
|
@@ -2320,6 +2345,72 @@ const formsOverrides = {
|
|
|
2320
2345
|
}
|
|
2321
2346
|
}
|
|
2322
2347
|
};
|
|
2348
|
+
const getListItemAdornmentStyles = (theme2) => ({
|
|
2349
|
+
display: "flex",
|
|
2350
|
+
alignItems: "center",
|
|
2351
|
+
justifyContent: "center",
|
|
2352
|
+
gap: theme2.spacing(1.5),
|
|
2353
|
+
minHeight: MENU_ITEM_SIZE_DEFAULT,
|
|
2354
|
+
minWidth: MENU_ITEM_SIZE_DEFAULT
|
|
2355
|
+
});
|
|
2356
|
+
const getListItemStyles = (ownerState, theme2) => ({
|
|
2357
|
+
gap: theme2.spacing(1.5),
|
|
2358
|
+
minHeight: 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: ICON_SIZE_LARGE,
|
|
2366
|
+
width: ICON_SIZE_LARGE,
|
|
2367
|
+
minWidth: ICON_SIZE_LARGE,
|
|
2368
|
+
height: 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 ? LIST_ITEM_SIZE_DENSE : 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
|
+
});
|
|
2323
2414
|
const navigationOverrides = {
|
|
2324
2415
|
// Menu
|
|
2325
2416
|
MuiMenu: {
|
|
@@ -2439,9 +2530,15 @@ const navigationOverrides = {
|
|
|
2439
2530
|
},
|
|
2440
2531
|
// List
|
|
2441
2532
|
MuiList: {
|
|
2533
|
+
defaultProps: {
|
|
2534
|
+
variant: "standard"
|
|
2535
|
+
},
|
|
2442
2536
|
styleOverrides: {
|
|
2443
|
-
root: ({ theme: theme2 }) => ({
|
|
2444
|
-
|
|
2537
|
+
root: ({ theme: theme2, ownerState }) => ({
|
|
2538
|
+
display: "flex",
|
|
2539
|
+
flexDirection: "column",
|
|
2540
|
+
gap: theme2.spacing(ownerState.spacing ?? 0),
|
|
2541
|
+
padding: 0,
|
|
2445
2542
|
".MuiPopover-root &, .MuiPopper-root &, .base-Popper-root &": {
|
|
2446
2543
|
minWidth: theme2.spacing(8),
|
|
2447
2544
|
// 64px, defined by design
|
|
@@ -2456,13 +2553,30 @@ const navigationOverrides = {
|
|
|
2456
2553
|
".MuiDivider-root": {
|
|
2457
2554
|
margin: theme2.spacing(1, 0)
|
|
2458
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.
|
|
2459
2578
|
// Indent sublevels, ugly but needed to avoid issues with hover
|
|
2460
2579
|
"& .MuiList-root": {
|
|
2461
|
-
paddingTop: 0,
|
|
2462
|
-
paddingBottom: 0,
|
|
2463
|
-
"& .MuiListItem-root": {
|
|
2464
|
-
paddingLeft: theme2.spacing(4)
|
|
2465
|
-
},
|
|
2466
2580
|
"& .MuiList-root": {
|
|
2467
2581
|
"& .MuiListItem-root": {
|
|
2468
2582
|
paddingLeft: theme2.spacing(6)
|
|
@@ -2488,32 +2602,105 @@ const navigationOverrides = {
|
|
|
2488
2602
|
}
|
|
2489
2603
|
},
|
|
2490
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
|
+
},
|
|
2491
2670
|
MuiListItemText: {
|
|
2492
2671
|
defaultProps: {
|
|
2493
2672
|
primaryTypographyProps: {
|
|
2494
|
-
variant: "
|
|
2673
|
+
variant: "button",
|
|
2495
2674
|
noWrap: true,
|
|
2496
2675
|
component: "span"
|
|
2497
2676
|
},
|
|
2498
|
-
secondaryTypographyProps: {
|
|
2677
|
+
secondaryTypographyProps: {
|
|
2678
|
+
variant: "caption",
|
|
2679
|
+
color: "text.secondary"
|
|
2680
|
+
}
|
|
2499
2681
|
},
|
|
2500
2682
|
styleOverrides: {
|
|
2501
|
-
root: (
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2683
|
+
root: () => ({
|
|
2684
|
+
display: "flex",
|
|
2685
|
+
flexDirection: "column",
|
|
2686
|
+
justifyContent: "center",
|
|
2687
|
+
flex: 1,
|
|
2688
|
+
minHeight: MENU_ITEM_SIZE_DEFAULT,
|
|
2689
|
+
margin: 0
|
|
2506
2690
|
})
|
|
2507
2691
|
}
|
|
2508
2692
|
},
|
|
2509
2693
|
MuiListItemIcon: {
|
|
2510
2694
|
styleOverrides: {
|
|
2511
2695
|
root: ({ theme: theme2 }) => ({
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
fontSize: 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: ICON_SIZE_LARGE,
|
|
2701
|
+
width: ICON_SIZE_LARGE,
|
|
2702
|
+
minWidth: ICON_SIZE_LARGE,
|
|
2703
|
+
height: ICON_SIZE_LARGE
|
|
2517
2704
|
},
|
|
2518
2705
|
".MuiMenuItem-root.MuiButtonBase-root &": {
|
|
2519
2706
|
minWidth: ICON_SIZE_MEDIUM
|
|
@@ -2524,9 +2711,10 @@ const navigationOverrides = {
|
|
|
2524
2711
|
MuiListItemAvatar: {
|
|
2525
2712
|
styleOverrides: {
|
|
2526
2713
|
root: ({ theme: theme2 }) => ({
|
|
2714
|
+
...getListItemAdornmentStyles(theme2),
|
|
2527
2715
|
"& .MuiAvatar-root": {
|
|
2528
|
-
height:
|
|
2529
|
-
width:
|
|
2716
|
+
height: MENU_ITEM_SIZE_DEFAULT,
|
|
2717
|
+
width: MENU_ITEM_SIZE_DEFAULT
|
|
2530
2718
|
},
|
|
2531
2719
|
"& .MuiSvgIcon-root": {
|
|
2532
2720
|
fontSize: ICON_SIZE_MEDIUM
|
|
@@ -2534,6 +2722,41 @@ const navigationOverrides = {
|
|
|
2534
2722
|
})
|
|
2535
2723
|
}
|
|
2536
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
|
+
},
|
|
2537
2760
|
// Tabs
|
|
2538
2761
|
MuiTabs: {
|
|
2539
2762
|
styleOverrides: {
|
|
@@ -3263,9 +3486,11 @@ export {
|
|
|
3263
3486
|
ICON_SIZE_LARGE,
|
|
3264
3487
|
ICON_SIZE_MEDIUM,
|
|
3265
3488
|
ICON_SIZE_SMALL,
|
|
3489
|
+
LIST_ITEM_SIZE_DEFAULT,
|
|
3490
|
+
LIST_ITEM_SIZE_DENSE,
|
|
3266
3491
|
MENU_ITEM_SIZE_DEFAULT,
|
|
3267
3492
|
MENU_ITEM_SIZE_DENSE,
|
|
3268
|
-
|
|
3493
|
+
i as MENU_ITEM_SIZE_EXTENDED,
|
|
3269
3494
|
MENU_LIST_MAX_SIZE,
|
|
3270
3495
|
N as NOTIFICATION_DURATION_IN_MS,
|
|
3271
3496
|
SPACING,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Avatar/Avatar.stories.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCG,CAAA;AAChB,eAAe,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Avatar/Avatar.stories.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCG,CAAA;AAChB,eAAe,OAAO,CAAA;AA8WtB,eAAO,MAAM,UAAU;;;;;;;;;CAKtB,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;CAKjB,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;CAGjB,CAAA;AAED,eAAO,MAAM,OAAO;;;;CAEnB,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;CAGtB,CAAA;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;CAGvB,CAAA;AAED,eAAO,MAAM,eAAe;;;;CAE3B,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ListProps as MUIListProps } from '@mui/material';
|
|
2
|
+
export interface ListProps extends MUIListProps {
|
|
3
|
+
/**
|
|
4
|
+
* The variant of the list.
|
|
5
|
+
* - 'standard': Default variant without border
|
|
6
|
+
* - 'outlined-list': List container has border
|
|
7
|
+
* - 'outlined-items': List items have border
|
|
8
|
+
*/
|
|
9
|
+
variant?: 'standard' | 'outlined-list' | 'outlined-items';
|
|
10
|
+
/**
|
|
11
|
+
* Spacing between list items (uses theme.spacing).
|
|
12
|
+
* Default: 0 for standard/outlined, 1 (8px) for outlined items
|
|
13
|
+
*/
|
|
14
|
+
spacing?: number;
|
|
15
|
+
}
|
|
16
|
+
declare const List: import('react').ForwardRefExoticComponent<Omit<ListProps, "ref"> & import('react').RefAttributes<HTMLUListElement>>;
|
|
17
|
+
export default List;
|
|
18
|
+
//# sourceMappingURL=List.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../src/components/List/List.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmB,SAAS,IAAI,YAAY,EAAE,MAAM,eAAe,CAAA;AAE1E,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C;;;;;OAKG;IACH,OAAO,CAAC,EAAE,UAAU,GAAG,eAAe,GAAG,gBAAgB,CAAA;IACzD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAuBD,QAAA,MAAM,IAAI,qHAAoB,CAAA;AAC9B,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ListProps } from './List';
|
|
3
|
+
interface StoryProps {
|
|
4
|
+
variant?: ListProps['variant'];
|
|
5
|
+
spacing?: number;
|
|
6
|
+
}
|
|
7
|
+
declare const options: {
|
|
8
|
+
title: string;
|
|
9
|
+
component: React.ForwardRefExoticComponent<Omit<ListProps, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
10
|
+
argTypes: {
|
|
11
|
+
variant: {
|
|
12
|
+
table: {
|
|
13
|
+
defaultValue: {
|
|
14
|
+
summary: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
control: "select";
|
|
18
|
+
options: string[];
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
spacing: {
|
|
22
|
+
control: {
|
|
23
|
+
type: "number";
|
|
24
|
+
min: number;
|
|
25
|
+
max: number;
|
|
26
|
+
step: number;
|
|
27
|
+
};
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
args: {
|
|
32
|
+
variant: string;
|
|
33
|
+
spacing: undefined;
|
|
34
|
+
};
|
|
35
|
+
parameters: {
|
|
36
|
+
design: {
|
|
37
|
+
type: string;
|
|
38
|
+
url: string;
|
|
39
|
+
};
|
|
40
|
+
status: {
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export default options;
|
|
46
|
+
export declare const Playground: {
|
|
47
|
+
render: ({ variant, spacing }: StoryProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
parameters: {
|
|
49
|
+
chromatic: {
|
|
50
|
+
disableSnapshot: boolean;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export declare const Size: {
|
|
55
|
+
render: (props: StoryProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
};
|
|
57
|
+
export declare const Variant: {
|
|
58
|
+
render: (props: StoryProps) => import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
};
|
|
60
|
+
export declare const Spacing: {
|
|
61
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
parameters: {
|
|
63
|
+
controls: {
|
|
64
|
+
disable: boolean;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
export declare const Subheaders: {
|
|
69
|
+
render: (props: StoryProps) => import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
};
|
|
71
|
+
export declare const FixedHeight: {
|
|
72
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
};
|
|
74
|
+
export declare const Divider: {
|
|
75
|
+
render: (props: StoryProps) => import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
};
|
|
77
|
+
export declare const Gutters: {
|
|
78
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=List.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/List/List.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAa,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAGxC,UAAU,UAAU;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCG,CAAA;AAChB,eAAe,OAAO,CAAA;AA4lBtB,eAAO,MAAM,UAAU;mCA1lB2B,UAAU;;;;;;CA+lB3D,CAAA;AAED,eAAO,MAAM,IAAI;oBAtlBY,UAAU;CAwlBtC,CAAA;AAED,eAAO,MAAM,OAAO;oBAvhBa,UAAU;CAyhB1C,CAAA;AAED,eAAO,MAAM,OAAO;;;;;;;CAKnB,CAAA;AAED,eAAO,MAAM,UAAU;oBArdY,UAAU;CAud5C,CAAA;AAED,eAAO,MAAM,WAAW;;CAEvB,CAAA;AAED,eAAO,MAAM,OAAO;oBAzKY,UAAU;CA2KzC,CAAA;AACD,eAAO,MAAM,OAAO;;CAEnB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.test.d.ts","sourceRoot":"","sources":["../../../../src/components/List/List.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ListSubheaderProps as MUIListSubheaderProps } from '@mui/material';
|
|
2
|
+
export interface ListSubheaderProps extends MUIListSubheaderProps {
|
|
3
|
+
/**
|
|
4
|
+
* The background color of the list subheader.
|
|
5
|
+
* - 'paper': Paper background
|
|
6
|
+
* - 'default': Default background
|
|
7
|
+
* - 'inherit': Inherit background from parent
|
|
8
|
+
* @default 'default'
|
|
9
|
+
*/
|
|
10
|
+
backgroundColor?: 'paper' | 'default' | 'inherit';
|
|
11
|
+
}
|
|
12
|
+
declare const ListSubheader: import('react').ForwardRefExoticComponent<Omit<ListSubheaderProps, "ref"> & import('react').RefAttributes<HTMLLIElement>>;
|
|
13
|
+
export default ListSubheader;
|
|
14
|
+
//# sourceMappingURL=ListSubheader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListSubheader.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/ListSubheader/ListSubheader.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,kBAAkB,IAAI,qBAAqB,EAC5C,MAAM,eAAe,CAAA;AAEtB,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAC/D;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;CAClD;AAkBD,QAAA,MAAM,aAAa,2HAA6B,CAAA;AAChD,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListSubheader.test.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/ListSubheader/ListSubheader.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/List/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACxC,mBAAmB,QAAQ,CAAA;AAE3B,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,+BAA+B,CAAA;AACxE,mBAAmB,+BAA+B,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { MouseEventHandler } from 'react';
|
|
2
|
+
import { ListItemProps as MUIListItemProps, ListItemButtonProps as MUIListItemButtonProps } from '@mui/material';
|
|
3
|
+
export interface ListItemProps extends Omit<MUIListItemProps, 'disabled' | 'onClick'>, Omit<MUIListItemButtonProps, 'disabled' | keyof MUIListItemProps> {
|
|
4
|
+
/**
|
|
5
|
+
* The variant of the list item.
|
|
6
|
+
* - 'standard': Default variant without border
|
|
7
|
+
* - 'outlined': Variant with border
|
|
8
|
+
*/
|
|
9
|
+
variant?: 'standard' | 'outlined';
|
|
10
|
+
/**
|
|
11
|
+
* If true, the list item has a fixed height.
|
|
12
|
+
* - dense true: 52px
|
|
13
|
+
* - dense false: 68px
|
|
14
|
+
* If false, adapts to content.
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
fixedHeight?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* If true, the list item is disabled.
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Click handler. When provided, the component renders as a ListItemButton.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Click handler. When provided, the component renders as a ListItemButton instead of ListItem.
|
|
28
|
+
*/
|
|
29
|
+
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
30
|
+
}
|
|
31
|
+
declare const ListItem: import('react').ForwardRefExoticComponent<Omit<ListItemProps, "ref"> & import('react').RefAttributes<HTMLDivElement | HTMLLIElement>>;
|
|
32
|
+
export default ListItem;
|
|
33
|
+
//# sourceMappingURL=ListItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,iBAAiB,EAAE,MAAM,OAAO,CAAA;AACnE,OAAO,EAEL,aAAa,IAAI,gBAAgB,EAEjC,mBAAmB,IAAI,sBAAsB,EAC9C,MAAM,eAAe,CAAA;AAEtB,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,SAAS,CAAC,EACpD,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,MAAM,gBAAgB,CAAC;IACnE;;;;OAIG;IACH,OAAO,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;IACjC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAA;CAC5C;AA2CD,QAAA,MAAM,QAAQ,uIAAwB,CAAA;AACtC,eAAe,QAAQ,CAAA"}
|