@neo4j-ndl/react 4.1.5 → 4.1.7

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 (525) hide show
  1. package/lib/cjs/_common/CodeBlockWrapper.js +5 -4
  2. package/lib/cjs/_common/CodeBlockWrapper.js.map +1 -1
  3. package/lib/cjs/_common/utils.js +4 -2
  4. package/lib/cjs/_common/utils.js.map +1 -1
  5. package/lib/cjs/accordion/Accordion.js +9 -6
  6. package/lib/cjs/accordion/Accordion.js.map +1 -1
  7. package/lib/cjs/accordion/accordion-types.js.map +1 -1
  8. package/lib/cjs/accordion/stories/accordion.stories.js +1 -1
  9. package/lib/cjs/accordion/stories/accordion.stories.js.map +1 -1
  10. package/lib/cjs/avatar/Avatar.js +1 -1
  11. package/lib/cjs/avatar/Avatar.js.map +1 -1
  12. package/lib/cjs/banner/Banner.js +3 -2
  13. package/lib/cjs/banner/Banner.js.map +1 -1
  14. package/lib/cjs/banner/stories/banner.stories.js +1 -1
  15. package/lib/cjs/banner/stories/banner.stories.js.map +1 -1
  16. package/lib/cjs/box/Box.js +14 -2
  17. package/lib/cjs/box/Box.js.map +1 -1
  18. package/lib/cjs/box/stories/box.stories.js +2 -2
  19. package/lib/cjs/box/stories/box.stories.js.map +1 -1
  20. package/lib/cjs/breadcrumbs/Breadcrumbs.js +10 -7
  21. package/lib/cjs/breadcrumbs/Breadcrumbs.js.map +1 -1
  22. package/lib/cjs/button/stories/button.stories.js +2 -2
  23. package/lib/cjs/button/stories/button.stories.js.map +1 -1
  24. package/lib/cjs/checkbox/Checkbox.js +2 -1
  25. package/lib/cjs/checkbox/Checkbox.js.map +1 -1
  26. package/lib/cjs/checkbox/stories/checkbox.stories.js +1 -1
  27. package/lib/cjs/checkbox/stories/checkbox.stories.js.map +1 -1
  28. package/lib/cjs/clipboard-button/ClipboardButton.js +6 -3
  29. package/lib/cjs/clipboard-button/ClipboardButton.js.map +1 -1
  30. package/lib/cjs/color-picker/ColorPicker.js +2 -1
  31. package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
  32. package/lib/cjs/data-grid/Components.js +9 -6
  33. package/lib/cjs/data-grid/Components.js.map +1 -1
  34. package/lib/cjs/data-grid/DataGrid.js +16 -4
  35. package/lib/cjs/data-grid/DataGrid.js.map +1 -1
  36. package/lib/cjs/data-grid/data-grid-nav/data-grid-nav.js +28 -14
  37. package/lib/cjs/data-grid/data-grid-nav/data-grid-nav.js.map +1 -1
  38. package/lib/cjs/data-grid/data-grid-nav/helpers.js +2 -1
  39. package/lib/cjs/data-grid/data-grid-nav/helpers.js.map +1 -1
  40. package/lib/cjs/data-grid/stories/datagrid-component-overriding.story.js +1 -3
  41. package/lib/cjs/data-grid/stories/datagrid-component-overriding.story.js.map +1 -1
  42. package/lib/cjs/data-grid/stories/datagrid-in-dialog.story.js +2 -1
  43. package/lib/cjs/data-grid/stories/datagrid-in-dialog.story.js.map +1 -1
  44. package/lib/cjs/data-grid/stories/datagrid-keyboard-navigation.story.js +2 -1
  45. package/lib/cjs/data-grid/stories/datagrid-keyboard-navigation.story.js.map +1 -1
  46. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js +1 -2
  47. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  48. package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js +13 -10
  49. package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
  50. package/lib/cjs/date-picker/DatePicker.js +2 -1
  51. package/lib/cjs/date-picker/DatePicker.js.map +1 -1
  52. package/lib/cjs/date-picker/stories/date-picker-range.story.js +1 -1
  53. package/lib/cjs/date-picker/stories/date-picker-range.story.js.map +1 -1
  54. package/lib/cjs/date-picker/stories/date-picker.stories.js +1 -1
  55. package/lib/cjs/date-picker/stories/date-picker.stories.js.map +1 -1
  56. package/lib/cjs/dialog/Dialog.js +20 -13
  57. package/lib/cjs/dialog/Dialog.js.map +1 -1
  58. package/lib/cjs/dialog/dialog-context.js +35 -6
  59. package/lib/cjs/dialog/dialog-context.js.map +1 -1
  60. package/lib/cjs/dialog/stories/dialog.stories.js +1 -1
  61. package/lib/cjs/dialog/stories/dialog.stories.js.map +1 -1
  62. package/lib/cjs/divider/stories/divider.stories.js +1 -1
  63. package/lib/cjs/divider/stories/divider.stories.js.map +1 -1
  64. package/lib/cjs/drawer/Drawer.js +9 -8
  65. package/lib/cjs/drawer/Drawer.js.map +1 -1
  66. package/lib/cjs/dropdown-button/DropdownButton.js +14 -2
  67. package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
  68. package/lib/cjs/dropzone/Dropzone.js +3 -2
  69. package/lib/cjs/dropzone/Dropzone.js.map +1 -1
  70. package/lib/cjs/dropzone/stories/dropzone-csv-files.story.js +1 -3
  71. package/lib/cjs/dropzone/stories/dropzone-csv-files.story.js.map +1 -1
  72. package/lib/cjs/dropzone/stories/dropzone-custom-extensions.story.js +1 -3
  73. package/lib/cjs/dropzone/stories/dropzone-custom-extensions.story.js.map +1 -1
  74. package/lib/cjs/dropzone/stories/dropzone-default.story.js +1 -3
  75. package/lib/cjs/dropzone/stories/dropzone-default.story.js.map +1 -1
  76. package/lib/cjs/dropzone/stories/dropzone-disabled.story.js +1 -3
  77. package/lib/cjs/dropzone/stories/dropzone-disabled.story.js.map +1 -1
  78. package/lib/cjs/flex/Flex.js +14 -2
  79. package/lib/cjs/flex/Flex.js.map +1 -1
  80. package/lib/cjs/graph-label/GraphLabel.js +18 -4
  81. package/lib/cjs/graph-label/GraphLabel.js.map +1 -1
  82. package/lib/cjs/icon-button/stories/icon-button.stories.js +1 -1
  83. package/lib/cjs/icon-button/stories/icon-button.stories.js.map +1 -1
  84. package/lib/cjs/icon-button-array/IconButtonArray.js +14 -2
  85. package/lib/cjs/icon-button-array/IconButtonArray.js.map +1 -1
  86. package/lib/cjs/icon-button-array/index.js +1 -1
  87. package/lib/cjs/icon-button-array/index.js.map +1 -1
  88. package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js +1 -1
  89. package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
  90. package/lib/cjs/icons/wrapIcon.js +1 -1
  91. package/lib/cjs/icons/wrapIcon.js.map +1 -1
  92. package/lib/cjs/inline-edit/InlineEdit.js +18 -6
  93. package/lib/cjs/inline-edit/InlineEdit.js.map +1 -1
  94. package/lib/cjs/kbd/Kbd.js +5 -3
  95. package/lib/cjs/kbd/Kbd.js.map +1 -1
  96. package/lib/cjs/kbd/stories/kbd.stories.js +1 -1
  97. package/lib/cjs/kbd/stories/kbd.stories.js.map +1 -1
  98. package/lib/cjs/loading-bar/LoadingBar.js +14 -2
  99. package/lib/cjs/loading-bar/LoadingBar.js.map +1 -1
  100. package/lib/cjs/loading-spinner/LoadingSpinner.js +1 -1
  101. package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
  102. package/lib/cjs/logo/stories/logo.stories.js +1 -1
  103. package/lib/cjs/logo/stories/logo.stories.js.map +1 -1
  104. package/lib/cjs/menu/Menu.js +9 -6
  105. package/lib/cjs/menu/Menu.js.map +1 -1
  106. package/lib/cjs/popover/Popover.js +6 -4
  107. package/lib/cjs/popover/Popover.js.map +1 -1
  108. package/lib/cjs/popover/stories/popover-custom-offset.story.js +2 -1
  109. package/lib/cjs/popover/stories/popover-custom-offset.story.js.map +1 -1
  110. package/lib/cjs/popover/stories/popover-separate-anchor.story.js +1 -1
  111. package/lib/cjs/popover/stories/popover-separate-anchor.story.js.map +1 -1
  112. package/lib/cjs/progress-bar/ProgressBar.js +1 -1
  113. package/lib/cjs/progress-bar/ProgressBar.js.map +1 -1
  114. package/lib/cjs/radio/Radio.js +2 -1
  115. package/lib/cjs/radio/Radio.js.map +1 -1
  116. package/lib/cjs/radio/stories/radio.stories.js +1 -1
  117. package/lib/cjs/radio/stories/radio.stories.js.map +1 -1
  118. package/lib/cjs/select/Overrides.js +1 -1
  119. package/lib/cjs/select/Overrides.js.map +1 -1
  120. package/lib/cjs/select/Select.js +18 -6
  121. package/lib/cjs/select/Select.js.map +1 -1
  122. package/lib/cjs/side-navigation/SideNavigation.js +5 -4
  123. package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
  124. package/lib/cjs/skeleton/Skeleton.js +14 -2
  125. package/lib/cjs/skeleton/Skeleton.js.map +1 -1
  126. package/lib/cjs/skeleton/stories/skeleton.stories.js +1 -1
  127. package/lib/cjs/skeleton/stories/skeleton.stories.js.map +1 -1
  128. package/lib/cjs/spotlight/Spotlight.js +33 -14
  129. package/lib/cjs/spotlight/Spotlight.js.map +1 -1
  130. package/lib/cjs/spotlight/SpotlightProvider.js +6 -3
  131. package/lib/cjs/spotlight/SpotlightProvider.js.map +1 -1
  132. package/lib/cjs/spotlight/SpotlightTarget.js +14 -2
  133. package/lib/cjs/spotlight/SpotlightTarget.js.map +1 -1
  134. package/lib/cjs/spotlight/SpotlightTour.js +1 -1
  135. package/lib/cjs/spotlight/SpotlightTour.js.map +1 -1
  136. package/lib/cjs/spotlight/stories/spotlight.stories.js +1 -1
  137. package/lib/cjs/spotlight/stories/spotlight.stories.js.map +1 -1
  138. package/lib/cjs/spotlight/use-indicator.js +2 -1
  139. package/lib/cjs/spotlight/use-indicator.js.map +1 -1
  140. package/lib/cjs/status-label/StatusLabel.js +1 -1
  141. package/lib/cjs/status-label/StatusLabel.js.map +1 -1
  142. package/lib/cjs/switch/Switch.js +2 -1
  143. package/lib/cjs/switch/Switch.js.map +1 -1
  144. package/lib/cjs/switch/stories/switch.stories.js +1 -1
  145. package/lib/cjs/switch/stories/switch.stories.js.map +1 -1
  146. package/lib/cjs/tabs/stories/tabs-disabled.story.js +1 -1
  147. package/lib/cjs/tabs/stories/tabs-disabled.story.js.map +1 -1
  148. package/lib/cjs/tabs/stories/tabs-fill-variants.story.js +1 -1
  149. package/lib/cjs/tabs/stories/tabs-fill-variants.story.js.map +1 -1
  150. package/lib/cjs/tabs/stories/tabs-overflow.story.js +1 -1
  151. package/lib/cjs/tabs/stories/tabs-overflow.story.js.map +1 -1
  152. package/lib/cjs/tabs/stories/tabs-sizes.story.js +1 -1
  153. package/lib/cjs/tabs/stories/tabs-sizes.story.js.map +1 -1
  154. package/lib/cjs/tabs/use-tabs-scroll-overflow.js +8 -4
  155. package/lib/cjs/tabs/use-tabs-scroll-overflow.js.map +1 -1
  156. package/lib/cjs/tag/Tag.js +14 -2
  157. package/lib/cjs/tag/Tag.js.map +1 -1
  158. package/lib/cjs/text-area/TextArea.js +14 -2
  159. package/lib/cjs/text-area/TextArea.js.map +1 -1
  160. package/lib/cjs/text-area/stories/text-area.stories.js +1 -1
  161. package/lib/cjs/text-area/stories/text-area.stories.js.map +1 -1
  162. package/lib/cjs/text-input/TextInput.js +14 -2
  163. package/lib/cjs/text-input/TextInput.js.map +1 -1
  164. package/lib/cjs/text-link/TextLink.js +14 -2
  165. package/lib/cjs/text-link/TextLink.js.map +1 -1
  166. package/lib/cjs/text-overflow/TextOverflow.js +2 -1
  167. package/lib/cjs/text-overflow/TextOverflow.js.map +1 -1
  168. package/lib/cjs/text-overflow/stories/text-overflow.stories.js +1 -1
  169. package/lib/cjs/text-overflow/stories/text-overflow.stories.js.map +1 -1
  170. package/lib/cjs/text-overflow/text-overflow-utils.js +12 -6
  171. package/lib/cjs/text-overflow/text-overflow-utils.js.map +1 -1
  172. package/lib/cjs/text-overflow/use-ellipsis-observer.js +2 -1
  173. package/lib/cjs/text-overflow/use-ellipsis-observer.js.map +1 -1
  174. package/lib/cjs/text-overflow/use-truncate-with-button.js +4 -2
  175. package/lib/cjs/text-overflow/use-truncate-with-button.js.map +1 -1
  176. package/lib/cjs/theme/ThemeProvider.js +2 -1
  177. package/lib/cjs/theme/ThemeProvider.js.map +1 -1
  178. package/lib/cjs/time-picker/TimePicker.js +22 -8
  179. package/lib/cjs/time-picker/TimePicker.js.map +1 -1
  180. package/lib/cjs/time-picker/stories/time-picker.stories.js +1 -1
  181. package/lib/cjs/time-picker/stories/time-picker.stories.js.map +1 -1
  182. package/lib/cjs/timezone-picker/TimeZonePicker.js +8 -4
  183. package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
  184. package/lib/cjs/timezone-picker/generate-timezone-options.js +15 -9
  185. package/lib/cjs/timezone-picker/generate-timezone-options.js.map +1 -1
  186. package/lib/cjs/timezone-picker/stories/timezone-picker.stories.js +1 -1
  187. package/lib/cjs/timezone-picker/stories/timezone-picker.stories.js.map +1 -1
  188. package/lib/cjs/toast/Toast.js +11 -6
  189. package/lib/cjs/toast/Toast.js.map +1 -1
  190. package/lib/cjs/tooltip/Tooltip.js +35 -15
  191. package/lib/cjs/tooltip/Tooltip.js.map +1 -1
  192. package/lib/cjs/tree-view/TreeItemWrapper.js +3 -1
  193. package/lib/cjs/tree-view/TreeItemWrapper.js.map +1 -1
  194. package/lib/cjs/tree-view/TreeView.js +2 -1
  195. package/lib/cjs/tree-view/TreeView.js.map +1 -1
  196. package/lib/cjs/tree-view/TreeViewItem.js +3 -1
  197. package/lib/cjs/tree-view/TreeViewItem.js.map +1 -1
  198. package/lib/cjs/tree-view/TreeViewTextItem.js +1 -2
  199. package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
  200. package/lib/cjs/tree-view/TreeViewTrail.js +14 -2
  201. package/lib/cjs/tree-view/TreeViewTrail.js.map +1 -1
  202. package/lib/cjs/wizard/Wizard.js +3 -2
  203. package/lib/cjs/wizard/Wizard.js.map +1 -1
  204. package/lib/esm/_common/CodeBlockWrapper.js +5 -4
  205. package/lib/esm/_common/CodeBlockWrapper.js.map +1 -1
  206. package/lib/esm/_common/utils.js +4 -2
  207. package/lib/esm/_common/utils.js.map +1 -1
  208. package/lib/esm/accordion/Accordion.js +9 -6
  209. package/lib/esm/accordion/Accordion.js.map +1 -1
  210. package/lib/esm/accordion/accordion-types.js.map +1 -1
  211. package/lib/esm/accordion/stories/accordion.stories.js +1 -1
  212. package/lib/esm/accordion/stories/accordion.stories.js.map +1 -1
  213. package/lib/esm/avatar/Avatar.js +1 -1
  214. package/lib/esm/avatar/Avatar.js.map +1 -1
  215. package/lib/esm/banner/Banner.js +3 -2
  216. package/lib/esm/banner/Banner.js.map +1 -1
  217. package/lib/esm/banner/stories/banner.stories.js +1 -1
  218. package/lib/esm/banner/stories/banner.stories.js.map +1 -1
  219. package/lib/esm/box/Box.js +14 -2
  220. package/lib/esm/box/Box.js.map +1 -1
  221. package/lib/esm/box/stories/box.stories.js +2 -2
  222. package/lib/esm/box/stories/box.stories.js.map +1 -1
  223. package/lib/esm/breadcrumbs/Breadcrumbs.js +10 -7
  224. package/lib/esm/breadcrumbs/Breadcrumbs.js.map +1 -1
  225. package/lib/esm/button/stories/button.stories.js +1 -1
  226. package/lib/esm/button/stories/button.stories.js.map +1 -1
  227. package/lib/esm/checkbox/Checkbox.js +2 -1
  228. package/lib/esm/checkbox/Checkbox.js.map +1 -1
  229. package/lib/esm/checkbox/stories/checkbox.stories.js +1 -1
  230. package/lib/esm/checkbox/stories/checkbox.stories.js.map +1 -1
  231. package/lib/esm/clipboard-button/ClipboardButton.js +6 -3
  232. package/lib/esm/clipboard-button/ClipboardButton.js.map +1 -1
  233. package/lib/esm/color-picker/ColorPicker.js +2 -1
  234. package/lib/esm/color-picker/ColorPicker.js.map +1 -1
  235. package/lib/esm/data-grid/Components.js +9 -6
  236. package/lib/esm/data-grid/Components.js.map +1 -1
  237. package/lib/esm/data-grid/DataGrid.js +16 -4
  238. package/lib/esm/data-grid/DataGrid.js.map +1 -1
  239. package/lib/esm/data-grid/data-grid-nav/data-grid-nav.js +28 -14
  240. package/lib/esm/data-grid/data-grid-nav/data-grid-nav.js.map +1 -1
  241. package/lib/esm/data-grid/data-grid-nav/helpers.js +2 -1
  242. package/lib/esm/data-grid/data-grid-nav/helpers.js.map +1 -1
  243. package/lib/esm/data-grid/stories/datagrid-component-overriding.story.js +1 -3
  244. package/lib/esm/data-grid/stories/datagrid-component-overriding.story.js.map +1 -1
  245. package/lib/esm/data-grid/stories/datagrid-in-dialog.story.js +2 -1
  246. package/lib/esm/data-grid/stories/datagrid-in-dialog.story.js.map +1 -1
  247. package/lib/esm/data-grid/stories/datagrid-keyboard-navigation.story.js +2 -1
  248. package/lib/esm/data-grid/stories/datagrid-keyboard-navigation.story.js.map +1 -1
  249. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js +1 -2
  250. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  251. package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js +9 -6
  252. package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
  253. package/lib/esm/date-picker/DatePicker.js +2 -1
  254. package/lib/esm/date-picker/DatePicker.js.map +1 -1
  255. package/lib/esm/date-picker/stories/date-picker-range.story.js +1 -1
  256. package/lib/esm/date-picker/stories/date-picker-range.story.js.map +1 -1
  257. package/lib/esm/date-picker/stories/date-picker.stories.js +1 -1
  258. package/lib/esm/date-picker/stories/date-picker.stories.js.map +1 -1
  259. package/lib/esm/dialog/Dialog.js +20 -13
  260. package/lib/esm/dialog/Dialog.js.map +1 -1
  261. package/lib/esm/dialog/dialog-context.js +1 -2
  262. package/lib/esm/dialog/dialog-context.js.map +1 -1
  263. package/lib/esm/dialog/stories/dialog.stories.js +1 -1
  264. package/lib/esm/dialog/stories/dialog.stories.js.map +1 -1
  265. package/lib/esm/divider/stories/divider.stories.js +1 -1
  266. package/lib/esm/divider/stories/divider.stories.js.map +1 -1
  267. package/lib/esm/drawer/Drawer.js +9 -8
  268. package/lib/esm/drawer/Drawer.js.map +1 -1
  269. package/lib/esm/dropdown-button/DropdownButton.js +14 -2
  270. package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
  271. package/lib/esm/dropzone/Dropzone.js +3 -2
  272. package/lib/esm/dropzone/Dropzone.js.map +1 -1
  273. package/lib/esm/dropzone/stories/dropzone-csv-files.story.js +1 -3
  274. package/lib/esm/dropzone/stories/dropzone-csv-files.story.js.map +1 -1
  275. package/lib/esm/dropzone/stories/dropzone-custom-extensions.story.js +1 -3
  276. package/lib/esm/dropzone/stories/dropzone-custom-extensions.story.js.map +1 -1
  277. package/lib/esm/dropzone/stories/dropzone-default.story.js +1 -3
  278. package/lib/esm/dropzone/stories/dropzone-default.story.js.map +1 -1
  279. package/lib/esm/dropzone/stories/dropzone-disabled.story.js +1 -3
  280. package/lib/esm/dropzone/stories/dropzone-disabled.story.js.map +1 -1
  281. package/lib/esm/flex/Flex.js +14 -2
  282. package/lib/esm/flex/Flex.js.map +1 -1
  283. package/lib/esm/graph-label/GraphLabel.js +18 -4
  284. package/lib/esm/graph-label/GraphLabel.js.map +1 -1
  285. package/lib/esm/icon-button/stories/icon-button.stories.js +1 -1
  286. package/lib/esm/icon-button/stories/icon-button.stories.js.map +1 -1
  287. package/lib/esm/icon-button-array/IconButtonArray.js +14 -2
  288. package/lib/esm/icon-button-array/IconButtonArray.js.map +1 -1
  289. package/lib/esm/icon-button-array/index.js +1 -1
  290. package/lib/esm/icon-button-array/index.js.map +1 -1
  291. package/lib/esm/icon-button-array/stories/icon-button-array.stories.js +1 -1
  292. package/lib/esm/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
  293. package/lib/esm/icons/wrapIcon.js +1 -1
  294. package/lib/esm/icons/wrapIcon.js.map +1 -1
  295. package/lib/esm/inline-edit/InlineEdit.js +18 -6
  296. package/lib/esm/inline-edit/InlineEdit.js.map +1 -1
  297. package/lib/esm/kbd/Kbd.js +5 -3
  298. package/lib/esm/kbd/Kbd.js.map +1 -1
  299. package/lib/esm/kbd/stories/kbd.stories.js +1 -1
  300. package/lib/esm/kbd/stories/kbd.stories.js.map +1 -1
  301. package/lib/esm/loading-bar/LoadingBar.js +14 -2
  302. package/lib/esm/loading-bar/LoadingBar.js.map +1 -1
  303. package/lib/esm/loading-spinner/LoadingSpinner.js +1 -1
  304. package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
  305. package/lib/esm/logo/stories/logo.stories.js +1 -1
  306. package/lib/esm/logo/stories/logo.stories.js.map +1 -1
  307. package/lib/esm/menu/Menu.js +9 -6
  308. package/lib/esm/menu/Menu.js.map +1 -1
  309. package/lib/esm/popover/Popover.js +6 -4
  310. package/lib/esm/popover/Popover.js.map +1 -1
  311. package/lib/esm/popover/stories/popover-custom-offset.story.js +2 -1
  312. package/lib/esm/popover/stories/popover-custom-offset.story.js.map +1 -1
  313. package/lib/esm/popover/stories/popover-separate-anchor.story.js +1 -1
  314. package/lib/esm/popover/stories/popover-separate-anchor.story.js.map +1 -1
  315. package/lib/esm/progress-bar/ProgressBar.js +1 -1
  316. package/lib/esm/progress-bar/ProgressBar.js.map +1 -1
  317. package/lib/esm/radio/Radio.js +2 -1
  318. package/lib/esm/radio/Radio.js.map +1 -1
  319. package/lib/esm/radio/stories/radio.stories.js +1 -1
  320. package/lib/esm/radio/stories/radio.stories.js.map +1 -1
  321. package/lib/esm/select/Overrides.js +1 -1
  322. package/lib/esm/select/Overrides.js.map +1 -1
  323. package/lib/esm/select/Select.js +18 -6
  324. package/lib/esm/select/Select.js.map +1 -1
  325. package/lib/esm/side-navigation/SideNavigation.js +5 -4
  326. package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
  327. package/lib/esm/skeleton/Skeleton.js +14 -2
  328. package/lib/esm/skeleton/Skeleton.js.map +1 -1
  329. package/lib/esm/skeleton/stories/skeleton.stories.js +1 -1
  330. package/lib/esm/skeleton/stories/skeleton.stories.js.map +1 -1
  331. package/lib/esm/spotlight/Spotlight.js +33 -14
  332. package/lib/esm/spotlight/Spotlight.js.map +1 -1
  333. package/lib/esm/spotlight/SpotlightProvider.js +6 -3
  334. package/lib/esm/spotlight/SpotlightProvider.js.map +1 -1
  335. package/lib/esm/spotlight/SpotlightTarget.js +14 -2
  336. package/lib/esm/spotlight/SpotlightTarget.js.map +1 -1
  337. package/lib/esm/spotlight/SpotlightTour.js +1 -1
  338. package/lib/esm/spotlight/SpotlightTour.js.map +1 -1
  339. package/lib/esm/spotlight/stories/spotlight.stories.js +1 -1
  340. package/lib/esm/spotlight/stories/spotlight.stories.js.map +1 -1
  341. package/lib/esm/spotlight/use-indicator.js +2 -1
  342. package/lib/esm/spotlight/use-indicator.js.map +1 -1
  343. package/lib/esm/status-label/StatusLabel.js +1 -1
  344. package/lib/esm/status-label/StatusLabel.js.map +1 -1
  345. package/lib/esm/switch/Switch.js +2 -1
  346. package/lib/esm/switch/Switch.js.map +1 -1
  347. package/lib/esm/switch/stories/switch.stories.js +1 -1
  348. package/lib/esm/switch/stories/switch.stories.js.map +1 -1
  349. package/lib/esm/tabs/stories/tabs-disabled.story.js +1 -1
  350. package/lib/esm/tabs/stories/tabs-disabled.story.js.map +1 -1
  351. package/lib/esm/tabs/stories/tabs-fill-variants.story.js +1 -1
  352. package/lib/esm/tabs/stories/tabs-fill-variants.story.js.map +1 -1
  353. package/lib/esm/tabs/stories/tabs-overflow.story.js +1 -1
  354. package/lib/esm/tabs/stories/tabs-overflow.story.js.map +1 -1
  355. package/lib/esm/tabs/stories/tabs-sizes.story.js +1 -1
  356. package/lib/esm/tabs/stories/tabs-sizes.story.js.map +1 -1
  357. package/lib/esm/tabs/use-tabs-scroll-overflow.js +8 -4
  358. package/lib/esm/tabs/use-tabs-scroll-overflow.js.map +1 -1
  359. package/lib/esm/tag/Tag.js +14 -2
  360. package/lib/esm/tag/Tag.js.map +1 -1
  361. package/lib/esm/text-area/TextArea.js +14 -2
  362. package/lib/esm/text-area/TextArea.js.map +1 -1
  363. package/lib/esm/text-area/stories/text-area.stories.js +1 -1
  364. package/lib/esm/text-area/stories/text-area.stories.js.map +1 -1
  365. package/lib/esm/text-input/TextInput.js +14 -2
  366. package/lib/esm/text-input/TextInput.js.map +1 -1
  367. package/lib/esm/text-link/TextLink.js +14 -2
  368. package/lib/esm/text-link/TextLink.js.map +1 -1
  369. package/lib/esm/text-overflow/TextOverflow.js +2 -1
  370. package/lib/esm/text-overflow/TextOverflow.js.map +1 -1
  371. package/lib/esm/text-overflow/stories/text-overflow.stories.js +1 -1
  372. package/lib/esm/text-overflow/stories/text-overflow.stories.js.map +1 -1
  373. package/lib/esm/text-overflow/text-overflow-utils.js +12 -6
  374. package/lib/esm/text-overflow/text-overflow-utils.js.map +1 -1
  375. package/lib/esm/text-overflow/use-ellipsis-observer.js +2 -1
  376. package/lib/esm/text-overflow/use-ellipsis-observer.js.map +1 -1
  377. package/lib/esm/text-overflow/use-truncate-with-button.js +4 -2
  378. package/lib/esm/text-overflow/use-truncate-with-button.js.map +1 -1
  379. package/lib/esm/theme/ThemeProvider.js +2 -1
  380. package/lib/esm/theme/ThemeProvider.js.map +1 -1
  381. package/lib/esm/time-picker/TimePicker.js +22 -8
  382. package/lib/esm/time-picker/TimePicker.js.map +1 -1
  383. package/lib/esm/time-picker/stories/time-picker.stories.js +1 -1
  384. package/lib/esm/time-picker/stories/time-picker.stories.js.map +1 -1
  385. package/lib/esm/timezone-picker/TimeZonePicker.js +8 -4
  386. package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
  387. package/lib/esm/timezone-picker/generate-timezone-options.js +15 -9
  388. package/lib/esm/timezone-picker/generate-timezone-options.js.map +1 -1
  389. package/lib/esm/timezone-picker/stories/timezone-picker.stories.js +1 -1
  390. package/lib/esm/timezone-picker/stories/timezone-picker.stories.js.map +1 -1
  391. package/lib/esm/toast/Toast.js +11 -6
  392. package/lib/esm/toast/Toast.js.map +1 -1
  393. package/lib/esm/tooltip/Tooltip.js +35 -15
  394. package/lib/esm/tooltip/Tooltip.js.map +1 -1
  395. package/lib/esm/tree-view/TreeItemWrapper.js +3 -1
  396. package/lib/esm/tree-view/TreeItemWrapper.js.map +1 -1
  397. package/lib/esm/tree-view/TreeView.js +2 -1
  398. package/lib/esm/tree-view/TreeView.js.map +1 -1
  399. package/lib/esm/tree-view/TreeViewItem.js +3 -1
  400. package/lib/esm/tree-view/TreeViewItem.js.map +1 -1
  401. package/lib/esm/tree-view/TreeViewTextItem.js +1 -2
  402. package/lib/esm/tree-view/TreeViewTextItem.js.map +1 -1
  403. package/lib/esm/tree-view/TreeViewTrail.js +14 -2
  404. package/lib/esm/tree-view/TreeViewTrail.js.map +1 -1
  405. package/lib/esm/wizard/Wizard.js +3 -2
  406. package/lib/esm/wizard/Wizard.js.map +1 -1
  407. package/lib/types/_common/CodeBlockWrapper.d.ts +1 -1
  408. package/lib/types/_common/CodeBlockWrapper.d.ts.map +1 -1
  409. package/lib/types/_common/utils.d.ts.map +1 -1
  410. package/lib/types/accordion/Accordion.d.ts +4 -4
  411. package/lib/types/accordion/Accordion.d.ts.map +1 -1
  412. package/lib/types/accordion/accordion-types.d.ts +1 -1
  413. package/lib/types/accordion/accordion-types.d.ts.map +1 -1
  414. package/lib/types/accordion/stories/accordion.stories.d.ts +4 -4
  415. package/lib/types/avatar/Avatar.d.ts.map +1 -1
  416. package/lib/types/banner/Banner.d.ts +1 -1
  417. package/lib/types/banner/Banner.d.ts.map +1 -1
  418. package/lib/types/box/Box.d.ts +1 -1
  419. package/lib/types/box/Box.d.ts.map +1 -1
  420. package/lib/types/box/stories/box.stories.d.ts +1 -1
  421. package/lib/types/breadcrumbs/Breadcrumbs.d.ts +3 -3
  422. package/lib/types/breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  423. package/lib/types/breadcrumbs/stories/breadcrumbs.stories.d.ts +3 -3
  424. package/lib/types/button/stories/button.stories.d.ts +1 -1
  425. package/lib/types/button/stories/button.stories.d.ts.map +1 -1
  426. package/lib/types/checkbox/Checkbox.d.ts.map +1 -1
  427. package/lib/types/clipboard-button/ClipboardButton.d.ts.map +1 -1
  428. package/lib/types/color-picker/ColorPicker.d.ts.map +1 -1
  429. package/lib/types/data-grid/Components.d.ts.map +1 -1
  430. package/lib/types/data-grid/DataGrid.d.ts +23 -23
  431. package/lib/types/data-grid/DataGrid.d.ts.map +1 -1
  432. package/lib/types/data-grid/data-grid-nav/data-grid-nav.d.ts.map +1 -1
  433. package/lib/types/data-grid/data-grid-nav/helpers.d.ts.map +1 -1
  434. package/lib/types/data-grid/stories/datagrid-component-overriding.story.d.ts.map +1 -1
  435. package/lib/types/data-grid/stories/datagrid-in-dialog.story.d.ts.map +1 -1
  436. package/lib/types/data-grid/stories/datagrid-keyboard-navigation.story.d.ts.map +1 -1
  437. package/lib/types/data-grid/stories/datagrid-kitchen-sink.story.d.ts.map +1 -1
  438. package/lib/types/data-grid/stories/datagrid-pinned-columns.stories.d.ts +1 -1
  439. package/lib/types/data-grid/stories/datagrid-placeholder-states.stories.d.ts +1 -1
  440. package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts +1 -1
  441. package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts.map +1 -1
  442. package/lib/types/date-picker/DatePicker.d.ts.map +1 -1
  443. package/lib/types/date-picker/stories/date-picker-range.story.d.ts.map +1 -1
  444. package/lib/types/dialog/Dialog.d.ts +6 -6
  445. package/lib/types/dialog/Dialog.d.ts.map +1 -1
  446. package/lib/types/dialog/dialog-context.d.ts.map +1 -1
  447. package/lib/types/drawer/Drawer.d.ts +3 -3
  448. package/lib/types/drawer/Drawer.d.ts.map +1 -1
  449. package/lib/types/dropdown-button/DropdownButton.d.ts +1 -1
  450. package/lib/types/dropdown-button/DropdownButton.d.ts.map +1 -1
  451. package/lib/types/dropzone/Dropzone.d.ts.map +1 -1
  452. package/lib/types/flex/Flex.d.ts +1 -1
  453. package/lib/types/flex/Flex.d.ts.map +1 -1
  454. package/lib/types/flex/stories/flex.stories.d.ts +1 -1
  455. package/lib/types/graph-label/GraphLabel.d.ts +1 -1
  456. package/lib/types/graph-label/GraphLabel.d.ts.map +1 -1
  457. package/lib/types/icon-button-array/IconButtonArray.d.ts +2 -2
  458. package/lib/types/icon-button-array/IconButtonArray.d.ts.map +1 -1
  459. package/lib/types/icon-button-array/index.d.ts +1 -1
  460. package/lib/types/icon-button-array/index.d.ts.map +1 -1
  461. package/lib/types/inline-edit/InlineEdit.d.ts +1 -1
  462. package/lib/types/inline-edit/InlineEdit.d.ts.map +1 -1
  463. package/lib/types/kbd/Kbd.d.ts.map +1 -1
  464. package/lib/types/loading-bar/LoadingBar.d.ts +1 -1
  465. package/lib/types/loading-bar/LoadingBar.d.ts.map +1 -1
  466. package/lib/types/menu/Menu.d.ts +2 -2
  467. package/lib/types/menu/Menu.d.ts.map +1 -1
  468. package/lib/types/popover/Popover.d.ts +1 -1
  469. package/lib/types/popover/Popover.d.ts.map +1 -1
  470. package/lib/types/popover/stories/popover-custom-offset.story.d.ts.map +1 -1
  471. package/lib/types/radio/Radio.d.ts.map +1 -1
  472. package/lib/types/select/Overrides.d.ts +1 -2
  473. package/lib/types/select/Overrides.d.ts.map +1 -1
  474. package/lib/types/select/Select.d.ts +1 -1
  475. package/lib/types/select/Select.d.ts.map +1 -1
  476. package/lib/types/side-navigation/SideNavigation.d.ts +1 -1
  477. package/lib/types/side-navigation/SideNavigation.d.ts.map +1 -1
  478. package/lib/types/side-navigation/stories/side-nav.stories.d.ts +1 -1
  479. package/lib/types/skeleton/Skeleton.d.ts +1 -1
  480. package/lib/types/skeleton/Skeleton.d.ts.map +1 -1
  481. package/lib/types/skeleton/stories/skeleton.stories.d.ts +1 -1
  482. package/lib/types/spotlight/Spotlight.d.ts +6 -6
  483. package/lib/types/spotlight/Spotlight.d.ts.map +1 -1
  484. package/lib/types/spotlight/SpotlightProvider.d.ts.map +1 -1
  485. package/lib/types/spotlight/SpotlightTarget.d.ts +1 -1
  486. package/lib/types/spotlight/SpotlightTarget.d.ts.map +1 -1
  487. package/lib/types/spotlight/use-indicator.d.ts.map +1 -1
  488. package/lib/types/switch/Switch.d.ts.map +1 -1
  489. package/lib/types/tabs/use-tabs-scroll-overflow.d.ts.map +1 -1
  490. package/lib/types/tag/Tag.d.ts +1 -1
  491. package/lib/types/tag/Tag.d.ts.map +1 -1
  492. package/lib/types/text-area/TextArea.d.ts +1 -1
  493. package/lib/types/text-area/TextArea.d.ts.map +1 -1
  494. package/lib/types/text-input/TextInput.d.ts +1 -1
  495. package/lib/types/text-input/TextInput.d.ts.map +1 -1
  496. package/lib/types/text-link/TextLink.d.ts +1 -1
  497. package/lib/types/text-link/TextLink.d.ts.map +1 -1
  498. package/lib/types/text-overflow/TextOverflow.d.ts.map +1 -1
  499. package/lib/types/text-overflow/text-overflow-utils.d.ts.map +1 -1
  500. package/lib/types/text-overflow/use-ellipsis-observer.d.ts.map +1 -1
  501. package/lib/types/text-overflow/use-truncate-with-button.d.ts.map +1 -1
  502. package/lib/types/theme/ThemeProvider.d.ts.map +1 -1
  503. package/lib/types/time-picker/TimePicker.d.ts +1 -1
  504. package/lib/types/time-picker/TimePicker.d.ts.map +1 -1
  505. package/lib/types/time-picker/stories/time-picker.stories.d.ts +1 -1
  506. package/lib/types/timezone-picker/TimeZonePicker.d.ts.map +1 -1
  507. package/lib/types/timezone-picker/generate-timezone-options.d.ts.map +1 -1
  508. package/lib/types/toast/Toast.d.ts +1 -1
  509. package/lib/types/toast/Toast.d.ts.map +1 -1
  510. package/lib/types/tooltip/Tooltip.d.ts +8 -7
  511. package/lib/types/tooltip/Tooltip.d.ts.map +1 -1
  512. package/lib/types/tree-view/TreeItemWrapper.d.ts.map +1 -1
  513. package/lib/types/tree-view/TreeView.d.ts.map +1 -1
  514. package/lib/types/tree-view/TreeViewItem.d.ts.map +1 -1
  515. package/lib/types/tree-view/TreeViewTrail.d.ts +2 -1
  516. package/lib/types/tree-view/TreeViewTrail.d.ts.map +1 -1
  517. package/lib/types/wizard/Wizard.d.ts +1 -1
  518. package/lib/types/wizard/Wizard.d.ts.map +1 -1
  519. package/package.json +2 -2
  520. package/lib/cjs/dropdown-button/avatar-test.stories.tsx.js +0 -31
  521. package/lib/cjs/dropdown-button/avatar-test.stories.tsx.js.map +0 -1
  522. package/lib/esm/dropdown-button/avatar-test.stories.tsx.js +0 -27
  523. package/lib/esm/dropdown-button/avatar-test.stories.tsx.js.map +0 -1
  524. package/lib/types/dropdown-button/avatar-test.stories.tsx.d.ts +0 -24
  525. package/lib/types/dropdown-button/avatar-test.stories.tsx.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button.stories.js","sourceRoot":"","sources":["../../../../src/icon-button/stories/icon-button.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,iBAAiB,GAClB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE,UAAU;IACrB,EAAE,EAAE,wBAAwB;IAC5B,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,uBAAuB;CACG,CAAC;AAEpC,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,0CAA0C;IAC1C,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,oBAAoB;gBAC1B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,iBAAiB;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAU;IAC3B,0CAA0C;IAC1C,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,gBAAgB;IACxB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,mBAAmB;aAC1B;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,0CAA0C;IAC1C,IAAI,EAAE,EAAE;IACR,MAAM,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c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { IconButton } from '../';\nimport {\n IconButtonActive,\n IconButtonActiveSrc,\n IconButtonDefault,\n IconButtonDefaultSrc,\n IconButtonDisabled,\n IconButtonDisabledSrc,\n IconButtonFloating,\n IconButtonFloatingSrc,\n IconButtonLoading,\n IconButtonLoadingSrc,\n IconButtonSizes,\n IconButtonSizesSrc,\n IconButtonTone,\n IconButtonToneSrc,\n} from '.';\n\nconst componentMeta = {\n component: IconButton,\n id: 'components-icon-button',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/IconButton',\n} satisfies Meta<typeof IconButton>;\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n parameters: {\n docs: {\n source: {\n code: IconButtonDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: IconButtonDefault,\n};\n\nexport const Active: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonActive,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonActiveSrc,\n },\n },\n },\n};\n\nexport const Disabled: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonDisabled,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonDisabledSrc,\n },\n },\n },\n};\n\nexport const Floating: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonFloating,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonFloatingSrc,\n },\n },\n },\n};\n\nexport const Loading: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonLoading,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonLoadingSrc,\n },\n },\n },\n};\n\nexport const Sizes: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonSizes,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonSizesSrc,\n },\n },\n },\n};\n\nexport const Tone: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonTone,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonToneSrc,\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"icon-button.stories.js","sourceRoot":"","sources":["../../../../src/icon-button/stories/icon-button.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,iBAAiB,GAClB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE,UAAU;IACrB,EAAE,EAAE,wBAAwB;IAC5B,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,uBAAuB;CACG,CAAC;AAEpC,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,0CAA0C;IAC1C,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F;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,0CAA0C;IAC1C,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,eAAe;IACvB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,kBAAkB;aACzB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,0CAA0C;IAC1C,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,cAAc;IACtB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,iBAAiB;aACxB;SACF;KACF;CACF,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { IconButton } from '..';\nimport {\n IconButtonActive,\n IconButtonActiveSrc,\n IconButtonDefault,\n IconButtonDefaultSrc,\n IconButtonDisabled,\n IconButtonDisabledSrc,\n IconButtonFloating,\n IconButtonFloatingSrc,\n IconButtonLoading,\n IconButtonLoadingSrc,\n IconButtonSizes,\n IconButtonSizesSrc,\n IconButtonTone,\n IconButtonToneSrc,\n} from '.';\n\nconst componentMeta = {\n component: IconButton,\n id: 'components-icon-button',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/IconButton',\n} satisfies Meta<typeof IconButton>;\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n parameters: {\n docs: {\n source: {\n code: IconButtonDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: IconButtonDefault,\n};\n\nexport const Active: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonActive,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonActiveSrc,\n },\n },\n },\n};\n\nexport const Disabled: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonDisabled,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonDisabledSrc,\n },\n },\n },\n};\n\nexport const Floating: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonFloating,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonFloatingSrc,\n },\n },\n },\n};\n\nexport const Loading: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonLoading,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonLoadingSrc,\n },\n },\n },\n};\n\nexport const Sizes: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonSizes,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonSizesSrc,\n },\n },\n },\n};\n\nexport const Tone: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonTone,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonToneSrc,\n },\n },\n },\n};\n"]}
