@vuu-ui/vuu-ui-controls 0.8.10-debug → 0.8.11-debug

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 (202) hide show
  1. package/cjs/index.js +1188 -939
  2. package/cjs/index.js.map +4 -4
  3. package/esm/index.js +1052 -797
  4. package/esm/index.js.map +4 -4
  5. package/index.css +35 -3
  6. package/index.css.map +3 -3
  7. package/package.json +8 -8
  8. package/types/combo-box/ComboBox.d.ts +19 -0
  9. package/types/combo-box/useCombobox.d.ts +25 -0
  10. package/types/{vuu-ui-controls/src/common-hooks → common-hooks}/collectionTypes.d.ts +4 -4
  11. package/types/{vuu-ui-controls/src/common-hooks → common-hooks}/navigationTypes.d.ts +2 -3
  12. package/types/{vuu-ui-controls/src/common-hooks → common-hooks}/selectionTypes.d.ts +30 -14
  13. package/types/common-hooks/useSelection.d.ts +8 -0
  14. package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/drop-target-utils.d.ts +6 -6
  15. package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/useDragDisplacers.d.ts +2 -2
  16. package/types/dropdown/Dropdown.d.ts +10 -0
  17. package/types/{vuu-ui-controls/src/dropdown → dropdown}/dropdownTypes.d.ts +9 -4
  18. package/types/{vuu-ui-controls/src/dropdown → dropdown}/useClickAway.d.ts +2 -1
  19. package/types/dropdown/useDropdown.d.ts +13 -0
  20. package/types/{vuu-ui-controls/src/index.d.ts → index.d.ts} +1 -0
  21. package/types/instrument-picker/InstrumentPicker.d.ts +16 -0
  22. package/types/instrument-picker/index.d.ts +1 -0
  23. package/types/{vuu-ui-controls/src/instrument-search → instrument-picker}/useDataSource.d.ts +1 -1
  24. package/types/instrument-picker/useInstrumentPicker.d.ts +24 -0
  25. package/types/instrument-search/SearchCell.d.ts +4 -0
  26. package/types/instrument-search/moving-window.d.ts +14 -0
  27. package/types/instrument-search/useDataSource.d.ts +7 -0
  28. package/types/list/List.d.ts +7 -0
  29. package/types/list/common-hooks/useKeyboardNavigation.d.ts +3 -0
  30. package/types/list/common-hooks/utils/isSelected.d.ts +2 -0
  31. package/types/{vuu-ui-controls/src/list → list}/listTypes.d.ts +6 -12
  32. package/types/list/useList.d.ts +3 -0
  33. package/types/list/useListDrop.d.ts +15 -0
  34. package/types/{vuu-ui-controls/src/tabstrip → tabstrip}/Tab.d.ts +1 -1
  35. package/types/{vuu-ui-controls/src/tabstrip → tabstrip}/TabMenuOptions.d.ts +1 -1
  36. package/types/{vuu-ui-controls/src/tabstrip → tabstrip}/TabsTypes.d.ts +1 -1
  37. package/types/vuu-input/VuuInput.d.ts +13 -0
  38. package/types/vuu-popups/src/dialog/Dialog.d.ts +0 -8
  39. package/types/vuu-popups/src/dialog/index.d.ts +0 -1
  40. package/types/vuu-popups/src/index.d.ts +0 -8
  41. package/types/vuu-popups/src/menu/ContextMenu.d.ts +0 -16
  42. package/types/vuu-popups/src/menu/MenuList.d.ts +0 -43
  43. package/types/vuu-popups/src/menu/context-menu-provider.d.ts +0 -10
  44. package/types/vuu-popups/src/menu/index.d.ts +0 -4
  45. package/types/vuu-popups/src/menu/key-code.d.ts +0 -12
  46. package/types/vuu-popups/src/menu/list-dom-utils.d.ts +0 -4
  47. package/types/vuu-popups/src/menu/use-cascade.d.ts +0 -25
  48. package/types/vuu-popups/src/menu/use-items-with-ids-next.d.ts +0 -13
  49. package/types/vuu-popups/src/menu/use-keyboard-navigation.d.ts +0 -27
  50. package/types/vuu-popups/src/menu/useContextMenu.d.ts +0 -20
  51. package/types/vuu-popups/src/menu/utils.d.ts +0 -2
  52. package/types/vuu-popups/src/popup/Popup.d.ts +0 -10
  53. package/types/vuu-popups/src/popup/index.d.ts +0 -3
  54. package/types/vuu-popups/src/popup/popup-service.d.ts +0 -59
  55. package/types/vuu-popups/src/popup/useAnchoredPosition.d.ts +0 -12
  56. package/types/vuu-popups/src/popup-menu/PopupMenu.d.ts +0 -16
  57. package/types/vuu-popups/src/popup-menu/index.d.ts +0 -1
  58. package/types/vuu-popups/src/portal/Portal.d.ts +0 -30
  59. package/types/vuu-popups/src/portal/index.d.ts +0 -1
  60. package/types/vuu-popups/src/portal-deprecated/PortalDeprecated.d.ts +0 -8
  61. package/types/vuu-popups/src/portal-deprecated/index.d.ts +0 -3
  62. package/types/vuu-popups/src/portal-deprecated/portal-utils.d.ts +0 -1
  63. package/types/vuu-popups/src/portal-deprecated/render-portal.d.ts +0 -10
  64. package/types/vuu-popups/src/prompt/Prompt.d.ts +0 -14
  65. package/types/vuu-popups/src/prompt/index.d.ts +0 -1
  66. package/types/vuu-popups/src/tooltip/Tooltip.d.ts +0 -12
  67. package/types/vuu-popups/src/tooltip/index.d.ts +0 -2
  68. package/types/vuu-popups/src/tooltip/useAnchoredPosition.d.ts +0 -12
  69. package/types/vuu-popups/src/tooltip/useTooltip.d.ts +0 -16
  70. package/types/vuu-ui-controls/src/combo-box/ComboBox.d.ts +0 -18
  71. package/types/vuu-ui-controls/src/combo-box/useCombobox.d.ts +0 -22
  72. package/types/vuu-ui-controls/src/common-hooks/useSelection.d.ts +0 -8
  73. package/types/vuu-ui-controls/src/dropdown/Dropdown.d.ts +0 -10
  74. package/types/vuu-ui-controls/src/dropdown/useDropdown.d.ts +0 -13
  75. package/types/vuu-ui-controls/src/list/List.d.ts +0 -7
  76. package/types/vuu-ui-controls/src/list/common-hooks/useKeyboardNavigation.d.ts +0 -3
  77. package/types/vuu-ui-controls/src/list/common-hooks/utils/isSelected.d.ts +0 -2
  78. package/types/vuu-ui-controls/src/list/useList.d.ts +0 -3
  79. package/types/vuu-ui-controls/src/vuu-input/VuuInput.d.ts +0 -10
  80. package/types/vuu-utils/src/DataWindow.d.ts +0 -39
  81. package/types/vuu-utils/src/array-utils.d.ts +0 -6
  82. package/types/vuu-utils/src/box-utils.d.ts +0 -9
  83. package/types/vuu-utils/src/column-utils.d.ts +0 -130
  84. package/types/vuu-utils/src/common-types.d.ts +0 -6
  85. package/types/vuu-utils/src/component-registry.d.ts +0 -23
  86. package/types/vuu-utils/src/cookie-utils.d.ts +0 -1
  87. package/types/vuu-utils/src/data-utils.d.ts +0 -14
  88. package/types/vuu-utils/src/date-utils.d.ts +0 -7
  89. package/types/vuu-utils/src/debug-utils.d.ts +0 -9
  90. package/types/vuu-utils/src/event-emitter.d.ts +0 -13
  91. package/types/vuu-utils/src/filter-utils.d.ts +0 -14
  92. package/types/vuu-utils/src/formatting-utils.d.ts +0 -9
  93. package/types/vuu-utils/src/getUniqueId.d.ts +0 -1
  94. package/types/vuu-utils/src/group-utils.d.ts +0 -3
  95. package/types/vuu-utils/src/html-utils.d.ts +0 -12
  96. package/types/vuu-utils/src/index.d.ts +0 -34
  97. package/types/vuu-utils/src/input-utils.d.ts +0 -2
  98. package/types/vuu-utils/src/invariant.d.ts +0 -1
  99. package/types/vuu-utils/src/itemToString.d.ts +0 -2
  100. package/types/vuu-utils/src/json-utils.d.ts +0 -6
  101. package/types/vuu-utils/src/keyboard-utils.d.ts +0 -12
  102. package/types/vuu-utils/src/keyset.d.ts +0 -11
  103. package/types/vuu-utils/src/logging-utils.d.ts +0 -44
  104. package/types/vuu-utils/src/menu-utils.d.ts +0 -2
  105. package/types/vuu-utils/src/nanoid/index.d.ts +0 -1
  106. package/types/vuu-utils/src/perf-utils.d.ts +0 -5
  107. package/types/vuu-utils/src/range-utils.d.ts +0 -24
  108. package/types/vuu-utils/src/round-decimal.d.ts +0 -1
  109. package/types/vuu-utils/src/row-utils.d.ts +0 -7
  110. package/types/vuu-utils/src/screenshot-utils.d.ts +0 -6
  111. package/types/vuu-utils/src/selection-utils.d.ts +0 -27
  112. package/types/vuu-utils/src/sort-utils.d.ts +0 -5
  113. package/types/vuu-utils/src/text-utils.d.ts +0 -2
  114. package/types/vuu-utils/src/url-utils.d.ts +0 -2
  115. /package/types/{vuu-ui-controls/src/combo-box → combo-box}/index.d.ts +0 -0
  116. /package/types/{vuu-ui-controls/src/common-hooks → common-hooks}/collectionProvider.d.ts +0 -0
  117. /package/types/{vuu-ui-controls/src/common-hooks → common-hooks}/index.d.ts +0 -0
  118. /package/types/{vuu-ui-controls/src/common-hooks → common-hooks}/itemToString.d.ts +0 -0
  119. /package/types/{vuu-ui-controls/src/common-hooks → common-hooks}/use-resize-observer.d.ts +0 -0
  120. /package/types/{vuu-ui-controls/src/common-hooks → common-hooks}/useCollectionItems.d.ts +0 -0
  121. /package/types/{vuu-ui-controls/src/common-hooks → common-hooks}/useControlled.d.ts +0 -0
  122. /package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/DragDropProvider.d.ts +0 -0
  123. /package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/DragDropState.d.ts +0 -0
  124. /package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/Draggable.d.ts +0 -0
  125. /package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/DropIndicator.d.ts +0 -0
  126. /package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/dragDropTypesNext.d.ts +0 -0
  127. /package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/index.d.ts +0 -0
  128. /package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/useAutoScroll.d.ts +0 -0
  129. /package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/useDragDropIndicator.d.ts +0 -0
  130. /package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/useDragDropNaturalMovementNext.d.ts +0 -0
  131. /package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/useDragDropNext.d.ts +0 -0
  132. /package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/useDropIndicator.d.ts +0 -0
  133. /package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/useGlobalDragDrop.d.ts +0 -0
  134. /package/types/{vuu-ui-controls/src/drag-drop → drag-drop}/useTransition.d.ts +0 -0
  135. /package/types/{vuu-ui-controls/src/dropdown → dropdown}/DropdownBase.d.ts +0 -0
  136. /package/types/{vuu-ui-controls/src/dropdown → dropdown}/DropdownButton.d.ts +0 -0
  137. /package/types/{vuu-ui-controls/src/dropdown → dropdown}/index.d.ts +0 -0
  138. /package/types/{vuu-ui-controls/src/dropdown → dropdown}/useDropdownBase.d.ts +0 -0
  139. /package/types/{vuu-ui-controls/src/editable → editable}/editable-utils.d.ts +0 -0
  140. /package/types/{vuu-ui-controls/src/editable → editable}/index.d.ts +0 -0
  141. /package/types/{vuu-ui-controls/src/editable → editable}/useEditableText.d.ts +0 -0
  142. /package/types/{vuu-ui-controls/src/editable-label → editable-label}/EditableLabel.d.ts +0 -0
  143. /package/types/{vuu-ui-controls/src/editable-label → editable-label}/index.d.ts +0 -0
  144. /package/types/{vuu-ui-controls/src/expando-input → expando-input}/ExpandoInput.d.ts +0 -0
  145. /package/types/{vuu-ui-controls/src/expando-input → expando-input}/index.d.ts +0 -0
  146. /package/types/{vuu-ui-controls/src/inputs → inputs}/Checkbox.d.ts +0 -0
  147. /package/types/{vuu-ui-controls/src/inputs → inputs}/RadioButton.d.ts +0 -0
  148. /package/types/{vuu-ui-controls/src/inputs → inputs}/index.d.ts +0 -0
  149. /package/types/{vuu-ui-controls/src/instrument-search → instrument-picker}/SearchCell.d.ts +0 -0
  150. /package/types/{vuu-ui-controls/src/instrument-search → instrument-picker}/moving-window.d.ts +0 -0
  151. /package/types/{vuu-ui-controls/src/instrument-search → instrument-search}/InstrumentSearch.d.ts +0 -0
  152. /package/types/{vuu-ui-controls/src/instrument-search → instrument-search}/index.d.ts +0 -0
  153. /package/types/{vuu-ui-controls/src/list → list}/CheckboxIcon.d.ts +0 -0
  154. /package/types/{vuu-ui-controls/src/list → list}/ChevronIcon.d.ts +0 -0
  155. /package/types/{vuu-ui-controls/src/list → list}/Highlighter.d.ts +0 -0
  156. /package/types/{vuu-ui-controls/src/list → list}/ListItem.d.ts +0 -0
  157. /package/types/{vuu-ui-controls/src/list → list}/ListItemGroup.d.ts +0 -0
  158. /package/types/{vuu-ui-controls/src/list → list}/ListItemHeader.d.ts +0 -0
  159. /package/types/{vuu-ui-controls/src/list → list}/RadioIcon.d.ts +0 -0
  160. /package/types/{vuu-ui-controls/src/list → list}/VirtualizedList.d.ts +0 -0
  161. /package/types/{vuu-ui-controls/src/list → list}/common-hooks/index.d.ts +0 -0
  162. /package/types/{vuu-ui-controls/src/list → list}/common-hooks/keyUtils.d.ts +0 -0
  163. /package/types/{vuu-ui-controls/src/list → list}/common-hooks/list-dom-utils.d.ts +0 -0
  164. /package/types/{vuu-ui-controls/src/list → list}/common-hooks/useCollapsibleGroups.d.ts +0 -0
  165. /package/types/{vuu-ui-controls/src/list → list}/common-hooks/useImperativeScrollingAPI.d.ts +0 -0
  166. /package/types/{vuu-ui-controls/src/list → list}/common-hooks/useTypeahead.d.ts +0 -0
  167. /package/types/{vuu-ui-controls/src/list → list}/common-hooks/useViewportTracking.d.ts +0 -0
  168. /package/types/{vuu-ui-controls/src/list → list}/common-hooks/utils/collection-item-utils.d.ts +0 -0
  169. /package/types/{vuu-ui-controls/src/list → list}/common-hooks/utils/filter-utils.d.ts +0 -0
  170. /package/types/{vuu-ui-controls/src/list → list}/common-hooks/utils/index.d.ts +0 -0
  171. /package/types/{vuu-ui-controls/src/list → list}/index.d.ts +0 -0
  172. /package/types/{vuu-ui-controls/src/list → list}/keyset.d.ts +0 -0
  173. /package/types/{vuu-ui-controls/src/list → list}/useListHeight.d.ts +0 -0
  174. /package/types/{vuu-ui-controls/src/list → list}/useScrollPosition.d.ts +0 -0
  175. /package/types/{vuu-ui-controls/src/list → list}/useVirtualization.d.ts +0 -0
  176. /package/types/{vuu-ui-controls/src/price-ticker → price-ticker}/PriceTicker.d.ts +0 -0
  177. /package/types/{vuu-ui-controls/src/price-ticker → price-ticker}/index.d.ts +0 -0
  178. /package/types/{vuu-ui-controls/src/tabstrip → tabstrip}/TabMenu.d.ts +0 -0
  179. /package/types/{vuu-ui-controls/src/tabstrip → tabstrip}/Tabstrip.d.ts +0 -0
  180. /package/types/{vuu-ui-controls/src/tabstrip → tabstrip}/index.d.ts +0 -0
  181. /package/types/{vuu-ui-controls/src/tabstrip → tabstrip}/tabstrip-dom-utils.d.ts +0 -0
  182. /package/types/{vuu-ui-controls/src/tabstrip → tabstrip}/useAnimatedSelectionThumb.d.ts +0 -0
  183. /package/types/{vuu-ui-controls/src/tabstrip → tabstrip}/useKeyboardNavigation.d.ts +0 -0
  184. /package/types/{vuu-ui-controls/src/tabstrip → tabstrip}/useSelection.d.ts +0 -0
  185. /package/types/{vuu-ui-controls/src/tabstrip → tabstrip}/useTabstrip.d.ts +0 -0
  186. /package/types/{vuu-ui-controls/src/tree → tree}/Tree.d.ts +0 -0
  187. /package/types/{vuu-ui-controls/src/tree → tree}/hierarchical-data-utils.d.ts +0 -0
  188. /package/types/{vuu-ui-controls/src/tree → tree}/index.d.ts +0 -0
  189. /package/types/{vuu-ui-controls/src/tree → tree}/key-code.d.ts +0 -0
  190. /package/types/{vuu-ui-controls/src/tree → tree}/list-dom-utils.d.ts +0 -0
  191. /package/types/{vuu-ui-controls/src/tree → tree}/use-collapsible-groups.d.ts +0 -0
  192. /package/types/{vuu-ui-controls/src/tree → tree}/use-hierarchical-data.d.ts +0 -0
  193. /package/types/{vuu-ui-controls/src/tree → tree}/use-items-with-ids.d.ts +0 -0
  194. /package/types/{vuu-ui-controls/src/tree → tree}/use-keyboard-navigation.d.ts +0 -0
  195. /package/types/{vuu-ui-controls/src/tree → tree}/use-selection.d.ts +0 -0
  196. /package/types/{vuu-ui-controls/src/tree → tree}/use-tree-keyboard-navigation.d.ts +0 -0
  197. /package/types/{vuu-ui-controls/src/tree → tree}/use-viewport-tracking.d.ts +0 -0
  198. /package/types/{vuu-ui-controls/src/tree → tree}/useTree.d.ts +0 -0
  199. /package/types/{vuu-ui-controls/src/utils → utils}/escapeRegExp.d.ts +0 -0
  200. /package/types/{vuu-ui-controls/src/utils → utils}/forwardCallbackProps.d.ts +0 -0
  201. /package/types/{vuu-ui-controls/src/utils → utils}/index.d.ts +0 -0
  202. /package/types/{vuu-ui-controls/src/vuu-input → vuu-input}/index.d.ts +0 -0
