@mtes-mct/monitor-ui 2.13.0 → 2.13.2

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mtes-mct/monitor-ui",
3
3
  "description": "Common React UI components and styles for Monitorfish and Monitorenv.",
4
- "version": "2.13.0",
4
+ "version": "2.13.2",
5
5
  "license": "AGPL-3.0",
6
6
  "engines": {
7
7
  "node": ">=18"
@@ -1,7 +1,7 @@
1
1
  import type { Option } from '../types';
2
2
  import type { Promisable } from 'type-fest';
3
3
  export type MultiCheckboxProps<OptionValue = string> = {
4
- defaultValue?: string[] | undefined;
4
+ defaultValue?: OptionValue[] | undefined;
5
5
  disabled?: boolean | undefined;
6
6
  error?: string | undefined;
7
7
  isInline?: boolean | undefined;
@@ -12,4 +12,4 @@ export type MultiCheckboxProps<OptionValue = string> = {
12
12
  onChange?: ((nextValue: OptionValue[] | undefined) => Promisable<void>) | undefined;
13
13
  options: Option<OptionValue>[];
14
14
  };
15
- export declare function MultiCheckbox({ defaultValue, disabled, error, isInline, isLabelHidden, isLight, label, name, onChange, options }: MultiCheckboxProps): JSX.Element;
15
+ export declare function MultiCheckbox<OptionValue = string>({ defaultValue, disabled, error, isInline, isLabelHidden, isLight, label, name, onChange, options }: MultiCheckboxProps<OptionValue>): JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import type { Option } from '../types';
2
2
  import type { Promisable } from 'type-fest';
3
3
  export type MultiRadioProps<OptionValue = string> = {
4
- defaultValue?: string | undefined;
4
+ defaultValue?: OptionValue | undefined;
5
5
  disabled?: boolean | undefined;
6
6
  error?: string | undefined;
7
7
  isInline?: boolean | undefined;
@@ -12,4 +12,4 @@ export type MultiRadioProps<OptionValue = string> = {
12
12
  onChange?: ((nextValue: OptionValue | undefined) => Promisable<void>) | undefined;
13
13
  options: Option<OptionValue>[];
14
14
  };
15
- export declare function MultiRadio({ defaultValue, disabled, error, isInline, isLabelHidden, isLight, label, name, onChange, options }: MultiRadioProps): JSX.Element;
15
+ export declare function MultiRadio<OptionValue = string>({ defaultValue, disabled, error, isInline, isLabelHidden, isLight, label, name, onChange, options }: MultiRadioProps<OptionValue>): JSX.Element;
@@ -4,7 +4,7 @@ import type { Promisable } from 'type-fest';
4
4
  export type MultiSelectProps<OptionValue = string> = Omit<TagPickerProps, 'as' | 'container' | 'data' | 'defaultValue' | 'id' | 'onChange' | 'value'> & {
5
5
  /** Used to pass something else than `window.document` as a base container to attach global events listeners. */
6
6
  baseContainer?: Document | HTMLDivElement | null | undefined;
7
- defaultValue?: string[] | undefined;
7
+ defaultValue?: OptionValue[] | undefined;
8
8
  error?: string | undefined;
9
9
  /** Width in pixels */
10
10
  fixedWidth?: number | undefined;
@@ -15,4 +15,4 @@ export type MultiSelectProps<OptionValue = string> = Omit<TagPickerProps, 'as' |
15
15
  onChange?: ((nextValue: OptionValue[] | undefined) => Promisable<void>) | undefined;
16
16
  options: Option<OptionValue>[];
17
17
  };
18
- export declare function MultiSelect({ baseContainer, error, fixedWidth, isLabelHidden, isLight, label, onChange, options, searchable, ...originalProps }: MultiSelectProps): JSX.Element;
18
+ export declare function MultiSelect<OptionValue = string>({ baseContainer, error, fixedWidth, isLabelHidden, isLight, label, onChange, options, searchable, ...originalProps }: MultiSelectProps<OptionValue>): JSX.Element;
@@ -4,7 +4,7 @@ import type { Promisable } from 'type-fest';
4
4
  export type SelectProps<OptionValue = string> = Omit<SelectPickerProps<any>, 'as' | 'container' | 'data' | 'defaultValue' | 'id' | 'onChange' | 'value'> & {
5
5
  /** Used to pass something else than `window.document` as a base container to attach global events listeners. */
6
6
  baseContainer?: Document | HTMLDivElement | null | undefined;
7
- defaultValue?: string | undefined;
7
+ defaultValue?: OptionValue | undefined;
8
8
  error?: string | undefined;
9
9
  isLabelHidden?: boolean | undefined;
10
10
  isLight?: boolean | undefined;
@@ -13,4 +13,4 @@ export type SelectProps<OptionValue = string> = Omit<SelectPickerProps<any>, 'as
13
13
  onChange?: ((nextValue: OptionValue | undefined) => Promisable<void>) | undefined;
14
14
  options: Option<OptionValue>[];
15
15
  };
16
- export declare function Select({ baseContainer, error, isLabelHidden, isLight, label, onChange, options, searchable, ...originalProps }: SelectProps): JSX.Element;
16
+ export declare function Select<OptionValue = string>({ baseContainer, error, isLabelHidden, isLight, label, onChange, options, searchable, ...originalProps }: SelectProps<OptionValue>): JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import type { MultiCheckboxProps } from '../fields/MultiCheckbox';
2
- export type FormikMultiCheckboxProps = Omit<MultiCheckboxProps, 'defaultValue' | 'error' | 'onChange'>;
3
- export declare function FormikMultiCheckbox({ name, ...originalProps }: FormikMultiCheckboxProps): JSX.Element;
2
+ export type FormikMultiCheckboxProps<OptionValue = string> = Omit<MultiCheckboxProps<OptionValue>, 'defaultValue' | 'error' | 'onChange'>;
3
+ export declare function FormikMultiCheckbox<OptionValue = string>({ name, ...originalProps }: FormikMultiCheckboxProps<OptionValue>): JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import type { MultiRadioProps } from '../fields/MultiRadio';
2
- export type FormikMultiRadioProps = Omit<MultiRadioProps, 'defaultValue' | 'error' | 'onChange'>;
3
- export declare function FormikMultiRadio({ name, ...originalProps }: FormikMultiRadioProps): JSX.Element;
2
+ export type FormikMultiRadioProps<OptionValue = string> = Omit<MultiRadioProps<OptionValue>, 'defaultValue' | 'error' | 'onChange'>;
3
+ export declare function FormikMultiRadio<OptionValue = string>({ name, ...originalProps }: FormikMultiRadioProps<OptionValue>): JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import type { MultiSelectProps } from '../fields/MultiSelect';
2
- export type FormikMultiSelectProps = Omit<MultiSelectProps, 'defaultValue' | 'error' | 'onChange'>;
3
- export declare function FormikMultiSelect({ name, ...originalProps }: FormikMultiSelectProps): JSX.Element;
2
+ export type FormikMultiSelectProps<OptionValue = string> = Omit<MultiSelectProps<OptionValue>, 'defaultValue' | 'error' | 'onChange'>;
3
+ export declare function FormikMultiSelect<OptionValue = string>({ name, ...originalProps }: FormikMultiSelectProps<OptionValue>): JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import type { SelectProps } from '../fields/Select';
2
- export type FormikSelectProps = Omit<SelectProps, 'defaultValue' | 'error' | 'onChange'>;
3
- export declare function FormikSelect({ name, ...originalProps }: FormikSelectProps): JSX.Element;
2
+ export type FormikSelectProps<OptionValue = string> = Omit<SelectProps<OptionValue>, 'defaultValue' | 'error' | 'onChange'>;
3
+ export declare function FormikSelect<OptionValue = string>({ name, ...originalProps }: FormikSelectProps<OptionValue>): JSX.Element;