@guardian/interactive-component-library 0.1.0-alpha.40 → 0.1.0-alpha.41
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.
|
@@ -107,12 +107,12 @@
|
|
|
107
107
|
const container$7 = "_container_jzalm_1";
|
|
108
108
|
const dot = "_dot_jzalm_6";
|
|
109
109
|
const circle$2 = "_circle_jzalm_13";
|
|
110
|
-
const text$
|
|
110
|
+
const text$2 = "_text_jzalm_17";
|
|
111
111
|
const defaultStyles$v = {
|
|
112
112
|
container: container$7,
|
|
113
113
|
dot,
|
|
114
114
|
circle: circle$2,
|
|
115
|
-
text: text$
|
|
115
|
+
text: text$2
|
|
116
116
|
};
|
|
117
117
|
const DOT_TYPE = {
|
|
118
118
|
round: "round",
|
|
@@ -504,9 +504,9 @@
|
|
|
504
504
|
})
|
|
505
505
|
});
|
|
506
506
|
};
|
|
507
|
-
const
|
|
507
|
+
const dateStampText = "_dateStampText_wczs5_1";
|
|
508
508
|
const defaultStyles$p = {
|
|
509
|
-
|
|
509
|
+
dateStampText
|
|
510
510
|
};
|
|
511
511
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
512
512
|
function getDefaultExportFromCjs(x) {
|
|
@@ -885,7 +885,7 @@
|
|
|
885
885
|
}, styles2);
|
|
886
886
|
let timeSince = dayjs(timeStamp).fromNow();
|
|
887
887
|
return jsxRuntime.jsx("span", {
|
|
888
|
-
className: styles2.
|
|
888
|
+
className: styles2.dateStampText,
|
|
889
889
|
children: timeSince
|
|
890
890
|
});
|
|
891
891
|
};
|
|
@@ -7631,7 +7631,7 @@
|
|
|
7631
7631
|
const offsetWidth = hooks.useMemo(() => {
|
|
7632
7632
|
return -pageIndex * (pageWidth || 0);
|
|
7633
7633
|
}, [pageIndex, pageWidth]);
|
|
7634
|
-
|
|
7634
|
+
useWindowSize();
|
|
7635
7635
|
const tickerRef = hooks.useRef();
|
|
7636
7636
|
const tickerItemsRef = hooks.useRef();
|
|
7637
7637
|
const tickerScrollRef = hooks.useRef();
|
|
@@ -7647,10 +7647,9 @@
|
|
|
7647
7647
|
setNumberOfPages(numberOfPages2);
|
|
7648
7648
|
}, []);
|
|
7649
7649
|
hooks.useLayoutEffect(() => {
|
|
7650
|
-
const
|
|
7651
|
-
const hideButtons2 = windowSize.width >= 480 ? tickerScrollRef.current.scrollWidth <= tickerItemsContainer.clientWidth : childArray.length < 3;
|
|
7650
|
+
const hideButtons2 = childArray.length < 4;
|
|
7652
7651
|
setHideButtons(hideButtons2);
|
|
7653
|
-
}, [
|
|
7652
|
+
}, [childArray]);
|
|
7654
7653
|
function toggleExpandedState() {
|
|
7655
7654
|
setExpanded((expanded2) => {
|
|
7656
7655
|
const newState = !expanded2;
|