@opengeoweb/theme 9.36.0 → 10.0.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.
package/index.esm.js CHANGED
@@ -1,8 +1,12 @@
1
+ import 'msw';
1
2
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { SvgIcon, createTheme as createTheme$1, ThemeProvider as ThemeProvider$1, CssBaseline, GlobalStyles, StyledEngineProvider } from '@mui/material';
3
+ import { SvgIcon, createTheme as createTheme$1, ThemeProvider as ThemeProvider$1, CssBaseline, GlobalStyles, StyledEngineProvider, useTheme } from '@mui/material';
3
4
  import * as React from 'react';
5
+ import React__default from 'react';
4
6
  import 'i18next';
5
7
  import 'react-i18next';
8
+ import { range } from 'lodash';
9
+ import styled from '@emotion/styled';
6
10
 
7
11
  function _objectDestructuringEmpty(t) {
8
12
  if (null == t) throw new TypeError("Cannot destructure " + t);
@@ -2046,11 +2050,11 @@ var createShadows = function createShadows(elevations) {
2046
2050
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
2047
2051
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2048
2052
  * */
2049
- var focusButtonStyle$1 = {
2053
+ var focusButtonStyle$2 = {
2050
2054
  outline: 'solid 2px #419cfe'
2051
2055
  };
2052
2056
  // https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/5ecf84d920b99428d7f98555
2053
- var colors$1 = {
2057
+ var colors$2 = {
2054
2058
  background: {
2055
2059
  surface: '#FFFFFF',
2056
2060
  surfaceApp: '#F5F5F5',
@@ -2082,7 +2086,7 @@ var colors$1 = {
2082
2086
  color: '#626262',
2083
2087
  borderColor: 'transparent'
2084
2088
  },
2085
- focus: focusButtonStyle$1
2089
+ focus: focusButtonStyle$2
2086
2090
  },
2087
2091
  secondary: {
2088
2092
  "default": {
@@ -2106,7 +2110,7 @@ var colors$1 = {
2106
2110
  color: '#626262',
2107
2111
  borderColor: 'transparent'
2108
2112
  },
2109
- focus: focusButtonStyle$1
2113
+ focus: focusButtonStyle$2
2110
2114
  },
2111
2115
  tertiary: {
2112
2116
  "default": {
@@ -2134,7 +2138,7 @@ var colors$1 = {
2134
2138
  color: '#626262',
2135
2139
  borderColor: 'transparent'
2136
2140
  },
2137
- focus: focusButtonStyle$1
2141
+ focus: focusButtonStyle$2
2138
2142
  },
2139
2143
  flat: {
2140
2144
  "default": {
@@ -2162,7 +2166,7 @@ var colors$1 = {
2162
2166
  color: '#626262',
2163
2167
  borderColor: 'transparent'
2164
2168
  },
2165
- focus: focusButtonStyle$1
2169
+ focus: focusButtonStyle$2
2166
2170
  },
2167
2171
  tool: {
2168
2172
  "default": {
@@ -2190,7 +2194,7 @@ var colors$1 = {
2190
2194
  color: '#626262',
2191
2195
  borderColor: 'transparent'
2192
2196
  },
2193
- focus: focusButtonStyle$1
2197
+ focus: focusButtonStyle$2
2194
2198
  },
2195
2199
  boxed: {
2196
2200
  "default": {
@@ -2218,7 +2222,7 @@ var colors$1 = {
2218
2222
  color: '#626262',
2219
2223
  borderColor: 'transparent'
2220
2224
  },
2221
- focus: focusButtonStyle$1
2225
+ focus: focusButtonStyle$2
2222
2226
  },
2223
2227
  icon: {
2224
2228
  "default": {
@@ -2246,7 +2250,7 @@ var colors$1 = {
2246
2250
  color: '#626262',
2247
2251
  borderColor: 'transparent'
2248
2252
  },
2249
- focus: focusButtonStyle$1
2253
+ focus: focusButtonStyle$2
2250
2254
  }
2251
2255
  },
2252
2256
  iconButtons: {
@@ -2276,7 +2280,7 @@ var colors$1 = {
2276
2280
  color: '#626262',
2277
2281
  borderColor: 'transparent'
2278
2282
  },
2279
- focus: focusButtonStyle$1
2283
+ focus: focusButtonStyle$2
2280
2284
  },
2281
2285
  tool: {
2282
2286
  "default": {
@@ -2304,7 +2308,7 @@ var colors$1 = {
2304
2308
  color: '#626262',
2305
2309
  borderColor: 'transparent'
2306
2310
  },
2307
- focus: focusButtonStyle$1
2311
+ focus: focusButtonStyle$2
2308
2312
  },
2309
2313
  boxed: {
2310
2314
  "default": {
@@ -2332,7 +2336,7 @@ var colors$1 = {
2332
2336
  color: '#626262',
2333
2337
  borderColor: 'transparent'
2334
2338
  },
2335
- focus: focusButtonStyle$1
2339
+ focus: focusButtonStyle$2
2336
2340
  }
2337
2341
  },
2338
2342
  typographyAndIcons: {
@@ -2694,7 +2698,7 @@ var colors$1 = {
2694
2698
  }
2695
2699
  };
2696
2700
  // https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/609bb6a5287bd1abe0de39a7
2697
- var elevations$1 = {
2701
+ var elevations$2 = {
2698
2702
  elevation_01: '0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)',
2699
2703
  elevation_02: '0 1px 5px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.14)',
2700
2704
  elevation_03: '0 1px 8px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 3px 3px 0 rgba(0, 0, 0, 0.14)',
@@ -2735,9 +2739,9 @@ var createTheme = function createTheme(_ref) {
2735
2739
  var _ref$paletteType = _ref.paletteType,
2736
2740
  paletteType = _ref$paletteType === void 0 ? 'light' : _ref$paletteType,
2737
2741
  _ref$geowebColors = _ref.geowebColors,
2738
- defaultGeowebColors = _ref$geowebColors === void 0 ? colors$1 : _ref$geowebColors,
2742
+ defaultGeowebColors = _ref$geowebColors === void 0 ? colors$2 : _ref$geowebColors,
2739
2743
  _ref$elevations = _ref.elevations,
2740
- defaultShadows = _ref$elevations === void 0 ? elevations$1 : _ref$elevations;
2744
+ defaultShadows = _ref$elevations === void 0 ? elevations$2 : _ref$elevations;
2741
2745
  var geowebColors = parseColors(defaultGeowebColors);
2742
2746
  var shadows = createShadows(defaultShadows);
2743
2747
  return createTheme$1({
@@ -3355,11 +3359,11 @@ var createTheme = function createTheme(_ref) {
3355
3359
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
3356
3360
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3357
3361
  * */
3358
- var focusButtonStyle = {
3362
+ var focusButtonStyle$1 = {
3359
3363
  outline: 'solid 2px #419cfe'
3360
3364
  };
3361
3365
  // https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/6093e5dc12278e35d433aa2d
3362
- var colors = {
3366
+ var colors$1 = {
3363
3367
  background: {
3364
3368
  surface: '#303030',
3365
3369
  surfaceApp: '#2B2B2B',
@@ -3391,7 +3395,7 @@ var colors = {
3391
3395
  color: '#B4B4B4',
3392
3396
  borderColor: 'transparent'
3393
3397
  },
3394
- focus: focusButtonStyle
3398
+ focus: focusButtonStyle$1
3395
3399
  },
3396
3400
  secondary: {
3397
3401
  "default": {
@@ -3415,7 +3419,7 @@ var colors = {
3415
3419
  color: '#B4B4B4',
3416
3420
  borderColor: 'transparent'
3417
3421
  },
3418
- focus: focusButtonStyle
3422
+ focus: focusButtonStyle$1
3419
3423
  },
3420
3424
  tertiary: {
3421
3425
  "default": {
@@ -3443,7 +3447,7 @@ var colors = {
3443
3447
  color: '#B4B4B4',
3444
3448
  borderColor: 'transparent'
3445
3449
  },
3446
- focus: focusButtonStyle
3450
+ focus: focusButtonStyle$1
3447
3451
  },
3448
3452
  flat: {
3449
3453
  "default": {
@@ -3471,7 +3475,7 @@ var colors = {
3471
3475
  color: '#B4B4B4',
3472
3476
  borderColor: 'transparent'
3473
3477
  },
3474
- focus: focusButtonStyle
3478
+ focus: focusButtonStyle$1
3475
3479
  },
3476
3480
  tool: {
3477
3481
  "default": {
@@ -3499,7 +3503,7 @@ var colors = {
3499
3503
  color: '#B4B4B4',
3500
3504
  borderColor: 'transparent'
3501
3505
  },
3502
- focus: focusButtonStyle
3506
+ focus: focusButtonStyle$1
3503
3507
  },
3504
3508
  boxed: {
3505
3509
  "default": {
@@ -3527,7 +3531,7 @@ var colors = {
3527
3531
  color: '#B4B4B4',
3528
3532
  borderColor: 'transparent'
3529
3533
  },
3530
- focus: focusButtonStyle
3534
+ focus: focusButtonStyle$1
3531
3535
  },
3532
3536
  icon: {
3533
3537
  "default": {
@@ -3555,7 +3559,7 @@ var colors = {
3555
3559
  color: '#B4B4B4',
3556
3560
  borderColor: 'transparent'
3557
3561
  },
3558
- focus: focusButtonStyle
3562
+ focus: focusButtonStyle$1
3559
3563
  }
3560
3564
  },
3561
3565
  iconButtons: {
@@ -3585,7 +3589,7 @@ var colors = {
3585
3589
  color: '#B4B4B4',
3586
3590
  borderColor: 'transparent'
3587
3591
  },
3588
- focus: focusButtonStyle
3592
+ focus: focusButtonStyle$1
3589
3593
  },
3590
3594
  tool: {
3591
3595
  "default": {
@@ -3613,7 +3617,7 @@ var colors = {
3613
3617
  color: '#B4B4B4',
3614
3618
  borderColor: 'transparent'
3615
3619
  },
3616
- focus: focusButtonStyle
3620
+ focus: focusButtonStyle$1
3617
3621
  },
3618
3622
  boxed: {
3619
3623
  "default": {
@@ -3641,7 +3645,7 @@ var colors = {
3641
3645
  color: '#B4B4B4',
3642
3646
  borderColor: 'transparent'
3643
3647
  },
3644
- focus: focusButtonStyle
3648
+ focus: focusButtonStyle$1
3645
3649
  }
3646
3650
  },
3647
3651
  typographyAndIcons: {
@@ -4004,7 +4008,7 @@ var colors = {
4004
4008
  }
4005
4009
  };
4006
4010
  // https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/6093e694124ecf3886de76d4
4007
- var elevations = {
4011
+ var elevations$1 = {
4008
4012
  elevation_01: '0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)',
4009
4013
  elevation_02: '0 1px 5px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.14)',
4010
4014
  elevation_03: '0 1px 8px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 3px 3px 0 rgba(0, 0, 0, 0.14)',
@@ -4034,175 +4038,909 @@ var elevations = {
4034
4038
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
4035
4039
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4036
4040
  * */
4037
- var lightTheme = createTheme({
4038
- paletteType: 'light',
4039
- geowebColors: colors$1,
4040
- elevations: elevations$1
4041
- });
4042
- var darkTheme = createTheme({
4043
- paletteType: 'dark',
4044
- geowebColors: colors,
4045
- elevations: elevations
4046
- });
4047
-
4048
- /* *
4049
- * Licensed under the Apache License, Version 2.0 (the "License");
4050
- * you may not use this file except in compliance with the License.
4051
- * You may obtain a copy of the License at
4052
- *
4053
- * http://www.apache.org/licenses/LICENSE-2.0
4054
- *
4055
- * Unless required by applicable law or agreed to in writing, software
4056
- * distributed under the License is distributed on an "AS IS" BASIS,
4057
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4058
- * See the License for the specific language governing permissions and
4059
- * limitations under the License.
4060
- *
4061
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4062
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
4063
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4064
- * */
4065
- var ThemeTypes;
4066
- (function (ThemeTypes) {
4067
- ThemeTypes["DARK_THEME"] = "darkTheme";
4068
- ThemeTypes["LIGHT_THEME"] = "lightTheme";
4069
- })(ThemeTypes || (ThemeTypes = {}));
4070
-
4071
- var ThemeContext = /*#__PURE__*/React.createContext({
4072
- toggleTheme: undefined,
4073
- isDark: undefined
4074
- });
4075
- var ThemeProvider = function ThemeProvider(_ref) {
4076
- var children = _ref.children,
4077
- theme = _ref.theme,
4078
- defaultThemeName = _ref.defaultThemeName,
4079
- _ref$disableCssBaseli = _ref.disableCssBaseline,
4080
- disableCssBaseline = _ref$disableCssBaseli === void 0 ? false : _ref$disableCssBaseli;
4081
- var defaultTheme = defaultThemeName === ThemeTypes.DARK_THEME ? darkTheme : lightTheme;
4082
- var _React$useState = React.useState(defaultTheme === darkTheme),
4083
- isDark = _React$useState[0],
4084
- setDark = _React$useState[1];
4085
- var configuredTheme = isDark ? darkTheme : lightTheme;
4086
- var currentTheme = React.useMemo(function () {
4087
- return theme || configuredTheme;
4088
- }, [configuredTheme, theme]);
4089
- var toggleTheme = React.useCallback(function () {
4090
- return setDark(!isDark);
4091
- }, [isDark]);
4092
- var contextValue = React.useMemo(function () {
4093
- return {
4094
- toggleTheme: toggleTheme,
4095
- isDark: isDark
4096
- };
4097
- }, [toggleTheme, isDark]);
4098
- return jsx(ThemeContext.Provider, {
4099
- value: contextValue,
4100
- children: jsxs(ThemeProvider$1, {
4101
- theme: currentTheme,
4102
- children: [!disableCssBaseline && jsx(CssBaseline, {}), jsx(GlobalStyles, {
4103
- styles: {
4104
- '@keyframes mui-auto-fill': {
4105
- from: {
4106
- display: 'block'
4107
- }
4108
- },
4109
- '@keyframes mui-auto-fill-cancel': {
4110
- from: {
4111
- display: 'block'
4112
- }
4113
- }
4114
- }
4115
- }), children]
4116
- })
4117
- });
4118
- };
4119
- var useThemeContext = function useThemeContext() {
4120
- return React.useContext(ThemeContext);
4121
- };
4122
- // Wrapper for storybook stories. Will include later an additional wrapper after upgrade to MUI5
4123
- var ThemeWrapper = function ThemeWrapper(_ref2) {
4124
- var children = _ref2.children,
4125
- theme = _ref2.theme,
4126
- defaultThemeName = _ref2.defaultThemeName,
4127
- _ref2$disableCssBasel = _ref2.disableCssBaseline,
4128
- disableCssBaseline = _ref2$disableCssBasel === void 0 ? false : _ref2$disableCssBasel;
4129
- return jsx(StyledEngineProvider, {
4130
- injectFirst: true,
4131
- children: jsx(ThemeProvider, {
4132
- theme: theme,
4133
- defaultThemeName: defaultThemeName,
4134
- disableCssBaseline: disableCssBaseline,
4135
- children: children
4136
- })
4137
- });
4041
+ var focusButtonStyle = {
4042
+ outline: 'solid 2px #FFFFFF'
4138
4043
  };
4139
-
4140
- /* *
4141
- * Licensed under the Apache License, Version 2.0 (the "License");
4142
- * you may not use this file except in compliance with the License.
4143
- * You may obtain a copy of the License at
4144
- *
4145
- * http://www.apache.org/licenses/LICENSE-2.0
4146
- *
4147
- * Unless required by applicable law or agreed to in writing, software
4148
- * distributed under the License is distributed on an "AS IS" BASIS,
4149
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4150
- * See the License for the specific language governing permissions and
4151
- * limitations under the License.
4152
- *
4153
- * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4154
- * Copyright 2024 - Finnish Meteorological Institute (FMI)
4155
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4156
- * */
4157
- var EChartsDarkTheme = {
4158
- backgroundColor: '#393939',
4159
- textStyle: {
4160
- color: '#ffffff',
4161
- fontSize: '10px',
4162
- fontWeight: '400'
4044
+ // https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/6093e5dc12278e35d433aa2d
4045
+ var colors = {
4046
+ background: {
4047
+ surface: '#9e1f1e',
4048
+ surfaceApp: '#740c16',
4049
+ surfaceBrowser: '#5d111b'
4163
4050
  },
4164
- title: {
4165
- textStyle: {
4166
- color: '#ffffff'
4167
- },
4168
- subtextStyle: {
4169
- color: '#ffffff'
4170
- }
4051
+ brand: {
4052
+ brand: '#5d111b'
4171
4053
  },
4172
- line: {
4173
- itemStyle: {
4174
- borderWidth: 1
4054
+ buttons: {
4055
+ primary: {
4056
+ "default": {
4057
+ fill: '#04501e',
4058
+ color: '#FFFFFF',
4059
+ borderColor: 'transparent'
4060
+ },
4061
+ mouseOver: {
4062
+ fill: '#033E1A',
4063
+ color: '#FFFFFF',
4064
+ borderColor: '#9e1f1e'
4065
+ },
4066
+ active: {
4067
+ fill: '#05662a',
4068
+ color: '#FFFFFF',
4069
+ borderColor: 'transparent'
4070
+ },
4071
+ activeMouseOver: {},
4072
+ disabled: {
4073
+ fill: 'transparent',
4074
+ color: '#B4B4B4',
4075
+ borderColor: 'transparent'
4076
+ },
4077
+ focus: focusButtonStyle
4175
4078
  },
4176
- lineStyle: {
4177
- width: 2
4079
+ secondary: {
4080
+ "default": {
4081
+ fill: '#04501e',
4082
+ color: '#374061',
4083
+ borderColor: 'transparent'
4084
+ },
4085
+ mouseOver: {
4086
+ fill: '#033E1A',
4087
+ color: '#FFFFFF',
4088
+ borderColor: '#transparent'
4089
+ },
4090
+ active: {
4091
+ fill: '#05662a',
4092
+ color: '#FFFFFF',
4093
+ borderColor: 'transparent'
4094
+ },
4095
+ activeMouseOver: {},
4096
+ disabled: {
4097
+ fill: 'transparent',
4098
+ color: '#B4B4B4',
4099
+ borderColor: 'transparent'
4100
+ },
4101
+ focus: focusButtonStyle
4178
4102
  },
4179
- symbolSize: 4,
4180
- symbol: 'circle',
4181
- smooth: false
4182
- },
4183
- bar: {
4184
- itemStyle: {
4185
- barBorderWidth: 0,
4186
- barBorderColor: '#ccc'
4187
- }
4188
- },
4189
- scatter: {
4190
- itemStyle: {
4191
- borderWidth: 0,
4192
- borderColor: '#ccc'
4193
- }
4194
- },
4195
- categoryAxis: {
4196
- axisLine: {
4197
- show: true,
4198
- lineStyle: {
4199
- color: '#979797'
4200
- }
4103
+ tertiary: {
4104
+ "default": {
4105
+ fill: 'transparent',
4106
+ color: '#F8F9F9',
4107
+ borderColor: '#F8F9F9'
4108
+ },
4109
+ mouseOver: {
4110
+ fill: '#033E1A',
4111
+ color: '#F8F9F9',
4112
+ borderColor: '#F8F9F9'
4113
+ },
4114
+ active: {
4115
+ fill: 'transparent',
4116
+ color: '#FFFFFF',
4117
+ borderColor: '#FFFFFF'
4118
+ },
4119
+ activeMouseOver: {
4120
+ fill: '#033E1A',
4121
+ color: '#FFFFFF',
4122
+ borderColor: '#FFFFFF'
4123
+ },
4124
+ disabled: {
4125
+ fill: 'transparent',
4126
+ color: '#B4B4B4',
4127
+ borderColor: 'transparent'
4128
+ },
4129
+ focus: focusButtonStyle
4201
4130
  },
4202
- axisTick: {
4203
- show: true,
4204
- lineStyle: {
4205
- color: '#979797'
4131
+ flat: {
4132
+ "default": {
4133
+ fill: 'transparent',
4134
+ color: '#F8F9F9',
4135
+ borderColor: 'transparent'
4136
+ },
4137
+ mouseOver: {
4138
+ fill: '#45556F',
4139
+ color: '#F8F9F9',
4140
+ borderColor: 'transparent'
4141
+ },
4142
+ active: {
4143
+ fill: 'transparent',
4144
+ color: '#FFFFFF',
4145
+ borderColor: 'transparent'
4146
+ },
4147
+ activeMouseOver: {
4148
+ fill: '#45556F',
4149
+ color: '#FFFFFF',
4150
+ borderColor: 'transparent'
4151
+ },
4152
+ disabled: {
4153
+ fill: 'transparent',
4154
+ color: '#B4B4B4',
4155
+ borderColor: 'transparent'
4156
+ },
4157
+ focus: focusButtonStyle
4158
+ },
4159
+ tool: {
4160
+ "default": {
4161
+ fill: '#04501e',
4162
+ color: '#F8F9F9',
4163
+ borderColor: 'transparent'
4164
+ },
4165
+ mouseOver: {
4166
+ fill: '#033E1A',
4167
+ color: '#F8F9F9',
4168
+ borderColor: 'transparent'
4169
+ },
4170
+ active: {
4171
+ fill: '#05662a',
4172
+ color: '#FFFFFF',
4173
+ borderColor: 'transparent'
4174
+ },
4175
+ activeMouseOver: {
4176
+ fill: '#05662a',
4177
+ color: '#FFFFFF',
4178
+ borderColor: 'transparent'
4179
+ },
4180
+ disabled: {
4181
+ fill: 'transparent',
4182
+ color: '#B4B4B4',
4183
+ borderColor: 'transparent'
4184
+ },
4185
+ focus: focusButtonStyle
4186
+ },
4187
+ boxed: {
4188
+ "default": {
4189
+ fill: 'transparent',
4190
+ color: '#F8F9F9',
4191
+ borderColor: '#F8F9F9'
4192
+ },
4193
+ mouseOver: {
4194
+ fill: '#033E1A',
4195
+ color: '#F8F9F9',
4196
+ borderColor: '#F8F9F9'
4197
+ },
4198
+ active: {
4199
+ fill: '#05662a',
4200
+ color: '#FFFFFF',
4201
+ borderColor: 'transparent'
4202
+ },
4203
+ activeMouseOver: {
4204
+ fill: '#033E1A',
4205
+ color: '#FFFFFF',
4206
+ borderColor: 'transparent'
4207
+ },
4208
+ disabled: {
4209
+ fill: 'transparent',
4210
+ color: '#B4B4B4',
4211
+ borderColor: 'transparent'
4212
+ },
4213
+ focus: focusButtonStyle
4214
+ },
4215
+ icon: {
4216
+ "default": {
4217
+ fill: 'transparent',
4218
+ color: '#F8F9F9',
4219
+ borderColor: 'transparent'
4220
+ },
4221
+ mouseOver: {
4222
+ fill: '#033E1A',
4223
+ color: '#F8F9F9',
4224
+ borderColor: 'transparent'
4225
+ },
4226
+ active: {
4227
+ fill: 'transparent',
4228
+ color: '#FFFFFF',
4229
+ borderColor: 'transparent'
4230
+ },
4231
+ activeMouseOver: {
4232
+ fill: '#FFFFFF',
4233
+ color: '#033E1A',
4234
+ borderColor: 'transparent'
4235
+ },
4236
+ disabled: {
4237
+ fill: 'transparent',
4238
+ color: '#B4B4B4',
4239
+ borderColor: 'transparent'
4240
+ },
4241
+ focus: focusButtonStyle
4242
+ }
4243
+ },
4244
+ iconButtons: {
4245
+ flat: {
4246
+ "default": {
4247
+ fill: 'transparent',
4248
+ color: '#F8F9F9',
4249
+ borderColor: 'transparent'
4250
+ },
4251
+ mouseOver: {
4252
+ fill: '#033E1A',
4253
+ color: '#F8F9F9',
4254
+ borderColor: 'transparent'
4255
+ },
4256
+ active: {
4257
+ fill: 'transparent',
4258
+ color: '#BBD4FF',
4259
+ borderColor: 'transparent'
4260
+ },
4261
+ activeMouseOver: {
4262
+ fill: '#033E1A',
4263
+ color: '#BBD4FF',
4264
+ borderColor: 'transparent'
4265
+ },
4266
+ disabled: {
4267
+ fill: 'transparent',
4268
+ color: '#B4B4B4',
4269
+ borderColor: 'transparent'
4270
+ },
4271
+ focus: focusButtonStyle
4272
+ },
4273
+ tool: {
4274
+ "default": {
4275
+ fill: '#393939',
4276
+ color: '#F8F9F9',
4277
+ borderColor: 'transparent'
4278
+ },
4279
+ mouseOver: {
4280
+ fill: '#033E1A',
4281
+ color: '#F8F9F9',
4282
+ borderColor: 'transparent'
4283
+ },
4284
+ active: {
4285
+ fill: '#05662a',
4286
+ color: '#FFFFFF',
4287
+ borderColor: 'transparent'
4288
+ },
4289
+ activeMouseOver: {
4290
+ fill: '#033E1A',
4291
+ color: '#FFFFFF',
4292
+ borderColor: 'transparent'
4293
+ },
4294
+ disabled: {
4295
+ fill: 'transparent',
4296
+ color: '#B4B4B4',
4297
+ borderColor: 'transparent'
4298
+ },
4299
+ focus: focusButtonStyle
4300
+ },
4301
+ boxed: {
4302
+ "default": {
4303
+ fill: 'transparent',
4304
+ color: '#F8F9F9',
4305
+ borderColor: '#F8F9F9'
4306
+ },
4307
+ mouseOver: {
4308
+ fill: '#033E1A',
4309
+ color: '#F8F9F9',
4310
+ borderColor: '#F8F9F9'
4311
+ },
4312
+ active: {
4313
+ fill: '#05662a',
4314
+ color: '#FFFFFF',
4315
+ borderColor: 'transparent'
4316
+ },
4317
+ activeMouseOver: {
4318
+ fill: '#033E1A',
4319
+ color: '#FFFFFF',
4320
+ borderColor: 'transparent'
4321
+ },
4322
+ disabled: {
4323
+ fill: 'transparent',
4324
+ color: '#B4B4B4',
4325
+ borderColor: 'transparent'
4326
+ },
4327
+ focus: focusButtonStyle
4328
+ }
4329
+ },
4330
+ typographyAndIcons: {
4331
+ text: '#FFFFFF',
4332
+ icon: '#FFFFFF',
4333
+ buttonIcon: '#FFFFFF',
4334
+ iconLinkActive: '#05662a',
4335
+ iconLinkDisabled: '#5E5E5E',
4336
+ textLinkActive: '#05662a',
4337
+ buttonIconTertiaryFlat: '#C5C5C5',
4338
+ inactiveText: '#b4b4b4',
4339
+ iconWarning: '#ffa800'
4340
+ },
4341
+ textInputField: {
4342
+ "default": {
4343
+ fill: '#352020',
4344
+ opacity: 1
4345
+ },
4346
+ mouseOver: {
4347
+ fill: '#033E1A',
4348
+ opacity: 1
4349
+ },
4350
+ active: {
4351
+ fill: '#909090',
4352
+ opacity: 0.2
4353
+ },
4354
+ disabled: {
4355
+ color: '#000000',
4356
+ opacity: 0
4357
+ },
4358
+ label: {
4359
+ fill: '#FFFFFF',
4360
+ opacity: 0.7
4361
+ },
4362
+ error: {
4363
+ fill: '#532323',
4364
+ opacity: 1
4365
+ },
4366
+ errorMouseOver: {
4367
+ fill: '#633838',
4368
+ opacity: 1
4369
+ }
4370
+ },
4371
+ menuItem: {
4372
+ mouseOver: '#033e1a',
4373
+ selected: '#05662a',
4374
+ selectedMouseOver: '#033e1a'
4375
+ },
4376
+ tab: {
4377
+ mouseOver: {
4378
+ fill: '#000000',
4379
+ opacity: 0.17
4380
+ }
4381
+ },
4382
+ greys: {
4383
+ accessible: '#B4B4B4',
4384
+ accessibleLight: '#6F6F6F'
4385
+ },
4386
+ cards: {
4387
+ cardContainer: '#311c1c',
4388
+ cardContainerBorder: '#404040',
4389
+ cardContainerMouseOver: '#033E1A',
4390
+ cardContainerDisabled: '#252525',
4391
+ cardContainerDisabledBorder: '#363636',
4392
+ cardContainerDisabledMouseOver: '#45556F'
4393
+ },
4394
+ backdrops: {
4395
+ black: {
4396
+ fill: '#000000',
4397
+ opacity: 0.5
4398
+ },
4399
+ white: {
4400
+ fill: '#FFFFFF',
4401
+ opacity: 0.24
4402
+ }
4403
+ },
4404
+ workspace: {
4405
+ activeWindow: '#05662a',
4406
+ inactiveWindow: '#04501e',
4407
+ tabButtonHover: '#033E1A'
4408
+ },
4409
+ timeSlider: {
4410
+ // player
4411
+ playerNeedleTimeTop: {
4412
+ fill: '#E3004F',
4413
+ opacity: 100
4414
+ },
4415
+ playerNeedleTime: {
4416
+ fill: '#FFD523',
4417
+ opacity: 0.75
4418
+ },
4419
+ playerNeedlePlayerTop: {
4420
+ fill: '#051039',
4421
+ opacity: 100
4422
+ },
4423
+ playerNeedlePlayer: {
4424
+ fill: '#67F0FF',
4425
+ opacity: 0.75
4426
+ },
4427
+ playerTimeMarkers: {
4428
+ fill: '#051039'
4429
+ },
4430
+ playerTimeText: {
4431
+ color: '#FFFFFF',
4432
+ fontFamily: 'Roboto',
4433
+ fontSize: 14
4434
+ },
4435
+ // timeline
4436
+ timelineIndicator: {
4437
+ fill: '#A2A2A2'
4438
+ },
4439
+ timelineText: {
4440
+ fontSize: 12,
4441
+ color: '#FFFFFF',
4442
+ fontFamily: 'Roboto'
4443
+ },
4444
+ timelineTimeScale: {
4445
+ fill: '#FFFFFF'
4446
+ },
4447
+ timelineNightTime: {
4448
+ fill: '#051038',
4449
+ opacity: 0.67
4450
+ },
4451
+ timelineTimelineSurface: {
4452
+ fill: '#044d1e'
4453
+ },
4454
+ timelineMonthChangeDash: {
4455
+ fill: '#A2A2A2',
4456
+ opacity: 0.5
4457
+ },
4458
+ timelineSelectionBackground: {
4459
+ fill: '#FFFFFF',
4460
+ opacity: 0.15
4461
+ },
4462
+ timelineSelectionOutline: {
4463
+ fill: '#F0FF00',
4464
+ opacity: 0.4
4465
+ },
4466
+ // time scale
4467
+ timeScalePointer: {
4468
+ fill: '#F8F9F9'
4469
+ },
4470
+ timeScaleHorizontalScale: {
4471
+ fill: '#000000',
4472
+ opacity: 0.8
4473
+ },
4474
+ timeScaleTimeIndicators: {
4475
+ fill: '#A2A2A2'
4476
+ },
4477
+ timeScaleTimeIndicatorsActive: {
4478
+ fill: '#FFFFFF'
4479
+ },
4480
+ timeScaleShadowButtonScale: {
4481
+ filter: 'drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.28)) drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.24)) drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.40))'
4482
+ },
4483
+ // legend
4484
+ ledgendObservedBackground: {
4485
+ fill: '#d54847'
4486
+ },
4487
+ legendForecastBackground: {
4488
+ fill: '#056628'
4489
+ },
4490
+ legendNoDataBackground: {
4491
+ fill: '#5d111b',
4492
+ opacity: 0.95
4493
+ }
4494
+ },
4495
+ timeSliderLite: {
4496
+ selected: {
4497
+ backgroundColor: '#EEF4FB'
4498
+ },
4499
+ needle: {
4500
+ stroke: '#ff0829'
4501
+ },
4502
+ needleDefault: {
4503
+ stroke: '#3BA587'
4504
+ },
4505
+ needleShadow: {
4506
+ stroke: '#E7F0FA'
4507
+ },
4508
+ needleLabel: {
4509
+ backgroundColor: '#212121',
4510
+ borderColor: '#9e9e9e',
4511
+ color: '#FFFFFF'
4512
+ },
4513
+ timeline: {
4514
+ fill: '#FFFFFF',
4515
+ stroke: '#FFFFFF'
4516
+ },
4517
+ timelineBackground: {
4518
+ fill: '#2959E0',
4519
+ color: '#FFFFFF'
4520
+ },
4521
+ timelineBackgroundAlternative: {
4522
+ fill: '#4871E5',
4523
+ color: '#FFFFFF'
4524
+ },
4525
+ timelineBackgroundDisabled: {
4526
+ fill: '#767E93',
4527
+ color: '#FFFFFF'
4528
+ },
4529
+ timelineBackgroundDisabledAlternative: {
4530
+ fill: '#8A91A3',
4531
+ color: '#FFFFFF'
4532
+ },
4533
+ timelineBackgroundObserved: {
4534
+ fill: '#8A91A3',
4535
+ color: '#FFFFFF'
4536
+ },
4537
+ timelineBackgroundObservedAlternative: {
4538
+ fill: '#767E93',
4539
+ color: '#FFFFFF'
4540
+ }
4541
+ },
4542
+ customSlider: {
4543
+ rail: '#068032',
4544
+ railDisabled: '#5E5E5E',
4545
+ track: '#186DFF',
4546
+ trackDisabled: '#5E5E5E',
4547
+ thumb: '#F8F9F9',
4548
+ thumbDisabled: '#5E5E5E',
4549
+ mark: '#FFFFFF',
4550
+ markDisabled: '#044d1e'
4551
+ },
4552
+ customSwitch: {
4553
+ thumb: '#F8F9F9',
4554
+ thumbDisabled: '#F5F5F5',
4555
+ track: '#BDBDBD',
4556
+ trackActive: '#068032'
4557
+ },
4558
+ syncGroups: {
4559
+ drawerOpen: {
4560
+ fill: '#232323'
4561
+ }
4562
+ },
4563
+ layerManager: {
4564
+ headerRowText: {
4565
+ color: '#FFFFFF',
4566
+ opacity: 0.67,
4567
+ fontSize: 12
4568
+ },
4569
+ tableRowDefaultText: {
4570
+ color: '#FFFFFF',
4571
+ opacity: 0.87,
4572
+ fontSize: 12
4573
+ },
4574
+ tableRowDefaultCardContainer: {
4575
+ fill: '#352020',
4576
+ border: '1px solid #9e1f1e',
4577
+ borderColor: '#9e1f1e'
4578
+ },
4579
+ tableRowDisabledText: {
4580
+ color: '#909090',
4581
+ opacity: 0.87,
4582
+ fontSize: 12
4583
+ },
4584
+ tableRowDisabledCardContainer: {
4585
+ fill: '#06402B',
4586
+ border: '1px solid #9e1f1e',
4587
+ borderColor: '#9e1f1e'
4588
+ },
4589
+ dragHandleHover: {
4590
+ backgroundColor: 'transparent'
4591
+ },
4592
+ root: {},
4593
+ opacitySelect: {
4594
+ root: {},
4595
+ button: {},
4596
+ popper: {}
4597
+ },
4598
+ baseLayerRow: {
4599
+ root: {}
4600
+ }
4601
+ },
4602
+ logo: {
4603
+ image: 'assets/themes/xmas2024/app_icon.png'
4604
+ },
4605
+ tooltips: {
4606
+ tooltipContainer: {
4607
+ fill: '#232323',
4608
+ opacity: 1
4609
+ },
4610
+ tooltipText: {
4611
+ color: '#FFFFFF'
4612
+ },
4613
+ tooltipSelect: {
4614
+ select: {},
4615
+ menu: {}
4616
+ }
4617
+ },
4618
+ captions: {
4619
+ captionStatus: {
4620
+ color: '#FFFFFF',
4621
+ opacity: 0.67
4622
+ },
4623
+ captionInformation: {
4624
+ color: '#FFFFFF',
4625
+ opacity: 1
4626
+ },
4627
+ captionError: {
4628
+ color: '#FF8F8F',
4629
+ opacity: 1
4630
+ },
4631
+ captionErrorBackground: {
4632
+ color: '#C00000',
4633
+ opacity: 0.25
4634
+ },
4635
+ captionDisabled: {
4636
+ color: '#B0B0B0',
4637
+ opacity: 1
4638
+ }
4639
+ },
4640
+ functional: {
4641
+ success: '#72BB23',
4642
+ successOutline: {
4643
+ fill: 'rgba(114, 187, 35, 0.25)',
4644
+ border: '1px solid #72BB23',
4645
+ borderColor: '#72BB23'
4646
+ },
4647
+ error: '#C00000',
4648
+ errorOutline: {
4649
+ fill: 'rgba(192, 0, 0, 0.25)',
4650
+ border: '1px solid #C00000',
4651
+ borderColor: '#C00000'
4652
+ },
4653
+ warning: '#FFA800',
4654
+ warningOutline: {
4655
+ fill: 'rgba(255, 168, 0, 0.25)',
4656
+ border: '1px solid #FFA800',
4657
+ borderColor: '#FFA800'
4658
+ },
4659
+ warningHighlight: {
4660
+ fill: '#FFA800',
4661
+ opacity: 0.2
4662
+ },
4663
+ notification: '#186DFF',
4664
+ notificationOutline: {
4665
+ fill: 'rgba(24, 109, 255, 0.25)',
4666
+ border: '1px solid #186DFF',
4667
+ borderColor: '#186DFF'
4668
+ },
4669
+ summary: '#9595FF',
4670
+ summaryOutline: {
4671
+ fill: 'rgba(131, 131, 242, 0.25)',
4672
+ border: '1px solid #8383F2',
4673
+ borderColor: '#8383F2'
4674
+ },
4675
+ disabled: '#9B9FB0',
4676
+ disabledOutline: {
4677
+ fill: 'rgba(155, 159, 176, 0.25)',
4678
+ border: '1px solid #9B9FB0',
4679
+ borderColor: '#9B9FB0'
4680
+ }
4681
+ },
4682
+ snackbar: {
4683
+ background: '#051039',
4684
+ text: '#FFFFFF',
4685
+ action: '#FFFFFF',
4686
+ actionHover: {
4687
+ fill: '#FFFFFF',
4688
+ opacity: 0.2
4689
+ }
4690
+ },
4691
+ festoonOverlay: {
4692
+ position: 'absolute',
4693
+ top: '-70px',
4694
+ width: '100%',
4695
+ height: '100%',
4696
+ backgroundImage: 'url("assets/themes/xmas2024/xmasRibbon.png")',
4697
+ backgroundRepeat: 'repeat-x',
4698
+ backgroundSize: '460px',
4699
+ pointerEvents: 'none',
4700
+ zIndex: 1000
4701
+ },
4702
+ festoonContainer: {
4703
+ width: '100%',
4704
+ height: '20px',
4705
+ position: 'relative',
4706
+ paddingTop: '50px',
4707
+ backgroundColor: '#FFFFFF'
4708
+ },
4709
+ festoonBackdrop: {
4710
+ backgroundImage: 'linear-gradient(to bottom, rgba(20, 20, 20, 0.85), rgba(255, 150, 20, 0.2)), url("assets/themes/xmas2024/santa100th.png")',
4711
+ backgroundSize: '100%',
4712
+ backgroundColor: 'rgba(0, 35, 65, 0.95)',
4713
+ backgroundRepeat: 'no-repeat'
4714
+ }
4715
+ };
4716
+ // https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/6093e694124ecf3886de76d4
4717
+ var elevations = {
4718
+ elevation_01: '0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)',
4719
+ elevation_02: '0 1px 5px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.14)',
4720
+ elevation_03: '0 1px 8px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 3px 3px 0 rgba(0, 0, 0, 0.14)',
4721
+ elevation_04: '0 1px 10px 0 rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.14)',
4722
+ elevation_06: '0 3px 5px 0 rgba(0, 0, 0, 0.2), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 6px 10px 0 rgba(0, 0, 0, 0.14)',
4723
+ elevation_08: '0 4px 5px 0 rgba(0, 0, 0, 0.2), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 8px 10px 1px rgba(0, 0, 0, 0.14)',
4724
+ elevation_09: '0 5px 6px 0 rgba(0, 0, 0, 0.2), 0 3px 16px 2px rgba(0, 0, 0, 0.12), 0 9px 12px 1px rgba(0, 0, 0, 0.14)',
4725
+ elevation_12: '0 7px 8px 0 rgba(0, 0, 0, 0.2), 0 5px 22px 4px rgba(0, 0, 0, 0.12), 0 12px 17px 2px rgba(0, 0, 0, 0.14)',
4726
+ elevation_16: '0 8px 10px 0 rgba(0, 0, 0, 0.2), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 16px 24px 2px rgba(0, 0, 0, 0.14)',
4727
+ elevation_24: '0 11px 15px 0 rgba(0, 0, 0, 0.2), 0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 24px 38px 3px rgba(0, 0, 0, 0.14)'
4728
+ };
4729
+
4730
+ /* *
4731
+ * Licensed under the Apache License, Version 2.0 (the "License");
4732
+ * you may not use this file except in compliance with the License.
4733
+ * You may obtain a copy of the License at
4734
+ *
4735
+ * http://www.apache.org/licenses/LICENSE-2.0
4736
+ *
4737
+ * Unless required by applicable law or agreed to in writing, software
4738
+ * distributed under the License is distributed on an "AS IS" BASIS,
4739
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4740
+ * See the License for the specific language governing permissions and
4741
+ * limitations under the License.
4742
+ *
4743
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4744
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
4745
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4746
+ * */
4747
+ var ThemeTypes;
4748
+ (function (ThemeTypes) {
4749
+ ThemeTypes["DARK_THEME"] = "darkTheme";
4750
+ ThemeTypes["LIGHT_THEME"] = "lightTheme";
4751
+ ThemeTypes["XMAS2024_THEME"] = "xmas2024Theme";
4752
+ })(ThemeTypes || (ThemeTypes = {}));
4753
+
4754
+ /* *
4755
+ * Licensed under the Apache License, Version 2.0 (the "License");
4756
+ * you may not use this file except in compliance with the License.
4757
+ * You may obtain a copy of the License at
4758
+ *
4759
+ * http://www.apache.org/licenses/LICENSE-2.0
4760
+ *
4761
+ * Unless required by applicable law or agreed to in writing, software
4762
+ * distributed under the License is distributed on an "AS IS" BASIS,
4763
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4764
+ * See the License for the specific language governing permissions and
4765
+ * limitations under the License.
4766
+ *
4767
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4768
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
4769
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4770
+ * */
4771
+ var getThemeByName = function getThemeByName(themeName) {
4772
+ switch (themeName) {
4773
+ case ThemeTypes.DARK_THEME:
4774
+ return namedDarkTheme;
4775
+ case ThemeTypes.LIGHT_THEME:
4776
+ return namedLightTheme;
4777
+ case ThemeTypes.XMAS2024_THEME:
4778
+ return namedXmas2024Theme;
4779
+ default:
4780
+ return namedLightTheme;
4781
+ }
4782
+ };
4783
+ var lightTheme = createTheme({
4784
+ paletteType: 'light',
4785
+ geowebColors: colors$2,
4786
+ elevations: elevations$2
4787
+ });
4788
+ var darkTheme = createTheme({
4789
+ paletteType: 'dark',
4790
+ geowebColors: colors$1,
4791
+ elevations: elevations$1
4792
+ });
4793
+ var xmas2024Theme = createTheme({
4794
+ paletteType: 'dark',
4795
+ geowebColors: colors,
4796
+ elevations: elevations
4797
+ });
4798
+ var namedLightTheme = {
4799
+ name: ThemeTypes.LIGHT_THEME,
4800
+ theme: lightTheme
4801
+ };
4802
+ var namedDarkTheme = {
4803
+ name: ThemeTypes.DARK_THEME,
4804
+ theme: darkTheme
4805
+ };
4806
+ var namedXmas2024Theme = {
4807
+ name: ThemeTypes.XMAS2024_THEME,
4808
+ theme: xmas2024Theme
4809
+ };
4810
+
4811
+ var ThemeContext = /*#__PURE__*/React.createContext({
4812
+ setThemeName: undefined,
4813
+ namedTheme: undefined
4814
+ });
4815
+ var ThemeProvider = function ThemeProvider(_ref) {
4816
+ var children = _ref.children,
4817
+ theme = _ref.theme,
4818
+ defaultThemeName = _ref.defaultThemeName,
4819
+ _ref$disableCssBaseli = _ref.disableCssBaseline,
4820
+ disableCssBaseline = _ref$disableCssBaseli === void 0 ? false : _ref$disableCssBaseli;
4821
+ var _React$useState = React.useState(getThemeByName(defaultThemeName || ThemeTypes.LIGHT_THEME)),
4822
+ configuredTheme = _React$useState[0],
4823
+ setConfiguredTheme = _React$useState[1];
4824
+ var currentTheme = React.useMemo(function () {
4825
+ return theme || configuredTheme.theme;
4826
+ }, [configuredTheme, theme]);
4827
+ var setThemeName = React.useCallback(function (themeName) {
4828
+ setConfiguredTheme(getThemeByName(themeName));
4829
+ }, []);
4830
+ var contextValue = React.useMemo(function () {
4831
+ return {
4832
+ setThemeName: setThemeName,
4833
+ namedTheme: configuredTheme
4834
+ };
4835
+ }, [configuredTheme, setThemeName]);
4836
+ return jsx(ThemeContext.Provider, {
4837
+ value: contextValue,
4838
+ children: jsxs(ThemeProvider$1, {
4839
+ theme: currentTheme,
4840
+ children: [!disableCssBaseline && jsx(CssBaseline, {}), jsx(GlobalStyles, {
4841
+ styles: {
4842
+ '@keyframes mui-auto-fill': {
4843
+ from: {
4844
+ display: 'block'
4845
+ }
4846
+ },
4847
+ '@keyframes mui-auto-fill-cancel': {
4848
+ from: {
4849
+ display: 'block'
4850
+ }
4851
+ }
4852
+ }
4853
+ }), children]
4854
+ })
4855
+ });
4856
+ };
4857
+ var useThemeContext = function useThemeContext() {
4858
+ return React.useContext(ThemeContext);
4859
+ };
4860
+ // Wrapper for storybook stories. Will include later an additional wrapper after upgrade to MUI5
4861
+ var ThemeWrapper = function ThemeWrapper(_ref2) {
4862
+ var children = _ref2.children,
4863
+ theme = _ref2.theme,
4864
+ defaultThemeName = _ref2.defaultThemeName,
4865
+ _ref2$disableCssBasel = _ref2.disableCssBaseline,
4866
+ disableCssBaseline = _ref2$disableCssBasel === void 0 ? false : _ref2$disableCssBasel;
4867
+ return jsx(StyledEngineProvider, {
4868
+ injectFirst: true,
4869
+ children: jsx(ThemeProvider, {
4870
+ theme: theme,
4871
+ defaultThemeName: defaultThemeName,
4872
+ disableCssBaseline: disableCssBaseline,
4873
+ children: children
4874
+ })
4875
+ });
4876
+ };
4877
+
4878
+ /* *
4879
+ * Licensed under the Apache License, Version 2.0 (the "License");
4880
+ * you may not use this file except in compliance with the License.
4881
+ * You may obtain a copy of the License at
4882
+ *
4883
+ * http://www.apache.org/licenses/LICENSE-2.0
4884
+ *
4885
+ * Unless required by applicable law or agreed to in writing, software
4886
+ * distributed under the License is distributed on an "AS IS" BASIS,
4887
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4888
+ * See the License for the specific language governing permissions and
4889
+ * limitations under the License.
4890
+ *
4891
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4892
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
4893
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4894
+ * */
4895
+ var EChartsDarkTheme = {
4896
+ backgroundColor: '#393939',
4897
+ textStyle: {
4898
+ color: '#ffffff',
4899
+ fontSize: '10px',
4900
+ fontWeight: '400'
4901
+ },
4902
+ title: {
4903
+ textStyle: {
4904
+ color: '#ffffff'
4905
+ },
4906
+ subtextStyle: {
4907
+ color: '#ffffff'
4908
+ }
4909
+ },
4910
+ line: {
4911
+ itemStyle: {
4912
+ borderWidth: 1
4913
+ },
4914
+ lineStyle: {
4915
+ width: 2
4916
+ },
4917
+ symbolSize: 4,
4918
+ symbol: 'circle',
4919
+ smooth: false
4920
+ },
4921
+ bar: {
4922
+ itemStyle: {
4923
+ barBorderWidth: 0,
4924
+ barBorderColor: '#ccc'
4925
+ }
4926
+ },
4927
+ scatter: {
4928
+ itemStyle: {
4929
+ borderWidth: 0,
4930
+ borderColor: '#ccc'
4931
+ }
4932
+ },
4933
+ categoryAxis: {
4934
+ axisLine: {
4935
+ show: true,
4936
+ lineStyle: {
4937
+ color: '#979797'
4938
+ }
4939
+ },
4940
+ axisTick: {
4941
+ show: true,
4942
+ lineStyle: {
4943
+ color: '#979797'
4206
4944
  }
4207
4945
  },
4208
4946
  axisLabel: {
@@ -4685,4 +5423,100 @@ var EChartsLightTheme = {
4685
5423
  * */
4686
5424
  var THEME_NAMESPACE = 'theme';
4687
5425
 
4688
- export { Add, Admin, Animation, ArrowDown, ArrowDownCompact, ArrowDropDownDown, ArrowDropDownUp, ArrowLeft, ArrowRight, ArrowUp, ArrowUpCompact, AutoUpdateActive, AutoUpdateInActive, Both, Cached, CalendarToday, Cancel, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Clear, Clock, Close, CloudIdle, CloudLoading, CoastalEvent, CollapseLarge, CollapseMedium, CollapseSmall, CollapseWindow, ColumnCollapse, ColumnCollapsed, Copy, Delete, DimensionsElevation, DimensionsOther, DimensionsRefTime, DimensionsTime, DragHandle, DrawFIRLand, DrawPolygon, DrawRegion, EChartsDarkTheme, EChartsLightTheme, Edit, Equalizer, Exclamation, ExitDomain, Expand, ExpandWindow, Expire, Export, FastForward, Filter, FlagBritain, FlagFinland, FlagNetherlands, FlagNorway, Fog, FreezingPrecipitation, FunnelCloud, GeoWebLogo, HamburgerMenu, Haze, Home, index as Icons, Info, KeyCommand, KeyOption, Layers, LayersAdd, Lightning, Link, LinkOff, List, ListItem, Location, LockLocked, LockUnlocked, MapAdd, Menu, Minus, ModerateAircraftIcing, ModerateTurbulence, MyLocation, None, Notifications, Now, Options, Pause, Picture, Play, Polygons, Preset, PresetTiles, PresetWorkspace, RadioactiveMaterials, Rain, Remove, Resize, SandStorm, Search, SevereAircraftIcing, SevereTurbulence, SevereWaves, Share, SliderThumb, Snow, Speed, SplitHorizontal, SplitVertical, StepBackward, StepForward, SubdirectoryArrowRight, Success, THEME_NAMESPACE, TemperatureHigh, TemperatureLow, TextIcon, ThemeContext, ThemeProvider, ThemeTypes, ThemeWrapper, ThumbsUp, Thunderstorm, TimeSeriesSelect, UnExpand, Update, Visibility, VisibilityOff, VulcanicEruption, WebAssetOff, Wind, WorldMapProjection, breakpoints, colors$1 as colorsLight, createShadows, createTheme, darkTheme, dragHandlePath, elevations$1 as elevationsLight, lightTheme, parseColors, themeTranslations, useThemeContext };
5426
+ var Snowflake = styled('div')(function () {
5427
+ return {
5428
+ '--fall-duration': Math.random() * 10 + 10 + "s",
5429
+ '--fall-delay': "-" + Math.random() * 10 + "s",
5430
+ '--sway-delay': "-" + Math.random() * 5 + "s",
5431
+ left: Math.random() * 100 + "%"
5432
+ };
5433
+ });
5434
+ var getSnowflakes = function getSnowflakes() {
5435
+ return range(100).map(function (_, index) {
5436
+ return (
5437
+ // eslint-disable-next-line react/no-array-index-key
5438
+ jsx(Snowflake, {
5439
+ className: "snowflake",
5440
+ children: "\u2744"
5441
+ }, index)
5442
+ );
5443
+ });
5444
+ };
5445
+ // Overlay style
5446
+ var useOverlayStyle = function useOverlayStyle() {
5447
+ var _React$useState = React__default.useState({}),
5448
+ overlayStyle = _React$useState[0],
5449
+ setOverlayStyle = _React$useState[1];
5450
+ var theme = useTheme();
5451
+ var _useThemeContext = useThemeContext(),
5452
+ namedTheme = _useThemeContext.namedTheme;
5453
+ React__default.useEffect(function () {
5454
+ var isXmasStyle = !!theme.palette.geowebColors.festoonOverlay && (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.XMAS2024_THEME;
5455
+ setOverlayStyle(isXmasStyle ? theme.palette.geowebColors.festoonOverlay : {});
5456
+ }, [theme, namedTheme]);
5457
+ return overlayStyle;
5458
+ };
5459
+ var OverlayStyle = function OverlayStyle() {
5460
+ var defaultStyle = {};
5461
+ var style = useOverlayStyle();
5462
+ return style === {} ? defaultStyle : style;
5463
+ };
5464
+ // Container style
5465
+ var useContainerStyle = function useContainerStyle() {
5466
+ var _React$useState2 = React__default.useState({}),
5467
+ containerStyle = _React$useState2[0],
5468
+ setContainerStyle = _React$useState2[1];
5469
+ var theme = useTheme();
5470
+ var _useThemeContext2 = useThemeContext(),
5471
+ namedTheme = _useThemeContext2.namedTheme;
5472
+ React__default.useEffect(function () {
5473
+ var isXmasStyle = !!theme.palette.geowebColors.festoonContainer && (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.XMAS2024_THEME;
5474
+ setContainerStyle(isXmasStyle ? theme.palette.geowebColors.festoonContainer : {});
5475
+ }, [theme, namedTheme]);
5476
+ return containerStyle;
5477
+ };
5478
+ var ContainerStyle = function ContainerStyle() {
5479
+ var defaultStyle = {};
5480
+ var style = useContainerStyle();
5481
+ return style === {} ? defaultStyle : style;
5482
+ };
5483
+ // Backdrop style
5484
+ var useBackdropStyle = function useBackdropStyle() {
5485
+ var _React$useState3 = React__default.useState({}),
5486
+ backdropStyle = _React$useState3[0],
5487
+ setBackdropStyle = _React$useState3[1];
5488
+ var theme = useTheme();
5489
+ var _useThemeContext3 = useThemeContext(),
5490
+ namedTheme = _useThemeContext3.namedTheme;
5491
+ React__default.useEffect(function () {
5492
+ var isXmasThemeStyle = !!theme.palette.geowebColors.festoonBackdrop && (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.XMAS2024_THEME;
5493
+ setBackdropStyle(isXmasThemeStyle ? theme.palette.geowebColors.festoonBackdrop : {});
5494
+ }, [theme, namedTheme]);
5495
+ return backdropStyle;
5496
+ };
5497
+ var BackdropStyle = function BackdropStyle() {
5498
+ var defaultStyle = {};
5499
+ var style = useBackdropStyle();
5500
+ return style === {} ? defaultStyle : style;
5501
+ };
5502
+ // Backdrop element
5503
+ var useBackdropElement = function useBackdropElement() {
5504
+ var _React$useState4 = React__default.useState(null),
5505
+ backdropElement = _React$useState4[0],
5506
+ setBackdropElement = _React$useState4[1];
5507
+ var theme = useTheme();
5508
+ var _useThemeContext4 = useThemeContext(),
5509
+ namedTheme = _useThemeContext4.namedTheme;
5510
+ React__default.useEffect(function () {
5511
+ var isXmasThemeElem = !!theme.palette.geowebColors.festoonBackdrop && (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.XMAS2024_THEME;
5512
+ setBackdropElement(isXmasThemeElem ? getSnowflakes() : null);
5513
+ }, [theme, namedTheme]);
5514
+ return backdropElement;
5515
+ };
5516
+ var BackdropElement = function BackdropElement() {
5517
+ var defaultElem = null;
5518
+ var elem = useBackdropElement();
5519
+ return elem === null ? defaultElem : elem;
5520
+ };
5521
+
5522
+ export { Add, Admin, Animation, ArrowDown, ArrowDownCompact, ArrowDropDownDown, ArrowDropDownUp, ArrowLeft, ArrowRight, ArrowUp, ArrowUpCompact, AutoUpdateActive, AutoUpdateInActive, BackdropElement, BackdropStyle, Both, Cached, CalendarToday, Cancel, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Clear, Clock, Close, CloudIdle, CloudLoading, CoastalEvent, CollapseLarge, CollapseMedium, CollapseSmall, CollapseWindow, ColumnCollapse, ColumnCollapsed, ContainerStyle, Copy, Delete, DimensionsElevation, DimensionsOther, DimensionsRefTime, DimensionsTime, DragHandle, DrawFIRLand, DrawPolygon, DrawRegion, EChartsDarkTheme, EChartsLightTheme, Edit, Equalizer, Exclamation, ExitDomain, Expand, ExpandWindow, Expire, Export, FastForward, Filter, FlagBritain, FlagFinland, FlagNetherlands, FlagNorway, Fog, FreezingPrecipitation, FunnelCloud, GeoWebLogo, HamburgerMenu, Haze, Home, index as Icons, Info, KeyCommand, KeyOption, Layers, LayersAdd, Lightning, Link, LinkOff, List, ListItem, Location, LockLocked, LockUnlocked, MapAdd, Menu, Minus, ModerateAircraftIcing, ModerateTurbulence, MyLocation, None, Notifications, Now, Options, OverlayStyle, Pause, Picture, Play, Polygons, Preset, PresetTiles, PresetWorkspace, RadioactiveMaterials, Rain, Remove, Resize, SandStorm, Search, SevereAircraftIcing, SevereTurbulence, SevereWaves, Share, SliderThumb, Snow, Speed, SplitHorizontal, SplitVertical, StepBackward, StepForward, SubdirectoryArrowRight, Success, THEME_NAMESPACE, TemperatureHigh, TemperatureLow, TextIcon, ThemeContext, ThemeProvider, ThemeTypes, ThemeWrapper, ThumbsUp, Thunderstorm, TimeSeriesSelect, UnExpand, Update, Visibility, VisibilityOff, VulcanicEruption, WebAssetOff, Wind, WorldMapProjection, breakpoints, colors$2 as colorsLight, createShadows, createTheme, darkTheme, dragHandlePath, elevations$2 as elevationsLight, getThemeByName, lightTheme, namedDarkTheme, namedLightTheme, namedXmas2024Theme, parseColors, themeTranslations, useThemeContext, xmas2024Theme };