monday-sdk-js 0.5.0 → 0.5.1
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": "monday-sdk-js",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": "https://github.com/mondaycom/monday-sdk-js",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"node-fetch": "^2.6.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"monday-ui-react-core": "^2.63.2",
|
|
23
22
|
"@babel/cli": "^7.6.0",
|
|
24
23
|
"@babel/core": "^7.6.0",
|
|
25
24
|
"@babel/node": "^7.6.1",
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System themes: dark, light, black, hacker
|
|
3
|
+
*/
|
|
4
|
+
export enum SystemTheme {
|
|
5
|
+
LIGHT = "light",
|
|
6
|
+
DARK = "dark",
|
|
7
|
+
BLACK = "black",
|
|
8
|
+
HACKER = "hacker"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Colors which are eligible for theming
|
|
13
|
+
*/
|
|
14
|
+
export enum ThemeColor {
|
|
15
|
+
primaryColor = "primary-color",
|
|
16
|
+
primaryHoverColor = "primary-hover-color",
|
|
17
|
+
primarySelectedColor = "primary-selected-color",
|
|
18
|
+
primarySelectedHoverColor = "primary-selected-hover-color",
|
|
19
|
+
primarySelectedOnSecondaryColor = "primary-selected-on-secondary-color",
|
|
20
|
+
textColorOnPrimary = "text-color-on-primary",
|
|
21
|
+
brandColor = "brand-color",
|
|
22
|
+
brandHoverColor = "brand-hover-color",
|
|
23
|
+
brandSelectedColor = "brand-selected-color",
|
|
24
|
+
brandSelectedHoverColor = "brand-selected-hover-color",
|
|
25
|
+
textColorOnBrand = "text-color-on-brand"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type Theme = {
|
|
29
|
+
/**
|
|
30
|
+
* The name of the theme - name of css class that will be added to the children - should be unique
|
|
31
|
+
*/
|
|
32
|
+
name: string;
|
|
33
|
+
colors: SystemThemeColorMap;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
type SystemThemeColorMap = {
|
|
37
|
+
[key in SystemTheme]?: ThemeColorTokenValueMap;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type ThemeColorTokenValueMap = ThemeColorTokenValue | ThemeCustomClassValue;
|
|
41
|
+
|
|
42
|
+
export type ThemeColorTokenValue = {
|
|
43
|
+
[key in ThemeColor]?: string;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
type ThemeCustomClassValue = {
|
|
47
|
+
[key: string]: ThemeColorTokenValue | ThemeCustomClassValue;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const SystemThemeClassMap: SystemThemeClassMapType = {
|
|
51
|
+
[SystemTheme.LIGHT]: "light-app-theme",
|
|
52
|
+
[SystemTheme.DARK]: "dark-app-theme",
|
|
53
|
+
[SystemTheme.BLACK]: "black-app-theme",
|
|
54
|
+
[SystemTheme.HACKER]: "hacker_theme-app-theme"
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
type SystemThemeClassMapType = {
|
|
58
|
+
[key in SystemTheme]: string;
|
|
59
|
+
};
|