@neo4j-ndl/react 2.16.26 → 3.0.0-alpha-4904fb7

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 (450) hide show
  1. package/lib/cjs/_common/CodeBlockWrapper.js +10 -8
  2. package/lib/cjs/_common/CodeBlockWrapper.js.map +1 -1
  3. package/lib/cjs/_common/ConditionalWrap.js +1 -1
  4. package/lib/cjs/_common/ConditionalWrap.js.map +1 -1
  5. package/lib/cjs/_common/coditionalWrap.js +1 -1
  6. package/lib/cjs/_common/coditionalWrap.js.map +1 -1
  7. package/lib/cjs/_common/input/RadioAndCheckboxWrapper.js +6 -20
  8. package/lib/cjs/_common/input/RadioAndCheckboxWrapper.js.map +1 -1
  9. package/lib/cjs/_common/messages.js +1 -2
  10. package/lib/cjs/_common/messages.js.map +1 -1
  11. package/lib/cjs/{helpers → _common}/types.js +1 -2
  12. package/lib/cjs/_common/types.js.map +1 -0
  13. package/lib/cjs/accordion/Accordion.js +24 -24
  14. package/lib/cjs/accordion/Accordion.js.map +1 -1
  15. package/lib/cjs/avatar/Avatar.js +7 -17
  16. package/lib/cjs/avatar/Avatar.js.map +1 -1
  17. package/lib/cjs/banner/Banner.js +30 -25
  18. package/lib/cjs/banner/Banner.js.map +1 -1
  19. package/lib/cjs/breadcrumbs/Breadcrumbs.js +60 -90
  20. package/lib/cjs/breadcrumbs/Breadcrumbs.js.map +1 -1
  21. package/lib/cjs/button/Button.js +17 -33
  22. package/lib/cjs/button/Button.js.map +1 -1
  23. package/lib/cjs/button/IconButton.js +13 -21
  24. package/lib/cjs/button/IconButton.js.map +1 -1
  25. package/lib/cjs/button/IconButtonArray.js +43 -22
  26. package/lib/cjs/button/IconButtonArray.js.map +1 -1
  27. package/lib/cjs/callout/Callout.js +2 -14
  28. package/lib/cjs/callout/Callout.js.map +1 -1
  29. package/lib/cjs/charts/Axis.js +216 -0
  30. package/lib/cjs/charts/Axis.js.map +1 -0
  31. package/lib/cjs/charts/CartesianGrid.js +73 -0
  32. package/lib/cjs/charts/CartesianGrid.js.map +1 -0
  33. package/lib/cjs/charts/Chart.js +538 -0
  34. package/lib/cjs/charts/Chart.js.map +1 -0
  35. package/lib/cjs/charts/ChartTooltip.js +56 -0
  36. package/lib/cjs/charts/ChartTooltip.js.map +1 -0
  37. package/lib/cjs/charts/Charts.js +99 -0
  38. package/lib/cjs/charts/Charts.js.map +1 -0
  39. package/lib/cjs/charts/Dot.js +31 -0
  40. package/lib/cjs/charts/Dot.js.map +1 -0
  41. package/lib/cjs/charts/Legend.js +180 -0
  42. package/lib/cjs/charts/Legend.js.map +1 -0
  43. package/lib/cjs/charts/Line.js +101 -0
  44. package/lib/cjs/charts/Line.js.map +1 -0
  45. package/lib/cjs/{code-block → charts}/index.js +1 -1
  46. package/lib/cjs/charts/index.js.map +1 -0
  47. package/lib/cjs/{table/TableContext.js → charts/utils.js} +18 -14
  48. package/lib/cjs/charts/utils.js.map +1 -0
  49. package/lib/cjs/checkbox/Checkbox.js +2 -14
  50. package/lib/cjs/checkbox/Checkbox.js.map +1 -1
  51. package/lib/cjs/clipboard-copier/ClipboardButton.js +16 -20
  52. package/lib/cjs/clipboard-copier/ClipboardButton.js.map +1 -1
  53. package/lib/cjs/code/Code.js +179 -0
  54. package/lib/cjs/code/Code.js.map +1 -0
  55. package/lib/cjs/{cypher-code-block → code}/index.js +1 -1
  56. package/lib/cjs/code/index.js.map +1 -0
  57. package/lib/cjs/code/languages.js +49 -0
  58. package/lib/cjs/code/languages.js.map +1 -0
  59. package/lib/cjs/context-menu/ContextMenu.js +202 -319
  60. package/lib/cjs/context-menu/ContextMenu.js.map +1 -1
  61. package/lib/cjs/data-grid/Components.js +73 -44
  62. package/lib/cjs/data-grid/Components.js.map +1 -1
  63. package/lib/cjs/data-grid/DataGrid.js +6 -6
  64. package/lib/cjs/data-grid/DataGrid.js.map +1 -1
  65. package/lib/cjs/data-grid/illustrations/NoData.js +27 -0
  66. package/lib/cjs/data-grid/illustrations/NoData.js.map +1 -0
  67. package/lib/cjs/date-picker/DatePicker.js +33 -10
  68. package/lib/cjs/date-picker/DatePicker.js.map +1 -1
  69. package/lib/cjs/dialog/Dialog.js +21 -35
  70. package/lib/cjs/dialog/Dialog.js.map +1 -1
  71. package/lib/cjs/divider/Divider.js +2 -14
  72. package/lib/cjs/divider/Divider.js.map +1 -1
  73. package/lib/cjs/drawer/Drawer.js +10 -8
  74. package/lib/cjs/drawer/Drawer.js.map +1 -1
  75. package/lib/cjs/dropdown/Dropdown.js +18 -34
  76. package/lib/cjs/dropdown/Dropdown.js.map +1 -1
  77. package/lib/cjs/dropdown/Overrides.js +6 -2
  78. package/lib/cjs/dropdown/Overrides.js.map +1 -1
  79. package/lib/cjs/dropdown-button/DropdownButton.js +2 -21
  80. package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
  81. package/lib/{types/context-menu/SafeArea.d.ts → cjs/dropdown-button/avatar-test.stories.tsx.js} +10 -18
  82. package/lib/cjs/dropdown-button/avatar-test.stories.tsx.js.map +1 -0
  83. package/lib/cjs/dropzone/Dropzone.js +4 -15
  84. package/lib/cjs/dropzone/Dropzone.js.map +1 -1
  85. package/lib/cjs/graph-label/GraphLabel.js +33 -34
  86. package/lib/cjs/graph-label/GraphLabel.js.map +1 -1
  87. package/lib/cjs/helpers/index.js +0 -1
  88. package/lib/cjs/helpers/index.js.map +1 -1
  89. package/lib/cjs/hooks/index.js +5 -3
  90. package/lib/cjs/hooks/index.js.map +1 -1
  91. package/lib/cjs/icons/generated/heroIcons.js +917 -596
  92. package/lib/cjs/icons/generated/heroIcons.js.map +1 -1
  93. package/lib/cjs/index.js +3 -5
  94. package/lib/cjs/index.js.map +1 -1
  95. package/lib/cjs/inline-edit/InlineEdit.js +12 -7
  96. package/lib/cjs/inline-edit/InlineEdit.js.map +1 -1
  97. package/lib/cjs/label/Label.js +4 -16
  98. package/lib/cjs/label/Label.js.map +1 -1
  99. package/lib/cjs/layout/Box.js +4 -16
  100. package/lib/cjs/layout/Box.js.map +1 -1
  101. package/lib/cjs/layout/Flex.js +4 -16
  102. package/lib/cjs/layout/Flex.js.map +1 -1
  103. package/lib/cjs/loading-spinner/LoadingSpinner.js +2 -13
  104. package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
  105. package/lib/cjs/modal/Modal.js +2 -2
  106. package/lib/cjs/modal/Modal.js.map +1 -1
  107. package/lib/cjs/popover/Popover.js +89 -207
  108. package/lib/cjs/popover/Popover.js.map +1 -1
  109. package/lib/cjs/popover/use-popover.js +86 -0
  110. package/lib/cjs/popover/use-popover.js.map +1 -0
  111. package/lib/cjs/progress-bar/ProgressBar.js +2 -14
  112. package/lib/cjs/progress-bar/ProgressBar.js.map +1 -1
  113. package/lib/cjs/radio/Radio.js +2 -1
  114. package/lib/cjs/radio/Radio.js.map +1 -1
  115. package/lib/cjs/segmented-control/SegmentedControl.js +6 -19
  116. package/lib/cjs/segmented-control/SegmentedControl.js.map +1 -1
  117. package/lib/cjs/side-navigation/SideNavigation.js +52 -59
  118. package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
  119. package/lib/cjs/slider/Slider.js +5 -6
  120. package/lib/cjs/slider/Slider.js.map +1 -1
  121. package/lib/cjs/status-indicator/StatusIndicator.js.map +1 -1
  122. package/lib/cjs/switch/Switch.js +13 -1
  123. package/lib/cjs/switch/Switch.js.map +1 -1
  124. package/lib/cjs/tabs/Tabs.js +11 -27
  125. package/lib/cjs/tabs/Tabs.js.map +1 -1
  126. package/lib/cjs/tag/Tag.js +5 -18
  127. package/lib/cjs/tag/Tag.js.map +1 -1
  128. package/lib/cjs/text-input/TextInput.js +14 -24
  129. package/lib/cjs/text-input/TextInput.js.map +1 -1
  130. package/lib/cjs/text-link/TextLink.js +4 -17
  131. package/lib/cjs/text-link/TextLink.js.map +1 -1
  132. package/lib/cjs/textarea/Textarea.js +6 -20
  133. package/lib/cjs/textarea/Textarea.js.map +1 -1
  134. package/lib/cjs/toast/Toast.js +2 -3
  135. package/lib/cjs/toast/Toast.js.map +1 -1
  136. package/lib/cjs/tooltip/Tooltip.js +125 -0
  137. package/lib/cjs/tooltip/Tooltip.js.map +1 -0
  138. package/lib/cjs/{tip → tooltip}/index.js +15 -16
  139. package/lib/cjs/tooltip/index.js.map +1 -0
  140. package/lib/cjs/tooltip/use-tooltip.js +78 -0
  141. package/lib/cjs/tooltip/use-tooltip.js.map +1 -0
  142. package/lib/cjs/tree-view/TreeView.js +4 -16
  143. package/lib/cjs/tree-view/TreeView.js.map +1 -1
  144. package/lib/cjs/tree-view/TreeViewTextItem.js +11 -7
  145. package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
  146. package/lib/cjs/typography/Typography.js +4 -4
  147. package/lib/cjs/typography/Typography.js.map +1 -1
  148. package/lib/cjs/widget/Widget.js +3 -15
  149. package/lib/cjs/widget/Widget.js.map +1 -1
  150. package/lib/cjs/wizard/Wizard.js +106 -80
  151. package/lib/cjs/wizard/Wizard.js.map +1 -1
  152. package/lib/esm/_common/CodeBlockWrapper.js +10 -8
  153. package/lib/esm/_common/CodeBlockWrapper.js.map +1 -1
  154. package/lib/esm/_common/ConditionalWrap.js +1 -1
  155. package/lib/esm/_common/ConditionalWrap.js.map +1 -1
  156. package/lib/esm/_common/coditionalWrap.js +1 -1
  157. package/lib/esm/_common/coditionalWrap.js.map +1 -1
  158. package/lib/esm/_common/input/RadioAndCheckboxWrapper.js +7 -21
  159. package/lib/esm/_common/input/RadioAndCheckboxWrapper.js.map +1 -1
  160. package/lib/esm/_common/messages.js +0 -1
  161. package/lib/esm/_common/messages.js.map +1 -1
  162. package/lib/esm/{helpers → _common}/types.js +0 -1
  163. package/lib/esm/_common/types.js.map +1 -0
  164. package/lib/esm/accordion/Accordion.js +25 -25
  165. package/lib/esm/accordion/Accordion.js.map +1 -1
  166. package/lib/esm/avatar/Avatar.js +7 -17
  167. package/lib/esm/avatar/Avatar.js.map +1 -1
  168. package/lib/esm/banner/Banner.js +30 -25
  169. package/lib/esm/banner/Banner.js.map +1 -1
  170. package/lib/esm/breadcrumbs/Breadcrumbs.js +39 -92
  171. package/lib/esm/breadcrumbs/Breadcrumbs.js.map +1 -1
  172. package/lib/esm/button/Button.js +11 -27
  173. package/lib/esm/button/Button.js.map +1 -1
  174. package/lib/esm/button/IconButton.js +13 -21
  175. package/lib/esm/button/IconButton.js.map +1 -1
  176. package/lib/esm/button/IconButtonArray.js +43 -22
  177. package/lib/esm/button/IconButtonArray.js.map +1 -1
  178. package/lib/esm/callout/Callout.js +2 -14
  179. package/lib/esm/callout/Callout.js.map +1 -1
  180. package/lib/esm/charts/Axis.js +187 -0
  181. package/lib/esm/charts/Axis.js.map +1 -0
  182. package/lib/esm/charts/CartesianGrid.js +66 -0
  183. package/lib/esm/charts/CartesianGrid.js.map +1 -0
  184. package/lib/esm/charts/Chart.js +517 -0
  185. package/lib/esm/charts/Chart.js.map +1 -0
  186. package/lib/esm/charts/ChartTooltip.js +50 -0
  187. package/lib/esm/charts/ChartTooltip.js.map +1 -0
  188. package/lib/esm/charts/Charts.js +96 -0
  189. package/lib/esm/charts/Charts.js.map +1 -0
  190. package/lib/esm/charts/Dot.js +28 -0
  191. package/lib/esm/charts/Dot.js.map +1 -0
  192. package/lib/esm/charts/Legend.js +174 -0
  193. package/lib/esm/charts/Legend.js.map +1 -0
  194. package/lib/esm/charts/Line.js +75 -0
  195. package/lib/esm/charts/Line.js.map +1 -0
  196. package/lib/esm/charts/index.js +22 -0
  197. package/lib/esm/charts/index.js.map +1 -0
  198. package/lib/esm/{table/TableContext.js → charts/utils.js} +16 -11
  199. package/lib/esm/charts/utils.js.map +1 -0
  200. package/lib/esm/checkbox/Checkbox.js +2 -14
  201. package/lib/esm/checkbox/Checkbox.js.map +1 -1
  202. package/lib/esm/clipboard-copier/ClipboardButton.js +16 -20
  203. package/lib/esm/clipboard-copier/ClipboardButton.js.map +1 -1
  204. package/lib/esm/code/Code.js +150 -0
  205. package/lib/esm/code/Code.js.map +1 -0
  206. package/lib/{types/text-input-preview/index.d.ts → esm/code/index.js} +2 -1
  207. package/lib/esm/code/index.js.map +1 -0
  208. package/lib/esm/code/languages.js +46 -0
  209. package/lib/esm/code/languages.js.map +1 -0
  210. package/lib/esm/context-menu/ContextMenu.js +198 -295
  211. package/lib/esm/context-menu/ContextMenu.js.map +1 -1
  212. package/lib/esm/data-grid/Components.js +69 -43
  213. package/lib/esm/data-grid/Components.js.map +1 -1
  214. package/lib/esm/data-grid/DataGrid.js +6 -6
  215. package/lib/esm/data-grid/DataGrid.js.map +1 -1
  216. package/lib/esm/data-grid/illustrations/NoData.js +25 -0
  217. package/lib/esm/data-grid/illustrations/NoData.js.map +1 -0
  218. package/lib/esm/date-picker/DatePicker.js +33 -10
  219. package/lib/esm/date-picker/DatePicker.js.map +1 -1
  220. package/lib/esm/dialog/Dialog.js +21 -35
  221. package/lib/esm/dialog/Dialog.js.map +1 -1
  222. package/lib/esm/divider/Divider.js +2 -14
  223. package/lib/esm/divider/Divider.js.map +1 -1
  224. package/lib/esm/drawer/Drawer.js +11 -9
  225. package/lib/esm/drawer/Drawer.js.map +1 -1
  226. package/lib/esm/dropdown/Dropdown.js +18 -34
  227. package/lib/esm/dropdown/Dropdown.js.map +1 -1
  228. package/lib/esm/dropdown/Overrides.js +6 -2
  229. package/lib/esm/dropdown/Overrides.js.map +1 -1
  230. package/lib/esm/dropdown-button/DropdownButton.js +2 -21
  231. package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
  232. package/lib/esm/dropdown-button/avatar-test.stories.tsx.js +27 -0
  233. package/lib/esm/dropdown-button/avatar-test.stories.tsx.js.map +1 -0
  234. package/lib/esm/dropzone/Dropzone.js +4 -15
  235. package/lib/esm/dropzone/Dropzone.js.map +1 -1
  236. package/lib/esm/graph-label/GraphLabel.js +33 -34
  237. package/lib/esm/graph-label/GraphLabel.js.map +1 -1
  238. package/lib/esm/helpers/index.js +0 -1
  239. package/lib/esm/helpers/index.js.map +1 -1
  240. package/lib/esm/hooks/index.js +1 -1
  241. package/lib/esm/hooks/index.js.map +1 -1
  242. package/lib/esm/icons/generated/heroIcons.js +904 -584
  243. package/lib/esm/icons/generated/heroIcons.js.map +1 -1
  244. package/lib/esm/index.js +3 -5
  245. package/lib/esm/index.js.map +1 -1
  246. package/lib/esm/inline-edit/InlineEdit.js +12 -7
  247. package/lib/esm/inline-edit/InlineEdit.js.map +1 -1
  248. package/lib/esm/label/Label.js +4 -16
  249. package/lib/esm/label/Label.js.map +1 -1
  250. package/lib/esm/layout/Box.js +6 -18
  251. package/lib/esm/layout/Box.js.map +1 -1
  252. package/lib/esm/layout/Flex.js +5 -17
  253. package/lib/esm/layout/Flex.js.map +1 -1
  254. package/lib/esm/loading-spinner/LoadingSpinner.js +2 -13
  255. package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
  256. package/lib/esm/modal/Modal.js +2 -2
  257. package/lib/esm/modal/Modal.js.map +1 -1
  258. package/lib/esm/popover/Popover.js +64 -204
  259. package/lib/esm/popover/Popover.js.map +1 -1
  260. package/lib/esm/popover/use-popover.js +83 -0
  261. package/lib/esm/popover/use-popover.js.map +1 -0
  262. package/lib/esm/progress-bar/ProgressBar.js +2 -14
  263. package/lib/esm/progress-bar/ProgressBar.js.map +1 -1
  264. package/lib/esm/radio/Radio.js +2 -1
  265. package/lib/esm/radio/Radio.js.map +1 -1
  266. package/lib/esm/segmented-control/SegmentedControl.js +7 -20
  267. package/lib/esm/segmented-control/SegmentedControl.js.map +1 -1
  268. package/lib/esm/side-navigation/SideNavigation.js +52 -59
  269. package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
  270. package/lib/esm/slider/Slider.js +5 -6
  271. package/lib/esm/slider/Slider.js.map +1 -1
  272. package/lib/esm/status-indicator/StatusIndicator.js.map +1 -1
  273. package/lib/esm/switch/Switch.js +13 -1
  274. package/lib/esm/switch/Switch.js.map +1 -1
  275. package/lib/esm/tabs/Tabs.js +12 -28
  276. package/lib/esm/tabs/Tabs.js.map +1 -1
  277. package/lib/esm/tag/Tag.js +5 -18
  278. package/lib/esm/tag/Tag.js.map +1 -1
  279. package/lib/esm/text-input/TextInput.js +14 -24
  280. package/lib/esm/text-input/TextInput.js.map +1 -1
  281. package/lib/esm/text-link/TextLink.js +4 -17
  282. package/lib/esm/text-link/TextLink.js.map +1 -1
  283. package/lib/esm/textarea/Textarea.js +6 -20
  284. package/lib/esm/textarea/Textarea.js.map +1 -1
  285. package/lib/esm/toast/Toast.js +2 -3
  286. package/lib/esm/toast/Toast.js.map +1 -1
  287. package/lib/esm/tooltip/Tooltip.js +119 -0
  288. package/lib/esm/tooltip/Tooltip.js.map +1 -0
  289. package/lib/esm/{tip → tooltip}/index.js +0 -1
  290. package/lib/esm/tooltip/index.js.map +1 -0
  291. package/lib/esm/tooltip/use-tooltip.js +73 -0
  292. package/lib/esm/tooltip/use-tooltip.js.map +1 -0
  293. package/lib/esm/tree-view/TreeView.js +4 -16
  294. package/lib/esm/tree-view/TreeView.js.map +1 -1
  295. package/lib/esm/tree-view/TreeViewTextItem.js +11 -7
  296. package/lib/esm/tree-view/TreeViewTextItem.js.map +1 -1
  297. package/lib/esm/typography/Typography.js +5 -5
  298. package/lib/esm/typography/Typography.js.map +1 -1
  299. package/lib/esm/widget/Widget.js +3 -15
  300. package/lib/esm/widget/Widget.js.map +1 -1
  301. package/lib/esm/wizard/Wizard.js +83 -76
  302. package/lib/esm/wizard/Wizard.js.map +1 -1
  303. package/lib/types/_common/CodeBlockWrapper.d.ts +10 -6
  304. package/lib/types/_common/ConditionalWrap.d.ts +2 -2
  305. package/lib/types/_common/coditionalWrap.d.ts +2 -2
  306. package/lib/types/_common/input/RadioAndCheckboxWrapper.d.ts +15 -4
  307. package/lib/types/_common/input/types.d.ts +7 -9
  308. package/lib/types/_common/messages.d.ts +0 -1
  309. package/lib/types/_common/types.d.ts +40 -0
  310. package/lib/types/accordion/Accordion.d.ts +15 -9
  311. package/lib/types/avatar/Avatar.d.ts +14 -7
  312. package/lib/types/banner/Banner.d.ts +39 -19
  313. package/lib/types/breadcrumbs/Breadcrumbs.d.ts +18 -21
  314. package/lib/types/button/Button.d.ts +35 -13
  315. package/lib/types/button/IconButton.d.ts +31 -12
  316. package/lib/types/button/IconButtonArray.d.ts +20 -15
  317. package/lib/types/callout/Callout.d.ts +6 -3
  318. package/lib/types/charts/Axis.d.ts +37 -0
  319. package/lib/types/{tip/Tooltip.d.ts → charts/CartesianGrid.d.ts} +7 -6
  320. package/lib/types/charts/Chart.d.ts +105 -0
  321. package/lib/types/charts/ChartTooltip.d.ts +59 -0
  322. package/lib/types/charts/Charts.d.ts +94 -0
  323. package/lib/types/charts/Dot.d.ts +27 -0
  324. package/lib/types/charts/Legend.d.ts +25 -0
  325. package/lib/types/charts/Line.d.ts +43 -0
  326. package/lib/types/{code-block → charts}/index.d.ts +1 -1
  327. package/lib/{esm/cypher-code-block/index.js → types/charts/utils.d.ts} +3 -2
  328. package/lib/types/clipboard-copier/ClipboardButton.d.ts +6 -4
  329. package/lib/types/{code-block/CodeBlock.d.ts → code/Code.d.ts} +29 -7
  330. package/lib/types/{cypher-code-block → code}/index.d.ts +1 -1
  331. package/lib/types/code/languages.d.ts +22 -0
  332. package/lib/types/context-menu/ContextMenu.d.ts +43 -66
  333. package/lib/types/data-grid/Components.d.ts +12 -5
  334. package/lib/types/data-grid/DataGrid.d.ts +8 -5
  335. package/lib/types/data-grid/DataGridContext.d.ts +3 -3
  336. package/lib/types/data-grid/datagrid-types.d.ts +3 -3
  337. package/lib/types/data-grid/illustrations/NoData.d.ts +23 -0
  338. package/lib/types/date-picker/DatePicker.d.ts +6 -6
  339. package/lib/types/dialog/Dialog.d.ts +14 -10
  340. package/lib/types/divider/Divider.d.ts +6 -3
  341. package/lib/types/drawer/Drawer.d.ts +11 -8
  342. package/lib/types/dropdown/Dropdown.d.ts +4 -1
  343. package/lib/types/dropdown/Overrides.d.ts +1 -1
  344. package/lib/types/dropdown/types.d.ts +5 -6
  345. package/lib/types/dropdown-button/DropdownButton.d.ts +7 -2
  346. package/lib/{esm/code-block/index.js → types/dropdown-button/avatar-test.stories.tsx.d.ts} +3 -2
  347. package/lib/types/dropzone/Dropzone.d.ts +8 -2
  348. package/lib/types/graph-label/GraphLabel.d.ts +18 -7
  349. package/lib/types/helpers/index.d.ts +0 -1
  350. package/lib/types/hooks/index.d.ts +1 -1
  351. package/lib/types/icons/generated/heroIcons.d.ts +256 -0
  352. package/lib/types/index.d.ts +3 -5
  353. package/lib/types/inline-edit/InlineEdit.d.ts +5 -2
  354. package/lib/types/label/Label.d.ts +4 -3
  355. package/lib/types/layout/Box.d.ts +6 -10
  356. package/lib/types/layout/Flex.d.ts +6 -11
  357. package/lib/types/loading-spinner/LoadingSpinner.d.ts +2 -0
  358. package/lib/types/modal/Modal.d.ts +6 -4
  359. package/lib/types/popover/Popover.d.ts +37 -66
  360. package/lib/types/popover/index.d.ts +4 -0
  361. package/lib/types/popover/use-popover.d.ts +44 -0
  362. package/lib/types/portal/Portal.d.ts +1 -1
  363. package/lib/types/progress-bar/ProgressBar.d.ts +5 -2
  364. package/lib/types/segmented-control/SegmentedControl.d.ts +11 -5
  365. package/lib/types/side-navigation/SideNavigation.d.ts +35 -19
  366. package/lib/types/slider/Slider.d.ts +7 -4
  367. package/lib/types/status-indicator/StatusIndicator.d.ts +4 -2
  368. package/lib/types/tabs/Tabs.d.ts +10 -19
  369. package/lib/types/tag/Tag.d.ts +9 -7
  370. package/lib/types/text-input/TextInput.d.ts +18 -10
  371. package/lib/types/text-link/TextLink.d.ts +8 -6
  372. package/lib/types/textarea/Textarea.d.ts +11 -4
  373. package/lib/types/toast/Toast.d.ts +3 -0
  374. package/lib/types/tooltip/Tooltip.d.ts +80 -0
  375. package/lib/types/{tip → tooltip}/index.d.ts +0 -1
  376. package/lib/types/tooltip/use-tooltip.d.ts +38 -0
  377. package/lib/types/tree-view/TreeView.d.ts +7 -3
  378. package/lib/types/tree-view/tree-view-types.d.ts +2 -2
  379. package/lib/types/typography/Typography.d.ts +16 -5
  380. package/lib/types/widget/Widget.d.ts +3 -0
  381. package/lib/types/wizard/Wizard.d.ts +18 -10
  382. package/package.json +38 -36
  383. package/lib/cjs/code-block/CodeBlock.js +0 -105
  384. package/lib/cjs/code-block/CodeBlock.js.map +0 -1
  385. package/lib/cjs/code-block/index.js.map +0 -1
  386. package/lib/cjs/code-block/languages.js +0 -303
  387. package/lib/cjs/code-block/languages.js.map +0 -1
  388. package/lib/cjs/context-menu/SafeArea.js +0 -84
  389. package/lib/cjs/context-menu/SafeArea.js.map +0 -1
  390. package/lib/cjs/cypher-code-block/CypherCodeBlock.js +0 -74
  391. package/lib/cjs/cypher-code-block/CypherCodeBlock.js.map +0 -1
  392. package/lib/cjs/cypher-code-block/index.js.map +0 -1
  393. package/lib/cjs/helpers/types.js.map +0 -1
  394. package/lib/cjs/table/Components.js +0 -264
  395. package/lib/cjs/table/Components.js.map +0 -1
  396. package/lib/cjs/table/Table.js +0 -100
  397. package/lib/cjs/table/Table.js.map +0 -1
  398. package/lib/cjs/table/TableContext.js.map +0 -1
  399. package/lib/cjs/table/helpers.js +0 -86
  400. package/lib/cjs/table/helpers.js.map +0 -1
  401. package/lib/cjs/table/index.js +0 -55
  402. package/lib/cjs/table/index.js.map +0 -1
  403. package/lib/cjs/text-input-preview/TextInputPreview.js +0 -75
  404. package/lib/cjs/text-input-preview/TextInputPreview.js.map +0 -1
  405. package/lib/cjs/text-input-preview/index.js +0 -38
  406. package/lib/cjs/text-input-preview/index.js.map +0 -1
  407. package/lib/cjs/tip/Tip.js +0 -196
  408. package/lib/cjs/tip/Tip.js.map +0 -1
  409. package/lib/cjs/tip/Tooltip.js +0 -56
  410. package/lib/cjs/tip/Tooltip.js.map +0 -1
  411. package/lib/cjs/tip/index.js.map +0 -1
  412. package/lib/esm/code-block/CodeBlock.js +0 -79
  413. package/lib/esm/code-block/CodeBlock.js.map +0 -1
  414. package/lib/esm/code-block/index.js.map +0 -1
  415. package/lib/esm/code-block/languages.js +0 -302
  416. package/lib/esm/code-block/languages.js.map +0 -1
  417. package/lib/esm/context-menu/SafeArea.js +0 -81
  418. package/lib/esm/context-menu/SafeArea.js.map +0 -1
  419. package/lib/esm/cypher-code-block/CypherCodeBlock.js +0 -48
  420. package/lib/esm/cypher-code-block/CypherCodeBlock.js.map +0 -1
  421. package/lib/esm/cypher-code-block/index.js.map +0 -1
  422. package/lib/esm/helpers/types.js.map +0 -1
  423. package/lib/esm/table/Components.js +0 -244
  424. package/lib/esm/table/Components.js.map +0 -1
  425. package/lib/esm/table/Table.js +0 -97
  426. package/lib/esm/table/Table.js.map +0 -1
  427. package/lib/esm/table/TableContext.js.map +0 -1
  428. package/lib/esm/table/helpers.js +0 -81
  429. package/lib/esm/table/helpers.js.map +0 -1
  430. package/lib/esm/table/index.js +0 -25
  431. package/lib/esm/table/index.js.map +0 -1
  432. package/lib/esm/text-input-preview/TextInputPreview.js +0 -72
  433. package/lib/esm/text-input-preview/TextInputPreview.js.map +0 -1
  434. package/lib/esm/text-input-preview/index.js +0 -22
  435. package/lib/esm/text-input-preview/index.js.map +0 -1
  436. package/lib/esm/tip/Tip.js +0 -186
  437. package/lib/esm/tip/Tip.js.map +0 -1
  438. package/lib/esm/tip/Tooltip.js +0 -50
  439. package/lib/esm/tip/Tooltip.js.map +0 -1
  440. package/lib/esm/tip/index.js.map +0 -1
  441. package/lib/types/code-block/languages.d.ts +0 -23
  442. package/lib/types/cypher-code-block/CypherCodeBlock.d.ts +0 -33
  443. package/lib/types/helpers/types.d.ts +0 -42
  444. package/lib/types/table/Components.d.ts +0 -81
  445. package/lib/types/table/Table.d.ts +0 -62
  446. package/lib/types/table/TableContext.d.ts +0 -61
  447. package/lib/types/table/helpers.d.ts +0 -39
  448. package/lib/types/table/index.d.ts +0 -24
  449. package/lib/types/text-input-preview/TextInputPreview.d.ts +0 -59
  450. package/lib/types/tip/Tip.d.ts +0 -168
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import React from 'react';
22
- import { type ElementBase } from '../helpers';
22
+ import { type HtmlAttributes, type PolymorphicComponentPropsWithRef } from '../_common/types';
23
23
  /**
24
24
  *
25
25
  *
@@ -27,19 +27,22 @@ import { type ElementBase } from '../helpers';
27
27
  *
28
28
  *
29
29
  */
