@opengeoweb/theme 2.1.2 → 2.2.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/README.md +1 -6
- package/{theme.esm.js → index.esm.js} +743 -272
- package/{theme.umd.js → index.umd.js} +750 -277
- package/lib/components/Theme/ThemeContext.d.ts +1 -1
- package/lib/components/Theme/buttonStyles.d.ts +5 -0
- package/lib/components/Theme/buttonStyles.test.d.ts +1 -0
- package/lib/components/Theme/darkTheme.d.ts +1 -1
- package/lib/components/Theme/gwTheme.d.ts +1 -7
- package/lib/components/Theme/lightTheme.d.ts +1 -1
- package/lib/components/Theme/types.d.ts +31 -10
- package/lib/components/Theme/utils.d.ts +3 -3
- package/lib/stories/Backdrop.stories.d.ts +1 -0
- package/lib/stories/Button.stories.d.ts +6 -0
- package/lib/stories/ToggleButton.stories.d.ts +6 -0
- package/lib/stories/index.stories.d.ts +2 -0
- package/lib/stories/snapshots/Button.stories.d.ts +7 -0
- package/lib/stories/snapshots/FormElements.stories.d.ts +1 -0
- package/lib/stories/snapshots/ToggleButton.stories.d.ts +7 -0
- package/package.json +7 -7
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentsVariants, CSSInterpolation } from '@mui/material';
|
|
2
|
+
import { ButtonStyles, ButtonStyle } from './types';
|
|
3
|
+
export declare const buttonStyle: (button: ButtonStyle) => CSSInterpolation;
|
|
4
|
+
export declare const toggleButtonStyle: (buttonVariants: ComponentsVariants['MuiButton']) => CSSInterpolation;
|
|
5
|
+
export declare const buttonVariants: (buttons: ButtonStyles) => ComponentsVariants['MuiButton'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
declare module '@material-ui/core/styles/overrides' {
|
|
3
|
-
interface ComponentNameToClassKey {
|
|
4
|
-
MuiAlert: AlertClassKey;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
export declare const GWTheme: import("@material-ui/core").Theme;
|
|
1
|
+
export declare const GWTheme: import("@mui/material").Theme;
|
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
interface CSSProperties extends React.CSSProperties {
|
|
3
3
|
rgba?: string;
|
|
4
4
|
}
|
|
5
|
+
export interface ButtonStyle {
|
|
6
|
+
default: CSSProperties;
|
|
7
|
+
mouseOver: CSSProperties;
|
|
8
|
+
active: CSSProperties;
|
|
9
|
+
activeMouseOver: CSSProperties;
|
|
10
|
+
disabled: CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
export interface ButtonStyles {
|
|
13
|
+
primary: ButtonStyle;
|
|
14
|
+
secondary: ButtonStyle;
|
|
15
|
+
tertiary: ButtonStyle;
|
|
16
|
+
flat: ButtonStyle;
|
|
17
|
+
tool: ButtonStyle;
|
|
18
|
+
primaryMouseover: CSSProperties;
|
|
19
|
+
primaryActive: CSSProperties;
|
|
20
|
+
flatMouseover: CSSProperties;
|
|
21
|
+
focusDefault: CSSProperties;
|
|
22
|
+
disabled: CSSProperties;
|
|
23
|
+
surfaceIconDefault: CSSProperties;
|
|
24
|
+
}
|
|
5
25
|
export declare type GeowebColorPalette = {
|
|
6
26
|
background: {
|
|
7
27
|
surface: CSSProperties['color'];
|
|
@@ -11,15 +31,7 @@ export declare type GeowebColorPalette = {
|
|
|
11
31
|
brand: {
|
|
12
32
|
brand: CSSProperties['color'];
|
|
13
33
|
};
|
|
14
|
-
buttons:
|
|
15
|
-
primary: CSSProperties;
|
|
16
|
-
primaryMouseover: CSSProperties;
|
|
17
|
-
primaryActive: CSSProperties;
|
|
18
|
-
flatMouseover: CSSProperties;
|
|
19
|
-
focusDefault: CSSProperties;
|
|
20
|
-
disabled: CSSProperties;
|
|
21
|
-
surfaceIconDefault: CSSProperties;
|
|
22
|
-
};
|
|
34
|
+
buttons: ButtonStyles;
|
|
23
35
|
typographyAndIcons: {
|
|
24
36
|
text: CSSProperties['color'];
|
|
25
37
|
icon: CSSProperties['color'];
|
|
@@ -110,7 +122,7 @@ export declare type GeowebColorPalette = {
|
|
|
110
122
|
export declare type Elevations = {
|
|
111
123
|
[id: string]: string;
|
|
112
124
|
};
|
|
113
|
-
declare module '@material
|
|
125
|
+
declare module '@mui/material/styles' {
|
|
114
126
|
interface Palette {
|
|
115
127
|
geowebColors: GeowebColorPalette;
|
|
116
128
|
}
|
|
@@ -118,4 +130,13 @@ declare module '@material-ui/core/styles/createPalette' {
|
|
|
118
130
|
geowebColors: GeowebColorPalette;
|
|
119
131
|
}
|
|
120
132
|
}
|
|
133
|
+
declare module '@mui/material/Button' {
|
|
134
|
+
interface ButtonPropsVariantOverrides {
|
|
135
|
+
primary: true;
|
|
136
|
+
secondary: true;
|
|
137
|
+
tertiary: true;
|
|
138
|
+
flat: true;
|
|
139
|
+
tool: true;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
121
142
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Theme,
|
|
2
|
-
import { Shadows } from '@material
|
|
1
|
+
import { Theme, PaletteMode } from '@mui/material';
|
|
2
|
+
import { Shadows } from '@mui/material/styles/shadows';
|
|
3
3
|
import { Elevations, GeowebColorPalette } from './types';
|
|
4
4
|
export declare const hex2rgba: (hex: string, alpha?: number) => string;
|
|
5
5
|
export declare const parseColors: (colors: GeowebColorPalette) => GeowebColorPalette;
|
|
6
6
|
export declare const createShadows: (elevations: Elevations) => Shadows;
|
|
7
|
-
export declare const createTheme: (paletteType:
|
|
7
|
+
export declare const createTheme: (paletteType: PaletteMode, geowebColors: GeowebColorPalette, shadows: Shadows) => Theme;
|
|
@@ -8,6 +8,8 @@ export { Table } from './Table.stories';
|
|
|
8
8
|
export { Tabs } from './Tabs.stories';
|
|
9
9
|
export { Typography, TypographyGWTheme } from './Typography.stories';
|
|
10
10
|
export { Tooltips } from './Tooltip.stories';
|
|
11
|
+
export { Buttons } from './Button.stories';
|
|
12
|
+
export { ToggleButtons } from './ToggleButton.stories';
|
|
11
13
|
export { FormElementsGWTheme, FormElements } from './FormElements.stories';
|
|
12
14
|
declare const _default: {
|
|
13
15
|
title: string;
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/theme",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "GeoWeb Theme library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
|
-
"main": "./
|
|
11
|
-
"module": "./
|
|
10
|
+
"main": "./index.umd.js",
|
|
11
|
+
"module": "./index.esm.js",
|
|
12
12
|
"typings": "./index.d.ts",
|
|
13
13
|
"dependencies": {},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@material
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"@
|
|
15
|
+
"@mui/material": "^5.2.8",
|
|
16
|
+
"react": "^17.0.2",
|
|
17
|
+
"@mui/styles": "^5.2.3",
|
|
18
|
+
"@mui/icons-material": "^5.2.5"
|
|
19
19
|
}
|
|
20
20
|
}
|