@monolith-forensics/monolith-ui 1.2.101 → 1.2.105
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/dist/Button/Button.js +7 -3
- package/dist/MonolithUIProvider/MonolithUIProvider.d.ts +129 -3
- package/dist/MonolithUIProvider/MonolithUIProvider.js +6 -2
- package/dist/theme/getTheme.d.ts +1 -1
- package/dist/theme/variants.d.ts +2 -2
- package/dist/theme/variants.js +2 -18
- package/package.json +1 -1
package/dist/Button/Button.js
CHANGED
|
@@ -311,9 +311,13 @@ const StyledLoader = styled.span `
|
|
|
311
311
|
svg {
|
|
312
312
|
width: 16px;
|
|
313
313
|
height: 16px;
|
|
314
|
-
color: ${({ theme, color }) =>
|
|
315
|
-
|
|
316
|
-
|
|
314
|
+
color: ${({ theme, color }) => {
|
|
315
|
+
var _a;
|
|
316
|
+
return color
|
|
317
|
+
? ((_a = theme.palette[color]) === null || _a === void 0 ? void 0 : _a.main) ||
|
|
318
|
+
colors[color]
|
|
319
|
+
: theme.palette.primary;
|
|
320
|
+
}};
|
|
317
321
|
|
|
318
322
|
animation: spin 0.75s linear infinite;
|
|
319
323
|
|
|
@@ -1,8 +1,133 @@
|
|
|
1
|
-
|
|
2
|
-
export { styled, useTheme, createGlobalStyle, css } from "styled-components";
|
|
1
|
+
export { styled, createGlobalStyle, css } from "styled-components";
|
|
3
2
|
import { Themes } from "../theme";
|
|
4
3
|
import React from "react";
|
|
5
|
-
|
|
4
|
+
import typography from "../theme/typography";
|
|
5
|
+
export interface MonolithDefaultTheme {
|
|
6
|
+
name: Themes;
|
|
7
|
+
typography: typeof typography;
|
|
8
|
+
palette: {
|
|
9
|
+
mode: Themes;
|
|
10
|
+
primary: {
|
|
11
|
+
main: string;
|
|
12
|
+
contrastText: string;
|
|
13
|
+
};
|
|
14
|
+
error: {
|
|
15
|
+
main: string;
|
|
16
|
+
contrastText: string;
|
|
17
|
+
light: string;
|
|
18
|
+
};
|
|
19
|
+
secondary: {
|
|
20
|
+
main: string;
|
|
21
|
+
contrastText: string;
|
|
22
|
+
};
|
|
23
|
+
third: {
|
|
24
|
+
main: string;
|
|
25
|
+
contrastText: string;
|
|
26
|
+
};
|
|
27
|
+
fourth: {
|
|
28
|
+
main: string;
|
|
29
|
+
contrastText: string;
|
|
30
|
+
};
|
|
31
|
+
background: {
|
|
32
|
+
default: string;
|
|
33
|
+
paper: string;
|
|
34
|
+
alt: string;
|
|
35
|
+
secondary: string;
|
|
36
|
+
gradient: string;
|
|
37
|
+
};
|
|
38
|
+
menu: {
|
|
39
|
+
background: string;
|
|
40
|
+
};
|
|
41
|
+
signature: {
|
|
42
|
+
penColor: string;
|
|
43
|
+
borderColor: string;
|
|
44
|
+
backgroundColor: string;
|
|
45
|
+
};
|
|
46
|
+
text: {
|
|
47
|
+
primary: string;
|
|
48
|
+
secondary: string;
|
|
49
|
+
disabled: string;
|
|
50
|
+
};
|
|
51
|
+
input: {
|
|
52
|
+
background: string;
|
|
53
|
+
border: string;
|
|
54
|
+
borderHover: string;
|
|
55
|
+
borderFocus: string;
|
|
56
|
+
borderError: string;
|
|
57
|
+
borderDisabled: string;
|
|
58
|
+
text: string;
|
|
59
|
+
textDisabled: string;
|
|
60
|
+
placeholder: string;
|
|
61
|
+
};
|
|
62
|
+
textArea: {
|
|
63
|
+
background: string;
|
|
64
|
+
border: string;
|
|
65
|
+
borderHover: string;
|
|
66
|
+
borderFocus: string;
|
|
67
|
+
borderError: string;
|
|
68
|
+
borderDisabled: string;
|
|
69
|
+
text: string;
|
|
70
|
+
textDisabled: string;
|
|
71
|
+
placeholder: string;
|
|
72
|
+
};
|
|
73
|
+
dataGrid: {
|
|
74
|
+
hover: string;
|
|
75
|
+
};
|
|
76
|
+
action: {
|
|
77
|
+
hover: string;
|
|
78
|
+
};
|
|
79
|
+
divider: string;
|
|
80
|
+
};
|
|
81
|
+
header: {
|
|
82
|
+
color: string;
|
|
83
|
+
background: string;
|
|
84
|
+
search: {
|
|
85
|
+
color: string;
|
|
86
|
+
};
|
|
87
|
+
indicator: {
|
|
88
|
+
background: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
footer: {
|
|
92
|
+
color: string;
|
|
93
|
+
background: string;
|
|
94
|
+
};
|
|
95
|
+
sidebar: {
|
|
96
|
+
color: string;
|
|
97
|
+
background: string;
|
|
98
|
+
active: string;
|
|
99
|
+
header: {
|
|
100
|
+
color: string;
|
|
101
|
+
background: string;
|
|
102
|
+
brand: {
|
|
103
|
+
color: string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
footer: {
|
|
107
|
+
color: string;
|
|
108
|
+
background: string;
|
|
109
|
+
online: {
|
|
110
|
+
background: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
badge: {
|
|
114
|
+
color: string;
|
|
115
|
+
background: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
scrollbar: {
|
|
119
|
+
track: string;
|
|
120
|
+
thumb: string;
|
|
121
|
+
thumbHover: string;
|
|
122
|
+
};
|
|
123
|
+
mfBorder: {
|
|
124
|
+
primary: string;
|
|
125
|
+
secondary: string;
|
|
126
|
+
};
|
|
127
|
+
zIndex: {
|
|
128
|
+
snackbar: number;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
6
131
|
export interface MonolithUIContextType {
|
|
7
132
|
theme: MonolithDefaultTheme;
|
|
8
133
|
Themes: typeof Themes;
|
|
@@ -18,3 +143,4 @@ interface MonolithUIProviderProps {
|
|
|
18
143
|
colorScheme?: Themes;
|
|
19
144
|
}
|
|
20
145
|
export declare const MonolithUIProvider: ({ children, theme, defaultColorScheme, colorScheme, }: MonolithUIProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
146
|
+
export declare const useTheme: () => MonolithDefaultTheme;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import merge from "deepmerge";
|
|
3
|
-
import { ThemeProvider } from "styled-components";
|
|
4
|
-
export { styled,
|
|
3
|
+
import { ThemeProvider, useTheme as useStyledTheme } from "styled-components";
|
|
4
|
+
export { styled, createGlobalStyle, css } from "styled-components";
|
|
5
5
|
import { Themes, getTheme } from "../theme";
|
|
6
6
|
import { createContext, useEffect, useState } from "react";
|
|
7
7
|
import GlobalStyle from "./GlobalStyle";
|
|
@@ -28,3 +28,7 @@ export const MonolithUIProvider = ({ children, theme, defaultColorScheme = local
|
|
|
28
28
|
setColorScheme: setColorSchemeState,
|
|
29
29
|
}, children: _jsxs(ThemeProvider, { theme: _theme, children: [_jsx(GlobalStyle, { theme: _theme }), children] }) }));
|
|
30
30
|
};
|
|
31
|
+
// Custom typed useTheme hook
|
|
32
|
+
export const useTheme = () => {
|
|
33
|
+
return useStyledTheme();
|
|
34
|
+
};
|
package/dist/theme/getTheme.d.ts
CHANGED
package/dist/theme/variants.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MonolithDefaultTheme } from "../MonolithUIProvider/MonolithUIProvider";
|
|
2
2
|
export declare enum THEMES {
|
|
3
3
|
DARK = "DARK",
|
|
4
4
|
LIGHT = "LIGHT",
|
|
5
5
|
DEFAULT = "DEFAULT"
|
|
6
6
|
}
|
|
7
|
-
declare const variants:
|
|
7
|
+
declare const variants: MonolithDefaultTheme[];
|
|
8
8
|
export default variants;
|
package/dist/theme/variants.js
CHANGED
|
@@ -55,7 +55,7 @@ const lightVariant = {
|
|
|
55
55
|
error: {
|
|
56
56
|
main: "#f44336",
|
|
57
57
|
contrastText: "#FFF",
|
|
58
|
-
light: "#
|
|
58
|
+
light: "#f44336",
|
|
59
59
|
},
|
|
60
60
|
secondary: {
|
|
61
61
|
main: "#FFF",
|
|
@@ -87,7 +87,7 @@ const lightVariant = {
|
|
|
87
87
|
text: {
|
|
88
88
|
primary: "rgba(0, 0, 0, 0.95)",
|
|
89
89
|
secondary: "rgba(0, 0, 0, 0.75)",
|
|
90
|
-
disabled: "rgba(0, 0, 0, 0.
|
|
90
|
+
disabled: "rgba(0, 0, 0, 0.5)",
|
|
91
91
|
},
|
|
92
92
|
input: {
|
|
93
93
|
background: "#fff",
|
|
@@ -177,25 +177,10 @@ const darkVariant = merge(lightVariant, {
|
|
|
177
177
|
action: {
|
|
178
178
|
hover: "rgba(255, 255, 255, 0.05)",
|
|
179
179
|
},
|
|
180
|
-
success: {
|
|
181
|
-
light: "#4caf50",
|
|
182
|
-
main: "#32CD32",
|
|
183
|
-
},
|
|
184
|
-
warning: {
|
|
185
|
-
main: "#ff9800",
|
|
186
|
-
},
|
|
187
|
-
info: {
|
|
188
|
-
main: "#2196f3",
|
|
189
|
-
},
|
|
190
180
|
primary: {
|
|
191
181
|
main: customBlue[500],
|
|
192
182
|
contrastText: "#FFF",
|
|
193
183
|
},
|
|
194
|
-
error: {
|
|
195
|
-
main: "#f44336",
|
|
196
|
-
contrastText: "#FFF",
|
|
197
|
-
light: "#ffcdd2",
|
|
198
|
-
},
|
|
199
184
|
secondary: {
|
|
200
185
|
main: "#3f3f3f",
|
|
201
186
|
contrastText: "#FFF",
|
|
@@ -213,7 +198,6 @@ const darkVariant = merge(lightVariant, {
|
|
|
213
198
|
text: {
|
|
214
199
|
primary: "rgba(255, 255, 255, 0.95)",
|
|
215
200
|
secondary: "rgba(255, 255, 255, 0.6)",
|
|
216
|
-
disabled: "rgba(255, 255, 255, 0.38)",
|
|
217
201
|
},
|
|
218
202
|
signature: {
|
|
219
203
|
penColor: "#eeeeee",
|