@selfcommunity/react-theme-default 1.2.2-alpha.1 → 1.2.3-alpha.0

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.
@@ -43,6 +43,7 @@ declare const Component: {
43
43
  backgroundColor: any;
44
44
  '&:hover': {
45
45
  backgroundColor: any;
46
+ border: string;
46
47
  boxShadow: any;
47
48
  };
48
49
  border: string;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const material_1 = require("@mui/material");
3
4
  const Component = {
4
5
  styleOverrides: {
5
6
  root: ({ theme }) => ({
@@ -46,7 +47,8 @@ const Component = {
46
47
  }),
47
48
  backgroundColor: selected ? theme.palette.grey[100] : theme.palette.background.paper,
48
49
  '&:hover': {
49
- backgroundColor: theme.palette.grey[50],
50
+ backgroundColor: (0, material_1.getContrastRatio)(theme.palette.background.paper, theme.palette.common.white) > 4.5 ? undefined : theme.palette.grey[50],
51
+ border: (0, material_1.getContrastRatio)(theme.palette.background.paper, theme.palette.common.white) > 4.5 ? `2px solid ${theme.palette.primary.main}` : undefined,
50
52
  boxShadow: theme.shadows[2]
51
53
  },
52
54
  border: `1px solid ${theme.palette.divider}`,
@@ -11747,6 +11747,7 @@ declare const theme: {
11747
11747
  backgroundColor: any;
11748
11748
  '&:hover': {
11749
11749
  backgroundColor: any;
11750
+ border: string;
11750
11751
  boxShadow: any;
11751
11752
  };
11752
11753
  border: string;
@@ -43,6 +43,7 @@ declare const Component: {
43
43
  backgroundColor: any;
44
44
  '&:hover': {
45
45
  backgroundColor: any;
46
+ border: string;
46
47
  boxShadow: any;
47
48
  };
48
49
  border: string;
@@ -1,3 +1,4 @@
1
+ import { getContrastRatio } from '@mui/material';
1
2
  const Component = {
2
3
  styleOverrides: {
3
4
  root: ({ theme }) => ({
@@ -44,7 +45,8 @@ const Component = {
44
45
  }),
45
46
  backgroundColor: selected ? theme.palette.grey[100] : theme.palette.background.paper,
46
47
  '&:hover': {
47
- backgroundColor: theme.palette.grey[50],
48
+ backgroundColor: getContrastRatio(theme.palette.background.paper, theme.palette.common.white) > 4.5 ? undefined : theme.palette.grey[50],
49
+ border: getContrastRatio(theme.palette.background.paper, theme.palette.common.white) > 4.5 ? `2px solid ${theme.palette.primary.main}` : undefined,
48
50
  boxShadow: theme.shadows[2]
49
51
  },
50
52
  border: `1px solid ${theme.palette.divider}`,
@@ -11747,6 +11747,7 @@ declare const theme: {
11747
11747
  backgroundColor: any;
11748
11748
  '&:hover': {
11749
11749
  backgroundColor: any;
11750
+ border: string;
11750
11751
  boxShadow: any;
11751
11752
  };
11752
11753
  border: string;