@uob-web-and-digital/component-library 2.20.19 → 2.20.20

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.
@@ -1,3 +1,4 @@
1
+ import { RefObject } from 'react';
1
2
  import { TimelinePoint } from './TimelineItem';
2
3
  import { TimelinePage } from './timelineLayout';
3
4
  export interface TimelineEmbla {
@@ -22,5 +23,9 @@ export interface TimelineEmbla {
22
23
  * staggered, paged, no-partials packing Embla cannot express). Each page is one Embla
23
24
  * slide, so Embla snaps page-by-page on desktop and point-by-point on mobile. Pages are
24
25
  * recomputed from the live viewport width, and Embla is re-initialised when they change.
26
+ *
27
+ * The prev/next button refs are needed for end-of-track focus handling: when activating a
28
+ * button scrolls to an end it becomes disabled, and a disabled element cannot keep focus,
29
+ * so focus is moved to the opposite (still-enabled) button - the standard carousel pattern.
25
30
  */
26
- export declare function useTimelineEmbla(points: TimelinePoint[]): TimelineEmbla;
31
+ export declare function useTimelineEmbla(points: TimelinePoint[], prevButtonRef: RefObject<HTMLButtonElement>, nextButtonRef: RefObject<HTMLButtonElement>): TimelineEmbla;