@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,16 +19,11 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
 
22
- import React, { type ComponentPropsWithoutRef } from 'react';
23
- import { type CustomElementType, type Radius, type Spacing } from './types';
22
+ import React from 'react';
23
+ import { type Radius, type Spacing } from './types';
24
+ import { type PolymorphicComponentPropsWithRef } from '../_common/types';
24
25
  type AllowedFlexElements = 'div' | 'span' | 'ul' | 'ol' | 'li';
25
- type BaseFlexProps<T extends CustomElementType> = {
26
- /**
27
- * The DOM element to render as the Flex,
28
- * meaning the root node of the children collection.
29
- * @default div
30
- */
31
- as?: AllowedFlexElements;
26
+ type BaseFlexProps = {
32
27
  /**
33
28
  * @default tokens.space['4']
34
29
  */
@@ -70,9 +65,9 @@ type BaseFlexProps<T extends CustomElementType> = {
70
65
  */
71
66
  alignItems?: React.CSSProperties['alignItems'];
72
67
  children?: React.ReactNode;
68
+ style?: React.CSSProperties;
73
69
  };
74
- export type FlexProps<T extends CustomElementType> = Omit<ComponentPropsWithoutRef<T>, 'as'> & BaseFlexProps<T>;
75
- type FlexComponent = <T extends CustomElementType>(props: FlexProps<T>) => React.ReactNode;
70
+ type FlexComponent = <T extends AllowedFlexElements = 'div'>(props: PolymorphicComponentPropsWithRef<T, BaseFlexProps>) => React.ReactNode | null;
76
71
  /**
77
72
  * Flex is a general-purpose container that helps
78
73
  * lay out components with consistent spacing in a row or column.
@@ -19,6 +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 HtmlAttributes } from '../_common/types';
22
23
  /**
23
24
  *
24
25
  *
@@ -29,6 +30,7 @@ import React from 'react';
29
30
  export type LoadingSpinnerProps = {
30
31
  size?: 'small' | 'medium' | 'large';
31
32
  className?: string;
33
+ htmlAttributes?: HtmlAttributes<'div'>;
32
34
  };
33
35
  /**
34
36
  *
@@ -19,13 +19,13 @@
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 ComponentPropsWithoutRefAsObj } from '../helpers';
22
+ import { type HtmlAttributes } from '../_common/types';
23
23
  export declare enum ModalCloseReason {
24
24
  BACKDROP_CLICK = "backdropClick",
25
25
  ESCAPE_KEY_DOWN = "escapeKeyDown"
26
26
  }
27
27
  export interface ModalProps {
28
- open: boolean;
28
+ isOpen: boolean;
29
29
  children: React.ReactNode;
30
30
  /**
31
31
  * We provide convenient default sizes for the modal,
@@ -36,8 +36,10 @@ export interface ModalProps {
36
36
  container?: Element;
37
37
  onClose?: (e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, reason?: ModalCloseReason) => void;
38
38
  /** Forwards the props to the modal container's wrapper - use with caution */
39
- rootProps?: ComponentPropsWithoutRefAsObj<'div'>;
39
+ rootProps?: HtmlAttributes<'div'>;
40
40
  /** Forwards the props to the modal container */
41
- modalProps?: ComponentPropsWithoutRefAsObj<'div'>;
41
+ modalProps?: HtmlAttributes<'div'>;
42
+ /** HTML attributes */
43
+ htmlAttributes?: HtmlAttributes<'div'>;
42
44
  }
43
45
  export declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
@@ -18,72 +18,43 @@
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 React, { type ComponentProps } from 'react';
22
- import FocusLock from 'react-focus-lock';
23
- /**
24
- * A modified version of the Material UI (@mui/material) Popover component.
25
- * We use a modified/slimmed version for easier maintenance.
26
- *
27
- * See the LICENSES.txt file for license for @mui/material
28
- */
29
- type ElementBase = Omit<React.HTMLProps<HTMLElement>, 'as' | 'size'> & {
30
- /** Override the root element rendered for the component */
31
- as?: string | React.ComponentType<any>;
21
+ import React from 'react';
22
+ import { type OffsetOptions } from '@floating-ui/react';
23
+ export type PlacementOptions = 'bottom-end-top-end' | 'bottom-start-top-start' | 'bottom-middle-top-middle' | 'top-end-bottom-end' | 'top-start-bottom-start' | 'top-middle-bottom-middle' | 'bottom-start-bottom-end' | 'top-start-top-end' | 'middle-start-middle-end' | 'bottom-end-bottom-start' | 'top-end-top-start' | 'middle-end-middle-start';
24
+ export interface PopoverProps {
25
+ /** if the popover is open */
26
+ isOpen?: boolean;
27
+ children: React.ReactNode;
28
+ /** Can be used if the anchor should be separated from the trigger */
29
+ anchorElement?: Element | null;
30
+ /** The placement of the floating element is determined by two sets of words. The first set of words specifies the point on the anchor element where the floating element will be attached. The second set of coordinates specifies the point on the floating element that will attach to the anchor element.*/
31
+ placement?: PlacementOptions;
32
+ /** can take either a number, an object or a function. Full documentation here: https://floating-ui.com/docs/offset */
33
+ offset?: OffsetOptions;
34
+ /** Called when the floating element is opened or closed */
35
+ onOpenChange?: (isOpen: boolean, event?: Event) => void;
36
+ /** Use anchorEl for portal's container. Should be used if the popover is inside an Dialog */
37
+ hasAnchorPortal?: boolean;
38
+ /** If the popover should constrain the focus inside the popover while open */
39
+ shouldCaptureFocus?: boolean;
40
+ /** The role of the popover */
41
+ role?: 'tooltip' | 'dialog' | 'alertdialog' | 'menu' | 'listbox' | 'grid' | 'tree';
42
+ }
43
+ export declare const usePopoverContext: () => import("./use-popover").UsePopoverReturn;
44
+ export declare const Popover: {
45
+ ({ children, anchorElement, placement, isOpen, offset, hasAnchorPortal, shouldCaptureFocus, onOpenChange, role, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
46
+ Trigger: React.ForwardRefExoticComponent<PopoverTriggerProps & React.RefAttributes<HTMLElement>>;
47
+ Content: React.ForwardRefExoticComponent<{
48
+ htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
49
+ as?: React.ElementType<any> | undefined;
50
+ } & PopoverContentProps & React.RefAttributes<unknown>>;
32
51
  };
33
- type Vertical = 'top' | 'bottom';
34
- type Horizontal = 'left' | 'right' | 'center';
35
- export interface PopoverProps extends ElementBase {
36
- open: boolean;
37
- children: React.ReactNode | string;
38
- /** The element the menu should attach to */
39
- anchorEl?: HTMLElement | React.RefObject<HTMLElement> | null;
40
- /**
41
- * The position on the anchor element
42
- * that the menu should attach to
43
- *
44
- * +-----------------+
45
- * | |
46
- * | Popover | +--Transform Origin
47
- * | Parent Element | | top, left
48
- * | | |
49
- * +-----------------+ |
50
- * | +-------------+
51
- * Anchor Origin ----+ | Popped |
52
- * bottom,right | Element |
53
- * +-------------+
54
- *
55
- */
56
- anchorOrigin?: {
57
- vertical: Vertical;
58
- horizontal: Horizontal;
59
- };
60
- /** The position on the menu element that should attach to the anchorOrigin point
61
- on the anchorEl */
62
- transformOrigin?: {
63
- vertical: Vertical;
64
- horizontal: Horizontal;
65
- };
66
- /** The offset number in px of the transform origin point relative to the anchor origin point */
67
- transformOriginOffsetFromAnchorOrigin?: {
68
- vertical: number;
69
- horizontal: number;
70
- };
71
- onClose?: (e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
72
- /** Additional classes */
52
+ export interface PopoverTriggerProps {
53
+ children: React.ReactNode;
54
+ hasButtonWrapper?: boolean;
55
+ }
56
+ export interface PopoverContentProps {
57
+ children: React.ReactNode;
73
58
  className?: string;
74
- /** Whether the menu is nested. IE is this menu a sub menu */
75
- nested?: boolean;
76
- /** Disable backdrop - Allows event capturing - and pointer events to pass to elements below */
77
- disableBackdrop?: boolean;
78
- /** Use anchorEl for portal's container */
79
- anchorPortal?: boolean;
80
- /** If the popover should constrain the focus inside the popover while open */
81
- captureFocus?: boolean;
82
- /**
83
- * Props to pass to the FocusLock component
84
- * @see https://github.com/theKashey/react-focus-lock
85
- */
86
- focusLockProps?: ComponentProps<typeof FocusLock>;
59
+ style?: React.CSSProperties;
87
60
  }
88
- export declare const Popover: React.ForwardRefExoticComponent<Omit<PopoverProps, "ref"> & React.RefAttributes<unknown>>;
89
- export {};
@@ -19,3 +19,7 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  export * from './Popover';
22
+ import { type PopoverOptions } from './use-popover';
23
+ export type { PopoverOptions };
24
+ import { type OffsetOptions, type Placement } from '@floating-ui/react';
25
+ export type { OffsetOptions as PopoverOffsetOptions, Placement as PopoverPlacement, };
@@ -0,0 +1,44 @@
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 { type OffsetOptions, type Placement, useFloating, type UseInteractionsReturn } from '@floating-ui/react';
22
+ export interface PopoverOptions {
23
+ isInitialOpen?: boolean;
24
+ placement?: Placement;
25
+ isOpen?: boolean;
26
+ onOpenChange?: (open: boolean, event?: Event) => void;
27
+ offsetOption?: OffsetOptions;
28
+ anchorElement?: Element | null;
29
+ anchorElementAsPortalAnchor?: boolean;
30
+ shouldCaptureFocus?: boolean;
31
+ role?: 'tooltip' | 'dialog' | 'alertdialog' | 'menu' | 'listbox' | 'grid' | 'tree';
32
+ }
33
+ export interface UsePopoverReturn extends UseInteractionsReturn, ReturnType<typeof useFloating> {
34
+ isOpen: boolean;
35
+ setIsOpen: (isOpen: boolean) => void;
36
+ labelId: string | undefined;
37
+ descriptionId: string | undefined;
38
+ transitionStyles: React.CSSProperties;
39
+ setLabelId: (labelId: string | undefined) => void;
40
+ setDescriptionId: (descriptionId: string | undefined) => void;
41
+ anchorElementAsPortalAnchor: boolean | undefined;
42
+ shouldCaptureFocus: boolean | undefined;
43
+ }
44
+ export declare function usePopover({ isInitialOpen, placement, isOpen: controlledOpen, onOpenChange: setControlledOpen, offsetOption, anchorElement, anchorElementAsPortalAnchor, shouldCaptureFocus, role: roleProp, }?: PopoverOptions): UsePopoverReturn;
@@ -20,7 +20,7 @@
20
20
  */
21
21
 
22
22
  interface PortalProps {
23
- children: React.ReactNode | null;
23
+ children: React.ReactNode;
24
24
  container?: Element;
25
25
  }
26
26
  export declare const Portal: (props: PortalProps) => JSX.Element;
@@ -19,10 +19,13 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import React from 'react';
22
- export interface ProgressBarProps extends Omit<React.HTMLProps<HTMLDivElement>, 'size'> {
22
+ import { type HtmlAttributes } from '../_common/types';
23
+ export interface ProgressBarProps {
23
24
  heading?: string;
24
25
  value: number;
25
26
  size: 'small' | 'large';
26
27
  className?: string;
28
+ /** HTML attributes */
29
+ htmlAttributes?: HtmlAttributes<'div'>;
27
30
  }
28
- export declare const ProgressBar: React.ForwardRefExoticComponent<Omit<ProgressBarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
31
+ export declare const ProgressBar: React.ForwardRefExoticComponent<ProgressBarProps & React.RefAttributes<HTMLDivElement>>;
@@ -19,9 +19,10 @@
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 PolymorphicComponentPropsWithRef } from '../_common/types';
23
23
  type SegmentedControlID = string | number;
24
- export interface SegmentedControlProps<T extends SegmentedControlID> extends ElementBase {
24
+ export interface SegmentedControlProps<T extends SegmentedControlID> {
25
+ className?: string;
25
26
  /** Size of the selector */
26
27
  size?: 'small' | 'large';
27
28
  /** If selector items will include only icons (makes controls rectangular) */
@@ -35,10 +36,15 @@ export interface SegmentedControlProps<T extends SegmentedControlID> extends Ele
35
36
  selected: T;
36
37
  children: React.ReactNode | string;
37
38
  }
38
- declare const SegmentedControl: (<T extends SegmentedControlID>(props: SegmentedControlProps<T> & React.RefAttributes<unknown>) => React.ReactElement | null) & {
39
- Item: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement>, "as" | "selected" | "size" | "onChange" | "ref"> & {
40
- as?: string | React.ComponentType<any>;
39
+ type SegmentControlComponent = <U extends SegmentedControlID, T extends React.ElementType = 'div'>(props: PolymorphicComponentPropsWithRef<T, SegmentedControlProps<U>>) => React.ReactNode | null;
40
+ declare const SegmentedControl: SegmentControlComponent & {
41
+ Item: React.ForwardRefExoticComponent<{
42
+ htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
43
+ as?: React.ElementType<any> | undefined;
41
44
  } & {
45
+ as?: string | React.ComponentType<any>;
46
+ className?: string;
47
+ children?: React.ReactNode;
42
48
  value: string;
43
49
  } & React.RefAttributes<unknown>>;
44
50
  };
@@ -19,42 +19,58 @@
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 PolymorphicComponent, type PolymorphicComponentPropsWithRef, type HtmlAttributes } from '../_common/types';
23
23
  type SideNavigationPosition = 'left' | 'right';
24
24
  type SideNavigationSize = 'small' | 'large';
25
- interface SideNavigationProps extends ElementBase<HTMLDivElement> {
25
+ interface SideNavigationProps {
26
26
  /** True if the menu is expanded. */
27
- expanded: boolean;
27
+ isExpanded: boolean;
28
28
  /** What to do on expanded change. */
29
- onExpandedChange?: (expanded: boolean) => void;
29
+ onExpandedChange?: (isExpanded: boolean) => void;
30
30
  /** True if icons will be used in the menu. */
31
- iconMenu?: boolean;
31
+ hasIconMenu?: boolean;
32
32
  /** Position. */
33
33
  position?: SideNavigationPosition;
34
34
  /** Size of the component */
35
35
  size?: SideNavigationSize;
36
+ /** HTML attributes */
37
+ htmlAttributes?: HtmlAttributes<'div'>;
38
+ children?: React.ReactNode;
39
+ className?: string;
36
40
  }
37
- export type SideNavigationListProps = ElementBase<HTMLUListElement>;
38
- export interface SideNavigationItemProps extends ElementBase<HTMLAnchorElement> {
41
+ export type SideNavigationListProps = {
42
+ className?: string;
43
+ children?: React.ReactNode;
44
+ /** HTML attributes */
45
+ htmlAttributes?: HtmlAttributes<'ul'>;
46
+ };
47
+ export interface SideNavigationItemProps {
39
48
  icon?: React.ReactNode;
40
49
  children?: React.ReactNode;
41
- selected?: boolean;
50
+ isSelected?: boolean;
42
51
  /** Flag to indicate if the side navigation item can be selected or not */
43
- selectable?: boolean;
52
+ isSelectable?: boolean;
53
+ className?: string;
54
+ style?: React.CSSProperties;
44
55
  }
45
- export interface SideNavigationItemBadgeProps extends Omit<ElementBase<HTMLSpanElement>, 'as'> {
56
+ type SideNavigationItemComponent = <T extends React.ElementType = 'a'>(props: PolymorphicComponentPropsWithRef<T, SideNavigationItemProps>) => React.ReactNode | null;
57
+ export interface SideNavigationItemBadgeProps {
46
58
  children?: number;
47
59
  type?: 'info' | 'warning' | 'critical';
60
+ /** HTML attributes */
61
+ htmlAttributes?: HtmlAttributes<'span'>;
62
+ className?: string;
63
+ style: React.CSSProperties;
48
64
  }
49
- export type SideNavigationGroupHeaderProps = ElementBase<HTMLLIElement>;
65
+ export type SideNavigationGroupHeaderProps = {
66
+ children?: React.ReactNode;
67
+ className?: string;
68
+ style?: React.CSSProperties;
69
+ };
50
70
  declare const SideNavigation: React.ForwardRefExoticComponent<SideNavigationProps & React.RefAttributes<HTMLDivElement>> & {
51
- List: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLUListElement>, "as" | "selected" | "size" | "onChange" | "ref"> & {
52
- as?: string | React.ComponentType<any>;
53
- } & React.RefAttributes<HTMLUListElement>>;
54
- GroupHeader: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLLIElement>, "as" | "selected" | "size" | "onChange" | "ref"> & {
55
- as?: string | React.ComponentType<any>;
56
- } & React.RefAttributes<HTMLParagraphElement>>;
57
- Item: React.ForwardRefExoticComponent<SideNavigationItemProps & React.RefAttributes<any>>;
58
- ItemBadge: React.ForwardRefExoticComponent<SideNavigationItemBadgeProps & React.RefAttributes<any>>;
71
+ List: React.ForwardRefExoticComponent<SideNavigationListProps & React.RefAttributes<HTMLUListElement>>;
72
+ GroupHeader: PolymorphicComponent<SideNavigationGroupHeaderProps, "li">;
73
+ Item: SideNavigationItemComponent;
74
+ ItemBadge: React.ForwardRefExoticComponent<SideNavigationItemBadgeProps & React.RefAttributes<HTMLSpanElement>>;
59
75
  };
60
76
  export { SideNavigation };
@@ -19,13 +19,11 @@
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 ComponentPropsWithoutRefAsObj } from '../helpers';
22
+ import { type HtmlAttributes } from '../_common/types';
23
23
  export interface SliderPropsBase {
24
- as?: string | React.ComponentType<any>;
25
24
  /** Forwards the props to the slider container's wrapper */
26
- rootProps?: ComponentPropsWithoutRefAsObj<'div'>;
27
25
  /** Forwards the input element(s) of the slider */
28
- inputProps?: ComponentPropsWithoutRefAsObj<'input'>;
26
+ inputProps?: HtmlAttributes<'input'>;
29
27
  /**
30
28
  * Which value interval will be added or removed from
31
29
  * the current value when moving the slider button.
@@ -54,6 +52,10 @@ export interface SliderPropsBase {
54
52
  * of the steps in the slider.
55
53
  */
56
54
  showSteps?: boolean;
55
+ /** HTML attributes */
56
+ htmlAttributes?: HtmlAttributes<'div'>;
57
+ /** Additional classnames */
58
+ className?: string;
57
59
  }
58
60
  type SingleSlider = SliderPropsBase & {
59
61
  type?: 'single' | undefined;
@@ -70,6 +72,7 @@ type RangeSlider = SliderPropsBase & {
70
72
  */
71
73
  values: [number, number];
72
74
  onChange: (value: [number, number]) => void;
75
+ className?: string;
73
76
  };
74
77
  export type SliderProps = SingleSlider | RangeSlider;
75
78
  export declare const Slider: (props: SliderProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
@@ -19,9 +19,11 @@
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
- export interface StatusIndicatorProps extends ElementBase<HTMLSpanElement> {
22
+ import { type HtmlAttributes } from '../_common/types';
23
+ export interface StatusIndicatorProps {
24
24
  /** Status indicator type. Defaults to "unknown". */
25
25
  type?: 'unknown' | 'success' | 'info' | 'warning' | 'danger';
26
+ htmlAttributes?: HtmlAttributes<'span'>;
27
+ className?: string;
26
28
  }
27
29
  export declare const StatusIndicator: React.ForwardRefExoticComponent<StatusIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
@@ -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 PolymorphicComponentPropsWithRef } from '../_common/types';
23
23
  type TabId = string | number;
24
24
  type Size = 'small' | 'large';
25
25
  type Fill = 'underline' | 'filled';
@@ -37,23 +37,17 @@ export interface BaseTabsProps<T extends TabId> {
37
37
  fill?: Fill;
38
38
  size?: Size;
39
39
  className?: string;
40
- /**
41
- * Replace the component rendered to wrap the tabs
42
- */
43
- as?: string | React.ComponentType<any>;
44
40
  }
45
- interface TabProps<T extends TabId> extends ElementBase<HTMLButtonElement> {
41
+ type TabsComponentType = <U extends TabId, T extends React.ElementType = 'div'>(props: PolymorphicComponentPropsWithRef<T, BaseTabsProps<U>>) => React.ReactNode | null;
42
+ interface TabProps<T extends TabId> {
46
43
  tabId: T;
47
44
  children: React.ReactNode | string;
48
45
  className?: string;
49
- disabled?: boolean;
50
- /**
51
- * Replace the component rendered as the tab
52
- */
53
- as?: string | React.ComponentType<any>;
46
+ isDisabled?: boolean;
54
47
  }
48
+ type TabsTabComponent = <U extends TabId = TabId, T extends React.ElementType = 'div'>(props: PolymorphicComponentPropsWithRef<T, TabProps<U>>) => React.ReactNode | null;
55
49
  interface TabPanelProps {
56
- children: React.ReactNode | string;
50
+ children: React.ReactNode;
57
51
  /**
58
52
  * The currently selected tabId. Determines if
59
53
  * this tab is visible or not
@@ -61,13 +55,10 @@ interface TabPanelProps {
61
55
  value: TabId;
62
56
  tabId: TabId;
63
57
  className?: string;
64
- /**
65
- * Replace the component rendered as the tab panel
66
- */
67
- as?: string | React.ComponentType<any>;
68
58
  }
69
- declare const Tabs: (<T extends TabId>(props: BaseTabsProps<T> & React.RefAttributes<unknown>) => React.ReactElement | null) & {
70
- Tab: <T extends TabId = TabId>(props: TabProps<T> & React.RefAttributes<unknown>) => React.ReactElement | null;
71
- TabPanel: React.ForwardRefExoticComponent<TabPanelProps & React.RefAttributes<unknown>>;
59
+ type TabsTabPanelComponent = <T extends React.ElementType = 'div'>(props: PolymorphicComponentPropsWithRef<T, TabPanelProps>) => React.ReactNode | null;
60
+ declare const Tabs: TabsComponentType & {
61
+ Tab: TabsTabComponent;
62
+ TabPanel: TabsTabPanelComponent;
72
63
  };
73
64
  export { Tabs };
@@ -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 } from '../_common/types';
23
23
  /**
24
24
  *
25
25
  *
@@ -27,24 +27,26 @@ import { type ElementBase } from '../helpers';
27
27
  *
28
28
  *
29
29
  */
30
- export interface CommonTagProps extends ElementBase {
30
+ export interface CommonTagProps {
31
31
  children: string | React.ReactNode;
32
32
  /** Type of the tag */
33
33
  type?: 'destructive' | 'default';
34
34
  /** Size of the tag */
35
35
  size?: 'small' | 'medium' | 'large';
36
+ className?: string;
37
+ htmlAttributes?: HtmlAttributes<'div'>;
36
38
  }
37
- export interface RemoveableTagProps extends CommonTagProps {
39
+ export interface RemovableTagProps extends CommonTagProps {
38
40
  /** Adds a "x" icon is set to true */
39
- removeable: true;
40
- /** Handler when remove icon is clicked. Required if `removeable` is true */
41
+ isRemovable: true;
42
+ /** Handler when remove icon is clicked. Required if `removable` is true */
41
43
  onRemove: (e: React.KeyboardEvent<HTMLElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
42
44
  }
43
45
  export interface NonRemovableTagProps extends CommonTagProps {
44
- removeable?: false;
46
+ isRemovable?: false;
45
47
  onRemove?: never;
46
48
  }
47
- export type TagProps = RemoveableTagProps | NonRemovableTagProps;
49
+ export type TagProps = RemovableTagProps | NonRemovableTagProps;
48
50
  /**
49
51
  *
50
52
  *
@@ -19,28 +19,36 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import { type ReactElement, type ReactNode } from 'react';
22
- import { type CommonInputProps, type TooltipObjectProps } from '../_common/input/types';
23
- export interface TextInputProperties extends Omit<CommonInputProps, 'label'> {
24
- /** Label text */
25
- label?: ReactNode;
26
- /** Help message */
22
+ import { type TooltipObjectProps } from '../_common/input/types';
23
+ import { type HtmlAttributes } from '../_common/types';
24
+ export interface TextInputProps {
27
25
  helpText?: string | ReactNode;
28
26
  /** Error message */
29
27
  errorText?: string | ReactNode;
30
28
  /** Element to be shown as left icon */
31
- leftIcon?: ReactElement;
29
+ leftElement?: ReactElement;
32
30
  /** Element to be shown as right icon */
33
- rightIcon?: ReactElement;
34
- /** Whether the input field is readonly */
35
- readOnly?: boolean;
31
+ rightElement?: ReactElement;
36
32
  /** Size of the input field */
37
33
  size?: 'small' | 'medium' | 'large';
34
+ /** Whether the input field is readonly */
35
+ isReadOnly?: boolean;
38
36
  /** If the component is optional to fill in */
39
37
  isOptional?: boolean;
38
+ isDisabled?: boolean;
39
+ isRequired?: boolean;
40
+ value?: string;
41
+ /** Displays with fluid width */
42
+ isFluid?: boolean;
40
43
  /** Information to be displayed in the information tooltip */
41
44
  informationIconText?: React.ReactNode;
45
+ /** Sets the label */
46
+ label?: string | React.ReactNode;
47
+ /** Classname to the `input` element */
48
+ className?: string;
42
49
  /** Pass props to the underlying Tip component */
43
50
  tooltipProps?: TooltipObjectProps;
51
+ htmlAttributes?: HtmlAttributes<'input'>;
44
52
  }
45
53
  /**
46
54
  *
@@ -49,4 +57,4 @@ export interface TextInputProperties extends Omit<CommonInputProps, 'label'> {
49
57
  *
50
58
  *
51
59
  */
52
- export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<TextInputProperties, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
60
+ export declare const TextInput: import("react").ForwardRefExoticComponent<TextInputProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -19,8 +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';
23
- export interface TextLinkProps extends ElementBase<HTMLAnchorElement> {
22
+ import { type PolymorphicComponentPropsWithRef } from '../_common/types';
23
+ export interface TextLinkProps {
24
24
  /** The text of the link. */
25
25
  children: React.ReactNode;
26
26
  /** The hypertext reference. */
@@ -29,8 +29,10 @@ export interface TextLinkProps extends ElementBase<HTMLAnchorElement> {
29
29
  * Adds an external-icon and sets the `target` to `"_blank"`.
30
30
  * If a `target` is set, the component will use that value instead.
31
31
  */
32
- externalLink?: boolean;
33
- /** Disable the component; the link will not be focus- or click-able. */
34
- disabled?: boolean;
32
+ isExternalLink?: boolean;
33
+ target?: string;
34
+ className?: string;
35
35
  }
36
- export declare const TextLink: React.ForwardRefExoticComponent<TextLinkProps & React.RefAttributes<HTMLAnchorElement>>;
36
+ type TextLinkComponent = <T extends React.ElementType = 'div'>(props: PolymorphicComponentPropsWithRef<T, TextLinkProps>) => React.ReactNode | null;
37
+ export declare const TextLink: TextLinkComponent;
38
+ export {};