@monolith-forensics/monolith-ui 1.1.32 → 1.1.33
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.
|
@@ -5,10 +5,10 @@ import getTheme, { Themes } from "../theme";
|
|
|
5
5
|
import { createContext, useState } from "react";
|
|
6
6
|
import GlobalStyle from "./GlobalStyle";
|
|
7
7
|
export const MonolithUIContext = createContext(undefined);
|
|
8
|
-
const MonolithUIProvider = ({ children, theme = {}, defaultColorScheme = "
|
|
8
|
+
const MonolithUIProvider = ({ children, theme = {}, defaultColorScheme = "DARK", }) => {
|
|
9
9
|
const [colorScheme, setColorScheme] = useState(defaultColorScheme);
|
|
10
10
|
const toggleColorScheme = () => {
|
|
11
|
-
setColorScheme(colorScheme === "
|
|
11
|
+
setColorScheme(colorScheme === "LIGHT" ? "DARK" : "LIGHT");
|
|
12
12
|
};
|
|
13
13
|
const defaultTheme = getTheme(colorScheme);
|
|
14
14
|
// override default theme with the provided theme
|
package/dist/Table/Table.js
CHANGED
|
@@ -21,6 +21,7 @@ import { Maximize2Icon } from "lucide-react";
|
|
|
21
21
|
import { ArrowUpIcon, ArrowDownIcon } from "lucide-react";
|
|
22
22
|
import moment from "moment";
|
|
23
23
|
import { CheckBox } from "..";
|
|
24
|
+
import { Themes } from "../theme";
|
|
24
25
|
const MIN_COLUMN_WIDTH = 125;
|
|
25
26
|
export const Column = ({ dataField, caption, columnId = shortUUID.generate(), sorting, format, }) => {
|
|
26
27
|
return null;
|
|
@@ -157,7 +158,7 @@ const StyledTh = styled.th `
|
|
|
157
158
|
}
|
|
158
159
|
|
|
159
160
|
&:hover {
|
|
160
|
-
background-color: ${({ theme }) => theme.name ===
|
|
161
|
+
background-color: ${({ theme }) => theme.name === Themes.DARK ? "#2e2e2e" : "#f5f5f5"};
|
|
161
162
|
cursor: pointer;
|
|
162
163
|
}
|
|
163
164
|
&.dragging:active {
|
package/dist/theme/variants.js
CHANGED
|
@@ -2,8 +2,8 @@ import merge from "deepmerge";
|
|
|
2
2
|
import typography from "./typography";
|
|
3
3
|
// Themes
|
|
4
4
|
export const THEMES = {
|
|
5
|
-
DARK: "
|
|
6
|
-
LIGHT: "
|
|
5
|
+
DARK: "DARK",
|
|
6
|
+
LIGHT: "LIGHT",
|
|
7
7
|
};
|
|
8
8
|
const customBlue = {
|
|
9
9
|
50: "#e9f0fb",
|
|
@@ -45,7 +45,7 @@ const lightVariant = {
|
|
|
45
45
|
name: THEMES.LIGHT,
|
|
46
46
|
typography,
|
|
47
47
|
palette: {
|
|
48
|
-
mode:
|
|
48
|
+
mode: THEMES.LIGHT,
|
|
49
49
|
primary: {
|
|
50
50
|
main: customBlue[700],
|
|
51
51
|
contrastText: "#FFF",
|
|
@@ -168,7 +168,7 @@ const lightVariant = {
|
|
|
168
168
|
const darkVariant = merge(lightVariant, {
|
|
169
169
|
name: THEMES.DARK,
|
|
170
170
|
palette: {
|
|
171
|
-
mode:
|
|
171
|
+
mode: THEMES.DARK,
|
|
172
172
|
divider: "rgba(255, 255, 255, 0.15)",
|
|
173
173
|
action: {
|
|
174
174
|
hover: "rgba(255, 255, 255, 0.05)",
|