@neo4j-ndl/react 4.20.1 → 4.21.1-alpha.b78fc61

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 (494) hide show
  1. package/lib/cjs/_common/export-stories-utils.js +1 -1
  2. package/lib/cjs/_common/export-stories-utils.js.map +1 -1
  3. package/lib/cjs/_common/utils.js +3 -3
  4. package/lib/cjs/_common/utils.js.map +1 -1
  5. package/lib/cjs/_generated/style-rules/color-utils.js +3 -0
  6. package/lib/cjs/_generated/style-rules/color-utils.js.map +1 -1
  7. package/lib/cjs/_generated/style-rules/date-utils.js +14 -13
  8. package/lib/cjs/_generated/style-rules/date-utils.js.map +1 -1
  9. package/lib/cjs/_generated/style-rules/literal-schemas.js +5 -3
  10. package/lib/cjs/_generated/style-rules/literal-schemas.js.map +1 -1
  11. package/lib/cjs/ai/code-preview/CodePreview.js +1 -1
  12. package/lib/cjs/ai/code-preview/CodePreview.js.map +1 -1
  13. package/lib/cjs/ai/file-tag/FileTag.js.map +1 -1
  14. package/lib/cjs/ai/image-tag/ImageTag.js.map +1 -1
  15. package/lib/cjs/ai/prompt/Prompt.js +10 -10
  16. package/lib/cjs/ai/prompt/Prompt.js.map +1 -1
  17. package/lib/cjs/ai/prompt/stories/prompt-advanced.story.js +1 -1
  18. package/lib/cjs/ai/prompt/stories/prompt-advanced.story.js.map +1 -1
  19. package/lib/cjs/ai/prompt/stories/prompt-context.story.js +1 -1
  20. package/lib/cjs/ai/prompt/stories/prompt-context.story.js.map +1 -1
  21. package/lib/cjs/ai/prompt/stories/prompt-default.story.js +1 -1
  22. package/lib/cjs/ai/prompt/stories/prompt-default.story.js.map +1 -1
  23. package/lib/cjs/ai/prompt/stories/prompt-header.story.js +1 -1
  24. package/lib/cjs/ai/prompt/stories/prompt-header.story.js.map +1 -1
  25. package/lib/cjs/ai/reasoning/Reasoning.js +1 -1
  26. package/lib/cjs/ai/reasoning/Reasoning.js.map +1 -1
  27. package/lib/cjs/ai/response/Response.js +4 -4
  28. package/lib/cjs/ai/response/Response.js.map +1 -1
  29. package/lib/cjs/ai/response/stories/response-full-example.story.js +1 -1
  30. package/lib/cjs/ai/response/stories/response-full-example.story.js.map +1 -1
  31. package/lib/cjs/ai/suggestion/Suggestion.js.map +1 -1
  32. package/lib/cjs/ai/thinking/thinking-duration-formatter.js +5 -5
  33. package/lib/cjs/ai/thinking/thinking-duration-formatter.js.map +1 -1
  34. package/lib/cjs/banner/Banner.js +2 -2
  35. package/lib/cjs/banner/Banner.js.map +1 -1
  36. package/lib/cjs/button/ButtonBase.js +4 -4
  37. package/lib/cjs/button/ButtonBase.js.map +1 -1
  38. package/lib/cjs/clean-icon-button/stories/clean-icon-button-sizes.story.js +1 -1
  39. package/lib/cjs/clean-icon-button/stories/clean-icon-button-sizes.story.js.map +1 -1
  40. package/lib/cjs/clean-icon-button/stories/clean-icon-button-tone.story.js +1 -1
  41. package/lib/cjs/clean-icon-button/stories/clean-icon-button-tone.story.js.map +1 -1
  42. package/lib/cjs/code/Code.js +3 -3
  43. package/lib/cjs/code/Code.js.map +1 -1
  44. package/lib/cjs/code-block/CodeBlock.js +2 -2
  45. package/lib/cjs/code-block/CodeBlock.js.map +1 -1
  46. package/lib/cjs/color-picker/ColorPicker.js +22 -22
  47. package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
  48. package/lib/cjs/color-picker/stories/color-picker-custom-swatches.story.js +20 -20
  49. package/lib/cjs/color-picker/stories/color-picker-custom-swatches.story.js.map +1 -1
  50. package/lib/cjs/color-picker/stories/color-picker-default.story.js +4 -4
  51. package/lib/cjs/color-picker/stories/color-picker-default.story.js.map +1 -1
  52. package/lib/cjs/color-picker/stories/color-picker-dialog.story.js +4 -4
  53. package/lib/cjs/color-picker/stories/color-picker-dialog.story.js.map +1 -1
  54. package/lib/cjs/color-picker/stories/color-picker-without-eyedropper.story.js +4 -4
  55. package/lib/cjs/color-picker/stories/color-picker-without-eyedropper.story.js.map +1 -1
  56. package/lib/cjs/combobox/stories/combobox-large-data-set.story.js +1 -1
  57. package/lib/cjs/combobox/stories/combobox-large-data-set.story.js.map +1 -1
  58. package/lib/cjs/data-grid/Components.js +20 -20
  59. package/lib/cjs/data-grid/Components.js.map +1 -1
  60. package/lib/cjs/data-grid/DataGrid.js +3 -3
  61. package/lib/cjs/data-grid/DataGrid.js.map +1 -1
  62. package/lib/cjs/data-grid/data-grid-nav/data-grid-nav.js +55 -54
  63. package/lib/cjs/data-grid/data-grid-nav/data-grid-nav.js.map +1 -1
  64. package/lib/cjs/data-grid/data-grid-nav/helpers.js +1 -1
  65. package/lib/cjs/data-grid/data-grid-nav/helpers.js.map +1 -1
  66. package/lib/cjs/data-grid/data-grid-nav/index.js +2 -2
  67. package/lib/cjs/data-grid/data-grid-nav/index.js.map +1 -1
  68. package/lib/cjs/data-grid/helpers/index.js +42 -40
  69. package/lib/cjs/data-grid/helpers/index.js.map +1 -1
  70. package/lib/cjs/data-grid/stories/datagrid-in-dialog.story.js +10 -7
  71. package/lib/cjs/data-grid/stories/datagrid-in-dialog.story.js.map +1 -1
  72. package/lib/cjs/data-grid/stories/datagrid-keyboard-navigation.story.js +10 -7
  73. package/lib/cjs/data-grid/stories/datagrid-keyboard-navigation.story.js.map +1 -1
  74. package/lib/cjs/data-grid/stories/datagrid-rule-based-styling-datetime.story.js +5 -5
  75. package/lib/cjs/data-grid/stories/datagrid-rule-based-styling-datetime.story.js.map +1 -1
  76. package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js +1 -1
  77. package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
  78. package/lib/cjs/data-grid/stories/datagrid-virtualization.story.js +5 -5
  79. package/lib/cjs/data-grid/stories/datagrid-virtualization.story.js.map +1 -1
  80. package/lib/cjs/data-grid/style-rules/evaluate.js +23 -23
  81. package/lib/cjs/data-grid/style-rules/evaluate.js.map +1 -1
  82. package/lib/cjs/data-grid/style-rules/types.js +1 -1
  83. package/lib/cjs/data-grid/style-rules/types.js.map +1 -1
  84. package/lib/cjs/date-picker/stories/date-picker-with-timezone-both-mode.story.js +1 -1
  85. package/lib/cjs/date-picker/stories/date-picker-with-timezone-both-mode.story.js.map +1 -1
  86. package/lib/cjs/dialog/Dialog.js +5 -5
  87. package/lib/cjs/dialog/Dialog.js.map +1 -1
  88. package/lib/cjs/dialog/dialog-types.js.map +1 -1
  89. package/lib/cjs/drawer/Drawer.js +5 -5
  90. package/lib/cjs/drawer/Drawer.js.map +1 -1
  91. package/lib/cjs/dropdown-button/DropdownButton.js +4 -4
  92. package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
  93. package/lib/cjs/dropzone/stories/dropzone-full.story.js +7 -7
  94. package/lib/cjs/dropzone/stories/dropzone-full.story.js.map +1 -1
  95. package/lib/cjs/flex/stories/flex-default.story.js +1 -1
  96. package/lib/cjs/flex/stories/flex-default.story.js.map +1 -1
  97. package/lib/cjs/hooks/index.js +3 -3
  98. package/lib/cjs/hooks/index.js.map +1 -1
  99. package/lib/cjs/icon-button/stories/icon-button-sizes.story.js +1 -1
  100. package/lib/cjs/icon-button/stories/icon-button-sizes.story.js.map +1 -1
  101. package/lib/cjs/icon-button/stories/icon-button-tone.story.js +1 -1
  102. package/lib/cjs/icon-button/stories/icon-button-tone.story.js.map +1 -1
  103. package/lib/cjs/icon-button-base/IconButtonBase.js +4 -4
  104. package/lib/cjs/icon-button-base/IconButtonBase.js.map +1 -1
  105. package/lib/cjs/icons/generated/custom/ScatterPlot.js +30 -0
  106. package/lib/cjs/icons/generated/custom/ScatterPlot.js.map +1 -0
  107. package/lib/cjs/icons/generated/custom/index.js +4 -2
  108. package/lib/cjs/icons/generated/custom/index.js.map +1 -1
  109. package/lib/cjs/inline-edit/InlineEdit.js +8 -8
  110. package/lib/cjs/inline-edit/InlineEdit.js.map +1 -1
  111. package/lib/cjs/kbd/kbd-utils.js +2 -2
  112. package/lib/cjs/kbd/kbd-utils.js.map +1 -1
  113. package/lib/cjs/modal/Modal.js +6 -6
  114. package/lib/cjs/modal/Modal.js.map +1 -1
  115. package/lib/cjs/next/tree-view/TreeView.js +23 -23
  116. package/lib/cjs/next/tree-view/TreeView.js.map +1 -1
  117. package/lib/cjs/next/tree-view/stories/tree-view-lazy.story.js +1 -1
  118. package/lib/cjs/next/tree-view/stories/tree-view-lazy.story.js.map +1 -1
  119. package/lib/cjs/next/tree-view/stories/tree-view-multi.story.js +6 -6
  120. package/lib/cjs/next/tree-view/stories/tree-view-multi.story.js.map +1 -1
  121. package/lib/cjs/popover/Popover.js.map +1 -1
  122. package/lib/cjs/popover/stories/popover-custom-offset.story.js +3 -3
  123. package/lib/cjs/popover/stories/popover-custom-offset.story.js.map +1 -1
  124. package/lib/cjs/popover/use-popover.js +2 -0
  125. package/lib/cjs/popover/use-popover.js.map +1 -1
  126. package/lib/cjs/radio/stories/radio-custom-label.story.js +1 -1
  127. package/lib/cjs/radio/stories/radio-custom-label.story.js.map +1 -1
  128. package/lib/cjs/segmented-control/SegmentedControl.js.map +1 -1
  129. package/lib/cjs/select/Overrides.js +30 -30
  130. package/lib/cjs/select/Overrides.js.map +1 -1
  131. package/lib/cjs/select-icon-button/SelectIconButton.js +4 -4
  132. package/lib/cjs/select-icon-button/SelectIconButton.js.map +1 -1
  133. package/lib/cjs/select-icon-button/stories/select-icon-button-sizes.story.js +1 -1
  134. package/lib/cjs/select-icon-button/stories/select-icon-button-sizes.story.js.map +1 -1
  135. package/lib/cjs/select-icon-button/stories/select-icon-button-states.story.js +1 -1
  136. package/lib/cjs/select-icon-button/stories/select-icon-button-states.story.js.map +1 -1
  137. package/lib/cjs/selectable-tag/stories/selectable-tag-sizes.story.js +1 -1
  138. package/lib/cjs/selectable-tag/stories/selectable-tag-sizes.story.js.map +1 -1
  139. package/lib/cjs/side-navigation/SideNavigation.js +10 -10
  140. package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
  141. package/lib/cjs/slider/Slider.js +1 -1
  142. package/lib/cjs/slider/Slider.js.map +1 -1
  143. package/lib/cjs/slider/stories/slider-single-controlled.story.js +2 -2
  144. package/lib/cjs/slider/stories/slider-single-controlled.story.js.map +1 -1
  145. package/lib/cjs/spotlight/Spotlight.js +6 -6
  146. package/lib/cjs/spotlight/Spotlight.js.map +1 -1
  147. package/lib/cjs/spotlight/SpotlightProvider.js +6 -6
  148. package/lib/cjs/spotlight/SpotlightProvider.js.map +1 -1
  149. package/lib/cjs/spotlight/SpotlightTarget.js +18 -16
  150. package/lib/cjs/spotlight/SpotlightTarget.js.map +1 -1
  151. package/lib/cjs/status-indicator/StatusIndicator.js +4 -2
  152. package/lib/cjs/status-indicator/StatusIndicator.js.map +1 -1
  153. package/lib/cjs/status-indicator/stories/status-indicator-variants.story.js +1 -1
  154. package/lib/cjs/status-indicator/stories/status-indicator-variants.story.js.map +1 -1
  155. package/lib/cjs/tabs/Tabs.js +3 -3
  156. package/lib/cjs/tabs/Tabs.js.map +1 -1
  157. package/lib/cjs/tabs/stories/tabs-fill-variants.story.js +1 -1
  158. package/lib/cjs/tabs/stories/tabs-fill-variants.story.js.map +1 -1
  159. package/lib/cjs/tabs/stories/tabs-sizes.story.js +1 -1
  160. package/lib/cjs/tabs/stories/tabs-sizes.story.js.map +1 -1
  161. package/lib/cjs/tabs/use-tabs-scroll-overflow.js +2 -2
  162. package/lib/cjs/tabs/use-tabs-scroll-overflow.js.map +1 -1
  163. package/lib/cjs/text-input/stories/text-input-full.story.js +1 -1
  164. package/lib/cjs/text-input/stories/text-input-full.story.js.map +1 -1
  165. package/lib/cjs/text-input/stories/text-input-with-icons.story.js +1 -1
  166. package/lib/cjs/text-input/stories/text-input-with-icons.story.js.map +1 -1
  167. package/lib/cjs/theme/agnostic.js +4 -4
  168. package/lib/cjs/theme/agnostic.js.map +1 -1
  169. package/lib/cjs/time-picker/TimePicker.js +24 -24
  170. package/lib/cjs/time-picker/TimePicker.js.map +1 -1
  171. package/lib/cjs/time-picker/generate-time-options.js +3 -3
  172. package/lib/cjs/time-picker/generate-time-options.js.map +1 -1
  173. package/lib/cjs/timezone-picker/TimeZonePicker.js +44 -44
  174. package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
  175. package/lib/cjs/timezone-picker/generate-timezone-options.js +5 -5
  176. package/lib/cjs/timezone-picker/generate-timezone-options.js.map +1 -1
  177. package/lib/cjs/toast/ToastControlled.js +1 -1
  178. package/lib/cjs/toast/ToastControlled.js.map +1 -1
  179. package/lib/cjs/tooltip/use-tooltip.js +8 -1
  180. package/lib/cjs/tooltip/use-tooltip.js.map +1 -1
  181. package/lib/cjs/tree-view/TreeItemWrapper.js +8 -8
  182. package/lib/cjs/tree-view/TreeItemWrapper.js.map +1 -1
  183. package/lib/cjs/tree-view/TreeView.js +6 -2
  184. package/lib/cjs/tree-view/TreeView.js.map +1 -1
  185. package/lib/cjs/tree-view/TreeViewTextItem.js +17 -17
  186. package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
  187. package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js +2 -0
  188. package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
  189. package/lib/cjs/tree-view/tree-view-utils.js +12 -12
  190. package/lib/cjs/tree-view/tree-view-utils.js.map +1 -1
  191. package/lib/cjs/typography/Typography.js.map +1 -1
  192. package/lib/esm/_common/export-stories-utils.js +1 -1
  193. package/lib/esm/_common/export-stories-utils.js.map +1 -1
  194. package/lib/esm/_common/utils.js +3 -3
  195. package/lib/esm/_common/utils.js.map +1 -1
  196. package/lib/esm/_generated/style-rules/color-utils.js +3 -0
  197. package/lib/esm/_generated/style-rules/color-utils.js.map +1 -1
  198. package/lib/esm/_generated/style-rules/date-utils.js +14 -13
  199. package/lib/esm/_generated/style-rules/date-utils.js.map +1 -1
  200. package/lib/esm/_generated/style-rules/literal-schemas.js +5 -3
  201. package/lib/esm/_generated/style-rules/literal-schemas.js.map +1 -1
  202. package/lib/esm/ai/code-preview/CodePreview.js +1 -1
  203. package/lib/esm/ai/code-preview/CodePreview.js.map +1 -1
  204. package/lib/esm/ai/file-tag/FileTag.js.map +1 -1
  205. package/lib/esm/ai/image-tag/ImageTag.js.map +1 -1
  206. package/lib/esm/ai/prompt/Prompt.js +10 -10
  207. package/lib/esm/ai/prompt/Prompt.js.map +1 -1
  208. package/lib/esm/ai/prompt/stories/prompt-advanced.story.js +1 -1
  209. package/lib/esm/ai/prompt/stories/prompt-advanced.story.js.map +1 -1
  210. package/lib/esm/ai/prompt/stories/prompt-context.story.js +1 -1
  211. package/lib/esm/ai/prompt/stories/prompt-context.story.js.map +1 -1
  212. package/lib/esm/ai/prompt/stories/prompt-default.story.js +1 -1
  213. package/lib/esm/ai/prompt/stories/prompt-default.story.js.map +1 -1
  214. package/lib/esm/ai/prompt/stories/prompt-header.story.js +1 -1
  215. package/lib/esm/ai/prompt/stories/prompt-header.story.js.map +1 -1
  216. package/lib/esm/ai/reasoning/Reasoning.js +1 -1
  217. package/lib/esm/ai/reasoning/Reasoning.js.map +1 -1
  218. package/lib/esm/ai/response/Response.js +4 -4
  219. package/lib/esm/ai/response/Response.js.map +1 -1
  220. package/lib/esm/ai/response/stories/response-full-example.story.js +1 -1
  221. package/lib/esm/ai/response/stories/response-full-example.story.js.map +1 -1
  222. package/lib/esm/ai/suggestion/Suggestion.js.map +1 -1
  223. package/lib/esm/ai/thinking/thinking-duration-formatter.js +5 -5
  224. package/lib/esm/ai/thinking/thinking-duration-formatter.js.map +1 -1
  225. package/lib/esm/banner/Banner.js +2 -2
  226. package/lib/esm/banner/Banner.js.map +1 -1
  227. package/lib/esm/button/ButtonBase.js +4 -4
  228. package/lib/esm/button/ButtonBase.js.map +1 -1
  229. package/lib/esm/clean-icon-button/stories/clean-icon-button-sizes.story.js +1 -1
  230. package/lib/esm/clean-icon-button/stories/clean-icon-button-sizes.story.js.map +1 -1
  231. package/lib/esm/clean-icon-button/stories/clean-icon-button-tone.story.js +1 -1
  232. package/lib/esm/clean-icon-button/stories/clean-icon-button-tone.story.js.map +1 -1
  233. package/lib/esm/code/Code.js +3 -3
  234. package/lib/esm/code/Code.js.map +1 -1
  235. package/lib/esm/code-block/CodeBlock.js +2 -2
  236. package/lib/esm/code-block/CodeBlock.js.map +1 -1
  237. package/lib/esm/color-picker/ColorPicker.js +22 -22
  238. package/lib/esm/color-picker/ColorPicker.js.map +1 -1
  239. package/lib/esm/color-picker/stories/color-picker-custom-swatches.story.js +20 -20
  240. package/lib/esm/color-picker/stories/color-picker-custom-swatches.story.js.map +1 -1
  241. package/lib/esm/color-picker/stories/color-picker-default.story.js +4 -4
  242. package/lib/esm/color-picker/stories/color-picker-default.story.js.map +1 -1
  243. package/lib/esm/color-picker/stories/color-picker-dialog.story.js +4 -4
  244. package/lib/esm/color-picker/stories/color-picker-dialog.story.js.map +1 -1
  245. package/lib/esm/color-picker/stories/color-picker-without-eyedropper.story.js +4 -4
  246. package/lib/esm/color-picker/stories/color-picker-without-eyedropper.story.js.map +1 -1
  247. package/lib/esm/combobox/stories/combobox-large-data-set.story.js +1 -1
  248. package/lib/esm/combobox/stories/combobox-large-data-set.story.js.map +1 -1
  249. package/lib/esm/data-grid/Components.js +20 -20
  250. package/lib/esm/data-grid/Components.js.map +1 -1
  251. package/lib/esm/data-grid/DataGrid.js +3 -3
  252. package/lib/esm/data-grid/DataGrid.js.map +1 -1
  253. package/lib/esm/data-grid/data-grid-nav/data-grid-nav.js +55 -54
  254. package/lib/esm/data-grid/data-grid-nav/data-grid-nav.js.map +1 -1
  255. package/lib/esm/data-grid/data-grid-nav/helpers.js +1 -1
  256. package/lib/esm/data-grid/data-grid-nav/helpers.js.map +1 -1
  257. package/lib/esm/data-grid/data-grid-nav/index.js +2 -2
  258. package/lib/esm/data-grid/data-grid-nav/index.js.map +1 -1
  259. package/lib/esm/data-grid/helpers/index.js +42 -40
  260. package/lib/esm/data-grid/helpers/index.js.map +1 -1
  261. package/lib/esm/data-grid/stories/datagrid-in-dialog.story.js +10 -7
  262. package/lib/esm/data-grid/stories/datagrid-in-dialog.story.js.map +1 -1
  263. package/lib/esm/data-grid/stories/datagrid-keyboard-navigation.story.js +10 -7
  264. package/lib/esm/data-grid/stories/datagrid-keyboard-navigation.story.js.map +1 -1
  265. package/lib/esm/data-grid/stories/datagrid-rule-based-styling-datetime.story.js +5 -5
  266. package/lib/esm/data-grid/stories/datagrid-rule-based-styling-datetime.story.js.map +1 -1
  267. package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js +1 -1
  268. package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
  269. package/lib/esm/data-grid/stories/datagrid-virtualization.story.js +5 -5
  270. package/lib/esm/data-grid/stories/datagrid-virtualization.story.js.map +1 -1
  271. package/lib/esm/data-grid/style-rules/evaluate.js +23 -23
  272. package/lib/esm/data-grid/style-rules/evaluate.js.map +1 -1
  273. package/lib/esm/data-grid/style-rules/types.js +1 -1
  274. package/lib/esm/data-grid/style-rules/types.js.map +1 -1
  275. package/lib/esm/date-picker/stories/date-picker-with-timezone-both-mode.story.js +1 -1
  276. package/lib/esm/date-picker/stories/date-picker-with-timezone-both-mode.story.js.map +1 -1
  277. package/lib/esm/dialog/Dialog.js +5 -5
  278. package/lib/esm/dialog/Dialog.js.map +1 -1
  279. package/lib/esm/dialog/dialog-types.js.map +1 -1
  280. package/lib/esm/drawer/Drawer.js +5 -5
  281. package/lib/esm/drawer/Drawer.js.map +1 -1
  282. package/lib/esm/dropdown-button/DropdownButton.js +4 -4
  283. package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
  284. package/lib/esm/dropzone/stories/dropzone-full.story.js +7 -7
  285. package/lib/esm/dropzone/stories/dropzone-full.story.js.map +1 -1
  286. package/lib/esm/flex/stories/flex-default.story.js +1 -1
  287. package/lib/esm/flex/stories/flex-default.story.js.map +1 -1
  288. package/lib/esm/hooks/index.js +3 -3
  289. package/lib/esm/hooks/index.js.map +1 -1
  290. package/lib/esm/icon-button/stories/icon-button-sizes.story.js +1 -1
  291. package/lib/esm/icon-button/stories/icon-button-sizes.story.js.map +1 -1
  292. package/lib/esm/icon-button/stories/icon-button-tone.story.js +1 -1
  293. package/lib/esm/icon-button/stories/icon-button-tone.story.js.map +1 -1
  294. package/lib/esm/icon-button-base/IconButtonBase.js +4 -4
  295. package/lib/esm/icon-button-base/IconButtonBase.js.map +1 -1
  296. package/lib/esm/icons/generated/custom/ScatterPlot.js +28 -0
  297. package/lib/esm/icons/generated/custom/ScatterPlot.js.map +1 -0
  298. package/lib/esm/icons/generated/custom/index.js +1 -0
  299. package/lib/esm/icons/generated/custom/index.js.map +1 -1
  300. package/lib/esm/inline-edit/InlineEdit.js +8 -8
  301. package/lib/esm/inline-edit/InlineEdit.js.map +1 -1
  302. package/lib/esm/kbd/kbd-utils.js +2 -2
  303. package/lib/esm/kbd/kbd-utils.js.map +1 -1
  304. package/lib/esm/modal/Modal.js +6 -6
  305. package/lib/esm/modal/Modal.js.map +1 -1
  306. package/lib/esm/next/tree-view/TreeView.js +23 -23
  307. package/lib/esm/next/tree-view/TreeView.js.map +1 -1
  308. package/lib/esm/next/tree-view/stories/tree-view-lazy.story.js +1 -1
  309. package/lib/esm/next/tree-view/stories/tree-view-lazy.story.js.map +1 -1
  310. package/lib/esm/next/tree-view/stories/tree-view-multi.story.js +6 -6
  311. package/lib/esm/next/tree-view/stories/tree-view-multi.story.js.map +1 -1
  312. package/lib/esm/popover/Popover.js.map +1 -1
  313. package/lib/esm/popover/stories/popover-custom-offset.story.js +3 -3
  314. package/lib/esm/popover/stories/popover-custom-offset.story.js.map +1 -1
  315. package/lib/esm/popover/use-popover.js +2 -0
  316. package/lib/esm/popover/use-popover.js.map +1 -1
  317. package/lib/esm/radio/stories/radio-custom-label.story.js +1 -1
  318. package/lib/esm/radio/stories/radio-custom-label.story.js.map +1 -1
  319. package/lib/esm/segmented-control/SegmentedControl.js.map +1 -1
  320. package/lib/esm/select/Overrides.js +30 -30
  321. package/lib/esm/select/Overrides.js.map +1 -1
  322. package/lib/esm/select-icon-button/SelectIconButton.js +4 -4
  323. package/lib/esm/select-icon-button/SelectIconButton.js.map +1 -1
  324. package/lib/esm/select-icon-button/stories/select-icon-button-sizes.story.js +1 -1
  325. package/lib/esm/select-icon-button/stories/select-icon-button-sizes.story.js.map +1 -1
  326. package/lib/esm/select-icon-button/stories/select-icon-button-states.story.js +1 -1
  327. package/lib/esm/select-icon-button/stories/select-icon-button-states.story.js.map +1 -1
  328. package/lib/esm/selectable-tag/stories/selectable-tag-sizes.story.js +1 -1
  329. package/lib/esm/selectable-tag/stories/selectable-tag-sizes.story.js.map +1 -1
  330. package/lib/esm/side-navigation/SideNavigation.js +10 -10
  331. package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
  332. package/lib/esm/slider/Slider.js +1 -1
  333. package/lib/esm/slider/Slider.js.map +1 -1
  334. package/lib/esm/slider/stories/slider-single-controlled.story.js +2 -2
  335. package/lib/esm/slider/stories/slider-single-controlled.story.js.map +1 -1
  336. package/lib/esm/spotlight/Spotlight.js +6 -6
  337. package/lib/esm/spotlight/Spotlight.js.map +1 -1
  338. package/lib/esm/spotlight/SpotlightProvider.js +6 -6
  339. package/lib/esm/spotlight/SpotlightProvider.js.map +1 -1
  340. package/lib/esm/spotlight/SpotlightTarget.js +18 -16
  341. package/lib/esm/spotlight/SpotlightTarget.js.map +1 -1
  342. package/lib/esm/status-indicator/StatusIndicator.js +4 -2
  343. package/lib/esm/status-indicator/StatusIndicator.js.map +1 -1
  344. package/lib/esm/status-indicator/stories/status-indicator-variants.story.js +1 -1
  345. package/lib/esm/status-indicator/stories/status-indicator-variants.story.js.map +1 -1
  346. package/lib/esm/tabs/Tabs.js +3 -3
  347. package/lib/esm/tabs/Tabs.js.map +1 -1
  348. package/lib/esm/tabs/stories/tabs-fill-variants.story.js +1 -1
  349. package/lib/esm/tabs/stories/tabs-fill-variants.story.js.map +1 -1
  350. package/lib/esm/tabs/stories/tabs-sizes.story.js +1 -1
  351. package/lib/esm/tabs/stories/tabs-sizes.story.js.map +1 -1
  352. package/lib/esm/tabs/use-tabs-scroll-overflow.js +2 -2
  353. package/lib/esm/tabs/use-tabs-scroll-overflow.js.map +1 -1
  354. package/lib/esm/text-input/stories/text-input-full.story.js +1 -1
  355. package/lib/esm/text-input/stories/text-input-full.story.js.map +1 -1
  356. package/lib/esm/text-input/stories/text-input-with-icons.story.js +1 -1
  357. package/lib/esm/text-input/stories/text-input-with-icons.story.js.map +1 -1
  358. package/lib/esm/theme/agnostic.js +3 -3
  359. package/lib/esm/theme/agnostic.js.map +1 -1
  360. package/lib/esm/time-picker/TimePicker.js +24 -24
  361. package/lib/esm/time-picker/TimePicker.js.map +1 -1
  362. package/lib/esm/time-picker/generate-time-options.js +3 -3
  363. package/lib/esm/time-picker/generate-time-options.js.map +1 -1
  364. package/lib/esm/timezone-picker/TimeZonePicker.js +44 -44
  365. package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
  366. package/lib/esm/timezone-picker/generate-timezone-options.js +5 -5
  367. package/lib/esm/timezone-picker/generate-timezone-options.js.map +1 -1
  368. package/lib/esm/toast/ToastControlled.js +1 -1
  369. package/lib/esm/toast/ToastControlled.js.map +1 -1
  370. package/lib/esm/tooltip/use-tooltip.js +8 -1
  371. package/lib/esm/tooltip/use-tooltip.js.map +1 -1
  372. package/lib/esm/tree-view/TreeItemWrapper.js +8 -8
  373. package/lib/esm/tree-view/TreeItemWrapper.js.map +1 -1
  374. package/lib/esm/tree-view/TreeView.js +6 -2
  375. package/lib/esm/tree-view/TreeView.js.map +1 -1
  376. package/lib/esm/tree-view/TreeViewTextItem.js +17 -17
  377. package/lib/esm/tree-view/TreeViewTextItem.js.map +1 -1
  378. package/lib/esm/tree-view/tree-view-keyboard-coordinates.js +2 -0
  379. package/lib/esm/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
  380. package/lib/esm/tree-view/tree-view-utils.js +12 -12
  381. package/lib/esm/tree-view/tree-view-utils.js.map +1 -1
  382. package/lib/esm/typography/Typography.js.map +1 -1
  383. package/lib/types/_common/export-stories-utils.d.ts +1 -1
  384. package/lib/types/_common/utils.d.ts +3 -3
  385. package/lib/types/_generated/style-rules/color-utils.d.ts.map +1 -1
  386. package/lib/types/_generated/style-rules/date-utils.d.ts +3 -3
  387. package/lib/types/_generated/style-rules/date-utils.d.ts.map +1 -1
  388. package/lib/types/_generated/style-rules/literal-schemas.d.ts.map +1 -1
  389. package/lib/types/ai/code-preview/CodePreview.d.ts +1 -1
  390. package/lib/types/ai/file-tag/FileTag.d.ts +1 -1
  391. package/lib/types/ai/file-tag/FileTag.d.ts.map +1 -1
  392. package/lib/types/ai/image-tag/ImageTag.d.ts +1 -1
  393. package/lib/types/ai/image-tag/ImageTag.d.ts.map +1 -1
  394. package/lib/types/ai/prompt/Prompt.d.ts +3 -3
  395. package/lib/types/ai/prompt/Prompt.d.ts.map +1 -1
  396. package/lib/types/ai/suggestion/Suggestion.d.ts +1 -1
  397. package/lib/types/ai/suggestion/Suggestion.d.ts.map +1 -1
  398. package/lib/types/ai/thinking/thinking-duration-formatter.d.ts +5 -5
  399. package/lib/types/banner/Banner.d.ts +1 -1
  400. package/lib/types/banner/Banner.d.ts.map +1 -1
  401. package/lib/types/button/ButtonBase.d.ts +2 -2
  402. package/lib/types/button/ButtonBase.d.ts.map +1 -1
  403. package/lib/types/code/Code.d.ts +1 -1
  404. package/lib/types/code/Code.d.ts.map +1 -1
  405. package/lib/types/data-grid/Components.d.ts +2 -2
  406. package/lib/types/data-grid/Components.d.ts.map +1 -1
  407. package/lib/types/data-grid/DataGrid.d.ts +2 -2
  408. package/lib/types/data-grid/data-grid-nav/data-grid-nav.d.ts +4 -4
  409. package/lib/types/data-grid/data-grid-nav/data-grid-nav.d.ts.map +1 -1
  410. package/lib/types/data-grid/data-grid-nav/helpers.d.ts +1 -1
  411. package/lib/types/data-grid/data-grid-nav/index.d.ts +1 -1
  412. package/lib/types/data-grid/data-grid-nav/index.d.ts.map +1 -1
  413. package/lib/types/data-grid/helpers/index.d.ts +5 -5
  414. package/lib/types/data-grid/helpers/index.d.ts.map +1 -1
  415. package/lib/types/data-grid/stories/datagrid-in-dialog.story.d.ts.map +1 -1
  416. package/lib/types/data-grid/stories/datagrid-keyboard-navigation.story.d.ts.map +1 -1
  417. package/lib/types/data-grid/stories/datagrid-pinned-columns.stories.d.ts +2 -2
  418. package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts +2 -2
  419. package/lib/types/data-grid/stories/datagrid-virtualization.story.d.ts.map +1 -1
  420. package/lib/types/data-grid/style-rules/evaluate.d.ts +1 -1
  421. package/lib/types/dialog/Dialog.d.ts.map +1 -1
  422. package/lib/types/dialog/dialog-types.d.ts +1 -1
  423. package/lib/types/dialog/dialog-types.d.ts.map +1 -1
  424. package/lib/types/drawer/Drawer.d.ts +1 -1
  425. package/lib/types/drawer/Drawer.d.ts.map +1 -1
  426. package/lib/types/dropdown-button/DropdownButton.d.ts +1 -1
  427. package/lib/types/dropdown-button/DropdownButton.d.ts.map +1 -1
  428. package/lib/types/hooks/index.d.ts +3 -3
  429. package/lib/types/icon-button-base/IconButtonBase.d.ts +1 -1
  430. package/lib/types/icon-button-base/IconButtonBase.d.ts.map +1 -1
  431. package/lib/types/icons/generated/custom/ScatterPlot.d.ts +29 -0
  432. package/lib/types/icons/generated/custom/ScatterPlot.d.ts.map +1 -0
  433. package/lib/types/icons/generated/custom/index.d.ts +1 -0
  434. package/lib/types/icons/generated/custom/index.d.ts.map +1 -1
  435. package/lib/types/modal/Modal.d.ts +1 -1
  436. package/lib/types/modal/Modal.d.ts.map +1 -1
  437. package/lib/types/popover/Popover.d.ts.map +1 -1
  438. package/lib/types/popover/use-popover.d.ts.map +1 -1
  439. package/lib/types/segmented-control/SegmentedControl.d.ts +1 -1
  440. package/lib/types/segmented-control/SegmentedControl.d.ts.map +1 -1
  441. package/lib/types/select/Overrides.d.ts.map +1 -1
  442. package/lib/types/select-icon-button/SelectIconButton.d.ts +1 -1
  443. package/lib/types/select-icon-button/SelectIconButton.d.ts.map +1 -1
  444. package/lib/types/selectable-tag/stories/selectable-tag-sizes.story.d.ts.map +1 -1
  445. package/lib/types/spotlight/SpotlightProvider.d.ts.map +1 -1
  446. package/lib/types/spotlight/SpotlightTarget.d.ts +4 -3
  447. package/lib/types/spotlight/SpotlightTarget.d.ts.map +1 -1
  448. package/lib/types/status-indicator/StatusIndicator.d.ts.map +1 -1
  449. package/lib/types/tabs/Tabs.d.ts +1 -1
  450. package/lib/types/tabs/Tabs.d.ts.map +1 -1
  451. package/lib/types/theme/agnostic.d.ts +2 -2
  452. package/lib/types/theme/agnostic.d.ts.map +1 -1
  453. package/lib/types/tooltip/use-tooltip.d.ts.map +1 -1
  454. package/lib/types/tree-view/TreeView.d.ts.map +1 -1
  455. package/lib/types/tree-view/TreeViewTextItem.d.ts.map +1 -1
  456. package/lib/types/tree-view/tree-view-keyboard-coordinates.d.ts.map +1 -1
  457. package/lib/types/tree-view/tree-view-utils.d.ts +12 -12
  458. package/lib/types/tree-view/tree-view-utils.d.ts.map +1 -1
  459. package/lib/types/typography/Typography.d.ts +6 -1
  460. package/lib/types/typography/Typography.d.ts.map +1 -1
  461. package/package.json +7 -4
  462. package/skills/ndl-react/components/ai/file-tag.md +1 -1
  463. package/skills/ndl-react/components/ai/image-tag.md +1 -1
  464. package/skills/ndl-react/components/ai/prompt.md +10 -10
  465. package/skills/ndl-react/components/ai/response.md +1 -1
  466. package/skills/ndl-react/components/ai/suggestion.md +1 -1
  467. package/skills/ndl-react/components/banner.md +1 -1
  468. package/skills/ndl-react/components/clean-icon-button.md +6 -6
  469. package/skills/ndl-react/components/code.md +1 -1
  470. package/skills/ndl-react/components/color-picker.md +32 -32
  471. package/skills/ndl-react/components/combobox.md +1 -1
  472. package/skills/ndl-react/components/data-grid.md +35 -28
  473. package/skills/ndl-react/components/date-picker.md +1 -1
  474. package/skills/ndl-react/components/dialog.md +1 -1
  475. package/skills/ndl-react/components/drawer.md +1 -1
  476. package/skills/ndl-react/components/dropdown-button.md +1 -1
  477. package/skills/ndl-react/components/dropzone.md +7 -7
  478. package/skills/ndl-react/components/filled-button.md +2 -2
  479. package/skills/ndl-react/components/flex.md +2 -2
  480. package/skills/ndl-react/components/icon-button.md +6 -6
  481. package/skills/ndl-react/components/modal.md +1 -1
  482. package/skills/ndl-react/components/next/tree-view.md +8 -8
  483. package/skills/ndl-react/components/outlined-button.md +2 -2
  484. package/skills/ndl-react/components/popover.md +3 -3
  485. package/skills/ndl-react/components/radio.md +1 -1
  486. package/skills/ndl-react/components/segmented-control.md +1 -1
  487. package/skills/ndl-react/components/select-icon-button.md +7 -7
  488. package/skills/ndl-react/components/selectable-tag.md +10 -4
  489. package/skills/ndl-react/components/slider.md +2 -2
  490. package/skills/ndl-react/components/status-indicator.md +5 -5
  491. package/skills/ndl-react/components/tabs.md +5 -5
  492. package/skills/ndl-react/components/text-button.md +2 -2
  493. package/skills/ndl-react/components/text-input.md +2 -2
  494. package/skills/ndl-react/components/typography.md +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentedControl.js","sourceRoot":"","sources":["../../../src/segmented-control/SegmentedControl.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AA6B7C,wCAAwC;AACxC,MAAM,uBAAuB;AAC3B,8DAA8D;AAC9D,KAAK,CAAC,aAAa,CAAsC,IAAI,CAAC,CAAC;AAEjE,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,MAAM,OAAO,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC;IAEpD,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,yBAA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\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React, { useContext } from 'react';\n\nimport {\n type PolymorphicCommonProps,\n type TooltipObjectProps,\n} from '../_common/types';\nimport { Tooltip } from '../tooltip/Tooltip';\n\ntype SegmentedControlID = string | number;\n\n/**\n * @remarks\n * Where type `SegmentedControlID` is defined as: `string | number`.\n */\ntype SegmentedControlProps<T extends SegmentedControlID> = {\n /** Additional class name */\n className?: string;\n /** Size of the segmented control */\n size?: 'small' | 'medium' | 'large';\n /** If segmented control items will include only icons (makes controls rectangular) */\n hasOnlyIcons?: boolean;\n /** The callback function triggered when the segmented control value changes */\n onChange: (e: T) => void | ((e: React.SetStateAction<T>) => void);\n /** The currently selected option */\n selected: T;\n /** The children component of the segmented control */\n children: React.ReactNode;\n /** Whether the segmented control has a box shadow applied */\n isFloating?: boolean;\n};\n\ntype SegmentedControlContext<T extends SegmentedControlID> = Required<\n Pick<SegmentedControlProps<T>, 'onChange' | 'selected' | 'hasOnlyIcons'>\n>;\n\n// eslint-disable-next-line no-redeclare\nconst SegmentedControlContext =\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n React.createContext<SegmentedControlContext<any> | null>(null);\n\nconst useSelectorContext = () => {\n const context = useContext(SegmentedControlContext);\n\n if (context === null) {\n throw new Error('SegmentedControl used without context');\n }\n\n return context;\n};\n\nconst SegmentedControlComponent = <\n T extends SegmentedControlID,\n U extends React.ElementType = 'div',\n>({\n size = 'medium',\n hasOnlyIcons = false,\n children,\n selected,\n onChange,\n as,\n className,\n style,\n isFloating = false,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<U, SegmentedControlProps<T>>) => {\n const classes = classNames('ndl-segmented-control', className, {\n 'ndl-floating': isFloating,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n const Component = as ?? 'div';\n\n return (\n <Component\n className={classes}\n style={style}\n role=\"group\"\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <SegmentedControlContext.Provider\n value={{ hasOnlyIcons, onChange, selected }}\n >\n {children}\n </SegmentedControlContext.Provider>\n </Component>\n );\n};\n\nSegmentedControlComponent.displayName = 'SegmentedControl';\n\n/**\n * @remarks\n * When the `description` prop is set, hovering over the segmented control item will show a tooltip with the text provided in the `description` prop. `tooltipProps` can be used to customize the tooltip appearance. The `TooltipObjectProps` type is defined as: `{ root?: Partial<React.ComponentProps<typeof Tooltip>>; trigger?: Partial<React.ComponentProps<typeof Tooltip.Trigger>>; content?: Partial<React.ComponentProps<typeof Tooltip.Content>>; }`, see the Tooltip component for more details.\n */\ntype SegmentedControlItemProps = {\n /** Additional class name */\n className?: string;\n /** The children component of the segmented control item */\n children?: React.ReactNode;\n /** The value of the segmented control item */\n value: string;\n /** The description of the segmented control item, will be displayed in the tooltip */\n description?: string;\n /** The tooltip props that will be applied if tooltip is set */\n tooltipProps?: TooltipObjectProps;\n /** Whether the segmented control item is disabled */\n isDisabled?: boolean;\n};\n\nconst SegmentedControlItem = <T extends React.ElementType = 'button'>({\n as,\n children,\n className,\n style,\n value,\n htmlAttributes,\n description,\n tooltipProps,\n isDisabled = false,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, SegmentedControlItemProps>) => {\n const { onChange, selected, hasOnlyIcons } = useSelectorContext();\n\n const isSelected = value === selected;\n\n const baseClasses = classNames(className, {\n 'ndl-current': isSelected,\n 'ndl-segment-icon': hasOnlyIcons,\n 'ndl-segment-item': !hasOnlyIcons,\n });\n\n const Component: React.ElementType = as ?? 'button';\n\n return (\n <Tooltip\n isPortaled={false}\n isDisabled={Boolean(description) === false}\n {...tooltipProps?.root}\n type=\"simple\"\n >\n <Tooltip.Trigger {...tooltipProps?.trigger} hasButtonWrapper>\n <Component\n aria-pressed={isSelected}\n onClick={() => !isSelected && onChange(value)}\n className={baseClasses}\n style={style}\n ref={ref}\n aria-label={description}\n disabled={isDisabled}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Component>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n <Tooltip.Body>{description}</Tooltip.Body>\n </Tooltip.Content>\n </Tooltip>\n );\n};\n\nSegmentedControlItem.displayName = 'SegmentedControl.Item';\n\nconst SegmentedControl = Object.assign(SegmentedControlComponent, {\n Item: SegmentedControlItem,\n});\n\nexport { SegmentedControl };\n"]}
