@neo4j-ndl/react 4.4.0 → 4.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (365) hide show
  1. package/lib/cjs/_common/types.js.map +1 -1
  2. package/lib/cjs/_common/utils.js +4 -4
  3. package/lib/cjs/_common/utils.js.map +1 -1
  4. package/lib/cjs/accordion/Accordion.js +5 -5
  5. package/lib/cjs/accordion/Accordion.js.map +1 -1
  6. package/lib/cjs/accordion/accordion-context.js +1 -1
  7. package/lib/cjs/accordion/accordion-context.js.map +1 -1
  8. package/lib/cjs/accordion/stories/accordion.stories.js +20 -20
  9. package/lib/cjs/accordion/stories/accordion.stories.js.map +1 -1
  10. package/lib/cjs/avatar/stories/avatar.stories.js +18 -18
  11. package/lib/cjs/avatar/stories/avatar.stories.js.map +1 -1
  12. package/lib/cjs/breadcrumbs/stories/breadcrumbs.stories.js +1 -1
  13. package/lib/cjs/breadcrumbs/stories/breadcrumbs.stories.js.map +1 -1
  14. package/lib/cjs/checkbox/stories/checkbox-full.story.js +2 -2
  15. package/lib/cjs/checkbox/stories/checkbox-full.story.js.map +1 -1
  16. package/lib/cjs/checkbox/stories/checkbox.stories.js +19 -19
  17. package/lib/cjs/checkbox/stories/checkbox.stories.js.map +1 -1
  18. package/lib/cjs/clean-icon-button/stories/clean-icon-button.stories.js +11 -11
  19. package/lib/cjs/clean-icon-button/stories/clean-icon-button.stories.js.map +1 -1
  20. package/lib/cjs/code-block/stories/code-disabled.story.js +2 -2
  21. package/lib/cjs/code-block/stories/code-disabled.story.js.map +1 -1
  22. package/lib/cjs/code-block/stories/code-full.story.js +2 -2
  23. package/lib/cjs/code-block/stories/code-full.story.js.map +1 -1
  24. package/lib/cjs/code-block/stories/code-with-actions.story.js +2 -2
  25. package/lib/cjs/code-block/stories/code-with-actions.story.js.map +1 -1
  26. package/lib/cjs/code-block/themes/ndl-code-dark.js +64 -64
  27. package/lib/cjs/code-block/themes/ndl-code-dark.js.map +1 -1
  28. package/lib/cjs/code-block/themes/ndl-code-light.js +64 -64
  29. package/lib/cjs/code-block/themes/ndl-code-light.js.map +1 -1
  30. package/lib/cjs/color-picker/ColorPicker.js +1 -1
  31. package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
  32. package/lib/cjs/color-picker/stories/color-picker.stories.js +4 -4
  33. package/lib/cjs/color-picker/stories/color-picker.stories.js.map +1 -1
  34. package/lib/cjs/data-grid/Components.js +13 -11
  35. package/lib/cjs/data-grid/Components.js.map +1 -1
  36. package/lib/cjs/data-grid/DataGrid.js.map +1 -1
  37. package/lib/cjs/data-grid/data-grid-context.js +1 -1
  38. package/lib/cjs/data-grid/data-grid-context.js.map +1 -1
  39. package/lib/cjs/data-grid/data-grid-nav/index.js +1 -1
  40. package/lib/cjs/data-grid/data-grid-nav/index.js.map +1 -1
  41. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
  42. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  43. package/lib/cjs/date-picker/stories/date-picker-full.story.js +9 -9
  44. package/lib/cjs/date-picker/stories/date-picker-full.story.js.map +1 -1
  45. package/lib/cjs/divider/stories/divider-horizontal.story.js +1 -1
  46. package/lib/cjs/divider/stories/divider-horizontal.story.js.map +1 -1
  47. package/lib/cjs/divider/stories/divider-vertical.story.js +1 -1
  48. package/lib/cjs/divider/stories/divider-vertical.story.js.map +1 -1
  49. package/lib/cjs/drawer/stories/drawer.stories.js +19 -19
  50. package/lib/cjs/drawer/stories/drawer.stories.js.map +1 -1
  51. package/lib/cjs/dropdown-button/stories/dropdown-button.stories.js +18 -18
  52. package/lib/cjs/dropdown-button/stories/dropdown-button.stories.js.map +1 -1
  53. package/lib/cjs/dropzone/stories/dropzone-disabled.story.js +1 -1
  54. package/lib/cjs/dropzone/stories/dropzone-disabled.story.js.map +1 -1
  55. package/lib/cjs/dropzone/stories/dropzone-full.story.js +11 -11
  56. package/lib/cjs/dropzone/stories/dropzone-full.story.js.map +1 -1
  57. package/lib/cjs/dropzone/stories/dropzone.stories.js +10 -10
  58. package/lib/cjs/dropzone/stories/dropzone.stories.js.map +1 -1
  59. package/lib/cjs/flex/Flex.js +4 -4
  60. package/lib/cjs/flex/Flex.js.map +1 -1
  61. package/lib/cjs/graph-label/stories/graph-label.stories.js +20 -20
  62. package/lib/cjs/graph-label/stories/graph-label.stories.js.map +1 -1
  63. package/lib/cjs/hooks/index.js +3 -3
  64. package/lib/cjs/hooks/index.js.map +1 -1
  65. package/lib/cjs/icon-button/stories/icon-button.stories.js +12 -12
  66. package/lib/cjs/icon-button/stories/icon-button.stories.js.map +1 -1
  67. package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js +16 -16
  68. package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
  69. package/lib/cjs/icons/wrapIcon.js +1 -1
  70. package/lib/cjs/icons/wrapIcon.js.map +1 -1
  71. package/lib/cjs/kbd/stories/kbd.stories.js +7 -7
  72. package/lib/cjs/kbd/stories/kbd.stories.js.map +1 -1
  73. package/lib/cjs/loading-spinner/LoadingSpinner.js +2 -2
  74. package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
  75. package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js +10 -10
  76. package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js.map +1 -1
  77. package/lib/cjs/logo/Logo.js +6 -6
  78. package/lib/cjs/logo/Logo.js.map +1 -1
  79. package/lib/cjs/logo/stories/logo.stories.js +9 -9
  80. package/lib/cjs/logo/stories/logo.stories.js.map +1 -1
  81. package/lib/cjs/menu/Menu.js +3 -3
  82. package/lib/cjs/menu/Menu.js.map +1 -1
  83. package/lib/cjs/popover/Popover.js +15 -15
  84. package/lib/cjs/popover/Popover.js.map +1 -1
  85. package/lib/cjs/popover/use-popover.js +9 -9
  86. package/lib/cjs/popover/use-popover.js.map +1 -1
  87. package/lib/cjs/progress-bar/stories/progress-bar.stories.js +3 -3
  88. package/lib/cjs/progress-bar/stories/progress-bar.stories.js.map +1 -1
  89. package/lib/cjs/segmented-control/SegmentedControl.js +1 -1
  90. package/lib/cjs/segmented-control/SegmentedControl.js.map +1 -1
  91. package/lib/cjs/select/Overrides.js +41 -41
  92. package/lib/cjs/select/Overrides.js.map +1 -1
  93. package/lib/cjs/select/stories/select-async.story.js +4 -4
  94. package/lib/cjs/select/stories/select-async.story.js.map +1 -1
  95. package/lib/cjs/select/stories/select-controlled.story.js +4 -4
  96. package/lib/cjs/select/stories/select-controlled.story.js.map +1 -1
  97. package/lib/cjs/select/stories/select-creatable.story.js +1 -1
  98. package/lib/cjs/select/stories/select-creatable.story.js.map +1 -1
  99. package/lib/cjs/select/stories/select-custom-label.story.js +1 -1
  100. package/lib/cjs/select/stories/select-custom-label.story.js.map +1 -1
  101. package/lib/cjs/select/stories/select-disabled.story.js +1 -1
  102. package/lib/cjs/select/stories/select-disabled.story.js.map +1 -1
  103. package/lib/cjs/select/stories/select-inside-dialog.story.js +1 -1
  104. package/lib/cjs/select/stories/select-inside-dialog.story.js.map +1 -1
  105. package/lib/cjs/side-navigation/stories/side-nav.stories.js +1 -1
  106. package/lib/cjs/side-navigation/stories/side-nav.stories.js.map +1 -1
  107. package/lib/cjs/skeleton/stories/skeleton.stories.js +28 -28
  108. package/lib/cjs/skeleton/stories/skeleton.stories.js.map +1 -1
  109. package/lib/cjs/slider/Slider.js +2 -1
  110. package/lib/cjs/slider/Slider.js.map +1 -1
  111. package/lib/cjs/status-indicator/stories/status-indicator.stories.js +2 -2
  112. package/lib/cjs/status-indicator/stories/status-indicator.stories.js.map +1 -1
  113. package/lib/cjs/switch/stories/switch.stories.js +7 -7
  114. package/lib/cjs/switch/stories/switch.stories.js.map +1 -1
  115. package/lib/cjs/tabs/Tabs.js +1 -1
  116. package/lib/cjs/tabs/Tabs.js.map +1 -1
  117. package/lib/cjs/tag/Tag.js +2 -2
  118. package/lib/cjs/tag/Tag.js.map +1 -1
  119. package/lib/cjs/tag/stories/tag.stories.js +10 -10
  120. package/lib/cjs/tag/stories/tag.stories.js.map +1 -1
  121. package/lib/cjs/text-area/TextArea.js +5 -5
  122. package/lib/cjs/text-area/TextArea.js.map +1 -1
  123. package/lib/cjs/text-area/stories/text-area.stories.js +25 -25
  124. package/lib/cjs/text-area/stories/text-area.stories.js.map +1 -1
  125. package/lib/cjs/text-input/stories/text-input-number.story.js +2 -2
  126. package/lib/cjs/text-input/stories/text-input-number.story.js.map +1 -1
  127. package/lib/cjs/text-link/stories/text-link.stories.js +11 -11
  128. package/lib/cjs/text-link/stories/text-link.stories.js.map +1 -1
  129. package/lib/cjs/text-overflow/stories/text-overflow.stories.js +1 -1
  130. package/lib/cjs/text-overflow/stories/text-overflow.stories.js.map +1 -1
  131. package/lib/cjs/theme/ThemeProvider.js.map +1 -1
  132. package/lib/cjs/theme/agnostic.js +1 -1
  133. package/lib/cjs/theme/agnostic.js.map +1 -1
  134. package/lib/cjs/time-picker/TimePicker.js +4 -4
  135. package/lib/cjs/time-picker/TimePicker.js.map +1 -1
  136. package/lib/cjs/time-picker/time-picker-hooks.js +1 -1
  137. package/lib/cjs/time-picker/time-picker-hooks.js.map +1 -1
  138. package/lib/cjs/timezone-picker/TimeZonePicker.js +5 -5
  139. package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
  140. package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +7 -7
  141. package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
  142. package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
  143. package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
  144. package/lib/cjs/toast/Toast.js +12 -12
  145. package/lib/cjs/toast/Toast.js.map +1 -1
  146. package/lib/cjs/toast/stories/toast-action-story.js +1 -1
  147. package/lib/cjs/toast/stories/toast-action-story.js.map +1 -1
  148. package/lib/cjs/toast/stories/toast-controlled-story.js +2 -2
  149. package/lib/cjs/toast/stories/toast-controlled-story.js.map +1 -1
  150. package/lib/cjs/toast/stories/toast-progress-bar.js +1 -1
  151. package/lib/cjs/toast/stories/toast-progress-bar.js.map +1 -1
  152. package/lib/cjs/toast/stories/toast.stories.js +18 -18
  153. package/lib/cjs/toast/stories/toast.stories.js.map +1 -1
  154. package/lib/cjs/tooltip/Tooltip.js +1 -1
  155. package/lib/cjs/tooltip/Tooltip.js.map +1 -1
  156. package/lib/cjs/tooltip/stories/tooltip-hover-delay.story.js +1 -1
  157. package/lib/cjs/tooltip/stories/tooltip-hover-delay.story.js.map +1 -1
  158. package/lib/cjs/tooltip/stories/tooltip-placements.story.js +8 -8
  159. package/lib/cjs/tooltip/stories/tooltip-placements.story.js.map +1 -1
  160. package/lib/cjs/tooltip/stories/tooltip.stories.js +29 -29
  161. package/lib/cjs/tooltip/stories/tooltip.stories.js.map +1 -1
  162. package/lib/cjs/tooltip/use-tooltip.js +10 -10
  163. package/lib/cjs/tooltip/use-tooltip.js.map +1 -1
  164. package/lib/cjs/tree-view/TreeItemWrapper.js +2 -2
  165. package/lib/cjs/tree-view/TreeItemWrapper.js.map +1 -1
  166. package/lib/cjs/tree-view/TreeView.js +12 -12
  167. package/lib/cjs/tree-view/TreeView.js.map +1 -1
  168. package/lib/cjs/tree-view/TreeViewItem.js +1 -1
  169. package/lib/cjs/tree-view/TreeViewItem.js.map +1 -1
  170. package/lib/cjs/tree-view/TreeViewTextItem.js +1 -1
  171. package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
  172. package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js +2 -2
  173. package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
  174. package/lib/cjs/wizard/Wizard.js +2 -2
  175. package/lib/cjs/wizard/Wizard.js.map +1 -1
  176. package/lib/cjs/wizard/stories/wizard.stories.js +14 -14
  177. package/lib/cjs/wizard/stories/wizard.stories.js.map +1 -1
  178. package/lib/esm/_common/types.js.map +1 -1
  179. package/lib/esm/_common/utils.js +4 -4
  180. package/lib/esm/_common/utils.js.map +1 -1
  181. package/lib/esm/accordion/Accordion.js +5 -5
  182. package/lib/esm/accordion/Accordion.js.map +1 -1
  183. package/lib/esm/accordion/accordion-context.js +1 -1
  184. package/lib/esm/accordion/accordion-context.js.map +1 -1
  185. package/lib/esm/accordion/stories/accordion.stories.js +20 -20
  186. package/lib/esm/accordion/stories/accordion.stories.js.map +1 -1
  187. package/lib/esm/avatar/stories/avatar.stories.js +18 -18
  188. package/lib/esm/avatar/stories/avatar.stories.js.map +1 -1
  189. package/lib/esm/breadcrumbs/stories/breadcrumbs.stories.js +1 -1
  190. package/lib/esm/breadcrumbs/stories/breadcrumbs.stories.js.map +1 -1
  191. package/lib/esm/checkbox/stories/checkbox-full.story.js +2 -2
  192. package/lib/esm/checkbox/stories/checkbox-full.story.js.map +1 -1
  193. package/lib/esm/checkbox/stories/checkbox.stories.js +19 -19
  194. package/lib/esm/checkbox/stories/checkbox.stories.js.map +1 -1
  195. package/lib/esm/clean-icon-button/stories/clean-icon-button.stories.js +11 -11
  196. package/lib/esm/clean-icon-button/stories/clean-icon-button.stories.js.map +1 -1
  197. package/lib/esm/code-block/stories/code-disabled.story.js +2 -2
  198. package/lib/esm/code-block/stories/code-disabled.story.js.map +1 -1
  199. package/lib/esm/code-block/stories/code-full.story.js +2 -2
  200. package/lib/esm/code-block/stories/code-full.story.js.map +1 -1
  201. package/lib/esm/code-block/stories/code-with-actions.story.js +2 -2
  202. package/lib/esm/code-block/stories/code-with-actions.story.js.map +1 -1
  203. package/lib/esm/code-block/themes/ndl-code-dark.js +64 -64
  204. package/lib/esm/code-block/themes/ndl-code-dark.js.map +1 -1
  205. package/lib/esm/code-block/themes/ndl-code-light.js +64 -64
  206. package/lib/esm/code-block/themes/ndl-code-light.js.map +1 -1
  207. package/lib/esm/color-picker/ColorPicker.js +1 -1
  208. package/lib/esm/color-picker/ColorPicker.js.map +1 -1
  209. package/lib/esm/color-picker/stories/color-picker.stories.js +4 -4
  210. package/lib/esm/color-picker/stories/color-picker.stories.js.map +1 -1
  211. package/lib/esm/data-grid/Components.js +13 -11
  212. package/lib/esm/data-grid/Components.js.map +1 -1
  213. package/lib/esm/data-grid/DataGrid.js.map +1 -1
  214. package/lib/esm/data-grid/data-grid-context.js +1 -1
  215. package/lib/esm/data-grid/data-grid-context.js.map +1 -1
  216. package/lib/esm/data-grid/data-grid-nav/index.js +1 -1
  217. package/lib/esm/data-grid/data-grid-nav/index.js.map +1 -1
  218. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
  219. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  220. package/lib/esm/date-picker/stories/date-picker-full.story.js +9 -9
  221. package/lib/esm/date-picker/stories/date-picker-full.story.js.map +1 -1
  222. package/lib/esm/divider/stories/divider-horizontal.story.js +1 -1
  223. package/lib/esm/divider/stories/divider-horizontal.story.js.map +1 -1
  224. package/lib/esm/divider/stories/divider-vertical.story.js +1 -1
  225. package/lib/esm/divider/stories/divider-vertical.story.js.map +1 -1
  226. package/lib/esm/drawer/stories/drawer.stories.js +19 -19
  227. package/lib/esm/drawer/stories/drawer.stories.js.map +1 -1
  228. package/lib/esm/dropdown-button/stories/dropdown-button.stories.js +18 -18
  229. package/lib/esm/dropdown-button/stories/dropdown-button.stories.js.map +1 -1
  230. package/lib/esm/dropzone/stories/dropzone-disabled.story.js +1 -1
  231. package/lib/esm/dropzone/stories/dropzone-disabled.story.js.map +1 -1
  232. package/lib/esm/dropzone/stories/dropzone-full.story.js +11 -11
  233. package/lib/esm/dropzone/stories/dropzone-full.story.js.map +1 -1
  234. package/lib/esm/dropzone/stories/dropzone.stories.js +10 -10
  235. package/lib/esm/dropzone/stories/dropzone.stories.js.map +1 -1
  236. package/lib/esm/flex/Flex.js +4 -4
  237. package/lib/esm/flex/Flex.js.map +1 -1
  238. package/lib/esm/graph-label/stories/graph-label.stories.js +20 -20
  239. package/lib/esm/graph-label/stories/graph-label.stories.js.map +1 -1
  240. package/lib/esm/hooks/index.js +3 -3
  241. package/lib/esm/hooks/index.js.map +1 -1
  242. package/lib/esm/icon-button/stories/icon-button.stories.js +12 -12
  243. package/lib/esm/icon-button/stories/icon-button.stories.js.map +1 -1
  244. package/lib/esm/icon-button-array/stories/icon-button-array.stories.js +16 -16
  245. package/lib/esm/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
  246. package/lib/esm/icons/wrapIcon.js +1 -1
  247. package/lib/esm/icons/wrapIcon.js.map +1 -1
  248. package/lib/esm/kbd/stories/kbd.stories.js +7 -7
  249. package/lib/esm/kbd/stories/kbd.stories.js.map +1 -1
  250. package/lib/esm/loading-spinner/LoadingSpinner.js +2 -2
  251. package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
  252. package/lib/esm/loading-spinner/stories/loading-spinner.stories.js +10 -10
  253. package/lib/esm/loading-spinner/stories/loading-spinner.stories.js.map +1 -1
  254. package/lib/esm/logo/Logo.js +6 -6
  255. package/lib/esm/logo/Logo.js.map +1 -1
  256. package/lib/esm/logo/stories/logo.stories.js +9 -9
  257. package/lib/esm/logo/stories/logo.stories.js.map +1 -1
  258. package/lib/esm/menu/Menu.js +3 -3
  259. package/lib/esm/menu/Menu.js.map +1 -1
  260. package/lib/esm/popover/Popover.js +15 -15
  261. package/lib/esm/popover/Popover.js.map +1 -1
  262. package/lib/esm/popover/use-popover.js +9 -9
  263. package/lib/esm/popover/use-popover.js.map +1 -1
  264. package/lib/esm/progress-bar/stories/progress-bar.stories.js +3 -3
  265. package/lib/esm/progress-bar/stories/progress-bar.stories.js.map +1 -1
  266. package/lib/esm/segmented-control/SegmentedControl.js +1 -1
  267. package/lib/esm/segmented-control/SegmentedControl.js.map +1 -1
  268. package/lib/esm/select/Overrides.js +41 -41
  269. package/lib/esm/select/Overrides.js.map +1 -1
  270. package/lib/esm/select/stories/select-async.story.js +4 -4
  271. package/lib/esm/select/stories/select-async.story.js.map +1 -1
  272. package/lib/esm/select/stories/select-controlled.story.js +4 -4
  273. package/lib/esm/select/stories/select-controlled.story.js.map +1 -1
  274. package/lib/esm/select/stories/select-creatable.story.js +1 -1
  275. package/lib/esm/select/stories/select-creatable.story.js.map +1 -1
  276. package/lib/esm/select/stories/select-custom-label.story.js +1 -1
  277. package/lib/esm/select/stories/select-custom-label.story.js.map +1 -1
  278. package/lib/esm/select/stories/select-disabled.story.js +1 -1
  279. package/lib/esm/select/stories/select-disabled.story.js.map +1 -1
  280. package/lib/esm/select/stories/select-inside-dialog.story.js +1 -1
  281. package/lib/esm/select/stories/select-inside-dialog.story.js.map +1 -1
  282. package/lib/esm/side-navigation/stories/side-nav.stories.js +1 -1
  283. package/lib/esm/side-navigation/stories/side-nav.stories.js.map +1 -1
  284. package/lib/esm/skeleton/stories/skeleton.stories.js +28 -28
  285. package/lib/esm/skeleton/stories/skeleton.stories.js.map +1 -1
  286. package/lib/esm/slider/Slider.js +2 -1
  287. package/lib/esm/slider/Slider.js.map +1 -1
  288. package/lib/esm/status-indicator/stories/status-indicator.stories.js +2 -2
  289. package/lib/esm/status-indicator/stories/status-indicator.stories.js.map +1 -1
  290. package/lib/esm/switch/stories/switch.stories.js +7 -7
  291. package/lib/esm/switch/stories/switch.stories.js.map +1 -1
  292. package/lib/esm/tabs/Tabs.js +1 -1
  293. package/lib/esm/tabs/Tabs.js.map +1 -1
  294. package/lib/esm/tag/Tag.js +2 -2
  295. package/lib/esm/tag/Tag.js.map +1 -1
  296. package/lib/esm/tag/stories/tag.stories.js +10 -10
  297. package/lib/esm/tag/stories/tag.stories.js.map +1 -1
  298. package/lib/esm/text-area/TextArea.js +5 -5
  299. package/lib/esm/text-area/TextArea.js.map +1 -1
  300. package/lib/esm/text-area/stories/text-area.stories.js +25 -25
  301. package/lib/esm/text-area/stories/text-area.stories.js.map +1 -1
  302. package/lib/esm/text-input/stories/text-input-number.story.js +2 -2
  303. package/lib/esm/text-input/stories/text-input-number.story.js.map +1 -1
  304. package/lib/esm/text-link/stories/text-link.stories.js +11 -11
  305. package/lib/esm/text-link/stories/text-link.stories.js.map +1 -1
  306. package/lib/esm/text-overflow/stories/text-overflow.stories.js +1 -1
  307. package/lib/esm/text-overflow/stories/text-overflow.stories.js.map +1 -1
  308. package/lib/esm/theme/ThemeProvider.js.map +1 -1
  309. package/lib/esm/theme/agnostic.js +1 -1
  310. package/lib/esm/theme/agnostic.js.map +1 -1
  311. package/lib/esm/time-picker/TimePicker.js +4 -4
  312. package/lib/esm/time-picker/TimePicker.js.map +1 -1
  313. package/lib/esm/time-picker/time-picker-hooks.js +1 -1
  314. package/lib/esm/time-picker/time-picker-hooks.js.map +1 -1
  315. package/lib/esm/timezone-picker/TimeZonePicker.js +5 -5
  316. package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
  317. package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +7 -7
  318. package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
  319. package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
  320. package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
  321. package/lib/esm/toast/Toast.js +12 -12
  322. package/lib/esm/toast/Toast.js.map +1 -1
  323. package/lib/esm/toast/stories/toast-action-story.js +1 -1
  324. package/lib/esm/toast/stories/toast-action-story.js.map +1 -1
  325. package/lib/esm/toast/stories/toast-controlled-story.js +2 -2
  326. package/lib/esm/toast/stories/toast-controlled-story.js.map +1 -1
  327. package/lib/esm/toast/stories/toast-progress-bar.js +1 -1
  328. package/lib/esm/toast/stories/toast-progress-bar.js.map +1 -1
  329. package/lib/esm/toast/stories/toast.stories.js +18 -18
  330. package/lib/esm/toast/stories/toast.stories.js.map +1 -1
  331. package/lib/esm/tooltip/Tooltip.js +1 -1
  332. package/lib/esm/tooltip/Tooltip.js.map +1 -1
  333. package/lib/esm/tooltip/stories/tooltip-hover-delay.story.js +1 -1
  334. package/lib/esm/tooltip/stories/tooltip-hover-delay.story.js.map +1 -1
  335. package/lib/esm/tooltip/stories/tooltip-placements.story.js +8 -8
  336. package/lib/esm/tooltip/stories/tooltip-placements.story.js.map +1 -1
  337. package/lib/esm/tooltip/stories/tooltip.stories.js +29 -29
  338. package/lib/esm/tooltip/stories/tooltip.stories.js.map +1 -1
  339. package/lib/esm/tooltip/use-tooltip.js +10 -10
  340. package/lib/esm/tooltip/use-tooltip.js.map +1 -1
  341. package/lib/esm/tree-view/TreeItemWrapper.js +2 -2
  342. package/lib/esm/tree-view/TreeItemWrapper.js.map +1 -1
  343. package/lib/esm/tree-view/TreeView.js +12 -12
  344. package/lib/esm/tree-view/TreeView.js.map +1 -1
  345. package/lib/esm/tree-view/TreeViewItem.js +1 -1
  346. package/lib/esm/tree-view/TreeViewItem.js.map +1 -1
  347. package/lib/esm/tree-view/TreeViewTextItem.js +1 -1
  348. package/lib/esm/tree-view/TreeViewTextItem.js.map +1 -1
  349. package/lib/esm/tree-view/tree-view-keyboard-coordinates.js +2 -2
  350. package/lib/esm/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
  351. package/lib/esm/wizard/Wizard.js +2 -2
  352. package/lib/esm/wizard/Wizard.js.map +1 -1
  353. package/lib/esm/wizard/stories/wizard.stories.js +14 -14
  354. package/lib/esm/wizard/stories/wizard.stories.js.map +1 -1
  355. package/lib/types/accordion/stories/accordion.stories.d.ts +3 -3
  356. package/lib/types/breadcrumbs/stories/breadcrumbs.stories.d.ts +1 -1
  357. package/lib/types/data-grid/Components.d.ts.map +1 -1
  358. package/lib/types/logo/stories/logo.stories.d.ts +3 -3
  359. package/lib/types/side-navigation/stories/side-nav.stories.d.ts +1 -1
  360. package/lib/types/skeleton/stories/skeleton.stories.d.ts +3 -3
  361. package/lib/types/slider/Slider.d.ts.map +1 -1
  362. package/lib/types/time-picker/time-picker-hooks.d.ts +1 -1
  363. package/lib/types/time-picker/time-picker-hooks.d.ts.map +1 -1
  364. package/lib/types/toast/stories/toast.stories.d.ts +2 -2
  365. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"progress-bar.stories.js","sourceRoot":"","sources":["../../../../src/progress-bar/stories/progress-bar.stories.tsx"],"names":[],"mappings":";;;;AAuBA,uCAA0C;AAC1C,wBAOW;AAEX,MAAM,aAAa,GAA6B;IAC9C,SAAS,EAAE,mBAAW;IACtB,EAAE,EAAE,yBAAyB;IAC7B,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,wBAAwB;IAC/B,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,gCAAK,SAAS,EAAC,sBAAsB,YACnC,uBAAC,KAAK,KAAG,GACL,CACP;KACF;CACF,CAAC;AAEF,kBAAe,aAAa,CAAC;AAGhB,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,2BAAwB;gBAC9B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,qBAAkB;CAC3B,CAAC;AAEW,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,2BAAwB;gBAC9B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,qBAAkB;CAC3B,CAAC;AAEW,QAAA,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,yBAAsB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,mBAAgB;CACzB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { ProgressBar } from '../../index';\nimport {\n ProgressBarDefault,\n ProgressBarDefaultSource,\n ProgressBarHeading,\n ProgressBarHeadingSource,\n ProgressBarSizes,\n ProgressBarSizesSource,\n} from '.';\n\nconst componentMeta: Meta<typeof ProgressBar> = {\n component: ProgressBar,\n id: 'components-progress-bar',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/ProgressBar',\n decorators: [\n (Story) => (\n <div className=\"n-max-w-96 n-mx-auto\">\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: ProgressBarDefaultSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ProgressBarDefault,\n};\n\nexport const Heading: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ProgressBarHeadingSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ProgressBarHeading,\n};\n\nexport const Sizes: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ProgressBarSizesSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ProgressBarSizes,\n};\n"]}