30
- export interface BannerActionsProps extends React.HTMLProps<HTMLAnchorElement> {
30
+ export type BannerActionsProps = {
31
31
  /** Label of the action item */
32
32
  label: string;
33
+ children?: React.ReactNode;
34
+ } & ({
35
+ as: 'button';
33
36
  /** Event handler when the action button is clicked. If set, the element is rendered as `button` */
34
37
  onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
35
- /** Link to redirect to when the action button is clicked. If set, the element is rendered as `a`. Ignored if `onClose` prop is passed */
38
+ } | {
39
+ as?: 'a';
36
40
  href?: string;
37
- /** Sets how to open the link. Only applicable when `href` is passed */
38
- target?: '_blank' | '_self' | '_parent' | '_top';
39
- }
40
- export interface BannerCommonProps extends Omit<ElementBase, 'title'> {
41
- /** Type of the banner */
42
- type?: BannerType;
41
+ } | {
42
+ as: React.ElementType;
43
+ });
44
+ type BannerActionsComponent = <T extends React.ElementType = 'a'>(props: PolymorphicComponentPropsWithRef<T, BannerActionsProps>) => React.ReactNode | null;
45
+ export interface BannerCommonProps {
43
46
  /** Title of the banner */
44
47
  title?: string | React.ReactNode;
45
48
  /**
@@ -49,30 +52,47 @@ export interface BannerCommonProps extends Omit<ElementBase, 'title'> {
49
52
  name?: string;
50
53
  /** Description of the banner. Will be ignored if `children` is passed */
51
54
  description?: string | React.ReactNode;
52
- /** Alternative for `description` */
53
- children?: React.ReactNode;
54
55
  /** Shows status icon. Icon is automatically picked based on `type` value */
55
- icon?: boolean;
56
+ hasIcon?: boolean;
56
57
  /** Shows Action buttons in the footer */
57
58
  actions?: BannerActionsProps[];
58
- /** Adds shadow */
59
- floating?: boolean;
59
+ htmlAttributes?: HtmlAttributes<'div'>;
60
+ children?: React.ReactNode;
61
+ className?: string;
60
62
  }
63
+ type BannerInlineProps = {
64
+ /** How the banner is used */
65
+ usage?: 'inline';
66
+ /** Type of the banner */
67
+ type?: BannerType;
68
+ };
69
+ type BannerGlobalProps = {
70
+ /** How the banner is used */
71
+ usage: 'global';
72
+ /** Type of the banner */
73
+ type?: BannerType;
74
+ };
75
+ type BannerFullWidthProps = {
76
+ /** How the banner is used */
77
+ usage: 'full-width';
78
+ /** Type of the banner */
79
+ type?: Exclude<BannerType, 'success'>;
80
+ };
81
+ type BannerUsageProps = BannerInlineProps | BannerGlobalProps | BannerFullWidthProps;
61
82
  type CloseableBannerProps = {
62
83
  /** Shows close icon. Expects onClose to be passed */
63
- closeable: true;
84
+ isCloseable: true;
64
85
  /** Event handler when close icon is clicked */
65
86
  onClose: (e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
66
87
  };
67
88
  type NonCloseableBannerProps = {
68
- closeable?: false;
89
+ isCloseable?: false;
69
90
  onClose?: never;
70
91
  };
71
92
  type BannerCloseProps = CloseableBannerProps | NonCloseableBannerProps;
72
- export type BannerProps = BannerCommonProps & BannerCloseProps;
93
+ export type BannerProps = BannerCommonProps & BannerCloseProps & BannerUsageProps;
73
94
  export type BannerType = 'info' | 'success' | 'warning' | 'danger' | 'neutral';
74
- export type BannerNonIconType = Exclude<BannerType, 'neutral'>;
75
95
  declare const BannerNamespace: React.ForwardRefExoticComponent<BannerProps & React.RefAttributes<HTMLDivElement>> & {
76
- Actions: ({ label, ...restProps }: BannerActionsProps) => import("react/jsx-runtime").JSX.Element;
96
+ Actions: BannerActionsComponent;
77
97
  };
78
98
  export { BannerNamespace as Banner };
@@ -20,16 +20,16 @@
20
20
  */
21
21
  import React from 'react';
22
22
  import { type ContextMenuProps } from '../context-menu';
23
+ import { type PolymorphicComponentProps, type PolymorphicComponentPropsWithRef, type HtmlAttributes } from '../_common/types';
23
24
  export interface BreadcrumbsBaseItemProps extends Omit<React.HTMLProps<HTMLLIElement>, 'as' | 'onClick'> {
24
- as?: string | React.ComponentType<any>;
25
25
  children?: React.ReactNode;
26
26
  className?: string;
27
27
  href: string;
28
28
  isCurrentPage?: boolean;
29
29
  onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>, href: string) => void;
30
30
  }
31
+ type BreadcrumbsBaseItemComponent = <T extends React.ElementType = 'div'>(props: PolymorphicComponentPropsWithRef<T, BreadcrumbsBaseItemProps>) => React.ReactNode | null;
31
32
  export interface BreadcrumbsGroupItemProps extends Omit<React.HTMLProps<HTMLLIElement>, 'as'> {
32
- as?: string | React.ComponentType<any>;
33
33
  children?: React.ReactNode;
34
34
  className?: string;
35
35
  }
@@ -42,19 +42,23 @@ export interface BreadcrumbsItemProps extends Omit<React.HTMLProps<HTMLLIElement
42
42
  isCurrentPage?: boolean;
43
43
  onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>, href: string) => void;
