@carbonplan/components 11.0.5-develop.1 → 11.0.5

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/dst/index.esm.js CHANGED
@@ -1611,7 +1611,8 @@ var GitSha = function GitSha() {
1611
1611
  var href = 'https://github.com/' + owner + '/' + slug + '/tree/' + sha;
1612
1612
  return /*#__PURE__*/React.createElement(Box, {
1613
1613
  sx: {
1614
- display: 'inline-block'
1614
+ display: 'inline-block',
1615
+ width: '87px'
1615
1616
  }
1616
1617
  }, /*#__PURE__*/React.createElement(Separator, {
1617
1618
  color: color
@@ -1633,7 +1634,8 @@ var GitSha = function GitSha() {
1633
1634
  // fallback
1634
1635
  return /*#__PURE__*/React.createElement(Box, {
1635
1636
  sx: {
1636
- display: 'inline-block'
1637
+ display: 'inline-block',
1638
+ width: '87px'
1637
1639
  }
1638
1640
  }, /*#__PURE__*/React.createElement(Separator, {
1639
1641
  color: color
@@ -1722,7 +1724,6 @@ var Metadata = function Metadata(_ref2) {
1722
1724
  position: 'fixed',
1723
1725
  bottom: '42px',
1724
1726
  right: '24px',
1725
- width: '87px',
1726
1727
  transformOrigin: 'right',
1727
1728
  transform: 'rotate(90deg)',
1728
1729
  display: ['none', 'none', 'initial']
@@ -2060,18 +2061,18 @@ var Layout = function Layout(_ref) {
2060
2061
  useEffect(function () {
2061
2062
  if (!theme) return;
2062
2063
 
2063
- var handler = function handler() {
2064
- if (settings != null && settings.value && settings != null && settings.onClick) {
2064
+ var handler = function handler(e) {
2065
+ if (e.matches && settings != null && settings.value && settings != null && settings.onClick) {
2065
2066
  settings == null ? void 0 : settings.onClick();
2066
2067
  }
2067
2068
  };
2068
2069
 
2069
- var query = window.matchMedia("(max-width: " + theme.breakpoints[1] + ")");
2070
- query.addListener(handler);
2070
+ var query = window.matchMedia("(min-width: " + theme.breakpoints[1] + ")");
2071
+ query.onchange = handler;
2071
2072
  return function () {
2072
- query.removeListener(handler);
2073
+ query.onchange = null;
2073
2074
  };
2074
- }, [theme, settings == null ? void 0 : settings.value, settings == null ? void 0 : settings.onClick]);
2075
+ }, [theme == null ? void 0 : theme.breakpoints, settings == null ? void 0 : settings.value, settings == null ? void 0 : settings.onClick]);
2075
2076
  var menuItems = [/*#__PURE__*/React.createElement(Dimmer, {
2076
2077
  key: "dimmer",
2077
2078
  sx: {