1
+ {"version":3,"file":"SegmentedControl.js","sourceRoot":"","sources":["../../../src/segmented-control/SegmentedControl.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AA6B7C,wCAAwC;AACxC,MAAM,uBAAuB;AAC3B,8DAA8D;AAC9D,KAAK,CAAC,aAAa,CAAsC,IAAI,CAAC,CAAC;AAEjE,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,MAAM,OAAO,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC;IAEpD,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAGhC,EAaoD,EAAE,EAAE;QAbxD,EACA,IAAI,GAAG,QAAQ,EACf,YAAY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AE,UAAU;QACzB,kBAAkB,EAAE,YAAY;QAChC,kBAAkB,EAAE,CAAC,YAAY;KAClC,CAAC,CAAC;IAEH,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,QAAQ,CAAC;IAEpD,OAAO,CACL,MAAC,OAAO,kBACN,UAAU,EAAE,KAAK,EACjB,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,KAAK,IACtC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,IACtB,IAAI,EAAC,QAAQ,aAEb,KAAC,OAAO,CAAC,OAAO,oBAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,IAAE,gBAAgB,kBAC1D,KAAC,SAAS,kCACM,UAAU,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU,IAAI,QAAQ,CAAC,KAAK,CAAC,EAC7C,SAAS,EAAE,WAAW,EACtB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,gBACI,WAAW,EACvB,QAAQ,EAAE,UAAU,IAChB,SAAS,EACT,cAAc,cAEjB,QAAQ,IACC,IACI,EAClB,KAAC,OAAO,CAAC,OAAO,oBAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,cACxC,KAAC,OAAO,CAAC,IAAI,cAAE,WAAW,GAAgB,IAC1B,KACV,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,oBAAoB,CAAC,WAAW,GAAG,uBAAuB,CAAC;AAE3D,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,yBAAyB,EAAE;IAChE,IAAI,EAAE,oBAAoB;CAC3B,CAAC,CAAC;AAEH,OAAO,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React, { useContext } from 'react';\n\nimport {\n type PolymorphicCommonProps,\n type TooltipObjectProps,\n} from '../_common/types';\nimport { Tooltip } from '../tooltip/Tooltip';\n\ntype SegmentedControlID = string | number;\n\n/**\n * @remarks\n * Where type `SegmentedControlID` is defined as: `string | number`.\n */\ntype SegmentedControlProps<T extends SegmentedControlID> = {\n /** Additional class name */\n className?: string;\n /** Size of the segmented control */\n size?: 'small' | 'medium' | 'large';\n /** If segmented control items will include only icons (makes controls rectangular) */\n hasOnlyIcons?: boolean;\n /** The callback function triggered when the segmented control value changes */\n onChange: (event: T) => void | ((event: React.SetStateAction<T>) => void);\n /** The currently selected option */\n selected: T;\n /** The children component of the segmented control */\n children: React.ReactNode;\n /** Whether the segmented control has a box shadow applied */\n isFloating?: boolean;\n};\n\ntype SegmentedControlContext<T extends SegmentedControlID> = Required<\n Pick<SegmentedControlProps<T>, 'onChange' | 'selected' | 'hasOnlyIcons'>\n>;\n\n// eslint-disable-next-line no-redeclare\nconst SegmentedControlContext =\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n React.createContext<SegmentedControlContext<any> | null>(null);\n\nconst useSelectorContext = () => {\n const context = useContext(SegmentedControlContext);\n\n if (context === null) {\n throw new Error('SegmentedControl used without context');\n }\n\n return context;\n};\n\nconst SegmentedControlComponent = <\n T extends SegmentedControlID,\n U extends React.ElementType = 'div',\n>({\n size = 'medium',\n hasOnlyIcons = false,\n children,\n selected,\n onChange,\n as,\n className,\n style,\n isFloating = false,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<U, SegmentedControlProps<T>>) => {\n const classes = classNames('ndl-segmented-control', className, {\n 'ndl-floating': isFloating,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n const Component = as ?? 'div';\n\n return (\n <Component\n className={classes}\n style={style}\n role=\"group\"\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <SegmentedControlContext.Provider\n value={{ hasOnlyIcons, onChange, selected }}\n >\n {children}\n </SegmentedControlContext.Provider>\n </Component>\n );\n};\n\nSegmentedControlComponent.displayName = 'SegmentedControl';\n\n/**\n * @remarks\n * When the `description` prop is set, hovering over the segmented control item will show a tooltip with the text provided in the `description` prop. `tooltipProps` can be used to customize the tooltip appearance. The `TooltipObjectProps` type is defined as: `{ root?: Partial<React.ComponentProps<typeof Tooltip>>; trigger?: Partial<React.ComponentProps<typeof Tooltip.Trigger>>; content?: Partial<React.ComponentProps<typeof Tooltip.Content>>; }`, see the Tooltip component for more details.\n */\ntype SegmentedControlItemProps = {\n /** Additional class name */\n className?: string;\n /** The children component of the segmented control item */\n children?: React.ReactNode;\n /** The value of the segmented control item */\n value: string;\n /** The description of the segmented control item, will be displayed in the tooltip */\n description?: string;\n /** The tooltip props that will be applied if tooltip is set */\n tooltipProps?: TooltipObjectProps;\n /** Whether the segmented control item is disabled */\n isDisabled?: boolean;\n};\n\nconst SegmentedControlItem = <T extends React.ElementType = 'button'>({\n as,\n children,\n className,\n style,\n value,\n htmlAttributes,\n description,\n tooltipProps,\n isDisabled = false,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, SegmentedControlItemProps>) => {\n const { onChange, selected, hasOnlyIcons } = useSelectorContext();\n\n const isSelected = value === selected;\n\n const baseClasses = classNames(className, {\n 'ndl-current': isSelected,\n 'ndl-segment-icon': hasOnlyIcons,\n 'ndl-segment-item': !hasOnlyIcons,\n });\n\n const Component: React.ElementType = as ?? 'button';\n\n return (\n <Tooltip\n isPortaled={false}\n isDisabled={Boolean(description) === false}\n {...tooltipProps?.root}\n type=\"simple\"\n >\n <Tooltip.Trigger {...tooltipProps?.trigger} hasButtonWrapper>\n <Component\n aria-pressed={isSelected}\n onClick={() => !isSelected && onChange(value)}\n className={baseClasses}\n style={style}\n ref={ref}\n aria-label={description}\n disabled={isDisabled}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Component>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n <Tooltip.Body>{description}</Tooltip.Body>\n </Tooltip.Content>\n </Tooltip>\n );\n};\n\nSegmentedControlItem.displayName = 'SegmentedControl.Item';\n\nconst SegmentedControl = Object.assign(SegmentedControlComponent, {\n Item: SegmentedControlItem,\n});\n\nexport { SegmentedControl };\n"]}
@@ -45,23 +45,23 @@ import { useNeedleTheme } from '../theme';
45
45
  */
