@mtes-mct/monitor-ui 1.12.1 → 1.14.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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [1.13.0](https://github.com/MTES-MCT/monitor-ui/compare/v1.12.1...v1.13.0) (2022-12-14)
2
+
3
+
4
+ ### Features
5
+
6
+ * **elements:** add Tag ([#121](https://github.com/MTES-MCT/monitor-ui/issues/121)) ([c9be13e](https://github.com/MTES-MCT/monitor-ui/commit/c9be13e463a8795223e0bafb3287e51aa196495a))
7
+
8
+ ## [1.12.1](https://github.com/MTES-MCT/monitor-ui/compare/v1.12.0...v1.12.1) (2022-12-14)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **icons:** use currentColor in new icons ([#119](https://github.com/MTES-MCT/monitor-ui/issues/119)) ([3937553](https://github.com/MTES-MCT/monitor-ui/commit/39375532354d24489ab3aeb024ebe5b2cb61772a))
14
+
1
15
  # [1.12.0](https://github.com/MTES-MCT/monitor-ui/compare/v1.11.0...v1.12.0) (2022-12-13)
2
16
 
3
17
 
File without changes
@@ -1,4 +1,4 @@
1
- import { Accent, Size } from '../contants';
1
+ import { Accent, Size } from '../constants';
2
2
  import type { IconProps } from '../types';
3
3
  import type { ButtonHTMLAttributes, FunctionComponent } from 'react';
4
4
  export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
@@ -1,10 +1,12 @@
1
- import { Accent, Size } from '../contants';
1
+ import { Accent, Size } from '../constants';
2
2
  import type { IconProps } from '../types';
3
3
  import type { ButtonHTMLAttributes, FunctionComponent } from 'react';
4
4
  export type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> & {
5
5
  Icon: FunctionComponent<IconProps>;
6
6
  accent?: Accent;
7
7
  color?: string;
8
+ /** In REM, override `size` prop default values */
9
+ iconSize?: number;
8
10
  size?: Size;
9
11
  };
10
- export declare function IconButton({ accent, color, Icon, size, type, ...nativeProps }: IconButtonProps): JSX.Element;
12
+ export declare function IconButton({ accent, color, Icon, iconSize, size, type, ...nativeProps }: IconButtonProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const Disk: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
2
+ $color: string;
3
+ }, never>;
@@ -0,0 +1,3 @@
1
+ export declare enum TagBullet {
2
+ DISK = "DISK"
3
+ }
@@ -0,0 +1,30 @@
1
+ import { FunctionComponent, HTMLAttributes } from 'react';
2
+ import { Accent } from '../../constants';
3
+ import { TagBullet } from './constants';
4
+ import type { IconProps } from '../../types';
5
+ export type TagProps = HTMLAttributes<HTMLSpanElement> & {
6
+ Icon?: FunctionComponent<IconProps>;
7
+ accent?: Accent;
8
+ bullet?: TagBullet;
9
+ color?: string;
10
+ isLight?: boolean;
11
+ };
12
+ export declare function Tag({ accent, bullet, children, color, Icon, isLight, ...nativeProps }: TagProps): JSX.Element;
13
+ export declare const PrimaryTag: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
14
+ $color?: string | undefined;
15
+ $isLight: boolean;
16
+ } & {
17
+ $isLight: boolean;
18
+ }, never>;
19
+ export declare const SecondaryTag: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
20
+ $color?: string | undefined;
21
+ $isLight: boolean;
22
+ } & {
23
+ $isLight: boolean;
24
+ }, never>;
25
+ export declare const TertiaryTag: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
26
+ $color?: string | undefined;
27
+ $isLight: boolean;
28
+ } & {
29
+ $isLight: boolean;
30
+ }, never>;
@@ -0,0 +1,15 @@
1
+ import type { Option } from '../types';
2
+ import type { AutoCompleteProps as RsuiteAutoCompleteProps } from 'rsuite';
3
+ import type { Promisable } from 'type-fest';
4
+ export type AutoCompleteProps = Omit<RsuiteAutoCompleteProps, 'as' | 'data' | 'id' | 'onChange' | 'onSelect' | 'value'> & {
5
+ isLabelHidden?: boolean;
6
+ isLight?: boolean;
7
+ label: string;
8
+ name: string;
9
+ onChange?: (nextValue: string | undefined) => Promisable<void>;
10
+ onQuery?: (nextQuery: string | undefined) => Promisable<void>;
11
+ options?: Option[];
12
+ queryMap?: (record: Record<string, any>) => Option;
13
+ queryUrl?: string;
14
+ };
15
+ export declare function AutoComplete({ defaultValue, isLabelHidden, isLight, label, onChange, onQuery, options, queryMap, queryUrl, ...originalProps }: AutoCompleteProps): JSX.Element;
@@ -8,7 +8,4 @@ export type TextInputProps = Omit<InputProps, 'as' | 'defaultValue' | 'id' | 'on
8
8
  name: string;
