@mtes-mct/monitor-ui 2.9.2 → 2.9.3

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,10 @@
1
+ ## [2.9.2](https://github.com/MTES-MCT/monitor-ui/compare/v2.9.1...v2.9.2) (2023-01-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **fields:** set MutliSelect initial isOpen to false ([06fc475](https://github.com/MTES-MCT/monitor-ui/commit/06fc475fcd41e00e5e79a5636ba0e720899e3a1f))
7
+
1
8
  ## [2.9.1](https://github.com/MTES-MCT/monitor-ui/compare/v2.9.0...v2.9.1) (2023-01-27)
2
9
 
3
10
 
package/index.js CHANGED
@@ -1877,7 +1877,7 @@ function ThemeProvider({ children, theme = {} }) {
1877
1877
  }
1878
1878
 
1879
1879
  function Item({ Icon, ...originalProps }) {
1880
- const icon = useMemo(() => (Icon ? jsx(Icon, { size: 1.25 }) : undefined), [Icon]);
1880
+ const icon = useMemo(() => (Icon ? jsx(Icon, { size: 20 }) : undefined), [Icon]);
1881
1881
  const hasIcon = useMemo(() => Boolean(Icon), [Icon]);
1882
1882
  return jsx(StyledDropdownItem, { "$hasIcon": hasIcon, icon: icon, ...originalProps });
1883
1883
  }
@@ -1888,15 +1888,20 @@ const StyledDropdownItem = styled(Dropdown$1.Item) `
1888
1888
  font-size: 13px;
1889
1889
  line-height: 1;
1890
1890
  padding: 12px;
1891
- padding: ${p => (p.$hasIcon ? '9px' : '12.5px')} 12px;
1891
+ padding: ${p => (p.$hasIcon ? '7px' : '11px')} 12px ${p => (p.$hasIcon ? '9px' : '14px')};
1892
1892
 
1893
1893
  &:not(:last-child) {
1894
1894
  border-bottom: 1px solid var(--lightGray);
1895
1895
  }
1896
+
1897
+ /* SVG Icon Components are wrapped within a <div /> */
1898
+ > div {
1899
+ margin-top: 1px;
1900
+ }
1896
1901
  `;
1897
1902
 
1898
1903
  function RawDropdown({ Icon, ...originalProps }) {
1899
- const icon = useMemo(() => (Icon ? jsx(Icon, { size: 1.25 }) : undefined), [Icon]);
1904
+ const icon = useMemo(() => (Icon ? jsx(Icon, { size: 20 }) : undefined), [Icon]);
1900
1905
  const hasIcon = useMemo(() => Boolean(Icon), [Icon]);
1901
1906
  return jsx(StyledDropdown, { "$hasIcon": hasIcon, icon: icon, ...originalProps });
1902
1907
  }
@@ -1909,7 +1914,7 @@ const StyledDropdown = styled(Dropdown$1) `
1909
1914
  color: ${p => p.theme.color.gainsboro};
1910
1915
  display: flex;
1911
1916
  font-size: 13px;
1912
- padding: ${p => (p.$hasIcon ? '5px' : '6px')} 12px;
1917
+ padding: ${p => (p.$hasIcon ? '4px' : '5px')} 12px ${p => (p.$hasIcon ? '5px' : '7px')};
1913
1918
 
1914
1919
  :hover {
1915
1920
  background-color: ${p => p.theme.color.blueYonder['100']};
@@ -1931,7 +1936,7 @@ const StyledDropdown = styled(Dropdown$1) `
1931
1936
 
1932
1937
  /* SVG Icon Components are wrapped within a <div /> */
1933
1938
  > div {
1934
- margin-right: 8px;
1939
+ margin: 1px 8px 0 0;
1935
1940
  }
1936
1941
 
1937
1942
  > svg {