@@ -1,3 +1,14 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
13
  /**
3
14
  *
@@ -27,7 +38,8 @@ const CollapsibleButtonWrapper = ({ children, }) => {
27
38
  return _jsx(_Fragment, { children: children });
28
39
  };
29
40
  CollapsibleButtonWrapper.displayName = 'CollapsibleButtonWrapper';
30
- export const IconButtonArrayComponent = ({ children, as, isFloating = false, orientation = 'horizontal', size = 'medium', className, style, htmlAttributes, ref, }) => {
41
+ export const IconButtonArrayComponent = (_a) => {
42
+ var { children, as, isFloating = false, orientation = 'horizontal', size = 'medium', className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["children", "as", "isFloating", "orientation", "size", "className", "style", "htmlAttributes", "ref"]);
31
43
  const [isCollapsed, setIsCollapsed] = React.useState(true);
32
44
  const classes = classNames('ndl-icon-btn-array', {
33
45
  'n-flex-row': orientation === 'horizontal',
@@ -64,7 +76,7 @@ export const IconButtonArrayComponent = ({ children, as, isFloating = false, ori
64
76
  }
65
77
  return isCollapsed ? _jsx(ChevronDownIconOutline, {}) : _jsx(ChevronUpIconOutline, {});
66
78
  };
67
- return (_jsxs(Component, Object.assign({ role: "group", className: classes, ref: ref, style: style }, htmlAttributes, { children: [fixedButtonsWithProps, collapsibleButtonsWithProps && (_jsxs(_Fragment, { children: [!isCollapsed && collapsibleButtonsWithProps, _jsx(CleanIconButton, { className: "ndl-grouped", onClick: () => {
79
+ return (_jsxs(Component, Object.assign({ role: "group", className: classes, ref: ref, style: style }, restProps, htmlAttributes, { children: [fixedButtonsWithProps, collapsibleButtonsWithProps && (_jsxs(_Fragment, { children: [!isCollapsed && collapsibleButtonsWithProps, _jsx(CleanIconButton, { className: "ndl-grouped", onClick: () => {
68
80
  setIsCollapsed((prev) => !prev);
69
81
  }, size: size, description: isCollapsed ? 'Show more' : 'Show less', tooltipProps: {
70
82
  root: {
@@ -1 +1 @@
1
- {"version":3,"file":"IconButtonArray.js","sourceRoot":"","sources":["../../../src/icon-button-array/IconButtonArray.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAyBlB,MAAM,wBAAwB,GAA4C,CAAC,EACzE,QAAQ,GACT,EAAE,EAAE;IACH,OAAO,4BAAG,QAAQ,GAAI,CAAC;AACzB,CAAC,CAAC;AACF,wBAAwB,CAAC,WAAW,GAAG,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAsC,EAC5E,QAAQ,EACR,EAAE,EACF,UAAU,GAAG,KAAK,EAClB,WAAW,GAAG,YAAY,EAC1B,IAAI,GAAG,QAAQ,EACf,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,GAC6C,EAAE,EAAE;IACpD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE3D,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,EAAE;QAC/C,YAAY,EAAE,WAAW,KAAK,YAAY;QAC1C,YAAY,EAAE,WAAW,KAAK,UAAU;QACxC,oBAAoB,EAAE,UAAU;QAChC,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,IAAI;QACrB,CAAC,SAAU,CAAC,EAAE,SAAS;KACxB,CAAC,CAAC;IAEH,MAAM,SAAS,GA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C,OAAO,WAAW,CAAC,CAAC,CAAC,CACnB,KAAC,uBAAuB,KAAG,CAC5B,CAAC,CAAC,CAAC,CACF,KAAC,sBAAsB,KAAG,CAC3B,CAAC;QACJ,CAAC;QACD,OAAO,WAAW,CAAC,CAAC,CAAC,KAAC,sBAAsB,KAAG,CAAC,CAAC,CAAC,KAAC,oBAAoB,KAAG,CAAC;IAC7E,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,SAAS,kBACR,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,IACR,cAAc,eAEjB,qBAAqB,EACrB,2BAA2B,IAAI,CAC9B,8BACG,CAAC,WAAW,IAAI,2BAA2B,EAC5C,KAAC,eAAe,IACd,SAAS,EAAC,aAAa,EACvB,OAAO,EAAE,GAAG,EAAE;4BACZ,cAAc,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;wBAClC,CAAC,EACD,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,EACpD,YAAY,EAAE;4BACZ,IAAI,EAAE;gCACJ,2BAA2B,EAAE,IAAI;6BAClC;yBACF,EACD,cAAc,EAAE;4BACd,eAAe,EAAE,CAAC,WAAW;yBAC9B,YAEA,iBAAiB,EAAE,GACJ,IACjB,CACJ,KACS,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,wBAAwB,EAAE;IAC9D,wBAAwB,EAAE,wBAAwB;CACnD,CAAC,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport {\n ChevronDownIconOutline,\n ChevronLeftIconOutline,\n ChevronRightIconOutline,\n ChevronUpIconOutline,\n} from '../icons';\n\n/**\n * Types\n */\ntype IconButtonArrayProps = {\n /** Content displayed in the icon button array */\n children: React.ReactNode;\n /** Orientation of the icon button array */\n orientation?: 'vertical' | 'horizontal';\n /** Whether the icon button array is floating */\n isFloating?: boolean;\n /** Size of the icon button array */\n size?: 'small' | 'medium' | 'large';\n /** Additional class name*/\n className?: string;\n};\n\ntype CollapsibleButtonWrapperProps = {\n /** Icon buttons to be displayed in the collapsible button wrapper */\n children:\n | React.ReactElement<React.ComponentProps<typeof CleanIconButton>>\n | React.ReactElement<React.ComponentProps<typeof CleanIconButton>>[];\n};\n\nconst CollapsibleButtonWrapper: React.FC<CollapsibleButtonWrapperProps> = ({\n children,\n}) => {\n return <>{children}</>;\n};\nCollapsibleButtonWrapper.displayName = 'CollapsibleButtonWrapper';\n\nexport const IconButtonArrayComponent = <T extends React.ElementType = 'div'>({\n children,\n as,\n isFloating = false,\n orientation = 'horizontal',\n size = 'medium',\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, IconButtonArrayProps>) => {\n const [isCollapsed, setIsCollapsed] = React.useState(true);\n\n const classes = classNames('ndl-icon-btn-array', {\n 'n-flex-row': orientation === 'horizontal',\n 'n-flex-col': orientation === 'vertical',\n 'ndl-array-floating': isFloating,\n [`ndl-${size}`]: size,\n [className!]: className,\n });\n\n const Component: React.ElementType = as || 'div';\n\n const applySizeProp = (child: React.ReactElement) => {\n if (\n React.isValidElement<React.ComponentProps<typeof CleanIconButton>>(\n child,\n ) &&\n child.type === CleanIconButton\n ) {\n return React.cloneElement(child, {\n className: classNames(child.props.className, 'ndl-grouped'),\n size: child.props.size || size,\n });\n }\n return child;\n };\n\n const childrenArray = React.Children.toArray(\n children,\n ) as React.ReactElement[];\n\n const fixedButtons = childrenArray.filter(\n (child) =>\n !React.isValidElement(child) ||\n (child.type as React.ComponentType).displayName !==\n 'CollapsibleButtonWrapper',\n );\n\n const fixedButtonsWithProps = React.Children.map(fixedButtons, applySizeProp);\n\n const collapsibleButtonWrapper = childrenArray.find(\n (child) =>\n React.isValidElement(child) &&\n (child.type as React.ComponentType).displayName ===\n 'CollapsibleButtonWrapper',\n );\n\n const collapsibleButtonsWithProps = collapsibleButtonWrapper\n ? React.Children.map(\n (\n collapsibleButtonWrapper as React.ReactElement<CollapsibleButtonWrapperProps>\n ).props.children,\n applySizeProp,\n )\n : null;\n\n const renderChevronIcon = () => {\n if (orientation === 'horizontal') {\n return isCollapsed ? (\n <ChevronRightIconOutline />\n ) : (\n <ChevronLeftIconOutline />\n );\n }\n return isCollapsed ? <ChevronDownIconOutline /> : <ChevronUpIconOutline />;\n };\n\n return (\n <Component\n role=\"group\"\n className={classes}\n ref={ref}\n style={style}\n {...htmlAttributes}\n >\n {fixedButtonsWithProps}\n {collapsibleButtonsWithProps && (\n <>\n {!isCollapsed && collapsibleButtonsWithProps}\n <CleanIconButton\n className=\"ndl-grouped\"\n onClick={() => {\n setIsCollapsed((prev) => !prev);\n }}\n size={size}\n description={isCollapsed ? 'Show more' : 'Show less'}\n tooltipProps={{\n root: {\n shouldCloseOnReferenceClick: true,\n },\n }}\n htmlAttributes={{\n 'aria-expanded': !isCollapsed,\n }}\n >\n {renderChevronIcon()}\n </CleanIconButton>\n </>\n )}\n </Component>\n );\n};\n\nconst IconButtonArray = Object.assign(IconButtonArrayComponent, {\n CollapsibleButtonWrapper: CollapsibleButtonWrapper,\n});\n\nexport { IconButtonArray };\n"]}
1
+ {"version":3,"file":"IconButtonArray.js","sourceRoot":"","sources":["../../../src/icon-button-array/IconButtonArray.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAyBlB,MAAM,wBAAwB,GAA4C,CAAC,EACzE,QAAQ,GACT,EAAE,EAAE;IACH,OAAO,4BAAG,QAAQ,GAAI,CAAC;AACzB,CAAC,CAAC;AACF,wBAAwB,CAAC,WAAW,GAAG,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAsC,EAW5B,EAAE,EAAE;QAXwB,EAC5E,QAAQ,EACR,EAAE,EACF,UAAU,GAAG,KAAK,EAClB,WAAW,GAAG,YAAY,EAC1B,IAAI,GAAG,QAAQ,EACf,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAE6C,EAD7C,SAAS,cAVgE,sGAW7E,CADa;IAEZ,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE3D,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,EAAE;QAC/C,YAAY,EAAE,WAAW,KAAK,YAAY;QAC1C,YAAY,EAAE,WAAW,KAAK,UAAU;QACxC,oBAAoB,EAAE,UAAU;QAChC,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,IAAI;QACrB,CAAC,SAAU,CAAC,EAAE,SAAS;KACxB,CAAC,CAAC;IAEH,MAAM,SAAS,GAAsB,EAAE,IAAI,KAAK,CAAC;IAEjD,MAAM,aAAa,GAA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,KAAG,CAC5B,CAAC,CAAC,CAAC,CACF,KAAC,sBAAsB,KAAG,CAC3B,CAAC;QACJ,CAAC;QACD,OAAO,WAAW,CAAC,CAAC,CAAC,KAAC,sBAAsB,KAAG,CAAC,CAAC,CAAC,KAAC,oBAAoB,KAAG,CAAC;IAC7E,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,SAAS,kBACR,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,eAEjB,qBAAqB,EACrB,2BAA2B,IAAI,CAC9B,8BACG,CAAC,WAAW,IAAI,2BAA2B,EAC5C,KAAC,eAAe,IACd,SAAS,EAAC,aAAa,EACvB,OAAO,EAAE,GAAG,EAAE;4BACZ,cAAc,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;wBAClC,CAAC,EACD,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,EACpD,YAAY,EAAE;4BACZ,IAAI,EAAE;gCACJ,2BAA2B,EAAE,IAAI;6BAClC;yBACF,EACD,cAAc,EAAE;4BACd,eAAe,EAAE,CAAC,WAAW;yBAC9B,YAEA,iBAAiB,EAAE,GACJ,IACjB,CACJ,KACS,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,wBAAwB,EAAE;IAC9D,wBAAwB,EAAE,wBAAwB;CACnD,CAAC,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport {\n ChevronDownIconOutline,\n ChevronLeftIconOutline,\n ChevronRightIconOutline,\n ChevronUpIconOutline,\n} from '../icons';\n\n/**\n * Types\n */\ntype IconButtonArrayProps = {\n /** Content displayed in the icon button array */\n children: React.ReactNode;\n /** Orientation of the icon button array */\n orientation?: 'vertical' | 'horizontal';\n /** Whether the icon button array is floating */\n isFloating?: boolean;\n /** Size of the icon button array */\n size?: 'small' | 'medium' | 'large';\n /** Additional class name*/\n className?: string;\n};\n\ntype CollapsibleButtonWrapperProps = {\n /** Icon buttons to be displayed in the collapsible button wrapper */\n children:\n | React.ReactElement<React.ComponentProps<typeof CleanIconButton>>\n | React.ReactElement<React.ComponentProps<typeof CleanIconButton>>[];\n};\n\nconst CollapsibleButtonWrapper: React.FC<CollapsibleButtonWrapperProps> = ({\n children,\n}) => {\n return <>{children}</>;\n};\nCollapsibleButtonWrapper.displayName = 'CollapsibleButtonWrapper';\n\nexport const IconButtonArrayComponent = <T extends React.ElementType = 'div'>({\n children,\n as,\n isFloating = false,\n orientation = 'horizontal',\n size = 'medium',\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, IconButtonArrayProps>) => {\n const [isCollapsed, setIsCollapsed] = React.useState(true);\n\n const classes = classNames('ndl-icon-btn-array', {\n 'n-flex-row': orientation === 'horizontal',\n 'n-flex-col': orientation === 'vertical',\n 'ndl-array-floating': isFloating,\n [`ndl-${size}`]: size,\n [className!]: className,\n });\n\n const Component: React.ElementType = as || 'div';\n\n const applySizeProp = (child: React.ReactElement) => {\n if (\n React.isValidElement<React.ComponentProps<typeof CleanIconButton>>(\n child,\n ) &&\n child.type === CleanIconButton\n ) {\n return React.cloneElement(child, {\n className: classNames(child.props.className, 'ndl-grouped'),\n size: child.props.size || size,\n });\n }\n return child;\n };\n\n const childrenArray = React.Children.toArray(\n children,\n ) as React.ReactElement[];\n\n const fixedButtons = childrenArray.filter(\n (child) =>\n !React.isValidElement(child) ||\n (child.type as React.ComponentType).displayName !==\n 'CollapsibleButtonWrapper',\n );\n\n const fixedButtonsWithProps = React.Children.map(fixedButtons, applySizeProp);\n\n const collapsibleButtonWrapper = childrenArray.find(\n (child) =>\n React.isValidElement(child) &&\n (child.type as React.ComponentType).displayName ===\n 'CollapsibleButtonWrapper',\n );\n\n const collapsibleButtonsWithProps = collapsibleButtonWrapper\n ? React.Children.map(\n (\n collapsibleButtonWrapper as React.ReactElement<CollapsibleButtonWrapperProps>\n ).props.children,\n applySizeProp,\n )\n : null;\n\n const renderChevronIcon = () => {\n if (orientation === 'horizontal') {\n return isCollapsed ? (\n <ChevronRightIconOutline />\n ) : (\n <ChevronLeftIconOutline />\n );\n }\n return isCollapsed ? <ChevronDownIconOutline /> : <ChevronUpIconOutline />;\n };\n\n return (\n <Component\n role=\"group\"\n className={classes}\n ref={ref}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n {fixedButtonsWithProps}\n {collapsibleButtonsWithProps && (\n <>\n {!isCollapsed && collapsibleButtonsWithProps}\n <CleanIconButton\n className=\"ndl-grouped\"\n onClick={() => {\n setIsCollapsed((prev) => !prev);\n }}\n size={size}\n description={isCollapsed ? 'Show more' : 'Show less'}\n tooltipProps={{\n root: {\n shouldCloseOnReferenceClick: true,\n },\n }}\n htmlAttributes={{\n 'aria-expanded': !isCollapsed,\n }}\n >\n {renderChevronIcon()}\n </CleanIconButton>\n </>\n )}\n </Component>\n );\n};\n\nconst IconButtonArray = Object.assign(IconButtonArrayComponent, {\n CollapsibleButtonWrapper: CollapsibleButtonWrapper,\n});\n\nexport { IconButtonArray };\n"]}
@@ -18,5 +18,5 @@
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
- export * from '../icon-button-array/IconButtonArray';
21
+ export * from './IconButtonArray';
22
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icon-button-array/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,sCAAsC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from '../icon-button-array/IconButtonArray';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icon-button-array/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,mBAAmB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './IconButtonArray';\n"]}
@@ -21,7 +21,7 @@
21
21
 
22
22
  import { jsx as _jsx } from "react/jsx-runtime";
23
23
  import { IconButtonArray } from '../../index';
24
- import { IconButtonArrayCollapsible, IconButtonArrayCollapsibleSrc, IconButtonArrayFloating, IconButtonArrayFloatingSrc, IconButtonArrayHorizontal, IconButtonArrayHorizontalSrc, IconButtonArraySizes, IconButtonArraySizesSrc, IconButtonArrayVertical, IconButtonArrayVerticalSrc, } from './';
24
+ import { IconButtonArrayCollapsible, IconButtonArrayCollapsibleSrc, IconButtonArrayFloating, IconButtonArrayFloatingSrc, IconButtonArrayHorizontal, IconButtonArrayHorizontalSrc, IconButtonArraySizes, IconButtonArraySizesSrc, IconButtonArrayVertical, IconButtonArrayVerticalSrc, } from '.';
25
25
  const componentMeta = {
26
26
  title: 'Components/IconButtonArray',
27
27
  id: 'components-buttons-icon-array',
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button-array.stories.js","sourceRoot":"","sources":["../../../../src/icon-button-array/stories/icon-button-array.stories.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,0BAA0B,EAC1B,yBAAyB,EACzB,4BAA4B,EAC5B,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,IAAI,CAAC;AAEZ,MAAM,aAAa,GAAiC;IAClD,KAAK,EAAE,4BAA4B;IACnC,EAAE,EAAE,+BAA+B;IACnC,SAAS,EAAE,eAAe;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,yBAAyB,YACtC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AM;gBACZ,IAAI,EAAE,uBAAuB;aAC9B;SACF;KACF;CACF,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { IconButtonArray } from '../../index';\nimport {\n IconButtonArrayCollapsible,\n IconButtonArrayCollapsibleSrc,\n IconButtonArrayFloating,\n IconButtonArrayFloatingSrc,\n IconButtonArrayHorizontal,\n IconButtonArrayHorizontalSrc,\n IconButtonArraySizes,\n IconButtonArraySizesSrc,\n IconButtonArrayVertical,\n IconButtonArrayVerticalSrc,\n} from './';\n\nconst componentMeta: Meta<typeof IconButtonArray> = {\n title: 'Components/IconButtonArray',\n id: 'components-buttons-icon-array',\n component: IconButtonArray,\n tags: ['docsPage'],\n parameters: {\n controls: { disable: true },\n },\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Horizontal: Story = {\n args: {},\n render: IconButtonArrayHorizontal,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArrayHorizontalSrc,\n },\n },\n },\n};\n\nexport const Vertical: Story = {\n args: {},\n render: IconButtonArrayVertical,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArrayVerticalSrc,\n },\n },\n },\n};\n\nexport const Floating: Story = {\n args: {},\n render: IconButtonArrayFloating,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArrayFloatingSrc,\n },\n },\n },\n};\n\nexport const Collapsiable: Story = {\n args: {},\n render: IconButtonArrayCollapsible,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArrayCollapsibleSrc,\n },\n },\n },\n};\n\nexport const Sizes: Story = {\n args: {},\n render: IconButtonArraySizes,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArraySizesSrc,\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"icon-button-array.stories.js","sourceRoot":"","sources":["../../../../src/icon-button-array/stories/icon-button-array.stories.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,0BAA0B,EAC1B,yBAAyB,EACzB,4BAA4B,EAC5B,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAiC;IAClD,KAAK,EAAE,4BAA4B;IACnC,EAAE,EAAE,+BAA+B;IACnC,SAAS,EAAE,eAAe;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,KAAK,KAAG,GACL,CACP;KACF;CACF,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,yBAAyB;IACjC,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,4BAA4B;aACnC;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,uBAAuB;IAC/B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,0BAA0B;aACjC;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,uBAAuB;IAC/B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,0BAA0B;aACjC;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,0BAA0B;IAClC,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,6BAA6B;aACpC;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,oBAAoB;IAC5B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,uBAAuB;aAC9B;SACF;KACF;CACF,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { IconButtonArray } from '../../index';\nimport {\n IconButtonArrayCollapsible,\n IconButtonArrayCollapsibleSrc,\n IconButtonArrayFloating,\n IconButtonArrayFloatingSrc,\n IconButtonArrayHorizontal,\n IconButtonArrayHorizontalSrc,\n IconButtonArraySizes,\n IconButtonArraySizesSrc,\n IconButtonArrayVertical,\n IconButtonArrayVerticalSrc,\n} from '.';\n\nconst componentMeta: Meta<typeof IconButtonArray> = {\n title: 'Components/IconButtonArray',\n id: 'components-buttons-icon-array',\n component: IconButtonArray,\n tags: ['docsPage'],\n parameters: {\n controls: { disable: true },\n },\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Horizontal: Story = {\n args: {},\n render: IconButtonArrayHorizontal,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArrayHorizontalSrc,\n },\n },\n },\n};\n\nexport const Vertical: Story = {\n args: {},\n render: IconButtonArrayVertical,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArrayVerticalSrc,\n },\n },\n },\n};\n\nexport const Floating: Story = {\n args: {},\n render: IconButtonArrayFloating,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArrayFloatingSrc,\n },\n },\n },\n};\n\nexport const Collapsiable: Story = {\n args: {},\n render: IconButtonArrayCollapsible,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArrayCollapsibleSrc,\n },\n },\n },\n};\n\nexport const Sizes: Story = {\n args: {},\n render: IconButtonArraySizes,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArraySizesSrc,\n },\n },\n },\n};\n"]}
@@ -45,7 +45,7 @@ export function wrapIcon(Original) {
45
45
  ;
46
46
  return (
47
47
  // @ts-expect-error – Original is of any type and we don't know what props it accepts
48
- _jsx(Original, Object.assign({ strokeWidth: 1.5, style: style, className: `${ICON_CLASSNAME} ${className}`.trim() }, htmlAttributes, restProps, { ref: ref })));
48
+ _jsx(Original, Object.assign({ strokeWidth: 1.5, style: style, className: `${ICON_CLASSNAME} ${className}`.trim() }, restProps, htmlAttributes, { ref: ref })));
49
49
  };
