@neo4j-ndl/react 4.4.0 → 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 (365) 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/avatar/stories/avatar.stories.js +18 -18
  11. package/lib/cjs/avatar/stories/avatar.stories.js.map +1 -1
  12. package/lib/cjs/breadcrumbs/stories/breadcrumbs.stories.js +1 -1
  13. package/lib/cjs/breadcrumbs/stories/breadcrumbs.stories.js.map +1 -1
  14. package/lib/cjs/checkbox/stories/checkbox-full.story.js +2 -2
  15. package/lib/cjs/checkbox/stories/checkbox-full.story.js.map +1 -1
  16. package/lib/cjs/checkbox/stories/checkbox.stories.js +19 -19
  17. package/lib/cjs/checkbox/stories/checkbox.stories.js.map +1 -1
  18. package/lib/cjs/clean-icon-button/stories/clean-icon-button.stories.js +11 -11
  19. package/lib/cjs/clean-icon-button/stories/clean-icon-button.stories.js.map +1 -1
  20. package/lib/cjs/code-block/stories/code-disabled.story.js +2 -2
  21. package/lib/cjs/code-block/stories/code-disabled.story.js.map +1 -1
  22. package/lib/cjs/code-block/stories/code-full.story.js +2 -2
  23. package/lib/cjs/code-block/stories/code-full.story.js.map +1 -1
  24. package/lib/cjs/code-block/stories/code-with-actions.story.js +2 -2
  25. package/lib/cjs/code-block/stories/code-with-actions.story.js.map +1 -1
  26. package/lib/cjs/code-block/themes/ndl-code-dark.js +64 -64
  27. package/lib/cjs/code-block/themes/ndl-code-dark.js.map +1 -1
  28. package/lib/cjs/code-block/themes/ndl-code-light.js +64 -64
  29. package/lib/cjs/code-block/themes/ndl-code-light.js.map +1 -1
  30. package/lib/cjs/color-picker/ColorPicker.js +1 -1
  31. package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
  32. package/lib/cjs/color-picker/stories/color-picker.stories.js +4 -4
  33. package/lib/cjs/color-picker/stories/color-picker.stories.js.map +1 -1
  34. package/lib/cjs/data-grid/Components.js +13 -11
  35. package/lib/cjs/data-grid/Components.js.map +1 -1
  36. package/lib/cjs/data-grid/DataGrid.js.map +1 -1
  37. package/lib/cjs/data-grid/data-grid-context.js +1 -1
  38. package/lib/cjs/data-grid/data-grid-context.js.map +1 -1
  39. package/lib/cjs/data-grid/data-grid-nav/index.js +1 -1
  40. package/lib/cjs/data-grid/data-grid-nav/index.js.map +1 -1
  41. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
  42. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  43. package/lib/cjs/date-picker/stories/date-picker-full.story.js +9 -9
  44. package/lib/cjs/date-picker/stories/date-picker-full.story.js.map +1 -1
  45. package/lib/cjs/divider/stories/divider-horizontal.story.js +1 -1
  46. package/lib/cjs/divider/stories/divider-horizontal.story.js.map +1 -1
  47. package/lib/cjs/divider/stories/divider-vertical.story.js +1 -1
  48. package/lib/cjs/divider/stories/divider-vertical.story.js.map +1 -1
  49. package/lib/cjs/drawer/stories/drawer.stories.js +19 -19
  50. package/lib/cjs/drawer/stories/drawer.stories.js.map +1 -1
  51. package/lib/cjs/dropdown-button/stories/dropdown-button.stories.js +18 -18
  52. package/lib/cjs/dropdown-button/stories/dropdown-button.stories.js.map +1 -1
  53. package/lib/cjs/dropzone/stories/dropzone-disabled.story.js +1 -1
  54. package/lib/cjs/dropzone/stories/dropzone-disabled.story.js.map +1 -1
  55. package/lib/cjs/dropzone/stories/dropzone-full.story.js +11 -11
  56. package/lib/cjs/dropzone/stories/dropzone-full.story.js.map +1 -1
  57. package/lib/cjs/dropzone/stories/dropzone.stories.js +10 -10
  58. package/lib/cjs/dropzone/stories/dropzone.stories.js.map +1 -1
  59. package/lib/cjs/flex/Flex.js +4 -4
  60. package/lib/cjs/flex/Flex.js.map +1 -1
  61. package/lib/cjs/graph-label/stories/graph-label.stories.js +20 -20
  62. package/lib/cjs/graph-label/stories/graph-label.stories.js.map +1 -1
  63. package/lib/cjs/hooks/index.js +3 -3
  64. package/lib/cjs/hooks/index.js.map +1 -1
  65. package/lib/cjs/icon-button/stories/icon-button.stories.js +12 -12
  66. package/lib/cjs/icon-button/stories/icon-button.stories.js.map +1 -1
  67. package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js +16 -16
  68. package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
  69. package/lib/cjs/icons/wrapIcon.js +1 -1
  70. package/lib/cjs/icons/wrapIcon.js.map +1 -1
  71. package/lib/cjs/kbd/stories/kbd.stories.js +7 -7
  72. package/lib/cjs/kbd/stories/kbd.stories.js.map +1 -1
  73. package/lib/cjs/loading-spinner/LoadingSpinner.js +2 -2
  74. package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
  75. package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js +10 -10
  76. package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js.map +1 -1
  77. package/lib/cjs/logo/Logo.js +6 -6
  78. package/lib/cjs/logo/Logo.js.map +1 -1
  79. package/lib/cjs/logo/stories/logo.stories.js +9 -9
  80. package/lib/cjs/logo/stories/logo.stories.js.map +1 -1
  81. package/lib/cjs/menu/Menu.js +3 -3
  82. package/lib/cjs/menu/Menu.js.map +1 -1
  83. package/lib/cjs/popover/Popover.js +15 -15
  84. package/lib/cjs/popover/Popover.js.map +1 -1
  85. package/lib/cjs/popover/use-popover.js +9 -9
  86. package/lib/cjs/popover/use-popover.js.map +1 -1
  87. package/lib/cjs/progress-bar/stories/progress-bar.stories.js +3 -3
  88. package/lib/cjs/progress-bar/stories/progress-bar.stories.js.map +1 -1
  89. package/lib/cjs/segmented-control/SegmentedControl.js +1 -1
  90. package/lib/cjs/segmented-control/SegmentedControl.js.map +1 -1
  91. package/lib/cjs/select/Overrides.js +41 -41
  92. package/lib/cjs/select/Overrides.js.map +1 -1
  93. package/lib/cjs/select/stories/select-async.story.js +4 -4
  94. package/lib/cjs/select/stories/select-async.story.js.map +1 -1
  95. package/lib/cjs/select/stories/select-controlled.story.js +4 -4
  96. package/lib/cjs/select/stories/select-controlled.story.js.map +1 -1
  97. package/lib/cjs/select/stories/select-creatable.story.js +1 -1
  98. package/lib/cjs/select/stories/select-creatable.story.js.map +1 -1
  99. package/lib/cjs/select/stories/select-custom-label.story.js +1 -1
  100. package/lib/cjs/select/stories/select-custom-label.story.js.map +1 -1
  101. package/lib/cjs/select/stories/select-disabled.story.js +1 -1
  102. package/lib/cjs/select/stories/select-disabled.story.js.map +1 -1
  103. package/lib/cjs/select/stories/select-inside-dialog.story.js +1 -1
  104. package/lib/cjs/select/stories/select-inside-dialog.story.js.map +1 -1
  105. package/lib/cjs/side-navigation/stories/side-nav.stories.js +1 -1
  106. package/lib/cjs/side-navigation/stories/side-nav.stories.js.map +1 -1
  107. package/lib/cjs/skeleton/stories/skeleton.stories.js +28 -28
  108. package/lib/cjs/skeleton/stories/skeleton.stories.js.map +1 -1
  109. package/lib/cjs/slider/Slider.js +2 -1
  110. package/lib/cjs/slider/Slider.js.map +1 -1
  111. package/lib/cjs/status-indicator/stories/status-indicator.stories.js +2 -2
  112. package/lib/cjs/status-indicator/stories/status-indicator.stories.js.map +1 -1
  113. package/lib/cjs/switch/stories/switch.stories.js +7 -7
  114. package/lib/cjs/switch/stories/switch.stories.js.map +1 -1
  115. package/lib/cjs/tabs/Tabs.js +1 -1
  116. package/lib/cjs/tabs/Tabs.js.map +1 -1
  117. package/lib/cjs/tag/Tag.js +2 -2
  118. package/lib/cjs/tag/Tag.js.map +1 -1
  119. package/lib/cjs/tag/stories/tag.stories.js +10 -10
  120. package/lib/cjs/tag/stories/tag.stories.js.map +1 -1
  121. package/lib/cjs/text-area/TextArea.js +5 -5
  122. package/lib/cjs/text-area/TextArea.js.map +1 -1
  123. package/lib/cjs/text-area/stories/text-area.stories.js +25 -25
  124. package/lib/cjs/text-area/stories/text-area.stories.js.map +1 -1
  125. package/lib/cjs/text-input/stories/text-input-number.story.js +2 -2
  126. package/lib/cjs/text-input/stories/text-input-number.story.js.map +1 -1
  127. package/lib/cjs/text-link/stories/text-link.stories.js +11 -11
  128. package/lib/cjs/text-link/stories/text-link.stories.js.map +1 -1
  129. package/lib/cjs/text-overflow/stories/text-overflow.stories.js +1 -1
  130. package/lib/cjs/text-overflow/stories/text-overflow.stories.js.map +1 -1
  131. package/lib/cjs/theme/ThemeProvider.js.map +1 -1
  132. package/lib/cjs/theme/agnostic.js +1 -1
  133. package/lib/cjs/theme/agnostic.js.map +1 -1
  134. package/lib/cjs/time-picker/TimePicker.js +4 -4
  135. package/lib/cjs/time-picker/TimePicker.js.map +1 -1
  136. package/lib/cjs/time-picker/time-picker-hooks.js +1 -1
  137. package/lib/cjs/time-picker/time-picker-hooks.js.map +1 -1
  138. package/lib/cjs/timezone-picker/TimeZonePicker.js +5 -5
  139. package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
  140. package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +7 -7
  141. package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
  142. package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
  143. package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
  144. package/lib/cjs/toast/Toast.js +12 -12
  145. package/lib/cjs/toast/Toast.js.map +1 -1
  146. package/lib/cjs/toast/stories/toast-action-story.js +1 -1
  147. package/lib/cjs/toast/stories/toast-action-story.js.map +1 -1
  148. package/lib/cjs/toast/stories/toast-controlled-story.js +2 -2
  149. package/lib/cjs/toast/stories/toast-controlled-story.js.map +1 -1
  150. package/lib/cjs/toast/stories/toast-progress-bar.js +1 -1
  151. package/lib/cjs/toast/stories/toast-progress-bar.js.map +1 -1
  152. package/lib/cjs/toast/stories/toast.stories.js +18 -18
  153. package/lib/cjs/toast/stories/toast.stories.js.map +1 -1
  154. package/lib/cjs/tooltip/Tooltip.js +1 -1
  155. package/lib/cjs/tooltip/Tooltip.js.map +1 -1
  156. package/lib/cjs/tooltip/stories/tooltip-hover-delay.story.js +1 -1
  157. package/lib/cjs/tooltip/stories/tooltip-hover-delay.story.js.map +1 -1
  158. package/lib/cjs/tooltip/stories/tooltip-placements.story.js +8 -8
  159. package/lib/cjs/tooltip/stories/tooltip-placements.story.js.map +1 -1
  160. package/lib/cjs/tooltip/stories/tooltip.stories.js +29 -29
  161. package/lib/cjs/tooltip/stories/tooltip.stories.js.map +1 -1
  162. package/lib/cjs/tooltip/use-tooltip.js +10 -10
  163. package/lib/cjs/tooltip/use-tooltip.js.map +1 -1
  164. package/lib/cjs/tree-view/TreeItemWrapper.js +2 -2
  165. package/lib/cjs/tree-view/TreeItemWrapper.js.map +1 -1
  166. package/lib/cjs/tree-view/TreeView.js +12 -12
  167. package/lib/cjs/tree-view/TreeView.js.map +1 -1
  168. package/lib/cjs/tree-view/TreeViewItem.js +1 -1
  169. package/lib/cjs/tree-view/TreeViewItem.js.map +1 -1
  170. package/lib/cjs/tree-view/TreeViewTextItem.js +1 -1
  171. package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
  172. package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js +2 -2
  173. package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
  174. package/lib/cjs/wizard/Wizard.js +2 -2
  175. package/lib/cjs/wizard/Wizard.js.map +1 -1
  176. package/lib/cjs/wizard/stories/wizard.stories.js +14 -14
  177. package/lib/cjs/wizard/stories/wizard.stories.js.map +1 -1
  178. package/lib/esm/_common/types.js.map +1 -1
  179. package/lib/esm/_common/utils.js +4 -4
  180. package/lib/esm/_common/utils.js.map +1 -1
  181. package/lib/esm/accordion/Accordion.js +5 -5
  182. package/lib/esm/accordion/Accordion.js.map +1 -1
  183. package/lib/esm/accordion/accordion-context.js +1 -1
  184. package/lib/esm/accordion/accordion-context.js.map +1 -1
  185. package/lib/esm/accordion/stories/accordion.stories.js +20 -20
  186. package/lib/esm/accordion/stories/accordion.stories.js.map +1 -1
  187. package/lib/esm/avatar/stories/avatar.stories.js +18 -18
  188. package/lib/esm/avatar/stories/avatar.stories.js.map +1 -1
  189. package/lib/esm/breadcrumbs/stories/breadcrumbs.stories.js +1 -1
  190. package/lib/esm/breadcrumbs/stories/breadcrumbs.stories.js.map +1 -1
  191. package/lib/esm/checkbox/stories/checkbox-full.story.js +2 -2
  192. package/lib/esm/checkbox/stories/checkbox-full.story.js.map +1 -1
  193. package/lib/esm/checkbox/stories/checkbox.stories.js +19 -19
  194. package/lib/esm/checkbox/stories/checkbox.stories.js.map +1 -1
  195. package/lib/esm/clean-icon-button/stories/clean-icon-button.stories.js +11 -11
  196. package/lib/esm/clean-icon-button/stories/clean-icon-button.stories.js.map +1 -1
  197. package/lib/esm/code-block/stories/code-disabled.story.js +2 -2
  198. package/lib/esm/code-block/stories/code-disabled.story.js.map +1 -1
  199. package/lib/esm/code-block/stories/code-full.story.js +2 -2
  200. package/lib/esm/code-block/stories/code-full.story.js.map +1 -1
  201. package/lib/esm/code-block/stories/code-with-actions.story.js +2 -2
  202. package/lib/esm/code-block/stories/code-with-actions.story.js.map +1 -1
  203. package/lib/esm/code-block/themes/ndl-code-dark.js +64 -64
  204. package/lib/esm/code-block/themes/ndl-code-dark.js.map +1 -1
  205. package/lib/esm/code-block/themes/ndl-code-light.js +64 -64
  206. package/lib/esm/code-block/themes/ndl-code-light.js.map +1 -1
  207. package/lib/esm/color-picker/ColorPicker.js +1 -1
  208. package/lib/esm/color-picker/ColorPicker.js.map +1 -1
  209. package/lib/esm/color-picker/stories/color-picker.stories.js +4 -4
  210. package/lib/esm/color-picker/stories/color-picker.stories.js.map +1 -1
  211. package/lib/esm/data-grid/Components.js +13 -11
  212. package/lib/esm/data-grid/Components.js.map +1 -1
  213. package/lib/esm/data-grid/DataGrid.js.map +1 -1
  214. package/lib/esm/data-grid/data-grid-context.js +1 -1
  215. package/lib/esm/data-grid/data-grid-context.js.map +1 -1
  216. package/lib/esm/data-grid/data-grid-nav/index.js +1 -1
  217. package/lib/esm/data-grid/data-grid-nav/index.js.map +1 -1
  218. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
  219. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  220. package/lib/esm/date-picker/stories/date-picker-full.story.js +9 -9
  221. package/lib/esm/date-picker/stories/date-picker-full.story.js.map +1 -1
  222. package/lib/esm/divider/stories/divider-horizontal.story.js +1 -1
  223. package/lib/esm/divider/stories/divider-horizontal.story.js.map +1 -1
  224. package/lib/esm/divider/stories/divider-vertical.story.js +1 -1
  225. package/lib/esm/divider/stories/divider-vertical.story.js.map +1 -1
  226. package/lib/esm/drawer/stories/drawer.stories.js +19 -19
  227. package/lib/esm/drawer/stories/drawer.stories.js.map +1 -1
  228. package/lib/esm/dropdown-button/stories/dropdown-button.stories.js +18 -18
  229. package/lib/esm/dropdown-button/stories/dropdown-button.stories.js.map +1 -1
  230. package/lib/esm/dropzone/stories/dropzone-disabled.story.js +1 -1
  231. package/lib/esm/dropzone/stories/dropzone-disabled.story.js.map +1 -1
  232. package/lib/esm/dropzone/stories/dropzone-full.story.js +11 -11
  233. package/lib/esm/dropzone/stories/dropzone-full.story.js.map +1 -1
  234. package/lib/esm/dropzone/stories/dropzone.stories.js +10 -10
  235. package/lib/esm/dropzone/stories/dropzone.stories.js.map +1 -1
  236. package/lib/esm/flex/Flex.js +4 -4
  237. package/lib/esm/flex/Flex.js.map +1 -1
  238. package/lib/esm/graph-label/stories/graph-label.stories.js +20 -20
  239. package/lib/esm/graph-label/stories/graph-label.stories.js.map +1 -1
  240. package/lib/esm/hooks/index.js +3 -3
  241. package/lib/esm/hooks/index.js.map +1 -1
  242. package/lib/esm/icon-button/stories/icon-button.stories.js +12 -12
  243. package/lib/esm/icon-button/stories/icon-button.stories.js.map +1 -1
  244. package/lib/esm/icon-button-array/stories/icon-button-array.stories.js +16 -16
  245. package/lib/esm/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
  246. package/lib/esm/icons/wrapIcon.js +1 -1
  247. package/lib/esm/icons/wrapIcon.js.map +1 -1
  248. package/lib/esm/kbd/stories/kbd.stories.js +7 -7
  249. package/lib/esm/kbd/stories/kbd.stories.js.map +1 -1
  250. package/lib/esm/loading-spinner/LoadingSpinner.js +2 -2
  251. package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
  252. package/lib/esm/loading-spinner/stories/loading-spinner.stories.js +10 -10
  253. package/lib/esm/loading-spinner/stories/loading-spinner.stories.js.map +1 -1
  254. package/lib/esm/logo/Logo.js +6 -6
  255. package/lib/esm/logo/Logo.js.map +1 -1
  256. package/lib/esm/logo/stories/logo.stories.js +9 -9
  257. package/lib/esm/logo/stories/logo.stories.js.map +1 -1
  258. package/lib/esm/menu/Menu.js +3 -3
  259. package/lib/esm/menu/Menu.js.map +1 -1
  260. package/lib/esm/popover/Popover.js +15 -15
  261. package/lib/esm/popover/Popover.js.map +1 -1
  262. package/lib/esm/popover/use-popover.js +9 -9
  263. package/lib/esm/popover/use-popover.js.map +1 -1
  264. package/lib/esm/progress-bar/stories/progress-bar.stories.js +3 -3
  265. package/lib/esm/progress-bar/stories/progress-bar.stories.js.map +1 -1
  266. package/lib/esm/segmented-control/SegmentedControl.js +1 -1
  267. package/lib/esm/segmented-control/SegmentedControl.js.map +1 -1
  268. package/lib/esm/select/Overrides.js +41 -41
  269. package/lib/esm/select/Overrides.js.map +1 -1
  270. package/lib/esm/select/stories/select-async.story.js +4 -4
  271. package/lib/esm/select/stories/select-async.story.js.map +1 -1
  272. package/lib/esm/select/stories/select-controlled.story.js +4 -4
  273. package/lib/esm/select/stories/select-controlled.story.js.map +1 -1
  274. package/lib/esm/select/stories/select-creatable.story.js +1 -1
  275. package/lib/esm/select/stories/select-creatable.story.js.map +1 -1
  276. package/lib/esm/select/stories/select-custom-label.story.js +1 -1
  277. package/lib/esm/select/stories/select-custom-label.story.js.map +1 -1
  278. package/lib/esm/select/stories/select-disabled.story.js +1 -1
  279. package/lib/esm/select/stories/select-disabled.story.js.map +1 -1
  280. package/lib/esm/select/stories/select-inside-dialog.story.js +1 -1
  281. package/lib/esm/select/stories/select-inside-dialog.story.js.map +1 -1
  282. package/lib/esm/side-navigation/stories/side-nav.stories.js +1 -1
  283. package/lib/esm/side-navigation/stories/side-nav.stories.js.map +1 -1
  284. package/lib/esm/skeleton/stories/skeleton.stories.js +28 -28
  285. package/lib/esm/skeleton/stories/skeleton.stories.js.map +1 -1
  286. package/lib/esm/slider/Slider.js +2 -1
  287. package/lib/esm/slider/Slider.js.map +1 -1
  288. package/lib/esm/status-indicator/stories/status-indicator.stories.js +2 -2
  289. package/lib/esm/status-indicator/stories/status-indicator.stories.js.map +1 -1
  290. package/lib/esm/switch/stories/switch.stories.js +7 -7
  291. package/lib/esm/switch/stories/switch.stories.js.map +1 -1
  292. package/lib/esm/tabs/Tabs.js +1 -1
  293. package/lib/esm/tabs/Tabs.js.map +1 -1
  294. package/lib/esm/tag/Tag.js +2 -2
  295. package/lib/esm/tag/Tag.js.map +1 -1
  296. package/lib/esm/tag/stories/tag.stories.js +10 -10
  297. package/lib/esm/tag/stories/tag.stories.js.map +1 -1
  298. package/lib/esm/text-area/TextArea.js +5 -5
  299. package/lib/esm/text-area/TextArea.js.map +1 -1
  300. package/lib/esm/text-area/stories/text-area.stories.js +25 -25
  301. package/lib/esm/text-area/stories/text-area.stories.js.map +1 -1
  302. package/lib/esm/text-input/stories/text-input-number.story.js +2 -2
  303. package/lib/esm/text-input/stories/text-input-number.story.js.map +1 -1
  304. package/lib/esm/text-link/stories/text-link.stories.js +11 -11
  305. package/lib/esm/text-link/stories/text-link.stories.js.map +1 -1
  306. package/lib/esm/text-overflow/stories/text-overflow.stories.js +1 -1
  307. package/lib/esm/text-overflow/stories/text-overflow.stories.js.map +1 -1
  308. package/lib/esm/theme/ThemeProvider.js.map +1 -1
  309. package/lib/esm/theme/agnostic.js +1 -1
  310. package/lib/esm/theme/agnostic.js.map +1 -1
  311. package/lib/esm/time-picker/TimePicker.js +4 -4
  312. package/lib/esm/time-picker/TimePicker.js.map +1 -1
  313. package/lib/esm/time-picker/time-picker-hooks.js +1 -1
  314. package/lib/esm/time-picker/time-picker-hooks.js.map +1 -1
  315. package/lib/esm/timezone-picker/TimeZonePicker.js +5 -5
  316. package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
  317. package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +7 -7
  318. package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
  319. package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
  320. package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
  321. package/lib/esm/toast/Toast.js +12 -12
  322. package/lib/esm/toast/Toast.js.map +1 -1
  323. package/lib/esm/toast/stories/toast-action-story.js +1 -1
  324. package/lib/esm/toast/stories/toast-action-story.js.map +1 -1
  325. package/lib/esm/toast/stories/toast-controlled-story.js +2 -2
  326. package/lib/esm/toast/stories/toast-controlled-story.js.map +1 -1
  327. package/lib/esm/toast/stories/toast-progress-bar.js +1 -1
  328. package/lib/esm/toast/stories/toast-progress-bar.js.map +1 -1
  329. package/lib/esm/toast/stories/toast.stories.js +18 -18
  330. package/lib/esm/toast/stories/toast.stories.js.map +1 -1
  331. package/lib/esm/tooltip/Tooltip.js +1 -1
  332. package/lib/esm/tooltip/Tooltip.js.map +1 -1
  333. package/lib/esm/tooltip/stories/tooltip-hover-delay.story.js +1 -1
  334. package/lib/esm/tooltip/stories/tooltip-hover-delay.story.js.map +1 -1
  335. package/lib/esm/tooltip/stories/tooltip-placements.story.js +8 -8
  336. package/lib/esm/tooltip/stories/tooltip-placements.story.js.map +1 -1
  337. package/lib/esm/tooltip/stories/tooltip.stories.js +29 -29
  338. package/lib/esm/tooltip/stories/tooltip.stories.js.map +1 -1
  339. package/lib/esm/tooltip/use-tooltip.js +10 -10
  340. package/lib/esm/tooltip/use-tooltip.js.map +1 -1
  341. package/lib/esm/tree-view/TreeItemWrapper.js +2 -2
  342. package/lib/esm/tree-view/TreeItemWrapper.js.map +1 -1
  343. package/lib/esm/tree-view/TreeView.js +12 -12
  344. package/lib/esm/tree-view/TreeView.js.map +1 -1
  345. package/lib/esm/tree-view/TreeViewItem.js +1 -1
  346. package/lib/esm/tree-view/TreeViewItem.js.map +1 -1
  347. package/lib/esm/tree-view/TreeViewTextItem.js +1 -1
  348. package/lib/esm/tree-view/TreeViewTextItem.js.map +1 -1
  349. package/lib/esm/tree-view/tree-view-keyboard-coordinates.js +2 -2
  350. package/lib/esm/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
  351. package/lib/esm/wizard/Wizard.js +2 -2
  352. package/lib/esm/wizard/Wizard.js.map +1 -1
  353. package/lib/esm/wizard/stories/wizard.stories.js +14 -14
  354. package/lib/esm/wizard/stories/wizard.stories.js.map +1 -1
  355. package/lib/types/accordion/stories/accordion.stories.d.ts +3 -3
  356. package/lib/types/breadcrumbs/stories/breadcrumbs.stories.d.ts +1 -1
  357. package/lib/types/data-grid/Components.d.ts.map +1 -1
  358. package/lib/types/logo/stories/logo.stories.d.ts +3 -3
  359. package/lib/types/side-navigation/stories/side-nav.stories.d.ts +1 -1
  360. package/lib/types/skeleton/stories/skeleton.stories.d.ts +3 -3
  361. package/lib/types/slider/Slider.d.ts.map +1 -1
  362. package/lib/types/time-picker/time-picker-hooks.d.ts +1 -1
  363. package/lib/types/time-picker/time-picker-hooks.d.ts.map +1 -1
  364. package/lib/types/toast/stories/toast.stories.d.ts +2 -2
  365. package/package.json +1 -1
