@mtes-mct/monitor-ui 6.0.1 → 6.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ # [6.1.0](https://github.com/MTES-MCT/monitor-ui/compare/v6.0.1...v6.1.0) (2023-05-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **fields:** delete queryMap and queryUrl props ([5e00cb0](https://github.com/MTES-MCT/monitor-ui/commit/5e00cb0baa8dc6937b44a800e24f61d04a258ab7))
7
+
8
+
9
+ ### Features
10
+
11
+ * **fields:** add Icon prop to TextInput ([a885011](https://github.com/MTES-MCT/monitor-ui/commit/a885011f2cd0d09034e9d45a54a356b4ffdd7d6c))
12
+ * **icons:** update and add icons ([efd44f2](https://github.com/MTES-MCT/monitor-ui/commit/efd44f243fa2f2914b1c15a755245c99f2c06a76))
13
+
14
+ ## [6.0.1](https://github.com/MTES-MCT/monitor-ui/compare/v6.0.0...v6.0.1) (2023-05-19)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * add missing classnames ([23f83f1](https://github.com/MTES-MCT/monitor-ui/commit/23f83f13a2b909712bf1580e8e9545a314236dbb))
20
+
1
21
  # [6.0.0](https://github.com/MTES-MCT/monitor-ui/compare/v5.9.2...v6.0.0) (2023-05-17)
2
22
 
3
23
 
@@ -1,4 +1,4 @@
1
- import { Theme } from './theme';
1
+ import { type Theme } from './theme';
2
2
  import type { PartialDeep } from 'type-fest';
3
3
  export type ThemeProviderProps = {
4
4
  children: any;
@@ -61,10 +61,6 @@
61
61
  /* Checkbox vars */
62
62
  --rs-checkbox-disabled-bg: var(--white);
63
63
 
64
- /* input vars */
65
- --rs-input-bg: var(--gainsboro);
66
- --rs-input-focus-border: var(--blue-gray);
67
-
68
64
  --rs-menuitem-active-text: var(--blue-gray);
69
65
  --rs-listbox-option-hover-bg: var(--blue-yonder-25);
70
66
  --rs-listbox-option-selected-bg: var(--blue-gray-25);
@@ -78,27 +74,6 @@ label {
78
74
  line-height: 18px;
79
75
  }
80
76
 
81
- .rs-input {
82
- border-radius: 0;
83
- color: var(--gunMetal);
84
- }
85
-
86
- .rs-input.ghost {
87
- background-color: var(--white);
88
- }
89
-
90
- .rs-input-group,
91
- .rs-input-group:not(.rs-input-group-inside) .rs-auto-complete:first-child .rs-input,
92
- .rs-input-group:not(.rs-input-group-inside) .rs-form-control-wrapper:first-child > .rs-input,
93
- .rs-input-group:not(.rs-input-group-inside) .rs-picker-date:first-child .rs-picker-toggle,
94
- .rs-input-group:not(.rs-input-group-inside) > :first-child,
95
- .rs-input-group:not(.rs-input-group-inside) .rs-auto-complete:last-child .rs-input,
96
- .rs-input-group:not(.rs-input-group-inside) .rs-form-control-wrapper:last-child > .rs-input,
97
- .rs-input-group:not(.rs-input-group-inside) .rs-picker-date:last-child .rs-picker-toggle,
98
- .rs-input-group:not(.rs-input-group-inside) > :last-child {
99
- border-radius: 0;
100
- }
101
-
102
77
  .rs-picker-toggle-active,
103
78
  .rs-picker.rs-picker-focused {
104
79
  box-shadow: none;
@@ -106,14 +81,6 @@ label {
106
81
  border-radius: 0;
107
82
  }
108
83
 
109
- .rs-input-group-addon.primary {
110
- background-color: var(--rs-btn-primary-bg);
111
- }
112
-
113
- .rs-input-group.rs-input-group-inside .rs-input-group-addon {
114
- padding: 8px 13px 8px 11px;
115
- }
116
-
117
84
  /* button */
118
85
  .rs-ripple-pond {
119
86
  height: 30px;
@@ -8,4 +8,4 @@ export type DropdownProps = Omit<RsuiteDropdownProps, 'as' | 'icon'> & {
8
8
  export declare const Dropdown: FunctionComponent<DropdownProps> & {
9
9
  Item: FunctionComponent<DropdownItemProps>;
10
10
  };
11
- export { DropdownItemProps };
11
+ export { type DropdownItemProps };
@@ -1,4 +1,4 @@
1
- import { PureComponent, ReactNode } from 'react';
1
+ import { PureComponent, type ReactNode } from 'react';
2
2
  import type { Promisable } from 'type-fest';
3
3
  export type NewWindowProps = {
4
4
  center?: 'parent' | 'screen' | undefined;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent, HTMLAttributes } from 'react';
1
+ import { type FunctionComponent, type HTMLAttributes } from 'react';
2
2
  import { Accent, TagBullet } from '../../constants';
3
3
  import type { IconProps } from '../../types';
4
4
  export type TagProps = HTMLAttributes<HTMLSpanElement> & {
@@ -1,4 +1,4 @@
1
- import type { InputHTMLAttributes } from 'react';
1
+ import { type InputHTMLAttributes } from 'react';
2
2
  import type { Promisable } from 'type-fest';
3
3
  export type NumberInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'defaultValue' | 'maxLength' | 'onInput' | 'pattern' | 'type'> & {
4
4
  isLight: boolean;
@@ -11,4 +11,4 @@ export type NumberInputProps = Omit<InputProps, 'as' | 'defaultValue' | 'id' | '
11
11
  onChange?: ((nextValue: number | undefined) => Promisable<void>) | undefined;
12
12
  value?: number | undefined;
13
13
  };
14
- export declare function NumberInput({ error, isErrorMessageHidden, isLabelHidden, isLight, isUndefinedWhenDisabled, label, onChange, value, ...originalProps }: NumberInputProps): JSX.Element;
14
+ export declare function NumberInput({ className, error, isErrorMessageHidden, isLabelHidden, isLight, isUndefinedWhenDisabled, label, onChange, style, value, ...originalProps }: NumberInputProps): JSX.Element;
@@ -1,9 +1,9 @@
1
- import React from 'react';
1
+ import { type ElementType } from 'react';
2
2
  import type { Option, OptionValueType } from '../types';
3
3
  import type { AutoCompleteProps as RsuiteAutoCompleteProps } from 'rsuite';
4
4
  import type { Promisable } from 'type-fest';
5
5
  export type SearchProps<OptionValue extends OptionValueType = string> = Omit<RsuiteAutoCompleteProps, 'as' | 'container' | 'data' | 'defaultValue' | 'id' | 'onChange' | 'open' | 'onSelect' | 'value'> & {
6
- MenuItem?: React.ElementType | undefined;
6
+ MenuItem?: ElementType | undefined;
7
7
  /** Used to pass something else than `window.document` as a base container to attach global events listeners. */
8
8
  baseContainer?: Document | HTMLDivElement | null | undefined;
9
9
  error?: string | undefined;
@@ -17,10 +17,6 @@ export type SearchProps<OptionValue extends OptionValueType = string> = Omit<Rsu
17
17
  onQuery?: ((nextQuery: string | undefined) => Promisable<void>) | undefined;
18
18
  optionValueKey?: keyof OptionValue | undefined;
19
19
  options?: Option<OptionValue>[];
20
- queryMap?: ((record: Record<string, any>) => Option<OptionValue>) | undefined;
21
- queryUrl?: string | undefined;
22
- /** Duration in milliseconds */
23
- throttleDuration?: number;
24
20
  value?: OptionValue | undefined;
25
21
  };
26
- export declare function Search<OptionValue extends OptionValueType = string>({ baseContainer, className, error, isErrorMessageHidden, isLabelHidden, isLight, isSearchIconVisible, label, MenuItem, onChange, onQuery, options, optionValueKey, queryMap, queryUrl, throttleDuration, value, ...originalProps }: SearchProps<OptionValue>): JSX.Element;
22
+ export declare function Search<OptionValue extends OptionValueType = string>({ baseContainer, className, error, isErrorMessageHidden, isLabelHidden, isLight, isSearchIconVisible, label, MenuItem, onChange, onQuery, options, optionValueKey, value, ...originalProps }: SearchProps<OptionValue>): JSX.Element;
@@ -1,6 +1,10 @@
1
+ import { type FunctionComponent } from 'react';
2
+ import { Size } from '../constants';
3
+ import type { IconProps } from '../types';
1
4
  import type { InputProps } from 'rsuite';
2
5
  import type { Promisable } from 'type-fest';
3
- export type TextInputProps = Omit<InputProps, 'as' | 'defaultValue' | 'id' | 'onChange' | 'type' | 'value'> & {
6
+ export type TextInputProps = Omit<InputProps, 'as' | 'defaultValue' | 'id' | 'onChange' | 'size' | 'type' | 'value'> & {
7
+ Icon?: FunctionComponent<IconProps> | undefined;
4
8
  error?: string | undefined;
5
9
  isErrorMessageHidden?: boolean | undefined;
6
10
  isLabelHidden?: boolean | undefined;
@@ -9,6 +13,7 @@ export type TextInputProps = Omit<InputProps, 'as' | 'defaultValue' | 'id' | 'on
9
13
  label: string;
10
14
  name: string;
11
15
  onChange?: ((nextValue: string | undefined) => Promisable<void>) | undefined;
16
+ size?: Size | undefined;
12
17
  value?: string | undefined;
13
18
  };
14
- export declare function TextInput({ error, isErrorMessageHidden, isLabelHidden, isLight, isUndefinedWhenDisabled, label, onChange, value, ...originalProps }: TextInputProps): JSX.Element;
19
+ export declare function TextInput({ className, error, Icon, isErrorMessageHidden, isLabelHidden, isLight, isUndefinedWhenDisabled, label, onChange, size, style, value, ...originalProps }: TextInputProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from '../types';
2
+ export declare function Report({ color, size, ...nativeProps }: IconProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from '../types';
2
+ export declare function Semaphore({ color, size, ...nativeProps }: IconProps): JSX.Element;
package/icons/index.d.ts CHANGED
@@ -50,12 +50,14 @@ import { PinpointHide } from './PinpointHide';
50
50
  import { Plane } from './Plane';
51
51
  import { Plus } from './Plus';
52
52
  import { Reject } from './Reject';
53
+ import { Report } from './Report';
53
54
  import { Save } from './Save';
54
55
  import { Search } from './Search';
55
56
  import { SelectCircle } from './SelectCircle';
56
57
  import { SelectPolygon } from './SelectPolygon';
57
58
  import { SelectRectangle } from './SelectRectangle';
58
59
  import { SelectZone } from './SelectZone';
60
+ import { Semaphore } from './Semaphore';
59
61
  import { ShowErsMessages } from './ShowErsMessages';
60
62
  import { ShowXml } from './ShowXml';
61
63
  import { SortingArrows } from './SortingArrows';
@@ -66,4 +68,4 @@ import { Unlock } from './Unlock';
66
68
  import { Vessel } from './Vessel';
67
69
  import { ViewOnMap } from './ViewOnMap';
68
70
  import { Vms } from './Vms';
69
- export { ActivityFeed, Alert, Anchor, Archive, Attention, Calendar, Check, Chevron, Clock, Close, Confirm, Control, Delete, Display, DoubleChevron, Download, Drapeau, Duplicate, Edit, EditBis, Expand, Favorite, FilledArrow, Filter, FilterBis, Fishery, FishingEngine, FleetSegment, Focus, FocusVessel, FocusZones, Hide, Info, Infringement, Landmark, List, MapLayers, MeasureAngle, MeasureBrokenLine, MeasureCircle, MeasureLine, Minus, MissionAction, More, Note, Observation, Pin, Pinpoint, PinpointHide, Plane, Plus, Reject, Save, Search, SelectCircle, SelectPolygon, SelectRectangle, SelectZone, ShowErsMessages, ShowXml, SortingArrows, Summary, Tag, Target, Unlock, Vessel, ViewOnMap, Vms };
71
+ export { ActivityFeed, Alert, Anchor, Archive, Attention, Calendar, Check, Chevron, Clock, Close, Confirm, Control, Delete, Display, DoubleChevron, Download, Drapeau, Duplicate, Edit, EditBis, Expand, Favorite, FilledArrow, Filter, FilterBis, Fishery, FishingEngine, FleetSegment, Focus, FocusVessel, FocusZones, Hide, Info, Infringement, Landmark, List, MapLayers, MeasureAngle, MeasureBrokenLine, MeasureCircle, MeasureLine, Minus, MissionAction, More, Note, Observation, Pin, Pinpoint, PinpointHide, Plane, Plus, Reject, Report, Save, Search, SelectCircle, SelectPolygon, SelectRectangle, SelectZone, Semaphore, ShowErsMessages, ShowXml, SortingArrows, Summary, Tag, Target, Unlock, Vessel, ViewOnMap, Vms };