@neo4j-ndl/react 4.9.18 → 4.9.20

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 (354) hide show
  1. package/lib/cjs/_common/ButtonSpinner.js +53 -0
  2. package/lib/cjs/_common/ButtonSpinner.js.map +1 -0
  3. package/lib/cjs/button/ButtonBase.js +5 -3
  4. package/lib/cjs/button/ButtonBase.js.map +1 -1
  5. package/lib/cjs/button/stories/button-loading.story.js +1 -1
  6. package/lib/cjs/button/stories/button-loading.story.js.map +1 -1
  7. package/lib/cjs/clean-icon-button/stories/clean-icon-button-loading.story.js +1 -1
  8. package/lib/cjs/clean-icon-button/stories/clean-icon-button-loading.story.js.map +1 -1
  9. package/lib/cjs/color-picker/ColorPicker.js +1 -1
  10. package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
  11. package/lib/cjs/dialog/stories/dialog-danger.story.js +1 -1
  12. package/lib/cjs/dialog/stories/dialog-danger.story.js.map +1 -1
  13. package/lib/cjs/dialog/stories/dialog-default.story.js +1 -1
  14. package/lib/cjs/dialog/stories/dialog-default.story.js.map +1 -1
  15. package/lib/cjs/dialog/stories/dialog-image.story.js +1 -1
  16. package/lib/cjs/dialog/stories/dialog-image.story.js.map +1 -1
  17. package/lib/cjs/dialog/stories/dialog-info.story.js +1 -1
  18. package/lib/cjs/dialog/stories/dialog-info.story.js.map +1 -1
  19. package/lib/cjs/dialog/stories/dialog-top-aligned.story.js +1 -1
  20. package/lib/cjs/dialog/stories/dialog-top-aligned.story.js.map +1 -1
  21. package/lib/cjs/dialog/stories/dialog-variants.story.js +1 -1
  22. package/lib/cjs/dialog/stories/dialog-variants.story.js.map +1 -1
  23. package/lib/cjs/dialog/stories/dialog-warning.story.js +1 -1
  24. package/lib/cjs/dialog/stories/dialog-warning.story.js.map +1 -1
  25. package/lib/cjs/dropdown-button/DropdownButton.js +18 -4
  26. package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
  27. package/lib/cjs/dropdown-button/stories/dropdown-button-loading.story.js +30 -0
  28. package/lib/cjs/dropdown-button/stories/dropdown-button-loading.story.js.map +1 -0
  29. package/lib/cjs/dropdown-button/stories/index.js +5 -1
  30. package/lib/cjs/dropdown-button/stories/index.js.map +1 -1
  31. package/lib/cjs/icon-button/stories/icon-button-loading.story.js +1 -1
  32. package/lib/cjs/icon-button/stories/icon-button-loading.story.js.map +1 -1
  33. package/lib/cjs/icon-button-base/IconButtonBase.js +7 -3
  34. package/lib/cjs/icon-button-base/IconButtonBase.js.map +1 -1
  35. package/lib/cjs/menu/stories/menu-custom-items.story.js +1 -1
  36. package/lib/cjs/menu/stories/menu-custom-items.story.js.map +1 -1
  37. package/lib/cjs/menu/stories/menu-default.story.js +2 -2
  38. package/lib/cjs/menu/stories/menu-default.story.js.map +1 -1
  39. package/lib/cjs/menu/stories/menu-in-dialog.story.js +2 -2
  40. package/lib/cjs/menu/stories/menu-in-dialog.story.js.map +1 -1
  41. package/lib/cjs/menu/stories/menu-in-popover.story.js +1 -1
  42. package/lib/cjs/menu/stories/menu-in-popover.story.js.map +1 -1
  43. package/lib/cjs/menu/stories/menu-nested.story.js +1 -1
  44. package/lib/cjs/menu/stories/menu-nested.story.js.map +1 -1
  45. package/lib/cjs/menu/stories/menu-placements.story.js +2 -2
  46. package/lib/cjs/menu/stories/menu-placements.story.js.map +1 -1
  47. package/lib/cjs/menu/stories/menu-radio-and-normal.story.js +2 -2
  48. package/lib/cjs/menu/stories/menu-radio-and-normal.story.js.map +1 -1
  49. package/lib/cjs/menu/stories/menu-radio-items.story.js +2 -2
  50. package/lib/cjs/menu/stories/menu-radio-items.story.js.map +1 -1
  51. package/lib/cjs/menu/stories/menu-with-category.story.js +1 -1
  52. package/lib/cjs/menu/stories/menu-with-category.story.js.map +1 -1
  53. package/lib/cjs/menu/stories/menu-with-disabled-item.story.js +1 -1
  54. package/lib/cjs/menu/stories/menu-with-disabled-item.story.js.map +1 -1
  55. package/lib/cjs/menu/stories/menu-with-divider.story.js +1 -1
  56. package/lib/cjs/menu/stories/menu-with-divider.story.js.map +1 -1
  57. package/lib/cjs/menu/stories/menu-with-icon.story.js +1 -1
  58. package/lib/cjs/menu/stories/menu-with-icon.story.js.map +1 -1
  59. package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js +1 -1
  60. package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
  61. package/lib/cjs/select/Overrides.js +17 -2
  62. package/lib/cjs/select/Overrides.js.map +1 -1
  63. package/lib/cjs/select/Select.js +10 -5
  64. package/lib/cjs/select/Select.js.map +1 -1
  65. package/lib/cjs/select/types.js.map +1 -1
  66. package/lib/cjs/select-icon-button/SelectIconButton.js +16 -5
  67. package/lib/cjs/select-icon-button/SelectIconButton.js.map +1 -1
  68. package/lib/cjs/select-icon-button/stories/select-icon-button-states.story.js +1 -1
  69. package/lib/cjs/select-icon-button/stories/select-icon-button-states.story.js.map +1 -1
  70. package/lib/cjs/text-area/TextArea.js +1 -1
  71. package/lib/cjs/text-area/TextArea.js.map +1 -1
  72. package/lib/cjs/text-input/TextInput.js +1 -1
  73. package/lib/cjs/text-input/TextInput.js.map +1 -1
  74. package/lib/cjs/text-input/stories/text-input-clearable.story.js +1 -1
  75. package/lib/cjs/text-input/stories/text-input-clearable.story.js.map +1 -1
  76. package/lib/cjs/text-input/stories/text-input-default.story.js +1 -1
  77. package/lib/cjs/text-input/stories/text-input-default.story.js.map +1 -1
  78. package/lib/cjs/text-input/stories/text-input-disabled.story.js +1 -1
  79. package/lib/cjs/text-input/stories/text-input-disabled.story.js.map +1 -1
  80. package/lib/cjs/text-input/stories/text-input-email.story.js +1 -0
  81. package/lib/cjs/text-input/stories/text-input-email.story.js.map +1 -1
  82. package/lib/cjs/text-input/stories/text-input-error.story.js +1 -1
  83. package/lib/cjs/text-input/stories/text-input-error.story.js.map +1 -1
  84. package/lib/cjs/text-input/stories/text-input-full.story.js +1 -1
  85. package/lib/cjs/text-input/stories/text-input-full.story.js.map +1 -1
  86. package/lib/cjs/text-input/stories/text-input-information-icon.story.js +1 -1
  87. package/lib/cjs/text-input/stories/text-input-information-icon.story.js.map +1 -1
  88. package/lib/cjs/text-input/stories/text-input-loading-spinner.story.js +1 -1
  89. package/lib/cjs/text-input/stories/text-input-loading-spinner.story.js.map +1 -1
  90. package/lib/cjs/text-input/stories/text-input-loading.story.js +1 -1
  91. package/lib/cjs/text-input/stories/text-input-loading.story.js.map +1 -1
  92. package/lib/cjs/text-input/stories/text-input-number.story.js +1 -0
  93. package/lib/cjs/text-input/stories/text-input-number.story.js.map +1 -1
  94. package/lib/cjs/text-input/stories/text-input-optional.story.js +1 -1
  95. package/lib/cjs/text-input/stories/text-input-optional.story.js.map +1 -1
  96. package/lib/cjs/text-input/stories/text-input-password.story.js +1 -0
  97. package/lib/cjs/text-input/stories/text-input-password.story.js.map +1 -1
  98. package/lib/cjs/text-input/stories/text-input-readonly.story.js +1 -1
  99. package/lib/cjs/text-input/stories/text-input-readonly.story.js.map +1 -1
  100. package/lib/cjs/text-input/stories/text-input-required.story.js +1 -1
  101. package/lib/cjs/text-input/stories/text-input-required.story.js.map +1 -1
  102. package/lib/cjs/text-input/stories/text-input-sizes.story.js +1 -1
  103. package/lib/cjs/text-input/stories/text-input-sizes.story.js.map +1 -1
  104. package/lib/cjs/text-input/stories/text-input-with-icons.story.js +1 -1
  105. package/lib/cjs/text-input/stories/text-input-with-icons.story.js.map +1 -1
  106. package/lib/cjs/time-picker/TimePicker.js +5 -4
  107. package/lib/cjs/time-picker/TimePicker.js.map +1 -1
  108. package/lib/cjs/time-picker/stories/index.js +5 -1
  109. package/lib/cjs/time-picker/stories/index.js.map +1 -1
  110. package/lib/cjs/time-picker/stories/time-picker-default.story.js +1 -1
  111. package/lib/cjs/time-picker/stories/time-picker-default.story.js.map +1 -1
  112. package/lib/cjs/time-picker/stories/time-picker-error.story.js +32 -0
  113. package/lib/cjs/time-picker/stories/time-picker-error.story.js.map +1 -0
  114. package/lib/cjs/time-picker/stories/time-picker-in-dialog.story.js +1 -1
  115. package/lib/cjs/time-picker/stories/time-picker-in-dialog.story.js.map +1 -1
  116. package/lib/cjs/timezone-picker/TimeZonePicker.js +5 -4
  117. package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
  118. package/lib/cjs/timezone-picker/stories/index.js +5 -1
  119. package/lib/cjs/timezone-picker/stories/index.js.map +1 -1
  120. package/lib/cjs/timezone-picker/stories/timezone-picker-both-mode.story.js +1 -1
  121. package/lib/cjs/timezone-picker/stories/timezone-picker-both-mode.story.js.map +1 -1
  122. package/lib/cjs/timezone-picker/stories/timezone-picker-default.story.js +1 -1
  123. package/lib/cjs/timezone-picker/stories/timezone-picker-default.story.js.map +1 -1
  124. package/lib/cjs/timezone-picker/stories/timezone-picker-disabled.story.js +1 -1
  125. package/lib/cjs/timezone-picker/stories/timezone-picker-disabled.story.js.map +1 -1
  126. package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +1 -1
  127. package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
  128. package/lib/cjs/timezone-picker/stories/timezone-picker-error.story.js +35 -0
  129. package/lib/cjs/timezone-picker/stories/timezone-picker-error.story.js.map +1 -0
  130. package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
  131. package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
  132. package/lib/cjs/timezone-picker/stories/timezone-picker-in-dialog.story.js +1 -1
  133. package/lib/cjs/timezone-picker/stories/timezone-picker-in-dialog.story.js.map +1 -1
  134. package/lib/cjs/timezone-picker/stories/timezone-picker-sizes.story.js +1 -1
  135. package/lib/cjs/timezone-picker/stories/timezone-picker-sizes.story.js.map +1 -1
  136. package/lib/cjs/timezone-picker/stories/timezone-picker-utc-only.story.js +1 -1
  137. package/lib/cjs/timezone-picker/stories/timezone-picker-utc-only.story.js.map +1 -1
  138. package/lib/esm/_common/ButtonSpinner.js +46 -0
  139. package/lib/esm/_common/ButtonSpinner.js.map +1 -0
  140. package/lib/esm/button/ButtonBase.js +5 -3
  141. package/lib/esm/button/ButtonBase.js.map +1 -1
  142. package/lib/esm/button/stories/button-loading.story.js +1 -1
  143. package/lib/esm/button/stories/button-loading.story.js.map +1 -1
  144. package/lib/esm/clean-icon-button/stories/clean-icon-button-loading.story.js +1 -1
  145. package/lib/esm/clean-icon-button/stories/clean-icon-button-loading.story.js.map +1 -1
  146. package/lib/esm/color-picker/ColorPicker.js +1 -1
  147. package/lib/esm/color-picker/ColorPicker.js.map +1 -1
  148. package/lib/esm/dialog/stories/dialog-danger.story.js +1 -1
  149. package/lib/esm/dialog/stories/dialog-danger.story.js.map +1 -1
  150. package/lib/esm/dialog/stories/dialog-default.story.js +1 -1
  151. package/lib/esm/dialog/stories/dialog-default.story.js.map +1 -1
  152. package/lib/esm/dialog/stories/dialog-image.story.js +1 -1
  153. package/lib/esm/dialog/stories/dialog-image.story.js.map +1 -1
  154. package/lib/esm/dialog/stories/dialog-info.story.js +1 -1
  155. package/lib/esm/dialog/stories/dialog-info.story.js.map +1 -1
  156. package/lib/esm/dialog/stories/dialog-top-aligned.story.js +1 -1
  157. package/lib/esm/dialog/stories/dialog-top-aligned.story.js.map +1 -1
  158. package/lib/esm/dialog/stories/dialog-variants.story.js +1 -1
  159. package/lib/esm/dialog/stories/dialog-variants.story.js.map +1 -1
  160. package/lib/esm/dialog/stories/dialog-warning.story.js +1 -1
  161. package/lib/esm/dialog/stories/dialog-warning.story.js.map +1 -1
  162. package/lib/esm/dropdown-button/DropdownButton.js +18 -4
  163. package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
  164. package/lib/esm/dropdown-button/stories/dropdown-button-loading.story.js +28 -0
  165. package/lib/esm/dropdown-button/stories/dropdown-button-loading.story.js.map +1 -0
  166. package/lib/esm/dropdown-button/stories/index.js +3 -0
  167. package/lib/esm/dropdown-button/stories/index.js.map +1 -1
  168. package/lib/esm/icon-button/stories/icon-button-loading.story.js +1 -1
  169. package/lib/esm/icon-button/stories/icon-button-loading.story.js.map +1 -1
  170. package/lib/esm/icon-button-base/IconButtonBase.js +7 -3
  171. package/lib/esm/icon-button-base/IconButtonBase.js.map +1 -1
  172. package/lib/esm/menu/stories/menu-custom-items.story.js +1 -1
  173. package/lib/esm/menu/stories/menu-custom-items.story.js.map +1 -1
  174. package/lib/esm/menu/stories/menu-default.story.js +2 -2
  175. package/lib/esm/menu/stories/menu-default.story.js.map +1 -1
  176. package/lib/esm/menu/stories/menu-in-dialog.story.js +2 -2
  177. package/lib/esm/menu/stories/menu-in-dialog.story.js.map +1 -1
  178. package/lib/esm/menu/stories/menu-in-popover.story.js +1 -1
  179. package/lib/esm/menu/stories/menu-in-popover.story.js.map +1 -1
  180. package/lib/esm/menu/stories/menu-nested.story.js +1 -1
  181. package/lib/esm/menu/stories/menu-nested.story.js.map +1 -1
  182. package/lib/esm/menu/stories/menu-placements.story.js +2 -2
  183. package/lib/esm/menu/stories/menu-placements.story.js.map +1 -1
  184. package/lib/esm/menu/stories/menu-radio-and-normal.story.js +2 -2
  185. package/lib/esm/menu/stories/menu-radio-and-normal.story.js.map +1 -1
  186. package/lib/esm/menu/stories/menu-radio-items.story.js +2 -2
  187. package/lib/esm/menu/stories/menu-radio-items.story.js.map +1 -1
  188. package/lib/esm/menu/stories/menu-with-category.story.js +1 -1
  189. package/lib/esm/menu/stories/menu-with-category.story.js.map +1 -1
  190. package/lib/esm/menu/stories/menu-with-disabled-item.story.js +1 -1
  191. package/lib/esm/menu/stories/menu-with-disabled-item.story.js.map +1 -1
  192. package/lib/esm/menu/stories/menu-with-divider.story.js +1 -1
  193. package/lib/esm/menu/stories/menu-with-divider.story.js.map +1 -1
  194. package/lib/esm/menu/stories/menu-with-icon.story.js +1 -1
  195. package/lib/esm/menu/stories/menu-with-icon.story.js.map +1 -1
  196. package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js +1 -1
  197. package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
  198. package/lib/esm/select/Overrides.js +17 -2
  199. package/lib/esm/select/Overrides.js.map +1 -1
  200. package/lib/esm/select/Select.js +10 -5
  201. package/lib/esm/select/Select.js.map +1 -1
  202. package/lib/esm/select/types.js.map +1 -1
  203. package/lib/esm/select-icon-button/SelectIconButton.js +16 -5
  204. package/lib/esm/select-icon-button/SelectIconButton.js.map +1 -1
  205. package/lib/esm/select-icon-button/stories/select-icon-button-states.story.js +1 -1
  206. package/lib/esm/select-icon-button/stories/select-icon-button-states.story.js.map +1 -1
  207. package/lib/esm/text-area/TextArea.js +1 -1
  208. package/lib/esm/text-area/TextArea.js.map +1 -1
  209. package/lib/esm/text-input/TextInput.js +1 -1
  210. package/lib/esm/text-input/TextInput.js.map +1 -1
  211. package/lib/esm/text-input/stories/text-input-clearable.story.js +1 -1
  212. package/lib/esm/text-input/stories/text-input-clearable.story.js.map +1 -1
  213. package/lib/esm/text-input/stories/text-input-default.story.js +1 -1
  214. package/lib/esm/text-input/stories/text-input-default.story.js.map +1 -1
  215. package/lib/esm/text-input/stories/text-input-disabled.story.js +1 -1
  216. package/lib/esm/text-input/stories/text-input-disabled.story.js.map +1 -1
  217. package/lib/esm/text-input/stories/text-input-email.story.js +1 -0
  218. package/lib/esm/text-input/stories/text-input-email.story.js.map +1 -1
  219. package/lib/esm/text-input/stories/text-input-error.story.js +1 -1
  220. package/lib/esm/text-input/stories/text-input-error.story.js.map +1 -1
  221. package/lib/esm/text-input/stories/text-input-full.story.js +1 -1
  222. package/lib/esm/text-input/stories/text-input-full.story.js.map +1 -1
  223. package/lib/esm/text-input/stories/text-input-information-icon.story.js +1 -1
  224. package/lib/esm/text-input/stories/text-input-information-icon.story.js.map +1 -1
  225. package/lib/esm/text-input/stories/text-input-loading-spinner.story.js +1 -1
  226. package/lib/esm/text-input/stories/text-input-loading-spinner.story.js.map +1 -1
  227. package/lib/esm/text-input/stories/text-input-loading.story.js +1 -1
  228. package/lib/esm/text-input/stories/text-input-loading.story.js.map +1 -1
  229. package/lib/esm/text-input/stories/text-input-number.story.js +1 -0
  230. package/lib/esm/text-input/stories/text-input-number.story.js.map +1 -1
  231. package/lib/esm/text-input/stories/text-input-optional.story.js +1 -1
  232. package/lib/esm/text-input/stories/text-input-optional.story.js.map +1 -1
  233. package/lib/esm/text-input/stories/text-input-password.story.js +1 -0
  234. package/lib/esm/text-input/stories/text-input-password.story.js.map +1 -1
  235. package/lib/esm/text-input/stories/text-input-readonly.story.js +1 -1
  236. package/lib/esm/text-input/stories/text-input-readonly.story.js.map +1 -1
  237. package/lib/esm/text-input/stories/text-input-required.story.js +1 -1
  238. package/lib/esm/text-input/stories/text-input-required.story.js.map +1 -1
  239. package/lib/esm/text-input/stories/text-input-sizes.story.js +1 -1
  240. package/lib/esm/text-input/stories/text-input-sizes.story.js.map +1 -1
  241. package/lib/esm/text-input/stories/text-input-with-icons.story.js +1 -1
  242. package/lib/esm/text-input/stories/text-input-with-icons.story.js.map +1 -1
  243. package/lib/esm/time-picker/TimePicker.js +6 -5
  244. package/lib/esm/time-picker/TimePicker.js.map +1 -1
  245. package/lib/esm/time-picker/stories/index.js +3 -0
  246. package/lib/esm/time-picker/stories/index.js.map +1 -1
  247. package/lib/esm/time-picker/stories/time-picker-default.story.js +1 -1
  248. package/lib/esm/time-picker/stories/time-picker-default.story.js.map +1 -1
  249. package/lib/esm/time-picker/stories/time-picker-error.story.js +30 -0
  250. package/lib/esm/time-picker/stories/time-picker-error.story.js.map +1 -0
  251. package/lib/esm/time-picker/stories/time-picker-in-dialog.story.js +1 -1
  252. package/lib/esm/time-picker/stories/time-picker-in-dialog.story.js.map +1 -1
  253. package/lib/esm/timezone-picker/TimeZonePicker.js +6 -5
  254. package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
  255. package/lib/esm/timezone-picker/stories/index.js +3 -0
  256. package/lib/esm/timezone-picker/stories/index.js.map +1 -1
  257. package/lib/esm/timezone-picker/stories/timezone-picker-both-mode.story.js +1 -1
  258. package/lib/esm/timezone-picker/stories/timezone-picker-both-mode.story.js.map +1 -1
  259. package/lib/esm/timezone-picker/stories/timezone-picker-default.story.js +1 -1
  260. package/lib/esm/timezone-picker/stories/timezone-picker-default.story.js.map +1 -1
  261. package/lib/esm/timezone-picker/stories/timezone-picker-disabled.story.js +1 -1
  262. package/lib/esm/timezone-picker/stories/timezone-picker-disabled.story.js.map +1 -1
  263. package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +1 -1
  264. package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
  265. package/lib/esm/timezone-picker/stories/timezone-picker-error.story.js +33 -0
  266. package/lib/esm/timezone-picker/stories/timezone-picker-error.story.js.map +1 -0
  267. package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
  268. package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
  269. package/lib/esm/timezone-picker/stories/timezone-picker-in-dialog.story.js +1 -1
  270. package/lib/esm/timezone-picker/stories/timezone-picker-in-dialog.story.js.map +1 -1
  271. package/lib/esm/timezone-picker/stories/timezone-picker-sizes.story.js +1 -1
  272. package/lib/esm/timezone-picker/stories/timezone-picker-sizes.story.js.map +1 -1
  273. package/lib/esm/timezone-picker/stories/timezone-picker-utc-only.story.js +1 -1
  274. package/lib/esm/timezone-picker/stories/timezone-picker-utc-only.story.js.map +1 -1
  275. package/lib/types/_common/ButtonSpinner.d.ts +29 -0
  276. package/lib/types/_common/ButtonSpinner.d.ts.map +1 -0
  277. package/lib/types/button/ButtonBase.d.ts +3 -1
  278. package/lib/types/button/ButtonBase.d.ts.map +1 -1
  279. package/lib/types/button/stories/button-loading.story.d.ts.map +1 -1
  280. package/lib/types/dialog/stories/dialog-danger.story.d.ts.map +1 -1
  281. package/lib/types/dialog/stories/dialog-default.story.d.ts.map +1 -1
  282. package/lib/types/dialog/stories/dialog-image.story.d.ts.map +1 -1
  283. package/lib/types/dialog/stories/dialog-info.story.d.ts.map +1 -1
  284. package/lib/types/dialog/stories/dialog-top-aligned.story.d.ts.map +1 -1
  285. package/lib/types/dialog/stories/dialog-variants.story.d.ts.map +1 -1
  286. package/lib/types/dialog/stories/dialog-warning.story.d.ts.map +1 -1
  287. package/lib/types/dropdown-button/DropdownButton.d.ts +5 -1
  288. package/lib/types/dropdown-button/DropdownButton.d.ts.map +1 -1
  289. package/lib/types/dropdown-button/stories/dropdown-button-loading.story.d.ts +24 -0
  290. package/lib/types/dropdown-button/stories/dropdown-button-loading.story.d.ts.map +1 -0
  291. package/lib/types/dropdown-button/stories/index.d.ts +2 -0
  292. package/lib/types/dropdown-button/stories/index.d.ts.map +1 -1
  293. package/lib/types/icon-button-base/IconButtonBase.d.ts +3 -1
  294. package/lib/types/icon-button-base/IconButtonBase.d.ts.map +1 -1
  295. package/lib/types/menu/stories/menu-custom-items.story.d.ts.map +1 -1
  296. package/lib/types/menu/stories/menu-default.story.d.ts.map +1 -1
  297. package/lib/types/menu/stories/menu-in-dialog.story.d.ts.map +1 -1
  298. package/lib/types/menu/stories/menu-in-popover.story.d.ts.map +1 -1
  299. package/lib/types/menu/stories/menu-nested.story.d.ts.map +1 -1
  300. package/lib/types/menu/stories/menu-placements.story.d.ts.map +1 -1
  301. package/lib/types/menu/stories/menu-radio-and-normal.story.d.ts.map +1 -1
  302. package/lib/types/menu/stories/menu-radio-items.story.d.ts.map +1 -1
  303. package/lib/types/menu/stories/menu-with-category.story.d.ts.map +1 -1
  304. package/lib/types/menu/stories/menu-with-disabled-item.story.d.ts.map +1 -1
  305. package/lib/types/menu/stories/menu-with-divider.story.d.ts.map +1 -1
  306. package/lib/types/menu/stories/menu-with-icon.story.d.ts.map +1 -1
  307. package/lib/types/menu/stories/menu-with-keyboard-shortcuts.story.d.ts.map +1 -1
  308. package/lib/types/select/Overrides.d.ts +1 -1
  309. package/lib/types/select/Overrides.d.ts.map +1 -1
  310. package/lib/types/select/Select.d.ts.map +1 -1
  311. package/lib/types/select/types.d.ts +4 -1
  312. package/lib/types/select/types.d.ts.map +1 -1
  313. package/lib/types/select-icon-button/SelectIconButton.d.ts +3 -1
  314. package/lib/types/select-icon-button/SelectIconButton.d.ts.map +1 -1
  315. package/lib/types/select-icon-button/stories/select-icon-button-states.story.d.ts.map +1 -1
  316. package/lib/types/text-area/TextArea.d.ts.map +1 -1
  317. package/lib/types/text-input/TextInput.d.ts.map +1 -1
  318. package/lib/types/text-input/stories/text-input-clearable.story.d.ts.map +1 -1
  319. package/lib/types/text-input/stories/text-input-default.story.d.ts.map +1 -1
  320. package/lib/types/text-input/stories/text-input-disabled.story.d.ts.map +1 -1
  321. package/lib/types/text-input/stories/text-input-email.story.d.ts.map +1 -1
  322. package/lib/types/text-input/stories/text-input-error.story.d.ts.map +1 -1
  323. package/lib/types/text-input/stories/text-input-full.story.d.ts.map +1 -1
  324. package/lib/types/text-input/stories/text-input-information-icon.story.d.ts.map +1 -1
  325. package/lib/types/text-input/stories/text-input-loading-spinner.story.d.ts.map +1 -1
  326. package/lib/types/text-input/stories/text-input-loading.story.d.ts.map +1 -1
  327. package/lib/types/text-input/stories/text-input-number.story.d.ts.map +1 -1
  328. package/lib/types/text-input/stories/text-input-optional.story.d.ts.map +1 -1
  329. package/lib/types/text-input/stories/text-input-password.story.d.ts.map +1 -1
  330. package/lib/types/text-input/stories/text-input-readonly.story.d.ts.map +1 -1
  331. package/lib/types/text-input/stories/text-input-required.story.d.ts.map +1 -1
  332. package/lib/types/text-input/stories/text-input-sizes.story.d.ts.map +1 -1
  333. package/lib/types/text-input/stories/text-input-with-icons.story.d.ts.map +1 -1
  334. package/lib/types/time-picker/TimePicker.d.ts.map +1 -1
  335. package/lib/types/time-picker/stories/index.d.ts +2 -0
  336. package/lib/types/time-picker/stories/index.d.ts.map +1 -1
  337. package/lib/types/time-picker/stories/time-picker-default.story.d.ts.map +1 -1
  338. package/lib/types/time-picker/stories/time-picker-error.story.d.ts +24 -0
  339. package/lib/types/time-picker/stories/time-picker-error.story.d.ts.map +1 -0
  340. package/lib/types/time-picker/stories/time-picker-in-dialog.story.d.ts.map +1 -1
  341. package/lib/types/timezone-picker/TimeZonePicker.d.ts.map +1 -1
  342. package/lib/types/timezone-picker/stories/index.d.ts +2 -0
  343. package/lib/types/timezone-picker/stories/index.d.ts.map +1 -1
  344. package/lib/types/timezone-picker/stories/timezone-picker-both-mode.story.d.ts.map +1 -1
  345. package/lib/types/timezone-picker/stories/timezone-picker-default.story.d.ts.map +1 -1
  346. package/lib/types/timezone-picker/stories/timezone-picker-disabled.story.d.ts.map +1 -1
  347. package/lib/types/timezone-picker/stories/timezone-picker-dst-aware.story.d.ts.map +1 -1
  348. package/lib/types/timezone-picker/stories/timezone-picker-error.story.d.ts +24 -0
  349. package/lib/types/timezone-picker/stories/timezone-picker-error.story.d.ts.map +1 -0
  350. package/lib/types/timezone-picker/stories/timezone-picker-fluid.story.d.ts.map +1 -1
  351. package/lib/types/timezone-picker/stories/timezone-picker-in-dialog.story.d.ts.map +1 -1
  352. package/lib/types/timezone-picker/stories/timezone-picker-sizes.story.d.ts.map +1 -1
  353. package/lib/types/timezone-picker/stories/timezone-picker-utc-only.story.d.ts.map +1 -1
  354. package/package.json +2 -2