46
46
  const shiftMouseDownToMouseUp = (innerProps, stopPropagation = false) => {
47
47
  const baseProps = innerProps !== null && innerProps !== void 0 ? innerProps : {};
48
- const maybeStopPropagation = (e) => stopPropagation && e.stopPropagation();
49
- return Object.assign(Object.assign({}, baseProps), { onMouseDown: (e) => {
50
- e.preventDefault();
51
- maybeStopPropagation(e);
52
- }, onMouseUp: (e) => {
48
+ const maybeStopPropagation = (event) => stopPropagation && event.stopPropagation();
49
+ return Object.assign(Object.assign({}, baseProps), { onMouseDown: (event) => {
50
+ event.preventDefault();
51
+ maybeStopPropagation(event);
52
+ }, onMouseUp: (event) => {
53
53
  var _a, _b;
54
- (_a = baseProps.onMouseUp) === null || _a === void 0 ? void 0 : _a.call(baseProps, e);
55
- (_b = baseProps.onMouseDown) === null || _b === void 0 ? void 0 : _b.call(baseProps, e);
56
- maybeStopPropagation(e);
57
- }, onTouchEnd: (e) => {
54
+ (_a = baseProps.onMouseUp) === null || _a === void 0 ? void 0 : _a.call(baseProps, event);
55
+ (_b = baseProps.onMouseDown) === null || _b === void 0 ? void 0 : _b.call(baseProps, event);
56
+ maybeStopPropagation(event);
57
+ }, onTouchEnd: (event) => {
58
58
  var _a, _b;
59
- (_a = baseProps.onTouchEnd) === null || _a === void 0 ? void 0 : _a.call(baseProps, e);
60
- (_b = baseProps.onMouseDown) === null || _b === void 0 ? void 0 : _b.call(baseProps, e);
61
- maybeStopPropagation(e);
62
- }, onTouchStart: (e) => {
63
- e.preventDefault();
64
- maybeStopPropagation(e);
59
+ (_a = baseProps.onTouchEnd) === null || _a === void 0 ? void 0 : _a.call(baseProps, event);
60
+ (_b = baseProps.onMouseDown) === null || _b === void 0 ? void 0 : _b.call(baseProps, event);
61
+ maybeStopPropagation(event);
62
+ }, onTouchStart: (event) => {
63
+ event.preventDefault();
64
+ maybeStopPropagation(event);
65
65
  } });
66
66
  };
67
67
  /**
@@ -127,9 +127,9 @@ export const CustomClearIndication = ({ size, }) => function Component(_a) {
127
127
  (_b = (_a = event.nativeEvent).stopImmediatePropagation) === null || _b === void 0 ? void 0 : _b.call(_a);
128
128
  };
129
129
  // Prevent react-select's default clear-on-mousedown/touchend behavior.
130
- const preventAndStop = (e) => {
131
- e.preventDefault();
132
- e.stopPropagation();
130
+ const preventAndStop = (event) => {
131
+ event.preventDefault();
132
+ event.stopPropagation();
133
133
  };
134
134
  const safeInnerProps = Object.assign(Object.assign({}, innerProps), { 'aria-hidden': undefined, onMouseDown: preventAndStop, onMouseUp: preventAndStop, onTouchEnd: preventAndStop });
135
135
  return (_jsxs(components.ClearIndicator, Object.assign({ className: classes, innerProps: safeInnerProps }, restProps, { children: [_jsx("button", { type: "button", className: "ndl-select-clear-button", onClick: handleClear, onKeyDown: handleKeyDown, "aria-label": "Clear selection", children: _jsx(XMarkIconOutline, {}) }), _jsx("div", { className: "ndl-select-divider" })] })));
@@ -146,12 +146,12 @@ export const CustomMultiValue = ({ size, }) => function Component(_a) {
146
146
  });
147
147
  return (_jsx(components.MultiValueContainer, Object.assign({}, restProps, { innerProps: {
148
148
  className: classes,
149
- }, children: _jsx(Tag, { size: size, onClick: (e) => {
149
+ }, children: _jsx(Tag, { size: size, onClick: (event) => {
150
150
  var _a, _b;
151
- e.preventDefault();
152
- (_b = (_a = restProps.removeProps).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
151
+ event.preventDefault();
152
+ (_b = (_a = restProps.removeProps).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, event);
153
153
  }, htmlAttributes: {
154
- onMouseDown: (e) => e.preventDefault(),
154
+ onMouseDown: (mouseDownEvent) => mouseDownEvent.preventDefault(),
155
155
  }, children: children }) })));
156
156
  };
157
157
  export const CustomPlaceholder = ({ size, }) => function Component(_a) {
@@ -286,19 +286,19 @@ export const CustomOption = ({ size, }) => function Component(_a) {
286
286
  return (_jsxs(components.Option, Object.assign({}, restProps, { className: classes, innerProps: optionInnerProps, children: [restProps.isMulti === true && (_jsx(Checkbox, { isChecked: restProps.isSelected, ariaLabel: restProps.label, isDisabled: restProps.isDisabled, htmlAttributes: {
287
287
  'aria-hidden': true,
288
288
  disabled: true,
289
- onPointerDown: (e) => {
290
- e.preventDefault();
289
+ onPointerDown: (event) => {
290
+ event.preventDefault();
291
291
  },
292
- onPointerUp: (e) => {
292
+ onPointerUp: (event) => {
293
293
  var _a, _b;
294
- (_b = (_a = restProps.innerProps).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
294
+ (_b = (_a = restProps.innerProps).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, event);
295
295
  },
296
- onTouchEnd: (e) => {
296
+ onTouchEnd: (event) => {
297
297
  var _a, _b;
298
- (_b = (_a = restProps.innerProps).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
298
+ (_b = (_a = restProps.innerProps).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, event);
299
299
  },
300
- onTouchStart: (e) => {
301
- e.preventDefault();
300
+ onTouchStart: (event) => {
301
+ event.preventDefault();
302
302
  },
303
303
  role: 'presentation',
304
304
  tabIndex: -1,
@@ -1 +1 @@
1
- {"version":3,"file":"Overrides.js","sourceRoot":"","sources":["../../../src/select/Overrides.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;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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 { type JSX, type ReactNode } from 'react';\nimport { useMemo } from 'react';\nimport {\n type ClearIndicatorProps,\n type CommonPropsAndClassName,\n components,\n type ControlProps,\n type DropdownIndicatorProps,\n type GroupBase,\n type IndicatorsContainerProps,\n type InputProps,\n type MenuListProps,\n type MenuPlacement,\n type MenuPosition,\n type MenuProps,\n type MultiValueProps,\n type OptionProps,\n type PlaceholderProps,\n type SingleValueProps,\n type ValueContainerProps,\n} from 'react-select';\n\n/**\n * react-select does not re-export MenuPortalProps from its public API.\n * The deep import path (react-select/dist/declarations/src/components/Menu)\n * is incompatible with moduleResolution:\"bundler\".\n *\n * Defined locally using publicly exported react-select types until upstream\n * merges the export: https://github.com/JedWatson/react-select/pull/6007\n */\ninterface MenuPortalProps<\n Option,\n IsMulti extends boolean,\n Group extends GroupBase<Option>,\n> extends CommonPropsAndClassName<Option, IsMulti, Group> {\n appendTo: HTMLElement | undefined;\n children: ReactNode;\n controlElement: HTMLDivElement | null;\n innerProps: JSX.IntrinsicElements['div'];\n menuPlacement: MenuPlacement;\n menuPosition: MenuPosition;\n}\n\nimport { Checkbox } from '../checkbox';\nimport { ChevronDownIconOutline } from '../icons/generated/heroIcons/ChevronDownIconOutline';\nimport { XMarkIconOutline } from '../icons/generated/heroIcons/XMarkIconOutline';\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"]}
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;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAGL,UAAU,GAeX,MAAM,cAAc,CAAC;AAuBtB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,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,KAA2B,EAAE,EAAE,CAC3D,eAAe,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;IAE7C,uCACK,SAAS,KACZ,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE;YACrB,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,oBAAoB,CAAC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AAM,gBAAgB,GAAG,yBAAyB,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEzE,OAAO,CACL,MAAC,UAAU,CAAC,MAAM,oBACZ,SAAS,IACb,SAAS,EAAE,OAAO,EAClB,UAAU,EAAE,gBAAgB,aAE3B,SAAS,CAAC,OAAO,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,KAAK,EAAE,EAAE;wBACvB,KAAK,CAAC,cAAc,EAAE,CAAC;oBACzB,CAAC;oBACD,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE;;wBACrB,MAAA,MAAA,SAAS,CAAC,UAAU,EAAC,OAAO,mDAAG,KAAK,CAAC,CAAC;oBACxC,CAAC;oBACD,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;;wBACpB,MAAA,MAAA,SAAS,CAAC,UAAU,EAAC,OAAO,mDAC1B,KAGC,CACF,CAAC;oBACJ,CAAC;oBACD,YAAY,EAAE,CAAC,KAAK,EAAE,EAAE;wBACtB,KAAK,CAAC,cAAc,EAAE,CAAC;oBACzB,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 { type JSX, type ReactNode } from 'react';\nimport { useMemo } from 'react';\nimport {\n type ClearIndicatorProps,\n type CommonPropsAndClassName,\n components,\n type ControlProps,\n type DropdownIndicatorProps,\n type GroupBase,\n type IndicatorsContainerProps,\n type InputProps,\n type MenuListProps,\n type MenuPlacement,\n type MenuPosition,\n type MenuProps,\n type MultiValueProps,\n type OptionProps,\n type PlaceholderProps,\n type SingleValueProps,\n type ValueContainerProps,\n} from 'react-select';\n\n/**\n * react-select does not re-export MenuPortalProps from its public API.\n * The deep import path (react-select/dist/declarations/src/components/Menu)\n * is incompatible with moduleResolution:\"bundler\".\n *\n * Defined locally using publicly exported react-select types until upstream\n * merges the export: https://github.com/JedWatson/react-select/pull/6007\n */\ninterface MenuPortalProps<\n Option,\n IsMulti extends boolean,\n Group extends GroupBase<Option>,\n> extends CommonPropsAndClassName<Option, IsMulti, Group> {\n appendTo: HTMLElement | undefined;\n children: ReactNode;\n controlElement: HTMLDivElement | null;\n innerProps: JSX.IntrinsicElements['div'];\n menuPlacement: MenuPlacement;\n menuPosition: MenuPosition;\n}\n\nimport { Checkbox } from '../checkbox';\nimport { ChevronDownIconOutline } from '../icons/generated/heroIcons/ChevronDownIconOutline';\nimport { XMarkIconOutline } from '../icons/generated/heroIcons/XMarkIconOutline';\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 = (event: React.SyntheticEvent) =>\n stopPropagation && event.stopPropagation();\n\n return {\n ...baseProps,\n onMouseDown: (event) => {\n event.preventDefault();\n maybeStopPropagation(event);\n },\n onMouseUp: (event) => {\n baseProps.onMouseUp?.(event);\n baseProps.onMouseDown?.(event);\n maybeStopPropagation(event);\n },\n onTouchEnd: (event) => {\n baseProps.onTouchEnd?.(event);\n baseProps.onMouseDown?.(\n event as unknown as React.MouseEvent<HTMLDivElement>,\n );\n maybeStopPropagation(event);\n },\n onTouchStart: (event) => {\n event.preventDefault();\n maybeStopPropagation(event);\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 = (event: React.SyntheticEvent) => {\n event.preventDefault();\n event.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={(event) => {\n event.preventDefault();\n restProps.removeProps.onClick?.(\n event as unknown as React.MouseEvent<HTMLDivElement, MouseEvent>,\n );\n }}\n htmlAttributes={{\n onMouseDown: (mouseDownEvent) => mouseDownEvent.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: (event) => {\n event.preventDefault();\n },\n onPointerUp: (event) => {\n restProps.innerProps.onClick?.(event);\n },\n onTouchEnd: (event) => {\n restProps.innerProps.onClick?.(\n event as unknown as React.MouseEvent<\n HTMLDivElement,\n MouseEvent\n >,\n );\n },\n onTouchStart: (event) => {\n event.preventDefault();\n },\n role: 'presentation',\n tabIndex: -1,\n }}\n />\n )}\n {children}\n </components.Option>\n );\n };\n"]}
@@ -45,15 +45,15 @@ export const SelectIconButton = (_a) => {
45
45
  'ndl-small': size === 'small',
46
46
  });
47
47
  const isInteractable = !isDisabled && !isLoading;
48
- const handleClick = (e) => {
48
+ const handleClick = (event) => {
49
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
50
  if (!isInteractable) {
51
- e.preventDefault();
52
- e.stopPropagation();
51
+ event.preventDefault();
52
+ event.stopPropagation();
53
53
  return;
54
54
  }
55
55
  if (onClick) {
56
- onClick(e);
56
+ onClick(event);
57
57
  }
58
58
  };
59
59
  return (_jsxs(Tooltip, Object.assign({ hoverDelay: {
@@ -1 +1 @@
1
- {"version":3,"file":"SelectIconButton.js","sourceRoot":"","sources":["../../../src/select-icon-button/SelectIconButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;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SACV,EACD,IAAI,EAAC,QAAQ;QACb,qGAAqG;QACrG,UAAU,EAAE,WAAW,KAAK,IAAI,IAAI,UAAU,IAAI,MAAM,KAAK,IAAI,EACjE,2BAA2B,UACvB,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,eAEtB,KAAC,OAAO,CAAC,OAAO,oBAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,IAAE,gBAAgB,kBAC1D,gCACE,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,UAAU,mBACL,CAAC,cAAc,gBAClB,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,SAAS,mBACrB,MAAM,EACrB,OAAO,EAAE,WAAW,IAChB,SAAS,EACT,cAAc,eAElB,cAAK,SAAS,EAAC,2BAA2B,YACxC,cAAK,SAAS,EAAC,UAAU,YAAE,QAAQ,GAAO,GACtC,EACN,KAAC,sBAAsB,IACrB,SAAS,EAAE,UAAU,CAAC,0BAA0B,EAAE;gCAChD,+BAA+B,EAAE,MAAM,KAAK,IAAI;6BACjD,CAAC,GACF,EACD,SAAS,IAAI,CACZ,KAAC,aAAa,IAAC,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,GAAI,CAC9D,KACM,IACO,EAClB,KAAC,OAAO,CAAC,OAAO,oBAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,cACvC,WAAW,IACI,KACV,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { ButtonSpinner } from '../_common/ButtonSpinner';\nimport { type CommonProps, type TooltipObjectProps } from '../_common/types';\nimport { ChevronDownIconOutline } from '../icons/generated/heroIcons/ChevronDownIconOutline';\nimport { Tooltip } from '../tooltip';\n\ntype SelectIconButtonProps = {\n /** Content displayed in the button */\n children?: React.ReactNode;\n /** Size of button */\n size?: 'small' | 'medium' | 'large';\n /** If the button is doing something Async, it will display a loading spinner */\n isLoading?: boolean;\n /** Whether the button is in disabled state */\n isDisabled?: boolean;\n /** If the button is opened */\n isOpen: boolean;\n /** Callback function to be called when the button is clicked */\n onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /**\n * A string that will be shown as a tooltip when hovering over the button. It also acts as an aria-label.\n * {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label}\n */\n description: string | null;\n /**\n * Props for the tooltip component.\n */\n tooltipProps?: TooltipObjectProps;\n\n /** Accessible message for screen readers when the button is in a loading state */\n loadingMessage?: string;\n};\n\nexport const SelectIconButton = ({\n children,\n size = 'medium',\n isDisabled = false,\n isLoading = false,\n isOpen = false,\n className,\n description,\n tooltipProps,\n onClick,\n style,\n htmlAttributes,\n ref,\n loadingMessage = 'Loading',\n ...restProps\n}: CommonProps<'button', SelectIconButtonProps>) => {\n const classes = classNames('ndl-select-icon-btn', className, {\n 'ndl-active': isOpen,\n 'ndl-disabled': isDisabled,\n 'ndl-large': size === 'large',\n 'ndl-loading': isLoading,\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n const isInteractable = !isDisabled && !isLoading;\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n // 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.\n if (!isInteractable) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n if (onClick) {\n onClick(e);\n }\n };\n\n return (\n <Tooltip\n hoverDelay={{\n close: 0,\n open: 500,\n }}\n type=\"simple\"\n // We disable the tooltip if the button is disabled or open, so it doesn't interfere with a menu open\n isDisabled={description === null || isDisabled || isOpen === true}\n shouldCloseOnReferenceClick\n {...tooltipProps?.root}\n >\n <Tooltip.Trigger {...tooltipProps?.trigger} hasButtonWrapper>\n <button\n type=\"button\"\n ref={ref}\n className={classes}\n style={style}\n disabled={isDisabled}\n aria-disabled={!isInteractable}\n aria-label={description ?? undefined}\n aria-expanded={isOpen}\n onClick={handleClick}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-select-icon-btn-inner\">\n <div className=\"ndl-icon\">{children}</div>\n </div>\n <ChevronDownIconOutline\n className={classNames('ndl-select-icon-btn-icon', {\n 'ndl-select-icon-btn-icon-open': isOpen === true,\n })}\n />\n {isLoading && (\n <ButtonSpinner loadingMessage={loadingMessage} size={size} />\n )}\n </button>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n {description}\n </Tooltip.Content>\n </Tooltip>\n );\n};\n"]}
1
+ {"version":3,"file":"SelectIconButton.js","sourceRoot":"","sources":["../../../src/select-icon-button/SelectIconButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AA6BrC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAec,EAAE,EAAE;QAflB,EAC/B,QAAQ,EACR,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,KAAK,EAClB,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,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,UAAU,mBACL,CAAC,cAAc,gBAClB,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,SAAS,mBACrB,MAAM,EACrB,OAAO,EAAE,WAAW,IAChB,SAAS,EACT,cAAc,eAElB,cAAK,SAAS,EAAC,2BAA2B,YACxC,cAAK,SAAS,EAAC,UAAU,YAAE,QAAQ,GAAO,GACtC,EACN,KAAC,sBAAsB,IACrB,SAAS,EAAE,UAAU,CAAC,0BAA0B,EAAE;gCAChD,+BAA+B,EAAE,MAAM,KAAK,IAAI;6BACjD,CAAC,GACF,EACD,SAAS,IAAI,CACZ,KAAC,aAAa,IAAC,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,GAAI,CAC9D,KACM,IACO,EAClB,KAAC,OAAO,CAAC,OAAO,oBAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,cACvC,WAAW,IACI,KACV,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { ButtonSpinner } from '../_common/ButtonSpinner';\nimport { type CommonProps, type TooltipObjectProps } from '../_common/types';\nimport { ChevronDownIconOutline } from '../icons/generated/heroIcons/ChevronDownIconOutline';\nimport { Tooltip } from '../tooltip';\n\ntype SelectIconButtonProps = {\n /** Content displayed in the button */\n children?: React.ReactNode;\n /** Size of button */\n size?: 'small' | 'medium' | 'large';\n /** If the button is doing something Async, it will display a loading spinner */\n isLoading?: boolean;\n /** Whether the button is in disabled state */\n isDisabled?: boolean;\n /** If the button is opened */\n isOpen: boolean;\n /** Callback function to be called when the button is clicked */\n onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /**\n * A string that will be shown as a tooltip when hovering over the button. It also acts as an aria-label.\n * {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label}\n */\n description: string | null;\n /**\n * Props for the tooltip component.\n */\n tooltipProps?: TooltipObjectProps;\n\n /** Accessible message for screen readers when the button is in a loading state */\n loadingMessage?: string;\n};\n\nexport const SelectIconButton = ({\n children,\n size = 'medium',\n isDisabled = false,\n isLoading = false,\n isOpen = false,\n className,\n description,\n tooltipProps,\n onClick,\n style,\n htmlAttributes,\n ref,\n loadingMessage = 'Loading',\n ...restProps\n}: CommonProps<'button', SelectIconButtonProps>) => {\n const classes = classNames('ndl-select-icon-btn', className, {\n 'ndl-active': isOpen,\n 'ndl-disabled': isDisabled,\n 'ndl-large': size === 'large',\n 'ndl-loading': isLoading,\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n const isInteractable = !isDisabled && !isLoading;\n\n const handleClick = (\n event: React.MouseEvent<HTMLButtonElement, MouseEvent>,\n ) => {\n // 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.\n if (!isInteractable) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <Tooltip\n hoverDelay={{\n close: 0,\n open: 500,\n }}\n type=\"simple\"\n // We disable the tooltip if the button is disabled or open, so it doesn't interfere with a menu open\n isDisabled={description === null || isDisabled || isOpen === true}\n shouldCloseOnReferenceClick\n {...tooltipProps?.root}\n >\n <Tooltip.Trigger {...tooltipProps?.trigger} hasButtonWrapper>\n <button\n type=\"button\"\n ref={ref}\n className={classes}\n style={style}\n disabled={isDisabled}\n aria-disabled={!isInteractable}\n aria-label={description ?? undefined}\n aria-expanded={isOpen}\n onClick={handleClick}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-select-icon-btn-inner\">\n <div className=\"ndl-icon\">{children}</div>\n </div>\n <ChevronDownIconOutline\n className={classNames('ndl-select-icon-btn-icon', {\n 'ndl-select-icon-btn-icon-open': isOpen === true,\n })}\n />\n {isLoading && (\n <ButtonSpinner loadingMessage={loadingMessage} size={size} />\n )}\n </button>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n {description}\n </Tooltip.Content>\n </Tooltip>\n );\n};\n"]}
@@ -23,7 +23,7 @@ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { SelectIconButton, Typography } from '@neo4j-ndl/react';
24
24
  import { SelectIcon } from '@neo4j-ndl/react/icons';
25
25
  const Component = () => {
26
- return (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-16", children: [_jsxs("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [_jsx(SelectIconButton, { description: "Select", size: "small", isOpen: false, children: _jsx(SelectIcon, {}) }), _jsx(Typography, { variant: "label", children: " Small" })] }), _jsxs("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [_jsx(SelectIconButton, { description: "Select", size: "medium", isOpen: false, children: _jsx(SelectIcon, {}) }), _jsx(Typography, { variant: "label", children: " Medium" })] }), _jsxs("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [_jsx(SelectIconButton, { description: "Select", size: "large", isOpen: false, children: _jsx(SelectIcon, {}) }), _jsx(Typography, { variant: "label", children: " Large" })] })] }));
26
+ return (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-16", children: [_jsxs("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [_jsx(SelectIconButton, { description: "Select", size: "small", isOpen: false, children: _jsx(SelectIcon, {}) }), _jsx(Typography, { variant: "title-4", children: " Small" })] }), _jsxs("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [_jsx(SelectIconButton, { description: "Select", size: "medium", isOpen: false, children: _jsx(SelectIcon, {}) }), _jsx(Typography, { variant: "title-4", children: " Medium" })] }), _jsxs("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [_jsx(SelectIconButton, { description: "Select", size: "large", isOpen: false, children: _jsx(SelectIcon, {}) }), _jsx(Typography, { variant: "title-4", children: " Large" })] })] }));
27
27
  };
