@opengeoweb/theme 4.17.0 → 4.19.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.
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Theme as MUITheme } from '@mui/material';
3
- import { ThemeTypes } from './types';
3
+ import { ThemeTypes } from '../../types';
4
4
  interface ThemeContextProps {
5
5
  toggleTheme?: () => void;
6
6
  isDark?: boolean;
@@ -1,5 +1 @@
1
- export { GWTheme } from './gwTheme';
2
1
  export * from './ThemeContext';
3
- export { lightTheme } from './lightTheme';
4
- export { darkTheme } from './darkTheme';
5
- export * from './types';
@@ -3,5 +3,21 @@ declare const _default: {
3
3
  title: string;
4
4
  };
5
5
  export default _default;
6
- export declare const ButtonLight: () => React.ReactElement;
7
- export declare const ButtonDark: () => React.ReactElement;
6
+ export declare const IconButtonLight: {
7
+ (): React.ReactElement;
8
+ parameters: {
9
+ zeplinLink: {
10
+ name: string;
11
+ link: string;
12
+ }[];
13
+ };
14
+ };
15
+ export declare const IconButtonDark: {
16
+ (): React.ReactElement;
17
+ parameters: {
18
+ zeplinLink: {
19
+ name: string;
20
+ link: string;
21
+ }[];
22
+ };
23
+ };
@@ -1,13 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  export interface CSSProperties extends React.CSSProperties {
3
3
  rgba?: string;
4
+ opacity?: number;
4
5
  }
5
6
  export declare enum ThemeTypes {
6
7
  DARK_THEME = "darkTheme",
7
8
  LIGHT_THEME = "lightTheme"
8
9
  }
9
- export declare const gwButtonVariants: readonly ["primary", "secondary", "tertiary", "flat", "tool", "boxed", "icon"];
10
- export declare type ButtonVariant = typeof gwButtonVariants[number];
10
+ export declare type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'flat' | 'tool' | 'boxed' | 'icon';
11
11
  export interface ButtonStyle {
12
12
  default: CSSProperties;
13
13
  mouseOver: CSSProperties;
@@ -16,16 +16,6 @@ export interface ButtonStyle {
16
16
  disabled: CSSProperties;
17
17
  focus: CSSProperties;
18
18
  }
19
- export interface ButtonStyles {
20
- primary: ButtonStyle;
21
- secondary: ButtonStyle;
22
- tertiary: ButtonStyle;
23
- flat: ButtonStyle;
24
- tool: ButtonStyle;
25
- boxed: ButtonStyle;
26
- icon: ButtonStyle;
27
- focusDefault: CSSProperties;
28
- }
29
19
  export declare type GeowebColorPalette = {
30
20
  background: {
31
21
  surface: CSSProperties['color'];
@@ -35,7 +25,20 @@ export declare type GeowebColorPalette = {
35
25
  brand: {
36
26
  brand: CSSProperties['color'];
37
27
  };
38
- buttons: ButtonStyles;
28
+ buttons: {
29
+ primary: ButtonStyle;
30
+ secondary: ButtonStyle;
31
+ tertiary: ButtonStyle;
32
+ flat: ButtonStyle;
33
+ tool: ButtonStyle;
34
+ boxed: ButtonStyle;
35
+ icon: ButtonStyle;
36
+ };
37
+ iconButtons: {
38
+ flat: ButtonStyle;
39
+ tool: ButtonStyle;
40
+ boxed: ButtonStyle;
41
+ };
39
42
  typographyAndIcons: {
40
43
  text: CSSProperties['color'];
41
44
  icon: CSSProperties['color'];
@@ -0,0 +1,8 @@
1
+ import { ComponentsVariants, CSSObject } from '@mui/material';
2
+ import { ButtonStyle } from '../types';
3
+ export declare const BORDER_RADIUS = 3;
4
+ export declare const defaultButtonStyle: (button: ButtonStyle) => CSSObject;
5
+ export declare const buttonStyle: (button: ButtonStyle) => CSSObject;
6
+ export declare const iconButtonStyle: (button: ButtonStyle) => CSSObject;
7
+ export declare const buttonVariants: (buttons: Record<string, ButtonStyle>, stylingFn?: (button: ButtonStyle) => CSSObject) => ComponentsVariants['MuiButton'];
8
+ export declare const variantsToClassName: (buttonVariants: ComponentsVariants['MuiButton']) => CSSObject;
@@ -0,0 +1,16 @@
1
+ import { Theme, PaletteMode } from '@mui/material';
2
+ import { Elevations, GeowebColorPalette } from '../types';
3
+ export declare const breakpoints: {
4
+ mobile: number;
5
+ tablet: number;
6
+ desktop: number;
7
+ dekstopHD: number;
8
+ dekstopHDWide: number;
9
+ };
10
+ declare type CreateThemeProps = {
11
+ paletteType?: PaletteMode;
12
+ geowebColors?: GeowebColorPalette;
13
+ elevations?: Elevations;
14
+ };
15
+ export declare const createTheme: ({ paletteType, geowebColors: defaultGeowebColors, elevations: defaultShadows, }: CreateThemeProps) => Theme;
16
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Elevations, GeowebColorPalette } from '../../types';
2
+ export declare const colors: GeowebColorPalette;
3
+ export declare const elevations: Elevations;
@@ -0,0 +1,5 @@
1
+ import { colors as colorsLight, elevations as elevationsLight } from './lightTheme';
2
+ export declare const lightTheme: import("@mui/material").Theme;
3
+ export declare const darkTheme: import("@mui/material").Theme;
4
+ export { GWTheme } from './gwTheme';
5
+ export { colorsLight, elevationsLight };
@@ -0,0 +1,3 @@
1
+ import { Elevations, GeowebColorPalette } from '../../types';
2
+ export declare const colors: GeowebColorPalette;
3
+ export declare const elevations: Elevations;
@@ -0,0 +1,5 @@
1
+ import { Shadows } from '@mui/material/styles/shadows';
2
+ import { Elevations, GeowebColorPalette } from '../types';
3
+ export declare const hex2rgba: (hex: string, alpha?: number) => string;
4
+ export declare const parseColors: (colors: GeowebColorPalette) => GeowebColorPalette;
5
+ export declare const createShadows: (elevations: Elevations) => Shadows;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/theme",
3
- "version": "4.17.0",
3
+ "version": "4.19.0",
4
4
  "description": "GeoWeb Theme library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -13,6 +13,7 @@
13
13
  "dependencies": {},
14
14
  "peerDependencies": {
15
15
  "react": "^18.2.0",
16
- "@mui/material": "^5.10.8"
16
+ "@mui/material": "^5.12.0",
17
+ "@mui/x-date-pickers": "^6.2.1"
17
18
  }
18
19
  }
@@ -1,7 +0,0 @@
1
- import { ComponentsVariants, CSSInterpolation, CSSObject } from '@mui/material';
2
- import { ButtonStyles, ButtonStyle } from './types';
3
- export declare const BORDER_RADIUS = 3;
4
- export declare const defaultButtonStyle: (button: ButtonStyle) => CSSObject;
5
- export declare const buttonStyle: (button: ButtonStyle) => CSSInterpolation;
6
- export declare const variantsToClassName: (buttonVariants: ComponentsVariants['MuiButton']) => CSSInterpolation;
7
- export declare const buttonVariants: (buttons: ButtonStyles) => ComponentsVariants['MuiButton'];
@@ -1,3 +0,0 @@
1
- import { GeowebColorPalette } from './types';
2
- export declare const colors: GeowebColorPalette;
3
- export declare const darkTheme: import("@mui/material").Theme;
@@ -1,3 +0,0 @@
1
- import { GeowebColorPalette } from './types';
2
- export declare const colors: GeowebColorPalette;
3
- export declare const lightTheme: import("@mui/material").Theme;
@@ -1,19 +0,0 @@
1
- /// <reference types="react" />
2
- import { Theme, PaletteMode } from '@mui/material';
3
- import { Shadows } from '@mui/material/styles/shadows';
4
- import { Elevations, GeowebColorPalette } from './types';
5
- export declare const hex2rgba: (hex: string, alpha?: number) => string;
6
- export interface CSSProperties extends React.CSSProperties {
7
- rgba?: string;
8
- opacity?: number;
9
- }
10
- export declare const parseColors: (colors: GeowebColorPalette) => GeowebColorPalette;
11
- export declare const createShadows: (elevations: Elevations) => Shadows;
12
- export declare const breakpoints: {
13
- mobile: number;
14
- tablet: number;
15
- desktop: number;
16
- dekstopHD: number;
17
- dekstopHDWide: number;
18
- };
19
- export declare const createTheme: (paletteType: PaletteMode, geowebColors: GeowebColorPalette, shadows: Shadows) => Theme;