@vertigis/react-ui 17.3.0 → 18.0.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/Autocomplete/HighlightOption.d.ts +1 -0
- package/Chip/Chip.d.ts +1 -0
- package/ColorInput/ColorInput.d.ts +1 -0
- package/CopyableText/CopyableText.d.ts +1 -0
- package/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -0
- package/FormLabel/FormLabel.d.ts +1 -0
- package/FormLabelAutocompleteField/{FormLabelAutocompleteField .d.ts → FormLabelAutocompleteField.d.ts} +4 -3
- package/FormLabelAutocompleteField/{FormLabelAutocompleteField .js → FormLabelAutocompleteField.js} +4 -4
- package/FormLabelAutocompleteField/index.d.ts +2 -2
- package/FormLabelAutocompleteField/index.js +2 -2
- package/FormLabelColorField/FormLabelColorField.d.ts +8 -1
- package/FormLabelColorField/FormLabelColorField.js +1 -1
- package/FormLabelNumberField/FormLabelNumberField.d.ts +7 -1
- package/FormLabelNumberField/FormLabelNumberField.js +2 -2
- package/FormLabelSliderField/FormLabelSliderField.d.ts +7 -1
- package/FormLabelSliderField/FormLabelSliderField.js +2 -2
- package/FormLabelTextField/FormLabelTextField.d.ts +1 -0
- package/LicenseInfo/index.d.ts +1 -1
- package/LicenseInfo/index.js +1 -1
- package/ListItemSecondaryAction/index.d.ts +4 -0
- package/ListItemSecondaryAction/index.js +4 -0
- package/MenuItemSecondaryAction/MenuItemSecondaryAction.d.ts +4 -2
- package/MenuItemSecondaryAction/MenuItemSecondaryAction.js +3 -3
- package/NumberFormatContext/NumberFormatContext.d.ts +1 -0
- package/NumberInput/NumberInput.d.ts +1 -0
- package/SymbolInput/FontInput.d.ts +1 -1
- package/SymbolInput/FontInput.js +5 -5
- package/Tab/Tab.d.ts +1 -0
- package/Tabs/Tabs.d.ts +1 -0
- package/package.json +7 -7
- package/styles/createTheme.d.ts +6 -2
- package/styles/createTheme.js +46 -62
package/Chip/Chip.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { DateTimeRangePickerProps as MuiDateTimeRangePickerProps, PickerValidDate } from "@mui/x-date-pickers-pro";
|
|
2
3
|
export interface DateTimeRangePickerProps extends MuiDateTimeRangePickerProps<PickerValidDate> {
|
|
3
4
|
dateSeparator?: string;
|
package/FormLabel/FormLabel.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { FormLabelClasses as MUIFormLabelClasses, FormLabelProps as MUIFormLabelProps } from "@mui/material/FormLabel";
|
|
2
3
|
import type { OverridableComponent } from "@mui/material/OverridableComponent";
|
|
3
4
|
declare const gcxFormLabelClasses: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { AutocompleteChangeDetails, AutocompleteChangeReason, AutocompleteProps } from "../Autocomplete";
|
|
2
3
|
import type { ChipTypeMap } from "../Chip";
|
|
3
4
|
import type { FormControlProps } from "../FormControl/index.js";
|
|
4
5
|
import { type FormHelperTextProps } from "../FormHelperText/index.js";
|
|
@@ -22,7 +23,7 @@ export type FormLabelAutocompleteFieldProps<T, Multiple extends boolean | undefi
|
|
|
22
23
|
filterOptions?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>["filterOptions"];
|
|
23
24
|
getOptionLabel: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>["getOptionLabel"];
|
|
24
25
|
onBlur?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>["onBlur"];
|
|
25
|
-
onChange?:
|
|
26
|
+
onChange?: (event: React.SyntheticEvent, newValue: T | NonNullable<string | T> | (string | T)[] | null, reason: AutocompleteChangeReason, details: AutocompleteChangeDetails<T> | undefined) => void;
|
|
26
27
|
onFocus?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>["onFocus"];
|
|
27
28
|
options: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>["options"];
|
|
28
29
|
value: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>["value"];
|
|
@@ -32,5 +33,5 @@ export type FormLabelAutocompleteFieldProps<T, Multiple extends boolean | undefi
|
|
|
32
33
|
* Like TextField, but uses a FormLabel instead of an InputLabel. Also allows
|
|
33
34
|
* for inline help.
|
|
34
35
|
*/
|
|
35
|
-
declare const FormLabelAutocompleteField:
|
|
36
|
+
declare const FormLabelAutocompleteField: <TValue>(props: FormLabelAutocompleteFieldProps<TValue, boolean | undefined, boolean | undefined, boolean | undefined>) => ReactNode;
|
|
36
37
|
export default FormLabelAutocompleteField;
|
package/FormLabelAutocompleteField/{FormLabelAutocompleteField .js → FormLabelAutocompleteField.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import {} from "react";
|
|
3
3
|
import Autocomplete from "../Autocomplete/index.js";
|
|
4
4
|
import FormControl from "../FormControl/index.js";
|
|
5
5
|
import FormHelperText, {} from "../FormHelperText/index.js";
|
|
@@ -10,11 +10,11 @@ import { useId } from "../utils/react.js";
|
|
|
10
10
|
* Like TextField, but uses a FormLabel instead of an InputLabel. Also allows
|
|
11
11
|
* for inline help.
|
|
12
12
|
*/
|
|
13
|
-
const FormLabelAutocompleteField =
|
|
14
|
-
const { AutocompleteProps, defaultValue, disableClearable, disabled, filterOptions, FormHelperTextProps, fullWidth = false, getOptionLabel, helperText, id: idProp, label, onBlur, onChange, onFocus, options, value, ...other } = props;
|
|
13
|
+
const FormLabelAutocompleteField = (props) => {
|
|
14
|
+
const { AutocompleteProps, defaultValue, disableClearable, disabled, filterOptions, FormHelperTextProps, fullWidth = false, getOptionLabel, helperText, id: idProp, label, onBlur, onChange, onFocus, options, ref, value, ...other } = props;
|
|
15
15
|
const id = useId(idProp);
|
|
16
16
|
const helperTextId = helperText && id ? `${id}-helper-text` : undefined;
|
|
17
17
|
const inputLabelId = label && id ? `${id}-label` : undefined;
|
|
18
18
|
return (_jsxs(FormControl, { fullWidth: fullWidth, ref: ref, disabled: disabled, ...other, children: [label && (_jsx(FormLabel, { htmlFor: id, id: inputLabelId, children: label })), helperText && (_jsx(FormHelperText, { ...FormHelperTextProps, id: helperTextId, children: helperText })), _jsx(Autocomplete, { "aria-labelledby": inputLabelId, defaultValue: defaultValue, disableClearable: disableClearable, disabled: disabled, getOptionLabel: getOptionLabel, onBlur: onBlur, onChange: onChange, onFocus: onFocus, options: options, filterOptions: filterOptions, renderInput: params => (_jsx(Input, { ...params.InputProps, inputProps: { ...params.inputProps }, sx: { width: "100%" } })), value: value, ...AutocompleteProps })] }));
|
|
19
|
-
}
|
|
19
|
+
};
|
|
20
20
|
export default FormLabelAutocompleteField;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./FormLabelAutocompleteField
|
|
2
|
-
export { default } from "./FormLabelAutocompleteField
|
|
1
|
+
export * from "./FormLabelAutocompleteField.js";
|
|
2
|
+
export { default } from "./FormLabelAutocompleteField.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./FormLabelAutocompleteField
|
|
2
|
-
export { default } from "./FormLabelAutocompleteField
|
|
1
|
+
export * from "./FormLabelAutocompleteField.js";
|
|
2
|
+
export { default } from "./FormLabelAutocompleteField.js";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { TextFieldProps } from "@mui/material/TextField";
|
|
2
3
|
import { type ColorInputProps } from "../ColorInput/ColorInput.js";
|
|
3
4
|
import type { FormControlProps } from "../FormControl/index.js";
|
|
4
|
-
|
|
5
|
+
import { type FormHelperTextProps } from "../FormHelperText/index.js";
|
|
6
|
+
export type FormLabelColorFieldProps = Omit<TextFieldProps, "variant" | "defaultValue" | "onFocus" | "onBlur" | "onChange" | "value" | "select" | "multiline" | "minRows" | "maxRows" | "SelectProps" | "rows" | "FormHelperTextProps"> & Pick<FormControlProps, "inlineHelpContent" | "inlineHelpUrl"> & {
|
|
5
7
|
defaultValue?: ColorInputProps["defaultValue"];
|
|
6
8
|
disabled?: ColorInputProps["disabled"];
|
|
7
9
|
onBlur?: ColorInputProps["onBlur"];
|
|
@@ -9,6 +11,11 @@ export type FormLabelColorFieldProps = Omit<TextFieldProps, "variant" | "default
|
|
|
9
11
|
onFocus?: ColorInputProps["onFocus"];
|
|
10
12
|
value: ColorInputProps["value"];
|
|
11
13
|
ColorInputProps?: ColorInputProps;
|
|
14
|
+
/**
|
|
15
|
+
* The FormHelperTextProps found on the TextFieldProps are deprecated
|
|
16
|
+
* and will be removed in MUI 7, so we must now add the prop ourselves.
|
|
17
|
+
*/
|
|
18
|
+
FormHelperTextProps?: Partial<FormHelperTextProps>;
|
|
12
19
|
};
|
|
13
20
|
/**
|
|
14
21
|
* Like TextField, but uses a FormLabel instead of an InputLabel. Also allows
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import ColorInput, {} from "../ColorInput/ColorInput.js";
|
|
4
4
|
import FormControl from "../FormControl/index.js";
|
|
5
|
-
import FormHelperText from "../FormHelperText/index.js";
|
|
5
|
+
import FormHelperText, {} from "../FormHelperText/index.js";
|
|
6
6
|
import FormLabel from "../FormLabel/index.js";
|
|
7
7
|
import { useId } from "../utils/react.js";
|
|
8
8
|
/**
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { TextFieldProps } from "@mui/material/TextField";
|
|
2
2
|
import { type FC } from "react";
|
|
3
3
|
import type { FormControlProps } from "../FormControl/index.js";
|
|
4
|
+
import { type FormHelperTextProps } from "../FormHelperText/index.js";
|
|
4
5
|
import { type NumberInputProps } from "../NumberInput/index.js";
|
|
5
6
|
/**
|
|
6
7
|
* Properties for FormLabelNumberField.
|
|
7
8
|
*/
|
|
8
|
-
export type FormLabelNumberFieldProps = Omit<TextFieldProps, "aria-label" | "value" | "onChange" | "InputProps" | "select" | "nativeSelect" | "multiline" | "minRows" | "maxRows" | "SelectProps" | "rows" | "type" | "title" | "onError"> & Pick<FormControlProps, "inlineHelpContent" | "inlineHelpUrl"> & NumberInputProps & {
|
|
9
|
+
export type FormLabelNumberFieldProps = Omit<TextFieldProps, "aria-label" | "value" | "onChange" | "InputProps" | "select" | "nativeSelect" | "multiline" | "minRows" | "maxRows" | "SelectProps" | "rows" | "type" | "title" | "onError" | "FormHelperTextProps"> & Pick<FormControlProps, "inlineHelpContent" | "inlineHelpUrl"> & NumberInputProps & {
|
|
9
10
|
InputProps?: Omit<NumberInputProps, "id" | "ref">;
|
|
10
11
|
NumberInputComponent?: FC<NumberInputProps>;
|
|
11
12
|
/**
|
|
@@ -23,6 +24,11 @@ export type FormLabelNumberFieldProps = Omit<TextFieldProps, "aria-label" | "val
|
|
|
23
24
|
* than the configured maxDecimalPlaces.
|
|
24
25
|
*/
|
|
25
26
|
maxDecimalPlacesErrorText?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The FormHelperTextProps found on the TextFieldProps are deprecated
|
|
29
|
+
* and will be removed in MUI 7
|
|
30
|
+
*/
|
|
31
|
+
FormHelperTextProps?: Partial<FormHelperTextProps>;
|
|
26
32
|
};
|
|
27
33
|
/**
|
|
28
34
|
* Like TextField, but uses a FormLabel instead of an InputLabel, and uses
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCallback, useContext, useState } from "react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import FormControl from "../FormControl/index.js";
|
|
5
|
-
import FormHelperText from "../FormHelperText/index.js";
|
|
5
|
+
import FormHelperText, {} from "../FormHelperText/index.js";
|
|
6
6
|
import FormLabel from "../FormLabel/index.js";
|
|
7
7
|
import { NumberFormatContext } from "../NumberFormatContext/NumberFormatContext.js";
|
|
8
8
|
import { DEFAULT_DECIMAL_PLACES, } from "../NumberInput/index.js";
|
|
@@ -13,7 +13,7 @@ import { useId } from "../utils/react.js";
|
|
|
13
13
|
* NumberInput instead of a normal input.
|
|
14
14
|
*/
|
|
15
15
|
const FormLabelNumberField = forwardRef((props, ref) => {
|
|
16
|
-
const { autoComplete, autoFocus = false, children, className, defaultValue, FormHelperTextProps, fullWidth = false, helperText, id: idProp,
|
|
16
|
+
const { autoComplete, autoFocus = false, children, className, defaultValue, FormHelperTextProps, fullWidth = false, helperText, id: idProp, inputProps, InputProps, inputRef, label, name, NumberInputComponent, onBlur, onChange, onFocus, placeholder, value, min, max, numberOutOfRangeErrorText, invalidNumberErrorText, maxDecimalPlacesErrorText, error = false, onError, onErrorEnd, allowUndefined, maxDecimalPlaces = DEFAULT_DECIMAL_PLACES, correctOnBlur = true, ...other } = props;
|
|
17
17
|
const id = useId(idProp);
|
|
18
18
|
const helperTextId = helperText && id ? `${id}-helper-text` : undefined;
|
|
19
19
|
const inputLabelId = label && id ? `${id}-label` : undefined;
|
|
@@ -2,8 +2,9 @@ import { type SliderProps } from "@mui/material";
|
|
|
2
2
|
import type { TextFieldProps } from "@mui/material/TextField";
|
|
3
3
|
import { type FC } from "react";
|
|
4
4
|
import type { FormControlProps } from "../FormControl/index.js";
|
|
5
|
+
import { type FormHelperTextProps } from "../FormHelperText/index.js";
|
|
5
6
|
import { type ErrorType, type NumberInputProps } from "../NumberInput/index.js";
|
|
6
|
-
export type FormLabelSliderFieldProps = Omit<TextFieldProps, "variant" | "Value" | "onChange" | "defaultValue" | "type" | "select" | "multiline" | "minRows" | "maxRows" | "SelectProps" | "rows" | "InputProps" | "inputProps" | "onError"> & Pick<FormControlProps, "inlineHelpContent" | "inlineHelpUrl"> & {
|
|
7
|
+
export type FormLabelSliderFieldProps = Omit<TextFieldProps, "variant" | "Value" | "onChange" | "defaultValue" | "type" | "select" | "multiline" | "minRows" | "maxRows" | "SelectProps" | "rows" | "InputProps" | "inputProps" | "onError" | "FormHelperTextProps"> & Pick<FormControlProps, "inlineHelpContent" | "inlineHelpUrl"> & {
|
|
7
8
|
value?: number;
|
|
8
9
|
onChange?: (value: number) => void;
|
|
9
10
|
SliderProps?: SliderProps;
|
|
@@ -11,6 +12,11 @@ export type FormLabelSliderFieldProps = Omit<TextFieldProps, "variant" | "Value"
|
|
|
11
12
|
InputProps?: Omit<NumberInputProps, "allowUndefined">;
|
|
12
13
|
inputProps?: NumberInputProps["inputProps"];
|
|
13
14
|
defaultValue?: number;
|
|
15
|
+
/**
|
|
16
|
+
* The FormHelperTextProps found on the TextFieldProps are deprecated
|
|
17
|
+
* and will be removed in MUI 7
|
|
18
|
+
*/
|
|
19
|
+
FormHelperTextProps?: Partial<FormHelperTextProps>;
|
|
14
20
|
/**
|
|
15
21
|
* A label to display as helpText when the number input value is out of
|
|
16
22
|
* range, relative to the min and max properties.
|
|
@@ -3,7 +3,7 @@ import { Slider, useTheme } from "@mui/material";
|
|
|
3
3
|
import { Stack } from "@mui/material";
|
|
4
4
|
import { forwardRef, useCallback, useContext, useRef, useState } from "react";
|
|
5
5
|
import FormControl from "../FormControl/index.js";
|
|
6
|
-
import FormHelperText from "../FormHelperText/index.js";
|
|
6
|
+
import FormHelperText, {} from "../FormHelperText/index.js";
|
|
7
7
|
import FormLabel from "../FormLabel/index.js";
|
|
8
8
|
import { NumberFormatContext } from "../NumberFormatContext/NumberFormatContext.js";
|
|
9
9
|
import NumberInput, { DEFAULT_DECIMAL_PLACES, } from "../NumberInput/index.js";
|
|
@@ -13,7 +13,7 @@ import { useId } from "../utils/react.js";
|
|
|
13
13
|
* for inline help.
|
|
14
14
|
*/
|
|
15
15
|
const FormLabelSliderField = forwardRef((props, ref) => {
|
|
16
|
-
const { autoComplete, autoFocus = false, defaultValue, disabled,
|
|
16
|
+
const { autoComplete, autoFocus = false, defaultValue, disabled, fullWidth = false, helperText, id: idProp, inputProps, InputProps, inputRef, label, name, onBlur, onChange, onFocus, onKeyDown, onMouseUp, placeholder, slotProps, value, SliderProps, numberOutOfRangeErrorText, invalidNumberErrorText, onError, onErrorEnd, error, maxDecimalPlacesErrorText, NumberInputComponent, FormHelperTextProps, ...other } = props;
|
|
17
17
|
const inputId = `${useId(idProp)}-input`;
|
|
18
18
|
const sliderId = `${useId(idProp)}-slider`;
|
|
19
19
|
const helperTextId = helperText && inputId ? `${inputId}-helper-text` : undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { TextFieldProps } from "@mui/material/TextField";
|
|
2
3
|
import type { FormControlProps } from "../FormControl/index.js";
|
|
3
4
|
export type FormLabelTextFieldProps = Omit<TextFieldProps, "variant"> & Pick<FormControlProps, "inlineHelpContent" | "inlineHelpUrl"> & {
|
package/LicenseInfo/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "@mui/x-license
|
|
1
|
+
export * from "@mui/x-license";
|
package/LicenseInfo/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "@mui/x-license
|
|
1
|
+
export * from "@mui/x-license";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
|
-
import type
|
|
2
|
+
import { type BoxProps } from "../Box/index.js";
|
|
3
|
+
export interface MenuItemSecondaryActionProps extends BoxProps {
|
|
4
|
+
}
|
|
3
5
|
/**
|
|
4
6
|
* For use within a MenuList (or other list that implements arrow key
|
|
5
7
|
* navigation). The standard ListItemSecondaryAction will break keyboard
|
|
@@ -7,5 +9,5 @@ import type { ListItemSecondaryActionProps } from "../ListItemSecondaryAction/in
|
|
|
7
9
|
*
|
|
8
10
|
* @param props The component properties.
|
|
9
11
|
*/
|
|
10
|
-
declare const MenuItemSecondaryAction: FC<
|
|
12
|
+
declare const MenuItemSecondaryAction: FC<MenuItemSecondaryActionProps>;
|
|
11
13
|
export default MenuItemSecondaryAction;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useRef } from "react";
|
|
3
|
-
import
|
|
3
|
+
import Box, {} from "../Box/index.js";
|
|
4
4
|
import { styled } from "../styles/index.js";
|
|
5
|
-
const
|
|
5
|
+
const SecondaryActionContainer = styled(Box)({
|
|
6
6
|
display: "flex",
|
|
7
7
|
flexShrink: 0,
|
|
8
8
|
});
|
|
@@ -28,7 +28,7 @@ const MenuItemSecondaryAction = props => {
|
|
|
28
28
|
event.stopPropagation();
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
return (_jsx(
|
|
31
|
+
return (_jsx(SecondaryActionContainer, { className: className, onClick: event => {
|
|
32
32
|
event.stopPropagation();
|
|
33
33
|
}, onKeyDown: onKeyDown, onMouseDown: event => {
|
|
34
34
|
// This will stop child ripples from propagating.
|
|
@@ -2,7 +2,7 @@ import { type FC } from "react";
|
|
|
2
2
|
import type { FontJson } from "./SymbolJson.js";
|
|
3
3
|
import { type FontFamily } from "./fonts.js";
|
|
4
4
|
import type { BoxProps } from "../Box";
|
|
5
|
-
import type { FormLabelAutocompleteFieldProps } from "../FormLabelAutocompleteField/FormLabelAutocompleteField
|
|
5
|
+
import type { FormLabelAutocompleteFieldProps } from "../FormLabelAutocompleteField/FormLabelAutocompleteField.js";
|
|
6
6
|
import type { FormLabelSliderFieldProps } from "../FormLabelSliderField";
|
|
7
7
|
import type { FormLabelTextFieldProps } from "../FormLabelTextField";
|
|
8
8
|
export interface FontInputProps extends Omit<BoxProps, "onChange"> {
|
package/SymbolInput/FontInput.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useRef } from "react";
|
|
|
3
3
|
import { fonts } from "./fonts.js";
|
|
4
4
|
import { DEFAULT_LANGUAGE } from "./utilities.js";
|
|
5
5
|
import Box from "../Box/index.js";
|
|
6
|
-
import FormLabelAutocompleteField from "../FormLabelAutocompleteField/FormLabelAutocompleteField
|
|
6
|
+
import FormLabelAutocompleteField from "../FormLabelAutocompleteField/FormLabelAutocompleteField.js";
|
|
7
7
|
import FormLabelSliderField from "../FormLabelSliderField/index.js";
|
|
8
8
|
import FormLabelTextField from "../FormLabelTextField/index.js";
|
|
9
9
|
import { useId } from "../utils/react.js";
|
|
@@ -21,7 +21,7 @@ const defaultFontJson = {
|
|
|
21
21
|
family: "sans-serif",
|
|
22
22
|
};
|
|
23
23
|
export const FontInput = ({ font, fontFamilies, languageResources, onChange, AutoCompleteComponent, TextInputComponent, NumberInputComponent, ...props }) => {
|
|
24
|
-
const AutocompleteInput = AutoCompleteComponent ?? FormLabelAutocompleteField;
|
|
24
|
+
const AutocompleteInput = AutoCompleteComponent ?? (FormLabelAutocompleteField);
|
|
25
25
|
const FormTextInput = TextInputComponent ?? FormLabelTextField;
|
|
26
26
|
const FormNumberInput = NumberInputComponent ?? FormLabelSliderField;
|
|
27
27
|
const { current: fontList } = useRef([...(fontFamilies ?? fonts)]);
|
|
@@ -72,9 +72,9 @@ export const FontInput = ({ font, fontFamilies, languageResources, onChange, Aut
|
|
|
72
72
|
return (_jsxs(Box, { ...props, children: [_jsx(AutocompleteInput, { fullWidth: true, disableClearable: true, options: fontList, label: text.fontFamily, "aria-labelledby": labelId, filterOptions: (options, state) => fontList.filter(f => f.name.toLocaleLowerCase().includes(state.inputValue.toLocaleLowerCase())), getOptionLabel: option => option.name, value: fontFamily, onChange: (event, newValue, reason, details) => {
|
|
73
73
|
onChange({
|
|
74
74
|
...font,
|
|
75
|
-
family: newValue
|
|
76
|
-
style: newValue
|
|
77
|
-
weight: newValue
|
|
75
|
+
family: newValue?.font?.family,
|
|
76
|
+
style: newValue?.font?.style,
|
|
77
|
+
weight: newValue?.font?.weight,
|
|
78
78
|
});
|
|
79
79
|
} }), _jsx(FormNumberInput, { fullWidth: true, SliderProps: {
|
|
80
80
|
step: 0.5,
|
package/Tab/Tab.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export declare const tabClasses: {
|
|
|
32
32
|
fullWidth: string;
|
|
33
33
|
wrapped: string;
|
|
34
34
|
iconWrapper: string;
|
|
35
|
+
icon: string;
|
|
35
36
|
};
|
|
36
37
|
export type TabClasses = MUITabClasses & ButtonBaseClasses & Record<keyof typeof gcxTabClasses, string>;
|
|
37
38
|
export type TabClassKey = keyof TabClasses;
|
package/Tabs/Tabs.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertigis/react-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.1",
|
|
4
4
|
"description": "Utilities and React components used in VertiGIS applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vertigis",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
],
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@mui/icons-material": "
|
|
18
|
-
"@mui/material": "
|
|
19
|
-
"@mui/x-data-grid-pro": "7.
|
|
20
|
-
"@mui/x-date-pickers-pro": "7.
|
|
21
|
-
"@mui/x-license
|
|
22
|
-
"@mui/x-tree-view": "7.
|
|
17
|
+
"@mui/icons-material": "^6.4.0",
|
|
18
|
+
"@mui/material": "^6.4.0",
|
|
19
|
+
"@mui/x-data-grid-pro": "^7.24.0",
|
|
20
|
+
"@mui/x-date-pickers-pro": "^7.24.0",
|
|
21
|
+
"@mui/x-license": "^7.24.1",
|
|
22
|
+
"@mui/x-tree-view": "^7.24.0",
|
|
23
23
|
"autosuggest-highlight": "^3.3.4",
|
|
24
24
|
"clsx": "^2.1.0",
|
|
25
25
|
"color": "^4.2.3",
|
package/styles/createTheme.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type { Theme, ThemeOptions } from "@mui/material/styles";
|
|
1
|
+
import type { Components, Theme, ThemeOptions as MuiThemeOptions } from "@mui/material/styles";
|
|
2
|
+
import type { PickerComponents, PickersProComponents } from "../styles/themeAugmentation.js";
|
|
2
3
|
export type * from "../styles/themeAugmentation.js";
|
|
3
|
-
export type
|
|
4
|
+
export type ThemeOptions = Omit<MuiThemeOptions, "components"> & {
|
|
5
|
+
components?: Components<Omit<Theme, "components">> & PickerComponents<Theme> & PickersProComponents<Theme>;
|
|
6
|
+
};
|
|
7
|
+
export type { Theme };
|
|
4
8
|
export interface CreateThemeOptions extends ThemeOptions {
|
|
5
9
|
/**
|
|
6
10
|
* If specified, sets the `dense` property on components that supports it,
|
package/styles/createTheme.js
CHANGED
|
@@ -244,6 +244,40 @@ function getComponentOverrides(theme, isDense) {
|
|
|
244
244
|
"&.Mui-focusVisible:active": {
|
|
245
245
|
backgroundColor: alpha(palette.grey.A200, 0.5),
|
|
246
246
|
},
|
|
247
|
+
variants: [
|
|
248
|
+
{
|
|
249
|
+
// The "grey" color is our own augmentation which is
|
|
250
|
+
// equivalent to the "default" color in MUI v4, which
|
|
251
|
+
// was removed in v5.
|
|
252
|
+
props: { color: "grey", variant: "contained" },
|
|
253
|
+
style: {
|
|
254
|
+
color: palette.getContrastText(palette.grey[300]),
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
props: { color: "grey", variant: "outlined" },
|
|
259
|
+
style: {
|
|
260
|
+
color: palette.text.primary,
|
|
261
|
+
borderColor: palette.custom.greyOutline,
|
|
262
|
+
"&.Mui-disabled": {
|
|
263
|
+
border: `1px solid ${palette.action.disabledBackground}`,
|
|
264
|
+
},
|
|
265
|
+
"&:hover": {
|
|
266
|
+
borderColor: palette.custom.greyOutline,
|
|
267
|
+
backgroundColor: alpha(palette.text.primary, palette.action.hoverOpacity),
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
props: { color: "grey", variant: "text" },
|
|
273
|
+
style: {
|
|
274
|
+
color: palette.text.primary,
|
|
275
|
+
"&:hover": {
|
|
276
|
+
backgroundColor: alpha(palette.text.primary, palette.action.hoverOpacity),
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
],
|
|
247
281
|
},
|
|
248
282
|
contained: {
|
|
249
283
|
borderColor: palette.grey[400],
|
|
@@ -298,40 +332,6 @@ function getComponentOverrides(theme, isDense) {
|
|
|
298
332
|
},
|
|
299
333
|
},
|
|
300
334
|
},
|
|
301
|
-
variants: [
|
|
302
|
-
{
|
|
303
|
-
// The "grey" color is our own augmentation which is
|
|
304
|
-
// equivalent to the "default" color in MUI v4, which
|
|
305
|
-
// was removed in v5.
|
|
306
|
-
props: { variant: "contained", color: "grey" },
|
|
307
|
-
style: {
|
|
308
|
-
color: palette.getContrastText(palette.grey[300]),
|
|
309
|
-
},
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
props: { variant: "outlined", color: "grey" },
|
|
313
|
-
style: {
|
|
314
|
-
color: palette.text.primary,
|
|
315
|
-
borderColor: palette.custom.greyOutline,
|
|
316
|
-
"&.Mui-disabled": {
|
|
317
|
-
border: `1px solid ${palette.action.disabledBackground}`,
|
|
318
|
-
},
|
|
319
|
-
"&:hover": {
|
|
320
|
-
borderColor: palette.custom.greyOutline,
|
|
321
|
-
backgroundColor: alpha(palette.text.primary, palette.action.hoverOpacity),
|
|
322
|
-
},
|
|
323
|
-
},
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
props: { color: "grey", variant: "text" },
|
|
327
|
-
style: {
|
|
328
|
-
color: palette.text.primary,
|
|
329
|
-
"&:hover": {
|
|
330
|
-
backgroundColor: alpha(palette.text.primary, palette.action.hoverOpacity),
|
|
331
|
-
},
|
|
332
|
-
},
|
|
333
|
-
},
|
|
334
|
-
],
|
|
335
335
|
},
|
|
336
336
|
MuiButtonBase: {
|
|
337
337
|
styleOverrides: {
|
|
@@ -369,20 +369,6 @@ function getComponentOverrides(theme, isDense) {
|
|
|
369
369
|
focusRipple: false,
|
|
370
370
|
},
|
|
371
371
|
},
|
|
372
|
-
MuiClock: {
|
|
373
|
-
styleOverrides: {
|
|
374
|
-
amButton: {
|
|
375
|
-
"& .MuiTypography-caption": {
|
|
376
|
-
fontStyle: "normal",
|
|
377
|
-
},
|
|
378
|
-
},
|
|
379
|
-
pmButton: {
|
|
380
|
-
"& .MuiTypography-caption": {
|
|
381
|
-
fontStyle: "normal",
|
|
382
|
-
},
|
|
383
|
-
},
|
|
384
|
-
},
|
|
385
|
-
},
|
|
386
372
|
MuiCssBaseline: {
|
|
387
373
|
styleOverrides: {
|
|
388
374
|
html: {
|
|
@@ -616,6 +602,18 @@ function getComponentOverrides(theme, isDense) {
|
|
|
616
602
|
MuiListItem: {
|
|
617
603
|
styleOverrides: {
|
|
618
604
|
root: {
|
|
605
|
+
variants: [
|
|
606
|
+
{
|
|
607
|
+
// HACK: The button prop is deprecated in MUI 5 in favor
|
|
608
|
+
// of using ListItemButton. This applies the same
|
|
609
|
+
// styling for any existing code still using this
|
|
610
|
+
// property.
|
|
611
|
+
props: { button: true },
|
|
612
|
+
style: {
|
|
613
|
+
...getMenuItemStyles(theme),
|
|
614
|
+
},
|
|
615
|
+
},
|
|
616
|
+
],
|
|
619
617
|
"&.MuiListItem-secondaryAction, &>.MuiListItemButton-root": {
|
|
620
618
|
// Disable the right padding of 48px that MUI uses
|
|
621
619
|
// to make room for secondary actions, since we use
|
|
@@ -639,20 +637,6 @@ function getComponentOverrides(theme, isDense) {
|
|
|
639
637
|
alignItems: "center",
|
|
640
638
|
},
|
|
641
639
|
},
|
|
642
|
-
variants: [
|
|
643
|
-
{
|
|
644
|
-
// HACK: The button prop is deprecated in MUI 5 in favor
|
|
645
|
-
// of using ListItemButton. This applies the same
|
|
646
|
-
// styling for any existing code still using this
|
|
647
|
-
// property.
|
|
648
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
649
|
-
// @ts-expect-error
|
|
650
|
-
props: { button: true },
|
|
651
|
-
style: {
|
|
652
|
-
...getMenuItemStyles(theme),
|
|
653
|
-
},
|
|
654
|
-
},
|
|
655
|
-
],
|
|
656
640
|
},
|
|
657
641
|
MuiListItemSecondaryAction: {
|
|
658
642
|
styleOverrides: {
|