@vuu-ui/vuu-data-react 0.13.45 → 0.13.46

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 (274) hide show
  1. package/cjs/data-editing/get-data-item-edit-control.js +30 -13
  2. package/cjs/data-editing/get-data-item-edit-control.js.map +1 -1
  3. package/cjs/hooks/useRemoteConnection.js +58 -0
  4. package/cjs/hooks/useRemoteConnection.js.map +1 -0
  5. package/cjs/hooks/useVuuMenuActions.js +5 -4
  6. package/cjs/hooks/useVuuMenuActions.js.map +1 -1
  7. package/cjs/index.js +4 -2
  8. package/cjs/index.js.map +1 -1
  9. package/cjs/lost-connection-indicator/LostConnectionIndicator.css.js +6 -0
  10. package/cjs/lost-connection-indicator/LostConnectionIndicator.css.js.map +1 -0
  11. package/cjs/lost-connection-indicator/LostConnectionIndicator.js +24 -0
  12. package/cjs/lost-connection-indicator/LostConnectionIndicator.js.map +1 -0
  13. package/esm/data-editing/get-data-item-edit-control.js +30 -13
  14. package/esm/data-editing/get-data-item-edit-control.js.map +1 -1
  15. package/esm/hooks/useRemoteConnection.js +56 -0
  16. package/esm/hooks/useRemoteConnection.js.map +1 -0
  17. package/esm/hooks/useVuuMenuActions.js +5 -4
  18. package/esm/hooks/useVuuMenuActions.js.map +1 -1
  19. package/esm/index.js +2 -1
  20. package/esm/index.js.map +1 -1
  21. package/esm/lost-connection-indicator/LostConnectionIndicator.css.js +4 -0
  22. package/esm/lost-connection-indicator/LostConnectionIndicator.css.js.map +1 -0
  23. package/esm/lost-connection-indicator/LostConnectionIndicator.js +22 -0
  24. package/esm/lost-connection-indicator/LostConnectionIndicator.js.map +1 -0
  25. package/package.json +15 -14
  26. package/types/vuu-context-menu/src/ContextMenu.d.ts +10 -0
  27. package/types/vuu-context-menu/src/ContextMenuProvider.d.ts +16 -0
  28. package/types/vuu-context-menu/src/index.d.ts +3 -0
  29. package/types/vuu-context-menu/src/menu-utils.d.ts +17 -0
  30. package/types/vuu-context-menu/src/useContextMenu.d.ts +10 -0
  31. package/types/{data-editing → vuu-data-react/src/data-editing}/get-data-item-edit-control.d.ts +9 -1
  32. package/types/{hooks → vuu-data-react/src/hooks}/index.d.ts +0 -1
  33. package/types/vuu-data-react/src/hooks/useConnectionStatus.d.ts +6 -0
  34. package/types/vuu-data-react/src/hooks/useRemoteConnection.d.ts +6 -0
  35. package/types/{index.d.ts → vuu-data-react/src/index.d.ts} +2 -0
  36. package/types/vuu-data-react/src/lost-connection-indicator/LostConnectionIndicator.d.ts +1 -0
  37. package/types/vuu-popups/src/index.d.ts +5 -0
  38. package/types/vuu-popups/src/notifications/NotificationsCenter.d.ts +5 -0
  39. package/types/vuu-popups/src/notifications/NotificationsContext.d.ts +36 -0
  40. package/types/vuu-popups/src/notifications/NotificationsProvider.d.ts +9 -0
  41. package/types/vuu-popups/src/notifications/ToastNotification.d.ts +7 -0
  42. package/types/vuu-popups/src/notifications/WorkspaceNotification.d.ts +5 -0
  43. package/types/vuu-popups/src/notifications/index.d.ts +3 -0
  44. package/types/vuu-popups/src/popup/Popup.d.ts +12 -0
  45. package/types/vuu-popups/src/popup/getPositionRelativeToAnchor.d.ts +19 -0
  46. package/types/vuu-popups/src/popup/index.d.ts +2 -0
  47. package/types/vuu-popups/src/popup/useAnchoredPosition.d.ts +7 -0
  48. package/types/vuu-popups/src/popup-menu/PopupMenu.d.ts +45 -0
  49. package/types/vuu-popups/src/popup-menu/index.d.ts +1 -0
  50. package/types/vuu-popups/src/popup-menu/usePopupMenu.d.ts +19 -0
  51. package/types/vuu-popups/src/portal/Portal.d.ts +42 -0
  52. package/types/vuu-popups/src/portal/index.d.ts +1 -0
  53. package/types/vuu-popups/src/tooltip/Tooltip.d.ts +15 -0
  54. package/types/vuu-popups/src/tooltip/index.d.ts +2 -0
  55. package/types/vuu-popups/src/tooltip/useTooltip.d.ts +19 -0
  56. package/types/vuu-popups/src/tooltip/useTooltipAnchoredPosition.d.ts +7 -0
  57. package/types/vuu-ui-controls/src/calendar/Calendar.d.ts +13 -0
  58. package/types/vuu-ui-controls/src/calendar/index.d.ts +4 -0
  59. package/types/vuu-ui-controls/src/calendar/internal/CalendarCarousel.d.ts +3 -0
  60. package/types/vuu-ui-controls/src/calendar/internal/CalendarContext.d.ts +8 -0
  61. package/types/vuu-ui-controls/src/calendar/internal/CalendarDay.d.ts +14 -0
  62. package/types/vuu-ui-controls/src/calendar/internal/CalendarMonth.d.ts +10 -0
  63. package/types/vuu-ui-controls/src/calendar/internal/CalendarNavigation.d.ts +16 -0
  64. package/types/vuu-ui-controls/src/calendar/internal/CalendarWeekHeader.d.ts +3 -0
  65. package/types/vuu-ui-controls/src/calendar/internal/useFocusManagement.d.ts +9 -0
  66. package/types/vuu-ui-controls/src/calendar/internal/utils.d.ts +15 -0
  67. package/types/vuu-ui-controls/src/calendar/useCalendar.d.ts +54 -0
  68. package/types/vuu-ui-controls/src/calendar/useCalendarDay.d.ts +22 -0
  69. package/types/vuu-ui-controls/src/calendar/useSelection.d.ts +78 -0
  70. package/types/vuu-ui-controls/src/column-picker/ColumnPicker.d.ts +7 -0
  71. package/types/vuu-ui-controls/src/column-picker/ColumnSearch.d.ts +12 -0
  72. package/types/vuu-ui-controls/src/column-picker/index.d.ts +2 -0
  73. package/types/vuu-ui-controls/src/common-hooks/index.d.ts +3 -0
  74. package/types/vuu-ui-controls/src/common-hooks/selectionTypes.d.ts +70 -0
  75. package/types/vuu-ui-controls/src/common-hooks/use-resize-observer.d.ts +16 -0
  76. package/types/vuu-ui-controls/src/common-hooks/useControlled.d.ts +24 -0
  77. package/types/vuu-ui-controls/src/context-panel-provider/ContextPanelProvider.d.ts +17 -0
  78. package/types/vuu-ui-controls/src/cycle-state-button/CycleStateButton.d.ts +11 -0
  79. package/types/vuu-ui-controls/src/cycle-state-button/index.d.ts +1 -0
  80. package/types/vuu-ui-controls/src/date-input/DateInput.d.ts +60 -0
  81. package/types/vuu-ui-controls/src/date-input/index.d.ts +1 -0
  82. package/types/vuu-ui-controls/src/date-picker/DatePicker.d.ts +66 -0
  83. package/types/vuu-ui-controls/src/date-picker/DatePickerContext.d.ts +19 -0
  84. package/types/vuu-ui-controls/src/date-picker/DatePickerPanel.d.ts +10 -0
  85. package/types/vuu-ui-controls/src/date-picker/index.d.ts +1 -0
  86. package/types/vuu-ui-controls/src/drag-drop/DragDropProvider.d.ts +38 -0
  87. package/types/vuu-ui-controls/src/drag-drop/DragDropState.d.ts +15 -0
  88. package/types/vuu-ui-controls/src/drag-drop/Draggable.d.ts +13 -0
  89. package/types/vuu-ui-controls/src/drag-drop/dragDropTypes.d.ts +100 -0
  90. package/types/vuu-ui-controls/src/drag-drop/drop-target-utils.d.ts +82 -0
  91. package/types/vuu-ui-controls/src/drag-drop/index.d.ts +6 -0
  92. package/types/vuu-ui-controls/src/drag-drop/useAutoScroll.d.ts +11 -0
  93. package/types/vuu-ui-controls/src/drag-drop/useDragDisplacers.d.ts +17 -0
  94. package/types/vuu-ui-controls/src/drag-drop/useDragDrop.d.ts +2 -0
  95. package/types/vuu-ui-controls/src/drag-drop/useDragDropCopy.d.ts +6 -0
  96. package/types/vuu-ui-controls/src/drag-drop/useDragDropIndicator.d.ts +2 -0
  97. package/types/vuu-ui-controls/src/drag-drop/useDragDropNaturalMovement.d.ts +2 -0
  98. package/types/vuu-ui-controls/src/drag-drop/useDropIndicator.d.ts +8 -0
  99. package/types/vuu-ui-controls/src/drag-drop/useGlobalDragDrop.d.ts +11 -0
  100. package/types/vuu-ui-controls/src/editable/index.d.ts +1 -0
  101. package/types/vuu-ui-controls/src/editable/useEditableText.d.ts +19 -0
  102. package/types/vuu-ui-controls/src/editable-label/EditableLabel.d.ts +19 -0
  103. package/types/vuu-ui-controls/src/editable-label/index.d.ts +1 -0
  104. package/types/vuu-ui-controls/src/expando-input/ExpandoInput.d.ts +6 -0
  105. package/types/vuu-ui-controls/src/expando-input/index.d.ts +1 -0
  106. package/types/vuu-ui-controls/src/icon-button/Icon.d.ts +6 -0
  107. package/types/vuu-ui-controls/src/icon-button/IconButton.d.ts +6 -0
  108. package/types/vuu-ui-controls/src/icon-button/ToggleIconButton.d.ts +5 -0
  109. package/types/vuu-ui-controls/src/icon-button/index.d.ts +3 -0
  110. package/types/vuu-ui-controls/src/index.d.ts +30 -0
  111. package/types/vuu-ui-controls/src/instrument-picker/TablePicker.d.ts +10 -0
  112. package/types/vuu-ui-controls/src/instrument-picker/index.d.ts +1 -0
  113. package/types/vuu-ui-controls/src/instrument-picker/useTablePicker.d.ts +47 -0
  114. package/types/vuu-ui-controls/src/measured-container/MeasuredContainer.d.ts +14 -0
  115. package/types/vuu-ui-controls/src/measured-container/index.d.ts +2 -0
  116. package/types/vuu-ui-controls/src/measured-container/useMeasuredContainer.d.ts +23 -0
  117. package/types/vuu-ui-controls/src/measured-container/useResizeObserver.d.ts +15 -0
  118. package/types/vuu-ui-controls/src/modal-provider/ModalProvider.d.ts +13 -0
  119. package/types/vuu-ui-controls/src/overflow-container/OverflowContainer.d.ts +15 -0
  120. package/types/vuu-ui-controls/src/overflow-container/index.d.ts +2 -0
  121. package/types/vuu-ui-controls/src/overflow-container/overflow-utils.d.ts +48 -0
  122. package/types/vuu-ui-controls/src/overflow-container/useOverflowContainer.d.ts +19 -0
  123. package/types/vuu-ui-controls/src/price-ticker/PriceTicker.d.ts +7 -0
  124. package/types/vuu-ui-controls/src/price-ticker/index.d.ts +1 -0
  125. package/types/vuu-ui-controls/src/prompt/Prompt.d.ts +48 -0
  126. package/types/vuu-ui-controls/src/sortable-list/SortableList.d.ts +8 -0
  127. package/types/vuu-ui-controls/src/split-button/SplitButton.d.ts +11 -0
  128. package/types/vuu-ui-controls/src/split-button/SplitStateButton.d.ts +5 -0
  129. package/types/vuu-ui-controls/src/split-button/index.d.ts +2 -0
  130. package/types/vuu-ui-controls/src/split-button/useSplitButton.d.ts +311 -0
  131. package/types/vuu-ui-controls/src/table-search/SearchCell.d.ts +2 -0
  132. package/types/vuu-ui-controls/src/table-search/TableSearch.d.ts +9 -0
  133. package/types/vuu-ui-controls/src/table-search/index.d.ts +1 -0
  134. package/types/vuu-ui-controls/src/table-search/useTableSearch.d.ts +15 -0
  135. package/types/vuu-ui-controls/src/tabs-next/TabBar.d.ts +12 -0
  136. package/types/vuu-ui-controls/src/tabs-next/TabListNext.d.ts +12 -0
  137. package/types/vuu-ui-controls/src/tabs-next/TabNext.d.ts +12 -0
  138. package/types/vuu-ui-controls/src/tabs-next/TabNextAction.d.ts +5 -0
  139. package/types/vuu-ui-controls/src/tabs-next/TabNextContext.d.ts +12 -0
  140. package/types/vuu-ui-controls/src/tabs-next/TabNextPanel.d.ts +8 -0
  141. package/types/vuu-ui-controls/src/tabs-next/TabNextTrigger.d.ts +5 -0
  142. package/types/vuu-ui-controls/src/tabs-next/TabOverflowList.d.ts +11 -0
  143. package/types/vuu-ui-controls/src/tabs-next/TabsNext.d.ts +17 -0
  144. package/types/vuu-ui-controls/src/tabs-next/TabsNextContext.d.ts +21 -0
  145. package/types/vuu-ui-controls/src/tabs-next/hooks/useCollection.d.ts +18 -0
  146. package/types/vuu-ui-controls/src/tabs-next/hooks/useFocusOutside.d.ts +2 -0
  147. package/types/vuu-ui-controls/src/tabs-next/hooks/useOverflow.d.ts +11 -0
  148. package/types/vuu-ui-controls/src/tabs-next/index.d.ts +7 -0
  149. package/types/vuu-ui-controls/src/tabstrip/Tab.d.ts +27 -0
  150. package/types/vuu-ui-controls/src/tabstrip/TabMenu.d.ts +23 -0
  151. package/types/vuu-ui-controls/src/tabstrip/TabMenuOptions.d.ts +10 -0
  152. package/types/vuu-ui-controls/src/tabstrip/TabsTypes.d.ts +127 -0
  153. package/types/vuu-ui-controls/src/tabstrip/Tabstrip.d.ts +2 -0
  154. package/types/vuu-ui-controls/src/tabstrip/index.d.ts +5 -0
  155. package/types/vuu-ui-controls/src/tabstrip/tabstrip-dom-utils.d.ts +2 -0
  156. package/types/vuu-ui-controls/src/tabstrip/useAnimatedSelectionThumb.d.ts +7 -0
  157. package/types/vuu-ui-controls/src/tabstrip/useKeyboardNavigation.d.ts +29 -0
  158. package/types/vuu-ui-controls/src/tabstrip/useSelection.d.ts +13 -0
  159. package/types/vuu-ui-controls/src/tabstrip/useTabstrip.d.ts +55 -0
  160. package/types/vuu-ui-controls/src/time-input/MaskedInput.d.ts +49 -0
  161. package/types/vuu-ui-controls/src/time-input/TimeInput.d.ts +5 -0
  162. package/types/vuu-ui-controls/src/time-input/useTimeInput.d.ts +21 -0
  163. package/types/vuu-ui-controls/src/toolbar/Toolbar.d.ts +19 -0
  164. package/types/vuu-ui-controls/src/toolbar/index.d.ts +1 -0
  165. package/types/vuu-ui-controls/src/toolbar/toolbar-dom-utils.d.ts +3 -0
  166. package/types/vuu-ui-controls/src/toolbar/useKeyboardNavigation.d.ts +32 -0
  167. package/types/vuu-ui-controls/src/toolbar/useSelection.d.ts +22 -0
  168. package/types/vuu-ui-controls/src/toolbar/useToolbar.d.ts +28 -0
  169. package/types/vuu-ui-controls/src/utils/deprecated-types.d.ts +2 -0
  170. package/types/vuu-ui-controls/src/utils/escapeRegExp.d.ts +1 -0
  171. package/types/vuu-ui-controls/src/utils/forwardCallbackProps.d.ts +3 -0
  172. package/types/vuu-ui-controls/src/utils/index.d.ts +5 -0
  173. package/types/vuu-ui-controls/src/utils/isOverflowElement.d.ts +1 -0
  174. package/types/vuu-ui-controls/src/utils/isPlainObject.d.ts +1 -0
  175. package/types/vuu-ui-controls/src/vuu-date-picker/VuuDatePicker.d.ts +7 -0
  176. package/types/vuu-ui-controls/src/vuu-date-picker/index.d.ts +1 -0
  177. package/types/vuu-ui-controls/src/vuu-input/VuuInput.d.ts +18 -0
  178. package/types/vuu-ui-controls/src/vuu-input/index.d.ts +1 -0
  179. package/types/vuu-ui-controls/src/vuu-time-picker/VuuTimePicker.d.ts +7 -0
  180. package/types/vuu-ui-controls/src/vuu-typeahead-input/VuuTypeaheadInput.d.ts +6 -0
  181. package/types/vuu-ui-controls/src/vuu-typeahead-input/index.d.ts +1 -0
  182. package/types/vuu-ui-controls/src/vuu-typeahead-input/useVuuTypeaheadInput.d.ts +49 -0
  183. package/types/vuu-utils/src/Clock.d.ts +20 -0
  184. package/types/vuu-utils/src/DataWindow.d.ts +39 -0
  185. package/types/vuu-utils/src/ShellContext.d.ts +11 -0
  186. package/types/vuu-utils/src/ThemeProvider.d.ts +32 -0
  187. package/types/vuu-utils/src/array-utils.d.ts +8 -0
  188. package/types/vuu-utils/src/box-utils.d.ts +24 -0
  189. package/types/vuu-utils/src/broadcast-channel.d.ts +16 -0
  190. package/types/vuu-utils/src/column-utils.d.ts +181 -0
  191. package/types/vuu-utils/src/common-types.d.ts +6 -0
  192. package/types/vuu-utils/src/component-registry.d.ts +65 -0
  193. package/types/vuu-utils/src/context-definitions/DataContext.d.ts +18 -0
  194. package/types/vuu-utils/src/context-definitions/DataProvider.d.ts +7 -0
  195. package/types/vuu-utils/src/context-definitions/DataSourceProvider.d.ts +12 -0
  196. package/types/vuu-utils/src/context-definitions/WorkspaceContext.d.ts +17 -0
  197. package/types/vuu-utils/src/cookie-utils.d.ts +1 -0
  198. package/types/vuu-utils/src/css-utils.d.ts +1 -0
  199. package/types/vuu-utils/src/data-utils.d.ts +19 -0
  200. package/types/vuu-utils/src/datasource/BaseDataSource.d.ts +60 -0
  201. package/types/vuu-utils/src/datasource/datasource-action-utils.d.ts +7 -0
  202. package/types/vuu-utils/src/datasource/datasource-filter-utils.d.ts +2 -0
  203. package/types/vuu-utils/src/datasource/datasource-utils.d.ts +49 -0
  204. package/types/vuu-utils/src/date/date-utils.d.ts +36 -0
  205. package/types/vuu-utils/src/date/dateTimePattern.d.ts +8 -0
  206. package/types/vuu-utils/src/date/formatter.d.ts +4 -0
  207. package/types/vuu-utils/src/date/index.d.ts +4 -0
  208. package/types/vuu-utils/src/date/types.d.ts +24 -0
  209. package/types/vuu-utils/src/debug-utils.d.ts +9 -0
  210. package/types/vuu-utils/src/event-emitter.d.ts +21 -0
  211. package/types/vuu-utils/src/feature-utils.d.ts +110 -0
  212. package/types/vuu-utils/src/filters/filter-utils.d.ts +82 -0
  213. package/types/vuu-utils/src/filters/filterAsQuery.d.ts +7 -0
  214. package/types/vuu-utils/src/filters/index.d.ts +2 -0
  215. package/types/vuu-utils/src/form-utils.d.ts +23 -0
  216. package/types/vuu-utils/src/formatting-utils.d.ts +14 -0
  217. package/types/vuu-utils/src/getUniqueId.d.ts +1 -0
  218. package/types/vuu-utils/src/group-utils.d.ts +10 -0
  219. package/types/vuu-utils/src/html-utils.d.ts +21 -0
  220. package/types/vuu-utils/src/index.d.ts +74 -0
  221. package/types/vuu-utils/src/input-utils.d.ts +2 -0
  222. package/types/vuu-utils/src/invariant.d.ts +1 -0
  223. package/types/vuu-utils/src/itemToString.d.ts +2 -0
  224. package/types/vuu-utils/src/json-types.d.ts +52 -0
  225. package/types/vuu-utils/src/json-utils.d.ts +6 -0
  226. package/types/vuu-utils/src/keyboard-utils.d.ts +15 -0
  227. package/types/vuu-utils/src/keyset.d.ts +16 -0
  228. package/types/vuu-utils/src/layout-types.d.ts +22 -0
  229. package/types/vuu-utils/src/list-utils.d.ts +2 -0
  230. package/types/vuu-utils/src/local-storage-utils.d.ts +3 -0
  231. package/types/vuu-utils/src/logging-utils.d.ts +45 -0
  232. package/types/vuu-utils/src/menu-utils.d.ts +6 -0
  233. package/types/vuu-utils/src/module-utils.d.ts +8 -0
  234. package/types/vuu-utils/src/moving-window.d.ts +18 -0
  235. package/types/vuu-utils/src/nanoid/index.d.ts +1 -0
  236. package/types/vuu-utils/src/perf-utils.d.ts +5 -0
  237. package/types/vuu-utils/src/promise-utils.d.ts +8 -0
  238. package/types/vuu-utils/src/protocol-message-utils.d.ts +34 -0
  239. package/types/vuu-utils/src/range-utils.d.ts +31 -0
  240. package/types/vuu-utils/src/react-utils.d.ts +8 -0
  241. package/types/vuu-utils/src/round-decimal.d.ts +1 -0
  242. package/types/vuu-utils/src/row-utils.d.ts +27 -0
  243. package/types/vuu-utils/src/selection-utils.d.ts +4 -0
  244. package/types/vuu-utils/src/shell-layout-types.d.ts +15 -0
  245. package/types/vuu-utils/src/sort-utils.d.ts +11 -0
  246. package/types/vuu-utils/src/table-schema-utils.d.ts +3 -0
  247. package/types/vuu-utils/src/text-utils.d.ts +2 -0
  248. package/types/vuu-utils/src/tree-types.d.ts +9 -0
  249. package/types/vuu-utils/src/tree-utils.d.ts +9 -0
  250. package/types/vuu-utils/src/ts-utils.d.ts +20 -0
  251. package/types/vuu-utils/src/typeahead-utils.d.ts +1 -0
  252. package/types/vuu-utils/src/url-utils.d.ts +2 -0
  253. package/types/vuu-utils/src/useId.d.ts +1 -0
  254. package/types/vuu-utils/src/useLayoutEffectSkipFirst.d.ts +2 -0
  255. package/types/vuu-utils/src/useStateRef.d.ts +2 -0
  256. package/types/vuu-utils/src/user-types.d.ts +4 -0
  257. /package/types/{data-editing → vuu-data-react/src/data-editing}/EditForm.d.ts +0 -0
  258. /package/types/{data-editing → vuu-data-react/src/data-editing}/UnsavedChangesReport.d.ts +0 -0
  259. /package/types/{data-editing → vuu-data-react/src/data-editing}/edit-rule-validation-checker.d.ts +0 -0
  260. /package/types/{data-editing → vuu-data-react/src/data-editing}/edit-validation-rules.d.ts +0 -0
  261. /package/types/{data-editing → vuu-data-react/src/data-editing}/form-edit-state.d.ts +0 -0
  262. /package/types/{data-editing → vuu-data-react/src/data-editing}/index.d.ts +0 -0
  263. /package/types/{data-editing → vuu-data-react/src/data-editing}/useEditForm.d.ts +0 -0
  264. /package/types/{datasource-provider → vuu-data-react/src/datasource-provider}/VuuDataSourceProvider.d.ts +0 -0
  265. /package/types/{datasource-provider → vuu-data-react/src/datasource-provider}/index.d.ts +0 -0
  266. /package/types/{datasource-provider → vuu-data-react/src/datasource-provider}/useAutoLoginToVuuServer.d.ts +0 -0
  267. /package/types/{hooks → vuu-data-react/src/hooks}/useLookupValues.d.ts +0 -0
  268. /package/types/{hooks → vuu-data-react/src/hooks}/useSessionDataSource.d.ts +0 -0
  269. /package/types/{hooks → vuu-data-react/src/hooks}/useTypeaheadSuggestions.d.ts +0 -0
  270. /package/types/{hooks → vuu-data-react/src/hooks}/useVisualLinks.d.ts +0 -0
  271. /package/types/{hooks → vuu-data-react/src/hooks}/useVuuMenuActions.d.ts +0 -0
  272. /package/types/{hooks → vuu-data-react/src/hooks}/useVuuTables.d.ts +0 -0
  273. /package/types/{session-editing-form → vuu-data-react/src/session-editing-form}/SessionEditingForm.d.ts +0 -0
  274. /package/types/{session-editing-form → vuu-data-react/src/session-editing-form}/index.d.ts +0 -0