1
+ {"version":3,"file":"progress-bar.stories.js","sourceRoot":"","sources":["../../../../src/progress-bar/stories/progress-bar.stories.tsx"],"names":[],"mappings":";;;;AAuBA,uCAA0C;AAC1C,wBAOW;AAEX,MAAM,aAAa,GAA6B;IAC9C,SAAS,EAAE,mBAAW;IACtB,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,gCAAK,SAAS,EAAC,sBAAsB,YACnC,uBAAC,KAAK,KAAG,GACL,CACP;KACF;IACD,EAAE,EAAE,yBAAyB;IAC7B,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,wBAAwB;CAChC,CAAC;AAEF,kBAAe,aAAa,CAAC;AAGhB,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,2BAAwB;gBAC9B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,qBAAkB;CAC3B,CAAC;AAEW,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,2BAAwB;gBAC9B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,qBAAkB;CAC3B,CAAC;AAEW,QAAA,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,yBAAsB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,mBAAgB;CACzB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { ProgressBar } from '../../index';\nimport {\n ProgressBarDefault,\n ProgressBarDefaultSource,\n ProgressBarHeading,\n ProgressBarHeadingSource,\n ProgressBarSizes,\n ProgressBarSizesSource,\n} from '.';\n\nconst componentMeta: Meta<typeof ProgressBar> = {\n component: ProgressBar,\n decorators: [\n (Story) => (\n <div className=\"n-max-w-96 n-mx-auto\">\n <Story />\n </div>\n ),\n ],\n id: 'components-progress-bar',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/ProgressBar',\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: ProgressBarDefaultSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ProgressBarDefault,\n};\n\nexport const Heading: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ProgressBarHeadingSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ProgressBarHeading,\n};\n\nexport const Sizes: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ProgressBarSizesSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ProgressBarSizes,\n};\n"]}
@@ -74,7 +74,7 @@ const react_1 = __importStar(require("react"));
74
74
  const Tooltip_1 = require("../tooltip/Tooltip");
