@vertigis/react-ui 19.0.2 → 19.1.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.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const highlightOptionClasses: {
3
2
  highlight: string;
4
3
  };
package/Chip/Chip.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ChipProps as MuiChipProps } from "@mui/material/Chip";
3
2
  export * from "@mui/material/Chip";
4
3
  export interface ChipProps extends MuiChipProps {
package/Chip/Chip.js CHANGED
@@ -7,7 +7,7 @@ import Clear from "../icons/Clear.js";
7
7
  export * from "@mui/material/Chip";
8
8
  const Chip = forwardRef(({ deleteIcon, label, deleteLabel = "", onClick, onDelete, ...props }, ref) => {
9
9
  // Replace the close button as it is not WCAG compliant by default.
10
- const deleteChipButton = useMemo(() => (_jsx(IconButton, { size: "small", "aria-label": deleteLabel, title: deleteLabel, children: deleteIcon ? deleteIcon : _jsx(Clear, { fontSize: "small" }) })), [deleteLabel, deleteIcon]);
10
+ const deleteChipButton = useMemo(() => (_jsx(IconButton, { size: "small", "aria-label": deleteLabel, title: deleteLabel, children: deleteIcon ?? _jsx(Clear, { fontSize: "small" }) })), [deleteLabel, deleteIcon]);
11
11
  const [title, setTitle] = useState();
12
12
  useEffect(() => {
13
13
  setTitle(typeof label === "string" ? label : undefined);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { BoxProps } from "@mui/material/Box";
3
2
  import type { SketchPickerStylesProps } from "react-color/lib/components/sketch/Sketch";
4
3
  import type { ButtonProps } from "../Button/index.js";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { InputProps as InputPropsType } from "../Input/index.js";
3
2
  import type { StackProps } from "../Stack/index.js";
4
3
  export declare const copyableTextClasses: {
@@ -4,5 +4,5 @@ export type { PickerValidDate };
4
4
  export * from "@mui/x-date-pickers/DatePicker";
5
5
  export interface DatePickerProps<TDate extends PickerValidDate> extends MuiDatePickerProps<TDate> {
6
6
  }
7
- declare const _default: <TDate extends unknown>(props: DatePickerProps<TDate>) => JSX.Element;
7
+ declare const _default: <TDate extends PickerValidDate>(props: DatePickerProps<TDate>) => JSX.Element;
8
8
  export default _default;
@@ -5,5 +5,5 @@ export * from "@mui/x-date-pickers-pro/DateRangePicker";
5
5
  export interface DateRangePickerProps<TDate extends PickerValidDate> extends MuiDateRangePickerProps<TDate> {
6
6
  dateSeparator?: string;
7
7
  }
8
- declare const _default: <TDate extends unknown>(props: DateRangePickerProps<TDate>) => JSX.Element;
8
+ declare const _default: <TDate extends PickerValidDate>(props: DateRangePickerProps<TDate>) => JSX.Element;
9
9
  export default _default;
@@ -4,5 +4,5 @@ export type { PickerValidDate };
4
4
  export * from "@mui/x-date-pickers/DateTimePicker";
5
5
  export interface DateTimePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends MuiDateTimePickerProps<TDate, TEnableAccessibleFieldDOMStructure> {
6
6
  }
7
- declare const _default: <TDate extends unknown, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: MuiDateTimePickerProps<TDate, TEnableAccessibleFieldDOMStructure>) => JSX.Element;
7
+ declare const _default: <TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: MuiDateTimePickerProps<TDate, TEnableAccessibleFieldDOMStructure>) => JSX.Element;
8
8
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { DateTimeRangePickerProps as MuiDateTimeRangePickerProps, PickerValidDate } from "@mui/x-date-pickers-pro";
3
2
  export interface DateTimeRangePickerProps extends MuiDateTimeRangePickerProps<PickerValidDate> {
4
3
  dateSeparator?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FormLabelClasses as MUIFormLabelClasses, FormLabelProps as MUIFormLabelProps } from "@mui/material/FormLabel";
3
2
  import type { OverridableComponent } from "@mui/material/OverridableComponent";
4
3
  declare const gcxFormLabelClasses: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { TextFieldProps } from "@mui/material/TextField";
3
2
  import { type ColorInputProps } from "../ColorInput/ColorInput.js";
4
3
  import type { FormControlProps } from "../FormControl/index.js";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { TextFieldProps } from "@mui/material/TextField";
3
2
  import type { FormControlProps } from "../FormControl/index.js";
4
3
  export type FormLabelTextFieldProps = Omit<TextFieldProps, "variant"> & Pick<FormControlProps, "inlineHelpContent" | "inlineHelpUrl"> & {
@@ -42,7 +42,7 @@ const InlineHelp = forwardRef(({ children, classes: classesProp, className, icon
42
42
  const handleIconPopoverClose = () => setIconBtnEl(undefined);
43
43
  return (_jsxs(Box, { className: clsx(classes.root, className), ref: ref, ...other, children: [_jsx(IconButton, { onClick: handleIconPopoverOpen, title: title, size: "small", "data-test": `${PREFIX}-button`, className: clsx(classes.button, {
44
44
  [classes.errorIcon]: formControl?.error,
45
- }), children: icon ? icon : _jsx(HelpIcon, { fontSize: "small" }) }), _jsxs(StyledPopover, { anchorEl: iconBtnEl, open: !!iconBtnEl, classes: { paper: classes.paper }, anchorOrigin: theme.direction === "rtl" ? RTL_ORIGIN : LTR_ORIGIN, transformOrigin: theme.direction === "rtl" ? RTL_ORIGIN : LTR_ORIGIN, onClose: () => {
45
+ }), children: icon ?? _jsx(HelpIcon, { fontSize: "small" }) }), _jsxs(StyledPopover, { anchorEl: iconBtnEl, open: !!iconBtnEl, classes: { paper: classes.paper }, anchorOrigin: theme.direction === "rtl" ? RTL_ORIGIN : LTR_ORIGIN, transformOrigin: theme.direction === "rtl" ? RTL_ORIGIN : LTR_ORIGIN, onClose: () => {
46
46
  handleIconPopoverClose();
47
47
  onClose?.();
48
48
  }, children: [_jsx(Typography, { children: children }), url && (_jsx(Link, { align: "right", display: "block", href: url.href, onClick: () => url.onClick?.(url.href), target: "_blank", variant: "body2", children: url.label }))] })] }));
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface NumberFormatContextProps {
3
2
  /**
4
3
  * Returns a stringified number that may include additional/alternative
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type InputProps } from "@mui/material/Input";
3
2
  export declare const DEFAULT_DECIMAL_PLACES = 16;
4
3
  export type ErrorType = "NaN" | "out-of-range" | "max-decimals" | "unknown";
@@ -1,3 +1,4 @@
1
+ import type { StyledComponent } from "@emotion/styled";
1
2
  import type { ButtonBaseClasses } from "@mui/material/ButtonBase";
2
3
  import type { IconButtonClasses } from "@mui/material/IconButton";
3
4
  import type { SwitchProps as MUISwitchProps, SwitchClasses as MUISwitchClasses } from "@mui/material/Switch";
@@ -8,5 +9,5 @@ export type SwitchClassKey = keyof SwitchClasses;
8
9
  export type SwitchProps = Omit<MUISwitchProps, "classes"> & {
9
10
  classes?: Partial<SwitchClasses>;
10
11
  };
11
- declare const Switch: import("@emotion/styled").StyledComponent<MUISwitchProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
12
+ declare const Switch: StyledComponent<SwitchProps>;
12
13
  export default Switch;
@@ -62,7 +62,9 @@ const SimpleFillSymbolInput = props => {
62
62
  },
63
63
  style: newState.fillStyle ?? fillStyle,
64
64
  };
65
- default:
65
+ case "esriSLS":
66
+ case "esriSMS":
67
+ case "esriTS":
66
68
  return { type };
67
69
  }
68
70
  };
@@ -53,7 +53,9 @@ const SimpleLineSymbolInput = props => {
53
53
  width: newState.lineWidth ?? lineWidth,
54
54
  style: newState.lineStyle ?? lineStyle,
55
55
  };
56
- default:
56
+ case "esriSFS":
57
+ case "esriSMS":
58
+ case "esriTS":
57
59
  return { type };
58
60
  }
59
61
  };
@@ -86,7 +86,9 @@ const SimpleMarkerSymbolInput = props => {
86
86
  xoffset: newState.xOffset ?? xOffset,
87
87
  yoffset: newState.yOffset ?? yOffset,
88
88
  };
89
- default:
89
+ case "esriSFS":
90
+ case "esriSLS":
91
+ case "esriTS":
90
92
  return { type };
91
93
  }
92
94
  };
@@ -74,7 +74,7 @@ export const getLineStyle = (symbol) => {
74
74
  return symbol.outline?.style;
75
75
  case "esriSLS":
76
76
  return symbol.style;
77
- default:
77
+ case "esriTS":
78
78
  return undefined;
79
79
  }
80
80
  };
@@ -82,7 +82,9 @@ export const getFillStyle = (symbol) => {
82
82
  switch (symbol?.type) {
83
83
  case "esriSFS":
84
84
  return symbol.style;
85
- default:
85
+ case "esriSLS":
86
+ case "esriSMS":
87
+ case "esriTS":
86
88
  return undefined;
87
89
  }
88
90
  };
@@ -93,7 +95,7 @@ export const getLineColor = (symbol) => {
93
95
  return symbol.outline?.color;
94
96
  case "esriSLS":
95
97
  return symbol.color;
96
- default:
98
+ case "esriTS":
97
99
  return undefined;
98
100
  }
99
101
  };
@@ -102,7 +104,8 @@ export const getFillColor = (symbol) => {
102
104
  case "esriSMS":
103
105
  case "esriSFS":
104
106
  return symbol.color;
105
- default:
107
+ case "esriSLS":
108
+ case "esriTS":
106
109
  return undefined;
107
110
  }
108
111
  };
@@ -113,7 +116,7 @@ export const getLineWidth = (symbol) => {
113
116
  return symbol.outline?.width;
114
117
  case "esriSLS":
115
118
  return symbol.width;
116
- default:
119
+ case "esriTS":
117
120
  return undefined;
118
121
  }
119
122
  };
package/Tabs/Tabs.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { TabsProps as MUITabsProps, TabsClasses as MUITabsClasses } from "@mui/material/Tabs";
3
2
  export * from "@mui/material/Tabs";
4
3
  declare const gcxTabsClasses: {
@@ -4,5 +4,5 @@ export type { PickerValidDate };
4
4
  export * from "@mui/x-date-pickers/TimePicker";
5
5
  export interface TimePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends MuiTimePickerProps<TDate, TEnableAccessibleFieldDOMStructure> {
6
6
  }
7
- declare const _default: <TDate extends unknown, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: TimePickerProps<TDate, TEnableAccessibleFieldDOMStructure>) => JSX.Element;
7
+ declare const _default: <TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: TimePickerProps<TDate, TEnableAccessibleFieldDOMStructure>) => JSX.Element;
8
8
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertigis/react-ui",
3
- "version": "19.0.2",
3
+ "version": "19.1.1",
4
4
  "description": "Utilities and React components used in VertiGIS applications.",
5
5
  "keywords": [
6
6
  "vertigis",
@@ -12,6 +12,7 @@
12
12
  "**/*.js",
13
13
  "**/*.d.ts"
14
14
  ],
15
+ "type": "module",
15
16
  "sideEffects": false,
16
17
  "dependencies": {
17
18
  "@mui/icons-material": "^6.4.0",
@@ -34,15 +35,14 @@
34
35
  "@types/autosuggest-highlight": "^3.2.3",
35
36
  "@types/color": "^3.0.6",
36
37
  "@types/lodash.escape": "^4.0.9",
38
+ "@types/react": "^18.3.12",
37
39
  "@types/react-color": "^3.0.12",
38
40
  "@vertigis/icons": "5.4.0"
39
41
  },
40
42
  "peerDependencies": {
41
- "@emotion/react": "*",
42
- "@emotion/styled": "*",
43
43
  "@esri/arcgis-html-sanitizer": "^4.0.3",
44
- "react": ">= 18 < 19",
45
- "react-dom": ">= 18 < 19"
46
- },
47
- "type": "module"
44
+ "@mui/system": "*",
45
+ "react": ">= 18 < 20",
46
+ "react-dom": ">= 18 < 20"
47
+ }
48
48
  }
@@ -37,7 +37,7 @@ export declare const defaultPalette: {
37
37
  A200: string;
38
38
  A400: string;
39
39
  A700: string;
40
- dark?: string | undefined;
40
+ dark?: string;
41
41
  };
42
42
  warning: {
43
43
  main: string;