28
28
  export default Component;
29
29
  //# sourceMappingURL=select-icon-button-sizes.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-icon-button-sizes.story.js","sourceRoot":"","sources":["../../../../src/select-icon-button/stories/select-icon-button-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,eAAK,SAAS,EAAC,iDAAiD,aAC9D,KAAC,gBAAgB,IAAC,WAAW,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAE,KAAK,YAC/D,KAAC,UAAU,KAAG,GACG,EACnB,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,uBAAoB,IAC3C,EACN,eAAK,SAAS,EAAC,iDAAiD,aAC9D,KAAC,gBAAgB,IAAC,WAAW,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,MAAM,EAAE,KAAK,YAChE,KAAC,UAAU,KAAG,GACG,EACnB,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,wBAAqB,IAC5C,EACN,eAAK,SAAS,EAAC,iDAAiD,aAC9D,KAAC,gBAAgB,IAAC,WAAW,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAE,KAAK,YAC/D,KAAC,UAAU,KAAG,GACG,EACnB,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,uBAAoB,IAC3C,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectIconButton, Typography } from '@neo4j-ndl/react';\nimport { SelectIcon } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-gap-token-16\">\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton description=\"Select\" size=\"small\" isOpen={false}>\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"label\"> Small</Typography>\n </div>\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton description=\"Select\" size=\"medium\" isOpen={false}>\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"label\"> Medium</Typography>\n </div>\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton description=\"Select\" size=\"large\" isOpen={false}>\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"label\"> Large</Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-icon-button-sizes.story.js","sourceRoot":"","sources":["../../../../src/select-icon-button/stories/select-icon-button-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,eAAK,SAAS,EAAC,iDAAiD,aAC9D,KAAC,gBAAgB,IAAC,WAAW,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAE,KAAK,YAC/D,KAAC,UAAU,KAAG,GACG,EACnB,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,uBAAoB,IAC7C,EACN,eAAK,SAAS,EAAC,iDAAiD,aAC9D,KAAC,gBAAgB,IAAC,WAAW,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,MAAM,EAAE,KAAK,YAChE,KAAC,UAAU,KAAG,GACG,EACnB,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,wBAAqB,IAC9C,EACN,eAAK,SAAS,EAAC,iDAAiD,aAC9D,KAAC,gBAAgB,IAAC,WAAW,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAE,KAAK,YAC/D,KAAC,UAAU,KAAG,GACG,EACnB,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,uBAAoB,IAC7C,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectIconButton, Typography } from '@neo4j-ndl/react';\nimport { SelectIcon } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-gap-token-16\">\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton description=\"Select\" size=\"small\" isOpen={false}>\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"title-4\"> Small</Typography>\n </div>\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton description=\"Select\" size=\"medium\" isOpen={false}>\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"title-4\"> Medium</Typography>\n </div>\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton description=\"Select\" size=\"large\" isOpen={false}>\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"title-4\"> Large</Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -23,7 +23,7 @@ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { SelectIconButton, Typography } from '@neo4j-ndl/react';