50
50
  return React.memo(Wrapped);
51
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"wrapIcon.js","sourceRoot":"","sources":["../../../src/icons/wrapIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;GAKG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,cAAc,GAAG,cAAc,CAAC;AAEtC,MAAM,UAAU,QAAQ,CAA8B,QAAW;IAC/D,MAAM,OAAO,GAAG,CAAC,EAOI,EAAE,EAAE;YAPR,EACf,SAAS,GAAG,EAAE,EACd,KAAK,EACL,GAAG,EACH,cAAc,OAGK,EAFhB,SAAS,cALG,+CAOhB,CAFa;QACZ,mEAAmE;;QAC3C,OAAA;QACxB,qFAAqF;QACrF,KAAC,QAAQ,kBACP,WAAW,EAAE,GAAG,EAChB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,GAAG,cAAc,IAAI,SAAS,EAAE,CAAC,IAAI,EAAE,IAC9C,cAAc,EACd,SAAS,IACb,GAAG,EAAE,GAAG,IACR,CACH,CAAA;KAAA,CAAC;IAEF,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\n/**\n * Utility to add common Neo4j-Design styles / behaviour to any HeroIcon.\n *\n * This wrapper is kept in a single place so that the generated icon files\n * can stay **tiny** and tree-shakeable.\n */\nimport React from 'react';\n\nimport type { CommonProps } from '../_common/types';\n\nconst ICON_CLASSNAME = 'ndl-icon-svg';\n\nexport function wrapIcon<T extends React.ElementType>(Original: T) {\n const Wrapped = ({\n className = '',\n style,\n ref,\n htmlAttributes,\n ...restProps\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n }: CommonProps<T, {}>) => (\n // @ts-expect-error – Original is of any type and we don't know what props it accepts\n <Original\n strokeWidth={1.5}\n style={style}\n className={`${ICON_CLASSNAME} ${className}`.trim()}\n {...htmlAttributes}\n {...restProps}\n ref={ref}\n />\n );\n\n return React.memo(Wrapped);\n}\n"]}
1
+ {"version":3,"file":"wrapIcon.js","sourceRoot":"","sources":["../../../src/icons/wrapIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;GAKG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,cAAc,GAAG,cAAc,CAAC;AAEtC,MAAM,UAAU,QAAQ,CAA8B,QAAW;IAC/D,MAAM,OAAO,GAAG,CAAC,EAOI,EAAE,EAAE;YAPR,EACf,SAAS,GAAG,EAAE,EACd,KAAK,EACL,GAAG,EACH,cAAc,OAGK,EAFhB,SAAS,cALG,+CAOhB,CAFa;QACZ,mEAAmE;;QAC3C,OAAA;QACxB,qFAAqF;QACrF,KAAC,QAAQ,kBACP,WAAW,EAAE,GAAG,EAChB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,GAAG,cAAc,IAAI,SAAS,EAAE,CAAC,IAAI,EAAE,IAC9C,SAAS,EACT,cAAc,IAClB,GAAG,EAAE,GAAG,IACR,CACH,CAAA;KAAA,CAAC;IAEF,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\n/**\n * Utility to add common Neo4j-Design styles / behaviour to any HeroIcon.\n *\n * This wrapper is kept in a single place so that the generated icon files\n * can stay **tiny** and tree-shakeable.\n */\nimport React from 'react';\n\nimport type { CommonProps } from '../_common/types';\n\nconst ICON_CLASSNAME = 'ndl-icon-svg';\n\nexport function wrapIcon<T extends React.ElementType>(Original: T) {\n const Wrapped = ({\n className = '',\n style,\n ref,\n htmlAttributes,\n ...restProps\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n }: CommonProps<T, {}>) => (\n // @ts-expect-error – Original is of any type and we don't know what props it accepts\n <Original\n strokeWidth={1.5}\n style={style}\n className={`${ICON_CLASSNAME} ${className}`.trim()}\n {...restProps}\n {...htmlAttributes}\n ref={ref}\n />\n );\n\n return React.memo(Wrapped);\n}\n"]}
@@ -7,6 +7,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ var __rest = (this && this.__rest) || function (s, e) {
11
+ var t = {};
12
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
13
+ t[p] = s[p];
14
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
15
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
16
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
17
+ t[p[i]] = s[p[i]];
18
+ }
19
+ return t;
20
+ };
10
21
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
22
  /**
12
23
  *
@@ -39,13 +50,14 @@ import { Typography } from '../typography';
39
50
  import { getIconStyle, getMinHeight } from './utils';
40
51
  // The input should not be less than this (it does shrink if container is smaller though).
41
52
  const MINIMUM_WIDTH = 320;
42
- export const InlineEdit = ({ as, className, defaultValue, htmlAttributes, label, onChange, onCancel, onConfirm, ref, style, value, hasEditIcon = false, inputProps, isDisabled = false, isEditing, blurBehavior = 'confirm', isFluid = false, typographyVariant = 'subheading-medium', placeholder, }) => {
43
- var _a;
53
+ export const InlineEdit = (_a) => {
54
+ var _b;
55
+ var { as, className, defaultValue, htmlAttributes, label, onChange, onCancel, onConfirm, ref, style, value, hasEditIcon = false, inputProps, isDisabled = false, isEditing, blurBehavior = 'confirm', isFluid = false, typographyVariant = 'subheading-medium', placeholder } = _a, restProps = __rest(_a, ["as", "className", "defaultValue", "htmlAttributes", "label", "onChange", "onCancel", "onConfirm", "ref", "style", "value", "hasEditIcon", "inputProps", "isDisabled", "isEditing", "blurBehavior", "isFluid", "typographyVariant", "placeholder"]);
44
56
  const [hasEditMode, setEditMode] = useState(false);
45
57
  const [currentValue, setCurrentValue] = useSemicontrolledState({
46
58
  isControlled: value !== undefined,
47
59
  onChange,
48
- state: (_a = value !== null && value !== void 0 ? value : defaultValue) !== null && _a !== void 0 ? _a : '',
60
+ state: (_b = value !== null && value !== void 0 ? value : defaultValue) !== null && _b !== void 0 ? _b : '',
49
61
  });
50
62
  const [previousConfirmedValue, setPreviousConfirmedValue] = useState(currentValue);
51
63
  const mirrorRef = useRef(null);
@@ -147,10 +159,10 @@ export const InlineEdit = ({ as, className, defaultValue, htmlAttributes, label,
147
159
  updateInputWidth();
148
160
  }, [updateInputWidth, isInEditMode, currentValue]);
149
161
  const displayText = currentValue || placeholder;
150
- return (_jsxs(Typography, { as: as !== null && as !== void 0 ? as : 'div', variant: typographyVariant, className: classNames('ndl-inline-edit', className, {
162
+ return (_jsxs(Typography, Object.assign({ as: as !== null && as !== void 0 ? as : 'div', variant: typographyVariant, className: classNames('ndl-inline-edit', className, {
151
163
  'ndl-disabled': isDisabled,
152
164
  'ndl-fluid': isFluid,
153
- }), style: style, ref: ref, htmlAttributes: htmlAttributes, children: [Boolean(label) && _jsx("label", { htmlFor: inputID, children: label }), isInEditMode === true ? (_jsxs("div", Object.assign({ className: "ndl-inline-edit-container", ref: containerRef }, focusWithinProps, { children: [_jsx("span", { "aria-hidden": true, className: "ndl-inline-edit-mirror", ref: mirrorRef, children: displayText }), _jsx("input", Object.assign({}, inputProps, {
165
+ }), style: style, ref: ref, htmlAttributes: htmlAttributes }, restProps, { children: [Boolean(label) && _jsx("label", { htmlFor: inputID, children: label }), isInEditMode === true ? (_jsxs("div", Object.assign({ className: "ndl-inline-edit-container", ref: containerRef }, focusWithinProps, { children: [_jsx("span", { "aria-hidden": true, className: "ndl-inline-edit-mirror", ref: mirrorRef, children: displayText }), _jsx("input", Object.assign({}, inputProps, {
154
166
  // eslint-disable-next-line jsx-a11y/no-autofocus
155
167
  autoFocus: true, "aria-label": typeof label === 'string' ? label : 'Inline edit input', className: classNames('ndl-inline-edit-input', inputProps === null || inputProps === void 0 ? void 0 : inputProps.className), id: inputID, value: currentValue, onChange: handleInputChange, onKeyDown: handleKeyDown, placeholder: placeholder })), _jsxs("div", { className: "ndl-inline-edit-buttons", children: [_jsx(IconButton, { description: "Accept", tooltipProps: {
156
168
  root: { placement: 'bottom' },
@@ -170,6 +182,6 @@ export const InlineEdit = ({ as, className, defaultValue, htmlAttributes, label,
170
182
  'ndl-has-edit-icon': hasEditIcon,
171
183
  }), "aria-disabled": isDisabled, disabled: isDisabled, onClick: handleEditClick, style: {
172
184
  minHeight: getMinHeight(typographyVariant),
173
- }, children: [_jsx("span", { className: "ndl-inline-edit-text", children: displayText }), hasEditIcon && (_jsx(PencilIconOutline, { className: "ndl-inline-edit-pencil-icon", style: getIconStyle(typographyVariant) }))] }))] }));
185
+ }, children: [_jsx("span", { className: "ndl-inline-edit-text", children: displayText }), hasEditIcon && (_jsx(PencilIconOutline, { className: "ndl-inline-edit-pencil-icon", style: getIconStyle(typographyVariant) }))] }))] })));
174
186
  };
175
187
  //# sourceMappingURL=InlineEdit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InlineEdit.js","sourceRoot":"","sources":["../../../src/inline-edit/InlineEdit.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAEL,WAAW,EACX,SAAS,EACT,eAAe,EACf,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAM5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,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EACZ,UAAU,EAAE,IAAI,EAChB,cAAc,EAAE;oCACd,WAAW,EAAE,GAAG,EAAE;wCAChB,aAAa,CAAC,OAAO,GAAG,IAAI,CAAC;oCAC/B,CAAC;iCACF,YAED,KAAC,gBAAgB,KAAG,GACT,IACT,KACF,CACP,CAAC,CAAC,CAAC,CACF,kBACE,SAAS,EAAE,UAAU,CAAC,2BAA2B,EAAE;oBACjD,4BAA4B,EAAE,WAAW,KAAK,WAAW;oBACzD,cAAc,EAAE,UAAU;oBAC1B,mBAAmB,EAAE,WAAW;iBACjC,CAAC,mBACa,UAAU,EACzB,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE;oBACL,SAAS,EAAE,YAAY,CAAC,iBAAiB,CAAC;iBAC3C,aAED,eAAM,SAAS,EAAC,sBAAsB,YAAE,WAAW,GAAQ,EAC1D,WAAW,IAAI,CACd,KAAC,iBAAiB,IAChB,SAAS,EAAC,6BAA6B,EACvC,KAAK,EAAE,YAAY,CAAC,iBAAiB,CAAC,GACtC,CACH,IACM,CACV,IACU,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\nimport {\n type ReactNode,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useFocusWithin } from 'react-aria';\n\nimport {\n type HtmlAttributes,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { useSemicontrolledState } from '../_common/use-semi-controlled-state';\nimport { needleWarningMessage, randomId } from '../_common/utils';\nimport { IconButton } from '../icon-button';\nimport {\n CheckIconOutline,\n PencilIconOutline,\n XMarkIconOutline,\n} from '../icons';\nimport { Typography } from '../typography';\nimport { type TypographyVariants } from '../typography';\nimport { getIconStyle, getMinHeight } from './utils';\n\ntype InlineEditProps = {\n /** Label text */\n label?: ReactNode;\n\n /**\n * The typographyVariant of the component applied to Typography as its variant.\n * @default subheading-medium\n */\n typographyVariant?: TypographyVariants;\n\n /**\n * The default input value. Use for an uncontrolled component.\n */\n defaultValue?: string;\n\n /**\n * The input value. Makes the component controlled.\n */\n value?: string;\n\n /**\n * Callback when the input value changes. Must be used when the component is controlled.\n */\n onChange?: (value: string) => void;\n\n /**\n * Placeholder text displayed when the input is empty.\n */\n placeholder: string;\n\n /**\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * If edit pencil icon should be visible on hover\n * @default false\n */\n hasEditIcon?: boolean;\n\n /**\n * If the input is in editing mode\n * Used in a stateless inline edit\n * @default undefined\n */\n isEditing?: boolean;\n\n /** Callback when confirm icon button is pressed */\n onConfirm?: (\n value: string,\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => void;\n\n /** Callback when cancel icon button is pressed */\n onCancel?: (\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => void;\n\n /**\n * What the input should do on blur\n * - \"confirm\" will confirm the value\n * - \"cancel\" will cancel the value\n * - \"none\" will do nothing\n * @default \"confirm\"\n */\n blurBehavior?: 'confirm' | 'cancel' | 'none';\n\n /** props applied to the internal input element */\n inputProps?: HtmlAttributes<'input'>;\n\n /**\n * If the input is fluid\n * @default false\n */\n isFluid?: boolean;\n};\n\n// The input should not be less than this (it does shrink if container is smaller though).\nconst MINIMUM_WIDTH = 320;\n\nexport const InlineEdit = <T extends React.ElementType = 'div'>({\n as,\n className,\n defaultValue,\n htmlAttributes,\n label,\n onChange,\n onCancel,\n onConfirm,\n ref,\n style,\n value,\n hasEditIcon = false,\n inputProps,\n isDisabled = false,\n isEditing,\n blurBehavior = 'confirm',\n isFluid = false,\n typographyVariant = 'subheading-medium',\n placeholder,\n}: PolymorphicCommonProps<T, InlineEditProps>) => {\n const [hasEditMode, setEditMode] = useState(false);\n\n const [currentValue, setCurrentValue] = useSemicontrolledState({\n isControlled: value !== undefined,\n onChange,\n state: value ?? defaultValue ?? '',\n });\n const [previousConfirmedValue, setPreviousConfirmedValue] =\n useState(currentValue);\n\n const mirrorRef = useRef<HTMLSpanElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n /**\n * This ref is used to prevent the blur behavior from being triggered on mouse down events\n * on the confirm and cancel buttons. So when true, the blur behavior is not triggered.\n * This is needed due to Webkit browsers (like Safari) triggering blur on mouse down events.\n *\n * It is also used to prevent the blur behavior from being triggered after the component exits edit mode without blur.\n * This bug caused the handler to be called when something was focused after confirming.\n */\n const blurWithinRef = useRef(false);\n\n // Validate controlled mode requirements\n useEffect(() => {\n if (value !== undefined && onChange === undefined) {\n needleWarningMessage(\n 'onChange prop should be supplied when using controlled mode (value prop is provided).',\n );\n }\n }, [value, onChange]);\n\n const { focusWithinProps } = useFocusWithin({\n onBlurWithin: () => {\n if (blurWithinRef.current) {\n return;\n }\n\n if (blurBehavior === 'confirm') {\n onConfirmHandler();\n return;\n }\n if (blurBehavior === 'cancel') {\n onCancelHandler();\n return;\n }\n },\n });\n\n const resetToDefaults = useCallback(() => {\n // In controlled mode, don't reset the value - let the parent manage it\n // In uncontrolled mode, reset to default value\n if (value === undefined) {\n setCurrentValue(previousConfirmedValue ?? '');\n }\n // Only reset edit mode if isEditing is not controlled (undefined)\n if (isEditing === undefined) {\n blurWithinRef.current = true;\n setEditMode(false);\n }\n }, [previousConfirmedValue, isEditing, setCurrentValue, value]);\n\n const resetEditState = useCallback(() => {\n // Only reset edit mode if isEditing is not controlled (undefined)\n if (isEditing === undefined) {\n blurWithinRef.current = true;\n setEditMode(false);\n }\n }, [isEditing]);\n\n const onConfirmHandler = useCallback(\n async (\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => {\n setPreviousConfirmedValue(currentValue);\n onConfirm?.(currentValue, event);\n resetEditState();\n },\n [onConfirm, currentValue, resetEditState],\n );\n\n const onCancelHandler = useCallback(\n (\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => {\n onCancel?.(event);\n resetToDefaults();\n },\n [onCancel, resetToDefaults],\n );\n\n const inputID = useMemo(() => {\n return inputProps?.id ?? randomId(12);\n }, [inputProps?.id]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (['Enter', 'Escape'].includes(e.key)) {\n if (e.key === 'Enter') {\n onConfirmHandler();\n }\n if (e.key === 'Escape') {\n onCancelHandler();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n },\n [onConfirmHandler, onCancelHandler],\n );\n\n const handleInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n setCurrentValue(newValue);\n },\n [setCurrentValue],\n );\n\n const isInEditMode = isEditing ?? hasEditMode;\n\n const handleEditClick = useCallback(() => {\n if (isDisabled === false) {\n setEditMode(true);\n blurWithinRef.current = false;\n }\n }, [isDisabled]);\n\n const updateInputWidth = useCallback(() => {\n if (mirrorRef.current && containerRef.current && !isFluid) {\n const mirrorWidth = mirrorRef.current.offsetWidth;\n const newWidth = Math.max(mirrorWidth, MINIMUM_WIDTH);\n containerRef.current.style.width = `${newWidth}px`;\n }\n }, [mirrorRef, containerRef, isFluid]);\n\n // Width calculation effect\n useLayoutEffect(() => {\n updateInputWidth();\n }, [updateInputWidth, isInEditMode, currentValue]);\n\n const displayText = currentValue || placeholder;\n\n return (\n <Typography\n as={as ?? 'div'}\n variant={typographyVariant}\n className={classNames('ndl-inline-edit', className, {\n 'ndl-disabled': isDisabled,\n 'ndl-fluid': isFluid,\n })}\n style={style}\n ref={ref}\n htmlAttributes={htmlAttributes}\n >\n {Boolean(label) && <label htmlFor={inputID}>{label}</label>}\n {isInEditMode === true ? (\n <div\n className=\"ndl-inline-edit-container\"\n ref={containerRef}\n {...focusWithinProps}\n >\n {/* Mirror span for measuring width */}\n <span\n aria-hidden={true}\n className=\"ndl-inline-edit-mirror\"\n ref={mirrorRef}\n >\n {displayText}\n </span>\n <input\n {...inputProps}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus\n aria-label={typeof label === 'string' ? label : 'Inline edit input'}\n className={classNames(\n 'ndl-inline-edit-input',\n inputProps?.className,\n )}\n id={inputID}\n value={currentValue}\n onChange={handleInputChange}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n />\n <div className=\"ndl-inline-edit-buttons\">\n <IconButton\n description=\"Accept\"\n tooltipProps={{\n root: { placement: 'bottom' },\n }}\n onClick={onConfirmHandler}\n size=\"small\"\n isFloating={true}\n htmlAttributes={{\n onMouseDown: () => {\n blurWithinRef.current = true;\n },\n }}\n >\n <CheckIconOutline />\n </IconButton>\n <IconButton\n description=\"Cancel\"\n tooltipProps={{\n root: { placement: 'bottom' },\n }}\n onClick={(event) => onCancelHandler(event)}\n size=\"small\"\n isFloating={true}\n htmlAttributes={{\n onMouseDown: () => {\n blurWithinRef.current = true;\n },\n }}\n >\n <XMarkIconOutline />\n </IconButton>\n </div>\n </div>\n ) : (\n <button\n className={classNames('ndl-inline-idle-container', {\n 'n-text-neutral-text-weaker': displayText === placeholder,\n 'ndl-disabled': isDisabled,\n 'ndl-has-edit-icon': hasEditIcon,\n })}\n aria-disabled={isDisabled}\n disabled={isDisabled}\n onClick={handleEditClick}\n style={{\n minHeight: getMinHeight(typographyVariant),\n }}\n >\n <span className=\"ndl-inline-edit-text\">{displayText}</span>\n {hasEditIcon && (\n <PencilIconOutline\n className=\"ndl-inline-edit-pencil-icon\"\n style={getIconStyle(typographyVariant)}\n />\n )}\n </button>\n )}\n </Typography>\n );\n};\n"]}
1
+ {"version":3,"file":"InlineEdit.js","sourceRoot":"","sources":["../../../src/inline-edit/InlineEdit.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAEL,WAAW,EACX,SAAS,EACT,eAAe,EACf,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAM5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAgFrD,0FAA0F;AAC1F,MAAM,aAAa,GAAG,GAAG,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAsC,EAqBnB,EAAE,EAAE;;QArBe,EAC9D,EAAE,EACF,SAAS,EACT,YAAY,EACZ,cAAc,EACd,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,GAAG,EACH,KAAK,EACL,KAAK,EACL,WAAW,GAAG,KAAK,EACnB,UAAU,EACV,UAAU,GAAG,KAAK,EAClB,SAAS,EACT,YAAY,GAAG,SAAS,EACxB,OAAO,GAAG,KAAK,EACf,iBAAiB,GAAG,mBAAmB,EACvC,WAAW,OAEgC,EADxC,SAAS,cApBkD,mPAqB/D,CADa;IAEZ,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,QAAQ,C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,eAAM,SAAS,EAAC,sBAAsB,YAAE,WAAW,GAAQ,EAC1D,WAAW,IAAI,CACd,KAAC,iBAAiB,IAChB,SAAS,EAAC,6BAA6B,EACvC,KAAK,EAAE,YAAY,CAAC,iBAAiB,CAAC,GACtC,CACH,IACM,CACV,KACU,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\nimport {\n type ReactNode,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useFocusWithin } from 'react-aria';\n\nimport {\n type HtmlAttributes,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { useSemicontrolledState } from '../_common/use-semi-controlled-state';\nimport { needleWarningMessage, randomId } from '../_common/utils';\nimport { IconButton } from '../icon-button';\nimport {\n CheckIconOutline,\n PencilIconOutline,\n XMarkIconOutline,\n} from '../icons';\nimport { Typography } from '../typography';\nimport { type TypographyVariants } from '../typography';\nimport { getIconStyle, getMinHeight } from './utils';\n\ntype InlineEditProps = {\n /** Label text */\n label?: ReactNode;\n\n /**\n * The typographyVariant of the component applied to Typography as its variant.\n * @default subheading-medium\n */\n typographyVariant?: TypographyVariants;\n\n /**\n * The default input value. Use for an uncontrolled component.\n */\n defaultValue?: string;\n\n /**\n * The input value. Makes the component controlled.\n */\n value?: string;\n\n /**\n * Callback when the input value changes. Must be used when the component is controlled.\n */\n onChange?: (value: string) => void;\n\n /**\n * Placeholder text displayed when the input is empty.\n */\n placeholder: string;\n\n /**\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * If edit pencil icon should be visible on hover\n * @default false\n */\n hasEditIcon?: boolean;\n\n /**\n * If the input is in editing mode\n * Used in a stateless inline edit\n * @default undefined\n */\n isEditing?: boolean;\n\n /** Callback when confirm icon button is pressed */\n onConfirm?: (\n value: string,\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => void;\n\n /** Callback when cancel icon button is pressed */\n onCancel?: (\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => void;\n\n /**\n * What the input should do on blur\n * - \"confirm\" will confirm the value\n * - \"cancel\" will cancel the value\n * - \"none\" will do nothing\n * @default \"confirm\"\n */\n blurBehavior?: 'confirm' | 'cancel' | 'none';\n\n /** props applied to the internal input element */\n inputProps?: HtmlAttributes<'input'>;\n\n /**\n * If the input is fluid\n * @default false\n */\n isFluid?: boolean;\n};\n\n// The input should not be less than this (it does shrink if container is smaller though).\nconst MINIMUM_WIDTH = 320;\n\nexport const InlineEdit = <T extends React.ElementType = 'div'>({\n as,\n className,\n defaultValue,\n htmlAttributes,\n label,\n onChange,\n onCancel,\n onConfirm,\n ref,\n style,\n value,\n hasEditIcon = false,\n inputProps,\n isDisabled = false,\n isEditing,\n blurBehavior = 'confirm',\n isFluid = false,\n typographyVariant = 'subheading-medium',\n placeholder,\n ...restProps\n}: PolymorphicCommonProps<T, InlineEditProps>) => {\n const [hasEditMode, setEditMode] = useState(false);\n\n const [currentValue, setCurrentValue] = useSemicontrolledState({\n isControlled: value !== undefined,\n onChange,\n state: value ?? defaultValue ?? '',\n });\n const [previousConfirmedValue, setPreviousConfirmedValue] =\n useState(currentValue);\n\n const mirrorRef = useRef<HTMLSpanElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n /**\n * This ref is used to prevent the blur behavior from being triggered on mouse down events\n * on the confirm and cancel buttons. So when true, the blur behavior is not triggered.\n * This is needed due to Webkit browsers (like Safari) triggering blur on mouse down events.\n *\n * It is also used to prevent the blur behavior from being triggered after the component exits edit mode without blur.\n * This bug caused the handler to be called when something was focused after confirming.\n */\n const blurWithinRef = useRef(false);\n\n // Validate controlled mode requirements\n useEffect(() => {\n if (value !== undefined && onChange === undefined) {\n needleWarningMessage(\n 'onChange prop should be supplied when using controlled mode (value prop is provided).',\n );\n }\n }, [value, onChange]);\n\n const { focusWithinProps } = useFocusWithin({\n onBlurWithin: () => {\n if (blurWithinRef.current) {\n return;\n }\n\n if (blurBehavior === 'confirm') {\n onConfirmHandler();\n return;\n }\n if (blurBehavior === 'cancel') {\n onCancelHandler();\n return;\n }\n },\n });\n\n const resetToDefaults = useCallback(() => {\n // In controlled mode, don't reset the value - let the parent manage it\n // In uncontrolled mode, reset to default value\n if (value === undefined) {\n setCurrentValue(previousConfirmedValue ?? '');\n }\n // Only reset edit mode if isEditing is not controlled (undefined)\n if (isEditing === undefined) {\n blurWithinRef.current = true;\n setEditMode(false);\n }\n }, [previousConfirmedValue, isEditing, setCurrentValue, value]);\n\n const resetEditState = useCallback(() => {\n // Only reset edit mode if isEditing is not controlled (undefined)\n if (isEditing === undefined) {\n blurWithinRef.current = true;\n setEditMode(false);\n }\n }, [isEditing]);\n\n const onConfirmHandler = useCallback(\n async (\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => {\n setPreviousConfirmedValue(currentValue);\n onConfirm?.(currentValue, event);\n resetEditState();\n },\n [onConfirm, currentValue, resetEditState],\n );\n\n const onCancelHandler = useCallback(\n (\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => {\n onCancel?.(event);\n resetToDefaults();\n },\n [onCancel, resetToDefaults],\n );\n\n const inputID = useMemo(() => {\n return inputProps?.id ?? randomId(12);\n }, [inputProps?.id]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (['Enter', 'Escape'].includes(e.key)) {\n if (e.key === 'Enter') {\n onConfirmHandler();\n }\n if (e.key === 'Escape') {\n onCancelHandler();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n },\n [onConfirmHandler, onCancelHandler],\n );\n\n const handleInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n setCurrentValue(newValue);\n },\n [setCurrentValue],\n );\n\n const isInEditMode = isEditing ?? hasEditMode;\n\n const handleEditClick = useCallback(() => {\n if (isDisabled === false) {\n setEditMode(true);\n blurWithinRef.current = false;\n }\n }, [isDisabled]);\n\n const updateInputWidth = useCallback(() => {\n if (mirrorRef.current && containerRef.current && !isFluid) {\n const mirrorWidth = mirrorRef.current.offsetWidth;\n const newWidth = Math.max(mirrorWidth, MINIMUM_WIDTH);\n containerRef.current.style.width = `${newWidth}px`;\n }\n }, [mirrorRef, containerRef, isFluid]);\n\n // Width calculation effect\n useLayoutEffect(() => {\n updateInputWidth();\n }, [updateInputWidth, isInEditMode, currentValue]);\n\n const displayText = currentValue || placeholder;\n\n return (\n <Typography\n as={as ?? 'div'}\n variant={typographyVariant}\n className={classNames('ndl-inline-edit', className, {\n 'ndl-disabled': isDisabled,\n 'ndl-fluid': isFluid,\n })}\n style={style}\n ref={ref}\n htmlAttributes={htmlAttributes}\n {...restProps}\n >\n {Boolean(label) && <label htmlFor={inputID}>{label}</label>}\n {isInEditMode === true ? (\n <div\n className=\"ndl-inline-edit-container\"\n ref={containerRef}\n {...focusWithinProps}\n >\n {/* Mirror span for measuring width */}\n <span\n aria-hidden={true}\n className=\"ndl-inline-edit-mirror\"\n ref={mirrorRef}\n >\n {displayText}\n </span>\n <input\n {...inputProps}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus\n aria-label={typeof label === 'string' ? label : 'Inline edit input'}\n className={classNames(\n 'ndl-inline-edit-input',\n inputProps?.className,\n )}\n id={inputID}\n value={currentValue}\n onChange={handleInputChange}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n />\n <div className=\"ndl-inline-edit-buttons\">\n <IconButton\n description=\"Accept\"\n tooltipProps={{\n root: { placement: 'bottom' },\n }}\n onClick={onConfirmHandler}\n size=\"small\"\n isFloating={true}\n htmlAttributes={{\n onMouseDown: () => {\n blurWithinRef.current = true;\n },\n }}\n >\n <CheckIconOutline />\n </IconButton>\n <IconButton\n description=\"Cancel\"\n tooltipProps={{\n root: { placement: 'bottom' },\n }}\n onClick={(event) => onCancelHandler(event)}\n size=\"small\"\n isFloating={true}\n htmlAttributes={{\n onMouseDown: () => {\n blurWithinRef.current = true;\n },\n }}\n >\n <XMarkIconOutline />\n </IconButton>\n </div>\n </div>\n ) : (\n <button\n className={classNames('ndl-inline-idle-container', {\n 'n-text-neutral-text-weaker': displayText === placeholder,\n 'ndl-disabled': isDisabled,\n 'ndl-has-edit-icon': hasEditIcon,\n })}\n aria-disabled={isDisabled}\n disabled={isDisabled}\n onClick={handleEditClick}\n style={{\n minHeight: getMinHeight(typographyVariant),\n }}\n >\n <span className=\"ndl-inline-edit-text\">{displayText}</span>\n {hasEditIcon && (\n <PencilIconOutline\n className=\"ndl-inline-edit-pencil-icon\"\n style={getIconStyle(typographyVariant)}\n />\n )}\n </button>\n )}\n </Typography>\n );\n};\n"]}
@@ -37,15 +37,17 @@ export const Kbd = (_a) => {
37
37
  var { modifierKeys, keys, os, as, className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["modifierKeys", "keys", "os", "as", "className", "style", "htmlAttributes", "ref"]);
38
38
  const Component = as !== null && as !== void 0 ? as : 'span';
39
39
  const modifierKeysContent = useMemo(() => {
40
- if (modifierKeys === undefined)
40
+ if (modifierKeys === undefined) {
41
41
  return null;
42
+ }
42
43
  const keyMap = getKbdKeysMap(os);
43
44
  const labelMap = getKbdKeysLabelMap(os);
44
45
  return modifierKeys === null || modifierKeys === void 0 ? void 0 : modifierKeys.map((key) => (_jsx("abbr", { className: "ndl-kbd-key", title: labelMap[key], children: keyMap[key] }, key)));
45
46
  }, [modifierKeys, os]);
46
47
  const keysContent = useMemo(() => {
47
- if (keys === undefined)
48
+ if (keys === undefined) {
48
49
  return null;
50
+ }
49
51
  return keys === null || keys === void 0 ? void 0 : keys.map((key, index) => {
50
52
  if (index === 0) {
51
53
  return (_jsx("span", { className: "ndl-kbd-key", children: key }, key === null || key === void 0 ? void 0 : key.toString()));
@@ -54,6 +56,6 @@ export const Kbd = (_a) => {
54
56
  });
55
57
  }, [keys]);
56
58
  const classes = classNames('ndl-kbd', className);
57
- return (_jsxs(Component, Object.assign({ className: classes, style: style, ref: ref }, htmlAttributes, restProps, { children: [modifierKeysContent, keysContent] })));
59
+ return (_jsxs(Component, Object.assign({ className: classes, style: style, ref: ref }, restProps, htmlAttributes, { children: [modifierKeysContent, keysContent] })));
58
60
  };
59
61
  //# sourceMappingURL=Kbd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Kbd.js","sourceRoot":"","sources":["../../../src/kbd/Kbd.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EACL,kBAAkB,EAClB,aAAa,GAGd,MAAM,aAAa,CAAC;AAiBrB,MAAM,CAAC,MAAM,GAAG,GAAG,CAAuC,EAUpB,EAAE,EAAE;QAVgB,EACxD,YAAY,EACZ,IAAI,EACJ,EAAE,EACF,EAAE,EACF,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAEiC,EADjC,SAAS,cAT4C,mFAUzD,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,MAAM,CAAC;IAElD,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE;QACvC,IAAI,YAAY,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC;QAE5C,MAAM,MAAM,GAAG,aAAa,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W,KACF,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport { useMemo } from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport {\n getKbdKeysLabelMap,\n getKbdKeysMap,\n type KbdKey,\n type OperatingSystem,\n} from './kbd-utils';\n\ntype KbdProps = {\n /**\n * The modifier keys to display in the keyboard shortcut.\n */\n modifierKeys?: KbdKey[];\n /**\n * The main keys to display in the keyboard shortcut.\n */\n keys?: React.ReactNode[];\n /**\n * Override the operating system detection for key symbols\n */\n os?: OperatingSystem;\n};\n\nexport const Kbd = <T extends React.ElementType = 'span'>({\n modifierKeys,\n keys,\n os,\n as,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, KbdProps>) => {\n const Component: React.ElementType = as ?? 'span';\n\n const modifierKeysContent = useMemo(() => {\n if (modifierKeys === undefined) return null;\n\n const keyMap = getKbdKeysMap(os);\n const labelMap = getKbdKeysLabelMap(os);\n\n return modifierKeys?.map((key) => (\n <abbr className=\"ndl-kbd-key\" key={key} title={labelMap[key]}>\n {keyMap[key]}\n </abbr>\n ));\n }, [modifierKeys, os]);\n\n const keysContent = useMemo(() => {\n if (keys === undefined) return null;\n\n return keys?.map((key, index) => {\n if (index === 0) {\n return (\n <span className=\"ndl-kbd-key\" key={key?.toString()}>\n {key}\n </span>\n );\n }\n return (\n <>\n <span className=\"ndl-kbd-then\">Then</span>\n <span className=\"ndl-kbd-key\" key={key?.toString()}>\n {key}\n </span>\n </>\n );\n });\n }, [keys]);\n\n const classes = classNames('ndl-kbd', className);\n return (\n <Component\n className={classes}\n style={style}\n ref={ref}\n {...htmlAttributes}\n {...restProps}\n >\n {modifierKeysContent}\n {keysContent}\n </Component>\n );\n};\n"]}
1
+ {"version":3,"file":"Kbd.js","sourceRoot":"","sources":["../../../src/kbd/Kbd.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EACL,kBAAkB,EAClB,aAAa,GAGd,MAAM,aAAa,CAAC;AAiBrB,MAAM,CAAC,MAAM,GAAG,GAAG,CAAuC,EAUpB,EAAE,EAAE;QAVgB,EACxD,YAAY,EACZ,IAAI,EACJ,EAAE,EACF,EAAE,EACF,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAEiC,EADjC,SAAS,cAT4C,mFAUzD,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,MAAM,CAAC;IAElD,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE;QACvC,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;YAC/B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,MAAM,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;QACjC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,EAAE,CAAC,CAAC;QAExC,OAAO,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAChC,eAAM,SAAS,EAAC,aAAa,EAAW,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,YACzD,MAAM,CAAC,GAAG,CAAC,IADqB,GAAG,CAE/B,CACR,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,CAAC;IAEvB,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE;QAC/B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;YAC9B,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;gBAChB,OAAO,CACL,eAAM,SAAS,EAAC,aAAa,YAC1B,GAAG,IAD6B,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,QAAQ,EAAE,CAE3C,CACR,CAAC;YACJ,CAAC;YACD,OAAO,CACL,8BACE,eAAM,SAAS,EAAC,cAAc,qBAAY,EAC1C,eAAM,SAAS,EAAC,aAAa,YAC1B,GAAG,IAD6B,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,QAAQ,EAAE,CAE3C,IACN,CACJ,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACjD,OAAO,CACL,MAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,eAEjB,mBAAmB,EACnB,WAAW,KACF,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport { useMemo } from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport {\n getKbdKeysLabelMap,\n getKbdKeysMap,\n type KbdKey,\n type OperatingSystem,\n} from './kbd-utils';\n\ntype KbdProps = {\n /**\n * The modifier keys to display in the keyboard shortcut.\n */\n modifierKeys?: KbdKey[];\n /**\n * The main keys to display in the keyboard shortcut.\n */\n keys?: React.ReactNode[];\n /**\n * Override the operating system detection for key symbols\n */\n os?: OperatingSystem;\n};\n\nexport const Kbd = <T extends React.ElementType = 'span'>({\n modifierKeys,\n keys,\n os,\n as,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, KbdProps>) => {\n const Component: React.ElementType = as ?? 'span';\n\n const modifierKeysContent = useMemo(() => {\n if (modifierKeys === undefined) {\n return null;\n }\n\n const keyMap = getKbdKeysMap(os);\n const labelMap = getKbdKeysLabelMap(os);\n\n return modifierKeys?.map((key) => (\n <abbr className=\"ndl-kbd-key\" key={key} title={labelMap[key]}>\n {keyMap[key]}\n </abbr>\n ));\n }, [modifierKeys, os]);\n\n const keysContent = useMemo(() => {\n if (keys === undefined) {\n return null;\n }\n\n return keys?.map((key, index) => {\n if (index === 0) {\n return (\n <span className=\"ndl-kbd-key\" key={key?.toString()}>\n {key}\n </span>\n );\n }\n return (\n <>\n <span className=\"ndl-kbd-then\">Then</span>\n <span className=\"ndl-kbd-key\" key={key?.toString()}>\n {key}\n </span>\n </>\n );\n });\n }, [keys]);\n\n const classes = classNames('ndl-kbd', className);\n return (\n <Component\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {modifierKeysContent}\n {keysContent}\n </Component>\n );\n};\n"]}
@@ -20,7 +20,7 @@
20
20
  */
21
21
 
22
22
  import { Kbd } from '../../index';
23
- import { KbdDefault, KbdDefaultSrc, KbdSequence, KbdSequenceSrc } from './';
23
+ import { KbdDefault, KbdDefaultSrc, KbdSequence, KbdSequenceSrc } from '.';
24
24
  const componentMeta = {
25
25
  title: 'Components/Kbd',
26
26
  id: 'components-kbd',
@@ -1 +1 @@
1
- {"version":3,"file":"kbd.stories.js","sourceRoot":"","sources":["../../../../src/kbd/stories/kbd.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAE5E,MAAM,aAAa,GAAqB;IACtC,KAAK,EAAE,gBAAgB;IACvB,EAAE,EAAE,gBAAgB;IACpB,SAAS,EAAE,GAAG;IACd,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE;KACb;CACF,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,UAAU;IAClB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,aAAa;aACpB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,WAAW;IACnB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,cAAc;aACrB;SACF;KACF;CACF,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { Kbd } from '../../index';\nimport { KbdDefault, KbdDefaultSrc, KbdSequence, KbdSequenceSrc } from './';\n\nconst componentMeta: Meta<typeof Kbd> = {\n title: 'Components/Kbd',\n id: 'components-kbd',\n component: Kbd,\n tags: ['docsPage'],\n parameters: {\n controls: {},\n },\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n render: KbdDefault,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: KbdDefaultSrc,\n },\n },\n },\n};\n\nexport const Sequence: Story = {\n args: {},\n render: KbdSequence,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: KbdSequenceSrc,\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"kbd.stories.js","sourceRoot":"","sources":["../../../../src/kbd/stories/kbd.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,GAAG,CAAC;AAE3E,MAAM,aAAa,GAAqB;IACtC,KAAK,EAAE,gBAAgB;IACvB,EAAE,EAAE,gBAAgB;IACpB,SAAS,EAAE,GAAG;IACd,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE;KACb;CACF,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,UAAU;IAClB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,aAAa;aACpB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,WAAW;IACnB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,cAAc;aACrB;SACF;KACF;CACF,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { Kbd } from '../../index';\nimport { KbdDefault, KbdDefaultSrc, KbdSequence, KbdSequenceSrc } from '.';\n\nconst componentMeta: Meta<typeof Kbd> = {\n title: 'Components/Kbd',\n id: 'components-kbd',\n component: Kbd,\n tags: ['docsPage'],\n parameters: {\n controls: {},\n },\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n render: KbdDefault,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: KbdDefaultSrc,\n },\n },\n },\n};\n\nexport const Sequence: Story = {\n args: {},\n render: KbdSequence,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: KbdSequenceSrc,\n },\n },\n },\n};\n"]}
@@ -1,3 +1,14 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { jsx as _jsx } from "react/jsx-runtime";
2
13
  /**
3
14
  *
@@ -20,11 +31,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
20
31
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
32
  */
