@neo4j-ndl/react 4.4.0 → 4.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (365) hide show
  1. package/lib/cjs/_common/types.js.map +1 -1
  2. package/lib/cjs/_common/utils.js +4 -4
  3. package/lib/cjs/_common/utils.js.map +1 -1
  4. package/lib/cjs/accordion/Accordion.js +5 -5
  5. package/lib/cjs/accordion/Accordion.js.map +1 -1
  6. package/lib/cjs/accordion/accordion-context.js +1 -1
  7. package/lib/cjs/accordion/accordion-context.js.map +1 -1
  8. package/lib/cjs/accordion/stories/accordion.stories.js +20 -20
  9. package/lib/cjs/accordion/stories/accordion.stories.js.map +1 -1
  10. package/lib/cjs/avatar/stories/avatar.stories.js +18 -18
  11. package/lib/cjs/avatar/stories/avatar.stories.js.map +1 -1
  12. package/lib/cjs/breadcrumbs/stories/breadcrumbs.stories.js +1 -1
  13. package/lib/cjs/breadcrumbs/stories/breadcrumbs.stories.js.map +1 -1
  14. package/lib/cjs/checkbox/stories/checkbox-full.story.js +2 -2
  15. package/lib/cjs/checkbox/stories/checkbox-full.story.js.map +1 -1
  16. package/lib/cjs/checkbox/stories/checkbox.stories.js +19 -19
  17. package/lib/cjs/checkbox/stories/checkbox.stories.js.map +1 -1
  18. package/lib/cjs/clean-icon-button/stories/clean-icon-button.stories.js +11 -11
  19. package/lib/cjs/clean-icon-button/stories/clean-icon-button.stories.js.map +1 -1
  20. package/lib/cjs/code-block/stories/code-disabled.story.js +2 -2
  21. package/lib/cjs/code-block/stories/code-disabled.story.js.map +1 -1
  22. package/lib/cjs/code-block/stories/code-full.story.js +2 -2
  23. package/lib/cjs/code-block/stories/code-full.story.js.map +1 -1
  24. package/lib/cjs/code-block/stories/code-with-actions.story.js +2 -2
  25. package/lib/cjs/code-block/stories/code-with-actions.story.js.map +1 -1
  26. package/lib/cjs/code-block/themes/ndl-code-dark.js +64 -64
  27. package/lib/cjs/code-block/themes/ndl-code-dark.js.map +1 -1
  28. package/lib/cjs/code-block/themes/ndl-code-light.js +64 -64
  29. package/lib/cjs/code-block/themes/ndl-code-light.js.map +1 -1
  30. package/lib/cjs/color-picker/ColorPicker.js +1 -1
  31. package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
  32. package/lib/cjs/color-picker/stories/color-picker.stories.js +4 -4
  33. package/lib/cjs/color-picker/stories/color-picker.stories.js.map +1 -1
  34. package/lib/cjs/data-grid/Components.js +13 -11
  35. package/lib/cjs/data-grid/Components.js.map +1 -1
  36. package/lib/cjs/data-grid/DataGrid.js.map +1 -1
  37. package/lib/cjs/data-grid/data-grid-context.js +1 -1
  38. package/lib/cjs/data-grid/data-grid-context.js.map +1 -1
  39. package/lib/cjs/data-grid/data-grid-nav/index.js +1 -1
  40. package/lib/cjs/data-grid/data-grid-nav/index.js.map +1 -1
  41. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
  42. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  43. package/lib/cjs/date-picker/stories/date-picker-full.story.js +9 -9
  44. package/lib/cjs/date-picker/stories/date-picker-full.story.js.map +1 -1
  45. package/lib/cjs/divider/stories/divider-horizontal.story.js +1 -1
  46. package/lib/cjs/divider/stories/divider-horizontal.story.js.map +1 -1
  47. package/lib/cjs/divider/stories/divider-vertical.story.js +1 -1
  48. package/lib/cjs/divider/stories/divider-vertical.story.js.map +1 -1
  49. package/lib/cjs/drawer/stories/drawer.stories.js +19 -19
  50. package/lib/cjs/drawer/stories/drawer.stories.js.map +1 -1
  51. package/lib/cjs/dropdown-button/stories/dropdown-button.stories.js +18 -18
  52. package/lib/cjs/dropdown-button/stories/dropdown-button.stories.js.map +1 -1
  53. package/lib/cjs/dropzone/stories/dropzone-disabled.story.js +1 -1
  54. package/lib/cjs/dropzone/stories/dropzone-disabled.story.js.map +1 -1
  55. package/lib/cjs/dropzone/stories/dropzone-full.story.js +11 -11
  56. package/lib/cjs/dropzone/stories/dropzone-full.story.js.map +1 -1
  57. package/lib/cjs/dropzone/stories/dropzone.stories.js +10 -10
  58. package/lib/cjs/dropzone/stories/dropzone.stories.js.map +1 -1
  59. package/lib/cjs/flex/Flex.js +4 -4
  60. package/lib/cjs/flex/Flex.js.map +1 -1
  61. package/lib/cjs/graph-label/stories/graph-label.stories.js +20 -20
  62. package/lib/cjs/graph-label/stories/graph-label.stories.js.map +1 -1
  63. package/lib/cjs/hooks/index.js +3 -3
  64. package/lib/cjs/hooks/index.js.map +1 -1
  65. package/lib/cjs/icon-button/stories/icon-button.stories.js +12 -12
  66. package/lib/cjs/icon-button/stories/icon-button.stories.js.map +1 -1
  67. package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js +16 -16
  68. package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
  69. package/lib/cjs/icons/wrapIcon.js +1 -1
  70. package/lib/cjs/icons/wrapIcon.js.map +1 -1
  71. package/lib/cjs/kbd/stories/kbd.stories.js +7 -7
  72. package/lib/cjs/kbd/stories/kbd.stories.js.map +1 -1
  73. package/lib/cjs/loading-spinner/LoadingSpinner.js +2 -2
  74. package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
  75. package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js +10 -10
  76. package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js.map +1 -1
  77. package/lib/cjs/logo/Logo.js +6 -6
  78. package/lib/cjs/logo/Logo.js.map +1 -1
  79. package/lib/cjs/logo/stories/logo.stories.js +9 -9
  80. package/lib/cjs/logo/stories/logo.stories.js.map +1 -1
  81. package/lib/cjs/menu/Menu.js +3 -3
  82. package/lib/cjs/menu/Menu.js.map +1 -1
  83. package/lib/cjs/popover/Popover.js +15 -15
  84. package/lib/cjs/popover/Popover.js.map +1 -1
  85. package/lib/cjs/popover/use-popover.js +9 -9
  86. package/lib/cjs/popover/use-popover.js.map +1 -1
  87. package/lib/cjs/progress-bar/stories/progress-bar.stories.js +3 -3
  88. package/lib/cjs/progress-bar/stories/progress-bar.stories.js.map +1 -1
  89. package/lib/cjs/segmented-control/SegmentedControl.js +1 -1
  90. package/lib/cjs/segmented-control/SegmentedControl.js.map +1 -1
  91. package/lib/cjs/select/Overrides.js +41 -41
  92. package/lib/cjs/select/Overrides.js.map +1 -1
  93. package/lib/cjs/select/stories/select-async.story.js +4 -4
  94. package/lib/cjs/select/stories/select-async.story.js.map +1 -1
  95. package/lib/cjs/select/stories/select-controlled.story.js +4 -4
  96. package/lib/cjs/select/stories/select-controlled.story.js.map +1 -1
  97. package/lib/cjs/select/stories/select-creatable.story.js +1 -1
  98. package/lib/cjs/select/stories/select-creatable.story.js.map +1 -1
  99. package/lib/cjs/select/stories/select-custom-label.story.js +1 -1
  100. package/lib/cjs/select/stories/select-custom-label.story.js.map +1 -1
  101. package/lib/cjs/select/stories/select-disabled.story.js +1 -1
  102. package/lib/cjs/select/stories/select-disabled.story.js.map +1 -1
  103. package/lib/cjs/select/stories/select-inside-dialog.story.js +1 -1
  104. package/lib/cjs/select/stories/select-inside-dialog.story.js.map +1 -1
  105. package/lib/cjs/side-navigation/stories/side-nav.stories.js +1 -1
  106. package/lib/cjs/side-navigation/stories/side-nav.stories.js.map +1 -1
  107. package/lib/cjs/skeleton/stories/skeleton.stories.js +28 -28
  108. package/lib/cjs/skeleton/stories/skeleton.stories.js.map +1 -1
  109. package/lib/cjs/slider/Slider.js +2 -1
  110. package/lib/cjs/slider/Slider.js.map +1 -1
  111. package/lib/cjs/status-indicator/stories/status-indicator.stories.js +2 -2
  112. package/lib/cjs/status-indicator/stories/status-indicator.stories.js.map +1 -1
  113. package/lib/cjs/switch/stories/switch.stories.js +7 -7
  114. package/lib/cjs/switch/stories/switch.stories.js.map +1 -1
  115. package/lib/cjs/tabs/Tabs.js +1 -1
  116. package/lib/cjs/tabs/Tabs.js.map +1 -1
  117. package/lib/cjs/tag/Tag.js +2 -2
  118. package/lib/cjs/tag/Tag.js.map +1 -1
  119. package/lib/cjs/tag/stories/tag.stories.js +10 -10
  120. package/lib/cjs/tag/stories/tag.stories.js.map +1 -1
  121. package/lib/cjs/text-area/TextArea.js +5 -5
  122. package/lib/cjs/text-area/TextArea.js.map +1 -1
  123. package/lib/cjs/text-area/stories/text-area.stories.js +25 -25
  124. package/lib/cjs/text-area/stories/text-area.stories.js.map +1 -1
  125. package/lib/cjs/text-input/stories/text-input-number.story.js +2 -2
  126. package/lib/cjs/text-input/stories/text-input-number.story.js.map +1 -1
  127. package/lib/cjs/text-link/stories/text-link.stories.js +11 -11
  128. package/lib/cjs/text-link/stories/text-link.stories.js.map +1 -1
  129. package/lib/cjs/text-overflow/stories/text-overflow.stories.js +1 -1
  130. package/lib/cjs/text-overflow/stories/text-overflow.stories.js.map +1 -1
  131. package/lib/cjs/theme/ThemeProvider.js.map +1 -1
  132. package/lib/cjs/theme/agnostic.js +1 -1
  133. package/lib/cjs/theme/agnostic.js.map +1 -1
  134. package/lib/cjs/time-picker/TimePicker.js +4 -4
  135. package/lib/cjs/time-picker/TimePicker.js.map +1 -1
  136. package/lib/cjs/time-picker/time-picker-hooks.js +1 -1
  137. package/lib/cjs/time-picker/time-picker-hooks.js.map +1 -1
  138. package/lib/cjs/timezone-picker/TimeZonePicker.js +5 -5
  139. package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
  140. package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +7 -7
  141. package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
  142. package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
  143. package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
  144. package/lib/cjs/toast/Toast.js +12 -12
  145. package/lib/cjs/toast/Toast.js.map +1 -1
  146. package/lib/cjs/toast/stories/toast-action-story.js +1 -1
  147. package/lib/cjs/toast/stories/toast-action-story.js.map +1 -1
  148. package/lib/cjs/toast/stories/toast-controlled-story.js +2 -2
  149. package/lib/cjs/toast/stories/toast-controlled-story.js.map +1 -1
  150. package/lib/cjs/toast/stories/toast-progress-bar.js +1 -1
  151. package/lib/cjs/toast/stories/toast-progress-bar.js.map +1 -1
  152. package/lib/cjs/toast/stories/toast.stories.js +18 -18
  153. package/lib/cjs/toast/stories/toast.stories.js.map +1 -1
  154. package/lib/cjs/tooltip/Tooltip.js +1 -1
  155. package/lib/cjs/tooltip/Tooltip.js.map +1 -1
  156. package/lib/cjs/tooltip/stories/tooltip-hover-delay.story.js +1 -1
  157. package/lib/cjs/tooltip/stories/tooltip-hover-delay.story.js.map +1 -1
  158. package/lib/cjs/tooltip/stories/tooltip-placements.story.js +8 -8
  159. package/lib/cjs/tooltip/stories/tooltip-placements.story.js.map +1 -1
  160. package/lib/cjs/tooltip/stories/tooltip.stories.js +29 -29
  161. package/lib/cjs/tooltip/stories/tooltip.stories.js.map +1 -1
  162. package/lib/cjs/tooltip/use-tooltip.js +10 -10
  163. package/lib/cjs/tooltip/use-tooltip.js.map +1 -1
  164. package/lib/cjs/tree-view/TreeItemWrapper.js +2 -2
  165. package/lib/cjs/tree-view/TreeItemWrapper.js.map +1 -1
  166. package/lib/cjs/tree-view/TreeView.js +12 -12
  167. package/lib/cjs/tree-view/TreeView.js.map +1 -1
  168. package/lib/cjs/tree-view/TreeViewItem.js +1 -1
  169. package/lib/cjs/tree-view/TreeViewItem.js.map +1 -1
  170. package/lib/cjs/tree-view/TreeViewTextItem.js +1 -1
  171. package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
  172. package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js +2 -2
  173. package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
  174. package/lib/cjs/wizard/Wizard.js +2 -2
  175. package/lib/cjs/wizard/Wizard.js.map +1 -1
  176. package/lib/cjs/wizard/stories/wizard.stories.js +14 -14
  177. package/lib/cjs/wizard/stories/wizard.stories.js.map +1 -1
  178. package/lib/esm/_common/types.js.map +1 -1
  179. package/lib/esm/_common/utils.js +4 -4
  180. package/lib/esm/_common/utils.js.map +1 -1
  181. package/lib/esm/accordion/Accordion.js +5 -5
  182. package/lib/esm/accordion/Accordion.js.map +1 -1
  183. package/lib/esm/accordion/accordion-context.js +1 -1
  184. package/lib/esm/accordion/accordion-context.js.map +1 -1
  185. package/lib/esm/accordion/stories/accordion.stories.js +20 -20
  186. package/lib/esm/accordion/stories/accordion.stories.js.map +1 -1
  187. package/lib/esm/avatar/stories/avatar.stories.js +18 -18
  188. package/lib/esm/avatar/stories/avatar.stories.js.map +1 -1
  189. package/lib/esm/breadcrumbs/stories/breadcrumbs.stories.js +1 -1
  190. package/lib/esm/breadcrumbs/stories/breadcrumbs.stories.js.map +1 -1
  191. package/lib/esm/checkbox/stories/checkbox-full.story.js +2 -2
  192. package/lib/esm/checkbox/stories/checkbox-full.story.js.map +1 -1
  193. package/lib/esm/checkbox/stories/checkbox.stories.js +19 -19
  194. package/lib/esm/checkbox/stories/checkbox.stories.js.map +1 -1
  195. package/lib/esm/clean-icon-button/stories/clean-icon-button.stories.js +11 -11
  196. package/lib/esm/clean-icon-button/stories/clean-icon-button.stories.js.map +1 -1
  197. package/lib/esm/code-block/stories/code-disabled.story.js +2 -2
  198. package/lib/esm/code-block/stories/code-disabled.story.js.map +1 -1
  199. package/lib/esm/code-block/stories/code-full.story.js +2 -2
  200. package/lib/esm/code-block/stories/code-full.story.js.map +1 -1
  201. package/lib/esm/code-block/stories/code-with-actions.story.js +2 -2
  202. package/lib/esm/code-block/stories/code-with-actions.story.js.map +1 -1
  203. package/lib/esm/code-block/themes/ndl-code-dark.js +64 -64
  204. package/lib/esm/code-block/themes/ndl-code-dark.js.map +1 -1
  205. package/lib/esm/code-block/themes/ndl-code-light.js +64 -64
  206. package/lib/esm/code-block/themes/ndl-code-light.js.map +1 -1
  207. package/lib/esm/color-picker/ColorPicker.js +1 -1
  208. package/lib/esm/color-picker/ColorPicker.js.map +1 -1
  209. package/lib/esm/color-picker/stories/color-picker.stories.js +4 -4
  210. package/lib/esm/color-picker/stories/color-picker.stories.js.map +1 -1
  211. package/lib/esm/data-grid/Components.js +13 -11
  212. package/lib/esm/data-grid/Components.js.map +1 -1
  213. package/lib/esm/data-grid/DataGrid.js.map +1 -1
  214. package/lib/esm/data-grid/data-grid-context.js +1 -1
  215. package/lib/esm/data-grid/data-grid-context.js.map +1 -1
  216. package/lib/esm/data-grid/data-grid-nav/index.js +1 -1
  217. package/lib/esm/data-grid/data-grid-nav/index.js.map +1 -1
  218. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
  219. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  220. package/lib/esm/date-picker/stories/date-picker-full.story.js +9 -9
  221. package/lib/esm/date-picker/stories/date-picker-full.story.js.map +1 -1
  222. package/lib/esm/divider/stories/divider-horizontal.story.js +1 -1
  223. package/lib/esm/divider/stories/divider-horizontal.story.js.map +1 -1
  224. package/lib/esm/divider/stories/divider-vertical.story.js +1 -1
  225. package/lib/esm/divider/stories/divider-vertical.story.js.map +1 -1
  226. package/lib/esm/drawer/stories/drawer.stories.js +19 -19
  227. package/lib/esm/drawer/stories/drawer.stories.js.map +1 -1
  228. package/lib/esm/dropdown-button/stories/dropdown-button.stories.js +18 -18
  229. package/lib/esm/dropdown-button/stories/dropdown-button.stories.js.map +1 -1
  230. package/lib/esm/dropzone/stories/dropzone-disabled.story.js +1 -1
  231. package/lib/esm/dropzone/stories/dropzone-disabled.story.js.map +1 -1
  232. package/lib/esm/dropzone/stories/dropzone-full.story.js +11 -11
  233. package/lib/esm/dropzone/stories/dropzone-full.story.js.map +1 -1
  234. package/lib/esm/dropzone/stories/dropzone.stories.js +10 -10
  235. package/lib/esm/dropzone/stories/dropzone.stories.js.map +1 -1
  236. package/lib/esm/flex/Flex.js +4 -4
  237. package/lib/esm/flex/Flex.js.map +1 -1
  238. package/lib/esm/graph-label/stories/graph-label.stories.js +20 -20
  239. package/lib/esm/graph-label/stories/graph-label.stories.js.map +1 -1
  240. package/lib/esm/hooks/index.js +3 -3
  241. package/lib/esm/hooks/index.js.map +1 -1
  242. package/lib/esm/icon-button/stories/icon-button.stories.js +12 -12
  243. package/lib/esm/icon-button/stories/icon-button.stories.js.map +1 -1
  244. package/lib/esm/icon-button-array/stories/icon-button-array.stories.js +16 -16
  245. package/lib/esm/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
  246. package/lib/esm/icons/wrapIcon.js +1 -1
  247. package/lib/esm/icons/wrapIcon.js.map +1 -1
  248. package/lib/esm/kbd/stories/kbd.stories.js +7 -7
  249. package/lib/esm/kbd/stories/kbd.stories.js.map +1 -1
  250. package/lib/esm/loading-spinner/LoadingSpinner.js +2 -2
  251. package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
  252. package/lib/esm/loading-spinner/stories/loading-spinner.stories.js +10 -10
  253. package/lib/esm/loading-spinner/stories/loading-spinner.stories.js.map +1 -1
  254. package/lib/esm/logo/Logo.js +6 -6
  255. package/lib/esm/logo/Logo.js.map +1 -1
  256. package/lib/esm/logo/stories/logo.stories.js +9 -9
  257. package/lib/esm/logo/stories/logo.stories.js.map +1 -1
  258. package/lib/esm/menu/Menu.js +3 -3
  259. package/lib/esm/menu/Menu.js.map +1 -1
  260. package/lib/esm/popover/Popover.js +15 -15
  261. package/lib/esm/popover/Popover.js.map +1 -1
  262. package/lib/esm/popover/use-popover.js +9 -9
  263. package/lib/esm/popover/use-popover.js.map +1 -1
  264. package/lib/esm/progress-bar/stories/progress-bar.stories.js +3 -3
  265. package/lib/esm/progress-bar/stories/progress-bar.stories.js.map +1 -1
  266. package/lib/esm/segmented-control/SegmentedControl.js +1 -1
  267. package/lib/esm/segmented-control/SegmentedControl.js.map +1 -1
  268. package/lib/esm/select/Overrides.js +41 -41
  269. package/lib/esm/select/Overrides.js.map +1 -1
  270. package/lib/esm/select/stories/select-async.story.js +4 -4
  271. package/lib/esm/select/stories/select-async.story.js.map +1 -1
  272. package/lib/esm/select/stories/select-controlled.story.js +4 -4
  273. package/lib/esm/select/stories/select-controlled.story.js.map +1 -1
  274. package/lib/esm/select/stories/select-creatable.story.js +1 -1
  275. package/lib/esm/select/stories/select-creatable.story.js.map +1 -1
  276. package/lib/esm/select/stories/select-custom-label.story.js +1 -1
  277. package/lib/esm/select/stories/select-custom-label.story.js.map +1 -1
  278. package/lib/esm/select/stories/select-disabled.story.js +1 -1
  279. package/lib/esm/select/stories/select-disabled.story.js.map +1 -1
  280. package/lib/esm/select/stories/select-inside-dialog.story.js +1 -1
  281. package/lib/esm/select/stories/select-inside-dialog.story.js.map +1 -1
  282. package/lib/esm/side-navigation/stories/side-nav.stories.js +1 -1
  283. package/lib/esm/side-navigation/stories/side-nav.stories.js.map +1 -1
  284. package/lib/esm/skeleton/stories/skeleton.stories.js +28 -28
  285. package/lib/esm/skeleton/stories/skeleton.stories.js.map +1 -1
  286. package/lib/esm/slider/Slider.js +2 -1
  287. package/lib/esm/slider/Slider.js.map +1 -1
  288. package/lib/esm/status-indicator/stories/status-indicator.stories.js +2 -2
  289. package/lib/esm/status-indicator/stories/status-indicator.stories.js.map +1 -1
  290. package/lib/esm/switch/stories/switch.stories.js +7 -7
  291. package/lib/esm/switch/stories/switch.stories.js.map +1 -1
  292. package/lib/esm/tabs/Tabs.js +1 -1
  293. package/lib/esm/tabs/Tabs.js.map +1 -1
  294. package/lib/esm/tag/Tag.js +2 -2
  295. package/lib/esm/tag/Tag.js.map +1 -1
  296. package/lib/esm/tag/stories/tag.stories.js +10 -10
  297. package/lib/esm/tag/stories/tag.stories.js.map +1 -1
  298. package/lib/esm/text-area/TextArea.js +5 -5
  299. package/lib/esm/text-area/TextArea.js.map +1 -1
  300. package/lib/esm/text-area/stories/text-area.stories.js +25 -25
  301. package/lib/esm/text-area/stories/text-area.stories.js.map +1 -1
  302. package/lib/esm/text-input/stories/text-input-number.story.js +2 -2
  303. package/lib/esm/text-input/stories/text-input-number.story.js.map +1 -1
  304. package/lib/esm/text-link/stories/text-link.stories.js +11 -11
  305. package/lib/esm/text-link/stories/text-link.stories.js.map +1 -1
  306. package/lib/esm/text-overflow/stories/text-overflow.stories.js +1 -1
  307. package/lib/esm/text-overflow/stories/text-overflow.stories.js.map +1 -1
  308. package/lib/esm/theme/ThemeProvider.js.map +1 -1
  309. package/lib/esm/theme/agnostic.js +1 -1
  310. package/lib/esm/theme/agnostic.js.map +1 -1
  311. package/lib/esm/time-picker/TimePicker.js +4 -4
  312. package/lib/esm/time-picker/TimePicker.js.map +1 -1
  313. package/lib/esm/time-picker/time-picker-hooks.js +1 -1
  314. package/lib/esm/time-picker/time-picker-hooks.js.map +1 -1
  315. package/lib/esm/timezone-picker/TimeZonePicker.js +5 -5
  316. package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
  317. package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +7 -7
  318. package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
  319. package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
  320. package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
  321. package/lib/esm/toast/Toast.js +12 -12
  322. package/lib/esm/toast/Toast.js.map +1 -1
  323. package/lib/esm/toast/stories/toast-action-story.js +1 -1
  324. package/lib/esm/toast/stories/toast-action-story.js.map +1 -1
  325. package/lib/esm/toast/stories/toast-controlled-story.js +2 -2
  326. package/lib/esm/toast/stories/toast-controlled-story.js.map +1 -1
  327. package/lib/esm/toast/stories/toast-progress-bar.js +1 -1
  328. package/lib/esm/toast/stories/toast-progress-bar.js.map +1 -1
  329. package/lib/esm/toast/stories/toast.stories.js +18 -18
  330. package/lib/esm/toast/stories/toast.stories.js.map +1 -1
  331. package/lib/esm/tooltip/Tooltip.js +1 -1
  332. package/lib/esm/tooltip/Tooltip.js.map +1 -1
  333. package/lib/esm/tooltip/stories/tooltip-hover-delay.story.js +1 -1
  334. package/lib/esm/tooltip/stories/tooltip-hover-delay.story.js.map +1 -1
  335. package/lib/esm/tooltip/stories/tooltip-placements.story.js +8 -8
  336. package/lib/esm/tooltip/stories/tooltip-placements.story.js.map +1 -1
  337. package/lib/esm/tooltip/stories/tooltip.stories.js +29 -29
  338. package/lib/esm/tooltip/stories/tooltip.stories.js.map +1 -1
  339. package/lib/esm/tooltip/use-tooltip.js +10 -10
  340. package/lib/esm/tooltip/use-tooltip.js.map +1 -1
  341. package/lib/esm/tree-view/TreeItemWrapper.js +2 -2
  342. package/lib/esm/tree-view/TreeItemWrapper.js.map +1 -1
  343. package/lib/esm/tree-view/TreeView.js +12 -12
  344. package/lib/esm/tree-view/TreeView.js.map +1 -1
  345. package/lib/esm/tree-view/TreeViewItem.js +1 -1
  346. package/lib/esm/tree-view/TreeViewItem.js.map +1 -1
  347. package/lib/esm/tree-view/TreeViewTextItem.js +1 -1
  348. package/lib/esm/tree-view/TreeViewTextItem.js.map +1 -1
  349. package/lib/esm/tree-view/tree-view-keyboard-coordinates.js +2 -2
  350. package/lib/esm/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
  351. package/lib/esm/wizard/Wizard.js +2 -2
  352. package/lib/esm/wizard/Wizard.js.map +1 -1
  353. package/lib/esm/wizard/stories/wizard.stories.js +14 -14
  354. package/lib/esm/wizard/stories/wizard.stories.js.map +1 -1
  355. package/lib/types/accordion/stories/accordion.stories.d.ts +3 -3
  356. package/lib/types/breadcrumbs/stories/breadcrumbs.stories.d.ts +1 -1
  357. package/lib/types/data-grid/Components.d.ts.map +1 -1
  358. package/lib/types/logo/stories/logo.stories.d.ts +3 -3
  359. package/lib/types/side-navigation/stories/side-nav.stories.d.ts +1 -1
  360. package/lib/types/skeleton/stories/skeleton.stories.d.ts +3 -3
  361. package/lib/types/slider/Slider.d.ts.map +1 -1
  362. package/lib/types/time-picker/time-picker-hooks.d.ts +1 -1
  363. package/lib/types/time-picker/time-picker-hooks.d.ts.map +1 -1
  364. package/lib/types/toast/stories/toast.stories.d.ts +2 -2
  365. package/package.json +1 -1
