@webpros/mui-theme 0.4.9 → 0.4.12
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 +1 -10
- package/dist/src/components/feedback/Alert/Alert.theme.js +6 -25
- package/dist/src/components/feedback/AlertTitle/AlertTitle.d.ts +4 -0
- package/dist/src/components/feedback/AlertTitle/AlertTitle.js +4 -0
- package/dist/src/components/feedback/AlertTitle/AlertTitle.theme.d.ts +9 -0
- package/dist/src/components/feedback/AlertTitle/AlertTitle.theme.js +12 -0
- package/dist/src/components/feedback/AlertTitle/index.d.ts +1 -0
- package/dist/src/components/feedback/AlertTitle/index.js +2 -0
- package/dist/src/components/feedback/Snackbar/Snackbar.theme.d.ts +1 -1
- package/dist/src/components/feedback/Snackbar/Snackbar.theme.js +2 -15
- package/dist/src/components/feedback/Snackbar/SnackbarErrorIcon.d.ts +1 -0
- package/dist/src/components/feedback/Snackbar/SnackbarErrorIcon.js +7 -0
- package/dist/src/components/feedback/Snackbar/SnackbarSuccessIcon.d.ts +1 -0
- package/dist/src/components/feedback/Snackbar/SnackbarSuccessIcon.js +7 -0
- package/dist/src/components/feedback/Snackbar/SnackbarWarningIcon.d.ts +1 -0
- package/dist/src/components/feedback/Snackbar/SnackbarWarningIcon.js +7 -0
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/components/index.js +3 -1
- package/dist/src/components/inputs/FilledInput/FilledInput.theme.d.ts +8 -0
- package/dist/src/components/inputs/FilledInput/FilledInput.theme.js +118 -0
- package/dist/src/components/inputs/FilledInput/index.d.ts +1 -0
- package/dist/src/components/inputs/FilledInput/index.js +2 -0
- package/dist/src/components/inputs/InputLabel/InputLabel.theme.js +38 -1
- package/dist/src/components/inputs/TimePicker/TimePicker.theme.d.ts +1 -2
- package/dist/src/components/inputs/TimePicker/TimePicker.theme.js +0 -1
- package/dist/src/utils/getMUIComponents.js +2 -2
- package/dist/src/utils/getMUIPalette.js +4 -0
- package/package.json +2 -11
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.4.
|
|
4
|
+
"version": "0.4.12",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -32,11 +32,6 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"private": false,
|
|
35
|
-
"engines": {
|
|
36
|
-
"node": "^22.x",
|
|
37
|
-
"npm": "please-use-yarn",
|
|
38
|
-
"yarn": "^1.22.0"
|
|
39
|
-
},
|
|
40
35
|
"scripts": {
|
|
41
36
|
"build": "yarn build:main && yarn build:eslint",
|
|
42
37
|
"build:main": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
@@ -60,8 +55,6 @@
|
|
|
60
55
|
"@material/material-color-utilities": "^0.3.0",
|
|
61
56
|
"@mui/material": "^7.3.6",
|
|
62
57
|
"@mui/utils": "^7.3.6",
|
|
63
|
-
"@mui/x-data-grid": "^7.29.0",
|
|
64
|
-
"@mui/x-date-pickers": "^7.29.0",
|
|
65
58
|
"@phosphor-icons/react": "^2.1.0",
|
|
66
59
|
"usehooks-ts": "^3.1.1"
|
|
67
60
|
},
|
|
@@ -77,8 +70,6 @@
|
|
|
77
70
|
"@material/material-color-utilities": "^0.3.0",
|
|
78
71
|
"@mui/material": "^7.3.6",
|
|
79
72
|
"@mui/utils": "^7.3.6",
|
|
80
|
-
"@mui/x-data-grid": "^7.29.0",
|
|
81
|
-
"@mui/x-date-pickers": "^7.29.0",
|
|
82
73
|
"@phosphor-icons/react": "^2.1.0",
|
|
83
74
|
"@storybook/addon-a11y": "^9.1.16",
|
|
84
75
|
"@storybook/addon-docs": "^9.1.16",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { iconMapping } from './alertDefaultIcons';
|
|
2
2
|
export const getAlert = (theme) => {
|
|
3
|
-
const { colors } = theme;
|
|
3
|
+
const { colors, typography } = theme;
|
|
4
4
|
return {
|
|
5
5
|
MuiAlert: {
|
|
6
6
|
defaultProps: {
|
|
@@ -9,32 +9,13 @@ export const getAlert = (theme) => {
|
|
|
9
9
|
styleOverrides: {
|
|
10
10
|
root: {
|
|
11
11
|
borderRadius: '6px',
|
|
12
|
-
|
|
13
|
-
boxShadow: 'none',
|
|
14
|
-
'.MuiAlert-action': {
|
|
15
|
-
marginTop: '-8px',
|
|
16
|
-
paddingTop: '6px',
|
|
17
|
-
paddingRight: '8px',
|
|
18
|
-
paddingLeft: '0px',
|
|
19
|
-
},
|
|
20
|
-
'.MuiAlert-message': {
|
|
21
|
-
paddingLeft: '6px',
|
|
22
|
-
paddingRight: '6px',
|
|
23
|
-
paddingTop: '7px',
|
|
24
|
-
paddingBottom: '7px',
|
|
25
|
-
},
|
|
26
|
-
'.MuiAlertTitle-root ': {
|
|
27
|
-
marginTop: '0px',
|
|
28
|
-
marginBottom: '0px',
|
|
29
|
-
},
|
|
30
|
-
'.MuiAlert-icon': {
|
|
31
|
-
paddingLeft: '4px',
|
|
32
|
-
paddingRight: '4px',
|
|
33
|
-
paddingTop: '7px',
|
|
34
|
-
marginRight: '0px',
|
|
35
|
-
},
|
|
12
|
+
boxShadow: 'none', // Our customized paper has default box shadow, so we need to reset it
|
|
36
13
|
},
|
|
14
|
+
message: Object.assign(Object.assign({}, typography.BodySmall), { paddingTop: '10px', paddingBottom: '10px' }),
|
|
15
|
+
action: { paddingTop: '0.5px' },
|
|
37
16
|
},
|
|
17
|
+
// TODO: Refactor this, as some of these styles have no effect on the UI
|
|
18
|
+
// and do not align with MUI Alert styling.
|
|
38
19
|
variants: [
|
|
39
20
|
{
|
|
40
21
|
props: { variant: 'standard', color: 'error' },
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Theme, ComponentsOverrides } from '@mui/material';
|
|
2
|
+
interface M3AAlertTitle {
|
|
3
|
+
MuiAlertTitle: {
|
|
4
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiAlertTitle'];
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export declare const getAlertTitle: (_theme: Theme) => M3AAlertTitle;
|
|
8
|
+
declare const _default: {};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AlertTitle.theme';
|
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
2
|
-
export const getSnackbar = (
|
|
3
|
-
const { colors } = theme;
|
|
2
|
+
export const getSnackbar = (_theme) => {
|
|
4
3
|
return {
|
|
5
4
|
MuiSnackbar: {
|
|
6
|
-
styleOverrides: {
|
|
7
|
-
root: {
|
|
8
|
-
borderRadius: '10px',
|
|
9
|
-
'& .MuiSnackbarContent-root': {
|
|
10
|
-
backgroundColor: colors.inverseSchemes.surfaces.elevatedContainerLowest,
|
|
11
|
-
alignItems: 'baseline',
|
|
12
|
-
paddingTop: 0,
|
|
13
|
-
},
|
|
14
|
-
'& .MuiSnackbarContent-action': {
|
|
15
|
-
marginRight: 0,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
5
|
+
styleOverrides: {},
|
|
19
6
|
},
|
|
20
7
|
};
|
|
21
8
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SnackbarErrorIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
3
|
+
import { useTheme } from '@mui/material';
|
|
4
|
+
export const SnackbarErrorIcon = () => {
|
|
5
|
+
const { colors } = useTheme();
|
|
6
|
+
return (_jsxs("svg", { viewBox: "0 -1 20 18", width: "18px", height: "18px", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M17.7071 4.97915C17.8946 5.16668 18 5.42104 18 5.68625V12.3137C18 12.579 17.8946 12.8333 17.7071 13.0209L13.0209 17.7071C12.8333 17.8946 12.579 18 12.3137 18H5.68625C5.42104 18 5.16668 17.8946 4.97915 17.7071L0.292893 13.0209C0.105357 12.8333 0 12.579 0 12.3137V5.68625C0 5.42104 0.105357 5.16668 0.292893 4.97915L4.97915 0.292893C5.16668 0.105357 5.42104 0 5.68625 0H12.3137C12.579 0 12.8333 0.105357 13.0209 0.292893L17.7071 4.97915Z", fill: colors.inverseSchemes.status.error }), _jsx("path", { d: "M 5.5,5.5 L 12.5,12.5 M 12.5,5.5 L 5.5,12.5", stroke: colors.inverseSchemes.status.onError, strokeWidth: "1.25", strokeLinecap: "round" })] }));
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SnackbarSuccessIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
3
|
+
import { useTheme } from '@mui/material';
|
|
4
|
+
export const SnackbarSuccessIcon = () => {
|
|
5
|
+
const { colors } = useTheme();
|
|
6
|
+
return (_jsxs("svg", { viewBox: "0 0 20 20", width: "19px", height: "19px", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("circle", { cx: "10", cy: "10", r: "9.5", fill: colors.inverseSchemes.status.success }), _jsx("path", { d: "M14.2 7.1C14.27 7.17 14.325 7.255 14.36 7.35C14.395 7.445 14.415 7.545 14.415 7.645C14.415 7.745 14.395 7.845 14.36 7.94C14.325 8.035 14.27 8.12 14.2 8.19L8.95 13.44C8.88 13.51 8.795 13.565 8.7 13.6C8.605 13.635 8.505 13.655 8.405 13.655C8.305 13.655 8.205 13.635 8.11 13.6C8.015 13.565 7.93 13.51 7.86 13.44L5.36 10.94C5.22 10.8 5.145 10.61 5.145 10.415C5.145 10.22 5.22 10.03 5.36 9.89C5.5 9.75 5.69 9.675 5.885 9.675C6.08 9.675 6.27 9.75 6.41 9.89L8.405 11.885L13.15 7.1C13.22 7.03 13.305 6.975 13.4 6.94C13.495 6.905 13.595 6.885 13.695 6.885C13.795 6.885 13.895 6.905 13.99 6.94C14.085 6.975 14.17 7.03 14.2 7.1Z", fill: colors.inverseSchemes.status.onSuccess })] }));
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SnackbarWarningIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
3
|
+
import { useTheme } from '@mui/material';
|
|
4
|
+
export const SnackbarWarningIcon = () => {
|
|
5
|
+
const { colors } = useTheme();
|
|
6
|
+
return (_jsxs("svg", { viewBox: "0 0 21 21", width: "20px", height: "20px", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M0.585843 11.8218C-0.195205 11.0408 -0.195204 9.77443 0.585844 8.99338L8.99345 0.585771C9.7745 -0.195278 11.0408 -0.195277 11.8219 0.585772L20.2295 8.99338C21.0105 9.77443 21.0105 11.0408 20.2295 11.8218L11.8219 20.2294C11.0408 21.0105 9.7745 21.0105 8.99345 20.2294L0.585843 11.8218Z", fill: colors.inverseSchemes.status.warning }), _jsxs("g", { fill: colors.inverseSchemes.status.onWarning, children: [_jsx("rect", { x: "9.75", y: "6", width: "1.5", height: "6.5", rx: "1" }), _jsx("circle", { cx: "10.5", cy: "14.5", r: "1" })] })] }));
|
|
7
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './utils/CssBaseline';
|
|
2
2
|
export * from './utils/Backdrop';
|
|
3
3
|
export * from './feedback/Alert';
|
|
4
|
+
export * from './feedback/AlertTitle';
|
|
4
5
|
export * from './feedback/Snackbar';
|
|
5
6
|
export * from './feedback/CircularProgress';
|
|
6
7
|
export * from './feedback/LinearProgress';
|
|
@@ -46,6 +47,7 @@ export * from './inputs/InputBase';
|
|
|
46
47
|
export * from './data-display/Skeleton';
|
|
47
48
|
export * from './inputs/FormLabel';
|
|
48
49
|
export * from './inputs/OutlinedInput';
|
|
50
|
+
export * from './inputs/FilledInput';
|
|
49
51
|
export * from './inputs/FormHelperText';
|
|
50
52
|
export * from './inputs/Radio';
|
|
51
53
|
export * from './inputs/Filter';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2026 WebPros International GmbH. All rights reserved.
|
|
2
2
|
export * from './utils/CssBaseline';
|
|
3
3
|
export * from './utils/Backdrop';
|
|
4
4
|
export * from './feedback/Alert';
|
|
5
|
+
export * from './feedback/AlertTitle';
|
|
5
6
|
export * from './feedback/Snackbar';
|
|
6
7
|
export * from './feedback/CircularProgress';
|
|
7
8
|
export * from './feedback/LinearProgress';
|
|
@@ -47,6 +48,7 @@ export * from './inputs/InputBase';
|
|
|
47
48
|
export * from './data-display/Skeleton';
|
|
48
49
|
export * from './inputs/FormLabel';
|
|
49
50
|
export * from './inputs/OutlinedInput';
|
|
51
|
+
export * from './inputs/FilledInput';
|
|
50
52
|
export * from './inputs/FormHelperText';
|
|
51
53
|
export * from './inputs/Radio';
|
|
52
54
|
export * from './inputs/Filter';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentsOverrides, Theme } from '@mui/material';
|
|
2
|
+
interface M3FilledInput {
|
|
3
|
+
MuiFilledInput: {
|
|
4
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiFilledInput'];
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export declare const getFilledInput: (theme: Theme) => M3FilledInput;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// Copyright 2026 WebPros International GmbH. All rights reserved.
|
|
2
|
+
export const getFilledInput = (theme) => {
|
|
3
|
+
const { colors } = theme;
|
|
4
|
+
return {
|
|
5
|
+
MuiFilledInput: {
|
|
6
|
+
styleOverrides: {
|
|
7
|
+
root: {
|
|
8
|
+
backgroundColor: colors.schemes.surfaces.surfaceContainerHighest,
|
|
9
|
+
borderRadius: '4px 4px 0 0',
|
|
10
|
+
'&:hover': {
|
|
11
|
+
// Figma: state-layers/on-surface/opacity-06 over surfaceContainerHighest
|
|
12
|
+
backgroundColor: colors.blendSchemaWithStateLayer('schemes.surfaces.surfaceContainerHighest', 'stateLayers.surfaces.onSurface.opacity06'),
|
|
13
|
+
},
|
|
14
|
+
'&.Mui-focused': {
|
|
15
|
+
backgroundColor: colors.schemes.surfaces.surfaceContainerHighest,
|
|
16
|
+
},
|
|
17
|
+
'&.Mui-disabled': {
|
|
18
|
+
// Figma: 4% onSurface overlay; opacity06 (6%) is the closest available token
|
|
19
|
+
backgroundColor: colors.blendSchemaWithStateLayer('schemes.surfaces.surfaceContainerHighest', 'stateLayers.surfaces.onSurface.opacity06'),
|
|
20
|
+
},
|
|
21
|
+
// Inactive underline
|
|
22
|
+
'&::before': {
|
|
23
|
+
borderBottomColor: colors.schemes.surfaces.onSurfaceVariant,
|
|
24
|
+
},
|
|
25
|
+
// Hover underline
|
|
26
|
+
'&:hover:not(.Mui-disabled, .Mui-error)::before': {
|
|
27
|
+
borderBottomColor: colors.schemes.surfaces.onSurface,
|
|
28
|
+
},
|
|
29
|
+
'&::after': {
|
|
30
|
+
borderBottomColor: colors.schemes.base.primary,
|
|
31
|
+
borderBottomWidth: 3,
|
|
32
|
+
},
|
|
33
|
+
// Error underline
|
|
34
|
+
'&.Mui-error::before': {
|
|
35
|
+
borderBottomColor: colors.schemes.status.error,
|
|
36
|
+
},
|
|
37
|
+
'&.Mui-error::after': {
|
|
38
|
+
borderBottomColor: colors.schemes.status.error,
|
|
39
|
+
},
|
|
40
|
+
// Disabled underline
|
|
41
|
+
'&.Mui-disabled::before': {
|
|
42
|
+
borderBottomStyle: 'solid',
|
|
43
|
+
borderBottomColor: colors.stateLayers.surfaces.onSurface.opacity38,
|
|
44
|
+
},
|
|
45
|
+
// Multiline size variants (padding goes on root for multiline)
|
|
46
|
+
variants: [
|
|
47
|
+
{
|
|
48
|
+
props: {},
|
|
49
|
+
style: {
|
|
50
|
+
paddingTop: 0,
|
|
51
|
+
paddingBottom: 0,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
props: ({ multiline }) => !!multiline,
|
|
56
|
+
style: {
|
|
57
|
+
paddingTop: 20,
|
|
58
|
+
paddingBottom: 8,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
props: ({ multiline, size }) => !!multiline && size === 'small',
|
|
63
|
+
style: {
|
|
64
|
+
paddingTop: 15,
|
|
65
|
+
paddingBottom: 4,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
// Figma lg: 56px total → padding distributes to match label area
|
|
70
|
+
props: ({ multiline, size }) => !!multiline && size === 'large',
|
|
71
|
+
style: {
|
|
72
|
+
paddingTop: 24,
|
|
73
|
+
paddingBottom: 12,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
input: {
|
|
79
|
+
height: '20px',
|
|
80
|
+
// Figma: px-[16px] horizontal padding on state-layer
|
|
81
|
+
paddingLeft: 16,
|
|
82
|
+
paddingRight: 16,
|
|
83
|
+
// the order matters
|
|
84
|
+
variants: [
|
|
85
|
+
{
|
|
86
|
+
props: {},
|
|
87
|
+
style: {
|
|
88
|
+
paddingTop: 20,
|
|
89
|
+
paddingBottom: 8,
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
props: { size: 'small' },
|
|
94
|
+
style: {
|
|
95
|
+
paddingTop: 15,
|
|
96
|
+
paddingBottom: 4,
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
// Figma lg: 56px = 24 (paddingTop) + 20 (input height) + 12 (paddingBottom)
|
|
101
|
+
props: { size: 'large' },
|
|
102
|
+
style: {
|
|
103
|
+
paddingTop: 24,
|
|
104
|
+
paddingBottom: 12,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
props: ({ ownerState }) => !!ownerState.multiline,
|
|
109
|
+
style: {
|
|
110
|
+
padding: 0,
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FilledInput.theme';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2026 WebPros International GmbH. All rights reserved.
|
|
2
2
|
export const getInputLabel = () => {
|
|
3
3
|
return {
|
|
4
4
|
MuiInputLabel: {
|
|
@@ -28,6 +28,43 @@ export const getInputLabel = () => {
|
|
|
28
28
|
transform: 'translate(14px, -10px) scale(0.8)',
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
|
+
// Filled variant label positioning
|
|
32
|
+
{
|
|
33
|
+
props: ({ variant }) => variant === 'filled',
|
|
34
|
+
style: {
|
|
35
|
+
transform: 'translate(14px, 12px) scale(1)',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
props: { variant: 'filled', size: 'small' },
|
|
40
|
+
style: {
|
|
41
|
+
transform: 'translate(14px, 8px) scale(1)',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
props: { variant: 'filled', size: 'large' },
|
|
46
|
+
style: {
|
|
47
|
+
transform: 'translate(14px, 16px) scale(1)',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
props: ({ variant, ownerState }) => variant === 'filled' && !!ownerState.shrink,
|
|
52
|
+
style: {
|
|
53
|
+
transform: 'translate(14px, 4px) scale(0.8)',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
props: ({ variant, size, ownerState }) => variant === 'filled' && size === 'small' && !!ownerState.shrink,
|
|
58
|
+
style: {
|
|
59
|
+
transform: 'translate(14px, 2px) scale(0.8)',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
props: ({ variant, size, ownerState }) => variant === 'filled' && size === 'large' && !!ownerState.shrink,
|
|
64
|
+
style: {
|
|
65
|
+
transform: 'translate(14px, 5px) scale(0.8)',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
31
68
|
],
|
|
32
69
|
},
|
|
33
70
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import '@mui/x-date-pickers/themeAugmentation';
|
|
2
1
|
import { ComponentsOverrides, Theme } from '@mui/material';
|
|
3
2
|
export interface M3TimePicker {
|
|
4
3
|
MuiPickersPopper: {
|
|
5
|
-
styleOverrides?: ComponentsOverrides<Theme>['
|
|
4
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiDialog'];
|
|
6
5
|
};
|
|
7
6
|
}
|
|
8
7
|
export declare const getTimePicker: (theme: Theme) => M3TimePicker;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAccordion, getAccordionSummary, getAccordionDetails, getAlert, getAppBar, getBackdrop, getBadge, getBreadcrumbs, getButton, getCheckbox, getChip, getCssBaseline, getDivider, getDrawer, getFab, getIconButton, getLink, getList, getListItem, getListItemButton, getListItemIcon, getListItemAvatar, getListSubheader, getMenu, getMenuItem, getPaginationItem, getPaper, getPopover, getSwitch, getTab, getTabs, getTextField, getTooltip, getTypography, getAvatar, getSelect, getInputLabel, getTimePicker, getSnackbar, getCircularProgress, getLinearProgress, getDialog, getTable, getAutocomplete, getInputBase, getSkeleton, getFormLabel, getOutlinedInput, getFormHelperText, getRadio, } from '../components';
|
|
1
|
+
import { getAccordion, getAccordionSummary, getAccordionDetails, getAlert, getAppBar, getBackdrop, getBadge, getBreadcrumbs, getButton, getCheckbox, getChip, getCssBaseline, getDivider, getDrawer, getFab, getIconButton, getLink, getList, getListItem, getListItemButton, getListItemIcon, getListItemAvatar, getListSubheader, getMenu, getMenuItem, getPaginationItem, getPaper, getPopover, getSwitch, getTab, getTabs, getTextField, getTooltip, getTypography, getAvatar, getSelect, getInputLabel, getTimePicker, getSnackbar, getCircularProgress, getLinearProgress, getDialog, getTable, getAutocomplete, getInputBase, getSkeleton, getFormLabel, getOutlinedInput, getFilledInput, getFormHelperText, getRadio, getAlertTitle, } from '../components';
|
|
2
2
|
export const getMUIComponents = (theme, _mode) => ({
|
|
3
|
-
components: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, getCssBaseline(theme)), getBackdrop(theme)), getAccordion(theme)), getAccordionSummary(theme)), getAccordionDetails(theme)), getAlert(theme)), getAppBar(theme)), getAvatar(theme)), getBadge(theme)), getBreadcrumbs(theme)), getSelect()), getTimePicker(theme)), getInputLabel()), getButton(theme)), getCheckbox(theme)), getChip(theme)), getDivider(theme)), getDrawer(theme)), getFab(theme)), getIconButton(theme)), getLink(theme)), getList(theme)), getListItem(theme)), getListItemButton(theme)), getListItemIcon(theme)), getListItemAvatar(theme)), getListSubheader(theme)), getMenu(theme)), getMenuItem(theme)), getPaginationItem(theme)), getPaper(theme)), getPopover(theme)), getSwitch(theme)), getTab(theme)), getTabs(theme)), getTextField(theme)), getTooltip(theme)), getTypography(theme)), getSnackbar(theme)), getCircularProgress(theme)), getLinearProgress(theme)), getDialog(theme)), getTable(theme)), getAutocomplete()), getInputBase()), getSkeleton(theme)), getFormLabel()), getOutlinedInput(theme)), getFormHelperText()), getRadio(theme)),
|
|
3
|
+
components: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, getCssBaseline(theme)), getBackdrop(theme)), getAccordion(theme)), getAccordionSummary(theme)), getAccordionDetails(theme)), getAlert(theme)), getAlertTitle(theme)), getAppBar(theme)), getAvatar(theme)), getBadge(theme)), getBreadcrumbs(theme)), getSelect()), getTimePicker(theme)), getInputLabel()), getButton(theme)), getCheckbox(theme)), getChip(theme)), getDivider(theme)), getDrawer(theme)), getFab(theme)), getIconButton(theme)), getLink(theme)), getList(theme)), getListItem(theme)), getListItemButton(theme)), getListItemIcon(theme)), getListItemAvatar(theme)), getListSubheader(theme)), getMenu(theme)), getMenuItem(theme)), getPaginationItem(theme)), getPaper(theme)), getPopover(theme)), getSwitch(theme)), getTab(theme)), getTabs(theme)), getTextField(theme)), getTooltip(theme)), getTypography(theme)), getSnackbar(theme)), getCircularProgress(theme)), getLinearProgress(theme)), getDialog(theme)), getTable(theme)), getAutocomplete()), getInputBase()), getSkeleton(theme)), getFormLabel()), getOutlinedInput(theme)), getFilledInput(theme)), getFormHelperText()), getRadio(theme)),
|
|
4
4
|
});
|
|
@@ -6,6 +6,10 @@ export const getMUIPalette = (themeMode, themeScheme) => {
|
|
|
6
6
|
/** Basic MUI overrides */
|
|
7
7
|
themeMode,
|
|
8
8
|
mode: themeMode === 'dark' ? 'dark' : 'light', // MUI expects 'light' or 'dark' for mode
|
|
9
|
+
background: {
|
|
10
|
+
default: scheme.schemes.surfaces.surface,
|
|
11
|
+
paper: scheme.schemes.surfaces.surfaceContainerLowest,
|
|
12
|
+
},
|
|
9
13
|
primary: {
|
|
10
14
|
main: scheme.schemes.base.primary,
|
|
11
15
|
contrastText: scheme.schemes.base.onPrimary,
|
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.4.
|
|
4
|
+
"version": "0.4.12",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -32,11 +32,6 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"private": false,
|
|
35
|
-
"engines": {
|
|
36
|
-
"node": "^22.x",
|
|
37
|
-
"npm": "please-use-yarn",
|
|
38
|
-
"yarn": "^1.22.0"
|
|
39
|
-
},
|
|
40
35
|
"scripts": {
|
|
41
36
|
"build": "yarn build:main && yarn build:eslint",
|
|
42
37
|
"build:main": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
@@ -60,8 +55,6 @@
|
|
|
60
55
|
"@material/material-color-utilities": "^0.3.0",
|
|
61
56
|
"@mui/material": "^7.3.6",
|
|
62
57
|
"@mui/utils": "^7.3.6",
|
|
63
|
-
"@mui/x-data-grid": "^7.29.0",
|
|
64
|
-
"@mui/x-date-pickers": "^7.29.0",
|
|
65
58
|
"@phosphor-icons/react": "^2.1.0",
|
|
66
59
|
"usehooks-ts": "^3.1.1"
|
|
67
60
|
},
|
|
@@ -77,8 +70,6 @@
|
|
|
77
70
|
"@material/material-color-utilities": "^0.3.0",
|
|
78
71
|
"@mui/material": "^7.3.6",
|
|
79
72
|
"@mui/utils": "^7.3.6",
|
|
80
|
-
"@mui/x-data-grid": "^7.29.0",
|
|
81
|
-
"@mui/x-date-pickers": "^7.29.0",
|
|
82
73
|
"@phosphor-icons/react": "^2.1.0",
|
|
83
74
|
"@storybook/addon-a11y": "^9.1.16",
|
|
84
75
|
"@storybook/addon-docs": "^9.1.16",
|
|
@@ -123,4 +114,4 @@
|
|
|
123
114
|
"resolutions": {
|
|
124
115
|
"react-is": "^18.3.1"
|
|
125
116
|
}
|
|
126
|
-
}
|
|
117
|
+
}
|