@vuu-ui/vuu-data-react 0.13.47 → 0.13.49

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 (249) hide show
  1. package/package.json +15 -15
  2. package/types/{vuu-data-react/src/hooks → hooks}/useConnectionStatus.d.ts +1 -1
  3. package/types/vuu-context-menu/src/ContextMenu.d.ts +0 -10
  4. package/types/vuu-context-menu/src/ContextMenuProvider.d.ts +0 -16
  5. package/types/vuu-context-menu/src/index.d.ts +0 -3
  6. package/types/vuu-context-menu/src/menu-utils.d.ts +0 -21
  7. package/types/vuu-context-menu/src/useContextMenu.d.ts +0 -10
  8. package/types/vuu-popups/src/index.d.ts +0 -5
  9. package/types/vuu-popups/src/notifications/NotificationsCenter.d.ts +0 -5
  10. package/types/vuu-popups/src/notifications/NotificationsContext.d.ts +0 -36
  11. package/types/vuu-popups/src/notifications/NotificationsProvider.d.ts +0 -9
  12. package/types/vuu-popups/src/notifications/ToastNotification.d.ts +0 -7
  13. package/types/vuu-popups/src/notifications/WorkspaceNotification.d.ts +0 -5
  14. package/types/vuu-popups/src/notifications/index.d.ts +0 -3
  15. package/types/vuu-popups/src/popup/Popup.d.ts +0 -12
  16. package/types/vuu-popups/src/popup/getPositionRelativeToAnchor.d.ts +0 -19
  17. package/types/vuu-popups/src/popup/index.d.ts +0 -2
  18. package/types/vuu-popups/src/popup/useAnchoredPosition.d.ts +0 -7
  19. package/types/vuu-popups/src/popup-menu/PopupMenu.d.ts +0 -45
  20. package/types/vuu-popups/src/popup-menu/index.d.ts +0 -1
  21. package/types/vuu-popups/src/popup-menu/usePopupMenu.d.ts +0 -19
  22. package/types/vuu-popups/src/portal/Portal.d.ts +0 -42
  23. package/types/vuu-popups/src/portal/index.d.ts +0 -1
  24. package/types/vuu-popups/src/tooltip/Tooltip.d.ts +0 -15
  25. package/types/vuu-popups/src/tooltip/index.d.ts +0 -2
  26. package/types/vuu-popups/src/tooltip/useTooltip.d.ts +0 -19
  27. package/types/vuu-popups/src/tooltip/useTooltipAnchoredPosition.d.ts +0 -7
  28. package/types/vuu-ui-controls/src/calendar/Calendar.d.ts +0 -13
  29. package/types/vuu-ui-controls/src/calendar/index.d.ts +0 -4
  30. package/types/vuu-ui-controls/src/calendar/internal/CalendarCarousel.d.ts +0 -3
  31. package/types/vuu-ui-controls/src/calendar/internal/CalendarContext.d.ts +0 -8
  32. package/types/vuu-ui-controls/src/calendar/internal/CalendarDay.d.ts +0 -14
  33. package/types/vuu-ui-controls/src/calendar/internal/CalendarMonth.d.ts +0 -10
  34. package/types/vuu-ui-controls/src/calendar/internal/CalendarNavigation.d.ts +0 -16
  35. package/types/vuu-ui-controls/src/calendar/internal/CalendarWeekHeader.d.ts +0 -3
  36. package/types/vuu-ui-controls/src/calendar/internal/useFocusManagement.d.ts +0 -9
  37. package/types/vuu-ui-controls/src/calendar/internal/utils.d.ts +0 -15
  38. package/types/vuu-ui-controls/src/calendar/useCalendar.d.ts +0 -54
  39. package/types/vuu-ui-controls/src/calendar/useCalendarDay.d.ts +0 -22
  40. package/types/vuu-ui-controls/src/calendar/useSelection.d.ts +0 -78
  41. package/types/vuu-ui-controls/src/column-picker/ColumnPicker.d.ts +0 -7
  42. package/types/vuu-ui-controls/src/column-picker/ColumnSearch.d.ts +0 -12
  43. package/types/vuu-ui-controls/src/column-picker/index.d.ts +0 -2
  44. package/types/vuu-ui-controls/src/common-hooks/index.d.ts +0 -3
  45. package/types/vuu-ui-controls/src/common-hooks/selectionTypes.d.ts +0 -70
  46. package/types/vuu-ui-controls/src/common-hooks/use-resize-observer.d.ts +0 -16
  47. package/types/vuu-ui-controls/src/common-hooks/useControlled.d.ts +0 -24
  48. package/types/vuu-ui-controls/src/context-panel-provider/ContextPanelProvider.d.ts +0 -17
  49. package/types/vuu-ui-controls/src/cycle-state-button/CycleStateButton.d.ts +0 -11
  50. package/types/vuu-ui-controls/src/cycle-state-button/index.d.ts +0 -1
  51. package/types/vuu-ui-controls/src/date-input/DateInput.d.ts +0 -60
  52. package/types/vuu-ui-controls/src/date-input/index.d.ts +0 -1
  53. package/types/vuu-ui-controls/src/date-picker/DatePicker.d.ts +0 -66
  54. package/types/vuu-ui-controls/src/date-picker/DatePickerContext.d.ts +0 -19
  55. package/types/vuu-ui-controls/src/date-picker/DatePickerPanel.d.ts +0 -10
  56. package/types/vuu-ui-controls/src/date-picker/index.d.ts +0 -1
  57. package/types/vuu-ui-controls/src/drag-drop/DragDropProvider.d.ts +0 -38
  58. package/types/vuu-ui-controls/src/drag-drop/DragDropState.d.ts +0 -15
  59. package/types/vuu-ui-controls/src/drag-drop/Draggable.d.ts +0 -13
  60. package/types/vuu-ui-controls/src/drag-drop/dragDropTypes.d.ts +0 -100
  61. package/types/vuu-ui-controls/src/drag-drop/drop-target-utils.d.ts +0 -82
  62. package/types/vuu-ui-controls/src/drag-drop/index.d.ts +0 -6
  63. package/types/vuu-ui-controls/src/drag-drop/useAutoScroll.d.ts +0 -11
  64. package/types/vuu-ui-controls/src/drag-drop/useDragDisplacers.d.ts +0 -17
  65. package/types/vuu-ui-controls/src/drag-drop/useDragDrop.d.ts +0 -2
  66. package/types/vuu-ui-controls/src/drag-drop/useDragDropCopy.d.ts +0 -6
  67. package/types/vuu-ui-controls/src/drag-drop/useDragDropIndicator.d.ts +0 -2
  68. package/types/vuu-ui-controls/src/drag-drop/useDragDropNaturalMovement.d.ts +0 -2
  69. package/types/vuu-ui-controls/src/drag-drop/useDropIndicator.d.ts +0 -8
  70. package/types/vuu-ui-controls/src/drag-drop/useGlobalDragDrop.d.ts +0 -11
  71. package/types/vuu-ui-controls/src/editable/index.d.ts +0 -1
  72. package/types/vuu-ui-controls/src/editable/useEditableText.d.ts +0 -19
  73. package/types/vuu-ui-controls/src/editable-label/EditableLabel.d.ts +0 -19
  74. package/types/vuu-ui-controls/src/editable-label/index.d.ts +0 -1
  75. package/types/vuu-ui-controls/src/expando-input/ExpandoInput.d.ts +0 -6
  76. package/types/vuu-ui-controls/src/expando-input/index.d.ts +0 -1
  77. package/types/vuu-ui-controls/src/icon-button/Icon.d.ts +0 -6
  78. package/types/vuu-ui-controls/src/icon-button/IconButton.d.ts +0 -6
  79. package/types/vuu-ui-controls/src/icon-button/ToggleIconButton.d.ts +0 -5
  80. package/types/vuu-ui-controls/src/icon-button/index.d.ts +0 -3
  81. package/types/vuu-ui-controls/src/index.d.ts +0 -30
  82. package/types/vuu-ui-controls/src/instrument-picker/TablePicker.d.ts +0 -10
  83. package/types/vuu-ui-controls/src/instrument-picker/index.d.ts +0 -1
  84. package/types/vuu-ui-controls/src/instrument-picker/useTablePicker.d.ts +0 -47
  85. package/types/vuu-ui-controls/src/measured-container/MeasuredContainer.d.ts +0 -14
  86. package/types/vuu-ui-controls/src/measured-container/index.d.ts +0 -2
  87. package/types/vuu-ui-controls/src/measured-container/useMeasuredContainer.d.ts +0 -23
  88. package/types/vuu-ui-controls/src/measured-container/useResizeObserver.d.ts +0 -15
  89. package/types/vuu-ui-controls/src/modal-provider/ModalProvider.d.ts +0 -13
  90. package/types/vuu-ui-controls/src/overflow-container/OverflowContainer.d.ts +0 -15
  91. package/types/vuu-ui-controls/src/overflow-container/index.d.ts +0 -2
  92. package/types/vuu-ui-controls/src/overflow-container/overflow-utils.d.ts +0 -48
  93. package/types/vuu-ui-controls/src/overflow-container/useOverflowContainer.d.ts +0 -19
  94. package/types/vuu-ui-controls/src/price-ticker/PriceTicker.d.ts +0 -7
  95. package/types/vuu-ui-controls/src/price-ticker/index.d.ts +0 -1
  96. package/types/vuu-ui-controls/src/prompt/Prompt.d.ts +0 -48
  97. package/types/vuu-ui-controls/src/sortable-list/SortableList.d.ts +0 -8
  98. package/types/vuu-ui-controls/src/split-button/SplitButton.d.ts +0 -11
  99. package/types/vuu-ui-controls/src/split-button/SplitStateButton.d.ts +0 -5
  100. package/types/vuu-ui-controls/src/split-button/index.d.ts +0 -2
  101. package/types/vuu-ui-controls/src/split-button/useSplitButton.d.ts +0 -311
  102. package/types/vuu-ui-controls/src/table-search/SearchCell.d.ts +0 -2
  103. package/types/vuu-ui-controls/src/table-search/TableSearch.d.ts +0 -9
  104. package/types/vuu-ui-controls/src/table-search/index.d.ts +0 -1
  105. package/types/vuu-ui-controls/src/table-search/useTableSearch.d.ts +0 -15
  106. package/types/vuu-ui-controls/src/tabs-next/TabBar.d.ts +0 -12
  107. package/types/vuu-ui-controls/src/tabs-next/TabListNext.d.ts +0 -12
  108. package/types/vuu-ui-controls/src/tabs-next/TabNext.d.ts +0 -12
  109. package/types/vuu-ui-controls/src/tabs-next/TabNextAction.d.ts +0 -5
  110. package/types/vuu-ui-controls/src/tabs-next/TabNextContext.d.ts +0 -12
  111. package/types/vuu-ui-controls/src/tabs-next/TabNextPanel.d.ts +0 -8
  112. package/types/vuu-ui-controls/src/tabs-next/TabNextTrigger.d.ts +0 -5
  113. package/types/vuu-ui-controls/src/tabs-next/TabOverflowList.d.ts +0 -11
  114. package/types/vuu-ui-controls/src/tabs-next/TabsNext.d.ts +0 -17
  115. package/types/vuu-ui-controls/src/tabs-next/TabsNextContext.d.ts +0 -21
  116. package/types/vuu-ui-controls/src/tabs-next/hooks/useCollection.d.ts +0 -18
  117. package/types/vuu-ui-controls/src/tabs-next/hooks/useFocusOutside.d.ts +0 -2
  118. package/types/vuu-ui-controls/src/tabs-next/hooks/useOverflow.d.ts +0 -11
  119. package/types/vuu-ui-controls/src/tabs-next/index.d.ts +0 -7
  120. package/types/vuu-ui-controls/src/tabstrip/Tab.d.ts +0 -27
  121. package/types/vuu-ui-controls/src/tabstrip/TabMenu.d.ts +0 -23
  122. package/types/vuu-ui-controls/src/tabstrip/TabMenuOptions.d.ts +0 -10
  123. package/types/vuu-ui-controls/src/tabstrip/TabsTypes.d.ts +0 -127
  124. package/types/vuu-ui-controls/src/tabstrip/Tabstrip.d.ts +0 -2
  125. package/types/vuu-ui-controls/src/tabstrip/index.d.ts +0 -5
  126. package/types/vuu-ui-controls/src/tabstrip/tabstrip-dom-utils.d.ts +0 -2
  127. package/types/vuu-ui-controls/src/tabstrip/useAnimatedSelectionThumb.d.ts +0 -7
  128. package/types/vuu-ui-controls/src/tabstrip/useKeyboardNavigation.d.ts +0 -29
  129. package/types/vuu-ui-controls/src/tabstrip/useSelection.d.ts +0 -13
  130. package/types/vuu-ui-controls/src/tabstrip/useTabstrip.d.ts +0 -55
  131. package/types/vuu-ui-controls/src/time-input/MaskedInput.d.ts +0 -49
  132. package/types/vuu-ui-controls/src/time-input/TimeInput.d.ts +0 -5
  133. package/types/vuu-ui-controls/src/time-input/useTimeInput.d.ts +0 -21
  134. package/types/vuu-ui-controls/src/toolbar/Toolbar.d.ts +0 -19
  135. package/types/vuu-ui-controls/src/toolbar/index.d.ts +0 -1
  136. package/types/vuu-ui-controls/src/toolbar/toolbar-dom-utils.d.ts +0 -3
  137. package/types/vuu-ui-controls/src/toolbar/useKeyboardNavigation.d.ts +0 -32
  138. package/types/vuu-ui-controls/src/toolbar/useSelection.d.ts +0 -22
  139. package/types/vuu-ui-controls/src/toolbar/useToolbar.d.ts +0 -28
  140. package/types/vuu-ui-controls/src/utils/deprecated-types.d.ts +0 -2
  141. package/types/vuu-ui-controls/src/utils/escapeRegExp.d.ts +0 -1
  142. package/types/vuu-ui-controls/src/utils/forwardCallbackProps.d.ts +0 -3
  143. package/types/vuu-ui-controls/src/utils/index.d.ts +0 -5
  144. package/types/vuu-ui-controls/src/utils/isOverflowElement.d.ts +0 -1
  145. package/types/vuu-ui-controls/src/utils/isPlainObject.d.ts +0 -1
  146. package/types/vuu-ui-controls/src/vuu-date-picker/VuuDatePicker.d.ts +0 -7
  147. package/types/vuu-ui-controls/src/vuu-date-picker/index.d.ts +0 -1
  148. package/types/vuu-ui-controls/src/vuu-input/VuuInput.d.ts +0 -18
  149. package/types/vuu-ui-controls/src/vuu-input/index.d.ts +0 -1
  150. package/types/vuu-ui-controls/src/vuu-time-picker/VuuTimePicker.d.ts +0 -7
  151. package/types/vuu-ui-controls/src/vuu-typeahead-input/VuuTypeaheadInput.d.ts +0 -6
  152. package/types/vuu-ui-controls/src/vuu-typeahead-input/index.d.ts +0 -1
  153. package/types/vuu-ui-controls/src/vuu-typeahead-input/useVuuTypeaheadInput.d.ts +0 -49
  154. package/types/vuu-utils/src/Clock.d.ts +0 -20
  155. package/types/vuu-utils/src/DataWindow.d.ts +0 -39
  156. package/types/vuu-utils/src/ShellContext.d.ts +0 -11
  157. package/types/vuu-utils/src/ThemeProvider.d.ts +0 -32
  158. package/types/vuu-utils/src/array-utils.d.ts +0 -8
  159. package/types/vuu-utils/src/box-utils.d.ts +0 -24
  160. package/types/vuu-utils/src/broadcast-channel.d.ts +0 -16
  161. package/types/vuu-utils/src/column-utils.d.ts +0 -181
  162. package/types/vuu-utils/src/common-types.d.ts +0 -6
  163. package/types/vuu-utils/src/component-registry.d.ts +0 -65
  164. package/types/vuu-utils/src/context-definitions/DataContext.d.ts +0 -18
  165. package/types/vuu-utils/src/context-definitions/DataProvider.d.ts +0 -7
  166. package/types/vuu-utils/src/context-definitions/DataSourceProvider.d.ts +0 -12
  167. package/types/vuu-utils/src/context-definitions/WorkspaceContext.d.ts +0 -17
  168. package/types/vuu-utils/src/cookie-utils.d.ts +0 -1
  169. package/types/vuu-utils/src/css-utils.d.ts +0 -1
  170. package/types/vuu-utils/src/data-utils.d.ts +0 -19
  171. package/types/vuu-utils/src/datasource/BaseDataSource.d.ts +0 -60
  172. package/types/vuu-utils/src/datasource/datasource-action-utils.d.ts +0 -7
  173. package/types/vuu-utils/src/datasource/datasource-filter-utils.d.ts +0 -2
  174. package/types/vuu-utils/src/datasource/datasource-utils.d.ts +0 -49
  175. package/types/vuu-utils/src/date/date-utils.d.ts +0 -36
  176. package/types/vuu-utils/src/date/dateTimePattern.d.ts +0 -8
  177. package/types/vuu-utils/src/date/formatter.d.ts +0 -4
  178. package/types/vuu-utils/src/date/index.d.ts +0 -4
  179. package/types/vuu-utils/src/date/types.d.ts +0 -24
  180. package/types/vuu-utils/src/debug-utils.d.ts +0 -9
  181. package/types/vuu-utils/src/event-emitter.d.ts +0 -21
  182. package/types/vuu-utils/src/feature-utils.d.ts +0 -110
  183. package/types/vuu-utils/src/filters/filter-utils.d.ts +0 -82
  184. package/types/vuu-utils/src/filters/filterAsQuery.d.ts +0 -7
  185. package/types/vuu-utils/src/filters/index.d.ts +0 -2
  186. package/types/vuu-utils/src/form-utils.d.ts +0 -23
  187. package/types/vuu-utils/src/formatting-utils.d.ts +0 -14
  188. package/types/vuu-utils/src/getUniqueId.d.ts +0 -1
  189. package/types/vuu-utils/src/group-utils.d.ts +0 -10
  190. package/types/vuu-utils/src/html-utils.d.ts +0 -21
  191. package/types/vuu-utils/src/index.d.ts +0 -73
  192. package/types/vuu-utils/src/input-utils.d.ts +0 -2
  193. package/types/vuu-utils/src/invariant.d.ts +0 -1
  194. package/types/vuu-utils/src/itemToString.d.ts +0 -2
  195. package/types/vuu-utils/src/json-types.d.ts +0 -52
  196. package/types/vuu-utils/src/json-utils.d.ts +0 -6
  197. package/types/vuu-utils/src/keyboard-utils.d.ts +0 -15
  198. package/types/vuu-utils/src/keyset.d.ts +0 -16
  199. package/types/vuu-utils/src/layout-types.d.ts +0 -22
  200. package/types/vuu-utils/src/list-utils.d.ts +0 -2
  201. package/types/vuu-utils/src/local-storage-utils.d.ts +0 -3
  202. package/types/vuu-utils/src/logging-utils.d.ts +0 -45
  203. package/types/vuu-utils/src/module-utils.d.ts +0 -8
  204. package/types/vuu-utils/src/moving-window.d.ts +0 -18
  205. package/types/vuu-utils/src/nanoid/index.d.ts +0 -1
  206. package/types/vuu-utils/src/perf-utils.d.ts +0 -5
  207. package/types/vuu-utils/src/promise-utils.d.ts +0 -8
  208. package/types/vuu-utils/src/protocol-message-utils.d.ts +0 -34
  209. package/types/vuu-utils/src/range-utils.d.ts +0 -31
  210. package/types/vuu-utils/src/react-utils.d.ts +0 -8
  211. package/types/vuu-utils/src/round-decimal.d.ts +0 -1
  212. package/types/vuu-utils/src/row-utils.d.ts +0 -27
  213. package/types/vuu-utils/src/selection-utils.d.ts +0 -4
  214. package/types/vuu-utils/src/shell-layout-types.d.ts +0 -15
  215. package/types/vuu-utils/src/sort-utils.d.ts +0 -11
  216. package/types/vuu-utils/src/table-schema-utils.d.ts +0 -3
  217. package/types/vuu-utils/src/text-utils.d.ts +0 -2
  218. package/types/vuu-utils/src/tree-types.d.ts +0 -9
  219. package/types/vuu-utils/src/tree-utils.d.ts +0 -9
  220. package/types/vuu-utils/src/ts-utils.d.ts +0 -20
  221. package/types/vuu-utils/src/typeahead-utils.d.ts +0 -1
  222. package/types/vuu-utils/src/url-utils.d.ts +0 -2
  223. package/types/vuu-utils/src/useId.d.ts +0 -1
  224. package/types/vuu-utils/src/useLayoutEffectSkipFirst.d.ts +0 -2
  225. package/types/vuu-utils/src/useStateRef.d.ts +0 -2
  226. package/types/vuu-utils/src/user-types.d.ts +0 -4
  227. /package/types/{vuu-data-react/src/data-editing → data-editing}/EditForm.d.ts +0 -0
  228. /package/types/{vuu-data-react/src/data-editing → data-editing}/UnsavedChangesReport.d.ts +0 -0
  229. /package/types/{vuu-data-react/src/data-editing → data-editing}/edit-rule-validation-checker.d.ts +0 -0
  230. /package/types/{vuu-data-react/src/data-editing → data-editing}/edit-validation-rules.d.ts +0 -0
  231. /package/types/{vuu-data-react/src/data-editing → data-editing}/form-edit-state.d.ts +0 -0
  232. /package/types/{vuu-data-react/src/data-editing → data-editing}/get-data-item-edit-control.d.ts +0 -0
  233. /package/types/{vuu-data-react/src/data-editing → data-editing}/index.d.ts +0 -0
  234. /package/types/{vuu-data-react/src/data-editing → data-editing}/useEditForm.d.ts +0 -0
  235. /package/types/{vuu-data-react/src/datasource-provider → datasource-provider}/VuuDataSourceProvider.d.ts +0 -0
  236. /package/types/{vuu-data-react/src/datasource-provider → datasource-provider}/index.d.ts +0 -0
  237. /package/types/{vuu-data-react/src/datasource-provider → datasource-provider}/useAutoLoginToVuuServer.d.ts +0 -0
  238. /package/types/{vuu-data-react/src/hooks → hooks}/index.d.ts +0 -0
  239. /package/types/{vuu-data-react/src/hooks → hooks}/useLookupValues.d.ts +0 -0
  240. /package/types/{vuu-data-react/src/hooks → hooks}/useRemoteConnection.d.ts +0 -0
  241. /package/types/{vuu-data-react/src/hooks → hooks}/useSessionDataSource.d.ts +0 -0
  242. /package/types/{vuu-data-react/src/hooks → hooks}/useTypeaheadSuggestions.d.ts +0 -0
  243. /package/types/{vuu-data-react/src/hooks → hooks}/useVisualLinks.d.ts +0 -0
  244. /package/types/{vuu-data-react/src/hooks → hooks}/useVuuMenuActions.d.ts +0 -0
  245. /package/types/{vuu-data-react/src/hooks → hooks}/useVuuTables.d.ts +0 -0
  246. /package/types/{vuu-data-react/src/index.d.ts → index.d.ts} +0 -0
  247. /package/types/{vuu-data-react/src/lost-connection-indicator → lost-connection-indicator}/LostConnectionIndicator.d.ts +0 -0
  248. /package/types/{vuu-data-react/src/session-editing-form → session-editing-form}/SessionEditingForm.d.ts +0 -0
  249. /package/types/{vuu-data-react/src/session-editing-form → session-editing-form}/index.d.ts +0 -0