75
75
  // eslint-disable-next-line no-redeclare
76
76
  const SegmentedControlContext =
77
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
77
+ // oxlint-disable-next-line @typescript-eslint/no-explicit-any
78
78
  react_1.default.createContext(null);
79
79
  const useSelectorContext = () => {
80
80
  const context = (0, react_1.useContext)(SegmentedControlContext);
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentedControl.js","sourceRoot":"","sources":["../../../src/segmented-control/SegmentedControl.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AACpC,+CAA0C;AAM1C,gDAA6C;AAyB7C,wCAAwC;AACxC,MAAM,uBAAuB;AAC3B,8DAA8D;AAC9D,eAAK,CAAC,aAAa,CAAsC,IAAI,CAAC,CAAC;AAEjE,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,uBAAuB,CAAC,CAAC;IAEpD,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAGhC,EAaoD,EAAE,EAAE;QAbxD,EACA,IAAI,GAAG,QAAQ,EACf,YAAY,GAAG,KAAK,EACpB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,EAAE,EACF,SAAS,EACT,KAAK,EACL,UAAU,GAAG,KAAK,EAClB,cAAc,EACd,GAAG,OAEiD,EADjD,SAAS,cAZZ,+HAaD,CADa;IAEZ,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,uBAAuB,EAAE,SAAS,EAAE;QAC7D,cAAc,EAAE,UAAU;QAC1B,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,CAAC;IAE9B,OAAO,C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AAS,kBACR,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU,IAAI,QAAQ,CAAC,KAAK,CAAC,EAC7C,SAAS,EAAE,WAAW,EACtB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,gBACI,WAAW,EACvB,QAAQ,EAAE,UAAU,IAChB,SAAS,EACT,cAAc,cAEjB,QAAQ,IACC,IACI,EAClB,uBAAC,iBAAO,CAAC,OAAO,oBAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,cACxC,uBAAC,iBAAO,CAAC,IAAI,cAAE,WAAW,GAAgB,IAC1B,KACV,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,oBAAoB,CAAC,WAAW,GAAG,uBAAuB,CAAC;AAE3D,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,yBAAyB,EAAE;IAChE,IAAI,EAAE,oBAAoB;CAC3B,CAAC,CAAC;AAEM,4CAAgB","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React, { useContext } from 'react';\n\nimport {\n type PolymorphicCommonProps,\n type TooltipObjectProps,\n} from '../_common/types';\nimport { Tooltip } from '../tooltip/Tooltip';\n\ntype SegmentedControlID = string | number;\n\ntype SegmentedControlProps<T extends SegmentedControlID> = {\n /** Additional class name */\n className?: string;\n /** Size of the segmented control */\n size?: 'small' | 'medium' | 'large';\n /** If segmented control items will include only icons (makes controls rectangular) */\n hasOnlyIcons?: boolean;\n /** The callback function triggered when the segmented control value changes */\n onChange: (e: T) => void | ((e: React.SetStateAction<T>) => void);\n /** The currently selected option */\n selected: T;\n /** The children component of the segmented control */\n children: React.ReactNode;\n /** Whether the segmented control has a box shadow applied */\n isFloating?: boolean;\n};\n\ntype SegmentedControlContext<T extends SegmentedControlID> = Required<\n Pick<SegmentedControlProps<T>, 'onChange' | 'selected' | 'hasOnlyIcons'>\n>;\n\n// eslint-disable-next-line no-redeclare\nconst SegmentedControlContext =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n React.createContext<SegmentedControlContext<any> | null>(null);\n\nconst useSelectorContext = () => {\n const context = useContext(SegmentedControlContext);\n\n if (context === null) {\n throw new Error('SegmentedControl used without context');\n }\n\n return context;\n};\n\nconst SegmentedControlComponent = <\n T extends SegmentedControlID,\n U extends React.ElementType = 'div',\n>({\n size = 'medium',\n hasOnlyIcons = false,\n children,\n selected,\n onChange,\n as,\n className,\n style,\n isFloating = false,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<U, SegmentedControlProps<T>>) => {\n const classes = classNames('ndl-segmented-control', className, {\n 'ndl-floating': isFloating,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n const Component = as ?? 'div';\n\n return (\n <Component\n className={classes}\n style={style}\n role=\"group\"\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <SegmentedControlContext.Provider\n value={{ hasOnlyIcons, onChange, selected }}\n >\n {children}\n </SegmentedControlContext.Provider>\n </Component>\n );\n};\n\nSegmentedControlComponent.displayName = 'SegmentedControl';\n\ntype SegmentedControlItemProps = {\n /** Additional class name */\n className?: string;\n /** The children component of the segmented control item */\n children?: React.ReactNode;\n /** The value of the segmented control item */\n value: string;\n /** The description of the segmented control item, will be displayed in the tooltip */\n description?: string;\n /** The tooltip props that will be applied if tooltip is set */\n tooltipProps?: TooltipObjectProps;\n /** Whether the segmented control item is disabled */\n isDisabled?: boolean;\n};\n\nconst SegmentedControlItem = <T extends React.ElementType = 'button'>({\n as,\n children,\n className,\n style,\n value,\n htmlAttributes,\n description,\n tooltipProps,\n isDisabled = false,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, SegmentedControlItemProps>) => {\n const { onChange, selected, hasOnlyIcons } = useSelectorContext();\n\n const isSelected = value === selected;\n\n const baseClasses = classNames(className, {\n 'ndl-current': isSelected,\n 'ndl-segment-icon': hasOnlyIcons,\n 'ndl-segment-item': !hasOnlyIcons,\n });\n\n const Component: React.ElementType = as ?? 'button';\n\n return (\n <Tooltip\n isPortaled={false}\n isDisabled={Boolean(description) === false}\n {...tooltipProps?.root}\n type=\"simple\"\n >\n <Tooltip.Trigger {...tooltipProps?.trigger} hasButtonWrapper>\n <Component\n onClick={() => !isSelected && onChange(value)}\n className={baseClasses}\n style={style}\n ref={ref}\n aria-label={description}\n disabled={isDisabled}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Component>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n <Tooltip.Body>{description}</Tooltip.Body>\n </Tooltip.Content>\n </Tooltip>\n );\n};\n\nSegmentedControlItem.displayName = 'SegmentedControl.Item';\n\nconst SegmentedControl = Object.assign(SegmentedControlComponent, {\n Item: SegmentedControlItem,\n});\n\nexport { SegmentedControl };\n"]}
1
+ {"version":3,"file":"SegmentedControl.js","sourceRoot":"","sources":["../../../src/segmented-control/SegmentedControl.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AACpC,+CAA0C;AAM1C,gDAA6C;AAyB7C,wCAAwC;AACxC,MAAM,uBAAuB;AAC3B,8DAA8D;AAC9D,eAAK,CAAC,aAAa,CAAsC,IAAI,CAAC,CAAC;AAEjE,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,M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,uBAAuB,CAAC;AAE3D,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,yBAAyB,EAAE;IAChE,IAAI,EAAE,oBAAoB;CAC3B,CAAC,CAAC;AAEM,4CAAgB","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React, { useContext } from 'react';\n\nimport {\n type PolymorphicCommonProps,\n type TooltipObjectProps,\n} from '../_common/types';\nimport { Tooltip } from '../tooltip/Tooltip';\n\ntype SegmentedControlID = string | number;\n\ntype SegmentedControlProps<T extends SegmentedControlID> = {\n /** Additional class name */\n className?: string;\n /** Size of the segmented control */\n size?: 'small' | 'medium' | 'large';\n /** If segmented control items will include only icons (makes controls rectangular) */\n hasOnlyIcons?: boolean;\n /** The callback function triggered when the segmented control value changes */\n onChange: (e: T) => void | ((e: React.SetStateAction<T>) => void);\n /** The currently selected option */\n selected: T;\n /** The children component of the segmented control */\n children: React.ReactNode;\n /** Whether the segmented control has a box shadow applied */\n isFloating?: boolean;\n};\n\ntype SegmentedControlContext<T extends SegmentedControlID> = Required<\n Pick<SegmentedControlProps<T>, 'onChange' | 'selected' | 'hasOnlyIcons'>\n>;\n\n// eslint-disable-next-line no-redeclare\nconst SegmentedControlContext =\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n React.createContext<SegmentedControlContext<any> | null>(null);\n\nconst useSelectorContext = () => {\n const context = useContext(SegmentedControlContext);\n\n if (context === null) {\n throw new Error('SegmentedControl used without context');\n }\n\n return context;\n};\n\nconst SegmentedControlComponent = <\n T extends SegmentedControlID,\n U extends React.ElementType = 'div',\n>({\n size = 'medium',\n hasOnlyIcons = false,\n children,\n selected,\n onChange,\n as,\n className,\n style,\n isFloating = false,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<U, SegmentedControlProps<T>>) => {\n const classes = classNames('ndl-segmented-control', className, {\n 'ndl-floating': isFloating,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n const Component = as ?? 'div';\n\n return (\n <Component\n className={classes}\n style={style}\n role=\"group\"\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <SegmentedControlContext.Provider\n value={{ hasOnlyIcons, onChange, selected }}\n >\n {children}\n </SegmentedControlContext.Provider>\n </Component>\n );\n};\n\nSegmentedControlComponent.displayName = 'SegmentedControl';\n\ntype SegmentedControlItemProps = {\n /** Additional class name */\n className?: string;\n /** The children component of the segmented control item */\n children?: React.ReactNode;\n /** The value of the segmented control item */\n value: string;\n /** The description of the segmented control item, will be displayed in the tooltip */\n description?: string;\n /** The tooltip props that will be applied if tooltip is set */\n tooltipProps?: TooltipObjectProps;\n /** Whether the segmented control item is disabled */\n isDisabled?: boolean;\n};\n\nconst SegmentedControlItem = <T extends React.ElementType = 'button'>({\n as,\n children,\n className,\n style,\n value,\n htmlAttributes,\n description,\n tooltipProps,\n isDisabled = false,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, SegmentedControlItemProps>) => {\n const { onChange, selected, hasOnlyIcons } = useSelectorContext();\n\n const isSelected = value === selected;\n\n const baseClasses = classNames(className, {\n 'ndl-current': isSelected,\n 'ndl-segment-icon': hasOnlyIcons,\n 'ndl-segment-item': !hasOnlyIcons,\n });\n\n const Component: React.ElementType = as ?? 'button';\n\n return (\n <Tooltip\n isPortaled={false}\n isDisabled={Boolean(description) === false}\n {...tooltipProps?.root}\n type=\"simple\"\n >\n <Tooltip.Trigger {...tooltipProps?.trigger} hasButtonWrapper>\n <Component\n onClick={() => !isSelected && onChange(value)}\n className={baseClasses}\n style={style}\n ref={ref}\n aria-label={description}\n disabled={isDisabled}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Component>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n <Tooltip.Body>{description}</Tooltip.Body>\n </Tooltip.Content>\n </Tooltip>\n );\n};\n\nSegmentedControlItem.displayName = 'SegmentedControl.Item';\n\nconst SegmentedControl = Object.assign(SegmentedControlComponent, {\n Item: SegmentedControlItem,\n});\n\nexport { SegmentedControl };\n"]}
@@ -45,12 +45,12 @@ const tag_1 = require("../tag");
45
45
  const theme_1 = require("../theme");
46
46
  const DropdownIndicatorCurrying = ({ size, }) => function Component(props) {
47
47
  const classes = (0, classnames_1.default)('ndl-select-dropdown-indicator', {
48
- 'ndl-is-multi': props.isMulti,
49
48
  'ndl-disabled': props.isDisabled,
50
49
  'ndl-focused': props.isFocused,
51
- 'ndl-small': size === 'small',
52
- 'ndl-medium': size === 'medium',
50
+ 'ndl-is-multi': props.isMulti,
53
51
  'ndl-large': size === 'large',
52
+ 'ndl-medium': size === 'medium',
53
+ 'ndl-small': size === 'small',
54
54
  });
55
55
  return ((0, jsx_runtime_1.jsx)(react_select_1.components.DropdownIndicator, Object.assign({}, props, { className: classes, children: (0, jsx_runtime_1.jsx)(icons_1.ChevronDownIconOutline, { className: "ndl-select-icon", style: {
56
56
  transform: props.selectProps.menuIsOpen
@@ -63,11 +63,11 @@ exports.DropdownIndicatorCurrying = DropdownIndicatorCurrying;
63
63
  const CustomClearIndication = ({ size, }) => function Component(_a) {
64
64
  var { className } = _a, restProps = __rest(_a, ["className"]);
65
65
  const classes = (0, classnames_1.default)('ndl-select-clear', className, {
66
- 'ndl-is-multi': restProps.isMulti,
67
66
  'ndl-focused': restProps.isFocused,
68
- 'ndl-small': size === 'small',
69
- 'ndl-medium': size === 'medium',
67
+ 'ndl-is-multi': restProps.isMulti,
70
68
  'ndl-large': size === 'large',
69
+ 'ndl-medium': size === 'medium',
70
+ 'ndl-small': size === 'small',
71
71
  });
72
72
  return ((0, jsx_runtime_1.jsx)(react_select_1.components.ClearIndicator, Object.assign({}, restProps, { className: classes, children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(icons_1.XMarkIconOutline, {}), (0, jsx_runtime_1.jsx)("div", { className: "ndl-select-divider" })] }) })));
73
73
  };
@@ -75,12 +75,12 @@ exports.CustomClearIndication = CustomClearIndication;
75
75
  const CustomMultiValue = ({ size, }) => function Component(_a) {
76
76
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
77
77
  const classes = (0, classnames_1.default)('ndl-select-multi-value', className, {
78
- 'ndl-is-multi': restProps.isMulti,
79
78
  'ndl-disabled': restProps.isDisabled,
80
79
  'ndl-focused': restProps.isFocused,
81
- 'ndl-small': size === 'small',
82
- 'ndl-medium': size === 'medium',
80
+ 'ndl-is-multi': restProps.isMulti,
83
81
  'ndl-large': size === 'large',
82
+ 'ndl-medium': size === 'medium',
83
+ 'ndl-small': size === 'small',
84
84
  });
85
85
  return ((0, jsx_runtime_1.jsx)(react_select_1.components.MultiValueContainer, Object.assign({}, restProps, { innerProps: {
86
86
  className: classes,
@@ -96,12 +96,12 @@ exports.CustomMultiValue = CustomMultiValue;
96
96
  const CustomPlaceholder = ({ size, }) => function Component(_a) {
97
97
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
98
98
  const classes = (0, classnames_1.default)('ndl-select-placeholder', className, {
99
- 'ndl-is-multi': restProps.isMulti,
100
99
  'ndl-disabled': restProps.isDisabled,
101
100
  'ndl-focused': restProps.isFocused,
102
- 'ndl-small': size === 'small',
103
- 'ndl-medium': size === 'medium',
101
+ 'ndl-is-multi': restProps.isMulti,
104
102
  'ndl-large': size === 'large',
103
+ 'ndl-medium': size === 'medium',
104
+ 'ndl-small': size === 'small',
105
105
  });
106
106
  return ((0, jsx_runtime_1.jsx)(react_select_1.components.Placeholder, Object.assign({}, restProps, { className: classes, children: children })));
107
107
  };
@@ -109,14 +109,14 @@ exports.CustomPlaceholder = CustomPlaceholder;
109
109
  const CustomControl = ({ size, isClean, errorText, }) => function Component(_a) {
110
110
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
111
111
  const classes = (0, classnames_1.default)('ndl-select-control', className, {
112
- 'ndl-is-multi': restProps.isMulti,
112
+ 'ndl-clean': isClean,
113
113
  'ndl-disabled': restProps.isDisabled,
114
114
  'ndl-focused': restProps.isFocused,
115
- 'ndl-small': size === 'small',
116
- 'ndl-medium': size === 'medium',
117
- 'ndl-large': size === 'large',
118
- 'ndl-clean': isClean,
119
115
  'ndl-has-error': !!errorText,
116
+ 'ndl-is-multi': restProps.isMulti,
117
+ 'ndl-large': size === 'large',
118
+ 'ndl-medium': size === 'medium',
119
+ 'ndl-small': size === 'small',
120
120
  });
121
121
  return ((0, jsx_runtime_1.jsx)(react_select_1.components.Control, Object.assign({}, restProps, { className: classes, children: children })));
122
122
  };
@@ -124,11 +124,11 @@ exports.CustomControl = CustomControl;
124
124
  const CustomIndicatorsContainer = ({ size, }) => function Component(_a) {
125
125
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
126
126
  const classes = (0, classnames_1.default)('ndl-select-indicators-container', className, {
127
- 'ndl-is-multi': restProps.isMulti,
128
127
  'ndl-disabled': restProps.isDisabled,
129
- 'ndl-small': size === 'small',
130
- 'ndl-medium': size === 'medium',
128
+ 'ndl-is-multi': restProps.isMulti,
131
129
  'ndl-large': size === 'large',
130
+ 'ndl-medium': size === 'medium',
131
+ 'ndl-small': size === 'small',
132
132
  });
133
133
  return ((0, jsx_runtime_1.jsx)(react_select_1.components.IndicatorsContainer, Object.assign({}, restProps, { className: classes, children: children })));
134
134
  };
@@ -136,11 +136,11 @@ exports.CustomIndicatorsContainer = CustomIndicatorsContainer;
136
136
  const CustomValueContainer = ({ size, }) => function Component(_a) {
137
137
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
138
138
  const classes = (0, classnames_1.default)('ndl-select-value-container', className, {
139
- 'ndl-is-multi': restProps.isMulti,
140
139
  'ndl-disabled': restProps.isDisabled,
141
- 'ndl-small': size === 'small',
142
- 'ndl-medium': size === 'medium',
140
+ 'ndl-is-multi': restProps.isMulti,
143
141
  'ndl-large': size === 'large',
142
+ 'ndl-medium': size === 'medium',
143
+ 'ndl-small': size === 'small',
144
144
  });
145
145
  return ((0, jsx_runtime_1.jsx)(react_select_1.components.ValueContainer, Object.assign({}, restProps, { className: classes, children: children })));
146
146
  };
@@ -148,11 +148,11 @@ exports.CustomValueContainer = CustomValueContainer;
148
148
  const CustomInput = ({ size, }) => function Component(_a) {
149
149
  var { className } = _a, restProps = __rest(_a, ["className"]);
150
150
  const classes = (0, classnames_1.default)('ndl-select-input', className, {
151
- 'ndl-is-multi': restProps.isMulti,
152
151
  'ndl-disabled': restProps.isDisabled,
153
- 'ndl-small': size === 'small',
154
- 'ndl-medium': size === 'medium',
152
+ 'ndl-is-multi': restProps.isMulti,
155
153
  'ndl-large': size === 'large',
154
+ 'ndl-medium': size === 'medium',
155
+ 'ndl-small': size === 'small',
156
156
  });
157
157
  return (0, jsx_runtime_1.jsx)(react_select_1.components.Input, Object.assign({}, restProps, { className: classes }));
158
158
  };
@@ -160,11 +160,11 @@ exports.CustomInput = CustomInput;
160
160
  const CustomSingleValue = ({ size, }) => function Component(_a) {
161
161
  var { className } = _a, restProps = __rest(_a, ["className"]);
162
162
  const classes = (0, classnames_1.default)('ndl-select-single-value', className, {
163
- 'ndl-is-multi': restProps.isMulti,
164
163
  'ndl-disabled': restProps.isDisabled,
165
- 'ndl-small': size === 'small',
166
- 'ndl-medium': size === 'medium',
164
+ 'ndl-is-multi': restProps.isMulti,
167
165
  'ndl-large': size === 'large',
166
+ 'ndl-medium': size === 'medium',
167
+ 'ndl-small': size === 'small',
168
168
  });
169
169
  return (0, jsx_runtime_1.jsx)(react_select_1.components.SingleValue, Object.assign({}, restProps, { className: classes }));
170
170
  };
@@ -175,9 +175,9 @@ const CustomMenu = ({ size, }) => function Component(_a) {
175
175
  const { themeClassName } = (0, theme_1.useNeedleTheme)();
176
176
  const classes = (0, classnames_1.default)('ndl-select-menu', className, themeClassName, {
177
177
  'ndl-is-multi': restProps.isMulti,
178
- 'ndl-small': size === 'small',
179
- 'ndl-medium': size === 'medium',
180
178
  'ndl-large': size === 'large',
179
+ 'ndl-medium': size === 'medium',
180
+ 'ndl-small': size === 'small',
181
181
  });
182
182
  return ((0, jsx_runtime_1.jsx)(react_select_1.components.Menu, Object.assign({}, restProps, { className: classes, children: children })));
183
183
  };
@@ -186,9 +186,9 @@ const CustomMenuPortal = ({ size, }) => function Component(_a) {
186
186
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
187
187
  const classes = (0, classnames_1.default)(className, 'ndl-select-menu-portal', {
188
188
  'ndl-is-multi': restProps.isMulti,
189
- 'ndl-small': size === 'small',
190
- 'ndl-medium': size === 'medium',
191
189
  'ndl-large': size === 'large',
190
+ 'ndl-medium': size === 'medium',
191
+ 'ndl-small': size === 'small',
192
192
  });
193
193
  return ((0, jsx_runtime_1.jsx)(react_select_1.components.MenuPortal, Object.assign({}, restProps, { className: classes, children: children })));
194
194
  };
@@ -197,9 +197,9 @@ const CustomMenuList = ({ size, }) => function Component(_a) {
197
197
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
198
198
  const classes = (0, classnames_1.default)(className, 'ndl-select-menu-list', {
199
199
  'ndl-is-multi': restProps.isMulti,
200
- 'ndl-small': size === 'small',
201
- 'ndl-medium': size === 'medium',
202
200
  'ndl-large': size === 'large',
201
+ 'ndl-medium': size === 'medium',
202
+ 'ndl-small': size === 'small',
203
203
  });
204
204
  return ((0, jsx_runtime_1.jsx)(react_select_1.components.MenuList, Object.assign({}, restProps, { className: classes, children: children })));
205
205
  };
@@ -207,15 +207,17 @@ exports.CustomMenuList = CustomMenuList;
207
207
  const CustomOption = ({ size, }) => function Component(_a) {
208
208
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
209
209
  const classes = (0, classnames_1.default)(className, 'ndl-select-option', {
210
- 'ndl-is-multi': restProps.isMulti,
211
210
  'ndl-disabled': restProps.isDisabled,
212
- 'ndl-selected': restProps.isSelected,
213
211
  'ndl-focused': restProps.isFocused,
214
- 'ndl-small': size === 'small',
215
- 'ndl-medium': size === 'medium',
212
+ 'ndl-is-multi': restProps.isMulti,
216
213
  'ndl-large': size === 'large',
214
+ 'ndl-medium': size === 'medium',
215
+ 'ndl-selected': restProps.isSelected,
216
+ 'ndl-small': size === 'small',
217
217
  });
218
218
  return ((0, jsx_runtime_1.jsxs)(react_select_1.components.Option, Object.assign({}, restProps, { className: classes, children: [restProps.isMulti === true && ((0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, { isChecked: restProps.isSelected, ariaLabel: restProps.label, isDisabled: restProps.isDisabled, htmlAttributes: {
219
+ 'aria-hidden': true,
220
+ disabled: true,
219
221
  onPointerDown: (e) => {
220
222
  var _a, _b;
221
223
  e.preventDefault();
@@ -226,8 +228,6 @@ const CustomOption = ({ size, }) => function Component(_a) {
226
228
  e.preventDefault();
227
229
  (_b = (_a = restProps.innerProps).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
228
230
  },
229
- disabled: true,
230
- 'aria-hidden': true,
231
231
  role: 'presentation',
232
232
  tabIndex: -1,
233
233
  } })), children] })));
@@ -1 +1 @@
1
- {"version":3,"file":"Overrides.js","sourceRoot":"","sources":["../../../src/select/Overrides.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,0CAAyC;AACzC,4DAAoC;AACpC,+CAcsB;AAMtB,0CAAuC;AACvC,oCAAoE;AACpE,gCAA6B;AAC7B,oCAA0C;AAGnC,MAAM,yBAAyB,GAAG,CAIvC,EACA,IAAI,GACsD,EAAE,EAAE,CAC9D,SAAS,SAAS,CAChB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AAC,CAAC,cAAc,EAAE,CAAC;wBACnB,MAAA,MAAA,SAAS,CAAC,UAAU,EAAC,OAAO,mDAAG,CAAC,CAAC,CAAC;oBACpC,CAAC;oBACD,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE;;wBAClB,CAAC,CAAC,cAAc,EAAE,CAAC;wBACnB,MAAA,MAAA,SAAS,CAAC,UAAU,EAAC,OAAO,mDAC1B,CAA4D,CAC7D,CAAC;oBACJ,CAAC;oBACD,QAAQ,EAAE,IAAI;oBACd,aAAa,EAAE,IAAI;oBACnB,IAAI,EAAE,cAAc;oBACpB,QAAQ,EAAE,CAAC,CAAC;iBACb,GACD,CACH,EACA,QAAQ,KACS,CACrB,CAAC;AACJ,CAAC,CAAC;AAjDS,QAAA,YAAY,gBAiDrB","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\nimport {\n type ClearIndicatorProps,\n components,\n type ControlProps,\n type DropdownIndicatorProps,\n type GroupBase,\n type IndicatorsContainerProps,\n type InputProps,\n type MenuProps,\n type MultiValueProps,\n type OptionProps,\n type PlaceholderProps,\n type SingleValueProps,\n type ValueContainerProps,\n} from 'react-select';\nimport {\n type MenuListProps,\n type MenuPortalProps,\n} from 'react-select/dist/declarations/src/components/Menu';\n\nimport { Checkbox } from '../checkbox';\nimport { ChevronDownIconOutline, XMarkIconOutline } from '../icons';\nimport { Tag } from '../tag';\nimport { useNeedleTheme } from '../theme';\nimport { type SelectOverrideCustomProps } from './types';\n\nexport const DropdownIndicatorCurrying = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component(\n props: DropdownIndicatorProps<OptionType, IsMulti, GroupType>,\n ) {\n const classes = classNames('ndl-select-dropdown-indicator', {\n 'ndl-is-multi': props.isMulti,\n 'ndl-disabled': props.isDisabled,\n 'ndl-focused': props.isFocused,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n\n return (\n <components.DropdownIndicator {...props} className={classes}>\n <ChevronDownIconOutline\n className=\"ndl-select-icon\"\n style={{\n transform: props.selectProps.menuIsOpen\n ? 'rotate(180deg)'\n : 'rotate(0deg)',\n transitionDuration: tokens.motion.duration.quick,\n }}\n />\n </components.DropdownIndicator>\n );\n };\n\nexport const CustomClearIndication = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n className,\n ...restProps\n }: ClearIndicatorProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames('ndl-select-clear', className, {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-focused': restProps.isFocused,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n return (\n <components.ClearIndicator {...restProps} className={classes}>\n <div>\n <XMarkIconOutline />\n <div className=\"ndl-select-divider\" />\n </div>\n </components.ClearIndicator>\n );\n };\n\nexport const CustomMultiValue = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: MultiValueProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames('ndl-select-multi-value', className, {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n return (\n <components.MultiValueContainer\n {...restProps}\n innerProps={{\n className: classes,\n }}\n >\n <Tag\n size={size}\n onClick={(e) => {\n e.preventDefault();\n restProps.removeProps.onClick?.(\n e as unknown as React.MouseEvent<HTMLDivElement, MouseEvent>,\n );\n }}\n htmlAttributes={{\n onMouseDown: (e) => e.preventDefault(),\n }}\n >\n {children}\n </Tag>\n </components.MultiValueContainer>\n );\n };\n\nexport const CustomPlaceholder = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: PlaceholderProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames('ndl-select-placeholder', className, {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n return (\n <components.Placeholder {...restProps} className={classes}>\n {children}\n </components.Placeholder>\n );\n };\n\nexport const CustomControl = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n isClean,\n errorText,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ children, className, ...restProps }: ControlProps) {\n const classes = classNames('ndl-select-control', className, {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n 'ndl-clean': isClean,\n 'ndl-has-error': !!errorText,\n });\n\n return (\n <components.Control {...restProps} className={classes}>\n {children}\n </components.Control>\n );\n };\n\nexport const CustomIndicatorsContainer = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: IndicatorsContainerProps) {\n const classes = classNames('ndl-select-indicators-container', className, {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n return (\n <components.IndicatorsContainer {...restProps} className={classes}>\n {children}\n </components.IndicatorsContainer>\n );\n };\n\nexport const CustomValueContainer = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: ValueContainerProps) {\n const classes = classNames('ndl-select-value-container', className, {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n return (\n <components.ValueContainer {...restProps} className={classes}>\n {children}\n </components.ValueContainer>\n );\n };\n\nexport const CustomInput = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ className, ...restProps }: InputProps) {\n const classes = classNames('ndl-select-input', className, {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n return <components.Input {...restProps} className={classes} />;\n };\n\nexport const CustomSingleValue = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ className, ...restProps }: SingleValueProps) {\n const classes = classNames('ndl-select-single-value', className, {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n return <components.SingleValue {...restProps} className={classes} />;\n };\n\n/** Overrides that are part of the popover menu */\n\nexport const CustomMenu = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ children, className, ...restProps }: MenuProps) {\n const { themeClassName } = useNeedleTheme();\n const classes = classNames('ndl-select-menu', className, themeClassName, {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n return (\n <components.Menu {...restProps} className={classes}>\n {children}\n </components.Menu>\n );\n };\n\nexport const CustomMenuPortal = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: MenuPortalProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames(className, 'ndl-select-menu-portal', {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n return (\n <components.MenuPortal {...restProps} className={classes}>\n {children}\n </components.MenuPortal>\n );\n };\n\nexport const CustomMenuList = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: MenuListProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames(className, 'ndl-select-menu-list', {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n return (\n <components.MenuList {...restProps} className={classes}>\n {children}\n </components.MenuList>\n );\n };\n\nexport const CustomOption = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: OptionProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames(className, 'ndl-select-option', {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-selected': restProps.isSelected,\n 'ndl-focused': restProps.isFocused,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n return (\n <components.Option {...restProps} className={classes}>\n {restProps.isMulti === true && (\n <Checkbox\n isChecked={restProps.isSelected}\n ariaLabel={restProps.label}\n isDisabled={restProps.isDisabled}\n htmlAttributes={{\n onPointerDown: (e) => {\n e.preventDefault();\n restProps.innerProps.onClick?.(e);\n },\n onTouchStart: (e) => {\n e.preventDefault();\n restProps.innerProps.onClick?.(\n e as unknown as React.MouseEvent<HTMLDivElement, MouseEvent>,\n );\n },\n disabled: true,\n 'aria-hidden': true,\n role: 'presentation',\n tabIndex: -1,\n }}\n />\n )}\n {children}\n </components.Option>\n );\n };\n"]}
1
+ {"version":3,"file":"Overrides.js","sourceRoot":"","sources":["../../../src/select/Overrides.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,0CAAyC;AACzC,4DAAoC;AACpC,+CAcsB;AAMtB,0CAAuC;AACvC,oCAAoE;AACpE,gCAA6B;AAC7B,oCAA0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E,SAAS,CAAC,UAAU,EAChC,cAAc,EAAE;oBACd,aAAa,EAAE,IAAI;oBACnB,QAAQ,EAAE,IAAI;oBACd,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE;;wBACnB,CAAC,CAAC,cAAc,EAAE,CAAC;wBACnB,MAAA,MAAA,SAAS,CAAC,UAAU,EAAC,OAAO,mDAAG,CAAC,CAAC,CAAC;oBACpC,CAAC;oBACD,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE;;wBAClB,CAAC,CAAC,cAAc,EAAE,CAAC;wBACnB,MAAA,MAAA,SAAS,CAAC,UAAU,EAAC,OAAO,mDAC1B,CAA4D,CAC7D,CAAC;oBACJ,CAAC;oBACD,IAAI,EAAE,cAAc;oBACpB,QAAQ,EAAE,CAAC,CAAC;iBACb,GACD,CACH,EACA,QAAQ,KACS,CACrB,CAAC;AACJ,CAAC,CAAC;AAjDS,QAAA,YAAY,gBAiDrB","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\nimport {\n type ClearIndicatorProps,\n components,\n type ControlProps,\n type DropdownIndicatorProps,\n type GroupBase,\n type IndicatorsContainerProps,\n type InputProps,\n type MenuProps,\n type MultiValueProps,\n type OptionProps,\n type PlaceholderProps,\n type SingleValueProps,\n type ValueContainerProps,\n} from 'react-select';\nimport {\n type MenuListProps,\n type MenuPortalProps,\n} from 'react-select/dist/declarations/src/components/Menu';\n\nimport { Checkbox } from '../checkbox';\nimport { ChevronDownIconOutline, XMarkIconOutline } from '../icons';\nimport { Tag } from '../tag';\nimport { useNeedleTheme } from '../theme';\nimport { type SelectOverrideCustomProps } from './types';\n\nexport const DropdownIndicatorCurrying = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component(\n props: DropdownIndicatorProps<OptionType, IsMulti, GroupType>,\n ) {\n const classes = classNames('ndl-select-dropdown-indicator', {\n 'ndl-disabled': props.isDisabled,\n 'ndl-focused': props.isFocused,\n 'ndl-is-multi': props.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n return (\n <components.DropdownIndicator {...props} className={classes}>\n <ChevronDownIconOutline\n className=\"ndl-select-icon\"\n style={{\n transform: props.selectProps.menuIsOpen\n ? 'rotate(180deg)'\n : 'rotate(0deg)',\n transitionDuration: tokens.motion.duration.quick,\n }}\n />\n </components.DropdownIndicator>\n );\n };\n\nexport const CustomClearIndication = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n className,\n ...restProps\n }: ClearIndicatorProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames('ndl-select-clear', className, {\n 'ndl-focused': restProps.isFocused,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.ClearIndicator {...restProps} className={classes}>\n <div>\n <XMarkIconOutline />\n <div className=\"ndl-select-divider\" />\n </div>\n </components.ClearIndicator>\n );\n };\n\nexport const CustomMultiValue = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: MultiValueProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames('ndl-select-multi-value', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.MultiValueContainer\n {...restProps}\n innerProps={{\n className: classes,\n }}\n >\n <Tag\n size={size}\n onClick={(e) => {\n e.preventDefault();\n restProps.removeProps.onClick?.(\n e as unknown as React.MouseEvent<HTMLDivElement, MouseEvent>,\n );\n }}\n htmlAttributes={{\n onMouseDown: (e) => e.preventDefault(),\n }}\n >\n {children}\n </Tag>\n </components.MultiValueContainer>\n );\n };\n\nexport const CustomPlaceholder = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: PlaceholderProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames('ndl-select-placeholder', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.Placeholder {...restProps} className={classes}>\n {children}\n </components.Placeholder>\n );\n };\n\nexport const CustomControl = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n isClean,\n errorText,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ children, className, ...restProps }: ControlProps) {\n const classes = classNames('ndl-select-control', className, {\n 'ndl-clean': isClean,\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-has-error': !!errorText,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n return (\n <components.Control {...restProps} className={classes}>\n {children}\n </components.Control>\n );\n };\n\nexport const CustomIndicatorsContainer = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: IndicatorsContainerProps) {\n const classes = classNames('ndl-select-indicators-container', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.IndicatorsContainer {...restProps} className={classes}>\n {children}\n </components.IndicatorsContainer>\n );\n };\n\nexport const CustomValueContainer = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: ValueContainerProps) {\n const classes = classNames('ndl-select-value-container', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.ValueContainer {...restProps} className={classes}>\n {children}\n </components.ValueContainer>\n );\n };\n\nexport const CustomInput = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ className, ...restProps }: InputProps) {\n const classes = classNames('ndl-select-input', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return <components.Input {...restProps} className={classes} />;\n };\n\nexport const CustomSingleValue = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ className, ...restProps }: SingleValueProps) {\n const classes = classNames('ndl-select-single-value', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return <components.SingleValue {...restProps} className={classes} />;\n };\n\n/** Overrides that are part of the popover menu */\n\nexport const CustomMenu = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ children, className, ...restProps }: MenuProps) {\n const { themeClassName } = useNeedleTheme();\n const classes = classNames('ndl-select-menu', className, themeClassName, {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.Menu {...restProps} className={classes}>\n {children}\n </components.Menu>\n );\n };\n\nexport const CustomMenuPortal = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: MenuPortalProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames(className, 'ndl-select-menu-portal', {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.MenuPortal {...restProps} className={classes}>\n {children}\n </components.MenuPortal>\n );\n };\n\nexport const CustomMenuList = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: MenuListProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames(className, 'ndl-select-menu-list', {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.MenuList {...restProps} className={classes}>\n {children}\n </components.MenuList>\n );\n };\n\nexport const CustomOption = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: OptionProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames(className, 'ndl-select-option', {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-selected': restProps.isSelected,\n 'ndl-small': size === 'small',\n });\n return (\n <components.Option {...restProps} className={classes}>\n {restProps.isMulti === true && (\n <Checkbox\n isChecked={restProps.isSelected}\n ariaLabel={restProps.label}\n isDisabled={restProps.isDisabled}\n htmlAttributes={{\n 'aria-hidden': true,\n disabled: true,\n onPointerDown: (e) => {\n e.preventDefault();\n restProps.innerProps.onClick?.(e);\n },\n onTouchStart: (e) => {\n e.preventDefault();\n restProps.innerProps.onClick?.(\n e as unknown as React.MouseEvent<HTMLDivElement, MouseEvent>,\n );\n },\n role: 'presentation',\n tabIndex: -1,\n }}\n />\n )}\n {children}\n </components.Option>\n );\n };\n"]}
@@ -40,12 +40,12 @@ const loadOptions = (inputValue) => {
40
40
  const Component = (props) => {
41
41
  var _a;
42
42
  return ((0, jsx_runtime_1.jsx)(react_1.Select, { label: "Label", helpText: "Start typing to load options dynamically", type: "async", selectProps: {
43
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
44
- loadOptions,
45
- placeholder: 'Type to search...',
46
- isClearable: true,
47
43
  cacheOptions: true,
48
44
  defaultOptions: true,
45
+ isClearable: true,
46
+ loadOptions,
47
+ menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
48
+ placeholder: 'Type to search...',
49
49
  } }));
50
50
  };
51
51
  exports.default = Component;
@@ -1 +1 @@
1
- {"version":3,"file":"select-async.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-async.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,UAAkB,EAAE,EAAE;IACzC,OAAO,IAAI,OAAO,CAAyB,CAAC,OAAO,EAAE,EAAE;QACrD,UAAU,CAAC,GAAG,EAAE;YACd,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CACxD,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAC9D,CAAC;YACF,OAAO,CAAC,eAAe,CAAC,CAAC;QAC3B,CAAC,EAAE,IAAI,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,0CAA0C,EACnD,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE;YACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;YACzC,WAAW;YACX,WAAW,EAAE,mBAAmB;YAChC,WAAW,EAAE,IAAI;YACjB,YAAY,EAAE,IAAI;YAClB,cAAc,EAAE,IAAI;SACrB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst loadOptions = (inputValue: string) => {\n return new Promise<typeof EXAMPLE_OPTIONS>((resolve) => {\n setTimeout(() => {\n const filteredOptions = EXAMPLE_OPTIONS.filter((option) =>\n option.label.toLowerCase().includes(inputValue.toLowerCase()),\n );\n resolve(filteredOptions);\n }, 1000);\n });\n};\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label=\"Label\"\n helpText=\"Start typing to load options dynamically\"\n type=\"async\"\n selectProps={{\n menuIsOpen: props.selectProps?.menuIsOpen,\n loadOptions,\n placeholder: 'Type to search...',\n isClearable: true,\n cacheOptions: true,\n defaultOptions: true,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-async.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-async.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,UAAkB,EAAE,EAAE;IACzC,OAAO,IAAI,OAAO,CAAyB,CAAC,OAAO,EAAE,EAAE;QACrD,UAAU,CAAC,GAAG,EAAE;YACd,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CACxD,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAC9D,CAAC;YACF,OAAO,CAAC,eAAe,CAAC,CAAC;QAC3B,CAAC,EAAE,IAAI,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,0CAA0C,EACnD,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,cAAc,EAAE,IAAI;YACpB,WAAW,EAAE,IAAI;YACjB,WAAW;YACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;YACzC,WAAW,EAAE,mBAAmB;SACjC,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst loadOptions = (inputValue: string) => {\n return new Promise<typeof EXAMPLE_OPTIONS>((resolve) => {\n setTimeout(() => {\n const filteredOptions = EXAMPLE_OPTIONS.filter((option) =>\n option.label.toLowerCase().includes(inputValue.toLowerCase()),\n );\n resolve(filteredOptions);\n }, 1000);\n });\n};\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label=\"Label\"\n helpText=\"Start typing to load options dynamically\"\n type=\"async\"\n selectProps={{\n cacheOptions: true,\n defaultOptions: true,\n isClearable: true,\n loadOptions,\n menuIsOpen: props.selectProps?.menuIsOpen,\n placeholder: 'Type to search...',\n }}\n />\n );\n};\n\nexport default Component;\n"]}
@@ -33,12 +33,12 @@ const Component = (props) => {
33
33
  var _a;
34
34
  const [value, setValue] = (0, react_2.useState)(EXAMPLE_OPTIONS[0]);
35
35
  return ((0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-token-8", children: [(0, jsx_runtime_1.jsx)(react_1.Select, { label: "Label", type: "select", selectProps: {
36
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
37
- value: value,
38
- options: EXAMPLE_OPTIONS,
39
36
  isMulti: false,
40
- onChange: (newValue) => newValue && setValue(newValue),
37
+ menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
41
38
  menuPortalTarget: document.querySelector('body'),
39
+ onChange: (newValue) => newValue && setValue(newValue),
40
+ options: EXAMPLE_OPTIONS,
41
+ value: value,
42
42
  } }), (0, jsx_runtime_1.jsxs)(react_1.Typography, { variant: "body-small", children: ["Value Selected: ", JSON.stringify(value)] })] }));
43
43
  };
44
44
  exports.default = Component;
@@ -1 +1 @@
1
- {"version":3,"file":"select-controlled.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-controlled.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4CAAsD;AACtD,iCAAiC;AAEjC,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAChC,eAAe,CAAC,CAAC,CAAC,CACnB,CAAC;IAEF,OAAO,CACL,iCAAK,SAAS,EAAC,iCAAiC,aAC9C,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;oBACzC,KAAK,EAAE,KAAK;oBACZ,OAAO,EAAE,eAAe;oBACxB,OAAO,EAAE,KAAK;oBACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC;oBACtD,gBAAgB,EAAE,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC;iBACjD,GACD,EACF,wBAAC,kBAAU,IAAC,OAAO,EAAC,YAAY,iCACb,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAC3B,IACT,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Select, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n const [value, setValue] = useState<(typeof EXAMPLE_OPTIONS)[number]>(\n EXAMPLE_OPTIONS[0],\n );\n\n return (\n <div className=\"n-flex n-flex-col n-gap-token-8\">\n <Select\n label=\"Label\"\n type=\"select\"\n selectProps={{\n menuIsOpen: props.selectProps?.menuIsOpen,\n value: value,\n options: EXAMPLE_OPTIONS,\n isMulti: false,\n onChange: (newValue) => newValue && setValue(newValue),\n menuPortalTarget: document.querySelector('body'),\n }}\n />\n <Typography variant=\"body-small\">\n Value Selected: {JSON.stringify(value)}\n </Typography>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-controlled.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-controlled.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4CAAsD;AACtD,iCAAiC;AAEjC,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAChC,eAAe,CAAC,CAAC,CAAC,CACnB,CAAC;IAEF,OAAO,CACL,iCAAK,SAAS,EAAC,iCAAiC,aAC9C,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,OAAO,EAAE,KAAK;oBACd,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;oBACzC,gBAAgB,EAAE,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC;oBAChD,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC;oBACtD,OAAO,EAAE,eAAe;oBACxB,KAAK,EAAE,KAAK;iBACb,GACD,EACF,wBAAC,kBAAU,IAAC,OAAO,EAAC,YAAY,iCACb,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAC3B,IACT,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Select, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n const [value, setValue] = useState<(typeof EXAMPLE_OPTIONS)[number]>(\n EXAMPLE_OPTIONS[0],\n );\n\n return (\n <div className=\"n-flex n-flex-col n-gap-token-8\">\n <Select\n label=\"Label\"\n type=\"select\"\n selectProps={{\n isMulti: false,\n menuIsOpen: props.selectProps?.menuIsOpen,\n menuPortalTarget: document.querySelector('body'),\n onChange: (newValue) => newValue && setValue(newValue),\n options: EXAMPLE_OPTIONS,\n value: value,\n }}\n />\n <Typography variant=\"body-small\">\n Value Selected: {JSON.stringify(value)}\n </Typography>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -32,9 +32,9 @@ const EXAMPLE_OPTIONS = [
32
32
  const Component = (props) => {
33
33
  var _a;
34
34
  return ((0, jsx_runtime_1.jsx)(react_1.Select, { label: "Label", helpText: "You can create values even if they don't exist as options", type: "creatable", selectProps: {
35
+ isClearable: true,
35
36
  menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
36
37
  options: EXAMPLE_OPTIONS,
37
- isClearable: true,
38
38
  } }));
39
39
  };
40
40
  exports.default = Component;
@@ -1 +1 @@
1
- {"version":3,"file":"select-creatable.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-creatable.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,2DAA2D,EACpE,IAAI,EAAC,WAAW,EAChB,WAAW,EAAE;YACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;YACzC,OAAO,EAAE,eAAe;YACxB,WAAW,EAAE,IAAI;SAClB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label=\"Label\"\n helpText=\"You can create values even if they don't exist as options\"\n type=\"creatable\"\n selectProps={{\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n isClearable: true,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-creatable.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-creatable.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,2DAA2D,EACpE,IAAI,EAAC,WAAW,EAChB,WAAW,EAAE;YACX,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;YACzC,OAAO,EAAE,eAAe;SACzB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label=\"Label\"\n helpText=\"You can create values even if they don't exist as options\"\n type=\"creatable\"\n selectProps={{\n isClearable: true,\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
@@ -33,9 +33,9 @@ const EXAMPLE_OPTIONS = [
33
33
  const Component = (props) => {
34
34
  var _a;
35
35
  return ((0, jsx_runtime_1.jsx)(react_1.Select, { label: (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-row n-gap-token-4 n-h-7 n-items-center", children: ["Custom JSX element", (0, jsx_runtime_1.jsx)(icons_1.QuestionMarkCircleIconOutline, { className: "n-h-token-16" })] }), helpText: "You can have a custom label with JSX code \uD83D\uDE31", type: "select", selectProps: {
36
+ defaultValue: EXAMPLE_OPTIONS[1],
36
37
  menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
37
38
  options: EXAMPLE_OPTIONS,
38
- defaultValue: EXAMPLE_OPTIONS[1],
39
39
  } }));
40
40
  };
41
41
  exports.default = Component;
@@ -1 +1 @@
1
- {"version":3,"file":"select-custom-label.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-custom-label.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAC1C,kDAAuE;AAEvE,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AACF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EACH,iCAAK,SAAS,EAAC,sDAAsD,mCAEnE,uBAAC,qCAA6B,IAAC,SAAS,EAAC,cAAc,GAAG,IACtD,EAER,QAAQ,EAAC,wDAA8C,EACvD,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;YACzC,OAAO,EAAE,eAAe;YACxB,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;SACjC,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\nimport { QuestionMarkCircleIconOutline } from '@neo4j-ndl/react/icons';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label={\n <div className=\"n-flex n-flex-row n-gap-token-4 n-h-7 n-items-center\">\n Custom JSX element\n <QuestionMarkCircleIconOutline className=\"n-h-token-16\" />\n </div>\n }\n helpText=\"You can have a custom label with JSX code 😱\"\n type=\"select\"\n selectProps={{\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n defaultValue: EXAMPLE_OPTIONS[1],\n }}\n />\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-custom-label.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-custom-label.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAC1C,kDAAuE;AAEvE,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AACF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EACH,iCAAK,SAAS,EAAC,sDAAsD,mCAEnE,uBAAC,qCAA6B,IAAC,SAAS,EAAC,cAAc,GAAG,IACtD,EAER,QAAQ,EAAC,wDAA8C,EACvD,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;YAChC,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;YACzC,OAAO,EAAE,eAAe;SACzB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\nimport { QuestionMarkCircleIconOutline } from '@neo4j-ndl/react/icons';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label={\n <div className=\"n-flex n-flex-row n-gap-token-4 n-h-7 n-items-center\">\n Custom JSX element\n <QuestionMarkCircleIconOutline className=\"n-h-token-16\" />\n </div>\n }\n helpText=\"You can have a custom label with JSX code 😱\"\n type=\"select\"\n selectProps={{\n defaultValue: EXAMPLE_OPTIONS[1],\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
@@ -32,8 +32,8 @@ const EXAMPLE_OPTIONS = [
32
32
  const Component = (props) => {
33
33
  var _a;
34
34
  return ((0, jsx_runtime_1.jsx)(react_1.Select, { label: "Label", type: "select", selectProps: {
35
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
36
35
  isDisabled: true,
36
+ menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
37
37
  options: EXAMPLE_OPTIONS,
38
38
  } }));
39
39
  };
@@ -1 +1 @@
1
- {"version":3,"file":"select-disabled.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-disabled.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;YACzC,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE,eAAe;SACzB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label=\"Label\"\n type=\"select\"\n selectProps={{\n menuIsOpen: props.selectProps?.menuIsOpen,\n isDisabled: true,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-disabled.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-disabled.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;YACzC,OAAO,EAAE,eAAe;SACzB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label=\"Label\"\n type=\"select\"\n selectProps={{\n isDisabled: true,\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
@@ -35,9 +35,9 @@ const Component = (props) => {
35
35
  const ref = (0, react_2.useRef)(null);
36
36
  const [isOpen, setIsOpen] = (0, react_2.useState)(false);
37
37
  return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, className: "n-flex n-flex-col n-items-center n-justify-center n-relative n-h-[500px]", children: [(0, jsx_runtime_1.jsx)(react_1.FilledButton, { size: "medium", onClick: () => setIsOpen(true), children: "Open Dialog" }), (0, jsx_runtime_1.jsxs)(react_1.Dialog, { container: (ref === null || ref === void 0 ? void 0 : ref.current) || undefined, isOpen: isOpen, onClose: () => setIsOpen(false), "aria-label": "Dialog", children: [(0, jsx_runtime_1.jsx)(react_1.Dialog.Header, { children: "Using Select inside a dialog" }), (0, jsx_runtime_1.jsxs)(react_1.Dialog.Description, { className: "n-flex n-flex-col n-gap-token-32", children: [(0, jsx_runtime_1.jsxs)(react_1.Typography, { variant: "body-medium", children: ["To use select inside a dialog and avoid the cut-off, you need to use the property ", (0, jsx_runtime_1.jsx)("code", { children: "menuPosition: \"fixed\"" }), " inside the", ' ', (0, jsx_runtime_1.jsx)("code", { children: "selectProps" }), ". This is done automatically if used in a Needle Dialog, but can always be overridden manually."] }), (0, jsx_runtime_1.jsx)(react_1.Select, { label: "Inside a dialog", type: "select", selectProps: {
38
+ defaultValue: EXAMPLE_OPTIONS[1],
38
39
  menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
39
40
  options: EXAMPLE_OPTIONS,
40
- defaultValue: EXAMPLE_OPTIONS[1],
41
41
  } })] })] })] }));
42
42
  };
43
43
  exports.default = Component;
@@ -1 +1 @@
1
- {"version":3,"file":"select-inside-dialog.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-inside-dialog.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA4E;AAC5E,iCAAyC;AAEzC,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,MAAM,GAAG,GAAG,IAAA,cAAM,EAAwB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAU,KAAK,CAAC,CAAC;IAErD,OAAO,CACL,iCACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAC,0EAA0E,aAEpF,uBAAC,oBAAY,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,4BAE3C,EACf,wBAAC,cAAM,IACL,SAAS,EAAE,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,KAAI,SAAS,EACpC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,gBACpB,QAAQ,aAEnB,uBAAC,cAAM,CAAC,MAAM,+CAA6C,EAC3D,wBAAC,cAAM,CAAC,WAAW,IAAC,SAAS,EAAC,kCAAkC,aAC9D,wBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,mGAElB,uEAA4C,iBAAY,GAAG,EACxE,2DAAwB,uGAEb,EACb,uBAAC,cAAM,IACL,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oCACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;oCACzC,OAAO,EAAE,eAAe;oCACxB,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;iCACjC,GACD,IACiB,IACd,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Dialog, FilledButton, Select, Typography } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n const ref = useRef<HTMLDivElement | null>(null);\n const [isOpen, setIsOpen] = useState<boolean>(false);\n\n return (\n <div\n ref={ref}\n className=\"n-flex n-flex-col n-items-center n-justify-center n-relative n-h-[500px]\"\n >\n <FilledButton size=\"medium\" onClick={() => setIsOpen(true)}>\n Open Dialog\n </FilledButton>\n <Dialog\n container={ref?.current || undefined}\n isOpen={isOpen}\n onClose={() => setIsOpen(false)}\n aria-label=\"Dialog\"\n >\n <Dialog.Header>Using Select inside a dialog</Dialog.Header>\n <Dialog.Description className=\"n-flex n-flex-col n-gap-token-32\">\n <Typography variant=\"body-medium\">\n To use select inside a dialog and avoid the cut-off, you need to use\n the property <code>menuPosition: &quot;fixed&quot;</code> inside the{' '}\n <code>selectProps</code>. This is done automatically if used in a\n Needle Dialog, but can always be overridden manually.\n </Typography>\n <Select\n label=\"Inside a dialog\"\n type=\"select\"\n selectProps={{\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n defaultValue: EXAMPLE_OPTIONS[1],\n }}\n />\n </Dialog.Description>\n </Dialog>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-inside-dialog.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-inside-dialog.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA4E;AAC5E,iCAAyC;AAEzC,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,MAAM,GAAG,GAAG,IAAA,cAAM,EAAwB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAU,KAAK,CAAC,CAAC;IAErD,OAAO,CACL,iCACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAC,0EAA0E,aAEpF,uBAAC,oBAAY,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,4BAE3C,EACf,wBAAC,cAAM,IACL,SAAS,EAAE,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,KAAI,SAAS,EACpC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,gBACpB,QAAQ,aAEnB,uBAAC,cAAM,CAAC,MAAM,+CAA6C,EAC3D,wBAAC,cAAM,CAAC,WAAW,IAAC,SAAS,EAAC,kCAAkC,aAC9D,wBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,mGAElB,uEAA4C,iBAAY,GAAG,EACxE,2DAAwB,uGAEb,EACb,uBAAC,cAAM,IACL,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oCACX,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;oCAChC,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;oCACzC,OAAO,EAAE,eAAe;iCACzB,GACD,IACiB,IACd,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Dialog, FilledButton, Select, Typography } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n const ref = useRef<HTMLDivElement | null>(null);\n const [isOpen, setIsOpen] = useState<boolean>(false);\n\n return (\n <div\n ref={ref}\n className=\"n-flex n-flex-col n-items-center n-justify-center n-relative n-h-[500px]\"\n >\n <FilledButton size=\"medium\" onClick={() => setIsOpen(true)}>\n Open Dialog\n </FilledButton>\n <Dialog\n container={ref?.current || undefined}\n isOpen={isOpen}\n onClose={() => setIsOpen(false)}\n aria-label=\"Dialog\"\n >\n <Dialog.Header>Using Select inside a dialog</Dialog.Header>\n <Dialog.Description className=\"n-flex n-flex-col n-gap-token-32\">\n <Typography variant=\"body-medium\">\n To use select inside a dialog and avoid the cut-off, you need to use\n the property <code>menuPosition: &quot;fixed&quot;</code> inside the{' '}\n <code>selectProps</code>. This is done automatically if used in a\n Needle Dialog, but can always be overridden manually.\n </Typography>\n <Select\n label=\"Inside a dialog\"\n type=\"select\"\n selectProps={{\n defaultValue: EXAMPLE_OPTIONS[1],\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n }}\n />\n </Dialog.Description>\n </Dialog>\n </div>\n );\n};\n\nexport default Component;\n"]}