@neo4j-ndl/react 4.3.6 → 4.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (515) hide show
  1. package/lib/cjs/_common/types.js.map +1 -1
  2. package/lib/cjs/_common/utils.js +4 -4
  3. package/lib/cjs/_common/utils.js.map +1 -1
  4. package/lib/cjs/accordion/Accordion.js +5 -5
  5. package/lib/cjs/accordion/Accordion.js.map +1 -1
  6. package/lib/cjs/accordion/accordion-context.js +1 -1
  7. package/lib/cjs/accordion/accordion-context.js.map +1 -1
  8. package/lib/cjs/accordion/stories/accordion.stories.js +20 -20
  9. package/lib/cjs/accordion/stories/accordion.stories.js.map +1 -1
  10. package/lib/cjs/ai/presence/Presence.js +1 -0
  11. package/lib/cjs/ai/presence/Presence.js.map +1 -1
  12. package/lib/cjs/avatar/stories/avatar.stories.js +18 -18
  13. package/lib/cjs/avatar/stories/avatar.stories.js.map +1 -1
  14. package/lib/cjs/banner/Banner.js +1 -1
  15. package/lib/cjs/banner/Banner.js.map +1 -1
  16. package/lib/cjs/breadcrumbs/stories/breadcrumbs.stories.js +1 -1
  17. package/lib/cjs/breadcrumbs/stories/breadcrumbs.stories.js.map +1 -1
  18. package/lib/cjs/checkbox/stories/checkbox-full.story.js +2 -2
  19. package/lib/cjs/checkbox/stories/checkbox-full.story.js.map +1 -1
  20. package/lib/cjs/checkbox/stories/checkbox.stories.js +19 -19
  21. package/lib/cjs/checkbox/stories/checkbox.stories.js.map +1 -1
  22. package/lib/cjs/clean-icon-button/stories/clean-icon-button.stories.js +11 -11
  23. package/lib/cjs/clean-icon-button/stories/clean-icon-button.stories.js.map +1 -1
  24. package/lib/cjs/code-block/stories/code-disabled.story.js +2 -2
  25. package/lib/cjs/code-block/stories/code-disabled.story.js.map +1 -1
  26. package/lib/cjs/code-block/stories/code-full.story.js +2 -2
  27. package/lib/cjs/code-block/stories/code-full.story.js.map +1 -1
  28. package/lib/cjs/code-block/stories/code-with-actions.story.js +2 -2
  29. package/lib/cjs/code-block/stories/code-with-actions.story.js.map +1 -1
  30. package/lib/cjs/code-block/themes/ndl-code-dark.js +64 -64
  31. package/lib/cjs/code-block/themes/ndl-code-dark.js.map +1 -1
  32. package/lib/cjs/code-block/themes/ndl-code-light.js +64 -64
  33. package/lib/cjs/code-block/themes/ndl-code-light.js.map +1 -1
  34. package/lib/cjs/color-picker/ColorPicker.js +1 -1
  35. package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
  36. package/lib/cjs/color-picker/stories/color-picker.stories.js +4 -4
  37. package/lib/cjs/color-picker/stories/color-picker.stories.js.map +1 -1
  38. package/lib/cjs/data-grid/Components.js +14 -12
  39. package/lib/cjs/data-grid/Components.js.map +1 -1
  40. package/lib/cjs/data-grid/DataGrid.js.map +1 -1
  41. package/lib/cjs/data-grid/data-grid-context.js +1 -1
  42. package/lib/cjs/data-grid/data-grid-context.js.map +1 -1
  43. package/lib/cjs/data-grid/data-grid-nav/index.js +1 -1
  44. package/lib/cjs/data-grid/data-grid-nav/index.js.map +1 -1
  45. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
  46. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  47. package/lib/cjs/data-grid/stories/datagrid-single-selectable.story.js +0 -24
  48. package/lib/cjs/data-grid/stories/datagrid-single-selectable.story.js.map +1 -1
  49. package/lib/cjs/date-picker/DatePicker.js.map +1 -1
  50. package/lib/cjs/date-picker/stories/date-picker-full.story.js +9 -9
  51. package/lib/cjs/date-picker/stories/date-picker-full.story.js.map +1 -1
  52. package/lib/cjs/divider/stories/divider-horizontal.story.js +1 -1
  53. package/lib/cjs/divider/stories/divider-horizontal.story.js.map +1 -1
  54. package/lib/cjs/divider/stories/divider-vertical.story.js +1 -1
  55. package/lib/cjs/divider/stories/divider-vertical.story.js.map +1 -1
  56. package/lib/cjs/drawer/stories/drawer.stories.js +19 -19
  57. package/lib/cjs/drawer/stories/drawer.stories.js.map +1 -1
  58. package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
  59. package/lib/cjs/dropdown-button/stories/dropdown-button.stories.js +18 -18
  60. package/lib/cjs/dropdown-button/stories/dropdown-button.stories.js.map +1 -1
  61. package/lib/cjs/dropzone/stories/dropzone-disabled.story.js +1 -1
  62. package/lib/cjs/dropzone/stories/dropzone-disabled.story.js.map +1 -1
  63. package/lib/cjs/dropzone/stories/dropzone-full.story.js +11 -11
  64. package/lib/cjs/dropzone/stories/dropzone-full.story.js.map +1 -1
  65. package/lib/cjs/dropzone/stories/dropzone.stories.js +10 -10
  66. package/lib/cjs/dropzone/stories/dropzone.stories.js.map +1 -1
  67. package/lib/cjs/flex/Flex.js +4 -4
  68. package/lib/cjs/flex/Flex.js.map +1 -1
  69. package/lib/cjs/graph-label/stories/graph-label.stories.js +20 -20
  70. package/lib/cjs/graph-label/stories/graph-label.stories.js.map +1 -1
  71. package/lib/cjs/hooks/index.js +3 -3
  72. package/lib/cjs/hooks/index.js.map +1 -1
  73. package/lib/cjs/icon-button/stories/icon-button.stories.js +12 -12
  74. package/lib/cjs/icon-button/stories/icon-button.stories.js.map +1 -1
  75. package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js +16 -16
  76. package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
  77. package/lib/cjs/icon-button-base/IconButtonBase.js +5 -3
  78. package/lib/cjs/icon-button-base/IconButtonBase.js.map +1 -1
  79. package/lib/cjs/icons/generated/custom/DatabaseCross.js +1 -1
  80. package/lib/cjs/icons/generated/custom/DatabaseCross.js.map +1 -1
  81. package/lib/cjs/icons/generated/custom/DatabasePlus.js +1 -1
  82. package/lib/cjs/icons/generated/custom/DatabasePlus.js.map +1 -1
  83. package/lib/cjs/icons/generated/custom/GlobePin.js +1 -1
  84. package/lib/cjs/icons/generated/custom/GlobePin.js.map +1 -1
  85. package/lib/cjs/icons/generated/custom/PanelBottom.js +1 -1
  86. package/lib/cjs/icons/generated/custom/PanelBottom.js.map +1 -1
  87. package/lib/cjs/icons/generated/custom/PanelLeftCollapsed.js +30 -0
  88. package/lib/cjs/icons/generated/custom/PanelLeftCollapsed.js.map +1 -0
  89. package/lib/cjs/icons/generated/custom/PanelLeftExpanded.js +30 -0
  90. package/lib/cjs/icons/generated/custom/PanelLeftExpanded.js.map +1 -0
  91. package/lib/cjs/icons/generated/custom/PanelRightCollapsed.js +30 -0
  92. package/lib/cjs/icons/generated/custom/PanelRightCollapsed.js.map +1 -0
  93. package/lib/cjs/icons/generated/custom/PanelRightExpanded.js +30 -0
  94. package/lib/cjs/icons/generated/custom/PanelRightExpanded.js.map +1 -0
  95. package/lib/cjs/icons/generated/custom/ThreePanel.js +1 -1
  96. package/lib/cjs/icons/generated/custom/ThreePanel.js.map +1 -1
  97. package/lib/cjs/icons/generated/custom/index.js +9 -1
  98. package/lib/cjs/icons/generated/custom/index.js.map +1 -1
  99. package/lib/cjs/icons/wrapIcon.js +2 -2
  100. package/lib/cjs/icons/wrapIcon.js.map +1 -1
  101. package/lib/cjs/kbd/stories/kbd.stories.js +7 -7
  102. package/lib/cjs/kbd/stories/kbd.stories.js.map +1 -1
  103. package/lib/cjs/loading-spinner/LoadingSpinner.js +2 -2
  104. package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
  105. package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js +10 -10
  106. package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js.map +1 -1
  107. package/lib/cjs/logo/Logo.js +6 -6
  108. package/lib/cjs/logo/Logo.js.map +1 -1
  109. package/lib/cjs/logo/stories/logo.stories.js +9 -9
  110. package/lib/cjs/logo/stories/logo.stories.js.map +1 -1
  111. package/lib/cjs/menu/Menu.js +3 -3
  112. package/lib/cjs/menu/Menu.js.map +1 -1
  113. package/lib/cjs/menu/stories/menu-custom-items.story.js +3 -1
  114. package/lib/cjs/menu/stories/menu-custom-items.story.js.map +1 -1
  115. package/lib/cjs/menu/stories/menu-default.story.js +3 -1
  116. package/lib/cjs/menu/stories/menu-default.story.js.map +1 -1
  117. package/lib/cjs/menu/stories/menu-in-dialog.story.js +5 -1
  118. package/lib/cjs/menu/stories/menu-in-dialog.story.js.map +1 -1
  119. package/lib/cjs/menu/stories/menu-in-popover.story.js +3 -1
  120. package/lib/cjs/menu/stories/menu-in-popover.story.js.map +1 -1
  121. package/lib/cjs/menu/stories/menu-nested.story.js +3 -1
  122. package/lib/cjs/menu/stories/menu-nested.story.js.map +1 -1
  123. package/lib/cjs/menu/stories/menu-placements.story.js +3 -1
  124. package/lib/cjs/menu/stories/menu-placements.story.js.map +1 -1
  125. package/lib/cjs/menu/stories/menu-with-category.story.js +1 -2
  126. package/lib/cjs/menu/stories/menu-with-category.story.js.map +1 -1
  127. package/lib/cjs/menu/stories/menu-with-disabled-item.story.js +1 -2
  128. package/lib/cjs/menu/stories/menu-with-disabled-item.story.js.map +1 -1
  129. package/lib/cjs/menu/stories/menu-with-divider.story.js +1 -2
  130. package/lib/cjs/menu/stories/menu-with-divider.story.js.map +1 -1
  131. package/lib/cjs/menu/stories/menu-with-icon.story.js +3 -1
  132. package/lib/cjs/menu/stories/menu-with-icon.story.js.map +1 -1
  133. package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js +3 -1
  134. package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
  135. package/lib/cjs/popover/Popover.js +15 -15
  136. package/lib/cjs/popover/Popover.js.map +1 -1
  137. package/lib/cjs/popover/use-popover.js +9 -9
  138. package/lib/cjs/popover/use-popover.js.map +1 -1
  139. package/lib/cjs/progress-bar/stories/progress-bar.stories.js +3 -3
  140. package/lib/cjs/progress-bar/stories/progress-bar.stories.js.map +1 -1
  141. package/lib/cjs/segmented-control/SegmentedControl.js +1 -1
  142. package/lib/cjs/segmented-control/SegmentedControl.js.map +1 -1
  143. package/lib/cjs/select/Overrides.js +41 -41
  144. package/lib/cjs/select/Overrides.js.map +1 -1
  145. package/lib/cjs/select/Select.js +25 -3
  146. package/lib/cjs/select/Select.js.map +1 -1
  147. package/lib/cjs/select/stories/select-async.story.js +4 -4
  148. package/lib/cjs/select/stories/select-async.story.js.map +1 -1
  149. package/lib/cjs/select/stories/select-controlled.story.js +4 -4
  150. package/lib/cjs/select/stories/select-controlled.story.js.map +1 -1
  151. package/lib/cjs/select/stories/select-creatable.story.js +1 -1
  152. package/lib/cjs/select/stories/select-creatable.story.js.map +1 -1
  153. package/lib/cjs/select/stories/select-custom-label.story.js +1 -1
  154. package/lib/cjs/select/stories/select-custom-label.story.js.map +1 -1
  155. package/lib/cjs/select/stories/select-disabled.story.js +1 -1
  156. package/lib/cjs/select/stories/select-disabled.story.js.map +1 -1
  157. package/lib/cjs/select/stories/select-inside-dialog.story.js +1 -1
  158. package/lib/cjs/select/stories/select-inside-dialog.story.js.map +1 -1
  159. package/lib/cjs/side-navigation/SideNavigation.js +1 -1
  160. package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
  161. package/lib/cjs/side-navigation/stories/side-nav.stories.js +1 -1
  162. package/lib/cjs/side-navigation/stories/side-nav.stories.js.map +1 -1
  163. package/lib/cjs/skeleton/stories/skeleton.stories.js +28 -28
  164. package/lib/cjs/skeleton/stories/skeleton.stories.js.map +1 -1
  165. package/lib/cjs/slider/Slider.js +2 -1
  166. package/lib/cjs/slider/Slider.js.map +1 -1
  167. package/lib/cjs/status-indicator/stories/status-indicator.stories.js +2 -2
  168. package/lib/cjs/status-indicator/stories/status-indicator.stories.js.map +1 -1
  169. package/lib/cjs/switch/stories/switch.stories.js +7 -7
  170. package/lib/cjs/switch/stories/switch.stories.js.map +1 -1
  171. package/lib/cjs/tabs/Tabs.js +2 -2
  172. package/lib/cjs/tabs/Tabs.js.map +1 -1
  173. package/lib/cjs/tabs/stories/tabs-overflow.story.js +1 -1
  174. package/lib/cjs/tabs/stories/tabs-overflow.story.js.map +1 -1
  175. package/lib/cjs/tag/Tag.js +2 -2
  176. package/lib/cjs/tag/Tag.js.map +1 -1
  177. package/lib/cjs/tag/stories/tag.stories.js +10 -10
  178. package/lib/cjs/tag/stories/tag.stories.js.map +1 -1
  179. package/lib/cjs/text-area/TextArea.js +5 -5
  180. package/lib/cjs/text-area/TextArea.js.map +1 -1
  181. package/lib/cjs/text-area/stories/text-area.stories.js +25 -25
  182. package/lib/cjs/text-area/stories/text-area.stories.js.map +1 -1
  183. package/lib/cjs/text-input/stories/text-input-number.story.js +2 -2
  184. package/lib/cjs/text-input/stories/text-input-number.story.js.map +1 -1
  185. package/lib/cjs/text-link/stories/text-link.stories.js +11 -11
  186. package/lib/cjs/text-link/stories/text-link.stories.js.map +1 -1
  187. package/lib/cjs/text-overflow/stories/text-overflow.stories.js +1 -1
  188. package/lib/cjs/text-overflow/stories/text-overflow.stories.js.map +1 -1
  189. package/lib/cjs/theme/ThemeProvider.js.map +1 -1
  190. package/lib/cjs/theme/agnostic.js +1 -1
  191. package/lib/cjs/theme/agnostic.js.map +1 -1
  192. package/lib/cjs/time-picker/TimePicker.js +4 -4
  193. package/lib/cjs/time-picker/TimePicker.js.map +1 -1
  194. package/lib/cjs/time-picker/time-picker-hooks.js +1 -1
  195. package/lib/cjs/time-picker/time-picker-hooks.js.map +1 -1
  196. package/lib/cjs/timezone-picker/TimeZonePicker.js +5 -5
  197. package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
  198. package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +7 -7
  199. package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
  200. package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
  201. package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
  202. package/lib/cjs/toast/Toast.js +12 -12
  203. package/lib/cjs/toast/Toast.js.map +1 -1
  204. package/lib/cjs/toast/stories/toast-action-story.js +1 -1
  205. package/lib/cjs/toast/stories/toast-action-story.js.map +1 -1
  206. package/lib/cjs/toast/stories/toast-controlled-story.js +2 -2
  207. package/lib/cjs/toast/stories/toast-controlled-story.js.map +1 -1
  208. package/lib/cjs/toast/stories/toast-progress-bar.js +1 -1
  209. package/lib/cjs/toast/stories/toast-progress-bar.js.map +1 -1
  210. package/lib/cjs/toast/stories/toast.stories.js +18 -18
  211. package/lib/cjs/toast/stories/toast.stories.js.map +1 -1
  212. package/lib/cjs/tooltip/Tooltip.js +1 -1
  213. package/lib/cjs/tooltip/Tooltip.js.map +1 -1
  214. package/lib/cjs/tooltip/stories/tooltip-hover-delay.story.js +1 -1
  215. package/lib/cjs/tooltip/stories/tooltip-hover-delay.story.js.map +1 -1
  216. package/lib/cjs/tooltip/stories/tooltip-placements.story.js +8 -8
  217. package/lib/cjs/tooltip/stories/tooltip-placements.story.js.map +1 -1
  218. package/lib/cjs/tooltip/stories/tooltip.stories.js +29 -29
  219. package/lib/cjs/tooltip/stories/tooltip.stories.js.map +1 -1
  220. package/lib/cjs/tooltip/use-tooltip.js +10 -10
  221. package/lib/cjs/tooltip/use-tooltip.js.map +1 -1
  222. package/lib/cjs/tree-view/TreeItemWrapper.js +2 -2
  223. package/lib/cjs/tree-view/TreeItemWrapper.js.map +1 -1
  224. package/lib/cjs/tree-view/TreeView.js +12 -12
  225. package/lib/cjs/tree-view/TreeView.js.map +1 -1
  226. package/lib/cjs/tree-view/TreeViewItem.js +1 -1
  227. package/lib/cjs/tree-view/TreeViewItem.js.map +1 -1
  228. package/lib/cjs/tree-view/TreeViewTextItem.js +1 -1
  229. package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
  230. package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js +2 -2
  231. package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
  232. package/lib/cjs/wizard/Wizard.js +3 -3
  233. package/lib/cjs/wizard/Wizard.js.map +1 -1
  234. package/lib/cjs/wizard/stories/wizard.stories.js +14 -14
  235. package/lib/cjs/wizard/stories/wizard.stories.js.map +1 -1
  236. package/lib/esm/_common/types.js.map +1 -1
  237. package/lib/esm/_common/utils.js +4 -4
  238. package/lib/esm/_common/utils.js.map +1 -1
  239. package/lib/esm/accordion/Accordion.js +5 -5
  240. package/lib/esm/accordion/Accordion.js.map +1 -1
  241. package/lib/esm/accordion/accordion-context.js +1 -1
  242. package/lib/esm/accordion/accordion-context.js.map +1 -1
  243. package/lib/esm/accordion/stories/accordion.stories.js +20 -20
  244. package/lib/esm/accordion/stories/accordion.stories.js.map +1 -1
  245. package/lib/esm/ai/presence/Presence.js +1 -0
  246. package/lib/esm/ai/presence/Presence.js.map +1 -1
  247. package/lib/esm/avatar/stories/avatar.stories.js +18 -18
  248. package/lib/esm/avatar/stories/avatar.stories.js.map +1 -1
  249. package/lib/esm/banner/Banner.js +1 -1
  250. package/lib/esm/banner/Banner.js.map +1 -1
  251. package/lib/esm/breadcrumbs/stories/breadcrumbs.stories.js +1 -1
  252. package/lib/esm/breadcrumbs/stories/breadcrumbs.stories.js.map +1 -1
  253. package/lib/esm/checkbox/stories/checkbox-full.story.js +2 -2
  254. package/lib/esm/checkbox/stories/checkbox-full.story.js.map +1 -1
  255. package/lib/esm/checkbox/stories/checkbox.stories.js +19 -19
  256. package/lib/esm/checkbox/stories/checkbox.stories.js.map +1 -1
  257. package/lib/esm/clean-icon-button/stories/clean-icon-button.stories.js +11 -11
  258. package/lib/esm/clean-icon-button/stories/clean-icon-button.stories.js.map +1 -1
  259. package/lib/esm/code-block/stories/code-disabled.story.js +2 -2
  260. package/lib/esm/code-block/stories/code-disabled.story.js.map +1 -1
  261. package/lib/esm/code-block/stories/code-full.story.js +2 -2
  262. package/lib/esm/code-block/stories/code-full.story.js.map +1 -1
  263. package/lib/esm/code-block/stories/code-with-actions.story.js +2 -2
  264. package/lib/esm/code-block/stories/code-with-actions.story.js.map +1 -1
  265. package/lib/esm/code-block/themes/ndl-code-dark.js +64 -64
  266. package/lib/esm/code-block/themes/ndl-code-dark.js.map +1 -1
  267. package/lib/esm/code-block/themes/ndl-code-light.js +64 -64
  268. package/lib/esm/code-block/themes/ndl-code-light.js.map +1 -1
  269. package/lib/esm/color-picker/ColorPicker.js +1 -1
  270. package/lib/esm/color-picker/ColorPicker.js.map +1 -1
  271. package/lib/esm/color-picker/stories/color-picker.stories.js +4 -4
  272. package/lib/esm/color-picker/stories/color-picker.stories.js.map +1 -1
  273. package/lib/esm/data-grid/Components.js +14 -12
  274. package/lib/esm/data-grid/Components.js.map +1 -1
  275. package/lib/esm/data-grid/DataGrid.js.map +1 -1
  276. package/lib/esm/data-grid/data-grid-context.js +1 -1
  277. package/lib/esm/data-grid/data-grid-context.js.map +1 -1
  278. package/lib/esm/data-grid/data-grid-nav/index.js +1 -1
  279. package/lib/esm/data-grid/data-grid-nav/index.js.map +1 -1
  280. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
  281. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  282. package/lib/esm/data-grid/stories/datagrid-single-selectable.story.js +0 -24
  283. package/lib/esm/data-grid/stories/datagrid-single-selectable.story.js.map +1 -1
  284. package/lib/esm/date-picker/DatePicker.js.map +1 -1
  285. package/lib/esm/date-picker/stories/date-picker-full.story.js +9 -9
  286. package/lib/esm/date-picker/stories/date-picker-full.story.js.map +1 -1
  287. package/lib/esm/divider/stories/divider-horizontal.story.js +1 -1
  288. package/lib/esm/divider/stories/divider-horizontal.story.js.map +1 -1
  289. package/lib/esm/divider/stories/divider-vertical.story.js +1 -1
  290. package/lib/esm/divider/stories/divider-vertical.story.js.map +1 -1
  291. package/lib/esm/drawer/stories/drawer.stories.js +19 -19
  292. package/lib/esm/drawer/stories/drawer.stories.js.map +1 -1
  293. package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
  294. package/lib/esm/dropdown-button/stories/dropdown-button.stories.js +18 -18
  295. package/lib/esm/dropdown-button/stories/dropdown-button.stories.js.map +1 -1
  296. package/lib/esm/dropzone/stories/dropzone-disabled.story.js +1 -1
  297. package/lib/esm/dropzone/stories/dropzone-disabled.story.js.map +1 -1
  298. package/lib/esm/dropzone/stories/dropzone-full.story.js +11 -11
  299. package/lib/esm/dropzone/stories/dropzone-full.story.js.map +1 -1
  300. package/lib/esm/dropzone/stories/dropzone.stories.js +10 -10
  301. package/lib/esm/dropzone/stories/dropzone.stories.js.map +1 -1
  302. package/lib/esm/flex/Flex.js +4 -4
  303. package/lib/esm/flex/Flex.js.map +1 -1
  304. package/lib/esm/graph-label/stories/graph-label.stories.js +20 -20
  305. package/lib/esm/graph-label/stories/graph-label.stories.js.map +1 -1
  306. package/lib/esm/hooks/index.js +3 -3
  307. package/lib/esm/hooks/index.js.map +1 -1
  308. package/lib/esm/icon-button/stories/icon-button.stories.js +12 -12
  309. package/lib/esm/icon-button/stories/icon-button.stories.js.map +1 -1
  310. package/lib/esm/icon-button-array/stories/icon-button-array.stories.js +16 -16
  311. package/lib/esm/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
  312. package/lib/esm/icon-button-base/IconButtonBase.js +5 -3
  313. package/lib/esm/icon-button-base/IconButtonBase.js.map +1 -1
  314. package/lib/esm/icons/generated/custom/DatabaseCross.js +2 -2
  315. package/lib/esm/icons/generated/custom/DatabaseCross.js.map +1 -1
  316. package/lib/esm/icons/generated/custom/DatabasePlus.js +1 -1
  317. package/lib/esm/icons/generated/custom/DatabasePlus.js.map +1 -1
  318. package/lib/esm/icons/generated/custom/GlobePin.js +1 -1
  319. package/lib/esm/icons/generated/custom/GlobePin.js.map +1 -1
  320. package/lib/esm/icons/generated/custom/PanelBottom.js +1 -1
  321. package/lib/esm/icons/generated/custom/PanelBottom.js.map +1 -1
  322. package/lib/esm/icons/generated/custom/PanelLeftCollapsed.js +28 -0
  323. package/lib/esm/icons/generated/custom/PanelLeftCollapsed.js.map +1 -0
  324. package/lib/esm/icons/generated/custom/PanelLeftExpanded.js +28 -0
  325. package/lib/esm/icons/generated/custom/PanelLeftExpanded.js.map +1 -0
  326. package/lib/esm/icons/generated/custom/PanelRightCollapsed.js +28 -0
  327. package/lib/esm/icons/generated/custom/PanelRightCollapsed.js.map +1 -0
  328. package/lib/esm/icons/generated/custom/PanelRightExpanded.js +28 -0
  329. package/lib/esm/icons/generated/custom/PanelRightExpanded.js.map +1 -0
  330. package/lib/esm/icons/generated/custom/ThreePanel.js +1 -1
  331. package/lib/esm/icons/generated/custom/ThreePanel.js.map +1 -1
  332. package/lib/esm/icons/generated/custom/index.js +4 -0
  333. package/lib/esm/icons/generated/custom/index.js.map +1 -1
  334. package/lib/esm/icons/wrapIcon.js +2 -2
  335. package/lib/esm/icons/wrapIcon.js.map +1 -1
  336. package/lib/esm/kbd/stories/kbd.stories.js +7 -7
  337. package/lib/esm/kbd/stories/kbd.stories.js.map +1 -1
  338. package/lib/esm/loading-spinner/LoadingSpinner.js +2 -2
  339. package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
  340. package/lib/esm/loading-spinner/stories/loading-spinner.stories.js +10 -10
  341. package/lib/esm/loading-spinner/stories/loading-spinner.stories.js.map +1 -1
  342. package/lib/esm/logo/Logo.js +6 -6
  343. package/lib/esm/logo/Logo.js.map +1 -1
  344. package/lib/esm/logo/stories/logo.stories.js +9 -9
  345. package/lib/esm/logo/stories/logo.stories.js.map +1 -1
  346. package/lib/esm/menu/Menu.js +3 -3
  347. package/lib/esm/menu/Menu.js.map +1 -1
  348. package/lib/esm/menu/stories/menu-custom-items.story.js +3 -1
  349. package/lib/esm/menu/stories/menu-custom-items.story.js.map +1 -1
  350. package/lib/esm/menu/stories/menu-default.story.js +3 -1
  351. package/lib/esm/menu/stories/menu-default.story.js.map +1 -1
  352. package/lib/esm/menu/stories/menu-in-dialog.story.js +5 -1
  353. package/lib/esm/menu/stories/menu-in-dialog.story.js.map +1 -1
  354. package/lib/esm/menu/stories/menu-in-popover.story.js +3 -1
  355. package/lib/esm/menu/stories/menu-in-popover.story.js.map +1 -1
  356. package/lib/esm/menu/stories/menu-nested.story.js +3 -1
  357. package/lib/esm/menu/stories/menu-nested.story.js.map +1 -1
  358. package/lib/esm/menu/stories/menu-placements.story.js +3 -1
  359. package/lib/esm/menu/stories/menu-placements.story.js.map +1 -1
  360. package/lib/esm/menu/stories/menu-with-category.story.js +1 -2
  361. package/lib/esm/menu/stories/menu-with-category.story.js.map +1 -1
  362. package/lib/esm/menu/stories/menu-with-disabled-item.story.js +1 -2
  363. package/lib/esm/menu/stories/menu-with-disabled-item.story.js.map +1 -1
  364. package/lib/esm/menu/stories/menu-with-divider.story.js +1 -2
  365. package/lib/esm/menu/stories/menu-with-divider.story.js.map +1 -1
  366. package/lib/esm/menu/stories/menu-with-icon.story.js +3 -1
  367. package/lib/esm/menu/stories/menu-with-icon.story.js.map +1 -1
  368. package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js +3 -1
  369. package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
  370. package/lib/esm/popover/Popover.js +15 -15
  371. package/lib/esm/popover/Popover.js.map +1 -1
  372. package/lib/esm/popover/use-popover.js +9 -9
  373. package/lib/esm/popover/use-popover.js.map +1 -1
  374. package/lib/esm/progress-bar/stories/progress-bar.stories.js +3 -3
  375. package/lib/esm/progress-bar/stories/progress-bar.stories.js.map +1 -1
  376. package/lib/esm/segmented-control/SegmentedControl.js +1 -1
  377. package/lib/esm/segmented-control/SegmentedControl.js.map +1 -1
  378. package/lib/esm/select/Overrides.js +41 -41
  379. package/lib/esm/select/Overrides.js.map +1 -1
  380. package/lib/esm/select/Select.js +26 -4
  381. package/lib/esm/select/Select.js.map +1 -1
  382. package/lib/esm/select/stories/select-async.story.js +4 -4
  383. package/lib/esm/select/stories/select-async.story.js.map +1 -1
  384. package/lib/esm/select/stories/select-controlled.story.js +4 -4
  385. package/lib/esm/select/stories/select-controlled.story.js.map +1 -1
  386. package/lib/esm/select/stories/select-creatable.story.js +1 -1
  387. package/lib/esm/select/stories/select-creatable.story.js.map +1 -1
  388. package/lib/esm/select/stories/select-custom-label.story.js +1 -1
  389. package/lib/esm/select/stories/select-custom-label.story.js.map +1 -1
  390. package/lib/esm/select/stories/select-disabled.story.js +1 -1
  391. package/lib/esm/select/stories/select-disabled.story.js.map +1 -1
  392. package/lib/esm/select/stories/select-inside-dialog.story.js +1 -1
  393. package/lib/esm/select/stories/select-inside-dialog.story.js.map +1 -1
  394. package/lib/esm/side-navigation/SideNavigation.js +1 -1
  395. package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
  396. package/lib/esm/side-navigation/stories/side-nav.stories.js +1 -1
  397. package/lib/esm/side-navigation/stories/side-nav.stories.js.map +1 -1
  398. package/lib/esm/skeleton/stories/skeleton.stories.js +28 -28
  399. package/lib/esm/skeleton/stories/skeleton.stories.js.map +1 -1
  400. package/lib/esm/slider/Slider.js +2 -1
  401. package/lib/esm/slider/Slider.js.map +1 -1
  402. package/lib/esm/status-indicator/stories/status-indicator.stories.js +2 -2
  403. package/lib/esm/status-indicator/stories/status-indicator.stories.js.map +1 -1
  404. package/lib/esm/switch/stories/switch.stories.js +7 -7
  405. package/lib/esm/switch/stories/switch.stories.js.map +1 -1
  406. package/lib/esm/tabs/Tabs.js +2 -2
  407. package/lib/esm/tabs/Tabs.js.map +1 -1
  408. package/lib/esm/tabs/stories/tabs-overflow.story.js +1 -1
  409. package/lib/esm/tabs/stories/tabs-overflow.story.js.map +1 -1
  410. package/lib/esm/tag/Tag.js +2 -2
  411. package/lib/esm/tag/Tag.js.map +1 -1
  412. package/lib/esm/tag/stories/tag.stories.js +10 -10
  413. package/lib/esm/tag/stories/tag.stories.js.map +1 -1
  414. package/lib/esm/text-area/TextArea.js +5 -5
  415. package/lib/esm/text-area/TextArea.js.map +1 -1
  416. package/lib/esm/text-area/stories/text-area.stories.js +25 -25
  417. package/lib/esm/text-area/stories/text-area.stories.js.map +1 -1
  418. package/lib/esm/text-input/stories/text-input-number.story.js +2 -2
  419. package/lib/esm/text-input/stories/text-input-number.story.js.map +1 -1
  420. package/lib/esm/text-link/stories/text-link.stories.js +11 -11
  421. package/lib/esm/text-link/stories/text-link.stories.js.map +1 -1
  422. package/lib/esm/text-overflow/stories/text-overflow.stories.js +1 -1
  423. package/lib/esm/text-overflow/stories/text-overflow.stories.js.map +1 -1
  424. package/lib/esm/theme/ThemeProvider.js.map +1 -1
  425. package/lib/esm/theme/agnostic.js +1 -1
  426. package/lib/esm/theme/agnostic.js.map +1 -1
  427. package/lib/esm/time-picker/TimePicker.js +4 -4
  428. package/lib/esm/time-picker/TimePicker.js.map +1 -1
  429. package/lib/esm/time-picker/time-picker-hooks.js +1 -1
  430. package/lib/esm/time-picker/time-picker-hooks.js.map +1 -1
  431. package/lib/esm/timezone-picker/TimeZonePicker.js +5 -5
  432. package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
  433. package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +7 -7
  434. package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
  435. package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
  436. package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
  437. package/lib/esm/toast/Toast.js +12 -12
  438. package/lib/esm/toast/Toast.js.map +1 -1
  439. package/lib/esm/toast/stories/toast-action-story.js +1 -1
  440. package/lib/esm/toast/stories/toast-action-story.js.map +1 -1
  441. package/lib/esm/toast/stories/toast-controlled-story.js +2 -2
  442. package/lib/esm/toast/stories/toast-controlled-story.js.map +1 -1
  443. package/lib/esm/toast/stories/toast-progress-bar.js +1 -1
  444. package/lib/esm/toast/stories/toast-progress-bar.js.map +1 -1
  445. package/lib/esm/toast/stories/toast.stories.js +18 -18
  446. package/lib/esm/toast/stories/toast.stories.js.map +1 -1
  447. package/lib/esm/tooltip/Tooltip.js +1 -1
  448. package/lib/esm/tooltip/Tooltip.js.map +1 -1
  449. package/lib/esm/tooltip/stories/tooltip-hover-delay.story.js +1 -1
  450. package/lib/esm/tooltip/stories/tooltip-hover-delay.story.js.map +1 -1
  451. package/lib/esm/tooltip/stories/tooltip-placements.story.js +8 -8
  452. package/lib/esm/tooltip/stories/tooltip-placements.story.js.map +1 -1
  453. package/lib/esm/tooltip/stories/tooltip.stories.js +29 -29
  454. package/lib/esm/tooltip/stories/tooltip.stories.js.map +1 -1
  455. package/lib/esm/tooltip/use-tooltip.js +10 -10
  456. package/lib/esm/tooltip/use-tooltip.js.map +1 -1
  457. package/lib/esm/tree-view/TreeItemWrapper.js +2 -2
  458. package/lib/esm/tree-view/TreeItemWrapper.js.map +1 -1
  459. package/lib/esm/tree-view/TreeView.js +12 -12
  460. package/lib/esm/tree-view/TreeView.js.map +1 -1
  461. package/lib/esm/tree-view/TreeViewItem.js +1 -1
  462. package/lib/esm/tree-view/TreeViewItem.js.map +1 -1
  463. package/lib/esm/tree-view/TreeViewTextItem.js +1 -1
  464. package/lib/esm/tree-view/TreeViewTextItem.js.map +1 -1
  465. package/lib/esm/tree-view/tree-view-keyboard-coordinates.js +2 -2
  466. package/lib/esm/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
  467. package/lib/esm/wizard/Wizard.js +3 -3
  468. package/lib/esm/wizard/Wizard.js.map +1 -1
  469. package/lib/esm/wizard/stories/wizard.stories.js +14 -14
  470. package/lib/esm/wizard/stories/wizard.stories.js.map +1 -1
  471. package/lib/types/accordion/stories/accordion.stories.d.ts +3 -3
  472. package/lib/types/ai/presence/Presence.d.ts.map +1 -1
  473. package/lib/types/breadcrumbs/stories/breadcrumbs.stories.d.ts +1 -1
  474. package/lib/types/data-grid/Components.d.ts.map +1 -1
  475. package/lib/types/data-grid/stories/datagrid-single-selectable.story.d.ts.map +1 -1
  476. package/lib/types/dropdown-button/DropdownButton.d.ts +1 -1
  477. package/lib/types/dropdown-button/DropdownButton.d.ts.map +1 -1
  478. package/lib/types/icon-button-base/IconButtonBase.d.ts.map +1 -1
  479. package/lib/types/icons/generated/custom/DatabaseCross.d.ts.map +1 -1
  480. package/lib/types/icons/generated/custom/DatabasePlus.d.ts.map +1 -1
  481. package/lib/types/icons/generated/custom/GlobePin.d.ts.map +1 -1
  482. package/lib/types/icons/generated/custom/PanelLeftCollapsed.d.ts +29 -0
  483. package/lib/types/icons/generated/custom/PanelLeftCollapsed.d.ts.map +1 -0
  484. package/lib/types/icons/generated/custom/PanelLeftExpanded.d.ts +29 -0
  485. package/lib/types/icons/generated/custom/PanelLeftExpanded.d.ts.map +1 -0
  486. package/lib/types/icons/generated/custom/PanelRightCollapsed.d.ts +29 -0
  487. package/lib/types/icons/generated/custom/PanelRightCollapsed.d.ts.map +1 -0
  488. package/lib/types/icons/generated/custom/PanelRightExpanded.d.ts +29 -0
  489. package/lib/types/icons/generated/custom/PanelRightExpanded.d.ts.map +1 -0
  490. package/lib/types/icons/generated/custom/index.d.ts +4 -0
  491. package/lib/types/icons/generated/custom/index.d.ts.map +1 -1
  492. package/lib/types/icons/wrapIcon.d.ts.map +1 -1
  493. package/lib/types/logo/stories/logo.stories.d.ts +3 -3
  494. package/lib/types/menu/stories/menu-custom-items.story.d.ts.map +1 -1
  495. package/lib/types/menu/stories/menu-default.story.d.ts.map +1 -1
  496. package/lib/types/menu/stories/menu-in-dialog.story.d.ts.map +1 -1
  497. package/lib/types/menu/stories/menu-in-popover.story.d.ts.map +1 -1
  498. package/lib/types/menu/stories/menu-nested.story.d.ts.map +1 -1
  499. package/lib/types/menu/stories/menu-placements.story.d.ts.map +1 -1
  500. package/lib/types/menu/stories/menu-with-category.story.d.ts.map +1 -1
  501. package/lib/types/menu/stories/menu-with-disabled-item.story.d.ts.map +1 -1
  502. package/lib/types/menu/stories/menu-with-divider.story.d.ts.map +1 -1
  503. package/lib/types/menu/stories/menu-with-icon.story.d.ts.map +1 -1
  504. package/lib/types/menu/stories/menu-with-keyboard-shortcuts.story.d.ts.map +1 -1
  505. package/lib/types/select/Select.d.ts.map +1 -1
  506. package/lib/types/side-navigation/SideNavigation.d.ts.map +1 -1
  507. package/lib/types/side-navigation/stories/side-nav.stories.d.ts +1 -1
  508. package/lib/types/skeleton/stories/skeleton.stories.d.ts +3 -3
  509. package/lib/types/slider/Slider.d.ts.map +1 -1
  510. package/lib/types/tabs/Tabs.d.ts.map +1 -1
  511. package/lib/types/tabs/stories/tabs-overflow.story.d.ts.map +1 -1
  512. package/lib/types/time-picker/time-picker-hooks.d.ts +1 -1
  513. package/lib/types/time-picker/time-picker-hooks.d.ts.map +1 -1
  514. package/lib/types/toast/stories/toast.stories.d.ts +2 -2
  515. package/package.json +2 -2
