@mtes-mct/monitor-ui 18.4.0 → 18.4.2
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 +612 -390
- package/components/Dropdown/index.d.ts.map +1 -1
- package/fields/shared/StyledInputBox.d.ts.map +1 -1
- package/index.js +72 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAExC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,QAAQ,CAAA;AAElE,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,MAAM,CAAC,GAAG;IACrE,IAAI,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAA;IACnC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAExC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,QAAQ,CAAA;AAElE,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,MAAM,CAAC,GAAG;IACrE,IAAI,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAA;IACnC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B,CAAA;AAkND,eAAO,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,CAAC,GAAG;IACxD,IAAI,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAA;CAG1C,CAAA;AAEF,OAAO,EAAE,KAAK,iBAAiB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledInputBox.d.ts","sourceRoot":"","sources":["../../../src/fields/shared/StyledInputBox.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAEtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,KAAK,mBAAmB,GAAG,qBAAqB,GAAG;IACjD,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,IAAI,CAAA;CACZ,CAAA;AAaD,eAAO,MAAM,UAAU,gKAoCtB,CAAA;AAED,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"StyledInputBox.d.ts","sourceRoot":"","sources":["../../../src/fields/shared/StyledInputBox.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAEtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,KAAK,mBAAmB,GAAG,qBAAqB,GAAG;IACjD,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,IAAI,CAAA;CACZ,CAAA;AAaD,eAAO,MAAM,UAAU,gKAoCtB,CAAA;AAED,eAAO,MAAM,cAAc,0HAuB1B,CAAA"}
|
package/index.js
CHANGED
|
@@ -21780,7 +21780,7 @@ const PrimaryDropdownItem = styled(Dropdown$1.Item)`
|
|
|
21780
21780
|
}
|
|
21781
21781
|
`;
|
|
21782
21782
|
|
|
21783
|
-
function RawDropdown({ accent, className, Icon, ...originalProps }) {
|
|
21783
|
+
function RawDropdown({ accent, className, Icon, title, ...originalProps }) {
|
|
21784
21784
|
const controlledClassName = classnames('Component-Dropdow', className);
|
|
21785
21785
|
const icon = useMemo(()=>Icon ? /*#__PURE__*/ jsx(Icon, {
|
|
21786
21786
|
size: 20
|
|
@@ -21791,18 +21791,31 @@ function RawDropdown({ accent, className, Icon, ...originalProps }) {
|
|
|
21791
21791
|
Icon
|
|
21792
21792
|
]);
|
|
21793
21793
|
switch(accent){
|
|
21794
|
+
case Accent.TERTIARY:
|
|
21795
|
+
return /*#__PURE__*/ jsx(TertiaryDropdown, {
|
|
21796
|
+
$hasIcon: hasIcon,
|
|
21797
|
+
$hasTitle: !!title,
|
|
21798
|
+
className: controlledClassName,
|
|
21799
|
+
icon: icon,
|
|
21800
|
+
title: title,
|
|
21801
|
+
...originalProps
|
|
21802
|
+
});
|
|
21794
21803
|
case Accent.SECONDARY:
|
|
21795
21804
|
return /*#__PURE__*/ jsx(SecondaryDropdown, {
|
|
21796
21805
|
$hasIcon: hasIcon,
|
|
21806
|
+
$hasTitle: !!title,
|
|
21797
21807
|
className: controlledClassName,
|
|
21798
21808
|
icon: icon,
|
|
21809
|
+
title: title,
|
|
21799
21810
|
...originalProps
|
|
21800
21811
|
});
|
|
21801
21812
|
default:
|
|
21802
21813
|
return /*#__PURE__*/ jsx(PrimaryDropdown, {
|
|
21803
21814
|
$hasIcon: hasIcon,
|
|
21815
|
+
$hasTitle: !!title,
|
|
21804
21816
|
className: controlledClassName,
|
|
21805
21817
|
icon: icon,
|
|
21818
|
+
title: title,
|
|
21806
21819
|
...originalProps
|
|
21807
21820
|
});
|
|
21808
21821
|
}
|
|
@@ -21817,7 +21830,7 @@ const PrimaryDropdown = styled(Dropdown$1)`
|
|
|
21817
21830
|
color: ${(p)=>p.theme.color.gainsboro};
|
|
21818
21831
|
display: flex;
|
|
21819
21832
|
font-size: 13px;
|
|
21820
|
-
padding: 3px
|
|
21833
|
+
padding: 3px ${(p)=>p.$hasTitle ? 12 : 6}px ${(p)=>p.$hasIcon ? '4px' : '5px'};
|
|
21821
21834
|
|
|
21822
21835
|
:hover {
|
|
21823
21836
|
background-color: ${(p)=>p.theme.color.blueYonder};
|
|
@@ -21838,7 +21851,7 @@ const PrimaryDropdown = styled(Dropdown$1)`
|
|
|
21838
21851
|
}
|
|
21839
21852
|
|
|
21840
21853
|
> .Element-IconBox {
|
|
21841
|
-
margin: 1px
|
|
21854
|
+
margin: 1px ${(p)=>p.$hasTitle ? 8 : 0}px 0 0;
|
|
21842
21855
|
}
|
|
21843
21856
|
|
|
21844
21857
|
> svg {
|
|
@@ -21860,7 +21873,7 @@ const SecondaryDropdown = styled(Dropdown$1)`
|
|
|
21860
21873
|
.rs-btn {
|
|
21861
21874
|
align-items: center;
|
|
21862
21875
|
display: flex;
|
|
21863
|
-
padding: 3px
|
|
21876
|
+
padding: 3px ${(p)=>p.$hasTitle ? 12 : 6}px ${(p)=>p.$hasIcon ? '4px' : '5px'};
|
|
21864
21877
|
|
|
21865
21878
|
border-radius: 0;
|
|
21866
21879
|
background-color: transparent;
|
|
@@ -21889,7 +21902,58 @@ const SecondaryDropdown = styled(Dropdown$1)`
|
|
|
21889
21902
|
}
|
|
21890
21903
|
|
|
21891
21904
|
> .Element-IconBox {
|
|
21892
|
-
margin: 1px
|
|
21905
|
+
margin: 1px ${(p)=>p.$hasTitle ? 8 : 0}px 0 0;
|
|
21906
|
+
}
|
|
21907
|
+
|
|
21908
|
+
> svg {
|
|
21909
|
+
display: none;
|
|
21910
|
+
}
|
|
21911
|
+
}
|
|
21912
|
+
|
|
21913
|
+
> .rs-dropdown-menu {
|
|
21914
|
+
border-radius: 0;
|
|
21915
|
+
padding: 0;
|
|
21916
|
+
}
|
|
21917
|
+
|
|
21918
|
+
svg.rs-dropdown-item-menu-icon {
|
|
21919
|
+
vertical-align: middle;
|
|
21920
|
+
margin-right: 10px;
|
|
21921
|
+
}
|
|
21922
|
+
`;
|
|
21923
|
+
const TertiaryDropdown = styled(Dropdown$1)`
|
|
21924
|
+
.rs-btn {
|
|
21925
|
+
align-items: center;
|
|
21926
|
+
display: flex;
|
|
21927
|
+
padding: 3px ${(p)=>p.$hasTitle ? 13 : 7}px ${(p)=>p.$hasIcon ? '4px' : '5px'};
|
|
21928
|
+
|
|
21929
|
+
border-radius: 0;
|
|
21930
|
+
background-color: transparent;
|
|
21931
|
+
border: unset;
|
|
21932
|
+
color: ${(p)=>p.theme.color.charcoal};
|
|
21933
|
+
|
|
21934
|
+
&:hover,
|
|
21935
|
+
&._hover {
|
|
21936
|
+
background-color: ${(p)=>p.theme.color.blueYonder25};
|
|
21937
|
+
border: unset;
|
|
21938
|
+
color: ${(p)=>p.theme.color.blueYonder};
|
|
21939
|
+
}
|
|
21940
|
+
|
|
21941
|
+
&:active,
|
|
21942
|
+
&._active {
|
|
21943
|
+
background-color: ${(p)=>p.theme.color.blueGray25};
|
|
21944
|
+
border: unset;
|
|
21945
|
+
color: ${(p)=>p.theme.color.blueGray};
|
|
21946
|
+
}
|
|
21947
|
+
|
|
21948
|
+
&:disabled,
|
|
21949
|
+
&._disabled {
|
|
21950
|
+
background-color: transparent;
|
|
21951
|
+
border: unset;
|
|
21952
|
+
color: ${(p)=>p.theme.color.lightGray};
|
|
21953
|
+
}
|
|
21954
|
+
|
|
21955
|
+
> .Element-IconBox {
|
|
21956
|
+
margin: 1px ${(p)=>p.$hasTitle ? 8 : 0}px 0 0;
|
|
21893
21957
|
}
|
|
21894
21958
|
|
|
21895
21959
|
> svg {
|
|
@@ -68473,8 +68537,10 @@ const StyledInputBox = styled.div`
|
|
|
68473
68537
|
|
|
68474
68538
|
> input,
|
|
68475
68539
|
> .rs-auto-complete > input {
|
|
68476
|
-
padding: ${(p)=>p.$hasIcon ? PADDING_WITH_ICON[p.$size] : PADDING[p.$size]};
|
|
68477
68540
|
${inputStyle}
|
|
68541
|
+
padding: ${(p)=>p.$hasIcon ? PADDING_WITH_ICON[p.$size] : PADDING[p.$size]};
|
|
68542
|
+
line-height: 1;
|
|
68543
|
+
flex-grow: 1;
|
|
68478
68544
|
}
|
|
68479
68545
|
|
|
68480
68546
|
> .Element-IconBox {
|
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": "18.4.
|
|
4
|
+
"version": "18.4.2",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|