@@ -27,7 +27,7 @@ const Component = () => {
27
27
  const [isOpen, setIsOpen] = useState(false);
28
28
  return (_jsxs(_Fragment, { children: [_jsxs(Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
29
29
  setIsOpen(false);
30
- }, children: [_jsxs(Menu.Group, { children: [_jsx(Menu.CategoryItem, { children: "Category 1" }), _jsx(Menu.Item, { title: "Action 1", onClick: () => alert('Action1') }), _jsx(Menu.Item, { title: "Action 2", onClick: () => alert('Action2') })] }), _jsx(Menu.Divider, {}), _jsxs(Menu.Group, { children: [_jsx(Menu.Item, { title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => alert('Action3') }), _jsx(Menu.Item, { title: "Action 4", description: "Action 4 is awesome", onClick: () => alert('Action4') })] })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
30
+ }, htmlAttributes: { id: 'category-menu' }, children: [_jsxs(Menu.Group, { children: [_jsx(Menu.CategoryItem, { children: "Category 1" }), _jsx(Menu.Item, { title: "Action 1", onClick: () => alert('Action1') }), _jsx(Menu.Item, { title: "Action 2", onClick: () => alert('Action2') })] }), _jsx(Menu.Divider, {}), _jsxs(Menu.Group, { children: [_jsx(Menu.Item, { title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => alert('Action3') }), _jsx(Menu.Item, { title: "Action 4", description: "Action 4 is awesome", onClick: () => alert('Action4') })] })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
31
31
  };
32
32
  export default Component;
33
33
  //# sourceMappingURL=menu-with-category.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-with-category.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-category.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,aAED,MAAC,IAAI,CAAC,KAAK,eACT,KAAC,IAAI,CAAC,YAAY,6BAA+B,EACjD,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAI,EAC/D,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAI,IACpD,EACb,KAAC,IAAI,CAAC,OAAO,KAAG,EAChB,MAAC,IAAI,CAAC,KAAK,eACT,KAAC,IAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,sBAAsB,EAClC,UAAU,EAAE,IAAI,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,EACF,KAAC,IAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,qBAAqB,EACjC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,IACS,IACR,EACP,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,0BAE5C,IACd,CACJ,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 { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n >\n <Menu.Group>\n <Menu.CategoryItem>Category 1</Menu.CategoryItem>\n <Menu.Item title=\"Action 1\" onClick={() => alert('Action1')} />\n <Menu.Item title=\"Action 2\" onClick={() => alert('Action2')} />\n </Menu.Group>\n <Menu.Divider />\n <Menu.Group>\n <Menu.Item\n title=\"Action 3\"\n description=\"Action 3 is disabled\"\n isDisabled={true}\n onClick={() => alert('Action3')}\n />\n <Menu.Item\n title=\"Action 4\"\n description=\"Action 4 is awesome\"\n onClick={() => alert('Action4')}\n />\n </Menu.Group>\n </Menu>\n <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"menu-with-category.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-category.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,EACD,cAAc,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE,aAEvC,MAAC,IAAI,CAAC,KAAK,eACT,KAAC,IAAI,CAAC,YAAY,6BAA+B,EACjD,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAI,EAC/D,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAI,IACpD,EACb,KAAC,IAAI,CAAC,OAAO,KAAG,EAChB,MAAC,IAAI,CAAC,KAAK,eACT,KAAC,IAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,sBAAsB,EAClC,UAAU,EAAE,IAAI,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,EACF,KAAC,IAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,qBAAqB,EACjC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,IACS,IACR,EACP,KAAC,YAAY,IACX,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,GAAG,EAAE,QAAQ,mBACC,MAAM,mBACL,MAAM,0BAGR,IACd,CACJ,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 { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n htmlAttributes={{ id: 'category-menu' }}\n >\n <Menu.Group>\n <Menu.CategoryItem>Category 1</Menu.CategoryItem>\n <Menu.Item title=\"Action 1\" onClick={() => alert('Action1')} />\n <Menu.Item title=\"Action 2\" onClick={() => alert('Action2')} />\n </Menu.Group>\n <Menu.Divider />\n <Menu.Group>\n <Menu.Item\n title=\"Action 3\"\n description=\"Action 3 is disabled\"\n isDisabled={true}\n onClick={() => alert('Action3')}\n />\n <Menu.Item\n title=\"Action 4\"\n description=\"Action 4 is awesome\"\n onClick={() => alert('Action4')}\n />\n </Menu.Group>\n </Menu>\n <FilledButton\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n aria-haspopup=\"menu\"\n aria-expanded={isOpen}\n >\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
@@ -27,7 +27,7 @@ const Component = () => {
27
27
  const [isOpen, setIsOpen] = useState(false);
28
28
  return (_jsxs(_Fragment, { children: [_jsxs(Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
29
29
  setIsOpen(false);
30
- }, children: [_jsx(Menu.Item, { title: "Action 1", description: "Action 1 is disabled", isDisabled: true }), _jsx(Menu.Item, { title: "Action 2", onClick: () => alert('Action2') })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
30
+ }, htmlAttributes: { id: 'disabled-item-menu' }, children: [_jsx(Menu.Item, { title: "Action 1", description: "Action 1 is disabled", isDisabled: true }), _jsx(Menu.Item, { title: "Action 2", onClick: () => alert('Action2') })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
31
31
  };
32
32
  export default Component;
33
33
  //# sourceMappingURL=menu-with-disabled-item.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-with-disabled-item.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-disabled-item.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,aAED,KAAC,IAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,sBAAsB,EAClC,UAAU,EAAE,IAAI,GAChB,EACF,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAI,IAC1D,EACP,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,0BAE5C,IACd,CACJ,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 { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n >\n <Menu.Item\n title=\"Action 1\"\n description=\"Action 1 is disabled\"\n isDisabled={true}\n />\n <Menu.Item title=\"Action 2\" onClick={() => alert('Action2')} />\n </Menu>\n <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"menu-with-disabled-item.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-disabled-item.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,EACD,cAAc,EAAE,EAAE,EAAE,EAAE,oBAAoB,EAAE,aAE5C,KAAC,IAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,sBAAsB,EAClC,UAAU,EAAE,IAAI,GAChB,EACF,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAI,IAC1D,EACP,KAAC,YAAY,IACX,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,GAAG,EAAE,QAAQ,mBACC,MAAM,mBACL,MAAM,0BAGR,IACd,CACJ,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 { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n htmlAttributes={{ id: 'disabled-item-menu' }}\n >\n <Menu.Item\n title=\"Action 1\"\n description=\"Action 1 is disabled\"\n isDisabled={true}\n />\n <Menu.Item title=\"Action 2\" onClick={() => alert('Action2')} />\n </Menu>\n <FilledButton\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n aria-haspopup=\"menu\"\n aria-expanded={isOpen}\n >\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
@@ -27,7 +27,7 @@ const Component = () => {
27
27
  const [isOpen, setIsOpen] = useState(false);
28
28
  return (_jsxs(_Fragment, { children: [_jsxs(Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
29
29
  setIsOpen(false);
30
- }, children: [_jsx(Menu.Item, { title: "Action 1" }), _jsx(Menu.Divider, {}), _jsx(Menu.Item, { title: "Action 2" }), _jsx(Menu.Divider, {}), _jsx(Menu.Item, { title: "Action 3" }), _jsx(Menu.Divider, {}), _jsx(Menu.Item, { title: "Action 4" })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
30
+ }, htmlAttributes: { id: 'divider-menu' }, children: [_jsx(Menu.Item, { title: "Action 1" }), _jsx(Menu.Divider, {}), _jsx(Menu.Item, { title: "Action 2" }), _jsx(Menu.Divider, {}), _jsx(Menu.Item, { title: "Action 3" }), _jsx(Menu.Divider, {}), _jsx(Menu.Item, { title: "Action 4" })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
31
31
  };
32
32
  export default Component;
33
33
  //# sourceMappingURL=menu-with-divider.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-with-divider.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-divider.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,aAED,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,GAAG,EAC9B,KAAC,IAAI,CAAC,OAAO,KAAG,EAChB,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,GAAG,EAC9B,KAAC,IAAI,CAAC,OAAO,KAAG,EAChB,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,GAAG,EAC9B,KAAC,IAAI,CAAC,OAAO,KAAG,EAChB,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,GAAG,IACzB,EACP,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,0BAE5C,IACd,CACJ,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 { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n >\n <Menu.Item title=\"Action 1\" />\n <Menu.Divider />\n <Menu.Item title=\"Action 2\" />\n <Menu.Divider />\n <Menu.Item title=\"Action 3\" />\n <Menu.Divider />\n <Menu.Item title=\"Action 4\" />\n </Menu>\n <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"menu-with-divider.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-divider.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,EACD,cAAc,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,aAEtC,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,GAAG,EAC9B,KAAC,IAAI,CAAC,OAAO,KAAG,EAChB,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,GAAG,EAC9B,KAAC,IAAI,CAAC,OAAO,KAAG,EAChB,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,GAAG,EAC9B,KAAC,IAAI,CAAC,OAAO,KAAG,EAChB,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,GAAG,IACzB,EACP,KAAC,YAAY,IACX,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,GAAG,EAAE,QAAQ,mBACC,MAAM,mBACL,MAAM,0BAGR,IACd,CACJ,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 { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n htmlAttributes={{ id: 'divider-menu' }}\n >\n <Menu.Item title=\"Action 1\" />\n <Menu.Divider />\n <Menu.Item title=\"Action 2\" />\n <Menu.Divider />\n <Menu.Item title=\"Action 3\" />\n <Menu.Divider />\n <Menu.Item title=\"Action 4\" />\n </Menu>\n <FilledButton\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n aria-haspopup=\"menu\"\n aria-expanded={isOpen}\n >\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
@@ -28,7 +28,7 @@ const Component = () => {
28
28
  const [isOpen, setIsOpen] = useState(false);
29
29
  return (_jsxs(_Fragment, { children: [_jsxs(Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
30
30
  setIsOpen(false);
31
- }, children: [_jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 1", onClick: () => alert('Action1') }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 2", onClick: () => alert('Action2') }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => alert('Action3') }), _jsxs(Menu, { title: "Action 3.1", description: "Action with sub menu", icon: _jsx(PlusIconOutline, {}), children: [_jsx(Menu.Item, { title: "Text" }), _jsx(Menu.Item, { title: "Video" }), _jsxs(Menu, { title: "Image", icon: _jsx(PhotoIconOutline, {}), children: [_jsx(Menu.Item, { title: ".png" }), _jsx(Menu.Item, { title: ".jpg" })] }), _jsx(Menu.Item, { title: "Audio" })] }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 4", description: "Action 4 is awesome", onClick: () => alert('Action4') })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
31
+ }, htmlAttributes: { id: 'icon-menu' }, children: [_jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 1", onClick: () => alert('Action1') }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 2", onClick: () => alert('Action2') }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => alert('Action3') }), _jsxs(Menu, { title: "Action 3.1", description: "Action with sub menu", icon: _jsx(PlusIconOutline, {}), children: [_jsx(Menu.Item, { title: "Text" }), _jsx(Menu.Item, { title: "Video" }), _jsxs(Menu, { title: "Image", icon: _jsx(PhotoIconOutline, {}), children: [_jsx(Menu.Item, { title: ".png" }), _jsx(Menu.Item, { title: ".jpg" })] }), _jsx(Menu.Item, { title: "Audio" })] }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 4", description: "Action 4 is awesome", onClick: () => alert('Action4') })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
32
32
  };
33
33
  export default Component;
34
34
  //# sourceMappingURL=menu-with-icon.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-with-icon.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-icon.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CA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,EAC3B,MAAC,IAAI,IAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,KAAC,gBAAgB,KAAG,aAC5C,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,IACrB,EACP,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,OAAO,GAAG,IACtB,EACP,KAAC,IAAI,CAAC,IAAI,IACR,aAAa,EAAE,KAAC,eAAe,KAAG,EAClC,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,qBAAqB,EACjC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,IACG,EACP,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,0BAE5C,IACd,CACJ,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 { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { PhotoIconOutline, PlusIconOutline } from '@neo4j-ndl/react/icons';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n >\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 1\"\n onClick={() => alert('Action1')}\n />\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 2\"\n onClick={() => alert('Action2')}\n />\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 3\"\n description=\"Action 3 is disabled\"\n isDisabled={true}\n onClick={() => alert('Action3')}\n />\n <Menu\n title=\"Action 3.1\"\n description=\"Action with sub menu\"\n icon={<PlusIconOutline />}\n >\n <Menu.Item title=\"Text\" />\n <Menu.Item title=\"Video\" />\n <Menu title=\"Image\" icon={<PhotoIconOutline />}>\n <Menu.Item title=\".png\" />\n <Menu.Item title=\".jpg\" />\n </Menu>\n <Menu.Item title=\"Audio\" />\n </Menu>\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 4\"\n description=\"Action 4 is awesome\"\n onClick={() => alert('Action4')}\n />\n </Menu>\n <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"menu-with-icon.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-icon.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,S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ACrB,EACP,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,OAAO,GAAG,IACtB,EACP,KAAC,IAAI,CAAC,IAAI,IACR,aAAa,EAAE,KAAC,eAAe,KAAG,EAClC,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,qBAAqB,EACjC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,IACG,EACP,KAAC,YAAY,IACX,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,GAAG,EAAE,QAAQ,mBACC,MAAM,mBACL,MAAM,0BAGR,IACd,CACJ,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 { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { PhotoIconOutline, PlusIconOutline } from '@neo4j-ndl/react/icons';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n htmlAttributes={{ id: 'icon-menu' }}\n >\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 1\"\n onClick={() => alert('Action1')}\n />\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 2\"\n onClick={() => alert('Action2')}\n />\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 3\"\n description=\"Action 3 is disabled\"\n isDisabled={true}\n onClick={() => alert('Action3')}\n />\n <Menu\n title=\"Action 3.1\"\n description=\"Action with sub menu\"\n icon={<PlusIconOutline />}\n >\n <Menu.Item title=\"Text\" />\n <Menu.Item title=\"Video\" />\n <Menu title=\"Image\" icon={<PhotoIconOutline />}>\n <Menu.Item title=\".png\" />\n <Menu.Item title=\".jpg\" />\n </Menu>\n <Menu.Item title=\"Audio\" />\n </Menu>\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 4\"\n description=\"Action 4 is awesome\"\n onClick={() => alert('Action4')}\n />\n </Menu>\n <FilledButton\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n aria-haspopup=\"menu\"\n aria-expanded={isOpen}\n >\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
@@ -28,7 +28,7 @@ const Component = () => {
28
28
  const [isOpen, setIsOpen] = useState(false);
29
29
  return (_jsxs(_Fragment, { children: [_jsxs(Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
30
30
  setIsOpen(false);
31
- }, children: [_jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 1", onClick: () => alert('Action1') }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), trailingContent: _jsx(Kbd, { keys: ['A', ['B']] }), title: "Action 2", description: "Action 4 has a keyboard shortcut", onClick: () => alert('Action4') })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
31
+ }, htmlAttributes: { id: 'keyboard-shortcuts-menu' }, children: [_jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 1", onClick: () => alert('Action1') }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), trailingContent: _jsx(Kbd, { keys: ['A', ['B']] }), title: "Action 2", description: "Action 4 has a keyboard shortcut", onClick: () => alert('Action4') })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
32
32
  };
33
33
  export default Component;
34
34
  //# sourceMappingURL=menu-with-keyboard-shortcuts.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-with-keyboard-shortcuts.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-keyboard-shortcuts.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,aAED,KAAC,IAAI,CAAC,IAAI,IACR,aAAa,EAAE,KAAC,eAAe,KAAG,EAClC,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,EACF,KAAC,IAAI,CAAC,IAAI,IACR,aAAa,EAAE,KAAC,eAAe,KAAG,EAClC,eAAe,EAAE,KAAC,GAAG,IAAC,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,GAAI,EAC5C,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,kCAAkC,EAC9C,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,IACG,EACP,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,0BAE5C,IACd,CACJ,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 { FilledButton, Kbd, Menu } from '@neo4j-ndl/react';\nimport { PlusIconOutline } from '@neo4j-ndl/react/icons';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n >\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 1\"\n onClick={() => alert('Action1')}\n />\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n trailingContent={<Kbd keys={['A', ['B']]} />}\n title=\"Action 2\"\n description=\"Action 4 has a keyboard shortcut\"\n onClick={() => alert('Action4')}\n />\n </Menu>\n <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"menu-with-keyboard-shortcuts.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-keyboard-shortcuts.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,EACD,cAAc,EAAE,EAAE,EAAE,EAAE,yBAAyB,EAAE,aAEjD,KAAC,IAAI,CAAC,IAAI,IACR,aAAa,EAAE,KAAC,eAAe,KAAG,EAClC,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,EACF,KAAC,IAAI,CAAC,IAAI,IACR,aAAa,EAAE,KAAC,eAAe,KAAG,EAClC,eAAe,EAAE,KAAC,GAAG,IAAC,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,GAAI,EAC5C,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,kCAAkC,EAC9C,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,IACG,EACP,KAAC,YAAY,IACX,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,GAAG,EAAE,QAAQ,mBACC,MAAM,mBACL,MAAM,0BAGR,IACd,CACJ,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 { FilledButton, Kbd, Menu } from '@neo4j-ndl/react';\nimport { PlusIconOutline } from '@neo4j-ndl/react/icons';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n htmlAttributes={{ id: 'keyboard-shortcuts-menu' }}\n >\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 1\"\n onClick={() => alert('Action1')}\n />\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n trailingContent={<Kbd keys={['A', ['B']]} />}\n title=\"Action 2\"\n description=\"Action 4 has a keyboard shortcut\"\n onClick={() => alert('Action4')}\n />\n </Menu>\n <FilledButton\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n aria-haspopup=\"menu\"\n aria-expanded={isOpen}\n >\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
@@ -32,6 +32,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
32
32
  */
33
33
  import { tokens } from '@neo4j-ndl/base';
34
34
  import classNames from 'classnames';
35
+ import { useMemo } from 'react';
35
36
  import { components, } from 'react-select';
36
37
  import { Checkbox } from '../checkbox';
37
38
  import { ChevronDownIconOutline, XMarkIconOutline } from '../icons';
@@ -201,7 +202,7 @@ export const CustomValueContainer = ({ size, }) => function Component(_a) {
201
202
  });
202
203
  return (_jsx(components.ValueContainer, Object.assign({}, restProps, { className: classes, children: children })));
203
204
  };
204
- export const CustomInput = ({ size, }) => function Component(_a) {
205
+ export const CustomInput = ({ size, errorText, errorTextId, helpText, helpTextId, }) => function Component(_a) {
205
206
  var { className } = _a, restProps = __rest(_a, ["className"]);
206
207
  const classes = classNames('ndl-select-input', className, {
207
208
  'ndl-disabled': restProps.isDisabled,
@@ -210,7 +211,21 @@ export const CustomInput = ({ size, }) => function Component(_a) {
210
211
  'ndl-medium': size === 'medium',
211
212
  'ndl-small': size === 'small',
212
213
  });
213
- return _jsx(components.Input, Object.assign({}, restProps, { className: classes }));
214
+ const defaultAriaDescribedBy = restProps['aria-describedby'];
215
+ const combinedAriaDescribedBy = useMemo(() => {
216
+ const ariaDescribedBy = [];
217
+ if (defaultAriaDescribedBy) {
218
+ ariaDescribedBy.push(defaultAriaDescribedBy);
219
+ }
220
+ if (helpText && !errorText && helpTextId) {
221
+ ariaDescribedBy.push(helpTextId);
222
+ }
223
+ else if (errorText && errorTextId) {
224
+ ariaDescribedBy.push(errorTextId);
225
+ }
226
+ return ariaDescribedBy.join(' ');
227
+ }, [defaultAriaDescribedBy]);
228
+ return (_jsx(components.Input, Object.assign({}, restProps, { className: classes, "aria-describedby": combinedAriaDescribedBy })));
214
229
  };
215
230
  export const CustomSingleValue = ({ size, }) => function Component(_a) {
216
231
  var { className } = _a, restProps = __rest(_a, ["className"]);
@@ -1 +1 @@
1
- {"version":3,"file":"Overrides.js","sourceRoot":"","sources":["../../../src/select/Overrides.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAEL,UAAU,GAYX,MAAM,cAAc,CAAC;AAMtB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C;;;GAGG;AACH,MAAM,uBAAuB,GAAG,CAC9B,UAAiD,EACjD,eAAe,GAAG,KAAK,EACe,EAAE;IACxC,MAAM,SAAS,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,EAAE,CAAC;IACnC,MAAM,oBAAoB,GAAG,CAAC,CAAuB,EAAE,EAAE,CACvD,eAAe,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IAEzC,uCACK,SAAS,KACZ,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;YACjB,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,oBAAoB,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC,EACD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;;YACf,MAAA,SAAS,CAAC,SAAS,0DAAG,CAAC,CAAC,CAAC;YACzB,MAAA,SAAS,CAAC,WAAW,0DAAG,CAAC,CAAC,CAAC;YAC3B,oBAAoB,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC,EACD,UAAU,EAAE,CAAC,CAA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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\n/**\n * React-select triggers control/indicator interactions on mouseDown which breaks WCAG 2.5.2 Pointer Cancellation.\n * This helper shifts mouseDown to mouseUp to allow users to cancel by dragging away.\n */\nconst shiftMouseDownToMouseUp = (\n innerProps?: React.HTMLAttributes<HTMLDivElement>,\n stopPropagation = false,\n): React.HTMLAttributes<HTMLDivElement> => {\n const baseProps = innerProps ?? {};\n const maybeStopPropagation = (e: React.SyntheticEvent) =>\n stopPropagation && e.stopPropagation();\n\n return {\n ...baseProps,\n onMouseDown: (e) => {\n e.preventDefault();\n maybeStopPropagation(e);\n },\n onMouseUp: (e) => {\n baseProps.onMouseUp?.(e);\n baseProps.onMouseDown?.(e);\n maybeStopPropagation(e);\n },\n onTouchEnd: (e) => {\n baseProps.onTouchEnd?.(e);\n baseProps.onMouseDown?.(e as unknown as React.MouseEvent<HTMLDivElement>);\n maybeStopPropagation(e);\n },\n onTouchStart: (e) => {\n e.preventDefault();\n maybeStopPropagation(e);\n },\n };\n};\n\n/**\n * React-select triggers option selection on click which fires on mouseDown.\n * This helper shifts the click handler to mouseUp/touchEnd to allow users to cancel by dragging away.\n */\nconst shiftOptionClickToMouseUp = (\n innerProps?: React.HTMLAttributes<HTMLDivElement>,\n): React.HTMLAttributes<HTMLDivElement> => {\n const baseProps = innerProps ?? {};\n\n return {\n ...baseProps,\n // Remove onClick to prevent double-execution (onMouseUp already calls it, and browser would fire click after mouseup)\n onClick: undefined,\n onMouseDown: (event: React.MouseEvent<HTMLDivElement>) => {\n event.preventDefault();\n },\n onMouseUp: (event: React.MouseEvent<HTMLDivElement>) => {\n baseProps.onMouseUp?.(event);\n baseProps.onClick?.(event);\n },\n onTouchEnd: (event: React.TouchEvent<HTMLDivElement>) => {\n baseProps.onTouchEnd?.(event);\n baseProps.onClick?.(event as unknown as React.MouseEvent<HTMLDivElement>);\n },\n onTouchStart: (event: React.TouchEvent<HTMLDivElement>) => {\n event.preventDefault();\n },\n };\n};\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 // stopPropagation so that we prevent the control from also toggling the menu (double-toggle)\n const indicatorInnerProps = shiftMouseDownToMouseUp(props.innerProps, true);\n\n return (\n <components.DropdownIndicator\n {...props}\n className={classes}\n innerProps={indicatorInnerProps}\n >\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 innerProps,\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\n const handleClear = () => {\n restProps.clearValue?.();\n };\n\n // Stop propagation to prevent react-select's keyboard handling.\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === '') {\n event.preventDefault();\n }\n event.stopPropagation();\n event.nativeEvent.stopImmediatePropagation?.();\n };\n\n // Prevent react-select's default clear-on-mousedown/touchend behavior.\n const preventAndStop = (e: React.SyntheticEvent) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n const safeInnerProps: typeof innerProps = {\n ...innerProps,\n 'aria-hidden': undefined, // Remove to allow focusable button inside\n onMouseDown: preventAndStop,\n onMouseUp: preventAndStop,\n onTouchEnd: preventAndStop,\n };\n\n return (\n <components.ClearIndicator\n className={classes}\n innerProps={safeInnerProps}\n {...restProps}\n >\n <button\n type=\"button\"\n className=\"ndl-select-clear-button\"\n onClick={handleClear}\n onKeyDown={handleKeyDown}\n aria-label=\"Clear selection\"\n >\n <XMarkIconOutline />\n </button>\n <div className=\"ndl-select-divider\" />\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 const controlInnerProps = shiftMouseDownToMouseUp(restProps.innerProps);\n\n return (\n <components.Control\n {...restProps}\n className={classes}\n innerProps={controlInnerProps}\n >\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 const optionInnerProps = shiftOptionClickToMouseUp(restProps.innerProps);\n\n return (\n <components.Option\n {...restProps}\n className={classes}\n innerProps={optionInnerProps}\n >\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 },\n onPointerUp: (e) => {\n restProps.innerProps.onClick?.(e);\n },\n onTouchEnd: (e) => {\n restProps.innerProps.onClick?.(\n e as unknown as React.MouseEvent<HTMLDivElement, MouseEvent>,\n );\n },\n onTouchStart: (e) => {\n e.preventDefault();\n },\n role: 'presentation',\n tabIndex: -1,\n }}\n />\n )}\n {children}\n </components.Option>\n );\n };\n"]}
1
+ {"version":3,"file":"Overrides.js","sourceRoot":"","sources":["../../../src/select/Overrides.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAEL,UAAU,GAYX,MAAM,cAAc,CAAC;AAMtB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C;;;GAGG;AACH,MAAM,uBAAuB,GAAG,CAC9B,UAAiD,EACjD,eAAe,GAAG,KAAK,EACe,EAAE;IACxC,MAAM,SAAS,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,EAAE,CAAC;IACnC,MAAM,oBAAoB,GAAG,CAAC,CAAuB,EAAE,EAAE,CACvD,eAAe,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IAEzC,uCACK,SAAS,KACZ,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;YACjB,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,oBAAoB,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC,EACD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;;YACf,MAAA,SAAS,CAAC,SAAS,0DAAG,CAAC,CAAC,CAAC;YACzB,MAAA,SAAS,CAAC,WAAW,0DAAG,CAAC,CAAC,CAAC;YAC3B,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,KAAK,IAAI,IAAI,CAC7B,KAAC,QAAQ,IACP,SAAS,EAAE,SAAS,CAAC,UAAU,EAC/B,SAAS,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;oBACrB,CAAC;oBACD,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;;wBACjB,MAAA,MAAA,SAAS,CAAC,UAAU,EAAC,OAAO,mDAAG,CAAC,CAAC,CAAC;oBACpC,CAAC;oBACD,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE;;wBAChB,MAAA,MAAA,SAAS,CAAC,UAAU,EAAC,OAAO,mDAC1B,CAA4D,CAC7D,CAAC;oBACJ,CAAC;oBACD,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE;wBAClB,CAAC,CAAC,cAAc,EAAE,CAAC;oBACrB,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 { useMemo } from 'react';\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\n/**\n * React-select triggers control/indicator interactions on mouseDown which breaks WCAG 2.5.2 Pointer Cancellation.\n * This helper shifts mouseDown to mouseUp to allow users to cancel by dragging away.\n */\nconst shiftMouseDownToMouseUp = (\n innerProps?: React.HTMLAttributes<HTMLDivElement>,\n stopPropagation = false,\n): React.HTMLAttributes<HTMLDivElement> => {\n const baseProps = innerProps ?? {};\n const maybeStopPropagation = (e: React.SyntheticEvent) =>\n stopPropagation && e.stopPropagation();\n\n return {\n ...baseProps,\n onMouseDown: (e) => {\n e.preventDefault();\n maybeStopPropagation(e);\n },\n onMouseUp: (e) => {\n baseProps.onMouseUp?.(e);\n baseProps.onMouseDown?.(e);\n maybeStopPropagation(e);\n },\n onTouchEnd: (e) => {\n baseProps.onTouchEnd?.(e);\n baseProps.onMouseDown?.(e as unknown as React.MouseEvent<HTMLDivElement>);\n maybeStopPropagation(e);\n },\n onTouchStart: (e) => {\n e.preventDefault();\n maybeStopPropagation(e);\n },\n };\n};\n\n/**\n * React-select triggers option selection on click which fires on mouseDown.\n * This helper shifts the click handler to mouseUp/touchEnd to allow users to cancel by dragging away.\n */\nconst shiftOptionClickToMouseUp = (\n innerProps?: React.HTMLAttributes<HTMLDivElement>,\n): React.HTMLAttributes<HTMLDivElement> => {\n const baseProps = innerProps ?? {};\n\n return {\n ...baseProps,\n // Remove onClick to prevent double-execution (onMouseUp already calls it, and browser would fire click after mouseup)\n onClick: undefined,\n onMouseDown: (event: React.MouseEvent<HTMLDivElement>) => {\n event.preventDefault();\n },\n onMouseUp: (event: React.MouseEvent<HTMLDivElement>) => {\n baseProps.onMouseUp?.(event);\n baseProps.onClick?.(event);\n },\n onTouchEnd: (event: React.TouchEvent<HTMLDivElement>) => {\n baseProps.onTouchEnd?.(event);\n baseProps.onClick?.(event as unknown as React.MouseEvent<HTMLDivElement>);\n },\n onTouchStart: (event: React.TouchEvent<HTMLDivElement>) => {\n event.preventDefault();\n },\n };\n};\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 // stopPropagation so that we prevent the control from also toggling the menu (double-toggle)\n const indicatorInnerProps = shiftMouseDownToMouseUp(props.innerProps, true);\n\n return (\n <components.DropdownIndicator\n {...props}\n className={classes}\n innerProps={indicatorInnerProps}\n >\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 innerProps,\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\n const handleClear = () => {\n restProps.clearValue?.();\n };\n\n // Stop propagation to prevent react-select's keyboard handling.\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === '') {\n event.preventDefault();\n }\n event.stopPropagation();\n event.nativeEvent.stopImmediatePropagation?.();\n };\n\n // Prevent react-select's default clear-on-mousedown/touchend behavior.\n const preventAndStop = (e: React.SyntheticEvent) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n const safeInnerProps: typeof innerProps = {\n ...innerProps,\n 'aria-hidden': undefined, // Remove to allow focusable button inside\n onMouseDown: preventAndStop,\n onMouseUp: preventAndStop,\n onTouchEnd: preventAndStop,\n };\n\n return (\n <components.ClearIndicator\n className={classes}\n innerProps={safeInnerProps}\n {...restProps}\n >\n <button\n type=\"button\"\n className=\"ndl-select-clear-button\"\n onClick={handleClear}\n onKeyDown={handleKeyDown}\n aria-label=\"Clear selection\"\n >\n <XMarkIconOutline />\n </button>\n <div className=\"ndl-select-divider\" />\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 const controlInnerProps = shiftMouseDownToMouseUp(restProps.innerProps);\n\n return (\n <components.Control\n {...restProps}\n className={classes}\n innerProps={controlInnerProps}\n >\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 errorText,\n errorTextId,\n helpText,\n helpTextId,\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\n const defaultAriaDescribedBy = restProps['aria-describedby'];\n\n const combinedAriaDescribedBy = useMemo(() => {\n const ariaDescribedBy: string[] = [];\n\n if (defaultAriaDescribedBy) {\n ariaDescribedBy.push(defaultAriaDescribedBy);\n }\n\n if (helpText && !errorText && helpTextId) {\n ariaDescribedBy.push(helpTextId);\n } else if (errorText && errorTextId) {\n ariaDescribedBy.push(errorTextId);\n }\n\n return ariaDescribedBy.join(' ');\n }, [defaultAriaDescribedBy]);\n\n return (\n <components.Input\n {...restProps}\n className={classes}\n aria-describedby={combinedAriaDescribedBy}\n />\n );\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 const optionInnerProps = shiftOptionClickToMouseUp(restProps.innerProps);\n\n return (\n <components.Option\n {...restProps}\n className={classes}\n innerProps={optionInnerProps}\n >\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 },\n onPointerUp: (e) => {\n restProps.innerProps.onClick?.(e);\n },\n onTouchEnd: (e) => {\n restProps.innerProps.onClick?.(\n e as unknown as React.MouseEvent<HTMLDivElement, MouseEvent>,\n );\n },\n onTouchStart: (e) => {\n e.preventDefault();\n },\n role: 'presentation',\n tabIndex: -1,\n }}\n />\n )}\n {children}\n </components.Option>\n );\n };\n"]}
@@ -91,6 +91,8 @@ export const Select = (_a) => {
91
91
  const isInsideDialog = useIsInsideDialog();
92
92
  const menuPosition = isInsideDialog ? 'fixed' : 'absolute';
93
93
  const identifier = useId();
94
+ const helpTextId = useId();
95
+ const errorTextId = useId();
94
96
  const [isMenuOpen, setIsMenuOpen] = useState(false);
95
97
  const handleMenuOpen = () => {
96
98
  setIsMenuOpen(true);
@@ -116,9 +118,12 @@ export const Select = (_a) => {
116
118
  const Component = as !== null && as !== void 0 ? as : 'div';
117
119
  const ComponentOverrides = useMemo(() => overrideComponents({
118
120
  errorText,
121
+ errorTextId,
122
+ helpText,
123
+ helpTextId,
119
124
  isClean,
120
125
  size,
121
- }), [errorText, size, isClean]);
126
+ }), [errorText, errorTextId, helpText, helpTextId, size, isClean]);
122
127
  const StyleOverrides = useMemo(() => customStyles(), []);
123
128
  useEffect(() => {
124
129
  if (label === undefined && ariaLabel === undefined) {
@@ -128,14 +133,14 @@ export const Select = (_a) => {
128
133
  let SelectElement;
129
134
  switch (type) {
130
135
  case 'async': {
131
- 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) })));
136
+ SelectElement = (_jsx(AsyncSelect, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto", "aria-label": ariaLabel, "aria-invalid": Boolean(errorText) }, 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) })));
132
137
  break;
133
138
  }
134
139
  case 'creatable':
135
- 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) })));
140
+ SelectElement = (_jsx(Creatable, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto" }, selectProps, { "aria-label": ariaLabel, "aria-invalid": Boolean(errorText), 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) })));
136
141
  break;
137
142
  default:
138
- 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) })));
143
+ SelectElement = (_jsx(ReactSelect, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto" }, selectProps, { "aria-label": ariaLabel, "aria-invalid": Boolean(errorText), 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) })));
139
144
  }
140
145
  const classes = classNames('ndl-select', className, {
141
146
  'ndl-creatable': type === 'creatable',
@@ -147,6 +152,6 @@ export const Select = (_a) => {
147
152
  'ndl-multi': selectProps.isMulti,
148
153
  'ndl-small': size === 'small',
149
154
  });
150
- return (_jsxs(Component, Object.assign({ ref: ref, className: classes, style: style }, restProps, htmlAttributes, { children: [Boolean(label) && _jsx("label", { htmlFor: identifier, children: label }), SelectElement, Boolean(helpText) && Boolean(errorText) === false && (_jsx(Typography, { variant: size === 'large' ? 'body-medium' : 'body-small', className: "ndl-sub-text", children: helpText })), Boolean(errorText) && (_jsxs("div", { className: "n-flex n-flex-row n-gap-token-4 n-items-center", children: [_jsx(ExclamationCircleIconSolid, { className: classNames('ndl-error-icon', classes), htmlAttributes: { role: 'img', type: 'solid' } }), _jsx("span", { className: "ndl-sub-text ndl-error-text", children: errorText })] }))] })));
155
+ return (_jsxs(Component, Object.assign({ ref: ref, className: classes, style: style }, restProps, htmlAttributes, { children: [Boolean(label) && _jsx("label", { htmlFor: identifier, children: label }), SelectElement, Boolean(helpText) && Boolean(errorText) === false && (_jsx(Typography, { variant: size === 'large' ? 'body-medium' : 'body-small', className: "ndl-sub-text", htmlAttributes: { id: helpTextId }, children: helpText })), Boolean(errorText) && (_jsxs("div", { className: "n-flex n-flex-row n-gap-token-4 n-items-center", children: [_jsx(ExclamationCircleIconSolid, { className: classNames('ndl-error-icon', classes), htmlAttributes: { role: 'img', type: 'solid' } }), _jsx("span", { id: errorTextId, className: "ndl-sub-text ndl-error-text", children: errorText })] }))] })));
151
156
  };
152
157
  //# sourceMappingURL=Select.js.map
@@ -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,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,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,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,MAAM,aAAa,CAAC;AAGrB;;;;;;GAMG;AAEH,MAAM,kBAAkB,GAAG,CAKzB,KAAgE,EAChE,EAAE,CACF,CAAC;IACC,cAAc,EAAE,qBAAqB,CAAC,KAAK,CAAC;IAC5C,OAAO,EAAE,aAAa,CAAC,KAA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AAC,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 { Typography } from '../typography';\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 <Typography\n variant={size === 'large' ? 'body-medium' : 'body-small'}\n className=\"ndl-sub-text\"\n >\n {helpText}\n </Typography>\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,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C,WAAW,EAAE,OAAO;QACpB,eAAe,EAAE,OAAO,CAAC,SAAS,CAAC;QACnC,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,WAAW,CAAC,OAAO;QAChC,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,OAAO,CACL,MAAC,SAAS,kBACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,eAEjB,OAAO,CAAC,KAAK,CAAC,IAAI,gBAAO,OAAO,EAAE,UAAU,YAAG,KAAK,GAAS,EAC7D,aAAa,EACb,OAAO,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,SAAS,CAAC,KAAK,KAAK,IAAI,CACpD,KAAC,UAAU,IACT,OAAO,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,EACxD,SAAS,EAAC,cAAc,EACxB,cAAc,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,YAEjC,QAAQ,GACE,CACd,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,EAAE,EAAE,WAAW,EAAE,SAAS,EAAC,6BAA6B,YAC3D,SAAS,GACL,IACH,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 { Typography } from '../typography';\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 helpTextId = useId();\n const errorTextId = 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 errorTextId,\n helpText,\n helpTextId,\n isClean,\n size,\n }),\n [errorText, errorTextId, helpText, helpTextId, 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 aria-invalid={Boolean(errorText)}\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 aria-invalid={Boolean(errorText)}\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 aria-invalid={Boolean(errorText)}\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 <Typography\n variant={size === 'large' ? 'body-medium' : 'body-small'}\n className=\"ndl-sub-text\"\n htmlAttributes={{ id: helpTextId }}\n >\n {helpText}\n </Typography>\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 id={errorTextId} className=\"ndl-sub-text ndl-error-text\">\n {errorText}\n </span>\n </div>\n )}\n </Component>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/select/types.tsx"],"names":[],"mappings":"","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type ReactNode } from 'react';\nimport { type GroupBase, type Props } from 'react-select';\nimport { type AsyncProps } from 'react-select/async';\nimport { type CreatableProps } from 'react-select/creatable';\n\nexport type SelectCommonProps = {\n /** Error message, if it exists the select will be in error state */\n errorText?: string | ReactNode;\n /** Help text of the select component */\n helpText?: string | ReactNode;\n /** Size of the component */\n size?: 'small' | 'medium' | 'large';\n /** Whether the select component is fluid */\n isFluid?: boolean;\n /** Whether the select component is clean. If true, the select component will have a transparent background, no border and be hug the width of the content. */\n isClean?: boolean;\n /** Whether the select component is disabled */\n isDisabled?: boolean;\n /** Additional class name */\n className?: string;\n /** Additional style */\n style?: React.CSSProperties;\n} & (\n | {\n /** Label of the select component. If not provided, please provide an ariaLabel. */\n label?: undefined;\n /** Aria label of the select component */\n ariaLabel: string;\n }\n | {\n label: React.ReactNode;\n ariaLabel?: string;\n }\n);\n\ntype ReactSelectProps<\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n> = {\n /** Type of the select component */\n type: 'select';\n /** Props of the select component, based of React Select props */\n selectProps: Props<OptionType, IsMulti, GroupType>;\n} & SelectCommonProps;\n\ntype ReactSelectAsyncProps<\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n> = {\n /** Type of the select component */\n type: 'async';\n /** Props of the select component, based of React Select props */\n selectProps: AsyncProps<OptionType, IsMulti, GroupType>;\n} & SelectCommonProps;\n\ntype ReactSelectCreatableProps<\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n> = {\n /** Type of the select component */\n type: 'creatable';\n /** Props of the select component, based of React Select props */\n selectProps: CreatableProps<OptionType, IsMulti, GroupType>;\n} & SelectCommonProps;\n\n/**\n * We will provide a wrapper to the three distinct select components\n * the library provides:\n * 1. Select (the most simple component)\n * 2. Creatable (for creating new values in our options)\n * 3. Async for fetching while typing, useful for cases that we avoid storing things\n * in browser\n */\nexport type SelectProps<\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n> =\n | ReactSelectProps<OptionType, IsMulti, GroupType>\n | ReactSelectCreatableProps<OptionType, IsMulti, GroupType>\n | ReactSelectAsyncProps<OptionType, IsMulti, GroupType>;\n\nexport type SelectOverrideCustomProps<\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n> = Pick<\n SelectProps<OptionType, IsMulti, GroupType>,\n 'size' | 'errorText' | 'isClean'\n>;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/select/types.tsx"],"names":[],"mappings":"","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type ReactNode } from 'react';\nimport { type GroupBase, type Props } from 'react-select';\nimport { type AsyncProps } from 'react-select/async';\nimport { type CreatableProps } from 'react-select/creatable';\n\nexport type SelectCommonProps = {\n /** Error message, if it exists the select will be in error state */\n errorText?: string | ReactNode;\n /** Help text of the select component */\n helpText?: string | ReactNode;\n /** Size of the component */\n size?: 'small' | 'medium' | 'large';\n /** Whether the select component is fluid */\n isFluid?: boolean;\n /** Whether the select component is clean. If true, the select component will have a transparent background, no border and be hug the width of the content. */\n isClean?: boolean;\n /** Whether the select component is disabled */\n isDisabled?: boolean;\n /** Additional class name */\n className?: string;\n /** Additional style */\n style?: React.CSSProperties;\n} & (\n | {\n /** Label of the select component. If not provided, please provide an ariaLabel. */\n label?: undefined;\n /** Aria label of the select component */\n ariaLabel: string;\n }\n | {\n label: React.ReactNode;\n ariaLabel?: string;\n }\n);\n\ntype ReactSelectProps<\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n> = {\n /** Type of the select component */\n type: 'select';\n /** Props of the select component, based of React Select props */\n selectProps: Props<OptionType, IsMulti, GroupType>;\n} & SelectCommonProps;\n\ntype ReactSelectAsyncProps<\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n> = {\n /** Type of the select component */\n type: 'async';\n /** Props of the select component, based of React Select props */\n selectProps: AsyncProps<OptionType, IsMulti, GroupType>;\n} & SelectCommonProps;\n\ntype ReactSelectCreatableProps<\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n> = {\n /** Type of the select component */\n type: 'creatable';\n /** Props of the select component, based of React Select props */\n selectProps: CreatableProps<OptionType, IsMulti, GroupType>;\n} & SelectCommonProps;\n\n/**\n * We will provide a wrapper to the three distinct select components\n * the library provides:\n * 1. Select (the most simple component)\n * 2. Creatable (for creating new values in our options)\n * 3. Async for fetching while typing, useful for cases that we avoid storing things\n * in browser\n */\nexport type SelectProps<\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n> =\n | ReactSelectProps<OptionType, IsMulti, GroupType>\n | ReactSelectCreatableProps<OptionType, IsMulti, GroupType>\n | ReactSelectAsyncProps<OptionType, IsMulti, GroupType>;\n\nexport type SelectOverrideCustomProps<\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n> = Pick<\n SelectProps<OptionType, IsMulti, GroupType>,\n 'size' | 'errorText' | 'helpText' | 'isClean'\n> & {\n errorTextId?: string;\n helpTextId?: string;\n};\n"]}
@@ -31,11 +31,11 @@ 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 { ButtonSpinner } from '../_common/ButtonSpinner';
34
35
  import { ChevronDownIconOutline } from '../icons';
35
- import { LoadingSpinner } from '../loading-spinner';
36
36
  import { Tooltip } from '../tooltip';
37
37
  export const SelectIconButton = (_a) => {
38
- var { children, size = 'medium', isDisabled = false, isLoading = false, isOpen = false, className, description, tooltipProps, onClick, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["children", "size", "isDisabled", "isLoading", "isOpen", "className", "description", "tooltipProps", "onClick", "style", "htmlAttributes", "ref"]);
38
+ var { children, size = 'medium', isDisabled = false, isLoading = false, isOpen = false, className, description, tooltipProps, onClick, style, htmlAttributes, ref, loadingMessage = 'Loading' } = _a, restProps = __rest(_a, ["children", "size", "isDisabled", "isLoading", "isOpen", "className", "description", "tooltipProps", "onClick", "style", "htmlAttributes", "ref", "loadingMessage"]);
39
39
  const classes = classNames('ndl-select-icon-btn', className, {
40
40
  'ndl-active': isOpen,
41
41
  'ndl-disabled': isDisabled,
@@ -45,13 +45,24 @@ export const SelectIconButton = (_a) => {
45
45
  'ndl-small': size === 'small',
46
46
  });
47
47
  const isInteractable = !isDisabled && !isLoading;
48
+ const handleClick = (e) => {
49
+ // If the button is disabled or loading, we don't want to call the onClick handler. The loading is only aria-disabled, so we need this.
50
+ if (!isInteractable) {
51
+ e.preventDefault();
52
+ e.stopPropagation();
53
+ return;
54
+ }
55
+ if (onClick) {
56
+ onClick(e);
57
+ }
58
+ };
48
59
  return (_jsxs(Tooltip, Object.assign({ hoverDelay: {
49
60
  close: 0,
50
61
  open: 500,
51
- } }, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.root, { type: "simple",
62
+ }, type: "simple",
52
63
  // We disable the tooltip if the button is disabled or open, so it doesn't interfere with a menu open
53
- isDisabled: description === null || isDisabled || isOpen === true, children: [_jsx(Tooltip.Trigger, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.trigger, { hasButtonWrapper: true, children: _jsxs("button", Object.assign({ type: "button", ref: ref, className: classes, style: style, disabled: !isInteractable, "aria-disabled": !isInteractable, "aria-label": description !== null && description !== void 0 ? description : undefined, "aria-expanded": isOpen, onClick: onClick }, restProps, htmlAttributes, { children: [_jsx("div", { className: "ndl-select-icon-btn-inner", children: isLoading ? (_jsx(LoadingSpinner, { size: "small" })) : (_jsx("div", { className: "ndl-icon", children: children })) }), _jsx(ChevronDownIconOutline, { className: classNames('ndl-select-icon-btn-icon', {
64
+ isDisabled: description === null || isDisabled || isOpen === true, shouldCloseOnReferenceClick: true }, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.root, { children: [_jsx(Tooltip.Trigger, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.trigger, { hasButtonWrapper: true, children: _jsxs("button", Object.assign({ type: "button", ref: ref, className: classes, style: style, disabled: isDisabled, "aria-disabled": !isInteractable, "aria-label": description !== null && description !== void 0 ? description : undefined, "aria-expanded": isOpen, onClick: handleClick }, restProps, htmlAttributes, { children: [_jsx("div", { className: "ndl-select-icon-btn-inner", children: _jsx("div", { className: "ndl-icon", children: children }) }), _jsx(ChevronDownIconOutline, { className: classNames('ndl-select-icon-btn-icon', {
54
65
  'ndl-select-icon-btn-icon-open': isOpen === true,
55
- }) })] })) })), _jsx(Tooltip.Content, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.content, { children: description }))] })));
66
+ }) }), isLoading && (_jsx(ButtonSpinner, { loadingMessage: loadingMessage, size: size }))] })) })), _jsx(Tooltip.Content, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.content, { children: description }))] })));
56
67
  };
57
68
  //# sourceMappingURL=SelectIconButton.js.map