@neo4j-ndl/react 4.3.6 → 4.4.1

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 (515) hide show
  1. package/lib/cjs/_common/types.js.map +1 -1
  2. package/lib/cjs/_common/utils.js +4 -4
  3. package/lib/cjs/_common/utils.js.map +1 -1
  4. package/lib/cjs/accordion/Accordion.js +5 -5
  5. package/lib/cjs/accordion/Accordion.js.map +1 -1
  6. package/lib/cjs/accordion/accordion-context.js +1 -1
  7. package/lib/cjs/accordion/accordion-context.js.map +1 -1
  8. package/lib/cjs/accordion/stories/accordion.stories.js +20 -20
  9. package/lib/cjs/accordion/stories/accordion.stories.js.map +1 -1
  10. package/lib/cjs/ai/presence/Presence.js +1 -0
  11. package/lib/cjs/ai/presence/Presence.js.map +1 -1
  12. package/lib/cjs/avatar/stories/avatar.stories.js +18 -18
  13. package/lib/cjs/avatar/stories/avatar.stories.js.map +1 -1
  14. package/lib/cjs/banner/Banner.js +1 -1
  15. package/lib/cjs/banner/Banner.js.map +1 -1
  16. package/lib/cjs/breadcrumbs/stories/breadcrumbs.stories.js +1 -1
  17. package/lib/cjs/breadcrumbs/stories/breadcrumbs.stories.js.map +1 -1
  18. package/lib/cjs/checkbox/stories/checkbox-full.story.js +2 -2
  19. package/lib/cjs/checkbox/stories/checkbox-full.story.js.map +1 -1
  20. package/lib/cjs/checkbox/stories/checkbox.stories.js +19 -19
  21. package/lib/cjs/checkbox/stories/checkbox.stories.js.map +1 -1
  22. package/lib/cjs/clean-icon-button/stories/clean-icon-button.stories.js +11 -11
  23. package/lib/cjs/clean-icon-button/stories/clean-icon-button.stories.js.map +1 -1
  24. package/lib/cjs/code-block/stories/code-disabled.story.js +2 -2
  25. package/lib/cjs/code-block/stories/code-disabled.story.js.map +1 -1
  26. package/lib/cjs/code-block/stories/code-full.story.js +2 -2
  27. package/lib/cjs/code-block/stories/code-full.story.js.map +1 -1
  28. package/lib/cjs/code-block/stories/code-with-actions.story.js +2 -2
  29. package/lib/cjs/code-block/stories/code-with-actions.story.js.map +1 -1
  30. package/lib/cjs/code-block/themes/ndl-code-dark.js +64 -64
  31. package/lib/cjs/code-block/themes/ndl-code-dark.js.map +1 -1
  32. package/lib/cjs/code-block/themes/ndl-code-light.js +64 -64
  33. package/lib/cjs/code-block/themes/ndl-code-light.js.map +1 -1
  34. package/lib/cjs/color-picker/ColorPicker.js +1 -1
  35. package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
  36. package/lib/cjs/color-picker/stories/color-picker.stories.js +4 -4
  37. package/lib/cjs/color-picker/stories/color-picker.stories.js.map +1 -1
  38. package/lib/cjs/data-grid/Components.js +14 -12
  39. package/lib/cjs/data-grid/Components.js.map +1 -1
  40. package/lib/cjs/data-grid/DataGrid.js.map +1 -1
  41. package/lib/cjs/data-grid/data-grid-context.js +1 -1
  42. package/lib/cjs/data-grid/data-grid-context.js.map +1 -1
  43. package/lib/cjs/data-grid/data-grid-nav/index.js +1 -1
  44. package/lib/cjs/data-grid/data-grid-nav/index.js.map +1 -1
  45. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
  46. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  47. package/lib/cjs/data-grid/stories/datagrid-single-selectable.story.js +0 -24
  48. package/lib/cjs/data-grid/stories/datagrid-single-selectable.story.js.map +1 -1
  49. package/lib/cjs/date-picker/DatePicker.js.map +1 -1
  50. package/lib/cjs/date-picker/stories/date-picker-full.story.js +9 -9
  51. package/lib/cjs/date-picker/stories/date-picker-full.story.js.map +1 -1
  52. package/lib/cjs/divider/stories/divider-horizontal.story.js +1 -1
  53. package/lib/cjs/divider/stories/divider-horizontal.story.js.map +1 -1
  54. package/lib/cjs/divider/stories/divider-vertical.story.js +1 -1
  55. package/lib/cjs/divider/stories/divider-vertical.story.js.map +1 -1
  56. package/lib/cjs/drawer/stories/drawer.stories.js +19 -19
  57. package/lib/cjs/drawer/stories/drawer.stories.js.map +1 -1
  58. package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
  59. package/lib/cjs/dropdown-button/stories/dropdown-button.stories.js +18 -18
  60. package/lib/cjs/dropdown-button/stories/dropdown-button.stories.js.map +1 -1
  61. package/lib/cjs/dropzone/stories/dropzone-disabled.story.js +1 -1
  62. package/lib/cjs/dropzone/stories/dropzone-disabled.story.js.map +1 -1
  63. package/lib/cjs/dropzone/stories/dropzone-full.story.js +11 -11
  64. package/lib/cjs/dropzone/stories/dropzone-full.story.js.map +1 -1
  65. package/lib/cjs/dropzone/stories/dropzone.stories.js +10 -10
  66. package/lib/cjs/dropzone/stories/dropzone.stories.js.map +1 -1
  67. package/lib/cjs/flex/Flex.js +4 -4
  68. package/lib/cjs/flex/Flex.js.map +1 -1
  69. package/lib/cjs/graph-label/stories/graph-label.stories.js +20 -20
  70. package/lib/cjs/graph-label/stories/graph-label.stories.js.map +1 -1
  71. package/lib/cjs/hooks/index.js +3 -3
  72. package/lib/cjs/hooks/index.js.map +1 -1
  73. package/lib/cjs/icon-button/stories/icon-button.stories.js +12 -12
  74. package/lib/cjs/icon-button/stories/icon-button.stories.js.map +1 -1
  75. package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js +16 -16
  76. package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
  77. package/lib/cjs/icon-button-base/IconButtonBase.js +5 -3
  78. package/lib/cjs/icon-button-base/IconButtonBase.js.map +1 -1
  79. package/lib/cjs/icons/generated/custom/DatabaseCross.js +1 -1
  80. package/lib/cjs/icons/generated/custom/DatabaseCross.js.map +1 -1
  81. package/lib/cjs/icons/generated/custom/DatabasePlus.js +1 -1
  82. package/lib/cjs/icons/generated/custom/DatabasePlus.js.map +1 -1
  83. package/lib/cjs/icons/generated/custom/GlobePin.js +1 -1
  84. package/lib/cjs/icons/generated/custom/GlobePin.js.map +1 -1
  85. package/lib/cjs/icons/generated/custom/PanelBottom.js +1 -1
  86. package/lib/cjs/icons/generated/custom/PanelBottom.js.map +1 -1
  87. package/lib/cjs/icons/generated/custom/PanelLeftCollapsed.js +30 -0
  88. package/lib/cjs/icons/generated/custom/PanelLeftCollapsed.js.map +1 -0
  89. package/lib/cjs/icons/generated/custom/PanelLeftExpanded.js +30 -0
  90. package/lib/cjs/icons/generated/custom/PanelLeftExpanded.js.map +1 -0
  91. package/lib/cjs/icons/generated/custom/PanelRightCollapsed.js +30 -0
  92. package/lib/cjs/icons/generated/custom/PanelRightCollapsed.js.map +1 -0
  93. package/lib/cjs/icons/generated/custom/PanelRightExpanded.js +30 -0
  94. package/lib/cjs/icons/generated/custom/PanelRightExpanded.js.map +1 -0
  95. package/lib/cjs/icons/generated/custom/ThreePanel.js +1 -1
  96. package/lib/cjs/icons/generated/custom/ThreePanel.js.map +1 -1
  97. package/lib/cjs/icons/generated/custom/index.js +9 -1
  98. package/lib/cjs/icons/generated/custom/index.js.map +1 -1
  99. package/lib/cjs/icons/wrapIcon.js +2 -2
  100. package/lib/cjs/icons/wrapIcon.js.map +1 -1
  101. package/lib/cjs/kbd/stories/kbd.stories.js +7 -7
  102. package/lib/cjs/kbd/stories/kbd.stories.js.map +1 -1
  103. package/lib/cjs/loading-spinner/LoadingSpinner.js +2 -2
  104. package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
  105. package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js +10 -10
  106. package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js.map +1 -1
  107. package/lib/cjs/logo/Logo.js +6 -6
  108. package/lib/cjs/logo/Logo.js.map +1 -1
  109. package/lib/cjs/logo/stories/logo.stories.js +9 -9
  110. package/lib/cjs/logo/stories/logo.stories.js.map +1 -1
  111. package/lib/cjs/menu/Menu.js +3 -3
  112. package/lib/cjs/menu/Menu.js.map +1 -1
  113. package/lib/cjs/menu/stories/menu-custom-items.story.js +3 -1
  114. package/lib/cjs/menu/stories/menu-custom-items.story.js.map +1 -1
  115. package/lib/cjs/menu/stories/menu-default.story.js +3 -1
  116. package/lib/cjs/menu/stories/menu-default.story.js.map +1 -1
  117. package/lib/cjs/menu/stories/menu-in-dialog.story.js +5 -1
  118. package/lib/cjs/menu/stories/menu-in-dialog.story.js.map +1 -1
  119. package/lib/cjs/menu/stories/menu-in-popover.story.js +3 -1
  120. package/lib/cjs/menu/stories/menu-in-popover.story.js.map +1 -1
  121. package/lib/cjs/menu/stories/menu-nested.story.js +3 -1
  122. package/lib/cjs/menu/stories/menu-nested.story.js.map +1 -1
  123. package/lib/cjs/menu/stories/menu-placements.story.js +3 -1
  124. package/lib/cjs/menu/stories/menu-placements.story.js.map +1 -1
  125. package/lib/cjs/menu/stories/menu-with-category.story.js +1 -2
  126. package/lib/cjs/menu/stories/menu-with-category.story.js.map +1 -1
  127. package/lib/cjs/menu/stories/menu-with-disabled-item.story.js +1 -2
  128. package/lib/cjs/menu/stories/menu-with-disabled-item.story.js.map +1 -1
  129. package/lib/cjs/menu/stories/menu-with-divider.story.js +1 -2
  130. package/lib/cjs/menu/stories/menu-with-divider.story.js.map +1 -1
  131. package/lib/cjs/menu/stories/menu-with-icon.story.js +3 -1
  132. package/lib/cjs/menu/stories/menu-with-icon.story.js.map +1 -1
  133. package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js +3 -1
  134. package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
  135. package/lib/cjs/popover/Popover.js +15 -15
  136. package/lib/cjs/popover/Popover.js.map +1 -1
  137. package/lib/cjs/popover/use-popover.js +9 -9
  138. package/lib/cjs/popover/use-popover.js.map +1 -1
  139. package/lib/cjs/progress-bar/stories/progress-bar.stories.js +3 -3
  140. package/lib/cjs/progress-bar/stories/progress-bar.stories.js.map +1 -1
  141. package/lib/cjs/segmented-control/SegmentedControl.js +1 -1
  142. package/lib/cjs/segmented-control/SegmentedControl.js.map +1 -1
  143. package/lib/cjs/select/Overrides.js +41 -41
  144. package/lib/cjs/select/Overrides.js.map +1 -1
  145. package/lib/cjs/select/Select.js +25 -3
  146. package/lib/cjs/select/Select.js.map +1 -1
  147. package/lib/cjs/select/stories/select-async.story.js +4 -4
  148. package/lib/cjs/select/stories/select-async.story.js.map +1 -1
  149. package/lib/cjs/select/stories/select-controlled.story.js +4 -4
  150. package/lib/cjs/select/stories/select-controlled.story.js.map +1 -1
  151. package/lib/cjs/select/stories/select-creatable.story.js +1 -1
  152. package/lib/cjs/select/stories/select-creatable.story.js.map +1 -1
  153. package/lib/cjs/select/stories/select-custom-label.story.js +1 -1
  154. package/lib/cjs/select/stories/select-custom-label.story.js.map +1 -1
  155. package/lib/cjs/select/stories/select-disabled.story.js +1 -1
  156. package/lib/cjs/select/stories/select-disabled.story.js.map +1 -1
  157. package/lib/cjs/select/stories/select-inside-dialog.story.js +1 -1
  158. package/lib/cjs/select/stories/select-inside-dialog.story.js.map +1 -1
  159. package/lib/cjs/side-navigation/SideNavigation.js +1 -1
  160. package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
  161. package/lib/cjs/side-navigation/stories/side-nav.stories.js +1 -1
  162. package/lib/cjs/side-navigation/stories/side-nav.stories.js.map +1 -1
  163. package/lib/cjs/skeleton/stories/skeleton.stories.js +28 -28
  164. package/lib/cjs/skeleton/stories/skeleton.stories.js.map +1 -1
  165. package/lib/cjs/slider/Slider.js +2 -1
  166. package/lib/cjs/slider/Slider.js.map +1 -1
  167. package/lib/cjs/status-indicator/stories/status-indicator.stories.js +2 -2
  168. package/lib/cjs/status-indicator/stories/status-indicator.stories.js.map +1 -1
  169. package/lib/cjs/switch/stories/switch.stories.js +7 -7
  170. package/lib/cjs/switch/stories/switch.stories.js.map +1 -1
  171. package/lib/cjs/tabs/Tabs.js +2 -2
  172. package/lib/cjs/tabs/Tabs.js.map +1 -1
  173. package/lib/cjs/tabs/stories/tabs-overflow.story.js +1 -1
  174. package/lib/cjs/tabs/stories/tabs-overflow.story.js.map +1 -1
  175. package/lib/cjs/tag/Tag.js +2 -2
  176. package/lib/cjs/tag/Tag.js.map +1 -1
  177. package/lib/cjs/tag/stories/tag.stories.js +10 -10
  178. package/lib/cjs/tag/stories/tag.stories.js.map +1 -1
  179. package/lib/cjs/text-area/TextArea.js +5 -5
  180. package/lib/cjs/text-area/TextArea.js.map +1 -1
  181. package/lib/cjs/text-area/stories/text-area.stories.js +25 -25
  182. package/lib/cjs/text-area/stories/text-area.stories.js.map +1 -1
  183. package/lib/cjs/text-input/stories/text-input-number.story.js +2 -2
  184. package/lib/cjs/text-input/stories/text-input-number.story.js.map +1 -1
  185. package/lib/cjs/text-link/stories/text-link.stories.js +11 -11
  186. package/lib/cjs/text-link/stories/text-link.stories.js.map +1 -1
  187. package/lib/cjs/text-overflow/stories/text-overflow.stories.js +1 -1
  188. package/lib/cjs/text-overflow/stories/text-overflow.stories.js.map +1 -1
  189. package/lib/cjs/theme/ThemeProvider.js.map +1 -1
  190. package/lib/cjs/theme/agnostic.js +1 -1
  191. package/lib/cjs/theme/agnostic.js.map +1 -1
  192. package/lib/cjs/time-picker/TimePicker.js +4 -4
  193. package/lib/cjs/time-picker/TimePicker.js.map +1 -1
  194. package/lib/cjs/time-picker/time-picker-hooks.js +1 -1
  195. package/lib/cjs/time-picker/time-picker-hooks.js.map +1 -1
  196. package/lib/cjs/timezone-picker/TimeZonePicker.js +5 -5
  197. package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
  198. package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +7 -7
  199. package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
  200. package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
  201. package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
  202. package/lib/cjs/toast/Toast.js +12 -12
  203. package/lib/cjs/toast/Toast.js.map +1 -1
  204. package/lib/cjs/toast/stories/toast-action-story.js +1 -1
  205. package/lib/cjs/toast/stories/toast-action-story.js.map +1 -1
  206. package/lib/cjs/toast/stories/toast-controlled-story.js +2 -2
  207. package/lib/cjs/toast/stories/toast-controlled-story.js.map +1 -1
  208. package/lib/cjs/toast/stories/toast-progress-bar.js +1 -1
  209. package/lib/cjs/toast/stories/toast-progress-bar.js.map +1 -1
  210. package/lib/cjs/toast/stories/toast.stories.js +18 -18
  211. package/lib/cjs/toast/stories/toast.stories.js.map +1 -1
  212. package/lib/cjs/tooltip/Tooltip.js +1 -1
  213. package/lib/cjs/tooltip/Tooltip.js.map +1 -1
  214. package/lib/cjs/tooltip/stories/tooltip-hover-delay.story.js +1 -1
  215. package/lib/cjs/tooltip/stories/tooltip-hover-delay.story.js.map +1 -1
  216. package/lib/cjs/tooltip/stories/tooltip-placements.story.js +8 -8
  217. package/lib/cjs/tooltip/stories/tooltip-placements.story.js.map +1 -1
  218. package/lib/cjs/tooltip/stories/tooltip.stories.js +29 -29
  219. package/lib/cjs/tooltip/stories/tooltip.stories.js.map +1 -1
  220. package/lib/cjs/tooltip/use-tooltip.js +10 -10
  221. package/lib/cjs/tooltip/use-tooltip.js.map +1 -1
  222. package/lib/cjs/tree-view/TreeItemWrapper.js +2 -2
  223. package/lib/cjs/tree-view/TreeItemWrapper.js.map +1 -1
  224. package/lib/cjs/tree-view/TreeView.js +12 -12
  225. package/lib/cjs/tree-view/TreeView.js.map +1 -1
  226. package/lib/cjs/tree-view/TreeViewItem.js +1 -1
  227. package/lib/cjs/tree-view/TreeViewItem.js.map +1 -1
  228. package/lib/cjs/tree-view/TreeViewTextItem.js +1 -1
  229. package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
  230. package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js +2 -2
  231. package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
  232. package/lib/cjs/wizard/Wizard.js +3 -3
  233. package/lib/cjs/wizard/Wizard.js.map +1 -1
  234. package/lib/cjs/wizard/stories/wizard.stories.js +14 -14
  235. package/lib/cjs/wizard/stories/wizard.stories.js.map +1 -1
  236. package/lib/esm/_common/types.js.map +1 -1
  237. package/lib/esm/_common/utils.js +4 -4
  238. package/lib/esm/_common/utils.js.map +1 -1
  239. package/lib/esm/accordion/Accordion.js +5 -5
  240. package/lib/esm/accordion/Accordion.js.map +1 -1
  241. package/lib/esm/accordion/accordion-context.js +1 -1
  242. package/lib/esm/accordion/accordion-context.js.map +1 -1
  243. package/lib/esm/accordion/stories/accordion.stories.js +20 -20
  244. package/lib/esm/accordion/stories/accordion.stories.js.map +1 -1
  245. package/lib/esm/ai/presence/Presence.js +1 -0
  246. package/lib/esm/ai/presence/Presence.js.map +1 -1
  247. package/lib/esm/avatar/stories/avatar.stories.js +18 -18
  248. package/lib/esm/avatar/stories/avatar.stories.js.map +1 -1
  249. package/lib/esm/banner/Banner.js +1 -1
  250. package/lib/esm/banner/Banner.js.map +1 -1
  251. package/lib/esm/breadcrumbs/stories/breadcrumbs.stories.js +1 -1
  252. package/lib/esm/breadcrumbs/stories/breadcrumbs.stories.js.map +1 -1
  253. package/lib/esm/checkbox/stories/checkbox-full.story.js +2 -2
  254. package/lib/esm/checkbox/stories/checkbox-full.story.js.map +1 -1
  255. package/lib/esm/checkbox/stories/checkbox.stories.js +19 -19
  256. package/lib/esm/checkbox/stories/checkbox.stories.js.map +1 -1
  257. package/lib/esm/clean-icon-button/stories/clean-icon-button.stories.js +11 -11
  258. package/lib/esm/clean-icon-button/stories/clean-icon-button.stories.js.map +1 -1
  259. package/lib/esm/code-block/stories/code-disabled.story.js +2 -2
  260. package/lib/esm/code-block/stories/code-disabled.story.js.map +1 -1
  261. package/lib/esm/code-block/stories/code-full.story.js +2 -2
  262. package/lib/esm/code-block/stories/code-full.story.js.map +1 -1
  263. package/lib/esm/code-block/stories/code-with-actions.story.js +2 -2
  264. package/lib/esm/code-block/stories/code-with-actions.story.js.map +1 -1
  265. package/lib/esm/code-block/themes/ndl-code-dark.js +64 -64
  266. package/lib/esm/code-block/themes/ndl-code-dark.js.map +1 -1
  267. package/lib/esm/code-block/themes/ndl-code-light.js +64 -64
  268. package/lib/esm/code-block/themes/ndl-code-light.js.map +1 -1
  269. package/lib/esm/color-picker/ColorPicker.js +1 -1
  270. package/lib/esm/color-picker/ColorPicker.js.map +1 -1
  271. package/lib/esm/color-picker/stories/color-picker.stories.js +4 -4
  272. package/lib/esm/color-picker/stories/color-picker.stories.js.map +1 -1
  273. package/lib/esm/data-grid/Components.js +14 -12
  274. package/lib/esm/data-grid/Components.js.map +1 -1
  275. package/lib/esm/data-grid/DataGrid.js.map +1 -1
  276. package/lib/esm/data-grid/data-grid-context.js +1 -1
  277. package/lib/esm/data-grid/data-grid-context.js.map +1 -1
  278. package/lib/esm/data-grid/data-grid-nav/index.js +1 -1
  279. package/lib/esm/data-grid/data-grid-nav/index.js.map +1 -1
  280. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
  281. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  282. package/lib/esm/data-grid/stories/datagrid-single-selectable.story.js +0 -24
  283. package/lib/esm/data-grid/stories/datagrid-single-selectable.story.js.map +1 -1
  284. package/lib/esm/date-picker/DatePicker.js.map +1 -1
  285. package/lib/esm/date-picker/stories/date-picker-full.story.js +9 -9
  286. package/lib/esm/date-picker/stories/date-picker-full.story.js.map +1 -1
  287. package/lib/esm/divider/stories/divider-horizontal.story.js +1 -1
  288. package/lib/esm/divider/stories/divider-horizontal.story.js.map +1 -1
  289. package/lib/esm/divider/stories/divider-vertical.story.js +1 -1
  290. package/lib/esm/divider/stories/divider-vertical.story.js.map +1 -1
  291. package/lib/esm/drawer/stories/drawer.stories.js +19 -19
  292. package/lib/esm/drawer/stories/drawer.stories.js.map +1 -1
  293. package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
  294. package/lib/esm/dropdown-button/stories/dropdown-button.stories.js +18 -18
  295. package/lib/esm/dropdown-button/stories/dropdown-button.stories.js.map +1 -1
  296. package/lib/esm/dropzone/stories/dropzone-disabled.story.js +1 -1
  297. package/lib/esm/dropzone/stories/dropzone-disabled.story.js.map +1 -1
  298. package/lib/esm/dropzone/stories/dropzone-full.story.js +11 -11
  299. package/lib/esm/dropzone/stories/dropzone-full.story.js.map +1 -1
  300. package/lib/esm/dropzone/stories/dropzone.stories.js +10 -10
  301. package/lib/esm/dropzone/stories/dropzone.stories.js.map +1 -1
  302. package/lib/esm/flex/Flex.js +4 -4
  303. package/lib/esm/flex/Flex.js.map +1 -1
  304. package/lib/esm/graph-label/stories/graph-label.stories.js +20 -20
  305. package/lib/esm/graph-label/stories/graph-label.stories.js.map +1 -1
  306. package/lib/esm/hooks/index.js +3 -3
  307. package/lib/esm/hooks/index.js.map +1 -1
  308. package/lib/esm/icon-button/stories/icon-button.stories.js +12 -12
  309. package/lib/esm/icon-button/stories/icon-button.stories.js.map +1 -1
  310. package/lib/esm/icon-button-array/stories/icon-button-array.stories.js +16 -16
  311. package/lib/esm/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
  312. package/lib/esm/icon-button-base/IconButtonBase.js +5 -3
  313. package/lib/esm/icon-button-base/IconButtonBase.js.map +1 -1
  314. package/lib/esm/icons/generated/custom/DatabaseCross.js +2 -2
  315. package/lib/esm/icons/generated/custom/DatabaseCross.js.map +1 -1
  316. package/lib/esm/icons/generated/custom/DatabasePlus.js +1 -1
  317. package/lib/esm/icons/generated/custom/DatabasePlus.js.map +1 -1
  318. package/lib/esm/icons/generated/custom/GlobePin.js +1 -1
  319. package/lib/esm/icons/generated/custom/GlobePin.js.map +1 -1
  320. package/lib/esm/icons/generated/custom/PanelBottom.js +1 -1
  321. package/lib/esm/icons/generated/custom/PanelBottom.js.map +1 -1
  322. package/lib/esm/icons/generated/custom/PanelLeftCollapsed.js +28 -0
  323. package/lib/esm/icons/generated/custom/PanelLeftCollapsed.js.map +1 -0
  324. package/lib/esm/icons/generated/custom/PanelLeftExpanded.js +28 -0
  325. package/lib/esm/icons/generated/custom/PanelLeftExpanded.js.map +1 -0
  326. package/lib/esm/icons/generated/custom/PanelRightCollapsed.js +28 -0
  327. package/lib/esm/icons/generated/custom/PanelRightCollapsed.js.map +1 -0
  328. package/lib/esm/icons/generated/custom/PanelRightExpanded.js +28 -0
  329. package/lib/esm/icons/generated/custom/PanelRightExpanded.js.map +1 -0
  330. package/lib/esm/icons/generated/custom/ThreePanel.js +1 -1
  331. package/lib/esm/icons/generated/custom/ThreePanel.js.map +1 -1
  332. package/lib/esm/icons/generated/custom/index.js +4 -0
  333. package/lib/esm/icons/generated/custom/index.js.map +1 -1
  334. package/lib/esm/icons/wrapIcon.js +2 -2
  335. package/lib/esm/icons/wrapIcon.js.map +1 -1
  336. package/lib/esm/kbd/stories/kbd.stories.js +7 -7
  337. package/lib/esm/kbd/stories/kbd.stories.js.map +1 -1
  338. package/lib/esm/loading-spinner/LoadingSpinner.js +2 -2
  339. package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
  340. package/lib/esm/loading-spinner/stories/loading-spinner.stories.js +10 -10
  341. package/lib/esm/loading-spinner/stories/loading-spinner.stories.js.map +1 -1
  342. package/lib/esm/logo/Logo.js +6 -6
  343. package/lib/esm/logo/Logo.js.map +1 -1
  344. package/lib/esm/logo/stories/logo.stories.js +9 -9
  345. package/lib/esm/logo/stories/logo.stories.js.map +1 -1
  346. package/lib/esm/menu/Menu.js +3 -3
  347. package/lib/esm/menu/Menu.js.map +1 -1
  348. package/lib/esm/menu/stories/menu-custom-items.story.js +3 -1
  349. package/lib/esm/menu/stories/menu-custom-items.story.js.map +1 -1
  350. package/lib/esm/menu/stories/menu-default.story.js +3 -1
  351. package/lib/esm/menu/stories/menu-default.story.js.map +1 -1
  352. package/lib/esm/menu/stories/menu-in-dialog.story.js +5 -1
  353. package/lib/esm/menu/stories/menu-in-dialog.story.js.map +1 -1
  354. package/lib/esm/menu/stories/menu-in-popover.story.js +3 -1
  355. package/lib/esm/menu/stories/menu-in-popover.story.js.map +1 -1
  356. package/lib/esm/menu/stories/menu-nested.story.js +3 -1
  357. package/lib/esm/menu/stories/menu-nested.story.js.map +1 -1
  358. package/lib/esm/menu/stories/menu-placements.story.js +3 -1
  359. package/lib/esm/menu/stories/menu-placements.story.js.map +1 -1
  360. package/lib/esm/menu/stories/menu-with-category.story.js +1 -2
  361. package/lib/esm/menu/stories/menu-with-category.story.js.map +1 -1
  362. package/lib/esm/menu/stories/menu-with-disabled-item.story.js +1 -2
  363. package/lib/esm/menu/stories/menu-with-disabled-item.story.js.map +1 -1
  364. package/lib/esm/menu/stories/menu-with-divider.story.js +1 -2
  365. package/lib/esm/menu/stories/menu-with-divider.story.js.map +1 -1
  366. package/lib/esm/menu/stories/menu-with-icon.story.js +3 -1
  367. package/lib/esm/menu/stories/menu-with-icon.story.js.map +1 -1
  368. package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js +3 -1
  369. package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
  370. package/lib/esm/popover/Popover.js +15 -15
  371. package/lib/esm/popover/Popover.js.map +1 -1
  372. package/lib/esm/popover/use-popover.js +9 -9
  373. package/lib/esm/popover/use-popover.js.map +1 -1
  374. package/lib/esm/progress-bar/stories/progress-bar.stories.js +3 -3
  375. package/lib/esm/progress-bar/stories/progress-bar.stories.js.map +1 -1
  376. package/lib/esm/segmented-control/SegmentedControl.js +1 -1
  377. package/lib/esm/segmented-control/SegmentedControl.js.map +1 -1
  378. package/lib/esm/select/Overrides.js +41 -41
  379. package/lib/esm/select/Overrides.js.map +1 -1
  380. package/lib/esm/select/Select.js +26 -4
  381. package/lib/esm/select/Select.js.map +1 -1
  382. package/lib/esm/select/stories/select-async.story.js +4 -4
  383. package/lib/esm/select/stories/select-async.story.js.map +1 -1
  384. package/lib/esm/select/stories/select-controlled.story.js +4 -4
  385. package/lib/esm/select/stories/select-controlled.story.js.map +1 -1
  386. package/lib/esm/select/stories/select-creatable.story.js +1 -1
  387. package/lib/esm/select/stories/select-creatable.story.js.map +1 -1
  388. package/lib/esm/select/stories/select-custom-label.story.js +1 -1
  389. package/lib/esm/select/stories/select-custom-label.story.js.map +1 -1
  390. package/lib/esm/select/stories/select-disabled.story.js +1 -1
  391. package/lib/esm/select/stories/select-disabled.story.js.map +1 -1
  392. package/lib/esm/select/stories/select-inside-dialog.story.js +1 -1
  393. package/lib/esm/select/stories/select-inside-dialog.story.js.map +1 -1
  394. package/lib/esm/side-navigation/SideNavigation.js +1 -1
  395. package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
  396. package/lib/esm/side-navigation/stories/side-nav.stories.js +1 -1
  397. package/lib/esm/side-navigation/stories/side-nav.stories.js.map +1 -1
  398. package/lib/esm/skeleton/stories/skeleton.stories.js +28 -28
  399. package/lib/esm/skeleton/stories/skeleton.stories.js.map +1 -1
  400. package/lib/esm/slider/Slider.js +2 -1
  401. package/lib/esm/slider/Slider.js.map +1 -1
  402. package/lib/esm/status-indicator/stories/status-indicator.stories.js +2 -2
  403. package/lib/esm/status-indicator/stories/status-indicator.stories.js.map +1 -1
  404. package/lib/esm/switch/stories/switch.stories.js +7 -7
  405. package/lib/esm/switch/stories/switch.stories.js.map +1 -1
  406. package/lib/esm/tabs/Tabs.js +2 -2
  407. package/lib/esm/tabs/Tabs.js.map +1 -1
  408. package/lib/esm/tabs/stories/tabs-overflow.story.js +1 -1
  409. package/lib/esm/tabs/stories/tabs-overflow.story.js.map +1 -1
  410. package/lib/esm/tag/Tag.js +2 -2
  411. package/lib/esm/tag/Tag.js.map +1 -1
  412. package/lib/esm/tag/stories/tag.stories.js +10 -10
  413. package/lib/esm/tag/stories/tag.stories.js.map +1 -1
  414. package/lib/esm/text-area/TextArea.js +5 -5
  415. package/lib/esm/text-area/TextArea.js.map +1 -1
  416. package/lib/esm/text-area/stories/text-area.stories.js +25 -25
  417. package/lib/esm/text-area/stories/text-area.stories.js.map +1 -1
  418. package/lib/esm/text-input/stories/text-input-number.story.js +2 -2
  419. package/lib/esm/text-input/stories/text-input-number.story.js.map +1 -1
  420. package/lib/esm/text-link/stories/text-link.stories.js +11 -11
  421. package/lib/esm/text-link/stories/text-link.stories.js.map +1 -1
  422. package/lib/esm/text-overflow/stories/text-overflow.stories.js +1 -1
  423. package/lib/esm/text-overflow/stories/text-overflow.stories.js.map +1 -1
  424. package/lib/esm/theme/ThemeProvider.js.map +1 -1
  425. package/lib/esm/theme/agnostic.js +1 -1
  426. package/lib/esm/theme/agnostic.js.map +1 -1
  427. package/lib/esm/time-picker/TimePicker.js +4 -4
  428. package/lib/esm/time-picker/TimePicker.js.map +1 -1
  429. package/lib/esm/time-picker/time-picker-hooks.js +1 -1
  430. package/lib/esm/time-picker/time-picker-hooks.js.map +1 -1
  431. package/lib/esm/timezone-picker/TimeZonePicker.js +5 -5
  432. package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
  433. package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +7 -7
  434. package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
  435. package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
  436. package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
  437. package/lib/esm/toast/Toast.js +12 -12
  438. package/lib/esm/toast/Toast.js.map +1 -1
  439. package/lib/esm/toast/stories/toast-action-story.js +1 -1
  440. package/lib/esm/toast/stories/toast-action-story.js.map +1 -1
  441. package/lib/esm/toast/stories/toast-controlled-story.js +2 -2
  442. package/lib/esm/toast/stories/toast-controlled-story.js.map +1 -1
  443. package/lib/esm/toast/stories/toast-progress-bar.js +1 -1
  444. package/lib/esm/toast/stories/toast-progress-bar.js.map +1 -1
  445. package/lib/esm/toast/stories/toast.stories.js +18 -18
  446. package/lib/esm/toast/stories/toast.stories.js.map +1 -1
  447. package/lib/esm/tooltip/Tooltip.js +1 -1
  448. package/lib/esm/tooltip/Tooltip.js.map +1 -1
  449. package/lib/esm/tooltip/stories/tooltip-hover-delay.story.js +1 -1
  450. package/lib/esm/tooltip/stories/tooltip-hover-delay.story.js.map +1 -1
  451. package/lib/esm/tooltip/stories/tooltip-placements.story.js +8 -8
  452. package/lib/esm/tooltip/stories/tooltip-placements.story.js.map +1 -1
  453. package/lib/esm/tooltip/stories/tooltip.stories.js +29 -29
  454. package/lib/esm/tooltip/stories/tooltip.stories.js.map +1 -1
  455. package/lib/esm/tooltip/use-tooltip.js +10 -10
  456. package/lib/esm/tooltip/use-tooltip.js.map +1 -1
  457. package/lib/esm/tree-view/TreeItemWrapper.js +2 -2
  458. package/lib/esm/tree-view/TreeItemWrapper.js.map +1 -1
  459. package/lib/esm/tree-view/TreeView.js +12 -12
  460. package/lib/esm/tree-view/TreeView.js.map +1 -1
  461. package/lib/esm/tree-view/TreeViewItem.js +1 -1
  462. package/lib/esm/tree-view/TreeViewItem.js.map +1 -1
  463. package/lib/esm/tree-view/TreeViewTextItem.js +1 -1
  464. package/lib/esm/tree-view/TreeViewTextItem.js.map +1 -1
  465. package/lib/esm/tree-view/tree-view-keyboard-coordinates.js +2 -2
  466. package/lib/esm/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
  467. package/lib/esm/wizard/Wizard.js +3 -3
  468. package/lib/esm/wizard/Wizard.js.map +1 -1
  469. package/lib/esm/wizard/stories/wizard.stories.js +14 -14
  470. package/lib/esm/wizard/stories/wizard.stories.js.map +1 -1
  471. package/lib/types/accordion/stories/accordion.stories.d.ts +3 -3
  472. package/lib/types/ai/presence/Presence.d.ts.map +1 -1
  473. package/lib/types/breadcrumbs/stories/breadcrumbs.stories.d.ts +1 -1
  474. package/lib/types/data-grid/Components.d.ts.map +1 -1
  475. package/lib/types/data-grid/stories/datagrid-single-selectable.story.d.ts.map +1 -1
  476. package/lib/types/dropdown-button/DropdownButton.d.ts +1 -1
  477. package/lib/types/dropdown-button/DropdownButton.d.ts.map +1 -1
  478. package/lib/types/icon-button-base/IconButtonBase.d.ts.map +1 -1
  479. package/lib/types/icons/generated/custom/DatabaseCross.d.ts.map +1 -1
  480. package/lib/types/icons/generated/custom/DatabasePlus.d.ts.map +1 -1
  481. package/lib/types/icons/generated/custom/GlobePin.d.ts.map +1 -1
  482. package/lib/types/icons/generated/custom/PanelLeftCollapsed.d.ts +29 -0
  483. package/lib/types/icons/generated/custom/PanelLeftCollapsed.d.ts.map +1 -0
  484. package/lib/types/icons/generated/custom/PanelLeftExpanded.d.ts +29 -0
  485. package/lib/types/icons/generated/custom/PanelLeftExpanded.d.ts.map +1 -0
  486. package/lib/types/icons/generated/custom/PanelRightCollapsed.d.ts +29 -0
  487. package/lib/types/icons/generated/custom/PanelRightCollapsed.d.ts.map +1 -0
  488. package/lib/types/icons/generated/custom/PanelRightExpanded.d.ts +29 -0
  489. package/lib/types/icons/generated/custom/PanelRightExpanded.d.ts.map +1 -0
  490. package/lib/types/icons/generated/custom/index.d.ts +4 -0
  491. package/lib/types/icons/generated/custom/index.d.ts.map +1 -1
  492. package/lib/types/icons/wrapIcon.d.ts.map +1 -1
  493. package/lib/types/logo/stories/logo.stories.d.ts +3 -3
  494. package/lib/types/menu/stories/menu-custom-items.story.d.ts.map +1 -1
  495. package/lib/types/menu/stories/menu-default.story.d.ts.map +1 -1
  496. package/lib/types/menu/stories/menu-in-dialog.story.d.ts.map +1 -1
  497. package/lib/types/menu/stories/menu-in-popover.story.d.ts.map +1 -1
  498. package/lib/types/menu/stories/menu-nested.story.d.ts.map +1 -1
  499. package/lib/types/menu/stories/menu-placements.story.d.ts.map +1 -1
  500. package/lib/types/menu/stories/menu-with-category.story.d.ts.map +1 -1
  501. package/lib/types/menu/stories/menu-with-disabled-item.story.d.ts.map +1 -1
  502. package/lib/types/menu/stories/menu-with-divider.story.d.ts.map +1 -1
  503. package/lib/types/menu/stories/menu-with-icon.story.d.ts.map +1 -1
  504. package/lib/types/menu/stories/menu-with-keyboard-shortcuts.story.d.ts.map +1 -1
  505. package/lib/types/select/Select.d.ts.map +1 -1
  506. package/lib/types/side-navigation/SideNavigation.d.ts.map +1 -1
  507. package/lib/types/side-navigation/stories/side-nav.stories.d.ts +1 -1
  508. package/lib/types/skeleton/stories/skeleton.stories.d.ts +3 -3
  509. package/lib/types/slider/Slider.d.ts.map +1 -1
  510. package/lib/types/tabs/Tabs.d.ts.map +1 -1
  511. package/lib/types/tabs/stories/tabs-overflow.story.d.ts.map +1 -1
  512. package/lib/types/time-picker/time-picker-hooks.d.ts +1 -1
  513. package/lib/types/time-picker/time-picker-hooks.d.ts.map +1 -1
  514. package/lib/types/toast/stories/toast.stories.d.ts +2 -2
  515. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Flex.js","sourceRoot":"","sources":["../../../src/flex/Flex.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AASzC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAoDzD;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAwC,EAgBjB,EAAE,EAAE;QAhBa,EAC1D,EAAE,EACF,GAAG,GAAG,GAAG,EACT,MAAM,EACN,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,aAAa,GAAG,QAAQ,EACxB,QAAQ,GAAG,QAAQ,EACnB,UAAU,EACV,cAAc,EACd,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAEsC,EADtC,SAAS,cAf8C,4KAgB3D,CADa;IAEZ,MAAM,SAAS,GAAG,CAAC,EAAE,IAAI,KAAK,CAA8B,CAAC;IAE7D,0BAA0B;IAC1B,6CAA6C;IAC7C,8BAA8B;IAC9B,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACrC,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3D,MAAM,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACpE,MAAM,YAAY,GAAG,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,KAAK,IAAI,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,KAAK,EAAE,CAAC;IAEpE,MAAM,eAAe,GAAwB;QAC3C,aAAa;QACb,UAAU;QACV,QAAQ;QACR,cAAc;QACd,OAAO,EAAE,MAAM;QACf,GAAG,EAAE,YAAY;QACjB,YAAY,EAAE,SAAS,CAAC,YAAY,EAAE,cAAc,CAAC;KACtD,CAAC;IAEF,OAAO,CACL,KAAC,SAAS,kBACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,KAAK,kCAAO,eAAe,GAAK,KAAK,KACjC,SAAS,EACT,cAAc,cAEjB,QAAQ,IACC,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 */\n\nimport { tokens } from '@neo4j-ndl/base';\nimport type React from 'react';\n\nimport {\n type PolymorphicCommonProps,\n type Radius,\n type ReactComponent,\n type Spacing,\n} from '../_common/types';\nimport { getRadius, getSpacing } from '../_common/utils';\n\ntype AllowedFlexElements = 'div' | 'span' | 'ul' | 'ol' | 'li';\n\ntype BaseFlexProps = {\n /**\n * @default tokens.space['4']\n */\n gap?: Spacing;\n /**\n * @default undefined\n */\n rowGap?: Spacing;\n /**\n * @default undefined\n */\n columnGap?: Spacing;\n /**\n * @default undefined\n */\n borderRadius?: Radius;\n /**\n * Flex direction is set to column by default.\n * The `row-reverse` and `column-reverse` values\n * are skipped due to accessibility concerns.\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction#accessibility_concerns\n *\n * @default row\n */\n flexDirection?: Exclude<\n React.CSSProperties['flexDirection'],\n 'row-reverse' | 'column-reverse'\n >;\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap\n * @default nowrap\n */\n flexWrap?: React.CSSProperties['flexWrap'];\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content\n * @default undefined\n */\n justifyContent?: React.CSSProperties['justifyContent'];\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/align-items\n * @default undefined\n */\n alignItems?: React.CSSProperties['alignItems'];\n children?: React.ReactNode;\n style?: React.CSSProperties;\n};\n\n/**\n * Flex is a general-purpose container that helps\n * lay out components with consistent spacing in a row or column.\n */\nexport const Flex = <T extends AllowedFlexElements = 'div'>({\n as,\n gap = '8',\n rowGap,\n columnGap,\n children,\n borderRadius,\n flexDirection = 'column',\n flexWrap = 'nowrap',\n alignItems,\n justifyContent,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, BaseFlexProps>) => {\n const Component = (as || 'div') as unknown as ReactComponent;\n\n // If gap is not provided,\n // and rowGap and columnGap are not provided,\n // then use the default value.\n const gapPx = getSpacing(gap, 'gap');\n const rowGapPx = rowGap ? tokens.space[rowGap] : undefined;\n const columnGapPx = columnGap ? tokens.space[columnGap] : undefined;\n const gapFormatted = `${rowGapPx ?? gapPx} ${columnGapPx ?? gapPx}`;\n\n const additionalStyle: React.CSSProperties = {\n flexDirection,\n alignItems,\n flexWrap,\n justifyContent,\n display: 'flex',\n gap: gapFormatted,\n borderRadius: getRadius(borderRadius, 'borderRadius'),\n };\n\n return (\n <Component\n ref={ref}\n className={className}\n style={{ ...additionalStyle, ...style }}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Component>\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M;QACf,aAAa;QACb,QAAQ;QACR,GAAG,EAAE,YAAY;QACjB,cAAc;KACf,CAAC;IAEF,OAAO,CACL,KAAC,SAAS,kBACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,KAAK,kCAAO,eAAe,GAAK,KAAK,KACjC,SAAS,EACT,cAAc,cAEjB,QAAQ,IACC,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 */\n\nimport { tokens } from '@neo4j-ndl/base';\nimport type React from 'react';\n\nimport {\n type PolymorphicCommonProps,\n type Radius,\n type ReactComponent,\n type Spacing,\n} from '../_common/types';\nimport { getRadius, getSpacing } from '../_common/utils';\n\ntype AllowedFlexElements = 'div' | 'span' | 'ul' | 'ol' | 'li';\n\ntype BaseFlexProps = {\n /**\n * @default tokens.space['4']\n */\n gap?: Spacing;\n /**\n * @default undefined\n */\n rowGap?: Spacing;\n /**\n * @default undefined\n */\n columnGap?: Spacing;\n /**\n * @default undefined\n */\n borderRadius?: Radius;\n /**\n * Flex direction is set to column by default.\n * The `row-reverse` and `column-reverse` values\n * are skipped due to accessibility concerns.\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction#accessibility_concerns\n *\n * @default row\n */\n flexDirection?: Exclude<\n React.CSSProperties['flexDirection'],\n 'row-reverse' | 'column-reverse'\n >;\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap\n * @default nowrap\n */\n flexWrap?: React.CSSProperties['flexWrap'];\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content\n * @default undefined\n */\n justifyContent?: React.CSSProperties['justifyContent'];\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/align-items\n * @default undefined\n */\n alignItems?: React.CSSProperties['alignItems'];\n children?: React.ReactNode;\n style?: React.CSSProperties;\n};\n\n/**\n * Flex is a general-purpose container that helps\n * lay out components with consistent spacing in a row or column.\n */\nexport const Flex = <T extends AllowedFlexElements = 'div'>({\n as,\n gap = '8',\n rowGap,\n columnGap,\n children,\n borderRadius,\n flexDirection = 'column',\n flexWrap = 'nowrap',\n alignItems,\n justifyContent,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, BaseFlexProps>) => {\n const Component = (as || 'div') as unknown as ReactComponent;\n\n // If gap is not provided,\n // and rowGap and columnGap are not provided,\n // then use the default value.\n const gapPx = getSpacing(gap, 'gap');\n const rowGapPx = rowGap ? tokens.space[rowGap] : undefined;\n const columnGapPx = columnGap ? tokens.space[columnGap] : undefined;\n const gapFormatted = `${rowGapPx ?? gapPx} ${columnGapPx ?? gapPx}`;\n\n const additionalStyle: React.CSSProperties = {\n alignItems,\n borderRadius: getRadius(borderRadius, 'borderRadius'),\n display: 'flex',\n flexDirection,\n flexWrap,\n gap: gapFormatted,\n justifyContent,\n };\n\n return (\n <Component\n ref={ref}\n className={className}\n style={{ ...additionalStyle, ...style }}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Component>\n );\n};\n"]}
@@ -23,107 +23,107 @@ import { jsx as _jsx } from "react/jsx-runtime";
23
23
  import { GraphLabel } from '../../index';
24
24
  import { GraphLabelColor, GraphLabelColorSource, GraphLabelDisabled, GraphLabelDisabledSource, GraphLabelFluid, GraphLabelFluidSource, GraphLabelNonInteractive, GraphLabelNonInteractiveSource, GraphLabelSelected, GraphLabelSelectedSource, GraphLabelSizes, GraphLabelSizesSource, GraphLabelTypes, GraphLabelTypesSource, } from '.';
25
25
  const componentMeta = {
26
- title: 'Components/GraphLabel',
27
- id: 'components-graph-label',
28
26
  component: GraphLabel,
29
- tags: ['docsPage'],
30
- parameters: {
31
- controls: { disable: true },
32
- },
33
27
  decorators: [
34
28
  (Story) => (_jsx("div", { className: "n-flex n-justify-center", children: _jsx(Story, {}) })),
35
29
  ],
30
+ id: 'components-graph-label',
31
+ parameters: {
32
+ controls: { disable: true },
33
+ },
34
+ tags: ['docsPage'],
35
+ title: 'Components/GraphLabel',
36
36
  };
37
37
  export default componentMeta;
38
38
  export const Types = {
39
39
  args: {},
40
- render: GraphLabelTypes,
41
40
  parameters: {
42
41
  docs: {
43
42
  source: {
43
+ code: GraphLabelTypesSource,
44
44
  language: 'tsx',
45
45
  type: 'code',
46
- code: GraphLabelTypesSource,
47
46
  },
48
47
  },
49
48
  },
49
+ render: GraphLabelTypes,
50
50
  };
51
51
  export const Color = {
52
52
  args: {},
53
- render: GraphLabelColor,
54
53
  parameters: {
55
54
  docs: {
56
55
  source: {
56
+ code: GraphLabelColorSource,
57
57
  language: 'tsx',
58
58
  type: 'code',
59
- code: GraphLabelColorSource,
60
59
  },
61
60
  },
62
61
  },
62
+ render: GraphLabelColor,
63
63
  };
64
64
  export const Sizes = {
65
65
  args: {},
66
- render: GraphLabelSizes,
67
66
  parameters: {
68
67
  docs: {
69
68
  source: {
69
+ code: GraphLabelSizesSource,
70
70
  language: 'tsx',
71
71
  type: 'code',
72
- code: GraphLabelSizesSource,
73
72
  },
74
73
  },
75
74
  },
75
+ render: GraphLabelSizes,
76
76
  };
77
77
  export const Fluid = {
78
78
  args: {},
79
- render: GraphLabelFluid,
80
79
  parameters: {
81
80
  docs: {
82
81
  source: {
82
+ code: GraphLabelFluidSource,
83
83
  language: 'tsx',
84
84
  type: 'code',
85
- code: GraphLabelFluidSource,
86
85
  },
87
86
  },
88
87
  },
88
+ render: GraphLabelFluid,
89
89
  };
90
90
  export const NonInteractive = {
91
91
  args: {},
92
- render: GraphLabelNonInteractive,
93
92
  parameters: {
94
93
  docs: {
95
94
  source: {
95
+ code: GraphLabelNonInteractiveSource,
96
96
  language: 'tsx',
97
97
  type: 'code',
98
- code: GraphLabelNonInteractiveSource,
99
98
  },
100
99
  },
101
100
  },
101
+ render: GraphLabelNonInteractive,
102
102
  };
103
103
  export const Disabled = {
104
104
  args: {},
105
- render: GraphLabelDisabled,
106
105
  parameters: {
107
106
  docs: {
108
107
  source: {
108
+ code: GraphLabelDisabledSource,
109
109
  language: 'tsx',
110
110
  type: 'code',
111
- code: GraphLabelDisabledSource,
112
111
  },
113
112
  },
114
113
  },
114
+ render: GraphLabelDisabled,
115
115
  };
116
116
  export const Selected = {
117
117
  args: {},
118
- render: GraphLabelSelected,
119
118
  parameters: {
120
119
  docs: {
121
120
  source: {
121
+ code: GraphLabelSelectedSource,
122
122
  language: 'tsx',
123
123
  type: 'code',
124
- code: GraphLabelSelectedSource,
125
124
  },
126
125
  },
127
126
  },
127
+ render: GraphLabelSelected,
128
128
  };
129
129
  //# sourceMappingURL=graph-label.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph-label.stories.js","sourceRoot":"","sources":["../../../../src/graph-label/stories/graph-label.stories.tsx"],"names":[],"mappings":";AAuBA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,qBAAqB,EACrB,wBAAwB,EACxB,8BAA8B,EAC9B,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,qBAAqB,GACtB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAA4B;IAC7C,KAAK,EAAE,uBAAuB;IAC9B,EAAE,EAAE,wBAAwB;IAC5B,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QA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IACR,MAAM,EAAE,wBAAwB;IAChC,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,8BAA8B;aACrC;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,kBAAkB;IAC1B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,wBAAwB;aAC/B;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,kBAAkB;IAC1B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,wBAAwB;aAC/B;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 */\n\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { GraphLabel } from '../../index';\nimport {\n GraphLabelColor,\n GraphLabelColorSource,\n GraphLabelDisabled,\n GraphLabelDisabledSource,\n GraphLabelFluid,\n GraphLabelFluidSource,\n GraphLabelNonInteractive,\n GraphLabelNonInteractiveSource,\n GraphLabelSelected,\n GraphLabelSelectedSource,\n GraphLabelSizes,\n GraphLabelSizesSource,\n GraphLabelTypes,\n GraphLabelTypesSource,\n} from '.';\n\nconst componentMeta: Meta<typeof GraphLabel> = {\n title: 'Components/GraphLabel',\n id: 'components-graph-label',\n component: GraphLabel,\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 Types: Story = {\n args: {},\n render: GraphLabelTypes,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: GraphLabelTypesSource,\n },\n },\n },\n};\n\nexport const Color: Story = {\n args: {},\n render: GraphLabelColor,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: GraphLabelColorSource,\n },\n },\n },\n};\n\nexport const Sizes: Story = {\n args: {},\n render: GraphLabelSizes,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: GraphLabelSizesSource,\n },\n },\n },\n};\nexport const Fluid: Story = {\n args: {},\n render: GraphLabelFluid,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: GraphLabelFluidSource,\n },\n },\n },\n};\n\nexport const NonInteractive: Story = {\n args: {},\n render: GraphLabelNonInteractive,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: GraphLabelNonInteractiveSource,\n },\n },\n },\n};\n\nexport const Disabled: Story = {\n args: {},\n render: GraphLabelDisabled,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: GraphLabelDisabledSource,\n },\n },\n },\n};\n\nexport const Selected: Story = {\n args: {},\n render: GraphLabelSelected,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: GraphLabelSelectedSource,\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"graph-label.stories.js","sourceRoot":"","sources":["../../../../src/graph-label/stories/graph-label.stories.tsx"],"names":[],"mappings":";AAuBA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,qBAAqB,EACrB,wBAAwB,EACxB,8BAA8B,EAC9B,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,qBAAqB,GACtB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAA4B;IAC7C,SAAS,EAAE,UAAU;IACrB,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,KAAK,KAAG,GACL,CACP;KACF;IACD,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;CAC/B,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,qBAAqB;gBAC3B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,eAAe;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,qBAAqB;gBAC3B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,eAAe;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAA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B [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\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { GraphLabel } from '../../index';\nimport {\n GraphLabelColor,\n GraphLabelColorSource,\n GraphLabelDisabled,\n GraphLabelDisabledSource,\n GraphLabelFluid,\n GraphLabelFluidSource,\n GraphLabelNonInteractive,\n GraphLabelNonInteractiveSource,\n GraphLabelSelected,\n GraphLabelSelectedSource,\n GraphLabelSizes,\n GraphLabelSizesSource,\n GraphLabelTypes,\n GraphLabelTypesSource,\n} from '.';\n\nconst componentMeta: Meta<typeof GraphLabel> = {\n component: GraphLabel,\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n id: 'components-graph-label',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/GraphLabel',\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Types: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphLabelTypesSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphLabelTypes,\n};\n\nexport const Color: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphLabelColorSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphLabelColor,\n};\n\nexport const Sizes: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphLabelSizesSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphLabelSizes,\n};\nexport const Fluid: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphLabelFluidSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphLabelFluid,\n};\n\nexport const NonInteractive: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphLabelNonInteractiveSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphLabelNonInteractive,\n};\n\nexport const Disabled: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphLabelDisabledSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphLabelDisabled,\n};\n\nexport const Selected: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphLabelSelectedSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphLabelSelected,\n};\n"]}
@@ -52,7 +52,7 @@ export function usePrevious(value) {
52
52
  */
53
53
  export function useEffectDebugger(effectHook, dependencies, dependencyNames = []) {
54
54
  const previousDeps = usePrevious(dependencies);
55
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
55
+ // oxlint-disable-next-line @typescript-eslint/no-explicit-any
56
56
  const changedDeps = dependencies.reduce((accum, dependency, index) => {
57
57
  if (previousDeps === undefined) {
58
58
  return accum;
@@ -63,8 +63,8 @@ export function useEffectDebugger(effectHook, dependencies, dependencyNames = []
63
63
  if (dependency !== previousDeps[index]) {
64
64
  const keyName = dependencyNames[index] || index;
65
65
  return Object.assign(Object.assign({}, accum), { [keyName]: {
66
- before: previousDeps[index],
67
66
  after: dependency,
67
+ before: previousDeps[index],
68
68
  } });
69
69
  }
70
70
  return accum;
@@ -108,8 +108,8 @@ export const useRenderDebugger = (componentName, propsAndStates) => {
108
108
  Object.entries(propsAndStates).forEach(([key, newValue]) => {
109
109
  if (prev.current[key] !== newValue) {
110
110
  changedPropsOrState[key] = {
111
- old: prev.current[key],
112
111
  new: newValue,
112
+ old: prev.current[key],
113
113
  };
114
114
  }
115
115
  }, {});
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sour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AC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChD,OAAO,CAAC,KAAK,CACX,IAAI,aAAa,uBAAuB,EACxC,mBAAmB,CACpB,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,OAAO,GAAG,cAAc,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,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 { useEffect, useRef } from 'react';\n\nexport {\n useDebounceValue,\n useDebounceCallback,\n useWindowSize,\n useOnClickOutside,\n useInterval,\n useMediaQuery,\n useCopyToClipboard,\n useScrollLock,\n useEventListener,\n useResizeObserver,\n} from 'usehooks-ts';\n\n/**\n * Below are hooks that cannot be found in `usehooks-ts`\n * but are used in some projects.\n * 1. usePrevious\n * 2. useEffectDebugger\n * 3. useRenderCount\n */\n\n/**\n * The `usePrevious` hook tracks a variable's previous value in a functional component,\n * useful for comparing current and past values to trigger actions or render changes.\n */\nexport function usePrevious<T>(value: T): T | null {\n // The ref object is a generic container whose current property is mutable\n // and can hold any value, similar to an instance property on a class\n\n const ref = useRef<T>(null);\n // Store current value in ref\n useEffect(() => {\n ref.current = value;\n }, [value]); // Only re-run if value changes\n // Return previous value (happens before update in useEffect above)\n return ref.current;\n}\n\n/**\n * The `useEffectDebugger` hook is a wrapper around the `useEffect` hook\n * that logs the dependencies of the effect when they change.\n *\n * Uses the `usePrevious` hook.\n *\n * Source: https://stackoverflow.com/a/59843241/3247715\n */\nexport function useEffectDebugger(\n effectHook: React.EffectCallback,\n dependencies: unknown[],\n dependencyNames: string[] = [],\n) {\n const previousDeps = usePrevious(dependencies);\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const changedDeps: any = dependencies.reduce((accum, dependency, index) => {\n if (previousDeps === undefined) {\n return accum;\n }\n if (previousDeps === null) {\n return accum;\n }\n if (dependency !== previousDeps[index]) {\n const keyName = dependencyNames[index] || index;\n return {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ...(accum as any),\n [keyName]: {\n before: previousDeps[index],\n after: dependency,\n },\n };\n }\n\n return accum;\n }, {});\n\n if (Object.keys(changedDeps).length) {\n console.info('[use-effect-debugger] ', changedDeps);\n }\n\n useEffect(() => {\n return effectHook();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, dependencies);\n}\n\n/**\n * The `useRenderCount` hook returns the number of times a component has rendered.\n */\nexport function useRenderCount() {\n const count = useRef(0);\n\n count.current++;\n\n return count.current;\n}\n\n/**\n * The `useRenderDebugger` outputs to console what props or states are causing a render (or re-render) of a component\n * if all relevant props and states variables are passed to the hook.\n * For debugging purposes only.\n *\n * Howto use:\n * Place the hook at the top of the component you want to debug and call it like this:\n * useRenderDebugger('MyComponent', props);\n *\n * if there are state variables include them as well:\n *\n * useRenderDebugger('MyComponent', { ...props, stateVar1, stateVar2 });\n *\n * @param componentName Name of the component to debug\n * @param propsAndStates an object containing all props and states variables of the component\n */\nexport const useRenderDebugger = (\n componentName: string,\n propsAndStates: Record<string, unknown>,\n) => {\n const prev = useRef(propsAndStates);\n\n useEffect(() => {\n const changedPropsOrState: Record<string, { old: unknown; new: unknown }> =\n {};\n\n Object.entries(propsAndStates).forEach(\n ([key, newValue]: [string, unknown]) => {\n if (prev.current[key] !== newValue) {\n changedPropsOrState[key] = {\n old: prev.current[key],\n new: newValue,\n };\n }\n },\n {},\n );\n\n if (Object.keys(changedPropsOrState).length > 0) {\n console.debug(\n `[${componentName}] Re-rendered due to:`,\n changedPropsOrState,\n );\n }\n\n prev.current = propsAndStates;\n });\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAErB;;;;;;GAMG;AAEH;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAI,KAAQ;IACrC,0EAA0E;IAC1E,qEAAqE;IAErE,MAAM,GAAG,GAAG,MAAM,CAAI,IAAI,CAAC,CAAC;IAC5B,6BAA6B;IAC7B,SAAS,CAAC,GAAG,EAAE;QACb,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC;IACtB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,+BAA+B;IAC5C,mEAAmE;IACnE,OAAO,GAAG,CAAC,OAAO,CAAC;AACrB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAC/B,UAAgC,EAChC,YAAuB,EACvB,kBAA4B,EAAE;IAE9B,MAAM,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IAE/C,8DAA8D;IAC9D,MAAM,WAAW,GAAQ,YAAY,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE;QACxE,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;YAC/B,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;YAC1B,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,UAAU,KAAK,YAAY,C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IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;iBACvB,CAAC;YACJ,CAAC;QACH,CAAC,EACD,EAAE,CACH,CAAC;QAEF,IAAI,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChD,OAAO,CAAC,KAAK,CACX,IAAI,aAAa,uBAAuB,EACxC,mBAAmB,CACpB,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,OAAO,GAAG,cAAc,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,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 { useEffect, useRef } from 'react';\n\nexport {\n useDebounceValue,\n useDebounceCallback,\n useWindowSize,\n useOnClickOutside,\n useInterval,\n useMediaQuery,\n useCopyToClipboard,\n useScrollLock,\n useEventListener,\n useResizeObserver,\n} from 'usehooks-ts';\n\n/**\n * Below are hooks that cannot be found in `usehooks-ts`\n * but are used in some projects.\n * 1. usePrevious\n * 2. useEffectDebugger\n * 3. useRenderCount\n */\n\n/**\n * The `usePrevious` hook tracks a variable's previous value in a functional component,\n * useful for comparing current and past values to trigger actions or render changes.\n */\nexport function usePrevious<T>(value: T): T | null {\n // The ref object is a generic container whose current property is mutable\n // and can hold any value, similar to an instance property on a class\n\n const ref = useRef<T>(null);\n // Store current value in ref\n useEffect(() => {\n ref.current = value;\n }, [value]); // Only re-run if value changes\n // Return previous value (happens before update in useEffect above)\n return ref.current;\n}\n\n/**\n * The `useEffectDebugger` hook is a wrapper around the `useEffect` hook\n * that logs the dependencies of the effect when they change.\n *\n * Uses the `usePrevious` hook.\n *\n * Source: https://stackoverflow.com/a/59843241/3247715\n */\nexport function useEffectDebugger(\n effectHook: React.EffectCallback,\n dependencies: unknown[],\n dependencyNames: string[] = [],\n) {\n const previousDeps = usePrevious(dependencies);\n\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n const changedDeps: any = dependencies.reduce((accum, dependency, index) => {\n if (previousDeps === undefined) {\n return accum;\n }\n if (previousDeps === null) {\n return accum;\n }\n if (dependency !== previousDeps[index]) {\n const keyName = dependencyNames[index] || index;\n return {\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n ...(accum as any),\n [keyName]: {\n after: dependency,\n before: previousDeps[index],\n },\n };\n }\n\n return accum;\n }, {});\n\n if (Object.keys(changedDeps).length) {\n console.info('[use-effect-debugger] ', changedDeps);\n }\n\n useEffect(() => {\n return effectHook();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, dependencies);\n}\n\n/**\n * The `useRenderCount` hook returns the number of times a component has rendered.\n */\nexport function useRenderCount() {\n const count = useRef(0);\n\n count.current++;\n\n return count.current;\n}\n\n/**\n * The `useRenderDebugger` outputs to console what props or states are causing a render (or re-render) of a component\n * if all relevant props and states variables are passed to the hook.\n * For debugging purposes only.\n *\n * Howto use:\n * Place the hook at the top of the component you want to debug and call it like this:\n * useRenderDebugger('MyComponent', props);\n *\n * if there are state variables include them as well:\n *\n * useRenderDebugger('MyComponent', { ...props, stateVar1, stateVar2 });\n *\n * @param componentName Name of the component to debug\n * @param propsAndStates an object containing all props and states variables of the component\n */\nexport const useRenderDebugger = (\n componentName: string,\n propsAndStates: Record<string, unknown>,\n) => {\n const prev = useRef(propsAndStates);\n\n useEffect(() => {\n const changedPropsOrState: Record<string, { old: unknown; new: unknown }> =\n {};\n\n Object.entries(propsAndStates).forEach(\n ([key, newValue]: [string, unknown]) => {\n if (prev.current[key] !== newValue) {\n changedPropsOrState[key] = {\n new: newValue,\n old: prev.current[key],\n };\n }\n },\n {},\n );\n\n if (Object.keys(changedPropsOrState).length > 0) {\n console.debug(\n `[${componentName}] Re-rendered due to:`,\n changedPropsOrState,\n );\n }\n\n prev.current = propsAndStates;\n });\n};\n"]}
@@ -48,85 +48,85 @@ export const Default = {
48
48
  export const Active = {
49
49
  // @ts-expect-error - args are not needed.
50
50
  args: {},
51
- render: IconButtonActive,
52
51
  parameters: {
53
52
  docs: {
54
53
  source: {
54
+ code: IconButtonActiveSrc,
55
55
  language: 'tsx',
56
56
  type: 'code',
57
- code: IconButtonActiveSrc,
58
57
  },
59
58
  },
60
59
  },
60
+ render: IconButtonActive,
61
61
  };
62
62
  export const Disabled = {
63
63
  // @ts-expect-error - args are not needed.
64
64
  args: {},
65
- render: IconButtonDisabled,
66
65
  parameters: {
67
66
  docs: {
68
67
  source: {
68
+ code: IconButtonDisabledSrc,
69
69
  language: 'tsx',
70
70
  type: 'code',
71
- code: IconButtonDisabledSrc,
72
71
  },
73
72
  },
74
73
  },
74
+ render: IconButtonDisabled,
75
75
  };
76
76
  export const Floating = {
77
77
  // @ts-expect-error - args are not needed.
78
78
  args: {},
79
- render: IconButtonFloating,
80
79
  parameters: {
81
80
  docs: {
82
81
  source: {
82
+ code: IconButtonFloatingSrc,
83
83
  language: 'tsx',
84
84
  type: 'code',
85
- code: IconButtonFloatingSrc,
86
85
  },
87
86
  },
88
87
  },
88
+ render: IconButtonFloating,
89
89
  };
90
90
  export const Loading = {
91
91
  // @ts-expect-error - args are not needed.
92
92
  args: {},
93
- render: IconButtonLoading,
94
93
  parameters: {
95
94
  docs: {
96
95
  source: {
96
+ code: IconButtonLoadingSrc,
97
97
  language: 'tsx',
98
98
  type: 'code',
99
- code: IconButtonLoadingSrc,
100
99
  },
101
100
  },
102
101
  },
102
+ render: IconButtonLoading,
103
103
  };
104
104
  export const Sizes = {
105
105
  // @ts-expect-error - args are not needed.
106
106
  args: {},
107
- render: IconButtonSizes,
108
107
  parameters: {
109
108
  docs: {
110
109
  source: {
110
+ code: IconButtonSizesSrc,
111
111
  language: 'tsx',
112
112
  type: 'code',
113
- code: IconButtonSizesSrc,
114
113
  },
115
114
  },
116
115
  },
116
+ render: IconButtonSizes,
117
117
  };
118
118
  export const Tone = {
119
119
  // @ts-expect-error - args are not needed.
120
120
  args: {},
121
- render: IconButtonTone,
122
121
  parameters: {
123
122
  docs: {
124
123
  source: {
124
+ code: IconButtonToneSrc,
125
125
  language: 'tsx',
126
126
  type: 'code',
127
- code: IconButtonToneSrc,
128
127
  },
129
128
  },
130
129
  },
130
+ render: IconButtonTone,
131
131
  };
132
132
  //# sourceMappingURL=icon-button.stories.js.map
@@ -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,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,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI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AE,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
+ {"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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,0CAA0C;IAC1C,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,qBAAqB;gBAC3B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,kBAAkB;CAC3B,CAAC;AAEF,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,KAAK,GAAU;IAC1B,0CAA0C;IAC1C,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,kBAAkB;gBACxB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,eAAe;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,0CAA0C;IAC1C,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,iBAAiB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,cAAc;CACvB,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 parameters: {\n docs: {\n source: {\n code: IconButtonActiveSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: IconButtonActive,\n};\n\nexport const Disabled: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n parameters: {\n docs: {\n source: {\n code: IconButtonDisabledSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: IconButtonDisabled,\n};\n\nexport const Floating: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n parameters: {\n docs: {\n source: {\n code: IconButtonFloatingSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: IconButtonFloating,\n};\n\nexport const Loading: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n parameters: {\n docs: {\n source: {\n code: IconButtonLoadingSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: IconButtonLoading,\n};\n\nexport const Sizes: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n parameters: {\n docs: {\n source: {\n code: IconButtonSizesSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: IconButtonSizes,\n};\n\nexport const Tone: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n parameters: {\n docs: {\n source: {\n code: IconButtonToneSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: IconButtonTone,\n};\n"]}
@@ -23,81 +23,81 @@ import { jsx as _jsx } from "react/jsx-runtime";
23
23
  import { IconButtonArray } from '../../index';
24
24
  import { IconButtonArrayCollapsible, IconButtonArrayCollapsibleSrc, IconButtonArrayFloating, IconButtonArrayFloatingSrc, IconButtonArrayHorizontal, IconButtonArrayHorizontalSrc, IconButtonArraySizes, IconButtonArraySizesSrc, IconButtonArrayVertical, IconButtonArrayVerticalSrc, } from '.';
25
25
  const componentMeta = {
26
- title: 'Components/IconButtonArray',
27
- id: 'components-buttons-icon-array',
28
26
  component: IconButtonArray,
29
- tags: ['docsPage'],
30
- parameters: {
31
- controls: { disable: true },
32
- },
33
27
  decorators: [
34
28
  (Story) => (_jsx("div", { className: "n-flex n-justify-center", children: _jsx(Story, {}) })),
35
29
  ],
30
+ id: 'components-buttons-icon-array',
31
+ parameters: {
32
+ controls: { disable: true },
33
+ },
34
+ tags: ['docsPage'],
35
+ title: 'Components/IconButtonArray',
36
36
  };
37
37
  export default componentMeta;
38
38
  export const Horizontal = {
39
39
  args: {},
40
- render: IconButtonArrayHorizontal,
41
40
  parameters: {
42
41
  docs: {
43
42
  source: {
43
+ code: IconButtonArrayHorizontalSrc,
44
44
  language: 'tsx',
45
45
  type: 'code',
46
- code: IconButtonArrayHorizontalSrc,
47
46
  },
48
47
  },
49
48
  },
49
+ render: IconButtonArrayHorizontal,
50
50
  };
51
51
  export const Vertical = {
52
52
  args: {},
53
- render: IconButtonArrayVertical,
54
53
  parameters: {
55
54
  docs: {
56
55
  source: {
56
+ code: IconButtonArrayVerticalSrc,
57
57
  language: 'tsx',
58
58
  type: 'code',
59
- code: IconButtonArrayVerticalSrc,
60
59
  },
61
60
  },
62
61
  },
62
+ render: IconButtonArrayVertical,
63
63
  };
64
64
  export const Floating = {
65
65
  args: {},
66
- render: IconButtonArrayFloating,
67
66
  parameters: {
68
67
  docs: {
69
68
  source: {
69
+ code: IconButtonArrayFloatingSrc,
70
70
  language: 'tsx',
71
71
  type: 'code',
72
- code: IconButtonArrayFloatingSrc,
73
72
  },
74
73
  },
75
74
  },
75
+ render: IconButtonArrayFloating,
76
76
  };
77
77
  export const Collapsiable = {
78
78
  args: {},
79
- render: IconButtonArrayCollapsible,
80
79
  parameters: {
81
80
  docs: {
82
81
  source: {
82
+ code: IconButtonArrayCollapsibleSrc,
83
83
  language: 'tsx',
84
84
  type: 'code',
85
- code: IconButtonArrayCollapsibleSrc,
86
85
  },
87
86
  },
88
87
  },
88
+ render: IconButtonArrayCollapsible,
89
89
  };
90
90
  export const Sizes = {
91
91
  args: {},
92
- render: IconButtonArraySizes,
93
92
  parameters: {
94
93
  docs: {
95
94
  source: {
95
+ code: IconButtonArraySizesSrc,
96
96
  language: 'tsx',
97
97
  type: 'code',
98
- code: IconButtonArraySizesSrc,
99
98
  },
100
99
  },
101
100
  },
101
+ render: IconButtonArraySizes,
102
102
  };
103
103
  //# sourceMappingURL=icon-button-array.stories.js.map
@@ -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,MA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I,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"]}
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,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,KAAK,KAAG,GACL,CACP;KACF;IACD,EAAE,EAAE,+BAA+B;IACnC,UAAU,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AM,EAAE;gBACN,IAAI,EAAE,uBAAuB;gBAC7B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,oBAAoB;CAC7B,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 component: IconButtonArray,\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n id: 'components-buttons-icon-array',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/IconButtonArray',\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Horizontal: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: IconButtonArrayHorizontalSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: IconButtonArrayHorizontal,\n};\n\nexport const Vertical: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: IconButtonArrayVerticalSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: IconButtonArrayVertical,\n};\n\nexport const Floating: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: IconButtonArrayFloatingSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: IconButtonArrayFloating,\n};\n\nexport const Collapsiable: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: IconButtonArrayCollapsibleSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: IconButtonArrayCollapsible,\n};\n\nexport const Sizes: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: IconButtonArraySizesSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: IconButtonArraySizes,\n};\n"]}
@@ -35,13 +35,15 @@ import { needleWarningMessage } from '../_common/utils';
35
35
  import { LoadingSpinner } from '../loading-spinner';
36
36
  import { Tooltip } from '../tooltip';
37
37
  export const IconButtonBase = (_a) => {
38
- var { children, as, iconButtonVariant = 'default', isLoading = false, isDisabled = false, size = 'medium', isFloating = false, isActive = false, description, tooltipProps, className, style, variant = 'neutral', htmlAttributes, onClick, ref } = _a, restProps = __rest(_a, ["children", "as", "iconButtonVariant", "isLoading", "isDisabled", "size", "isFloating", "isActive", "description", "tooltipProps", "className", "style", "variant", "htmlAttributes", "onClick", "ref"]);
38
+ var { children, as, iconButtonVariant = 'default', isLoading = false, isDisabled = false, size = 'medium', isFloating = false,
39
+ // Does not have a default value to avoid setting aria-pressed to true if not explicitly set
40
+ isActive = undefined, description, tooltipProps, className, style, variant = 'neutral', htmlAttributes, onClick, ref } = _a, restProps = __rest(_a, ["children", "as", "iconButtonVariant", "isLoading", "isDisabled", "size", "isFloating", "isActive", "description", "tooltipProps", "className", "style", "variant", "htmlAttributes", "onClick", "ref"]);
39
41
  const Component = as !== null && as !== void 0 ? as : 'button';
40
42
  const isInteractable = !isDisabled && !isLoading;
41
43
  const isClean = iconButtonVariant === 'clean';
42
44
  const isDanger = variant === 'danger';
43
45
  const classes = classNames('ndl-icon-btn', className, {
44
- 'ndl-active': isActive,
46
+ 'ndl-active': Boolean(isActive),
45
47
  'ndl-clean': isClean,
46
48
  'ndl-danger': isDanger,
47
49
  'ndl-disabled': isDisabled,
@@ -74,6 +76,6 @@ export const IconButtonBase = (_a) => {
74
76
  return (_jsxs(Tooltip, Object.assign({ hoverDelay: {
75
77
  close: 0,
76
78
  open: 500,
77
- } }, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.root, { type: "simple", isDisabled: description === null || isDisabled, children: [_jsx(Tooltip.Trigger, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.trigger, { hasButtonWrapper: true, children: _jsx(Component, Object.assign({ onClick: handleClick, disabled: isDisabled, "aria-disabled": !isInteractable, "aria-label": description, "aria-pressed": isActive, className: classes, style: style, ref: ref }, restProps, htmlAttributes, { children: _jsx("div", { className: "ndl-icon-btn-inner", children: isLoading ? (_jsx(LoadingSpinner, { size: "small" })) : (_jsx("div", { className: "ndl-icon", children: children })) }) })) })), _jsx(Tooltip.Content, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.content, { children: description }))] })));
79
+ } }, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.root, { type: "simple", isDisabled: description === null || isDisabled, children: [_jsx(Tooltip.Trigger, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.trigger, { hasButtonWrapper: true, children: _jsx(Component, Object.assign({ type: "button", onClick: handleClick, disabled: isDisabled, "aria-disabled": !isInteractable, "aria-label": description, "aria-pressed": isActive, className: classes, style: style, ref: ref }, restProps, htmlAttributes, { children: _jsx("div", { className: "ndl-icon-btn-inner", children: isLoading ? (_jsx(LoadingSpinner, { size: "small" })) : (_jsx("div", { className: "ndl-icon", children: children })) }) })) })), _jsx(Tooltip.Content, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.content, { children: description }))] })));
78
80
  };
79
81
  //# sourceMappingURL=IconButtonBase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButtonBase.js","sourceRoot":"","sources":["../../../src/icon-button-base/IconButtonBase.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAOpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AA8CrC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAyC,EAkBtB,EAAE,EAAE;QAlBkB,EACrE,QAAQ,EACR,EAAE,EACF,iBAAiB,GAAG,SAAS,EAC7B,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,KAAK,EAClB,QAAQ,GAAG,KAAK,EAChB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,cAAc,EACd,OAAO,EACP,GAAG,OAE4C,EAD5C,SAAS,cAjByD,wMAkBtE,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,QAAQ,CAAC;IAEpD,MAAM,cAAc,GAAG,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC;IAEjD,MAAM,OAAO,GAAG,iBAAiB,KAAK,OAAO,CAAC;IAC9C,MAAM,QAAQ,GAAG,OAAO,KAAK,QAAQ,CAAC;IAEtC,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE;QACpD,YAAY,EAAE,QAAQ;QACtB,WAAW,EAAE,OAAO;QACpB,YAAY,EAAE,QAAQ;QACtB,cAAc,EAAE,UAAU;QAC1B,cAAc,EAAE,UAAU;QAC1B,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,aAAa,E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AElB,cAAK,SAAS,EAAC,oBAAoB,YAChC,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,cAAc,IAAC,IAAI,EAAC,OAAO,GAAG,CAChC,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,UAAU,YAAE,QAAQ,GAAO,CAC3C,GACG,IACI,IACI,EAClB,KAAC,OAAO,CAAC,OAAO,oBAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,cACvC,WAAW,IACI,KACV,CACX,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 {\n type PolymorphicCommonProps,\n type TooltipObjectProps,\n} from '../_common/types';\nimport { needleWarningMessage } from '../_common/utils';\nimport { type ButtonSizes } from '../button';\nimport { LoadingSpinner } from '../loading-spinner';\nimport { Tooltip } from '../tooltip';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\nexport type IconButtonBaseProps = {\n children?: React.ReactNode;\n\n /** If the icon button is in disabled state */\n isDisabled?: boolean;\n\n /** If the button is doing something Async, it will display a loading spinner */\n isLoading?: boolean;\n\n /** Size of button */\n size?: ButtonSizes;\n\n /** If the button is in floating state */\n isFloating?: boolean;\n\n /** Active - used for open context menus for example */\n isActive?: boolean;\n\n /** A string that will be shown as a tooltip when hovering over the button it also acts as an aria-label- {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label} */\n description: string | null;\n\n /** Variant of the button */\n variant?: 'neutral' | 'danger';\n\n /** Variant of the button */\n iconButtonVariant?: 'default' | 'clean';\n\n /**\n * Props for the tooltip component.\n */\n tooltipProps?: TooltipObjectProps;\n\n /** Click handler */\n onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n};\n\nexport const IconButtonBase = <T extends React.ElementType = 'button'>({\n children,\n as,\n iconButtonVariant = 'default',\n isLoading = false,\n isDisabled = false,\n size = 'medium',\n isFloating = false,\n isActive = false,\n description,\n tooltipProps,\n className,\n style,\n variant = 'neutral',\n htmlAttributes,\n onClick,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, IconButtonBaseProps>) => {\n const Component: React.ElementType = as ?? 'button';\n\n const isInteractable = !isDisabled && !isLoading;\n\n const isClean = iconButtonVariant === 'clean';\n const isDanger = variant === 'danger';\n\n const classes = classNames('ndl-icon-btn', className, {\n 'ndl-active': isActive,\n 'ndl-clean': isClean,\n 'ndl-danger': isDanger,\n 'ndl-disabled': isDisabled,\n 'ndl-floating': isFloating,\n 'ndl-large': size === 'large',\n 'ndl-loading': isLoading,\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n if (isClean && isFloating) {\n throw new Error(\n 'BaseIconButton: Cannot use isFloating and iconButtonVariant=\"clean\" at the same time.',\n );\n }\n\n if (!description && !htmlAttributes?.['aria-label']) {\n needleWarningMessage(\n 'Icon buttons do not have text, be sure to include a description or an aria-label for screen readers link: https://dequeuniversity.com/rules/axe/4.4/button-name?application=axeAPI',\n );\n }\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n if (!isInteractable) {\n // By default, a <button /> element with disabled set to true will not get its\n // on click handler called. To support the same behavior on <a /> tags we\n // swallow the event here when disabled, since the <a /> tag with disabled set to\n // true will have its onClick handler called\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n if (onClick) {\n onClick(e);\n }\n };\n\n return (\n <Tooltip\n hoverDelay={{\n close: 0,\n open: 500,\n }}\n {...tooltipProps?.root}\n type=\"simple\"\n isDisabled={description === null || isDisabled}\n >\n <Tooltip.Trigger {...tooltipProps?.trigger} hasButtonWrapper>\n <Component\n onClick={handleClick}\n disabled={isDisabled}\n aria-disabled={!isInteractable}\n aria-label={description}\n aria-pressed={isActive}\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-icon-btn-inner\">\n {isLoading ? (\n <LoadingSpinner size=\"small\" />\n ) : (\n <div className=\"ndl-icon\">{children}</div>\n )}\n </div>\n </Component>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n {description}\n </Tooltip.Content>\n </Tooltip>\n );\n};\n"]}
1
+ {"version":3,"file":"IconButtonBase.js","sourceRoot":"","sources":["../../../src/icon-button-base/IconButtonBase.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAOpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AA8CrC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAyC,EAmBtB,EAAE,EAAE;QAnBkB,EACrE,QAAQ,EACR,EAAE,EACF,iBAAiB,GAAG,SAAS,EAC7B,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,KAAK;IAClB,4FAA4F;IAC5F,QAAQ,GAAG,SAAS,EACpB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,cAAc,EACd,OAAO,EACP,GAAG,OAE4C,EAD5C,SAAS,cAlByD,wMAmBtE,CADa;IAEZ,MAAM,SAAS,GAAsB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EAAE,CAAC;YACR,IAAI,EAAE,GAAG;SACV,IACG,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,IACtB,IAAI,EAAC,QAAQ,EACb,UAAU,EAAE,WAAW,KAAK,IAAI,IAAI,UAAU,aAE9C,KAAC,OAAO,CAAC,OAAO,oBAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,IAAE,gBAAgB,kBAC1D,KAAC,SAAS,kBACR,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,UAAU,mBACL,CAAC,cAAc,gBAClB,WAAW,kBACT,QAAQ,EACtB,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,cAAK,SAAS,EAAC,oBAAoB,YAChC,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,cAAc,IAAC,IAAI,EAAC,OAAO,GAAG,CAChC,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,UAAU,YAAE,QAAQ,GAAO,CAC3C,GACG,IACI,IACI,EAClB,KAAC,OAAO,CAAC,OAAO,oBAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,cACvC,WAAW,IACI,KACV,CACX,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 {\n type PolymorphicCommonProps,\n type TooltipObjectProps,\n} from '../_common/types';\nimport { needleWarningMessage } from '../_common/utils';\nimport { type ButtonSizes } from '../button';\nimport { LoadingSpinner } from '../loading-spinner';\nimport { Tooltip } from '../tooltip';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\nexport type IconButtonBaseProps = {\n children?: React.ReactNode;\n\n /** If the icon button is in disabled state */\n isDisabled?: boolean;\n\n /** If the button is doing something Async, it will display a loading spinner */\n isLoading?: boolean;\n\n /** Size of button */\n size?: ButtonSizes;\n\n /** If the button is in floating state */\n isFloating?: boolean;\n\n /** Active - used for open context menus for example */\n isActive?: boolean;\n\n /** A string that will be shown as a tooltip when hovering over the button it also acts as an aria-label- {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label} */\n description: string | null;\n\n /** Variant of the button */\n variant?: 'neutral' | 'danger';\n\n /** Variant of the button */\n iconButtonVariant?: 'default' | 'clean';\n\n /**\n * Props for the tooltip component.\n */\n tooltipProps?: TooltipObjectProps;\n\n /** Click handler */\n onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n};\n\nexport const IconButtonBase = <T extends React.ElementType = 'button'>({\n children,\n as,\n iconButtonVariant = 'default',\n isLoading = false,\n isDisabled = false,\n size = 'medium',\n isFloating = false,\n // Does not have a default value to avoid setting aria-pressed to true if not explicitly set\n isActive = undefined,\n description,\n tooltipProps,\n className,\n style,\n variant = 'neutral',\n htmlAttributes,\n onClick,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, IconButtonBaseProps>) => {\n const Component: React.ElementType = as ?? 'button';\n\n const isInteractable = !isDisabled && !isLoading;\n\n const isClean = iconButtonVariant === 'clean';\n const isDanger = variant === 'danger';\n\n const classes = classNames('ndl-icon-btn', className, {\n 'ndl-active': Boolean(isActive),\n 'ndl-clean': isClean,\n 'ndl-danger': isDanger,\n 'ndl-disabled': isDisabled,\n 'ndl-floating': isFloating,\n 'ndl-large': size === 'large',\n 'ndl-loading': isLoading,\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n if (isClean && isFloating) {\n throw new Error(\n 'BaseIconButton: Cannot use isFloating and iconButtonVariant=\"clean\" at the same time.',\n );\n }\n\n if (!description && !htmlAttributes?.['aria-label']) {\n needleWarningMessage(\n 'Icon buttons do not have text, be sure to include a description or an aria-label for screen readers link: https://dequeuniversity.com/rules/axe/4.4/button-name?application=axeAPI',\n );\n }\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n if (!isInteractable) {\n // By default, a <button /> element with disabled set to true will not get its\n // on click handler called. To support the same behavior on <a /> tags we\n // swallow the event here when disabled, since the <a /> tag with disabled set to\n // true will have its onClick handler called\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n if (onClick) {\n onClick(e);\n }\n };\n\n return (\n <Tooltip\n hoverDelay={{\n close: 0,\n open: 500,\n }}\n {...tooltipProps?.root}\n type=\"simple\"\n isDisabled={description === null || isDisabled}\n >\n <Tooltip.Trigger {...tooltipProps?.trigger} hasButtonWrapper>\n <Component\n type=\"button\"\n onClick={handleClick}\n disabled={isDisabled}\n aria-disabled={!isInteractable}\n aria-label={description}\n aria-pressed={isActive}\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-icon-btn-inner\">\n {isLoading ? (\n <LoadingSpinner size=\"small\" />\n ) : (\n <div className=\"ndl-icon\">{children}</div>\n )}\n </div>\n </Component>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n {description}\n </Tooltip.Content>\n </Tooltip>\n );\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /**
3
3
  *
4
4
  * Copyright (c) "Neo4j"
@@ -22,7 +22,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
22
  // THIS FILE IS GENERATED BY BUILD TOOL
23
23
  // DO NOT EDIT IT MANUAL
24
24
  import { wrapIcon } from '../../wrapIcon';
25
- const SvgDatabaseCrossBase = (props) => (_jsx("svg", Object.assign({ viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: _jsx("g", { id: "Icon base", children: _jsxs("g", { id: "custom/database-offline", children: [_jsx("path", { id: "Subtract", fillRule: "evenodd", clipRule: "evenodd", d: "M2.62203 4.21311C2.4641 4.55181 2.375 4.91871 2.375 5.3125V8.4375V11.5625V14.6875C2.375 16.0739 3.47937 17.1271 4.80323 17.789C6.17195 18.4734 8.01033 18.875 10 18.875C11.9897 18.875 13.828 18.4734 15.1968 17.789C15.417 17.6789 15.6312 17.5579 15.8353 17.4264L14.7425 16.3336C14.6733 16.3718 14.6011 16.4098 14.5259 16.4474C13.4064 17.0071 11.8073 17.375 10 17.375C8.19271 17.375 6.59359 17.0071 5.47405 16.4474C4.30965 15.8652 3.875 15.1996 3.875 14.6875V14.1022C4.16208 14.3128 4.47595 14.5004 4.80323 14.664C6.17195 15.3484 8.01033 15.75 10 15.75C11.3188 15.75 12.5711 15.5736 13.6642 15.2553L12.4249 14.0159C11.6843 14.1655 10.866 14.25 10 14.25C8.19271 14.25 6.59359 13.8821 5.47405 13.3224C4.30965 12.7402 3.875 12.0746 3.875 11.5625V10.9772C4.16208 11.1878 4.47595 11.3754 4.80323 11.539C6.17195 12.2234 8.01033 12.625 10 12.625C10.3381 12.625 10.6719 12.6134 10.9997 12.5908L9.5254 11.1165C7.91351 11.0584 6.49455 10.7076 5.47405 10.1974C4.30965 9.61516 3.875 8.94962 3.875 8.4375V7.85222C4.16208 8.06281 4.47595 8.25036 4.80323 8.414C5.62998 8.82737 6.62808 9.1376 7.72737 9.31846L5.48845 7.07954C5.48364 7.07715 5.47884 7.07475 5.47405 7.07236C4.43381 6.55224 3.97599 5.9656 3.89018 5.48127L2.62203 4.21311ZM11.2943 7.9356C12.5664 7.80702 13.6823 7.49417 14.5259 7.07236C15.6904 6.49016 16.125 5.82462 16.125 5.3125C16.125 4.80038 15.6904 4.13484 14.5259 3.55264C13.4064 2.99287 11.8073 2.625 10 2.625C8.68833 2.625 7.48631 2.81877 6.4977 3.13904L5.32984 1.97118C6.62718 1.43378 8.25544 1.125 10 1.125C11.9897 1.125 13.828 1.52664 15.1968 2.211C16.5206 2.87293 17.625 3.92614 17.625 5.3125V8.4375V11.5625V14.2663L15.7679 12.4092C16.018 12.1085 16.125 11.8166 16.125 11.5625V10.9772C15.8379 11.1878 15.524 11.3754 15.1968 11.539C15.1306 11.5721 15.0633 11.6045 14.9949 11.6363L13.8489 10.4903C14.0902 10.4001 14.3165 10.3021 14.5259 10.1974C15.6904 9.61516 16.125 8.94962 16.125 8.4375V7.85222C15.8379 8.06281 15.524 8.25036 15.1968 8.414C14.4569 8.78392 13.5799 9.07124 12.6158 9.25717L11.2943 7.9356Z", fill: "currentColor" }), _jsx("path", { id: "Line 2", d: "M2.10864 1.22485L17.942 17.0582", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" })] }) }) })));
25
+ const SvgDatabaseCrossBase = (props) => (_jsx("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: _jsx("path", { d: "M2 5.47826C2 6.40075 2.87038 7.28546 4.41966 7.93776C5.96893 8.59006 8.07021 8.95652 10.2612 8.95652C12.4522 8.95652 14.5535 8.59006 16.1028 7.93776C17.6521 7.28546 18.5224 6.40075 18.5224 5.47826M2 5.47826C2 4.55577 2.87038 3.67106 4.41966 3.01876C5.96893 2.36646 8.07021 2 10.2612 2C12.4522 2 14.5535 2.36646 16.1028 3.01876C17.6521 3.67106 18.5224 4.55577 18.5224 5.47826M2 5.47826V16.7826C2 18.58 5.2384 20.0592 9.39162 20.2418M18.5224 5.47826V9.3913M10.2612 12.4339C5.69929 12.4339 2 10.8774 2 8.95567M8.95682 16.3035C5.01491 16.0426 2 14.6035 2 12.8696M13.093 20.4719C12.1145 19.4934 11.5648 18.1663 11.5648 16.7826C11.5648 15.3989 12.1145 14.0718 13.093 13.0934C14.0715 12.1149 15.3986 11.5652 16.7824 11.5652C18.1662 11.5652 19.4933 12.1149 20.4718 13.0934M13.093 20.4719C14.0715 21.4503 15.3986 22 16.7824 22C18.1662 22 19.4933 21.4503 20.4718 20.4719C21.4503 19.4934 22 18.1663 22 16.7826C22 15.3989 21.4503 14.0718 20.4718 13.0934M13.093 20.4719L20.4718 13.0934", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) })));
26
26
  const SvgDatabaseCross = wrapIcon(SvgDatabaseCrossBase);
27
27
  export default SvgDatabaseCross;
28
28
  //# sourceMappingURL=DatabaseCross.js.map