@vertigis/react-ui 20.0.2 → 21.0.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/DateRangePicker/DateRangePicker.d.ts +2 -0
- package/DateRangePicker/DateRangePicker.js +2 -0
- package/DateTimeRangePicker/DateTimeRangePicker.d.ts +2 -0
- package/DateTimeRangePicker/DateTimeRangePicker.js +1 -0
- package/Loader/Loader.js +1 -3
- package/LocalizationProvider/index.d.ts +1 -1
- package/LocalizationProvider/index.js +1 -1
- package/colors/grey.js +2 -2
- package/colors/invertedGrey.d.ts +3 -0
- package/colors/invertedGrey.js +17 -0
- package/package.json +3 -3
- package/styles/createTheme.js +10 -10
- package/styles/palette.d.ts +1 -18
- package/styles/palette.js +20 -6
- package/styles/themeAugmentation.d.ts +5 -0
|
@@ -2,6 +2,8 @@ import type { PickerValidDate } from "@mui/x-date-pickers/models";
|
|
|
2
2
|
import type { DateRangePickerProps as MuiDateRangePickerProps } from "@mui/x-date-pickers-pro/DateRangePicker";
|
|
3
3
|
export type { PickerValidDate };
|
|
4
4
|
export * from "@mui/x-date-pickers-pro/DateRangePicker";
|
|
5
|
+
export * from "@mui/x-date-pickers-pro/DesktopDateRangePicker";
|
|
6
|
+
export * from "@mui/x-date-pickers-pro/MobileDateRangePicker";
|
|
5
7
|
export interface DateRangePickerProps<TDate extends PickerValidDate> extends MuiDateRangePickerProps<TDate> {
|
|
6
8
|
dateSeparator?: string;
|
|
7
9
|
}
|
|
@@ -3,5 +3,7 @@ import { DateRangePicker as MuiDateRangePicker } from "@mui/x-date-pickers-pro/D
|
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import FormLabelTextField from "../FormLabelTextField/index.js";
|
|
5
5
|
export * from "@mui/x-date-pickers-pro/DateRangePicker";
|
|
6
|
+
export * from "@mui/x-date-pickers-pro/DesktopDateRangePicker";
|
|
7
|
+
export * from "@mui/x-date-pickers-pro/MobileDateRangePicker";
|
|
6
8
|
const DateRangePicker = ({ dateSeparator, slots, slotProps, ...props }, ref) => (_jsx(MuiDateRangePicker, { ref: ref, slotProps: { field: { dateSeparator }, ...slotProps }, slots: { textField: FormLabelTextField, ...slots }, ...props }));
|
|
7
9
|
export default forwardRef(DateRangePicker);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { DateTimeRangePickerProps as MuiDateTimeRangePickerProps, PickerValidDate } from "@mui/x-date-pickers-pro";
|
|
2
|
+
export type { PickerValidDate };
|
|
3
|
+
export * from "@mui/x-date-pickers-pro/DateTimeRangePicker";
|
|
2
4
|
export interface DateTimeRangePickerProps extends MuiDateTimeRangePickerProps<PickerValidDate> {
|
|
3
5
|
dateSeparator?: string;
|
|
4
6
|
}
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { DateTimeRangePicker as MuiDateTimeRangePicker, renderTimeViewClock, } from "@mui/x-date-pickers-pro";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import FormLabelTextField from "../FormLabelTextField/index.js";
|
|
5
|
+
export * from "@mui/x-date-pickers-pro/DateTimeRangePicker";
|
|
5
6
|
const DateTimeRangePicker = forwardRef(({ dateSeparator, slots, slotProps, viewRenderers, ...props }, ref) => (_jsx(MuiDateTimeRangePicker, { inputRef: ref, slotProps: { field: { dateSeparator }, ...slotProps }, slots: { textField: FormLabelTextField, ...slots }, viewRenderers: {
|
|
6
7
|
hours: viewRenderers?.hours ?? renderTimeViewClock,
|
|
7
8
|
minutes: viewRenderers?.minutes ?? renderTimeViewClock,
|
package/Loader/Loader.js
CHANGED
|
@@ -53,9 +53,7 @@ const Root = styled("div")(({ theme: { palette } }) => ({
|
|
|
53
53
|
},
|
|
54
54
|
},
|
|
55
55
|
[`&.${loaderClasses.showBackground}`]: {
|
|
56
|
-
backgroundColor: palette.mode === "dark"
|
|
57
|
-
? alpha(palette.common.white, 0.15)
|
|
58
|
-
: alpha(palette.common.black, 0.4),
|
|
56
|
+
backgroundColor: alpha(palette.text.primary, palette.mode === "dark" ? 0.15 : 0.4),
|
|
59
57
|
[`& .${loaderClasses.dot}`]: {
|
|
60
58
|
borderColor: palette.common.white,
|
|
61
59
|
backgroundColor: palette.common.white,
|
package/colors/grey.js
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const invertedGrey = {
|
|
2
|
+
50: "#151518",
|
|
3
|
+
100: "#232327",
|
|
4
|
+
200: "#36363a",
|
|
5
|
+
300: "#404044",
|
|
6
|
+
400: "#515156",
|
|
7
|
+
500: "#727279",
|
|
8
|
+
600: "#82828a",
|
|
9
|
+
700: "#97979f",
|
|
10
|
+
800: "#c4c4c9",
|
|
11
|
+
900: "#dbdbde",
|
|
12
|
+
A100: "#44444f",
|
|
13
|
+
A200: "#5a5a67",
|
|
14
|
+
A400: "#a6a6b3",
|
|
15
|
+
A700: "#b2b2c1",
|
|
16
|
+
};
|
|
17
|
+
export default invertedGrey;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertigis/react-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0",
|
|
4
4
|
"description": "Utilities and React components used in VertiGIS applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vertigis",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@mui/icons-material": "^7.2.0",
|
|
19
19
|
"@mui/material": "^7.2.0",
|
|
20
|
-
"@mui/x-data-grid-pro": "
|
|
21
|
-
"@mui/x-date-pickers-pro": "
|
|
20
|
+
"@mui/x-data-grid-pro": "^7.28.0",
|
|
21
|
+
"@mui/x-date-pickers-pro": "^7.28.0",
|
|
22
22
|
"@mui/x-license": "^7.24.1",
|
|
23
23
|
"@mui/x-tree-view": "^7.24.0",
|
|
24
24
|
"autosuggest-highlight": "^3.3.4",
|
package/styles/createTheme.js
CHANGED
|
@@ -193,7 +193,7 @@ const getMenuItemStyles = ({ palette, transitions }) => ({
|
|
|
193
193
|
backgroundColor: "transparent",
|
|
194
194
|
},
|
|
195
195
|
"&:hover, &.Mui-selected": {
|
|
196
|
-
background: `linear-gradient(to right, ${palette.
|
|
196
|
+
background: `linear-gradient(to right, ${palette.grey.light} 0%, transparent 100%)`,
|
|
197
197
|
},
|
|
198
198
|
});
|
|
199
199
|
/**
|
|
@@ -465,7 +465,7 @@ function getComponentOverrides(theme, isDense) {
|
|
|
465
465
|
borderRadius: shape.borderRadius,
|
|
466
466
|
color: palette.custom.errorText,
|
|
467
467
|
fontStyle: "italic",
|
|
468
|
-
backgroundColor:
|
|
468
|
+
backgroundColor: "transparent",
|
|
469
469
|
},
|
|
470
470
|
},
|
|
471
471
|
},
|
|
@@ -484,7 +484,7 @@ function getComponentOverrides(theme, isDense) {
|
|
|
484
484
|
"&.Mui-error, &.Mui-error.Mui-focused": {
|
|
485
485
|
borderRadius: shape.borderRadius,
|
|
486
486
|
color: palette.text.primary,
|
|
487
|
-
backgroundColor:
|
|
487
|
+
backgroundColor: "transparent",
|
|
488
488
|
// Error icon background circle
|
|
489
489
|
"& .GcxFormLabel-errorIconBackground": {
|
|
490
490
|
display: "inline-flex",
|
|
@@ -507,7 +507,7 @@ function getComponentOverrides(theme, isDense) {
|
|
|
507
507
|
},
|
|
508
508
|
asterisk: {
|
|
509
509
|
"&.Mui-error": {
|
|
510
|
-
color:
|
|
510
|
+
color: palette.background.default,
|
|
511
511
|
},
|
|
512
512
|
},
|
|
513
513
|
},
|
|
@@ -562,7 +562,7 @@ function getComponentOverrides(theme, isDense) {
|
|
|
562
562
|
},
|
|
563
563
|
"&.Mui-disabled": {
|
|
564
564
|
borderColor: palette.grey[300],
|
|
565
|
-
backgroundColor: palette.
|
|
565
|
+
backgroundColor: palette.grey.light,
|
|
566
566
|
},
|
|
567
567
|
},
|
|
568
568
|
inputMultiline: {
|
|
@@ -757,12 +757,12 @@ function getComponentOverrides(theme, isDense) {
|
|
|
757
757
|
},
|
|
758
758
|
colorPrimary: {
|
|
759
759
|
"&.Mui-checked": {
|
|
760
|
-
color: palette.
|
|
760
|
+
color: palette.background.default,
|
|
761
761
|
},
|
|
762
762
|
},
|
|
763
763
|
colorSecondary: {
|
|
764
764
|
"&.Mui-checked": {
|
|
765
|
-
color: palette.
|
|
765
|
+
color: palette.background.default,
|
|
766
766
|
},
|
|
767
767
|
},
|
|
768
768
|
sizeSmall: {
|
|
@@ -802,7 +802,7 @@ function getComponentOverrides(theme, isDense) {
|
|
|
802
802
|
width: 16,
|
|
803
803
|
height: 16,
|
|
804
804
|
borderRadius: 2,
|
|
805
|
-
backgroundColor: palette.
|
|
805
|
+
backgroundColor: palette.background.default,
|
|
806
806
|
},
|
|
807
807
|
track: {
|
|
808
808
|
borderRadius: shape.borderRadius,
|
|
@@ -815,7 +815,7 @@ function getComponentOverrides(theme, isDense) {
|
|
|
815
815
|
},
|
|
816
816
|
styleOverrides: {
|
|
817
817
|
root: {
|
|
818
|
-
backgroundColor: palette.
|
|
818
|
+
backgroundColor: palette.grey.light,
|
|
819
819
|
borderStyle: "solid",
|
|
820
820
|
borderWidth: 1,
|
|
821
821
|
borderColor: palette.grey[400],
|
|
@@ -850,7 +850,7 @@ function getComponentOverrides(theme, isDense) {
|
|
|
850
850
|
},
|
|
851
851
|
head: {
|
|
852
852
|
// Chosen to match PanelGroup in react-ui-internal.
|
|
853
|
-
backgroundColor: palette.
|
|
853
|
+
backgroundColor: palette.grey.light,
|
|
854
854
|
fontWeight: "bold",
|
|
855
855
|
fontSize: pxToRem(14),
|
|
856
856
|
},
|
package/styles/palette.d.ts
CHANGED
|
@@ -3,24 +3,6 @@ export declare const getPaletteOverrides: (palette: Theme["palette"]) => ThemeOp
|
|
|
3
3
|
export declare const defaultPalette: {
|
|
4
4
|
primary: import("@mui/material").Color;
|
|
5
5
|
secondary: import("@mui/material").Color;
|
|
6
|
-
grey: {
|
|
7
|
-
main: string;
|
|
8
|
-
dark: string;
|
|
9
|
-
50: string;
|
|
10
|
-
100: string;
|
|
11
|
-
200: string;
|
|
12
|
-
300: string;
|
|
13
|
-
400: string;
|
|
14
|
-
500: string;
|
|
15
|
-
600: string;
|
|
16
|
-
700: string;
|
|
17
|
-
800: string;
|
|
18
|
-
900: string;
|
|
19
|
-
A100: string;
|
|
20
|
-
A200: string;
|
|
21
|
-
A400: string;
|
|
22
|
-
A700: string;
|
|
23
|
-
};
|
|
24
6
|
error: {
|
|
25
7
|
main: string;
|
|
26
8
|
50: string;
|
|
@@ -38,6 +20,7 @@ export declare const defaultPalette: {
|
|
|
38
20
|
A400: string;
|
|
39
21
|
A700: string;
|
|
40
22
|
dark?: string;
|
|
23
|
+
light?: string;
|
|
41
24
|
};
|
|
42
25
|
warning: {
|
|
43
26
|
main: string;
|
package/styles/palette.js
CHANGED
|
@@ -2,6 +2,7 @@ import blue from "../colors/blue.js";
|
|
|
2
2
|
import { common } from "../colors/common.js";
|
|
3
3
|
import green from "../colors/green.js";
|
|
4
4
|
import grey from "../colors/grey.js";
|
|
5
|
+
import invertedGrey from "../colors/invertedGrey.js";
|
|
5
6
|
import red from "../colors/red.js";
|
|
6
7
|
const secondaryTextColor = "#666666";
|
|
7
8
|
const primaryTextColor = "#333333";
|
|
@@ -16,23 +17,37 @@ const lightModePaletteOverrides = (palette) => ({
|
|
|
16
17
|
primary: primaryTextColor,
|
|
17
18
|
secondary: secondaryTextColor,
|
|
18
19
|
},
|
|
20
|
+
grey: { ...grey, main: grey[300], dark: grey[400], light: grey[100] },
|
|
19
21
|
custom: {
|
|
20
22
|
errorText: palette.error.main,
|
|
21
23
|
errorBackground: palette.background.default,
|
|
22
24
|
darkModeEmphasis: "transparent",
|
|
23
|
-
greyBackground: grey[100],
|
|
24
25
|
greyOutline: "rgba(0, 0, 0, 0.23)",
|
|
25
|
-
|
|
26
|
+
// Deprecated, remove in next major release.
|
|
27
|
+
greyBackground: palette.grey.light,
|
|
28
|
+
negativeSpace: palette.background.default,
|
|
26
29
|
},
|
|
27
30
|
});
|
|
28
31
|
const darkModePaletteOverrides = (palette) => ({
|
|
32
|
+
// Swap greys in dark mode so that hardcoded grey colors still fit the
|
|
33
|
+
// theme.
|
|
34
|
+
grey: {
|
|
35
|
+
...invertedGrey,
|
|
36
|
+
main: invertedGrey[300],
|
|
37
|
+
dark: invertedGrey[400],
|
|
38
|
+
light: invertedGrey[100],
|
|
39
|
+
},
|
|
40
|
+
background: {
|
|
41
|
+
paper: invertedGrey[50],
|
|
42
|
+
},
|
|
29
43
|
custom: {
|
|
30
44
|
errorText: palette.text.primary,
|
|
31
45
|
errorBackground: palette.error.main,
|
|
32
|
-
darkModeEmphasis:
|
|
33
|
-
greyBackground: grey[900],
|
|
46
|
+
darkModeEmphasis: invertedGrey[600],
|
|
34
47
|
greyOutline: "rgba(255, 255, 255, 0.23)",
|
|
35
|
-
|
|
48
|
+
// Deprecated, remove in next major release.
|
|
49
|
+
greyBackground: palette.grey.light,
|
|
50
|
+
negativeSpace: palette.background.default,
|
|
36
51
|
},
|
|
37
52
|
});
|
|
38
53
|
export const getPaletteOverrides = (palette) => palette.mode === "light"
|
|
@@ -41,7 +56,6 @@ export const getPaletteOverrides = (palette) => palette.mode === "light"
|
|
|
41
56
|
export const defaultPalette = {
|
|
42
57
|
primary: blue,
|
|
43
58
|
secondary: green,
|
|
44
|
-
grey: { ...grey, main: grey[300], dark: grey[400] },
|
|
45
59
|
error: { ...red, main: primaryErrorColor },
|
|
46
60
|
warning: { main: primaryWarningColor },
|
|
47
61
|
success: { main: primarySuccessColor },
|
|
@@ -23,6 +23,7 @@ declare module "@mui/material" {
|
|
|
23
23
|
interface Color {
|
|
24
24
|
main?: string;
|
|
25
25
|
dark?: string;
|
|
26
|
+
light?: string;
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
declare module "@mui/material/styles" {
|
|
@@ -42,6 +43,8 @@ declare module "@mui/material/styles" {
|
|
|
42
43
|
errorBackground: string;
|
|
43
44
|
/**
|
|
44
45
|
* A light grey background color.
|
|
46
|
+
*
|
|
47
|
+
* @deprecated Use `palette.grey.light`.
|
|
45
48
|
*/
|
|
46
49
|
greyBackground: string;
|
|
47
50
|
/**
|
|
@@ -51,6 +54,8 @@ declare module "@mui/material/styles" {
|
|
|
51
54
|
/**
|
|
52
55
|
* The inverse of either black or white, depending on the selected
|
|
53
56
|
* mode.
|
|
57
|
+
*
|
|
58
|
+
* @deprecated Use `palette.background.default`.
|
|
54
59
|
*/
|
|
55
60
|
negativeSpace: string;
|
|
56
61
|
};
|