@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.
Files changed (301) hide show
  1. package/cjs/column-picker/ColumnPicker.js +2 -2
  2. package/cjs/column-picker/ColumnPicker.js.map +1 -1
  3. package/cjs/column-picker/ColumnSearch.js +4 -24
  4. package/cjs/column-picker/ColumnSearch.js.map +1 -1
  5. package/cjs/context-panel-provider/ContextPanelProvider.js +55 -0
  6. package/cjs/context-panel-provider/ContextPanelProvider.js.map +1 -0
  7. package/cjs/index.js +6 -80
  8. package/cjs/index.js.map +1 -1
  9. package/cjs/sortable-list/SortableList.js +38 -0
  10. package/cjs/sortable-list/SortableList.js.map +1 -0
  11. package/cjs/toolbar/Toolbar.js.map +1 -1
  12. package/cjs/toolbar/useSelection.js +0 -1
  13. package/cjs/toolbar/useSelection.js.map +1 -1
  14. package/esm/column-picker/ColumnPicker.js +2 -2
  15. package/esm/column-picker/ColumnPicker.js.map +1 -1
  16. package/esm/column-picker/ColumnSearch.js +5 -25
  17. package/esm/column-picker/ColumnSearch.js.map +1 -1
  18. package/esm/context-panel-provider/ContextPanelProvider.js +51 -0
  19. package/esm/context-panel-provider/ContextPanelProvider.js.map +1 -0
  20. package/esm/index.js +2 -21
  21. package/esm/index.js.map +1 -1
  22. package/esm/sortable-list/SortableList.js +35 -0
  23. package/esm/sortable-list/SortableList.js.map +1 -0
  24. package/esm/toolbar/Toolbar.js.map +1 -1
  25. package/esm/toolbar/useSelection.js +0 -1
  26. package/esm/toolbar/useSelection.js.map +1 -1
  27. package/package.json +15 -17
  28. package/cjs/common-hooks/collectionProvider.js +0 -24
  29. package/cjs/common-hooks/collectionProvider.js.map +0 -1
  30. package/cjs/common-hooks/isPlainObject.js +0 -6
  31. package/cjs/common-hooks/isPlainObject.js.map +0 -1
  32. package/cjs/common-hooks/itemToString.js +0 -24
  33. package/cjs/common-hooks/itemToString.js.map +0 -1
  34. package/cjs/common-hooks/useCollectionItems.js +0 -309
  35. package/cjs/common-hooks/useCollectionItems.js.map +0 -1
  36. package/cjs/common-hooks/useSelection.js +0 -212
  37. package/cjs/common-hooks/useSelection.js.map +0 -1
  38. package/cjs/list/Highlighter.css.js +0 -6
  39. package/cjs/list/Highlighter.css.js.map +0 -1
  40. package/cjs/list/Highlighter.js +0 -36
  41. package/cjs/list/Highlighter.js.map +0 -1
  42. package/cjs/list/List.css.js +0 -6
  43. package/cjs/list/List.css.js.map +0 -1
  44. package/cjs/list/List.js +0 -317
  45. package/cjs/list/List.js.map +0 -1
  46. package/cjs/list/ListItem.css.js +0 -6
  47. package/cjs/list/ListItem.css.js.map +0 -1
  48. package/cjs/list/ListItem.js +0 -84
  49. package/cjs/list/ListItem.js.map +0 -1
  50. package/cjs/list/ListItemGroup.js +0 -6
  51. package/cjs/list/ListItemGroup.js.map +0 -1
  52. package/cjs/list/ListItemHeader.js +0 -6
  53. package/cjs/list/ListItemHeader.js.map +0 -1
  54. package/cjs/list/RadioIcon.css.js +0 -6
  55. package/cjs/list/RadioIcon.css.js.map +0 -1
  56. package/cjs/list/RadioIcon.js +0 -27
  57. package/cjs/list/RadioIcon.js.map +0 -1
  58. package/cjs/list/common-hooks/keyUtils.js +0 -78
  59. package/cjs/list/common-hooks/keyUtils.js.map +0 -1
  60. package/cjs/list/common-hooks/list-dom-utils.js +0 -25
  61. package/cjs/list/common-hooks/list-dom-utils.js.map +0 -1
  62. package/cjs/list/common-hooks/useCollapsibleGroups.js +0 -72
  63. package/cjs/list/common-hooks/useCollapsibleGroups.js.map +0 -1
  64. package/cjs/list/common-hooks/useImperativeScrollingAPI.js +0 -52
  65. package/cjs/list/common-hooks/useImperativeScrollingAPI.js.map +0 -1
  66. package/cjs/list/common-hooks/useKeyboardNavigation.js +0 -289
  67. package/cjs/list/common-hooks/useKeyboardNavigation.js.map +0 -1
  68. package/cjs/list/common-hooks/useTypeahead.js +0 -74
  69. package/cjs/list/common-hooks/useTypeahead.js.map +0 -1
  70. package/cjs/list/common-hooks/useViewportTracking.js +0 -133
  71. package/cjs/list/common-hooks/useViewportTracking.js.map +0 -1
  72. package/cjs/list/common-hooks/utils/collection-item-utils.js +0 -182
  73. package/cjs/list/common-hooks/utils/collection-item-utils.js.map +0 -1
  74. package/cjs/list/common-hooks/utils/filter-utils.js +0 -11
  75. package/cjs/list/common-hooks/utils/filter-utils.js.map +0 -1
  76. package/cjs/list/common-hooks/utils/isSelected.js +0 -9
  77. package/cjs/list/common-hooks/utils/isSelected.js.map +0 -1
  78. package/cjs/list/useList.js +0 -278
  79. package/cjs/list/useList.js.map +0 -1
  80. package/cjs/list/useListDrop.js +0 -92
  81. package/cjs/list/useListDrop.js.map +0 -1
  82. package/cjs/list/useListHeight.js +0 -77
  83. package/cjs/list/useListHeight.js.map +0 -1
  84. package/cjs/list/useScrollPosition.js +0 -74
  85. package/cjs/list/useScrollPosition.js.map +0 -1
  86. package/esm/common-hooks/collectionProvider.js +0 -20
  87. package/esm/common-hooks/collectionProvider.js.map +0 -1
  88. package/esm/common-hooks/isPlainObject.js +0 -4
  89. package/esm/common-hooks/isPlainObject.js.map +0 -1
  90. package/esm/common-hooks/itemToString.js +0 -22
  91. package/esm/common-hooks/itemToString.js.map +0 -1
  92. package/esm/common-hooks/useCollectionItems.js +0 -307
  93. package/esm/common-hooks/useCollectionItems.js.map +0 -1
  94. package/esm/common-hooks/useSelection.js +0 -205
  95. package/esm/common-hooks/useSelection.js.map +0 -1
  96. package/esm/list/Highlighter.css.js +0 -4
  97. package/esm/list/Highlighter.css.js.map +0 -1
  98. package/esm/list/Highlighter.js +0 -34
  99. package/esm/list/Highlighter.js.map +0 -1
  100. package/esm/list/List.css.js +0 -4
  101. package/esm/list/List.css.js.map +0 -1
  102. package/esm/list/List.js +0 -315
  103. package/esm/list/List.js.map +0 -1
  104. package/esm/list/ListItem.css.js +0 -4
  105. package/esm/list/ListItem.css.js.map +0 -1
  106. package/esm/list/ListItem.js +0 -81
  107. package/esm/list/ListItem.js.map +0 -1
  108. package/esm/list/ListItemGroup.js +0 -4
  109. package/esm/list/ListItemGroup.js.map +0 -1
  110. package/esm/list/ListItemHeader.js +0 -4
  111. package/esm/list/ListItemHeader.js.map +0 -1
  112. package/esm/list/RadioIcon.css.js +0 -4
  113. package/esm/list/RadioIcon.css.js.map +0 -1
  114. package/esm/list/RadioIcon.js +0 -25
  115. package/esm/list/RadioIcon.js.map +0 -1
  116. package/esm/list/common-hooks/keyUtils.js +0 -64
  117. package/esm/list/common-hooks/keyUtils.js.map +0 -1
  118. package/esm/list/common-hooks/list-dom-utils.js +0 -19
  119. package/esm/list/common-hooks/list-dom-utils.js.map +0 -1
  120. package/esm/list/common-hooks/useCollapsibleGroups.js +0 -70
  121. package/esm/list/common-hooks/useCollapsibleGroups.js.map +0 -1
  122. package/esm/list/common-hooks/useImperativeScrollingAPI.js +0 -50
  123. package/esm/list/common-hooks/useImperativeScrollingAPI.js.map +0 -1
  124. package/esm/list/common-hooks/useKeyboardNavigation.js +0 -286
  125. package/esm/list/common-hooks/useKeyboardNavigation.js.map +0 -1
  126. package/esm/list/common-hooks/useTypeahead.js +0 -72
  127. package/esm/list/common-hooks/useTypeahead.js.map +0 -1
  128. package/esm/list/common-hooks/useViewportTracking.js +0 -131
  129. package/esm/list/common-hooks/useViewportTracking.js.map +0 -1
  130. package/esm/list/common-hooks/utils/collection-item-utils.js +0 -168
  131. package/esm/list/common-hooks/utils/collection-item-utils.js.map +0 -1
  132. package/esm/list/common-hooks/utils/filter-utils.js +0 -8
  133. package/esm/list/common-hooks/utils/filter-utils.js.map +0 -1
  134. package/esm/list/common-hooks/utils/isSelected.js +0 -7
  135. package/esm/list/common-hooks/utils/isSelected.js.map +0 -1
  136. package/esm/list/useList.js +0 -276
  137. package/esm/list/useList.js.map +0 -1
  138. package/esm/list/useListDrop.js +0 -90
  139. package/esm/list/useListDrop.js.map +0 -1
  140. package/esm/list/useListHeight.js +0 -75
  141. package/esm/list/useListHeight.js.map +0 -1
  142. package/esm/list/useScrollPosition.js +0 -72
  143. package/esm/list/useScrollPosition.js.map +0 -1
  144. package/types/calendar/Calendar.d.ts +0 -13
  145. package/types/calendar/index.d.ts +0 -4
  146. package/types/calendar/internal/CalendarCarousel.d.ts +0 -3
  147. package/types/calendar/internal/CalendarContext.d.ts +0 -8
  148. package/types/calendar/internal/CalendarDay.d.ts +0 -14
  149. package/types/calendar/internal/CalendarMonth.d.ts +0 -10
  150. package/types/calendar/internal/CalendarNavigation.d.ts +0 -16
  151. package/types/calendar/internal/CalendarWeekHeader.d.ts +0 -3
  152. package/types/calendar/internal/useFocusManagement.d.ts +0 -9
  153. package/types/calendar/internal/utils.d.ts +0 -15
  154. package/types/calendar/useCalendar.d.ts +0 -54
  155. package/types/calendar/useCalendarDay.d.ts +0 -22
  156. package/types/calendar/useSelection.d.ts +0 -78
  157. package/types/column-picker/ColumnPicker.d.ts +0 -7
  158. package/types/column-picker/ColumnSearch.d.ts +0 -6
  159. package/types/column-picker/index.d.ts +0 -2
  160. package/types/column-picker/moving-window.d.ts +0 -14
  161. package/types/common-hooks/collectionProvider.d.ts +0 -13
  162. package/types/common-hooks/collectionTypes.d.ts +0 -58
  163. package/types/common-hooks/index.d.ts +0 -8
  164. package/types/common-hooks/isPlainObject.d.ts +0 -1
  165. package/types/common-hooks/itemToString.d.ts +0 -2
  166. package/types/common-hooks/navigationTypes.d.ts +0 -36
  167. package/types/common-hooks/selectionTypes.d.ts +0 -70
  168. package/types/common-hooks/use-resize-observer.d.ts +0 -16
  169. package/types/common-hooks/useCollectionItems.d.ts +0 -2
  170. package/types/common-hooks/useControlled.d.ts +0 -24
  171. package/types/common-hooks/useSelection.d.ts +0 -8
  172. package/types/cycle-state-button/CycleStateButton.d.ts +0 -11
  173. package/types/cycle-state-button/index.d.ts +0 -1
  174. package/types/date-input/DateInput.d.ts +0 -60
  175. package/types/date-input/index.d.ts +0 -1
  176. package/types/date-picker/DatePicker.d.ts +0 -66
  177. package/types/date-picker/DatePickerContext.d.ts +0 -19
  178. package/types/date-picker/DatePickerPanel.d.ts +0 -10
  179. package/types/date-picker/index.d.ts +0 -1
  180. package/types/drag-drop/DragDropProvider.d.ts +0 -38
  181. package/types/drag-drop/DragDropState.d.ts +0 -15
  182. package/types/drag-drop/Draggable.d.ts +0 -13
  183. package/types/drag-drop/DropIndicator.d.ts +0 -5
  184. package/types/drag-drop/dragDropTypes.d.ts +0 -100
  185. package/types/drag-drop/drop-target-utils.d.ts +0 -82
  186. package/types/drag-drop/index.d.ts +0 -6
  187. package/types/drag-drop/useAutoScroll.d.ts +0 -11
  188. package/types/drag-drop/useDragDisplacers.d.ts +0 -17
  189. package/types/drag-drop/useDragDrop.d.ts +0 -2
  190. package/types/drag-drop/useDragDropCopy.d.ts +0 -6
  191. package/types/drag-drop/useDragDropIndicator.d.ts +0 -2
  192. package/types/drag-drop/useDragDropNaturalMovement.d.ts +0 -2
  193. package/types/drag-drop/useDropIndicator.d.ts +0 -8
  194. package/types/drag-drop/useGlobalDragDrop.d.ts +0 -11
  195. package/types/drag-drop/useTransition.d.ts +0 -3
  196. package/types/editable/index.d.ts +0 -1
  197. package/types/editable/useEditableText.d.ts +0 -19
  198. package/types/editable-label/EditableLabel.d.ts +0 -19
  199. package/types/editable-label/index.d.ts +0 -1
  200. package/types/expando-input/ExpandoInput.d.ts +0 -6
  201. package/types/expando-input/index.d.ts +0 -1
  202. package/types/icon-button/Icon.d.ts +0 -6
  203. package/types/icon-button/IconButton.d.ts +0 -6
  204. package/types/icon-button/ToggleIconButton.d.ts +0 -5
  205. package/types/icon-button/index.d.ts +0 -3
  206. package/types/index.d.ts +0 -27
  207. package/types/instrument-picker/SearchCell.d.ts +0 -2
  208. package/types/instrument-picker/TablePicker.d.ts +0 -10
  209. package/types/instrument-picker/index.d.ts +0 -1
  210. package/types/instrument-picker/moving-window.d.ts +0 -14
  211. package/types/instrument-picker/useDataSource.d.ts +0 -6
  212. package/types/instrument-picker/useTablePicker.d.ts +0 -47
  213. package/types/list/ChevronIcon.d.ts +0 -7
  214. package/types/list/Highlighter.d.ts +0 -6
  215. package/types/list/List.d.ts +0 -6
  216. package/types/list/ListItem.d.ts +0 -6
  217. package/types/list/ListItemGroup.d.ts +0 -6
  218. package/types/list/ListItemHeader.d.ts +0 -5
  219. package/types/list/RadioIcon.d.ts +0 -4
  220. package/types/list/common-hooks/index.d.ts +0 -10
  221. package/types/list/common-hooks/keyUtils.d.ts +0 -14
  222. package/types/list/common-hooks/list-dom-utils.d.ts +0 -5
  223. package/types/list/common-hooks/useCollapsibleGroups.d.ts +0 -14
  224. package/types/list/common-hooks/useImperativeScrollingAPI.d.ts +0 -14
  225. package/types/list/common-hooks/useKeyboardNavigation.d.ts +0 -3
  226. package/types/list/common-hooks/useTypeahead.d.ts +0 -14
  227. package/types/list/common-hooks/useViewportTracking.d.ts +0 -14
  228. package/types/list/common-hooks/utils/collection-item-utils.d.ts +0 -21
  229. package/types/list/common-hooks/utils/filter-utils.d.ts +0 -4
  230. package/types/list/common-hooks/utils/index.d.ts +0 -4
  231. package/types/list/common-hooks/utils/isSelected.d.ts +0 -2
  232. package/types/list/index.d.ts +0 -9
  233. package/types/list/keyset.d.ts +0 -9
  234. package/types/list/listTypes.d.ts +0 -200
  235. package/types/list/useList.d.ts +0 -3
  236. package/types/list/useListDrop.d.ts +0 -15
  237. package/types/list/useListHeight.d.ts +0 -19
  238. package/types/list/useScrollPosition.d.ts +0 -19
  239. package/types/measured-container/MeasuredContainer.d.ts +0 -14
  240. package/types/measured-container/index.d.ts +0 -2
  241. package/types/measured-container/useMeasuredContainer.d.ts +0 -23
  242. package/types/measured-container/useResizeObserver.d.ts +0 -15
  243. package/types/overflow-container/OverflowContainer.d.ts +0 -15
  244. package/types/overflow-container/index.d.ts +0 -2
  245. package/types/overflow-container/overflow-utils.d.ts +0 -48
  246. package/types/overflow-container/useOverflowContainer.d.ts +0 -19
  247. package/types/price-ticker/PriceTicker.d.ts +0 -7
  248. package/types/price-ticker/index.d.ts +0 -1
  249. package/types/split-button/SplitButton.d.ts +0 -11
  250. package/types/split-button/SplitStateButton.d.ts +0 -5
  251. package/types/split-button/index.d.ts +0 -2
  252. package/types/split-button/useSplitButton.d.ts +0 -311
  253. package/types/table-search/SearchCell.d.ts +0 -2
  254. package/types/table-search/TableSearch.d.ts +0 -9
  255. package/types/table-search/index.d.ts +0 -1
  256. package/types/table-search/moving-window.d.ts +0 -14
  257. package/types/table-search/useTableSearch.d.ts +0 -15
  258. package/types/tabs-next/TabBar.d.ts +0 -12
  259. package/types/tabs-next/TabListNext.d.ts +0 -12
  260. package/types/tabs-next/TabNext.d.ts +0 -12
  261. package/types/tabs-next/TabNextAction.d.ts +0 -5
  262. package/types/tabs-next/TabNextContext.d.ts +0 -12
  263. package/types/tabs-next/TabNextPanel.d.ts +0 -8
  264. package/types/tabs-next/TabNextTrigger.d.ts +0 -5
  265. package/types/tabs-next/TabOverflowList.d.ts +0 -11
  266. package/types/tabs-next/TabsNext.d.ts +0 -17
  267. package/types/tabs-next/TabsNextContext.d.ts +0 -21
  268. package/types/tabs-next/hooks/useCollection.d.ts +0 -18
  269. package/types/tabs-next/hooks/useFocusOutside.d.ts +0 -2
  270. package/types/tabs-next/hooks/useOverflow.d.ts +0 -11
  271. package/types/tabs-next/index.d.ts +0 -7
  272. package/types/tabstrip/Tab.d.ts +0 -27
  273. package/types/tabstrip/TabMenu.d.ts +0 -23
  274. package/types/tabstrip/TabMenuOptions.d.ts +0 -10
  275. package/types/tabstrip/TabsTypes.d.ts +0 -127
  276. package/types/tabstrip/Tabstrip.d.ts +0 -2
  277. package/types/tabstrip/index.d.ts +0 -5
  278. package/types/tabstrip/tabstrip-dom-utils.d.ts +0 -2
  279. package/types/tabstrip/useAnimatedSelectionThumb.d.ts +0 -7
  280. package/types/tabstrip/useKeyboardNavigation.d.ts +0 -29
  281. package/types/tabstrip/useSelection.d.ts +0 -13
  282. package/types/tabstrip/useTabstrip.d.ts +0 -55
  283. package/types/toolbar/Toolbar.d.ts +0 -19
  284. package/types/toolbar/index.d.ts +0 -1
  285. package/types/toolbar/toolbar-dom-utils.d.ts +0 -3
  286. package/types/toolbar/useKeyboardNavigation.d.ts +0 -32
  287. package/types/toolbar/useSelection.d.ts +0 -22
  288. package/types/toolbar/useToolbar.d.ts +0 -28
  289. package/types/utils/deprecated-types.d.ts +0 -2
  290. package/types/utils/escapeRegExp.d.ts +0 -1
  291. package/types/utils/forwardCallbackProps.d.ts +0 -3
  292. package/types/utils/index.d.ts +0 -5
  293. package/types/utils/isOverflowElement.d.ts +0 -1
  294. package/types/utils/isPlainObject.d.ts +0 -1
  295. package/types/vuu-date-picker/VuuDatePicker.d.ts +0 -7
  296. package/types/vuu-date-picker/index.d.ts +0 -1
  297. package/types/vuu-input/VuuInput.d.ts +0 -17
  298. package/types/vuu-input/index.d.ts +0 -1
  299. package/types/vuu-typeahead-input/VuuTypeaheadInput.d.ts +0 -29
  300. package/types/vuu-typeahead-input/index.d.ts +0 -1
  301. package/types/vuu-typeahead-input/useVuuTypeaheadInput.d.ts +0 -15
