@qwanyx/stack 0.2.15 → 0.2.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.
- package/dist/components/SelectableList.d.ts +26 -0
- package/dist/index.cjs.js +25 -25
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +1044 -927
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SelectableList Component
|
|
3
|
+
* Multi-select list with navigation chevrons for preview
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface SelectableItem {
|
|
7
|
+
id: string;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface SelectableListProps<T extends SelectableItem> {
|
|
11
|
+
items: T[];
|
|
12
|
+
renderItem: (item: T, isSelected: boolean, isCurrent: boolean) => React.ReactNode;
|
|
13
|
+
onSelectionChange?: (selectedIds: string[]) => void;
|
|
14
|
+
onCurrentChange?: (currentItem: T | null, index: number) => void;
|
|
15
|
+
onAction?: (action: string, selectedItems: T[], currentItem: T | null) => void;
|
|
16
|
+
actions?: Array<{
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
icon?: string;
|
|
20
|
+
disabled?: (selectedItems: T[]) => boolean;
|
|
21
|
+
}>;
|
|
22
|
+
emptyMessage?: string;
|
|
23
|
+
showSelectAll?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function SelectableList<T extends SelectableItem>({ items, renderItem, onSelectionChange, onCurrentChange, onAction, actions, emptyMessage, showSelectAll, className, }: SelectableListProps<T>): import("react/jsx-runtime").JSX.Element;
|