@neo4j-ndl/react 4.1.5 → 4.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (525) hide show
  1. package/lib/cjs/_common/CodeBlockWrapper.js +5 -4
  2. package/lib/cjs/_common/CodeBlockWrapper.js.map +1 -1
  3. package/lib/cjs/_common/utils.js +4 -2
  4. package/lib/cjs/_common/utils.js.map +1 -1
  5. package/lib/cjs/accordion/Accordion.js +9 -6
  6. package/lib/cjs/accordion/Accordion.js.map +1 -1
  7. package/lib/cjs/accordion/accordion-types.js.map +1 -1
  8. package/lib/cjs/accordion/stories/accordion.stories.js +1 -1
  9. package/lib/cjs/accordion/stories/accordion.stories.js.map +1 -1
  10. package/lib/cjs/avatar/Avatar.js +1 -1
  11. package/lib/cjs/avatar/Avatar.js.map +1 -1
  12. package/lib/cjs/banner/Banner.js +3 -2
  13. package/lib/cjs/banner/Banner.js.map +1 -1
  14. package/lib/cjs/banner/stories/banner.stories.js +1 -1
  15. package/lib/cjs/banner/stories/banner.stories.js.map +1 -1
  16. package/lib/cjs/box/Box.js +14 -2
  17. package/lib/cjs/box/Box.js.map +1 -1
  18. package/lib/cjs/box/stories/box.stories.js +2 -2
  19. package/lib/cjs/box/stories/box.stories.js.map +1 -1
  20. package/lib/cjs/breadcrumbs/Breadcrumbs.js +10 -7
  21. package/lib/cjs/breadcrumbs/Breadcrumbs.js.map +1 -1
  22. package/lib/cjs/button/stories/button.stories.js +2 -2
  23. package/lib/cjs/button/stories/button.stories.js.map +1 -1
  24. package/lib/cjs/checkbox/Checkbox.js +2 -1
  25. package/lib/cjs/checkbox/Checkbox.js.map +1 -1
  26. package/lib/cjs/checkbox/stories/checkbox.stories.js +1 -1
  27. package/lib/cjs/checkbox/stories/checkbox.stories.js.map +1 -1
  28. package/lib/cjs/clipboard-button/ClipboardButton.js +6 -3
  29. package/lib/cjs/clipboard-button/ClipboardButton.js.map +1 -1
  30. package/lib/cjs/color-picker/ColorPicker.js +2 -1
  31. package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
  32. package/lib/cjs/data-grid/Components.js +9 -6
  33. package/lib/cjs/data-grid/Components.js.map +1 -1
  34. package/lib/cjs/data-grid/DataGrid.js +16 -4
  35. package/lib/cjs/data-grid/DataGrid.js.map +1 -1
  36. package/lib/cjs/data-grid/data-grid-nav/data-grid-nav.js +28 -14
  37. package/lib/cjs/data-grid/data-grid-nav/data-grid-nav.js.map +1 -1
  38. package/lib/cjs/data-grid/data-grid-nav/helpers.js +2 -1
  39. package/lib/cjs/data-grid/data-grid-nav/helpers.js.map +1 -1
  40. package/lib/cjs/data-grid/stories/datagrid-component-overriding.story.js +1 -3
  41. package/lib/cjs/data-grid/stories/datagrid-component-overriding.story.js.map +1 -1
  42. package/lib/cjs/data-grid/stories/datagrid-in-dialog.story.js +2 -1
  43. package/lib/cjs/data-grid/stories/datagrid-in-dialog.story.js.map +1 -1
  44. package/lib/cjs/data-grid/stories/datagrid-keyboard-navigation.story.js +2 -1
  45. package/lib/cjs/data-grid/stories/datagrid-keyboard-navigation.story.js.map +1 -1
  46. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js +1 -2
  47. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  48. package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js +13 -10
  49. package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
  50. package/lib/cjs/date-picker/DatePicker.js +2 -1
  51. package/lib/cjs/date-picker/DatePicker.js.map +1 -1
  52. package/lib/cjs/date-picker/stories/date-picker-range.story.js +1 -1
  53. package/lib/cjs/date-picker/stories/date-picker-range.story.js.map +1 -1
  54. package/lib/cjs/date-picker/stories/date-picker.stories.js +1 -1
  55. package/lib/cjs/date-picker/stories/date-picker.stories.js.map +1 -1
  56. package/lib/cjs/dialog/Dialog.js +20 -13
  57. package/lib/cjs/dialog/Dialog.js.map +1 -1
  58. package/lib/cjs/dialog/dialog-context.js +35 -6
  59. package/lib/cjs/dialog/dialog-context.js.map +1 -1
  60. package/lib/cjs/dialog/stories/dialog.stories.js +1 -1
  61. package/lib/cjs/dialog/stories/dialog.stories.js.map +1 -1
  62. package/lib/cjs/divider/stories/divider.stories.js +1 -1
  63. package/lib/cjs/divider/stories/divider.stories.js.map +1 -1
  64. package/lib/cjs/drawer/Drawer.js +9 -8
  65. package/lib/cjs/drawer/Drawer.js.map +1 -1
  66. package/lib/cjs/dropdown-button/DropdownButton.js +14 -2
  67. package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
  68. package/lib/cjs/dropzone/Dropzone.js +3 -2
  69. package/lib/cjs/dropzone/Dropzone.js.map +1 -1
  70. package/lib/cjs/dropzone/stories/dropzone-csv-files.story.js +1 -3
  71. package/lib/cjs/dropzone/stories/dropzone-csv-files.story.js.map +1 -1
  72. package/lib/cjs/dropzone/stories/dropzone-custom-extensions.story.js +1 -3
  73. package/lib/cjs/dropzone/stories/dropzone-custom-extensions.story.js.map +1 -1
  74. package/lib/cjs/dropzone/stories/dropzone-default.story.js +1 -3
  75. package/lib/cjs/dropzone/stories/dropzone-default.story.js.map +1 -1
  76. package/lib/cjs/dropzone/stories/dropzone-disabled.story.js +1 -3
  77. package/lib/cjs/dropzone/stories/dropzone-disabled.story.js.map +1 -1
  78. package/lib/cjs/flex/Flex.js +14 -2
  79. package/lib/cjs/flex/Flex.js.map +1 -1
  80. package/lib/cjs/graph-label/GraphLabel.js +18 -4
  81. package/lib/cjs/graph-label/GraphLabel.js.map +1 -1
  82. package/lib/cjs/icon-button/stories/icon-button.stories.js +1 -1
  83. package/lib/cjs/icon-button/stories/icon-button.stories.js.map +1 -1
  84. package/lib/cjs/icon-button-array/IconButtonArray.js +14 -2
  85. package/lib/cjs/icon-button-array/IconButtonArray.js.map +1 -1
  86. package/lib/cjs/icon-button-array/index.js +1 -1
  87. package/lib/cjs/icon-button-array/index.js.map +1 -1
  88. package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js +1 -1
  89. package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
  90. package/lib/cjs/icons/wrapIcon.js +1 -1
  91. package/lib/cjs/icons/wrapIcon.js.map +1 -1
  92. package/lib/cjs/inline-edit/InlineEdit.js +18 -6
  93. package/lib/cjs/inline-edit/InlineEdit.js.map +1 -1
  94. package/lib/cjs/kbd/Kbd.js +5 -3
  95. package/lib/cjs/kbd/Kbd.js.map +1 -1
  96. package/lib/cjs/kbd/stories/kbd.stories.js +1 -1
  97. package/lib/cjs/kbd/stories/kbd.stories.js.map +1 -1
  98. package/lib/cjs/loading-bar/LoadingBar.js +14 -2
  99. package/lib/cjs/loading-bar/LoadingBar.js.map +1 -1
  100. package/lib/cjs/loading-spinner/LoadingSpinner.js +1 -1
  101. package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
  102. package/lib/cjs/logo/stories/logo.stories.js +1 -1
  103. package/lib/cjs/logo/stories/logo.stories.js.map +1 -1
  104. package/lib/cjs/menu/Menu.js +9 -6
  105. package/lib/cjs/menu/Menu.js.map +1 -1
  106. package/lib/cjs/popover/Popover.js +6 -4
  107. package/lib/cjs/popover/Popover.js.map +1 -1
  108. package/lib/cjs/popover/stories/popover-custom-offset.story.js +2 -1
  109. package/lib/cjs/popover/stories/popover-custom-offset.story.js.map +1 -1
  110. package/lib/cjs/popover/stories/popover-separate-anchor.story.js +1 -1
  111. package/lib/cjs/popover/stories/popover-separate-anchor.story.js.map +1 -1
  112. package/lib/cjs/progress-bar/ProgressBar.js +1 -1
  113. package/lib/cjs/progress-bar/ProgressBar.js.map +1 -1
  114. package/lib/cjs/radio/Radio.js +2 -1
  115. package/lib/cjs/radio/Radio.js.map +1 -1
  116. package/lib/cjs/radio/stories/radio.stories.js +1 -1
  117. package/lib/cjs/radio/stories/radio.stories.js.map +1 -1
  118. package/lib/cjs/select/Overrides.js +1 -1
  119. package/lib/cjs/select/Overrides.js.map +1 -1
  120. package/lib/cjs/select/Select.js +18 -6
  121. package/lib/cjs/select/Select.js.map +1 -1
  122. package/lib/cjs/side-navigation/SideNavigation.js +5 -4
  123. package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
  124. package/lib/cjs/skeleton/Skeleton.js +14 -2
  125. package/lib/cjs/skeleton/Skeleton.js.map +1 -1
  126. package/lib/cjs/skeleton/stories/skeleton.stories.js +1 -1
  127. package/lib/cjs/skeleton/stories/skeleton.stories.js.map +1 -1
  128. package/lib/cjs/spotlight/Spotlight.js +33 -14
  129. package/lib/cjs/spotlight/Spotlight.js.map +1 -1
  130. package/lib/cjs/spotlight/SpotlightProvider.js +6 -3
  131. package/lib/cjs/spotlight/SpotlightProvider.js.map +1 -1
  132. package/lib/cjs/spotlight/SpotlightTarget.js +14 -2
  133. package/lib/cjs/spotlight/SpotlightTarget.js.map +1 -1
  134. package/lib/cjs/spotlight/SpotlightTour.js +1 -1
  135. package/lib/cjs/spotlight/SpotlightTour.js.map +1 -1
  136. package/lib/cjs/spotlight/stories/spotlight.stories.js +1 -1
  137. package/lib/cjs/spotlight/stories/spotlight.stories.js.map +1 -1
  138. package/lib/cjs/spotlight/use-indicator.js +2 -1
  139. package/lib/cjs/spotlight/use-indicator.js.map +1 -1
  140. package/lib/cjs/status-label/StatusLabel.js +1 -1
  141. package/lib/cjs/status-label/StatusLabel.js.map +1 -1
  142. package/lib/cjs/switch/Switch.js +2 -1
  143. package/lib/cjs/switch/Switch.js.map +1 -1
  144. package/lib/cjs/switch/stories/switch.stories.js +1 -1
  145. package/lib/cjs/switch/stories/switch.stories.js.map +1 -1
  146. package/lib/cjs/tabs/stories/tabs-disabled.story.js +1 -1
  147. package/lib/cjs/tabs/stories/tabs-disabled.story.js.map +1 -1
  148. package/lib/cjs/tabs/stories/tabs-fill-variants.story.js +1 -1
  149. package/lib/cjs/tabs/stories/tabs-fill-variants.story.js.map +1 -1
  150. package/lib/cjs/tabs/stories/tabs-overflow.story.js +1 -1
  151. package/lib/cjs/tabs/stories/tabs-overflow.story.js.map +1 -1
  152. package/lib/cjs/tabs/stories/tabs-sizes.story.js +1 -1
  153. package/lib/cjs/tabs/stories/tabs-sizes.story.js.map +1 -1
  154. package/lib/cjs/tabs/use-tabs-scroll-overflow.js +8 -4
  155. package/lib/cjs/tabs/use-tabs-scroll-overflow.js.map +1 -1
  156. package/lib/cjs/tag/Tag.js +14 -2
  157. package/lib/cjs/tag/Tag.js.map +1 -1
  158. package/lib/cjs/text-area/TextArea.js +14 -2
  159. package/lib/cjs/text-area/TextArea.js.map +1 -1
  160. package/lib/cjs/text-area/stories/text-area.stories.js +1 -1
  161. package/lib/cjs/text-area/stories/text-area.stories.js.map +1 -1
  162. package/lib/cjs/text-input/TextInput.js +14 -2
  163. package/lib/cjs/text-input/TextInput.js.map +1 -1
  164. package/lib/cjs/text-link/TextLink.js +14 -2
  165. package/lib/cjs/text-link/TextLink.js.map +1 -1
  166. package/lib/cjs/text-overflow/TextOverflow.js +2 -1
  167. package/lib/cjs/text-overflow/TextOverflow.js.map +1 -1
  168. package/lib/cjs/text-overflow/stories/text-overflow.stories.js +1 -1
  169. package/lib/cjs/text-overflow/stories/text-overflow.stories.js.map +1 -1
  170. package/lib/cjs/text-overflow/text-overflow-utils.js +12 -6
  171. package/lib/cjs/text-overflow/text-overflow-utils.js.map +1 -1
  172. package/lib/cjs/text-overflow/use-ellipsis-observer.js +2 -1
  173. package/lib/cjs/text-overflow/use-ellipsis-observer.js.map +1 -1
  174. package/lib/cjs/text-overflow/use-truncate-with-button.js +4 -2
  175. package/lib/cjs/text-overflow/use-truncate-with-button.js.map +1 -1
  176. package/lib/cjs/theme/ThemeProvider.js +2 -1
  177. package/lib/cjs/theme/ThemeProvider.js.map +1 -1
  178. package/lib/cjs/time-picker/TimePicker.js +22 -8
  179. package/lib/cjs/time-picker/TimePicker.js.map +1 -1
  180. package/lib/cjs/time-picker/stories/time-picker.stories.js +1 -1
  181. package/lib/cjs/time-picker/stories/time-picker.stories.js.map +1 -1
  182. package/lib/cjs/timezone-picker/TimeZonePicker.js +8 -4
  183. package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
  184. package/lib/cjs/timezone-picker/generate-timezone-options.js +15 -9
  185. package/lib/cjs/timezone-picker/generate-timezone-options.js.map +1 -1
  186. package/lib/cjs/timezone-picker/stories/timezone-picker.stories.js +1 -1
  187. package/lib/cjs/timezone-picker/stories/timezone-picker.stories.js.map +1 -1
  188. package/lib/cjs/toast/Toast.js +11 -6
  189. package/lib/cjs/toast/Toast.js.map +1 -1
  190. package/lib/cjs/tooltip/Tooltip.js +35 -15
  191. package/lib/cjs/tooltip/Tooltip.js.map +1 -1
  192. package/lib/cjs/tree-view/TreeItemWrapper.js +3 -1
  193. package/lib/cjs/tree-view/TreeItemWrapper.js.map +1 -1
  194. package/lib/cjs/tree-view/TreeView.js +2 -1
  195. package/lib/cjs/tree-view/TreeView.js.map +1 -1
  196. package/lib/cjs/tree-view/TreeViewItem.js +3 -1
  197. package/lib/cjs/tree-view/TreeViewItem.js.map +1 -1
  198. package/lib/cjs/tree-view/TreeViewTextItem.js +1 -2
  199. package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
  200. package/lib/cjs/tree-view/TreeViewTrail.js +14 -2
  201. package/lib/cjs/tree-view/TreeViewTrail.js.map +1 -1
  202. package/lib/cjs/wizard/Wizard.js +3 -2
  203. package/lib/cjs/wizard/Wizard.js.map +1 -1
  204. package/lib/esm/_common/CodeBlockWrapper.js +5 -4
  205. package/lib/esm/_common/CodeBlockWrapper.js.map +1 -1
  206. package/lib/esm/_common/utils.js +4 -2
  207. package/lib/esm/_common/utils.js.map +1 -1
  208. package/lib/esm/accordion/Accordion.js +9 -6
  209. package/lib/esm/accordion/Accordion.js.map +1 -1
  210. package/lib/esm/accordion/accordion-types.js.map +1 -1
  211. package/lib/esm/accordion/stories/accordion.stories.js +1 -1
  212. package/lib/esm/accordion/stories/accordion.stories.js.map +1 -1
  213. package/lib/esm/avatar/Avatar.js +1 -1
  214. package/lib/esm/avatar/Avatar.js.map +1 -1
  215. package/lib/esm/banner/Banner.js +3 -2
  216. package/lib/esm/banner/Banner.js.map +1 -1
  217. package/lib/esm/banner/stories/banner.stories.js +1 -1
  218. package/lib/esm/banner/stories/banner.stories.js.map +1 -1
  219. package/lib/esm/box/Box.js +14 -2
  220. package/lib/esm/box/Box.js.map +1 -1
  221. package/lib/esm/box/stories/box.stories.js +2 -2
  222. package/lib/esm/box/stories/box.stories.js.map +1 -1
  223. package/lib/esm/breadcrumbs/Breadcrumbs.js +10 -7
  224. package/lib/esm/breadcrumbs/Breadcrumbs.js.map +1 -1
  225. package/lib/esm/button/stories/button.stories.js +1 -1
  226. package/lib/esm/button/stories/button.stories.js.map +1 -1
  227. package/lib/esm/checkbox/Checkbox.js +2 -1
  228. package/lib/esm/checkbox/Checkbox.js.map +1 -1
  229. package/lib/esm/checkbox/stories/checkbox.stories.js +1 -1
  230. package/lib/esm/checkbox/stories/checkbox.stories.js.map +1 -1
  231. package/lib/esm/clipboard-button/ClipboardButton.js +6 -3
  232. package/lib/esm/clipboard-button/ClipboardButton.js.map +1 -1
  233. package/lib/esm/color-picker/ColorPicker.js +2 -1
  234. package/lib/esm/color-picker/ColorPicker.js.map +1 -1
  235. package/lib/esm/data-grid/Components.js +9 -6
  236. package/lib/esm/data-grid/Components.js.map +1 -1
  237. package/lib/esm/data-grid/DataGrid.js +16 -4
  238. package/lib/esm/data-grid/DataGrid.js.map +1 -1
  239. package/lib/esm/data-grid/data-grid-nav/data-grid-nav.js +28 -14
  240. package/lib/esm/data-grid/data-grid-nav/data-grid-nav.js.map +1 -1
  241. package/lib/esm/data-grid/data-grid-nav/helpers.js +2 -1
  242. package/lib/esm/data-grid/data-grid-nav/helpers.js.map +1 -1
  243. package/lib/esm/data-grid/stories/datagrid-component-overriding.story.js +1 -3
  244. package/lib/esm/data-grid/stories/datagrid-component-overriding.story.js.map +1 -1
  245. package/lib/esm/data-grid/stories/datagrid-in-dialog.story.js +2 -1
  246. package/lib/esm/data-grid/stories/datagrid-in-dialog.story.js.map +1 -1
  247. package/lib/esm/data-grid/stories/datagrid-keyboard-navigation.story.js +2 -1
  248. package/lib/esm/data-grid/stories/datagrid-keyboard-navigation.story.js.map +1 -1
  249. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js +1 -2
  250. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  251. package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js +9 -6
  252. package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
  253. package/lib/esm/date-picker/DatePicker.js +2 -1
  254. package/lib/esm/date-picker/DatePicker.js.map +1 -1
  255. package/lib/esm/date-picker/stories/date-picker-range.story.js +1 -1
  256. package/lib/esm/date-picker/stories/date-picker-range.story.js.map +1 -1
  257. package/lib/esm/date-picker/stories/date-picker.stories.js +1 -1
  258. package/lib/esm/date-picker/stories/date-picker.stories.js.map +1 -1
  259. package/lib/esm/dialog/Dialog.js +20 -13
  260. package/lib/esm/dialog/Dialog.js.map +1 -1
  261. package/lib/esm/dialog/dialog-context.js +1 -2
  262. package/lib/esm/dialog/dialog-context.js.map +1 -1
  263. package/lib/esm/dialog/stories/dialog.stories.js +1 -1
  264. package/lib/esm/dialog/stories/dialog.stories.js.map +1 -1
  265. package/lib/esm/divider/stories/divider.stories.js +1 -1
  266. package/lib/esm/divider/stories/divider.stories.js.map +1 -1
  267. package/lib/esm/drawer/Drawer.js +9 -8
  268. package/lib/esm/drawer/Drawer.js.map +1 -1
  269. package/lib/esm/dropdown-button/DropdownButton.js +14 -2
  270. package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
  271. package/lib/esm/dropzone/Dropzone.js +3 -2
  272. package/lib/esm/dropzone/Dropzone.js.map +1 -1
  273. package/lib/esm/dropzone/stories/dropzone-csv-files.story.js +1 -3
  274. package/lib/esm/dropzone/stories/dropzone-csv-files.story.js.map +1 -1
  275. package/lib/esm/dropzone/stories/dropzone-custom-extensions.story.js +1 -3
  276. package/lib/esm/dropzone/stories/dropzone-custom-extensions.story.js.map +1 -1
  277. package/lib/esm/dropzone/stories/dropzone-default.story.js +1 -3
  278. package/lib/esm/dropzone/stories/dropzone-default.story.js.map +1 -1
  279. package/lib/esm/dropzone/stories/dropzone-disabled.story.js +1 -3
  280. package/lib/esm/dropzone/stories/dropzone-disabled.story.js.map +1 -1
  281. package/lib/esm/flex/Flex.js +14 -2
  282. package/lib/esm/flex/Flex.js.map +1 -1
  283. package/lib/esm/graph-label/GraphLabel.js +18 -4
  284. package/lib/esm/graph-label/GraphLabel.js.map +1 -1
  285. package/lib/esm/icon-button/stories/icon-button.stories.js +1 -1
  286. package/lib/esm/icon-button/stories/icon-button.stories.js.map +1 -1
  287. package/lib/esm/icon-button-array/IconButtonArray.js +14 -2
  288. package/lib/esm/icon-button-array/IconButtonArray.js.map +1 -1
  289. package/lib/esm/icon-button-array/index.js +1 -1
  290. package/lib/esm/icon-button-array/index.js.map +1 -1
  291. package/lib/esm/icon-button-array/stories/icon-button-array.stories.js +1 -1
  292. package/lib/esm/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
  293. package/lib/esm/icons/wrapIcon.js +1 -1
  294. package/lib/esm/icons/wrapIcon.js.map +1 -1
  295. package/lib/esm/inline-edit/InlineEdit.js +18 -6
  296. package/lib/esm/inline-edit/InlineEdit.js.map +1 -1
  297. package/lib/esm/kbd/Kbd.js +5 -3
  298. package/lib/esm/kbd/Kbd.js.map +1 -1
  299. package/lib/esm/kbd/stories/kbd.stories.js +1 -1
  300. package/lib/esm/kbd/stories/kbd.stories.js.map +1 -1
  301. package/lib/esm/loading-bar/LoadingBar.js +14 -2
  302. package/lib/esm/loading-bar/LoadingBar.js.map +1 -1
  303. package/lib/esm/loading-spinner/LoadingSpinner.js +1 -1
  304. package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
  305. package/lib/esm/logo/stories/logo.stories.js +1 -1
  306. package/lib/esm/logo/stories/logo.stories.js.map +1 -1
  307. package/lib/esm/menu/Menu.js +9 -6
  308. package/lib/esm/menu/Menu.js.map +1 -1
  309. package/lib/esm/popover/Popover.js +6 -4
  310. package/lib/esm/popover/Popover.js.map +1 -1
  311. package/lib/esm/popover/stories/popover-custom-offset.story.js +2 -1
  312. package/lib/esm/popover/stories/popover-custom-offset.story.js.map +1 -1
  313. package/lib/esm/popover/stories/popover-separate-anchor.story.js +1 -1
  314. package/lib/esm/popover/stories/popover-separate-anchor.story.js.map +1 -1
  315. package/lib/esm/progress-bar/ProgressBar.js +1 -1
  316. package/lib/esm/progress-bar/ProgressBar.js.map +1 -1
  317. package/lib/esm/radio/Radio.js +2 -1
  318. package/lib/esm/radio/Radio.js.map +1 -1
  319. package/lib/esm/radio/stories/radio.stories.js +1 -1
  320. package/lib/esm/radio/stories/radio.stories.js.map +1 -1
  321. package/lib/esm/select/Overrides.js +1 -1
  322. package/lib/esm/select/Overrides.js.map +1 -1
  323. package/lib/esm/select/Select.js +18 -6
  324. package/lib/esm/select/Select.js.map +1 -1
  325. package/lib/esm/side-navigation/SideNavigation.js +5 -4
  326. package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
  327. package/lib/esm/skeleton/Skeleton.js +14 -2
  328. package/lib/esm/skeleton/Skeleton.js.map +1 -1
  329. package/lib/esm/skeleton/stories/skeleton.stories.js +1 -1
  330. package/lib/esm/skeleton/stories/skeleton.stories.js.map +1 -1
  331. package/lib/esm/spotlight/Spotlight.js +33 -14
  332. package/lib/esm/spotlight/Spotlight.js.map +1 -1
  333. package/lib/esm/spotlight/SpotlightProvider.js +6 -3
  334. package/lib/esm/spotlight/SpotlightProvider.js.map +1 -1
  335. package/lib/esm/spotlight/SpotlightTarget.js +14 -2
  336. package/lib/esm/spotlight/SpotlightTarget.js.map +1 -1
  337. package/lib/esm/spotlight/SpotlightTour.js +1 -1
  338. package/lib/esm/spotlight/SpotlightTour.js.map +1 -1
  339. package/lib/esm/spotlight/stories/spotlight.stories.js +1 -1
  340. package/lib/esm/spotlight/stories/spotlight.stories.js.map +1 -1
  341. package/lib/esm/spotlight/use-indicator.js +2 -1
  342. package/lib/esm/spotlight/use-indicator.js.map +1 -1
  343. package/lib/esm/status-label/StatusLabel.js +1 -1
  344. package/lib/esm/status-label/StatusLabel.js.map +1 -1
  345. package/lib/esm/switch/Switch.js +2 -1
  346. package/lib/esm/switch/Switch.js.map +1 -1
  347. package/lib/esm/switch/stories/switch.stories.js +1 -1
  348. package/lib/esm/switch/stories/switch.stories.js.map +1 -1
  349. package/lib/esm/tabs/stories/tabs-disabled.story.js +1 -1
  350. package/lib/esm/tabs/stories/tabs-disabled.story.js.map +1 -1
  351. package/lib/esm/tabs/stories/tabs-fill-variants.story.js +1 -1
  352. package/lib/esm/tabs/stories/tabs-fill-variants.story.js.map +1 -1
  353. package/lib/esm/tabs/stories/tabs-overflow.story.js +1 -1
  354. package/lib/esm/tabs/stories/tabs-overflow.story.js.map +1 -1
  355. package/lib/esm/tabs/stories/tabs-sizes.story.js +1 -1
  356. package/lib/esm/tabs/stories/tabs-sizes.story.js.map +1 -1
  357. package/lib/esm/tabs/use-tabs-scroll-overflow.js +8 -4
  358. package/lib/esm/tabs/use-tabs-scroll-overflow.js.map +1 -1
  359. package/lib/esm/tag/Tag.js +14 -2
  360. package/lib/esm/tag/Tag.js.map +1 -1
  361. package/lib/esm/text-area/TextArea.js +14 -2
  362. package/lib/esm/text-area/TextArea.js.map +1 -1
  363. package/lib/esm/text-area/stories/text-area.stories.js +1 -1
  364. package/lib/esm/text-area/stories/text-area.stories.js.map +1 -1
  365. package/lib/esm/text-input/TextInput.js +14 -2
  366. package/lib/esm/text-input/TextInput.js.map +1 -1
  367. package/lib/esm/text-link/TextLink.js +14 -2
  368. package/lib/esm/text-link/TextLink.js.map +1 -1
  369. package/lib/esm/text-overflow/TextOverflow.js +2 -1
  370. package/lib/esm/text-overflow/TextOverflow.js.map +1 -1
  371. package/lib/esm/text-overflow/stories/text-overflow.stories.js +1 -1
  372. package/lib/esm/text-overflow/stories/text-overflow.stories.js.map +1 -1
  373. package/lib/esm/text-overflow/text-overflow-utils.js +12 -6
  374. package/lib/esm/text-overflow/text-overflow-utils.js.map +1 -1
  375. package/lib/esm/text-overflow/use-ellipsis-observer.js +2 -1
  376. package/lib/esm/text-overflow/use-ellipsis-observer.js.map +1 -1
  377. package/lib/esm/text-overflow/use-truncate-with-button.js +4 -2
  378. package/lib/esm/text-overflow/use-truncate-with-button.js.map +1 -1
  379. package/lib/esm/theme/ThemeProvider.js +2 -1
  380. package/lib/esm/theme/ThemeProvider.js.map +1 -1
  381. package/lib/esm/time-picker/TimePicker.js +22 -8
  382. package/lib/esm/time-picker/TimePicker.js.map +1 -1
  383. package/lib/esm/time-picker/stories/time-picker.stories.js +1 -1
  384. package/lib/esm/time-picker/stories/time-picker.stories.js.map +1 -1
  385. package/lib/esm/timezone-picker/TimeZonePicker.js +8 -4
  386. package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
  387. package/lib/esm/timezone-picker/generate-timezone-options.js +15 -9
  388. package/lib/esm/timezone-picker/generate-timezone-options.js.map +1 -1
  389. package/lib/esm/timezone-picker/stories/timezone-picker.stories.js +1 -1
  390. package/lib/esm/timezone-picker/stories/timezone-picker.stories.js.map +1 -1
  391. package/lib/esm/toast/Toast.js +11 -6
  392. package/lib/esm/toast/Toast.js.map +1 -1
  393. package/lib/esm/tooltip/Tooltip.js +35 -15
  394. package/lib/esm/tooltip/Tooltip.js.map +1 -1
  395. package/lib/esm/tree-view/TreeItemWrapper.js +3 -1
  396. package/lib/esm/tree-view/TreeItemWrapper.js.map +1 -1
  397. package/lib/esm/tree-view/TreeView.js +2 -1
  398. package/lib/esm/tree-view/TreeView.js.map +1 -1
  399. package/lib/esm/tree-view/TreeViewItem.js +3 -1
  400. package/lib/esm/tree-view/TreeViewItem.js.map +1 -1
  401. package/lib/esm/tree-view/TreeViewTextItem.js +1 -2
  402. package/lib/esm/tree-view/TreeViewTextItem.js.map +1 -1
  403. package/lib/esm/tree-view/TreeViewTrail.js +14 -2
  404. package/lib/esm/tree-view/TreeViewTrail.js.map +1 -1
  405. package/lib/esm/wizard/Wizard.js +3 -2
  406. package/lib/esm/wizard/Wizard.js.map +1 -1
  407. package/lib/types/_common/CodeBlockWrapper.d.ts +1 -1
  408. package/lib/types/_common/CodeBlockWrapper.d.ts.map +1 -1
  409. package/lib/types/_common/utils.d.ts.map +1 -1
  410. package/lib/types/accordion/Accordion.d.ts +4 -4
  411. package/lib/types/accordion/Accordion.d.ts.map +1 -1
  412. package/lib/types/accordion/accordion-types.d.ts +1 -1
  413. package/lib/types/accordion/accordion-types.d.ts.map +1 -1
  414. package/lib/types/accordion/stories/accordion.stories.d.ts +4 -4
  415. package/lib/types/avatar/Avatar.d.ts.map +1 -1
  416. package/lib/types/banner/Banner.d.ts +1 -1
  417. package/lib/types/banner/Banner.d.ts.map +1 -1
  418. package/lib/types/box/Box.d.ts +1 -1
  419. package/lib/types/box/Box.d.ts.map +1 -1
  420. package/lib/types/box/stories/box.stories.d.ts +1 -1
  421. package/lib/types/breadcrumbs/Breadcrumbs.d.ts +3 -3
  422. package/lib/types/breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  423. package/lib/types/breadcrumbs/stories/breadcrumbs.stories.d.ts +3 -3
  424. package/lib/types/button/stories/button.stories.d.ts +1 -1
  425. package/lib/types/button/stories/button.stories.d.ts.map +1 -1
  426. package/lib/types/checkbox/Checkbox.d.ts.map +1 -1
  427. package/lib/types/clipboard-button/ClipboardButton.d.ts.map +1 -1
  428. package/lib/types/color-picker/ColorPicker.d.ts.map +1 -1
  429. package/lib/types/data-grid/Components.d.ts.map +1 -1
  430. package/lib/types/data-grid/DataGrid.d.ts +23 -23
  431. package/lib/types/data-grid/DataGrid.d.ts.map +1 -1
  432. package/lib/types/data-grid/data-grid-nav/data-grid-nav.d.ts.map +1 -1
  433. package/lib/types/data-grid/data-grid-nav/helpers.d.ts.map +1 -1
  434. package/lib/types/data-grid/stories/datagrid-component-overriding.story.d.ts.map +1 -1
  435. package/lib/types/data-grid/stories/datagrid-in-dialog.story.d.ts.map +1 -1
  436. package/lib/types/data-grid/stories/datagrid-keyboard-navigation.story.d.ts.map +1 -1
  437. package/lib/types/data-grid/stories/datagrid-kitchen-sink.story.d.ts.map +1 -1
  438. package/lib/types/data-grid/stories/datagrid-pinned-columns.stories.d.ts +1 -1
  439. package/lib/types/data-grid/stories/datagrid-placeholder-states.stories.d.ts +1 -1
  440. package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts +1 -1
  441. package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts.map +1 -1
  442. package/lib/types/date-picker/DatePicker.d.ts.map +1 -1
  443. package/lib/types/date-picker/stories/date-picker-range.story.d.ts.map +1 -1
  444. package/lib/types/dialog/Dialog.d.ts +6 -6
  445. package/lib/types/dialog/Dialog.d.ts.map +1 -1
  446. package/lib/types/dialog/dialog-context.d.ts.map +1 -1
  447. package/lib/types/drawer/Drawer.d.ts +3 -3
  448. package/lib/types/drawer/Drawer.d.ts.map +1 -1
  449. package/lib/types/dropdown-button/DropdownButton.d.ts +1 -1
  450. package/lib/types/dropdown-button/DropdownButton.d.ts.map +1 -1
  451. package/lib/types/dropzone/Dropzone.d.ts.map +1 -1
  452. package/lib/types/flex/Flex.d.ts +1 -1
  453. package/lib/types/flex/Flex.d.ts.map +1 -1
  454. package/lib/types/flex/stories/flex.stories.d.ts +1 -1
  455. package/lib/types/graph-label/GraphLabel.d.ts +1 -1
  456. package/lib/types/graph-label/GraphLabel.d.ts.map +1 -1
  457. package/lib/types/icon-button-array/IconButtonArray.d.ts +2 -2
  458. package/lib/types/icon-button-array/IconButtonArray.d.ts.map +1 -1
  459. package/lib/types/icon-button-array/index.d.ts +1 -1
  460. package/lib/types/icon-button-array/index.d.ts.map +1 -1
  461. package/lib/types/inline-edit/InlineEdit.d.ts +1 -1
  462. package/lib/types/inline-edit/InlineEdit.d.ts.map +1 -1
  463. package/lib/types/kbd/Kbd.d.ts.map +1 -1
  464. package/lib/types/loading-bar/LoadingBar.d.ts +1 -1
  465. package/lib/types/loading-bar/LoadingBar.d.ts.map +1 -1
  466. package/lib/types/menu/Menu.d.ts +2 -2
  467. package/lib/types/menu/Menu.d.ts.map +1 -1
  468. package/lib/types/popover/Popover.d.ts +1 -1
  469. package/lib/types/popover/Popover.d.ts.map +1 -1
  470. package/lib/types/popover/stories/popover-custom-offset.story.d.ts.map +1 -1
  471. package/lib/types/radio/Radio.d.ts.map +1 -1
  472. package/lib/types/select/Overrides.d.ts +1 -2
  473. package/lib/types/select/Overrides.d.ts.map +1 -1
  474. package/lib/types/select/Select.d.ts +1 -1
  475. package/lib/types/select/Select.d.ts.map +1 -1
  476. package/lib/types/side-navigation/SideNavigation.d.ts +1 -1
  477. package/lib/types/side-navigation/SideNavigation.d.ts.map +1 -1
  478. package/lib/types/side-navigation/stories/side-nav.stories.d.ts +1 -1
  479. package/lib/types/skeleton/Skeleton.d.ts +1 -1
  480. package/lib/types/skeleton/Skeleton.d.ts.map +1 -1
  481. package/lib/types/skeleton/stories/skeleton.stories.d.ts +1 -1
  482. package/lib/types/spotlight/Spotlight.d.ts +6 -6
  483. package/lib/types/spotlight/Spotlight.d.ts.map +1 -1
  484. package/lib/types/spotlight/SpotlightProvider.d.ts.map +1 -1
  485. package/lib/types/spotlight/SpotlightTarget.d.ts +1 -1
  486. package/lib/types/spotlight/SpotlightTarget.d.ts.map +1 -1
  487. package/lib/types/spotlight/use-indicator.d.ts.map +1 -1
  488. package/lib/types/switch/Switch.d.ts.map +1 -1
  489. package/lib/types/tabs/use-tabs-scroll-overflow.d.ts.map +1 -1
  490. package/lib/types/tag/Tag.d.ts +1 -1
  491. package/lib/types/tag/Tag.d.ts.map +1 -1
  492. package/lib/types/text-area/TextArea.d.ts +1 -1
  493. package/lib/types/text-area/TextArea.d.ts.map +1 -1
  494. package/lib/types/text-input/TextInput.d.ts +1 -1
  495. package/lib/types/text-input/TextInput.d.ts.map +1 -1
  496. package/lib/types/text-link/TextLink.d.ts +1 -1
  497. package/lib/types/text-link/TextLink.d.ts.map +1 -1
  498. package/lib/types/text-overflow/TextOverflow.d.ts.map +1 -1
  499. package/lib/types/text-overflow/text-overflow-utils.d.ts.map +1 -1
  500. package/lib/types/text-overflow/use-ellipsis-observer.d.ts.map +1 -1
  501. package/lib/types/text-overflow/use-truncate-with-button.d.ts.map +1 -1
  502. package/lib/types/theme/ThemeProvider.d.ts.map +1 -1
  503. package/lib/types/time-picker/TimePicker.d.ts +1 -1
  504. package/lib/types/time-picker/TimePicker.d.ts.map +1 -1
  505. package/lib/types/time-picker/stories/time-picker.stories.d.ts +1 -1
  506. package/lib/types/timezone-picker/TimeZonePicker.d.ts.map +1 -1
  507. package/lib/types/timezone-picker/generate-timezone-options.d.ts.map +1 -1
  508. package/lib/types/toast/Toast.d.ts +1 -1
  509. package/lib/types/toast/Toast.d.ts.map +1 -1
  510. package/lib/types/tooltip/Tooltip.d.ts +8 -7
  511. package/lib/types/tooltip/Tooltip.d.ts.map +1 -1
  512. package/lib/types/tree-view/TreeItemWrapper.d.ts.map +1 -1
  513. package/lib/types/tree-view/TreeView.d.ts.map +1 -1
  514. package/lib/types/tree-view/TreeViewItem.d.ts.map +1 -1
  515. package/lib/types/tree-view/TreeViewTrail.d.ts +2 -1
  516. package/lib/types/tree-view/TreeViewTrail.d.ts.map +1 -1
  517. package/lib/types/wizard/Wizard.d.ts +1 -1
  518. package/lib/types/wizard/Wizard.d.ts.map +1 -1
  519. package/package.json +2 -2
  520. package/lib/cjs/dropdown-button/avatar-test.stories.tsx.js +0 -31
  521. package/lib/cjs/dropdown-button/avatar-test.stories.tsx.js.map +0 -1
  522. package/lib/esm/dropdown-button/avatar-test.stories.tsx.js +0 -27
  523. package/lib/esm/dropdown-button/avatar-test.stories.tsx.js.map +0 -1
  524. package/lib/types/dropdown-button/avatar-test.stories.tsx.d.ts +0 -24
  525. package/lib/types/dropdown-button/avatar-test.stories.tsx.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"switch.stories.js","sourceRoot":"","sources":["../../../../src/switch/stories/switch.stories.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,GACjB,MAAM,IAAI,CAAC;AAEZ,MAAM,aAAa,GAAwB;IACzC,KAAK,EAAE,mBAAmB;IAC1B,EAAE,EAAE,mBAAmB;IACvB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,GAAG,EAAE;YACH,WAAW,EAAE,4BAA4B;SAC1C;KACF;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,KAAK,KAAG,GACL,CACP;KACF;CACF,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,gBAAgB;gBACtB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,aAAa;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,sBAAsB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;a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E,UAAU;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,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,GACjB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAwB;IACzC,KAAK,EAAE,mBAAmB;IAC1B,EAAE,EAAE,mBAAmB;IACvB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,GAAG,EAAE;YACH,WAAW,EAAE,4BAA4B;SAC1C;KACF;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,UAAU,EAAE;QACV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BAAuB;gBAC7B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,oBAAoB;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,iBAAiB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,cAAc;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,aAAa;gBACnB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,UAAU;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"]}
