@ahrowe/ui 0.1.11 → 0.1.13
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/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1776 -1424
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/package/common/card/CardHeader.d.ts +1 -1
- package/dist/types/package/common/card/card.types.d.ts +7 -0
- package/dist/types/package/common/interactableDiv/interactableDiv.d.ts +1 -0
- package/dist/types/package/common/numberInput/numberInput.d.ts +6 -3
- package/dist/types/package/common/virtualList/useColumns.d.ts +37 -0
- package/dist/types/package/common/virtualList/useRowDrag.d.ts +54 -0
- package/dist/types/package/common/virtualList/useSelection.d.ts +24 -0
- package/dist/types/package/common/virtualList/useVirtualWindow.d.ts +38 -0
- package/dist/types/package/common/virtualList/virtualList.d.ts +2 -21
- package/dist/types/package/common/virtualList/virtualList.types.d.ts +65 -1
- package/dist/types/package/common/virtualList/virtualList.utils.d.ts +44 -0
- package/dist/types/package/common/virtualList/virtualRow.d.ts +39 -0
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TreeDropPosition } from './virtualList.types';
|
|
3
|
+
export interface VirtualRowProps {
|
|
4
|
+
index: number;
|
|
5
|
+
top: number;
|
|
6
|
+
columnTemplate: string | undefined;
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
showDivider: boolean;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
observer: ResizeObserver | null;
|
|
11
|
+
ariaRowIndex?: number;
|
|
12
|
+
ariaPosInSet?: number;
|
|
13
|
+
ariaSetSize?: number;
|
|
14
|
+
rowRole: 'row' | 'listitem';
|
|
15
|
+
reorderable?: boolean;
|
|
16
|
+
draggable?: boolean;
|
|
17
|
+
isDragging?: boolean;
|
|
18
|
+
reserveToggleGutter?: boolean;
|
|
19
|
+
onMouseDown?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
20
|
+
onDragStart?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
21
|
+
onDragOver?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
22
|
+
onDragEnd?: () => void;
|
|
23
|
+
onDrop?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
24
|
+
onTouchStart?: (e: React.TouchEvent<HTMLDivElement>) => void;
|
|
25
|
+
dropPosition?: TreeDropPosition;
|
|
26
|
+
dropIndentPx?: number;
|
|
27
|
+
dropIndicatorClassName?: string;
|
|
28
|
+
dropIndicatorStyle?: React.CSSProperties;
|
|
29
|
+
rowClassName?: string;
|
|
30
|
+
rowStyle?: React.CSSProperties;
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A single virtualized row: absolutely positioned at its `top`, optionally a
|
|
35
|
+
* grid (table mode), registering itself with the shared ResizeObserver and
|
|
36
|
+
* carrying all the drag / drop-indicator wiring the parent assigns it.
|
|
37
|
+
*/
|
|
38
|
+
declare function VirtualRow({ index, top, columnTemplate, isSelected, showDivider, onClick, observer, ariaRowIndex, ariaPosInSet, ariaSetSize, rowRole, reorderable, draggable, isDragging, reserveToggleGutter, onMouseDown, onDragStart, onDragOver, onDragEnd, onDrop, onTouchStart, dropPosition, dropIndentPx, dropIndicatorClassName, dropIndicatorStyle, rowClassName, rowStyle, children, }: VirtualRowProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export default VirtualRow;
|