@@ -0,0 +1,19 @@
1
+ import { MouseEvent, ReactNode } from "react";
2
+ import { TooltipProps } from "./Tooltip";
3
+ import { TooltipPlacement } from "./useTooltipAnchoredPosition";
4
+ export interface TooltipHookProps {
5
+ anchorQuery?: string;
6
+ id: string;
7
+ placement?: TooltipPlacement | TooltipPlacement[];
8
+ tooltipContent: ReactNode;
9
+ }
10
+ export declare const useTooltip: ({ anchorQuery, id: idProp, placement, tooltipContent, }: TooltipHookProps) => {
11
+ anchorProps: {
12
+ "aria-describedby": string;
13
+ onMouseEnter: (evt: MouseEvent) => void;
14
+ onMouseLeave: () => void;
15
+ };
16
+ hideTooltip: (defer?: number) => void;
17
+ showTooltip: (ref?: import("react").RefObject<HTMLElement | null>) => void;
18
+ tooltipProps: TooltipProps | undefined;
19
+ };
@@ -0,0 +1,7 @@
1
+ import { RefCallback, RefObject } from "react";
2
+ export type TooltipPlacement = "above" | "right" | "below" | "left";
3
+ export interface TooltipAnchoredPositionHookProps {
4
+ anchorElement: RefObject<HTMLElement | null>;
5
+ placement: TooltipPlacement | TooltipPlacement[];
6
+ }
7
+ export declare const useTooltipAnchoredPosition: ({ anchorElement, placement, }: TooltipAnchoredPositionHookProps) => RefCallback<HTMLDivElement>;
@@ -0,0 +1,13 @@
1
+ import { type CalendarCarouselProps } from "./internal/CalendarCarousel";
2
+ import { type CalendarNavigationProps } from "./internal/CalendarNavigation";
3
+ import { type useCalendarProps } from "./useCalendar";
4
+ export type CalendarProps = useCalendarProps & {
5
+ className?: string;
6
+ id?: string;
7
+ renderDayContents?: CalendarCarouselProps["renderDayContents"];
8
+ hideYearDropdown?: CalendarNavigationProps["hideYearDropdown"];
9
+ borderedDropdown?: CalendarNavigationProps["borderedDropdown"];
10
+ TooltipProps?: CalendarCarouselProps["TooltipProps"];
11
+ hideOutOfRangeDates?: CalendarCarouselProps["hideOutOfRangeDates"];
12
+ };
13
+ export declare const Calendar: import("react").ForwardRefExoticComponent<CalendarProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,4 @@
1
+ export * from "./Calendar";
2
+ export * from "./useCalendarDay";
3
+ export * from "./useCalendar";
4
+ export * from "./useSelection";
@@ -0,0 +1,3 @@
1
+ import { type CalendarMonthProps } from "./CalendarMonth";
2
+ export type CalendarCarouselProps = Omit<CalendarMonthProps, "date">;
3
+ export declare const CalendarCarousel: import("react").ForwardRefExoticComponent<Omit<CalendarCarouselProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,8 @@
1
+ import type { useCalendar } from "../useCalendar";
2
+ interface CalendarState {
3
+ state: ReturnType<typeof useCalendar>["state"];
4
+ helpers: ReturnType<typeof useCalendar>["helpers"];
5
+ }
6
+ declare const CalendarContext: import("react").Context<CalendarState | null>;
7
+ declare function useCalendarContext(): CalendarState;
8
+ export { CalendarContext, useCalendarContext };
@@ -0,0 +1,14 @@
1
+ import type { DateValue } from "@internationalized/date";
2
+ import { type TooltipProps } from "@salt-ds/core";
3
+ import { type ComponentPropsWithRef, type ReactElement } from "react";
4
+ import { type DayStatus } from "../useCalendarDay";
5
+ export type DateFormatter = (day: Date) => string | undefined;
6
+ export interface CalendarDayProps extends Omit<ComponentPropsWithRef<"button">, "children"> {
7
+ day: DateValue;
8
+ formatDate?: DateFormatter;
9
+ renderDayContents?: (date: DateValue, status: DayStatus) => ReactElement;
10
+ status?: DayStatus;
11
+ month: DateValue;
12
+ TooltipProps?: Partial<TooltipProps>;
13
+ }
14
+ export declare const CalendarDay: import("react").ForwardRefExoticComponent<Omit<CalendarDayProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,10 @@
1
+ import type { DateValue } from "@internationalized/date";
2
+ import { type ComponentPropsWithRef } from "react";
3
+ import { type CalendarDayProps } from "./CalendarDay";
4
+ export interface CalendarMonthProps extends ComponentPropsWithRef<"div"> {
5
+ date: DateValue;
6
+ hideOutOfRangeDates?: boolean;
7
+ renderDayContents?: CalendarDayProps["renderDayContents"];
8
+ TooltipProps?: CalendarDayProps["TooltipProps"];
9
+ }
10
+ export declare const CalendarMonth: import("react").ForwardRefExoticComponent<Omit<CalendarMonthProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,16 @@
1
+ import { type ButtonProps, type DropdownProps } from "@salt-ds/core";
2
+ import { type ComponentPropsWithRef } from "react";
3
+ import { type DateValue } from "@internationalized/date";
4
+ type dateDropdownProps = DropdownProps<DateValue>;
5
+ export interface CalendarNavigationProps extends ComponentPropsWithRef<"div"> {
6
+ MonthDropdownProps?: dateDropdownProps;
7
+ YearDropdownProps?: dateDropdownProps;
8
+ onMonthSelect?: dateDropdownProps["onChange"];
9
+ onYearSelect?: dateDropdownProps["onChange"];
10
+ borderedDropdown?: dateDropdownProps["bordered"];
11
+ onNavigateNext?: ButtonProps["onClick"];
12
+ onNavigatePrevious?: ButtonProps["onClick"];
13
+ hideYearDropdown?: boolean;
14
+ }
15
+ export declare const CalendarNavigation: import("react").ForwardRefExoticComponent<Omit<CalendarNavigationProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
16
+ export {};
@@ -0,0 +1,3 @@
1
+ import { type ComponentPropsWithRef } from "react";
2
+ export type CalendarWeekHeaderProps = ComponentPropsWithRef<"div">;
3
+ export declare const CalendarWeekHeader: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,9 @@
1
+ import { type DateValue } from "@internationalized/date";
2
+ import type { FocusEventHandler, KeyboardEventHandler, MouseEventHandler } from "react";
3
+ export declare function useFocusManagement({ date }: {
4
+ date: DateValue;
5
+ }): {
6
+ handleClick: MouseEventHandler<HTMLButtonElement>;
7
+ handleKeyDown: KeyboardEventHandler<HTMLButtonElement>;
8
+ handleFocus: FocusEventHandler<HTMLButtonElement>;
9
+ };
@@ -0,0 +1,15 @@
1
+ import { DateFormatter, type DateValue } from "@internationalized/date";
2
+ export declare function getCurrentLocale(): string;
3
+ export declare function getDateFormatter(options?: Intl.DateTimeFormatOptions): DateFormatter;
4
+ export declare function formatDate(date: DateValue, options?: Intl.DateTimeFormatOptions): string;
5
+ export declare function getCalender(): import("@internationalized/date").Calendar;
6
+ type WeekdayFormat = Intl.DateTimeFormatOptions["weekday"];
7
+ export declare function daysForLocale(weekday?: WeekdayFormat): string[];
8
+ export declare function monthsForLocale(currentYear: DateValue): (import("@internationalized/date").CalendarDate | import("@internationalized/date").CalendarDateTime | import("@internationalized/date").ZonedDateTime)[];
9
+ export declare function generateVisibleDays(currentMonth: DateValue): {
10
+ date: DateValue;
11
+ dateOfMonth: number;
12
+ isCurrentMonth: boolean;
13
+ }[];
14
+ export declare function monthDiff(a: DateValue, b: DateValue): number;
15
+ export {};
@@ -0,0 +1,54 @@
1
+ import { type DateValue } from "@internationalized/date";
2
+ import { type SyntheticEvent } from "react";
3
+ import { type UseMultiSelectionCalendarProps, type UseOffsetSelectionCalendarProps, type UseRangeSelectionCalendarProps, type UseSingleSelectionCalendarProps } from "./useSelection";
4
+ interface BaseUseCalendarProps {
5
+ defaultVisibleMonth?: DateValue;
6
+ onVisibleMonthChange?: (event: SyntheticEvent, visibleMonth: DateValue) => void;
7
+ isDayUnselectable?: (date: DateValue) => string | false | undefined;
8
+ isDayHighlighted?: (date: DateValue) => string | false | undefined;
9
+ isDayDisabled?: (date: DateValue) => boolean;
10
+ visibleMonth?: DateValue;
11
+ hideOutOfRangeDates?: boolean;
12
+ hideYearDropdown?: boolean;
13
+ minDate?: DateValue;
14
+ maxDate?: DateValue;
15
+ }
16
+ export type useCalendarProps = (Omit<UseSingleSelectionCalendarProps, "isDaySelectable"> | Omit<UseMultiSelectionCalendarProps, "isDaySelectable"> | Omit<UseRangeSelectionCalendarProps, "isDaySelectable"> | Omit<UseOffsetSelectionCalendarProps, "isDaySelectable">) & BaseUseCalendarProps;
17
+ export declare function useCalendar(props: useCalendarProps): {
18
+ state: {
19
+ selectedDate: DateValue | import("./useSelection").RangeSelectionValueType | {
20
+ startDate?: DateValue;
21
+ endDate?: DateValue;
22
+ } | DateValue[] | null | undefined;
23
+ hoveredDate: import("@internationalized/date").CalendarDate | import("@internationalized/date").CalendarDateTime | import("@internationalized/date").ZonedDateTime | null | undefined;
24
+ visibleMonth: DateValue;
25
+ focusedDate: DateValue;
26
+ minDate: DateValue | undefined;
27
+ maxDate: DateValue | undefined;
28
+ selectionVariant: "default" | "offset" | "range" | "multiselect";
29
+ hideOutOfRangeDates: boolean | undefined;
30
+ calendarFocused: boolean;
31
+ };
32
+ helpers: {
33
+ setSelectedDate: (event: SyntheticEvent<HTMLButtonElement>, newSelectedDate: DateValue) => void;
34
+ isSelected: (date: DateValue) => boolean;
35
+ setHoveredDate: (event: SyntheticEvent, date: DateValue | null) => void;
36
+ isHovered: (date: DateValue) => boolean;
37
+ isSelectedSpan: (date: DateValue) => boolean;
38
+ isHoveredSpan: (date: DateValue) => boolean;
39
+ isSelectedStart: (date: DateValue) => boolean;
40
+ isSelectedEnd: (date: DateValue) => boolean;
41
+ isHoveredOffset: (date: DateValue) => boolean;
42
+ setVisibleMonth: (event: SyntheticEvent, newVisibleMonth: DateValue) => void;
43
+ setFocusedDate: (event: SyntheticEvent, date: DateValue) => void;
44
+ setCalendarFocused: import("react").Dispatch<import("react").SetStateAction<boolean>>;
45
+ isDayUnselectable: (date: DateValue) => string | false | undefined;
46
+ isDayHighlighted: (date: DateValue) => string | false | undefined;
47
+ isDayDisabled: (date: DateValue) => boolean;
48
+ isDayVisible: (date: DateValue) => boolean;
49
+ isOutsideAllowedDates: (date: DateValue) => boolean;
50
+ isOutsideAllowedMonths: (date: DateValue) => boolean;
51
+ isOutsideAllowedYears: (date: DateValue) => boolean;
52
+ };
53
+ };
54
+ export {};
@@ -0,0 +1,22 @@
1
+ import { type DateValue } from "@internationalized/date";
2
+ import { type ComponentPropsWithoutRef, type RefObject } from "react";
3
+ export interface DayStatus {
4
+ outOfRange?: boolean;
5
+ selected?: boolean;
6
+ today?: boolean;
7
+ unselectable?: string | false;
8
+ highlighted?: string | false;
9
+ focused?: boolean;
10
+ disabled?: boolean;
11
+ hidden?: boolean;
12
+ }
13
+ export interface useCalendarDayProps {
14
+ date: DateValue;
15
+ month: DateValue;
16
+ }
17
+ export declare function useCalendarDay({ date, month }: useCalendarDayProps, ref: RefObject<HTMLElement | null>): {
18
+ status: DayStatus;
19
+ dayProps: ComponentPropsWithoutRef<"button">;
20
+ unselectableReason: string | false | undefined;
21
+ highlightedReason: string | false | undefined;
22
+ };
@@ -0,0 +1,78 @@
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 {};
@@ -0,0 +1,7 @@
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>>;
@@ -0,0 +1,12 @@
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>>;
@@ -0,0 +1,2 @@
1
+ export * from "./ColumnPicker";
2
+ export * from "./ColumnSearch";
@@ -0,0 +1,3 @@
1
+ export * from "./useControlled";
2
+ export * from "./use-resize-observer";
3
+ export * from "./selectionTypes";
@@ -0,0 +1,70 @@
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 {};
@@ -0,0 +1,16 @@
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;
@@ -0,0 +1,24 @@
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];
@@ -0,0 +1,17 @@
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;
@@ -0,0 +1,11 @@
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>>;
@@ -0,0 +1 @@
1
+ export * from "./CycleStateButton";
@@ -0,0 +1,60 @@
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>>;
@@ -0,0 +1 @@
1
+ export * from "./DateInput";
@@ -0,0 +1,66 @@
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>>;
@@ -0,0 +1,19 @@
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>;