@webpros/mui-theme 0.3.8 → 0.3.9
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/package.json
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
import { Theme,
|
|
1
|
+
import { Theme, ComponentsOverrides, ComponentsVariants } from '@mui/material';
|
|
2
2
|
interface M3Table {
|
|
3
|
-
MuiTable: {
|
|
4
|
-
defaultProps?: ComponentsProps['MuiTable'];
|
|
5
|
-
styleOverrides?: ComponentsOverrides<Theme>['MuiTable'];
|
|
6
|
-
variants?: ComponentsVariants['MuiTable'];
|
|
7
|
-
};
|
|
8
3
|
MuiTableCell: {
|
|
9
|
-
defaultProps?: ComponentsProps['MuiTableCell'];
|
|
10
4
|
styleOverrides?: ComponentsOverrides<Theme>['MuiTableCell'];
|
|
11
5
|
variants?: ComponentsVariants['MuiTableCell'];
|
|
12
6
|
};
|
|
13
7
|
MuiTableRow: {
|
|
14
|
-
defaultProps?: ComponentsProps['MuiTableRow'];
|
|
15
8
|
styleOverrides?: ComponentsOverrides<Theme>['MuiTableRow'];
|
|
16
|
-
variants?: ComponentsVariants['MuiTableRow'];
|
|
17
9
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
styleOverrides?: ComponentsOverrides<Theme>['MuiTableHead'];
|
|
21
|
-
variants?: ComponentsVariants['MuiTableHead'];
|
|
10
|
+
MuiTableSortLabel: {
|
|
11
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiTableSortLabel'];
|
|
22
12
|
};
|
|
23
13
|
}
|
|
24
14
|
export declare const getTable: (theme: Theme) => M3Table;
|
|
@@ -1,38 +1,59 @@
|
|
|
1
1
|
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
2
|
-
import { tableRowClasses, } from '@mui/material';
|
|
2
|
+
import { tableRowClasses, tableSortLabelClasses, } from '@mui/material';
|
|
3
3
|
export const getTable = (theme) => {
|
|
4
|
-
const { colors } = theme;
|
|
4
|
+
const { colors, typography } = theme;
|
|
5
5
|
return {
|
|
6
|
-
|
|
6
|
+
MuiTableCell: {
|
|
7
7
|
styleOverrides: {
|
|
8
|
-
root: {
|
|
9
|
-
|
|
8
|
+
root: Object.assign(Object.assign({}, typography.BodyMedium), { padding: '11px 8px 11px 12px', borderColor: colors.schemes.surfaces.outlineVariant }),
|
|
9
|
+
},
|
|
10
|
+
variants: [
|
|
11
|
+
{
|
|
12
|
+
props: { variant: 'head' },
|
|
13
|
+
style: Object.assign(Object.assign({}, typography.BodySmall), { paddingTop: 15, paddingBottom: 15, color: colors.schemes.surfaces.onSurfaceVariant }),
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
props: { variant: 'body' },
|
|
17
|
+
style: {
|
|
10
18
|
color: colors.schemes.surfaces.onSurface,
|
|
11
|
-
fontWeight: 400,
|
|
12
19
|
},
|
|
13
20
|
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
{
|
|
22
|
+
props: {
|
|
23
|
+
padding: 'checkbox',
|
|
24
|
+
},
|
|
25
|
+
style: {
|
|
26
|
+
width: 38, // TODO: align with checbox width
|
|
27
|
+
padding: 0,
|
|
28
|
+
},
|
|
20
29
|
},
|
|
21
|
-
|
|
30
|
+
],
|
|
22
31
|
},
|
|
23
32
|
MuiTableRow: {
|
|
24
33
|
styleOverrides: {
|
|
25
34
|
root: {
|
|
35
|
+
[`&.${tableRowClasses.hover}:hover`]: {
|
|
36
|
+
backgroundColor: colors.stateLayers.surfaces.onSurface.opacity08,
|
|
37
|
+
},
|
|
26
38
|
[`&.${tableRowClasses.selected}`]: {
|
|
27
|
-
backgroundColor: colors.
|
|
39
|
+
backgroundColor: colors.stateLayers.base.primary.opacity08,
|
|
40
|
+
'&:hover': {
|
|
41
|
+
backgroundColor: colors.stateLayers.base.primary.opacity12,
|
|
42
|
+
},
|
|
28
43
|
},
|
|
29
44
|
},
|
|
30
45
|
},
|
|
31
46
|
},
|
|
32
|
-
|
|
47
|
+
MuiTableSortLabel: {
|
|
33
48
|
styleOverrides: {
|
|
34
49
|
root: {
|
|
35
|
-
|
|
50
|
+
[`&.${tableSortLabelClasses.active}`]: {
|
|
51
|
+
color: colors.schemes.surfaces.onSurfaceVariant,
|
|
52
|
+
[`& .${tableSortLabelClasses.icon}`]: {
|
|
53
|
+
opacity: 1,
|
|
54
|
+
color: colors.schemes.surfaces.onSurfaceVariant,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
36
57
|
},
|
|
37
58
|
},
|
|
38
59
|
},
|