@@ -25,12 +25,12 @@ const index_1 = require("../index");
25
25
  const _1 = require(".");
26
26
  const componentMeta = {
27
27
  component: index_1.SideNavigation,
28
+ id: 'components-side-navigation',
28
29
  parameters: {
29
30
  controls: { disable: true },
30
31
  },
31
32
  tags: ['docsPage'],
32
33
  title: 'Components/SideNavigation',
33
- id: 'components-side-navigation',
34
34
  };
35
35
  exports.default = componentMeta;
36
36
  exports.Default = {
@@ -1 +1 @@
1
- {"version":3,"file":"side-nav.stories.js","sourceRoot":"","sources":["../../../../src/side-navigation/stories/side-nav.stories.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAIH,oCAA0C;AAC1C,wBASW;AAEX,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE,sBAAc;IACzB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,2BAA2B;IAClC,EAAE,EAAE,4BAA4B;CACK,CAAC;AAExC,kBAAe,aAAa,CAAC;AAGhB,QAAA,OAAO,GAAU;IAC5B,uCAAuC;IACvC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,oBAAiB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,iBAAc;CACvB,CAAC;AAEW,QAAA,OAAO,GAAU;IAC5B,uCAAuC;IACvC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,oBAAiB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,iBAAc;CACvB,CAAC;AAEW,QAAA,gBAAgB,GAAU;IACrC,uCAAuC;IACvC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,sBAAmB;gBACzB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,mBAAgB;CACzB,CAAC;AAEW,QAAA,UAAU,GAAU;IAC/B,uCAAuC;IACvC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,mBAAgB;gBACtB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,gBAAa;CACtB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { SideNavigation } from '../index';\nimport {\n SideNavBadges,\n SideNavBadgesSrc,\n SideNavCompact,\n SideNavCompactSrc,\n SideNavDefault,\n SideNavDefaultSrc,\n SideNavSecondary,\n SideNavSecondarySrc,\n} from '.';\n\nconst componentMeta = {\n component: SideNavigation,\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/SideNavigation',\n id: 'components-side-navigation',\n} satisfies Meta<typeof SideNavigation>;\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n // @ts-expect-error - we don't use args\n args: {},\n parameters: {\n docs: {\n source: {\n code: SideNavDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SideNavDefault,\n};\n\nexport const Compact: Story = {\n // @ts-expect-error - we don't use args\n args: {},\n parameters: {\n docs: {\n source: {\n code: SideNavCompactSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SideNavCompact,\n};\n\nexport const WithSecondaryNav: Story = {\n // @ts-expect-error - we don't use args\n args: {},\n parameters: {\n docs: {\n source: {\n code: SideNavSecondarySrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SideNavSecondary,\n};\n\nexport const WithBadges: Story = {\n // @ts-expect-error - we don't use args\n args: {},\n parameters: {\n docs: {\n source: {\n code: SideNavBadgesSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SideNavBadges,\n};\n"]}
1
+ {"version":3,"file":"side-nav.stories.js","sourceRoot":"","sources":["../../../../src/side-navigation/stories/side-nav.stories.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAIH,oCAA0C;AAC1C,wBASW;AAEX,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE,sBAAc;IACzB,EAAE,EAAE,4BAA4B;IAChC,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,2BAA2B;CACG,CAAC;AAExC,kBAAe,aAAa,CAAC;AAGhB,QAAA,OAAO,GAAU;IAC5B,uCAAuC;IACvC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,oBAAiB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,iBAAc;CACvB,CAAC;AAEW,QAAA,OAAO,GAAU;IAC5B,uCAAuC;IACvC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,oBAAiB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,iBAAc;CACvB,CAAC;AAEW,QAAA,gBAAgB,GAAU;IACrC,uCAAuC;IACvC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,sBAAmB;gBACzB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,mBAAgB;CACzB,CAAC;AAEW,QAAA,UAAU,GAAU;IAC/B,uCAAuC;IACvC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,mBAAgB;gBACtB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,gBAAa;CACtB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { SideNavigation } from '../index';\nimport {\n SideNavBadges,\n SideNavBadgesSrc,\n SideNavCompact,\n SideNavCompactSrc,\n SideNavDefault,\n SideNavDefaultSrc,\n SideNavSecondary,\n SideNavSecondarySrc,\n} from '.';\n\nconst componentMeta = {\n component: SideNavigation,\n id: 'components-side-navigation',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/SideNavigation',\n} satisfies Meta<typeof SideNavigation>;\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n // @ts-expect-error - we don't use args\n args: {},\n parameters: {\n docs: {\n source: {\n code: SideNavDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SideNavDefault,\n};\n\nexport const Compact: Story = {\n // @ts-expect-error - we don't use args\n args: {},\n parameters: {\n docs: {\n source: {\n code: SideNavCompactSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SideNavCompact,\n};\n\nexport const WithSecondaryNav: Story = {\n // @ts-expect-error - we don't use args\n args: {},\n parameters: {\n docs: {\n source: {\n code: SideNavSecondarySrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SideNavSecondary,\n};\n\nexport const WithBadges: Story = {\n // @ts-expect-error - we don't use args\n args: {},\n parameters: {\n docs: {\n source: {\n code: SideNavBadgesSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SideNavBadges,\n};\n"]}
@@ -25,113 +25,113 @@ exports.FullExample = exports.InheritHeight = exports.InheritWidth = exports.Cir
25
25
  const index_1 = require("../../index");
26
26
  const _1 = require(".");
27
27
  const componentMeta = {
28
- title: 'Components/Skeleton',
29
- id: 'components-skeleton',
30
28
  component: index_1.Skeleton,
31
- tags: ['docsPage'],
29
+ id: 'components-skeleton',
32
30
  parameters: {
33
31
  controls: { disable: true },
34
32
  },
33
+ tags: ['docsPage'],
34
+ title: 'Components/Skeleton',
35
35
  };
36
36
  exports.default = componentMeta;
37
37
  exports.Default = {
38
38
  args: {
39
39
  children: undefined,
40
- shape: 'rectangular',
41
40
  height: undefined,
42
- width: undefined,
43
- onBackground: 'default',
44
41
  isLoading: true,
42
+ onBackground: 'default',
43
+ shape: 'rectangular',
44
+ width: undefined,
45
45
  },
46
- render: _1.SkeletonDefault,
47
46
  parameters: {
48
47
  docs: {
49
48
  source: {
49
+ code: _1.SkeletonDefaultSrc,
50
50
  language: 'tsx',
51
51
  type: 'code',
52
- code: _1.SkeletonDefaultSrc,
53
52
  },
54
53
  },
55
54
  },
55
+ render: _1.SkeletonDefault,
56
56
  };
57
57
  exports.Circular = {
58
58
  args: {
59
59
  children: undefined,
60
- shape: 'circular',
61
60
  height: undefined,
62
- width: undefined,
63
- onBackground: 'default',
64
61
  isLoading: true,
62
+ onBackground: 'default',
63
+ shape: 'circular',
64
+ width: undefined,
65
65
  },
66
- render: _1.SkeletonCircular,
67
66
  parameters: {
68
67
  docs: {
69
68
  source: {
69
+ code: _1.SkeletonCircularSrc,
70
70
  language: 'tsx',
71
71
  type: 'code',
72
- code: _1.SkeletonCircularSrc,
73
72
  },
74
73
  },
75
74
  },
75
+ render: _1.SkeletonCircular,
76
76
  };
77
77
  exports.InheritWidth = {
78
78
  args: {
79
79
  children: undefined,
80
- shape: 'rectangular',
81
80
  height: undefined,
82
- width: undefined,
83
- onBackground: 'default',
84
81
  isLoading: true,
82
+ onBackground: 'default',
83
+ shape: 'rectangular',
84
+ width: undefined,
85
85
  },
86
- render: _1.SkeletonInheritWidth,
87
86
  parameters: {
88
87
  docs: {
89
88
  source: {
89
+ code: _1.SkeletonInheritWidthSrc,
90
90
  language: 'tsx',
91
91
  type: 'code',
92
- code: _1.SkeletonInheritWidthSrc,
93
92
  },
94
93
  },
95
94
  },
95
+ render: _1.SkeletonInheritWidth,
96
96
  };
97
97
  exports.InheritHeight = {
98
98
  args: {
99
99
  children: undefined,
100
- shape: 'rectangular',
101
100
  height: undefined,
102
- width: undefined,
103
- onBackground: 'default',
104
101
  isLoading: true,
102
+ onBackground: 'default',
103
+ shape: 'rectangular',
104
+ width: undefined,
105
105
  },
106
- render: _1.SkeletonInheritHeight,
107
106
  parameters: {
108
107
  docs: {
109
108
  source: {
109
+ code: _1.SkeletonInheritHeightSrc,
110
110
  language: 'tsx',
111
111
  type: 'code',
112
- code: _1.SkeletonInheritHeightSrc,
113
112
  },
114
113
  },
115
114
  },
115
+ render: _1.SkeletonInheritHeight,
116
116
  };
117
117
  exports.FullExample = {
118
118
  args: {
119
119
  children: undefined,
120
- shape: 'rectangular',
121
120
  height: undefined,
122
- width: undefined,
123
- onBackground: 'default',
124
121
  isLoading: true,
122
+ onBackground: 'default',
123
+ shape: 'rectangular',
124
+ width: undefined,
125
125
  },
126
- render: _1.SkeletonFullExample,
127
126
  parameters: {
128
127
  docs: {
129
128
  source: {
129
+ code: _1.SkeletonFullExampleSrc,
130
130
  language: 'tsx',
131
131
  type: 'code',
132
- code: _1.SkeletonFullExampleSrc,
133
132
  },
134
133
  },
135
134
  },
135
+ render: _1.SkeletonFullExample,
136
136
  };
137
137
  //# sourceMappingURL=skeleton.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.stories.js","sourceRoot":"","sources":["../../../../src/skeleton/stories/skeleton.stories.tsx"],"names":[],"mappings":";;;AAsBA,uCAAuC;AACvC,wBAWW;AAEX,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE,qBAAqB;IAC5B,EAAE,EAAE,qBAAqB;IACzB,SAAS,EAAE,gBAAQ;IACnB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;CAC8B,CAAC;AAElC,kBAAe,aAAa,CAAC;AAGhB,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,aAAa;QACpB,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,SAAS;QACvB,SAAS,EAAE,IAAI;KAChB;IACD,MAAM,EAAE,kBAAe;IACvB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,qBAAkB;aACzB;SACF;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AE,aAAa;QACpB,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,SAAS;QACvB,SAAS,EAAE,IAAI;KAChB;IACD,MAAM,EAAE,sBAAmB;IAC3B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,yBAAsB;aAC7B;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 { Skeleton } from '../../index';\nimport {\n SkeletonCircular,\n SkeletonCircularSrc,\n SkeletonDefault,\n SkeletonDefaultSrc,\n SkeletonFullExample,\n SkeletonFullExampleSrc,\n SkeletonInheritHeight,\n SkeletonInheritHeightSrc,\n SkeletonInheritWidth,\n SkeletonInheritWidthSrc,\n} from '.';\n\nconst componentMeta = {\n title: 'Components/Skeleton',\n id: 'components-skeleton',\n component: Skeleton,\n tags: ['docsPage'],\n parameters: {\n controls: { disable: true },\n },\n} satisfies Meta<typeof Skeleton>;\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {\n children: undefined,\n shape: 'rectangular',\n height: undefined,\n width: undefined,\n onBackground: 'default',\n isLoading: true,\n },\n render: SkeletonDefault,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: SkeletonDefaultSrc,\n },\n },\n },\n};\n\nexport const Circular: Story = {\n args: {\n children: undefined,\n shape: 'circular',\n height: undefined,\n width: undefined,\n onBackground: 'default',\n isLoading: true,\n },\n render: SkeletonCircular,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: SkeletonCircularSrc,\n },\n },\n },\n};\n\nexport const InheritWidth: Story = {\n args: {\n children: undefined,\n shape: 'rectangular',\n height: undefined,\n width: undefined,\n onBackground: 'default',\n isLoading: true,\n },\n render: SkeletonInheritWidth,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: SkeletonInheritWidthSrc,\n },\n },\n },\n};\n\nexport const InheritHeight: Story = {\n args: {\n children: undefined,\n shape: 'rectangular',\n height: undefined,\n width: undefined,\n onBackground: 'default',\n isLoading: true,\n },\n render: SkeletonInheritHeight,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: SkeletonInheritHeightSrc,\n },\n },\n },\n};\n\nexport const FullExample: Story = {\n args: {\n children: undefined,\n shape: 'rectangular',\n height: undefined,\n width: undefined,\n onBackground: 'default',\n isLoading: true,\n },\n render: SkeletonFullExample,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: SkeletonFullExampleSrc,\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"skeleton.stories.js","sourceRoot":"","sources":["../../../../src/skeleton/stories/skeleton.stories.tsx"],"names":[],"mappings":";;;AAsBA,uCAAuC;AACvC,wBAWW;AAEX,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE,gBAAQ;IACnB,EAAE,EAAE,qBAAqB;IACzB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,qBAAqB;CACG,CAAC;AAElC,kBAAe,aAAa,CAAC;AAGhB,QAAA,OAAO,GAAU;IAC5B,IAAI,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AAK,EAAE,aAAa;QACpB,KAAK,EAAE,SAAS;KACjB;IACD,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,2BAAwB;gBAC9B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,wBAAqB;CAC9B,CAAC;AAEW,QAAA,WAAW,GAAU;IAChC,IAAI,EAAE;QACJ,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,SAAS;QACvB,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,SAAS;KACjB;IACD,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,yBAAsB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,sBAAmB;CAC5B,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 { Skeleton } from '../../index';\nimport {\n SkeletonCircular,\n SkeletonCircularSrc,\n SkeletonDefault,\n SkeletonDefaultSrc,\n SkeletonFullExample,\n SkeletonFullExampleSrc,\n SkeletonInheritHeight,\n SkeletonInheritHeightSrc,\n SkeletonInheritWidth,\n SkeletonInheritWidthSrc,\n} from '.';\n\nconst componentMeta = {\n component: Skeleton,\n id: 'components-skeleton',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/Skeleton',\n} satisfies Meta<typeof Skeleton>;\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {\n children: undefined,\n height: undefined,\n isLoading: true,\n onBackground: 'default',\n shape: 'rectangular',\n width: undefined,\n },\n parameters: {\n docs: {\n source: {\n code: SkeletonDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SkeletonDefault,\n};\n\nexport const Circular: Story = {\n args: {\n children: undefined,\n height: undefined,\n isLoading: true,\n onBackground: 'default',\n shape: 'circular',\n width: undefined,\n },\n parameters: {\n docs: {\n source: {\n code: SkeletonCircularSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SkeletonCircular,\n};\n\nexport const InheritWidth: Story = {\n args: {\n children: undefined,\n height: undefined,\n isLoading: true,\n onBackground: 'default',\n shape: 'rectangular',\n width: undefined,\n },\n parameters: {\n docs: {\n source: {\n code: SkeletonInheritWidthSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SkeletonInheritWidth,\n};\n\nexport const InheritHeight: Story = {\n args: {\n children: undefined,\n height: undefined,\n isLoading: true,\n onBackground: 'default',\n shape: 'rectangular',\n width: undefined,\n },\n parameters: {\n docs: {\n source: {\n code: SkeletonInheritHeightSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SkeletonInheritHeight,\n};\n\nexport const FullExample: Story = {\n args: {\n children: undefined,\n height: undefined,\n isLoading: true,\n onBackground: 'default',\n shape: 'rectangular',\n width: undefined,\n },\n parameters: {\n docs: {\n source: {\n code: SkeletonFullExampleSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SkeletonFullExample,\n};\n"]}
@@ -89,7 +89,8 @@ const Slider = (_a) => {
89
89
  maxValue,
90
90
  minValue,
91
91
  numberFormatter: new Intl.NumberFormat('en-US'),
92
- onChange: castedOnChange, // eslint-disable-line @typescript-eslint/no-explicit-any
92
+ // oxlint-disable-next-line no-explicit-any
93
+ onChange: castedOnChange,
93
94
  step,
94
95
  });
