@carbonplan/components 11.0.5-develop.0 → 11.0.5-develop.4

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
@@ -1720,8 +1722,8 @@ var Metadata = function Metadata(_ref2) {
1720
1722
  sx: {
1721
1723
  userSelect: 'none',
1722
1724
  position: 'fixed',
1723
- bottom: 42,
1724
- right: 24,
1725
+ bottom: '42px',
1726
+ right: '24px',
1725
1727
  transformOrigin: 'right',
1726
1728
  transform: 'rotate(90deg)',
1727
1729
  display: ['none', 'none', 'initial']
@@ -2059,18 +2061,18 @@ var Layout = function Layout(_ref) {
2059
2061
  useEffect(function () {
2060
2062
  if (!theme) return;
2061
2063
 
2062
- var handler = function handler() {
2063
- 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) {
2064
2066
  settings == null ? void 0 : settings.onClick();
2065
2067
  }
2066
2068
  };
2067
2069
 
2068
- var query = window.matchMedia("(max-width: " + theme.breakpoints[1] + ")");
2069
- query.addListener(handler);
2070
+ var query = window.matchMedia("(min-width: " + theme.breakpoints[1] + ")");
2071
+ query.onchange = handler;
2070
2072
  return function () {
2071
- query.removeListener(handler);
2073
+ query.onchange = null;
2072
2074
  };
2073
- }, [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]);
2074
2076
  var menuItems = [/*#__PURE__*/React.createElement(Dimmer, {
2075
2077
  key: "dimmer",
2076
2078
  sx: {