@salilvnair/dui 1.0.14 → 1.0.16
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.
|
@@ -24,7 +24,9 @@ export interface PromptLibraryListViewProps {
|
|
|
24
24
|
onSelect?: (id: string) => void;
|
|
25
25
|
search?: string;
|
|
26
26
|
onSearchChange?: (v: string) => void;
|
|
27
|
+
/** The search box's placeholder — the list is not always of prompts. */
|
|
28
|
+
searchPlaceholder?: string;
|
|
27
29
|
accentColor?: string;
|
|
28
30
|
className?: string;
|
|
29
31
|
}
|
|
30
|
-
export declare function PromptLibraryListView({ sections, activeId, onSelect, search, onSearchChange, accentColor, className, }: PromptLibraryListViewProps): import("react").JSX.Element;
|
|
32
|
+
export declare function PromptLibraryListView({ sections, activeId, onSelect, search, searchPlaceholder, onSearchChange, accentColor, className, }: PromptLibraryListViewProps): import("react").JSX.Element;
|
|
@@ -9,6 +9,12 @@ export interface SideNavItem {
|
|
|
9
9
|
count?: number;
|
|
10
10
|
/** When true: renders as uppercase section header (non-selectable, collapsible) */
|
|
11
11
|
isGroup?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* A group's entries — or, on an entry that is not a group, the pages under
|
|
14
|
+
* it: the entry becomes a branch that expands under its own chevron, its
|
|
15
|
+
* pages indented beneath it, and it opens by itself when one of them is the
|
|
16
|
+
* active one. Branches nest.
|
|
17
|
+
*/
|
|
12
18
|
children?: SideNavItem[];
|
|
13
19
|
}
|
|
14
20
|
export interface SideNavViewProps {
|
|
@@ -36,6 +42,11 @@ export interface SideNavViewProps {
|
|
|
36
42
|
className?: string;
|
|
37
43
|
style?: React.CSSProperties;
|
|
38
44
|
}
|
|
45
|
+
/** A non-group entry with pages under it. */
|
|
46
|
+
export declare function isBranch(item: SideNavItem): boolean;
|
|
47
|
+
/** The selectable entries — a group or a branch counts what is under it, not itself. */
|
|
39
48
|
export declare function countLeaves(items: SideNavItem[]): number;
|
|
49
|
+
/** Whether `id` is this entry or somewhere under it. */
|
|
50
|
+
export declare function containsId(item: SideNavItem, id: string | undefined): boolean;
|
|
40
51
|
export declare function filterItems(items: SideNavItem[], q: string): SideNavItem[];
|
|
41
52
|
export declare function SideNavView({ items, activeId, onSelect, collapsible, defaultCollapsed, collapsed: collapsedProp, onCollapsedChange, defaultOpenIds, width, collapsedWidth, fillContainer, accentColor, searchable, searchPlaceholder, emptyText, size, className, style, }: SideNavViewProps): import("react").JSX.Element;
|