24
24
  import { SelectIcon } from '@neo4j-ndl/react/icons';
25
25
  const Component = () => {
26
- return (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-16", children: [_jsxs("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [_jsx(SelectIconButton, { description: "Select", size: "small", isDisabled: true, isOpen: false, children: _jsx(SelectIcon, {}) }), _jsx(Typography, { variant: "label", children: " Disabled" })] }), _jsxs("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [_jsx(SelectIconButton, { description: "Select", size: "small", isOpen: true, children: _jsx(SelectIcon, {}) }), _jsx(Typography, { variant: "label", children: " Active" })] }), _jsxs("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [_jsx(SelectIconButton, { description: "Select", size: "small", isLoading: true, loadingMessage: "Loading", isOpen: false, children: _jsx(SelectIcon, {}) }), _jsx(Typography, { variant: "label", children: " Loading" })] })] }));
26
+ return (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-16", children: [_jsxs("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [_jsx(SelectIconButton, { description: "Select", size: "small", isDisabled: true, isOpen: false, children: _jsx(SelectIcon, {}) }), _jsx(Typography, { variant: "title-4", children: " Disabled" })] }), _jsxs("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [_jsx(SelectIconButton, { description: "Select", size: "small", isOpen: true, children: _jsx(SelectIcon, {}) }), _jsx(Typography, { variant: "title-4", children: " Active" })] }), _jsxs("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [_jsx(SelectIconButton, { description: "Select", size: "small", isLoading: true, loadingMessage: "Loading", isOpen: false, children: _jsx(SelectIcon, {}) }), _jsx(Typography, { variant: "title-4", children: " Loading" })] })] }));
27
27
  };
