@guardian/interactive-component-library 0.1.0-alpha.40 → 0.1.0-alpha.42

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.
@@ -111,12 +111,12 @@ function LargeChevron({
111
111
  const container$7 = "_container_jzalm_1";
112
112
  const dot = "_dot_jzalm_6";
113
113
  const circle$2 = "_circle_jzalm_13";
114
- const text$3 = "_text_jzalm_17";
114
+ const text$2 = "_text_jzalm_17";
115
115
  const defaultStyles$v = {
116
116
  container: container$7,
117
117
  dot,
118
118
  circle: circle$2,
119
- text: text$3
119
+ text: text$2
120
120
  };
121
121
  const DOT_TYPE = {
122
122
  round: "round",
@@ -508,9 +508,9 @@ const CircleIcon = ({
508
508
  })
509
509
  });
510
510
  };
511
- const text$2 = "_text_1okyv_1";
511
+ const dateStampText = "_dateStampText_wczs5_1";
512
512
  const defaultStyles$p = {
513
- text: text$2
513
+ dateStampText
514
514
  };
515
515
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
516
516
  function getDefaultExportFromCjs(x) {
@@ -889,7 +889,7 @@ const RelativeTimeSentence = ({
889
889
  }, styles2);
890
890
  let timeSince = dayjs(timeStamp).fromNow();
891
891
  return jsx("span", {
892
- className: styles2.text,
892
+ className: styles2.dateStampText,
893
893
  children: timeSince
894
894
  });
895
895
  };
@@ -1877,11 +1877,11 @@ const ToplineResult = forwardRef(({
1877
1877
  })]
1878
1878
  });
1879
1879
  });
1880
- const borderTop = "_borderTop_gph7y_9";
1881
- const section = "_section_gph7y_13";
1882
- const fullWidth = "_fullWidth_gph7y_19";
1883
- const header = "_header_gph7y_95";
1884
- const content = "_content_gph7y_132";
1880
+ const borderTop = "_borderTop_1xpz0_9";
1881
+ const section = "_section_1xpz0_39";
1882
+ const fullWidth = "_fullWidth_1xpz0_39";
1883
+ const header = "_header_1xpz0_150";
1884
+ const content = "_content_1xpz0_187";
1885
1885
  const defaultStyles$9 = {
1886
1886
  borderTop,
1887
1887
  section,
@@ -1894,6 +1894,7 @@ const SectionLayout = {
1894
1894
  fullWidth: "fullWidth"
1895
1895
  };
1896
1896
  const PageSection = forwardRef(({
1897
+ id: id2,
1897
1898
  children,
1898
1899
  layout = SectionLayout.default,
1899
1900
  styles: styles2,
@@ -1910,13 +1911,16 @@ const PageSection = forwardRef(({
1910
1911
  setMinHeight(headerElement.offsetHeight);
1911
1912
  }, [children]);
1912
1913
  return jsxs("section", {
1914
+ id: id2,
1913
1915
  ref,
1914
- className: [styles2.section, styles2[layout], borderTop2 && styles2.borderTop].join(" "),
1916
+ className: [styles2.section, styles2[layout]].join(" "),
1915
1917
  style: {
1916
1918
  "--background-color": backgroundColor,
1917
1919
  minHeight
1918
1920
  },
1919
- children: [jsx("div", {
1921
+ children: [borderTop2 && jsx("div", {
1922
+ className: styles2.borderTop
1923
+ }), jsx("div", {
1920
1924
  className: [styles2.header, styles2[layout]].join(" "),
1921
1925
  ref: headerRef,
1922
1926
  children: children.header
@@ -7635,7 +7639,7 @@ function Ticker({
7635
7639
  const offsetWidth = useMemo(() => {
7636
7640
  return -pageIndex * (pageWidth || 0);
7637
7641
  }, [pageIndex, pageWidth]);
7638
- const windowSize = useWindowSize();
7642
+ useWindowSize();
7639
7643
  const tickerRef = useRef();
7640
7644
  const tickerItemsRef = useRef();
7641
7645
  const tickerScrollRef = useRef();
@@ -7651,10 +7655,9 @@ function Ticker({
7651
7655
  setNumberOfPages(numberOfPages2);
7652
7656
  }, []);
7653
7657
  useLayoutEffect(() => {
7654
- const tickerItemsContainer = tickerItemsRef.current;
7655
- const hideButtons2 = windowSize.width >= 480 ? tickerScrollRef.current.scrollWidth <= tickerItemsContainer.clientWidth : childArray.length < 3;
7658
+ const hideButtons2 = childArray.length < 4;
7656
7659
  setHideButtons(hideButtons2);
7657
- }, [windowSize, setHideButtons]);
7660
+ }, [childArray]);
7658
7661
  function toggleExpandedState() {
7659
7662
  setExpanded((expanded2) => {
7660
7663
  const newState = !expanded2;