@@ -0,0 +1 @@
1
+ export * from "./InstrumentPicker";
@@ -1,5 +1,5 @@
1
1
  import { DataSource } from "@vuu-ui/vuu-data";
2
- import { DataSourceRow } from "packages/vuu-data-types";
2
+ import { DataSourceRow } from "@vuu-ui/vuu-data-types";
3
3
  export interface DataSourceHookProps {
4
4
  dataSource: DataSource;
5
5
  instruments: string[];
@@ -0,0 +1,24 @@
1
+ import { DataSource } from "@vuu-ui/vuu-data";
2
+ import { TableRowSelectHandler } from "@vuu-ui/vuu-table";
3
+ import { ColumnMap } from "@vuu-ui/vuu-utils";
4
+ import { ChangeEvent } from "react";
5
+ export interface InstrumentPickerHookProps {
6
+ columnMap: ColumnMap;
7
+ dataSource: DataSource;
8
+ defaultIsOpen?: boolean;
9
+ isOpen?: boolean;
10
+ onSelect: TableRowSelectHandler;
11
+ searchColumns: string[];
12
+ }
13
+ export declare const useInstrumentPicker: ({ columnMap, dataSource, defaultIsOpen, isOpen: isOpenProp, onSelect, searchColumns, }: InstrumentPickerHookProps) => {
14
+ controlProps: {};
15
+ inputProps: {
16
+ onChange: (evt: ChangeEvent<HTMLInputElement>) => void;
17
+ };
18
+ isOpen: boolean;
19
+ onOpenChange: (open: any) => void;
20
+ tableHandlers: {
21
+ onSelect: TableRowSelectHandler;
22
+ };
23
+ value: string;
24
+ };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { TableCellRendererProps } from "@vuu-ui/vuu-datagrid-types";
3
+ import "./SearchCell.css";
4
+ export declare const SearchCell: ({ column, columnMap, row, }: TableCellRendererProps) => JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { DataSourceRow } from "@vuu-ui/vuu-data-types";
2
+ import { VuuRange } from "@vuu-ui/vuu-protocol-types";
3
+ export declare class MovingWindow {
4
+ data: DataSourceRow[];
5
+ rowCount: number;
6
+ private range;
7
+ constructor({ from, to }: VuuRange);
8
+ setRowCount: (rowCount: number) => void;
9
+ add(data: DataSourceRow): void;
10
+ getAtIndex(index: number): DataSourceRow | undefined;
11
+ isWithinRange(index: number): boolean;
12
+ setRange({ from, to }: VuuRange): void;
13
+ getSelectedRows(): DataSourceRow[];
14
+ }
@@ -0,0 +1,7 @@
1
+ import { DataSource } from "@vuu-ui/vuu-data";
2
+ import { DataSourceRow } from "@vuu-ui/vuu-data-types";
3
+ export interface DataSourceHookProps {
4
+ dataSource: DataSource;
5
+ instruments: string[];
6
+ }
7
+ export declare const useDataSource: ({ dataSource }: DataSourceHookProps) => DataSourceRow[];
@@ -0,0 +1,7 @@
1
+ import { ForwardedRef, ReactElement } from "react";
2
+ import { SelectionStrategy } from "../common-hooks";
3
+ import { ListProps } from "./listTypes";
4
+ import "./List.css";
5
+ export declare const List: <Item = string, S extends SelectionStrategy = "default">(props: ListProps<Item, S> & {
6
+ ref?: ForwardedRef<HTMLDivElement> | undefined;
7
+ }) => ReactElement<ListProps<Item, "default">, string | import("react").JSXElementConstructor<any>>;
@@ -0,0 +1,3 @@
1
+ import { NavigationHookProps, NavigationHookResult } from "../../common-hooks";
2
+ export declare const LIST_FOCUS_VISIBLE = -2;
3
+ export declare const useKeyboardNavigation: <Item>({ containerRef, defaultHighlightedIndex, disableHighlightOnFocus, highlightedIndex: highlightedIndexProp, indexPositions, itemCount, onHighlight, onKeyboardNavigation, restoreLastFocus, selected, viewportItemCount, }: NavigationHookProps<Item>) => NavigationHookResult;
@@ -0,0 +1,2 @@
1
+ import { CollectionItem } from "../../../common-hooks/collectionTypes";
2
+ export declare function isSelected<Item>(selectedId: string | string[] | null, item: CollectionItem<Item>): boolean;
@@ -1,6 +1,6 @@
1
1
  import React, { FocusEventHandler, ForwardedRef, HTMLAttributes, KeyboardEvent, KeyboardEventHandler, MouseEventHandler, PropsWithChildren, Ref, RefObject } from "react";
2
2
  import { ScrollingAPI, ViewportTrackingResult } from "./common-hooks";
3
- import { CollectionHookResult, ListHandlers, NavigationHookResult, SelectHandler, SelectionChangeHandler, SelectionHookResult, SelectionProps, SelectionStrategy } from "../common-hooks";
3
+ import { CollectionHookResult, ComponentSelectionProps, ListHandlers, NavigationHookResult, SelectionHookResult, SelectionStrategy } from "../common-hooks";
4
4
  import { DragHookResult, DragStartHandler, dragStrategy, DropHandler } from "../drag-drop";
5
5
  import { ViewportRange } from "./useScrollPosition";
6
6
  export type ComponentType<T = unknown> = (props: PropsWithChildren<T>) => JSX.Element;
@@ -32,7 +32,7 @@ export interface ListScrollHandles<Item> {
32
32
  scrollToItem: (item: Item) => void;
33
33
  scrollTo: (scrollOffset: number) => void;
34
34
  }
35
- export interface ListProps<Item = string, Selection extends SelectionStrategy = "default"> extends SelectionProps<Item, Selection>, Omit<HTMLAttributes<HTMLDivElement>, "onDragStart" | "onDrop" | "onSelect" | "defaultValue"> {
35
+ export interface ListProps<Item = string, S extends SelectionStrategy = "default"> extends ComponentSelectionProps<Item, S>, Omit<HTMLAttributes<HTMLDivElement>, "onDragStart" | "onDrop" | "onSelect" | "defaultValue"> {
36
36
  /**
37
37
  * The component used to render a ListItem instead of the default. This must itself render a ListItem,
38
38
  * must implement props that extend ListItemProps and must forward ListItem props to the ListItem.
@@ -146,11 +146,6 @@ export interface ListProps<Item = string, Selection extends SelectionStrategy =
146
146
  */
147
147
  restoreLastFocus?: boolean;
148
148
  scrollingApiRef?: ForwardedRef<ScrollingAPI<Item>>;
149
- /**
150
- * The keyboard keys used to effect selection, defaults to SPACE and ENTER
151
- * TODO maybe this belongs on the SelectionProps interface ?
152
- */
153
- selectionKeys?: string[];
154
149
  showEmptyMessage?: boolean;
155
150
  source?: ReadonlyArray<Item>;
156
151
  stickyHeaders?: boolean;
@@ -176,11 +171,12 @@ export interface ListControlProps {
176
171
  onMouseDownCapture: MouseEventHandler;
177
172
  onMouseLeave: MouseEventHandler;
178
173
  }
179
- export interface ListHookProps<Item, Selection extends SelectionStrategy> extends Omit<SelectionProps<string, Selection>, "onSelect" | "onSelectionChange">, Pick<ListProps, "allowDragDrop" | "collapsibleHeaders" | "disabled" | "id" | "onDragStart" | "onDrop" | "onHighlight" | "onMoveListItem" | "restoreLastFocus" | "stickyHeaders" | "tabToSelect"> {
174
+ export interface ListHookProps<Item = string, S extends SelectionStrategy = "default"> extends Pick<ListProps<Item, S>, "allowDragDrop" | "collapsibleHeaders" | "disabled" | "id" | "onDragStart" | "onDrop" | "onHighlight" | "onMoveListItem" | "onSelect" | "onSelectionChange" | "restoreLastFocus" | "selectionKeys" | "selectionStrategy" | "stickyHeaders" | "tabToSelect"> {
180
175
  collectionHook: CollectionHookResult<Item>;
181
176
  containerRef: RefObject<HTMLElement>;
182
177
  contentRef?: RefObject<HTMLElement>;
183
178
  defaultHighlightedIndex?: number;
179
+ defaultSelected?: string[];
184
180
  disableAriaActiveDescendant?: boolean;
185
181
  disableHighlightOnFocus?: boolean;
186
182
  disableTypeToSelect?: boolean;
@@ -190,13 +186,11 @@ export interface ListHookProps<Item, Selection extends SelectionStrategy> extend
190
186
  listHandlers?: ListHandlers;
191
187
  onKeyboardNavigation?: (event: React.KeyboardEvent, currentIndex: number) => void;
192
188
  onKeyDown?: (evt: KeyboardEvent) => void;
193
- onSelect?: SelectHandler<Item>;
194
- onSelectionChange?: SelectionChangeHandler<Item, Selection>;
195
189
  scrollContainerRef?: RefObject<HTMLElement>;
196
- selectionKeys?: string[];
190
+ selected?: string[];
197
191
  viewportRange?: ViewportRange;
198
192
  }
199
- export interface ListHookResult<Item, Selection extends SelectionStrategy> extends Partial<ViewportTrackingResult<Item>>, Pick<SelectionHookResult<Selection>, "selected" | "setSelected">, Partial<Omit<NavigationHookResult, "listProps">>, Omit<DragHookResult, "isDragging" | "isScrolling"> {
193
+ export interface ListHookResult<Item> extends Partial<ViewportTrackingResult<Item>>, Pick<SelectionHookResult, "selected" | "setSelected">, Partial<Omit<NavigationHookResult, "listProps">>, Omit<DragHookResult, "isDragging" | "isScrolling"> {
200
194
  keyboardNavigation: RefObject<boolean>;
201
195
  listHandlers: ListHandlers;
202
196
  listItemHeaderHandlers: Partial<ListHandlers>;
@@ -0,0 +1,3 @@
1
+ import { SelectionStrategy } from "../common-hooks";
2
+ import { ListHookProps, ListHookResult } from "./listTypes";
3
+ export declare const useList: <Item, S extends SelectionStrategy>({ allowDragDrop, collapsibleHeaders, collectionHook: dataHook, containerRef, contentRef, defaultHighlightedIndex, defaultSelected, disabled, disableAriaActiveDescendant, disableHighlightOnFocus, disableTypeToSelect, highlightedIndex: highlightedIndexProp, id, label, listHandlers: listHandlersProp, onDragStart, onDrop, onHighlight, onKeyboardNavigation, onKeyDown, onMoveListItem, onSelect, onSelectionChange, restoreLastFocus, scrollContainerRef, selected, selectionStrategy, selectionKeys, stickyHeaders, tabToSelect, viewportRange, }: ListHookProps<Item, S>) => ListHookResult<Item>;
@@ -0,0 +1,15 @@
1
+ import { CollectionHookResult } from "../common-hooks";
2
+ import { DropHandler } from "../drag-drop";
3
+ import { MoveItemHandler } from "./listTypes";
4
+ export interface ListDropProps<Item = string> {
5
+ dataHook: CollectionHookResult<Item>;
6
+ onDrop?: DropHandler;
7
+ onMoveListItem?: MoveItemHandler;
8
+ selected: string[];
9
+ setHighlightedIndex: (idx: number) => void;
10
+ setSelected: (selected: string[]) => void;
11
+ }
12
+ export declare const useListDrop: <Item>({ dataHook, onDrop, onMoveListItem, selected, setHighlightedIndex, setSelected, }: ListDropProps<Item>) => {
13
+ handleDrop: DropHandler;
14
+ onDropSettle: (toIndex: number) => void;
15
+ };
@@ -1,4 +1,4 @@
1
- import { MenuActionHandler } from "packages/vuu-data-types";
1
+ import { MenuActionHandler } from "@vuu-ui/vuu-data-types";
2
2
  import { KeyboardEvent, MouseEvent } from "react";
3
3
  import "./Tab.css";
4
4
  export declare const Tab: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLElement>, "onKeyUp" | "onClick"> & {
@@ -1,4 +1,4 @@
1
- import { ContextMenuItemDescriptor } from "packages/vuu-data-types";
1
+ import { ContextMenuItemDescriptor } from "@vuu-ui/vuu-data-types";
2
2
  export type MenuOptions = {
3
3
  [key: string]: unknown;
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import type { AriaAttributes, HTMLAttributes, KeyboardEvent, MouseEvent, ReactElement } from "react";
2
2
  import { orientationType } from "@vuu-ui/vuu-utils";
3
3
  import type { EditableLabelProps } from "../editable-label";
4
- import type { MenuActionHandler } from "packages/vuu-data-types";
4
+ import type { MenuActionHandler } from "@vuu-ui/vuu-data-types";
5
5
  export type ExitEditModeHandler = (originalValue: string, editedValue: string, allowDeactivation: boolean, tabIndex: number) => void;
6
6
  export interface FocusAPI {
7
7
  focus: () => void;
@@ -0,0 +1,13 @@
1
+ import { VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
2
+ import { InputProps } from "@salt-ds/core";
3
+ import { SyntheticEvent } from "react";
4
+ export type Commithandler<T extends VuuRowDataItemType = VuuRowDataItemType> = (evt: SyntheticEvent<HTMLInputElement>, value: T) => void;
5
+ export interface VuuInputProps<T extends VuuRowDataItemType = VuuRowDataItemType> extends InputProps {
6
+ onCommit: Commithandler<T>;
7
+ type?: T;
8
+ }
9
+ /**
10
+ * A variant of Salt Input that provides a commit callback prop,
11
+ * TODO along with cancel behaviour ?
12
+ */
13
+ export declare const VuuInput: <T extends VuuRowDataItemType = string>({ className, onCommit, onKeyDown, type, ...props }: VuuInputProps<T>) => JSX.Element;
@@ -1,8 +0,0 @@
1
- import { HTMLAttributes } from "react";
2
- import "./Dialog.css";
3
- export interface DialogProps extends HTMLAttributes<HTMLDivElement> {
4
- isOpen?: boolean;
5
- onClose?: () => void;
6
- hideCloseButton?: boolean;
7
- }
8
- export declare const Dialog: ({ children, className, isOpen, onClose, title, hideCloseButton, ...props }: DialogProps) => JSX.Element | null;
@@ -1 +0,0 @@
1
- export * from "./Dialog";
@@ -1,8 +0,0 @@
1
- export * from "./dialog";
2
- export * from "./menu";
3
- export * from "./popup";
4
- export * from "./popup-menu";
5
- export * from "./portal";
6
- export * from "./portal-deprecated";
7
- export * from "./prompt";
8
- export * from "./tooltip";
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- import { MenuListProps } from "./MenuList";
3
- import { PopupCloseCallback } from "../popup";
4
- import "./ContextMenu.css";
5
- export interface ContextMenuProps extends Omit<MenuListProps, "onCloseMenu"> {
6
- onClose?: PopupCloseCallback;
7
- position?: {
8
- x: number;
9
- y: number;
10
- };
11
- withPortal?: boolean;
12
- }
13
- export declare const ContextMenu: {
14
- ({ activatedByKeyboard, children: childrenProp, className, id: idProp, onClose, position, style, ...menuListProps }: ContextMenuProps): JSX.Element;
15
- displayName: string;
16
- };
@@ -1,43 +0,0 @@
1
- import React, { FC, HTMLAttributes, ReactElement, ReactNode } from "react";
2
- import "./MenuList.css";
3
- export declare const Separator: () => JSX.Element;
4
- export interface MenuItemGroupProps {
5
- children: ReactElement<MenuItemProps>[] | [ReactElement<MenuItemLabelProps>, ...ReactElement<MenuItemProps>[]];
6
- label?: string;
7
- }
8
- export interface MenuItemProps extends HTMLAttributes<HTMLDivElement> {
9
- action?: string;
10
- idx?: number;
11
- options?: unknown;
12
- }
13
- export declare const MenuItemGroup: FC<MenuItemGroupProps>;
14
- export declare const MenuItem: {
15
- ({ children, idx, ...props }: MenuItemProps): JSX.Element;
16
- Label: {
17
- ({ children }: {
18
- children: ReactNode;
19
- }): JSX.Element;
20
- displayName: string;
21
- };
22
- };
23
- export interface MenuItemLabelProps {
24
- children: ReactNode;
25
- }
26
- export declare const isMenuItemLabel: (item: ReactNode) => item is React.ReactElement<MenuItemLabelProps, string | React.JSXElementConstructor<any>>;
27
- export interface MenuListProps extends HTMLAttributes<HTMLDivElement> {
28
- activatedByKeyboard?: boolean;
29
- children: ReactElement[];
30
- childMenuShowing?: string;
31
- defaultHighlightedIdx?: number;
32
- highlightedIdx?: number;
33
- isRoot?: boolean;
34
- listItemProps?: Partial<MenuItemProps>;
35
- onActivate?: (menuId: string) => void;
36
- onCloseMenu: (idx: number) => void;
37
- onOpenMenu?: (menuItemEl: HTMLElement) => void;
38
- onHighlightMenuItem?: (idx: number) => void;
39
- }
40
- export declare const MenuList: {
41
- ({ activatedByKeyboard, childMenuShowing, children, className, defaultHighlightedIdx, highlightedIdx: highlightedIdxProp, id: idProp, isRoot, listItemProps, onHighlightMenuItem, onActivate, onCloseMenu, onOpenMenu, ...props }: MenuListProps): JSX.Element;
42
- displayName: string;
43
- };
@@ -1,10 +0,0 @@
1
- import type { ContextMenuContextType, MenuActionHandler, MenuBuilder } from "@vuu-ui/vuu-data-types";
2
- import { ReactNode } from "react";
3
- export declare const ContextMenuContext: import("react").Context<ContextMenuContextType | null>;
4
- export interface ContextMenuProviderProps {
5
- children: ReactNode;
6
- label?: string;
7
- menuActionHandler?: MenuActionHandler;
8
- menuBuilder: MenuBuilder;
9
- }
10
- export declare const ContextMenuProvider: ({ children, label, menuActionHandler, menuBuilder, }: ContextMenuProviderProps) => JSX.Element;
@@ -1,4 +0,0 @@
1
- export * from "./ContextMenu";
2
- export * from "./MenuList";
3
- export * from "./context-menu-provider";
4
- export * from "./useContextMenu";
@@ -1,12 +0,0 @@
1
- export declare const ArrowUp = "ArrowUp";
2
- export declare const ArrowDown = "ArrowDown";
3
- export declare const ArrowLeft = "ArrowLeft";
4
- export declare const Backspace = "Backspace";
5
- export declare const ArrowRight = "ArrowRight";
6
- export declare const Enter = "Enter";
7
- export declare const Escape = "Escape";
8
- export declare const Delete = "Delete";
9
- export declare const isCharacterKey: (evt: KeyboardEvent) => boolean | undefined;
10
- export declare const isNavigationKey: ({ key }: {
11
- key: string;
12
- }, orientation?: string) => boolean;
@@ -1,4 +0,0 @@
1
- export declare function listItemIndex(listItemEl: HTMLElement): number | undefined;
2
- export declare const closestListItem: (el: HTMLElement | null | undefined) => HTMLElement;
3
- export declare const closestListItemId: (el: HTMLElement) => string | undefined;
4
- export declare const closestListItemIndex: (el: HTMLElement) => number | undefined;
@@ -1,25 +0,0 @@
1
- import { MouseEvent } from "react";
2
- import { MenuItemProps } from "./MenuList";
3
- export type RuntimeMenuDescriptor = {
4
- id: string;
5
- left: number;
6
- top: number;
7
- };
8
- export declare const getHostMenuId: (id: string, rootId: string) => string;
9
- export interface CascadeHookProps {
10
- id: string;
11
- onActivate: (menuId: string) => void;
12
- onMouseEnterItem: (evt: MouseEvent, itemId: string) => void;
13
- position: {
14
- x: number;
15
- y: number;
16
- };
17
- }
18
- export interface CascadeHooksResult {
19
- closeMenu: () => void;
20
- handleRender: () => void;
21
- listItemProps: Partial<MenuItemProps>;
22
- openMenu: (menuItemEl: HTMLElement) => void;
23
- openMenus: RuntimeMenuDescriptor[];
24
- }
25
- export declare const useCascade: ({ id: rootId, onActivate, onMouseEnterItem, position: { x: posX, y: posY }, }: CascadeHookProps) => CascadeHooksResult;
@@ -1,13 +0,0 @@
1
- import { ReactElement } from "react";
2
- export declare const isMenuItemGroup: (child: ReactElement) => boolean;
3
- type Menus = {
4
- [key: string]: ReactElement[];
5
- };
6
- type Actions = {
7
- [key: string]: {
8
- action: string;
9
- options?: unknown;
10
- };
11
- };
12
- export declare const useItemsWithIdsNext: (childrenProp: ReactElement[], rootId: string) => [Menus, Actions];
13
- export {};
@@ -1,27 +0,0 @@
1
- import { FocusEvent, KeyboardEvent } from "react";
2
- export interface KeyboardNavigationProps {
3
- autoHighlightFirstItem?: boolean;
4
- count: number;
5
- defaultHighlightedIdx?: number;
6
- highlightedIndex?: number;
7
- onActivate: (idx: number) => void;
8
- onHighlight?: (idx: number) => void;
9
- onCloseMenu: (idx: number) => void;
10
- onOpenMenu?: (menuItemEl: HTMLElement) => void;
11
- }
12
- export interface KeyboardHookListProps {
13
- onFocus: (evt: FocusEvent) => void;
14
- onKeyDown: (evt: KeyboardEvent) => void;
15
- onMouseDownCapture: () => void;
16
- onMouseMove: () => void;
17
- onMouseLeave: () => void;
18
- }
19
- export interface NavigationHookResult {
20
- focusVisible: number;
21
- controlledHighlighting: boolean;
22
- highlightedIndex: number;
23
- setHighlightedIndex: (idx: number) => void;
24
- listProps: KeyboardHookListProps;
25
- setIgnoreFocus: (ignoreFocus: boolean) => void;
26
- }
27
- export declare const useKeyboardNavigation: ({ autoHighlightFirstItem, count, defaultHighlightedIdx, highlightedIndex: highlightedIndexProp, onActivate, onHighlight, onCloseMenu, onOpenMenu, }: KeyboardNavigationProps) => NavigationHookResult;
@@ -1,20 +0,0 @@
1
- /// <reference types="react" />
2
- import { MenuActionHandler, MenuBuilder } from "@vuu-ui/vuu-data-types";
3
- import { ContextMenuProps } from "./ContextMenu";
4
- export type ContextMenuOptions = {
5
- [key: string]: unknown;
6
- contextMenu?: JSX.Element;
7
- ContextMenuProps?: Partial<ContextMenuProps> & {
8
- className?: string;
9
- "data-mode"?: string;
10
- };
11
- controlledComponentId?: string;
12
- };
13
- export type EventLike = {
14
- clientX: number;
15
- clientY: number;
16
- preventDefault?: () => void;
17
- stopPropagation?: () => void;
18
- };
19
- export type ShowContextMenu = (e: EventLike, location: string, options: ContextMenuOptions) => void;
20
- export declare const useContextMenu: (menuBuilder?: MenuBuilder, menuActionHandler?: MenuActionHandler) => [ShowContextMenu, () => void];
@@ -1,2 +0,0 @@
1
- export declare const isRoot: (el: HTMLElement) => boolean;
2
- export declare const hasPopup: (el: HTMLElement, idx: number) => boolean;
@@ -1,10 +0,0 @@
1
- import { HTMLAttributes, RefObject } from "react";
2
- import "./Popup.css";
3
- export type PopupPlacement = "below" | "below-center" | "below-full-width" | "center" | "right";
4
- export interface PopupComponentProps extends HTMLAttributes<HTMLDivElement> {
5
- placement: PopupPlacement;
6
- anchorElement: RefObject<HTMLElement>;
7
- offsetLeft?: number;
8
- offsetTop?: number;
9
- }
10
- export declare const PopupComponent: ({ children, className, anchorElement, placement, }: PopupComponentProps) => JSX.Element | null;
@@ -1,3 +0,0 @@
1
- export * from "./popup-service";
2
- export * from "./Popup";
3
- export * from "./useAnchoredPosition";
@@ -1,59 +0,0 @@
1
- import React, { ReactElement } from "react";
2
- import { ContextMenuOptions } from "../menu";
3
- import "./popup-service.css";
4
- export type PopupCloseCallback = (reason?: PopupCloseReason) => void;
5
- export type ClickAwayClosePopup = {
6
- type: "click-away";
7
- mouseEvt: MouseEvent;
8
- };
9
- export type EscapeClosePopup = {
10
- type: "escape";
11
- event: KeyboardEvent;
12
- };
13
- export type MenuActionClosePopup = {
14
- menuId: string;
15
- options: ContextMenuOptions;
16
- type: "menu-action";
17
- };
18
- export type PopupCloseReason = ClickAwayClosePopup | EscapeClosePopup | MenuActionClosePopup;
19
- export declare const reasonIsMenuAction: (reason?: PopupCloseReason) => reason is MenuActionClosePopup;
20
- export declare const reasonIsClickAway: (reason?: PopupCloseReason) => reason is ClickAwayClosePopup;
21
- export interface ShowPopupProps {
22
- depth?: number;
23
- /**
24
- * if true, focus will be invoked on first focusable element
25
- */
26
- focus?: boolean;
27
- name?: string;
28
- group?: string;
29
- position?: "above" | "below" | "";
30
- left?: number;
31
- right?: "auto" | number;
32
- top?: number;
33
- component: ReactElement;
34
- width?: number | "auto";
35
- }
36
- export declare class PopupService {
37
- static onClose: PopupCloseCallback | undefined;
38
- static showPopup({ group, name, left, position, right, top, width, component, }: ShowPopupProps): void;
39
- static escapeKeyListener(evt: KeyboardEvent): void;
40
- static hidePopup(reason?: PopupCloseReason, name?: string, group?: string): void;
41
- static keepWithinThePage(el: HTMLElement, right?: number | "auto"): void;
42
- }
43
- export declare class DialogService {
44
- static showDialog(dialog: ReactElement): void;
45
- static closeDialog(): void;
46
- }
47
- export interface PopupProps {
48
- children: ReactElement;
49
- close?: boolean;
50
- depth: number;
51
- group?: string;
52
- name: string;
53
- position?: "above" | "below" | "";
54
- width: number;
55
- }
56
- export declare const Popup: (props: PopupProps) => React.DetailedReactHTMLElement<{
57
- className: string;
58
- ref: React.RefObject<HTMLElement>;
59
- }, HTMLElement>;
@@ -1,12 +0,0 @@
1
- import { RefObject } from "react";
2
- import { PopupPlacement } from "./Popup";
3
- export interface AnchoredPositionHookProps {
4
- anchorElement: RefObject<HTMLElement>;
5
- offsetLeft?: number;
6
- offsetTop?: number;
7
- placement: PopupPlacement;
8
- }
9
- export declare const useAnchoredPosition: ({ anchorElement, offsetLeft, offsetTop, placement, }: AnchoredPositionHookProps) => {
10
- left: number;
11
- top: number;
12
- } | undefined;
@@ -1,16 +0,0 @@
1
- import { HTMLAttributes } from "react";
2
- import { PopupCloseReason } from "@vuu-ui/vuu-popups";
3
- import "./PopupMenu.css";
4
- import { MenuActionHandler, MenuBuilder } from "@vuu-ui/vuu-data-types";
5
- export interface PopupMenuProps extends HTMLAttributes<HTMLButtonElement> {
6
- icon?: string;
7
- label?: string;
8
- menuActionHandler?: MenuActionHandler;
9
- menuBuilder?: MenuBuilder;
10
- menuLocation?: string;
11
- menuOptions?: {
12
- [key: string]: unknown;
13
- };
14
- onMenuClose?: (reason?: PopupCloseReason) => void;
15
- }
16
- export declare const PopupMenu: ({ className, label, icon, id: idProp, menuActionHandler, menuBuilder, menuLocation, menuOptions, onMenuClose, tabIndex, ...htmlAttributes }: PopupMenuProps) => JSX.Element;
@@ -1 +0,0 @@
1
- export * from "./PopupMenu";
@@ -1,30 +0,0 @@
1
- import { ReactNode } from "react";
2
- import "./Portal.css";
3
- export interface PortalProps {
4
- /**
5
- * The children to render into the `container`.
6
- */
7
- children?: ReactNode;
8
- /**
9
- * An HTML element, component instance, or function that returns either.
10
- * The `container` will have the portal children appended to it.
11
- *
12
- * By default, it uses the body of the top-level document object,
13
- * so it's simply `document.body` most of the time.
14
- */
15
- container?: Element | (() => Element | null) | null;
16
- /**
17
- * If this node does not exist on the document, it will be created for you.
18
- */
19
- id?: string;
20
- /**
21
- * Allow conditional rendering of this Portal, if false, will render nothing.
22
- * Defaults to true
23
- */
24
- open?: boolean;
25
- }
26
- /**
27
- * Portals provide a first-class way to render children into a DOM node
28
- * that exists outside the DOM hierarchy of the parent component.
29
- */
30
- export declare const Portal: ({ children, container: containerProp, id, open, }: PortalProps) => import("react").ReactPortal | null;
@@ -1 +0,0 @@
1
- export * from "./Portal";
@@ -1,8 +0,0 @@
1
- import { ReactElement } from "react";
2
- export interface PortalDeprecatedProps {
3
- children: ReactElement;
4
- onRender?: () => void;
5
- x?: number;
6
- y?: number;
7
- }
8
- export declare const PortalDeprecated: ({ children, x, y, onRender, }: PortalDeprecatedProps) => null;
@@ -1,3 +0,0 @@
1
- export * from "./PortalDeprecated";
2
- export * from "./render-portal";
3
- export * from "./portal-utils";
@@ -1 +0,0 @@
1
- export declare const installTheme: (themeId: string) => void;
@@ -1,10 +0,0 @@
1
- import { ReactElement } from "react";
2
- export interface HTMLContainerProps {
3
- className?: string;
4
- dataMode?: string;
5
- x?: number;
6
- y?: number;
7
- win?: typeof globalThis;
8
- }
9
- export declare const createContainer: (props: HTMLContainerProps) => HTMLDivElement;
10
- export declare const renderPortal: (component: ReactElement, container: HTMLElement, x: number, y: number, onRender?: () => void) => void;
@@ -1,14 +0,0 @@
1
- import { HTMLAttributes } from "react";
2
- import { PopupComponentProps } from "../popup";
3
- import "./Prompt.css";
4
- export interface PromptProps extends HTMLAttributes<HTMLDialogElement> {
5
- PopupProps?: Partial<PopupComponentProps>;
6
- cancelButtonLabel?: string;
7
- confirmButtonLabel?: string;
8
- onCancel: () => void;
9
- onConfirm: () => void;
10
- icon?: string;
11
- text: string;
12
- variant?: "warn" | "error" | "info";
13
- }
14
- export declare const Prompt: ({ PopupProps, cancelButtonLabel, confirmButtonLabel, icon, onCancel, onConfirm, style, text, title, variant, ...htmlAttributes }: PromptProps) => JSX.Element;
@@ -1 +0,0 @@
1
- export * from "./Prompt";
@@ -1,12 +0,0 @@
1
- import { MouseEventHandler, ReactNode, RefObject } from "react";
2
- import { TooltipPlacement } from "./useAnchoredPosition";
3
- import "./Tooltip.css";
4
- export interface TooltipProps {
5
- anchorElement: RefObject<HTMLElement>;
6
- children: ReactNode;
7
- id?: string;
8
- onMouseEnter: MouseEventHandler;
9
- onMouseLeave: MouseEventHandler;
10
- placement: TooltipPlacement;
11
- }
12
- export declare const Tooltip: ({ anchorElement, children, id, onMouseEnter, onMouseLeave, placement, }: TooltipProps) => JSX.Element | null;