9
9
  onChange?: (nextValue: string | undefined) => Promisable<void>;
10
10
  };
11
- export declare function TextInput({ isLabelHidden, label, onChange, ...originalProps }: TextInputProps): JSX.Element;
12
- export declare const StyledInput: import("styled-components").StyledComponent<import("rsuite/esm/@types/common").RsRefForwardingComponent<"input", InputProps>, import("styled-components").DefaultTheme, {
13
- isLight: boolean;
14
- }, never>;
11
+ export declare function TextInput({ isLabelHidden, isLight, label, onChange, ...originalProps }: TextInputProps): JSX.Element;
@@ -9,6 +9,3 @@ export type TextareaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'd
9
9
  onChange?: (nextValue: string | undefined) => Promisable<void>;
10
10
  };
11
11
  export declare function Textarea({ isLabelHidden, isLight, label, onChange, rows, ...originalProps }: TextareaProps): JSX.Element;
12
- export declare const StyledInput: import("styled-components").StyledComponent<import("rsuite/esm/@types/common").RsRefForwardingComponent<"input", import("rsuite").InputProps>, import("styled-components").DefaultTheme, {
13
- isLight: boolean;
14
- }, never>;
@@ -0,0 +1,3 @@
1
+ import type { AutoCompleteProps } from '../fields/AutoComplete';
2
+ export type FormikAutoCompleteProps = Omit<AutoCompleteProps, 'defaultValue' | 'onChange'>;
3
+ export declare function FormikAutoComplete({ name, ...originalProps }: FormikAutoCompleteProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from '../types';
2
+ export declare function FilterBis({ color, size, ...nativeProps }: IconProps): JSX.Element;
package/icons/index.d.ts CHANGED
@@ -21,6 +21,7 @@ import { EditBis } from './EditBis';
21
21
  import { Favorite } from './Favorite';
22
22
  import { FilledArrow } from './FilledArrow';
23
23
  import { Filter } from './Filter';
24
+ import { FilterBis } from './FilterBis';
24
25
  import { Fishery } from './Fishery';
25
26
  import { FishingEngine } from './FishingEngine';
26
27
  import { FleetSegment } from './FleetSegment';
@@ -61,4 +62,4 @@ import { Tag } from './Tag';
61
62
  import { Unlock } from './Unlock';
62
63
  import { Vessel } from './Vessel';
63
64
  import { ViewOnMap } from './ViewOnMap';
64
- export { ActivityFeed, Alert, Anchor, Archive, Attention, Calendar, Check, Chevron, Clock, Close, Confirm, Control, Delete, Display, DoubleChevron, Download, Drapeau, Duplicate, Edit, EditBis, Favorite, FilledArrow, Filter, Fishery, FishingEngine, FleetSegment, Focus, FocusVessel, FocusZones, Hide, Info, Infringement, Landmark, List, MapLayers, MeasureAngle, MeasureBrokenLine, MeasureCircle, MeasureLine, Minus, More, Note, Observation, Pin, Pinpoint, PinpointHide, Plane, Plus, Reject, Save, Search, SelectCircle, SelectPolygon, SelectRectangle, SelectZone, ShowErsMessages, ShowXml, SortingArrows, Summary, Tag, Unlock, Vessel, ViewOnMap };
65
+ export { ActivityFeed, Alert, Anchor, Archive, Attention, Calendar, Check, Chevron, Clock, Close, Confirm, Control, Delete, Display, DoubleChevron, Download, Drapeau, Duplicate, Edit, EditBis, Favorite, FilledArrow, Filter, FilterBis, Fishery, FishingEngine, FleetSegment, Focus, FocusVessel, FocusZones, Hide, Info, Infringement, Landmark, List, MapLayers, MeasureAngle, MeasureBrokenLine, MeasureCircle, MeasureLine, Minus, More, Note, Observation, Pin, Pinpoint, PinpointHide, Plane, Plus, Reject, Save, Search, SelectCircle, SelectPolygon, SelectRectangle, SelectZone, ShowErsMessages, ShowXml, SortingArrows, Summary, Tag, Unlock, Vessel, ViewOnMap };
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { Accent, Size } from './contants';
1
+ export { Accent, Size } from './constants';
2
2
  export { GlobalStyle } from './GlobalStyle';
3
3
  export { THEME } from './theme';
4
4
  export { ThemeProvider } from './ThemeProvider';
@@ -9,6 +9,8 @@ export { Fieldset } from './elements/Fieldset';
9
9
  export { IconButton } from './elements/IconButton';
10
10
  export { Label } from './elements/Label';
11
11
  export { Legend } from './elements/Legend';
12
+ export { Tag } from './elements/Tag';
13
+ export { AutoComplete } from './fields/AutoComplete';
12
14
  export { Checkbox } from './fields/Checkbox';
13
15
  export { DateRangePicker } from './fields/DateRangePicker';
14
16
  export { DatePicker } from './fields/DatePicker';
@@ -18,6 +20,7 @@ export { MultiRadio } from './fields/MultiRadio';
18
20
  export { Select } from './fields/Select';
19
21
  export { Textarea } from './fields/Textarea';
20
22
  export { TextInput } from './fields/TextInput';
23
+ export { FormikAutoComplete } from './formiks/FormikAutoComplete';
21
24
  export { FormikCheckbox } from './formiks/FormikCheckbox';
22
25
  export { FormikDatePicker } from './formiks/FormikDatePicker';
23
26
  export { FormikDateRangePicker } from './formiks/FormikDateRangePicker';
@@ -38,6 +41,8 @@ export type { FieldsetProps } from './elements/Fieldset';
38
41
  export type { IconButtonProps } from './elements/IconButton';
39
42
  export type { LabelProps } from './elements/Label';
40
43
  export type { LegendProps } from './elements/Legend';
44
+ export type { TagProps } from './elements/Tag';
45
+ export type { AutoCompleteProps } from './fields/AutoComplete';
41
46
  export type { CheckboxProps } from './fields/Checkbox';
42
47
  export type { DateRangePickerProps } from './fields/DateRangePicker';
43
48
  export type { DatePickerProps } from './fields/DatePicker';
@@ -47,6 +52,7 @@ export type { MultiRadioProps } from './fields/MultiRadio';
47
52
  export type { SelectProps } from './fields/Select';
48
53
  export type { TextareaProps } from './fields/Textarea';
49
54
  export type { TextInputProps } from './fields/TextInput';
55
+ export type { FormikAutoCompleteProps } from './formiks/FormikAutoComplete';
50
56
  export type { FormikCheckboxProps } from './formiks/FormikCheckbox';
51
57
  export type { FormikDatePickerProps } from './formiks/FormikDatePicker';
52
58
  export type { FormikDateRangePickerProps } from './formiks/FormikDateRangePicker';