@@ -39,12 +39,12 @@ import { Tag } from '../tag';
39
39
  import { useNeedleTheme } from '../theme';
40
40
  export const DropdownIndicatorCurrying = ({ size, }) => function Component(props) {
41
41
  const classes = classNames('ndl-select-dropdown-indicator', {
42
- 'ndl-is-multi': props.isMulti,
43
42
  'ndl-disabled': props.isDisabled,
44
43
  'ndl-focused': props.isFocused,
45
- 'ndl-small': size === 'small',
46
- 'ndl-medium': size === 'medium',
44
+ 'ndl-is-multi': props.isMulti,
47
45
  'ndl-large': size === 'large',
46
+ 'ndl-medium': size === 'medium',
47
+ 'ndl-small': size === 'small',
48
48
  });
49
49
  return (_jsx(components.DropdownIndicator, Object.assign({}, props, { className: classes, children: _jsx(ChevronDownIconOutline, { className: "ndl-select-icon", style: {
50
50
  transform: props.selectProps.menuIsOpen
@@ -56,23 +56,23 @@ export const DropdownIndicatorCurrying = ({ size, }) => function Component(props
56
56
  export const CustomClearIndication = ({ size, }) => function Component(_a) {
57
57
  var { className } = _a, restProps = __rest(_a, ["className"]);
58
58
  const classes = classNames('ndl-select-clear', className, {
59
- 'ndl-is-multi': restProps.isMulti,
60
59
  'ndl-focused': restProps.isFocused,
61
- 'ndl-small': size === 'small',
62
- 'ndl-medium': size === 'medium',
60
+ 'ndl-is-multi': restProps.isMulti,
63
61
  'ndl-large': size === 'large',
62
+ 'ndl-medium': size === 'medium',
63
+ 'ndl-small': size === 'small',
64
64
  });
65
65
  return (_jsx(components.ClearIndicator, Object.assign({}, restProps, { className: classes, children: _jsxs("div", { children: [_jsx(XMarkIconOutline, {}), _jsx("div", { className: "ndl-select-divider" })] }) })));
66
66
  };
67
67
  export const CustomMultiValue = ({ size, }) => function Component(_a) {
68
68
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
69
69
  const classes = classNames('ndl-select-multi-value', className, {
70
- 'ndl-is-multi': restProps.isMulti,
71
70
  'ndl-disabled': restProps.isDisabled,
72
71
  'ndl-focused': restProps.isFocused,
73
- 'ndl-small': size === 'small',
74
- 'ndl-medium': size === 'medium',
72
+ 'ndl-is-multi': restProps.isMulti,
75
73
  'ndl-large': size === 'large',
74
+ 'ndl-medium': size === 'medium',
75
+ 'ndl-small': size === 'small',
76
76
  });
77
77
  return (_jsx(components.MultiValueContainer, Object.assign({}, restProps, { innerProps: {
78
78
  className: classes,
@@ -87,70 +87,70 @@ export const CustomMultiValue = ({ size, }) => function Component(_a) {
87
87
  export const CustomPlaceholder = ({ size, }) => function Component(_a) {
88
88
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
89
89
  const classes = classNames('ndl-select-placeholder', className, {
90
- 'ndl-is-multi': restProps.isMulti,
91
90
  'ndl-disabled': restProps.isDisabled,
92
91
  'ndl-focused': restProps.isFocused,
93
- 'ndl-small': size === 'small',
94
- 'ndl-medium': size === 'medium',
92
+ 'ndl-is-multi': restProps.isMulti,
95
93
  'ndl-large': size === 'large',
94
+ 'ndl-medium': size === 'medium',
95
+ 'ndl-small': size === 'small',
96
96
  });
97
97
  return (_jsx(components.Placeholder, Object.assign({}, restProps, { className: classes, children: children })));
98
98
  };
99
99
  export const CustomControl = ({ size, isClean, errorText, }) => function Component(_a) {
100
100
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
101
101
  const classes = classNames('ndl-select-control', className, {
102
- 'ndl-is-multi': restProps.isMulti,
102
+ 'ndl-clean': isClean,
103
103
  'ndl-disabled': restProps.isDisabled,
104
104
  'ndl-focused': restProps.isFocused,
105
- 'ndl-small': size === 'small',
106
- 'ndl-medium': size === 'medium',
107
- 'ndl-large': size === 'large',
108
- 'ndl-clean': isClean,
109
105
  'ndl-has-error': !!errorText,
106
+ 'ndl-is-multi': restProps.isMulti,
107
+ 'ndl-large': size === 'large',
108
+ 'ndl-medium': size === 'medium',
109
+ 'ndl-small': size === 'small',
110
110
  });
111
111
  return (_jsx(components.Control, Object.assign({}, restProps, { className: classes, children: children })));
112
112
  };
113
113
  export const CustomIndicatorsContainer = ({ size, }) => function Component(_a) {
114
114
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
115
115
  const classes = classNames('ndl-select-indicators-container', className, {
116
- 'ndl-is-multi': restProps.isMulti,
117
116
  'ndl-disabled': restProps.isDisabled,
118
- 'ndl-small': size === 'small',
119
- 'ndl-medium': size === 'medium',
117
+ 'ndl-is-multi': restProps.isMulti,
120
118
  'ndl-large': size === 'large',
119
+ 'ndl-medium': size === 'medium',
120
+ 'ndl-small': size === 'small',
121
121
  });
122
122
  return (_jsx(components.IndicatorsContainer, Object.assign({}, restProps, { className: classes, children: children })));
123
123
  };
124
124
  export const CustomValueContainer = ({ size, }) => function Component(_a) {
125
125
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
126
126
  const classes = classNames('ndl-select-value-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 (_jsx(components.ValueContainer, Object.assign({}, restProps, { className: classes, children: children })));
134
134
  };
135
135
  export const CustomInput = ({ size, }) => function Component(_a) {
136
136
  var { className } = _a, restProps = __rest(_a, ["className"]);
137
137
  const classes = classNames('ndl-select-input', className, {
138
- 'ndl-is-multi': restProps.isMulti,
139
138
  'ndl-disabled': restProps.isDisabled,
140
- 'ndl-small': size === 'small',
141
- 'ndl-medium': size === 'medium',
139
+ 'ndl-is-multi': restProps.isMulti,
142
140
  'ndl-large': size === 'large',
141
+ 'ndl-medium': size === 'medium',
142
+ 'ndl-small': size === 'small',
143
143
  });
144
144
  return _jsx(components.Input, Object.assign({}, restProps, { className: classes }));
145
145
  };
146
146
  export const CustomSingleValue = ({ size, }) => function Component(_a) {
147
147
  var { className } = _a, restProps = __rest(_a, ["className"]);
148
148
  const classes = classNames('ndl-select-single-value', className, {
149
- 'ndl-is-multi': restProps.isMulti,
150
149
  'ndl-disabled': restProps.isDisabled,
151
- 'ndl-small': size === 'small',
152
- 'ndl-medium': size === 'medium',
150
+ 'ndl-is-multi': restProps.isMulti,
153
151
  'ndl-large': size === 'large',
152
+ 'ndl-medium': size === 'medium',
153
+ 'ndl-small': size === 'small',
154
154
  });
155
155
  return _jsx(components.SingleValue, Object.assign({}, restProps, { className: classes }));
156
156
  };
@@ -160,9 +160,9 @@ export const CustomMenu = ({ size, }) => function Component(_a) {
160
160
  const { themeClassName } = useNeedleTheme();
161
161
  const classes = classNames('ndl-select-menu', className, themeClassName, {
162
162
  'ndl-is-multi': restProps.isMulti,
163
- 'ndl-small': size === 'small',
164
- 'ndl-medium': size === 'medium',
165
163
  'ndl-large': size === 'large',
164
+ 'ndl-medium': size === 'medium',
165
+ 'ndl-small': size === 'small',
166
166
  });
167
167
  return (_jsx(components.Menu, Object.assign({}, restProps, { className: classes, children: children })));
168
168
  };
@@ -170,9 +170,9 @@ export const CustomMenuPortal = ({ size, }) => function Component(_a) {
170
170
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
171
171
  const classes = classNames(className, 'ndl-select-menu-portal', {
172
172
  'ndl-is-multi': restProps.isMulti,
173
- 'ndl-small': size === 'small',
174
- 'ndl-medium': size === 'medium',
175
173
  'ndl-large': size === 'large',
174
+ 'ndl-medium': size === 'medium',
175
+ 'ndl-small': size === 'small',
176
176
  });
177
177
  return (_jsx(components.MenuPortal, Object.assign({}, restProps, { className: classes, children: children })));
178
178
  };
@@ -180,24 +180,26 @@ export const CustomMenuList = ({ size, }) => function Component(_a) {
180
180
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
181
181
  const classes = classNames(className, 'ndl-select-menu-list', {
182
182
  'ndl-is-multi': restProps.isMulti,
183
- 'ndl-small': size === 'small',
184
- 'ndl-medium': size === 'medium',
185
183
  'ndl-large': size === 'large',
184
+ 'ndl-medium': size === 'medium',
185
+ 'ndl-small': size === 'small',
186
186
  });
187
187
  return (_jsx(components.MenuList, Object.assign({}, restProps, { className: classes, children: children })));
188
188
  };
189
189
  export const CustomOption = ({ size, }) => function Component(_a) {
190
190
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
191
191
  const classes = classNames(className, 'ndl-select-option', {
192
- 'ndl-is-multi': restProps.isMulti,
193
192
  'ndl-disabled': restProps.isDisabled,
194
- 'ndl-selected': restProps.isSelected,
195
193
  'ndl-focused': restProps.isFocused,
196
- 'ndl-small': size === 'small',
197
- 'ndl-medium': size === 'medium',
194
+ 'ndl-is-multi': restProps.isMulti,
198
195
  'ndl-large': size === 'large',
196
+ 'ndl-medium': size === 'medium',
197
+ 'ndl-selected': restProps.isSelected,
198
+ 'ndl-small': size === 'small',
199
199
  });
200
200
  return (_jsxs(components.Option, Object.assign({}, restProps, { className: classes, children: [restProps.isMulti === true && (_jsx(Checkbox, { isChecked: restProps.isSelected, ariaLabel: restProps.label, isDisabled: restProps.isDisabled, htmlAttributes: {
201
+ 'aria-hidden': true,
202
+ disabled: true,
201
203
  onPointerDown: (e) => {
202
204
  var _a, _b;
203
205
  e.preventDefault();
@@ -208,8 +210,6 @@ export const CustomOption = ({ size, }) => function Component(_a) {
208
210
  e.preventDefault();
209
211
  (_b = (_a = restProps.innerProps).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
210
212
  },
211
- disabled: true,
212
- 'aria-hidden': true,
213
213
  role: 'presentation',
214
214
  tabIndex: -1,
215
215
  } })), children] })));
@@ -1 +1 @@
1
- {"version":3,"file":"Overrides.js","sourceRoot":"","sources":["../../../src/select/Overrides.tsx"],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AE,SAAS,CAAC,UAAU,EAC/B,SAAS,EAAE,SAAS,CAAC,KAAK,EAC1B,UAAU,EAAE,SAAS,CAAC,UAAU,EAChC,cAAc,EAAE;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,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","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;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S,EAAE,SAAS,CAAC,KAAK,EAC1B,UAAU,EAAE,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","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"]}
@@ -31,7 +31,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
31
31
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
32
32
  */
33
33
  import classNames from 'classnames';
34
- import { useEffect, useId, useMemo } from 'react';
34
+ import { useEffect, useId, useMemo, useState } from 'react';
35
35
  import ReactSelect from 'react-select';
36
36
  import AsyncSelect from 'react-select/async';
37
37
  /** Different types of select components */
@@ -90,6 +90,28 @@ export const Select = (_a) => {
90
90
  const isInsideDialog = useIsInsideDialog();
91
91
  const menuPosition = isInsideDialog ? 'fixed' : 'absolute';
92
92
  const identifier = useId();
93
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
94
+ const handleMenuOpen = () => {
95
+ setIsMenuOpen(true);
96
+ if (selectProps.onMenuOpen) {
97
+ selectProps.onMenuOpen();
98
+ }
99
+ };
100
+ const handleMenuClose = () => {
101
+ setIsMenuOpen(false);
102
+ if (selectProps.onMenuClose) {
103
+ selectProps.onMenuClose();
104
+ }
105
+ };
106
+ // Handle Escape key to prevent it from bubbling up to dialog
107
+ const handleKeyDown = (event) => {
108
+ if (event.key === 'Escape' && isMenuOpen) {
109
+ event.stopPropagation();
110
+ }
111
+ if (selectProps.onKeyDown) {
112
+ selectProps.onKeyDown(event);
113
+ }
114
+ };
93
115
  const Component = as !== null && as !== void 0 ? as : 'div';
94
116
  const ComponentOverrides = useMemo(() => overrideComponents({
95
117
  errorText,
@@ -105,14 +127,14 @@ export const Select = (_a) => {
105
127
  let SelectElement;
106
128
  switch (type) {
107
129
  case 'async': {
108
- SelectElement = (_jsx(AsyncSelect, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto", "aria-label": ariaLabel }, selectProps, { menuPosition: (_b = selectProps.menuPosition) !== null && _b !== void 0 ? _b : menuPosition, hideSelectedOptions: false, closeMenuOnSelect: Boolean(selectProps.isMulti) === false, styles: Object.assign(Object.assign({}, StyleOverrides), selectProps.styles), components: Object.assign(Object.assign({}, ComponentOverrides), selectProps.components) })));
130
+ SelectElement = (_jsx(AsyncSelect, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto", "aria-label": ariaLabel }, selectProps, { onKeyDown: handleKeyDown, onMenuOpen: handleMenuOpen, onMenuClose: handleMenuClose, menuPosition: (_b = selectProps.menuPosition) !== null && _b !== void 0 ? _b : menuPosition, hideSelectedOptions: false, closeMenuOnSelect: Boolean(selectProps.isMulti) === false, styles: Object.assign(Object.assign({}, StyleOverrides), selectProps.styles), components: Object.assign(Object.assign({}, ComponentOverrides), selectProps.components) })));
109
131
  break;
110
132
  }
111
133
  case 'creatable':
112
- SelectElement = (_jsx(Creatable, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto" }, selectProps, { "aria-label": ariaLabel, menuPosition: (_c = selectProps.menuPosition) !== null && _c !== void 0 ? _c : menuPosition, hideSelectedOptions: false, closeMenuOnSelect: Boolean(selectProps.isMulti) === false, styles: Object.assign(Object.assign({}, StyleOverrides), selectProps.styles), components: Object.assign(Object.assign({}, ComponentOverrides), selectProps.components) })));
134
+ SelectElement = (_jsx(Creatable, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto" }, selectProps, { "aria-label": ariaLabel, onKeyDown: handleKeyDown, onMenuOpen: handleMenuOpen, onMenuClose: handleMenuClose, menuPosition: (_c = selectProps.menuPosition) !== null && _c !== void 0 ? _c : menuPosition, hideSelectedOptions: false, closeMenuOnSelect: Boolean(selectProps.isMulti) === false, styles: Object.assign(Object.assign({}, StyleOverrides), selectProps.styles), components: Object.assign(Object.assign({}, ComponentOverrides), selectProps.components) })));
113
135
  break;
114
136
  default:
115
- SelectElement = (_jsx(ReactSelect, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto" }, selectProps, { "aria-label": ariaLabel, menuPosition: (_d = selectProps.menuPosition) !== null && _d !== void 0 ? _d : menuPosition, hideSelectedOptions: false, closeMenuOnSelect: Boolean(selectProps.isMulti) === false, styles: Object.assign(Object.assign({}, StyleOverrides), selectProps.styles), components: Object.assign(Object.assign({}, ComponentOverrides), selectProps.components) })));
137
+ SelectElement = (_jsx(ReactSelect, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto" }, selectProps, { "aria-label": ariaLabel, onKeyDown: handleKeyDown, onMenuOpen: handleMenuOpen, onMenuClose: handleMenuClose, menuPosition: (_d = selectProps.menuPosition) !== null && _d !== void 0 ? _d : menuPosition, hideSelectedOptions: false, closeMenuOnSelect: Boolean(selectProps.isMulti) === false, styles: Object.assign(Object.assign({}, StyleOverrides), selectProps.styles), components: Object.assign(Object.assign({}, ComponentOverrides), selectProps.components) })));
116
138
  }
117
139
  const classes = classNames('ndl-select', className, {
118
140
  'ndl-creatable': type === 'creatable',
@@ -1 +1 @@
1
- {"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/select/Select.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,WAA+B,MAAM,cAAc,CAAC;AAC3D,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,2CAA2C;AAC3C,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAG/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EACL,qBAAqB,EACrB,aAAa,EACb,yBAAyB,EACzB,WAAW,EACX,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,GAC1B,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C,cAAc,mBACT,OAAO,CAAC,UAAU,CAAC,IAAI,WAAW,CAAC,UAAU,YAE3D,QAAQ,GACJ,CACR,EACA,OAAO,CAAC,SAAS,CAAC,IAAI,CACrB,eAAK,SAAS,EAAC,gDAAgD,aAC7D,KAAC,0BAA0B,IACzB,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,OAAO,CAAC,EAChD,cAAc,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAC9C,EACF,eAAM,SAAS,EAAC,6BAA6B,YAAE,SAAS,GAAQ,IAC5D,CACP,KACS,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { useEffect, useId, useMemo } from 'react';\nimport ReactSelect, { type GroupBase } from 'react-select';\nimport AsyncSelect from 'react-select/async';\n/** Different types of select components */\nimport Creatable from 'react-select/creatable';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { needleWarningMessage } from '../_common/utils';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { ExclamationCircleIconSolid } from '../icons';\nimport {\n CustomClearIndication,\n CustomControl,\n CustomIndicatorsContainer,\n CustomInput,\n CustomMenu,\n CustomMenuList,\n CustomMenuPortal,\n CustomMultiValue,\n CustomOption,\n CustomPlaceholder,\n CustomSingleValue,\n CustomValueContainer,\n DropdownIndicatorCurrying,\n} from './Overrides';\nimport { type SelectOverrideCustomProps, type SelectProps } from './types';\n\n/**\n *\n *\n * Helpers\n *\n *\n */\n\nconst overrideComponents = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>(\n props: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>,\n) =>\n ({\n ClearIndicator: CustomClearIndication(props),\n Control: CustomControl(props),\n DropdownIndicator: DropdownIndicatorCurrying(props),\n IndicatorSeparator: null,\n IndicatorsContainer: CustomIndicatorsContainer(props),\n Input: CustomInput(props),\n Menu: CustomMenu(props),\n MenuList: CustomMenuList(props),\n MenuPortal: CustomMenuPortal(props),\n MultiValue: CustomMultiValue(props),\n Option: CustomOption(props),\n Placeholder: CustomPlaceholder(props),\n SingleValue: CustomSingleValue(props),\n ValueContainer: CustomValueContainer(props),\n }) as SelectProps<\n OptionType,\n IsMulti,\n GroupType\n >['selectProps']['components'];\n\nconst customStyles = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>() => {\n return {\n clearIndicator: () => ({}),\n control: () => ({}),\n dropdownIndicator: () => ({}),\n indicatorsContainer: () => ({}),\n input: () => ({}),\n menu: (provided) => ({\n bottom: provided.bottom,\n top: provided.top,\n }),\n menuList: (provided) => ({\n maxHeight: provided.maxHeight,\n minHeight: provided.minHeight,\n }),\n option: () => ({}),\n placeholder: () => ({}),\n singleValue: () => ({}),\n valueContainer: (provided) => ({\n ...provided,\n padding: '0',\n }),\n } as SelectProps<OptionType, IsMulti, GroupType>['selectProps']['styles'];\n};\n\nexport const Select = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n T extends React.ElementType = 'div',\n>({\n as,\n label,\n helpText,\n errorText,\n isFluid = true,\n size = 'medium',\n type = 'select',\n ariaLabel,\n selectProps = {},\n isClean = false,\n isDisabled,\n htmlAttributes,\n className,\n style,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, SelectProps<OptionType, IsMulti, GroupType>>) => {\n const isInsideDialog = useIsInsideDialog();\n const menuPosition = isInsideDialog ? 'fixed' : 'absolute';\n const identifier = useId();\n\n const Component: React.ElementType = as ?? 'div';\n\n const ComponentOverrides = useMemo(\n () =>\n overrideComponents<OptionType, IsMulti, GroupType>({\n errorText,\n isClean,\n size,\n }),\n [errorText, size, isClean],\n );\n\n const StyleOverrides = useMemo(\n () => customStyles<OptionType, IsMulti, GroupType>(),\n [],\n );\n\n useEffect(() => {\n if (label === undefined && ariaLabel === undefined) {\n needleWarningMessage(\n 'A Select needs to have a label or an aria label to be accessible. link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI',\n );\n }\n }, [label, ariaLabel]);\n\n let SelectElement: React.JSX.Element;\n switch (type) {\n case 'async': {\n SelectElement = (\n <AsyncSelect\n name={identifier}\n inputId={identifier}\n isDisabled={Boolean(isDisabled) || selectProps.isDisabled}\n menuPlacement=\"auto\"\n aria-label={ariaLabel}\n {...selectProps}\n menuPosition={selectProps.menuPosition ?? menuPosition}\n hideSelectedOptions={false}\n closeMenuOnSelect={Boolean(selectProps.isMulti) === false}\n styles={{ ...StyleOverrides, ...selectProps.styles }}\n components={{ ...ComponentOverrides, ...selectProps.components }}\n />\n );\n break;\n }\n case 'creatable':\n SelectElement = (\n <Creatable\n name={identifier}\n inputId={identifier}\n isDisabled={Boolean(isDisabled) || selectProps.isDisabled}\n menuPlacement=\"auto\"\n {...selectProps}\n aria-label={ariaLabel}\n menuPosition={selectProps.menuPosition ?? menuPosition}\n hideSelectedOptions={false}\n closeMenuOnSelect={Boolean(selectProps.isMulti) === false}\n styles={{ ...StyleOverrides, ...selectProps.styles }}\n components={{ ...ComponentOverrides, ...selectProps.components }}\n />\n );\n break;\n default:\n SelectElement = (\n <ReactSelect\n name={identifier}\n inputId={identifier}\n isDisabled={Boolean(isDisabled) || selectProps.isDisabled}\n menuPlacement=\"auto\"\n {...selectProps}\n aria-label={ariaLabel}\n menuPosition={selectProps.menuPosition ?? menuPosition}\n hideSelectedOptions={false}\n closeMenuOnSelect={Boolean(selectProps.isMulti) === false}\n styles={{ ...StyleOverrides, ...selectProps.styles }}\n components={{ ...ComponentOverrides, ...selectProps.components }}\n />\n );\n }\n\n const classes = classNames('ndl-select', className, {\n 'ndl-creatable': type === 'creatable',\n 'ndl-disabled': selectProps.isDisabled,\n 'ndl-fluid': isFluid,\n 'ndl-has-error': Boolean(errorText),\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-multi': selectProps.isMulti,\n 'ndl-small': size === 'small',\n });\n\n return (\n <Component\n ref={ref}\n className={classes}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n {Boolean(label) && <label htmlFor={identifier}>{label}</label>}\n {SelectElement}\n {Boolean(helpText) && Boolean(errorText) === false && (\n <span\n className=\"ndl-sub-text\"\n aria-disabled={Boolean(isDisabled) || selectProps.isDisabled}\n >\n {helpText}\n </span>\n )}\n {Boolean(errorText) && (\n <div className=\"n-flex n-flex-row n-gap-token-4 n-items-center\">\n <ExclamationCircleIconSolid\n className={classNames('ndl-error-icon', classes)}\n htmlAttributes={{ role: 'img', type: 'solid' }}\n />\n <span className=\"ndl-sub-text ndl-error-text\">{errorText}</span>\n </div>\n )}\n </Component>\n );\n};\n"]}
1
+ {"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/select/Select.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,WAA+B,MAAM,cAAc,CAAC;AAC3D,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,2CAA2C;AAC3C,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAG/C,OAAO,EAAE,oBAAoB,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AO,CAAC,SAAS,CAAC,KAAK,KAAK,IAAI,CACpD,eACE,SAAS,EAAC,cAAc,mBACT,OAAO,CAAC,UAAU,CAAC,IAAI,WAAW,CAAC,UAAU,YAE3D,QAAQ,GACJ,CACR,EACA,OAAO,CAAC,SAAS,CAAC,IAAI,CACrB,eAAK,SAAS,EAAC,gDAAgD,aAC7D,KAAC,0BAA0B,IACzB,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,OAAO,CAAC,EAChD,cAAc,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAC9C,EACF,eAAM,SAAS,EAAC,6BAA6B,YAAE,SAAS,GAAQ,IAC5D,CACP,KACS,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { useEffect, useId, useMemo, useState } from 'react';\nimport ReactSelect, { type GroupBase } from 'react-select';\nimport AsyncSelect from 'react-select/async';\n/** Different types of select components */\nimport Creatable from 'react-select/creatable';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { needleWarningMessage } from '../_common/utils';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { ExclamationCircleIconSolid } from '../icons';\nimport {\n CustomClearIndication,\n CustomControl,\n CustomIndicatorsContainer,\n CustomInput,\n CustomMenu,\n CustomMenuList,\n CustomMenuPortal,\n CustomMultiValue,\n CustomOption,\n CustomPlaceholder,\n CustomSingleValue,\n CustomValueContainer,\n DropdownIndicatorCurrying,\n} from './Overrides';\nimport { type SelectOverrideCustomProps, type SelectProps } from './types';\n\n/**\n *\n *\n * Helpers\n *\n *\n */\n\nconst overrideComponents = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>(\n props: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>,\n) =>\n ({\n ClearIndicator: CustomClearIndication(props),\n Control: CustomControl(props),\n DropdownIndicator: DropdownIndicatorCurrying(props),\n IndicatorSeparator: null,\n IndicatorsContainer: CustomIndicatorsContainer(props),\n Input: CustomInput(props),\n Menu: CustomMenu(props),\n MenuList: CustomMenuList(props),\n MenuPortal: CustomMenuPortal(props),\n MultiValue: CustomMultiValue(props),\n Option: CustomOption(props),\n Placeholder: CustomPlaceholder(props),\n SingleValue: CustomSingleValue(props),\n ValueContainer: CustomValueContainer(props),\n }) as SelectProps<\n OptionType,\n IsMulti,\n GroupType\n >['selectProps']['components'];\n\nconst customStyles = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>() => {\n return {\n clearIndicator: () => ({}),\n control: () => ({}),\n dropdownIndicator: () => ({}),\n indicatorsContainer: () => ({}),\n input: () => ({}),\n menu: (provided) => ({\n bottom: provided.bottom,\n top: provided.top,\n }),\n menuList: (provided) => ({\n maxHeight: provided.maxHeight,\n minHeight: provided.minHeight,\n }),\n option: () => ({}),\n placeholder: () => ({}),\n singleValue: () => ({}),\n valueContainer: (provided) => ({\n ...provided,\n padding: '0',\n }),\n } as SelectProps<OptionType, IsMulti, GroupType>['selectProps']['styles'];\n};\n\nexport const Select = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n T extends React.ElementType = 'div',\n>({\n as,\n label,\n helpText,\n errorText,\n isFluid = true,\n size = 'medium',\n type = 'select',\n ariaLabel,\n selectProps = {},\n isClean = false,\n isDisabled,\n htmlAttributes,\n className,\n style,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, SelectProps<OptionType, IsMulti, GroupType>>) => {\n const isInsideDialog = useIsInsideDialog();\n const menuPosition = isInsideDialog ? 'fixed' : 'absolute';\n const identifier = useId();\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n\n const handleMenuOpen = () => {\n setIsMenuOpen(true);\n if (selectProps.onMenuOpen) {\n selectProps.onMenuOpen();\n }\n };\n\n const handleMenuClose = () => {\n setIsMenuOpen(false);\n if (selectProps.onMenuClose) {\n selectProps.onMenuClose();\n }\n };\n\n // Handle Escape key to prevent it from bubbling up to dialog\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Escape' && isMenuOpen) {\n event.stopPropagation();\n }\n\n if (selectProps.onKeyDown) {\n selectProps.onKeyDown(event);\n }\n };\n\n const Component: React.ElementType = as ?? 'div';\n\n const ComponentOverrides = useMemo(\n () =>\n overrideComponents<OptionType, IsMulti, GroupType>({\n errorText,\n isClean,\n size,\n }),\n [errorText, size, isClean],\n );\n\n const StyleOverrides = useMemo(\n () => customStyles<OptionType, IsMulti, GroupType>(),\n [],\n );\n\n useEffect(() => {\n if (label === undefined && ariaLabel === undefined) {\n needleWarningMessage(\n 'A Select needs to have a label or an aria label to be accessible. link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI',\n );\n }\n }, [label, ariaLabel]);\n\n let SelectElement: React.JSX.Element;\n switch (type) {\n case 'async': {\n SelectElement = (\n <AsyncSelect\n name={identifier}\n inputId={identifier}\n isDisabled={Boolean(isDisabled) || selectProps.isDisabled}\n menuPlacement=\"auto\"\n aria-label={ariaLabel}\n {...selectProps}\n onKeyDown={handleKeyDown}\n onMenuOpen={handleMenuOpen}\n onMenuClose={handleMenuClose}\n menuPosition={selectProps.menuPosition ?? menuPosition}\n hideSelectedOptions={false}\n closeMenuOnSelect={Boolean(selectProps.isMulti) === false}\n styles={{ ...StyleOverrides, ...selectProps.styles }}\n components={{ ...ComponentOverrides, ...selectProps.components }}\n />\n );\n break;\n }\n case 'creatable':\n SelectElement = (\n <Creatable\n name={identifier}\n inputId={identifier}\n isDisabled={Boolean(isDisabled) || selectProps.isDisabled}\n menuPlacement=\"auto\"\n {...selectProps}\n aria-label={ariaLabel}\n onKeyDown={handleKeyDown}\n onMenuOpen={handleMenuOpen}\n onMenuClose={handleMenuClose}\n menuPosition={selectProps.menuPosition ?? menuPosition}\n hideSelectedOptions={false}\n closeMenuOnSelect={Boolean(selectProps.isMulti) === false}\n styles={{ ...StyleOverrides, ...selectProps.styles }}\n components={{ ...ComponentOverrides, ...selectProps.components }}\n />\n );\n break;\n default:\n SelectElement = (\n <ReactSelect\n name={identifier}\n inputId={identifier}\n isDisabled={Boolean(isDisabled) || selectProps.isDisabled}\n menuPlacement=\"auto\"\n {...selectProps}\n aria-label={ariaLabel}\n onKeyDown={handleKeyDown}\n onMenuOpen={handleMenuOpen}\n onMenuClose={handleMenuClose}\n menuPosition={selectProps.menuPosition ?? menuPosition}\n hideSelectedOptions={false}\n closeMenuOnSelect={Boolean(selectProps.isMulti) === false}\n styles={{ ...StyleOverrides, ...selectProps.styles }}\n components={{ ...ComponentOverrides, ...selectProps.components }}\n />\n );\n }\n\n const classes = classNames('ndl-select', className, {\n 'ndl-creatable': type === 'creatable',\n 'ndl-disabled': selectProps.isDisabled,\n 'ndl-fluid': isFluid,\n 'ndl-has-error': Boolean(errorText),\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-multi': selectProps.isMulti,\n 'ndl-small': size === 'small',\n });\n\n return (\n <Component\n ref={ref}\n className={classes}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n {Boolean(label) && <label htmlFor={identifier}>{label}</label>}\n {SelectElement}\n {Boolean(helpText) && Boolean(errorText) === false && (\n <span\n className=\"ndl-sub-text\"\n aria-disabled={Boolean(isDisabled) || selectProps.isDisabled}\n >\n {helpText}\n </span>\n )}\n {Boolean(errorText) && (\n <div className=\"n-flex n-flex-row n-gap-token-4 n-items-center\">\n <ExclamationCircleIconSolid\n className={classNames('ndl-error-icon', classes)}\n htmlAttributes={{ role: 'img', type: 'solid' }}\n />\n <span className=\"ndl-sub-text ndl-error-text\">{errorText}</span>\n </div>\n )}\n </Component>\n );\n};\n"]}
@@ -38,12 +38,12 @@ const loadOptions = (inputValue) => {
38
38
  const Component = (props) => {
39
39
  var _a;
40
40
  return (_jsx(Select, { label: "Label", helpText: "Start typing to load options dynamically", type: "async", selectProps: {
41
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
42
- loadOptions,
43
- placeholder: 'Type to search...',
44
- isClearable: true,
45
41
  cacheOptions: true,
46
42
  defaultOptions: true,
43
+ isClearable: true,
44
+ loadOptions,
45
+ menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
46
+ placeholder: 'Type to search...',
47
47
  } }));
48
48
  };
49
49
  export 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;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,KAAC,MAAM,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,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;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,KAAC,MAAM,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,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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"]}
@@ -31,12 +31,12 @@ const Component = (props) => {
31
31
  var _a;
32
32
  const [value, setValue] = useState(EXAMPLE_OPTIONS[0]);
33
33
  return (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-8", children: [_jsx(Select, { label: "Label", type: "select", selectProps: {
34
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
35
- value: value,
36
- options: EXAMPLE_OPTIONS,
37
34
  isMulti: false,
38
- onChange: (newValue) => newValue && setValue(newValue),
35
+ menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
39
36
  menuPortalTarget: document.querySelector('body'),
37
+ onChange: (newValue) => newValue && setValue(newValue),
38
+ options: EXAMPLE_OPTIONS,
39
+ value: value,
40
40
  } }), _jsxs(Typography, { variant: "body-small", children: ["Value Selected: ", JSON.stringify(value)] })] }));
41
41
  };
42
42
  export 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,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;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,QAAQ,CAChC,eAAe,CAAC,CAAC,CAAC,CACnB,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,iCAAiC,aAC9C,KAAC,MAAM,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,MAAC,UAAU,IAAC,OAAO,EAAC,YAAY,iCACb,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAC3B,IACT,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\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,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;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,QAAQ,CAChC,eAAe,CAAC,CAAC,CAAC,CACnB,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,iCAAiC,aAC9C,KAAC,MAAM,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,MAAC,UAAU,IAAC,OAAO,EAAC,YAAY,iCACb,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAC3B,IACT,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\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"]}
@@ -30,9 +30,9 @@ const EXAMPLE_OPTIONS = [
30
30
  const Component = (props) => {
31
31
  var _a;
32
32
  return (_jsx(Select, { label: "Label", helpText: "You can create values even if they don't exist as options", type: "creatable", selectProps: {
33
+ isClearable: true,
33
34
  menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
34
35
  options: EXAMPLE_OPTIONS,
35
- isClearable: true,
36
36
  } }));
37
37
  };
38
38
  export 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;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,KAAC,MAAM,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,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;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,KAAC,MAAM,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,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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"]}
@@ -31,9 +31,9 @@ const EXAMPLE_OPTIONS = [
31
31
  const Component = (props) => {
32
32
  var _a;
33
33
  return (_jsx(Select, { label: _jsxs("div", { className: "n-flex n-flex-row n-gap-token-4 n-h-7 n-items-center", children: ["Custom JSX element", _jsx(QuestionMarkCircleIconOutline, { className: "n-h-token-16" })] }), helpText: "You can have a custom label with JSX code \uD83D\uDE31", type: "select", selectProps: {
34
+ defaultValue: EXAMPLE_OPTIONS[1],
34
35
  menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
35
36
  options: EXAMPLE_OPTIONS,
36
- defaultValue: EXAMPLE_OPTIONS[1],
37
37
  } }));
38
38
  };
39
39
  export 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;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,KAAC,MAAM,IACL,KAAK,EACH,eAAK,SAAS,EAAC,sDAAsD,mCAEnE,KAAC,6BAA6B,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,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;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,KAAC,MAAM,IACL,KAAK,EACH,eAAK,SAAS,EAAC,sDAAsD,mCAEnE,KAAC,6BAA6B,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,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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"]}
@@ -30,8 +30,8 @@ const EXAMPLE_OPTIONS = [
30
30
  const Component = (props) => {
31
31
  var _a;
32
32
  return (_jsx(Select, { label: "Label", type: "select", selectProps: {
33
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
34
33
  isDisabled: true,
34
+ menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
35
35
  options: EXAMPLE_OPTIONS,
36
36
  } }));
37
37
  };
@@ -1 +1 @@
1
- {"version":3,"file":"select-disabled.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-disabled.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;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,KAAC,MAAM,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,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;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,KAAC,MAAM,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,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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"]}