@carbonplan/components 11.0.3 → 11.0.5-develop.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/dst/index.esm.js +24 -10
- package/dst/index.esm.js.map +1 -1
- package/dst/index.js +24 -10
- package/dst/index.js.map +1 -1
- package/dst/index.modern.js +24 -10
- package/dst/index.modern.js.map +1 -1
- package/package.json +2 -3
package/dst/index.esm.js
CHANGED
|
@@ -4,7 +4,6 @@ import { transparentize } from '@theme-ui/color';
|
|
|
4
4
|
import NextLink from 'next/link';
|
|
5
5
|
import { Arrow, Sun } from '@carbonplan/icons';
|
|
6
6
|
import { PoopSad } from '@carbonplan/emoji';
|
|
7
|
-
import { useBreakpointIndex } from '@theme-ui/match-media';
|
|
8
7
|
import Head from 'next/head';
|
|
9
8
|
import { keyframes } from '@emotion/react';
|
|
10
9
|
|
|
@@ -1612,7 +1611,8 @@ var GitSha = function GitSha() {
|
|
|
1612
1611
|
var href = 'https://github.com/' + owner + '/' + slug + '/tree/' + sha;
|
|
1613
1612
|
return /*#__PURE__*/React.createElement(Box, {
|
|
1614
1613
|
sx: {
|
|
1615
|
-
display: 'inline-block'
|
|
1614
|
+
display: 'inline-block',
|
|
1615
|
+
width: '87px'
|
|
1616
1616
|
}
|
|
1617
1617
|
}, /*#__PURE__*/React.createElement(Separator, {
|
|
1618
1618
|
color: color
|
|
@@ -1634,7 +1634,8 @@ var GitSha = function GitSha() {
|
|
|
1634
1634
|
// fallback
|
|
1635
1635
|
return /*#__PURE__*/React.createElement(Box, {
|
|
1636
1636
|
sx: {
|
|
1637
|
-
display: 'inline-block'
|
|
1637
|
+
display: 'inline-block',
|
|
1638
|
+
width: '87px'
|
|
1638
1639
|
}
|
|
1639
1640
|
}, /*#__PURE__*/React.createElement(Separator, {
|
|
1640
1641
|
color: color
|
|
@@ -1721,8 +1722,8 @@ var Metadata = function Metadata(_ref2) {
|
|
|
1721
1722
|
sx: {
|
|
1722
1723
|
userSelect: 'none',
|
|
1723
1724
|
position: 'fixed',
|
|
1724
|
-
bottom:
|
|
1725
|
-
right:
|
|
1725
|
+
bottom: '42px',
|
|
1726
|
+
right: '24px',
|
|
1726
1727
|
transformOrigin: 'right',
|
|
1727
1728
|
transform: 'rotate(90deg)',
|
|
1728
1729
|
display: ['none', 'none', 'initial']
|
|
@@ -2039,7 +2040,6 @@ var Layout = function Layout(_ref) {
|
|
|
2039
2040
|
_ref$container = _ref.container,
|
|
2040
2041
|
container = _ref$container === void 0 ? true : _ref$container;
|
|
2041
2042
|
var content = children;
|
|
2042
|
-
var index = useBreakpointIndex();
|
|
2043
2043
|
|
|
2044
2044
|
if (fade) {
|
|
2045
2045
|
content = /*#__PURE__*/React.createElement(FadeIn, {
|
|
@@ -2055,11 +2055,24 @@ var Layout = function Layout(_ref) {
|
|
|
2055
2055
|
}, /*#__PURE__*/React.createElement(Container, null, content));
|
|
2056
2056
|
}
|
|
2057
2057
|
|
|
2058
|
+
var _useThemeUI = useThemeUI(),
|
|
2059
|
+
theme = _useThemeUI.theme;
|
|
2060
|
+
|
|
2058
2061
|
useEffect(function () {
|
|
2059
|
-
if (
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2062
|
+
if (!theme) return;
|
|
2063
|
+
|
|
2064
|
+
var handler = function handler() {
|
|
2065
|
+
if (settings != null && settings.value && settings != null && settings.onClick) {
|
|
2066
|
+
settings == null ? void 0 : settings.onClick();
|
|
2067
|
+
}
|
|
2068
|
+
};
|
|
2069
|
+
|
|
2070
|
+
var query = window.matchMedia("(max-width: " + theme.breakpoints[1] + ")");
|
|
2071
|
+
query.addListener(handler);
|
|
2072
|
+
return function () {
|
|
2073
|
+
query.removeListener(handler);
|
|
2074
|
+
};
|
|
2075
|
+
}, [theme, settings == null ? void 0 : settings.value, settings == null ? void 0 : settings.onClick]);
|
|
2063
2076
|
var menuItems = [/*#__PURE__*/React.createElement(Dimmer, {
|
|
2064
2077
|
key: "dimmer",
|
|
2065
2078
|
sx: {
|
|
@@ -2073,6 +2086,7 @@ var Layout = function Layout(_ref) {
|
|
|
2073
2086
|
menuItems.push( /*#__PURE__*/React.createElement(Settings, _extends({
|
|
2074
2087
|
key: "settings",
|
|
2075
2088
|
sx: {
|
|
2089
|
+
mr: ['2px'],
|
|
2076
2090
|
display: ['inherit', 'inherit', 'none', 'none']
|
|
2077
2091
|
}
|
|
2078
2092
|
}, settings)));
|