@aehrc/smart-forms-renderer 1.0.0-alpha.92 → 1.0.0-alpha.93
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/lib/theme/RendererThemeProvider.js +3 -3
- package/lib/theme/RendererThemeProvider.js.map +1 -1
- package/lib/theme/customGlobalStyles.js +0 -25
- package/lib/theme/customGlobalStyles.js.map +1 -1
- package/package.json +1 -1
- package/src/theme/RendererThemeProvider.tsx +2 -3
- package/src/theme/customGlobalStyles.tsx +0 -65
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createTheme, StyledEngineProvider, ThemeProvider as MUIThemeProvider } from '@mui/material/styles';
|
|
3
|
-
import CustomGlobalStyles from './customGlobalStyles';
|
|
4
3
|
import { rendererThemeComponentOverrides } from './overrides/rendererThemeComponentOverrides';
|
|
5
4
|
import { rendererThemeOptions } from './rendererThemeOptions';
|
|
5
|
+
import { ScopedCssBaseline } from '@mui/material';
|
|
6
6
|
/**
|
|
7
7
|
* Default theme used by the renderer using Material UI. You can customise your own theme by defining a new ThemeProvider.
|
|
8
8
|
* @see {@link https://mui.com/material-ui/customization/theming/}
|
|
@@ -12,7 +12,7 @@ import { rendererThemeOptions } from './rendererThemeOptions';
|
|
|
12
12
|
export function RendererThemeProvider({ children }) {
|
|
13
13
|
const theme = createTheme(rendererThemeOptions);
|
|
14
14
|
theme.components = rendererThemeComponentOverrides(theme);
|
|
15
|
-
return (_jsx(StyledEngineProvider, { injectFirst: true, children:
|
|
15
|
+
return (_jsx(StyledEngineProvider, { injectFirst: true, children: _jsx(MUIThemeProvider, { theme: theme, children: _jsx(ScopedCssBaseline, { children: children }) }) }));
|
|
16
16
|
}
|
|
17
17
|
export default RendererThemeProvider;
|
|
18
18
|
//# sourceMappingURL=RendererThemeProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RendererThemeProvider.js","sourceRoot":"","sources":["../../src/theme/RendererThemeProvider.tsx"],"names":[],"mappings":";AAmBA,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,aAAa,IAAI,gBAAgB,EAClC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"RendererThemeProvider.js","sourceRoot":"","sources":["../../src/theme/RendererThemeProvider.tsx"],"names":[],"mappings":";AAmBA,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,aAAa,IAAI,gBAAgB,EAClC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,EAAE,QAAQ,EAA2B;IACzE,MAAM,KAAK,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC;IAChD,KAAK,CAAC,UAAU,GAAG,+BAA+B,CAAC,KAAK,CAAC,CAAC;IAE1D,OAAO,CACL,KAAC,oBAAoB,IAAC,WAAW,kBAC/B,KAAC,gBAAgB,IAAC,KAAK,EAAE,KAAK,YAC5B,KAAC,iBAAiB,cAAE,QAAQ,GAAqB,GAChC,GACE,CACxB,CAAC;AACJ,CAAC;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -2,27 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import GlobalStyles from '@mui/material/GlobalStyles';
|
|
3
3
|
export default function CustomGlobalStyles() {
|
|
4
4
|
return (_jsx(GlobalStyles, { styles: {
|
|
5
|
-
'*': {
|
|
6
|
-
boxSizing: 'border-box'
|
|
7
|
-
},
|
|
8
|
-
html: {
|
|
9
|
-
margin: 0,
|
|
10
|
-
padding: 0,
|
|
11
|
-
width: '100%',
|
|
12
|
-
height: '100%',
|
|
13
|
-
WebkitOverflowScrolling: 'touch'
|
|
14
|
-
},
|
|
15
|
-
body: {
|
|
16
|
-
margin: 0,
|
|
17
|
-
padding: 0,
|
|
18
|
-
width: '100%',
|
|
19
|
-
height: '100%'
|
|
20
|
-
},
|
|
21
|
-
'#root': {
|
|
22
|
-
width: '100%',
|
|
23
|
-
height: '100%',
|
|
24
|
-
textAlign: 'left'
|
|
25
|
-
},
|
|
26
5
|
input: {
|
|
27
6
|
'&[type=number]': {
|
|
28
7
|
MozAppearance: 'textfield',
|
|
@@ -35,10 +14,6 @@ export default function CustomGlobalStyles() {
|
|
|
35
14
|
WebkitAppearance: 'none'
|
|
36
15
|
}
|
|
37
16
|
}
|
|
38
|
-
},
|
|
39
|
-
img: {
|
|
40
|
-
display: 'block',
|
|
41
|
-
maxWidth: '100%'
|
|
42
17
|
}
|
|
43
18
|
} }));
|
|
44
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customGlobalStyles.js","sourceRoot":"","sources":["../../src/theme/customGlobalStyles.tsx"],"names":[],"mappings":";AAiBA,OAAO,YAAY,MAAM,4BAA4B,CAAC;AAEtD,MAAM,CAAC,OAAO,UAAU,kBAAkB;IACxC,OAAO,CACL,KAAC,YAAY,IACX,MAAM,EAAE;YACN,
|
|
1
|
+
{"version":3,"file":"customGlobalStyles.js","sourceRoot":"","sources":["../../src/theme/customGlobalStyles.tsx"],"names":[],"mappings":";AAiBA,OAAO,YAAY,MAAM,4BAA4B,CAAC;AAEtD,MAAM,CAAC,OAAO,UAAU,kBAAkB;IACxC,OAAO,CACL,KAAC,YAAY,IACX,MAAM,EAAE;YACN,KAAK,EAAE;gBACL,gBAAgB,EAAE;oBAChB,aAAa,EAAE,WAAW;oBAC1B,8BAA8B,EAAE;wBAC9B,MAAM,EAAE,CAAC;wBACT,gBAAgB,EAAE,MAAM;qBACzB;oBACD,8BAA8B,EAAE;wBAC9B,MAAM,EAAE,CAAC;wBACT,gBAAgB,EAAE,MAAM;qBACzB;iBACF;aACF;SACF,GACD,CACH,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
StyledEngineProvider,
|
|
23
23
|
ThemeProvider as MUIThemeProvider
|
|
24
24
|
} from '@mui/material/styles';
|
|
25
|
-
import CustomGlobalStyles from './customGlobalStyles';
|
|
26
25
|
import { rendererThemeComponentOverrides } from './overrides/rendererThemeComponentOverrides';
|
|
27
26
|
import { rendererThemeOptions } from './rendererThemeOptions';
|
|
27
|
+
import { ScopedCssBaseline } from '@mui/material';
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Default theme used by the renderer using Material UI. You can customise your own theme by defining a new ThemeProvider.
|
|
@@ -39,8 +39,7 @@ export function RendererThemeProvider({ children }: { children: ReactNode }) {
|
|
|
39
39
|
return (
|
|
40
40
|
<StyledEngineProvider injectFirst>
|
|
41
41
|
<MUIThemeProvider theme={theme}>
|
|
42
|
-
<
|
|
43
|
-
<>{children}</>
|
|
42
|
+
<ScopedCssBaseline>{children}</ScopedCssBaseline>
|
|
44
43
|
</MUIThemeProvider>
|
|
45
44
|
</StyledEngineProvider>
|
|
46
45
|
);
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Commonwealth Scientific and Industrial Research
|
|
3
|
-
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import React from 'react';
|
|
18
|
-
import GlobalStyles from '@mui/material/GlobalStyles';
|
|
19
|
-
|
|
20
|
-
export default function CustomGlobalStyles() {
|
|
21
|
-
return (
|
|
22
|
-
<GlobalStyles
|
|
23
|
-
styles={{
|
|
24
|
-
'*': {
|
|
25
|
-
boxSizing: 'border-box'
|
|
26
|
-
},
|
|
27
|
-
html: {
|
|
28
|
-
margin: 0,
|
|
29
|
-
padding: 0,
|
|
30
|
-
width: '100%',
|
|
31
|
-
height: '100%',
|
|
32
|
-
WebkitOverflowScrolling: 'touch'
|
|
33
|
-
},
|
|
34
|
-
body: {
|
|
35
|
-
margin: 0,
|
|
36
|
-
padding: 0,
|
|
37
|
-
width: '100%',
|
|
38
|
-
height: '100%'
|
|
39
|
-
},
|
|
40
|
-
'#root': {
|
|
41
|
-
width: '100%',
|
|
42
|
-
height: '100%',
|
|
43
|
-
textAlign: 'left'
|
|
44
|
-
},
|
|
45
|
-
input: {
|
|
46
|
-
'&[type=number]': {
|
|
47
|
-
MozAppearance: 'textfield',
|
|
48
|
-
'&::-webkit-outer-spin-button': {
|
|
49
|
-
margin: 0,
|
|
50
|
-
WebkitAppearance: 'none'
|
|
51
|
-
},
|
|
52
|
-
'&::-webkit-inner-spin-button': {
|
|
53
|
-
margin: 0,
|
|
54
|
-
WebkitAppearance: 'none'
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
img: {
|
|
59
|
-
display: 'block',
|
|
60
|
-
maxWidth: '100%'
|
|
61
|
-
}
|
|
62
|
-
}}
|
|
63
|
-
/>
|
|
64
|
-
);
|
|
65
|
-
}
|