22
33
  import classNames from 'classnames';
23
- export const LoadingBar = ({ as, hasRail = false, className, htmlAttributes, style, ref, }) => {
34
+ export const LoadingBar = (_a) => {
35
+ var { as, hasRail = false, className, htmlAttributes, style, ref } = _a, restProps = __rest(_a, ["as", "hasRail", "className", "htmlAttributes", "style", "ref"]);
24
36
  const Component = as !== null && as !== void 0 ? as : 'div';
25
37
  const classes = classNames('ndl-loading-bar', className, {
26
38
  'ndl-loading-bar-rail': hasRail,
27
39
  });
28
- return (_jsx(Component, Object.assign({ className: classes, ref: ref, role: "status", style: style }, htmlAttributes)));
40
+ return (_jsx(Component, Object.assign({ className: classes, ref: ref, role: "status", style: style }, restProps, htmlAttributes)));
29
41
  };
30
42
  //# sourceMappingURL=LoadingBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingBar.js","sourceRoot":"","sources":["../../../src/loading-bar/LoadingBar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AASpC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAsC,EAC9D,EAAE,EACF,OAAO,GAAG,KAAK,EACf,SAAS,EACT,cAAc,EACd,KAAK,EACL,GAAG,GACwC,EAAE,EAAE;IAC/C,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,EAAE,SAAS,EAAE;QACvD,sBAAsB,EAAE,OAAO;KAChC,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,IACR,cAAc,EAClB,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\n\ntype LoadingBarProps = {\n hasRail?: boolean;\n};\n\nexport const LoadingBar = <T extends React.ElementType = 'div'>({\n as,\n hasRail = false,\n className,\n htmlAttributes,\n style,\n ref,\n}: PolymorphicCommonProps<T, LoadingBarProps>) => {\n const Component: React.ElementType = as ?? 'div';\n const classes = classNames('ndl-loading-bar', className, {\n 'ndl-loading-bar-rail': hasRail,\n });\n\n return (\n <Component\n className={classes}\n ref={ref}\n role=\"status\"\n style={style}\n {...htmlAttributes}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"LoadingBar.js","sourceRoot":"","sources":["../../../src/loading-bar/LoadingBar.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AASpC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAsC,EAQnB,EAAE,EAAE;QARe,EAC9D,EAAE,EACF,OAAO,GAAG,KAAK,EACf,SAAS,EACT,cAAc,EACd,KAAK,EACL,GAAG,OAEwC,EADxC,SAAS,cAPkD,gEAQ/D,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,EAAE,SAAS,EAAE;QACvD,sBAAsB,EAAE,OAAO;KAChC,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,EAClB,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\n\ntype LoadingBarProps = {\n hasRail?: boolean;\n};\n\nexport const LoadingBar = <T extends React.ElementType = 'div'>({\n as,\n hasRail = false,\n className,\n htmlAttributes,\n style,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, LoadingBarProps>) => {\n const Component: React.ElementType = as ?? 'div';\n const classes = classNames('ndl-loading-bar', className, {\n 'ndl-loading-bar-rail': hasRail,\n });\n\n return (\n <Component\n className={classes}\n ref={ref}\n role=\"status\"\n style={style}\n {...restProps}\n {...htmlAttributes}\n />\n );\n};\n"]}
@@ -46,6 +46,6 @@ export const LoadingSpinner = (_a) => {
46
46
  'ndl-medium': size === 'medium',
47
47
  'ndl-large': size === 'large',
48
48
  });
