helppeople-ui 1.13.3 → 1.13.4
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.
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface RecentlyViewedItem<Id extends React.Key = React.Key> {
|
|
3
|
+
id: Id;
|
|
4
|
+
code: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
type RemoveCapability<T> = {
|
|
8
|
+
onRemove: (item: T) => void;
|
|
9
|
+
getRemoveLabel: (item: T) => string;
|
|
10
|
+
getFallbackFocus: () => HTMLElement;
|
|
11
|
+
getRemoveAnnouncement?: (item: T) => string;
|
|
12
|
+
} | {
|
|
13
|
+
onRemove?: undefined;
|
|
14
|
+
getRemoveLabel?: undefined;
|
|
15
|
+
getFallbackFocus?: undefined;
|
|
16
|
+
getRemoveAnnouncement?: undefined;
|
|
17
|
+
};
|
|
18
|
+
export type RecentlyViewedListProps<T extends RecentlyViewedItem = RecentlyViewedItem> = {
|
|
19
|
+
items: readonly T[];
|
|
20
|
+
currentItemId?: T["id"];
|
|
21
|
+
navigationLabel: string;
|
|
22
|
+
onNavigate: (item: T) => void;
|
|
23
|
+
onOverflow: (items: readonly T[]) => void;
|
|
24
|
+
className?: string;
|
|
25
|
+
} & RemoveCapability<T>;
|
|
26
|
+
declare const RecentlyViewedList: <T extends RecentlyViewedItem>({ items, currentItemId, navigationLabel, onNavigate, onOverflow, className, onRemove, getRemoveLabel, getFallbackFocus, getRemoveAnnouncement, }: RecentlyViewedListProps<T>) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export default RecentlyViewedList;
|
package/dist/index.d.ts
CHANGED
|
@@ -66,6 +66,8 @@ export type { CustomNotificationDropdownProps, NotificationItem, NotificationAct
|
|
|
66
66
|
export type { CustomTimelineProps, TimelineItemData, TimelineItem, TimelineItemDataProps, } from './components/CustomTimeline/CustomTimeline';
|
|
67
67
|
export { default as Empty } from './components/CustomEmpty/CustomEmpty';
|
|
68
68
|
export { default as List } from './components/CustomList/CustomList';
|
|
69
|
+
export { default as RecentlyViewedList } from './components/RecentlyViewedList/RecentlyViewedList';
|
|
70
|
+
export type { RecentlyViewedItem, RecentlyViewedListProps, } from './components/RecentlyViewedList/RecentlyViewedList';
|
|
69
71
|
export { default as LibraryThemeProvider } from './theme/LibraryThemeProvider';
|
|
70
72
|
export type { CustomButtonConfig, CustomToolbarProps, PageHeaderConfig, } from './components/CustomToolbar/CustomToolbar';
|
|
71
73
|
export type { CustomSubToolbarProps } from './components/CustomSubToolbar/CustomSubToolbar';
|