95
96
  const { setThumbValue } = state;
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../src/slider/Slider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AACpC,+CAAsD;AACtD,2CAMoB;AACpB,iDAAiE;AAMjE,wCAAqC;AAuC9B,MAAM,MAAM,GAAG,CAAsC,EAgBnB,EAAE,EAAE;QAhBe,EAC1D,EAAE,EACF,UAAU,GAAG,EAAE,EACf,SAAS,EACT,KAAK,EACL,QAAQ,GAAG,CAAC,EACZ,QAAQ,GAAG,GAAG,EACd,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,IAAI,GAAG,CAAC,EACR,IAAI,GAAG,QAAQ,EACf,QAAQ,EACR,cAAc,EACd,GAAG,OAEoC,EADpC,SAAS,cAf8C,gKAgB3D,CADa;IAEZ,MAAM,QAAQ,GAAG,eAAK,CAAC,MAAM,CAAwB,IAAI,CAAC,CAAC;IAE3D,MAAM,WAAW,GACf,IAAI,KAAK,OAAO;QACd,CAAC,CAAE,SAAyB,CAAC,MAAM;QACnC,CAAC,CAAE,SAA0B,CAAC,KAAK,CAAC;IAExC,MAAM,cAAc,GAClB,IAAI,KAAK,OAAO;QACd,CAAC,CAAE,QAAoC;QACvC,CAAC,CAAE,QAAqC,CAAC;IAE7C,MAAM,KAAK,GAAG,IAAA,8BAAc,EAAqB;QAC/C,YAAY,EAAE,WAAW;QACzB,UAAU;QACV,QAAQ;QACR,QAAQ;QACR,eAAe,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;QAC/C,QAAQ,EAAE,cAAqB,E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AC,WAAW,EAAE;wBACjC,WAAW,EAAE,cAAc;wBAC3B,iBAAiB,EAAE,UAAU;qBAC9B,CAAC,YAEF,uBAAC,2BAAc,cACb,gDAAO,GAAG,EAAE,QAAQ,IAAM,WAAW,EAAI,GAC1B,IACb,GACU,EAClB,uBAAC,iBAAO,CAAC,OAAO,cAAE,KAAK,GAAmB,IAClC,CACX,CAAC;AACJ,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React, { useCallback, useEffect } from 'react';\nimport {\n mergeProps,\n useFocusRing,\n useSlider,\n useSliderThumb,\n VisuallyHidden,\n} from 'react-aria';\nimport { type SliderState, useSliderState } from 'react-stately';\n\nimport {\n type HtmlAttributes,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { Tooltip } from '../tooltip';\n\ntype SliderPropsBase = {\n /** Input props of the underlying input element */\n inputProps?: HtmlAttributes<'input'>;\n /** Determines the step size that will be added or removed from the current value when moving the slider button */\n step?: number;\n /** Whether the slider is disabled */\n isDisabled?: boolean;\n /** The minimum value possible to choose */\n minValue?: number;\n /** The maximum value possible to choose */\n maxValue?: number;\n /** Whether to display a tooltip with the current value when the slider is being dragged */\n showValues?: boolean;\n /** Whether to display visual indicators for each step in the slider */\n showSteps?: boolean;\n};\n\ntype SingleSlider = SliderPropsBase & {\n /** Type of the slider */\n type?: 'single';\n /** Current value of the single slider. **Only required when the type is 'single'**. */\n value: number;\n /** Callback function triggered when the slider value(s) changes. The function parameter varies depending on the slider type, for single slider, it is a number and for range slider, it is an array of two numbers. */\n onChange: (value: number) => void;\n};\n\ntype RangeSlider = SliderPropsBase & {\n /** Type of the slider */\n type: 'range';\n /** Current values of the range slider as an array of two numbers `[min, max]`. **Only required when the type is 'range'**.*/\n values: [number, number];\n /** Callback function triggered when the slider value(s) changes. The function parameter varies depending on the slider type, for single slider, it is a number and for range slider, it is an array of two numbers. */\n onChange: (value: [number, number]) => void;\n};\n\ntype SliderProps = SingleSlider | RangeSlider;\n\nexport const Slider = <T extends React.ElementType = 'div'>({\n as,\n inputProps = {},\n className,\n style,\n minValue = 0,\n maxValue = 100,\n isDisabled = false,\n showSteps = false,\n showValues = false,\n step = 1,\n type = 'single',\n onChange,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, SliderProps>) => {\n const trackRef = React.useRef<HTMLDivElement | null>(null);\n\n const castedValue =\n type === 'range'\n ? (restProps as RangeSlider).values\n : (restProps as SingleSlider).value;\n\n const castedOnChange =\n type === 'range'\n ? (onChange as RangeSlider['onChange'])\n : (onChange as SingleSlider['onChange']);\n\n const state = useSliderState<typeof castedValue>({\n defaultValue: castedValue,\n isDisabled,\n maxValue,\n minValue,\n numberFormatter: new Intl.NumberFormat('en-US'),\n onChange: castedOnChange as any, // eslint-disable-line @typescript-eslint/no-explicit-any\n step,\n });\n\n const { setThumbValue } = state;\n\n const { groupProps, trackProps } = useSlider(\n { 'aria-label': 'slider' },\n state,\n trackRef,\n );\n\n const updatesSliderValue = useCallback(\n (newValue: number | [number, number]) => {\n if (type === 'single' && typeof newValue === 'number') {\n setThumbValue(0, newValue);\n } else if (type === 'range' && Array.isArray(newValue)) {\n setThumbValue(0, newValue[0]);\n setThumbValue(1, newValue[1]);\n }\n },\n [type, setThumbValue],\n );\n\n useEffect(() => {\n updatesSliderValue(castedValue);\n // Needed to make the slider work with controlled values\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [castedValue]);\n\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <Component\n className={classNames('ndl-slider', className)}\n style={style}\n role=\"presentation\"\n ref={ref}\n {...groupProps}\n {...restProps}\n {...htmlAttributes}\n >\n {/* The track element holds the visible track line, the filled track line and the thumb. */}\n <div\n {...trackProps}\n ref={trackRef as React.RefObject<HTMLDivElement>}\n className={classNames('ndl-track', {\n 'ndl-is-disabled': state.isDisabled,\n })}\n >\n {/* Circular marks, acting as indicators for the steps */}\n {showSteps && (\n <TrackMarks state={state} min={minValue} max={maxValue} />\n )}\n <FilledTrack state={state} />\n <Thumb\n index={0}\n state={state}\n trackRef={trackRef as React.RefObject<HTMLDivElement>}\n showValues={showValues}\n inputForwardedProps={inputProps}\n />\n {type === 'range' && (\n <Thumb\n index={1}\n state={state}\n trackRef={trackRef as React.RefObject<HTMLDivElement>}\n showValues={showValues}\n inputForwardedProps={inputProps}\n />\n )}\n </div>\n </Component>\n );\n};\n\nSlider.displayName = 'Slider';\n\nfunction FilledTrack({ state }: { state: SliderState }) {\n let width: number;\n let left: number;\n if (state.values.length === 1) {\n width = state.getValuePercent(state.values[0]) * 100;\n left = 0;\n } else {\n width =\n state.getValuePercent(state.values[1]) * 100 -\n state.getValuePercent(state.values[0]) * 100;\n left = state.getValuePercent(state.values[0]) * 100;\n }\n\n return (\n <div\n className=\"ndl-filled-track\"\n style={{\n left: `${left}%`,\n width: `${width}%`,\n }}\n />\n );\n}\n\nfunction TrackMarks({\n state,\n max,\n min,\n}: {\n state: SliderState;\n max: number;\n min: number;\n}) {\n const markNo = Math.round((max - min) / state.step);\n\n return (\n <div role=\"presentation\" className=\"ndl-track-marks\">\n {Array.from({ length: markNo - 1 }).map((_, index) => {\n const percent = (index / markNo) * 100;\n\n let isFilled;\n if (state.values.length === 1) {\n isFilled = state.getValuePercent(state.values[0]) * 100 > percent;\n } else {\n isFilled =\n state.getValuePercent(state.values[0]) * 100 < percent &&\n state.getValuePercent(state.values[1]) * 100 > percent;\n }\n\n return (\n <div\n key={`track-mark-${index}`}\n className={classNames('ndl-track-mark', {\n 'ndl-on-active-track': isFilled,\n })}\n style={{\n left: `${((index + 1) / markNo) * 100}%`,\n }}\n />\n );\n })}\n </div>\n );\n}\n\nfunction Thumb(props: {\n index: number;\n state: SliderState;\n showValues?: boolean;\n trackRef: React.RefObject<HTMLDivElement>;\n inputForwardedProps: HtmlAttributes<'input'>;\n}) {\n const { state, trackRef, index, inputForwardedProps } = props;\n const inputRef = React.useRef(null);\n const { thumbProps, inputProps, isDragging } = useSliderThumb(\n {\n index,\n inputRef,\n name: 'slider-thumb',\n trackRef,\n },\n state,\n );\n\n const { focusProps, isFocusVisible } = useFocusRing();\n\n /**\n * Solve issue with:\n * Warning: Received NaN for the `value` attribute. If this is expected, cast the value to a string.\n * Receiving NaN for other attributes also, like `max`. Waiting for a fix in react-aria.\n * @see https://github.com/adobe/react-spectrum/issues/5859\n * @see https://github.com/adobe/react-spectrum/pull/5861\n */\n const mergedProps = mergeProps(\n inputProps,\n focusProps,\n // Omitting aria-valuetext double announcements, unless explicitly provided\n { 'aria-valuetext': '' },\n inputForwardedProps,\n );\n const value =\n mergedProps.value !== undefined || mergedProps.value === 0\n ? mergedProps.value\n : '';\n\n return (\n <Tooltip\n isDisabled={props.showValues !== true}\n isOpen={isDragging || undefined}\n placement=\"top\"\n type=\"simple\"\n >\n <Tooltip.Trigger hasButtonWrapper>\n <div\n {...thumbProps}\n className={classNames('ndl-thumb', {\n 'ndl-focus': isFocusVisible,\n 'ndl-is-dragging': isDragging,\n })}\n >\n <VisuallyHidden>\n <input ref={inputRef} {...mergedProps} />\n </VisuallyHidden>\n </div>\n </Tooltip.Trigger>\n <Tooltip.Content>{value}</Tooltip.Content>\n </Tooltip>\n );\n}\n"]}
1
+ {"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../src/slider/Slider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA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"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React, { useCallback, useEffect } from 'react';\nimport {\n mergeProps,\n useFocusRing,\n useSlider,\n useSliderThumb,\n VisuallyHidden,\n} from 'react-aria';\nimport { type SliderState, useSliderState } from 'react-stately';\n\nimport {\n type HtmlAttributes,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { Tooltip } from '../tooltip';\n\ntype SliderPropsBase = {\n /** Input props of the underlying input element */\n inputProps?: HtmlAttributes<'input'>;\n /** Determines the step size that will be added or removed from the current value when moving the slider button */\n step?: number;\n /** Whether the slider is disabled */\n isDisabled?: boolean;\n /** The minimum value possible to choose */\n minValue?: number;\n /** The maximum value possible to choose */\n maxValue?: number;\n /** Whether to display a tooltip with the current value when the slider is being dragged */\n showValues?: boolean;\n /** Whether to display visual indicators for each step in the slider */\n showSteps?: boolean;\n};\n\ntype SingleSlider = SliderPropsBase & {\n /** Type of the slider */\n type?: 'single';\n /** Current value of the single slider. **Only required when the type is 'single'**. */\n value: number;\n /** Callback function triggered when the slider value(s) changes. The function parameter varies depending on the slider type, for single slider, it is a number and for range slider, it is an array of two numbers. */\n onChange: (value: number) => void;\n};\n\ntype RangeSlider = SliderPropsBase & {\n /** Type of the slider */\n type: 'range';\n /** Current values of the range slider as an array of two numbers `[min, max]`. **Only required when the type is 'range'**.*/\n values: [number, number];\n /** Callback function triggered when the slider value(s) changes. The function parameter varies depending on the slider type, for single slider, it is a number and for range slider, it is an array of two numbers. */\n onChange: (value: [number, number]) => void;\n};\n\ntype SliderProps = SingleSlider | RangeSlider;\n\nexport const Slider = <T extends React.ElementType = 'div'>({\n as,\n inputProps = {},\n className,\n style,\n minValue = 0,\n maxValue = 100,\n isDisabled = false,\n showSteps = false,\n showValues = false,\n step = 1,\n type = 'single',\n onChange,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, SliderProps>) => {\n const trackRef = React.useRef<HTMLDivElement | null>(null);\n\n const castedValue =\n type === 'range'\n ? (restProps as RangeSlider).values\n : (restProps as SingleSlider).value;\n\n const castedOnChange =\n type === 'range'\n ? (onChange as RangeSlider['onChange'])\n : (onChange as SingleSlider['onChange']);\n\n const state = useSliderState<typeof castedValue>({\n defaultValue: castedValue,\n isDisabled,\n maxValue,\n minValue,\n numberFormatter: new Intl.NumberFormat('en-US'),\n // oxlint-disable-next-line no-explicit-any\n onChange: castedOnChange as any,\n step,\n });\n\n const { setThumbValue } = state;\n\n const { groupProps, trackProps } = useSlider(\n { 'aria-label': 'slider' },\n state,\n trackRef,\n );\n\n const updatesSliderValue = useCallback(\n (newValue: number | [number, number]) => {\n if (type === 'single' && typeof newValue === 'number') {\n setThumbValue(0, newValue);\n } else if (type === 'range' && Array.isArray(newValue)) {\n setThumbValue(0, newValue[0]);\n setThumbValue(1, newValue[1]);\n }\n },\n [type, setThumbValue],\n );\n\n useEffect(() => {\n updatesSliderValue(castedValue);\n // Needed to make the slider work with controlled values\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [castedValue]);\n\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <Component\n className={classNames('ndl-slider', className)}\n style={style}\n role=\"presentation\"\n ref={ref}\n {...groupProps}\n {...restProps}\n {...htmlAttributes}\n >\n {/* The track element holds the visible track line, the filled track line and the thumb. */}\n <div\n {...trackProps}\n ref={trackRef as React.RefObject<HTMLDivElement>}\n className={classNames('ndl-track', {\n 'ndl-is-disabled': state.isDisabled,\n })}\n >\n {/* Circular marks, acting as indicators for the steps */}\n {showSteps && (\n <TrackMarks state={state} min={minValue} max={maxValue} />\n )}\n <FilledTrack state={state} />\n <Thumb\n index={0}\n state={state}\n trackRef={trackRef as React.RefObject<HTMLDivElement>}\n showValues={showValues}\n inputForwardedProps={inputProps}\n />\n {type === 'range' && (\n <Thumb\n index={1}\n state={state}\n trackRef={trackRef as React.RefObject<HTMLDivElement>}\n showValues={showValues}\n inputForwardedProps={inputProps}\n />\n )}\n </div>\n </Component>\n );\n};\n\nSlider.displayName = 'Slider';\n\nfunction FilledTrack({ state }: { state: SliderState }) {\n let width: number;\n let left: number;\n if (state.values.length === 1) {\n width = state.getValuePercent(state.values[0]) * 100;\n left = 0;\n } else {\n width =\n state.getValuePercent(state.values[1]) * 100 -\n state.getValuePercent(state.values[0]) * 100;\n left = state.getValuePercent(state.values[0]) * 100;\n }\n\n return (\n <div\n className=\"ndl-filled-track\"\n style={{\n left: `${left}%`,\n width: `${width}%`,\n }}\n />\n );\n}\n\nfunction TrackMarks({\n state,\n max,\n min,\n}: {\n state: SliderState;\n max: number;\n min: number;\n}) {\n const markNo = Math.round((max - min) / state.step);\n\n return (\n <div role=\"presentation\" className=\"ndl-track-marks\">\n {Array.from({ length: markNo - 1 }).map((_, index) => {\n const percent = (index / markNo) * 100;\n\n let isFilled;\n if (state.values.length === 1) {\n isFilled = state.getValuePercent(state.values[0]) * 100 > percent;\n } else {\n isFilled =\n state.getValuePercent(state.values[0]) * 100 < percent &&\n state.getValuePercent(state.values[1]) * 100 > percent;\n }\n\n return (\n <div\n key={`track-mark-${index}`}\n className={classNames('ndl-track-mark', {\n 'ndl-on-active-track': isFilled,\n })}\n style={{\n left: `${((index + 1) / markNo) * 100}%`,\n }}\n />\n );\n })}\n </div>\n );\n}\n\nfunction Thumb(props: {\n index: number;\n state: SliderState;\n showValues?: boolean;\n trackRef: React.RefObject<HTMLDivElement>;\n inputForwardedProps: HtmlAttributes<'input'>;\n}) {\n const { state, trackRef, index, inputForwardedProps } = props;\n const inputRef = React.useRef(null);\n const { thumbProps, inputProps, isDragging } = useSliderThumb(\n {\n index,\n inputRef,\n name: 'slider-thumb',\n trackRef,\n },\n state,\n );\n\n const { focusProps, isFocusVisible } = useFocusRing();\n\n /**\n * Solve issue with:\n * Warning: Received NaN for the `value` attribute. If this is expected, cast the value to a string.\n * Receiving NaN for other attributes also, like `max`. Waiting for a fix in react-aria.\n * @see https://github.com/adobe/react-spectrum/issues/5859\n * @see https://github.com/adobe/react-spectrum/pull/5861\n */\n const mergedProps = mergeProps(\n inputProps,\n focusProps,\n // Omitting aria-valuetext double announcements, unless explicitly provided\n { 'aria-valuetext': '' },\n inputForwardedProps,\n );\n const value =\n mergedProps.value !== undefined || mergedProps.value === 0\n ? mergedProps.value\n : '';\n\n return (\n <Tooltip\n isDisabled={props.showValues !== true}\n isOpen={isDragging || undefined}\n placement=\"top\"\n type=\"simple\"\n >\n <Tooltip.Trigger hasButtonWrapper>\n <div\n {...thumbProps}\n className={classNames('ndl-thumb', {\n 'ndl-focus': isFocusVisible,\n 'ndl-is-dragging': isDragging,\n })}\n >\n <VisuallyHidden>\n <input ref={inputRef} {...mergedProps} />\n </VisuallyHidden>\n </div>\n </Tooltip.Trigger>\n <Tooltip.Content>{value}</Tooltip.Content>\n </Tooltip>\n );\n}\n"]}
@@ -40,15 +40,15 @@ const componentMeta = {
40
40
  exports.default = componentMeta;
41
41
  exports.Variants = {
42
42
  args: {},
43
- render: _1.StatusIndicatorVariants,
44
43
  parameters: {
45
44
  docs: {
46
45
  source: {
46
+ code: _1.StatusIndicatorVariantsSource,
47
47
  language: 'tsx',
48
48
  type: 'code',
49
- code: _1.StatusIndicatorVariantsSource,
50
49
  },
51
50
  },
52
51
  },
52
+ render: _1.StatusIndicatorVariants,
53
53
  };
54
54
  //# sourceMappingURL=status-indicator.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"status-indicator.stories.js","sourceRoot":"","sources":["../../../../src/status-indicator/stories/status-indicator.stories.tsx"],"names":[],"mappings":";;;;AAuBA,uCAA8C;AAC9C,wBAA2E;AAE3E,MAAM,aAAa,GAAiC;IAClD,SAAS,EAAE,uBAAe;IAC1B,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,gCAAK,SAAS,EAAC,yBAAyB,YACtC,uBAAC,KAAK,KAAG,GACL,CACP;KACF;IACD,EAAE,EAAE,6BAA6B;IACjC,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,4BAA4B;CACpC,CAAC;AAEF,kBAAe,aAAa,CAAC;AAGhB,QAAA,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,0BAAuB;IAC/B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,gCAA6B;aACpC;SACF;KACF;CACF,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { StatusIndicator } from '../../index';\nimport { StatusIndicatorVariants, StatusIndicatorVariantsSource } from '.';\n\nconst componentMeta: Meta<typeof StatusIndicator> = {\n component: StatusIndicator,\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n id: 'components-status-indicator',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/StatusIndicator',\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Variants: Story = {\n args: {},\n render: StatusIndicatorVariants,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: StatusIndicatorVariantsSource,\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"status-indicator.stories.js","sourceRoot":"","sources":["../../../../src/status-indicator/stories/status-indicator.stories.tsx"],"names":[],"mappings":";;;;AAuBA,uCAA8C;AAC9C,wBAA2E;AAE3E,MAAM,aAAa,GAAiC;IAClD,SAAS,EAAE,uBAAe;IAC1B,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,gCAAK,SAAS,EAAC,yBAAyB,YACtC,uBAAC,KAAK,KAAG,GACL,CACP;KACF;IACD,EAAE,EAAE,6BAA6B;IACjC,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,4BAA4B;CACpC,CAAC;AAEF,kBAAe,aAAa,CAAC;AAGhB,QAAA,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,gCAA6B;gBACnC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,0BAAuB;CAChC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { StatusIndicator } from '../../index';\nimport { StatusIndicatorVariants, StatusIndicatorVariantsSource } from '.';\n\nconst componentMeta: Meta<typeof StatusIndicator> = {\n component: StatusIndicator,\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n id: 'components-status-indicator',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/StatusIndicator',\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Variants: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: StatusIndicatorVariantsSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: StatusIndicatorVariants,\n};\n"]}
@@ -26,21 +26,21 @@ const jsx_runtime_1 = require("react/jsx-runtime");
26
26
  const index_1 = require("../../index");
27
27
  const _1 = require(".");
28
28
  const componentMeta = {
29
- title: 'Components/Switch',
30
- id: 'components-switch',
31
- component: index_1.Switch,
32
- tags: ['docsPage'],
33
29
  argTypes: {
34
30
  ref: {
35
31
  description: 'Ref to the `input` element',
36
32
  },
37
33
  },
38
- parameters: {
39
- controls: { disable: true },
40
- },
34
+ component: index_1.Switch,
41
35
  decorators: [
42
36
  (Story) => ((0, jsx_runtime_1.jsx)("div", { className: "n-flex n-justify-center", children: (0, jsx_runtime_1.jsx)(Story, {}) })),
43
37
  ],
38
+ id: 'components-switch',
39
+ parameters: {
40
+ controls: { disable: true },
41
+ },
42
+ tags: ['docsPage'],
43
+ title: 'Components/Switch',
44
44
  };
45
45
  exports.default = componentMeta;
46
46
  exports.Default = {
@@ -1 +1 @@
1
- {"version":3,"file":"switch.stories.js","sourceRoot":"","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GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,mBAAgB;gBACtB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,gBAAa;CACtB,CAAC;AAEW,QAAA,eAAe,GAAU;IACpC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,0BAAuB;gBAC7B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,uBAAoB;CAC7B,CAAC;AAEW,QAAA,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,oBAAiB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,iBAAc;CACvB,CAAC;AAEW,QAAA,IAAI,GAAU;IACzB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,gBAAa;gBACnB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,aAAU;CACnB,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 { Switch } from '../../index';\nimport {\n SwitchControlled,\n SwitchControlledSrc,\n SwitchDefault,\n SwitchDefaultSrc,\n SwitchDisabled,\n SwitchDisabledSrc,\n SwitchFull,\n SwitchFullSrc,\n SwitchHasLabelBefore,\n SwitchHasLabelBeforeSrc,\n SwitchIndeterminate,\n SwitchIndeterminateSrc,\n SwitchNoLabel,\n SwitchNoLabelSrc,\n} from '.';\n\nconst componentMeta: Meta<typeof Switch> = {\n title: 'Components/Switch',\n id: 'components-switch',\n component: Switch,\n tags: ['docsPage'],\n argTypes: {\n ref: {\n description: 'Ref to the `input` element',\n },\n },\n parameters: {\n controls: { disable: true },\n },\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SwitchDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SwitchDefault,\n};\n\nexport const Indeterminate: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SwitchIndeterminateSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SwitchIndeterminate,\n};\n\nexport const Controlled: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SwitchControlledSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SwitchControlled,\n};\n\nexport const NoLabel: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SwitchNoLabelSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SwitchNoLabel,\n};\n\nexport const HasLeadingLabel: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SwitchHasLabelBeforeSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SwitchHasLabelBefore,\n};\n\nexport const Disabled: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SwitchDisabledSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SwitchDisabled,\n};\n\nexport const Full: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SwitchFullSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SwitchFull,\n};\n"]}
1
+ {"version":3,"file":"switch.stories.js","sourceRoot":"","sources":["../../../../src/switch/stories/switch.stories.tsx"],"names":[],"mappings":";;;;AAsBA,uCAAqC;AACrC,wBAeW;AAEX,MAAM,aAAa,GAAwB;IACzC,QAAQ,EAAE;QACR,GAAG,EAAE;YACH,WAAW,EAAE,4BAA4B;SAC1C;KACF;IACD,SAAS,EAAE,cAAM;IACjB,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,gCAAK,SAAS,EAAC,yBAAyB,YACtC,uBAAC,KAAK,KAAG,GACL,CACP;KACF;IACD,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;AAGhB,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,mBAAgB;gBACtB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,gBAAa;CACtB,CAAC;AAEW,QAAA,aAAa,GAAU;IAClC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,yBAAsB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,sBAAmB;CAC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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 { Switch } from '../../index';\nimport {\n SwitchControlled,\n SwitchControlledSrc,\n SwitchDefault,\n SwitchDefaultSrc,\n SwitchDisabled,\n SwitchDisabledSrc,\n SwitchFull,\n SwitchFullSrc,\n SwitchHasLabelBefore,\n SwitchHasLabelBeforeSrc,\n SwitchIndeterminate,\n SwitchIndeterminateSrc,\n SwitchNoLabel,\n SwitchNoLabelSrc,\n} from '.';\n\nconst componentMeta: Meta<typeof Switch> = {\n argTypes: {\n ref: {\n description: 'Ref to the `input` element',\n },\n },\n component: Switch,\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n id: 'components-switch',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/Switch',\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SwitchDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SwitchDefault,\n};\n\nexport const Indeterminate: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SwitchIndeterminateSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SwitchIndeterminate,\n};\n\nexport const Controlled: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SwitchControlledSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SwitchControlled,\n};\n\nexport const NoLabel: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SwitchNoLabelSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SwitchNoLabel,\n};\n\nexport const HasLeadingLabel: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SwitchHasLabelBeforeSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SwitchHasLabelBefore,\n};\n\nexport const Disabled: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SwitchDisabledSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SwitchDisabled,\n};\n\nexport const Full: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SwitchFullSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SwitchFull,\n};\n"]}
@@ -88,7 +88,7 @@ const ScrollButton = ({ direction, isVisible, onClick, onBackground, }) => {
88
88
  'ndl-scroll-item-on-background-weak': onBackground === 'weak',
89
89
  }), children: (0, jsx_runtime_1.jsx)("button", { tabIndex: -1, className: "ndl-scroll-icon-wrapper", onClick: onClick, "aria-hidden": "true", children: (0, jsx_runtime_1.jsx)(Icon, { className: "ndl-scroll-icon" }) }) }));
90
90
  };
91
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
91
+ // oxlint-disable-next-line @typescript-eslint/no-explicit-any
92
92
  const TabsContext = react_2.default.createContext(null);
93
93
  const useTabsContext = () => {
94
94
  const context = (0, react_2.useContext)(TabsContext);
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/tabs/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,8CAAkD;AAClD,4DAAoC;AACpC,+CAMe;AAOf,oCAGkB;AAClB,wCAAqC;AACrC,8CAA2C;AAC3C,yEAAmE;AAEnE,mCAAmC;AACnC,MAAM,YAAY,GAAG,CAAC,EACpB,S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G,EAAE,OAAO;IACZ,QAAQ,EAAE,YAAY;CACvB,CAAC,CAAC;AAEM,oBAAI","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 { useMergeRefs } from '@floating-ui/react';\nimport classNames from 'classnames';\nimport React, {\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n type TooltipObjectProps,\n} from '../_common/types';\nimport {\n ArrowLeftCircleIconOutline,\n ArrowRightCircleIconOutline,\n} from '../icons';\nimport { Tooltip } from '../tooltip';\nimport { Typography } from '../typography';\nimport { useTabsScrollOverflow } from './use-tabs-scroll-overflow';\n\n// Reusable scroll button component\nconst ScrollButton = ({\n direction,\n isVisible,\n onClick,\n onBackground,\n}: {\n direction: 'left' | 'right';\n isVisible: boolean;\n onClick: () => void;\n onBackground: React.ComponentProps<typeof TabsComponent>['onBackground'];\n}) => {\n const Icon =\n direction === 'left'\n ? ArrowLeftCircleIconOutline\n : ArrowRightCircleIconOutline;\n const positionClass =\n direction === 'left' ? 'ndl-scroll-left-item' : 'ndl-scroll-right-item';\n\n return (\n <div\n className={classNames('ndl-scroll-item', positionClass, {\n 'ndl-scroll-item-hidden': !isVisible,\n 'ndl-scroll-item-on-background-default': onBackground === 'default',\n 'ndl-scroll-item-on-background-weak': onBackground === 'weak',\n })}\n >\n <button\n tabIndex={-1}\n className=\"ndl-scroll-icon-wrapper\"\n onClick={onClick}\n aria-hidden=\"true\"\n >\n <Icon className=\"ndl-scroll-icon\" />\n </button>\n </div>\n );\n};\n\ntype TabId = string;\ntype Size = 'small' | 'large';\ntype Fill = 'underline' | 'filled';\n\ntype BaseTabsProps<T extends TabId> = {\n /** The currently active tabId */\n value: T;\n /** Callback function triggered when a new tab is selected */\n onChange: (e: T) => void;\n // TODO v5: add leadingVisual & trailingVisual props, to allow for children not to have flex (allowing text ellipsis). Also add a tooltip when ellipsing.\n /** The content dislayed in the tabs */\n children: React.ReactNode | string;\n /** The fill type of the tabs */\n fill?: Fill;\n /** The size of the tabs */\n size?: Size;\n /** What background the Tabs is placed on. This affects the gradient background of the scroll navigation buttons. */\n onBackground?: 'weak' | 'default';\n};\n\ntype TabsContextType<T extends TabId> = Required<\n Pick<BaseTabsProps<T>, 'fill' | 'size' | 'onChange' | 'value'>\n> & {\n registerTab: (tabId: T, ref: React.RefObject<HTMLElement | null>) => void;\n unregisterTab: (tabId: T) => void;\n scrollTabIntoView: (tabId: T) => void;\n firstTabId: T | null;\n isValuePresent: boolean;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst TabsContext = React.createContext<TabsContextType<any> | null>(null);\n\nconst useTabsContext = () => {\n const context = useContext(TabsContext);\n\n if (context === null) {\n throw new Error('Tab used without context');\n }\n\n return context;\n};\n\nconst getTabPanelId = (tabId: TabId) => `tabpanel-${tabId}`;\n\nconst getGeneralTabClasses = (size: Size, fill: Fill) => {\n return {\n 'ndl-filled-tab': fill === 'filled',\n 'ndl-large': size === 'large',\n 'ndl-small': size === 'small',\n 'ndl-underline-tab': fill === 'underline',\n };\n};\n\nconst TabsComponent = <U extends TabId, T extends React.ElementType = 'div'>({\n children,\n size = 'large',\n fill = 'underline',\n onChange,\n value,\n onBackground = 'weak',\n className,\n style,\n as,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, BaseTabsProps<U>>) => {\n const tabRefs = useRef<Map<U, React.RefObject<HTMLElement | null>>>(\n new Map(),\n );\n const containerRef = useRef<HTMLElement>(null);\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs([containerRef, ref]);\n const [firstTabId, setFirstTabId] = useState<U | null>(null);\n const [isValuePresent, setIsValuePresent] = useState(false);\n const valueRef = useRef(value);\n\n // Use the custom hook for scroll overflow behavior\n const { scrollState, scrollToNextItem, checkOverflow } =\n useTabsScrollOverflow(scrollContainerRef);\n\n useEffect(() => {\n valueRef.current = value;\n setIsValuePresent(tabRefs.current.has(value));\n }, [value]);\n\n const registerTab = useCallback(\n (tabId: U, tabRef: React.RefObject<HTMLElement | null>) => {\n tabRefs.current.set(tabId, tabRef);\n const first = tabRefs.current.keys().next().value ?? null;\n setFirstTabId((prev) => (prev === first ? prev : first));\n\n if (tabId === valueRef.current) {\n setIsValuePresent(true);\n }\n },\n [],\n );\n\n const unregisterTab = useCallback((tabId: U) => {\n tabRefs.current.delete(tabId);\n const first = tabRefs.current.keys().next().value ?? null;\n setFirstTabId((prev) => (prev === first ? prev : first));\n\n if (tabId === valueRef.current) {\n setIsValuePresent(false);\n }\n }, []);\n\n // Check overflow when children change\n useEffect(() => {\n checkOverflow();\n }, [checkOverflow, children]);\n\n const scrollTabIntoView = useCallback((tabId: U) => {\n const tabRef = tabRefs.current.get(tabId);\n const scrollContainer = scrollContainerRef.current;\n\n if (tabRef?.current && scrollContainer) {\n const tabRect = tabRef.current.getBoundingClientRect();\n const containerRect = scrollContainer.getBoundingClientRect();\n const containerCenter = containerRect.left + containerRect.width / 2;\n\n const targetScrollLeft =\n scrollContainer.scrollLeft +\n (tabRect.left - containerCenter + tabRect.width / 2);\n\n scrollContainer.scrollTo({\n behavior: 'smooth',\n left: targetScrollLeft,\n });\n }\n }, []);\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') {\n return;\n }\n\n event.preventDefault();\n\n const tabIds = Array.from(tabRefs.current.keys());\n const focusedElement = document.activeElement;\n\n // Find the currently focused tab\n let currentIndex = -1;\n for (let i = 0; i < tabIds.length; i++) {\n const tabRef = tabRefs.current.get(tabIds[i]);\n if (tabRef?.current === focusedElement) {\n currentIndex = i;\n break;\n }\n }\n\n // If no tab is focused, focus the active tab. Or the first tab if the active tab is not present.\n if (currentIndex === -1) {\n const activeTabRef = tabRefs.current.get(value);\n if (activeTabRef?.current) {\n activeTabRef.current.focus();\n } else if (!isValuePresent && firstTabId !== null) {\n const firstTabRef = tabRefs.current.get(firstTabId);\n if (firstTabRef?.current) {\n firstTabRef.current.focus();\n }\n }\n return;\n }\n\n let nextIndex: number;\n\n if (event.key === 'ArrowRight') {\n nextIndex = currentIndex === tabIds.length - 1 ? 0 : currentIndex + 1;\n } else {\n nextIndex = currentIndex === 0 ? tabIds.length - 1 : currentIndex - 1;\n }\n\n const nextTabId = tabIds[nextIndex];\n const nextTabRef = tabRefs.current.get(nextTabId);\n\n if (nextTabRef?.current) {\n nextTabRef.current.focus();\n scrollTabIntoView(nextTabId);\n }\n },\n [value, scrollTabIntoView, firstTabId, isValuePresent],\n );\n\n const classes = classNames(\n 'ndl-tabs',\n getGeneralTabClasses(size, fill),\n className,\n );\n\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <Component\n className={classes}\n style={style}\n role=\"tablist\"\n aria-orientation=\"horizontal\"\n onKeyDown={handleKeyDown}\n ref={mergedRef}\n {...restProps}\n {...htmlAttributes}\n >\n <ScrollButton\n direction=\"left\"\n isVisible={scrollState.isLeftVisible}\n onClick={() => scrollToNextItem('left')}\n onBackground={onBackground}\n />\n <ScrollButton\n direction=\"right\"\n isVisible={scrollState.isRightVisible}\n onClick={() => scrollToNextItem('right')}\n onBackground={onBackground}\n />\n <TabsContext.Provider\n value={{\n fill,\n firstTabId,\n isValuePresent,\n onChange,\n registerTab,\n scrollTabIntoView,\n size,\n unregisterTab,\n value,\n }}\n >\n <div className=\"ndl-tabs-container\" ref={scrollContainerRef}>\n {children}\n </div>\n </TabsContext.Provider>\n </Component>\n );\n};\n\nTabsComponent.displayName = 'Tabs';\n\ntype TabProps<T extends TabId> = {\n /** The id of the tab */\n id: T;\n /** The content of the tab */\n children: React.ReactNode | string;\n /** A string that will be shown as a tooltip when hovering over the button it also acts as an aria-label- {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label} */\n description?: string;\n /** Props for the tooltip component. */\n tooltipProps?: TooltipObjectProps;\n /** Additional class name */\n className?: string;\n /** Whether the tab is disabled */\n isDisabled?: boolean;\n};\n\nconst TabsTab = <\n U extends TabId = TabId,\n T extends React.ElementType = 'button',\n>({\n children,\n id: tabId,\n isDisabled = false,\n className,\n description,\n tooltipProps,\n style,\n as,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, TabProps<U>>) => {\n const {\n size,\n fill,\n value,\n onChange,\n registerTab,\n unregisterTab,\n scrollTabIntoView,\n firstTabId,\n isValuePresent,\n } = useTabsContext();\n const internalRef = useRef<HTMLElement>(null);\n\n // Create a merged ref that handles both ref objects and ref functions\n const mergedRef = useMergeRefs([\n internalRef as React.RefObject<HTMLElement>,\n ref as React.RefObject<HTMLElement>,\n ]);\n\n // Register/unregister tab for keyboard navigation\n useEffect(() => {\n registerTab(tabId, internalRef);\n\n return () => {\n unregisterTab(tabId);\n };\n }, [tabId, registerTab, unregisterTab]);\n\n const baseClasses = classNames({\n ...getGeneralTabClasses(size, fill),\n 'ndl-disabled': isDisabled,\n 'ndl-selected': value === tabId,\n });\n\n const Component: React.ElementType = as ?? 'button';\n\n const classes = classNames('ndl-tab', baseClasses, className);\n\n // Only the active tab should be in the tab sequence initially\n // Other tabs can be focused via arrow keys but are not in tab sequence\n const tabIndex =\n value === tabId || (!isValuePresent && tabId === firstTabId) ? 0 : -1;\n\n return (\n <Tooltip\n type=\"simple\"\n {...tooltipProps?.root}\n isDisabled={description === undefined}\n >\n <Tooltip.Trigger {...tooltipProps?.trigger} hasButtonWrapper>\n <Component\n className={classes}\n style={style}\n onClick={() => {\n if (!isDisabled) {\n onChange(tabId);\n scrollTabIntoView(tabId);\n }\n }}\n role=\"tab\"\n id={tabId}\n aria-disabled={isDisabled}\n aria-label={description}\n aria-selected={value === tabId}\n aria-controls={getTabPanelId(tabId)}\n tabIndex={tabIndex}\n ref={mergedRef}\n {...restProps}\n {...htmlAttributes}\n >\n <span className=\"ndl-tab-content\">{children}</span>\n {fill === 'underline' && <span className=\"ndl-tab-underline\" />}\n </Component>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n {description}\n </Tooltip.Content>\n </Tooltip>\n );\n};\n\nTabsTab.displayName = 'Tabs.Tab';\n\ntype TabPanelProps = {\n /** The content displayed in the tab panel */\n children: React.ReactNode;\n /** The currently selected tabId. The tab is visible if the value is equal to the tabId */\n value: TabId;\n /** The id of the tab panel */\n tabId: TabId;\n /** Additional class name */\n className?: string;\n};\n\nconst TabsTabPanel = <T extends React.ElementType = 'div'>({\n as,\n children,\n value,\n tabId,\n style,\n className,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, TabPanelProps>) => {\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <>\n {value === tabId ? (\n <Component\n role=\"tabpanel\"\n id={getTabPanelId(tabId)}\n aria-labelledby={tabId}\n style={style}\n className={classNames(className)}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Component>\n ) : null}\n </>\n );\n};\n\nTabsTabPanel.displayName = 'Tabs.TabPanel';\n\ntype TabBadgeProps = {\n /** The content of the badge */\n children: React.ReactNode;\n};\n\nconst TabBadge = ({\n children,\n ref,\n htmlAttributes,\n style,\n className,\n ...restProps\n}: CommonProps<'span', TabBadgeProps>) => {\n const classes = classNames('ndl-tab-badge', className);\n return (\n <Typography\n ref={ref}\n variant=\"subheading-small\"\n className={classes}\n style={style}\n htmlAttributes={htmlAttributes}\n {...restProps}\n >\n {children}\n </Typography>\n );\n};\n\nconst Tabs = Object.assign(TabsComponent, {\n Badge: TabBadge,\n Tab: TabsTab,\n TabPanel: TabsTabPanel,\n});\n\nexport { Tabs };\n"]}
1
+ {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/tabs/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,8CAAkD;AAClD,4DAAoC;AACpC,+CAMe;AAOf,oCAGkB;AAClB,wCAAqC;AACrC,8CAA2C;AAC3C,yEAAmE;AAEnE,mCAAmC;AACnC,MAAM,YAAY,GAAG,CAAC,EACpB,SAAS,EACT,SAAS,EACT,OAAO,EACP,YAAY,GAMb,EAAE,EAAE;IACH,MAAM,IAAI,GACR,SAAS,KAAK,MAAM;QAClB,CAAC,CAAC,kCAA0B;QAC5B,CAAC,CAAC,mCAA2B,CAAC;IAClC,MAAM,aAAa,GACjB,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,uBAAuB,CAAC;IAE1E,OAAO,CACL,gCACE,SAAS,EAAE,IAAA,oBAAU,EAAC,iBAAiB,EAAE,aAAa,EAAE;YACtD,wBAAwB,EAAE,CAAC,SAAS;YACpC,uCAAuC,EAAE,YAAY,KAAK,SAAS;YACnE,oCAAoC,EAAE,YAAY,KAAK,MAAM;SAC9D,CAAC,YAEF,mCACE,QAAQ,EAAE,CAAC,CAAC,EACZ,SAAS,EAAC,yBAAyB,EACnC,OAAO,EAAE,OAAO,iBACJ,MAAM,YAElB,uBAAC,IAAI,IAAC,SAAS,EAAC,iBAAiB,GAAG,GAC7B,GACL,CACP,CAAC;AACJ,CAAC,CAAC;AAgCF,8DAA8D;AAC9D,MAAM,WAAW,GAAG,eAAK,CAAC,aAAa,CAA8B,IAAI,CAAC,CAAC;AAE3E,MAAM,cAAc,GAAG,GAAG,EAAE;IAC1B,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,W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C,SAAS,cANI,2DAOjB,CADa;IAEZ,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,eAAe,EAAE,SAAS,CAAC,CAAC;IACvD,OAAO,CACL,uBAAC,uBAAU,kBACT,GAAG,EAAE,GAAG,EACR,OAAO,EAAC,kBAAkB,EAC1B,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,IAC1B,SAAS,cAEZ,QAAQ,IACE,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE;IACxC,KAAK,EAAE,QAAQ;IACf,GAAG,EAAE,OAAO;IACZ,QAAQ,EAAE,YAAY;CACvB,CAAC,CAAC;AAEM,oBAAI","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 { useMergeRefs } from '@floating-ui/react';\nimport classNames from 'classnames';\nimport React, {\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n type TooltipObjectProps,\n} from '../_common/types';\nimport {\n ArrowLeftCircleIconOutline,\n ArrowRightCircleIconOutline,\n} from '../icons';\nimport { Tooltip } from '../tooltip';\nimport { Typography } from '../typography';\nimport { useTabsScrollOverflow } from './use-tabs-scroll-overflow';\n\n// Reusable scroll button component\nconst ScrollButton = ({\n direction,\n isVisible,\n onClick,\n onBackground,\n}: {\n direction: 'left' | 'right';\n isVisible: boolean;\n onClick: () => void;\n onBackground: React.ComponentProps<typeof TabsComponent>['onBackground'];\n}) => {\n const Icon =\n direction === 'left'\n ? ArrowLeftCircleIconOutline\n : ArrowRightCircleIconOutline;\n const positionClass =\n direction === 'left' ? 'ndl-scroll-left-item' : 'ndl-scroll-right-item';\n\n return (\n <div\n className={classNames('ndl-scroll-item', positionClass, {\n 'ndl-scroll-item-hidden': !isVisible,\n 'ndl-scroll-item-on-background-default': onBackground === 'default',\n 'ndl-scroll-item-on-background-weak': onBackground === 'weak',\n })}\n >\n <button\n tabIndex={-1}\n className=\"ndl-scroll-icon-wrapper\"\n onClick={onClick}\n aria-hidden=\"true\"\n >\n <Icon className=\"ndl-scroll-icon\" />\n </button>\n </div>\n );\n};\n\ntype TabId = string;\ntype Size = 'small' | 'large';\ntype Fill = 'underline' | 'filled';\n\ntype BaseTabsProps<T extends TabId> = {\n /** The currently active tabId */\n value: T;\n /** Callback function triggered when a new tab is selected */\n onChange: (e: T) => void;\n // TODO v5: add leadingVisual & trailingVisual props, to allow for children not to have flex (allowing text ellipsis). Also add a tooltip when ellipsing.\n /** The content dislayed in the tabs */\n children: React.ReactNode | string;\n /** The fill type of the tabs */\n fill?: Fill;\n /** The size of the tabs */\n size?: Size;\n /** What background the Tabs is placed on. This affects the gradient background of the scroll navigation buttons. */\n onBackground?: 'weak' | 'default';\n};\n\ntype TabsContextType<T extends TabId> = Required<\n Pick<BaseTabsProps<T>, 'fill' | 'size' | 'onChange' | 'value'>\n> & {\n registerTab: (tabId: T, ref: React.RefObject<HTMLElement | null>) => void;\n unregisterTab: (tabId: T) => void;\n scrollTabIntoView: (tabId: T) => void;\n firstTabId: T | null;\n isValuePresent: boolean;\n};\n\n// oxlint-disable-next-line @typescript-eslint/no-explicit-any\nconst TabsContext = React.createContext<TabsContextType<any> | null>(null);\n\nconst useTabsContext = () => {\n const context = useContext(TabsContext);\n\n if (context === null) {\n throw new Error('Tab used without context');\n }\n\n return context;\n};\n\nconst getTabPanelId = (tabId: TabId) => `tabpanel-${tabId}`;\n\nconst getGeneralTabClasses = (size: Size, fill: Fill) => {\n return {\n 'ndl-filled-tab': fill === 'filled',\n 'ndl-large': size === 'large',\n 'ndl-small': size === 'small',\n 'ndl-underline-tab': fill === 'underline',\n };\n};\n\nconst TabsComponent = <U extends TabId, T extends React.ElementType = 'div'>({\n children,\n size = 'large',\n fill = 'underline',\n onChange,\n value,\n onBackground = 'weak',\n className,\n style,\n as,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, BaseTabsProps<U>>) => {\n const tabRefs = useRef<Map<U, React.RefObject<HTMLElement | null>>>(\n new Map(),\n );\n const containerRef = useRef<HTMLElement>(null);\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs([containerRef, ref]);\n const [firstTabId, setFirstTabId] = useState<U | null>(null);\n const [isValuePresent, setIsValuePresent] = useState(false);\n const valueRef = useRef(value);\n\n // Use the custom hook for scroll overflow behavior\n const { scrollState, scrollToNextItem, checkOverflow } =\n useTabsScrollOverflow(scrollContainerRef);\n\n useEffect(() => {\n valueRef.current = value;\n setIsValuePresent(tabRefs.current.has(value));\n }, [value]);\n\n const registerTab = useCallback(\n (tabId: U, tabRef: React.RefObject<HTMLElement | null>) => {\n tabRefs.current.set(tabId, tabRef);\n const first = tabRefs.current.keys().next().value ?? null;\n setFirstTabId((prev) => (prev === first ? prev : first));\n\n if (tabId === valueRef.current) {\n setIsValuePresent(true);\n }\n },\n [],\n );\n\n const unregisterTab = useCallback((tabId: U) => {\n tabRefs.current.delete(tabId);\n const first = tabRefs.current.keys().next().value ?? null;\n setFirstTabId((prev) => (prev === first ? prev : first));\n\n if (tabId === valueRef.current) {\n setIsValuePresent(false);\n }\n }, []);\n\n // Check overflow when children change\n useEffect(() => {\n checkOverflow();\n }, [checkOverflow, children]);\n\n const scrollTabIntoView = useCallback((tabId: U) => {\n const tabRef = tabRefs.current.get(tabId);\n const scrollContainer = scrollContainerRef.current;\n\n if (tabRef?.current && scrollContainer) {\n const tabRect = tabRef.current.getBoundingClientRect();\n const containerRect = scrollContainer.getBoundingClientRect();\n const containerCenter = containerRect.left + containerRect.width / 2;\n\n const targetScrollLeft =\n scrollContainer.scrollLeft +\n (tabRect.left - containerCenter + tabRect.width / 2);\n\n scrollContainer.scrollTo({\n behavior: 'smooth',\n left: targetScrollLeft,\n });\n }\n }, []);\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') {\n return;\n }\n\n event.preventDefault();\n\n const tabIds = Array.from(tabRefs.current.keys());\n const focusedElement = document.activeElement;\n\n // Find the currently focused tab\n let currentIndex = -1;\n for (let i = 0; i < tabIds.length; i++) {\n const tabRef = tabRefs.current.get(tabIds[i]);\n if (tabRef?.current === focusedElement) {\n currentIndex = i;\n break;\n }\n }\n\n // If no tab is focused, focus the active tab. Or the first tab if the active tab is not present.\n if (currentIndex === -1) {\n const activeTabRef = tabRefs.current.get(value);\n if (activeTabRef?.current) {\n activeTabRef.current.focus();\n } else if (!isValuePresent && firstTabId !== null) {\n const firstTabRef = tabRefs.current.get(firstTabId);\n if (firstTabRef?.current) {\n firstTabRef.current.focus();\n }\n }\n return;\n }\n\n let nextIndex: number;\n\n if (event.key === 'ArrowRight') {\n nextIndex = currentIndex === tabIds.length - 1 ? 0 : currentIndex + 1;\n } else {\n nextIndex = currentIndex === 0 ? tabIds.length - 1 : currentIndex - 1;\n }\n\n const nextTabId = tabIds[nextIndex];\n const nextTabRef = tabRefs.current.get(nextTabId);\n\n if (nextTabRef?.current) {\n nextTabRef.current.focus();\n scrollTabIntoView(nextTabId);\n }\n },\n [value, scrollTabIntoView, firstTabId, isValuePresent],\n );\n\n const classes = classNames(\n 'ndl-tabs',\n getGeneralTabClasses(size, fill),\n className,\n );\n\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <Component\n className={classes}\n style={style}\n role=\"tablist\"\n aria-orientation=\"horizontal\"\n onKeyDown={handleKeyDown}\n ref={mergedRef}\n {...restProps}\n {...htmlAttributes}\n >\n <ScrollButton\n direction=\"left\"\n isVisible={scrollState.isLeftVisible}\n onClick={() => scrollToNextItem('left')}\n onBackground={onBackground}\n />\n <ScrollButton\n direction=\"right\"\n isVisible={scrollState.isRightVisible}\n onClick={() => scrollToNextItem('right')}\n onBackground={onBackground}\n />\n <TabsContext.Provider\n value={{\n fill,\n firstTabId,\n isValuePresent,\n onChange,\n registerTab,\n scrollTabIntoView,\n size,\n unregisterTab,\n value,\n }}\n >\n <div className=\"ndl-tabs-container\" ref={scrollContainerRef}>\n {children}\n </div>\n </TabsContext.Provider>\n </Component>\n );\n};\n\nTabsComponent.displayName = 'Tabs';\n\ntype TabProps<T extends TabId> = {\n /** The id of the tab */\n id: T;\n /** The content of the tab */\n children: React.ReactNode | string;\n /** A string that will be shown as a tooltip when hovering over the button it also acts as an aria-label- {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label} */\n description?: string;\n /** Props for the tooltip component. */\n tooltipProps?: TooltipObjectProps;\n /** Additional class name */\n className?: string;\n /** Whether the tab is disabled */\n isDisabled?: boolean;\n};\n\nconst TabsTab = <\n U extends TabId = TabId,\n T extends React.ElementType = 'button',\n>({\n children,\n id: tabId,\n isDisabled = false,\n className,\n description,\n tooltipProps,\n style,\n as,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, TabProps<U>>) => {\n const {\n size,\n fill,\n value,\n onChange,\n registerTab,\n unregisterTab,\n scrollTabIntoView,\n firstTabId,\n isValuePresent,\n } = useTabsContext();\n const internalRef = useRef<HTMLElement>(null);\n\n // Create a merged ref that handles both ref objects and ref functions\n const mergedRef = useMergeRefs([\n internalRef as React.RefObject<HTMLElement>,\n ref as React.RefObject<HTMLElement>,\n ]);\n\n // Register/unregister tab for keyboard navigation\n useEffect(() => {\n registerTab(tabId, internalRef);\n\n return () => {\n unregisterTab(tabId);\n };\n }, [tabId, registerTab, unregisterTab]);\n\n const baseClasses = classNames({\n ...getGeneralTabClasses(size, fill),\n 'ndl-disabled': isDisabled,\n 'ndl-selected': value === tabId,\n });\n\n const Component: React.ElementType = as ?? 'button';\n\n const classes = classNames('ndl-tab', baseClasses, className);\n\n // Only the active tab should be in the tab sequence initially\n // Other tabs can be focused via arrow keys but are not in tab sequence\n const tabIndex =\n value === tabId || (!isValuePresent && tabId === firstTabId) ? 0 : -1;\n\n return (\n <Tooltip\n type=\"simple\"\n {...tooltipProps?.root}\n isDisabled={description === undefined}\n >\n <Tooltip.Trigger {...tooltipProps?.trigger} hasButtonWrapper>\n <Component\n className={classes}\n style={style}\n onClick={() => {\n if (!isDisabled) {\n onChange(tabId);\n scrollTabIntoView(tabId);\n }\n }}\n role=\"tab\"\n id={tabId}\n aria-disabled={isDisabled}\n aria-label={description}\n aria-selected={value === tabId}\n aria-controls={getTabPanelId(tabId)}\n tabIndex={tabIndex}\n ref={mergedRef}\n {...restProps}\n {...htmlAttributes}\n >\n <span className=\"ndl-tab-content\">{children}</span>\n {fill === 'underline' && <span className=\"ndl-tab-underline\" />}\n </Component>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n {description}\n </Tooltip.Content>\n </Tooltip>\n );\n};\n\nTabsTab.displayName = 'Tabs.Tab';\n\ntype TabPanelProps = {\n /** The content displayed in the tab panel */\n children: React.ReactNode;\n /** The currently selected tabId. The tab is visible if the value is equal to the tabId */\n value: TabId;\n /** The id of the tab panel */\n tabId: TabId;\n /** Additional class name */\n className?: string;\n};\n\nconst TabsTabPanel = <T extends React.ElementType = 'div'>({\n as,\n children,\n value,\n tabId,\n style,\n className,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, TabPanelProps>) => {\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <>\n {value === tabId ? (\n <Component\n role=\"tabpanel\"\n id={getTabPanelId(tabId)}\n aria-labelledby={tabId}\n style={style}\n className={classNames(className)}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Component>\n ) : null}\n </>\n );\n};\n\nTabsTabPanel.displayName = 'Tabs.TabPanel';\n\ntype TabBadgeProps = {\n /** The content of the badge */\n children: React.ReactNode;\n};\n\nconst TabBadge = ({\n children,\n ref,\n htmlAttributes,\n style,\n className,\n ...restProps\n}: CommonProps<'span', TabBadgeProps>) => {\n const classes = classNames('ndl-tab-badge', className);\n return (\n <Typography\n ref={ref}\n variant=\"subheading-small\"\n className={classes}\n style={style}\n htmlAttributes={htmlAttributes}\n {...restProps}\n >\n {children}\n </Typography>\n );\n};\n\nconst Tabs = Object.assign(TabsComponent, {\n Badge: TabBadge,\n Tab: TabsTab,\n TabPanel: TabsTabPanel,\n});\n\nexport { Tabs };\n"]}
@@ -47,9 +47,9 @@ const Tag = (_a) => {
47
47
  var { children, type = 'default', size = 'medium', onClick, className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["children", "type", "size", "onClick", "className", "style", "htmlAttributes", "ref"]);
48
48
  const classes = (0, classnames_1.default)(`ndl-tag`, className, {
49
49
  'ndl-destructive': type === 'destructive',
50
- 'ndl-small': size === 'small',
51
- 'ndl-medium': size === 'medium',
52
50
  'ndl-large': size === 'large',
51
+ 'ndl-medium': size === 'medium',
52
+ 'ndl-small': size === 'small',
53
53
  });
54
54
  return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: classes, ref: ref, style: style }, restProps, htmlAttributes, { children: [(0, jsx_runtime_1.jsx)(conditional_wrap_1.ConditionalWrap, { shouldWrap: type === 'destructive', wrap: (children) => ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: onClick, children: children })), children: (0, jsx_runtime_1.jsx)("span", { className: "ndl-tag-content", children: children }) }), type !== 'destructive' && ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "ndl-remove-icon", onClick: onClick, "aria-label": "Remove tag", children: (0, jsx_runtime_1.jsx)(icons_1.XMarkIconOutline, {}) }))] })));
