@carbonplan/components 13.4.0-develop.1 → 13.4.0-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.mjs CHANGED
@@ -1786,7 +1786,6 @@ var RESOURCES = [
1786
1786
  var sx2 = {
1787
1787
  highlight: {
1788
1788
  mb: [2, 2, 3, 3],
1789
- mt: [3, 3, 0, 0],
1790
1789
  fontSize: [3, 3, 3, 4],
1791
1790
  fontFamily: "heading",
1792
1791
  letterSpacing: "smallcaps",
@@ -1802,7 +1801,7 @@ var SearchMenu = ({
1802
1801
  const destination = `/search?query=${value.trim()}`;
1803
1802
  useEffect3(() => {
1804
1803
  fetch("/resources.json").then((res) => res.json()).then((res) => {
1805
- if (res.length === 3 && res.every((el) => el.label && Array.isArray(el.links))) {
1804
+ if (res.every((el) => el.label && Array.isArray(el.links))) {
1806
1805
  setResources(res);
1807
1806
  }
1808
1807
  }).catch(() => {
@@ -1889,81 +1888,30 @@ var SearchMenu = ({
1889
1888
  row_default,
1890
1889
  {
1891
1890
  columns: [6, 6, 10, 10],
1892
- sx: { display: ["none", "grid", "grid", "grid"] }
1893
- },
1894
- /* @__PURE__ */ React21.createElement(column_default, { start: 1, width: 5, sx: { mt: [2, 2, 8, 8], mb: [1, 1, 4, 5] } }, /* @__PURE__ */ React21.createElement(Box13, { as: "h2", variant: "styles.h2", sx: { my: 0 } }, "Popular resources")),
1895
- /* @__PURE__ */ React21.createElement(column_default, { start: [1, 1, 2, 2], width: 3 }, /* @__PURE__ */ React21.createElement(Box13, { sx: sx2.highlight }, resources[0].label), resources[0].links.map(({ label, href }) => /* @__PURE__ */ React21.createElement(
1896
- button_default,
1897
- {
1898
- key: href,
1899
- href,
1900
- size: "md",
1901
- sx: { mb: [1] },
1902
- suffix: /* @__PURE__ */ React21.createElement(RotatingArrow, null)
1903
- },
1904
- label
1905
- ))),
1906
- /* @__PURE__ */ React21.createElement(column_default, { start: [4, 4, 5, 5], width: 3 }, /* @__PURE__ */ React21.createElement(Box13, { sx: sx2.highlight }, resources[1].label), resources[1].links.map(({ label, href }) => /* @__PURE__ */ React21.createElement(
1907
- button_default,
1908
- {
1909
- key: href,
1910
- href,
1911
- size: "md",
1912
- sx: { mb: [1] },
1913
- suffix: /* @__PURE__ */ React21.createElement(RotatingArrow, null)
1914
- },
1915
- label
1916
- ))),
1917
- /* @__PURE__ */ React21.createElement(column_default, { start: [1, 1, 8, 8], width: 3, sx: { mt: [0, 4, 0, 0] } }, /* @__PURE__ */ React21.createElement(Box13, { sx: sx2.highlight }, resources[2].label), resources[2].links.map(({ label, href }) => /* @__PURE__ */ React21.createElement(
1918
- button_default,
1919
- {
1920
- key: href,
1921
- href,
1922
- size: "md",
1923
- sx: { mb: [1] },
1924
- suffix: /* @__PURE__ */ React21.createElement(RotatingArrow, null)
1925
- },
1926
- label
1927
- )))
1928
- ), /* @__PURE__ */ React21.createElement(
1929
- row_default,
1930
- {
1931
- columns: [6, 6, 10, 10],
1932
- sx: { display: ["grid", "none", "none", "none"] }
1891
+ sx: {
1892
+ mt: [6, 7, 8, 8],
1893
+ rowGap: [5, 4, 6, 7]
1894
+ }
1933
1895
  },
1934
- /* @__PURE__ */ React21.createElement(column_default, { start: 1, width: 6 }, /* @__PURE__ */ React21.createElement(Box13, { as: "h2", variant: "styles.h3", sx: { my: 4 } }, "Popular resources"), /* @__PURE__ */ React21.createElement(Box13, { sx: sx2.highlight }, resources[0].label), resources[0].links.map(({ label, href }) => /* @__PURE__ */ React21.createElement(
1935
- button_default,
1936
- {
1937
- key: href,
1938
- href,
1939
- size: "xs",
1940
- sx: { mb: [1] },
1941
- suffix: /* @__PURE__ */ React21.createElement(RotatingArrow, null)
1942
- },
1943
- label
1944
- ))),
1945
- /* @__PURE__ */ React21.createElement(column_default, { start: 1, width: 6 }, /* @__PURE__ */ React21.createElement(Box13, { sx: sx2.highlight }, resources[1].label), resources[1].links.map(({ label, href }) => /* @__PURE__ */ React21.createElement(
1946
- button_default,
1896
+ resources.map((group, i) => /* @__PURE__ */ React21.createElement(
1897
+ column_default,
1947
1898
  {
1948
- key: href,
1949
- href,
1950
- size: "xs",
1951
- sx: { mb: [1] },
1952
- suffix: /* @__PURE__ */ React21.createElement(RotatingArrow, null)
1899
+ start: [1, 1 + i * 3 % 6, 2 + i * 3 % 9, 2 + i * 3 % 9],
1900
+ width: [6, 3, 3, 3]
1953
1901
  },
1954
- label
1955
- ))),
1956
- /* @__PURE__ */ React21.createElement(column_default, { start: 1, width: 6 }, /* @__PURE__ */ React21.createElement(Box13, { sx: sx2.highlight }, resources[2].label), resources[2].links.map(({ label, href }) => /* @__PURE__ */ React21.createElement(
1957
- button_default,
1958
- {
1959
- key: href,
1960
- href,
1961
- size: "xs",
1962
- sx: { mb: [1] },
1963
- suffix: /* @__PURE__ */ React21.createElement(RotatingArrow, null)
1964
- },
1965
- label
1966
- )))
1902
+ /* @__PURE__ */ React21.createElement(Box13, { sx: sx2.highlight }, group.label),
1903
+ group.links.map(({ label, href }) => /* @__PURE__ */ React21.createElement(
1904
+ button_default,
1905
+ {
1906
+ key: href,
1907
+ href,
1908
+ size: "md",
1909
+ sx: { mb: [1] },
1910
+ suffix: /* @__PURE__ */ React21.createElement(RotatingArrow, null)
1911
+ },
1912
+ label
1913
+ ))
1914
+ ))
1967
1915
  ));
1968
1916
  };
1969
1917
  var search_menu_default = SearchMenu;