@opengeoweb/theme 14.2.1 → 14.2.2
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 +32 -55
- package/package.json +2 -3
- package/src/index.d.ts +1 -1
- package/src/lib/types.d.ts +1 -1
- package/src/lib/utils/themes/BackdropDecoration.d.ts +0 -3
- package/src/lib/utils/themes/index.d.ts +2 -2
- package/index.esm.css +0 -45
- /package/src/lib/utils/themes/{xmas2024/xmas2024Theme.d.ts → xmas/xmasTheme.d.ts} +0 -0
package/index.esm.js
CHANGED
|
@@ -3,8 +3,6 @@ import { SvgIcon, createTheme as createTheme$1, ThemeProvider as ThemeProvider$1
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import 'i18next';
|
|
5
5
|
import 'react-i18next';
|
|
6
|
-
import styled from '@emotion/styled';
|
|
7
|
-
import { range } from 'lodash';
|
|
8
6
|
|
|
9
7
|
var en = {
|
|
10
8
|
theme: "Theme"
|
|
@@ -1967,7 +1965,7 @@ var ThemeTypes;
|
|
|
1967
1965
|
(function (ThemeTypes) {
|
|
1968
1966
|
ThemeTypes["DARK_THEME"] = "darkTheme";
|
|
1969
1967
|
ThemeTypes["LIGHT_THEME"] = "lightTheme";
|
|
1970
|
-
ThemeTypes["
|
|
1968
|
+
ThemeTypes["XMAS_THEME"] = "xmasTheme";
|
|
1971
1969
|
ThemeTypes["EUMETNET_THEME"] = "eumetnetTheme";
|
|
1972
1970
|
ThemeTypes["DEMO_THEME"] = "demoTheme";
|
|
1973
1971
|
})(ThemeTypes || (ThemeTypes = {}));
|
|
@@ -6275,7 +6273,7 @@ var colors = Object.assign({}, colors$4, {
|
|
|
6275
6273
|
}
|
|
6276
6274
|
},
|
|
6277
6275
|
logo: {
|
|
6278
|
-
image: 'assets/themes/
|
|
6276
|
+
image: 'assets/themes/xmas/app_icon.png'
|
|
6279
6277
|
},
|
|
6280
6278
|
tooltips: {
|
|
6281
6279
|
tooltipContainer: {
|
|
@@ -6368,7 +6366,7 @@ var colors = Object.assign({}, colors$4, {
|
|
|
6368
6366
|
top: '-70px',
|
|
6369
6367
|
width: '100%',
|
|
6370
6368
|
height: '100%',
|
|
6371
|
-
backgroundImage: 'url("assets/themes/
|
|
6369
|
+
backgroundImage: 'url("assets/themes/xmas/xmasRibbon.png")',
|
|
6372
6370
|
backgroundRepeat: 'repeat-x',
|
|
6373
6371
|
backgroundSize: '460px',
|
|
6374
6372
|
pointerEvents: 'none',
|
|
@@ -6382,10 +6380,10 @@ var colors = Object.assign({}, colors$4, {
|
|
|
6382
6380
|
backgroundColor: '#FFFFFF'
|
|
6383
6381
|
},
|
|
6384
6382
|
festoonBackdrop: {
|
|
6385
|
-
backgroundImage: 'linear-gradient(to bottom, rgba(20, 20, 20, 0.85), rgba(255, 150, 20, 0.2)), url("assets/themes/
|
|
6383
|
+
backgroundImage: 'linear-gradient(to bottom, rgba(20, 20, 20, 0.85), rgba(255, 150, 20, 0.2)), url("assets/themes/xmas/santa100th.png")',
|
|
6386
6384
|
backgroundSize: '100%',
|
|
6387
6385
|
backgroundColor: 'rgba(0, 35, 65, 0.95)',
|
|
6388
|
-
backgroundRepeat: '
|
|
6386
|
+
backgroundRepeat: 'repeat'
|
|
6389
6387
|
}
|
|
6390
6388
|
});
|
|
6391
6389
|
// https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/6093e694124ecf3886de76d4
|
|
@@ -6425,8 +6423,8 @@ var getThemeByName = function getThemeByName(themeName) {
|
|
|
6425
6423
|
return namedDarkTheme;
|
|
6426
6424
|
case ThemeTypes.LIGHT_THEME:
|
|
6427
6425
|
return namedLightTheme;
|
|
6428
|
-
case ThemeTypes.
|
|
6429
|
-
return
|
|
6426
|
+
case ThemeTypes.XMAS_THEME:
|
|
6427
|
+
return namedXmasTheme;
|
|
6430
6428
|
case ThemeTypes.DEMO_THEME:
|
|
6431
6429
|
return namedDemoTheme;
|
|
6432
6430
|
case ThemeTypes.EUMETNET_THEME:
|
|
@@ -6445,7 +6443,7 @@ var darkTheme = createTheme({
|
|
|
6445
6443
|
geowebColors: colors$3,
|
|
6446
6444
|
elevations: elevations$3
|
|
6447
6445
|
});
|
|
6448
|
-
var
|
|
6446
|
+
var xmasTheme = createTheme({
|
|
6449
6447
|
paletteType: 'dark',
|
|
6450
6448
|
geowebColors: colors,
|
|
6451
6449
|
elevations: elevations
|
|
@@ -6468,9 +6466,9 @@ var namedDarkTheme = {
|
|
|
6468
6466
|
name: ThemeTypes.DARK_THEME,
|
|
6469
6467
|
theme: darkTheme
|
|
6470
6468
|
};
|
|
6471
|
-
var
|
|
6472
|
-
name: ThemeTypes.
|
|
6473
|
-
theme:
|
|
6469
|
+
var namedXmasTheme = {
|
|
6470
|
+
name: ThemeTypes.XMAS_THEME,
|
|
6471
|
+
theme: xmasTheme
|
|
6474
6472
|
};
|
|
6475
6473
|
var namedDemoTheme = {
|
|
6476
6474
|
name: ThemeTypes.DEMO_THEME,
|
|
@@ -7096,25 +7094,23 @@ var EChartsLightTheme = {
|
|
|
7096
7094
|
* */
|
|
7097
7095
|
var THEME_NAMESPACE = 'theme';
|
|
7098
7096
|
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
});
|
|
7117
|
-
};
|
|
7097
|
+
/* *
|
|
7098
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7099
|
+
* you may not use this file except in compliance with the License.
|
|
7100
|
+
* You may obtain a copy of the License at
|
|
7101
|
+
*
|
|
7102
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7103
|
+
*
|
|
7104
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7105
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
7106
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
7107
|
+
* See the License for the specific language governing permissions and
|
|
7108
|
+
* limitations under the License.
|
|
7109
|
+
*
|
|
7110
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
7111
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
7112
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
7113
|
+
* */
|
|
7118
7114
|
// Overlay style
|
|
7119
7115
|
var useOverlayStyle = function useOverlayStyle() {
|
|
7120
7116
|
var _React$useState = React.useState({}),
|
|
@@ -7124,7 +7120,7 @@ var useOverlayStyle = function useOverlayStyle() {
|
|
|
7124
7120
|
var _useThemeContext = useThemeContext(),
|
|
7125
7121
|
namedTheme = _useThemeContext.namedTheme;
|
|
7126
7122
|
React.useEffect(function () {
|
|
7127
|
-
var isXmasStyle = !!theme.palette.geowebColors.festoonOverlay && (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.
|
|
7123
|
+
var isXmasStyle = !!theme.palette.geowebColors.festoonOverlay && (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.XMAS_THEME;
|
|
7128
7124
|
setOverlayStyle(isXmasStyle ? theme.palette.geowebColors.festoonOverlay : {});
|
|
7129
7125
|
}, [theme, namedTheme]);
|
|
7130
7126
|
return overlayStyle;
|
|
@@ -7143,7 +7139,7 @@ var useContainerStyle = function useContainerStyle() {
|
|
|
7143
7139
|
var _useThemeContext2 = useThemeContext(),
|
|
7144
7140
|
namedTheme = _useThemeContext2.namedTheme;
|
|
7145
7141
|
React.useEffect(function () {
|
|
7146
|
-
var isXmasStyle = !!theme.palette.geowebColors.festoonContainer && (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.
|
|
7142
|
+
var isXmasStyle = !!theme.palette.geowebColors.festoonContainer && (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.XMAS_THEME;
|
|
7147
7143
|
setContainerStyle(isXmasStyle ? theme.palette.geowebColors.festoonContainer : {});
|
|
7148
7144
|
}, [theme, namedTheme]);
|
|
7149
7145
|
return containerStyle;
|
|
@@ -7162,7 +7158,7 @@ var useBackdropStyle = function useBackdropStyle() {
|
|
|
7162
7158
|
var _useThemeContext3 = useThemeContext(),
|
|
7163
7159
|
namedTheme = _useThemeContext3.namedTheme;
|
|
7164
7160
|
React.useEffect(function () {
|
|
7165
|
-
var isXmasThemeStyle =
|
|
7161
|
+
var isXmasThemeStyle = (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.XMAS_THEME && !!theme.palette.geowebColors.festoonBackdrop;
|
|
7166
7162
|
setBackdropStyle(isXmasThemeStyle ? theme.palette.geowebColors.festoonBackdrop : {});
|
|
7167
7163
|
}, [theme, namedTheme]);
|
|
7168
7164
|
return backdropStyle;
|
|
@@ -7172,24 +7168,5 @@ var BackdropStyle = function BackdropStyle() {
|
|
|
7172
7168
|
var style = useBackdropStyle();
|
|
7173
7169
|
return style === {} ? defaultStyle : style;
|
|
7174
7170
|
};
|
|
7175
|
-
// Backdrop element
|
|
7176
|
-
var useBackdropElement = function useBackdropElement() {
|
|
7177
|
-
var _React$useState4 = React.useState(null),
|
|
7178
|
-
backdropElement = _React$useState4[0],
|
|
7179
|
-
setBackdropElement = _React$useState4[1];
|
|
7180
|
-
var theme = useTheme();
|
|
7181
|
-
var _useThemeContext4 = useThemeContext(),
|
|
7182
|
-
namedTheme = _useThemeContext4.namedTheme;
|
|
7183
|
-
React.useEffect(function () {
|
|
7184
|
-
var isXmasThemeElem = !!theme.palette.geowebColors.festoonBackdrop && (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.XMAS2024_THEME;
|
|
7185
|
-
setBackdropElement(isXmasThemeElem ? getSnowflakes() : null);
|
|
7186
|
-
}, [theme, namedTheme]);
|
|
7187
|
-
return backdropElement;
|
|
7188
|
-
};
|
|
7189
|
-
var BackdropElement = function BackdropElement() {
|
|
7190
|
-
var defaultElem = null;
|
|
7191
|
-
var elem = useBackdropElement();
|
|
7192
|
-
return elem != null ? elem : defaultElem;
|
|
7193
|
-
};
|
|
7194
7171
|
|
|
7195
|
-
export { Add, Admin, Animation, ArrowDown, ArrowDownCompact, ArrowDropDownDown, ArrowDropDownUp, ArrowLeft, ArrowRight, ArrowUp, ArrowUpCompact, AutoUpdateActive, AutoUpdateInActive,
|
|
7172
|
+
export { Add, Admin, Animation, ArrowDown, ArrowDownCompact, ArrowDropDownDown, ArrowDropDownUp, ArrowLeft, ArrowRight, ArrowUp, ArrowUpCompact, AutoUpdateActive, AutoUpdateInActive, 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, MeteoGate, Minus, ModerateAircraftIcing, ModerateTurbulence, MyLocation, None, Notifications, Now, Options, OverlayStyle, Overlayers, Pause, Picture, Play, Polygons, Preset, PresetTiles, PresetWorkspace, RadioactiveMaterials, Rain, Remove, Resize, SandStorm, Search, SevereAircraftIcing, SevereMountainWaves, SevereTurbulence, SevereWaves, Share, SharedPresetsMyUser, SharedPresetsOtherUsers, SliderThumb, Snow, Sources, 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, arrowUpPath, breakpoints, colors$4 as colorsLight, createShadows, createTheme, darkTheme, demoTheme, dragHandlePath, elevations$4 as elevationsLight, eumetnetTheme, getThemeByName, lightTheme, locationPath, namedDarkTheme, namedDemoTheme, namedEumetnetTheme, namedLightTheme, namedXmasTheme, parseColors, themeTranslations, useThemeContext, xmasTheme };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/theme",
|
|
3
|
-
"version": "14.2.
|
|
3
|
+
"version": "14.2.2",
|
|
4
4
|
"description": "GeoWeb Theme library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
"@mui/x-date-pickers": "^8.11.2",
|
|
13
13
|
"i18next": "^25.0.1",
|
|
14
14
|
"@mui/material": "^7.0.1",
|
|
15
|
-
"react-i18next": "^15.1.1"
|
|
16
|
-
"lodash": "^4.17.21"
|
|
15
|
+
"react-i18next": "^15.1.1"
|
|
17
16
|
},
|
|
18
17
|
"peerDependencies": {
|
|
19
18
|
"react": "18",
|
package/src/index.d.ts
CHANGED
|
@@ -11,4 +11,4 @@ export * from './lib/types';
|
|
|
11
11
|
export * from './lib/utils/EChartsThemes';
|
|
12
12
|
export { THEME_NAMESPACE } from './lib/utils/i18n';
|
|
13
13
|
export { themeTranslations };
|
|
14
|
-
export { OverlayStyle, ContainerStyle, BackdropStyle,
|
|
14
|
+
export { OverlayStyle, ContainerStyle, BackdropStyle, } from './lib/utils/themes/BackdropDecoration';
|
package/src/lib/types.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface NamedTheme {
|
|
|
11
11
|
export declare enum ThemeTypes {
|
|
12
12
|
DARK_THEME = "darkTheme",
|
|
13
13
|
LIGHT_THEME = "lightTheme",
|
|
14
|
-
|
|
14
|
+
XMAS_THEME = "xmasTheme",
|
|
15
15
|
EUMETNET_THEME = "eumetnetTheme",
|
|
16
16
|
DEMO_THEME = "demoTheme"
|
|
17
17
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './xmas2024/snowflake.css';
|
|
3
1
|
import type { CSSProperties } from '../../types';
|
|
4
2
|
export declare const OverlayStyle: () => CSSProperties | undefined;
|
|
5
3
|
export declare const ContainerStyle: () => CSSProperties | undefined;
|
|
6
4
|
export declare const BackdropStyle: () => CSSProperties | undefined;
|
|
7
|
-
export declare const BackdropElement: () => React.JSX.Element[] | null;
|
|
@@ -4,7 +4,7 @@ import { ThemeTypes } from '../../types';
|
|
|
4
4
|
export declare const getThemeByName: (themeName: ThemeTypes) => NamedTheme;
|
|
5
5
|
export declare const lightTheme: import("@mui/material").Theme;
|
|
6
6
|
export declare const darkTheme: import("@mui/material").Theme;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const xmasTheme: import("@mui/material").Theme;
|
|
8
8
|
export declare const demoTheme: import("@mui/material").Theme;
|
|
9
9
|
export declare const eumetnetTheme: import("@mui/material").Theme;
|
|
10
10
|
export declare const namedLightTheme: {
|
|
@@ -15,7 +15,7 @@ export declare const namedDarkTheme: {
|
|
|
15
15
|
name: ThemeTypes;
|
|
16
16
|
theme: import("@mui/material").Theme;
|
|
17
17
|
};
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const namedXmasTheme: {
|
|
19
19
|
name: ThemeTypes;
|
|
20
20
|
theme: import("@mui/material").Theme;
|
|
21
21
|
};
|
package/index.esm.css
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/* *
|
|
2
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
* you may not use this file except in compliance with the License.
|
|
4
|
-
* You may obtain a copy of the License at
|
|
5
|
-
*
|
|
6
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
*
|
|
8
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
* See the License for the specific language governing permissions and
|
|
12
|
-
* limitations under the License.
|
|
13
|
-
*
|
|
14
|
-
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
15
|
-
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
16
|
-
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
17
|
-
* */
|
|
18
|
-
|
|
19
|
-
.snowflake {
|
|
20
|
-
color: rgb(207, 220, 249);
|
|
21
|
-
width: 10px;
|
|
22
|
-
height: 10px;
|
|
23
|
-
opacity: 50%;
|
|
24
|
-
position: fixed;
|
|
25
|
-
pointer-events: none;
|
|
26
|
-
z-index: 9001;
|
|
27
|
-
animation:
|
|
28
|
-
snow-fall var(--fall-duration) linear var(--fall-delay) infinite forwards,
|
|
29
|
-
snow-sway 5s ease-in-out var(--sway-delay) infinite alternate;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@keyframes snow-sway {
|
|
33
|
-
to {
|
|
34
|
-
transform: translateX(20px);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@keyframes snow-fall {
|
|
39
|
-
from {
|
|
40
|
-
top: -2vw;
|
|
41
|
-
}
|
|
42
|
-
to {
|
|
43
|
-
top: 100%;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
File without changes
|