@opengeoweb/theme 2.1.0 → 2.1.4

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/README.md CHANGED
@@ -97,7 +97,7 @@ export const Wrapper: React.FC = () => (
97
97
  2. Use the style/color in your component. The theme palette can be found as `geowebColor` property inside the `theme.palette` of the MUI Theme
98
98
 
99
99
  ```javascript
100
- const useStyles = makeStyles((theme) => ({
100
+ const useStyles = makeStyles((theme: Theme) => ({
101
101
  button: {
102
102
  border: theme.palette.geowebColors.buttons.flatMouseOver.border,
103
103
  '&:hover': {
@@ -144,7 +144,7 @@ const TimeSliderLegend: React.FC<TimeSliderLegendProps> = (
144
144
 
145
145
  ```javascript
146
146
  // libs/core/src/lib/components/TimeSlider/TimeSliderLegend/TimeSliderLegendRenderFunctions.tsx
147
- import { Theme } from '@material-ui/core';
147
+ import { Theme } from '@mui/material';
148
148
 
149
149
  export const renderTimeSliderLegend = (
150
150
  context: CanvasRenderingContext2D,
@@ -321,7 +321,7 @@ Contains demo stories with MUI components. Every story is build with the `StoryW
321
321
  - The **Elevation** shows all elevations we currently have. These can be used for defining `box-shadow` for elements. If you want to use the elevation in code:
322
322
 
323
323
  ```javascript
324
- const useStyles = makeStyles((theme) => ({
324
+ const useStyles = makeStyles((theme: Theme) => ({
325
325
  header: {
326
326
  boxShadow: theme.shadows[1], // elevation_01
327
327
  },
@@ -454,7 +454,6 @@ This footer is only used for when the wrapper is resizable. Therefore it would m
454
454
 
455
455
  ## Known issues
456
456
 
457
- - **React.Strictmode** does not work well with dynamic changing of themes. For now we have disabled it, but it should be activated again after the update to MUI 5. https://gitlab.com/opengeoweb/opengeoweb/-/issues/965
458
457
  - **Expect unit tests to fail** when using components with the theme. This is easily fixed by wrapping your test with the `ThemeProvider` from the `theme` lib. Don't import the ThemeProvider wrapper in the failed test, but use the `CoreThemeProvider` or `CoreThemeStoreProvider` found in [`libs/core/src/lib/components/Providers/Providers.tsx`](https://gitlab.com/opengeoweb/opengeoweb/-/blob/master/libs/core/src/lib/components/Providers/Providers.tsx#L36)
459
458
  - There are some **storybook bugs** with stories with Themes. When switching stories with new and old theme, it could be possible that some colors are rendered wrong. This is probably happening because one of the stories with old theme has `React.Strictmode` activated. This is only happening in storybook, and when refreshing page the colors should be correct. This will fix itself when we have `gwTheme` removed.
460
459
  - **MUI 5** makes it easy to add custom variants to components, so we should wait for that release before investing more heavy in theme stories: https://next.material-ui.com/customization/theme-components/#adding-new-component-variants . Check the progress of the release of [v5 here](https://github.com/mui-org/material-ui/milestone/44)
@@ -472,10 +471,6 @@ Other libs where `ThemeProvider` from `theme` should be used and `gwTheme` shoul
472
471
  - [ ] form-fields (**TICKET TO BE CREATED**)
473
472
  - [ ] shared (**TICKET TO BE CREATED**)
474
473
 
475
- Another point of the roadmap is upgrade to MUI5. This is complete when all `@material-ui` references have been removed from the code
476
-
477
- - [ ] Investigate impact of upgrade to MUI5 https://gitlab.com/opengeoweb/opengeoweb/-/issues/1355
478
-
479
474
  ## Unit testing
480
475
 
481
476
  ```