28
28
  export default Component;
29
29
  //# sourceMappingURL=select-icon-button-states.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-icon-button-states.story.js","sourceRoot":"","sources":["../../../../src/select-icon-button/stories/select-icon-button-states.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,eAAK,SAAS,EAAC,iDAAiD,aAC9D,KAAC,gBAAgB,IACf,WAAW,EAAC,QAAQ,EACpB,IAAI,EAAC,OAAO,EACZ,UAAU,QACV,MAAM,EAAE,KAAK,YAEb,KAAC,UAAU,KAAG,GACG,EACnB,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,0BAAuB,IAC9C,EACN,eAAK,SAAS,EAAC,iDAAiD,aAC9D,KAAC,gBAAgB,IAAC,WAAW,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAE,IAAI,YAC9D,KAAC,UAAU,KAAG,GACG,EACnB,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,wBAAqB,IAC5C,EACN,eAAK,SAAS,EAAC,iDAAiD,aAC9D,KAAC,gBAAgB,IACf,WAAW,EAAC,QAAQ,EACpB,IAAI,EAAC,OAAO,EACZ,SAAS,QACT,cAAc,EAAC,SAAS,EACxB,MAAM,EAAE,KAAK,YAEb,KAAC,UAAU,KAAG,GACG,EACnB,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,yBAAsB,IAC7C,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectIconButton, Typography } from '@neo4j-ndl/react';\nimport { SelectIcon } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-gap-token-16\">\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton\n description=\"Select\"\n size=\"small\"\n isDisabled\n isOpen={false}\n >\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"label\"> Disabled</Typography>\n </div>\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton description=\"Select\" size=\"small\" isOpen={true}>\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"label\"> Active</Typography>\n </div>\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton\n description=\"Select\"\n size=\"small\"\n isLoading\n loadingMessage=\"Loading\"\n isOpen={false}\n >\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"label\"> Loading</Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-icon-button-states.story.js","sourceRoot":"","sources":["../../../../src/select-icon-button/stories/select-icon-button-states.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,eAAK,SAAS,EAAC,iDAAiD,aAC9D,KAAC,gBAAgB,IACf,WAAW,EAAC,QAAQ,EACpB,IAAI,EAAC,OAAO,EACZ,UAAU,QACV,MAAM,EAAE,KAAK,YAEb,KAAC,UAAU,KAAG,GACG,EACnB,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,0BAAuB,IAChD,EACN,eAAK,SAAS,EAAC,iDAAiD,aAC9D,KAAC,gBAAgB,IAAC,WAAW,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAE,IAAI,YAC9D,KAAC,UAAU,KAAG,GACG,EACnB,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,wBAAqB,IAC9C,EACN,eAAK,SAAS,EAAC,iDAAiD,aAC9D,KAAC,gBAAgB,IACf,WAAW,EAAC,QAAQ,EACpB,IAAI,EAAC,OAAO,EACZ,SAAS,QACT,cAAc,EAAC,SAAS,EACxB,MAAM,EAAE,KAAK,YAEb,KAAC,UAAU,KAAG,GACG,EACnB,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,yBAAsB,IAC/C,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectIconButton, Typography } from '@neo4j-ndl/react';\nimport { SelectIcon } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-gap-token-16\">\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton\n description=\"Select\"\n size=\"small\"\n isDisabled\n isOpen={false}\n >\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"title-4\"> Disabled</Typography>\n </div>\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton description=\"Select\" size=\"small\" isOpen={true}>\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"title-4\"> Active</Typography>\n </div>\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton\n description=\"Select\"\n size=\"small\"\n isLoading\n loadingMessage=\"Loading\"\n isOpen={false}\n >\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"title-4\"> Loading</Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -25,7 +25,7 @@ import { useState } from 'react';