@@ -25,10 +25,10 @@ const Component = () => {
25
25
  return (_jsxs("div", { className: "n-flex n-flex-row n-justify-center", children: [_jsx(Toaster, {}), _jsx(FilledButton, { onClick: () => {
26
26
  toast.neutral('Hello', {
27
27
  actionLabel: 'Action',
28
- shouldCloseOnAction: true,
29
28
  onAction: () => {
30
29
  console.info('action');
31
30
  },
31
+ shouldCloseOnAction: true,
32
32
  });
33
33
  }, children: "Press to show a Toast" })] }));
34
34
  };
@@ -1 +1 @@
1
- {"version":3,"file":"toast-action-story.js","sourceRoot":"","sources":["../../../../src/toast/stories/toast-action-story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,oCAAoC,aAEjD,KAAC,OAAO,KAAG,EACX,KAAC,YAAY,IACX,OAAO,EAAE,GAAG,EAAE;oBACZ,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE;wBACrB,WAAW,EAAE,QAAQ;wBACrB,mBAAmB,EAAE,IAAI;wBACzB,QAAQ,EAAE,GAAG,EAAE;4BACb,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;wBACzB,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC,sCAGY,IACX,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, toast, Toaster } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-row n-justify-center\">\n {/* Toaster should be at the root of the app */}\n <Toaster />\n <FilledButton\n onClick={() => {\n toast.neutral('Hello', {\n actionLabel: 'Action',\n shouldCloseOnAction: true,\n onAction: () => {\n console.info('action');\n },\n });\n }}\n >\n Press to show a Toast\n </FilledButton>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"toast-action-story.js","sourceRoot":"","sources":["../../../../src/toast/stories/toast-action-story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,oCAAoC,aAEjD,KAAC,OAAO,KAAG,EACX,KAAC,YAAY,IACX,OAAO,EAAE,GAAG,EAAE;oBACZ,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE;wBACrB,WAAW,EAAE,QAAQ;wBACrB,QAAQ,EAAE,GAAG,EAAE;4BACb,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;wBACzB,CAAC;wBACD,mBAAmB,EAAE,IAAI;qBAC1B,CAAC,CAAC;gBACL,CAAC,sCAGY,IACX,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, toast, Toaster } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-row n-justify-center\">\n {/* Toaster should be at the root of the app */}\n <Toaster />\n <FilledButton\n onClick={() => {\n toast.neutral('Hello', {\n actionLabel: 'Action',\n onAction: () => {\n console.info('action');\n },\n shouldCloseOnAction: true,\n });\n }}\n >\n Press to show a Toast\n </FilledButton>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -29,11 +29,11 @@ const Component = () => {
29
29
  ...toasts,
30
30
  {
31
31
  id: '1',
32
- text: 'Hi there!',
33
- variant: 'neutral',
34
32
  onClose: () => {
35
33
  setToasts(toasts.filter((toast) => toast.id !== '1'));
36
34
  },
35
+ text: 'Hi there!',
36
+ variant: 'neutral',
37
37
  },
38
38
  ]);