49
- return (_jsx(Component, Object.assign({ className: classes, role: "status", "aria-label": "Loading content", "aria-live": "polite", ref: ref }, htmlAttributes, restProps, { children: _jsx("div", { className: "ndl-spin" }) })));
49
+ return (_jsx(Component, Object.assign({ className: classes, role: "status", "aria-label": "Loading content", "aria-live": "polite", ref: ref }, restProps, htmlAttributes, { children: _jsx("div", { className: "ndl-spin" }) })));
50
50
  };
51
51
  //# sourceMappingURL=LoadingSpinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../../src/loading-spinner/LoadingSpinner.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAiBpC;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAsC,EAOnB,EAAE,EAAE;QAPe,EAClE,EAAE,EACF,IAAI,GAAG,OAAO,EACd,SAAS,EACT,cAAc,EACd,GAAG,OAE4C,EAD5C,SAAS,cANsD,oDAOnE,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,IAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,EAAE;QACxD,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,IAAI,EAAC,QAAQ,gBACF,iBAAiB,eAClB,QAAQ,EAClB,GAAG,EAAE,GAAG,IACJ,cAAc,EACd,SAAS,cAEb,cAAK,SAAS,EAAC,UAAU,GAAG,IAClB,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype LoadingSpinnerProps = {\n size?: 'small' | 'medium' | 'large';\n};\n\n/**\n *\n *\n * LoadingSpinner Component\n *\n *\n */\n\nexport const LoadingSpinner = <T extends React.ElementType = 'div'>({\n as,\n size = 'small',\n className,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, LoadingSpinnerProps>) => {\n const Component: React.ElementType = as || 'div';\n const classes = classNames('ndl-spin-wrapper', className, {\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n\n return (\n <Component\n className={classes}\n role=\"status\"\n aria-label=\"Loading content\"\n aria-live=\"polite\"\n ref={ref}\n {...htmlAttributes}\n {...restProps}\n >\n <div className=\"ndl-spin\" />\n </Component>\n );\n};\n"]}
