@webpros/mui-theme 0.3.4 → 0.3.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.
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@webpros/mui-theme",
3
3
  "description": "MUI v7 theme for WebPros products",
4
- "version": "0.3.4",
4
+ "version": "0.3.5",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,4 +1,5 @@
1
1
  import { Theme } from '@mui/material';
2
+ import type { StateLayersKey } from './tokens/colors/stateLayers';
2
3
  export declare const underlineTypographySxProps: (theme: Theme, open?: boolean, color?: string | null) => {
3
4
  textDecoration?: string | undefined;
4
5
  textUnderlineOffset?: string | undefined;
@@ -32,3 +33,6 @@ export declare const underlineBorderSxProps: (theme: Theme, open?: boolean, colo
32
33
  width: string;
33
34
  };
34
35
  };
36
+ export type ContainerSeverity = 'regular' | 'error' | 'warning';
37
+ export declare const getContainerBackgroundStateLayer: (severity: ContainerSeverity) => StateLayersKey | null;
38
+ export declare const getContainerHoverStateLayer: (severity: ContainerSeverity) => StateLayersKey;
@@ -31,3 +31,17 @@ color = theme.colors.schemes.surfaces.onSurface) => (Object.assign({ cursor: 'po
31
31
  width: '100%',
32
32
  },
33
33
  })));
34
+ export const getContainerBackgroundStateLayer = (severity) => {
35
+ if (severity === 'error')
36
+ return 'stateLayers.status.errorContainer.opacity16';
37
+ if (severity === 'warning')
38
+ return 'stateLayers.status.warningContainer.opacity16';
39
+ return null;
40
+ };
41
+ export const getContainerHoverStateLayer = (severity) => {
42
+ if (severity === 'error')
43
+ return 'stateLayers.status.onErrorContainer.opacity16';
44
+ if (severity === 'warning')
45
+ return 'stateLayers.status.onWarningContainer.opacity16';
46
+ return 'stateLayers.surfaces.onSurface.opacity08';
47
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@webpros/mui-theme",
3
3
  "description": "MUI v7 theme for WebPros products",
4
- "version": "0.3.4",
4
+ "version": "0.3.5",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",