@vuu-ui/vuu-ui-controls 0.13.2 → 0.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.
- package/cjs/column-picker/ColumnPicker.js +2 -2
- package/cjs/column-picker/ColumnPicker.js.map +1 -1
- package/cjs/column-picker/ColumnSearch.js +4 -24
- package/cjs/column-picker/ColumnSearch.js.map +1 -1
- package/cjs/context-panel-provider/ContextPanelProvider.js +55 -0
- package/cjs/context-panel-provider/ContextPanelProvider.js.map +1 -0
- package/cjs/index.js +6 -80
- package/cjs/index.js.map +1 -1
- package/cjs/sortable-list/SortableList.js +38 -0
- package/cjs/sortable-list/SortableList.js.map +1 -0
- package/cjs/toolbar/Toolbar.js.map +1 -1
- package/cjs/toolbar/useSelection.js +0 -1
- package/cjs/toolbar/useSelection.js.map +1 -1
- package/esm/column-picker/ColumnPicker.js +2 -2
- package/esm/column-picker/ColumnPicker.js.map +1 -1
- package/esm/column-picker/ColumnSearch.js +5 -25
- package/esm/column-picker/ColumnSearch.js.map +1 -1
- package/esm/context-panel-provider/ContextPanelProvider.js +51 -0
- package/esm/context-panel-provider/ContextPanelProvider.js.map +1 -0
- package/esm/index.js +2 -21
- package/esm/index.js.map +1 -1
- package/esm/sortable-list/SortableList.js +35 -0
- package/esm/sortable-list/SortableList.js.map +1 -0
- package/esm/toolbar/Toolbar.js.map +1 -1
- package/esm/toolbar/useSelection.js +0 -1
- package/esm/toolbar/useSelection.js.map +1 -1
- package/package.json +15 -17
- package/cjs/common-hooks/collectionProvider.js +0 -24
- package/cjs/common-hooks/collectionProvider.js.map +0 -1
- package/cjs/common-hooks/isPlainObject.js +0 -6
- package/cjs/common-hooks/isPlainObject.js.map +0 -1
- package/cjs/common-hooks/itemToString.js +0 -24
- package/cjs/common-hooks/itemToString.js.map +0 -1
- package/cjs/common-hooks/useCollectionItems.js +0 -309
- package/cjs/common-hooks/useCollectionItems.js.map +0 -1
- package/cjs/common-hooks/useSelection.js +0 -212
- package/cjs/common-hooks/useSelection.js.map +0 -1
- package/cjs/list/Highlighter.css.js +0 -6
- package/cjs/list/Highlighter.css.js.map +0 -1
- package/cjs/list/Highlighter.js +0 -36
- package/cjs/list/Highlighter.js.map +0 -1
- package/cjs/list/List.css.js +0 -6
- package/cjs/list/List.css.js.map +0 -1
- package/cjs/list/List.js +0 -317
- package/cjs/list/List.js.map +0 -1
- package/cjs/list/ListItem.css.js +0 -6
- package/cjs/list/ListItem.css.js.map +0 -1
- package/cjs/list/ListItem.js +0 -84
- package/cjs/list/ListItem.js.map +0 -1
- package/cjs/list/ListItemGroup.js +0 -6
- package/cjs/list/ListItemGroup.js.map +0 -1
- package/cjs/list/ListItemHeader.js +0 -6
- package/cjs/list/ListItemHeader.js.map +0 -1
- package/cjs/list/RadioIcon.css.js +0 -6
- package/cjs/list/RadioIcon.css.js.map +0 -1
- package/cjs/list/RadioIcon.js +0 -27
- package/cjs/list/RadioIcon.js.map +0 -1
- package/cjs/list/common-hooks/keyUtils.js +0 -78
- package/cjs/list/common-hooks/keyUtils.js.map +0 -1
- package/cjs/list/common-hooks/list-dom-utils.js +0 -25
- package/cjs/list/common-hooks/list-dom-utils.js.map +0 -1
- package/cjs/list/common-hooks/useCollapsibleGroups.js +0 -72
- package/cjs/list/common-hooks/useCollapsibleGroups.js.map +0 -1
- package/cjs/list/common-hooks/useImperativeScrollingAPI.js +0 -52
- package/cjs/list/common-hooks/useImperativeScrollingAPI.js.map +0 -1
- package/cjs/list/common-hooks/useKeyboardNavigation.js +0 -289
- package/cjs/list/common-hooks/useKeyboardNavigation.js.map +0 -1
- package/cjs/list/common-hooks/useTypeahead.js +0 -74
- package/cjs/list/common-hooks/useTypeahead.js.map +0 -1
- package/cjs/list/common-hooks/useViewportTracking.js +0 -133
- package/cjs/list/common-hooks/useViewportTracking.js.map +0 -1
- package/cjs/list/common-hooks/utils/collection-item-utils.js +0 -182
- package/cjs/list/common-hooks/utils/collection-item-utils.js.map +0 -1
- package/cjs/list/common-hooks/utils/filter-utils.js +0 -11
- package/cjs/list/common-hooks/utils/filter-utils.js.map +0 -1
- package/cjs/list/common-hooks/utils/isSelected.js +0 -9
- package/cjs/list/common-hooks/utils/isSelected.js.map +0 -1
- package/cjs/list/useList.js +0 -278
- package/cjs/list/useList.js.map +0 -1
- package/cjs/list/useListDrop.js +0 -92
- package/cjs/list/useListDrop.js.map +0 -1
- package/cjs/list/useListHeight.js +0 -77
- package/cjs/list/useListHeight.js.map +0 -1
- package/cjs/list/useScrollPosition.js +0 -74
- package/cjs/list/useScrollPosition.js.map +0 -1
- package/esm/common-hooks/collectionProvider.js +0 -20
- package/esm/common-hooks/collectionProvider.js.map +0 -1
- package/esm/common-hooks/isPlainObject.js +0 -4
- package/esm/common-hooks/isPlainObject.js.map +0 -1
- package/esm/common-hooks/itemToString.js +0 -22
- package/esm/common-hooks/itemToString.js.map +0 -1
- package/esm/common-hooks/useCollectionItems.js +0 -307
- package/esm/common-hooks/useCollectionItems.js.map +0 -1
- package/esm/common-hooks/useSelection.js +0 -205
- package/esm/common-hooks/useSelection.js.map +0 -1
- package/esm/list/Highlighter.css.js +0 -4
- package/esm/list/Highlighter.css.js.map +0 -1
- package/esm/list/Highlighter.js +0 -34
- package/esm/list/Highlighter.js.map +0 -1
- package/esm/list/List.css.js +0 -4
- package/esm/list/List.css.js.map +0 -1
- package/esm/list/List.js +0 -315
- package/esm/list/List.js.map +0 -1
- package/esm/list/ListItem.css.js +0 -4
- package/esm/list/ListItem.css.js.map +0 -1
- package/esm/list/ListItem.js +0 -81
- package/esm/list/ListItem.js.map +0 -1
- package/esm/list/ListItemGroup.js +0 -4
- package/esm/list/ListItemGroup.js.map +0 -1
- package/esm/list/ListItemHeader.js +0 -4
- package/esm/list/ListItemHeader.js.map +0 -1
- package/esm/list/RadioIcon.css.js +0 -4
- package/esm/list/RadioIcon.css.js.map +0 -1
- package/esm/list/RadioIcon.js +0 -25
- package/esm/list/RadioIcon.js.map +0 -1
- package/esm/list/common-hooks/keyUtils.js +0 -64
- package/esm/list/common-hooks/keyUtils.js.map +0 -1
- package/esm/list/common-hooks/list-dom-utils.js +0 -19
- package/esm/list/common-hooks/list-dom-utils.js.map +0 -1
- package/esm/list/common-hooks/useCollapsibleGroups.js +0 -70
- package/esm/list/common-hooks/useCollapsibleGroups.js.map +0 -1
- package/esm/list/common-hooks/useImperativeScrollingAPI.js +0 -50
- package/esm/list/common-hooks/useImperativeScrollingAPI.js.map +0 -1
- package/esm/list/common-hooks/useKeyboardNavigation.js +0 -286
- package/esm/list/common-hooks/useKeyboardNavigation.js.map +0 -1
- package/esm/list/common-hooks/useTypeahead.js +0 -72
- package/esm/list/common-hooks/useTypeahead.js.map +0 -1
- package/esm/list/common-hooks/useViewportTracking.js +0 -131
- package/esm/list/common-hooks/useViewportTracking.js.map +0 -1
- package/esm/list/common-hooks/utils/collection-item-utils.js +0 -168
- package/esm/list/common-hooks/utils/collection-item-utils.js.map +0 -1
- package/esm/list/common-hooks/utils/filter-utils.js +0 -8
- package/esm/list/common-hooks/utils/filter-utils.js.map +0 -1
- package/esm/list/common-hooks/utils/isSelected.js +0 -7
- package/esm/list/common-hooks/utils/isSelected.js.map +0 -1
- package/esm/list/useList.js +0 -276
- package/esm/list/useList.js.map +0 -1
- package/esm/list/useListDrop.js +0 -90
- package/esm/list/useListDrop.js.map +0 -1
- package/esm/list/useListHeight.js +0 -75
- package/esm/list/useListHeight.js.map +0 -1
- package/esm/list/useScrollPosition.js +0 -72
- package/esm/list/useScrollPosition.js.map +0 -1
- package/types/calendar/Calendar.d.ts +0 -13
- package/types/calendar/index.d.ts +0 -4
- package/types/calendar/internal/CalendarCarousel.d.ts +0 -3
- package/types/calendar/internal/CalendarContext.d.ts +0 -8
- package/types/calendar/internal/CalendarDay.d.ts +0 -14
- package/types/calendar/internal/CalendarMonth.d.ts +0 -10
- package/types/calendar/internal/CalendarNavigation.d.ts +0 -16
- package/types/calendar/internal/CalendarWeekHeader.d.ts +0 -3
- package/types/calendar/internal/useFocusManagement.d.ts +0 -9
- package/types/calendar/internal/utils.d.ts +0 -15
- package/types/calendar/useCalendar.d.ts +0 -54
- package/types/calendar/useCalendarDay.d.ts +0 -22
- package/types/calendar/useSelection.d.ts +0 -78
- package/types/column-picker/ColumnPicker.d.ts +0 -7
- package/types/column-picker/ColumnSearch.d.ts +0 -6
- package/types/column-picker/index.d.ts +0 -2
- package/types/column-picker/moving-window.d.ts +0 -14
- package/types/common-hooks/collectionProvider.d.ts +0 -13
- package/types/common-hooks/collectionTypes.d.ts +0 -58
- package/types/common-hooks/index.d.ts +0 -8
- package/types/common-hooks/isPlainObject.d.ts +0 -1
- package/types/common-hooks/itemToString.d.ts +0 -2
- package/types/common-hooks/navigationTypes.d.ts +0 -36
- package/types/common-hooks/selectionTypes.d.ts +0 -70
- package/types/common-hooks/use-resize-observer.d.ts +0 -16
- package/types/common-hooks/useCollectionItems.d.ts +0 -2
- package/types/common-hooks/useControlled.d.ts +0 -24
- package/types/common-hooks/useSelection.d.ts +0 -8
- package/types/cycle-state-button/CycleStateButton.d.ts +0 -11
- package/types/cycle-state-button/index.d.ts +0 -1
- package/types/date-input/DateInput.d.ts +0 -60
- package/types/date-input/index.d.ts +0 -1
- package/types/date-picker/DatePicker.d.ts +0 -66
- package/types/date-picker/DatePickerContext.d.ts +0 -19
- package/types/date-picker/DatePickerPanel.d.ts +0 -10
- package/types/date-picker/index.d.ts +0 -1
- package/types/drag-drop/DragDropProvider.d.ts +0 -38
- package/types/drag-drop/DragDropState.d.ts +0 -15
- package/types/drag-drop/Draggable.d.ts +0 -13
- package/types/drag-drop/DropIndicator.d.ts +0 -5
- package/types/drag-drop/dragDropTypes.d.ts +0 -100
- package/types/drag-drop/drop-target-utils.d.ts +0 -82
- package/types/drag-drop/index.d.ts +0 -6
- package/types/drag-drop/useAutoScroll.d.ts +0 -11
- package/types/drag-drop/useDragDisplacers.d.ts +0 -17
- package/types/drag-drop/useDragDrop.d.ts +0 -2
- package/types/drag-drop/useDragDropCopy.d.ts +0 -6
- package/types/drag-drop/useDragDropIndicator.d.ts +0 -2
- package/types/drag-drop/useDragDropNaturalMovement.d.ts +0 -2
- package/types/drag-drop/useDropIndicator.d.ts +0 -8
- package/types/drag-drop/useGlobalDragDrop.d.ts +0 -11
- package/types/drag-drop/useTransition.d.ts +0 -3
- package/types/editable/index.d.ts +0 -1
- package/types/editable/useEditableText.d.ts +0 -19
- package/types/editable-label/EditableLabel.d.ts +0 -19
- package/types/editable-label/index.d.ts +0 -1
- package/types/expando-input/ExpandoInput.d.ts +0 -6
- package/types/expando-input/index.d.ts +0 -1
- package/types/icon-button/Icon.d.ts +0 -6
- package/types/icon-button/IconButton.d.ts +0 -6
- package/types/icon-button/ToggleIconButton.d.ts +0 -5
- package/types/icon-button/index.d.ts +0 -3
- package/types/index.d.ts +0 -27
- package/types/instrument-picker/SearchCell.d.ts +0 -2
- package/types/instrument-picker/TablePicker.d.ts +0 -10
- package/types/instrument-picker/index.d.ts +0 -1
- package/types/instrument-picker/moving-window.d.ts +0 -14
- package/types/instrument-picker/useDataSource.d.ts +0 -6
- package/types/instrument-picker/useTablePicker.d.ts +0 -47
- package/types/list/ChevronIcon.d.ts +0 -7
- package/types/list/Highlighter.d.ts +0 -6
- package/types/list/List.d.ts +0 -6
- package/types/list/ListItem.d.ts +0 -6
- package/types/list/ListItemGroup.d.ts +0 -6
- package/types/list/ListItemHeader.d.ts +0 -5
- package/types/list/RadioIcon.d.ts +0 -4
- package/types/list/common-hooks/index.d.ts +0 -10
- package/types/list/common-hooks/keyUtils.d.ts +0 -14
- package/types/list/common-hooks/list-dom-utils.d.ts +0 -5
- package/types/list/common-hooks/useCollapsibleGroups.d.ts +0 -14
- package/types/list/common-hooks/useImperativeScrollingAPI.d.ts +0 -14
- package/types/list/common-hooks/useKeyboardNavigation.d.ts +0 -3
- package/types/list/common-hooks/useTypeahead.d.ts +0 -14
- package/types/list/common-hooks/useViewportTracking.d.ts +0 -14
- package/types/list/common-hooks/utils/collection-item-utils.d.ts +0 -21
- package/types/list/common-hooks/utils/filter-utils.d.ts +0 -4
- package/types/list/common-hooks/utils/index.d.ts +0 -4
- package/types/list/common-hooks/utils/isSelected.d.ts +0 -2
- package/types/list/index.d.ts +0 -9
- package/types/list/keyset.d.ts +0 -9
- package/types/list/listTypes.d.ts +0 -200
- package/types/list/useList.d.ts +0 -3
- package/types/list/useListDrop.d.ts +0 -15
- package/types/list/useListHeight.d.ts +0 -19
- package/types/list/useScrollPosition.d.ts +0 -19
- package/types/measured-container/MeasuredContainer.d.ts +0 -14
- package/types/measured-container/index.d.ts +0 -2
- package/types/measured-container/useMeasuredContainer.d.ts +0 -23
- package/types/measured-container/useResizeObserver.d.ts +0 -15
- package/types/overflow-container/OverflowContainer.d.ts +0 -15
- package/types/overflow-container/index.d.ts +0 -2
- package/types/overflow-container/overflow-utils.d.ts +0 -48
- package/types/overflow-container/useOverflowContainer.d.ts +0 -19
- package/types/price-ticker/PriceTicker.d.ts +0 -7
- package/types/price-ticker/index.d.ts +0 -1
- package/types/split-button/SplitButton.d.ts +0 -11
- package/types/split-button/SplitStateButton.d.ts +0 -5
- package/types/split-button/index.d.ts +0 -2
- package/types/split-button/useSplitButton.d.ts +0 -311
- package/types/table-search/SearchCell.d.ts +0 -2
- package/types/table-search/TableSearch.d.ts +0 -9
- package/types/table-search/index.d.ts +0 -1
- package/types/table-search/moving-window.d.ts +0 -14
- package/types/table-search/useTableSearch.d.ts +0 -15
- package/types/tabs-next/TabBar.d.ts +0 -12
- package/types/tabs-next/TabListNext.d.ts +0 -12
- package/types/tabs-next/TabNext.d.ts +0 -12
- package/types/tabs-next/TabNextAction.d.ts +0 -5
- package/types/tabs-next/TabNextContext.d.ts +0 -12
- package/types/tabs-next/TabNextPanel.d.ts +0 -8
- package/types/tabs-next/TabNextTrigger.d.ts +0 -5
- package/types/tabs-next/TabOverflowList.d.ts +0 -11
- package/types/tabs-next/TabsNext.d.ts +0 -17
- package/types/tabs-next/TabsNextContext.d.ts +0 -21
- package/types/tabs-next/hooks/useCollection.d.ts +0 -18
- package/types/tabs-next/hooks/useFocusOutside.d.ts +0 -2
- package/types/tabs-next/hooks/useOverflow.d.ts +0 -11
- package/types/tabs-next/index.d.ts +0 -7
- package/types/tabstrip/Tab.d.ts +0 -27
- package/types/tabstrip/TabMenu.d.ts +0 -23
- package/types/tabstrip/TabMenuOptions.d.ts +0 -10
- package/types/tabstrip/TabsTypes.d.ts +0 -127
- package/types/tabstrip/Tabstrip.d.ts +0 -2
- package/types/tabstrip/index.d.ts +0 -5
- package/types/tabstrip/tabstrip-dom-utils.d.ts +0 -2
- package/types/tabstrip/useAnimatedSelectionThumb.d.ts +0 -7
- package/types/tabstrip/useKeyboardNavigation.d.ts +0 -29
- package/types/tabstrip/useSelection.d.ts +0 -13
- package/types/tabstrip/useTabstrip.d.ts +0 -55
- package/types/toolbar/Toolbar.d.ts +0 -19
- package/types/toolbar/index.d.ts +0 -1
- package/types/toolbar/toolbar-dom-utils.d.ts +0 -3
- package/types/toolbar/useKeyboardNavigation.d.ts +0 -32
- package/types/toolbar/useSelection.d.ts +0 -22
- package/types/toolbar/useToolbar.d.ts +0 -28
- package/types/utils/deprecated-types.d.ts +0 -2
- package/types/utils/escapeRegExp.d.ts +0 -1
- package/types/utils/forwardCallbackProps.d.ts +0 -3
- package/types/utils/index.d.ts +0 -5
- package/types/utils/isOverflowElement.d.ts +0 -1
- package/types/utils/isPlainObject.d.ts +0 -1
- package/types/vuu-date-picker/VuuDatePicker.d.ts +0 -7
- package/types/vuu-date-picker/index.d.ts +0 -1
- package/types/vuu-input/VuuInput.d.ts +0 -17
- package/types/vuu-input/index.d.ts +0 -1
- package/types/vuu-typeahead-input/VuuTypeaheadInput.d.ts +0 -29
- package/types/vuu-typeahead-input/index.d.ts +0 -1
- package/types/vuu-typeahead-input/useVuuTypeaheadInput.d.ts +0 -15
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { orientationType } from "@vuu-ui/vuu-utils";
|
|
2
|
-
import { ViewportRange } from "./dragDropTypes";
|
|
3
|
-
import { Direction, Rect } from "./dragDropTypes";
|
|
4
|
-
export declare const NOT_OVERFLOWED = ":not(.wrapped)";
|
|
5
|
-
export declare const NOT_HIDDEN = ":not([aria-hidden=\"true\"])";
|
|
6
|
-
export type MeasuredDropTarget = {
|
|
7
|
-
/**
|
|
8
|
-
The index position currently occupied by this item. If draggable
|
|
9
|
-
is dropped here, this will be the destination drop position.
|
|
10
|
-
*/
|
|
11
|
-
currentIndex: number;
|
|
12
|
-
element: HTMLElement;
|
|
13
|
-
id: string;
|
|
14
|
-
index: number;
|
|
15
|
-
isDraggedItem: boolean;
|
|
16
|
-
isExternal?: boolean;
|
|
17
|
-
isLast?: boolean;
|
|
18
|
-
isOverflowIndicator?: boolean;
|
|
19
|
-
start: number;
|
|
20
|
-
end: number;
|
|
21
|
-
mid: number;
|
|
22
|
-
size: number;
|
|
23
|
-
};
|
|
24
|
-
export type targetType = {
|
|
25
|
-
element: HTMLElement | null;
|
|
26
|
-
index: number;
|
|
27
|
-
isLast?: boolean;
|
|
28
|
-
};
|
|
29
|
-
/** clones and removes id */
|
|
30
|
-
export declare const cloneElement: <T extends HTMLElement>(element: T) => T;
|
|
31
|
-
type MousePosKey = keyof Pick<MouseEvent, "clientX" | "clientY">;
|
|
32
|
-
type DOMRectKey = keyof Omit<DOMRect, "toJSON">;
|
|
33
|
-
type DOMRectDimensionKey = keyof Pick<DOMRect, "width" | "height">;
|
|
34
|
-
type Dimension = keyof Pick<DOMRect, "width" | "height">;
|
|
35
|
-
type ElementDimension = keyof Pick<HTMLElement, "scrollHeight" | "scrollWidth" | "clientHeight" | "clientWidth" | "scrollTop" | "scrollLeft">;
|
|
36
|
-
type ElementPosition = "x" | "y";
|
|
37
|
-
export declare const measureElementSizeAndPosition: (element: HTMLElement, dimension?: Dimension, includeAutoMargin?: boolean) => number[];
|
|
38
|
-
export declare const dimensions: (orientation: orientationType) => {
|
|
39
|
-
CLIENT_POS: MousePosKey;
|
|
40
|
-
CLIENT_SIZE: ElementDimension;
|
|
41
|
-
CONTRA: DOMRectKey;
|
|
42
|
-
CONTRA_CLIENT_POS: MousePosKey;
|
|
43
|
-
CONTRA_END: DOMRectDimensionKey;
|
|
44
|
-
CONTRA_POS: ElementPosition;
|
|
45
|
-
DIMENSION: DOMRectDimensionKey;
|
|
46
|
-
END: DOMRectKey;
|
|
47
|
-
POS: ElementPosition;
|
|
48
|
-
SCROLL_POS: ElementDimension;
|
|
49
|
-
SCROLL_SIZE: ElementDimension;
|
|
50
|
-
START: DOMRectKey;
|
|
51
|
-
} | {
|
|
52
|
-
CLIENT_POS: MousePosKey;
|
|
53
|
-
CLIENT_SIZE: ElementDimension;
|
|
54
|
-
CONTRA: DOMRectKey;
|
|
55
|
-
CONTRA_CLIENT_POS: MousePosKey;
|
|
56
|
-
CONTRA_END: DOMRectDimensionKey;
|
|
57
|
-
CONTRA_POS: ElementPosition;
|
|
58
|
-
DIMENSION: DOMRectDimensionKey;
|
|
59
|
-
END: DOMRectKey;
|
|
60
|
-
POS: ElementPosition;
|
|
61
|
-
SCROLL_POS: ElementDimension;
|
|
62
|
-
SCROLL_SIZE: ElementDimension;
|
|
63
|
-
START: DOMRectKey;
|
|
64
|
-
};
|
|
65
|
-
export declare const getItemById: (measuredItems: MeasuredDropTarget[], id: string) => MeasuredDropTarget | undefined;
|
|
66
|
-
export declare const removeDraggedItem: (measuredItems: MeasuredDropTarget[], index: number) => void;
|
|
67
|
-
export type dropZone = "start" | "end";
|
|
68
|
-
export declare const measureDropTargets: (container: HTMLElement, orientation: orientationType, itemQuery?: string, viewportRange?: ViewportRange, draggedItemId?: string) => MeasuredDropTarget[];
|
|
69
|
-
export declare const getIndexOfDraggedItem: (dropTargets: MeasuredDropTarget[]) => number;
|
|
70
|
-
export declare const mutateDropTargetsSwitchDropTargetPosition: (dropTargets: MeasuredDropTarget[], direction: Direction) => void;
|
|
71
|
-
export declare const getNextDropTarget: (dropTargets: MeasuredDropTarget[], pos: number, draggedItemSize: number, mouseMoveDirection: Direction) => MeasuredDropTarget;
|
|
72
|
-
/**
|
|
73
|
-
* An item within a scrollable container might have a width or height greater than that of
|
|
74
|
-
* the container. If we drag such an item, we don't want the draggable to be larger than
|
|
75
|
-
* the container.
|
|
76
|
-
*/
|
|
77
|
-
export declare function constrainRect(targetRect: Rect, constraintRect: Rect): Rect;
|
|
78
|
-
export declare const dropTargetsDebugString: (dropTargets: MeasuredDropTarget[]) => string;
|
|
79
|
-
export declare const getItemParentContainer: (container: HTMLElement | null, itemQuery: string) => HTMLElement | null;
|
|
80
|
-
export declare const getScrollableContainer: (container: HTMLElement | null, itemQuery: string) => HTMLElement | null;
|
|
81
|
-
export declare const isContainerScrollable: (scrollableContainer: HTMLElement | null, orientation: orientationType) => boolean;
|
|
82
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { RefObject } from "react";
|
|
2
|
-
export type ScrollStopHandler = (scrollDirection: "fwd" | "bwd", scrollPos: number, atEnd: boolean) => void;
|
|
3
|
-
export declare const useAutoScroll: ({ containerRef, onScrollingStopped, orientation, }: {
|
|
4
|
-
containerRef: RefObject<HTMLElement | null>;
|
|
5
|
-
onScrollingStopped?: ScrollStopHandler;
|
|
6
|
-
orientation?: "horizontal" | "vertical";
|
|
7
|
-
}) => {
|
|
8
|
-
isScrolling: RefObject<boolean>;
|
|
9
|
-
startScrolling: (direction: "fwd" | "bwd", scrollRate: number, scrollUnit?: number) => void;
|
|
10
|
-
stopScrolling: (atEnd?: boolean) => void;
|
|
11
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { orientationType } from "@vuu-ui/vuu-utils";
|
|
2
|
-
import { Direction } from "./dragDropTypes";
|
|
3
|
-
import { MeasuredDropTarget } from "./drop-target-utils";
|
|
4
|
-
export type DragDisplacersHookResult = {
|
|
5
|
-
displaceItem: (dropTargets: MeasuredDropTarget[], dropTarget: MeasuredDropTarget, size: number, useTransition?: boolean, direction?: Direction | "static", orientation?: "horizontal" | "vertical") => number;
|
|
6
|
-
displaceLastItem: (dropTargets: MeasuredDropTarget[], dropTarget: MeasuredDropTarget, size: number, useTransition?: boolean, direction?: Direction | "static", orientation?: "horizontal" | "vertical") => number;
|
|
7
|
-
clearSpacers: (useAnimation?: boolean) => void;
|
|
8
|
-
/** Insert the sized spacer at start or end of collection */
|
|
9
|
-
setTerminalSpacer: (container: HTMLElement, position: "start" | "end", size: number) => void;
|
|
10
|
-
};
|
|
11
|
-
export type DragDisplacersHook = (orientation: orientationType) => DragDisplacersHookResult;
|
|
12
|
-
/**
|
|
13
|
-
* Manage a pair of displacer elements to smoothly display a moving gap between
|
|
14
|
-
* list items of any kind. Designed to be used in a drag drop operation. The 'static'
|
|
15
|
-
* direction option should be used at drag start or following scroll.
|
|
16
|
-
*/
|
|
17
|
-
export declare const useDragDisplacers: DragDisplacersHook;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { InternalDragDropProps, InternalDragHookResult } from "./dragDropTypes";
|
|
2
|
-
export declare const NULL_DROP_OPTIONS: {
|
|
3
|
-
readonly fromIndex: -1;
|
|
4
|
-
readonly toIndex: -1;
|
|
5
|
-
};
|
|
6
|
-
export declare const useDragDropCopy: ({ selected, viewportRange, }: InternalDragDropProps) => InternalDragHookResult;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { dropZone, MeasuredDropTarget } from "./drop-target-utils";
|
|
2
|
-
export declare const SPACER_SIZE = 0;
|
|
3
|
-
export type DropIndicatorHookResult = {
|
|
4
|
-
positionDropIndicator: (dropTarget: MeasuredDropTarget, dropZone: dropZone) => HTMLElement;
|
|
5
|
-
clearSpacer: () => void;
|
|
6
|
-
};
|
|
7
|
-
export type DropIndicatorHook = () => DropIndicatorHookResult;
|
|
8
|
-
export declare const useDropIndicator: DropIndicatorHook;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { MeasuredTarget } from "./DragDropProvider";
|
|
2
|
-
import { DragDropState } from "./DragDropState";
|
|
3
|
-
export type ResumeDragHandler = (dragDropState: DragDropState) => boolean;
|
|
4
|
-
export type GlobalDropHandler = (dragDropState: DragDropState) => void;
|
|
5
|
-
export declare const useGlobalDragDrop: ({ onDragOverDropTarget, onDrop, }: {
|
|
6
|
-
onDragOverDropTarget: (dropTargetId: string, dragDropState: DragDropState) => boolean;
|
|
7
|
-
onDrop: (dropTargetId: string, dragDropState: DragDropState) => void;
|
|
8
|
-
}) => {
|
|
9
|
-
measuredDropTargetsRef: import("react").RefObject<Record<string, MeasuredTarget> | undefined>;
|
|
10
|
-
resumeDrag: ResumeDragHandler;
|
|
11
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./useEditableText";
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { DataValueValidationChecker } from "@vuu-ui/vuu-data-types";
|
|
2
|
-
import { VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
|
|
3
|
-
import type { DataItemEditHandler } from "@vuu-ui/vuu-table-types";
|
|
4
|
-
import { FocusEventHandler, FormEventHandler, KeyboardEvent } from "react";
|
|
5
|
-
export interface EditableTextHookProps<T extends VuuRowDataItemType = VuuRowDataItemType> {
|
|
6
|
-
clientSideEditValidationCheck?: DataValueValidationChecker;
|
|
7
|
-
value?: T;
|
|
8
|
-
onEdit?: DataItemEditHandler;
|
|
9
|
-
type?: "string" | "number" | "boolean";
|
|
10
|
-
}
|
|
11
|
-
export declare const useEditableText: <T extends string | number | boolean = string>({ clientSideEditValidationCheck, value, onEdit, type, }: EditableTextHookProps<T>) => {
|
|
12
|
-
inputProps: {
|
|
13
|
-
onBlur: FocusEventHandler<HTMLElement>;
|
|
14
|
-
onKeyDown: (evt: KeyboardEvent<HTMLElement>) => void;
|
|
15
|
-
};
|
|
16
|
-
onChange: FormEventHandler;
|
|
17
|
-
value: string;
|
|
18
|
-
warningMessage: string | undefined;
|
|
19
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ForwardedRef, HTMLAttributes } from "react";
|
|
2
|
-
export type ExitEditModeHandler = (originalLabel: string | undefined, editedLabel: string | undefined, allowDeactivation?: boolean, editCancelled?: boolean) => void;
|
|
3
|
-
export interface EditAPI {
|
|
4
|
-
beginEdit: () => void;
|
|
5
|
-
}
|
|
6
|
-
export declare const NullEditAPI: EditAPI;
|
|
7
|
-
export interface EditableLabelProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
8
|
-
className?: string;
|
|
9
|
-
defaultEditing?: boolean;
|
|
10
|
-
defaultValue?: string;
|
|
11
|
-
editLabelApiRef?: ForwardedRef<EditAPI>;
|
|
12
|
-
editing?: boolean;
|
|
13
|
-
onEnterEditMode?: () => void;
|
|
14
|
-
onChange?: (value: string) => void;
|
|
15
|
-
onExitEditMode: ExitEditModeHandler;
|
|
16
|
-
defaultIsEditing?: boolean;
|
|
17
|
-
value?: string;
|
|
18
|
-
}
|
|
19
|
-
export declare const EditableLabel: import("react").ForwardRefExoticComponent<EditableLabelProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./EditableLabel";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CommitHandler } from "@vuu-ui/vuu-utils";
|
|
2
|
-
import { VuuInputProps } from "../vuu-input";
|
|
3
|
-
export interface ExpandoInputProps extends Omit<VuuInputProps, "onCommit"> {
|
|
4
|
-
onCommit?: CommitHandler;
|
|
5
|
-
}
|
|
6
|
-
export declare const ExpandoInput: import("react").ForwardRefExoticComponent<ExpandoInputProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ExpandoInput";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
|
-
export interface IconProps extends HTMLAttributes<HTMLSpanElement> {
|
|
3
|
-
name: string;
|
|
4
|
-
size?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare const Icon: ({ className, name, size, style: styleProp, ...htmlAttributes }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ButtonProps } from "@salt-ds/core";
|
|
2
|
-
export interface IconButtonProps extends Omit<ButtonProps, "children"> {
|
|
3
|
-
icon: string;
|
|
4
|
-
size?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { IconButtonProps } from "./IconButton";
|
|
2
|
-
export interface ToggleIconButtonProps extends Omit<IconButtonProps, "icon"> {
|
|
3
|
-
isExpanded: boolean;
|
|
4
|
-
}
|
|
5
|
-
export declare const ToggleIconButton: ({ className, isExpanded, size, variant, ...props }: ToggleIconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
package/types/index.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export * from "./calendar";
|
|
2
|
-
export * from "./column-picker";
|
|
3
|
-
export * from "./common-hooks";
|
|
4
|
-
export * from "./cycle-state-button";
|
|
5
|
-
export * from "./date-input";
|
|
6
|
-
export * from "./date-picker";
|
|
7
|
-
export * from "./drag-drop";
|
|
8
|
-
export * from "./drag-drop";
|
|
9
|
-
export * from "./editable";
|
|
10
|
-
export * from "./editable-label";
|
|
11
|
-
export * from "./expando-input";
|
|
12
|
-
export * from "./icon-button";
|
|
13
|
-
export * from "./instrument-picker";
|
|
14
|
-
export * from "./table-search";
|
|
15
|
-
export * from "./list";
|
|
16
|
-
export * from "./measured-container";
|
|
17
|
-
export * from "./overflow-container";
|
|
18
|
-
export * from "./price-ticker";
|
|
19
|
-
export * from "./price-ticker";
|
|
20
|
-
export * from "./split-button";
|
|
21
|
-
export * from "./tabs-next";
|
|
22
|
-
export * from "./tabstrip";
|
|
23
|
-
export * from "./toolbar";
|
|
24
|
-
export * from "./utils";
|
|
25
|
-
export * from "./vuu-date-picker";
|
|
26
|
-
export * from "./vuu-input";
|
|
27
|
-
export * from "./vuu-typeahead-input";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { DataSourceRowObject, TableSchema } from "@vuu-ui/vuu-data-types";
|
|
2
|
-
import { type TableProps } from "@vuu-ui/vuu-table";
|
|
3
|
-
import { type HTMLAttributes } from "react";
|
|
4
|
-
export interface TablePickerProps extends Omit<HTMLAttributes<HTMLElement>, "onSelect">, Pick<TableProps, "onSelect"> {
|
|
5
|
-
TableProps?: Pick<TableProps, "config">;
|
|
6
|
-
rowToString?: (row: DataSourceRowObject) => string;
|
|
7
|
-
schema: TableSchema;
|
|
8
|
-
searchColumns?: string[];
|
|
9
|
-
}
|
|
10
|
-
export declare const TablePicker: ({ TableProps, onSelect, rowToString, schema, searchColumns, ...htmlAttributes }: TablePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./TablePicker";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DataSourceRow } from "@vuu-ui/vuu-data-types";
|
|
2
|
-
import { VuuRange } from "@vuu-ui/vuu-protocol-types";
|
|
3
|
-
export declare class MovingWindow {
|
|
4
|
-
data: DataSourceRow[];
|
|
5
|
-
rowCount: number;
|
|
6
|
-
private range;
|
|
7
|
-
constructor({ from, to }: VuuRange);
|
|
8
|
-
setRowCount: (rowCount: number) => void;
|
|
9
|
-
add(data: DataSourceRow): void;
|
|
10
|
-
getAtIndex(index: number): DataSourceRow | undefined;
|
|
11
|
-
isWithinRange(index: number): boolean;
|
|
12
|
-
setRange({ from, to }: VuuRange): void;
|
|
13
|
-
getSelectedRows(): DataSourceRow[];
|
|
14
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ChangeEvent, KeyboardEventHandler, RefCallback } from "react";
|
|
2
|
-
import type { TableConfig, TableRowSelectHandler } from "@vuu-ui/vuu-table-types";
|
|
3
|
-
import type { TablePickerProps } from "./TablePicker";
|
|
4
|
-
export interface TablePickerHookProps extends Pick<TablePickerProps, "TableProps" | "onSelect" | "rowToString" | "schema" | "searchColumns"> {
|
|
5
|
-
defaultIsOpen?: boolean;
|
|
6
|
-
isOpen?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const useTablePicker: ({ TableProps, onSelect, rowToString, schema, searchColumns, }: TablePickerHookProps) => {
|
|
9
|
-
containerRef: RefCallback<HTMLDivElement>;
|
|
10
|
-
dataSource: import("@vuu-ui/vuu-data-types").DataSource;
|
|
11
|
-
highlightedIndex: number | undefined;
|
|
12
|
-
floatingUIProps: {
|
|
13
|
-
reference: ((node: import("@floating-ui/react-dom").ReferenceType | null) => void) & ((node: import("@floating-ui/react").ReferenceType | null) => void);
|
|
14
|
-
floating: ((node: HTMLElement | null) => void) & ((node: HTMLElement | null) => void);
|
|
15
|
-
placement: import("@floating-ui/utils").Placement;
|
|
16
|
-
strategy: import("@floating-ui/utils").Strategy;
|
|
17
|
-
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
18
|
-
x: number;
|
|
19
|
-
y: number;
|
|
20
|
-
isPositioned: boolean;
|
|
21
|
-
update: () => void;
|
|
22
|
-
floatingStyles: React.CSSProperties;
|
|
23
|
-
refs: {
|
|
24
|
-
reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
|
|
25
|
-
floating: React.MutableRefObject<HTMLElement | null>;
|
|
26
|
-
setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
|
|
27
|
-
setFloating: (node: HTMLElement | null) => void;
|
|
28
|
-
} & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
29
|
-
};
|
|
30
|
-
inputProps: {
|
|
31
|
-
inputProps: {
|
|
32
|
-
autoComplete: string;
|
|
33
|
-
onKeyDown: KeyboardEventHandler<HTMLElement>;
|
|
34
|
-
};
|
|
35
|
-
onChange: (evt: ChangeEvent<HTMLInputElement>) => void;
|
|
36
|
-
};
|
|
37
|
-
interactionPropGetters: import("@floating-ui/react").UseInteractionsReturn;
|
|
38
|
-
onKeyDown: KeyboardEventHandler<HTMLElement>;
|
|
39
|
-
open: boolean;
|
|
40
|
-
tableConfig: TableConfig;
|
|
41
|
-
tableHandlers: {
|
|
42
|
-
onSelect: TableRowSelectHandler;
|
|
43
|
-
};
|
|
44
|
-
tableRef: import("react").RefObject<HTMLDivElement | null>;
|
|
45
|
-
value: string;
|
|
46
|
-
width: number;
|
|
47
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
|
-
type Direction = "up" | "down" | "left" | "right";
|
|
3
|
-
interface ChevronProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
|
-
direction: Direction;
|
|
5
|
-
}
|
|
6
|
-
export declare const ChevronIcon: (props: ChevronProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
package/types/list/List.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ForwardedRef, ReactElement } from "react";
|
|
2
|
-
import { SelectionStrategy } from "../common-hooks";
|
|
3
|
-
import { ListProps } from "./listTypes";
|
|
4
|
-
export declare const List: <Item = string, S extends SelectionStrategy = "default">(props: ListProps<Item, S> & {
|
|
5
|
-
ref?: ForwardedRef<HTMLDivElement>;
|
|
6
|
-
}) => ReactElement<ListProps<Item>>;
|
package/types/list/ListItem.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
|
-
import { ListItemType } from "./listTypes";
|
|
3
|
-
export declare const ListItemProxy: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
4
|
-
height?: number;
|
|
5
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
-
export declare const ListItem: ListItemType;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from "./keyUtils";
|
|
2
|
-
export * from "./useCollapsibleGroups";
|
|
3
|
-
export * from "./list-dom-utils";
|
|
4
|
-
export * from "../../common-hooks/useCollectionItems";
|
|
5
|
-
export * from "./useImperativeScrollingAPI";
|
|
6
|
-
export * from "./useKeyboardNavigation";
|
|
7
|
-
export * from "../../common-hooks/useSelection";
|
|
8
|
-
export * from "./useTypeahead";
|
|
9
|
-
export * from "./useViewportTracking";
|
|
10
|
-
export * from "./utils";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare const ArrowUp = "ArrowUp";
|
|
3
|
-
export declare const ArrowDown = "ArrowDown";
|
|
4
|
-
export declare const ArrowLeft = "ArrowLeft";
|
|
5
|
-
export declare const ArrowRight = "ArrowRight";
|
|
6
|
-
export declare const Enter = "Enter";
|
|
7
|
-
export declare const Escape = "Escape";
|
|
8
|
-
export declare const Home = "Home";
|
|
9
|
-
export declare const End = "End";
|
|
10
|
-
export declare const PageUp = "PageUp";
|
|
11
|
-
export declare const PageDown = "PageDown";
|
|
12
|
-
export declare const Space = " ";
|
|
13
|
-
export declare const isCharacterKey: (evt: React.KeyboardEvent) => boolean;
|
|
14
|
-
export declare const isNavigationKey: ({ key }: React.KeyboardEvent) => boolean;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const listItemElement: (listEl: HTMLElement, listItemIdx: number) => Element | null;
|
|
2
|
-
export declare function listItemIndex(listItemEl?: HTMLElement): number;
|
|
3
|
-
export declare const listItemId: (el: HTMLElement | null) => string | undefined;
|
|
4
|
-
export declare const closestListItemId: (el: HTMLElement) => string | undefined;
|
|
5
|
-
export declare const closestListItemIndex: (el: HTMLElement) => number;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ListHandlers } from "../../common-hooks";
|
|
2
|
-
import { CollectionHookResult } from "../../common-hooks/collectionTypes";
|
|
3
|
-
interface CollapsibleHookProps<Item> {
|
|
4
|
-
collapsibleHeaders?: boolean;
|
|
5
|
-
collectionHook: CollectionHookResult<Item>;
|
|
6
|
-
highlightedIdx: number;
|
|
7
|
-
onToggle?: (node: Item) => void;
|
|
8
|
-
}
|
|
9
|
-
interface CollapsibleHookResult {
|
|
10
|
-
onClick?: ListHandlers["onClick"];
|
|
11
|
-
onKeyDown?: ListHandlers["onKeyDown"];
|
|
12
|
-
}
|
|
13
|
-
export declare const useCollapsibleGroups: <Item>({ collapsibleHeaders, collectionHook, highlightedIdx, onToggle, }: CollapsibleHookProps<Item>) => CollapsibleHookResult;
|
|
14
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ForwardedRef, MutableRefObject } from "react";
|
|
2
|
-
import { CollectionHookResult, CollectionItem } from "../../common-hooks/collectionTypes";
|
|
3
|
-
export interface ScrollingAPI<Item> {
|
|
4
|
-
scrollToIndex: (itemIndex: number) => void;
|
|
5
|
-
scrollToItem: (item: Item) => void;
|
|
6
|
-
scrollTo: (scrollOffset: number) => void;
|
|
7
|
-
}
|
|
8
|
-
export interface ScrollingAPIHook<Item> {
|
|
9
|
-
collectionHook: CollectionHookResult<Item>;
|
|
10
|
-
forwardedRef?: ForwardedRef<ScrollingAPI<Item>>;
|
|
11
|
-
scrollableRef: MutableRefObject<HTMLElement | null>;
|
|
12
|
-
scrollIntoView?: (item: CollectionItem<Item>) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare const useImperativeScrollingAPI: <Item>({ collectionHook, forwardedRef, scrollableRef, scrollIntoView, }: ScrollingAPIHook<Item>) => void;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { NavigationHookProps, NavigationHookResult } from "../../common-hooks";
|
|
2
|
-
export declare const LIST_FOCUS_VISIBLE = -2;
|
|
3
|
-
export declare const useKeyboardNavigation: ({ containerRef, defaultHighlightedIndex, disableHighlightOnFocus, highlightedIndex: highlightedIndexProp, itemCount, onHighlight, onKeyboardNavigation, restoreLastFocus, selected, viewportItemCount: _, }: NavigationHookProps) => NavigationHookResult;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CollectionItem } from "../../common-hooks/collectionTypes";
|
|
2
|
-
interface TypeaheadHookProps<Item> {
|
|
3
|
-
disableTypeToSelect?: boolean;
|
|
4
|
-
highlightedIdx: number;
|
|
5
|
-
highlightItemAtIndex: (idx: number) => void;
|
|
6
|
-
applyIncrementalSearch?: boolean;
|
|
7
|
-
typeToNavigate: boolean;
|
|
8
|
-
items: CollectionItem<Item>[];
|
|
9
|
-
}
|
|
10
|
-
interface TypeaheadHookResult {
|
|
11
|
-
onKeyDown?: (e: React.KeyboardEvent) => void;
|
|
12
|
-
}
|
|
13
|
-
export declare const useTypeahead: <Item>({ disableTypeToSelect, highlightedIdx, highlightItemAtIndex, typeToNavigate, items, applyIncrementalSearch, }: TypeaheadHookProps<Item>) => TypeaheadHookResult;
|
|
14
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { MutableRefObject, RefObject } from "react";
|
|
2
|
-
import { CollectionItem } from "../../common-hooks/collectionTypes";
|
|
3
|
-
export interface ViewportTrackingProps<Item> {
|
|
4
|
-
containerRef: RefObject<HTMLElement | null>;
|
|
5
|
-
contentRef?: RefObject<HTMLElement | null>;
|
|
6
|
-
highlightedIdx?: number;
|
|
7
|
-
indexPositions: CollectionItem<Item>[];
|
|
8
|
-
stickyHeaders?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface ViewportTrackingResult<Item> {
|
|
11
|
-
isScrolling: MutableRefObject<boolean>;
|
|
12
|
-
scrollIntoView: (item: CollectionItem<Item>) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare const useViewportTracking: <Item>({ containerRef, contentRef, highlightedIdx, indexPositions, stickyHeaders, }: ViewportTrackingProps<Item>) => ViewportTrackingResult<Item>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from "react";
|
|
2
|
-
import { CollectionItem, CollectionOptions } from "../../../common-hooks/collectionTypes";
|
|
3
|
-
export declare const sourceItemHasProp: (item: unknown, propertyName: string) => boolean;
|
|
4
|
-
export declare const isHeader: (item: unknown) => boolean;
|
|
5
|
-
export declare const isGroupNode: (item: unknown) => boolean;
|
|
6
|
-
export declare const isDisabled: (item: unknown) => boolean;
|
|
7
|
-
export declare const isFocusable: (item: unknown) => boolean;
|
|
8
|
-
export declare const countChildItems: <Item>(item: CollectionItem<Item>, items: CollectionItem<Item>[], idx: number) => number;
|
|
9
|
-
export declare const getChildLabel: (element: ReactElement<{
|
|
10
|
-
children?: ReactNode;
|
|
11
|
-
label?: string;
|
|
12
|
-
title?: string;
|
|
13
|
-
}>) => string | undefined;
|
|
14
|
-
export declare const childIsGroup: (child: ReactElement) => boolean;
|
|
15
|
-
export declare const getChildNodes: (element: ReactElement) => CollectionItem<ReactElement>[] | undefined;
|
|
16
|
-
type CollectionItemWithoutId<T> = Omit<CollectionItem<T>, "id">;
|
|
17
|
-
export declare const sourceItems: <T>(source?: ReadonlyArray<T>, options?: CollectionOptions<T>) => CollectionItemWithoutId<T>[] | undefined;
|
|
18
|
-
export declare const childItems: (children: ReactNode) => CollectionItem<ReactElement>[] | undefined;
|
|
19
|
-
export declare const isParentPath: (parentPath: string, childPath: string) => boolean;
|
|
20
|
-
export declare function replaceCollectionItem<Item>(nodes: CollectionItem<Item>[], id: string, props: Partial<CollectionItem<Item>>): CollectionItem<Item>[];
|
|
21
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export type GetFilterRegex = (inputValue: string) => RegExp;
|
|
2
|
-
export type FilterPredicate = (item: string) => boolean;
|
|
3
|
-
export declare const getDefaultFilterRegex: GetFilterRegex;
|
|
4
|
-
export declare const getDefaultFilter: (inputValue?: string, getFilterRegex?: GetFilterRegex) => (itemValue?: string) => boolean;
|
package/types/list/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from "./common-hooks";
|
|
2
|
-
export * from "./Highlighter";
|
|
3
|
-
export * from "./ListItem";
|
|
4
|
-
export * from "./List";
|
|
5
|
-
export * from "./listTypes";
|
|
6
|
-
export * from "./ListItemHeader";
|
|
7
|
-
export * from "./ListItemGroup";
|
|
8
|
-
export * from "./useList";
|
|
9
|
-
export * from "./RadioIcon";
|
package/types/list/keyset.d.ts
DELETED