1
+ {"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../../src/loading-spinner/LoadingSpinner.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAiBpC;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAsC,EAOnB,EAAE,EAAE;QAPe,EAClE,EAAE,EACF,IAAI,GAAG,OAAO,EACd,SAAS,EACT,cAAc,EACd,GAAG,OAE4C,EAD5C,SAAS,cANsD,oDAOnE,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,IAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,EAAE;QACxD,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,IAAI,EAAC,QAAQ,gBACF,iBAAiB,eAClB,QAAQ,EAClB,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,cAAK,SAAS,EAAC,UAAU,GAAG,IAClB,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype LoadingSpinnerProps = {\n size?: 'small' | 'medium' | 'large';\n};\n\n/**\n *\n *\n * LoadingSpinner Component\n *\n *\n */\n\nexport const LoadingSpinner = <T extends React.ElementType = 'div'>({\n as,\n size = 'small',\n className,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, LoadingSpinnerProps>) => {\n const Component: React.ElementType = as || 'div';\n const classes = classNames('ndl-spin-wrapper', className, {\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n\n return (\n <Component\n className={classes}\n role=\"status\"\n aria-label=\"Loading content\"\n aria-live=\"polite\"\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-spin\" />\n </Component>\n );\n};\n"]}
@@ -20,7 +20,7 @@
20
20
  */
