@mtes-mct/monitor-ui 10.14.1 → 10.15.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 +2 -0
- package/assets/stylesheets/rsuite-override.css +11 -7
- package/fields/CoordinatesInput/DDCoordinatesInput.d.ts +2 -1
- package/fields/CoordinatesInput/DDCoordinatesInput.d.ts.map +1 -1
- package/fields/CoordinatesInput/DMDCoordinatesInput.d.ts +2 -1
- package/fields/CoordinatesInput/DMDCoordinatesInput.d.ts.map +1 -1
- package/fields/CoordinatesInput/DMSCoordinatesInput.d.ts +2 -1
- package/fields/CoordinatesInput/DMSCoordinatesInput.d.ts.map +1 -1
- package/fields/CoordinatesInput/index.d.ts.map +1 -1
- package/index.js +15 -5
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/theme.d.ts +1 -0
- package/theme.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -66,6 +66,10 @@
|
|
|
66
66
|
--rs-listbox-option-selected-bg: var(--blue-gray-25);
|
|
67
67
|
/* tags */
|
|
68
68
|
--rs-tag-bg: var(--gainsboro);
|
|
69
|
+
|
|
70
|
+
/* toggle */
|
|
71
|
+
--rs-toggle-checked-bg: var(--charcoal);
|
|
72
|
+
--rs-toggle-checked-hover-bg: var(--gunMetal);
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
label {
|
|
@@ -312,13 +316,13 @@ label:hover .rs-checkbox-wrapper .rs-checkbox-inner:before {
|
|
|
312
316
|
.rs-radio-wrapper::before,
|
|
313
317
|
.rs-radio-wrapper .rs-radio-inner::before,
|
|
314
318
|
.rs-radio-wrapper {
|
|
315
|
-
width:
|
|
316
|
-
height:
|
|
319
|
+
width: 14px;
|
|
320
|
+
height: 14px;
|
|
317
321
|
}
|
|
318
322
|
|
|
319
323
|
.rs-radio-wrapper .rs-radio-inner::before {
|
|
320
324
|
background: var(--gainsboro);
|
|
321
|
-
border-width:
|
|
325
|
+
border-width: 2px;
|
|
322
326
|
}
|
|
323
327
|
|
|
324
328
|
.rs-radio-checked .rs-radio-wrapper .rs-radio-inner::before {
|
|
@@ -329,10 +333,10 @@ label:hover .rs-checkbox-wrapper .rs-checkbox-inner:before {
|
|
|
329
333
|
/* center of radio button when checked */
|
|
330
334
|
.rs-radio-wrapper .rs-radio-inner::after {
|
|
331
335
|
background: var(--charcoal);
|
|
332
|
-
width:
|
|
333
|
-
height:
|
|
334
|
-
margin-top:
|
|
335
|
-
margin-left:
|
|
336
|
+
width: 6px;
|
|
337
|
+
height: 6px;
|
|
338
|
+
margin-top: 4px;
|
|
339
|
+
margin-left: 4px;
|
|
336
340
|
}
|
|
337
341
|
|
|
338
342
|
.rs-radio.rs-radio-disabled .rs-radio-wrapper .rs-radio-inner::after {
|
|
@@ -2,8 +2,9 @@ import type { Coordinates } from '../../types';
|
|
|
2
2
|
type DDCoordinatesInputProps = {
|
|
3
3
|
coordinates: Coordinates | undefined;
|
|
4
4
|
disabled: boolean | undefined;
|
|
5
|
+
isLight: boolean | undefined;
|
|
5
6
|
onChange: (nextCoordinates: Coordinates, coordinates: Coordinates | undefined) => void;
|
|
6
7
|
};
|
|
7
|
-
export declare function DDCoordinatesInput({ coordinates, disabled, onChange }: DDCoordinatesInputProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function DDCoordinatesInput({ coordinates, disabled, isLight, onChange }: DDCoordinatesInputProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=DDCoordinatesInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DDCoordinatesInput.d.ts","sourceRoot":"","sources":["../../../src/fields/CoordinatesInput/DDCoordinatesInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DDCoordinatesInput.d.ts","sourceRoot":"","sources":["../../../src/fields/CoordinatesInput/DDCoordinatesInput.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,KAAK,uBAAuB,GAAG;IAC7B,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;IACpC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;IAC5B,QAAQ,EAAE,CAAC,eAAe,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,CAAA;CACvF,CAAA;AAED,wBAAgB,kBAAkB,CAAC,EACjC,WAAW,EACX,QAAgB,EAChB,OAAe,EACf,QAAQ,EACT,EAAE,uBAAuB,2CAuFzB"}
|
|
@@ -4,8 +4,9 @@ type DMDCoordinatesInputProps = {
|
|
|
4
4
|
coordinates: Coordinates | undefined;
|
|
5
5
|
coordinatesFormat: CoordinatesFormat;
|
|
6
6
|
disabled: boolean | undefined;
|
|
7
|
+
isLight: boolean | undefined;
|
|
7
8
|
onChange: (nextCoordinates: Coordinates, coordinates: Coordinates | undefined) => void;
|
|
8
9
|
};
|
|
9
|
-
export declare function DMDCoordinatesInput({ coordinates, coordinatesFormat, disabled, onChange }: DMDCoordinatesInputProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function DMDCoordinatesInput({ coordinates, coordinatesFormat, disabled, isLight, onChange }: DMDCoordinatesInputProps): import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|
|
11
12
|
//# sourceMappingURL=DMDCoordinatesInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DMDCoordinatesInput.d.ts","sourceRoot":"","sources":["../../../src/fields/CoordinatesInput/DMDCoordinatesInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAoB,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"DMDCoordinatesInput.d.ts","sourceRoot":"","sources":["../../../src/fields/CoordinatesInput/DMDCoordinatesInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAoB,MAAM,iBAAiB,CAAA;AAKrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAM9C,KAAK,wBAAwB,GAAG;IAC9B,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;IACpC,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;IAC5B,QAAQ,EAAE,CAAC,eAAe,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,CAAA;CACvF,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,WAAW,EACX,iBAAiB,EACjB,QAAgB,EAChB,OAAO,EACP,QAAQ,EACT,EAAE,wBAAwB,2CA0F1B"}
|
|
@@ -4,8 +4,9 @@ type DMSCoordinatesInputProps = {
|
|
|
4
4
|
coordinates: Coordinates | undefined;
|
|
5
5
|
coordinatesFormat: CoordinatesFormat;
|
|
6
6
|
disabled: boolean | undefined;
|
|
7
|
+
isLight: boolean | undefined;
|
|
7
8
|
onChange: (nextCoordinates: Coordinates | undefined, coordinates: Coordinates | undefined) => void;
|
|
8
9
|
};
|
|
9
|
-
export declare function DMSCoordinatesInput({ coordinates, coordinatesFormat, disabled, onChange }: DMSCoordinatesInputProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function DMSCoordinatesInput({ coordinates, coordinatesFormat, disabled, isLight, onChange }: DMSCoordinatesInputProps): import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|
|
11
12
|
//# sourceMappingURL=DMSCoordinatesInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DMSCoordinatesInput.d.ts","sourceRoot":"","sources":["../../../src/fields/CoordinatesInput/DMSCoordinatesInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DMSCoordinatesInput.d.ts","sourceRoot":"","sources":["../../../src/fields/CoordinatesInput/DMSCoordinatesInput.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,KAAK,wBAAwB,GAAG;IAC9B,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;IACpC,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;IAC5B,QAAQ,EAAE,CAAC,eAAe,EAAE,WAAW,GAAG,SAAS,EAAE,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,CAAA;CACnG,CAAA;AACD,wBAAgB,mBAAmB,CAAC,EAClC,WAAW,EACX,iBAAiB,EACjB,QAAgB,EAChB,OAAO,EACP,QAAQ,EACT,EAAE,wBAAwB,2CAmC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/CoordinatesInput/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAMnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG;IAClD,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,YAAY,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;IACtC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA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ACd,CAAA;AACD,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,KAAK,EACL,aAAqB,EACrB,OAAe,EACf,KAAK,EACL,QAAe,EACf,GAAG,WAAW,EACf,EAAE,qBAAqB,2CAsDvB"}
|
package/index.js
CHANGED
|
@@ -264,6 +264,7 @@ const OnlyFontGlobalStyle = createGlobalStyle`
|
|
|
264
264
|
babyBlueEyes: '#99C9FF',
|
|
265
265
|
// Notification Colors
|
|
266
266
|
mediumSeaGreen: '#29B361',
|
|
267
|
+
mediumSeaGreen25: '#c9ecd7',
|
|
267
268
|
goldenPoppy: '#FAC11A',
|
|
268
269
|
goldenPoppy25: '#FDF3C3',
|
|
269
270
|
/** CONTEXTUAL COLORS */ // Mission status
|
|
@@ -59865,7 +59866,7 @@ function isNumeric(val) {
|
|
|
59865
59866
|
}
|
|
59866
59867
|
|
|
59867
59868
|
// TODO This field should return undefined when cleared (i.e.: Select all & Backspace/Delete)
|
|
59868
|
-
function DDCoordinatesInput({ coordinates, disabled = false, onChange }) {
|
|
59869
|
+
function DDCoordinatesInput({ coordinates, disabled = false, isLight = false, onChange }) {
|
|
59869
59870
|
const latitudeInputRef = useRef();
|
|
59870
59871
|
const longitudeInputRef = useRef();
|
|
59871
59872
|
const [latitudeError, setLatitudeError] = useState('');
|
|
@@ -59921,6 +59922,7 @@ function DDCoordinatesInput({ coordinates, disabled = false, onChange }) {
|
|
|
59921
59922
|
onChange: ()=>handleChange(coordinates),
|
|
59922
59923
|
placeholder: "Latitude",
|
|
59923
59924
|
style: {
|
|
59925
|
+
backgroundColor: isLight ? THEME.color.white : THEME.color.gainsboro,
|
|
59924
59926
|
border: latitudeError ? '1px solid red' : undefined
|
|
59925
59927
|
}
|
|
59926
59928
|
}),
|
|
@@ -59932,6 +59934,7 @@ function DDCoordinatesInput({ coordinates, disabled = false, onChange }) {
|
|
|
59932
59934
|
onChange: ()=>handleChange(coordinates),
|
|
59933
59935
|
placeholder: "Longitude",
|
|
59934
59936
|
style: {
|
|
59937
|
+
backgroundColor: isLight ? THEME.color.white : THEME.color.gainsboro,
|
|
59935
59938
|
border: longitudeError ? '1px solid red' : undefined
|
|
59936
59939
|
}
|
|
59937
59940
|
}),
|
|
@@ -69438,7 +69441,7 @@ const getPaddedDegrees = (degrees, latitudeOrLongitude)=>{
|
|
|
69438
69441
|
// Open issue: https://github.com/uNmAnNeR/imaskjs/issues/761
|
|
69439
69442
|
const UntypedIMaskInput = IMaskInput;
|
|
69440
69443
|
// TODO This field should return undefined when cleared (i.e.: Select all & Backspace/Delete)
|
|
69441
|
-
function DMDCoordinatesInput({ coordinates, coordinatesFormat, disabled = false, onChange }) {
|
|
69444
|
+
function DMDCoordinatesInput({ coordinates, coordinatesFormat, disabled = false, isLight, onChange }) {
|
|
69442
69445
|
const [error, setError] = useState('');
|
|
69443
69446
|
const [value, setValue] = useState('');
|
|
69444
69447
|
useEffect(()=>{
|
|
@@ -69515,6 +69518,7 @@ function DMDCoordinatesInput({ coordinates, coordinatesFormat, disabled = false,
|
|
|
69515
69518
|
placeholder: "__\xb0 __.___′ _ ___\xb0 __.___′",
|
|
69516
69519
|
radix: ".",
|
|
69517
69520
|
style: {
|
|
69521
|
+
backgroundColor: isLight ? THEME.color.white : THEME.color.gainsboro,
|
|
69518
69522
|
border: error ? '1px solid red' : undefined
|
|
69519
69523
|
},
|
|
69520
69524
|
// TODO Use `defaultValue` here.
|
|
@@ -69542,7 +69546,7 @@ const Box$2 = styled.div`
|
|
|
69542
69546
|
text-align: left;
|
|
69543
69547
|
`;
|
|
69544
69548
|
|
|
69545
|
-
function DMSCoordinatesInput({ coordinates, coordinatesFormat, disabled = false, onChange }) {
|
|
69549
|
+
function DMSCoordinatesInput({ coordinates, coordinatesFormat, disabled = false, isLight, onChange }) {
|
|
69546
69550
|
/** Convert the coordinates to the [latitude, longitude] string format */ const defaultValue = useMemo(()=>{
|
|
69547
69551
|
if (!coordinates?.length || !coordinatesFormat) {
|
|
69548
69552
|
return '';
|
|
@@ -69566,6 +69570,9 @@ function DMSCoordinatesInput({ coordinates, coordinatesFormat, disabled = false,
|
|
|
69566
69570
|
ddPrecision: 6,
|
|
69567
69571
|
disabled: disabled,
|
|
69568
69572
|
onChange: (_, { dd })=>update(dd),
|
|
69573
|
+
style: {
|
|
69574
|
+
backgroundColor: isLight ? THEME.color.white : THEME.color.gainsboro
|
|
69575
|
+
},
|
|
69569
69576
|
// TODO Use `defaultValue` here.
|
|
69570
69577
|
value: defaultValue
|
|
69571
69578
|
}),
|
|
@@ -69599,6 +69606,7 @@ function CoordinatesInput({ className, coordinatesFormat, defaultValue, error, i
|
|
|
69599
69606
|
coordinates: defaultValue,
|
|
69600
69607
|
coordinatesFormat: CoordinatesFormat.DEGREES_MINUTES_SECONDS,
|
|
69601
69608
|
disabled: nativeProps.disabled,
|
|
69609
|
+
isLight: isLight,
|
|
69602
69610
|
onChange: onChange
|
|
69603
69611
|
});
|
|
69604
69612
|
case CoordinatesFormat.DEGREES_MINUTES_DECIMALS:
|
|
@@ -69606,12 +69614,14 @@ function CoordinatesInput({ className, coordinatesFormat, defaultValue, error, i
|
|
|
69606
69614
|
coordinates: defaultValue,
|
|
69607
69615
|
coordinatesFormat: CoordinatesFormat.DEGREES_MINUTES_DECIMALS,
|
|
69608
69616
|
disabled: nativeProps.disabled,
|
|
69617
|
+
isLight: isLight,
|
|
69609
69618
|
onChange: onChange
|
|
69610
69619
|
});
|
|
69611
69620
|
case CoordinatesFormat.DECIMAL_DEGREES:
|
|
69612
69621
|
return /*#__PURE__*/ jsx(DDCoordinatesInput, {
|
|
69613
69622
|
coordinates: defaultValue,
|
|
69614
69623
|
disabled: nativeProps.disabled,
|
|
69624
|
+
isLight: isLight,
|
|
69615
69625
|
onChange: onChange
|
|
69616
69626
|
});
|
|
69617
69627
|
default:
|
|
@@ -69621,14 +69631,14 @@ function CoordinatesInput({ className, coordinatesFormat, defaultValue, error, i
|
|
|
69621
69631
|
defaultValue,
|
|
69622
69632
|
nativeProps.disabled,
|
|
69623
69633
|
onChange,
|
|
69624
|
-
coordinatesFormat
|
|
69634
|
+
coordinatesFormat,
|
|
69635
|
+
isLight
|
|
69625
69636
|
]);
|
|
69626
69637
|
// TODO We must add a `handleDisable()` callback here to effectively empty the inputs when disabling this field.
|
|
69627
69638
|
useFieldUndefineEffect(nativeProps.disabled, onChange /* , handleDisable */ );
|
|
69628
69639
|
return /*#__PURE__*/ jsxs(StyledFieldset, {
|
|
69629
69640
|
className: controlledClassName,
|
|
69630
69641
|
isLegendHidden: isLabelHidden,
|
|
69631
|
-
isLight: isLight,
|
|
69632
69642
|
legend: label,
|
|
69633
69643
|
...nativeProps,
|
|
69634
69644
|
children: [
|