25
25
  const Component = () => {
26
26
  var _a, _b, _c, _d;
27
27
  const [selected, setSelected] = useState({});
28
- return (_jsxs("div", { className: "n-flex n-flex-row n-gap-token-8", children: [_jsx(SelectableTag, { size: "x-small", isSelected: (_a = selected['x-small']) !== null && _a !== void 0 ? _a : false, onClick: () => setSelected((s) => (Object.assign(Object.assign({}, s), { ['x-small']: !s['x-small'] }))), children: "X-Small" }), _jsx(SelectableTag, { size: "small", isSelected: (_b = selected['small']) !== null && _b !== void 0 ? _b : false, onClick: () => setSelected((s) => (Object.assign(Object.assign({}, s), { ['small']: !s['small'] }))), children: "Small" }), _jsx(SelectableTag, { size: "medium", isSelected: (_c = selected['medium']) !== null && _c !== void 0 ? _c : false, onClick: () => setSelected((s) => (Object.assign(Object.assign({}, s), { ['medium']: !s['medium'] }))), children: "Medium" }), _jsx(SelectableTag, { size: "large", isSelected: (_d = selected['large']) !== null && _d !== void 0 ? _d : false, onClick: () => setSelected((s) => (Object.assign(Object.assign({}, s), { ['large']: !s['large'] }))), children: "Large" })] }));
28
+ return (_jsxs("div", { className: "n-flex n-flex-row n-gap-token-8", children: [_jsx(SelectableTag, { size: "x-small", isSelected: (_a = selected['x-small']) !== null && _a !== void 0 ? _a : false, onClick: () => setSelected((prev) => (Object.assign(Object.assign({}, prev), { ['x-small']: !prev['x-small'] }))), children: "X-Small" }), _jsx(SelectableTag, { size: "small", isSelected: (_b = selected['small']) !== null && _b !== void 0 ? _b : false, onClick: () => setSelected((prev) => (Object.assign(Object.assign({}, prev), { ['small']: !prev['small'] }))), children: "Small" }), _jsx(SelectableTag, { size: "medium", isSelected: (_c = selected['medium']) !== null && _c !== void 0 ? _c : false, onClick: () => setSelected((prev) => (Object.assign(Object.assign({}, prev), { ['medium']: !prev['medium'] }))), children: "Medium" }), _jsx(SelectableTag, { size: "large", isSelected: (_d = selected['large']) !== null && _d !== void 0 ? _d : false, onClick: () => setSelected((prev) => (Object.assign(Object.assign({}, prev), { ['large']: !prev['large'] }))), children: "Large" })] }));
29
29
  };