21
21
 
22
22
  import { Logo } from '../../index';
23
- import { LogoBlack, LogoBlackSrc, LogoDefault, LogoDefaultSrc, LogoIcon, LogoIconSrc, } from './';
23
+ import { LogoBlack, LogoBlackSrc, LogoDefault, LogoDefaultSrc, LogoIcon, LogoIconSrc, } from '.';
24
24
  const componentMeta = {
25
25
  title: 'Components/Logo',
26
26
  id: 'components-logo',
@@ -1 +1 @@
1
- {"version":3,"file":"logo.stories.js","sourceRoot":"","sources":["../../../../src/logo/stories/logo.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,SAAS,EACT,YAAY,EACZ,WAAW,EACX,cAAc,EACd,QAAQ,EACR,WAAW,GACZ,MAAM,IAAI,CAAC;AAEZ,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE,iBAAiB;IACxB,EAAE,EAAE,iBAAiB;IACrB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;CAC0B,CAAC;AAE9B,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,SAAS,EAAE,SAAS;QACpB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;KAChB;IACD,MAAM,EAAE,WAAW;IACnB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,cAAc;aACrB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE;QACJ,SAAS,EAAE,SAAS;QACpB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;KAChB;IACD,MAAM,EAAE,SAAS;IACjB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,YAAY;aACnB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,IAAI,EAAE;QACJ,SAAS,EAAE,SAAS;QACpB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;KAChB;IACD,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,WAAW;aAClB;SACF;KACF;CACF,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { Logo } from '../../index';\nimport {\n LogoBlack,\n LogoBlackSrc,\n LogoDefault,\n LogoDefaultSrc,\n LogoIcon,\n LogoIconSrc,\n} from './';\n\nconst componentMeta = {\n title: 'Components/Logo',\n id: 'components-logo',\n component: Logo,\n tags: ['docsPage'],\n parameters: {\n controls: { disable: true },\n },\n} satisfies Meta<typeof Logo>;\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {\n className: undefined,\n color: undefined,\n type: undefined,\n },\n render: LogoDefault,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: LogoDefaultSrc,\n },\n },\n },\n};\n\nexport const Black: Story = {\n args: {\n className: undefined,\n color: undefined,\n type: undefined,\n },\n render: LogoBlack,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: LogoBlackSrc,\n },\n },\n },\n};\n\nexport const Icon: Story = {\n args: {\n className: undefined,\n color: undefined,\n type: undefined,\n },\n render: LogoIcon,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: LogoIconSrc,\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"logo.stories.js","sourceRoot":"","sources":["../../../../src/logo/stories/logo.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,SAAS,EACT,YAAY,EACZ,WAAW,EACX,cAAc,EACd,QAAQ,EACR,WAAW,GACZ,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE,iBAAiB;IACxB,EAAE,EAAE,iBAAiB;IACrB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;CAC0B,CAAC;AAE9B,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,SAAS,EAAE,SAAS;QACpB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;KAChB;IACD,MAAM,EAAE,WAAW;IACnB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,cAAc;aACrB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE;QACJ,SAAS,EAAE,SAAS;QACpB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;KAChB;IACD,MAAM,EAAE,SAAS;IACjB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,YAAY;aACnB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,IAAI,EAAE;QACJ,SAAS,EAAE,SAAS;QACpB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;KAChB;IACD,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,WAAW;aAClB;SACF;KACF;CACF,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { Logo } from '../../index';\nimport {\n LogoBlack,\n LogoBlackSrc,\n LogoDefault,\n LogoDefaultSrc,\n LogoIcon,\n LogoIconSrc,\n} from '.';\n\nconst componentMeta = {\n title: 'Components/Logo',\n id: 'components-logo',\n component: Logo,\n tags: ['docsPage'],\n parameters: {\n controls: { disable: true },\n },\n} satisfies Meta<typeof Logo>;\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {\n className: undefined,\n color: undefined,\n type: undefined,\n },\n render: LogoDefault,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: LogoDefaultSrc,\n },\n },\n },\n};\n\nexport const Black: Story = {\n args: {\n className: undefined,\n color: undefined,\n type: undefined,\n },\n render: LogoBlack,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: LogoBlackSrc,\n },\n },\n },\n};\n\nexport const Icon: Story = {\n args: {\n className: undefined,\n color: undefined,\n type: undefined,\n },\n render: LogoIcon,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: LogoIconSrc,\n },\n },\n },\n};\n"]}
@@ -143,8 +143,9 @@ const MenuComponent = ({ children, isOpen: controlledOpen, onClose, isRoot, anch
143
143
  // This effect closes all menus when an item gets clicked anywhere
144
144
  // in the tree.
145
145
  useEffect(() => {
146
- if (!tree)
146
+ if (!tree) {
147
147
  return;
148
+ }
148
149
  function handleTreeClick(data) {
149
150
  if (controlledOpen === undefined) {
150
151
  setIsOpen(false);
@@ -198,7 +199,7 @@ const MenuItemComponent = (_a) => {
198
199
  'ndl-disabled': isDisabled,
199
200
  });
200
201
  const Component = as !== null && as !== void 0 ? as : 'button';
201
- return (_jsx(Component, Object.assign({ className: classes, ref: ref, type: "button", role: "menuitem", disabled: isDisabled, style: style }, htmlAttributes, restProps, { children: _jsxs("div", { className: "ndl-menu-item-inner", children: [Boolean(leadingContent) && (_jsx("div", { className: "ndl-menu-item-leading-content", children: leadingContent })), _jsxs("div", { className: "ndl-menu-item-title-wrapper", children: [_jsx("div", { className: "ndl-menu-item-title", children: title }), Boolean(description) && (_jsx("div", { className: "ndl-menu-item-description", children: description }))] }), Boolean(trailingContent) && (_jsx("div", { className: "ndl-menu-item-trailing-content", children: trailingContent }))] }) })));
202
+ return (_jsx(Component, Object.assign({ className: classes, ref: ref, type: "button", role: "menuitem", disabled: isDisabled, style: style }, restProps, htmlAttributes, { children: _jsxs("div", { className: "ndl-menu-item-inner", children: [Boolean(leadingContent) && (_jsx("div", { className: "ndl-menu-item-leading-content", children: leadingContent })), _jsxs("div", { className: "ndl-menu-item-title-wrapper", children: [_jsx("div", { className: "ndl-menu-item-title", children: title }), Boolean(description) && (_jsx("div", { className: "ndl-menu-item-description", children: description }))] }), Boolean(trailingContent) && (_jsx("div", { className: "ndl-menu-item-trailing-content", children: trailingContent }))] }) })));
202
203
  };
203
204
  const MenuItem = ({ title, className, style, leadingVisual, trailingContent, description, isDisabled, as, onClick, onFocus, htmlAttributes, id, ref, }) => {
204
205
  const menu = useContext(MenuContext);
@@ -239,15 +240,17 @@ const NestedMenuItem = ({ title, isDisabled, description, leadingVisual, as, onF
239
240
  },
240
241
  })), { id: id }) }));
