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