@@ -24,7 +24,7 @@ import { Tabs, Typography } from '@neo4j-ndl/react';
24
24
  import { useState } from 'react';
25
25
  const Component = () => {
26
26
  const [value, setValue] = useState('0');
27
- return (_jsxs("div", { children: [_jsxs(Tabs, { value: value, onChange: setValue, className: "n-mb-token-8", children: [_jsx(Tabs.Tab, { id: "0", children: "Tab 1" }), _jsx(Tabs.Tab, { id: "1", children: "Tab 2" }), _jsx(Tabs.Tab, { id: "2", isDisabled: true, children: "Tab 3" })] }), _jsx(Tabs.TabPanel, { value: value, tabId: '0', children: _jsx(Typography, { variant: "body-medium", children: "Tab 1 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: '1', children: _jsx(Typography, { variant: "body-medium", children: "Tab 2 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: '2', children: _jsx(Typography, { variant: "body-medium", children: "Tab 3 content" }) })] }));
27
+ return (_jsxs("div", { children: [_jsxs(Tabs, { value: value, onChange: setValue, className: "n-mb-token-8", children: [_jsx(Tabs.Tab, { id: "0", children: "Tab 1" }), _jsx(Tabs.Tab, { id: "1", children: "Tab 2" }), _jsx(Tabs.Tab, { id: "2", isDisabled: true, children: "Tab 3" })] }), _jsx(Tabs.TabPanel, { value: value, tabId: "0", children: _jsx(Typography, { variant: "body-medium", children: "Tab 1 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: "1", children: _jsx(Typography, { variant: "body-medium", children: "Tab 2 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: "2", children: _jsx(Typography, { variant: "body-medium", children: "Tab 3 content" }) })] }));
28
28
  };
29
29
  export default Component;
30
30
  //# sourceMappingURL=tabs-disabled.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-disabled.story.js","sourceRoot":"","sources":["../../../../src/tabs/stories/tabs-disabled.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAY,GAAG,CAAC,CAAC;IAEnD,OAAO,CACL,0BACE,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAC,cAAc,aAC9D,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,EAAC,UAAU,EAAE,IAAI,sBAEtB,IACN,EACP,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YACrC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YACrC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YACrC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,IACZ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Tabs, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\ntype TabValues = '0' | '1' | '2';\n\nconst Component = () => {\n const [value, setValue] = useState<TabValues>('0');\n\n return (\n <div>\n <Tabs value={value} onChange={setValue} className=\"n-mb-token-8\">\n <Tabs.Tab id=\"0\">Tab 1</Tabs.Tab>\n <Tabs.Tab id=\"1\">Tab 2</Tabs.Tab>\n <Tabs.Tab id=\"2\" isDisabled={true}>\n Tab 3\n </Tabs.Tab>\n </Tabs>\n <Tabs.TabPanel value={value} tabId={'0'}>\n <Typography variant=\"body-medium\">Tab 1 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId={'1'}>\n <Typography variant=\"body-medium\">Tab 2 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId={'2'}>\n <Typography variant=\"body-medium\">Tab 3 content</Typography>\n </Tabs.TabPanel>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"tabs-disabled.story.js","sourceRoot":"","sources":["../../../../src/tabs/stories/tabs-disabled.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAY,GAAG,CAAC,CAAC;IAEnD,OAAO,CACL,0BACE,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAC,cAAc,aAC9D,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,EAAC,UAAU,EAAE,IAAI,sBAEtB,IACN,EACP,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC,GAAG,YACpC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC,GAAG,YACpC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC,GAAG,YACpC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,IACZ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Tabs, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\ntype TabValues = '0' | '1' | '2';\n\nconst Component = () => {\n const [value, setValue] = useState<TabValues>('0');\n\n return (\n <div>\n <Tabs value={value} onChange={setValue} className=\"n-mb-token-8\">\n <Tabs.Tab id=\"0\">Tab 1</Tabs.Tab>\n <Tabs.Tab id=\"1\">Tab 2</Tabs.Tab>\n <Tabs.Tab id=\"2\" isDisabled={true}>\n Tab 3\n </Tabs.Tab>\n </Tabs>\n <Tabs.TabPanel value={value} tabId=\"0\">\n <Typography variant=\"body-medium\">Tab 1 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId=\"1\">\n <Typography variant=\"body-medium\">Tab 2 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId=\"2\">\n <Typography variant=\"body-medium\">Tab 3 content</Typography>\n </Tabs.TabPanel>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -25,7 +25,7 @@ import { useState } from 'react';
25
25
  const Component = () => {
26
26
  const [underlineValue, setUnderlineValue] = useState('0');
27
27
  const [filledValue, setFilledValue] = useState('0');
28
- return (_jsxs("div", { className: "n-flex n-gap-token-8", children: [_jsxs("div", { className: "n-flex n-flex-col n-gap-token-32", children: [_jsx(Typography, { variant: "label", children: "Underline (Default)" }), _jsxs("div", { children: [_jsxs(Tabs, { value: underlineValue, onChange: setUnderlineValue, className: "n-mb-token-8", children: [_jsx(Tabs.Tab, { id: "0", children: "Tab 1" }), _jsx(Tabs.Tab, { id: "1", children: "Tab 2" }), _jsx(Tabs.Tab, { id: "2", children: "Tab 3" })] }), _jsx(Tabs.TabPanel, { value: underlineValue, tabId: '0', children: _jsx(Typography, { variant: "body-medium", children: "Tab 1 content" }) }), _jsx(Tabs.TabPanel, { value: underlineValue, tabId: '1', children: _jsx(Typography, { variant: "body-medium", children: "Tab 2 content" }) }), _jsx(Tabs.TabPanel, { value: underlineValue, tabId: '2', children: _jsx(Typography, { variant: "body-medium", children: "Tab 3 content" }) })] })] }), _jsxs("div", { className: "n-flex n-flex-col n-gap-token-8", children: [_jsx(Typography, { variant: "label", children: "Filled" }), _jsxs("div", { children: [_jsxs(Tabs, { value: filledValue, onChange: setFilledValue, fill: "filled", className: "n-mb-token-8", children: [_jsx(Tabs.Tab, { id: "0", children: "Tab 1" }), _jsx(Tabs.Tab, { id: "1", children: "Tab 2" }), _jsx(Tabs.Tab, { id: "2", children: "Tab 3" })] }), _jsx(Tabs.TabPanel, { value: filledValue, tabId: '0', children: _jsx(Typography, { variant: "body-medium", children: "Tab 1 content" }) }), _jsx(Tabs.TabPanel, { value: filledValue, tabId: '1', children: _jsx(Typography, { variant: "body-medium", children: "Tab 2 content" }) }), _jsx(Tabs.TabPanel, { value: filledValue, tabId: '2', children: _jsx(Typography, { variant: "body-medium", children: "Tab 3 content" }) })] })] })] }));
28
+ return (_jsxs("div", { className: "n-flex n-gap-token-8", children: [_jsxs("div", { className: "n-flex n-flex-col n-gap-token-32", children: [_jsx(Typography, { variant: "label", children: "Underline (Default)" }), _jsxs("div", { children: [_jsxs(Tabs, { value: underlineValue, onChange: setUnderlineValue, className: "n-mb-token-8", children: [_jsx(Tabs.Tab, { id: "0", children: "Tab 1" }), _jsx(Tabs.Tab, { id: "1", children: "Tab 2" }), _jsx(Tabs.Tab, { id: "2", children: "Tab 3" })] }), _jsx(Tabs.TabPanel, { value: underlineValue, tabId: "0", children: _jsx(Typography, { variant: "body-medium", children: "Tab 1 content" }) }), _jsx(Tabs.TabPanel, { value: underlineValue, tabId: "1", children: _jsx(Typography, { variant: "body-medium", children: "Tab 2 content" }) }), _jsx(Tabs.TabPanel, { value: underlineValue, tabId: "2", children: _jsx(Typography, { variant: "body-medium", children: "Tab 3 content" }) })] })] }), _jsxs("div", { className: "n-flex n-flex-col n-gap-token-8", children: [_jsx(Typography, { variant: "label", children: "Filled" }), _jsxs("div", { children: [_jsxs(Tabs, { value: filledValue, onChange: setFilledValue, fill: "filled", className: "n-mb-token-8", children: [_jsx(Tabs.Tab, { id: "0", children: "Tab 1" }), _jsx(Tabs.Tab, { id: "1", children: "Tab 2" }), _jsx(Tabs.Tab, { id: "2", children: "Tab 3" })] }), _jsx(Tabs.TabPanel, { value: filledValue, tabId: "0", children: _jsx(Typography, { variant: "body-medium", children: "Tab 1 content" }) }), _jsx(Tabs.TabPanel, { value: filledValue, tabId: "1", children: _jsx(Typography, { variant: "body-medium", children: "Tab 2 content" }) }), _jsx(Tabs.TabPanel, { value: filledValue, tabId: "2", children: _jsx(Typography, { variant: "body-medium", children: "Tab 3 content" }) })] })] })] }));
29
29
  };
30
30
  export default Component;
31
31
  //# sourceMappingURL=tabs-fill-variants.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-fill-variants.story.js","sourceRoot":"","sources":["../../../../src/tabs/stories/tabs-fill-variants.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAY,GAAG,CAAC,CAAC;IACrE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAY,GAAG,CAAC,CAAC;IAE/D,OAAO,CACL,eAAK,SAAS,EAAC,sBAAsB,aACnC,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,oCAAiC,EAC5D,0BACE,MAAC,IAAI,IACH,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,iBAAiB,EAC3B,SAAS,EAAC,cAAc,aAExB,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,IAC5B,EACP,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,cAAc,EAAE,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Ae,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Tabs, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\ntype TabValues = '0' | '1' | '2';\n\nconst Component = () => {\n const [underlineValue, setUnderlineValue] = useState<TabValues>('0');\n const [filledValue, setFilledValue] = useState<TabValues>('0');\n\n return (\n <div className=\"n-flex n-gap-token-8\">\n <div className=\"n-flex n-flex-col n-gap-token-32\">\n <Typography variant=\"label\">Underline (Default)</Typography>\n <div>\n <Tabs\n value={underlineValue}\n onChange={setUnderlineValue}\n className=\"n-mb-token-8\"\n >\n <Tabs.Tab id=\"0\">Tab 1</Tabs.Tab>\n <Tabs.Tab id=\"1\">Tab 2</Tabs.Tab>\n <Tabs.Tab id=\"2\">Tab 3</Tabs.Tab>\n </Tabs>\n <Tabs.TabPanel value={underlineValue} tabId={'0'}>\n <Typography variant=\"body-medium\">Tab 1 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={underlineValue} tabId={'1'}>\n <Typography variant=\"body-medium\">Tab 2 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={underlineValue} tabId={'2'}>\n <Typography variant=\"body-medium\">Tab 3 content</Typography>\n </Tabs.TabPanel>\n </div>\n </div>\n\n <div className=\"n-flex n-flex-col n-gap-token-8\">\n <Typography variant=\"label\">Filled</Typography>\n <div>\n <Tabs\n value={filledValue}\n onChange={setFilledValue}\n fill=\"filled\"\n className=\"n-mb-token-8\"\n >\n <Tabs.Tab id=\"0\">Tab 1</Tabs.Tab>\n <Tabs.Tab id=\"1\">Tab 2</Tabs.Tab>\n <Tabs.Tab id=\"2\">Tab 3</Tabs.Tab>\n </Tabs>\n <Tabs.TabPanel value={filledValue} tabId={'0'}>\n <Typography variant=\"body-medium\">Tab 1 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={filledValue} tabId={'1'}>\n <Typography variant=\"body-medium\">Tab 2 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={filledValue} tabId={'2'}>\n <Typography variant=\"body-medium\">Tab 3 content</Typography>\n </Tabs.TabPanel>\n </div>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"tabs-fill-variants.story.js","sourceRoot":"","sources":["../../../../src/tabs/stories/tabs-fill-variants.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAY,GAAG,CAAC,CAAC;IACrE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAY,GAAG,CAAC,CAAC;IAE/D,OAAO,CACL,eAAK,SAAS,EAAC,sBAAsB,aACnC,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,oCAAiC,EAC5D,0BACE,MAAC,IAAI,IACH,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,iBAAiB,EAC3B,SAAS,EAAC,cAAc,aAExB,KAAC,IAAI,CA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AU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAC,GAAG,YAC1C,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,IACZ,IACF,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Tabs, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\ntype TabValues = '0' | '1' | '2';\n\nconst Component = () => {\n const [underlineValue, setUnderlineValue] = useState<TabValues>('0');\n const [filledValue, setFilledValue] = useState<TabValues>('0');\n\n return (\n <div className=\"n-flex n-gap-token-8\">\n <div className=\"n-flex n-flex-col n-gap-token-32\">\n <Typography variant=\"label\">Underline (Default)</Typography>\n <div>\n <Tabs\n value={underlineValue}\n onChange={setUnderlineValue}\n className=\"n-mb-token-8\"\n >\n <Tabs.Tab id=\"0\">Tab 1</Tabs.Tab>\n <Tabs.Tab id=\"1\">Tab 2</Tabs.Tab>\n <Tabs.Tab id=\"2\">Tab 3</Tabs.Tab>\n </Tabs>\n <Tabs.TabPanel value={underlineValue} tabId=\"0\">\n <Typography variant=\"body-medium\">Tab 1 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={underlineValue} tabId=\"1\">\n <Typography variant=\"body-medium\">Tab 2 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={underlineValue} tabId=\"2\">\n <Typography variant=\"body-medium\">Tab 3 content</Typography>\n </Tabs.TabPanel>\n </div>\n </div>\n\n <div className=\"n-flex n-flex-col n-gap-token-8\">\n <Typography variant=\"label\">Filled</Typography>\n <div>\n <Tabs\n value={filledValue}\n onChange={setFilledValue}\n fill=\"filled\"\n className=\"n-mb-token-8\"\n >\n <Tabs.Tab id=\"0\">Tab 1</Tabs.Tab>\n <Tabs.Tab id=\"1\">Tab 2</Tabs.Tab>\n <Tabs.Tab id=\"2\">Tab 3</Tabs.Tab>\n </Tabs>\n <Tabs.TabPanel value={filledValue} tabId=\"0\">\n <Typography variant=\"body-medium\">Tab 1 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={filledValue} tabId=\"1\">\n <Typography variant=\"body-medium\">Tab 2 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={filledValue} tabId=\"2\">\n <Typography variant=\"body-medium\">Tab 3 content</Typography>\n </Tabs.TabPanel>\n </div>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -24,7 +24,7 @@ import { Tabs, Typography } from '@neo4j-ndl/react';
24
24
  import { useState } from 'react';
25
25
  const Component = () => {
26
26
  const [value, setValue] = useState('0');
27
- return (_jsxs("div", { className: "n-w-80", children: [_jsxs(Tabs, { value: value, onChange: setValue, className: "n-mb-token-8", children: [_jsx(Tabs.Tab, { id: "0", children: "Tab 1" }), _jsx(Tabs.Tab, { id: "1", children: "Tab 2" }), _jsx(Tabs.Tab, { id: "2", children: "Tab 3" }), _jsx(Tabs.Tab, { id: "3", children: "Tab 4" }), _jsx(Tabs.Tab, { id: "4", children: "Tab 5" }), _jsx(Tabs.Tab, { id: "5", children: "Tab 6" }), _jsx(Tabs.Tab, { id: "6", children: "Tab 7" }), _jsx(Tabs.Tab, { id: "7", children: "Tab 8" }), _jsx(Tabs.Tab, { id: "8", children: "Tab 9" }), _jsx(Tabs.Tab, { id: "9", children: "Tab 10" })] }), _jsx(Tabs.TabPanel, { value: value, tabId: '0', children: _jsx(Typography, { variant: "body-medium", children: "Tab 1 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: '1', children: _jsx(Typography, { variant: "body-medium", children: "Tab 2 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: '2', children: _jsx(Typography, { variant: "body-medium", children: "Tab 3 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: '3', children: _jsx(Typography, { variant: "body-medium", children: "Tab 4 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: '4', children: _jsx(Typography, { variant: "body-medium", children: "Tab 5 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: '5', children: _jsx(Typography, { variant: "body-medium", children: "Tab 6 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: '6', children: _jsx(Typography, { variant: "body-medium", children: "Tab 7 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: '7', children: _jsx(Typography, { variant: "body-medium", children: "Tab 8 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: '8', children: _jsx(Typography, { variant: "body-medium", children: "Tab 9 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: '9', children: _jsx(Typography, { variant: "body-medium", children: "Tab 10 content" }) })] }));
27
+ return (_jsxs("div", { className: "n-w-80", children: [_jsxs(Tabs, { value: value, onChange: setValue, className: "n-mb-token-8", children: [_jsx(Tabs.Tab, { id: "0", children: "Tab 1" }), _jsx(Tabs.Tab, { id: "1", children: "Tab 2" }), _jsx(Tabs.Tab, { id: "2", children: "Tab 3" }), _jsx(Tabs.Tab, { id: "3", children: "Tab 4" }), _jsx(Tabs.Tab, { id: "4", children: "Tab 5" }), _jsx(Tabs.Tab, { id: "5", children: "Tab 6" }), _jsx(Tabs.Tab, { id: "6", children: "Tab 7" }), _jsx(Tabs.Tab, { id: "7", children: "Tab 8" }), _jsx(Tabs.Tab, { id: "8", children: "Tab 9" }), _jsx(Tabs.Tab, { id: "9", children: "Tab 10" })] }), _jsx(Tabs.TabPanel, { value: value, tabId: "0", children: _jsx(Typography, { variant: "body-medium", children: "Tab 1 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: "1", children: _jsx(Typography, { variant: "body-medium", children: "Tab 2 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: "2", children: _jsx(Typography, { variant: "body-medium", children: "Tab 3 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: "3", children: _jsx(Typography, { variant: "body-medium", children: "Tab 4 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: "4", children: _jsx(Typography, { variant: "body-medium", children: "Tab 5 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: "5", children: _jsx(Typography, { variant: "body-medium", children: "Tab 6 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: "6", children: _jsx(Typography, { variant: "body-medium", children: "Tab 7 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: "7", children: _jsx(Typography, { variant: "body-medium", children: "Tab 8 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: "8", children: _jsx(Typography, { variant: "body-medium", children: "Tab 9 content" }) }), _jsx(Tabs.TabPanel, { value: value, tabId: "9", children: _jsx(Typography, { variant: "body-medium", children: "Tab 10 content" }) })] }));
28
28
  };
29
29
  export default Component;
30
30
  //# sourceMappingURL=tabs-overflow.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-overflow.story.js","sourceRoot":"","sources":["../../../../src/tabs/stories/tabs-overflow.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAA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Aa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YACrC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YACrC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YACrC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YACrC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YACrC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YACrC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YACrC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,+BAA4B,GAC/C,IACZ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Tabs, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [value, setValue] = useState<string>('0');\n\n return (\n <div className=\"n-w-80\">\n <Tabs value={value} onChange={setValue} className=\"n-mb-token-8\">\n <Tabs.Tab id=\"0\">Tab 1</Tabs.Tab>\n <Tabs.Tab id=\"1\">Tab 2</Tabs.Tab>\n <Tabs.Tab id=\"2\">Tab 3</Tabs.Tab>\n <Tabs.Tab id=\"3\">Tab 4</Tabs.Tab>\n <Tabs.Tab id=\"4\">Tab 5</Tabs.Tab>\n <Tabs.Tab id=\"5\">Tab 6</Tabs.Tab>\n <Tabs.Tab id=\"6\">Tab 7</Tabs.Tab>\n <Tabs.Tab id=\"7\">Tab 8</Tabs.Tab>\n <Tabs.Tab id=\"8\">Tab 9</Tabs.Tab>\n <Tabs.Tab id=\"9\">Tab 10</Tabs.Tab>\n </Tabs>\n <Tabs.TabPanel value={value} tabId={'0'}>\n <Typography variant=\"body-medium\">Tab 1 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId={'1'}>\n <Typography variant=\"body-medium\">Tab 2 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId={'2'}>\n <Typography variant=\"body-medium\">Tab 3 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId={'3'}>\n <Typography variant=\"body-medium\">Tab 4 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId={'4'}>\n <Typography variant=\"body-medium\">Tab 5 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId={'5'}>\n <Typography variant=\"body-medium\">Tab 6 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId={'6'}>\n <Typography variant=\"body-medium\">Tab 7 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId={'7'}>\n <Typography variant=\"body-medium\">Tab 8 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId={'8'}>\n <Typography variant=\"body-medium\">Tab 9 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId={'9'}>\n <Typography variant=\"body-medium\">Tab 10 content</Typography>\n </Tabs.TabPanel>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"tabs-overflow.story.js","sourceRoot":"","sources":["../../../../src/tabs/stories/tabs-overflow.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAS,GAAG,CAAC,CAAC;IAEhD,OAAO,CACL,eAAK,SAAS,EAAC,QAAQ,aACrB,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAC,cAAc,aAC9D,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE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AAC,GAAG,YACpC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC,GAAG,YACpC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC,GAAG,YACpC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8BAA2B,GAC9C,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC,GAAG,YACpC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,+BAA4B,GAC/C,IACZ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Tabs, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [value, setValue] = useState<string>('0');\n\n return (\n <div className=\"n-w-80\">\n <Tabs value={value} onChange={setValue} className=\"n-mb-token-8\">\n <Tabs.Tab id=\"0\">Tab 1</Tabs.Tab>\n <Tabs.Tab id=\"1\">Tab 2</Tabs.Tab>\n <Tabs.Tab id=\"2\">Tab 3</Tabs.Tab>\n <Tabs.Tab id=\"3\">Tab 4</Tabs.Tab>\n <Tabs.Tab id=\"4\">Tab 5</Tabs.Tab>\n <Tabs.Tab id=\"5\">Tab 6</Tabs.Tab>\n <Tabs.Tab id=\"6\">Tab 7</Tabs.Tab>\n <Tabs.Tab id=\"7\">Tab 8</Tabs.Tab>\n <Tabs.Tab id=\"8\">Tab 9</Tabs.Tab>\n <Tabs.Tab id=\"9\">Tab 10</Tabs.Tab>\n </Tabs>\n <Tabs.TabPanel value={value} tabId=\"0\">\n <Typography variant=\"body-medium\">Tab 1 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId=\"1\">\n <Typography variant=\"body-medium\">Tab 2 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId=\"2\">\n <Typography variant=\"body-medium\">Tab 3 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId=\"3\">\n <Typography variant=\"body-medium\">Tab 4 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId=\"4\">\n <Typography variant=\"body-medium\">Tab 5 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId=\"5\">\n <Typography variant=\"body-medium\">Tab 6 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId=\"6\">\n <Typography variant=\"body-medium\">Tab 7 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId=\"7\">\n <Typography variant=\"body-medium\">Tab 8 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId=\"8\">\n <Typography variant=\"body-medium\">Tab 9 content</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={value} tabId=\"9\">\n <Typography variant=\"body-medium\">Tab 10 content</Typography>\n </Tabs.TabPanel>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -25,7 +25,7 @@ import { useState } from 'react';
25
25
  const Component = () => {
26
26
  const [smallValue, setSmallValue] = useState('0');
27
27
  const [largeValue, setLargeValue] = useState('0');
28
- return (_jsxs("div", { className: "n-flex n-gap-token-8", children: [_jsxs("div", { className: "n-flex n-flex-col n-gap-token-8", children: [_jsx(Typography, { variant: "label", children: "Small Size" }), _jsxs("div", { className: "n-w-fit", children: [_jsxs(Tabs, { value: smallValue, onChange: setSmallValue, size: "small", className: "n-mb-token-8", children: [_jsx(Tabs.Tab, { id: "0", children: "Tab 1" }), _jsx(Tabs.Tab, { id: "1", children: "Tab 2" }), _jsx(Tabs.Tab, { id: "2", children: "Tab 3" })] }), _jsx(Tabs.TabPanel, { value: smallValue, tabId: '0', children: _jsx(Typography, { variant: "body-small", children: "Content for small tab 1" }) }), _jsx(Tabs.TabPanel, { value: smallValue, tabId: '1', children: _jsx(Typography, { variant: "body-small", children: "Content for small tab 2" }) }), _jsx(Tabs.TabPanel, { value: smallValue, tabId: '2', children: _jsx(Typography, { variant: "body-small", children: "Content for small tab 3" }) })] })] }), _jsxs("div", { className: "n-flex n-flex-col n-gap-token-8", children: [_jsx(Typography, { variant: "label", children: "Large Size (Default)" }), _jsxs(Tabs, { value: largeValue, onChange: setLargeValue, size: "large", className: "n-mb-token-8", children: [_jsx(Tabs.Tab, { id: "0", children: "Tab 1" }), _jsx(Tabs.Tab, { id: "1", children: "Tab 2" }), _jsx(Tabs.Tab, { id: "2", children: "Tab 3" })] }), _jsx(Tabs.TabPanel, { value: largeValue, tabId: '0', children: _jsx(Typography, { variant: "body-medium", children: "Content for large tab 1" }) }), _jsx(Tabs.TabPanel, { value: largeValue, tabId: '1', children: _jsx(Typography, { variant: "body-medium", children: "Content for large tab 2" }) }), _jsx(Tabs.TabPanel, { value: largeValue, tabId: '2', children: _jsx(Typography, { variant: "body-medium", children: "Content for large tab 3" }) })] })] }));
28
+ return (_jsxs("div", { className: "n-flex n-gap-token-8", children: [_jsxs("div", { className: "n-flex n-flex-col n-gap-token-8", children: [_jsx(Typography, { variant: "label", children: "Small Size" }), _jsxs("div", { className: "n-w-fit", children: [_jsxs(Tabs, { value: smallValue, onChange: setSmallValue, size: "small", className: "n-mb-token-8", children: [_jsx(Tabs.Tab, { id: "0", children: "Tab 1" }), _jsx(Tabs.Tab, { id: "1", children: "Tab 2" }), _jsx(Tabs.Tab, { id: "2", children: "Tab 3" })] }), _jsx(Tabs.TabPanel, { value: smallValue, tabId: "0", children: _jsx(Typography, { variant: "body-small", children: "Content for small tab 1" }) }), _jsx(Tabs.TabPanel, { value: smallValue, tabId: "1", children: _jsx(Typography, { variant: "body-small", children: "Content for small tab 2" }) }), _jsx(Tabs.TabPanel, { value: smallValue, tabId: "2", children: _jsx(Typography, { variant: "body-small", children: "Content for small tab 3" }) })] })] }), _jsxs("div", { className: "n-flex n-flex-col n-gap-token-8", children: [_jsx(Typography, { variant: "label", children: "Large Size (Default)" }), _jsxs(Tabs, { value: largeValue, onChange: setLargeValue, size: "large", className: "n-mb-token-8", children: [_jsx(Tabs.Tab, { id: "0", children: "Tab 1" }), _jsx(Tabs.Tab, { id: "1", children: "Tab 2" }), _jsx(Tabs.Tab, { id: "2", children: "Tab 3" })] }), _jsx(Tabs.TabPanel, { value: largeValue, tabId: "0", children: _jsx(Typography, { variant: "body-medium", children: "Content for large tab 1" }) }), _jsx(Tabs.TabPanel, { value: largeValue, tabId: "1", children: _jsx(Typography, { variant: "body-medium", children: "Content for large tab 2" }) }), _jsx(Tabs.TabPanel, { value: largeValue, tabId: "2", children: _jsx(Typography, { variant: "body-medium", children: "Content for large tab 3" }) })] })] }));
29
29
  };
30
30
  export default Component;
31
31
  //# sourceMappingURL=tabs-sizes.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-sizes.story.js","sourceRoot":"","sources":["../../../../src/tabs/stories/tabs-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,Q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,UAAU,EACjB,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,cAAc,aAExB,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,IAC5B,EACP,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,YAC1C,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,wCAAqC,GACxD,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,YAC1C,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,wCAAqC,GACxD,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,YAC1C,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,wCAAqC,GACxD,IACZ,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Tabs, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\ntype TabValues = '0' | '1' | '2';\n\nconst Component = () => {\n const [smallValue, setSmallValue] = useState<TabValues>('0');\n const [largeValue, setLargeValue] = useState<TabValues>('0');\n\n return (\n <div className=\"n-flex n-gap-token-8\">\n <div className=\"n-flex n-flex-col n-gap-token-8\">\n <Typography variant=\"label\">Small Size</Typography>\n <div className=\"n-w-fit\">\n <Tabs\n value={smallValue}\n onChange={setSmallValue}\n size=\"small\"\n className=\"n-mb-token-8\"\n >\n <Tabs.Tab id=\"0\">Tab 1</Tabs.Tab>\n <Tabs.Tab id=\"1\">Tab 2</Tabs.Tab>\n <Tabs.Tab id=\"2\">Tab 3</Tabs.Tab>\n </Tabs>\n <Tabs.TabPanel value={smallValue} tabId={'0'}>\n <Typography variant=\"body-small\">\n Content for small tab 1\n </Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={smallValue} tabId={'1'}>\n <Typography variant=\"body-small\">\n Content for small tab 2\n </Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={smallValue} tabId={'2'}>\n <Typography variant=\"body-small\">\n Content for small tab 3\n </Typography>\n </Tabs.TabPanel>\n </div>\n </div>\n\n <div className=\"n-flex n-flex-col n-gap-token-8\">\n <Typography variant=\"label\">Large Size (Default)</Typography>\n <Tabs\n value={largeValue}\n onChange={setLargeValue}\n size=\"large\"\n className=\"n-mb-token-8\"\n >\n <Tabs.Tab id=\"0\">Tab 1</Tabs.Tab>\n <Tabs.Tab id=\"1\">Tab 2</Tabs.Tab>\n <Tabs.Tab id=\"2\">Tab 3</Tabs.Tab>\n </Tabs>\n <Tabs.TabPanel value={largeValue} tabId={'0'}>\n <Typography variant=\"body-medium\">Content for large tab 1</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={largeValue} tabId={'1'}>\n <Typography variant=\"body-medium\">Content for large tab 2</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={largeValue} tabId={'2'}>\n <Typography variant=\"body-medium\">Content for large tab 3</Typography>\n </Tabs.TabPanel>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"tabs-sizes.story.js","sourceRoot":"","sources":["../../../../src/tabs/stories/tabs-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAY,GAAG,CAAC,CAAC;IAC7D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAY,GAAG,CAAC,CAAC;IAE7D,OAAO,CACL,eAAK,SAAS,EAAC,sBAAsB,aACnC,eAAK,SAAS,EAAC,iCAAiC,aAC9C,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,2BAAwB,EACnD,eAAK,SAAS,EAAC,SAAS,aACtB,MAAC,IAAI,IACH,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,cAAc,aAExB,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,IAC5B,EACP,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAC,GAAG,YACzC,KAAC,UAAU,IAAC,OAAO,EAAC,YAAY,wCAEnB,GACC,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAC,GAAG,YACzC,KAAC,UAAU,IAAC,OAAO,EAAC,YAAY,wCAEnB,GACC,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAC,GAAG,YACzC,KAAC,UAAU,IAAC,OAAO,EAAC,YAAY,wCAEnB,GACC,IACZ,IACF,EAEN,eAAK,SAAS,EAAC,iCAAiC,aAC9C,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,qCAAkC,EAC7D,MAAC,IAAI,IACH,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,cAAc,aAExB,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,EACjC,KAAC,IAAI,CAAC,GAAG,IAAC,EAAE,EAAC,GAAG,sBAAiB,IAC5B,EACP,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAC,GAAG,YACzC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,wCAAqC,GACxD,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAC,GAAG,YACzC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,wCAAqC,GACxD,EAChB,KAAC,IAAI,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAC,GAAG,YACzC,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,wCAAqC,GACxD,IACZ,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Tabs, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\ntype TabValues = '0' | '1' | '2';\n\nconst Component = () => {\n const [smallValue, setSmallValue] = useState<TabValues>('0');\n const [largeValue, setLargeValue] = useState<TabValues>('0');\n\n return (\n <div className=\"n-flex n-gap-token-8\">\n <div className=\"n-flex n-flex-col n-gap-token-8\">\n <Typography variant=\"label\">Small Size</Typography>\n <div className=\"n-w-fit\">\n <Tabs\n value={smallValue}\n onChange={setSmallValue}\n size=\"small\"\n className=\"n-mb-token-8\"\n >\n <Tabs.Tab id=\"0\">Tab 1</Tabs.Tab>\n <Tabs.Tab id=\"1\">Tab 2</Tabs.Tab>\n <Tabs.Tab id=\"2\">Tab 3</Tabs.Tab>\n </Tabs>\n <Tabs.TabPanel value={smallValue} tabId=\"0\">\n <Typography variant=\"body-small\">\n Content for small tab 1\n </Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={smallValue} tabId=\"1\">\n <Typography variant=\"body-small\">\n Content for small tab 2\n </Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={smallValue} tabId=\"2\">\n <Typography variant=\"body-small\">\n Content for small tab 3\n </Typography>\n </Tabs.TabPanel>\n </div>\n </div>\n\n <div className=\"n-flex n-flex-col n-gap-token-8\">\n <Typography variant=\"label\">Large Size (Default)</Typography>\n <Tabs\n value={largeValue}\n onChange={setLargeValue}\n size=\"large\"\n className=\"n-mb-token-8\"\n >\n <Tabs.Tab id=\"0\">Tab 1</Tabs.Tab>\n <Tabs.Tab id=\"1\">Tab 2</Tabs.Tab>\n <Tabs.Tab id=\"2\">Tab 3</Tabs.Tab>\n </Tabs>\n <Tabs.TabPanel value={largeValue} tabId=\"0\">\n <Typography variant=\"body-medium\">Content for large tab 1</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={largeValue} tabId=\"1\">\n <Typography variant=\"body-medium\">Content for large tab 2</Typography>\n </Tabs.TabPanel>\n <Tabs.TabPanel value={largeValue} tabId=\"2\">\n <Typography variant=\"body-medium\">Content for large tab 3</Typography>\n </Tabs.TabPanel>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -27,8 +27,9 @@ export const useTabsScrollOverflow = (scrollContainerRef) => {
27
27
  });
28
28
  const checkOverflow = useCallback(() => {
29
29
  const scrollContainer = scrollContainerRef.current;
30
- if (!scrollContainer)
30
+ if (!scrollContainer) {
31
31
  return;
32
+ }
32
33
  const { scrollLeft, scrollWidth, clientWidth } = scrollContainer;
33
34
  const tolerance = 1;
34
35
  setScrollState({
@@ -38,11 +39,13 @@ export const useTabsScrollOverflow = (scrollContainerRef) => {
38
39
  }, [scrollContainerRef]);
39
40
  const scrollToNextItem = useCallback((direction) => {
40
41
  const scrollContainer = scrollContainerRef.current;
41
- if (!scrollContainer)
42
+ if (!scrollContainer) {
42
43
  return;
44
+ }
43
45
  const tabs = Array.from(scrollContainer.querySelectorAll('.ndl-tab'));
44
- if (tabs.length === 0)
46
+ if (tabs.length === 0) {
45
47
  return;
48
+ }
46
49
  const containerRect = scrollContainer.getBoundingClientRect();
47
50
  const containerCenter = containerRect.left + containerRect.width / 2;
48
51
  let targetTab = null;
@@ -78,8 +81,9 @@ export const useTabsScrollOverflow = (scrollContainerRef) => {
78
81
  // Consolidated effect for all scroll-related event listeners
79
82
  useEffect(() => {
80
83
  const scrollContainer = scrollContainerRef.current;
81
- if (!scrollContainer)
84
+ if (!scrollContainer) {
82
85
  return;
86
+ }
83
87
  const handleScroll = () => checkOverflow();
84
88
  const resizeObserver = new ResizeObserver(() => checkOverflow());
85
89
  scrollContainer.addEventListener('scroll', handleScroll);
@@ -1 +1 @@
1
- {"version":3,"file":"use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ACb,MAAM,eAAe,GAAG,kBAAkB,CAAC,OAAO,CAAC;QACnD,IAAI,CAAC,eAAe;YAAE,OAAO;QAE7B,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,aAAa,EAAE,CAAC;QAC3C,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,GAAG,EAAE,CAAC,aAAa,EAAE,CAAC,CAAC;QAEjE,eAAe,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QACzD,cAAc,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QAExC,gBAAgB;QAChB,aAAa,EAAE,CAAC;QAEhB,OAAO,GAAG,EAAE;YACV,eAAe,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;YAC5D,cAAc,CAAC,UAAU,EAAE,CAAC;QAC9B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAExC,OAAO;QACL,aAAa;QACb,WAAW;QACX,gBAAgB;KACjB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { useCallback, useEffect, useState } from 'react';\n\n// Custom hook for managing scroll overflow behavior\nexport const useTabsScrollOverflow = (\n scrollContainerRef: React.RefObject<HTMLDivElement | null>,\n) => {\n const [scrollState, setScrollState] = useState({\n isLeftVisible: false,\n isRightVisible: false,\n });\n\n const checkOverflow = useCallback(() => {\n const scrollContainer = scrollContainerRef.current;\n if (!scrollContainer) return;\n\n const { scrollLeft, scrollWidth, clientWidth } = scrollContainer;\n const tolerance = 1;\n\n setScrollState({\n isLeftVisible: scrollLeft > 0,\n isRightVisible: scrollLeft < scrollWidth - clientWidth - tolerance,\n });\n }, [scrollContainerRef]);\n\n const scrollToNextItem = useCallback(\n (direction: 'left' | 'right') => {\n const scrollContainer = scrollContainerRef.current;\n if (!scrollContainer) return;\n\n const tabs = Array.from(\n scrollContainer.querySelectorAll('.ndl-tab'),\n ) as HTMLElement[];\n if (tabs.length === 0) return;\n\n const containerRect = scrollContainer.getBoundingClientRect();\n const containerCenter = containerRect.left + containerRect.width / 2;\n\n let targetTab: HTMLElement | null = null;\n\n if (direction === 'right') {\n for (const tab of tabs) {\n const tabRect = tab.getBoundingClientRect();\n if (tabRect.right > containerRect.right) {\n targetTab = tab;\n break;\n }\n }\n } else {\n for (let i = tabs.length - 1; i >= 0; i--) {\n const tab = tabs[i];\n const tabRect = tab.getBoundingClientRect();\n if (tabRect.left < containerRect.left) {\n targetTab = tab;\n break;\n }\n }\n }\n\n if (targetTab) {\n const tabRect = targetTab.getBoundingClientRect();\n const scrollLeft = scrollContainer.scrollLeft;\n const targetScrollLeft =\n scrollLeft + (tabRect.left - containerCenter + tabRect.width / 2);\n\n scrollContainer.scrollTo({\n behavior: 'smooth',\n left: targetScrollLeft,\n });\n }\n },\n [scrollContainerRef],\n );\n\n // Consolidated effect for all scroll-related event listeners\n useEffect(() => {\n const scrollContainer = scrollContainerRef.current;\n if (!scrollContainer) return;\n\n const handleScroll = () => checkOverflow();\n const resizeObserver = new ResizeObserver(() => checkOverflow());\n\n scrollContainer.addEventListener('scroll', handleScroll);\n resizeObserver.observe(scrollContainer);\n\n // Initial check\n checkOverflow();\n\n return () => {\n scrollContainer.removeEventListener('scroll', handleScroll);\n resizeObserver.disconnect();\n };\n }, [checkOverflow, scrollContainerRef]);\n\n return {\n checkOverflow,\n scrollState,\n scrollToNextItem,\n };\n};\n"]}
1
+ {"version":3,"file":"use-tabs-scroll-overflow.js","sourceRoot":"","sources":["../../../src/tabs/use-tabs-scroll-overflow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzD,oDAAoD;AACpD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,kBAA0D,EAC1D,EAAE;IACF,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC;QAC7C,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,KAAK;KACtB,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,EAAE;QACrC,MAAM,eAAe,GAAG,kBAAkB,CAAC,OAAO,CAAC;QACnD,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,OAAO;QACT,CAAC;QAED,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,eAAe,CAAC;QACjE,MAAM,SAAS,GAAG,CAAC,CAAC;QAEpB,cAAc,CAAC;YACb,aAAa,EAAE,UAAU,GAAG,CAAC;YAC7B,cAAc,EAAE,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS;SACnE,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAEzB,MAAM,gBAAgB,GAAG,WAAW,CAClC,CAAC,SAA2B,EAAE,EAAE;QAC9B,MAAM,eAAe,GAAG,kBAAkB,CAAC,OAAO,CAAC;QACnD,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,OAAO;QACT,CAAC;QAED,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CACrB,eAAe,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAC5B,CAAC;QACnB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO;QACT,C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,CAAC;IACH,CAAC,EACD,CAAC,kBAAkB,CAAC,CACrB,CAAC;IAEF,6DAA6D;IAC7D,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,eAAe,GAAG,kBAAkB,CAAC,OAAO,CAAC;QACnD,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,OAAO;QACT,CAAC;QAED,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,aAAa,EAAE,CAAC;QAC3C,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,GAAG,EAAE,CAAC,aAAa,EAAE,CAAC,CAAC;QAEjE,eAAe,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QACzD,cAAc,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QAExC,gBAAgB;QAChB,aAAa,EAAE,CAAC;QAEhB,OAAO,GAAG,EAAE;YACV,eAAe,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;YAC5D,cAAc,CAAC,UAAU,EAAE,CAAC;QAC9B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAExC,OAAO;QACL,aAAa;QACb,WAAW;QACX,gBAAgB;KACjB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { useCallback, useEffect, useState } from 'react';\n\n// Custom hook for managing scroll overflow behavior\nexport const useTabsScrollOverflow = (\n scrollContainerRef: React.RefObject<HTMLDivElement | null>,\n) => {\n const [scrollState, setScrollState] = useState({\n isLeftVisible: false,\n isRightVisible: false,\n });\n\n const checkOverflow = useCallback(() => {\n const scrollContainer = scrollContainerRef.current;\n if (!scrollContainer) {\n return;\n }\n\n const { scrollLeft, scrollWidth, clientWidth } = scrollContainer;\n const tolerance = 1;\n\n setScrollState({\n isLeftVisible: scrollLeft > 0,\n isRightVisible: scrollLeft < scrollWidth - clientWidth - tolerance,\n });\n }, [scrollContainerRef]);\n\n const scrollToNextItem = useCallback(\n (direction: 'left' | 'right') => {\n const scrollContainer = scrollContainerRef.current;\n if (!scrollContainer) {\n return;\n }\n\n const tabs = Array.from(\n scrollContainer.querySelectorAll('.ndl-tab'),\n ) as HTMLElement[];\n if (tabs.length === 0) {\n return;\n }\n\n const containerRect = scrollContainer.getBoundingClientRect();\n const containerCenter = containerRect.left + containerRect.width / 2;\n\n let targetTab: HTMLElement | null = null;\n\n if (direction === 'right') {\n for (const tab of tabs) {\n const tabRect = tab.getBoundingClientRect();\n if (tabRect.right > containerRect.right) {\n targetTab = tab;\n break;\n }\n }\n } else {\n for (let i = tabs.length - 1; i >= 0; i--) {\n const tab = tabs[i];\n const tabRect = tab.getBoundingClientRect();\n if (tabRect.left < containerRect.left) {\n targetTab = tab;\n break;\n }\n }\n }\n\n if (targetTab) {\n const tabRect = targetTab.getBoundingClientRect();\n const scrollLeft = scrollContainer.scrollLeft;\n const targetScrollLeft =\n scrollLeft + (tabRect.left - containerCenter + tabRect.width / 2);\n\n scrollContainer.scrollTo({\n behavior: 'smooth',\n left: targetScrollLeft,\n });\n }\n },\n [scrollContainerRef],\n );\n\n // Consolidated effect for all scroll-related event listeners\n useEffect(() => {\n const scrollContainer = scrollContainerRef.current;\n if (!scrollContainer) {\n return;\n }\n\n const handleScroll = () => checkOverflow();\n const resizeObserver = new ResizeObserver(() => checkOverflow());\n\n scrollContainer.addEventListener('scroll', handleScroll);\n resizeObserver.observe(scrollContainer);\n\n // Initial check\n checkOverflow();\n\n return () => {\n scrollContainer.removeEventListener('scroll', handleScroll);\n resizeObserver.disconnect();\n };\n }, [checkOverflow, scrollContainerRef]);\n\n return {\n checkOverflow,\n scrollState,\n scrollToNextItem,\n };\n};\n"]}
@@ -1,3 +1,14 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
13
  /**
3
14
  *
@@ -26,13 +37,14 @@ import { XMarkIconOutline } from '../icons';
26
37
  * Tag component is a small visual element that represents a tag.
27
38
  * A tag is always removable. If you want a non removable tag, use the StatusLabel component instead.
28
39
  */
29
- export const Tag = ({ children, type = 'default', size = 'medium', onClick, className, style, htmlAttributes, ref, }) => {
40
+ export const Tag = (_a) => {
41
+ var { children, type = 'default', size = 'medium', onClick, className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["children", "type", "size", "onClick", "className", "style", "htmlAttributes", "ref"]);
30
42
  const classes = classNames(`ndl-tag`, className, {
31
43
  'ndl-destructive': type === 'destructive',
32
44
  'ndl-small': size === 'small',
33
45
  'ndl-medium': size === 'medium',
34
46
  'ndl-large': size === 'large',
35
47
  });
36
- return (_jsxs("div", Object.assign({ className: classes, ref: ref, style: style }, htmlAttributes, { children: [_jsx(ConditionalWrap, { shouldWrap: type === 'destructive', wrap: (children) => (_jsx("button", { type: "button", onClick: onClick, children: children })), children: _jsx("span", { className: "ndl-tag-content", children: children }) }), type !== 'destructive' && (_jsx("button", { type: "button", className: "ndl-remove-icon", onClick: onClick, "aria-label": "Remove tag", children: _jsx(XMarkIconOutline, {}) }))] })));
48
+ return (_jsxs("div", Object.assign({ className: classes, ref: ref, style: style }, restProps, htmlAttributes, { children: [_jsx(ConditionalWrap, { shouldWrap: type === 'destructive', wrap: (children) => (_jsx("button", { type: "button", onClick: onClick, children: children })), children: _jsx("span", { className: "ndl-tag-content", children: children }) }), type !== 'destructive' && (_jsx("button", { type: "button", className: "ndl-remove-icon", onClick: onClick, "aria-label": "Remove tag", children: _jsx(XMarkIconOutline, {}) }))] })));
37
49
  };
38
50
  //# sourceMappingURL=Tag.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/tag/Tag.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAIpC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAa5C;;;GAGG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,EAClB,QAAQ,EACR,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,QAAQ,EACf,OAAO,EACP,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,GAC0B,EAAE,EAAE;IACjC,MAAM,OAAO,GAAG,UAAU,CAAC,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,6BAAK,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,IAAM,cAAc,eACjE,KAAC,eAAe,IACd,UAAU,EAAE,IAAI,KAAK,aAAa,EAClC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAClB,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YACnC,QAAQ,GACF,CACV,YAED,eAAM,SAAS,EAAC,iBAAiB,YAAE,QAAQ,GAAQ,GACnC,EACjB,IAAI,KAAK,aAAa,IAAI,CACzB,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAE,OAAO,gBACL,YAAY,YAEvB,KAAC,gBAAgB,KAAG,GACb,CACV,KACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type 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}: 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 className={classes} ref={ref} style={style} {...htmlAttributes}>\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,OAAO,UAAU,MAAM,YAAY,CAAC;AAIpC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAa5C;;;GAGG;AACH,MAAM,CAAC,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,UAAU,CAAC,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,6BACE,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,eAElB,KAAC,eAAe,IACd,UAAU,EAAE,IAAI,KAAK,aAAa,EAClC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAClB,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YACnC,QAAQ,GACF,CACV,YAED,eAAM,SAAS,EAAC,iBAAiB,YAAE,QAAQ,GAAQ,GACnC,EACjB,IAAI,KAAK,aAAa,IAAI,CACzB,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAE,OAAO,gBACL,YAAY,YAEvB,KAAC,gBAAgB,KAAG,GACb,CACV,KACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type 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,3 +1,14 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
13
  /**
3
14
  *
@@ -32,7 +43,8 @@ import { Tooltip } from '../tooltip';
32
43
  *
33
44
  *
34
45
  */
35
- export const TextArea = ({ label, isFluid = false, errorText, helpText, isOptional = false, moreInformationText, size = 'medium', ariaLabel: ariaLabel, tooltipProps, isDisabled = false, className, isReadOnly = false, style, value, placeholder, htmlAttributes, ref, }) => {
46
+ export const TextArea = (_a) => {
47
+ var { label, isFluid = false, errorText, helpText, isOptional = false, moreInformationText, size = 'medium', ariaLabel, tooltipProps, isDisabled = false, className, isReadOnly = false, style, value, placeholder, htmlAttributes, ref } = _a, restProps = __rest(_a, ["label", "isFluid", "errorText", "helpText", "isOptional", "moreInformationText", "size", "ariaLabel", "tooltipProps", "isDisabled", "className", "isReadOnly", "style", "value", "placeholder", "htmlAttributes", "ref"]);
36
48
  const containerWrappingClasses = classNames(`ndl-text-area ndl-type-text`, className, {
37
49
  'ndl-disabled': isDisabled,
38
50
  'ndl-small': size === 'small',
@@ -61,6 +73,6 @@ export const TextArea = ({ label, isFluid = false, errorText, helpText, isOption
61
73
  'ndl-information-icon-small': size === 'small' || size === 'medium',
62
74
  'ndl-information-icon-large': size === 'large',
63
75
  });
64
- return (_jsxs("div", { className: containerWrappingClasses, children: [_jsxs("label", { className: labelWrappingClasses, children: [_jsx("div", { className: "ndl-text-area-wrapper", children: _jsx("textarea", Object.assign({ disabled: isDisabled, ref: ref, "aria-label": ariaLabel, readOnly: isReadOnly, value: value, placeholder: placeholder, style: style }, htmlAttributes)) }), !hasEmptyLabelValue && (_jsxs("div", { className: "ndl-text-area-wrapper", children: [_jsx("span", { className: "ndl-text-area-label-text", children: label }), Boolean(moreInformationText) && (_jsxs(Tooltip, Object.assign({ type: "simple" }, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.root, { children: [_jsx(Tooltip.Trigger, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.trigger, { children: _jsx("div", { className: informationIconClasses, "data-testid": "ndl-information-icon", children: _jsx(InformationCircleIconOutline, {}) }) })), _jsx(Tooltip.Content, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.content, { children: moreInformationText }))] }))), isOptional && (_jsx("span", { className: "ndl-text-area-optional", children: "Optional" }))] }))] }), helpText && !errorText && (_jsx("div", { className: "ndl-text-area-msg", children: helpText })), errorText && (_jsxs("div", { className: "ndl-text-area-msg", children: [_jsx("div", { className: "ndl-error-icon", children: _jsx(ExclamationCircleIconSolid, {}) }), _jsx("div", { className: "ndl-error-text", children: errorText })] }))] }));
76
+ return (_jsxs("div", { className: containerWrappingClasses, children: [_jsxs("label", { className: labelWrappingClasses, children: [_jsx("div", { className: "ndl-text-area-wrapper", children: _jsx("textarea", Object.assign({ disabled: isDisabled, ref: ref, "aria-label": ariaLabel, readOnly: isReadOnly, value: value, placeholder: placeholder, style: style }, restProps, htmlAttributes)) }), !hasEmptyLabelValue && (_jsxs("div", { className: "ndl-text-area-wrapper", children: [_jsx("span", { className: "ndl-text-area-label-text", children: label }), Boolean(moreInformationText) && (_jsxs(Tooltip, Object.assign({ type: "simple" }, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.root, { children: [_jsx(Tooltip.Trigger, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.trigger, { children: _jsx("div", { className: informationIconClasses, "data-testid": "ndl-information-icon", children: _jsx(InformationCircleIconOutline, {}) }) })), _jsx(Tooltip.Content, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.content, { children: moreInformationText }))] }))), isOptional && (_jsx("span", { className: "ndl-text-area-optional", children: "Optional" }))] }))] }), helpText && !errorText && (_jsx("div", { className: "ndl-text-area-msg", children: helpText })), errorText && (_jsxs("div", { className: "ndl-text-area-msg", children: [_jsx("div", { className: "ndl-error-icon", children: _jsx(ExclamationCircleIconSolid, {}) }), _jsx("div", { className: "ndl-error-text", children: errorText })] }))] }));
65
77
  };
66
78
  //# sourceMappingURL=TextArea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../src/text-area/TextArea.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAkB,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAM9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OA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I,CACzB,cAAK,SAAS,EAAC,mBAAmB,YAAE,QAAQ,GAAO,CACpD,EACA,SAAS,IAAI,CACZ,eAAK,SAAS,EAAC,mBAAmB,aAChC,cAAK,SAAS,EAAC,gBAAgB,YAC7B,KAAC,0BAA0B,KAAG,GAC1B,EACN,cAAK,SAAS,EAAC,gBAAgB,YAAE,SAAS,GAAO,IAC7C,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { type ReactNode, useMemo } from 'react';\n\nimport { customLabelAndNoAriaLabelWarningMessage } from '../_common/messages';\nimport {\n type CommonProps,\n type HtmlAttributes,\n type TooltipObjectProps,\n} from '../_common/types';\nimport { needleWarningMessage } from '../_common/utils';\nimport {\n ExclamationCircleIconSolid,\n InformationCircleIconOutline,\n} from '../icons';\nimport { Tooltip } from '../tooltip';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype TextAreaProps = {\n /** The label displayed above the textarea */\n label?: ReactNode;\n\n /** Whether the textarea should take the full available width */\n isFluid?: boolean;\n\n /** Assistive text displayed below the textarea */\n helpText?: string | ReactNode;\n\n /** Error message displayed below the textarea. When provided, it overrides `helpText` and shows an error icon */\n errorText?: string | ReactNode;\n\n /** Size of the textarea */\n size?: 'small' | 'medium' | 'large';\n\n /** Whether to display the Optional label next to the field label */\n isOptional?: boolean;\n\n /** Text displayed in the information tooltip shown next to the label */\n moreInformationText?: React.ReactNode;\n\n /** Props for the Tooltip component used by the information icon */\n tooltipProps?: TooltipObjectProps;\n\n /** Whether the textarea is disabled */\n isDisabled?: boolean;\n\n /** Additional HTML attributes passed to the textarea element */\n htmlAttributes?: HtmlAttributes<'textarea'>;\n\n /** Aria label for accessibility when no visible label is provided */\n ariaLabel?: string;\n\n /** Additional class names */\n className?: string;\n\n /** Additional styles applied to the root element */\n style?: React.CSSProperties;\n\n /** Whether the textarea is read-only */\n isReadOnly?: boolean;\n\n /** The current value of the textarea */\n value?: React.ComponentPropsWithoutRef<'textarea'>['value'];\n\n /** Placeholder text displayed when the textarea is empty */\n placeholder?: React.ComponentPropsWithoutRef<'textarea'>['placeholder'];\n};\n\n/**\n *\n *\n * TextArea Component\n *\n *\n */\n\nexport const TextArea = ({\n label,\n isFluid = false,\n errorText,\n helpText,\n isOptional = false,\n moreInformationText,\n size = 'medium',\n ariaLabel: ariaLabel,\n tooltipProps,\n isDisabled = false,\n className,\n isReadOnly = false,\n style,\n value,\n placeholder,\n htmlAttributes,\n ref,\n}: CommonProps<'textarea', TextAreaProps>) => {\n const containerWrappingClasses = classNames(\n `ndl-text-area ndl-type-text`,\n className,\n {\n 'ndl-disabled': isDisabled,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n 'ndl-has-error': errorText,\n 'ndl-has-trailing-icon': errorText,\n 'ndl-has-icon': errorText,\n },\n );\n\n const hasEmptyLabelValue = !label || label === '';\n\n const labelWrappingClasses = classNames('ndl-text-area-label', {\n 'ndl-fluid': isFluid,\n 'ndl-text-area-no-label': hasEmptyLabelValue,\n });\n\n const isCustomLabel = label && typeof label !== 'string';\n const hasCustomLabelAndNoAriaLabel = isCustomLabel && !ariaLabel;\n\n useMemo(() => {\n if (!label && !ariaLabel) {\n needleWarningMessage(\n 'A TextArea without a label does not have an aria label, be sure to include an aria label for screen readers link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI',\n );\n }\n\n if (hasCustomLabelAndNoAriaLabel) {\n needleWarningMessage(customLabelAndNoAriaLabelWarningMessage);\n }\n }, [label, ariaLabel, hasCustomLabelAndNoAriaLabel]);\n\n const informationIconClasses = classNames({\n 'ndl-information-icon-small': size === 'small' || size === 'medium',\n 'ndl-information-icon-large': size === 'large',\n });\n\n return (\n <div className={containerWrappingClasses}>\n {/* We enable implicit label wrapping */}\n {/* Source: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI */}\n <label className={labelWrappingClasses}>\n <div className=\"ndl-text-area-wrapper\">\n <textarea\n disabled={isDisabled}\n ref={ref}\n aria-label={ariaLabel}\n readOnly={isReadOnly}\n value={value}\n placeholder={placeholder}\n style={style}\n {...htmlAttributes}\n />\n </div>\n {!hasEmptyLabelValue && (\n <div className=\"ndl-text-area-wrapper\">\n <span className=\"ndl-text-area-label-text\">{label}</span>\n {Boolean(moreInformationText) && (\n <Tooltip type=\"simple\" {...tooltipProps?.root}>\n <Tooltip.Trigger {...tooltipProps?.trigger}>\n <div\n className={informationIconClasses}\n data-testid=\"ndl-information-icon\"\n >\n <InformationCircleIconOutline />\n </div>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n {moreInformationText}\n </Tooltip.Content>\n </Tooltip>\n )}\n {isOptional && (\n <span className=\"ndl-text-area-optional\">Optional</span>\n )}\n </div>\n )}\n </label>\n {helpText && !errorText && (\n <div className=\"ndl-text-area-msg\">{helpText}</div>\n )}\n {errorText && (\n <div className=\"ndl-text-area-msg\">\n <div className=\"ndl-error-icon\">\n <ExclamationCircleIconSolid />\n </div>\n <div className=\"ndl-error-text\">{errorText}</div>\n </div>\n )}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../src/text-area/TextArea.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAE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,OAAO,CAAC,OAAO,oBAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,cACvC,mBAAmB,IACJ,KACV,CACX,EACA,UAAU,IAAI,CACb,eAAM,SAAS,EAAC,wBAAwB,yBAAgB,CACzD,IACG,CACP,IACK,EACP,QAAQ,IAAI,CAAC,SAAS,IAAI,CACzB,cAAK,SAAS,EAAC,mBAAmB,YAAE,QAAQ,GAAO,CACpD,EACA,SAAS,IAAI,CACZ,eAAK,SAAS,EAAC,mBAAmB,aAChC,cAAK,SAAS,EAAC,gBAAgB,YAC7B,KAAC,0BAA0B,KAAG,GAC1B,EACN,cAAK,SAAS,EAAC,gBAAgB,YAAE,SAAS,GAAO,IAC7C,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { type ReactNode, useMemo } from 'react';\n\nimport { customLabelAndNoAriaLabelWarningMessage } from '../_common/messages';\nimport {\n type CommonProps,\n type HtmlAttributes,\n type TooltipObjectProps,\n} from '../_common/types';\nimport { needleWarningMessage } from '../_common/utils';\nimport {\n ExclamationCircleIconSolid,\n InformationCircleIconOutline,\n} from '../icons';\nimport { Tooltip } from '../tooltip';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype TextAreaProps = {\n /** The label displayed above the textarea */\n label?: ReactNode;\n\n /** Whether the textarea should take the full available width */\n isFluid?: boolean;\n\n /** Assistive text displayed below the textarea */\n helpText?: string | ReactNode;\n\n /** Error message displayed below the textarea. When provided, it overrides `helpText` and shows an error icon */\n errorText?: string | ReactNode;\n\n /** Size of the textarea */\n size?: 'small' | 'medium' | 'large';\n\n /** Whether to display the Optional label next to the field label */\n isOptional?: boolean;\n\n /** Text displayed in the information tooltip shown next to the label */\n moreInformationText?: React.ReactNode;\n\n /** Props for the Tooltip component used by the information icon */\n tooltipProps?: TooltipObjectProps;\n\n /** Whether the textarea is disabled */\n isDisabled?: boolean;\n\n /** Additional HTML attributes passed to the textarea element */\n htmlAttributes?: HtmlAttributes<'textarea'>;\n\n /** Aria label for accessibility when no visible label is provided */\n ariaLabel?: string;\n\n /** Additional class names */\n className?: string;\n\n /** Additional styles applied to the root element */\n style?: React.CSSProperties;\n\n /** Whether the textarea is read-only */\n isReadOnly?: boolean;\n\n /** The current value of the textarea */\n value?: React.ComponentPropsWithoutRef<'textarea'>['value'];\n\n /** Placeholder text displayed when the textarea is empty */\n placeholder?: React.ComponentPropsWithoutRef<'textarea'>['placeholder'];\n};\n\n/**\n *\n *\n * TextArea Component\n *\n *\n */\n\nexport const TextArea = ({\n label,\n isFluid = false,\n errorText,\n helpText,\n isOptional = false,\n moreInformationText,\n size = 'medium',\n ariaLabel,\n tooltipProps,\n isDisabled = false,\n className,\n isReadOnly = false,\n style,\n value,\n placeholder,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'textarea', TextAreaProps>) => {\n const containerWrappingClasses = classNames(\n `ndl-text-area ndl-type-text`,\n className,\n {\n 'ndl-disabled': isDisabled,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n 'ndl-has-error': errorText,\n 'ndl-has-trailing-icon': errorText,\n 'ndl-has-icon': errorText,\n },\n );\n\n const hasEmptyLabelValue = !label || label === '';\n\n const labelWrappingClasses = classNames('ndl-text-area-label', {\n 'ndl-fluid': isFluid,\n 'ndl-text-area-no-label': hasEmptyLabelValue,\n });\n\n const isCustomLabel = label && typeof label !== 'string';\n const hasCustomLabelAndNoAriaLabel = isCustomLabel && !ariaLabel;\n\n useMemo(() => {\n if (!label && !ariaLabel) {\n needleWarningMessage(\n 'A TextArea without a label does not have an aria label, be sure to include an aria label for screen readers link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI',\n );\n }\n\n if (hasCustomLabelAndNoAriaLabel) {\n needleWarningMessage(customLabelAndNoAriaLabelWarningMessage);\n }\n }, [label, ariaLabel, hasCustomLabelAndNoAriaLabel]);\n\n const informationIconClasses = classNames({\n 'ndl-information-icon-small': size === 'small' || size === 'medium',\n 'ndl-information-icon-large': size === 'large',\n });\n\n return (\n <div className={containerWrappingClasses}>\n {/* We enable implicit label wrapping */}\n {/* Source: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI */}\n <label className={labelWrappingClasses}>\n <div className=\"ndl-text-area-wrapper\">\n <textarea\n disabled={isDisabled}\n ref={ref}\n aria-label={ariaLabel}\n readOnly={isReadOnly}\n value={value}\n placeholder={placeholder}\n style={style}\n {...restProps}\n {...htmlAttributes}\n />\n </div>\n {!hasEmptyLabelValue && (\n <div className=\"ndl-text-area-wrapper\">\n <span className=\"ndl-text-area-label-text\">{label}</span>\n {Boolean(moreInformationText) && (\n <Tooltip type=\"simple\" {...tooltipProps?.root}>\n <Tooltip.Trigger {...tooltipProps?.trigger}>\n <div\n className={informationIconClasses}\n data-testid=\"ndl-information-icon\"\n >\n <InformationCircleIconOutline />\n </div>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n {moreInformationText}\n </Tooltip.Content>\n </Tooltip>\n )}\n {isOptional && (\n <span className=\"ndl-text-area-optional\">Optional</span>\n )}\n </div>\n )}\n </label>\n {helpText && !errorText && (\n <div className=\"ndl-text-area-msg\">{helpText}</div>\n )}\n {errorText && (\n <div className=\"ndl-text-area-msg\">\n <div className=\"ndl-error-icon\">\n <ExclamationCircleIconSolid />\n </div>\n <div className=\"ndl-error-text\">{errorText}</div>\n </div>\n )}\n </div>\n );\n};\n"]}
@@ -21,7 +21,7 @@
21
21
 
22
22
  import { jsx as _jsx } from "react/jsx-runtime";
23
23
  import { TextArea } from '../../index';
24
- import { TextAreaDefault, TextAreaDefaultSrc, TextAreaDisabled, TextAreaDisabledSrc, TextAreaError, TextAreaErrorSrc, TextAreaFluid, TextAreaFluidSrc, TextAreaInformationIcon, TextAreaInformationIconSrc, TextAreaOptional, TextAreaOptionalSrc, TextAreaResizable, TextAreaResizableSrc, TextAreaSizes, TextAreaSizesSrc, } from './';
24
+ import { TextAreaDefault, TextAreaDefaultSrc, TextAreaDisabled, TextAreaDisabledSrc, TextAreaError, TextAreaErrorSrc, TextAreaFluid, TextAreaFluidSrc, TextAreaInformationIcon, TextAreaInformationIconSrc, TextAreaOptional, TextAreaOptionalSrc, TextAreaResizable, TextAreaResizableSrc, TextAreaSizes, TextAreaSizesSrc, } from '.';
25
25
  const componentMeta = {
26
26
  title: 'Components/TextArea',
27
27
  id: 'components-text-area',
@@ -1 +1 @@
1
- {"version":3,"file":"text-area.stories.js","sourceRoot":"","sources":["../../../../src/text-area/stories/text-area.stories.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,EAC1B,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,gBAAgB,GACjB,MAAM,IAAI,CAAC;AAEZ,MAAM,aAAa,GAA0B;IAC3C,KAAK,EAAE,qBAAqB;IAC5B,EAAE,EAAE,sBAAsB;IAC1B,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QAAQ,EAAE,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,MAAM,EAAE,gBAAgB;IACxB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,mBAAmB;aAC1B;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,aAAa;IACrB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,gBAAgB;aACvB;SACF;KACF;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,UAAU,YACvB,KAAC,KAAK,KAAG,GACL,CACP;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,aAAa;IACrB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,gBAAgB;aACvB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAU;IACpC,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,uBAAuB;IAC/B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,0BAA0B;aACjC;SACF;KACF;CACF,CAAC","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 { TextArea } from '../../index';\nimport {\n TextAreaDefault,\n TextAreaDefaultSrc,\n TextAreaDisabled,\n TextAreaDisabledSrc,\n TextAreaError,\n TextAreaErrorSrc,\n TextAreaFluid,\n TextAreaFluidSrc,\n TextAreaInformationIcon,\n TextAreaInformationIconSrc,\n TextAreaOptional,\n TextAreaOptionalSrc,\n TextAreaResizable,\n TextAreaResizableSrc,\n TextAreaSizes,\n TextAreaSizesSrc,\n} from './';\n\nconst componentMeta: Meta<typeof TextArea> = {\n title: 'Components/TextArea',\n id: 'components-text-area',\n component: TextArea,\n tags: ['docsPage'],\n parameters: {\n controls: { disable: true },\n },\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n render: TextAreaDefault,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaDefaultSrc,\n },\n },\n },\n};\n\nexport const Resizable: Story = {\n args: {},\n render: TextAreaResizable,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaResizableSrc,\n },\n },\n },\n};\n\nexport const Optional: Story = {\n args: {},\n render: TextAreaOptional,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaOptionalSrc,\n },\n },\n },\n};\n\nexport const Error: Story = {\n args: {},\n render: TextAreaError,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaErrorSrc,\n },\n },\n },\n};\n\nexport const Disabled: Story = {\n args: {},\n render: TextAreaDisabled,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaDisabledSrc,\n },\n },\n },\n};\n\nexport const Fluid: Story = {\n args: {},\n render: TextAreaFluid,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaFluidSrc,\n },\n },\n },\n decorators: [\n (Story) => (\n <div className=\"n-w-full\">\n <Story />\n </div>\n ),\n ],\n};\n\nexport const Sizes: Story = {\n args: {},\n render: TextAreaSizes,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaSizesSrc,\n },\n },\n },\n};\n\nexport const InformationIcon: Story = {\n args: {},\n render: TextAreaInformationIcon,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaInformationIconSrc,\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"text-area.stories.js","sourceRoot":"","sources":["../../../../src/text-area/stories/text-area.stories.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,EAC1B,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,gBAAgB,GACjB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAA0B;IAC3C,KAAK,EAAE,qBAAqB;IAC5B,EAAE,EAAE,sBAAsB;IAC1B,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,KAAK,KAAG,GACL,CACP;KACF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;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,aAAa;IACrB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,gBAAgB;aACvB;SACF;KACF;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,UAAU,YACvB,KAAC,KAAK,KAAG,GACL,CACP;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,aAAa;IACrB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,gBAAgB;aACvB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAU;IACpC,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,uBAAuB;IAC/B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,0BAA0B;aACjC;SACF;KACF;CACF,CAAC","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 { TextArea } from '../../index';\nimport {\n TextAreaDefault,\n TextAreaDefaultSrc,\n TextAreaDisabled,\n TextAreaDisabledSrc,\n TextAreaError,\n TextAreaErrorSrc,\n TextAreaFluid,\n TextAreaFluidSrc,\n TextAreaInformationIcon,\n TextAreaInformationIconSrc,\n TextAreaOptional,\n TextAreaOptionalSrc,\n TextAreaResizable,\n TextAreaResizableSrc,\n TextAreaSizes,\n TextAreaSizesSrc,\n} from '.';\n\nconst componentMeta: Meta<typeof TextArea> = {\n title: 'Components/TextArea',\n id: 'components-text-area',\n component: TextArea,\n tags: ['docsPage'],\n parameters: {\n controls: { disable: true },\n },\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n render: TextAreaDefault,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaDefaultSrc,\n },\n },\n },\n};\n\nexport const Resizable: Story = {\n args: {},\n render: TextAreaResizable,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaResizableSrc,\n },\n },\n },\n};\n\nexport const Optional: Story = {\n args: {},\n render: TextAreaOptional,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaOptionalSrc,\n },\n },\n },\n};\n\nexport const Error: Story = {\n args: {},\n render: TextAreaError,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaErrorSrc,\n },\n },\n },\n};\n\nexport const Disabled: Story = {\n args: {},\n render: TextAreaDisabled,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaDisabledSrc,\n },\n },\n },\n};\n\nexport const Fluid: Story = {\n args: {},\n render: TextAreaFluid,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaFluidSrc,\n },\n },\n },\n decorators: [\n (Story) => (\n <div className=\"n-w-full\">\n <Story />\n </div>\n ),\n ],\n};\n\nexport const Sizes: Story = {\n args: {},\n render: TextAreaSizes,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaSizesSrc,\n },\n },\n },\n};\n\nexport const InformationIcon: Story = {\n args: {},\n render: TextAreaInformationIcon,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: TextAreaInformationIconSrc,\n },\n },\n },\n};\n"]}
@@ -1,3 +1,14 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
13
  /**
3
14
  *
@@ -34,7 +45,8 @@ import { Typography } from '../typography';
34
45
  *
35
46
  *
36
47
  */
37
- export const TextInput = ({ label, isFluid, errorText, helpText, leadingElement, trailingElement, showRequiredOrOptionalLabel = false, moreInformationText, size = 'medium', placeholder, value, tooltipProps, htmlAttributes, isDisabled, isReadOnly, isRequired, onChange, className, style, isSkeletonLoading = false, skeletonProps, ref, }) => {
48
+ export const TextInput = (_a) => {
49
+ var { label, isFluid, errorText, helpText, leadingElement, trailingElement, showRequiredOrOptionalLabel = false, moreInformationText, size = 'medium', placeholder, value, tooltipProps, htmlAttributes, isDisabled, isReadOnly, isRequired, onChange, className, style, isSkeletonLoading = false, skeletonProps, ref } = _a, restProps = __rest(_a, ["label", "isFluid", "errorText", "helpText", "leadingElement", "trailingElement", "showRequiredOrOptionalLabel", "moreInformationText", "size", "placeholder", "value", "tooltipProps", "htmlAttributes", "isDisabled", "isReadOnly", "isRequired", "onChange", "className", "style", "isSkeletonLoading", "skeletonProps", "ref"]);
38
50
  const containerWrappingClasses = classNames(`ndl-text-input`, className, {
39
51
  'ndl-disabled': isDisabled,
40
52
  'ndl-has-error': errorText,
@@ -67,7 +79,7 @@ export const TextInput = ({ label, isFluid, errorText, helpText, leadingElement,
67
79
  'ndl-information-icon-large': size === 'large',
68
80
  'ndl-information-icon-small': size === 'small' || size === 'medium',
69
81
  });
70
- return (_jsxs("div", { className: containerWrappingClasses, style: style, children: [_jsxs("label", { className: labelWrappingClasses, children: [!hasEmptyLabelValue && (_jsx(Skeleton, Object.assign({ onBackground: "weak", shape: "rectangular" }, skeletonProps, { isLoading: isSkeletonLoading, children: _jsxs("div", { className: "ndl-label-text-wrapper", children: [_jsx(Typography, { variant: size === 'large' ? 'body-large' : 'body-medium', className: "ndl-label-text", children: label }), Boolean(moreInformationText) && (_jsxs(Tooltip, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.root, { type: "simple", children: [_jsx(Tooltip.Trigger, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.trigger, { className: informationIconClasses, hasButtonWrapper: true, children: _jsx("div", { tabIndex: 0, role: "button", "aria-label": "Information icon", children: _jsx(InformationCircleIconOutline, {}) }) })), _jsx(Tooltip.Content, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.content, { children: moreInformationText }))] }))), showRequiredOrOptionalLabel && (_jsx(Typography, { variant: size === 'large' ? 'body-large' : 'body-medium', className: "ndl-form-item-optional", children: isRequired === true ? 'Required' : 'Optional' }))] }) }))), _jsx(Skeleton, Object.assign({ onBackground: "weak", shape: "rectangular" }, skeletonProps, { isLoading: isSkeletonLoading, children: _jsxs("div", { className: "ndl-input-wrapper", children: [leadingElement && (_jsx("div", { className: "ndl-element-leading ndl-element", children: leadingElement })), _jsx("input", Object.assign({ readOnly: isReadOnly, disabled: isDisabled, required: isRequired, value: value, placeholder: placeholder, type: "text", onChange: onChange }, combinedHtmlInputAttributes, { ref: ref })), trailingElement && (_jsx("div", { className: "ndl-element-trailing ndl-element", children: trailingElement }))] }) }))] }), Boolean(helpText) && !errorText && (_jsx(Skeleton, { onBackground: "weak", shape: "rectangular", isLoading: isSkeletonLoading, children: _jsx(Typography, { variant: size === 'large' ? 'body-medium' : 'body-small', className: "ndl-form-message", children: helpText }) })), Boolean(errorText) && (
82
+ return (_jsxs("div", { className: containerWrappingClasses, style: style, children: [_jsxs("label", { className: labelWrappingClasses, children: [!hasEmptyLabelValue && (_jsx(Skeleton, Object.assign({ onBackground: "weak", shape: "rectangular" }, skeletonProps, { isLoading: isSkeletonLoading, children: _jsxs("div", { className: "ndl-label-text-wrapper", children: [_jsx(Typography, { variant: size === 'large' ? 'body-large' : 'body-medium', className: "ndl-label-text", children: label }), Boolean(moreInformationText) && (_jsxs(Tooltip, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.root, { type: "simple", children: [_jsx(Tooltip.Trigger, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.trigger, { className: informationIconClasses, hasButtonWrapper: true, children: _jsx("div", { tabIndex: 0, role: "button", "aria-label": "Information icon", children: _jsx(InformationCircleIconOutline, {}) }) })), _jsx(Tooltip.Content, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.content, { children: moreInformationText }))] }))), showRequiredOrOptionalLabel && (_jsx(Typography, { variant: size === 'large' ? 'body-large' : 'body-medium', className: "ndl-form-item-optional", children: isRequired === true ? 'Required' : 'Optional' }))] }) }))), _jsx(Skeleton, Object.assign({ onBackground: "weak", shape: "rectangular" }, skeletonProps, { isLoading: isSkeletonLoading, children: _jsxs("div", { className: "ndl-input-wrapper", children: [leadingElement && (_jsx("div", { className: "ndl-element-leading ndl-element", children: leadingElement })), _jsx("input", Object.assign({ readOnly: isReadOnly, disabled: isDisabled, required: isRequired, value: value, placeholder: placeholder, type: "text", onChange: onChange }, combinedHtmlInputAttributes, restProps, { ref: ref })), trailingElement && (_jsx("div", { className: "ndl-element-trailing ndl-element", children: trailingElement }))] }) }))] }), Boolean(helpText) && !errorText && (_jsx(Skeleton, { onBackground: "weak", shape: "rectangular", isLoading: isSkeletonLoading, children: _jsx(Typography, { variant: size === 'large' ? 'body-medium' : 'body-small', className: "ndl-form-message", children: helpText }) })), Boolean(errorText) && (
71
83
  // TODO v4: We might want to have a min width for the container for the messages to help skeleton loading.
72
84
  // Currently the message fills 100% of the width while the rest of the text input has a set width.
73
85
  _jsx(Skeleton, Object.assign({ onBackground: "weak", shape: "rectangular", width: "fit-content" }, skeletonProps, { isLoading: isSkeletonLoading, children: _jsxs("div", { className: "ndl-form-message", children: [_jsx("div", { className: "ndl-error-icon", children: _jsx(ExclamationCircleIconSolid, {}) }), _jsx(Typography, { className: "ndl-error-text", variant: size === 'large' ? 'body-medium' : 'body-small', children: errorText })] }) })))] }));