241
242
  };
242
- const CategoryItem = ({ children, className, style, as, htmlAttributes, ref, }) => {
243
+ const CategoryItem = (_a) => {
244
+ var { children, className, style, as, htmlAttributes, ref } = _a, restProps = __rest(_a, ["children", "className", "style", "as", "htmlAttributes", "ref"]);
243
245
  const classes = classNames('ndl-menu-category-item', className);
244
246
  const Component = as !== null && as !== void 0 ? as : 'div';
245
- return (_jsx(Component, Object.assign({ className: classes, style: style, ref: ref }, htmlAttributes, { children: children })));
247
+ return (_jsx(Component, Object.assign({ className: classes, style: style, ref: ref }, restProps, htmlAttributes, { children: children })));
246
248
  };
247
- const MenuItems = ({ as, children, className, htmlAttributes, style, ref, }) => {
249
+ const MenuItems = (_a) => {
250
+ var { as, children, className, htmlAttributes, style, ref } = _a, restProps = __rest(_a, ["as", "children", "className", "htmlAttributes", "style", "ref"]);
248
251
  const classes = classNames('ndl-menu-items', className);
249
252
  const Component = as !== null && as !== void 0 ? as : 'div';
250
- return (_jsx(Component, Object.assign({ className: classes, style: style, ref: ref }, htmlAttributes, { children: children })));
253
+ return (_jsx(Component, Object.assign({ className: classes, style: style, ref: ref }, restProps, htmlAttributes, { children: children })));
251
254
  };
252
255
  const Menu = Object.assign(MenuWrapper, {
253
256
  CategoryItem: CategoryItem,