@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/theme",
3
- "version": "9.36.0",
3
+ "version": "10.0.0",
4
4
  "description": "GeoWeb Theme library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -12,7 +12,9 @@
12
12
  "@mui/x-date-pickers": "^7.17.0",
13
13
  "i18next": "^23.11.5",
14
14
  "@mui/material": "^6.1.1",
15
- "react-i18next": "^15.1.1"
15
+ "react-i18next": "^15.1.1",
16
+ "lodash": "^4.17.21",
17
+ "msw": "^1.3.2"
16
18
  },
17
19
  "peerDependencies": {
18
20
  "react": "18",
package/src/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import 'msw';
1
2
  import * as Icons from './lib/components/Icons';
2
3
  import themeTranslations from '../locales/theme.json';
3
4
  export { Icons };
@@ -11,3 +12,4 @@ export * from './lib/types';
11
12
  export * from './lib/utils/EChartsThemes';
12
13
  export { THEME_NAMESPACE } from './lib/utils/i18n';
13
14
  export { themeTranslations };
15
+ export { OverlayStyle, ContainerStyle, BackdropStyle, BackdropElement, } from './lib/utils/themes/BackdropDecoration';
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { Theme as MUITheme } from '@mui/material';
3
- import { ThemeTypes } from '../../types';
3
+ import { NamedTheme, ThemeTypes } from '../../types';
4
4
  interface ThemeContextProps {
5
- toggleTheme?: () => void;
6
- isDark?: boolean;
5
+ setThemeName?: (themeName: ThemeTypes) => void;
6
+ namedTheme?: NamedTheme;
7
7
  }
8
8
  export declare const ThemeContext: React.Context<Partial<ThemeContextProps>>;
9
9
  export interface ThemeProviderProps {
@@ -5,9 +5,14 @@ export interface CSSProperties extends React.CSSProperties {
5
5
  rgba?: string;
6
6
  opacity?: number;
7
7
  }
8
+ export interface NamedTheme {
9
+ name: ThemeTypes;
10
+ theme: Theme;
11
+ }
8
12
  export declare enum ThemeTypes {
9
13
  DARK_THEME = "darkTheme",
10
- LIGHT_THEME = "lightTheme"
14
+ LIGHT_THEME = "lightTheme",
15
+ XMAS2024_THEME = "xmas2024Theme"
11
16
  }
12
17
  export type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'flat' | 'tool' | 'boxed' | 'icon';
13
18
  export interface ButtonStyle {
@@ -147,6 +152,9 @@ export interface GeowebColorPalette {
147
152
  syncGroups: {
148
153
  drawerOpen: CSSProperties;
149
154
  };
155
+ logo?: {
156
+ image: string;
157
+ };
150
158
  layerManager: {
151
159
  headerRowText: CSSProperties;
152
160
  tableRowDefaultText: CSSProperties;
@@ -200,6 +208,9 @@ export interface GeowebColorPalette {
200
208
  action: CSSProperties['color'];
201
209
  actionHover: CSSProperties;
202
210
  };
211
+ festoonOverlay?: CSSProperties;
212
+ festoonContainer?: CSSProperties;
213
+ festoonBackdrop?: CSSProperties;
203
214
  }
204
215
  export type Elevations = Record<string, string>;
205
216
  declare module '@mui/material/styles' {
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import './xmas2024/snowflake.css';
3
+ import { CSSProperties } from '../../types';
4
+ export declare const OverlayStyle: () => CSSProperties | undefined;
5
+ export declare const ContainerStyle: () => CSSProperties | undefined;
6
+ export declare const BackdropStyle: () => CSSProperties | undefined;
7
+ export declare const BackdropElement: () => React.JSX.Element[] | null;
@@ -1,3 +1,3 @@
1
- import { Elevations, GeowebColorPalette } from '../../types';
1
+ import { Elevations, GeowebColorPalette } from '../../../types';
2
2
  export declare const colors: GeowebColorPalette;
3
3
  export declare const elevations: Elevations;
@@ -1,4 +1,19 @@
1
- import { colors as colorsLight, elevations as elevationsLight } from './lightTheme';
1
+ import { colors as colorsLight, elevations as elevationsLight } from './light/lightTheme';
2
+ import { NamedTheme, ThemeTypes } from '../../types';
3
+ export declare const getThemeByName: (themeName: ThemeTypes) => NamedTheme;
2
4
  export declare const lightTheme: import("@mui/material").Theme;
3
5
  export declare const darkTheme: import("@mui/material").Theme;
6
+ export declare const xmas2024Theme: import("@mui/material").Theme;
7
+ export declare const namedLightTheme: {
8
+ name: ThemeTypes;
9
+ theme: import("@mui/material").Theme;
10
+ };
11
+ export declare const namedDarkTheme: {
12
+ name: ThemeTypes;
13
+ theme: import("@mui/material").Theme;
14
+ };
15
+ export declare const namedXmas2024Theme: {
16
+ name: ThemeTypes;
17
+ theme: import("@mui/material").Theme;
18
+ };
4
19
  export { colorsLight, elevationsLight };
@@ -1,3 +1,3 @@
1
- import { Elevations, GeowebColorPalette } from '../../types';
1
+ import { Elevations, GeowebColorPalette } from '../../../types';
2
2
  export declare const colors: GeowebColorPalette;
3
3
  export declare const elevations: Elevations;
@@ -0,0 +1,3 @@
1
+ import { Elevations, GeowebColorPalette } from '../../../types';
2
+ export declare const colors: GeowebColorPalette;
3
+ export declare const elevations: Elevations;