@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":"datagrid-kitchen-sink.story.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-kitchen-sink.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAkD;AAClD,kDAA8D;AAC9D,uDAS+B;AAC/B,+BAAyC;AAGzC,6CAA+C;AAQ/C,MAAM,YAAY,GAAG,IAAA,gCAAkB,GAAkB,CAAC;AAE1D,MAAM,aAAa,GAAwC;IACzD,aAAa,EAAE;QACb,OAAO,EAAE;YACP;gBACE,OAAO,EAAE,GAAG,EAAE;oBACZ,KAAK,CAAC,kBAAkB,CAAC,CAAC;gBAC5B,CAAC;gBACD,KAAK,EAAE,uBAAuB;aAC/B;SACF;KACF;CACF,CAAC;AAKF,MAAM,cAAc,GAAG,CAAC,OAA+B,EAAE,EAAE;IACzD,8DAA8D;IAC9D,MAAM,OAAO,GAAqC;QAChD,YAAY,CAAC,QAAQ,CAAC,MAAM,EAAE;YAC5B,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC/B,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,GAAG;YACZ,IAAI,EAAE,GAAG;SACV,CAAC;QACF,YAAY,CAAC,QAAQ,CAAC,KAAK,kBACzB,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,EAC/B,MAAM,EAAE,GAAG,EAAE,CAAC,kDAAc,EAC5B,OAAO,EAAE,EA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,4BAA4B;SAC7B,CAAC,EACF,aAAa,EAAE,IAAI,EACnB,iBAAiB,EAAE,IAAA,+BAAiB,GAAE,IACtC,CAAC;IAEH,OAAO,CACL,iCAAK,SAAS,EAAC,yDAAyD,aACtE,uBAAC,WAAI,IAAC,MAAM,SAAG,EACf,uBAAC,gBAAQ,IACP,WAAW,EAAE,IAAI,EACjB,aAAa,EAAE,KAAK,EACpB,mBAAmB,EAAE,mBAAmB,EACxC,OAAO,EAAE;oBACP,WAAW,EAAE,WAA0B;oBACvC,gBAAgB;oBAChB,WAAW,EAAE,WAA0B;iBACxC,GACD,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { DataGrid, Menu } from '@neo4j-ndl/react';\nimport { ChevronDownIconSolid } from '@neo4j-ndl/react/icons';\nimport {\n type ColumnDef,\n type ColumnMeta,\n createColumnHelper,\n getCoreRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n type TableOptions,\n useReactTable,\n} from '@tanstack/react-table';\nimport { Leva, useControls } from 'leva';\n\nimport { type BorderStyle, type HeaderStyle } from '../DataGrid';\nimport { TABLE_DEMO_DATA } from './staticData';\n\ntype TestDataFormat = {\n name: string;\n age: number;\n cypherCommand: string;\n};\n\nconst columnHelper = createColumnHelper<TestDataFormat>();\n\nconst ColumnActions: ColumnMeta<TestDataFormat, unknown> = {\n columnActions: {\n actions: [\n {\n onClick: () => {\n alert('Action triggered');\n },\n title: 'Example Column Action',\n },\n ],\n },\n};\n\ntype ColumnGeneratorOptions = {\n shouldIncludeRowActionColumn: boolean;\n};\nconst COMMON_COLUMNS = (options: ColumnGeneratorOptions) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const columns: ColumnDef<TestDataFormat, any>[] = [\n columnHelper.accessor('name', {\n cell: (info) => info.getValue(),\n maxSize: 300,\n minSize: 180,\n size: 220,\n }),\n columnHelper.accessor('age', {\n cell: (info) => info.getValue(),\n header: () => <div>Age</div>,\n minSize: 80,\n ...(options.shouldIncludeRowActionColumn\n ? {\n meta: {\n ...ColumnActions,\n },\n }\n : {}),\n }),\n columnHelper.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n minSize: 400,\n size: 400,\n }),\n ];\n\n if (options.shouldIncludeRowActionColumn) {\n columns.push(\n columnHelper.display({\n cell: (cell) => {\n const isSpecialRow =\n cell.row.original.name === TABLE_DEMO_DATA[3].name || undefined;\n return (\n <DataGrid.ActionCell\n cell={cell}\n innerCleanIconButtonProps={{\n children: isSpecialRow && <ChevronDownIconSolid />,\n description: `Actions for ${cell.row.original.name}`,\n }}\n innerMenuProps={\n isSpecialRow && {\n children: <Menu.Item title=\"Custom icon and menu props\" />,\n }\n }\n />\n );\n },\n id: 'actions',\n meta: {\n isActionCell: {\n actions: [\n {\n onClick: (_event, cell) => {\n alert(\n `Row Action triggered for row with index: ${\n cell.row.index\n }`,\n );\n },\n title: 'Example Row Action',\n },\n ],\n onOpenChange: (open) => console.info(`onOpenChange: ${open}`),\n },\n },\n }),\n );\n }\n\n return columns;\n};\n\nconst COMMON_TABLE_PROPS = {\n columnResizeMode: 'onChange',\n data: TABLE_DEMO_DATA,\n // https://tanstack.com/table/v8/docs/guide/column-sizing#overview\n defaultColumn: {\n minSize: 80,\n },\n enableSorting: false,\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n initialState: {\n pagination: {\n pageSize: 5,\n },\n },\n meta: {\n actions: [\n {\n onClick: () => {\n alert('wowowow');\n },\n title: \"Let's party\",\n },\n ],\n },\n} as Omit<TableOptions<TestDataFormat>, 'columns'>;\n\nconst Component = () => {\n const {\n keyboard: isKeyboardNavigable,\n zebraStriping: hasZebraStriping,\n borderStyle,\n headerStyle,\n includeRowActionColumn: shouldIncludeRowActionColumn,\n } = useControls({\n borderStyle: {\n options: ['all-sides', 'horizontal', 'vertical', 'none'],\n value: 'all-sides',\n },\n headerStyle: {\n options: ['filled', 'clean'],\n value: 'filled',\n },\n includeRowActionColumn: false,\n keyboard: false,\n zebraStriping: false,\n });\n\n const table = useReactTable({\n ...COMMON_TABLE_PROPS,\n columns: COMMON_COLUMNS({\n shouldIncludeRowActionColumn,\n }),\n enableSorting: true,\n getSortedRowModel: getSortedRowModel(),\n });\n\n return (\n <div className=\"n-h-[1000px] n-w-full n-bg-primary-bg-weak n-p-token-32\">\n <Leva isRoot />\n <DataGrid\n isResizable={true}\n tableInstance={table}\n isKeyboardNavigable={isKeyboardNavigable}\n styling={{\n borderStyle: borderStyle as BorderStyle,\n hasZebraStriping,\n headerStyle: headerStyle as HeaderStyle,\n }}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"datagrid-kitchen-sink.story.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-kitchen-sink.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAkD;AAClD,kDAA8D;AAC9D,uDAS+B;AAC/B,+BAAyC;AAGzC,6CAA+C;AAQ/C,MAAM,YAAY,GAAG,IAAA,gCAAkB,GAAkB,CAAC;AAE1D,MAAM,aAAa,GAAwC;IACzD,aAAa,EAAE;QACb,OAAO,EAAE;YACP;gBACE,OAAO,EAAE,GAAG,EAAE;oBACZ,KAAK,CAAC,k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AAG,EAAE;IACrB,MAAM,EACJ,QAAQ,EAAE,mBAAmB,EAC7B,aAAa,EAAE,gBAAgB,EAC/B,WAAW,EACX,WAAW,EACX,sBAAsB,EAAE,4BAA4B,GACrD,GAAG,IAAA,kBAAW,EAAC;QACd,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,CAAC;YACxD,KAAK,EAAE,WAAW;SACnB;QACD,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;YAC5B,KAAK,EAAE,QAAQ;SAChB;QACD,sBAAsB,EAAE,KAAK;QAC7B,QAAQ,EAAE,KAAK;QACf,aAAa,EAAE,KAAK;KACrB,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,IAAA,2BAAa,kCACtB,kBAAkB,KACrB,OAAO,EAAE,cAAc,CAAC;YACtB,4BAA4B;SAC7B,CAAC,EACF,aAAa,EAAE,IAAI,EACnB,iBAAiB,EAAE,IAAA,+BAAiB,GAAE,IACtC,CAAC;IAEH,OAAO,CACL,iCAAK,SAAS,EAAC,yDAAyD,aACtE,uBAAC,WAAI,IAAC,MAAM,SAAG,EACf,uBAAC,gBAAQ,IACP,WAAW,EAAE,IAAI,EACjB,aAAa,EAAE,KAAK,EACpB,mBAAmB,EAAE,mBAAmB,EACxC,OAAO,EAAE;oBACP,WAAW,EAAE,WAA0B;oBACvC,gBAAgB;oBAChB,WAAW,EAAE,WAA0B;iBACxC,GACD,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { DataGrid, Menu } from '@neo4j-ndl/react';\nimport { ChevronDownIconSolid } from '@neo4j-ndl/react/icons';\nimport {\n type ColumnDef,\n type ColumnMeta,\n createColumnHelper,\n getCoreRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n type TableOptions,\n useReactTable,\n} from '@tanstack/react-table';\nimport { Leva, useControls } from 'leva';\n\nimport { type BorderStyle, type HeaderStyle } from '../DataGrid';\nimport { TABLE_DEMO_DATA } from './staticData';\n\ntype TestDataFormat = {\n name: string;\n age: number;\n cypherCommand: string;\n};\n\nconst columnHelper = createColumnHelper<TestDataFormat>();\n\nconst ColumnActions: ColumnMeta<TestDataFormat, unknown> = {\n columnActions: {\n actions: [\n {\n onClick: () => {\n alert('Action triggered');\n },\n title: 'Example Column Action',\n },\n ],\n },\n};\n\ntype ColumnGeneratorOptions = {\n shouldIncludeRowActionColumn: boolean;\n};\nconst COMMON_COLUMNS = (options: ColumnGeneratorOptions) => {\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n const columns: ColumnDef<TestDataFormat, any>[] = [\n columnHelper.accessor('name', {\n cell: (info) => info.getValue(),\n maxSize: 300,\n minSize: 180,\n size: 220,\n }),\n columnHelper.accessor('age', {\n cell: (info) => info.getValue(),\n header: () => <div>Age</div>,\n minSize: 80,\n ...(options.shouldIncludeRowActionColumn\n ? {\n meta: {\n ...ColumnActions,\n },\n }\n : {}),\n }),\n columnHelper.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n minSize: 400,\n size: 400,\n }),\n ];\n\n if (options.shouldIncludeRowActionColumn) {\n columns.push(\n columnHelper.display({\n cell: (cell) => {\n const isSpecialRow =\n cell.row.original.name === TABLE_DEMO_DATA[3].name || undefined;\n return (\n <DataGrid.ActionCell\n cell={cell}\n innerCleanIconButtonProps={{\n children: isSpecialRow && <ChevronDownIconSolid />,\n description: `Actions for ${cell.row.original.name}`,\n }}\n innerMenuProps={\n isSpecialRow && {\n children: <Menu.Item title=\"Custom icon and menu props\" />,\n }\n }\n />\n );\n },\n id: 'actions',\n meta: {\n isActionCell: {\n actions: [\n {\n onClick: (_event, cell) => {\n alert(\n `Row Action triggered for row with index: ${\n cell.row.index\n }`,\n );\n },\n title: 'Example Row Action',\n },\n ],\n onOpenChange: (open) => console.info(`onOpenChange: ${open}`),\n },\n },\n }),\n );\n }\n\n return columns;\n};\n\nconst COMMON_TABLE_PROPS = {\n columnResizeMode: 'onChange',\n data: TABLE_DEMO_DATA,\n // https://tanstack.com/table/v8/docs/guide/column-sizing#overview\n defaultColumn: {\n minSize: 80,\n },\n enableSorting: false,\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n initialState: {\n pagination: {\n pageSize: 5,\n },\n },\n meta: {\n actions: [\n {\n onClick: () => {\n alert('wowowow');\n },\n title: \"Let's party\",\n },\n ],\n },\n} as Omit<TableOptions<TestDataFormat>, 'columns'>;\n\nconst Component = () => {\n const {\n keyboard: isKeyboardNavigable,\n zebraStriping: hasZebraStriping,\n borderStyle,\n headerStyle,\n includeRowActionColumn: shouldIncludeRowActionColumn,\n } = useControls({\n borderStyle: {\n options: ['all-sides', 'horizontal', 'vertical', 'none'],\n value: 'all-sides',\n },\n headerStyle: {\n options: ['filled', 'clean'],\n value: 'filled',\n },\n includeRowActionColumn: false,\n keyboard: false,\n zebraStriping: false,\n });\n\n const table = useReactTable({\n ...COMMON_TABLE_PROPS,\n columns: COMMON_COLUMNS({\n shouldIncludeRowActionColumn,\n }),\n enableSorting: true,\n getSortedRowModel: getSortedRowModel(),\n });\n\n return (\n <div className=\"n-h-[1000px] n-w-full n-bg-primary-bg-weak n-p-token-32\">\n <Leva isRoot />\n <DataGrid\n isResizable={true}\n tableInstance={table}\n isKeyboardNavigable={isKeyboardNavigable}\n styling={{\n borderStyle: borderStyle as BorderStyle,\n hasZebraStriping,\n headerStyle: headerStyle as HeaderStyle,\n }}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  const jsx_runtime_1 = require("react/jsx-runtime");
15
4
  /**
@@ -74,18 +63,6 @@ const columns = [
74
63
  cell: (info) => info.getValue(),
75
64
  }),
76
65
  ];
77
- const CustomHeaderCell = (_a) => {
78
- var { htmlAttributes, cell } = _a, restProps = __rest(_a, ["htmlAttributes", "cell"]);
79
- const tabIndex = cell.index === 0 ? 0 : -1;
80
- return ((0, jsx_runtime_1.jsx)(react_1.DataGrid.HeaderCell, Object.assign({}, restProps, { cell: cell, htmlAttributes: Object.assign(Object.assign(Object.assign({}, htmlAttributes), { tabIndex: tabIndex }), (cell.index === 0
81
- ? {
82
- role: 'presentation',
83
- style: {
84
- pointerEvents: 'none',
85
- },
86
- }
87
- : {})) })));
88
- };
89
66
  const CustomBodyRow = ({ row, }) => {
90
67
  const { components } = (0, react_1.useDataGridContext)();
91
68
  return ((0, jsx_runtime_1.jsx)("div", { role: "row", className: "ndl-data-grid-tr", children: row.getVisibleCells().map((cell) => components.BodyCell && ((0, jsx_runtime_1.jsx)(components.BodyCell, { cell: cell, htmlAttributes: {
@@ -109,7 +86,6 @@ const Component = () => {
109
86
  });
110
87
  return ((0, jsx_runtime_1.jsx)("div", { className: "n-w-full", children: (0, jsx_runtime_1.jsx)(react_1.DataGrid, { components: {
111
88
  BodyRow: CustomBodyRow,
112
- HeaderCell: CustomHeaderCell,
113
89
  Navigation: null,
114
90
  }, isKeyboardNavigable: false, isResizable: false, tableInstance: table }) }));
115
91
  };
@@ -1 +1 @@
1
- {"version":3,"file":"datagrid-single-selectable.story.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-single-selectable.story.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAuE;AACvE,uDAK+B;AAS/B,MAAM,YAAY,GAAG,IAAA,gCAAkB,GAAgB,CAAC;AAExD,MAAM,YAAY,GAAmB;IACnC;QACE,QAAQ,EAAE,CAAC;QACX,EAAE,EAAE,CAAC;QACL,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,OAAO;KACjB;IACD;QACE,QAAQ,EAAE,CAAC;QACX,EAAE,EAAE,CAAC;QACL,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,OAAO;KACjB;IACD;QACE,QAAQ,EAAE,CAAC;QACX,EAAE,EAAE,CAAC;QACL,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,OAAO;KACjB;CACF,CAAC;AAEF,MAAM,OAAO,GAAG;IACd,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE;QAC1B,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CACvB,uBAAC,aAAK,IACJ,SAAS,EAAE,SAAS,IAAI,CAAC,QAAQ,EAAE,EAAE,EACrC,SAAS,EAAE,GAAG,CAAC,aAAa,EAAE,GAC9B,CACH;QACD,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI;QAClB,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,EAAE;KACT,CAAC;IACF,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE;QAC9B,IAAI,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,CACrB,uBAAC,UAAU,CAAC,QAAQ,IAElB,IAAI,EAAE,IAAI,EACV,cAAc,EAAE;gBACd,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;aACxD,IAJI,IAAI,CAAC,EAAE,CAKZ,CACH,CACJ,IAZO,GAAG,CAAC,EAAE,CAaV,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,KAAK,GAAG,IAAA,2BAAa,EAAC;QAC1B,gBAAgB,EAAE,UAAU;QAC5B,OAAO;QACP,IAAI,EAAE,YAAY;QAClB,uBAAuB,EAAE,KAAK;QAC9B,aAAa,EAAE,KAAK;QACpB,eAAe,EAAE,IAAA,6BAAe,GAAE;QAClC,qBAAqB,EAAE,IAAA,mCAAqB,GAAE;QAC9C,YAAY,EAAE;YACZ,YAAY,EAAE;gBACZ,CAAC,EAAE,IAAI;aACR;SACF;KACF,CAAC,CAAC;IAEH,OAAO,CACL,gCAAK,SAAS,EAAC,UAAU,YACvB,uBAAC,gBAAQ,IACP,UAAU,EAAE;gBACV,OAAO,EAAE,aAAa;gBACtB,UAAU,EAAE,gBAAgB;gBAC5B,UAAU,EAAE,IAAI;aACjB,EACD,mBAAmB,EAAE,KAAK,EAC1B,WAAW,EAAE,KAAK,EAClB,aAAa,EAAE,KAAK,GACpB,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { DataGrid, Radio, useDataGridContext } from '@neo4j-ndl/react';\nimport {\n createColumnHelper,\n getCoreRowModel,\n getPaginationRowModel,\n useReactTable,\n} from '@tanstack/react-table';\n\ntype PricingEntry = {\n cpuCount: number;\n id: number;\n memory: string;\n storage: string;\n};\n\nconst columnHelper = createColumnHelper<PricingEntry>();\n\nconst DEMO_PRICING: PricingEntry[] = [\n {\n cpuCount: 1,\n id: 1,\n memory: '1 GB',\n storage: '10 GB',\n },\n {\n cpuCount: 2,\n id: 2,\n memory: '2 GB',\n storage: '20 GB',\n },\n {\n cpuCount: 3,\n id: 3,\n memory: '3 GB',\n storage: '30 GB',\n },\n];\n\nconst columns = [\n columnHelper.accessor('id', {\n cell: ({ cell, row }) => (\n <Radio\n ariaLabel={`value-${cell.getValue()}`}\n isChecked={row.getIsSelected()}\n />\n ),\n header: () => null,\n maxSize: 50,\n size: 50,\n }),\n columnHelper.accessor('memory', {\n cell: (info) => info.getValue(),\n minSize: 120,\n }),\n columnHelper.accessor('cpuCount', {\n cell: (info) => info.getValue(),\n }),\n columnHelper.accessor('storage', {\n cell: (info) => info.getValue(),\n }),\n];\n\nconst CustomHeaderCell = ({\n htmlAttributes,\n cell,\n ...restProps\n}: React.ComponentProps<typeof DataGrid.HeaderCell<PricingEntry>>) => {\n const tabIndex = cell.index === 0 ? 0 : -1;\n return (\n <DataGrid.HeaderCell\n {...restProps}\n cell={cell}\n htmlAttributes={{\n ...htmlAttributes,\n tabIndex: tabIndex,\n // Conditional role assignment\n ...(cell.index === 0\n ? {\n role: 'presentation',\n style: {\n pointerEvents: 'none',\n },\n }\n : {}),\n }}\n />\n );\n};\n\nconst CustomBodyRow = ({\n row,\n}: React.ComponentProps<typeof DataGrid.BodyRow<PricingEntry>>) => {\n const { components } = useDataGridContext<PricingEntry>();\n\n return (\n <div key={row.id} role=\"row\" className=\"ndl-data-grid-tr\">\n {row.getVisibleCells().map(\n (cell) =>\n components.BodyCell && (\n <components.BodyCell\n key={cell.id}\n cell={cell}\n htmlAttributes={{\n onClick: () => row.toggleSelected(!row.getIsSelected()),\n }}\n />\n ),\n )}\n </div>\n );\n};\n\nconst Component = () => {\n const table = useReactTable({\n columnResizeMode: 'onChange',\n columns,\n data: DEMO_PRICING,\n enableMultiRowSelection: false,\n enableSorting: false,\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n initialState: {\n rowSelection: {\n 0: true,\n },\n },\n });\n\n return (\n <div className=\"n-w-full\">\n <DataGrid\n components={{\n BodyRow: CustomBodyRow,\n HeaderCell: CustomHeaderCell,\n Navigation: null,\n }}\n isKeyboardNavigable={false}\n isResizable={false}\n tableInstance={table}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"datagrid-single-selectable.story.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-single-selectable.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAuE;AACvE,uDAK+B;AAS/B,MAAM,YAAY,GAAG,IAAA,gCAAkB,GAAgB,CAAC;AAExD,MAAM,YAAY,GAAmB;IACnC;QACE,QAAQ,EAAE,CAAC;QACX,EAAE,EAAE,CAAC;QACL,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,OAAO;KACjB;IACD;QACE,QAAQ,EAAE,CAAC;QACX,EAAE,EAAE,CAAC;QACL,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,OAAO;KACjB;IACD;QACE,QAAQ,EAAE,CAAC;QACX,EAAE,EAAE,CAAC;QACL,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,OAAO;KACjB;CACF,CAAC;AAEF,MAAM,OAAO,GAAG;IACd,YAAY,CAAC,QAAQ,CAAC,IAAI,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CACH,CACJ,IAZO,GAAG,CAAC,EAAE,CAaV,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,KAAK,GAAG,IAAA,2BAAa,EAAC;QAC1B,gBAAgB,EAAE,UAAU;QAC5B,OAAO;QACP,IAAI,EAAE,YAAY;QAClB,uBAAuB,EAAE,KAAK;QAC9B,aAAa,EAAE,KAAK;QACpB,eAAe,EAAE,IAAA,6BAAe,GAAE;QAClC,qBAAqB,EAAE,IAAA,mCAAqB,GAAE;QAC9C,YAAY,EAAE;YACZ,YAAY,EAAE;gBACZ,CAAC,EAAE,IAAI;aACR;SACF;KACF,CAAC,CAAC;IAEH,OAAO,CACL,gCAAK,SAAS,EAAC,UAAU,YACvB,uBAAC,gBAAQ,IACP,UAAU,EAAE;gBACV,OAAO,EAAE,aAAa;gBACtB,UAAU,EAAE,IAAI;aACjB,EACD,mBAAmB,EAAE,KAAK,EAC1B,WAAW,EAAE,KAAK,EAClB,aAAa,EAAE,KAAK,GACpB,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { DataGrid, Radio, useDataGridContext } from '@neo4j-ndl/react';\nimport {\n createColumnHelper,\n getCoreRowModel,\n getPaginationRowModel,\n useReactTable,\n} from '@tanstack/react-table';\n\ntype PricingEntry = {\n cpuCount: number;\n id: number;\n memory: string;\n storage: string;\n};\n\nconst columnHelper = createColumnHelper<PricingEntry>();\n\nconst DEMO_PRICING: PricingEntry[] = [\n {\n cpuCount: 1,\n id: 1,\n memory: '1 GB',\n storage: '10 GB',\n },\n {\n cpuCount: 2,\n id: 2,\n memory: '2 GB',\n storage: '20 GB',\n },\n {\n cpuCount: 3,\n id: 3,\n memory: '3 GB',\n storage: '30 GB',\n },\n];\n\nconst columns = [\n columnHelper.accessor('id', {\n cell: ({ cell, row }) => (\n <Radio\n ariaLabel={`value-${cell.getValue()}`}\n isChecked={row.getIsSelected()}\n />\n ),\n header: () => null,\n maxSize: 50,\n size: 50,\n }),\n columnHelper.accessor('memory', {\n cell: (info) => info.getValue(),\n minSize: 120,\n }),\n columnHelper.accessor('cpuCount', {\n cell: (info) => info.getValue(),\n }),\n columnHelper.accessor('storage', {\n cell: (info) => info.getValue(),\n }),\n];\n\nconst CustomBodyRow = ({\n row,\n}: React.ComponentProps<typeof DataGrid.BodyRow<PricingEntry>>) => {\n const { components } = useDataGridContext<PricingEntry>();\n\n return (\n <div key={row.id} role=\"row\" className=\"ndl-data-grid-tr\">\n {row.getVisibleCells().map(\n (cell) =>\n components.BodyCell && (\n <components.BodyCell\n key={cell.id}\n cell={cell}\n htmlAttributes={{\n onClick: () => row.toggleSelected(!row.getIsSelected()),\n }}\n />\n ),\n )}\n </div>\n );\n};\n\nconst Component = () => {\n const table = useReactTable({\n columnResizeMode: 'onChange',\n columns,\n data: DEMO_PRICING,\n enableMultiRowSelection: false,\n enableSorting: false,\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n initialState: {\n rowSelection: {\n 0: true,\n },\n },\n });\n\n return (\n <div className=\"n-w-full\">\n <DataGrid\n components={{\n BodyRow: CustomBodyRow,\n Navigation: null,\n }}\n isKeyboardNavigable={false}\n isResizable={false}\n tableInstance={table}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../../src/date-picker/DatePicker.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC,yDAAyD;AAEzD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AACpC,uCAAkC;AAClC,iCAAsD;AACtD,wEAE0B;AAG1B,4DAAuD;AACvD,6DAA6D;AAC7D,wCAAqC;AACrC,oCAKkB;AAClB,8CAA0C;AAC1C,gDAA8E;AAC9E,wDAAoD;AACpD,8CAA2C;AAC3C,mCAA4D;AAQ5D,2EAA2E;AAC3E,6EAA6E;AAC7E,8DAA8D;AAC9D,MAAM,0BAA0B,GAAG,CAAC,EAMF,EAAE,EAAE;QANF,EAClC,cAAc,EACd,UAAU,EACV,KAAK,EACL,WAAW,OAEqB,EAD7B,SAAS,cALsB,wDAMnC,CADa;IAEZ,iFAAiF;IACjF,MAAM,KAKF,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,EAAE,EALlB,EACJ,WAAW,EAAE,oBAAoB,EACjC,cAAc,EAAE,uBAAuB,EACvC,GAAG,OAEmB,EADnB,kBAAkB,cAJjB,wCAKL,CAAuB,CAAC;IAEzB,OAAO,CACL,uBAAC,sBAAS,kBACR,GAAG,EAAE,GAAG,EACR,eAAe,EACb,uBAAC,+BAAuB,IAAC,SAAS,EAAC,qBAAqB,GAAG,EAE7D,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,oBAAoB,EAChD,UAAU,EAAE,UAAU;QACtB,iEAAiE;QACjE,cAAc,gCACZ,YAAY,EAAE,mBAAmB,IAC9B,uBAAuB,GACvB,SAAS,KAEV,kBAAkB,EACtB,CACH,CAAC;AACJ,CAAC,CAAC;AA+BK,MAAM,UAAU,GAAG,CAAC,EAWW,EAAE,EAAE;;QAXf,EACzB,oBAAoB,EACpB,cAAc,EACd,eAAe,EAC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B,CAAC,WAAW,KAErC,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAxUW,QAAA,UAAU,cAwUrB","sourcesContent":["// TODO: try to fix as some point\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/**\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 { format } from 'date-fns';\nimport { useCallback, useRef, useState } from 'react';\nimport ReactDatePicker, {\n type ReactDatePickerCustomHeaderProps,\n} from 'react-datepicker';\n\nimport type { CommonProps } from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { Divider } from '../divider';\nimport {\n ArrowLeftIconOutline,\n ArrowRightIconOutline,\n CalendarDaysIconOutline,\n ChevronDownIconOutline,\n} from '../icons';\nimport { TextInput } from '../text-input';\nimport { NeedleTime, TimePicker, type TimePickerProps } from '../time-picker';\nimport { TimeZonePicker } from '../timezone-picker';\nimport { Typography } from '../typography';\nimport { daysInMonth, getYearsPeriodString } from './utils';\n\ntype DatePickerTextInputWrapperProps = React.ComponentProps<'input'> & {\n textInputProps?: React.ComponentProps<typeof TextInput>;\n isDisabled?: boolean;\n value?: string;\n};\n\n// This wrapper is needed due to react-datepicker injecting html attributes\n// into the custom input component on root level, since we use htmlAttributes\n// we need to help spread them there instead of the root level\nconst DatePickerTextInputWrapper = ({\n textInputProps,\n isDisabled,\n value,\n placeholder,\n ...restProps\n}: DatePickerTextInputWrapperProps) => {\n // deconstruct textInputProps to avoid bugs with react-datepicker injecting props\n const {\n placeholder: textInputPlaceholder,\n htmlAttributes: textInputHtmlAttributes,\n ref,\n ...restTextInputProps\n } = textInputProps ?? {};\n\n return (\n <TextInput\n ref={ref}\n trailingElement={\n <CalendarDaysIconOutline className=\"ndl-datepicker-icon\" />\n }\n value={value}\n placeholder={placeholder ?? textInputPlaceholder}\n isDisabled={isDisabled}\n // react-datepicker injects html attributes into the custom input\n htmlAttributes={{\n 'aria-label': 'Date picker input',\n ...textInputHtmlAttributes,\n ...restProps,\n }}\n {...restTextInputProps}\n />\n );\n};\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype PickerType = 'day' | 'month' | 'year';\n\n// Define a more flexible type for onChange\ntype DatePickerChangeHandler = (\n date: Date | null | [Date | null, Date | null] | Date[],\n event?: React.SyntheticEvent | undefined,\n) => void;\n\ninterface DatePickerProps {\n /** Props for the embedded `TextInput` component. */\n textInputProps?: React.ComponentProps<typeof TextInput>;\n /** Whether the date picker is disabled. */\n isDisabled?: boolean;\n /** Props for the embedded `TimePicker` component. */\n timePickerProps?: TimePickerProps;\n /** Props for the embedded `TimeZonePicker` component. */\n timeZonePickerProps?: React.ComponentProps<typeof TimeZonePicker>;\n /** Props forwarded to underlying `react-datepicker` component. */\n reactDatePickerProps: React.ComponentProps<typeof ReactDatePicker>;\n}\n\nexport const DatePicker = ({\n reactDatePickerProps,\n textInputProps,\n timePickerProps,\n timeZonePickerProps,\n isDisabled,\n ref,\n className,\n style,\n htmlAttributes,\n ...restProps\n}: CommonProps<'div', DatePickerProps>) => {\n const classes = classNames(`ndl-datepicker`, className, {});\n const datetimeRef = useRef<ReactDatePicker>(null);\n const [picker, setPicker] = useState<PickerType>('day');\n const [preSelectedDate, setPreSelectedDate] = useState<Date | null>(\n (reactDatePickerProps.selected as Date | null) ||\n (reactDatePickerProps.startDate as Date | null),\n );\n const [selectedTimeZone, setSelectedTimeZone] = useState<string | undefined>(\n timeZonePickerProps?.value,\n );\n\n const isInsideDialog = useIsInsideDialog();\n\n const headerAction = useCallback(\n (action: PickerType) => {\n setPicker(picker === action ? 'day' : action);\n },\n [picker],\n );\n\n const CustomHeader = useCallback(\n (props: ReactDatePickerCustomHeaderProps) => {\n const {\n decreaseMonth,\n increaseMonth,\n increaseYear,\n decreaseYear,\n nextMonthButtonDisabled,\n nextYearButtonDisabled,\n prevMonthButtonDisabled,\n prevYearButtonDisabled,\n } = props;\n\n const prevCallback = picker === 'year' ? decreaseYear : decreaseMonth;\n const nextCallback = picker === 'year' ? increaseYear : increaseMonth;\n const prevDisabled =\n picker === 'year' ? prevYearButtonDisabled : prevMonthButtonDisabled;\n const nextDisabled =\n picker === 'year' ? nextYearButtonDisabled : nextMonthButtonDisabled;\n\n return (\n <div className=\"ndl-datepicker-header\">\n <div className=\"ndl-datepicker-selects\">\n {picker !== 'year' && (\n <button\n aria-label={`${picker === 'month' ? 'Close' : 'Open'} month picker`}\n aria-pressed={picker === 'month'}\n onClick={() => headerAction('month')}\n >\n <div className=\"n-flex n-items-center n-gap-token-4\">\n <Typography variant=\"subheading-small\">\n {format(props.date, 'MMM')}\n </Typography>\n <ChevronDownIconOutline\n className={classNames('ndl-datepicker-chevron', {\n 'n-rotate-180': picker === 'month',\n })}\n aria-label=\"Chevron icon\"\n />\n </div>\n </button>\n )}\n {picker !== 'month' && (\n <button\n aria-label={`${picker === 'year' ? 'Close' : 'Open'} year picker`}\n onClick={() => headerAction('year')}\n >\n <div className=\"n-flex n-items-center n-gap-token-4\">\n <Typography variant=\"subheading-small\">\n {picker === 'year'\n ? getYearsPeriodString(\n props.date,\n reactDatePickerProps?.yearItemNumber,\n )\n : format(props.date, 'yyyy')}\n </Typography>\n <ChevronDownIconOutline\n className={classNames('ndl-datepicker-chevron', {\n 'n-rotate-180': picker === 'year',\n })}\n aria-label=\"Chevron icon\"\n />\n </div>\n </button>\n )}\n </div>\n {picker !== 'month' && (\n <div className=\"n-flex n-justify-center n-gap-token-16\">\n <CleanIconButton\n description={\n picker === 'year' ? 'Previous period' : 'Previous month'\n }\n onClick={prevCallback}\n isDisabled={prevDisabled}\n className=\"n-text-neutral-text-weak\"\n size=\"small\"\n >\n <ArrowLeftIconOutline />\n </CleanIconButton>\n <CleanIconButton\n description={picker === 'year' ? 'Next period' : 'Next month'}\n onClick={nextCallback}\n isDisabled={nextDisabled}\n className=\"n-text-neutral-text-weak\"\n size=\"small\"\n >\n <ArrowRightIconOutline />\n </CleanIconButton>\n </div>\n )}\n </div>\n );\n },\n [picker, headerAction, reactDatePickerProps?.yearItemNumber],\n );\n\n const handleTimeChange = (newTime: NeedleTime) => {\n if (\n reactDatePickerProps.selectsRange ||\n reactDatePickerProps.selectsMultiple\n ) {\n // this is consistent with the behavior of react-datepicker\n return;\n }\n\n if (!preSelectedDate) {\n return;\n }\n\n const newDate = new Date(preSelectedDate);\n newDate.setHours(newTime.hour, newTime.minute, 0, 0);\n setPreSelectedDate(newDate);\n\n if (reactDatePickerProps.onChange) {\n // For single date selection\n reactDatePickerProps.onChange(newDate, undefined);\n }\n };\n\n const handleTimeZoneChange = (timezone: string) => {\n setSelectedTimeZone(timezone);\n if (timeZonePickerProps?.onChange) {\n timeZonePickerProps.onChange(timezone);\n }\n };\n\n /**\n * Intercept onChange so we can work with\n * Month and Year pickers\n */\n const interceptedChange: DatePickerChangeHandler = useCallback(\n (\n date: Date | null | [Date | null, Date | null] | Date[],\n event?: React.SyntheticEvent,\n ) => {\n if (picker !== 'day') {\n // setTimeout to prevent picker change before the handleMonthChange logic\n setTimeout(() => {\n setPicker('day');\n });\n } else if (picker === 'day') {\n if (date instanceof Date) {\n setPreSelectedDate(date);\n } else if (\n Array.isArray(date) &&\n date.length > 0 &&\n date[0] instanceof Date\n ) {\n setPreSelectedDate(date[0]);\n } else if (date === null) {\n setPreSelectedDate(null);\n }\n\n if (reactDatePickerProps.onChange && date !== null) {\n (reactDatePickerProps.onChange as DatePickerChangeHandler)(\n date,\n event,\n );\n }\n }\n },\n [picker, reactDatePickerProps],\n );\n\n /**\n * Intercept onCalendarClose so we can\n * switch to \"day\" picker if we close on \"month\" or \"year\"\n * view\n */\n const interceptedOnCalendarClose = useCallback(() => {\n if (picker !== 'day') {\n setPicker('day');\n }\n reactDatePickerProps?.onCalendarClose?.();\n }, [picker, reactDatePickerProps]);\n\n const handleMonthChange = useCallback(\n (date: Date) => {\n if (picker === 'month') {\n const selectedDay = preSelectedDate?.getDate() ?? 1;\n const daysInNewMonth = daysInMonth(date.getMonth(), date.getFullYear());\n date.setDate(Math.min(selectedDay, daysInNewMonth));\n reactDatePickerProps?.onMonthChange?.(date);\n } else if (picker === 'year') {\n const selectedDay = preSelectedDate?.getDate() ?? 1;\n const selectedMonth = preSelectedDate?.getMonth() ?? 0;\n const daysInNewMonth = daysInMonth(selectedMonth, date.getFullYear());\n date.setMonth(selectedMonth, Math.min(selectedDay, daysInNewMonth));\n reactDatePickerProps?.onMonthChange?.(date);\n }\n setPreSelectedDate(date);\n },\n [picker, preSelectedDate, reactDatePickerProps],\n );\n\n /**\n * Intercept onChangeRaw to handle clearing the input\n * When the user clears the text input, set the date to null\n */\n const interceptedOnChangeRaw = useCallback(\n (\n event?:\n | React.KeyboardEvent<HTMLElement>\n | React.MouseEvent<HTMLElement, MouseEvent>,\n ) => {\n const target = event?.target as HTMLInputElement | undefined;\n if (target?.value === '') {\n setPreSelectedDate(null);\n if (reactDatePickerProps.onChange) {\n (reactDatePickerProps.onChange as DatePickerChangeHandler)(\n null,\n event,\n );\n }\n }\n reactDatePickerProps?.onChangeRaw?.(event);\n },\n [reactDatePickerProps],\n );\n\n const datePickerProps = {\n ...reactDatePickerProps,\n onCalendarClose: interceptedOnCalendarClose,\n onChange: interceptedChange,\n onChangeRaw: interceptedOnChangeRaw,\n onMonthChange: handleMonthChange,\n };\n\n return (\n <div\n className={classes}\n ref={ref}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <ReactDatePicker\n ref={datetimeRef}\n customInput={\n <DatePickerTextInputWrapper\n isDisabled={isDisabled}\n textInputProps={textInputProps}\n />\n }\n customTimeInput={\n <span className=\"ndl-time-picker-wrapper\">\n <Divider />\n <TimePicker\n isFluid\n value={\n preSelectedDate\n ? new NeedleTime(\n preSelectedDate.getHours(),\n preSelectedDate.getMinutes(),\n )\n : undefined\n }\n onChange={handleTimeChange}\n {...timePickerProps}\n floatingStrategy=\"absolute\"\n isPortaled={false}\n />\n {timeZonePickerProps && (\n <TimeZonePicker\n isFluid\n value={selectedTimeZone}\n onChange={handleTimeZoneChange}\n referenceDate={preSelectedDate || undefined}\n {...timeZonePickerProps}\n floatingStrategy=\"absolute\"\n isPortaled={false}\n />\n )}\n </span>\n }\n disabled={isDisabled}\n showPopperArrow={false}\n showMonthYearPicker={picker === 'month'}\n showYearPicker={picker === 'year'}\n shouldCloseOnSelect={\n picker === 'day' && !(reactDatePickerProps.showTimeInput ?? false)\n }\n dayClassName={() => 'ndl-datepicker-day'}\n renderCustomHeader={CustomHeader}\n {...datePickerProps}\n popperClassName={classNames(\n 'ndl-datepicker-popper',\n reactDatePickerProps.popperClassName,\n )}\n popperProps={{\n strategy: isInsideDialog ? 'fixed' : 'absolute',\n ...reactDatePickerProps.popperProps,\n }}\n />\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../../src/date-picker/DatePicker.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC,yDAAyD;AAEzD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AACpC,uCAAkC;AAClC,iCAAsD;AACtD,wEAE0B;AAG1B,4DAAuD;AACvD,6DAA6D;AAC7D,wCAAqC;AACrC,oCAKkB;AAClB,8CAA0C;AAC1C,gDAA8E;AAC9E,wDAAoD;AACpD,8CAA2C;AAC3C,mCAA4D;AAQ5D,2EAA2E;AAC3E,6EAA6E;AAC7E,8DAA8D;AAC9D,MAAM,0BAA0B,GAAG,CAAC,EAMF,EAAE,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AC,UAAU,EAC3B,UAAU,EAAE,KAAK,IACjB,EACD,mBAAmB,IAAI,CACtB,uBAAC,gCAAc,kBACb,OAAO,QACP,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,oBAAoB,EAC9B,aAAa,EAAE,eAAe,IAAI,SAAS,IACvC,mBAAmB,IACvB,gBAAgB,EAAC,UAAU,EAC3B,UAAU,EAAE,KAAK,IACjB,CACH,IACI,EAET,QAAQ,EAAE,UAAU,EACpB,eAAe,EAAE,KAAK,EACtB,mBAAmB,EAAE,MAAM,KAAK,OAAO,EACvC,cAAc,EAAE,MAAM,KAAK,MAAM,EACjC,mBAAmB,EACjB,MAAM,KAAK,KAAK,IAAI,CAAC,CAAC,MAAA,oBAAoB,CAAC,aAAa,mCAAI,KAAK,CAAC,EAEpE,YAAY,EAAE,GAAG,EAAE,CAAC,oBAAoB,EACxC,kBAAkB,EAAE,YAAY,IAC5B,eAAe,IACnB,eAAe,EAAE,IAAA,oBAAU,EACzB,uBAAuB,EACvB,oBAAoB,CAAC,eAAe,CACrC,EACD,WAAW,kBACT,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,IAC5C,oBAAoB,CAAC,WAAW,KAErC,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAxUW,QAAA,UAAU,cAwUrB","sourcesContent":["// TODO: try to fix as some point\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/**\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 { format } from 'date-fns';\nimport { useCallback, useRef, useState } from 'react';\nimport ReactDatePicker, {\n type ReactDatePickerCustomHeaderProps,\n} from 'react-datepicker';\n\nimport type { CommonProps } from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { Divider } from '../divider';\nimport {\n ArrowLeftIconOutline,\n ArrowRightIconOutline,\n CalendarDaysIconOutline,\n ChevronDownIconOutline,\n} from '../icons';\nimport { TextInput } from '../text-input';\nimport { NeedleTime, TimePicker, type TimePickerProps } from '../time-picker';\nimport { TimeZonePicker } from '../timezone-picker';\nimport { Typography } from '../typography';\nimport { daysInMonth, getYearsPeriodString } from './utils';\n\ntype DatePickerTextInputWrapperProps = React.ComponentProps<'input'> & {\n textInputProps?: React.ComponentProps<typeof TextInput>;\n isDisabled?: boolean;\n value?: string;\n};\n\n// This wrapper is needed due to react-datepicker injecting html attributes\n// into the custom input component on root level, since we use htmlAttributes\n// we need to help spread them there instead of the root level\nconst DatePickerTextInputWrapper = ({\n textInputProps,\n isDisabled,\n value,\n placeholder,\n ...restProps\n}: DatePickerTextInputWrapperProps) => {\n // deconstruct textInputProps to avoid bugs with react-datepicker injecting props\n const {\n placeholder: textInputPlaceholder,\n htmlAttributes: textInputHtmlAttributes,\n ref,\n ...restTextInputProps\n } = textInputProps ?? {};\n\n return (\n <TextInput\n ref={ref}\n trailingElement={\n <CalendarDaysIconOutline className=\"ndl-datepicker-icon\" />\n }\n value={value}\n placeholder={placeholder ?? textInputPlaceholder}\n isDisabled={isDisabled}\n // react-datepicker injects html attributes into the custom input\n htmlAttributes={{\n 'aria-label': 'Date picker input', // TODO: shouldn't be added by default, conflicts with the actual label.\n ...textInputHtmlAttributes,\n ...restProps,\n }}\n {...restTextInputProps}\n />\n );\n};\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype PickerType = 'day' | 'month' | 'year';\n\n// Define a more flexible type for onChange\ntype DatePickerChangeHandler = (\n date: Date | null | [Date | null, Date | null] | Date[],\n event?: React.SyntheticEvent | undefined,\n) => void;\n\ninterface DatePickerProps {\n /** Props for the embedded `TextInput` component. */\n textInputProps?: React.ComponentProps<typeof TextInput>;\n /** Whether the date picker is disabled. */\n isDisabled?: boolean;\n /** Props for the embedded `TimePicker` component. */\n timePickerProps?: TimePickerProps;\n /** Props for the embedded `TimeZonePicker` component. */\n timeZonePickerProps?: React.ComponentProps<typeof TimeZonePicker>;\n /** Props forwarded to underlying `react-datepicker` component. */\n reactDatePickerProps: React.ComponentProps<typeof ReactDatePicker>;\n}\n\nexport const DatePicker = ({\n reactDatePickerProps,\n textInputProps,\n timePickerProps,\n timeZonePickerProps,\n isDisabled,\n ref,\n className,\n style,\n htmlAttributes,\n ...restProps\n}: CommonProps<'div', DatePickerProps>) => {\n const classes = classNames(`ndl-datepicker`, className, {});\n const datetimeRef = useRef<ReactDatePicker>(null);\n const [picker, setPicker] = useState<PickerType>('day');\n const [preSelectedDate, setPreSelectedDate] = useState<Date | null>(\n (reactDatePickerProps.selected as Date | null) ||\n (reactDatePickerProps.startDate as Date | null),\n );\n const [selectedTimeZone, setSelectedTimeZone] = useState<string | undefined>(\n timeZonePickerProps?.value,\n );\n\n const isInsideDialog = useIsInsideDialog();\n\n const headerAction = useCallback(\n (action: PickerType) => {\n setPicker(picker === action ? 'day' : action);\n },\n [picker],\n );\n\n const CustomHeader = useCallback(\n (props: ReactDatePickerCustomHeaderProps) => {\n const {\n decreaseMonth,\n increaseMonth,\n increaseYear,\n decreaseYear,\n nextMonthButtonDisabled,\n nextYearButtonDisabled,\n prevMonthButtonDisabled,\n prevYearButtonDisabled,\n } = props;\n\n const prevCallback = picker === 'year' ? decreaseYear : decreaseMonth;\n const nextCallback = picker === 'year' ? increaseYear : increaseMonth;\n const prevDisabled =\n picker === 'year' ? prevYearButtonDisabled : prevMonthButtonDisabled;\n const nextDisabled =\n picker === 'year' ? nextYearButtonDisabled : nextMonthButtonDisabled;\n\n return (\n <div className=\"ndl-datepicker-header\">\n <div className=\"ndl-datepicker-selects\">\n {picker !== 'year' && (\n <button\n aria-label={`${picker === 'month' ? 'Close' : 'Open'} month picker`}\n aria-pressed={picker === 'month'}\n onClick={() => headerAction('month')}\n >\n <div className=\"n-flex n-items-center n-gap-token-4\">\n <Typography variant=\"subheading-small\">\n {format(props.date, 'MMM')}\n </Typography>\n <ChevronDownIconOutline\n className={classNames('ndl-datepicker-chevron', {\n 'n-rotate-180': picker === 'month',\n })}\n aria-label=\"Chevron icon\"\n />\n </div>\n </button>\n )}\n {picker !== 'month' && (\n <button\n aria-label={`${picker === 'year' ? 'Close' : 'Open'} year picker`}\n onClick={() => headerAction('year')}\n >\n <div className=\"n-flex n-items-center n-gap-token-4\">\n <Typography variant=\"subheading-small\">\n {picker === 'year'\n ? getYearsPeriodString(\n props.date,\n reactDatePickerProps?.yearItemNumber,\n )\n : format(props.date, 'yyyy')}\n </Typography>\n <ChevronDownIconOutline\n className={classNames('ndl-datepicker-chevron', {\n 'n-rotate-180': picker === 'year',\n })}\n aria-label=\"Chevron icon\"\n />\n </div>\n </button>\n )}\n </div>\n {picker !== 'month' && (\n <div className=\"n-flex n-justify-center n-gap-token-16\">\n <CleanIconButton\n description={\n picker === 'year' ? 'Previous period' : 'Previous month'\n }\n onClick={prevCallback}\n isDisabled={prevDisabled}\n className=\"n-text-neutral-text-weak\"\n size=\"small\"\n >\n <ArrowLeftIconOutline />\n </CleanIconButton>\n <CleanIconButton\n description={picker === 'year' ? 'Next period' : 'Next month'}\n onClick={nextCallback}\n isDisabled={nextDisabled}\n className=\"n-text-neutral-text-weak\"\n size=\"small\"\n >\n <ArrowRightIconOutline />\n </CleanIconButton>\n </div>\n )}\n </div>\n );\n },\n [picker, headerAction, reactDatePickerProps?.yearItemNumber],\n );\n\n const handleTimeChange = (newTime: NeedleTime) => {\n if (\n reactDatePickerProps.selectsRange ||\n reactDatePickerProps.selectsMultiple\n ) {\n // this is consistent with the behavior of react-datepicker\n return;\n }\n\n if (!preSelectedDate) {\n return;\n }\n\n const newDate = new Date(preSelectedDate);\n newDate.setHours(newTime.hour, newTime.minute, 0, 0);\n setPreSelectedDate(newDate);\n\n if (reactDatePickerProps.onChange) {\n // For single date selection\n reactDatePickerProps.onChange(newDate, undefined);\n }\n };\n\n const handleTimeZoneChange = (timezone: string) => {\n setSelectedTimeZone(timezone);\n if (timeZonePickerProps?.onChange) {\n timeZonePickerProps.onChange(timezone);\n }\n };\n\n /**\n * Intercept onChange so we can work with\n * Month and Year pickers\n */\n const interceptedChange: DatePickerChangeHandler = useCallback(\n (\n date: Date | null | [Date | null, Date | null] | Date[],\n event?: React.SyntheticEvent,\n ) => {\n if (picker !== 'day') {\n // setTimeout to prevent picker change before the handleMonthChange logic\n setTimeout(() => {\n setPicker('day');\n });\n } else if (picker === 'day') {\n if (date instanceof Date) {\n setPreSelectedDate(date);\n } else if (\n Array.isArray(date) &&\n date.length > 0 &&\n date[0] instanceof Date\n ) {\n setPreSelectedDate(date[0]);\n } else if (date === null) {\n setPreSelectedDate(null);\n }\n\n if (reactDatePickerProps.onChange && date !== null) {\n (reactDatePickerProps.onChange as DatePickerChangeHandler)(\n date,\n event,\n );\n }\n }\n },\n [picker, reactDatePickerProps],\n );\n\n /**\n * Intercept onCalendarClose so we can\n * switch to \"day\" picker if we close on \"month\" or \"year\"\n * view\n */\n const interceptedOnCalendarClose = useCallback(() => {\n if (picker !== 'day') {\n setPicker('day');\n }\n reactDatePickerProps?.onCalendarClose?.();\n }, [picker, reactDatePickerProps]);\n\n const handleMonthChange = useCallback(\n (date: Date) => {\n if (picker === 'month') {\n const selectedDay = preSelectedDate?.getDate() ?? 1;\n const daysInNewMonth = daysInMonth(date.getMonth(), date.getFullYear());\n date.setDate(Math.min(selectedDay, daysInNewMonth));\n reactDatePickerProps?.onMonthChange?.(date);\n } else if (picker === 'year') {\n const selectedDay = preSelectedDate?.getDate() ?? 1;\n const selectedMonth = preSelectedDate?.getMonth() ?? 0;\n const daysInNewMonth = daysInMonth(selectedMonth, date.getFullYear());\n date.setMonth(selectedMonth, Math.min(selectedDay, daysInNewMonth));\n reactDatePickerProps?.onMonthChange?.(date);\n }\n setPreSelectedDate(date);\n },\n [picker, preSelectedDate, reactDatePickerProps],\n );\n\n /**\n * Intercept onChangeRaw to handle clearing the input\n * When the user clears the text input, set the date to null\n */\n const interceptedOnChangeRaw = useCallback(\n (\n event?:\n | React.KeyboardEvent<HTMLElement>\n | React.MouseEvent<HTMLElement, MouseEvent>,\n ) => {\n const target = event?.target as HTMLInputElement | undefined;\n if (target?.value === '') {\n setPreSelectedDate(null);\n if (reactDatePickerProps.onChange) {\n (reactDatePickerProps.onChange as DatePickerChangeHandler)(\n null,\n event,\n );\n }\n }\n reactDatePickerProps?.onChangeRaw?.(event);\n },\n [reactDatePickerProps],\n );\n\n const datePickerProps = {\n ...reactDatePickerProps,\n onCalendarClose: interceptedOnCalendarClose,\n onChange: interceptedChange,\n onChangeRaw: interceptedOnChangeRaw,\n onMonthChange: handleMonthChange,\n };\n\n return (\n <div\n className={classes}\n ref={ref}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <ReactDatePicker\n ref={datetimeRef}\n customInput={\n <DatePickerTextInputWrapper\n isDisabled={isDisabled}\n textInputProps={textInputProps}\n />\n }\n customTimeInput={\n <span className=\"ndl-time-picker-wrapper\">\n <Divider />\n <TimePicker\n isFluid\n value={\n preSelectedDate\n ? new NeedleTime(\n preSelectedDate.getHours(),\n preSelectedDate.getMinutes(),\n )\n : undefined\n }\n onChange={handleTimeChange}\n {...timePickerProps}\n floatingStrategy=\"absolute\"\n isPortaled={false}\n />\n {timeZonePickerProps && (\n <TimeZonePicker\n isFluid\n value={selectedTimeZone}\n onChange={handleTimeZoneChange}\n referenceDate={preSelectedDate || undefined}\n {...timeZonePickerProps}\n floatingStrategy=\"absolute\"\n isPortaled={false}\n />\n )}\n </span>\n }\n disabled={isDisabled}\n showPopperArrow={false}\n showMonthYearPicker={picker === 'month'}\n showYearPicker={picker === 'year'}\n shouldCloseOnSelect={\n picker === 'day' && !(reactDatePickerProps.showTimeInput ?? false)\n }\n dayClassName={() => 'ndl-datepicker-day'}\n renderCustomHeader={CustomHeader}\n {...datePickerProps}\n popperClassName={classNames(\n 'ndl-datepicker-popper',\n reactDatePickerProps.popperClassName,\n )}\n popperProps={{\n strategy: isInsideDialog ? 'fixed' : 'absolute',\n ...reactDatePickerProps.popperProps,\n }}\n />\n </div>\n );\n};\n"]}
@@ -30,28 +30,28 @@ const Component = () => {
30
30
  setSelectedDate(date);
31
31
  };
32
32
  return ((0, jsx_runtime_1.jsx)(react_1.DatePicker, { textInputProps: {
33
- label: 'This one has a label',
34
33
  helpText: 'With help text',
35
- showRequiredOrOptionalLabel: false,
36
34
  isDisabled: false,
37
- isRequired: false,
38
- isReadOnly: false,
39
35
  isFluid: false,
36
+ isReadOnly: false,
37
+ isRequired: false,
38
+ label: 'This one has a label',
40
39
  moreInformationText: 'With information icon text',
40
+ showRequiredOrOptionalLabel: false,
41
41
  }, timePickerProps: {
42
- timeInterval: 20,
43
42
  format: 'hh:mm aa',
44
43
  isDisabled: false,
45
- isRequired: false,
46
- isReadOnly: false,
47
44
  isFluid: false,
45
+ isReadOnly: false,
46
+ isRequired: false,
47
+ timeInterval: 20,
48
48
  }, reactDatePickerProps: {
49
- selected: selectedDate,
50
49
  onChange: handleOnChange,
51
- showTimeInput: true,
52
50
  popperProps: {
53
51
  strategy: 'fixed',
54
52
  },
53
+ selected: selectedDate,
54
+ showTimeInput: true,
55
55
  } }));
56
56
  };
57
57
  exports.default = Component;
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker-full.story.js","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker-full.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA8C;AAC9C,iCAAiC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAC9C,IAAI,IAAI,CAAC,YAAY,CAAC,CACvB,CAAC;IACF,MAAM,cAAc,GAAG,CAAC,IAAiB,EAAE,EAAE;QAC3C,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,OAAO,CACL,uBAAC,kBAAU,IACT,cAAc,EAAE;YACd,KAAK,EAAE,sBAAsB;YAC7B,QAAQ,EAAE,gBAAgB;YAC1B,2BAA2B,EAAE,KAAK;YAClC,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,KAAK;YACjB,OAAO,EAAE,KAAK;YACd,mBAAmB,EAAE,4BAA4B;SAClD,EACD,eAAe,EAAE;YACf,YAAY,EAAE,EAAE;YAChB,MAAM,EAAE,UAAU;YAClB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,KAAK;YACjB,OAAO,EAAE,KAAK;SACf,EACD,oBAAoB,EAAE;YACpB,QAAQ,EAAE,YAAY;YACtB,QAAQ,EAAE,cAAc;YACxB,aAAa,EAAE,IAAI;YACnB,WAAW,EAAE;gBACX,QAAQ,EAAE,OAAO;aAClB;SACF,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { DatePicker } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [selectedDate, setSelectedDate] = useState<Date | null>(\n new Date('2023-05-27'),\n );\n const handleOnChange = (date: Date | null) => {\n setSelectedDate(date);\n };\n\n return (\n <DatePicker\n textInputProps={{\n label: 'This one has a label',\n helpText: 'With help text',\n showRequiredOrOptionalLabel: false,\n isDisabled: false,\n isRequired: false,\n isReadOnly: false,\n isFluid: false,\n moreInformationText: 'With information icon text',\n }}\n timePickerProps={{\n timeInterval: 20,\n format: 'hh:mm aa',\n isDisabled: false,\n isRequired: false,\n isReadOnly: false,\n isFluid: false,\n }}\n reactDatePickerProps={{\n selected: selectedDate,\n onChange: handleOnChange,\n showTimeInput: true,\n popperProps: {\n strategy: 'fixed',\n },\n }}\n />\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"date-picker-full.story.js","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker-full.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA8C;AAC9C,iCAAiC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAC9C,IAAI,IAAI,CAAC,YAAY,CAAC,CACvB,CAAC;IACF,MAAM,cAAc,GAAG,CAAC,IAAiB,EAAE,EAAE;QAC3C,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,OAAO,CACL,uBAAC,kBAAU,IACT,cAAc,EAAE;YACd,QAAQ,EAAE,gBAAgB;YAC1B,UAAU,EAAE,KAAK;YACjB,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,sBAAsB;YAC7B,mBAAmB,EAAE,4BAA4B;YACjD,2BAA2B,EAAE,KAAK;SACnC,EACD,eAAe,EAAE;YACf,MAAM,EAAE,UAAU;YAClB,UAAU,EAAE,KAAK;YACjB,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,EAAE;SACjB,EACD,oBAAoB,EAAE;YACpB,QAAQ,EAAE,cAAc;YACxB,WAAW,EAAE;gBACX,QAAQ,EAAE,OAAO;aAClB;YACD,QAAQ,EAAE,YAAY;YACtB,aAAa,EAAE,IAAI;SACpB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { DatePicker } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [selectedDate, setSelectedDate] = useState<Date | null>(\n new Date('2023-05-27'),\n );\n const handleOnChange = (date: Date | null) => {\n setSelectedDate(date);\n };\n\n return (\n <DatePicker\n textInputProps={{\n helpText: 'With help text',\n isDisabled: false,\n isFluid: false,\n isReadOnly: false,\n isRequired: false,\n label: 'This one has a label',\n moreInformationText: 'With information icon text',\n showRequiredOrOptionalLabel: false,\n }}\n timePickerProps={{\n format: 'hh:mm aa',\n isDisabled: false,\n isFluid: false,\n isReadOnly: false,\n isRequired: false,\n timeInterval: 20,\n }}\n reactDatePickerProps={{\n onChange: handleOnChange,\n popperProps: {\n strategy: 'fixed',\n },\n selected: selectedDate,\n showTimeInput: true,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
@@ -25,10 +25,10 @@ require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
25
25
  const react_1 = require("@neo4j-ndl/react");
26
26
  const Component = () => {
27
27
  return ((0, jsx_runtime_1.jsxs)("div", { style: {
28
- width: '100%',
29
28
  display: 'flex',
30
29
  flexDirection: 'column',
31
30
  gap: '4px',
31
+ width: '100%',
32
32
  }, children: [(0, jsx_runtime_1.jsx)("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }), (0, jsx_runtime_1.jsx)(react_1.Divider, { orientation: "horizontal" }), (0, jsx_runtime_1.jsx)("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." })] }));
33
33
  };
34
34
  exports.default = Component;
@@ -1 +1 @@
1
- {"version":3,"file":"divider-horizontal.story.js","sourceRoot":"","sources":["../../../../src/divider/stories/divider-horizontal.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA2C;AAE3C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,iCACE,KAAK,EAAE;YACL,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;YACvB,GAAG,EAAE,KAAK;SACX,aAED,qGAA+D,EAC/D,uBAAC,eAAO,IAAC,WAAW,EAAC,YAAY,GAAG,EACpC,qGAA+D,IAC3D,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { Divider } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div\n style={{\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n gap: '4px',\n }}\n >\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\n <Divider orientation=\"horizontal\" />\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"divider-horizontal.story.js","sourceRoot":"","sources":["../../../../src/divider/stories/divider-horizontal.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA2C;AAE3C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,iCACE,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;YACvB,GAAG,EAAE,KAAK;YACV,KAAK,EAAE,MAAM;SACd,aAED,qGAA+D,EAC/D,uBAAC,eAAO,IAAC,WAAW,EAAC,YAAY,GAAG,EACpC,qGAA+D,IAC3D,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { Divider } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: '4px',\n width: '100%',\n }}\n >\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\n <Divider orientation=\"horizontal\" />\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -25,10 +25,10 @@ require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
25
25
  const react_1 = require("@neo4j-ndl/react");
26
26
  const Component = () => {
27
27
  return ((0, jsx_runtime_1.jsxs)("div", { style: {
28
- width: '100%',
29
28
  display: 'flex',
30
29
  flexDirection: 'row',
31
30
  gap: '4px',
31
+ width: '100%',
32
32
  }, children: [(0, jsx_runtime_1.jsx)("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }), (0, jsx_runtime_1.jsx)(react_1.Divider, { orientation: "vertical" }), (0, jsx_runtime_1.jsx)("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." })] }));
33
33
  };
34
34
  exports.default = Component;
@@ -1 +1 @@
1
- {"version":3,"file":"divider-vertical.story.js","sourceRoot":"","sources":["../../../../src/divider/stories/divider-vertical.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA2C;AAE3C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,iCACE,KAAK,EAAE;YACL,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,KAAK;SACX,aAED,qGAA+D,EAC/D,uBAAC,eAAO,IAAC,WAAW,EAAC,UAAU,GAAG,EAClC,qGAA+D,IAC3D,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { Divider } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div\n style={{\n width: '100%',\n display: 'flex',\n flexDirection: 'row',\n gap: '4px',\n }}\n >\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\n <Divider orientation=\"vertical\" />\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"divider-vertical.story.js","sourceRoot":"","sources":["../../../../src/divider/stories/divider-vertical.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA2C;AAE3C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,iCACE,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,KAAK;YACV,KAAK,EAAE,MAAM;SACd,aAED,qGAA+D,EAC/D,uBAAC,eAAO,IAAC,WAAW,EAAC,UAAU,GAAG,EAClC,qGAA+D,IAC3D,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { Divider } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div\n style={{\n display: 'flex',\n flexDirection: 'row',\n gap: '4px',\n width: '100%',\n }}\n >\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\n <Divider orientation=\"vertical\" />\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -26,117 +26,117 @@ const jsx_runtime_1 = require("react/jsx-runtime");
26
26
  const index_1 = require("../../index");
27
27
  const index_2 = require("./index");
28
28
  const componentMeta = {
29
- title: 'Components/Drawer',
30
- id: 'components-drawer',
31
29
  component: index_1.Drawer,
32
- tags: ['docsPage'],
30
+ id: 'components-drawer',
33
31
  parameters: {
34
32
  controls: { disable: true },
35
33
  },
34
+ tags: ['docsPage'],
35
+ title: 'Components/Drawer',
36
36
  };
37
37
  exports.default = componentMeta;
38
38
  exports.Overlay = {
39
39
  args: {},
40
- render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerOverlay, {}),
41
40
  parameters: {
42
41
  docs: {
43
42
  source: {
43
+ code: index_2.DrawerOverlaySrc,
44
44
  language: 'tsx',
45
45
  type: 'code',
46
- code: index_2.DrawerOverlaySrc,
47
46
  },
48
47
  },
49
48
  },
49
+ render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerOverlay, {}),
50
50
  };
51
51
  exports.Push = {
52
52
  args: {},
53
- render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerPush, {}),
54
53
  parameters: {
55
54
  docs: {
56
55
  source: {
56
+ code: index_2.DrawerPushSrc,
57
57
  language: 'tsx',
58
58
  type: 'code',
59
- code: index_2.DrawerPushSrc,
60
59
  },
61
60
  },
62
61
  },
62
+ render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerPush, {}),
63
63
  };
64
64
  exports.RightSide = {
65
65
  args: {},
66
- render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerRightSide, {}),
67
66
  parameters: {
68
67
  docs: {
69
68
  source: {
69
+ code: index_2.DrawerRightSideSrc,
70
70
  language: 'tsx',
71
71
  type: 'code',
72
- code: index_2.DrawerRightSideSrc,
73
72
  },
74
73
  },
75
74
  },
75
+ render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerRightSide, {}),
76
76
  };
77
77
  exports.Resizable = {
78
78
  args: {},
79
- render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerResizable, {}),
80
79
  parameters: {
81
80
  docs: {
82
81
  source: {
82
+ code: index_2.DrawerResizableSrc,
83
83
  language: 'tsx',
84
84
  type: 'code',
85
- code: index_2.DrawerResizableSrc,
86
85
  },
87
86
  },
88
87
  },
88
+ render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerResizable, {}),
89
89
  };
90
90
  exports.NotCloseable = {
91
91
  args: {},
92
- render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerNotCloseable, {}),
93
92
  parameters: {
94
93
  docs: {
95
94
  source: {
95
+ code: index_2.DrawerNotCloseableSrc,
96
96
  language: 'tsx',
97
97
  type: 'code',
98
- code: index_2.DrawerNotCloseableSrc,
99
98
  },
100
99
  },
101
100
  },
101
+ render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerNotCloseable, {}),
102
102
  };
103
103
  exports.Scrollable = {
104
104
  args: {},
105
- render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerScrollable, {}),
106
105
  parameters: {
107
106
  docs: {
108
107
  source: {
108
+ code: index_2.DrawerScrollableSrc,
109
109
  language: 'tsx',
110
110
  type: 'code',
111
- code: index_2.DrawerScrollableSrc,
112
111
  },
113
112
  },
114
113
  },
114
+ render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerScrollable, {}),
115
115
  };
116
116
  exports.Portaled = {
117
117
  args: {},
118
- render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerPortaled, {}),
119
118
  parameters: {
120
119
  docs: {
121
120
  source: {
121
+ code: index_2.DrawerPortaledSrc,
122
122
  language: 'tsx',
123
123
  type: 'code',
124
- code: index_2.DrawerPortaledSrc,
125
124
  },
126
125
  },
127
126
  },
127
+ render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerPortaled, {}),
128
128
  };
129
129
  exports.Full = {
130
130
  args: {},
131
- render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerFull, {}),
132
131
  parameters: {
133
132
  docs: {
134
133
  source: {
134
+ code: index_2.DrawerFullSrc,
135
135
  language: 'tsx',
136
136
  type: 'code',
137
- code: index_2.DrawerFullSrc,
138
137
  },
139
138
  },
140
139
  },
140
+ render: () => (0, jsx_runtime_1.jsx)(index_2.DrawerFull, {}),
141
141
  };
142
142
  //# sourceMappingURL=drawer.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.stories.js","sourceRoot":"","sources":["../../../../src/drawer/stories/drawer.stories.tsx"],"names":[],"mappings":";;;;AAsBA,uCAAqC;AACrC,mCAiBiB;AAEjB,MAAM,aAAa,GAA8C;IAC/D,KAAK,EAAE,mBAAmB;IAC1B,EAAE,EAAE,mBAAmB;IACvB,SAAS,EAAE,cAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;CACF,CAAC;AAEF,kBAAe,aAAa,CAAC;AAIhB,QAAA,OAAO,GAAU;IA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AAI,EAAE,6BAAqB;aAC5B;SACF;KACF;CACF,CAAC;AAEW,QAAA,UAAU,GAAU;IAC/B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,GAAG,EAAE,CAAC,uBAAC,wBAAgB,KAAG;IAClC,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,2BAAmB;aAC1B;SACF;KACF;CACF,CAAC;AAEW,QAAA,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,GAAG,EAAE,CAAC,uBAAC,sBAAc,KAAG;IAChC,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,yBAAiB;aACxB;SACF;KACF;CACF,CAAC;AACW,QAAA,IAAI,GAAU;IACzB,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,GAAG,EAAE,CAAC,uBAAC,kBAAU,KAAG;IAC5B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,qBAAa;aACpB;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 { Drawer } from '../../index';\nimport {\n DrawerFull,\n DrawerFullSrc,\n DrawerNotCloseable,\n DrawerNotCloseableSrc,\n DrawerOverlay,\n DrawerOverlaySrc,\n DrawerPortaled,\n DrawerPortaledSrc,\n DrawerPush,\n DrawerPushSrc,\n DrawerResizable,\n DrawerResizableSrc,\n DrawerRightSide,\n DrawerRightSideSrc,\n DrawerScrollable,\n DrawerScrollableSrc,\n} from './index';\n\nconst componentMeta: Meta<React.ComponentProps<typeof Drawer>> = {\n title: 'Components/Drawer',\n id: 'components-drawer',\n component: Drawer,\n tags: ['docsPage'],\n parameters: {\n controls: { disable: true },\n },\n};\n\nexport default componentMeta;\n\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Overlay: Story = {\n args: {},\n render: () => <DrawerOverlay />,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: DrawerOverlaySrc,\n },\n },\n },\n};\nexport const Push: Story = {\n args: {},\n render: () => <DrawerPush />,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: DrawerPushSrc,\n },\n },\n },\n};\n\nexport const RightSide: Story = {\n args: {},\n render: () => <DrawerRightSide />,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: DrawerRightSideSrc,\n },\n },\n },\n};\n\nexport const Resizable: Story = {\n args: {},\n render: () => <DrawerResizable />,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: DrawerResizableSrc,\n },\n },\n },\n};\n\nexport const NotCloseable: Story = {\n args: {},\n render: () => <DrawerNotCloseable />,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: DrawerNotCloseableSrc,\n },\n },\n },\n};\n\nexport const Scrollable: Story = {\n args: {},\n render: () => <DrawerScrollable />,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: DrawerScrollableSrc,\n },\n },\n },\n};\n\nexport const Portaled: Story = {\n args: {},\n render: () => <DrawerPortaled />,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: DrawerPortaledSrc,\n },\n },\n },\n};\nexport const Full: Story = {\n args: {},\n render: () => <DrawerFull />,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: DrawerFullSrc,\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"drawer.stories.js","sourceRoot":"","sources":["../../../../src/drawer/stories/drawer.stories.tsx"],"names":[],"mappings":";;;;AAsBA,uCAAqC;AACrC,mCAiBiB;AAEjB,MAAM,aAAa,GAA8C;IAC/D,SAAS,EAAE,cAAM;IACjB,EAAE,EAAE,mBAAmB;IACvB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,mBAAmB;CAC3B,CAAC;AAEF,kBAAe,aAAa,CAAC;AAIhB,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,wBAAgB;gBACtB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,uBAAC,qBAAa,KAAG;CAChC,CAAC;AACW,QAAA,IAAI,GAAU;IACzB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,qBAAa;gBACnB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,uBAAC,kBAAU,KAAG;CAC7B,CAAC;AAEW,QAAA,SAAS,GAAU;IAC9B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,0BAAkB;gB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AAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,qBAAa;gBACnB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,uBAAC,kBAAU,KAAG;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 { Drawer } from '../../index';\nimport {\n DrawerFull,\n DrawerFullSrc,\n DrawerNotCloseable,\n DrawerNotCloseableSrc,\n DrawerOverlay,\n DrawerOverlaySrc,\n DrawerPortaled,\n DrawerPortaledSrc,\n DrawerPush,\n DrawerPushSrc,\n DrawerResizable,\n DrawerResizableSrc,\n DrawerRightSide,\n DrawerRightSideSrc,\n DrawerScrollable,\n DrawerScrollableSrc,\n} from './index';\n\nconst componentMeta: Meta<React.ComponentProps<typeof Drawer>> = {\n component: Drawer,\n id: 'components-drawer',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/Drawer',\n};\n\nexport default componentMeta;\n\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Overlay: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerOverlaySrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerOverlay />,\n};\nexport const Push: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerPushSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerPush />,\n};\n\nexport const RightSide: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerRightSideSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerRightSide />,\n};\n\nexport const Resizable: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerResizableSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerResizable />,\n};\n\nexport const NotCloseable: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerNotCloseableSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerNotCloseable />,\n};\n\nexport const Scrollable: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerScrollableSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerScrollable />,\n};\n\nexport const Portaled: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerPortaledSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerPortaled />,\n};\nexport const Full: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerFullSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerFull />,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownButton.js","sourceRoot":"","sources":["../../../src/dropdown-button/DropdownButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AAIpC,oCAAkD;AA6BlD;;;;;;GAMG;AAEI,MAAM,cAAc,GAAG,SAAS,cAAc,CAEnD,EAc+C;QAd/C,EACA,EAAE,EACF,QAAQ,EACR,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,cAAc,EACd,MAAM,GAAG,KAAK,EACd,OAAO,EACP,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAE4C,EAD5C,SAAS,cAbZ,4IAcD,CADa;IAEZ,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,kBAAkB,EAAE,SAAS,EAAE;QACxD,cAAc,EAAE,UAAU;QAC1B,kBAAkB,EAAE,UAAU;QAC9B,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,UAAU,EAAE,MAAM;QAClB,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,QAAQ,CAAC;IAEpD,OAAO,CACL,uBAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,OAAO,mBACD,MAAM,EACrB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,cAElB,iCAAK,SAAS,EAAC,wBAAwB,aACrC,iCAAK,SAAS,EAAC,kCAAkC,aAC9C,cAAc,EACf,iCAAM,SAAS,EAAC,0BAA0B,YAAE,QAAQ,GAAQ,IACxD,EAEN,uBAAC,8BAAsB,IACrB,SAAS,EAAE,IAAA,oBAAU,EAAC,0BAA0B,EAAE;wBAChD,+BAA+B,EAAE,MAAM;qBACxC,CAAC,GACF,IACE,IACI,CACb,CAAC;AACJ,CAAC,CAAC;AArDW,QAAA,cAAc,kBAqDzB","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { ChevronDownIconOutline } from '../icons';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype DropdownButtonProps = {\n /** Content displayed in the button */\n children: React.ReactNode;\n /** Size of button */\n size?: 'small' | 'medium' | 'large';\n /** Whether the button is in floating state */\n isFloating?: boolean;\n /** Whether the button is in disabled state */\n isDisabled?: boolean;\n /** Element that is shown before the button content */\n leadingElement?: React.ReactNode;\n /** If the dropdown is activated */\n isOpen?: boolean;\n /** Callback function to be called when the button is clicked */\n onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /** Additional classnames */\n className?: string;\n};\n\n/**\n *\n *\n * DropdownButton Component\n *\n *\n */\n\nexport const DropdownButton = function DropdownButton<\n T extends React.ElementType = 'button',\n>({\n as,\n children,\n size = 'medium',\n isDisabled = false,\n isFloating = false,\n leadingElement,\n isOpen = false,\n onClick,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, DropdownButtonProps>) {\n const classes = classNames('ndl-dropdown-btn', className, {\n 'ndl-disabled': isDisabled,\n 'ndl-floating-btn': isFloating,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-open': isOpen,\n 'ndl-small': size === 'small',\n });\n\n const Component: React.ElementType = as ?? 'button';\n\n return (\n <Component\n className={classes}\n disabled={isDisabled}\n onClick={onClick}\n aria-expanded={isOpen}\n ref={ref}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-dropdown-btn-inner\">\n <div className=\"ndl-dropdown-btn-leading-wrapper\">\n {leadingElement}\n <span className=\"ndl-dropdown-btn-content\">{children}</span>\n </div>\n\n <ChevronDownIconOutline\n className={classNames('ndl-dropdown-button-icon', {\n 'ndl-dropdown-button-icon-open': isOpen,\n })}\n />\n </div>\n </Component>\n );\n};\n"]}
1
+ {"version":3,"file":"DropdownButton.js","sourceRoot":"","sources":["../../../src/dropdown-button/DropdownButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AAIpC,oCAAkD;AA6BlD;;;;;;GAMG;AAEI,MAAM,cAAc,GAAG,SAAS,cAAc,CAEnD,EAc+C;QAd/C,EACA,EAAE,EACF,QAAQ,EACR,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,cAAc,EACd,MAAM,GAAG,KAAK,EACd,OAAO,EACP,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAE4C,EAD5C,SAAS,cAbZ,4IAcD,CADa;IAEZ,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,kBAAkB,EAAE,SAAS,EAAE;QACxD,cAAc,EAAE,UAAU;QAC1B,kBAAkB,EAAE,UAAU;QAC9B,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,UAAU,EAAE,MAAM;QAClB,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,QAAQ,CAAC;IAEpD,OAAO,CACL,uBAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,OAAO,mBACD,MAAM,EACrB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,cAElB,iCAAK,SAAS,EAAC,wBAAwB,aACrC,iCAAK,SAAS,EAAC,kCAAkC,aAC9C,cAAc,EACf,iCAAM,SAAS,EAAC,0BAA0B,YAAE,QAAQ,GAAQ,IACxD,EAEN,uBAAC,8BAAsB,IACrB,SAAS,EAAE,IAAA,oBAAU,EAAC,0BAA0B,EAAE;wBAChD,+BAA+B,EAAE,MAAM;qBACxC,CAAC,GACF,IACE,IACI,CACb,CAAC;AACJ,CAAC,CAAC;AArDW,QAAA,cAAc,kBAqDzB","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { ChevronDownIconOutline } from '../icons';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype DropdownButtonProps = {\n /** Content displayed in the button */\n children?: React.ReactNode;\n /** Size of button */\n size?: 'small' | 'medium' | 'large';\n /** Whether the button is in floating state */\n isFloating?: boolean;\n /** Whether the button is in disabled state */\n isDisabled?: boolean;\n /** Element that is shown before the button content */\n leadingElement?: React.ReactNode;\n /** If the dropdown is activated */\n isOpen?: boolean;\n /** Callback function to be called when the button is clicked */\n onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /** Additional classnames */\n className?: string;\n};\n\n/**\n *\n *\n * DropdownButton Component\n *\n *\n */\n\nexport const DropdownButton = function DropdownButton<\n T extends React.ElementType = 'button',\n>({\n as,\n children,\n size = 'medium',\n isDisabled = false,\n isFloating = false,\n leadingElement,\n isOpen = false,\n onClick,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, DropdownButtonProps>) {\n const classes = classNames('ndl-dropdown-btn', className, {\n 'ndl-disabled': isDisabled,\n 'ndl-floating-btn': isFloating,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-open': isOpen,\n 'ndl-small': size === 'small',\n });\n\n const Component: React.ElementType = as ?? 'button';\n\n return (\n <Component\n className={classes}\n disabled={isDisabled}\n onClick={onClick}\n aria-expanded={isOpen}\n ref={ref}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-dropdown-btn-inner\">\n <div className=\"ndl-dropdown-btn-leading-wrapper\">\n {leadingElement}\n <span className=\"ndl-dropdown-btn-content\">{children}</span>\n </div>\n\n <ChevronDownIconOutline\n className={classNames('ndl-dropdown-button-icon', {\n 'ndl-dropdown-button-icon-open': isOpen,\n })}\n />\n </div>\n </Component>\n );\n};\n"]}