30
30
  export default Component;
31
31
  //# sourceMappingURL=selectable-tag-sizes.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectable-tag-sizes.story.js","sourceRoot":"","sources":["../../../../src/selectable-tag/stories/selectable-tag-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;;IACrB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAA0B,EAAE,CAAC,CAAC;IAEtE,OAAO,CACL,eAAK,SAAS,EAAC,iCAAiC,aAC9C,KAAC,aAAa,IACZ,IAAI,EAAC,SAAS,EACd,UAAU,EAAE,MAAA,QAAQ,CAAC,SAAS,CAAC,mCAAI,KAAK,EACxC,OAAO,EAAE,GAAG,EAAE,CACZ,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iCAAM,CAAC,KAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAG,CAAC,wBAI9C,EAChB,KAAC,aAAa,IACZ,IAAI,EAAC,OAAO,EACZ,UAAU,EAAE,MAAA,QAAQ,CAAC,OAAO,CAAC,mCAAI,KAAK,EACtC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iCAAM,CAAC,KAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAG,CAAC,sBAGvD,EAChB,KAAC,aAAa,IACZ,IAAI,EAAC,QAAQ,EACb,UAAU,EAAE,MAAA,QAAQ,CAAC,QAAQ,CAAC,mCAAI,KAAK,EACvC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iCAAM,CAAC,KAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAG,CAAC,uBAGzD,EAChB,KAAC,aAAa,IACZ,IAAI,EAAC,OAAO,EACZ,UAAU,EAAE,MAAA,QAAQ,CAAC,OAAO,CAAC,mCAAI,KAAK,EACtC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iCAAM,CAAC,KAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAG,CAAC,sBAGvD,IACZ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectableTag } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [selected, setSelected] = useState<Record<string, boolean>>({});\n\n return (\n <div className=\"n-flex n-flex-row n-gap-token-8\">\n <SelectableTag\n size=\"x-small\"\n isSelected={selected['x-small'] ?? false}\n onClick={() =>\n setSelected((s) => ({ ...s, ['x-small']: !s['x-small'] }))\n }\n >\n X-Small\n </SelectableTag>\n <SelectableTag\n size=\"small\"\n isSelected={selected['small'] ?? false}\n onClick={() => setSelected((s) => ({ ...s, ['small']: !s['small'] }))}\n >\n Small\n </SelectableTag>\n <SelectableTag\n size=\"medium\"\n isSelected={selected['medium'] ?? false}\n onClick={() => setSelected((s) => ({ ...s, ['medium']: !s['medium'] }))}\n >\n Medium\n </SelectableTag>\n <SelectableTag\n size=\"large\"\n isSelected={selected['large'] ?? false}\n onClick={() => setSelected((s) => ({ ...s, ['large']: !s['large'] }))}\n >\n Large\n </SelectableTag>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"selectable-tag-sizes.story.js","sourceRoot":"","sources":["../../../../src/selectable-tag/stories/selectable-tag-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;;IACrB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAA0B,EAAE,CAAC,CAAC;IAEtE,OAAO,CACL,eAAK,SAAS,EAAC,iCAAiC,aAC9C,KAAC,aAAa,IACZ,IAAI,EAAC,SAAS,EACd,UAAU,EAAE,MAAA,QAAQ,CAAC,SAAS,CAAC,mCAAI,KAAK,EACxC,OAAO,EAAE,GAAG,EAAE,CACZ,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iCAAM,IAAI,KAAE,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAG,CAAC,wBAIvD,EAChB,KAAC,aAAa,IACZ,IAAI,EAAC,OAAO,EACZ,UAAU,EAAE,MAAA,QAAQ,CAAC,OAAO,CAAC,mCAAI,KAAK,EACtC,OAAO,EAAE,GAAG,EAAE,CACZ,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iCAAM,IAAI,KAAE,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAG,CAAC,sBAInD,EAChB,KAAC,aAAa,IACZ,IAAI,EAAC,QAAQ,EACb,UAAU,EAAE,MAAA,QAAQ,CAAC,QAAQ,CAAC,mCAAI,KAAK,EACvC,OAAO,EAAE,GAAG,EAAE,CACZ,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iCAAM,IAAI,KAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAG,CAAC,uBAIrD,EAChB,KAAC,aAAa,IACZ,IAAI,EAAC,OAAO,EACZ,UAAU,EAAE,MAAA,QAAQ,CAAC,OAAO,CAAC,mCAAI,KAAK,EACtC,OAAO,EAAE,GAAG,EAAE,CACZ,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iCAAM,IAAI,KAAE,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAG,CAAC,sBAInD,IACZ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectableTag } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [selected, setSelected] = useState<Record<string, boolean>>({});\n\n return (\n <div className=\"n-flex n-flex-row n-gap-token-8\">\n <SelectableTag\n size=\"x-small\"\n isSelected={selected['x-small'] ?? false}\n onClick={() =>\n setSelected((prev) => ({ ...prev, ['x-small']: !prev['x-small'] }))\n }\n >\n X-Small\n </SelectableTag>\n <SelectableTag\n size=\"small\"\n isSelected={selected['small'] ?? false}\n onClick={() =>\n setSelected((prev) => ({ ...prev, ['small']: !prev['small'] }))\n }\n >\n Small\n </SelectableTag>\n <SelectableTag\n size=\"medium\"\n isSelected={selected['medium'] ?? false}\n onClick={() =>\n setSelected((prev) => ({ ...prev, ['medium']: !prev['medium'] }))\n }\n >\n Medium\n </SelectableTag>\n <SelectableTag\n size=\"large\"\n isSelected={selected['large'] ?? false}\n onClick={() =>\n setSelected((prev) => ({ ...prev, ['large']: !prev['large'] }))\n }\n >\n Large\n </SelectableTag>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -256,24 +256,24 @@ const CategoryItem = (_a) => {
256
256
  }, isOpen: isTooltipOpen, onOpenChange: setIsTooltipOpen, children: [_jsx(Tooltip.Trigger, { hasButtonWrapper: true, children: children }), _jsx(Tooltip.Content, { className: "ndl-side-nav ndl-side-nav-category-menu-tooltip-content", children: label })] })), children: _jsxs(CompositeItem, { render: _jsx("button", Object.assign({ type: "button" }, refInteractions.getReferenceProps(Object.assign(Object.assign({ className: classes, ref: mergedRef, style }, restProps), htmlAttributes)), {
257
257
  // {...restProps}
258
258
  // {...htmlAttributes}
259
- role: "menuitem", "aria-haspopup": "menu", "aria-expanded": context.open, "aria-controls": floatingId, onFocus: (e) => {
259
+ role: "menuitem", "aria-haspopup": "menu", "aria-expanded": context.open, "aria-controls": floatingId, onFocus: (event) => {
260
260
  // Only show tooltip on focus-visible (keyboard navigation)
261
- if (e.target instanceof HTMLElement &&
262
- e.target.matches(':focus-visible')) {
261
+ if (event.target instanceof HTMLElement &&
262
+ event.target.matches(':focus-visible')) {
263
263
  setIsTooltipOpen(true);
264
264
  }
265
265
  // Call original handler if exists
266
266
  const originalOnFocus = refInteractions.getReferenceProps({})
267
267
  .onFocus;
268
- originalOnFocus === null || originalOnFocus === void 0 ? void 0 : originalOnFocus(e);
269
- }, onBlur: (e) => {
268
+ originalOnFocus === null || originalOnFocus === void 0 ? void 0 : originalOnFocus(event);
269
+ }, onBlur: (event) => {
270
270
  setIsTooltipOpen(false);
271
271
  // Call original handler if exists
272
272
  const originalOnBlur = refInteractions.getReferenceProps({})
273
273
  .onBlur;
274
- originalOnBlur === null || originalOnBlur === void 0 ? void 0 : originalOnBlur(e);
275
- }, onKeyDown: (e) => {
276
- if (e.key === 'ArrowRight') {
274
+ originalOnBlur === null || originalOnBlur === void 0 ? void 0 : originalOnBlur(event);
275
+ }, onKeyDown: (event) => {
276
+ if (event.key === 'ArrowRight') {
277
277
  // open and move focus into submenu
278
278
  setIsOpen(true);
279
279
  setActiveIndex(0);
@@ -282,7 +282,7 @@ const CategoryItem = (_a) => {
282
282
  const el = elementsRef.current[0];
283
283
  el === null || el === void 0 ? void 0 : el.focus();
284
284
  });
285
- e.preventDefault();
285
+ event.preventDefault();
286
286
  }
287
287
  // ArrowDown/ArrowUp: let Composite handle top-level roving focus.
288
288
  } })), children: [_jsxs("div", { className: "ndl-side-nav-item-inner", children: [Boolean(icon) && (_jsx("div", { className: "ndl-side-nav-item-leading-element", children: _jsx(ConditionalWrap, { shouldWrap: Boolean(badge) && !isHovered && !isExpanded, wrap: (children) => {
@@ -299,7 +299,7 @@ const CategoryHeader = (_a) => {
299
299
  const classes = classNames('ndl-side-nav-category-header', className, {
300
300
  'ndl-side-nav-category-header-expanded': isExpanded || isHovered,
301
301
  });
302
- return (_jsx(Typography, Object.assign({ ref: ref, variant: "label", as: "li", className: classes, htmlAttributes: Object.assign(Object.assign({}, htmlAttributes), { role: 'separator' }), style: style }, restProps, { children: isExpanded || isHovered ? children : _jsx(Divider, {}) })));
302
+ return (_jsx(Typography, Object.assign({ ref: ref, variant: "title-4", as: "li", className: classes, htmlAttributes: Object.assign(Object.assign({}, htmlAttributes), { role: 'separator' }), style: style }, restProps, { children: isExpanded || isHovered ? children : _jsx(Divider, {}) })));
303
303
  };
304
304
  /**
305
305
  * SelectedIndicator