@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.
|
@@ -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$
|
|
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$
|
|
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
|
|
511
|
+
const dateStampText = "_dateStampText_wczs5_1";
|
|
512
512
|
const defaultStyles$p = {
|
|
513
|
-
|
|
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.
|
|
892
|
+
className: styles2.dateStampText,
|
|
893
893
|
children: timeSince
|
|
894
894
|
});
|
|
895
895
|
};
|
|
@@ -7635,7 +7635,7 @@ function Ticker({
|
|
|
7635
7635
|
const offsetWidth = useMemo(() => {
|
|
7636
7636
|
return -pageIndex * (pageWidth || 0);
|
|
7637
7637
|
}, [pageIndex, pageWidth]);
|
|
7638
|
-
|
|
7638
|
+
useWindowSize();
|
|
7639
7639
|
const tickerRef = useRef();
|
|
7640
7640
|
const tickerItemsRef = useRef();
|
|
7641
7641
|
const tickerScrollRef = useRef();
|
|
@@ -7651,10 +7651,9 @@ function Ticker({
|
|
|
7651
7651
|
setNumberOfPages(numberOfPages2);
|
|
7652
7652
|
}, []);
|
|
7653
7653
|
useLayoutEffect(() => {
|
|
7654
|
-
const
|
|
7655
|
-
const hideButtons2 = windowSize.width >= 480 ? tickerScrollRef.current.scrollWidth <= tickerItemsContainer.clientWidth : childArray.length < 3;
|
|
7654
|
+
const hideButtons2 = childArray.length < 4;
|
|
7656
7655
|
setHideButtons(hideButtons2);
|
|
7657
|
-
}, [
|
|
7656
|
+
}, [childArray]);
|
|
7658
7657
|
function toggleExpandedState() {
|
|
7659
7658
|
setExpanded((expanded2) => {
|
|
7660
7659
|
const newState = !expanded2;
|