55
55
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Content":["/**\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 CommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { XMarkIconOutline } from '../icons';\n\ninterface TagProps {\n /** The content of the tag */\n children: React.ReactNode;\n /** Type of the tag */\n type?: 'destructive' | 'default';\n /** Size of the tag */\n size?: 'small' | 'medium' | 'large';\n /** Callback function triggered when tag should be removed */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n}\n\n/**\n * Tag component is a small visual element that represents a tag.\n * A tag is always removable. If you want a non removable tag, use the StatusLabel component instead.\n */\nexport const Tag = ({\n children,\n type = 'default',\n size = 'medium',\n onClick,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', TagProps>) => {\n const classes = classNames(`ndl-tag`, className, {\n 'ndl-destructive': type === 'destructive',\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n\n return (\n <div\n className={classes}\n ref={ref}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <ConditionalWrap\n shouldWrap={type === 'destructive'}\n wrap={(children) => (\n <button type=\"button\" onClick={onClick}>\n {children}\n </button>\n )}\n >\n <span className=\"ndl-tag-content\">{children}</span>\n </ConditionalWrap>\n {type !== 'destructive' && (\n <button\n type=\"button\"\n className=\"ndl-remove-icon\"\n onClick={onClick}\n aria-label=\"Remove tag\"\n >\n <XMarkIconOutline />\n </button>\n )}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/tag/Tag.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AAIpC,0DAAsD;AACtD,oCAA4C;AAa5C;;;GAGG;AACI,MAAM,GAAG,GAAG,CAAC,EAUW,EAAE,EAAE;QAVf,EAClB,QAAQ,EACR,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,QAAQ,EACf,OAAO,EACP,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAE0B,EAD1B,SAAS,cATM,sFAUnB,CADa;IAEZ,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,SAAS,EAAE,SAAS,EAAE;QAC/C,iBAAiB,EAAE,IAAI,KAAK,aAAa;QACzC,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,OAAO,CACL,+CACE,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,eAElB,uBAAC,kCAAe,IACd,UAAU,EAAE,IAAI,KAAK,aAAa,EAClC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAClB,mCAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YACnC,QAAQ,GACF,CACV,YAED,iCAAM,SAAS,EAAC,iBAAiB,YAAE,QAAQ,GAAQ,GACnC,EACjB,IAAI,KAAK,aAAa,IAAI,CACzB,mCACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAE,OAAO,gBACL,YAAY,YAEvB,uBAAC,wBAAgB,KAAG,GACb,CACV,KACG,CACP,CAAC;AACJ,CAAC,CAAC;AAhDW,QAAA,GAAG,OAgDd","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 CommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { XMarkIconOutline } from '../icons';\n\ninterface TagProps {\n /** The content of the tag */\n children: React.ReactNode;\n /** Type of the tag */\n type?: 'destructive' | 'default';\n /** Size of the tag */\n size?: 'small' | 'medium' | 'large';\n /** Callback function triggered when tag should be removed */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n}\n\n/**\n * Tag component is a small visual element that represents a tag.\n * A tag is always removable. If you want a non removable tag, use the StatusLabel component instead.\n */\nexport const Tag = ({\n children,\n type = 'default',\n size = 'medium',\n onClick,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', TagProps>) => {\n const classes = classNames(`ndl-tag`, className, {\n 'ndl-destructive': type === 'destructive',\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n return (\n <div\n className={classes}\n ref={ref}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <ConditionalWrap\n shouldWrap={type === 'destructive'}\n wrap={(children) => (\n <button type=\"button\" onClick={onClick}>\n {children}\n </button>\n )}\n >\n <span className=\"ndl-tag-content\">{children}</span>\n </ConditionalWrap>\n {type !== 'destructive' && (\n <button\n type=\"button\"\n className=\"ndl-remove-icon\"\n onClick={onClick}\n aria-label=\"Remove tag\"\n >\n <XMarkIconOutline />\n </button>\n )}\n </div>\n );\n};\n"]}