44
44
  }
45
- export interface BreadcrumbsItemMenuProps extends Omit<ContextMenuProps, 'open'> {
45
+ export interface BreadcrumbsItemMenuProps extends Omit<ContextMenuProps, 'isOpen' | 'onClick' | 'onClose'> {
46
46
  children: React.ReactNode;
47
47
  className?: string;
48
48
  isOpen?: boolean;
49
49
  onClick?: (event: React.MouseEvent<HTMLElement> | undefined) => void;
50
- onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
50
+ onClose?: (event?: Event) => void;
51
+ /** HTML attributes */
52
+ htmlAttributes?: HtmlAttributes<'button'>;
51
53
  }
52
- export interface BreadcrumbsEllipsisMenuProps extends Omit<ContextMenuProps, 'open'> {
54
+ export interface BreadcrumbsEllipsisMenuProps extends Omit<ContextMenuProps, 'isOpen' | 'onClose'> {
53
55
  isOpen?: boolean;
54
- onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
56
+ onClose?: (event?: Event) => void;
57
+ onKeyDown?: (event: React.KeyboardEvent<HTMLElement>) => void;
58
+ onClick?: (event: React.MouseEvent<HTMLElement>) => void;
55
59
  }
60
+ type BreadcrumbsEllipsisMenuComponent = <T extends React.ElementType = 'span'>(props: PolymorphicComponentPropsWithRef<T, BreadcrumbsEllipsisMenuProps>) => React.ReactNode | null;
56
61
  export interface BreadcrumbsMenuItemProps extends Omit<React.HTMLProps<HTMLLIElement>, 'as' | 'onClick'> {
57
- as?: string | React.ComponentType<any>;
58
62
  children: React.ReactNode;
59
63
  className?: string;
60
64
  href?: string;
@@ -62,36 +66,29 @@ export interface BreadcrumbsMenuItemProps extends Omit<React.HTMLProps<HTMLLIEle
62
66
  onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>, href?: string) => void;
63
67
  }
64
68
  export interface BreadcrumbsProps {
65
- as?: string | React.ComponentType<any>;
66
69
  children?: React.ReactNode;
67
70
  className?: string;
68
71
  }
69
72
  declare const Breadcrumbs: {
70
- ({ as, children, className, ...restProps }: BreadcrumbsProps): import("react/jsx-runtime").JSX.Element;
73
+ <T extends React.ElementType = "nav">({ as, children, className, htmlAttributes, }: PolymorphicComponentProps<T, BreadcrumbsMenuItemProps>): import("react/jsx-runtime").JSX.Element;
71
74
  displayName: string;
72
75
  } & {
73
- BaseItem: {
74
- ({ as, children, className, href, isCurrentPage, onClick, ...restProps }: BreadcrumbsBaseItemProps): import("react/jsx-runtime").JSX.Element;
75
- displayName: string;
76
- };
76
+ BaseItem: BreadcrumbsBaseItemComponent;
77
77
  GroupItem: {
78
- ({ as, children, className, ...restProps }: BreadcrumbsGroupItemProps): import("react/jsx-runtime").JSX.Element;
78
+ <T extends React.ElementType = "li">({ as, children, className, htmlAttributes, }: PolymorphicComponentProps<T, BreadcrumbsGroupItemProps>): import("react/jsx-runtime").JSX.Element;
79
79
  displayName: string;
80
80
  };
81
81
  Item: {
82
- ({ as, children, className, hasSeparator, href, isCurrentPage, onClick, ...restProps }: BreadcrumbsItemProps): import("react/jsx-runtime").JSX.Element;
82
+ <T extends React.ElementType = "a">({ as, children, className, hasSeparator, href, isCurrentPage, onClick, htmlAttributes, }: PolymorphicComponentProps<T, BreadcrumbsItemProps>): import("react/jsx-runtime").JSX.Element;
83
83
  displayName: string;
84
84
  };
85
85
  ItemMenu: {
86
- ({ children, className, isOpen, onClick, onClose, ...restProps }: BreadcrumbsItemMenuProps): import("react/jsx-runtime").JSX.Element;
87
- displayName: string;
88
- };
89
- EllipsisMenu: {
90
- ({ as, children, className, isOpen, onClick, onClose, onKeyDown, ...restProps }: BreadcrumbsEllipsisMenuProps): import("react/jsx-runtime").JSX.Element;
86
+ ({ children, className, isOpen, onClick, onClose, htmlAttributes, }: BreadcrumbsItemMenuProps): import("react/jsx-runtime").JSX.Element;
91
87
  displayName: string;
92
88
  };
89
+ EllipsisMenu: BreadcrumbsEllipsisMenuComponent;
93
90
  MenuItem: {
94
- ({ as, children, className, href, isCurrentPage, onClick, ...restProps }: BreadcrumbsMenuItemProps): import("react/jsx-runtime").JSX.Element;
91
+ <T extends React.ElementType = "span">({ as, children, className, href, isCurrentPage, onClick, htmlAttributes, }: PolymorphicComponentProps<T, BreadcrumbsMenuItemProps>): import("react/jsx-runtime").JSX.Element;
95
92
  displayName: string;
96
93
  };
97
94
  };
@@ -18,9 +18,8 @@
18
18
  * You should have received a copy of the GNU General Public License
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
- import { type Neo4jColors } from '@neo4j-ndl/base';
22
21
  import React from 'react';
23
- import { type ElementBase } from '../helpers';
22
+ import { type PolymorphicComponentPropsWithRef, type HtmlAttributes } from '../_common/types';
24
23
  /**
25
24
  *
26
25
  *
@@ -29,21 +28,44 @@ import { type ElementBase } from '../helpers';
29
28
  *
30
29
  */
31
30
  type ButtonTypes = 'submit' | 'button' | 'reset';
32
- export interface ButtonProps extends ElementBase<HTMLButtonElement> {
31
+ export type ButtonSizes = 'small' | 'medium' | 'large';
32
+ type BaseButtonProps = {
33
33
  children: string | React.ReactNode;
34
34
  /** If the button is doing something Async, it will display a loading spinner */
35
- loading?: boolean;
35
+ isLoading?: boolean;
36
36
  /** If the button is in disabled state */
37
- disabled?: boolean;
38
- /** the base color of the button */
39
- color?: Exclude<Neo4jColors, 'blueberry' | 'mint'>;
37
+ isDisabled?: boolean;
38
+ /** Type of button */
40
39
  type?: ButtonTypes;
41
- /** Fill type of button */
42
- fill?: 'filled' | 'outlined' | 'text';
43
40
  /** Size of button */
44
- size?: 'small' | 'medium' | 'large';
41
+ size?: ButtonSizes;
45
42
  /** If the button is in floating state */
46
- floating?: boolean;
47
- }
48
- export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<unknown>>;
43
+ isFloating?: boolean;
44
+ /** onClick callback*/
45
+ onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
46
+ /** OnKeyDown callback */
47
+ onKeyDown?: (e: React.KeyboardEvent<HTMLButtonElement>) => void;
48
+ className?: string;
49
+ } & ({
50
+ as: 'a';
51
+ href: HtmlAttributes<'a'>['href'];
52
+ target?: HtmlAttributes<'a'>['target'];
53
+ } | {
54
+ as?: React.ElementType;
55
+ });
56
+ type OutlinedButtonProps = BaseButtonProps & {
57
+ fill: 'outlined';
58
+ color?: 'primary' | 'danger' | 'neutral';
59
+ };
60
+ type TextButtonProps = BaseButtonProps & {
61
+ fill: 'text';
62
+ color?: 'primary' | 'danger';
63
+ };
64
+ type FilledButtonProps = BaseButtonProps & {
65
+ fill?: 'filled';
66
+ color?: 'primary' | 'danger';
67
+ };
68
+ export type ButtonProps = OutlinedButtonProps | TextButtonProps | FilledButtonProps;
69
+ type ButtonComponent = <C extends React.ElementType = 'button'>(props: PolymorphicComponentPropsWithRef<C, ButtonProps>) => React.ReactNode | null;
70
+ export declare const Button: ButtonComponent;
49
71
  export {};
@@ -19,7 +19,8 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import React from 'react';
22
- import { type ElementBase } from '../helpers';
22
+ import { type ButtonSizes } from '../button';
23
+ import { type PolymorphicComponentPropsWithRef } from '../_common/types';
23
24
  /**
24
25
  *
25
26
  *
@@ -27,23 +28,41 @@ import { type ElementBase } from '../helpers';
27
28
  *
28
29
  *
29
30
  */
30
- export interface IconButtonProps extends ElementBase<HTMLButtonElement> {
31
- children: string | React.ReactNode;
31
+ export interface IconButtonProps {
32
+ children: React.ReactNode;
32
33
  /** If the icon button is in disabled state */
33
- disabled?: boolean;
34
+ isDisabled?: boolean;
34
35
  /** If the button is doing something Async, it will display a loading spinner */
35
- loading?: boolean;
36
+ isLoading?: boolean;
36
37
  /** If the button does not have a visible container */
37
- clean?: boolean;
38
+ isClean?: boolean;
38
39
  /** Size of button */
39
- size?: 'small' | 'medium' | 'large';
40
+ size?: ButtonSizes;
40
41
  /** If the button is in floating state */
41
- floating?: boolean;
42
+ isFloating?: boolean;
42
43
  /** Turn the button red button */
43
- danger?: boolean;
44
+ isDanger?: boolean;
44
45
  /** If the button is in a group, the icon's container is more compact */
45
- grouped?: boolean;
46
+ isGrouped?: boolean;
46
47
  /** Active - used for open context menus for example */
47
- active?: boolean;
48
+ isActive?: boolean;
49
+ /** aria-label - {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label} */
50
+ ariaLabel: string;
51
+ /** classNames */
52
+ className?: string;
53
+ onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
54
+ onKeyDown?: (e: React.KeyboardEvent<HTMLButtonElement>) => void;
48
55
  }
49
- export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<unknown>>;
56
+ interface IconButtonAsButtonProps {
57
+ as?: 'button';
58
+ type?: 'button' | 'submit' | 'reset';
59
+ }
60
+ interface IconButtonAsAnchorProps {
61
+ as: 'a';
62
+ href: string;
63
+ }
64
+ type IconButtonComponent = <C extends React.ElementType = 'button'>(props: PolymorphicComponentPropsWithRef<C, IconButtonProps & (IconButtonAsButtonProps | IconButtonAsAnchorProps | {
65
+ as: React.ElementType;
66
+ })>) => React.ReactNode | null;
67
+ export declare const IconButton: IconButtonComponent;
68
+ export {};
@@ -19,23 +19,28 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import React from 'react';
22
- import { type ElementBase } from '../helpers';
22
+ import { type IconButtonProps } from './IconButton';
23
23
  /**
24
- *
25
- *
26
24
  * Types
27
- *
28
- *
29
25
  */
30
- export interface IconButtonArrayProps extends ElementBase<HTMLDivElement> {
31
- children: string | React.ReactNode;
32
- /** Orientation of the group */
26
+ export interface IconButtonArrayProps {
27
+ children: React.ReactNode;
33
28
  orientation?: 'vertical' | 'horizontal';
34
- /** If the button is in floating state */
35
- floating?: boolean;
29
+ isFloating?: boolean;
30
+ size?: 'small' | 'medium' | 'large';
31
+ className?: string;
36
32
  }
37
- /**
38
- * TODO: v3. Incorporate the `size` prop into the component, and pass it to IconButton children.
39
- * We need to use also the `size` prop to adjust padding in various sizes, now it has a fixed padding.
40
- */
41
- export declare const IconButtonArray: React.ForwardRefExoticComponent<IconButtonArrayProps & React.RefAttributes<unknown>>;
33
+ export interface CollapsibleButtonWrapperProps {
34
+ children: React.ReactElement<IconButtonProps> | React.ReactElement<IconButtonProps>[];
35
+ }
36
+ export declare const IconButtonArrayComponent: React.ForwardRefExoticComponent<{
37
+ htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
38
+ as?: React.ElementType<any> | undefined;
39
+ } & IconButtonArrayProps & React.RefAttributes<unknown>>;
40
+ declare const IconButtonArray: React.ForwardRefExoticComponent<{
41
+ htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
42
+ as?: React.ElementType<any> | undefined;
43
+ } & IconButtonArrayProps & React.RefAttributes<unknown>> & {
44
+ CollapsibleButtonWrapper: React.FC<CollapsibleButtonWrapperProps>;
45
+ };
46
+ export { IconButtonArray };
@@ -19,7 +19,6 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import React from 'react';
22
- import { type ElementBase } from '../helpers';
23
22
  /**
24
23
  *
25
24
  *
@@ -27,7 +26,7 @@ import { type ElementBase } from '../helpers';
27
26
  *
28
27
  *
29
28
  */
30
- export interface CalloutProps extends ElementBase<HTMLDivElement> {
29
+ export interface CalloutProps {
31
30
  /** Type of the callout */
32
31
  type?: CalloutType;
33
32
  /** Header of the callout */
@@ -36,6 +35,7 @@ export interface CalloutProps extends ElementBase<HTMLDivElement> {
36
35
  children?: React.ReactNode;
37
36
  /** Description of the callout. Will be ignored if `children` is passed */
38
37
  description?: string | React.ReactNode;
38
+ className?: string;
39
39
  }
40
40
  export type CalloutType = 'note' | 'important' | 'example' | 'tip';
41
41
  /**
@@ -45,4 +45,7 @@ export type CalloutType = 'note' | 'important' | 'example' | 'tip';
45
45
  *
46
46
  *
47
47
  */
48
- export declare const Callout: React.ForwardRefExoticComponent<CalloutProps & React.RefAttributes<unknown>>;
48
+ export declare const Callout: React.ForwardRefExoticComponent<{
49
+ htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
50
+ as?: React.ElementType<any> | undefined;
51
+ } & CalloutProps & React.RefAttributes<unknown>>;
@@ -0,0 +1,37 @@
1
+ /**
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+
22
+ export type XAxisProps = {
23
+ position: 'top' | 'bottom';
24
+ labelFormat?: (dataPoint: unknown) => string;
25
+ ticks?: number;
26
+ title?: string;
27
+ scale: string;
28
+ };
29
+ export type YAxisProps = {
30
+ position: 'left' | 'right';
31
+ labelFormat?: (dataPoint: unknown) => string;
32
+ ticks?: number;
33
+ title?: string;
34
+ scale: string;
35
+ };
36
+ export declare const XAxis: import("react").ForwardRefExoticComponent<XAxisProps & import("react").RefAttributes<unknown>>;
37
+ export declare const YAxis: import("react").ForwardRefExoticComponent<YAxisProps & import("react").RefAttributes<unknown>>;
@@ -18,12 +18,13 @@
18
18
  * You should have received a copy of the GNU General Public License
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
+
21
22
  import React from 'react';
22
- type ArrowPosition = 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right';
23
- export interface TooltipProps extends React.HTMLProps<HTMLDivElement> {
24
- arrowPosition: ArrowPosition;
25
- children: React.ReactNode | string;
23
+ type CartesianGridProps = {
24
+ scaleXAxis?: string;
25
+ scaleYAxis?: string;
26
26
  className?: string;
27
- }
28
- export declare const Tooltip: React.ForwardRefExoticComponent<Omit<TooltipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
27
+ htmlAttributes?: React.HTMLAttributes<HTMLDivElement>;
28
+ };
29
+ export declare const CartesianGrid: ({ className, htmlAttributes, scaleXAxis: scaleXAxisId, scaleYAxis: scaleYAxisId, }: CartesianGridProps) => import("react/jsx-runtime").JSX.Element | null;
29
30
  export {};
@@ -0,0 +1,105 @@
1
+ /**
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+ import React, { type ReactNode } from 'react';
22
+ import * as d3 from 'd3';
23
+ import { type LineProps } from './Line';
24
+ export type ScaleTypes = 'linear' | 'log' | 'time' | 'utc';
25
+ export type ScaleFunctionDates = d3.ScaleTime<number, number, never>;
26
+ export type ScaleFunctionNumbers = d3.ScaleLinear<number, number, never> | d3.ScaleLogarithmic<number, number, never>;
27
+ export type ScaleFunction = ScaleFunctionDates | ScaleFunctionNumbers;
28
+ export type Grid = 'clean' | 'x-axis' | 'y-axis' | 'both' | 'x-axis-zebra' | 'y-axis-zebra' | 'both-zebra' | 'x-axis-filled' | 'y-axis-filled' | 'both-filled';
29
+ export type LinePoint = {
30
+ dataId: string;
31
+ pointIndex: number;
32
+ accessorXAxis: string;
33
+ accessorYAxis: string;
34
+ pointPixelX?: number;
35
+ pointPixelY?: number;
36
+ scaleYAxisId: string;
37
+ scaleXAxisId: string;
38
+ [linePointAttribute: string]: unknown;
39
+ };
40
+ export type DataPointArray = unknown[];
41
+ export type LinePointArray = LinePoint[];
42
+ export type LinePointArrayMetadataHolder = {
43
+ [LinePointArrayMetadataDataId: string]: LinePointArrayMetadata;
44
+ };
45
+ export type LinePointArrayMetadata = {
46
+ x?: ScaleFunction;
47
+ y?: ScaleFunction;
48
+ xRange?: number[];
49
+ yRange?: number[];
50
+ points?: (string | number)[][];
51
+ [linePointArrayMetadataAttribute: string]: unknown;
52
+ };
53
+ export type ScaleProps = {
54
+ [scaleKey: string]: {
55
+ type: ScaleTypes;
56
+ domain?: [number, number] | [Date, Date];
57
+ };
58
+ };
59
+ export interface Scales {
60
+ [scale: string]: {
61
+ function: ScaleFunctionDates;
62
+ functionWithContentWidthAsRange: ScaleFunctionDates;
63
+ functionWithContentHeightAsRange: ScaleFunctionDates;
64
+ originalDomain: [Date, Date] | null;
65
+ } | {
66
+ function: ScaleFunctionNumbers;
67
+ functionWithContentWidthAsRange: ScaleFunctionNumbers;
68
+ functionWithContentHeightAsRange: ScaleFunctionNumbers;
69
+ originalDomain: [number, number] | null;
70
+ };
71
+ }
72
+ export interface ChartsChartContext {
73
+ chartRef: React.Ref<HTMLElement>;
74
+ contentRef: React.Ref<SVGElement>;
75
+ contentSize: ContentSize;
76
+ scales: Scales;
77
+ linePointArray: LinePointArray;
78
+ mousePositionRef?: React.MutableRefObject<{
79
+ x: number;
80
+ y: number;
81
+ }>;
82
+ }
83
+ export type ContentSize = {
84
+ width: number | undefined;
85
+ height: number | undefined;
86
+ } | undefined;
87
+ export interface ChartProps {
88
+ children?: ReactNode;
89
+ className?: string;
90
+ scales: ScaleProps;
91
+ gridType?: Grid;
92
+ pointSelectionType?: 'single' | 'x-axis';
93
+ }
94
+ export type Points = {
95
+ data?: LinePoint;
96
+ x?: number;
97
+ y?: number;
98
+ }[];
99
+ export declare const canvasLeftPadding = 8;
100
+ export declare const canvasRightPadding = 8;
101
+ export declare const ChartsChartContext: React.Context<ChartsChartContext>;
102
+ declare const Chart: React.ForwardRefExoticComponent<ChartProps & React.RefAttributes<unknown>> & {
103
+ Line: React.MemoExoticComponent<React.ForwardRefExoticComponent<LineProps & React.RefAttributes<SVGPathElement>>>;
104
+ };
105
+ export { Chart };
@@ -0,0 +1,59 @@
1
+ /**
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+
22
+ import React from 'react';
23
+ export interface ChartTooltipProps {
24
+ children: React.ReactNode;
25
+ className?: string;
26
+ anchorRef: React.RefObject<HTMLElement>;
27
+ isOpen?: boolean;
28
+ style: React.CSSProperties;
29
+ }
30
+ export declare const ChartTooltipComponent: React.ForwardRefExoticComponent<{
31
+ htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
32
+ as?: React.ElementType<any> | undefined;
33
+ } & ChartTooltipProps & React.RefAttributes<unknown>>;
34
+ export type ChartTooltipContentProps = {
35
+ leftElement?: React.ReactNode;
36
+ rightElement?: React.ReactNode;
37
+ indentSquareColor?: string;
38
+ notification?: {
39
+ leftElement: React.ReactNode;
40
+ rightElement: React.ReactNode;
41
+ type: 'warning' | 'danger';
42
+ };
43
+ };
44
+ declare const ChartTooltip: React.ForwardRefExoticComponent<{
45
+ htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
46
+ as?: React.ElementType<any> | undefined;
47
+ } & ChartTooltipProps & React.RefAttributes<unknown>> & {
48
+ Title: React.ForwardRefExoticComponent<{
49
+ children: React.ReactNode;
50
+ } & React.RefAttributes<unknown>>;
51
+ Content: React.ForwardRefExoticComponent<ChartTooltipContentProps & React.RefAttributes<HTMLDivElement>>;
52
+ Link: React.ForwardRefExoticComponent<Omit<{
53
+ htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
54
+ as?: React.ElementType<any> | undefined;
55
+ } & import("../text-link").TextLinkProps & {
56
+ ref?: any;
57
+ }, "ref"> & React.RefAttributes<unknown>>;
58
+ };
59
+ export { ChartTooltip };