@mtes-mct/monitor-ui 3.0.1 → 3.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 +14 -0
- package/index.js +22 -23
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/constants.d.ts +8 -0
- package/src/elements/Tag/index.d.ts +10 -11
- package/src/fields/CoordinatesInput/DMDCoordinatesInput.d.ts +1 -1
- package/src/fields/CoordinatesInput/DMSCoordinatesInput.d.ts +1 -1
- package/src/fields/CoordinatesInput/index.d.ts +1 -1
- package/src/index.d.ts +1 -2
- package/src/elements/Tag/constants.d.ts +0 -3
- package/src/fields/CoordinatesInput/constants.d.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [3.1.0](https://github.com/MTES-MCT/monitor-ui/compare/v3.0.1...v3.1.0) (2023-02-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **elements:** add bulletColor prop to Tag ([3ab795c](https://github.com/MTES-MCT/monitor-ui/commit/3ab795ca8db39faacfcfd644c85c9d2fed9195b2))
|
|
7
|
+
|
|
8
|
+
## [3.0.1](https://github.com/MTES-MCT/monitor-ui/compare/v3.0.0...v3.0.1) (2023-02-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **formiks:** remove useMemo on fieldValue ([3ec8602](https://github.com/MTES-MCT/monitor-ui/commit/3ec86027dbcaf0f0faa4e92ad05d86a134e6c575))
|
|
14
|
+
|
|
1
15
|
# [3.0.0](https://github.com/MTES-MCT/monitor-ui/compare/v2.19.2...v3.0.0) (2023-02-21)
|
|
2
16
|
|
|
3
17
|
|
package/index.js
CHANGED
|
@@ -10,12 +10,22 @@ var Accent;
|
|
|
10
10
|
Accent["SECONDARY"] = "SECONDARY";
|
|
11
11
|
Accent["TERTIARY"] = "TERTIARY";
|
|
12
12
|
})(Accent || (Accent = {}));
|
|
13
|
+
var CoordinatesFormat;
|
|
14
|
+
(function (CoordinatesFormat) {
|
|
15
|
+
CoordinatesFormat["DECIMAL_DEGREES"] = "DD";
|
|
16
|
+
CoordinatesFormat["DEGREES_MINUTES_DECIMALS"] = "DMD";
|
|
17
|
+
CoordinatesFormat["DEGREES_MINUTES_SECONDS"] = "DMS";
|
|
18
|
+
})(CoordinatesFormat || (CoordinatesFormat = {}));
|
|
13
19
|
var Size;
|
|
14
20
|
(function (Size) {
|
|
15
21
|
Size["LARGE"] = "LARGE";
|
|
16
22
|
Size["NORMAL"] = "NORMAL";
|
|
17
23
|
Size["SMALL"] = "SMALL";
|
|
18
24
|
})(Size || (Size = {}));
|
|
25
|
+
var TagBullet;
|
|
26
|
+
(function (TagBullet) {
|
|
27
|
+
TagBullet["DISK"] = "DISK";
|
|
28
|
+
})(TagBullet || (TagBullet = {}));
|
|
19
29
|
const WSG84_PROJECTION = 'EPSG:4326';
|
|
20
30
|
const OPENLAYERS_PROJECTION = 'EPSG:3857';
|
|
21
31
|
|
|
@@ -2059,13 +2069,6 @@ function ThemeProvider({ children, theme = {} }) {
|
|
|
2059
2069
|
return jsx(UntypedStyledComponentsThemeProvider, { theme: finalTheme, children: children });
|
|
2060
2070
|
}
|
|
2061
2071
|
|
|
2062
|
-
var CoordinatesFormat;
|
|
2063
|
-
(function (CoordinatesFormat) {
|
|
2064
|
-
CoordinatesFormat["DECIMAL_DEGREES"] = "DD";
|
|
2065
|
-
CoordinatesFormat["DEGREES_MINUTES_DECIMALS"] = "DMD";
|
|
2066
|
-
CoordinatesFormat["DEGREES_MINUTES_SECONDS"] = "DMS";
|
|
2067
|
-
})(CoordinatesFormat || (CoordinatesFormat = {}));
|
|
2068
|
-
|
|
2069
2072
|
function Item({ Icon, ...originalProps }) {
|
|
2070
2073
|
const icon = useMemo(() => (Icon ? jsx(Icon, { size: 20 }) : undefined), [Icon]);
|
|
2071
2074
|
const hasIcon = useMemo(() => Boolean(Icon), [Icon]);
|
|
@@ -2793,28 +2796,24 @@ const Box$e = styled.div `
|
|
|
2793
2796
|
`}
|
|
2794
2797
|
`;
|
|
2795
2798
|
|
|
2796
|
-
var TagBullet;
|
|
2797
|
-
(function (TagBullet) {
|
|
2798
|
-
TagBullet["DISK"] = "DISK";
|
|
2799
|
-
})(TagBullet || (TagBullet = {}));
|
|
2800
|
-
|
|
2801
2799
|
const Disk = styled.span `
|
|
2802
2800
|
background-color: ${p => p.$color};
|
|
2803
2801
|
border-radius: 50%;
|
|
2804
2802
|
`;
|
|
2805
2803
|
|
|
2806
|
-
function Tag({ accent, bullet, children, color, Icon, isLight = false, ...nativeProps }) {
|
|
2804
|
+
function Tag({ accent, bullet, bulletColor, children, color, Icon, isLight = false, ...nativeProps }) {
|
|
2807
2805
|
const commonChildren = useMemo(() => {
|
|
2808
2806
|
const defaultColor = color || THEME.color.gunMetal;
|
|
2809
|
-
const
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2807
|
+
const controlledBulletColor = bulletColor ||
|
|
2808
|
+
(accent
|
|
2809
|
+
? {
|
|
2810
|
+
[Accent.PRIMARY]: THEME.color.gunMetal,
|
|
2811
|
+
[Accent.SECONDARY]: THEME.color.gunMetal,
|
|
2812
|
+
[Accent.TERTIARY]: THEME.color.white
|
|
2813
|
+
}[accent]
|
|
2814
|
+
: defaultColor);
|
|
2815
|
+
return (jsxs(Fragment, { children: [Icon && jsx(Icon, { size: 1 }), bullet === TagBullet.DISK && jsx(Disk, { "$color": controlledBulletColor }), children] }));
|
|
2816
|
+
}, [accent, bullet, bulletColor, color, children, Icon]);
|
|
2818
2817
|
const commonProps = useMemo(() => ({
|
|
2819
2818
|
$isLight: isLight,
|
|
2820
2819
|
children: commonChildren,
|
|
@@ -16095,5 +16094,5 @@ function FormikTextInput({ name, ...originalProps }) {
|
|
|
16095
16094
|
return (jsx(TextInput, { defaultValue: defaultValue, error: meta.error, name: name, onChange: handleChange, ...originalProps }));
|
|
16096
16095
|
}
|
|
16097
16096
|
|
|
16098
|
-
export { Accent, AutoComplete, Button, Checkbox, CoordinatesFormat, CoordinatesInput, DatePicker, DateRangePicker, Dropdown, Field$2 as Field, Fieldset, FormikAutoComplete, FormikCheckbox, FormikCoordinatesInput, FormikDatePicker, FormikDateRangePicker, FormikEffect, FormikMultiCheckbox, FormikMultiRadio, FormikMultiSelect, FormikNumberInput, FormikSelect, FormikTextInput, FormikTextarea, GlobalStyle, index as Icon, IconButton, Label, Legend, MultiCheckbox, MultiRadio, MultiSelect, MultiZoneEditor, NumberInput, OPENLAYERS_PROJECTION, OnlyFontGlobalStyle, Select, SingleTag, Size, THEME, Tag, TagGroup, TextInput, Textarea, ThemeProvider, WSG84_PROJECTION, coordinatesAreDistinct, dayjs, getCoordinates, getLocalizedDayjs, getUtcizedDayjs, isNumeric, noop, stopMouseEventPropagation, useClickOutsideEffect, useForceUpdate, useKey, usePrevious };
|
|
16097
|
+
export { Accent, AutoComplete, Button, Checkbox, CoordinatesFormat, CoordinatesInput, DatePicker, DateRangePicker, Dropdown, Field$2 as Field, Fieldset, FormikAutoComplete, FormikCheckbox, FormikCoordinatesInput, FormikDatePicker, FormikDateRangePicker, FormikEffect, FormikMultiCheckbox, FormikMultiRadio, FormikMultiSelect, FormikNumberInput, FormikSelect, FormikTextInput, FormikTextarea, GlobalStyle, index as Icon, IconButton, Label, Legend, MultiCheckbox, MultiRadio, MultiSelect, MultiZoneEditor, NumberInput, OPENLAYERS_PROJECTION, OnlyFontGlobalStyle, Select, SingleTag, Size, THEME, Tag, TagBullet, TagGroup, TextInput, Textarea, ThemeProvider, WSG84_PROJECTION, coordinatesAreDistinct, dayjs, getCoordinates, getLocalizedDayjs, getUtcizedDayjs, isNumeric, noop, stopMouseEventPropagation, useClickOutsideEffect, useForceUpdate, useKey, usePrevious };
|
|
16099
16098
|
//# sourceMappingURL=index.js.map
|