@mtes-mct/monitor-ui 17.1.0 → 17.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,16 @@
|
|
|
1
|
+
## [17.1.0](https://github.com/MTES-MCT/monitor-ui/compare/v17.0.0...v17.1.0) (2024-05-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **cypress:** add index to fill command ([1e93f0c](https://github.com/MTES-MCT/monitor-ui/commit/1e93f0cad50960bb1650bd37bdad2e9f64d78bb6))
|
|
7
|
+
* **cypress:** add logging to fill command ([eeafd54](https://github.com/MTES-MCT/monitor-ui/commit/eeafd549cd081dd0ff85ad43a2cd167878602975))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **CheckPicker:** remove useKey ([2b552a8](https://github.com/MTES-MCT/monitor-ui/commit/2b552a810357a106c060a5abe80490f41348909d))
|
|
13
|
+
|
|
1
14
|
## [17.0.0](https://github.com/MTES-MCT/monitor-ui/compare/v16.5.0...v17.0.0) (2024-05-02)
|
|
2
15
|
|
|
3
16
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAA;AAChF,OAAe,EAAO,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/index.tsx"],"names":[],"mappings":"AAIA,OAAO,E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.ts","sourceRoot":"","sources":["../../src/elements/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAGjD,MAAM,MAAM,SAAS,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAA;AAE/D,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/elements/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAGjD,MAAM,MAAM,SAAS,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAA;AAE/D,eAAO,MAAM,IAAI,8GAwChB,CAAA"}
|
package/index.js
CHANGED
|
@@ -53781,6 +53781,8 @@ function LinkButton({ children, Icon, ...props }) {
|
|
|
53781
53781
|
}
|
|
53782
53782
|
LinkButton.displayName = 'LinkButton';
|
|
53783
53783
|
|
|
53784
|
+
const ANIMATION_DURATION_IN_MS = 300;
|
|
53785
|
+
|
|
53784
53786
|
const getBannerPalette = (level)=>{
|
|
53785
53787
|
if (level === Level.ERROR) {
|
|
53786
53788
|
return {
|
|
@@ -53821,14 +53823,20 @@ function Banner({ children, className = undefined, closingDelay = 3000, isClosab
|
|
|
53821
53823
|
setIsCollapsed(true);
|
|
53822
53824
|
}
|
|
53823
53825
|
};
|
|
53824
|
-
const
|
|
53826
|
+
const closeOrCollapse = useCallback(()=>{
|
|
53827
|
+
if (timeoutIdRef.current) {
|
|
53828
|
+
clearTimeout(timeoutIdRef.current);
|
|
53829
|
+
}
|
|
53825
53830
|
if (isClosable) {
|
|
53826
53831
|
setIsHidden(true);
|
|
53827
53832
|
onClose?.();
|
|
53828
53833
|
} else if (isCollapsible) {
|
|
53829
53834
|
setIsCollapsing(true);
|
|
53830
|
-
|
|
53831
|
-
|
|
53835
|
+
setTimeout(()=>{
|
|
53836
|
+
setIsCollapsed(true);
|
|
53837
|
+
setHasCollapsed(true);
|
|
53838
|
+
onClose?.();
|
|
53839
|
+
}, ANIMATION_DURATION_IN_MS);
|
|
53832
53840
|
}
|
|
53833
53841
|
}, [
|
|
53834
53842
|
isClosable,
|
|
@@ -53837,16 +53845,16 @@ function Banner({ children, className = undefined, closingDelay = 3000, isClosab
|
|
|
53837
53845
|
]);
|
|
53838
53846
|
useEffect(()=>{
|
|
53839
53847
|
if (withAutomaticClosing) {
|
|
53840
|
-
|
|
53841
|
-
|
|
53848
|
+
timeoutIdRef.current = setTimeout(()=>{
|
|
53849
|
+
closeOrCollapse();
|
|
53842
53850
|
onAutoClose?.();
|
|
53843
53851
|
}, closingDelay);
|
|
53844
|
-
timeoutIdRef.current = timeoutId;
|
|
53845
53852
|
}
|
|
53846
53853
|
return ()=>clearTimeout(timeoutIdRef.current);
|
|
53847
53854
|
}, [
|
|
53848
53855
|
closingDelay,
|
|
53849
|
-
|
|
53856
|
+
closeOrCollapse,
|
|
53857
|
+
isCollapsible,
|
|
53850
53858
|
onAutoClose,
|
|
53851
53859
|
withAutomaticClosing
|
|
53852
53860
|
]);
|
|
@@ -53873,13 +53881,15 @@ function Banner({ children, className = undefined, closingDelay = 3000, isClosab
|
|
|
53873
53881
|
}),
|
|
53874
53882
|
/*#__PURE__*/ jsxs(ButtonWrapper, {
|
|
53875
53883
|
className: "banner-button",
|
|
53876
|
-
onClick: ()=>
|
|
53884
|
+
onClick: ()=>closeOrCollapse(),
|
|
53885
|
+
// TODO This is a breaking change but we should only use `IconButton` title rather than this one.
|
|
53877
53886
|
title: isClosable ? 'fermer' : 'masquer',
|
|
53878
53887
|
children: [
|
|
53879
53888
|
isClosable && /*#__PURE__*/ jsx(IconButton, {
|
|
53880
53889
|
accent: Accent.TERTIARY,
|
|
53881
53890
|
color: getBannerPalette(level).color,
|
|
53882
|
-
Icon: Close
|
|
53891
|
+
Icon: Close,
|
|
53892
|
+
title: isClosable ? 'Fermer' : 'Masquer'
|
|
53883
53893
|
}),
|
|
53884
53894
|
!isClosable && isCollapsible && /*#__PURE__*/ jsx(LinkButton, {
|
|
53885
53895
|
size: Size.LARGE,
|
|
@@ -53909,7 +53919,7 @@ const Wrapper = styled.div`
|
|
|
53909
53919
|
padding: 0 2rem;
|
|
53910
53920
|
position: ${(p)=>p.$isFixed ? 'fixed' : 'absolute'};
|
|
53911
53921
|
top: ${(p)=>`${p.$top}`};
|
|
53912
|
-
transition: height
|
|
53922
|
+
transition: height ${ANIMATION_DURATION_IN_MS}ms ease;
|
|
53913
53923
|
width: 100%;
|
|
53914
53924
|
z-index: 1000;
|
|
53915
53925
|
`;
|
|
@@ -54034,27 +54044,44 @@ const Label = styled.label.attrs((props)=>({
|
|
|
54034
54044
|
`;
|
|
54035
54045
|
|
|
54036
54046
|
const Link$1 = styled.a`
|
|
54037
|
-
color: ${(p)=>p.theme.color.slateGray};
|
|
54038
|
-
text-decoration: underline;
|
|
54047
|
+
color: ${(p)=>p.theme.color.slateGray} !important;
|
|
54048
|
+
text-decoration: underline !important;
|
|
54049
|
+
|
|
54050
|
+
svg {
|
|
54051
|
+
color: ${(p)=>p.theme.color.slateGray} !important;
|
|
54052
|
+
}
|
|
54053
|
+
|
|
54054
|
+
&:visited {
|
|
54055
|
+
color: ${(p)=>p.theme.color.slateGray} !important;
|
|
54056
|
+
text-decoration: underline !important;
|
|
54039
54057
|
|
|
54040
|
-
&:hover,
|
|
54041
|
-
&._hover {
|
|
54042
|
-
color: ${(p)=>p.theme.color.blueYonder};
|
|
54043
54058
|
svg {
|
|
54044
|
-
color: ${(p)=>p.theme.color.
|
|
54059
|
+
color: ${(p)=>p.theme.color.slateGray} !important;
|
|
54045
54060
|
}
|
|
54046
54061
|
}
|
|
54047
54062
|
|
|
54048
|
-
&:
|
|
54049
|
-
&.
|
|
54050
|
-
|
|
54063
|
+
&:hover,
|
|
54064
|
+
&._hover,
|
|
54065
|
+
&:visited:hover,
|
|
54066
|
+
&.visited._hover {
|
|
54067
|
+
color: ${(p)=>p.theme.color.blueYonder} !important;
|
|
54068
|
+
text-decoration: underline !important;
|
|
54069
|
+
|
|
54051
54070
|
svg {
|
|
54052
|
-
color: ${(p)=>p.theme.color.
|
|
54071
|
+
color: ${(p)=>p.theme.color.blueYonder} !important;
|
|
54053
54072
|
}
|
|
54054
54073
|
}
|
|
54055
54074
|
|
|
54056
|
-
&:
|
|
54057
|
-
|
|
54075
|
+
&:active,
|
|
54076
|
+
&._active,
|
|
54077
|
+
&:visited:active,
|
|
54078
|
+
&.visited._active {
|
|
54079
|
+
color: ${(p)=>p.theme.color.blueGray} !important;
|
|
54080
|
+
text-decoration: underline !important;
|
|
54081
|
+
|
|
54082
|
+
svg {
|
|
54083
|
+
color: ${(p)=>p.theme.color.blueGray} !important;
|
|
54084
|
+
}
|
|
54058
54085
|
}
|
|
54059
54086
|
`;
|
|
54060
54087
|
Link$1.displayName = 'LinkButton';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtes-mct/monitor-ui",
|
|
3
3
|
"description": "Common React components, hooks, utilities and CSS stylesheets for MonitorFish, MonitorEnv and RapportNav.",
|
|
4
|
-
"version": "17.1.
|
|
4
|
+
"version": "17.1.1",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|