@@ -1,78 +0,0 @@
1
- import { CalendarDate, type DateValue } from "@internationalized/date";
2
- import type { KeyboardEventHandler, MouseEventHandler, SyntheticEvent } from "react";
3
- interface BaseUseSelectionCalendarProps<SelectionVariantType> {
4
- hoveredDate?: DateValue | null;
5
- selectedDate?: SelectionVariantType | null;
6
- defaultSelectedDate?: SelectionVariantType;
7
- onSelectedDateChange?: (event: SyntheticEvent, selectedDate: SelectionVariantType) => void;
8
- isDaySelectable: (date?: DateValue) => boolean;
9
- onHoveredDateChange?: (event: SyntheticEvent, hoveredDate: DateValue | null) => void;
10
- }
11
- export type SingleSelectionValueType = DateValue;
12
- type MultiSelectionValueType = DateValue[];
13
- export type RangeSelectionValueType = {
14
- startDate?: DateValue;
15
- endDate?: DateValue;
16
- };
17
- type OffsetSelectionValueType = {
18
- startDate?: DateValue;
19
- endDate?: DateValue;
20
- };
21
- type AllSelectionValueType = SingleSelectionValueType | MultiSelectionValueType | RangeSelectionValueType | OffsetSelectionValueType | null;
22
- export interface UseOffsetSelectionCalendarProps extends Omit<BaseUseSelectionCalendarProps<OffsetSelectionValueType>, "startDateOffset" | "endDateOffset"> {
23
- selectionVariant: "offset";
24
- startDateOffset?: (date: DateValue) => DateValue;
25
- endDateOffset?: (date: DateValue) => DateValue;
26
- }
27
- export interface UseRangeSelectionCalendarProps extends BaseUseSelectionCalendarProps<RangeSelectionValueType> {
28
- selectionVariant: "range";
29
- }
30
- export interface UseMultiSelectionCalendarProps extends BaseUseSelectionCalendarProps<MultiSelectionValueType> {
31
- selectionVariant: "multiselect";
32
- }
33
- export interface UseSingleSelectionCalendarProps extends BaseUseSelectionCalendarProps<SingleSelectionValueType> {
34
- selectionVariant: "default";
35
- }
36
- export type useSelectionCalendarProps = UseSingleSelectionCalendarProps | UseMultiSelectionCalendarProps | UseRangeSelectionCalendarProps | UseOffsetSelectionCalendarProps;
37
- export declare function isRangeOrOffsetSelectionValue(selectionValue?: AllSelectionValueType): selectionValue is RangeSelectionValueType | OffsetSelectionValueType;
38
- export declare function isRangeOrOffsetSelectionWithStartDate(selectionValue?: AllSelectionValueType): selectionValue is RangeSelectionValueType | OffsetSelectionValueType;
39
- export declare function useSelectionCalendar(props: useSelectionCalendarProps): {
40
- state: {
41
- selectedDate: DateValue | RangeSelectionValueType | OffsetSelectionValueType | MultiSelectionValueType | null | undefined;
42
- hoveredDate: CalendarDate | import("@internationalized/date").CalendarDateTime | import("@internationalized/date").ZonedDateTime | null | undefined;
43
- };
44
- helpers: {
45
- setSelectedDate: (event: SyntheticEvent<HTMLButtonElement>, newSelectedDate: DateValue) => void;
46
- isSelected: (date: DateValue) => boolean;
47
- setHoveredDate: (event: SyntheticEvent, date: DateValue | null) => void;
48
- isHovered: (date: DateValue) => boolean;
49
- isSelectedSpan: (date: DateValue) => boolean;
50
- isHoveredSpan: (date: DateValue) => boolean;
51
- isSelectedStart: (date: DateValue) => boolean;
52
- isSelectedEnd: (date: DateValue) => boolean;
53
- isHoveredOffset: (date: DateValue) => boolean;
54
- };
55
- };
56
- export declare function useSelectionDay({ date }: {
57
- date: DateValue;
58
- }): {
59
- handleClick: MouseEventHandler<HTMLButtonElement>;
60
- handleKeyDown: KeyboardEventHandler<HTMLButtonElement>;
61
- handleMouseOver: MouseEventHandler<HTMLButtonElement>;
62
- handleMouseLeave: MouseEventHandler<HTMLButtonElement>;
63
- status: {
64
- selected: boolean;
65
- selectedSpan: boolean;
66
- hoveredSpan: boolean;
67
- selectedStart: boolean;
68
- selectedEnd: boolean;
69
- hovered: boolean;
70
- hoveredOffset: boolean;
71
- };
72
- dayProps: {
73
- className: string;
74
- "aria-pressed": string | undefined;
75
- "aria-disabled": string | undefined;
76
- };
77
- };
78
- export {};
@@ -1,7 +0,0 @@
1
- import { IconButtonProps } from "../icon-button";
2
- import { ColumnSearchProps } from "./ColumnSearch";
3
- export interface ColumnPickerProps extends Omit<IconButtonProps, "icon">, Pick<ColumnSearchProps, "columns" | "onSelectionChange" | "selected"> {
4
- icon?: string;
5
- iconSize?: number;
6
- }
7
- export declare const ColumnPicker: import("react").ForwardRefExoticComponent<ColumnPickerProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,12 +0,0 @@
1
- import { ListBoxProps } from "@salt-ds/core";
2
- import { HTMLAttributes } from "react";
3
- export interface ColumnSearchProps extends HTMLAttributes<HTMLDivElement>, Pick<ListBoxProps, "onSelectionChange" | "selected"> {
4
- columns: string[];
5
- onReorderColumns: (columns: string[]) => void;
6
- }
7
- /**
8
- * @deprecated
9
- *
10
- * use ColumnList instead
11
- */
12
- export declare const ColumnSearch: import("react").ForwardRefExoticComponent<ColumnSearchProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,2 +0,0 @@
1
- export * from "./ColumnPicker";
2
- export * from "./ColumnSearch";
@@ -1,3 +0,0 @@
1
- export * from "./useControlled";
2
- export * from "./use-resize-observer";
3
- export * from "./selectionTypes";
@@ -1,70 +0,0 @@
1
- import { MouseEventHandler, RefObject, SyntheticEvent } from "react";
2
- export type SelectionDisallowed = "none";
3
- export type SingleSelectionStrategy = "default" | "deselectable";
4
- export type MultiSelectionStrategy = "multiple" | "extended" | "extended-multi-range";
5
- /**
6
- * SpecialKeyMultiple works as deselectable unless a special key
7
- * (default SHIFT) is also pressed, then it allows multiple selection.
8
- * Useful for column sorting, filters etc
9
- */
10
- export type SpecialKeyMultipleSelection = "multiple-special-key";
11
- export type SelectionStrategy = SelectionDisallowed | SingleSelectionStrategy | MultiSelectionStrategy;
12
- export declare const isSingleSelection: (s?: SelectionStrategy) => s is SingleSelectionStrategy;
13
- export declare const isMultiSelection: (s?: SelectionStrategy) => s is MultiSelectionStrategy;
14
- export type SelectHandler<Item = string> = (event: SyntheticEvent, selectedItem: Item) => void;
15
- export declare const selectionIsDisallowed: (selection?: SelectionStrategy | SpecialKeyMultipleSelection) => selection is SelectionDisallowed;
16
- export declare const allowMultipleSelection: (selectionStrategy: SelectionStrategy | SpecialKeyMultipleSelection, specialKey?: boolean) => boolean;
17
- export declare const deselectionIsAllowed: (selection?: SelectionStrategy | SpecialKeyMultipleSelection) => selection is "deselectable" | MultiSelectionStrategy;
18
- export declare const hasSelection: <Item = unknown>(selected?: Item[]) => boolean;
19
- export declare const getFirstSelectedItem: <Item = unknown>(selected: Item[]) => Item;
20
- interface SelectionProps {
21
- defaultSelected?: string[];
22
- onSelect?: SelectHandler;
23
- onSelectionChange?: MultiSelectionHandler;
24
- selected?: string[];
25
- selectionStrategy?: SelectionStrategy;
26
- }
27
- export interface ListHandlers {
28
- onClick?: (event: React.MouseEvent<HTMLElement>) => void;
29
- onKeyDown?: (event: React.KeyboardEvent<HTMLElement>) => void;
30
- onKeyboardNavigation?: (event: React.KeyboardEvent, currentIndex: number) => void;
31
- onMouseMove?: (event: React.MouseEvent) => void;
32
- }
33
- export interface SelectionHookProps extends SelectionProps {
34
- containerRef: RefObject<HTMLElement | null>;
35
- disableSelection?: boolean;
36
- highlightedIndex: number;
37
- itemQuery: string;
38
- label?: string;
39
- onClick?: MouseEventHandler;
40
- selectionKeys?: string[];
41
- tabToSelect?: boolean;
42
- }
43
- export interface SelectionHookResult {
44
- listHandlers: ListHandlers;
45
- selected: string[];
46
- setSelected: (selected: string[]) => void;
47
- }
48
- /**
49
- * evt is only null in the special case of a selection fired from a multi-select
50
- * host on tab or selection based on freeform text in combobox
51
- */
52
- export type MultiSelectionHandler<Item = string> = (event: SyntheticEvent | null, selected: Item[]) => void;
53
- /**
54
- * evt is only null in the special case of freeform text in combobox
55
- */
56
- export type SingleSelectionHandler<Item = string> = (event: SyntheticEvent | null, selected: Item) => void;
57
- export type SelectionType<I, S extends SelectionStrategy> = S extends MultiSelectionStrategy ? I[] : I | null;
58
- export interface ComponentSelectionProps<Item = string, S extends SelectionStrategy = "default"> {
59
- defaultSelected?: S extends MultiSelectionStrategy ? Item[] : Item;
60
- onSelect?: SelectHandler<Item>;
61
- onSelectionChange?: S extends MultiSelectionStrategy ? MultiSelectionHandler<Item> : SingleSelectionHandler<Item>;
62
- selected?: SelectionType<Item, S>;
63
- selectionStrategy?: S;
64
- /**
65
- * The keyboard keys used to effect selection, defaults to SPACE and ENTER
66
- * TODO maybe this belongs on the SelectionProps interface ?
67
- */
68
- selectionKeys?: string[];
69
- }
70
- export {};
@@ -1,16 +0,0 @@
1
- import { RefObject } from "react";
2
- export declare const WidthHeight: string[];
3
- export declare const WidthOnly: string[];
4
- export declare const HeightOnly: string[];
5
- export type measurements<T = string | number> = {
6
- height?: T;
7
- clientHeight?: number;
8
- clientWidth?: number;
9
- contentHeight?: number;
10
- contentWidth?: number;
11
- scrollHeight?: number;
12
- scrollWidth?: number;
13
- width?: T;
14
- };
15
- export type ResizeHandler = (measurements: measurements<number>) => void;
16
- export declare function useResizeObserver(ref: RefObject<Element | HTMLElement | null>, dimensions: string[], onResize: ResizeHandler, reportInitialSize?: boolean): void;
@@ -1,24 +0,0 @@
1
- import { Dispatch, SetStateAction } from "react";
2
- export interface UseControlledProps<T> {
3
- /**
4
- * Holds the component value when it's controlled.
5
- */
6
- controlled?: T;
7
- /**
8
- * The default value when uncontrolled.
9
- */
10
- default: T;
11
- /**
12
- * The component name displayed in warnings.
13
- */
14
- name: string;
15
- /**
16
- * The name of the state variable displayed in warnings.
17
- */
18
- state?: string;
19
- }
20
- /**
21
- * Copied from MUI (v5) useControlled hook with one additional returned value
22
- * @see https://github.com/mui-org/material-ui/blob/0979e6a54ba47c278d1f535953c0520a86349811/packages/material-ui-utils/src/useControlled.js
23
- */
24
- export declare function useControlled<S>({ controlled, default: defaultProp, name, state, }: UseControlledProps<S>): [S, Dispatch<SetStateAction<S>>, boolean];
@@ -1,17 +0,0 @@
1
- import React, { ReactElement, ReactNode } from "react";
2
- /**
3
- * If component is a string, the component will be read from the
4
- * comoponent registry. In that case, componentProps can be used
5
- * to pass props to the component.
6
- */
7
- export type ShowContextPanel = (component: string | ReactElement, title: string, componentProps?: unknown) => void;
8
- export interface ContextPanelProps {
9
- hideContextPanel?: () => void;
10
- showContextPanel: ShowContextPanel;
11
- }
12
- export declare const ContextPanelContext: React.Context<ContextPanelProps>;
13
- export declare const ContextPanelProvider: ({ children, hideContextPanel: hideContextPanelProp, showContextPanel: showContextPanelProp, }: Partial<ContextPanelProps> & {
14
- children: ReactNode;
15
- }) => import("react/jsx-runtime").JSX.Element;
16
- export declare function useContextPanel(): ShowContextPanel;
17
- export declare function useHideContextPanel(): (() => void) | undefined;
@@ -1,11 +0,0 @@
1
- import { ButtonProps } from "@salt-ds/core";
2
- import type { VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
3
- import type { CommitHandler } from "@vuu-ui/vuu-utils";
4
- export type CycleStateButtonChangeHandler = (value: VuuRowDataItemType) => void;
5
- export interface CycleStateButtonProps extends Omit<ButtonProps, "onChange"> {
6
- onChange?: CycleStateButtonChangeHandler;
7
- onCommit?: CommitHandler<HTMLButtonElement>;
8
- values: string[];
9
- value: string;
10
- }
11
- export declare const CycleStateButton: import("react").ForwardRefExoticComponent<CycleStateButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1 +0,0 @@
1
- export * from "./CycleStateButton";
@@ -1,60 +0,0 @@
1
- import { type ChangeEvent, type ComponentPropsWithoutRef, type InputHTMLAttributes, type ReactNode, type RefObject, type SyntheticEvent } from "react";
2
- import { type DateValue } from "@internationalized/date";
3
- import { type RangeSelectionValueType, type SingleSelectionValueType } from "../calendar";
4
- export interface DateInputProps<SelectionVariantType> extends Omit<ComponentPropsWithoutRef<"div">, "defaultValue" | "onChange">, Pick<ComponentPropsWithoutRef<"input">, "disabled" | "placeholder"> {
5
- ariaLabel?: string;
6
- /**
7
- * The marker to use in an empty read only DateInput.
8
- * Use `''` to disable this feature. Defaults to '—'.
9
- */
10
- emptyReadOnlyMarker?: string;
11
- /**
12
- * End adornment component
13
- */
14
- endAdornment?: ReactNode;
15
- /**
16
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dateInput#Attributes) applied to the `input` elements.
17
- */
18
- inputProps?: InputHTMLAttributes<HTMLInputElement>;
19
- /**
20
- * If `true`, the component is read only.
21
- */
22
- readOnly?: boolean;
23
- /**
24
- * Validation status.
25
- */
26
- validationStatus?: "error" | "warning" | "success";
27
- /**
28
- * Styling variant. Defaults to "primary".
29
- */
30
- variant?: "primary" | "secondary";
31
- /**
32
- * Styling variant with full border. Defaults to false
33
- */
34
- bordered?: boolean;
35
- /**
36
- * Function to format the input value.
37
- */
38
- dateFormatter?: (input: DateValue | undefined) => string;
39
- /**
40
- * Reference for the startInput;
41
- */
42
- startInputRef?: RefObject<HTMLInputElement | null>;
43
- /**
44
- * Reference for the endInput;
45
- */
46
- endInputRef?: RefObject<HTMLInputElement | null>;
47
- /**
48
- * Selection variant. Defaults to single select.
49
- */
50
- selectionVariant?: "default" | "range";
51
- /**
52
- * Callback fired when the selected date change.
53
- */
54
- onSelectionChange?: (event: SyntheticEvent, selectedDate?: SelectionVariantType) => void;
55
- /**
56
- * Callback fired when the input value change.
57
- */
58
- onChange?: SelectionVariantType extends SingleSelectionValueType ? (event: ChangeEvent<HTMLInputElement>, selectedDateInputValue?: string) => void : (event: ChangeEvent<HTMLInputElement>, startDateInputValue?: string, endDateInputValue?: string) => void;
59
- }
60
- export declare const DateInput: import("react").ForwardRefExoticComponent<DateInputProps<DateValue | RangeSelectionValueType> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1 +0,0 @@
1
- export * from "./DateInput";
@@ -1,66 +0,0 @@
1
- import { type ChangeEvent, type SyntheticEvent } from "react";
2
- import { type DateValue } from "@internationalized/date";
3
- import { type CalendarProps, type RangeSelectionValueType, type SingleSelectionValueType } from "../calendar";
4
- import { type DateInputProps } from "../date-input";
5
- export interface DatePickerProps<SelectionVariantType> extends DateInputProps<SelectionVariantType> {
6
- /**
7
- * Selection variant. Defaults to single select.
8
- */
9
- selectionVariant?: "default" | "range";
10
- /**
11
- * If `true`, the component will be disabled.
12
- */
13
- disabled?: boolean;
14
- /**
15
- * The selected date value. Use when the component is controlled.
16
- * Can be a single date or an object with start and end dates for range selection.
17
- */
18
- selectedDate?: SelectionVariantType;
19
- /**
20
- * The default date value. Use when the component is not controlled.
21
- * Can be a single date or an object with start and end dates for range selection.
22
- */
23
- defaultSelectedDate?: SelectionVariantType;
24
- /**
25
- * Props to be passed to the Calendar component.
26
- */
27
- CalendarProps?: Partial<Omit<CalendarProps, "selectionVariant" | "selectedDate" | "defaultSelectedDate" | "onSelectedDateChange">>;
28
- /**
29
- * Function to format the input value.
30
- */
31
- dateFormatter?: (input: DateValue | undefined) => string;
32
- /**
33
- * Callback function triggered when open state changes.
34
- */
35
- onOpenChange?: (newOpen: boolean) => void;
36
- /**
37
- * Display or hide the component.
38
- */
39
- open?: boolean;
40
- /**
41
- * The default open value. Use when the component is not controlled.
42
- */
43
- defaultOpen?: boolean;
44
- /**
45
- * Helper text to display in the panel
46
- */
47
- helperText?: string;
48
- /**
49
- * Validation status.
50
- */
51
- validationStatus?: "error" | "warning" | "success";
52
- /**
53
- * Callback fired when the selected date change.
54
- */
55
- onSelectionChange?: (event: SyntheticEvent, selectedDate?: SelectionVariantType) => void;
56
- /**
57
- * Callback fired when the input value change.
58
- */
59
- onChange?: SelectionVariantType extends SingleSelectionValueType ? (event: ChangeEvent<HTMLInputElement>, selectedDateInputValue?: string) => void : (event: ChangeEvent<HTMLInputElement>, startDateInputValue?: string, endDateInputValue?: string) => void;
60
- /**
61
- * Number of Calendars to be shown if selectionVariant is range.
62
- * 2 is the default value.
63
- */
64
- visibleMonths?: 1 | 2;
65
- }
66
- export declare const DatePicker: import("react").ForwardRefExoticComponent<DatePickerProps<DateValue | RangeSelectionValueType> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,19 +0,0 @@
1
- import type { DateValue } from "@internationalized/date";
2
- import { type UseFloatingUIReturn } from "@salt-ds/core";
3
- import type { RangeSelectionValueType } from "../calendar";
4
- export interface DatePickerContextValue<SelectionVariantType> extends Partial<Pick<UseFloatingUIReturn, "context">> {
5
- openState: boolean;
6
- setOpen: (newOpen: boolean) => void;
7
- disabled: boolean;
8
- selectedDate: SelectionVariantType | undefined;
9
- defaultSelectedDate: SelectionVariantType | undefined;
10
- setSelectedDate: (newStartDate: SelectionVariantType | undefined) => void;
11
- startVisibleMonth: DateValue | undefined;
12
- setStartVisibleMonth: (newStartDate: DateValue | undefined) => void;
13
- endVisibleMonth: DateValue | undefined;
14
- setEndVisibleMonth: (newStartDate: DateValue | undefined) => void;
15
- selectionVariant: "default" | "range";
16
- getPanelPosition: () => Record<string, unknown>;
17
- }
18
- export declare const DatePickerContext: import("react").Context<DatePickerContextValue<DateValue | RangeSelectionValueType>>;
19
- export declare function useDatePickerContext(): DatePickerContextValue<DateValue | RangeSelectionValueType>;
@@ -1,10 +0,0 @@
1
- import { type DateValue } from "@internationalized/date";
2
- import { type ComponentPropsWithoutRef, type SyntheticEvent } from "react";
3
- import { type CalendarProps, type RangeSelectionValueType } from "../calendar";
4
- export interface DatePickerPanelProps<SelectionVariantType> extends ComponentPropsWithoutRef<"div"> {
5
- onSelect?: (event: SyntheticEvent, selectedDate?: SelectionVariantType) => void;
6
- helperText?: string;
7
- visibleMonths?: 1 | 2;
8
- CalendarProps?: Partial<Omit<CalendarProps, "selectionVariant" | "selectedDate" | "defaultSelectedDate" | "onSelectedDateChange">>;
9
- }
10
- export declare const DatePickerPanel: import("react").ForwardRefExoticComponent<DatePickerPanelProps<DateValue | RangeSelectionValueType> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1 +0,0 @@
1
- export * from "./DatePicker";
@@ -1,38 +0,0 @@
1
- import { ReactNode } from "react";
2
- import { DragDropState } from "./DragDropState";
3
- import { GlobalDropHandler, ResumeDragHandler } from "./useGlobalDragDrop";
4
- export type DragOutHandler = (id: string, dragDropState: DragDropState) => boolean;
5
- export type DragDropRegistrationFn = (id: string, resumeDrag: ResumeDragHandler | false, onDrop?: GlobalDropHandler) => void;
6
- export type EndOfDragOperationHandler = (id: string) => void;
7
- export interface DragDropContextProps {
8
- dragSources?: Map<string, string[]>;
9
- dropTargets?: Map<string, string[]>;
10
- onDragOut?: DragOutHandler;
11
- onEndOfDragOperation?: EndOfDragOperationHandler;
12
- registerDragDropParty: DragDropRegistrationFn;
13
- }
14
- export type DragSources = {
15
- [key: string]: {
16
- dropTargets: string | string[];
17
- payloadType?: string;
18
- };
19
- };
20
- export interface DragDropProviderProps {
21
- children: ReactNode;
22
- dragSources: DragSources;
23
- }
24
- export type MeasuredTarget = {
25
- bottom: number;
26
- left: number;
27
- right: number;
28
- top: number;
29
- };
30
- export declare const DragDropProvider: ({ children, dragSources: dragSourcesProp, }: DragDropProviderProps) => import("react/jsx-runtime").JSX.Element;
31
- export interface DragDropProviderResult {
32
- isDragSource?: boolean;
33
- isDropTarget?: boolean;
34
- onDragOut?: DragOutHandler;
35
- onEndOfDragOperation?: (id: string) => void;
36
- register: DragDropRegistrationFn;
37
- }
38
- export declare const useDragDropProvider: (id?: string) => DragDropProviderResult;
@@ -1,15 +0,0 @@
1
- import { MouseOffset, MousePosition } from "./dragDropTypes";
2
- export declare class DragDropState {
3
- /** Distance between start (top | left) of dragged element and point where user pressed to drag */
4
- readonly mouseOffset: MouseOffset;
5
- /** Element where the initial mousedown triggered the drag operation */
6
- readonly initialDragElement: HTMLElement;
7
- /** Element being dragged, (initial element cloned and rendered in portal). */
8
- draggableElement: HTMLElement | null;
9
- payload: unknown;
10
- constructor(mousePosition: MousePosition, dragElement: HTMLElement);
11
- /** Used to capture a ref to the Draggable ReactElement */
12
- setDraggable: (el: HTMLElement | null) => void;
13
- setPayload(payload: unknown): void;
14
- private getMouseOffset;
15
- }
@@ -1,13 +0,0 @@
1
- import { CSSProperties, HTMLAttributes, MutableRefObject, TransitionEventHandler } from "react";
2
- export interface DraggableProps extends HTMLAttributes<HTMLDivElement> {
3
- wrapperClassName: string;
4
- element: HTMLElement;
5
- onDropped?: () => void;
6
- onTransitionEnd?: TransitionEventHandler;
7
- scale?: number;
8
- style: CSSProperties;
9
- }
10
- export declare const Draggable: import("react").ForwardRefExoticComponent<DraggableProps & import("react").RefAttributes<HTMLDivElement>>;
11
- export declare const createDragSpacer: (transitioning?: MutableRefObject<boolean>) => HTMLElement;
12
- export declare const createDropIndicatorPosition: () => HTMLElement;
13
- export declare const createDropIndicator: (transitioning?: MutableRefObject<boolean>) => HTMLElement;
@@ -1,100 +0,0 @@
1
- import { MouseEventHandler, ReactElement, RefObject } from "react";
2
- import type { orientationType } from "@vuu-ui/vuu-utils";
3
- import { DragDropState } from "./DragDropState";
4
- export type ViewportRange = {
5
- atEnd: boolean;
6
- atStart: boolean;
7
- from: number;
8
- to: number;
9
- };
10
- type dimension = "width" | "height" | "scrollWidth" | "scrollHeight";
11
- type dimensions = {
12
- size: dimension;
13
- depth: dimension;
14
- scrollDepth: dimension;
15
- };
16
- export type dimensionsType = {
17
- horizontal: dimensions;
18
- vertical: dimensions;
19
- };
20
- export type dragStrategy = "drop-indicator" | "natural-movement" | "drag-copy" | "drop-only";
21
- export type Direction = "fwd" | "bwd";
22
- export declare const FWD: Direction;
23
- export declare const BWD: Direction;
24
- export interface MousePosition {
25
- clientX: number;
26
- clientY: number;
27
- }
28
- export interface MouseOffset {
29
- x: number;
30
- y: number;
31
- }
32
- export type Rect = {
33
- height: number;
34
- left: number;
35
- top: number;
36
- width: number;
37
- };
38
- export interface DragHookResult {
39
- draggable?: ReactElement;
40
- dropIndicator?: ReactElement;
41
- draggedItemIndex?: number;
42
- isDragging: boolean;
43
- isScrolling: RefObject<boolean>;
44
- onMouseDown?: MouseEventHandler;
45
- revealOverflowedItems?: boolean;
46
- }
47
- export interface InternalDragHookResult extends Omit<DragHookResult, "isDragging" | "isScrolling"> {
48
- beginDrag: (dragElement: HTMLElement) => void;
49
- drag: (dragPos: number, mouseMoveDirection: "fwd" | "bwd") => void;
50
- drop: () => DropOptions;
51
- handleScrollStart?: (scrollDirection: "fwd" | "bwd") => void;
52
- handleScrollStop?: (scrollDirection: "fwd" | "bwd", _scrollPos: number, atEnd: boolean) => void;
53
- /**
54
- * Draggable item has been dragged out of container. Remove any local drop
55
- * indicators. Dragged element itself should not yet be removed from DOM.
56
- */
57
- releaseDrag?: () => void;
58
- }
59
- export interface DropOptions {
60
- fromIndex: number;
61
- toIndex: number;
62
- isExternal?: boolean;
63
- payload?: unknown;
64
- }
65
- export type DragStartHandler = (dragDropState: DragDropState) => void;
66
- export type DropHandler = (options: DropOptions) => void;
67
- export interface DragDropProps {
68
- allowDragDrop?: boolean | dragStrategy;
69
- containerRef: RefObject<HTMLElement | null>;
70
- /** this is the className that will be assigned during drag to the dragged element */
71
- draggableClassName: string;
72
- extendedDropZone?: boolean;
73
- getDragPayload?: (dragElement: HTMLElement) => unknown;
74
- id?: string;
75
- isDragSource?: boolean;
76
- isDropTarget?: boolean;
77
- itemQuery?: string;
78
- onDragStart?: DragStartHandler;
79
- onDrop: DropHandler;
80
- onDropSettle?: (toIndex: number) => void;
81
- orientation: orientationType;
82
- /**
83
- * The scrolling container does not necessarily have to be a
84
- * descendant of the container, it may be an ancestor element;
85
- */
86
- scrollingContainerRef?: RefObject<HTMLElement | null>;
87
- viewportRange?: ViewportRange;
88
- }
89
- export type DragDropHook = (props: DragDropProps) => DragHookResult;
90
- export interface InternalDragDropProps extends Omit<DragDropProps, "draggableClassName" | "id" | "onDrop"> {
91
- isDragSource?: boolean;
92
- isDropTarget?: boolean;
93
- selected?: unknown;
94
- }
95
- export type DragDropContext = {
96
- dragElement: HTMLElement;
97
- dragPayload: unknown;
98
- mouseOffset: MouseOffset;
99
- };
100
- export {};