39
39
  }, children: "Press to show a Toast" })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"toast-controlled-story.js","sourceRoot":"","sources":["../../../../src/toast/stories/toast-controlled-story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAElC,EAAE,CAAC,CAAC;IAEN,OAAO,CACL,eAAK,SAAS,EAAC,yBAAyB,aAEtC,KAAC,iBAAiB,IAAC,MAAM,EAAE,MAAM,GAAI,EACrC,KAAC,YAAY,IACX,OAAO,EAAE,GAAG,EAAE;oBACZ,SAAS,CAAC;wBACR,GAAG,MAAM;wBACT;4BACE,EAAE,EAAE,GAAG;4BACP,IAAI,EAAE,WAAW;4BACjB,OAAO,EAAE,SAAS;4BAClB,OAAO,EAAE,GAAG,EAAE;gCACZ,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;4BACxD,CAAC;yBACF;qBACF,CAAC,CAAC;gBACL,CAAC,sCAGY,IACX,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, ToasterControlled } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [toasts, setToasts] = useState<\n React.ComponentProps<typeof ToasterControlled>['toasts']\n >([]);\n\n return (\n <div className=\"n-flex n-justify-center\">\n {/* Toaster should be at the root of the app */}\n <ToasterControlled toasts={toasts} />\n <FilledButton\n onClick={() => {\n setToasts([\n ...toasts,\n {\n id: '1',\n text: 'Hi there!',\n variant: 'neutral',\n onClose: () => {\n setToasts(toasts.filter((toast) => toast.id !== '1'));\n },\n },\n ]);\n }}\n >\n Press to show a Toast\n </FilledButton>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"toast-controlled-story.js","sourceRoot":"","sources":["../../../../src/toast/stories/toast-controlled-story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAElC,EAAE,CAAC,CAAC;IAEN,OAAO,CACL,eAAK,SAAS,EAAC,yBAAyB,aAEtC,KAAC,iBAAiB,IAAC,MAAM,EAAE,MAAM,GAAI,EACrC,KAAC,YAAY,IACX,OAAO,EAAE,GAAG,EAAE;oBACZ,SAAS,CAAC;wBACR,GAAG,MAAM;wBACT;4BACE,EAAE,EAAE,GAAG;4BACP,OAAO,EAAE,GAAG,EAAE;gCACZ,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;4BACxD,CAAC;4BACD,IAAI,EAAE,WAAW;4BACjB,OAAO,EAAE,SAAS;yBACnB;qBACF,CAAC,CAAC;gBACL,CAAC,sCAGY,IACX,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, ToasterControlled } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [toasts, setToasts] = useState<\n React.ComponentProps<typeof ToasterControlled>['toasts']\n >([]);\n\n return (\n <div className=\"n-flex n-justify-center\">\n {/* Toaster should be at the root of the app */}\n <ToasterControlled toasts={toasts} />\n <FilledButton\n onClick={() => {\n setToasts([\n ...toasts,\n {\n id: '1',\n onClose: () => {\n setToasts(toasts.filter((toast) => toast.id !== '1'));\n },\n text: 'Hi there!',\n variant: 'neutral',\n },\n ]);\n }}\n >\n Press to show a Toast\n </FilledButton>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -29,12 +29,12 @@ const Component = () => {
29
29
  const id = toast.progressBar('Hello', {
30
30
  icon: _jsx(CloudArrowDownIconSolid, {}),
31
31
  isCloseable: true,
32
- shouldCloseOnAction: true,
33
32
  onClose: () => {
34
33
  setProgressBarId(null);
35
34
  console.info('close');
36
35
  },
37
36
  shouldAutoClose: false,
37
+ shouldCloseOnAction: true,
38
38
  });
39
39
  setProgressBarId(id);
40
40
  }, children: "Press to show a Toast" }), _jsx(OutlinedButton, { onClick: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"toast-progress-bar.js","sourceRoot":"","sources":["../../../../src/toast/stories/toast-progress-bar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAChD,IAAI,CACL,CAAC;IACF,OAAO,CACL,eAAK,SAAS,EAAC,iCAAiC,aAE9C,KAAC,OAAO,KAAG,EACX,KAAC,YAAY,IACX,OAAO,EAAE,GAAG,EAAE;oBACZ,MAAM,EAAE,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE;wBACpC,IAAI,EAAE,KAAC,uBAAuB,KAAG;wBACjC,WAAW,EAAE,IAAI;wBACjB,mBAAmB,EAAE,IAAI;wBACzB,OAAO,EAAE,GAAG,EAAE;4BACZ,gBAAgB,CAAC,IAAI,CAAC,CAAC;4BACvB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;wBACxB,CAAC;wBACD,eAAe,EAAE,KAAK;qBACvB,CAAC,CAAC;oBACH,gBAAgB,CAAC,EAAE,CAAC,CAAC;gBACvB,CAAC,sCAGY,EACf,KAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;oBACZ,IAAI,aAAa,EAAE,CAAC;wBAClB,KAAK,CAAC,sBAAsB,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;oBAClD,CAAC;gBACH,CAAC,oCAGc,IACb,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, OutlinedButton, toast, Toaster } from '@neo4j-ndl/react';\nimport { CloudArrowDownIconSolid } from '@neo4j-ndl/react/icons';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [progressBarId, setProgressBarId] = useState<string | number | null>(\n null,\n );\n return (\n <div className=\"n-flex n-justify-center n-gap-4\">\n {/* Toaster should be at the root of the app */}\n <Toaster />\n <FilledButton\n onClick={() => {\n const id = toast.progressBar('Hello', {\n icon: <CloudArrowDownIconSolid />,\n isCloseable: true,\n shouldCloseOnAction: true,\n onClose: () => {\n setProgressBarId(null);\n console.info('close');\n },\n shouldAutoClose: false,\n });\n setProgressBarId(id);\n }}\n >\n Press to show a Toast\n </FilledButton>\n <OutlinedButton\n onClick={() => {\n if (progressBarId) {\n toast.updateProgressBarValue(progressBarId, 50);\n }\n }}\n >\n Update progress bar\n </OutlinedButton>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"toast-progress-bar.js","sourceRoot":"","sources":["../../../../src/toast/stories/toast-progress-bar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAChD,IAAI,CACL,CAAC;IACF,OAAO,CACL,eAAK,SAAS,EAAC,iCAAiC,aAE9C,KAAC,OAAO,KAAG,EACX,KAAC,YAAY,IACX,OAAO,EAAE,GAAG,EAAE;oBACZ,MAAM,EAAE,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE;wBACpC,IAAI,EAAE,KAAC,uBAAuB,KAAG;wBACjC,WAAW,EAAE,IAAI;wBACjB,OAAO,EAAE,GAAG,EAAE;4BACZ,gBAAgB,CAAC,IAAI,CAAC,CAAC;4BACvB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;wBACxB,CAAC;wBACD,eAAe,EAAE,KAAK;wBACtB,mBAAmB,EAAE,IAAI;qBAC1B,CAAC,CAAC;oBACH,gBAAgB,CAAC,EAAE,CAAC,CAAC;gBACvB,CAAC,sCAGY,EACf,KAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;oBACZ,IAAI,aAAa,EAAE,CAAC;wBAClB,KAAK,CAAC,sBAAsB,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;oBAClD,CAAC;gBACH,CAAC,oCAGc,IACb,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, OutlinedButton, toast, Toaster } from '@neo4j-ndl/react';\nimport { CloudArrowDownIconSolid } from '@neo4j-ndl/react/icons';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [progressBarId, setProgressBarId] = useState<string | number | null>(\n null,\n );\n return (\n <div className=\"n-flex n-justify-center n-gap-4\">\n {/* Toaster should be at the root of the app */}\n <Toaster />\n <FilledButton\n onClick={() => {\n const id = toast.progressBar('Hello', {\n icon: <CloudArrowDownIconSolid />,\n isCloseable: true,\n onClose: () => {\n setProgressBarId(null);\n console.info('close');\n },\n shouldAutoClose: false,\n shouldCloseOnAction: true,\n });\n setProgressBarId(id);\n }}\n >\n Press to show a Toast\n </FilledButton>\n <OutlinedButton\n onClick={() => {\n if (progressBarId) {\n toast.updateProgressBarValue(progressBarId, 50);\n }\n }}\n >\n Update progress bar\n </OutlinedButton>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -21,114 +21,114 @@
21
21
  import { Toaster } from '@neo4j-ndl/react';
22
22
  import { ToastAction, ToastActionSrc, ToastCloseable, ToastCloseableSrc, ToastControlled, ToastControlledSrc, ToastCustom, ToastCustomSrc, ToastDanger, ToastDangerSrc, ToastNeutral, ToastNeutralSrc, ToastProgressBar, ToastProgressBarSrc, ToastSuccess, ToastSuccessSrc, } from '.';
23
23
  const componentMeta = {
24
- title: 'Components/Toast',
25
- id: 'components-toast',
26
24
  component: Toaster,
25
+ id: 'components-toast',
27
26
  tags: ['docsPage'],
27
+ title: 'Components/Toast',
28
28
  };
29
29
  export default componentMeta;
30
30
  export const Neutral = {
31
31
  args: {},
32
- render: ToastNeutral,
33
32
  parameters: {
34
33
  docs: {
35
34
  source: {
35
+ code: ToastNeutralSrc,
36
36
  language: 'tsx',
37
37
  type: 'code',
38
- code: ToastNeutralSrc,
39
38
  },
40
39
  },
41
40
  },
41
+ render: ToastNeutral,
42
42
  };
43
43
  export const Success = {
44
44
  args: {},
45
- render: ToastSuccess,
46
45
  parameters: {
47
46
  docs: {
48
47
  source: {
48
+ code: ToastSuccessSrc,
49
49
  language: 'tsx',
50
50
  type: 'code',
51
- code: ToastSuccessSrc,
52
51
  },
53
52
  },
54
53
  },
54
+ render: ToastSuccess,
55
55
  };
56
56
  export const Error = {
57
57
  args: {},
58
- render: ToastDanger,
59
58
  parameters: {
60
59
  docs: {
61
60
  source: {
61
+ code: ToastDangerSrc,
62
62
  language: 'tsx',
63
63
  type: 'code',
64
- code: ToastDangerSrc,
65
64
  },
66
65
  },
67
66
  },
67
+ render: ToastDanger,
68
68
  };
69
69
  export const Action = {
70
70
  args: {},
71
- render: ToastAction,
72
71
  parameters: {
73
72
  docs: {
74
73
  source: {
74
+ code: ToastActionSrc,
75
75
  language: 'tsx',
76
76
  type: 'code',
77
- code: ToastActionSrc,
78
77
  },
79
78
  },
80
79
  },
80
+ render: ToastAction,
81
81
  };
82
82
  export const Closeable = {
83
83
  args: {},
84
- render: ToastCloseable,
85
84
  parameters: {
86
85
  docs: {
87
86
  source: {
87
+ code: ToastCloseableSrc,
88
88
  language: 'tsx',
89
89
  type: 'code',
90
- code: ToastCloseableSrc,
91
90
  },
92
91
  },
93
92
  },
93
+ render: ToastCloseable,
94
94
  };
95
95
  export const ProgressBar = {
96
96
  args: {},
97
- render: ToastProgressBar,
98
97
  parameters: {
99
98
  docs: {
100
99
  source: {
100
+ code: ToastProgressBarSrc,
101
101
  language: 'tsx',
102
102
  type: 'code',
103
- code: ToastProgressBarSrc,
104
103
  },
105
104
  },
106
105
  },
106
+ render: ToastProgressBar,
107
107
  };
108
108
  export const Custom = {
109
109
  args: {},
110
- render: ToastCustom,
111
110
  parameters: {
112
111
  docs: {
113
112
  source: {
113
+ code: ToastCustomSrc,
114
114
  language: 'tsx',
115
115
  type: 'code',
116
- code: ToastCustomSrc,
117
116
  },
118
117
  },
119
118
  },
119
+ render: ToastCustom,
120
120
  };
121
121
  export const Controlled = {
122
122
  args: {},
123
- render: ToastControlled,
124
123
  parameters: {
125
124
  docs: {
126
125
  source: {
126
+ code: ToastControlledSrc,
127
127
  language: 'tsx',
128
128
  type: 'code',
129
- code: ToastControlledSrc,
130
129
  },
131
130
  },
132
131
  },
132
+ render: ToastControlled,
133
133
  };
134
134
  //# sourceMappingURL=toast.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toast.stories.js","sourceRoot":"","sources":["../../../../src/to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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 { Toaster } from '@neo4j-ndl/react';\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport {\n ToastAction,\n ToastActionSrc,\n ToastCloseable,\n ToastCloseableSrc,\n ToastControlled,\n ToastControlledSrc,\n ToastCustom,\n ToastCustomSrc,\n ToastDanger,\n ToastDangerSrc,\n ToastNeutral,\n ToastNeutralSrc,\n ToastProgressBar,\n ToastProgressBarSrc,\n ToastSuccess,\n ToastSuccessSrc,\n} from '.';\n\nconst componentMeta = {\n title: 'Components/Toast',\n id: 'components-toast',\n component: Toaster,\n tags: ['docsPage'],\n} satisfies Meta<typeof Toaster>;\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Neutral: Story = {\n args: {},\n render: ToastNeutral,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: ToastNeutralSrc,\n },\n },\n },\n};\n\nexport const Success: Story = {\n args: {},\n render: ToastSuccess,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: ToastSuccessSrc,\n },\n },\n },\n};\n\nexport const Error: Story = {\n args: {},\n render: ToastDanger,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: ToastDangerSrc,\n },\n },\n },\n};\n\nexport const Action: Story = {\n args: {},\n render: ToastAction,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: ToastActionSrc,\n },\n },\n },\n};\n\nexport const Closeable: Story = {\n args: {},\n render: ToastCloseable,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: ToastCloseableSrc,\n },\n },\n },\n};\n\nexport const ProgressBar: Story = {\n args: {},\n render: ToastProgressBar,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: ToastProgressBarSrc,\n },\n },\n },\n};\n\nexport const Custom: Story = {\n args: {},\n render: ToastCustom,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: ToastCustomSrc,\n },\n },\n },\n};\n\nexport const Controlled: Story = {\n args: {},\n render: ToastControlled,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: ToastControlledSrc,\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"toast.stories.js","sourceRoot":"","sources":["../../../../src/toast/stories/toast.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,WAAW,EACX,cAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,eAAe,GAChB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE,OAAO;IAClB,EAAE,EAAE,kBAAkB;IACtB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,kBAAkB;CACK,CAAC;AAEjC,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,eAAe;gBACrB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb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AAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAU;IAC3B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,cAAc;gBACpB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,WAAW;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,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","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 { Toaster } from '@neo4j-ndl/react';\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport {\n ToastAction,\n ToastActionSrc,\n ToastCloseable,\n ToastCloseableSrc,\n ToastControlled,\n ToastControlledSrc,\n ToastCustom,\n ToastCustomSrc,\n ToastDanger,\n ToastDangerSrc,\n ToastNeutral,\n ToastNeutralSrc,\n ToastProgressBar,\n ToastProgressBarSrc,\n ToastSuccess,\n ToastSuccessSrc,\n} from '.';\n\nconst componentMeta = {\n component: Toaster,\n id: 'components-toast',\n tags: ['docsPage'],\n title: 'Components/Toast',\n} satisfies Meta<typeof Toaster>;\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Neutral: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ToastNeutralSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ToastNeutral,\n};\n\nexport const Success: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ToastSuccessSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ToastSuccess,\n};\n\nexport const Error: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ToastDangerSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ToastDanger,\n};\n\nexport const Action: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ToastActionSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ToastAction,\n};\n\nexport const Closeable: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ToastCloseableSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ToastCloseable,\n};\n\nexport const ProgressBar: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ToastProgressBarSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ToastProgressBar,\n};\n\nexport const Custom: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ToastCustomSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ToastCustom,\n};\n\nexport const Controlled: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ToastControlledSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ToastControlled,\n};\n"]}
@@ -62,7 +62,7 @@ const TooltipTrigger = (_a) => {
62
62
  var { children, hasButtonWrapper = false, htmlAttributes, className, style, ref } = _a, restProps = __rest(_a, ["children", "hasButtonWrapper", "htmlAttributes", "className", "style", "ref"]);
63
63
  const context = useTooltipContext();
64
64
  // Example from floating-ui
65
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
65
+ // oxlint-disable-next-line @typescript-eslint/no-explicit-any
66
66
  const childrenProps = children.props;
67
67
  const mergedRefs = useMergeRefs([
68
68
  context.refs.setReference,
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/tooltip/Tooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAEL,oBAAoB,EACpB,cAAc,EAGd,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,UAAU,EAA2B,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AA+B9E,MAAM,gBAAgB,GAAG,CAAC,EACxB,QAAQ,EACR,UAAU,GAAG,KAAK,EAClB,IAAI,EACJ,aAAa,EACb,SAAS,EACT,MAAM,EACN,YAAY,EACZ,UAAU,EAAE,cAAc,EAC1B,gBAAgB,EAAE,YAAY,EAC9B,UAAU,EACV,2BAA2B,EAC3B,iBAAiB,GACJ,EAAE,EAAE;IACjB,MAAM,cAAc,GAAG,iBAAiB,EAAE,CAAC;IAC3C,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC;IACvD,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC;IAEnC,MAAM,OAAO,GAAG,UAAU,CAAC;QACzB,iBAAiB;QACjB,UAAU;QACV,aAAa;QACb,2HAA2H;QAC3H,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK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EAAE;IAC9C,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,cAAc;IACvB,MAAM,EAAE,aAAa;IACrB,OAAO,EAAE,cAAc;CACxB,CAAC,CAAC;AAEH,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n type AutoUpdateOptions,\n FloatingFocusManager,\n FloatingPortal,\n type Placement,\n type UseFloatingOptions,\n useMergeRefs,\n} from '@floating-ui/react';\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { cloneElement, isValidElement } from 'react';\n\nimport { type CommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { useNeedleTheme } from '../theme';\nimport { Typography, type TypographyVariants } from '../typography';\nimport { TooltipContext, useTooltip, useTooltipContext } from './use-tooltip';\n\nexport type TooltipProps = {\n /** Content displayed inside the tooltip. Wraps `Tooltip.Trigger`, `Tooltip.Content`, and optional parts */\n children: React.ReactNode;\n /** Whether the tooltip is disabled */\n isDisabled?: boolean;\n /** Whether the tooltip should be open on first render */\n isInitialOpen?: boolean;\n /** Placement of the tooltip content relative to the trigger */\n placement?: Placement;\n /** Controls the open state . If omitted, the tooltip manages its own state */\n isOpen?: boolean;\n /** Visual style of the tooltip content. `simple` renders plain text, `rich` renders a composable panel */\n type: 'simple' | 'rich';\n /** Whether the content is rendered in a portal. */\n isPortaled?: boolean;\n /** Callback fired when the open state changes, if omitted, the tooltip manages its own state using internal hooks */\n onOpenChange?: UseFloatingOptions['onOpenChange'];\n /** Positioning strategy of the tooltip. Defaults to `fixed` when inside a dialog, otherwise `absolute` */\n floatingStrategy?: 'absolute' | 'fixed';\n /** Hover open/close delays in milliseconds */\n hoverDelay?: {\n open: number;\n close: number;\n };\n /** Whether the tooltip should close when the reference element is clicked. Useful when the trigger moves after click. */\n shouldCloseOnReferenceClick?: boolean;\n autoUpdateOptions?: AutoUpdateOptions;\n};\n\nconst TooltipComponent = ({\n children,\n isDisabled = false,\n type,\n isInitialOpen,\n placement,\n isOpen,\n onOpenChange,\n isPortaled: isPortaledProp,\n floatingStrategy: strategyProp,\n hoverDelay,\n shouldCloseOnReferenceClick,\n autoUpdateOptions,\n}: TooltipProps) => {\n const isInsideDialog = useIsInsideDialog();\n const strategy = isInsideDialog ? 'fixed' : 'absolute';\n const isPortaled = !isInsideDialog;\n\n const tooltip = useTooltip({\n autoUpdateOptions,\n hoverDelay,\n isInitialOpen,\n // if isDisabled is true tooltip will not open otherwise either controlled or uncontrolled depending on if isOpen is passed\n isOpen: isDisabled === true ? false : isOpen,\n isPortaled: isPortaledProp ?? isPortaled,\n onOpenChange,\n placement,\n shouldCloseOnReferenceClick,\n strategy: strategyProp ?? strategy,\n type,\n });\n\n return (\n <TooltipContext.Provider value={tooltip}>\n {children}\n </TooltipContext.Provider>\n );\n};\n\nTooltipComponent.displayName = 'Tooltip';\n\ntype TooltipTriggerProps = {\n /** Content displayed inside the trigger element */\n children: React.ReactNode;\n /** Whether the trigger element can be any element without an extra button wrapper. The child element will be cloned with the necessary trigger props and merged refs */\n hasButtonWrapper?: boolean;\n};\n\nconst TooltipTrigger = ({\n children,\n hasButtonWrapper = false,\n htmlAttributes,\n className,\n style,\n ref,\n ...restProps\n}: CommonProps<'button', TooltipTriggerProps>) => {\n const context = useTooltipContext();\n\n // Example from floating-ui\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const childrenProps = (children as any).props;\n const mergedRefs = useMergeRefs([\n context.refs.setReference,\n ref,\n childrenProps?.ref,\n ]);\n\n const triggerClasses = classNames(\n {\n 'ndl-closed': !context.isOpen,\n 'ndl-open': context.isOpen,\n },\n 'ndl-tooltip-trigger',\n className,\n );\n\n // `hasButtonWrapper=true` allows the user to pass any element as the anchor\n if (hasButtonWrapper && isValidElement(children)) {\n const props: Record<string, unknown> = {\n className: triggerClasses,\n ...htmlAttributes,\n ...childrenProps,\n ref: mergedRefs,\n };\n return cloneElement(children, context.getReferenceProps(props));\n }\n\n return (\n <button\n className={triggerClasses}\n style={style}\n ref={mergedRefs}\n {...context.getReferenceProps(htmlAttributes)}\n {...restProps}\n >\n {children}\n </button>\n );\n};\n\ntype TooltipContentProps = {\n /** Content displayed inside the tooltip */\n children: React.ReactNode;\n};\n\nconst TooltipContent = ({\n children,\n style,\n htmlAttributes,\n className,\n ref,\n ...restProps\n}: CommonProps<'div', TooltipContentProps>) => {\n const context = useTooltipContext();\n const mergedRef = useMergeRefs([context.refs.setFloating, ref]);\n const { themeClassName } = useNeedleTheme();\n if (!context.isOpen) {\n return null;\n }\n\n const classes = classNames('ndl-tooltip-content', themeClassName, className, {\n 'ndl-tooltip-content-rich': context.type === 'rich',\n 'ndl-tooltip-content-simple': context.type === 'simple',\n });\n\n if (context.type === 'simple') {\n return (\n <ConditionalWrap\n shouldWrap={context.isPortaled}\n wrap={(wrapChildren) => <FloatingPortal>{wrapChildren}</FloatingPortal>}\n >\n <div\n ref={mergedRef}\n className={classes}\n style={{\n ...context.floatingStyles,\n ...style,\n }}\n {...restProps}\n {...context.getFloatingProps(htmlAttributes)}\n >\n <Typography variant=\"body-medium\">{children}</Typography>\n </div>\n </ConditionalWrap>\n );\n }\n\n return (\n <ConditionalWrap\n shouldWrap={context.isPortaled}\n wrap={(wrapChildren) => <FloatingPortal>{wrapChildren}</FloatingPortal>}\n >\n <FloatingFocusManager\n context={context.context}\n returnFocus={true}\n modal={false}\n initialFocus={-1}\n closeOnFocusOut\n >\n <div\n ref={mergedRef}\n className={classes}\n style={{\n ...context.floatingStyles,\n ...style,\n }}\n {...restProps}\n {...context.getFloatingProps(htmlAttributes)}\n >\n {children}\n </div>\n </FloatingFocusManager>\n </ConditionalWrap>\n );\n};\n\ntype TooltipHeaderProps = {\n /** Content displayed inside the header */\n children: React.ReactNode;\n /** @deprecated Use `typographyVariant` instead */\n passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof Typography>>;\n typographyVariant?: TypographyVariants;\n};\n\nconst TooltipHeader = ({\n children,\n passThroughProps,\n typographyVariant = 'subheading-medium',\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'span', TooltipHeaderProps>) => {\n const context = useTooltipContext();\n\n const classes = classNames('ndl-tooltip-header', className);\n\n if (!context.isOpen) {\n return null;\n }\n\n return (\n <Typography\n ref={ref}\n variant={typographyVariant}\n className={classes}\n style={style}\n htmlAttributes={htmlAttributes}\n {...passThroughProps}\n {...restProps}\n >\n {children}\n </Typography>\n );\n};\n\nexport type TooltipBodyProps = {\n /** Content displayed inside the body */\n children: React.ReactNode;\n /** Additional props to pass to the Typography component */\n // TODO v5: Deprecate passThroughProps and use restProps instead\n passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof Typography>>;\n};\n\nconst TooltipBody = ({\n children,\n className,\n style,\n htmlAttributes,\n passThroughProps,\n ref,\n ...restProps\n}: CommonProps<'span', TooltipBodyProps>) => {\n const context = useTooltipContext();\n\n const classes = classNames('ndl-tooltip-body', className);\n if (!context.isOpen) {\n return null;\n }\n\n return (\n <Typography\n ref={ref}\n variant=\"body-medium\"\n className={classes}\n style={style}\n htmlAttributes={htmlAttributes}\n {...passThroughProps}\n {...restProps}\n >\n {children}\n </Typography>\n );\n};\n\ntype ToolTipActionsProps = {\n /** Content displayed inside the actions container */\n children: React.ReactNode;\n};\n\nconst Actions = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', ToolTipActionsProps>) => {\n const context = useTooltipContext();\n const mergedRefs = useMergeRefs([context.refs.setFloating, ref]);\n\n if (!context.isOpen) {\n return null;\n }\n\n const classes = classNames('ndl-tooltip-actions', className);\n\n return (\n <div\n className={classes}\n ref={mergedRefs}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </div>\n );\n};\n\nconst Tooltip = Object.assign(TooltipComponent, {\n Actions: Actions,\n Body: TooltipBody,\n Content: TooltipContent,\n Header: TooltipHeader,\n Trigger: TooltipTrigger,\n});\n\nexport { Tooltip };\n"]}
1
+ {"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/tooltip/Tooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAEL,oBAAoB,EACpB,cAAc,EAGd,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,UAAU,EAA2B,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AA+B9E,MAAM,gBAAgB,GAAG,CAAC,EACxB,QAAQ,EACR,UAAU,GAAG,KAAK,EAClB,IAAI,EACJ,aAAa,EACb,SAAS,EACT,MAAM,EACN,YAAY,EACZ,UAAU,EAAE,cAAc,EAC1B,gBAAgB,EAAE,YAAY,EAC9B,UAAU,EACV,2BAA2B,EAC3B,iBAAiB,GACJ,EAAE,EAAE;IACjB,MAAM,cAAc,GAAG,iBAAiB,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CAAC;IAED,MAAM,OAAO,GAAG,UAAU,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC;IAE7D,OAAO,CACL,4BACE,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,cAEjB,QAAQ,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;IAC9C,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,cAAc;IACvB,MAAM,EAAE,aAAa;IACrB,OAAO,EAAE,cAAc;CACxB,CAAC,CAAC;AAEH,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n type AutoUpdateOptions,\n FloatingFocusManager,\n FloatingPortal,\n type Placement,\n type UseFloatingOptions,\n useMergeRefs,\n} from '@floating-ui/react';\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { cloneElement, isValidElement } from 'react';\n\nimport { type CommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { useNeedleTheme } from '../theme';\nimport { Typography, type TypographyVariants } from '../typography';\nimport { TooltipContext, useTooltip, useTooltipContext } from './use-tooltip';\n\nexport type TooltipProps = {\n /** Content displayed inside the tooltip. Wraps `Tooltip.Trigger`, `Tooltip.Content`, and optional parts */\n children: React.ReactNode;\n /** Whether the tooltip is disabled */\n isDisabled?: boolean;\n /** Whether the tooltip should be open on first render */\n isInitialOpen?: boolean;\n /** Placement of the tooltip content relative to the trigger */\n placement?: Placement;\n /** Controls the open state . If omitted, the tooltip manages its own state */\n isOpen?: boolean;\n /** Visual style of the tooltip content. `simple` renders plain text, `rich` renders a composable panel */\n type: 'simple' | 'rich';\n /** Whether the content is rendered in a portal. */\n isPortaled?: boolean;\n /** Callback fired when the open state changes, if omitted, the tooltip manages its own state using internal hooks */\n onOpenChange?: UseFloatingOptions['onOpenChange'];\n /** Positioning strategy of the tooltip. Defaults to `fixed` when inside a dialog, otherwise `absolute` */\n floatingStrategy?: 'absolute' | 'fixed';\n /** Hover open/close delays in milliseconds */\n hoverDelay?: {\n open: number;\n close: number;\n };\n /** Whether the tooltip should close when the reference element is clicked. Useful when the trigger moves after click. */\n shouldCloseOnReferenceClick?: boolean;\n autoUpdateOptions?: AutoUpdateOptions;\n};\n\nconst TooltipComponent = ({\n children,\n isDisabled = false,\n type,\n isInitialOpen,\n placement,\n isOpen,\n onOpenChange,\n isPortaled: isPortaledProp,\n floatingStrategy: strategyProp,\n hoverDelay,\n shouldCloseOnReferenceClick,\n autoUpdateOptions,\n}: TooltipProps) => {\n const isInsideDialog = useIsInsideDialog();\n const strategy = isInsideDialog ? 'fixed' : 'absolute';\n const isPortaled = !isInsideDialog;\n\n const tooltip = useTooltip({\n autoUpdateOptions,\n hoverDelay,\n isInitialOpen,\n // if isDisabled is true tooltip will not open otherwise either controlled or uncontrolled depending on if isOpen is passed\n isOpen: isDisabled === true ? false : isOpen,\n isPortaled: isPortaledProp ?? isPortaled,\n onOpenChange,\n placement,\n shouldCloseOnReferenceClick,\n strategy: strategyProp ?? strategy,\n type,\n });\n\n return (\n <TooltipContext.Provider value={tooltip}>\n {children}\n </TooltipContext.Provider>\n );\n};\n\nTooltipComponent.displayName = 'Tooltip';\n\ntype TooltipTriggerProps = {\n /** Content displayed inside the trigger element */\n children: React.ReactNode;\n /** Whether the trigger element can be any element without an extra button wrapper. The child element will be cloned with the necessary trigger props and merged refs */\n hasButtonWrapper?: boolean;\n};\n\nconst TooltipTrigger = ({\n children,\n hasButtonWrapper = false,\n htmlAttributes,\n className,\n style,\n ref,\n ...restProps\n}: CommonProps<'button', TooltipTriggerProps>) => {\n const context = useTooltipContext();\n\n // Example from floating-ui\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n const childrenProps = (children as any).props;\n const mergedRefs = useMergeRefs([\n context.refs.setReference,\n ref,\n childrenProps?.ref,\n ]);\n\n const triggerClasses = classNames(\n {\n 'ndl-closed': !context.isOpen,\n 'ndl-open': context.isOpen,\n },\n 'ndl-tooltip-trigger',\n className,\n );\n\n // `hasButtonWrapper=true` allows the user to pass any element as the anchor\n if (hasButtonWrapper && isValidElement(children)) {\n const props: Record<string, unknown> = {\n className: triggerClasses,\n ...htmlAttributes,\n ...childrenProps,\n ref: mergedRefs,\n };\n return cloneElement(children, context.getReferenceProps(props));\n }\n\n return (\n <button\n className={triggerClasses}\n style={style}\n ref={mergedRefs}\n {...context.getReferenceProps(htmlAttributes)}\n {...restProps}\n >\n {children}\n </button>\n );\n};\n\ntype TooltipContentProps = {\n /** Content displayed inside the tooltip */\n children: React.ReactNode;\n};\n\nconst TooltipContent = ({\n children,\n style,\n htmlAttributes,\n className,\n ref,\n ...restProps\n}: CommonProps<'div', TooltipContentProps>) => {\n const context = useTooltipContext();\n const mergedRef = useMergeRefs([context.refs.setFloating, ref]);\n const { themeClassName } = useNeedleTheme();\n if (!context.isOpen) {\n return null;\n }\n\n const classes = classNames('ndl-tooltip-content', themeClassName, className, {\n 'ndl-tooltip-content-rich': context.type === 'rich',\n 'ndl-tooltip-content-simple': context.type === 'simple',\n });\n\n if (context.type === 'simple') {\n return (\n <ConditionalWrap\n shouldWrap={context.isPortaled}\n wrap={(wrapChildren) => <FloatingPortal>{wrapChildren}</FloatingPortal>}\n >\n <div\n ref={mergedRef}\n className={classes}\n style={{\n ...context.floatingStyles,\n ...style,\n }}\n {...restProps}\n {...context.getFloatingProps(htmlAttributes)}\n >\n <Typography variant=\"body-medium\">{children}</Typography>\n </div>\n </ConditionalWrap>\n );\n }\n\n return (\n <ConditionalWrap\n shouldWrap={context.isPortaled}\n wrap={(wrapChildren) => <FloatingPortal>{wrapChildren}</FloatingPortal>}\n >\n <FloatingFocusManager\n context={context.context}\n returnFocus={true}\n modal={false}\n initialFocus={-1}\n closeOnFocusOut\n >\n <div\n ref={mergedRef}\n className={classes}\n style={{\n ...context.floatingStyles,\n ...style,\n }}\n {...restProps}\n {...context.getFloatingProps(htmlAttributes)}\n >\n {children}\n </div>\n </FloatingFocusManager>\n </ConditionalWrap>\n );\n};\n\ntype TooltipHeaderProps = {\n /** Content displayed inside the header */\n children: React.ReactNode;\n /** @deprecated Use `typographyVariant` instead */\n passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof Typography>>;\n typographyVariant?: TypographyVariants;\n};\n\nconst TooltipHeader = ({\n children,\n passThroughProps,\n typographyVariant = 'subheading-medium',\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'span', TooltipHeaderProps>) => {\n const context = useTooltipContext();\n\n const classes = classNames('ndl-tooltip-header', className);\n\n if (!context.isOpen) {\n return null;\n }\n\n return (\n <Typography\n ref={ref}\n variant={typographyVariant}\n className={classes}\n style={style}\n htmlAttributes={htmlAttributes}\n {...passThroughProps}\n {...restProps}\n >\n {children}\n </Typography>\n );\n};\n\nexport type TooltipBodyProps = {\n /** Content displayed inside the body */\n children: React.ReactNode;\n /** Additional props to pass to the Typography component */\n // TODO v5: Deprecate passThroughProps and use restProps instead\n passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof Typography>>;\n};\n\nconst TooltipBody = ({\n children,\n className,\n style,\n htmlAttributes,\n passThroughProps,\n ref,\n ...restProps\n}: CommonProps<'span', TooltipBodyProps>) => {\n const context = useTooltipContext();\n\n const classes = classNames('ndl-tooltip-body', className);\n if (!context.isOpen) {\n return null;\n }\n\n return (\n <Typography\n ref={ref}\n variant=\"body-medium\"\n className={classes}\n style={style}\n htmlAttributes={htmlAttributes}\n {...passThroughProps}\n {...restProps}\n >\n {children}\n </Typography>\n );\n};\n\ntype ToolTipActionsProps = {\n /** Content displayed inside the actions container */\n children: React.ReactNode;\n};\n\nconst Actions = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', ToolTipActionsProps>) => {\n const context = useTooltipContext();\n const mergedRefs = useMergeRefs([context.refs.setFloating, ref]);\n\n if (!context.isOpen) {\n return null;\n }\n\n const classes = classNames('ndl-tooltip-actions', className);\n\n return (\n <div\n className={classes}\n ref={mergedRefs}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </div>\n );\n};\n\nconst Tooltip = Object.assign(TooltipComponent, {\n Actions: Actions,\n Body: TooltipBody,\n Content: TooltipContent,\n Header: TooltipHeader,\n Trigger: TooltipTrigger,\n});\n\nexport { Tooltip };\n"]}
@@ -22,7 +22,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
22
  import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { Tooltip } from '@neo4j-ndl/react';
24
24
  const Component = () => {
25
- return (_jsxs(Tooltip, { type: "simple", hoverDelay: { open: 200, close: 200 }, children: [_jsx(Tooltip.Trigger, { children: "Hover me!" }), _jsx(Tooltip.Content, { children: "This is a tooltip!" })] }));
25
+ return (_jsxs(Tooltip, { type: "simple", hoverDelay: { close: 200, open: 200 }, children: [_jsx(Tooltip.Trigger, { children: "Hover me!" }), _jsx(Tooltip.Content, { children: "This is a tooltip!" })] }));
26
26
  };
27
27
  export default Component;
28
28
  //# sourceMappingURL=tooltip-hover-delay.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip-hover-delay.story.js","sourceRoot":"","sources":["../../../../src/tooltip/stories/tooltip-hover-delay.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,MAAC,OAAO,IAAC,IAAI,EAAC,QAAQ,EAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,aAC1D,KAAC,OAAO,CAAC,OAAO,4BAA4B,EAC5C,KAAC,OAAO,CAAC,OAAO,qCAAqC,IAC7C,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Tooltip } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <Tooltip type=\"simple\" hoverDelay={{ open: 200, close: 200 }}>\n <Tooltip.Trigger>Hover me!</Tooltip.Trigger>\n <Tooltip.Content>This is a tooltip!</Tooltip.Content>\n </Tooltip>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"tooltip-hover-delay.story.js","sourceRoot":"","sources":["../../../../src/tooltip/stories/tooltip-hover-delay.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,MAAC,OAAO,IAAC,IAAI,EAAC,QAAQ,EAAC,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,aAC1D,KAAC,OAAO,CAAC,OAAO,4BAA4B,EAC5C,KAAC,OAAO,CAAC,OAAO,qCAAqC,IAC7C,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Tooltip } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <Tooltip type=\"simple\" hoverDelay={{ close: 200, open: 200 }}>\n <Tooltip.Trigger>Hover me!</Tooltip.Trigger>\n <Tooltip.Content>This is a tooltip!</Tooltip.Content>\n </Tooltip>\n );\n};\n\nexport default Component;\n"]}
@@ -23,14 +23,14 @@ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { FilledButton, Tooltip } from '@neo4j-ndl/react';
24
24
  const Component = () => {
25
25
  const placements = [
26
- { placement: 'top', label: 'Top' },
27
- { placement: 'bottom', label: 'Bottom' },
28
- { placement: 'left', label: 'Left' },
29
- { placement: 'right', label: 'Right' },
30
- { placement: 'top-start', label: 'Top Start' },
31
- { placement: 'top-end', label: 'Top End' },
32
- { placement: 'bottom-start', label: 'Bottom Start' },
33
- { placement: 'bottom-end', label: 'Bottom End' },
26
+ { label: 'Top', placement: 'top' },
27
+ { label: 'Bottom', placement: 'bottom' },
28
+ { label: 'Left', placement: 'left' },
29
+ { label: 'Right', placement: 'right' },
30
+ { label: 'Top Start', placement: 'top-start' },
31
+ { label: 'Top End', placement: 'top-end' },
32
+ { label: 'Bottom Start', placement: 'bottom-start' },
33
+ { label: 'Bottom End', placement: 'bottom-end' },
34
34
  ];
35
35
  return (_jsx("div", { className: "n-grid n-grid-cols-4 n-gap-token-16 n-p-token-16 n-place-items-center", children: placements.map(({ placement, label }) => (_jsxs(Tooltip, { type: "simple", placement: placement, children: [_jsx(Tooltip.Trigger, { hasButtonWrapper: true, children: _jsx(FilledButton, { size: "small", children: label }) }), _jsxs(Tooltip.Content, { children: ["Tooltip on ", label.toLowerCase()] })] }, placement))) }));
36
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip-placements.story.js","sourceRoot":"","sources":["../../../../src/tooltip/stories/tooltip-placements.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEzD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,UAAU,GAAG;QACjB,EAAE,SAAS,EAAE,KAAc,EAAE,KAAK,EAAE,KAAK,EAAE;QAC3C,EAAE,SAAS,EAAE,QAAiB,EAAE,KAAK,EAAE,QAAQ,EAAE;QACjD,EAAE,SAAS,EAAE,MAAe,EAAE,KAAK,EAAE,MAAM,EAAE;QAC7C,EAAE,SAAS,EAAE,OAAgB,EAAE,KAAK,EAAE,OAAO,EAAE;QAC/C,EAAE,SAAS,EAAE,WAAoB,EAAE,KAAK,EAAE,WAAW,EAAE;QACvD,EAAE,SAAS,EAAE,SAAkB,EAAE,KAAK,EAAE,SAAS,EAAE;QACnD,EAAE,SAAS,EAAE,cAAuB,EAAE,KAAK,EAAE,cAAc,EAAE;QAC7D,EAAE,SAAS,EAAE,YAAqB,EAAE,KAAK,EAAE,YAAY,EAAE;KAC1D,CAAC;IAEF,OAAO,CACL,cAAK,SAAS,EAAC,uEAAuE,YACnF,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACxC,MAAC,OAAO,IAAiB,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,SAAS,aACzD,KAAC,OAAO,CAAC,OAAO,IAAC,gBAAgB,kBAC/B,KAAC,YAAY,IAAC,IAAI,EAAC,OAAO,YAAE,KAAK,GAAgB,GACjC,EAClB,MAAC,OAAO,CAAC,OAAO,8BAAa,KAAK,CAAC,WAAW,EAAE,IAAmB,KAJvD,SAAS,CAKb,CACX,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, Tooltip } from '@neo4j-ndl/react';\n\nconst Component = () => {\n const placements = [\n { placement: 'top' as const, label: 'Top' },\n { placement: 'bottom' as const, label: 'Bottom' },\n { placement: 'left' as const, label: 'Left' },\n { placement: 'right' as const, label: 'Right' },\n { placement: 'top-start' as const, label: 'Top Start' },\n { placement: 'top-end' as const, label: 'Top End' },\n { placement: 'bottom-start' as const, label: 'Bottom Start' },\n { placement: 'bottom-end' as const, label: 'Bottom End' },\n ];\n\n return (\n <div className=\"n-grid n-grid-cols-4 n-gap-token-16 n-p-token-16 n-place-items-center\">\n {placements.map(({ placement, label }) => (\n <Tooltip key={placement} type=\"simple\" placement={placement}>\n <Tooltip.Trigger hasButtonWrapper>\n <FilledButton size=\"small\">{label}</FilledButton>\n </Tooltip.Trigger>\n <Tooltip.Content>Tooltip on {label.toLowerCase()}</Tooltip.Content>\n </Tooltip>\n ))}\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"tooltip-placements.story.js","sourceRoot":"","sources":["../../../../src/tooltip/stories/tooltip-placements.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEzD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,UAAU,GAAG;QACjB,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,KAAc,EAAE;QAC3C,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAiB,EAAE;QACjD,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAe,EAAE;QAC7C,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,OAAgB,EAAE;QAC/C,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAoB,EAAE;QACvD,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAkB,EAAE;QACnD,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,cAAuB,EAAE;QAC7D,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,YAAqB,EAAE;KAC1D,CAAC;IAEF,OAAO,CACL,cAAK,SAAS,EAAC,uEAAuE,YACnF,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACxC,MAAC,OAAO,IAAiB,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,SAAS,aACzD,KAAC,OAAO,CAAC,OAAO,IAAC,gBAAgB,kBAC/B,KAAC,YAAY,IAAC,IAAI,EAAC,OAAO,YAAE,KAAK,GAAgB,GACjC,EAClB,MAAC,OAAO,CAAC,OAAO,8BAAa,KAAK,CAAC,WAAW,EAAE,IAAmB,KAJvD,SAAS,CAKb,CACX,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, Tooltip } from '@neo4j-ndl/react';\n\nconst Component = () => {\n const placements = [\n { label: 'Top', placement: 'top' as const },\n { label: 'Bottom', placement: 'bottom' as const },\n { label: 'Left', placement: 'left' as const },\n { label: 'Right', placement: 'right' as const },\n { label: 'Top Start', placement: 'top-start' as const },\n { label: 'Top End', placement: 'top-end' as const },\n { label: 'Bottom Start', placement: 'bottom-start' as const },\n { label: 'Bottom End', placement: 'bottom-end' as const },\n ];\n\n return (\n <div className=\"n-grid n-grid-cols-4 n-gap-token-16 n-p-token-16 n-place-items-center\">\n {placements.map(({ placement, label }) => (\n <Tooltip key={placement} type=\"simple\" placement={placement}>\n <Tooltip.Trigger hasButtonWrapper>\n <FilledButton size=\"small\">{label}</FilledButton>\n </Tooltip.Trigger>\n <Tooltip.Content>Tooltip on {label.toLowerCase()}</Tooltip.Content>\n </Tooltip>\n ))}\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -24,160 +24,160 @@ import isChromatic from 'chromatic/isChromatic';
24
24
  import { Tooltip } from '../../index';
25
25
  import { TooltipControlled, TooltipControlledSource, TooltipDefault, TooltipDefaultSource, TooltipDisabled, TooltipDisabledSource, TooltipHoverDelay, TooltipHoverDelaySource, TooltipInDialog, TooltipInDialogSource, TooltipInitialOpen, TooltipInitialOpenSource, TooltipPlacements, TooltipPlacementsSource, TooltipRich, TooltipRichLink, TooltipRichLinkSource, TooltipRichSource, TooltipTriggerButtonWrapper, TooltipTriggerButtonWrapperSource, TooltipWithKeyboardShortcut, TooltipWithKeyboardShortcutSource, } from '.';
26
26
  const componentMeta = {
27
- title: 'Components/Tooltip',
28
- id: 'components-tooltip',
29
27
  component: Tooltip,
30
- tags: ['docsPage'],
31
- parameters: {
32
- controls: { disable: true },
33
- chromatic: { delay: 1000 },
34
- },
35
28
  decorators: [
36
29
  (Story) => (_jsx("div", { className: "n-flex n-justify-center ", children: _jsx(Story, {}) })),
37
30
  ],
31
+ id: 'components-tooltip',
32
+ parameters: {
33
+ chromatic: { delay: 1000 },
34
+ controls: { disable: true },
35
+ },
36
+ tags: ['docsPage'],
37
+ title: 'Components/Tooltip',
38
38
  };
39
39
  export default componentMeta;
40
40
  export const Default = {
41
41
  args: { isOpen: isChromatic() },
42
- render: TooltipDefault,
43
42
  parameters: {
44
43
  docs: {
45
44
  source: {
45
+ code: TooltipDefaultSource,
46
46
  language: 'tsx',
47
47
  type: 'code',
48
- code: TooltipDefaultSource,
49
48
  },
50
49
  },
51
50
  },
51
+ render: TooltipDefault,
52
52
  };
53
53
  export const Disabled = {
54
54
  args: {},
55
- render: TooltipDisabled,
56
55
  parameters: {
57
56
  docs: {
58
57
  source: {
58
+ code: TooltipDisabledSource,
59
59
  language: 'tsx',
60
60
  type: 'code',
61
- code: TooltipDisabledSource,
62
61
  },
63
62
  },
64
63
  },
64
+ render: TooltipDisabled,
65
65
  };
66
66
  export const InitialOpen = {
67
67
  args: {},
68
- render: TooltipInitialOpen,
69
68
  parameters: {
70
69
  docs: {
71
70
  source: {
71
+ code: TooltipInitialOpenSource,
72
72
  language: 'tsx',
73
73
  type: 'code',
74
- code: TooltipInitialOpenSource,
75
74
  },
76
75
  },
77
76
  },
77
+ render: TooltipInitialOpen,
78
78
  };
79
79
  export const HoverDelay = {
80
80
  args: {},
81
- render: TooltipHoverDelay,
82
81
  parameters: {
83
82
  docs: {
84
83
  source: {
84
+ code: TooltipHoverDelaySource,
85
85
  language: 'tsx',
86
86
  type: 'code',
87
- code: TooltipHoverDelaySource,
88
87
  },
89
88
  },
90
89
  },
90
+ render: TooltipHoverDelay,
91
91
  };
92
92
  export const TriggerButtonWrapper = {
93
93
  args: {},
94
- render: TooltipTriggerButtonWrapper,
95
94
  parameters: {
96
95
  docs: {
97
96
  source: {
97
+ code: TooltipTriggerButtonWrapperSource,
98
98
  language: 'tsx',
99
99
  type: 'code',
100
- code: TooltipTriggerButtonWrapperSource,
101
100
  },
102
101
  },
103
102
  },
103
+ render: TooltipTriggerButtonWrapper,
104
104
  };
105
105
  export const Controlled = {
106
106
  args: { isOpen: isChromatic() },
107
- render: TooltipControlled,
108
107
  parameters: {
109
108
  docs: {
110
109
  source: {
110
+ code: TooltipControlledSource,
111
111
  language: 'tsx',
112
112
  type: 'code',
113
- code: TooltipControlledSource,
114
113
  },
115
114
  },
116
115
  },
116
+ render: TooltipControlled,
117
117
  };
118
118
  export const Placements = {
119
119
  args: {},
120
- render: TooltipPlacements,
121
120
  parameters: {
122
121
  docs: {
123
122
  source: {
123
+ code: TooltipPlacementsSource,
124
124
  language: 'tsx',
125
125
  type: 'code',
126
- code: TooltipPlacementsSource,
127
126
  },
128
127
  },
129
128
  },
129
+ render: TooltipPlacements,
130
130
  };
131
131
  export const InDialog = {
132
132
  args: { isOpen: isChromatic() },
133
- render: TooltipInDialog,
134
133
  parameters: {
135
134
  docs: {
136
135
  source: {
136
+ code: TooltipInDialogSource,
137
137
  language: 'tsx',
138
138
  type: 'code',
139
- code: TooltipInDialogSource,
140
139
  },
141
140
  },
142
141
  },
142
+ render: TooltipInDialog,
143
143
  };
144
144
  export const Rich = {
145
145
  args: {},
146
- render: TooltipRich,
147
146
  parameters: {
148
147
  docs: {
149
148
  source: {
149
+ code: TooltipRichSource,
150
150
  language: 'tsx',
151
151
  type: 'code',
152
- code: TooltipRichSource,
153
152
  },
154
153
  },
155
154
  },
155
+ render: TooltipRich,
156
156
  };
157
157
  export const RichWithLink = {
158
158
  args: {},
159
- render: TooltipRichLink,
160
159
  parameters: {
161
160
  docs: {
162
161
  source: {
162
+ code: TooltipRichLinkSource,
163
163
  language: 'tsx',
164
164
  type: 'code',
165
- code: TooltipRichLinkSource,
166
165
  },
167
166
  },
168
167
  },
168
+ render: TooltipRichLink,
169
169
  };
170
170
  export const WithKeyboardShortcut = {
171
171
  args: {},
172
- render: TooltipWithKeyboardShortcut,
173
172
  parameters: {
174
173
  docs: {
175
174
  source: {
175
+ code: TooltipWithKeyboardShortcutSource,
176
176
  language: 'tsx',
177
177
  type: 'code',
178
- code: TooltipWithKeyboardShortcutSource,
179
178
  },
180
179
  },
181
180
  },
181
+ render: TooltipWithKeyboardShortcut,
182
182
  };
183
183
  //# sourceMappingURL=tooltip.stories.js.map