@@ -1,200 +0,0 @@
1
- import React, { FocusEventHandler, ForwardedRef, HTMLAttributes, KeyboardEvent, KeyboardEventHandler, MouseEventHandler, PropsWithChildren, ReactElement, Ref, RefCallback, RefObject } from "react";
2
- import { ScrollingAPI, ViewportTrackingResult } from "./common-hooks";
3
- import { CollectionHookResult, ComponentSelectionProps, ListHandlers, NavigationHookResult, SelectionHookResult, SelectionStrategy } from "../common-hooks";
4
- import { DragHookResult, DragStartHandler, dragStrategy, DropHandler } from "../drag-drop";
5
- import { ViewportRange } from "./useScrollPosition";
6
- export type ComponentType<T = unknown> = (props: PropsWithChildren<T>) => ReactElement;
7
- export type ListItemType<T = unknown> = ComponentType<ListItemProps<T> & {
8
- ref?: Ref<HTMLDivElement>;
9
- }>;
10
- export type MoveItemHandler = (fromIndex: number, toIndex: number) => void;
11
- export interface ListItemProps<T = unknown> extends HTMLAttributes<HTMLDivElement> {
12
- children?: React.ReactNode;
13
- disabled?: boolean;
14
- item?: T;
15
- itemHeight?: number;
16
- itemTextHighlightPattern?: RegExp | string;
17
- label?: string;
18
- showCheckbox?: boolean;
19
- /**
20
- * selectable is a marker, used by List, not used by ListItem itself
21
- */
22
- selectable?: boolean;
23
- selected?: boolean;
24
- /**
25
- * Will apply transform: translate style. Used for virtualised rendering,
26
- * supplied by VirtualisedList.
27
- */
28
- translate3d?: number;
29
- }
30
- export interface ListScrollHandles<Item> {
31
- scrollToIndex: (itemIndex: number) => void;
32
- scrollToItem: (item: Item) => void;
33
- scrollTo: (scrollOffset: number) => void;
34
- }
35
- export interface ListProps<Item = string, S extends SelectionStrategy = "default"> extends ComponentSelectionProps<Item, S>, Omit<HTMLAttributes<HTMLDivElement>, "onDragStart" | "onDrop" | "onSelect" | "defaultValue"> {
36
- /**
37
- * The component used to render a ListItem instead of the default. This must itself render a ListItem,
38
- * must implement props that extend ListItemProps and must forward ListItem props to the ListItem.
39
- */
40
- ListItem?: ListItemType<Item>;
41
- /**
42
- * The component used when there are no items.
43
- */
44
- ListPlaceholder?: ComponentType<HTMLAttributes<unknown>>;
45
- /**
46
- * ListItems can be re-ordered by drag drop.
47
- */
48
- allowDragDrop?: boolean | dragStrategy;
49
- borderless?: boolean;
50
- /**
51
- * Adds checkbox to list. Defaults to true for multiselect strategy. Only supported for
52
- * multiple select strategies (multi selection and extended selection)
53
- */
54
- checkable?: boolean;
55
- className?: string;
56
- collapsibleHeaders?: boolean;
57
- defaultHighlightedIndex?: number;
58
- disabled?: boolean;
59
- disableFocus?: boolean;
60
- /**
61
- * Use to turn off typeahead search functionality within List. Defaulst to false;
62
- */
63
- disableTypeToSelect?: boolean;
64
- displayedItemCount?: number;
65
- emptyMessage?: string;
66
- focusVisible?: number;
67
- /**
68
- * Used for providing customized item height. It should return a number or a string if item height
69
- * is in percentage. .
70
- *
71
- * @param {number} index The item index.
72
- */
73
- getItemHeight?: (index: number) => number;
74
- /**
75
- * Used for providing customized item ids.
76
- * deprecated
77
- * @param {number} index The item index.
78
- */
79
- getItemId?: (index: number) => string;
80
- /**
81
- * Height of the component.
82
- */
83
- height?: number | string;
84
- highlightedIndex?: number;
85
- /**
86
- * The total number of items.
87
- *
88
- * Used for keyboard navigation (when `End` key is pressed) and when the list is virtualized.
89
- */
90
- itemCount?: number;
91
- /**
92
- * Size of the gap between list items. Defaults to zero.
93
- */
94
- itemGapSize?: number;
95
- /**
96
- * Height of an item. I can be a number or a string if item height is in percentage. If omitted
97
- * default height values from Salt theme will be used.
98
- *
99
- * Note that when using a percentage value, the list must have a height.
100
- */
101
- itemHeight?: number;
102
- /**
103
- * Used for providing text highlight.
104
- *
105
- * It can be a capturing regex or a string for a straightforward string matching.
106
- */
107
- itemTextHighlightPattern?: RegExp | string;
108
- /**
109
- * Item `toString` function when list is not used declaratively and its items are objects
110
- * instead of strings. The string value is also used in tooltip when item text is truncated.
111
- *
112
- * If omitted, component will look for a `label` property on the data object.
113
- *
114
- * @param {object} item The item.
115
- */
116
- itemToString?: (item: Item) => string;
117
- listHandlers?: ListHandlers;
118
- /**
119
- * Maximum list height.
120
- */
121
- maxHeight?: number | string;
122
- /**
123
- * Maximum list width.
124
- */
125
- maxWidth?: number | string;
126
- /**
127
- * Minimum list height.
128
- */
129
- minHeight?: number | string;
130
- /**
131
- * Minimum list width.
132
- */
133
- minWidth?: number | string;
134
- onDragStart?: DragStartHandler;
135
- /**
136
- * Handle item dropped onto list. Note, this will not be triggered if a list item is
137
- * dragged within its owning list - this will trigger the onMoveListItem callback.
138
- */
139
- onDrop?: DropHandler;
140
- onHighlight?: (index: number) => void;
141
- onMoveListItem?: MoveItemHandler;
142
- onViewportScroll?: (firstVisibleRowIndex: number, lastVisibleRowIndex: number) => void;
143
- /**
144
- * If `true`, the component will remember the last keyboard-interacted position
145
- * and highlight it when list is focused again.
146
- */
147
- restoreLastFocus?: boolean;
148
- scrollingApiRef?: ForwardedRef<ScrollingAPI<Item>>;
149
- showEmptyMessage?: boolean;
150
- source?: ReadonlyArray<Item>;
151
- stickyHeaders?: boolean;
152
- /**
153
- * When set to `true`, 'Tab' key selects current highlighted item before focus is blurred away
154
- * from the component. This would be the desirable behaviour for any dropdown menu based
155
- * components like dropdown, combobox.
156
- *
157
- * @default false
158
- */
159
- tabToSelect?: boolean;
160
- /**
161
- * Width of the component.
162
- */
163
- width?: number | string;
164
- }
165
- export interface ListControlProps {
166
- "aria-activedescendant"?: string;
167
- onBlur: FocusEventHandler;
168
- onFocus: FocusEventHandler;
169
- onKeyDown: KeyboardEventHandler;
170
- onMouseDown?: MouseEventHandler;
171
- onMouseDownCapture: MouseEventHandler;
172
- onMouseLeave: MouseEventHandler;
173
- }
174
- export interface ListHookProps<Item = string, S extends SelectionStrategy = "default"> extends Pick<ListProps<Item, S>, "allowDragDrop" | "collapsibleHeaders" | "disabled" | "id" | "onClick" | "onDragStart" | "onDrop" | "onHighlight" | "onMoveListItem" | "onSelect" | "onSelectionChange" | "restoreLastFocus" | "selectionKeys" | "selectionStrategy" | "stickyHeaders" | "tabToSelect"> {
175
- collectionHook: CollectionHookResult<Item>;
176
- contentRef?: RefObject<HTMLElement | null>;
177
- defaultHighlightedIndex?: number;
178
- defaultSelected?: string[];
179
- disableAriaActiveDescendant?: boolean;
180
- disableHighlightOnFocus?: boolean;
181
- disableTypeToSelect?: boolean;
182
- focusVisible?: boolean;
183
- highlightedIndex?: number;
184
- label?: string;
185
- listHandlers?: ListHandlers;
186
- onKeyboardNavigation?: (event: React.KeyboardEvent, currentIndex: number) => void;
187
- onKeyDown?: (evt: KeyboardEvent) => void;
188
- selected?: string[];
189
- viewportRange?: ViewportRange;
190
- }
191
- export interface ListHookResult<Item> extends Partial<ViewportTrackingResult<Item>>, Pick<SelectionHookResult, "selected" | "setSelected">, Partial<Omit<NavigationHookResult, "listProps">>, Omit<DragHookResult, "isDragging" | "isScrolling"> {
192
- containerRef: RefObject<HTMLDivElement | null>;
193
- setContainerRef: RefCallback<HTMLDivElement>;
194
- keyboardNavigation: RefObject<boolean>;
195
- listHandlers: ListHandlers;
196
- listItemHeaderHandlers: Partial<ListHandlers>;
197
- listControlProps: ListControlProps;
198
- setHighlightedIndex: (index: number) => void;
199
- setIgnoreFocus: (ignoreFocus: boolean) => void;
200
- }
@@ -1,3 +0,0 @@
1
- import { SelectionStrategy } from "../common-hooks";
2
- import { ListHookProps, ListHookResult } from "./listTypes";
3
- export declare const useList: <Item, S extends SelectionStrategy>({ allowDragDrop, collapsibleHeaders, collectionHook: dataHook, contentRef, defaultHighlightedIndex, defaultSelected, disabled, disableAriaActiveDescendant, disableHighlightOnFocus, disableTypeToSelect, highlightedIndex: highlightedIndexProp, id, label, listHandlers: listHandlersProp, onClick: onClickProp, onDragStart, onDrop, onHighlight, onKeyboardNavigation, onKeyDown, onMoveListItem, onSelect, onSelectionChange, restoreLastFocus, selected, selectionStrategy, selectionKeys, stickyHeaders, tabToSelect, viewportRange, }: ListHookProps<Item, S>) => ListHookResult<Item>;
@@ -1,15 +0,0 @@
1
- import { CollectionHookResult } from "../common-hooks";
2
- import { DropHandler } from "../drag-drop";
3
- import { MoveItemHandler } from "./listTypes";
4
- export interface ListDropProps<Item = string> {
5
- dataHook: CollectionHookResult<Item>;
6
- onDrop?: DropHandler;
7
- onMoveListItem?: MoveItemHandler;
8
- selected: string[];
9
- setHighlightedIndex: (idx: number) => void;
10
- setSelected: (selected: string[]) => void;
11
- }
12
- export declare const useListDrop: <Item>({ dataHook, onDrop, onMoveListItem, selected, setHighlightedIndex, setSelected, }: ListDropProps<Item>) => {
13
- handleDrop: DropHandler;
14
- onDropSettle: (toIndex: number) => void;
15
- };
@@ -1,19 +0,0 @@
1
- import { RefCallback } from "react";
2
- import { MeasuredSize } from "../measured-container";
3
- export interface ListHeightHookProps {
4
- displayedItemCount: number;
5
- getItemHeight?: (index: number) => number;
6
- height?: number | string;
7
- itemCount: number;
8
- itemGapSize: number;
9
- itemHeight?: number;
10
- size: MeasuredSize | undefined;
11
- }
12
- export interface HeightHookResult {
13
- computedListHeight: number | undefined;
14
- contentHeight: number;
15
- listClientHeight?: number;
16
- listItemHeight: number;
17
- rowHeightProxyRef: RefCallback<HTMLDivElement>;
18
- }
19
- export declare const useListHeight: ({ displayedItemCount, getItemHeight, height, itemCount, itemGapSize, itemHeight: itemHeightProp, size, }: ListHeightHookProps) => HeightHookResult;
@@ -1,19 +0,0 @@
1
- import { UIEvent } from "react";
2
- export type ViewportRange = {
3
- atEnd: boolean;
4
- atStart: boolean;
5
- from: number;
6
- to: number;
7
- };
8
- interface ScrollPositionHookProps {
9
- containerSize: number;
10
- itemCount: number;
11
- itemGapSize?: number;
12
- itemSize: number;
13
- onViewportScroll?: (firstVisibleItemIndex: number, lastVisibleitemIndex: number) => void;
14
- }
15
- export declare const useScrollPosition: ({ containerSize: listHeight, itemCount: listItemCount, itemGapSize: listItemGapSize, itemSize: listItemHeight, onViewportScroll, }: ScrollPositionHookProps) => {
16
- onVerticalScroll: (e: UIEvent<HTMLElement>) => void;
17
- viewportRange: ViewportRange;
18
- };
19
- export {};
@@ -1,14 +0,0 @@
1
- import { HTMLAttributes } from "react";
2
- import { MeasuredSize } from "./useMeasuredContainer";
3
- export interface MeasuredContainerProps extends Omit<HTMLAttributes<HTMLDivElement>, "onResize"> {
4
- /**
5
- * A numeric value for height will result in a fixed height. To adapt to container
6
- * use either a percentage height or 'auto'. Always use 'auto' when rendering
7
- * within a column based flex container, together with a flex value (use the
8
- * --vuuMeasuredContainer-flex CSS custom property))
9
- */
10
- height?: number | string;
11
- onResize?: (size: MeasuredSize) => void;
12
- width?: number | string;
13
- }
14
- export declare const MeasuredContainer: import("react").ForwardRefExoticComponent<MeasuredContainerProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,2 +0,0 @@
1
- export * from "./MeasuredContainer";
2
- export * from "./useMeasuredContainer";
@@ -1,23 +0,0 @@
1
- import { CSSProperties, RefObject } from "react";
2
- import { MeasuredContainerProps } from "./MeasuredContainer";
3
- export interface ClientSize {
4
- clientHeight: number;
5
- clientWidth: number;
6
- }
7
- export interface MeasuredProps extends Pick<MeasuredContainerProps, "height" | "onResize" | "width"> {
8
- defaultHeight?: number;
9
- defaultWidth?: number;
10
- }
11
- export type CssSize = Pick<CSSProperties, "height" | "width">;
12
- export interface MeasuredSize {
13
- height: number;
14
- width: number;
15
- }
16
- export interface MeasuredContainerHookResult {
17
- containerRef: RefObject<HTMLDivElement | null>;
18
- cssSize: CssSize;
19
- outerSize: CssSize;
20
- innerSize?: MeasuredSize;
21
- }
22
- export declare const reduceSizeHeight: (size: MeasuredSize, value: number) => MeasuredSize;
23
- export declare const useMeasuredContainer: ({ defaultHeight, defaultWidth, height, onResize: onResizeProp, width, }: MeasuredProps) => MeasuredContainerHookResult;
@@ -1,15 +0,0 @@
1
- import { RefObject } from "react";
2
- export declare const WidthHeight: string[];
3
- export declare const WidthOnly: string[];
4
- export type measurements<T = string | number> = {
5
- height?: T;
6
- clientHeight?: number;
7
- clientWidth?: number;
8
- contentHeight?: number;
9
- contentWidth?: number;
10
- scrollHeight?: number;
11
- scrollWidth?: number;
12
- width?: T;
13
- };
14
- export type ResizeHandler = (measurements: measurements<number>) => void;
15
- export declare function useResizeObserver(ref: RefObject<Element | HTMLElement | null>, dimensions: readonly string[], onResize: ResizeHandler, reportInitialSize?: boolean): void;
@@ -1,15 +0,0 @@
1
- import { PopupMenuProps } from "@vuu-ui/vuu-popups";
2
- import { orientationType } from "@vuu-ui/vuu-utils";
3
- import React, { HTMLAttributes } from "react";
4
- import { OverflowItem } from "./overflow-utils";
5
- export interface OverflowContainerProps extends HTMLAttributes<HTMLDivElement> {
6
- PopupMenuProps?: Partial<PopupMenuProps>;
7
- allowDragDrop?: boolean;
8
- debugId?: string;
9
- onMoveItem?: (fromIndex: number, toIndex: number) => void;
10
- onSwitchWrappedItemIntoView?: (overflowItem: OverflowItem) => void;
11
- orientation?: orientationType;
12
- overflowIcon?: string;
13
- overflowPosition?: "start" | "end" | number;
14
- }
15
- export declare const OverflowContainer: React.ForwardRefExoticComponent<OverflowContainerProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,2 +0,0 @@
1
- export * from "./OverflowContainer";
2
- export * from "./overflow-utils";
@@ -1,48 +0,0 @@
1
- import { orientationType } from "@vuu-ui/vuu-utils";
2
- export type OverflowItem = {
3
- index: string;
4
- label: string;
5
- overflowPriority: string;
6
- };
7
- export declare const sortByScreenOrder: (elements: HTMLElement[]) => HTMLElement[];
8
- export declare const NO_WRAPPED_ITEMS: OverflowItem[];
9
- /**
10
- Identify wrapped items by comparing position of each item. Any item
11
- not to the right of preceeding item has wrapped. Note: on-screen
12
- position of items does not necessarily match document position, due
13
- to use of css order. This is taken into account by sorting.
14
- TODO support Vertical orientation
15
- */
16
- export declare const getNonWrappedAndWrappedItems: (container: HTMLElement, orientation: orientationType) => [OverflowItem[], OverflowItem[]];
17
- export declare const applyOverflowClassToWrappedItems: (container: HTMLElement, overflowedItems: OverflowItem[], classBase?: string) => void;
18
- export declare const overflowIndicatorHasWrappedButShouldNotHave: (wrappedItems: OverflowItem[]) => boolean;
19
- export declare const highPriorityItemsHaveWrappedButShouldNotHave: (nonWrappedItems: OverflowItem[], wrappedItems: OverflowItem[]) => boolean;
20
- /**
21
- An edge case that may occur when reducing width from unwrapped to
22
- wrapped, or on first render.
23
- We overflow one or more items. Then, when the overflowIndicator assumes
24
- full width, it may itself overflow.
25
- */
26
- export declare const correctForWrappedOverflowIndicator: (container: HTMLElement, overflowedItems: OverflowItem[], orientation: orientationType) => Promise<OverflowItem[]>;
27
- /**
28
- An edge case that may occur when reducing width from unwrapped to
29
- wrapped, or on first render.
30
- We overflow one or more items. Then, when the overflowIndicator assumes
31
- full width, it may itself overflow.
32
- */
33
- export declare const correctForWrappedHighPriorityItems: (container: HTMLElement, nonWrapped: OverflowItem[], wrapped: OverflowItem[], orientation: orientationType) => Promise<[OverflowItem[], OverflowItem[]]>;
34
- export declare const markElementAsWrapped: (container: HTMLElement, item: OverflowItem) => void;
35
- export declare const getElementsMarkedAsWrapped: (container: HTMLElement) => HTMLElement[];
36
- export declare const unmarkItemsWhichAreNoLongerWrapped: (container: HTMLElement, wrappedItems: OverflowItem[]) => void;
37
- /**
38
- An edge case. If container has grown but we still have one
39
- wrapped item - could the wrapped item return to the fold if the overflow
40
- indicaor were removed ?
41
- */
42
- export declare const removeOverflowIndicatorIfNoLongerNeeded: (container: HTMLElement, orientation: orientationType) => boolean;
43
- /**
44
- * This is used both when an overflow menu is used to select an overflowed item
45
- * and when a high priority item has overflowed, whilst lower priority items
46
- * remain in view.
47
- */
48
- export declare const switchWrappedItemIntoView: (container: HTMLElement, overflowItem: OverflowItem, orientation: orientationType) => [OverflowItem[], OverflowItem[]];
@@ -1,19 +0,0 @@
1
- import { OverflowItem } from "./overflow-utils";
2
- import { OverflowContainerProps } from "./OverflowContainer";
3
- import { MenuActionHandler, MenuBuilder } from "@vuu-ui/vuu-context-menu";
4
- export interface OverflowContainerHookProps extends Pick<OverflowContainerProps, "allowDragDrop" | "onMoveItem">, Required<Pick<OverflowContainerProps, "orientation">> {
5
- itemCount: number;
6
- onSwitchWrappedItemIntoView?: (overflowItem: OverflowItem) => void;
7
- }
8
- export declare const useOverflowContainer: ({ allowDragDrop, itemCount, onMoveItem, onSwitchWrappedItemIntoView, orientation, }: OverflowContainerHookProps) => {
9
- draggable?: import("react").ReactElement;
10
- dropIndicator?: import("react").ReactElement;
11
- draggedItemIndex?: number;
12
- isDragging: boolean;
13
- isScrolling: import("react").RefObject<boolean>;
14
- revealOverflowedItems?: boolean;
15
- menuActionHandler: MenuActionHandler;
16
- menuBuilder: MenuBuilder;
17
- onItemMouseDown: import("react").MouseEventHandler | undefined;
18
- rootRef: (el: HTMLDivElement | null) => void;
19
- };
@@ -1,7 +0,0 @@
1
- import { HTMLAttributes } from "react";
2
- export interface PriceTickerProps extends HTMLAttributes<HTMLDivElement> {
3
- decimals?: number;
4
- price?: number;
5
- showArrow?: boolean;
6
- }
7
- export declare const PriceTicker: import("react").MemoExoticComponent<({ className, decimals, price, showArrow, ...htmlAttributes }: PriceTickerProps) => import("react/jsx-runtime").JSX.Element>;
@@ -1 +0,0 @@
1
- export * from "./PriceTicker";
@@ -1,11 +0,0 @@
1
- import { PopupMenuProps } from "@vuu-ui/vuu-popups";
2
- import { ButtonProps } from "@salt-ds/core";
3
- import { HTMLAttributes } from "react";
4
- export interface SplitButtonProps extends Omit<HTMLAttributes<HTMLDivElement>, "onClick">, Pick<ButtonProps, "onClick"> {
5
- ButtonProps?: Partial<Omit<ButtonProps, "onClick" | "variant">>;
6
- PopupMenuProps?: Partial<PopupMenuProps>;
7
- disabled?: boolean;
8
- segmented?: boolean;
9
- variant?: ButtonProps["variant"];
10
- }
11
- export declare const SplitButton: import("react").ForwardRefExoticComponent<SplitButtonProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,5 +0,0 @@
1
- import { SplitButtonProps } from "./SplitButton";
2
- export interface SplitStateButtonProps extends SplitButtonProps {
3
- selected: boolean;
4
- }
5
- export declare const SplitStateButton: import("react").ForwardRefExoticComponent<SplitStateButtonProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,2 +0,0 @@
1
- export * from "./SplitButton";
2
- export * from "./SplitStateButton";