@itwin/core-react 3.7.15 → 3.7.17

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 (388) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  3. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  4. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  5. package/lib/cjs/core-react/badge/Badge.d.ts +1 -1
  6. package/lib/cjs/core-react/badge/Badge.d.ts.map +1 -1
  7. package/lib/cjs/core-react/badge/Badge.js.map +1 -1
  8. package/lib/cjs/core-react/badge/BetaBadge.d.ts +2 -2
  9. package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
  10. package/lib/cjs/core-react/badge/NewBadge.d.ts +2 -2
  11. package/lib/cjs/core-react/badge/NewBadge.d.ts.map +1 -1
  12. package/lib/cjs/core-react/base/Centered.d.ts +2 -2
  13. package/lib/cjs/core-react/base/Centered.d.ts.map +1 -1
  14. package/lib/cjs/core-react/base/Div.d.ts +2 -2
  15. package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
  16. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +2 -2
  17. package/lib/cjs/core-react/base/FillCentered.d.ts +2 -2
  18. package/lib/cjs/core-react/base/FillCentered.d.ts.map +1 -1
  19. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +2 -2
  20. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  21. package/lib/cjs/core-react/base/Gap.d.ts +2 -2
  22. package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
  23. package/lib/cjs/core-react/base/ScrollView.d.ts +2 -2
  24. package/lib/cjs/core-react/base/ScrollView.d.ts.map +1 -1
  25. package/lib/cjs/core-react/button/Button.d.ts +1 -1
  26. package/lib/cjs/core-react/button/UnderlinedButton.d.ts +1 -1
  27. package/lib/cjs/core-react/button/UnderlinedButton.d.ts.map +1 -1
  28. package/lib/cjs/core-react/checkbox/Checkbox.d.ts +1 -1
  29. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +3 -3
  30. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  31. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +1 -1
  32. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  33. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  34. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  35. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  36. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  37. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
  38. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  39. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  40. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
  41. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  42. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +3 -1
  43. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  44. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts +1 -1
  45. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  46. package/lib/cjs/core-react/dialog/Dialog.d.ts +3 -3
  47. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  48. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  49. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +2 -2
  50. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  51. package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts +2 -2
  52. package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts.map +1 -1
  53. package/lib/cjs/core-react/expandable/ExpandableBlock.js.map +1 -1
  54. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +1 -1
  55. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  56. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  57. package/lib/cjs/core-react/focustrap/FocusTrap.d.ts +1 -1
  58. package/lib/cjs/core-react/focustrap/FocusTrap.d.ts.map +1 -1
  59. package/lib/cjs/core-react/form/Field.d.ts +1 -1
  60. package/lib/cjs/core-react/form/Form.d.ts +1 -1
  61. package/lib/cjs/core-react/hocs/withIsPressed.d.ts +2 -2
  62. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts +2 -2
  63. package/lib/cjs/core-react/hocs/withTimeout.d.ts +2 -2
  64. package/lib/cjs/core-react/icons/IconComponent.d.ts +1 -1
  65. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  66. package/lib/cjs/core-react/icons/SvgPath.d.ts +1 -1
  67. package/lib/cjs/core-react/icons/SvgSprite.d.ts +1 -1
  68. package/lib/cjs/core-react/icons/WebFontIcon.d.ts +1 -1
  69. package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
  70. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +1 -1
  71. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +1 -1
  72. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  73. package/lib/cjs/core-react/inputs/Input.d.ts +1 -1
  74. package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
  75. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  76. package/lib/cjs/core-react/inputs/InputLabel.d.ts +1 -1
  77. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  78. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  79. package/lib/cjs/core-react/inputs/LabeledInput.d.ts +2 -2
  80. package/lib/cjs/core-react/inputs/LabeledInput.d.ts.map +1 -1
  81. package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts +2 -2
  82. package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts.map +1 -1
  83. package/lib/cjs/core-react/inputs/Textarea.d.ts +1 -1
  84. package/lib/cjs/core-react/inputs/Textarea.d.ts.map +1 -1
  85. package/lib/cjs/core-react/inputs/Textarea.js.map +1 -1
  86. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  87. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  88. package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
  89. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +1 -1
  90. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  91. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  92. package/lib/cjs/core-react/listbox/Listbox.d.ts +2 -2
  93. package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
  94. package/lib/cjs/core-react/loading/LoadingBar.d.ts +1 -1
  95. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +1 -1
  96. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +1 -1
  97. package/lib/cjs/core-react/loading/LoadingStatus.d.ts +1 -1
  98. package/lib/cjs/core-react/loading/Spinner.d.ts +1 -1
  99. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +3 -3
  100. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  101. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  102. package/lib/cjs/core-react/notification/MessageRenderer.d.ts +2 -2
  103. package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
  104. package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts +2 -2
  105. package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts.map +1 -1
  106. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts +1 -1
  107. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts.map +1 -1
  108. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +2 -2
  109. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  110. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  111. package/lib/cjs/core-react/radio/Radio.d.ts +1 -1
  112. package/lib/cjs/core-react/radio/Radio.d.ts.map +1 -1
  113. package/lib/cjs/core-react/radio/Radio.js.map +1 -1
  114. package/lib/cjs/core-react/select/LabeledSelect.d.ts +1 -1
  115. package/lib/cjs/core-react/select/LabeledSelect.d.ts.map +1 -1
  116. package/lib/cjs/core-react/select/LabeledSelect.js.map +1 -1
  117. package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts +2 -2
  118. package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts.map +1 -1
  119. package/lib/cjs/core-react/select/Select.d.ts +1 -1
  120. package/lib/cjs/core-react/select/Select.d.ts.map +1 -1
  121. package/lib/cjs/core-react/select/Select.js.map +1 -1
  122. package/lib/cjs/core-react/select/ThemedSelect.d.ts +1 -1
  123. package/lib/cjs/core-react/select/ThemedSelect.d.ts.map +1 -1
  124. package/lib/cjs/core-react/settings/SettingsContainer.d.ts +2 -2
  125. package/lib/cjs/core-react/settings/SettingsContainer.d.ts.map +1 -1
  126. package/lib/cjs/core-react/settings/SettingsManager.d.ts +3 -3
  127. package/lib/cjs/core-react/settings/SettingsManager.d.ts.map +1 -1
  128. package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
  129. package/lib/cjs/core-react/slider/Slider.d.ts +1 -1
  130. package/lib/cjs/core-react/slider/Slider.d.ts.map +1 -1
  131. package/lib/cjs/core-react/splitbutton/SplitButton.d.ts +1 -1
  132. package/lib/cjs/core-react/splitbutton/SplitButton.d.ts.map +1 -1
  133. package/lib/cjs/core-react/splitbutton/SplitButton.js.map +1 -1
  134. package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts +2 -2
  135. package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts.map +1 -1
  136. package/lib/cjs/core-react/tabs/Tabs.d.ts +4 -4
  137. package/lib/cjs/core-react/tabs/Tabs.d.ts.map +1 -1
  138. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  139. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +2 -2
  140. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  141. package/lib/cjs/core-react/text/BlockText.d.ts +2 -2
  142. package/lib/cjs/core-react/text/BlockText.d.ts.map +1 -1
  143. package/lib/cjs/core-react/text/BodyText.d.ts +2 -2
  144. package/lib/cjs/core-react/text/BodyText.d.ts.map +1 -1
  145. package/lib/cjs/core-react/text/DisabledText.d.ts +5 -2
  146. package/lib/cjs/core-react/text/DisabledText.d.ts.map +1 -1
  147. package/lib/cjs/core-react/text/FilteredText.d.ts +1 -1
  148. package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
  149. package/lib/cjs/core-react/text/Headline.d.ts +2 -2
  150. package/lib/cjs/core-react/text/Headline.d.ts.map +1 -1
  151. package/lib/cjs/core-react/text/LeadingText.d.ts +2 -2
  152. package/lib/cjs/core-react/text/LeadingText.d.ts.map +1 -1
  153. package/lib/cjs/core-react/text/LeadingText2.d.ts +2 -2
  154. package/lib/cjs/core-react/text/LeadingText2.d.ts.map +1 -1
  155. package/lib/cjs/core-react/text/MutedText.d.ts +2 -2
  156. package/lib/cjs/core-react/text/MutedText.d.ts.map +1 -1
  157. package/lib/cjs/core-react/text/SmallText.d.ts +2 -2
  158. package/lib/cjs/core-react/text/SmallText.d.ts.map +1 -1
  159. package/lib/cjs/core-react/text/StyledText.d.ts +2 -2
  160. package/lib/cjs/core-react/text/StyledText.d.ts.map +1 -1
  161. package/lib/cjs/core-react/text/Subheading.d.ts +2 -2
  162. package/lib/cjs/core-react/text/Subheading.d.ts.map +1 -1
  163. package/lib/cjs/core-react/text/Subheading2.d.ts +2 -2
  164. package/lib/cjs/core-react/text/Subheading2.d.ts.map +1 -1
  165. package/lib/cjs/core-react/text/Title.d.ts +2 -2
  166. package/lib/cjs/core-react/text/Title.d.ts.map +1 -1
  167. package/lib/cjs/core-react/text/Title2.d.ts +2 -2
  168. package/lib/cjs/core-react/text/Title2.d.ts.map +1 -1
  169. package/lib/cjs/core-react/tiles/FeaturedTile.d.ts +2 -2
  170. package/lib/cjs/core-react/tiles/FeaturedTile.d.ts.map +1 -1
  171. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts +2 -2
  172. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts.map +1 -1
  173. package/lib/cjs/core-react/tiles/MinimalTile.d.ts +2 -2
  174. package/lib/cjs/core-react/tiles/MinimalTile.d.ts.map +1 -1
  175. package/lib/cjs/core-react/tiles/Tile.d.ts +1 -1
  176. package/lib/cjs/core-react/tiles/Tile.d.ts.map +1 -1
  177. package/lib/cjs/core-react/tiles/Tile.js.map +1 -1
  178. package/lib/cjs/core-react/toggle/LabeledToggle.d.ts +1 -1
  179. package/lib/cjs/core-react/toggle/LabeledToggle.d.ts.map +1 -1
  180. package/lib/cjs/core-react/toggle/LabeledToggle.js.map +1 -1
  181. package/lib/cjs/core-react/toggle/Toggle.d.ts +1 -1
  182. package/lib/cjs/core-react/toggle/Toggle.d.ts.map +1 -1
  183. package/lib/cjs/core-react/toggle/Toggle.js +3 -1
  184. package/lib/cjs/core-react/toggle/Toggle.js.map +1 -1
  185. package/lib/cjs/core-react/tooltip/Tooltip.d.ts +1 -1
  186. package/lib/cjs/core-react/tooltip/Tooltip.d.ts.map +1 -1
  187. package/lib/cjs/core-react/tree/Branch.d.ts +1 -1
  188. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts +1 -1
  189. package/lib/cjs/core-react/tree/Node.d.ts +1 -1
  190. package/lib/cjs/core-react/tree/Placeholder.d.ts +1 -1
  191. package/lib/cjs/core-react/tree/Tree.d.ts +1 -1
  192. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +3 -3
  193. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  194. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  195. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  196. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  197. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  198. package/lib/esm/core-react/badge/Badge.d.ts +1 -1
  199. package/lib/esm/core-react/badge/Badge.d.ts.map +1 -1
  200. package/lib/esm/core-react/badge/Badge.js.map +1 -1
  201. package/lib/esm/core-react/badge/BetaBadge.d.ts +2 -2
  202. package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
  203. package/lib/esm/core-react/badge/NewBadge.d.ts +2 -2
  204. package/lib/esm/core-react/badge/NewBadge.d.ts.map +1 -1
  205. package/lib/esm/core-react/base/Centered.d.ts +2 -2
  206. package/lib/esm/core-react/base/Centered.d.ts.map +1 -1
  207. package/lib/esm/core-react/base/Div.d.ts +2 -2
  208. package/lib/esm/core-react/base/Div.d.ts.map +1 -1
  209. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +2 -2
  210. package/lib/esm/core-react/base/FillCentered.d.ts +2 -2
  211. package/lib/esm/core-react/base/FillCentered.d.ts.map +1 -1
  212. package/lib/esm/core-react/base/FlexWrapContainer.d.ts +2 -2
  213. package/lib/esm/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  214. package/lib/esm/core-react/base/Gap.d.ts +2 -2
  215. package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
  216. package/lib/esm/core-react/base/ScrollView.d.ts +2 -2
  217. package/lib/esm/core-react/base/ScrollView.d.ts.map +1 -1
  218. package/lib/esm/core-react/button/Button.d.ts +1 -1
  219. package/lib/esm/core-react/button/UnderlinedButton.d.ts +1 -1
  220. package/lib/esm/core-react/button/UnderlinedButton.d.ts.map +1 -1
  221. package/lib/esm/core-react/checkbox/Checkbox.d.ts +1 -1
  222. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +3 -3
  223. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  224. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +1 -1
  225. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  226. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  227. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  228. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  229. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  230. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
  231. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  232. package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  233. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
  234. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  235. package/lib/esm/core-react/contextmenu/ContextSubMenu.js +3 -1
  236. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  237. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts +1 -1
  238. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  239. package/lib/esm/core-react/dialog/Dialog.d.ts +3 -3
  240. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  241. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  242. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +2 -2
  243. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  244. package/lib/esm/core-react/expandable/ExpandableBlock.d.ts +2 -2
  245. package/lib/esm/core-react/expandable/ExpandableBlock.d.ts.map +1 -1
  246. package/lib/esm/core-react/expandable/ExpandableBlock.js.map +1 -1
  247. package/lib/esm/core-react/expandable/ExpandableList.d.ts +1 -1
  248. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  249. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  250. package/lib/esm/core-react/focustrap/FocusTrap.d.ts +1 -1
  251. package/lib/esm/core-react/focustrap/FocusTrap.d.ts.map +1 -1
  252. package/lib/esm/core-react/form/Field.d.ts +1 -1
  253. package/lib/esm/core-react/form/Form.d.ts +1 -1
  254. package/lib/esm/core-react/hocs/withIsPressed.d.ts +2 -2
  255. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts +2 -2
  256. package/lib/esm/core-react/hocs/withTimeout.d.ts +2 -2
  257. package/lib/esm/core-react/icons/IconComponent.d.ts +1 -1
  258. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  259. package/lib/esm/core-react/icons/SvgPath.d.ts +1 -1
  260. package/lib/esm/core-react/icons/SvgSprite.d.ts +1 -1
  261. package/lib/esm/core-react/icons/WebFontIcon.d.ts +1 -1
  262. package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
  263. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +1 -1
  264. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +1 -1
  265. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  266. package/lib/esm/core-react/inputs/Input.d.ts +1 -1
  267. package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
  268. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  269. package/lib/esm/core-react/inputs/InputLabel.d.ts +1 -1
  270. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  271. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  272. package/lib/esm/core-react/inputs/LabeledInput.d.ts +2 -2
  273. package/lib/esm/core-react/inputs/LabeledInput.d.ts.map +1 -1
  274. package/lib/esm/core-react/inputs/LabeledTextarea.d.ts +2 -2
  275. package/lib/esm/core-react/inputs/LabeledTextarea.d.ts.map +1 -1
  276. package/lib/esm/core-react/inputs/Textarea.d.ts +1 -1
  277. package/lib/esm/core-react/inputs/Textarea.d.ts.map +1 -1
  278. package/lib/esm/core-react/inputs/Textarea.js.map +1 -1
  279. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  280. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  281. package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
  282. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +1 -1
  283. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  284. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  285. package/lib/esm/core-react/listbox/Listbox.d.ts +2 -2
  286. package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
  287. package/lib/esm/core-react/loading/LoadingBar.d.ts +1 -1
  288. package/lib/esm/core-react/loading/LoadingPrompt.d.ts +1 -1
  289. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +1 -1
  290. package/lib/esm/core-react/loading/LoadingStatus.d.ts +1 -1
  291. package/lib/esm/core-react/loading/Spinner.d.ts +1 -1
  292. package/lib/esm/core-react/messagebox/MessageBox.d.ts +3 -3
  293. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  294. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  295. package/lib/esm/core-react/notification/MessageRenderer.d.ts +2 -2
  296. package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
  297. package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts +2 -2
  298. package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts.map +1 -1
  299. package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts +1 -1
  300. package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts.map +1 -1
  301. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +2 -2
  302. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  303. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  304. package/lib/esm/core-react/radio/Radio.d.ts +1 -1
  305. package/lib/esm/core-react/radio/Radio.d.ts.map +1 -1
  306. package/lib/esm/core-react/radio/Radio.js.map +1 -1
  307. package/lib/esm/core-react/select/LabeledSelect.d.ts +1 -1
  308. package/lib/esm/core-react/select/LabeledSelect.d.ts.map +1 -1
  309. package/lib/esm/core-react/select/LabeledSelect.js.map +1 -1
  310. package/lib/esm/core-react/select/LabeledThemedSelect.d.ts +2 -2
  311. package/lib/esm/core-react/select/LabeledThemedSelect.d.ts.map +1 -1
  312. package/lib/esm/core-react/select/Select.d.ts +1 -1
  313. package/lib/esm/core-react/select/Select.d.ts.map +1 -1
  314. package/lib/esm/core-react/select/Select.js.map +1 -1
  315. package/lib/esm/core-react/select/ThemedSelect.d.ts +1 -1
  316. package/lib/esm/core-react/select/ThemedSelect.d.ts.map +1 -1
  317. package/lib/esm/core-react/settings/SettingsContainer.d.ts +2 -2
  318. package/lib/esm/core-react/settings/SettingsContainer.d.ts.map +1 -1
  319. package/lib/esm/core-react/settings/SettingsManager.d.ts +3 -3
  320. package/lib/esm/core-react/settings/SettingsManager.d.ts.map +1 -1
  321. package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
  322. package/lib/esm/core-react/slider/Slider.d.ts +1 -1
  323. package/lib/esm/core-react/slider/Slider.d.ts.map +1 -1
  324. package/lib/esm/core-react/splitbutton/SplitButton.d.ts +1 -1
  325. package/lib/esm/core-react/splitbutton/SplitButton.d.ts.map +1 -1
  326. package/lib/esm/core-react/splitbutton/SplitButton.js.map +1 -1
  327. package/lib/esm/core-react/tabs/HorizontalTabs.d.ts +2 -2
  328. package/lib/esm/core-react/tabs/HorizontalTabs.d.ts.map +1 -1
  329. package/lib/esm/core-react/tabs/Tabs.d.ts +4 -4
  330. package/lib/esm/core-react/tabs/Tabs.d.ts.map +1 -1
  331. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  332. package/lib/esm/core-react/tabs/VerticalTabs.d.ts +2 -2
  333. package/lib/esm/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  334. package/lib/esm/core-react/text/BlockText.d.ts +2 -2
  335. package/lib/esm/core-react/text/BlockText.d.ts.map +1 -1
  336. package/lib/esm/core-react/text/BodyText.d.ts +2 -2
  337. package/lib/esm/core-react/text/BodyText.d.ts.map +1 -1
  338. package/lib/esm/core-react/text/DisabledText.d.ts +5 -2
  339. package/lib/esm/core-react/text/DisabledText.d.ts.map +1 -1
  340. package/lib/esm/core-react/text/FilteredText.d.ts +1 -1
  341. package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
  342. package/lib/esm/core-react/text/Headline.d.ts +2 -2
  343. package/lib/esm/core-react/text/Headline.d.ts.map +1 -1
  344. package/lib/esm/core-react/text/LeadingText.d.ts +2 -2
  345. package/lib/esm/core-react/text/LeadingText.d.ts.map +1 -1
  346. package/lib/esm/core-react/text/LeadingText2.d.ts +2 -2
  347. package/lib/esm/core-react/text/LeadingText2.d.ts.map +1 -1
  348. package/lib/esm/core-react/text/MutedText.d.ts +2 -2
  349. package/lib/esm/core-react/text/MutedText.d.ts.map +1 -1
  350. package/lib/esm/core-react/text/SmallText.d.ts +2 -2
  351. package/lib/esm/core-react/text/SmallText.d.ts.map +1 -1
  352. package/lib/esm/core-react/text/StyledText.d.ts +2 -2
  353. package/lib/esm/core-react/text/StyledText.d.ts.map +1 -1
  354. package/lib/esm/core-react/text/Subheading.d.ts +2 -2
  355. package/lib/esm/core-react/text/Subheading.d.ts.map +1 -1
  356. package/lib/esm/core-react/text/Subheading2.d.ts +2 -2
  357. package/lib/esm/core-react/text/Subheading2.d.ts.map +1 -1
  358. package/lib/esm/core-react/text/Title.d.ts +2 -2
  359. package/lib/esm/core-react/text/Title.d.ts.map +1 -1
  360. package/lib/esm/core-react/text/Title2.d.ts +2 -2
  361. package/lib/esm/core-react/text/Title2.d.ts.map +1 -1
  362. package/lib/esm/core-react/tiles/FeaturedTile.d.ts +2 -2
  363. package/lib/esm/core-react/tiles/FeaturedTile.d.ts.map +1 -1
  364. package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts +2 -2
  365. package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts.map +1 -1
  366. package/lib/esm/core-react/tiles/MinimalTile.d.ts +2 -2
  367. package/lib/esm/core-react/tiles/MinimalTile.d.ts.map +1 -1
  368. package/lib/esm/core-react/tiles/Tile.d.ts +1 -1
  369. package/lib/esm/core-react/tiles/Tile.d.ts.map +1 -1
  370. package/lib/esm/core-react/tiles/Tile.js.map +1 -1
  371. package/lib/esm/core-react/toggle/LabeledToggle.d.ts +1 -1
  372. package/lib/esm/core-react/toggle/LabeledToggle.d.ts.map +1 -1
  373. package/lib/esm/core-react/toggle/LabeledToggle.js.map +1 -1
  374. package/lib/esm/core-react/toggle/Toggle.d.ts +1 -1
  375. package/lib/esm/core-react/toggle/Toggle.d.ts.map +1 -1
  376. package/lib/esm/core-react/toggle/Toggle.js +3 -1
  377. package/lib/esm/core-react/toggle/Toggle.js.map +1 -1
  378. package/lib/esm/core-react/tooltip/Tooltip.d.ts +1 -1
  379. package/lib/esm/core-react/tooltip/Tooltip.d.ts.map +1 -1
  380. package/lib/esm/core-react/tree/Branch.d.ts +1 -1
  381. package/lib/esm/core-react/tree/ExpansionToggle.d.ts +1 -1
  382. package/lib/esm/core-react/tree/Node.d.ts +1 -1
  383. package/lib/esm/core-react/tree/Placeholder.d.ts +1 -1
  384. package/lib/esm/core-react/tree/Tree.d.ts +1 -1
  385. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +3 -3
  386. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  387. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  388. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # Change Log - @itwin/core-react
2
2
 
3
- This log was last generated on Tue, 10 Oct 2023 19:58:35 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 20 Nov 2023 18:24:23 GMT and should not be manually modified.
4
+
5
+ ## 3.7.17
6
+ Mon, 20 Nov 2023 18:24:23 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 3.7.16
11
+ Mon, 16 Oct 2023 12:49:08 GMT
12
+
13
+ _Version update only_
4
14
 
5
15
  ## 3.7.15
6
16
  Tue, 10 Oct 2023 19:58:35 GMT
@@ -91,7 +91,7 @@ export declare class AutoSuggest extends React.PureComponent<AutoSuggestProps, A
91
91
  private getLabel;
92
92
  private _handleKeyDown;
93
93
  private _theme;
94
- render(): JSX.Element;
94
+ render(): React.JSX.Element;
95
95
  }
96
96
  export {};
97
97
  //# sourceMappingURL=AutoSuggest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AutoSuggest.d.ts","sourceRoot":"","sources":["../../../../src/core-react/autosuggest/AutoSuggest.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,oBAAY,sBAAsB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,eAAe,EAAE,CAAC;AAE1E;;GAEG;AACH,oBAAY,2BAA2B,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;AAExF;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,WAAW;IAChG,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,OAAO,CAAC,EAAE,eAAe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AA0B,EAAE,0BAA0B,GACtD,CACE,CACP,CAAC;IACJ,CAAC;CACF;AAvMD,kCAuMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module AutoSuggest\r\n */\r\n\r\nimport \"./AutoSuggest.scss\";\r\nimport * as React from \"react\";\r\nimport * as ReactAutosuggest from \"react-autosuggest\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { UiCore } from \"../UiCore\";\r\n\r\n/** Data for the [[AutoSuggest]] options\r\n * @public\r\n */\r\nexport interface AutoSuggestData {\r\n /** Value of [[AutoSuggest]] option. */\r\n value: string;\r\n /** Label of [[AutoSuggest]] option. This is shown in the dropdown. */\r\n label: string;\r\n}\r\n\r\n/** Prototype for function returning AutoSuggestData\r\n * @public\r\n */\r\nexport type GetAutoSuggestDataFunc = (value: string) => AutoSuggestData[];\r\n\r\n/** Prototype for async function returning AutoSuggestData\r\n * @public\r\n */\r\nexport type AsyncGetAutoSuggestDataFunc = (value: string) => Promise<AutoSuggestData[]>;\r\n\r\n/** Properties for the [[AutoSuggest]] component.\r\n * @public\r\n */\r\nexport interface AutoSuggestProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps {\r\n /** Optional input value override. */\r\n value?: string;\r\n /** Options for dropdown. */\r\n options?: AutoSuggestData[] | GetAutoSuggestDataFunc;\r\n /** Asynchronously calculate suggestions for any given input value. */\r\n getSuggestions?: AsyncGetAutoSuggestDataFunc;\r\n /** Gets a label associated with a given value */\r\n getLabel?: (value: string | undefined) => string;\r\n /** Handler for when suggested selected. */\r\n onSuggestionSelected: (selected: AutoSuggestData) => void;\r\n /** Handler for Enter key. */\r\n onPressEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for Escape key. */\r\n onPressEscape?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for Tab key. */\r\n onPressTab?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for input receiving focus. */\r\n onInputFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;\r\n /** Called every time you need to clear suggestions. */\r\n onSuggestionsClearRequested?: () => void;\r\n /** Indicates whether to set focus to the input element */\r\n setFocus?: boolean;\r\n\r\n /** Use it only if you need to customize the rendering of the input.\r\n * @internal\r\n */\r\n renderInputComponent?: any; // ReactAutosuggest.RenderInputComponent<AutoSuggestData>; NOTE: changed to \"any\" because build was failing with RenderInputComponent is not generic?\r\n /** Use it if you want to customize things inside the suggestions container beyond rendering the suggestions themselves.\r\n * @internal\r\n */\r\n renderSuggestionsContainer?: ReactAutosuggest.RenderSuggestionsContainer;\r\n\r\n /** @internal */\r\n alwaysRenderSuggestions?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface AutoSuggestState {\r\n inputValue: string;\r\n suggestions: AutoSuggestData[];\r\n}\r\n\r\n/** Auto Suggest React component. Uses the react-autosuggest component internally.\r\n * @public\r\n */\r\nexport class AutoSuggest extends React.PureComponent<AutoSuggestProps, AutoSuggestState> {\r\n private _isMounted = false;\r\n\r\n constructor(props: AutoSuggestProps) {\r\n super(props);\r\n\r\n // Autosuggest is a controlled component.\r\n // This means that you need to provide an input value\r\n // and an onChange handler that updates this value (see below).\r\n // Suggestions also need to be provided to the Autosuggest,\r\n // and they are initially empty because the Autosuggest is closed.\r\n this.state = {\r\n inputValue: this.getLabel(props.value),\r\n suggestions: [],\r\n };\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._isMounted = true;\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n public override componentDidUpdate(prevProps: AutoSuggestProps) {\r\n if (this.props.value !== prevProps.value || this.props.options !== prevProps.options) {\r\n this.setState((_prevState, props) => ({\r\n inputValue: this.getLabel(props.value),\r\n }));\r\n }\r\n }\r\n\r\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n let newValue = \"\";\r\n\r\n if (e.target.tagName === \"LI\" && e.target.textContent)\r\n newValue = e.target.textContent;\r\n else if (e.target.value)\r\n newValue = e.target.value;\r\n\r\n this.setState({\r\n inputValue: newValue,\r\n });\r\n };\r\n\r\n private _onFocus = (e: React.FocusEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (this.props.onInputFocus)\r\n this.props.onInputFocus(e);\r\n };\r\n\r\n /** Autosuggest will call this function every time you need to update suggestions. */\r\n private _onSuggestionsFetchRequested = async (request: ReactAutosuggest.SuggestionsFetchRequestedParams): Promise<void> => {\r\n const value = request.value;\r\n const suggestions = await this._getSuggestions(value);\r\n\r\n if (this._isMounted)\r\n this.setState({ suggestions });\r\n };\r\n\r\n /** Autosuggest will call this function every time you need to clear suggestions. */\r\n private _onSuggestionsClearRequested = () => {\r\n this.setState({ suggestions: [] });\r\n this.props.onSuggestionsClearRequested && this.props.onSuggestionsClearRequested();\r\n };\r\n\r\n private _onSuggestionSelected = (_event: React.FormEvent<any>, data: ReactAutosuggest.SuggestionSelectedEventData<AutoSuggestData>): void => {\r\n this.props.onSuggestionSelected(data.suggestion);\r\n };\r\n\r\n /** Teach Autosuggest how to calculate suggestions for any given input value. */\r\n private _getSuggestions = async (value: string): Promise<AutoSuggestData[]> => {\r\n if (typeof this.props.options === \"function\")\r\n return Promise.resolve(this.props.options(value));\r\n\r\n if (this.props.getSuggestions)\r\n return this.props.getSuggestions(value);\r\n\r\n if (this.props.options === undefined) {\r\n Logger.logError(UiCore.loggerCategory(this), `props.options or props.getSuggestions should be provided`);\r\n return Promise.resolve([]);\r\n }\r\n\r\n const inputValue = value.trim().toLowerCase();\r\n const inputLength = inputValue.length;\r\n\r\n return Promise.resolve(\r\n inputLength === 0 ?\r\n /* istanbul ignore next */[] :\r\n this.props.options.filter((data: AutoSuggestData) => {\r\n return data.label.toLowerCase().includes(inputValue) || data.value.toLowerCase().includes(inputValue);\r\n })\r\n );\r\n };\r\n\r\n /** When suggestion is clicked, Autosuggest needs to populate the input based on the clicked suggestion. */\r\n private _getSuggestionValue = (suggestion: AutoSuggestData) => suggestion.label;\r\n\r\n /** Render each suggestion. */\r\n private _renderSuggestion = (suggestion: AutoSuggestData) => (\r\n <span>\r\n {suggestion.label}\r\n </span>\r\n );\r\n\r\n private getLabel(value: string | undefined): string {\r\n let label = \"\";\r\n\r\n if (this.props.getLabel) {\r\n label = this.props.getLabel(value);\r\n } else if (this.props.options instanceof Array) {\r\n const entry = this.props.options.find((data: AutoSuggestData) => data.value === value);\r\n if (entry)\r\n label = entry.label;\r\n } else {\r\n Logger.logError(UiCore.loggerCategory(this), `props.getLabel should be provided when props.options is a function`);\r\n }\r\n\r\n return label;\r\n }\r\n\r\n private _handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n switch (e.key) {\r\n case SpecialKey.Enter:\r\n // istanbul ignore else\r\n if (this.props.onPressEnter)\r\n this.props.onPressEnter(e);\r\n break;\r\n case SpecialKey.Escape:\r\n // istanbul ignore else\r\n if (this.props.onPressEscape)\r\n this.props.onPressEscape(e);\r\n break;\r\n case SpecialKey.Tab:\r\n // istanbul ignore else\r\n if (this.props.onPressTab)\r\n this.props.onPressTab(e);\r\n break;\r\n }\r\n };\r\n\r\n private _theme = {\r\n container: \"uicore-autosuggest__container\",\r\n containerOpen: \"uicore-autosuggest__container--open\",\r\n input: \"uicore-autosuggest__input\",\r\n inputOpen: \"uicore-autosuggest__input--open\",\r\n inputFocused: \"uicore-autosuggest__input--focused\",\r\n suggestionsContainer: \"uicore-autosuggest__suggestions-container\",\r\n suggestionsContainerOpen: \"uicore-autosuggest__suggestions-container--open\",\r\n suggestionsList: \"uicore-autosuggest__suggestions-list\",\r\n suggestion: \"uicore-autosuggest__suggestion\",\r\n suggestionFirst: \"uicore-autosuggest__suggestion--first\",\r\n suggestionHighlighted: \"uicore-autosuggest__suggestion--highlighted\",\r\n sectionContainer: \"uicore-autosuggest__section-container\",\r\n sectionContainerFirst: \"uicore-autosuggest__section-container--first\",\r\n sectionTitle: \"uicore-autosuggest__section-title\",\r\n };\r\n\r\n public override render(): JSX.Element {\r\n const { inputValue, suggestions } = this.state;\r\n const { value, onChange, placeholder, options, onSuggestionSelected, setFocus, alwaysRenderSuggestions, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n onPressEnter, onPressEscape, onPressTab, onInputFocus, getLabel, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n getSuggestions, // eslint-disable-line deprecation/deprecation, @typescript-eslint/no-unused-vars\r\n renderInputComponent, renderSuggestionsContainer, onSuggestionsClearRequested, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props;\r\n const inputPlaceholder = (!inputValue) ? placeholder : undefined;\r\n\r\n const inputProps: ReactAutosuggest.InputProps<AutoSuggestData> = {\r\n ...props,\r\n value: inputValue,\r\n onChange: this._onChange,\r\n onFocus: this._onFocus,\r\n placeholder: inputPlaceholder,\r\n autoFocus: setFocus,\r\n };\r\n\r\n return (\r\n // The onKeyDown event handler is only being used to capture bubbled events\r\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\r\n <div className={this.props.className} style={this.props.style} onKeyDown={this._handleKeyDown}>\r\n <ReactAutosuggest\r\n theme={this._theme}\r\n suggestions={suggestions}\r\n onSuggestionsFetchRequested={this._onSuggestionsFetchRequested}\r\n onSuggestionsClearRequested={this._onSuggestionsClearRequested}\r\n getSuggestionValue={this._getSuggestionValue}\r\n renderSuggestion={this._renderSuggestion}\r\n inputProps={inputProps}\r\n onSuggestionSelected={this._onSuggestionSelected}\r\n alwaysRenderSuggestions={alwaysRenderSuggestions}\r\n renderInputComponent={renderInputComponent}\r\n renderSuggestionsContainer={renderSuggestionsContainer}\r\n />\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Aut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,SAAS,EAAE,IAAI,CAAC,cAAc;YAC3F,oBAAC,gBAAgB,IACf,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,WAAW,EAAE,WAAW,EACxB,2BAA2B,EAAE,IAAI,CAAC,4BAA4B,EAC9D,2BAA2B,EAAE,IAAI,CAAC,4BAA4B,EAC9D,kBAAkB,EAAE,IAAI,CAAC,mBAAmB,EAC5C,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,EACxC,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,IAAI,CAAC,qBAAqB,EAChD,uBAAuB,EAAE,uBAAuB,EAChD,oBAAoB,EAAE,oBAAoB,EAC1C,0BAA0B,EAAE,0BAA0B,GACtD,CACE,CACP,CAAC;IACJ,CAAC;CACF;AAvMD,kCAuMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module AutoSuggest\r\n */\r\n\r\nimport \"./AutoSuggest.scss\";\r\nimport * as React from \"react\";\r\nimport * as ReactAutosuggest from \"react-autosuggest\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { UiCore } from \"../UiCore\";\r\n\r\n/** Data for the [[AutoSuggest]] options\r\n * @public\r\n */\r\nexport interface AutoSuggestData {\r\n /** Value of [[AutoSuggest]] option. */\r\n value: string;\r\n /** Label of [[AutoSuggest]] option. This is shown in the dropdown. */\r\n label: string;\r\n}\r\n\r\n/** Prototype for function returning AutoSuggestData\r\n * @public\r\n */\r\nexport type GetAutoSuggestDataFunc = (value: string) => AutoSuggestData[];\r\n\r\n/** Prototype for async function returning AutoSuggestData\r\n * @public\r\n */\r\nexport type AsyncGetAutoSuggestDataFunc = (value: string) => Promise<AutoSuggestData[]>;\r\n\r\n/** Properties for the [[AutoSuggest]] component.\r\n * @public\r\n */\r\nexport interface AutoSuggestProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps {\r\n /** Optional input value override. */\r\n value?: string;\r\n /** Options for dropdown. */\r\n options?: AutoSuggestData[] | GetAutoSuggestDataFunc;\r\n /** Asynchronously calculate suggestions for any given input value. */\r\n getSuggestions?: AsyncGetAutoSuggestDataFunc;\r\n /** Gets a label associated with a given value */\r\n getLabel?: (value: string | undefined) => string;\r\n /** Handler for when suggested selected. */\r\n onSuggestionSelected: (selected: AutoSuggestData) => void;\r\n /** Handler for Enter key. */\r\n onPressEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for Escape key. */\r\n onPressEscape?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for Tab key. */\r\n onPressTab?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for input receiving focus. */\r\n onInputFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;\r\n /** Called every time you need to clear suggestions. */\r\n onSuggestionsClearRequested?: () => void;\r\n /** Indicates whether to set focus to the input element */\r\n setFocus?: boolean;\r\n\r\n /** Use it only if you need to customize the rendering of the input.\r\n * @internal\r\n */\r\n renderInputComponent?: any; // ReactAutosuggest.RenderInputComponent<AutoSuggestData>; NOTE: changed to \"any\" because build was failing with RenderInputComponent is not generic?\r\n /** Use it if you want to customize things inside the suggestions container beyond rendering the suggestions themselves.\r\n * @internal\r\n */\r\n renderSuggestionsContainer?: ReactAutosuggest.RenderSuggestionsContainer;\r\n\r\n /** @internal */\r\n alwaysRenderSuggestions?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface AutoSuggestState {\r\n inputValue: string;\r\n suggestions: AutoSuggestData[];\r\n}\r\n\r\n/** Auto Suggest React component. Uses the react-autosuggest component internally.\r\n * @public\r\n */\r\nexport class AutoSuggest extends React.PureComponent<AutoSuggestProps, AutoSuggestState> {\r\n private _isMounted = false;\r\n\r\n constructor(props: AutoSuggestProps) {\r\n super(props);\r\n\r\n // Autosuggest is a controlled component.\r\n // This means that you need to provide an input value\r\n // and an onChange handler that updates this value (see below).\r\n // Suggestions also need to be provided to the Autosuggest,\r\n // and they are initially empty because the Autosuggest is closed.\r\n this.state = {\r\n inputValue: this.getLabel(props.value),\r\n suggestions: [],\r\n };\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._isMounted = true;\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n public override componentDidUpdate(prevProps: AutoSuggestProps) {\r\n if (this.props.value !== prevProps.value || this.props.options !== prevProps.options) {\r\n this.setState((_prevState, props) => ({\r\n inputValue: this.getLabel(props.value),\r\n }));\r\n }\r\n }\r\n\r\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n let newValue = \"\";\r\n\r\n if (e.target.tagName === \"LI\" && e.target.textContent)\r\n newValue = e.target.textContent;\r\n else if (e.target.value)\r\n newValue = e.target.value;\r\n\r\n this.setState({\r\n inputValue: newValue,\r\n });\r\n };\r\n\r\n private _onFocus = (e: React.FocusEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (this.props.onInputFocus)\r\n this.props.onInputFocus(e);\r\n };\r\n\r\n /** Autosuggest will call this function every time you need to update suggestions. */\r\n private _onSuggestionsFetchRequested = async (request: ReactAutosuggest.SuggestionsFetchRequestedParams): Promise<void> => {\r\n const value = request.value;\r\n const suggestions = await this._getSuggestions(value);\r\n\r\n if (this._isMounted)\r\n this.setState({ suggestions });\r\n };\r\n\r\n /** Autosuggest will call this function every time you need to clear suggestions. */\r\n private _onSuggestionsClearRequested = () => {\r\n this.setState({ suggestions: [] });\r\n this.props.onSuggestionsClearRequested && this.props.onSuggestionsClearRequested();\r\n };\r\n\r\n private _onSuggestionSelected = (_event: React.FormEvent<any>, data: ReactAutosuggest.SuggestionSelectedEventData<AutoSuggestData>): void => {\r\n this.props.onSuggestionSelected(data.suggestion);\r\n };\r\n\r\n /** Teach Autosuggest how to calculate suggestions for any given input value. */\r\n private _getSuggestions = async (value: string): Promise<AutoSuggestData[]> => {\r\n if (typeof this.props.options === \"function\")\r\n return Promise.resolve(this.props.options(value));\r\n\r\n if (this.props.getSuggestions)\r\n return this.props.getSuggestions(value);\r\n\r\n if (this.props.options === undefined) {\r\n Logger.logError(UiCore.loggerCategory(this), `props.options or props.getSuggestions should be provided`);\r\n return Promise.resolve([]);\r\n }\r\n\r\n const inputValue = value.trim().toLowerCase();\r\n const inputLength = inputValue.length;\r\n\r\n return Promise.resolve(\r\n inputLength === 0 ?\r\n /* istanbul ignore next */[] :\r\n this.props.options.filter((data: AutoSuggestData) => {\r\n return data.label.toLowerCase().includes(inputValue) || data.value.toLowerCase().includes(inputValue);\r\n })\r\n );\r\n };\r\n\r\n /** When suggestion is clicked, Autosuggest needs to populate the input based on the clicked suggestion. */\r\n private _getSuggestionValue = (suggestion: AutoSuggestData) => suggestion.label;\r\n\r\n /** Render each suggestion. */\r\n private _renderSuggestion = (suggestion: AutoSuggestData) => (\r\n <span>\r\n {suggestion.label}\r\n </span>\r\n );\r\n\r\n private getLabel(value: string | undefined): string {\r\n let label = \"\";\r\n\r\n if (this.props.getLabel) {\r\n label = this.props.getLabel(value);\r\n } else if (this.props.options instanceof Array) {\r\n const entry = this.props.options.find((data: AutoSuggestData) => data.value === value);\r\n if (entry)\r\n label = entry.label;\r\n } else {\r\n Logger.logError(UiCore.loggerCategory(this), `props.getLabel should be provided when props.options is a function`);\r\n }\r\n\r\n return label;\r\n }\r\n\r\n private _handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n switch (e.key) {\r\n case SpecialKey.Enter:\r\n // istanbul ignore else\r\n if (this.props.onPressEnter)\r\n this.props.onPressEnter(e);\r\n break;\r\n case SpecialKey.Escape:\r\n // istanbul ignore else\r\n if (this.props.onPressEscape)\r\n this.props.onPressEscape(e);\r\n break;\r\n case SpecialKey.Tab:\r\n // istanbul ignore else\r\n if (this.props.onPressTab)\r\n this.props.onPressTab(e);\r\n break;\r\n }\r\n };\r\n\r\n private _theme = {\r\n container: \"uicore-autosuggest__container\",\r\n containerOpen: \"uicore-autosuggest__container--open\",\r\n input: \"uicore-autosuggest__input\",\r\n inputOpen: \"uicore-autosuggest__input--open\",\r\n inputFocused: \"uicore-autosuggest__input--focused\",\r\n suggestionsContainer: \"uicore-autosuggest__suggestions-container\",\r\n suggestionsContainerOpen: \"uicore-autosuggest__suggestions-container--open\",\r\n suggestionsList: \"uicore-autosuggest__suggestions-list\",\r\n suggestion: \"uicore-autosuggest__suggestion\",\r\n suggestionFirst: \"uicore-autosuggest__suggestion--first\",\r\n suggestionHighlighted: \"uicore-autosuggest__suggestion--highlighted\",\r\n sectionContainer: \"uicore-autosuggest__section-container\",\r\n sectionContainerFirst: \"uicore-autosuggest__section-container--first\",\r\n sectionTitle: \"uicore-autosuggest__section-title\",\r\n };\r\n\r\n public override render(): React.JSX.Element {\r\n const { inputValue, suggestions } = this.state;\r\n const { value, onChange, placeholder, options, onSuggestionSelected, setFocus, alwaysRenderSuggestions, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n onPressEnter, onPressEscape, onPressTab, onInputFocus, getLabel, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n getSuggestions, // eslint-disable-line deprecation/deprecation, @typescript-eslint/no-unused-vars\r\n renderInputComponent, renderSuggestionsContainer, onSuggestionsClearRequested, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props;\r\n const inputPlaceholder = (!inputValue) ? placeholder : undefined;\r\n\r\n const inputProps: ReactAutosuggest.InputProps<AutoSuggestData> = {\r\n ...props,\r\n value: inputValue,\r\n onChange: this._onChange,\r\n onFocus: this._onFocus,\r\n placeholder: inputPlaceholder,\r\n autoFocus: setFocus,\r\n };\r\n\r\n return (\r\n // The onKeyDown event handler is only being used to capture bubbled events\r\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\r\n <div className={this.props.className} style={this.props.style} onKeyDown={this._handleKeyDown}>\r\n <ReactAutosuggest\r\n theme={this._theme}\r\n suggestions={suggestions}\r\n onSuggestionsFetchRequested={this._onSuggestionsFetchRequested}\r\n onSuggestionsClearRequested={this._onSuggestionsClearRequested}\r\n getSuggestionValue={this._getSuggestionValue}\r\n renderSuggestion={this._renderSuggestion}\r\n inputProps={inputProps}\r\n onSuggestionSelected={this._onSuggestionSelected}\r\n alwaysRenderSuggestions={alwaysRenderSuggestions}\r\n renderInputComponent={renderInputComponent}\r\n renderSuggestionsContainer={renderSuggestionsContainer}\r\n />\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
@@ -14,6 +14,6 @@ export interface BadgeProps extends CommonProps {
14
14
  * @internal
15
15
  */
16
16
  export declare class Badge extends React.PureComponent<BadgeProps> {
17
- render(): JSX.Element;
17
+ render(): React.JSX.Element;
18
18
  }
19
19
  //# sourceMappingURL=Badge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/Badge.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,GAAG,EAAE,GAAG,CAAC;CACV;AAED;;GAEG;AACH,qBAAa,KAAM,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IACxC,MAAM,IAAI,GAAG,CAAC,OAAO;CAQtC"}
1
+ {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/Badge.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,GAAG,EAAE,GAAG,CAAC;CACV;AAED;;GAEG;AACH,qBAAa,KAAM,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IACxC,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO;CAQ5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../../src/core-react/badge/Badge.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wBAAsB;AACtB,2CAAoC;AACpC,+BAA+B;AAE/B,0DAA0D;AAC1D,0DAA8C;AAS9C;;GAEG;AACH,MAAa,KAAM,SAAQ,KAAK,CAAC,aAAyB;IACxC,MAAM;QACpB,MAAM,QAAQ,GAAG,kCAAiB,CAAC,0BAA0B,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9E,OAAO,CACL,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;YACrF,oBAAC,oBAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACxB,CACP,CAAC;IACJ,CAAC;CACF;AATD,sBASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport \"./Badge.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { IconSpecUtilities } from \"@itwin/appui-abstract\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\n\r\n/** Properties for the [[Badge]] React component\r\n * @internal\r\n */\r\nexport interface BadgeProps extends CommonProps {\r\n svg: any;\r\n}\r\n\r\n/** Beta Badge React component\r\n * @internal\r\n */\r\nexport class Badge extends React.PureComponent<BadgeProps> {\r\n public override render(): JSX.Element {\r\n const iconSpec = IconSpecUtilities.createWebComponentIconSpec(this.props.svg);\r\n return (\r\n <div className={classnames(\"core-badge\", this.props.className)} style={this.props.style}>\r\n <Icon iconSpec={iconSpec} />\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../../src/core-react/badge/Badge.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wBAAsB;AACtB,2CAAoC;AACpC,+BAA+B;AAE/B,0DAA0D;AAC1D,0DAA8C;AAS9C;;GAEG;AACH,MAAa,KAAM,SAAQ,KAAK,CAAC,aAAyB;IACxC,MAAM;QACpB,MAAM,QAAQ,GAAG,kCAAiB,CAAC,0BAA0B,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9E,OAAO,CACL,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;YACrF,oBAAC,oBAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACxB,CACP,CAAC;IACJ,CAAC;CACF;AATD,sBASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport \"./Badge.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { IconSpecUtilities } from \"@itwin/appui-abstract\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\n\r\n/** Properties for the [[Badge]] React component\r\n * @internal\r\n */\r\nexport interface BadgeProps extends CommonProps {\r\n svg: any;\r\n}\r\n\r\n/** Beta Badge React component\r\n * @internal\r\n */\r\nexport class Badge extends React.PureComponent<BadgeProps> {\r\n public override render(): React.JSX.Element {\r\n const iconSpec = IconSpecUtilities.createWebComponentIconSpec(this.props.svg);\r\n return (\r\n <div className={classnames(\"core-badge\", this.props.className)} style={this.props.style}>\r\n <Icon iconSpec={iconSpec} />\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
@@ -1,11 +1,11 @@
1
1
  /** @packageDocumentation
2
2
  * @module Utilities
3
3
  */
4
- /// <reference types="react" />
5
4
  import "./BetaBadge.scss";
5
+ import * as React from "react";
6
6
  import { CommonProps } from "../utils/Props";
7
7
  /** Beta Badge React component
8
8
  * @internal
9
9
  */
10
- export declare function BetaBadge(props: CommonProps): JSX.Element;
10
+ export declare function BetaBadge(props: CommonProps): React.JSX.Element;
11
11
  //# sourceMappingURL=BetaBadge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BetaBadge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/BetaBadge.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,eAS3C"}
1
+ {"version":3,"file":"BetaBadge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/BetaBadge.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,qBAS3C"}
@@ -1,11 +1,11 @@
1
1
  /** @packageDocumentation
2
2
  * @module Utilities
3
3
  */
4
- /// <reference types="react" />
5
4
  import "./NewBadge.scss";
5
+ import * as React from "react";
6
6
  import { CommonProps } from "../utils/Props";
7
7
  /** New Badge React component
8
8
  * @internal
9
9
  */
10
- export declare function NewBadge(props: CommonProps): JSX.Element;
10
+ export declare function NewBadge(props: CommonProps): React.JSX.Element;
11
11
  //# sourceMappingURL=NewBadge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NewBadge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/NewBadge.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,iBAAiB,CAAC;AAGzB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW,eAG1C"}
1
+ {"version":3,"file":"NewBadge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/NewBadge.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,iBAAiB,CAAC;AAEzB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW,qBAG1C"}
@@ -1,11 +1,11 @@
1
1
  /** @packageDocumentation
2
2
  * @module Base
3
3
  */
4
- /// <reference types="react" />
4
+ import * as React from "react";
5
5
  import { CommonDivProps } from "../utils/Props";
6
6
  /** Centered React functional component.
7
7
  * Displays content centered vertically and horizontally.
8
8
  * @public
9
9
  */
10
- export declare function Centered(props: CommonDivProps): JSX.Element;
10
+ export declare function Centered(props: CommonDivProps): React.JSX.Element;
11
11
  //# sourceMappingURL=Centered.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Centered.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/Centered.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,cAAc,eAE7C"}
1
+ {"version":3,"file":"Centered.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/Centered.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,cAAc,qBAE7C"}
@@ -1,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module Base
3
3
  */
4
- /// <reference types="react" />
4
+ import * as React from "react";
5
5
  import { CommonDivProps } from "../utils/Props";
6
6
  /** Properties for the [[Div]] component
7
7
  * @public
@@ -13,5 +13,5 @@ export interface DivProps extends CommonDivProps {
13
13
  /** Base div element React component
14
14
  * @public
15
15
  */
16
- export declare function Div(props: DivProps): JSX.Element;
16
+ export declare function Div(props: DivProps): React.JSX.Element;
17
17
  //# sourceMappingURL=Div.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Div.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/Div.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,cAAc;IAC9C,0BAA0B;IAC1B,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,eAQlC"}
1
+ {"version":3,"file":"Div.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/Div.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,cAAc;IAC9C,0BAA0B;IAC1B,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,qBAQlC"}
@@ -19,7 +19,7 @@ export declare const DivWithOutsideClick: {
19
19
  getParentDocument(): Document;
20
20
  componentDidMount(): void;
21
21
  componentWillUnmount(): void;
22
- render(): JSX.Element;
22
+ render(): React.JSX.Element;
23
23
  context: any;
24
24
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick").WithOnOutsideClickProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
25
25
  forceUpdate(callback?: (() => void) | undefined): void;
@@ -53,7 +53,7 @@ export declare const DivWithOutsideClick: {
53
53
  getParentDocument(): Document;
54
54
  componentDidMount(): void;
55
55
  componentWillUnmount(): void;
56
- render(): JSX.Element;
56
+ render(): React.JSX.Element;
57
57
  context: any;
58
58
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick").WithOnOutsideClickProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
59
59
  forceUpdate(callback?: (() => void) | undefined): void;
@@ -1,11 +1,11 @@
1
1
  /** @packageDocumentation
2
2
  * @module Base
3
3
  */
4
- /// <reference types="react" />
4
+ import * as React from "react";
5
5
  import { CommonDivProps } from "../utils/Props";
6
6
  /** Full height & width and centered React functional component.
7
7
  * Displays content centered vertically and horizontally and has a height and width of 100%.
8
8
  * @public
9
9
  */
10
- export declare function FillCentered(props: CommonDivProps): JSX.Element;
10
+ export declare function FillCentered(props: CommonDivProps): React.JSX.Element;
11
11
  //# sourceMappingURL=FillCentered.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FillCentered.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/FillCentered.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,eAEjD"}
1
+ {"version":3,"file":"FillCentered.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/FillCentered.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,qBAEjD"}
@@ -1,12 +1,12 @@
1
1
  /** @packageDocumentation
2
2
  * @module Base
3
3
  */
4
- /// <reference types="react" />
4
+ import * as React from "react";
5
5
  import { CommonDivProps } from "../utils/Props";
6
6
  /** Flex Wrap Container React functional component.
7
7
  * Wraps content onto multiple lines and
8
8
  * has the 'display: flex' and 'flex-wrap: wrap' CSS properties.
9
9
  * @public
10
10
  */
11
- export declare function FlexWrapContainer(props: CommonDivProps): JSX.Element;
11
+ export declare function FlexWrapContainer(props: CommonDivProps): React.JSX.Element;
12
12
  //# sourceMappingURL=FlexWrapContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlexWrapContainer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/FlexWrapContainer.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,eAEtD"}
1
+ {"version":3,"file":"FlexWrapContainer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/FlexWrapContainer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,qBAEtD"}
@@ -1,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module Base
3
3
  */
4
- /// <reference types="react" />
4
+ import * as React from "react";
5
5
  import { CommonProps } from "../utils/Props";
6
6
  /** Properties for the [[Gap]] component.
7
7
  * @public
@@ -12,5 +12,5 @@ export interface GapProps extends CommonProps {
12
12
  /** Horizontal gap or space React component. Defaults to 10px.
13
13
  * @public
14
14
  */
15
- export declare function Gap(props: GapProps): JSX.Element;
15
+ export declare function Gap(props: GapProps): React.JSX.Element;
16
16
  //# sourceMappingURL=Gap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Gap.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/Gap.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,WAAW;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,eAOlC"}
1
+ {"version":3,"file":"Gap.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/Gap.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,WAAW;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,qBAOlC"}
@@ -1,12 +1,12 @@
1
1
  /** @packageDocumentation
2
2
  * @module Base
3
3
  */
4
- /// <reference types="react" />
4
+ import * as React from "react";
5
5
  import { CommonDivProps } from "../utils/Props";
6
6
  /** Scroll View React functional component.
7
7
  * Scrolls content vertically and
8
8
  * has the 'overflow-y: auto' CSS property and has a height and width of 100%.
9
9
  * @public
10
10
  */
11
- export declare function ScrollView(props: CommonDivProps): JSX.Element;
11
+ export declare function ScrollView(props: CommonDivProps): React.JSX.Element;
12
12
  //# sourceMappingURL=ScrollView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/ScrollView.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,eAE/C"}
1
+ {"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/ScrollView.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,qBAE/C"}
@@ -41,7 +41,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
41
41
  */
42
42
  export declare class Button extends React.PureComponent<ButtonProps> {
43
43
  private getIuiButtonType;
44
- render(): JSX.Element;
44
+ render(): React.JSX.Element;
45
45
  }
46
46
  /** @internal */
47
47
  export declare function getButtonTypeClassName(buttonType?: ButtonType): string;
@@ -21,5 +21,5 @@ export interface UnderlinedButtonProps {
21
21
  /** A React component that makes text clickable and underlined
22
22
  * @public
23
23
  */
24
- export declare function UnderlinedButton(props: UnderlinedButtonProps): JSX.Element;
24
+ export declare function UnderlinedButton(props: UnderlinedButtonProps): React.JSX.Element;
25
25
  //# sourceMappingURL=UnderlinedButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UnderlinedButton.d.ts","sourceRoot":"","sources":["../../../../src/core-react/button/UnderlinedButton.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,yBAAyB,CAAC;AAEjC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,iDAAiD;IACjD,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACnC,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACxC,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,eAkC5D"}
1
+ {"version":3,"file":"UnderlinedButton.d.ts","sourceRoot":"","sources":["../../../../src/core-react/button/UnderlinedButton.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,yBAAyB,CAAC;AAEjC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,iDAAiD;IACjD,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACnC,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACxC,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,qBAkC5D"}
@@ -52,6 +52,6 @@ export declare class Checkbox extends React.PureComponent<CheckboxProps> {
52
52
  componentDidMount(): void;
53
53
  /** @internal */
54
54
  componentDidUpdate(_prevProps: CheckboxProps): void;
55
- render(): JSX.Element;
55
+ render(): React.JSX.Element;
56
56
  }
57
57
  //# sourceMappingURL=Checkbox.d.ts.map
@@ -23,16 +23,16 @@ export interface CheckListBoxItemProps extends CommonProps {
23
23
  * @public
24
24
  */
25
25
  export declare class CheckListBoxItem extends React.PureComponent<CheckListBoxItemProps> {
26
- render(): JSX.Element;
26
+ render(): React.JSX.Element;
27
27
  }
28
28
  /** Separator added to a [[CheckListBox]].
29
29
  * @public
30
30
  */
31
- export declare function CheckListBoxSeparator(): JSX.Element;
31
+ export declare function CheckListBoxSeparator(): React.JSX.Element;
32
32
  /** React component showing a list of Checkbox items.
33
33
  * @public
34
34
  */
35
35
  export declare class CheckListBox extends React.PureComponent<CommonProps> {
36
- render(): JSX.Element;
36
+ render(): React.JSX.Element;
37
37
  }
38
38
  //# sourceMappingURL=CheckListBox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckListBox.d.ts","sourceRoot":"","sources":["../../../../src/core-react/checklistbox/CheckListBox.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAE7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,YAAY;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC;IACpB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,GAAG,CAAC;CAC5D;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC;IAC9D,MAAM;CAWvB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,gBAIpC;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC;IAChD,MAAM;CAQvB"}
1
+ {"version":3,"file":"CheckListBox.d.ts","sourceRoot":"","sources":["../../../../src/core-react/checklistbox/CheckListBox.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAE7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,YAAY;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC;IACpB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,GAAG,CAAC;CAC5D;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC;IAC9D,MAAM;CAWvB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,sBAIpC;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC;IAChD,MAAM;CAQvB"}
@@ -68,7 +68,7 @@ export declare class ContextMenu extends React.PureComponent<ContextMenuProps, C
68
68
  static autoFlip: (dir: ContextMenuDirection, rect: DOMRectReadOnly, windowWidth: number, windowHeight: number) => ContextMenuDirection;
69
69
  private _handleHotKeyParsed;
70
70
  private _handleOnOutsideClick;
71
- render(): JSX.Element;
71
+ render(): React.JSX.Element;
72
72
  /** @internal */
73
73
  static getCSSClassNameFromDirection: (direction?: ContextMenuDirection | undefined) => string;
74
74
  private _injectMenuItemProps;
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenu.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AAEvE;;IAEI;AACJ,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,+CAA+C;IAC/C,MAAM,EAAE,OAAO,CAAC;IAChB,gFAAgF;IAChF,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,uDAAuD;IACvD,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAC;IAC5C,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;IAC/B,oCAAoC;IACpC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gFAAgF;IAChF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oDAAoD;IACpD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0IAA0I;IAC1I,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB;IAChB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,gBAAgB;IAChB,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B,gBAAgB;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC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oB,CAAC,OAAO;YAC/B,SAAS,GAAG,8CAA8C,CAAC;YAC3D,MAAM;QACR,KAAK,2CAAoB,CAAC,GAAG;YAC3B,SAAS,GAAG,uBAAuB,CAAC;YACpC,MAAM;QACR,KAAK,2CAAoB,CAAC,QAAQ;YAChC,SAAS,GAAG,+CAA+C,CAAC;YAC5D,MAAM;QACR,KAAK,2CAAoB,CAAC,IAAI;YAC5B,SAAS,GAAG,wBAAwB,CAAC;YACrC,MAAM;QACR,KAAK,2CAAoB,CAAC,MAAM;YAC9B,SAAS,GAAG,0BAA0B,CAAC;YACvC,MAAM;QACR,KAAK,2CAAoB,CAAC,KAAK;YAC7B,SAAS,GAAG,yBAAyB,CAAC;YACtC,MAAM;QACR,KAAK,2CAAoB,CAAC,UAAU;YAClC,SAAS,GAAG,iDAAiD,CAAC;YAC9D,MAAM;QACR,KAAK,2CAAoB,CAAC,MAAM;YAC9B,SAAS,GAAG,0BAA0B,CAAC;YACvC,MAAM;QACR,KAAK,2CAAoB,CAAC,WAAW;YACnC,SAAS,GAAG,kDAAkD,CAAC;YAC/D,MAAM;KACT;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport \"./ContextMenu.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ConditionalBooleanValue, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { DivWithOutsideClick } from \"../base/DivWithOutsideClick\";\r\nimport { ContextMenuDirection } from \"./ContextMenuDirection\";\r\nimport { ContextMenuItem, ContextMenuItemProps } from \"./ContextMenuItem\";\r\nimport { ContextSubMenu, ContextSubMenuProps } from \"./ContextSubMenu\";\r\n\r\n/** Properties for the [[ContextMenu]] component\r\n * @public\r\n */\r\nexport interface ContextMenuProps extends CommonProps {\r\n /** Whether ContextMenu is currently opened. */\r\n opened: boolean;\r\n /** Which direction the menu opens. Default: ContextMenuDirection.BottomRight */\r\n direction?: ContextMenuDirection;\r\n /** When click is registered outside of ContextMenu. */\r\n onOutsideClick?: (event: MouseEvent) => any;\r\n /** When list item or submenu is selected */\r\n onSelect?: (event: any) => any;\r\n /** when Escape button is pressed */\r\n onEsc?: (data: any) => any;\r\n /** Whether menu flips directions based on screen edge. Default: true */\r\n autoflip?: boolean;\r\n /** Whether menu hugs screen edge when autoflip is off. Default: true */\r\n edgeLimit?: boolean;\r\n /** Whether Hotkey press selects item, or just highlights item. Default: true */\r\n hotkeySelect?: boolean;\r\n /** starting menu item selected index Default: -1 */\r\n selectedIndex?: number;\r\n /** whether menu floats on the viewport, or the page. When false, container elements can clip menu with overflow: hidden; Default: true */\r\n floating?: boolean;\r\n /** @internal */\r\n parentMenu?: ContextMenu;\r\n /** @internal */\r\n parentSubmenu?: ContextSubMenu;\r\n /** @internal */\r\n ignoreNextKeyUp?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextMenuState {\r\n selectedIndex: number;\r\n direction: ContextMenuDirection;\r\n ignoreNextKeyUp: boolean;\r\n}\r\n\r\n/**\r\n * A context menu populated with [[ContextMenuItem]] components.\r\n * Can be nested using [[ContextSubMenu]] component.\r\n * @public\r\n */\r\nexport class ContextMenu extends React.PureComponent<ContextMenuProps, ContextMenuState> {\r\n private _rootElement: HTMLElement | null = null;\r\n private _menuElement: HTMLElement | null = null;\r\n private _selectedElement: ContextMenuItem | ContextSubMenu | null = null;\r\n private _length: number = 0;\r\n private _hotKeyMap: Map<number, string> = new Map();\r\n\r\n private _lastChildren: React.ReactNode;\r\n private _lastDirection: ContextMenuDirection | undefined = ContextMenuDirection.BottomRight;\r\n private _lastSelectedIndex: number = 0;\r\n private _injectedChildren: React.ReactNode;\r\n private _parentWindowHeight: number = 0;\r\n private _parentWindowWidth: number = 0;\r\n\r\n public static defaultProps: Partial<ContextMenuProps> = {\r\n direction: ContextMenuDirection.BottomRight,\r\n autoflip: true,\r\n edgeLimit: true,\r\n hotkeySelect: true,\r\n selectedIndex: -1,\r\n floating: true,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContextMenuState>;\r\n constructor(props: ContextMenuProps) {\r\n super(props);\r\n this.state = {\r\n selectedIndex: this.props.selectedIndex!,\r\n direction: props.direction!,\r\n ignoreNextKeyUp: props.ignoreNextKeyUp!,\r\n };\r\n }\r\n\r\n /** @internal */\r\n public static autoFlip = (dir: ContextMenuDirection, rect: DOMRectReadOnly, windowWidth: number, windowHeight: number): ContextMenuDirection => {\r\n if (rect.right > windowWidth) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopRight:\r\n dir = ContextMenuDirection.TopLeft;\r\n break;\r\n case ContextMenuDirection.Right:\r\n dir = ContextMenuDirection.Left;\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n dir = ContextMenuDirection.BottomLeft;\r\n break;\r\n }\r\n }\r\n if (rect.left < 0) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopLeft:\r\n dir = ContextMenuDirection.TopRight;\r\n break;\r\n case ContextMenuDirection.Left:\r\n dir = ContextMenuDirection.Right;\r\n break;\r\n case ContextMenuDirection.BottomLeft:\r\n dir = ContextMenuDirection.BottomRight;\r\n break;\r\n }\r\n }\r\n if (rect.bottom > windowHeight) {\r\n switch (dir) {\r\n case ContextMenuDirection.BottomLeft:\r\n dir = ContextMenuDirection.TopLeft;\r\n break;\r\n case ContextMenuDirection.Bottom:\r\n dir = ContextMenuDirection.Top;\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n dir = ContextMenuDirection.TopRight;\r\n break;\r\n }\r\n }\r\n if (rect.top < 0) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopLeft:\r\n dir = ContextMenuDirection.BottomLeft;\r\n break;\r\n case ContextMenuDirection.Top:\r\n dir = ContextMenuDirection.Bottom;\r\n break;\r\n case ContextMenuDirection.TopRight:\r\n dir = ContextMenuDirection.BottomRight;\r\n break;\r\n }\r\n }\r\n return dir;\r\n };\r\n\r\n private _handleHotKeyParsed = (index: number, hotKey: string) => {\r\n this._hotKeyMap.set(index, hotKey);\r\n };\r\n\r\n // istanbul ignore next\r\n private _handleOnOutsideClick = (event: MouseEvent): void => {\r\n if (this.props.opened && this.props.onOutsideClick)\r\n this.props.onOutsideClick(event);\r\n };\r\n\r\n public override render(): JSX.Element {\r\n const {\r\n opened, direction, onOutsideClick, onSelect, onEsc, autoflip, edgeLimit, hotkeySelect, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n selectedIndex, floating, parentMenu, parentSubmenu, children, className, ignoreNextKeyUp, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props;\r\n const renderDirection = parentMenu === undefined ? this.state.direction : direction;\r\n\r\n if (this._lastChildren !== children || this._lastDirection !== renderDirection || this._lastSelectedIndex !== this.state.selectedIndex) {\r\n this._injectedChildren = this._injectMenuItemProps(children, renderDirection, this.state.selectedIndex);\r\n this._lastChildren = children;\r\n this._lastDirection = renderDirection;\r\n this._lastSelectedIndex = this.state.selectedIndex;\r\n }\r\n\r\n const classNames = classnames(\"core-context-menu\", className);\r\n\r\n return (\r\n <div\r\n role=\"presentation\"\r\n className={classNames}\r\n onKeyUp={this._handleKeyUp}\r\n onClick={this._handleClick}\r\n data-testid=\"core-context-menu-root\"\r\n {...props}\r\n ref={this._rootRef}>\r\n <DivWithOutsideClick onOutsideClick={this._handleOnOutsideClick}>\r\n <div\r\n ref={this._menuRef}\r\n role=\"menu\"\r\n tabIndex={0}\r\n data-testid=\"core-context-menu-container\"\r\n className={classnames(\"core-context-menu-container\",\r\n opened && \"core-context-menu-opened\",\r\n floating && \"core-context-menu-floating\",\r\n ContextMenu.getCSSClassNameFromDirection(renderDirection),\r\n )}>\r\n {this._injectedChildren}\r\n </div>\r\n </DivWithOutsideClick>\r\n </div>\r\n );\r\n }\r\n\r\n /** @internal */\r\n public static getCSSClassNameFromDirection = (direction?: ContextMenuDirection): string => {\r\n let className = \"\";\r\n\r\n // istanbul ignore next\r\n if (direction === undefined)\r\n direction = ContextMenuDirection.BottomRight;\r\n\r\n if (direction === ContextMenuDirection.None)\r\n return \"\";\r\n\r\n switch (direction) {\r\n case ContextMenuDirection.TopLeft:\r\n className = \"core-context-menu-top core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Top:\r\n className = \"core-context-menu-top\";\r\n break;\r\n case ContextMenuDirection.TopRight:\r\n className = \"core-context-menu-top core-context-menu-right\";\r\n break;\r\n case ContextMenuDirection.Left:\r\n className = \"core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Center:\r\n className = \"core-context-menu-center\";\r\n break;\r\n case ContextMenuDirection.Right:\r\n className = \"core-context-menu-right\";\r\n break;\r\n case ContextMenuDirection.BottomLeft:\r\n className = \"core-context-menu-bottom core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Bottom:\r\n className = \"core-context-menu-bottom\";\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n className = \"core-context-menu-bottom core-context-menu-right\";\r\n break;\r\n }\r\n\r\n return className;\r\n };\r\n\r\n private _injectMenuItemProps = (children: React.ReactNode, direction: ContextMenuDirection | undefined, selectedIndex: number) => {\r\n let index = 0;\r\n // add inheritance data to submenu children\r\n const ch = React.Children.map(children, (child: React.ReactNode) => {\r\n // Capture only ContextSubMenus and ContextMenuItems.\r\n if (child && typeof child === \"object\" && \"props\" in child && (child.type === ContextSubMenu || child.type === ContextMenuItem) &&\r\n !ConditionalBooleanValue.getValue(child.props.disabled) && !ConditionalBooleanValue.getValue(child.props.hidden)) {\r\n const id = index; // get separate id variable so value stays the same when onHover is called later.\r\n const onHover = () => {\r\n this.setState({ selectedIndex: id });\r\n this.focus();\r\n };\r\n const ref = (el: ContextSubMenu | ContextMenuItem | null) => {\r\n if (selectedIndex === id) // only save to this._selectedElement if previously captured bool is true\r\n this._selectedElement = el;\r\n };\r\n const boundHandleHotKeyParse = this._handleHotKeyParsed.bind(this, id); // bind local callback for specific index\r\n const childProps: Partial<ContextSubMenuProps & ContextMenuItemProps & { ref: typeof ref }> = {\r\n parentMenu: this,\r\n ref,\r\n onHover,\r\n isSelected: selectedIndex === id,\r\n onHotKeyParsed: boundHandleHotKeyParse,\r\n };\r\n if (child.type === ContextSubMenu) { // add direction only to sub-menus\r\n childProps.direction = child.props.direction || /* istanbul ignore next */ direction;\r\n }\r\n index++;\r\n return React.cloneElement(child, childProps);\r\n } else return child; // Else, pass through unmodified\r\n });\r\n this._length = index;\r\n return ch;\r\n };\r\n\r\n private _rootRef = (el: HTMLDivElement | null) => {\r\n this._rootElement = el;\r\n };\r\n\r\n private _menuRef = (el: HTMLDivElement | null) => {\r\n this._menuElement = el;\r\n };\r\n\r\n private getWindow() {\r\n const el = this._rootElement ? this._rootElement : /* istanbul ignore next */ this._menuElement;\r\n const parentDocument = el!.ownerDocument;\r\n // istanbul ignore next\r\n return parentDocument.defaultView ?? window;\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n const parentWindow = this.getWindow();\r\n parentWindow.addEventListener(\"focus\", this._handleFocusChange);\r\n parentWindow.addEventListener(\"mouseup\", this._handleFocusChange);\r\n\r\n this.checkRenderDirection();\r\n\r\n if (this.props.opened)\r\n this.focus();\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n const parentWindow = this.getWindow();\r\n parentWindow.removeEventListener(\"focus\", this._handleFocusChange);\r\n parentWindow.removeEventListener(\"mouseup\", this._handleFocusChange);\r\n }\r\n\r\n private checkRenderDirection() {\r\n const { direction, autoflip, parentMenu } = this.props;\r\n const parentWindow = this.getWindow();\r\n\r\n let renderDirection = parentMenu === undefined ? this.state.direction : direction;\r\n\r\n if (parentWindow.innerHeight === this._parentWindowHeight && parentWindow.innerWidth === this._parentWindowWidth)\r\n return;\r\n this._parentWindowHeight = parentWindow.innerHeight;\r\n this._parentWindowWidth = parentWindow.innerWidth;\r\n\r\n // check if menu should flip\r\n if (parentWindow && autoflip && parentMenu === undefined) {\r\n const menuRect = this.getRect();\r\n renderDirection = ContextMenu.autoFlip(renderDirection!, menuRect, parentWindow.innerWidth, parentWindow.innerHeight);\r\n // istanbul ignore next\r\n if (renderDirection !== this.state.direction)\r\n this.setState({ direction: renderDirection });\r\n }\r\n }\r\n\r\n public focus = () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.focus();\r\n };\r\n\r\n public blur = () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.blur();\r\n };\r\n\r\n public getRect = (): DOMRect => {\r\n let clientRect = DOMRect.fromRect({ x: 0, y: 0, width: 0, height: 0});\r\n\r\n // istanbul ignore else\r\n if (this._menuElement) {\r\n clientRect = this._menuElement.getBoundingClientRect();\r\n }\r\n return clientRect;\r\n };\r\n\r\n private _handleFocusChange = (event: any): void => {\r\n // istanbul ignore else\r\n if (this._rootElement && this.props.opened && event.target instanceof Node && this.props.onOutsideClick && !this._rootElement.contains(event.target))\r\n this.props.onOutsideClick(event);\r\n };\r\n\r\n private _handleClick = (event: React.MouseEvent<HTMLDivElement>): void => {\r\n if (this.props.onSelect)\r\n this.props.onSelect(event);\r\n };\r\n\r\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>): void => {\r\n if (this.state.ignoreNextKeyUp) {\r\n this.setState({ ignoreNextKeyUp: false });\r\n return;\r\n }\r\n\r\n // istanbul ignore else\r\n if (event.key) {\r\n for (const [key, value] of this._hotKeyMap) {\r\n if (!this.props.hotkeySelect! && key > this.state.selectedIndex) { // Start search at current index.\r\n if (event.key.toUpperCase() === value) {\r\n this.setState({ selectedIndex: key });\r\n return;\r\n }\r\n }\r\n }\r\n for (const [key, value] of this._hotKeyMap) {\r\n if (event.key.toUpperCase() === value) {\r\n this.setState({ selectedIndex: key }, () => {\r\n if (this.props.hotkeySelect && this._selectedElement) {\r\n this._selectedElement.select();\r\n }\r\n });\r\n event.stopPropagation();\r\n return;\r\n }\r\n }\r\n }\r\n\r\n if (event.key === SpecialKey.ArrowLeft) {\r\n event.stopPropagation();\r\n if (this.props.parentMenu && this.props.parentSubmenu) {\r\n this.props.parentSubmenu.close();\r\n this.props.parentMenu.focus();\r\n }\r\n if (this.props.onEsc)\r\n this.props.onEsc(event);\r\n }\r\n\r\n if (event.key === SpecialKey.Escape) {\r\n // istanbul ignore else\r\n if (this.props.onEsc)\r\n this.props.onEsc(event);\r\n }\r\n\r\n if ((event.key === SpecialKey.Enter || event.key === SpecialKey.ArrowRight) && this._selectedElement) {\r\n event.stopPropagation();\r\n\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.Enter || /* istanbul ignore next */ this._selectedElement instanceof ContextSubMenu) {\r\n // istanbul ignore else\r\n if (this._selectedElement.select)\r\n this._selectedElement.select();\r\n }\r\n }\r\n\r\n let { selectedIndex } = this.state;\r\n if (event.key === SpecialKey.ArrowUp || event.key === SpecialKey.ArrowDown) {\r\n event.stopPropagation();\r\n if (selectedIndex === -1) {\r\n selectedIndex = 0;\r\n } else {\r\n if (event.key === SpecialKey.ArrowUp) {\r\n if (this.state.selectedIndex === 0)\r\n selectedIndex = this._length - 1;\r\n else\r\n selectedIndex--;\r\n }\r\n if (event.key === SpecialKey.ArrowDown) {\r\n if (this.state.selectedIndex === this._length - 1)\r\n selectedIndex = 0;\r\n else\r\n selectedIndex++;\r\n }\r\n }\r\n }\r\n this.setState({ selectedIndex });\r\n };\r\n\r\n public override componentDidUpdate(prevProps: ContextMenuProps) {\r\n if (prevProps.selectedIndex !== this.props.selectedIndex) {\r\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\r\n }\r\n if (!prevProps.opened && this.props.opened) {\r\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\r\n }\r\n if (!this.props.parentMenu) {\r\n // const direction = this.props.direction!;\r\n // if ((!this.props.opened && prevProps.opened && direction !== this.state.direction) || prevProps.direction !== direction)\r\n this.checkRenderDirection();\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ContextMenu.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenu.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAA4B;AAC5B,2CAAoC;AACpC,+BAA+B;AAC/B,0DAA4E;AAE5E,qEAAkE;AAClE,iEAA8D;AAC9D,uDAA0E;AAC1E,qDAAuE;AAyCvE;;;;IAII;AACJ,MAAa,WAAY,SAAQ,KAAK,CAAC,aAAiD;IAyBtF,YAAY,KAAuB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;QAzBP,iBAAY,GAAuB,IAAI,CAAC;QACxC,iBAAY,GAAuB,IAAI,CAAC;QACxC,qBAAgB,GAA4C,IAAI,CAAC;QACjE,YAAO,GAAW,CAAC,CAAC;QACpB,eAAU,GAAwB,IAAI,GAAG,EAAE,CAAC;QAG5C,mBAAc,GAAqC,2CAAoB,CAAC,WAAW,CAAC;QACpF,uBAAkB,GAAW,CAAC,CAAC;QAE/B,wBAAmB,GAAW,CAAC,CAAC;QAChC,uBAAkB,GAAW,CAAC,CAAC;QA+E/B,wBAAmB,GAAG,CAAC,KAAa,EAAE,MAAc,EAAE,EAAE;YAC9D,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrC,CAAC,CAAC;QAEF,uBAAuB;QACf,0BAAqB,GAAG,CAAC,KAAiB,EAAQ,EAAE;YAC1D,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc;gBAChD,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QACrC,CAAC,CAAC;QAyFM,yBAAoB,GAAG,CAAC,QAAyB,EAAE,SAA2C,EAAE,aAAqB,EAAE,EAAE;YAC/H,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,2CAA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AAC,MAAM;YAC9B,SAAS,GAAG,0BAA0B,CAAC;YACvC,MAAM;QACR,KAAK,2CAAoB,CAAC,KAAK;YAC7B,SAAS,GAAG,yBAAyB,CAAC;YACtC,MAAM;QACR,KAAK,2CAAoB,CAAC,UAAU;YAClC,SAAS,GAAG,iDAAiD,CAAC;YAC9D,MAAM;QACR,KAAK,2CAAoB,CAAC,MAAM;YAC9B,SAAS,GAAG,0BAA0B,CAAC;YACvC,MAAM;QACR,KAAK,2CAAoB,CAAC,WAAW;YACnC,SAAS,GAAG,kDAAkD,CAAC;YAC/D,MAAM;KACT;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport \"./ContextMenu.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ConditionalBooleanValue, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { DivWithOutsideClick } from \"../base/DivWithOutsideClick\";\r\nimport { ContextMenuDirection } from \"./ContextMenuDirection\";\r\nimport { ContextMenuItem, ContextMenuItemProps } from \"./ContextMenuItem\";\r\nimport { ContextSubMenu, ContextSubMenuProps } from \"./ContextSubMenu\";\r\n\r\n/** Properties for the [[ContextMenu]] component\r\n * @public\r\n */\r\nexport interface ContextMenuProps extends CommonProps {\r\n /** Whether ContextMenu is currently opened. */\r\n opened: boolean;\r\n /** Which direction the menu opens. Default: ContextMenuDirection.BottomRight */\r\n direction?: ContextMenuDirection;\r\n /** When click is registered outside of ContextMenu. */\r\n onOutsideClick?: (event: MouseEvent) => any;\r\n /** When list item or submenu is selected */\r\n onSelect?: (event: any) => any;\r\n /** when Escape button is pressed */\r\n onEsc?: (data: any) => any;\r\n /** Whether menu flips directions based on screen edge. Default: true */\r\n autoflip?: boolean;\r\n /** Whether menu hugs screen edge when autoflip is off. Default: true */\r\n edgeLimit?: boolean;\r\n /** Whether Hotkey press selects item, or just highlights item. Default: true */\r\n hotkeySelect?: boolean;\r\n /** starting menu item selected index Default: -1 */\r\n selectedIndex?: number;\r\n /** whether menu floats on the viewport, or the page. When false, container elements can clip menu with overflow: hidden; Default: true */\r\n floating?: boolean;\r\n /** @internal */\r\n parentMenu?: ContextMenu;\r\n /** @internal */\r\n parentSubmenu?: ContextSubMenu;\r\n /** @internal */\r\n ignoreNextKeyUp?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextMenuState {\r\n selectedIndex: number;\r\n direction: ContextMenuDirection;\r\n ignoreNextKeyUp: boolean;\r\n}\r\n\r\n/**\r\n * A context menu populated with [[ContextMenuItem]] components.\r\n * Can be nested using [[ContextSubMenu]] component.\r\n * @public\r\n */\r\nexport class ContextMenu extends React.PureComponent<ContextMenuProps, ContextMenuState> {\r\n private _rootElement: HTMLElement | null = null;\r\n private _menuElement: HTMLElement | null = null;\r\n private _selectedElement: ContextMenuItem | ContextSubMenu | null = null;\r\n private _length: number = 0;\r\n private _hotKeyMap: Map<number, string> = new Map();\r\n\r\n private _lastChildren: React.ReactNode;\r\n private _lastDirection: ContextMenuDirection | undefined = ContextMenuDirection.BottomRight;\r\n private _lastSelectedIndex: number = 0;\r\n private _injectedChildren: React.ReactNode;\r\n private _parentWindowHeight: number = 0;\r\n private _parentWindowWidth: number = 0;\r\n\r\n public static defaultProps: Partial<ContextMenuProps> = {\r\n direction: ContextMenuDirection.BottomRight,\r\n autoflip: true,\r\n edgeLimit: true,\r\n hotkeySelect: true,\r\n selectedIndex: -1,\r\n floating: true,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContextMenuState>;\r\n constructor(props: ContextMenuProps) {\r\n super(props);\r\n this.state = {\r\n selectedIndex: this.props.selectedIndex!,\r\n direction: props.direction!,\r\n ignoreNextKeyUp: props.ignoreNextKeyUp!,\r\n };\r\n }\r\n\r\n /** @internal */\r\n public static autoFlip = (dir: ContextMenuDirection, rect: DOMRectReadOnly, windowWidth: number, windowHeight: number): ContextMenuDirection => {\r\n if (rect.right > windowWidth) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopRight:\r\n dir = ContextMenuDirection.TopLeft;\r\n break;\r\n case ContextMenuDirection.Right:\r\n dir = ContextMenuDirection.Left;\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n dir = ContextMenuDirection.BottomLeft;\r\n break;\r\n }\r\n }\r\n if (rect.left < 0) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopLeft:\r\n dir = ContextMenuDirection.TopRight;\r\n break;\r\n case ContextMenuDirection.Left:\r\n dir = ContextMenuDirection.Right;\r\n break;\r\n case ContextMenuDirection.BottomLeft:\r\n dir = ContextMenuDirection.BottomRight;\r\n break;\r\n }\r\n }\r\n if (rect.bottom > windowHeight) {\r\n switch (dir) {\r\n case ContextMenuDirection.BottomLeft:\r\n dir = ContextMenuDirection.TopLeft;\r\n break;\r\n case ContextMenuDirection.Bottom:\r\n dir = ContextMenuDirection.Top;\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n dir = ContextMenuDirection.TopRight;\r\n break;\r\n }\r\n }\r\n if (rect.top < 0) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopLeft:\r\n dir = ContextMenuDirection.BottomLeft;\r\n break;\r\n case ContextMenuDirection.Top:\r\n dir = ContextMenuDirection.Bottom;\r\n break;\r\n case ContextMenuDirection.TopRight:\r\n dir = ContextMenuDirection.BottomRight;\r\n break;\r\n }\r\n }\r\n return dir;\r\n };\r\n\r\n private _handleHotKeyParsed = (index: number, hotKey: string) => {\r\n this._hotKeyMap.set(index, hotKey);\r\n };\r\n\r\n // istanbul ignore next\r\n private _handleOnOutsideClick = (event: MouseEvent): void => {\r\n if (this.props.opened && this.props.onOutsideClick)\r\n this.props.onOutsideClick(event);\r\n };\r\n\r\n public override render(): React.JSX.Element {\r\n const {\r\n opened, direction, onOutsideClick, onSelect, onEsc, autoflip, edgeLimit, hotkeySelect, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n selectedIndex, floating, parentMenu, parentSubmenu, children, className, ignoreNextKeyUp, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props;\r\n const renderDirection = parentMenu === undefined ? this.state.direction : direction;\r\n\r\n if (this._lastChildren !== children || this._lastDirection !== renderDirection || this._lastSelectedIndex !== this.state.selectedIndex) {\r\n this._injectedChildren = this._injectMenuItemProps(children, renderDirection, this.state.selectedIndex);\r\n this._lastChildren = children;\r\n this._lastDirection = renderDirection;\r\n this._lastSelectedIndex = this.state.selectedIndex;\r\n }\r\n\r\n const classNames = classnames(\"core-context-menu\", className);\r\n\r\n return (\r\n <div\r\n role=\"presentation\"\r\n className={classNames}\r\n onKeyUp={this._handleKeyUp}\r\n onClick={this._handleClick}\r\n data-testid=\"core-context-menu-root\"\r\n {...props}\r\n ref={this._rootRef}>\r\n <DivWithOutsideClick onOutsideClick={this._handleOnOutsideClick}>\r\n <div\r\n ref={this._menuRef}\r\n role=\"menu\"\r\n tabIndex={0}\r\n data-testid=\"core-context-menu-container\"\r\n className={classnames(\"core-context-menu-container\",\r\n opened && \"core-context-menu-opened\",\r\n floating && \"core-context-menu-floating\",\r\n ContextMenu.getCSSClassNameFromDirection(renderDirection),\r\n )}>\r\n {this._injectedChildren}\r\n </div>\r\n </DivWithOutsideClick>\r\n </div>\r\n );\r\n }\r\n\r\n /** @internal */\r\n public static getCSSClassNameFromDirection = (direction?: ContextMenuDirection): string => {\r\n let className = \"\";\r\n\r\n // istanbul ignore next\r\n if (direction === undefined)\r\n direction = ContextMenuDirection.BottomRight;\r\n\r\n if (direction === ContextMenuDirection.None)\r\n return \"\";\r\n\r\n switch (direction) {\r\n case ContextMenuDirection.TopLeft:\r\n className = \"core-context-menu-top core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Top:\r\n className = \"core-context-menu-top\";\r\n break;\r\n case ContextMenuDirection.TopRight:\r\n className = \"core-context-menu-top core-context-menu-right\";\r\n break;\r\n case ContextMenuDirection.Left:\r\n className = \"core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Center:\r\n className = \"core-context-menu-center\";\r\n break;\r\n case ContextMenuDirection.Right:\r\n className = \"core-context-menu-right\";\r\n break;\r\n case ContextMenuDirection.BottomLeft:\r\n className = \"core-context-menu-bottom core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Bottom:\r\n className = \"core-context-menu-bottom\";\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n className = \"core-context-menu-bottom core-context-menu-right\";\r\n break;\r\n }\r\n\r\n return className;\r\n };\r\n\r\n private _injectMenuItemProps = (children: React.ReactNode, direction: ContextMenuDirection | undefined, selectedIndex: number) => {\r\n let index = 0;\r\n // add inheritance data to submenu children\r\n const ch = React.Children.map(children, (child: React.ReactNode) => {\r\n // Capture only ContextSubMenus and ContextMenuItems.\r\n if (child && typeof child === \"object\" && \"props\" in child && (child.type === ContextSubMenu || child.type === ContextMenuItem) &&\r\n !ConditionalBooleanValue.getValue(child.props.disabled) && !ConditionalBooleanValue.getValue(child.props.hidden)) {\r\n const id = index; // get separate id variable so value stays the same when onHover is called later.\r\n const onHover = () => {\r\n this.setState({ selectedIndex: id });\r\n this.focus();\r\n };\r\n const ref = (el: ContextSubMenu | ContextMenuItem | null) => {\r\n if (selectedIndex === id) // only save to this._selectedElement if previously captured bool is true\r\n this._selectedElement = el;\r\n };\r\n const boundHandleHotKeyParse = this._handleHotKeyParsed.bind(this, id); // bind local callback for specific index\r\n const childProps: Partial<ContextSubMenuProps & ContextMenuItemProps & { ref: typeof ref }> = {\r\n parentMenu: this,\r\n ref,\r\n onHover,\r\n isSelected: selectedIndex === id,\r\n onHotKeyParsed: boundHandleHotKeyParse,\r\n };\r\n if (child.type === ContextSubMenu) { // add direction only to sub-menus\r\n childProps.direction = child.props.direction || /* istanbul ignore next */ direction;\r\n }\r\n index++;\r\n return React.cloneElement(child, childProps);\r\n } else return child; // Else, pass through unmodified\r\n });\r\n this._length = index;\r\n return ch;\r\n };\r\n\r\n private _rootRef = (el: HTMLDivElement | null) => {\r\n this._rootElement = el;\r\n };\r\n\r\n private _menuRef = (el: HTMLDivElement | null) => {\r\n this._menuElement = el;\r\n };\r\n\r\n private getWindow() {\r\n const el = this._rootElement ? this._rootElement : /* istanbul ignore next */ this._menuElement;\r\n const parentDocument = el!.ownerDocument;\r\n // istanbul ignore next\r\n return parentDocument.defaultView ?? window;\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n const parentWindow = this.getWindow();\r\n parentWindow.addEventListener(\"focus\", this._handleFocusChange);\r\n parentWindow.addEventListener(\"mouseup\", this._handleFocusChange);\r\n\r\n this.checkRenderDirection();\r\n\r\n if (this.props.opened)\r\n this.focus();\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n const parentWindow = this.getWindow();\r\n parentWindow.removeEventListener(\"focus\", this._handleFocusChange);\r\n parentWindow.removeEventListener(\"mouseup\", this._handleFocusChange);\r\n }\r\n\r\n private checkRenderDirection() {\r\n const { direction, autoflip, parentMenu } = this.props;\r\n const parentWindow = this.getWindow();\r\n\r\n let renderDirection = parentMenu === undefined ? this.state.direction : direction;\r\n\r\n if (parentWindow.innerHeight === this._parentWindowHeight && parentWindow.innerWidth === this._parentWindowWidth)\r\n return;\r\n this._parentWindowHeight = parentWindow.innerHeight;\r\n this._parentWindowWidth = parentWindow.innerWidth;\r\n\r\n // check if menu should flip\r\n if (parentWindow && autoflip && parentMenu === undefined) {\r\n const menuRect = this.getRect();\r\n renderDirection = ContextMenu.autoFlip(renderDirection!, menuRect, parentWindow.innerWidth, parentWindow.innerHeight);\r\n // istanbul ignore next\r\n if (renderDirection !== this.state.direction)\r\n this.setState({ direction: renderDirection });\r\n }\r\n }\r\n\r\n public focus = () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.focus();\r\n };\r\n\r\n public blur = () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.blur();\r\n };\r\n\r\n public getRect = (): DOMRect => {\r\n let clientRect = DOMRect.fromRect({ x: 0, y: 0, width: 0, height: 0});\r\n\r\n // istanbul ignore else\r\n if (this._menuElement) {\r\n clientRect = this._menuElement.getBoundingClientRect();\r\n }\r\n return clientRect;\r\n };\r\n\r\n private _handleFocusChange = (event: any): void => {\r\n // istanbul ignore else\r\n if (this._rootElement && this.props.opened && event.target instanceof Node && this.props.onOutsideClick && !this._rootElement.contains(event.target))\r\n this.props.onOutsideClick(event);\r\n };\r\n\r\n private _handleClick = (event: React.MouseEvent<HTMLDivElement>): void => {\r\n if (this.props.onSelect)\r\n this.props.onSelect(event);\r\n };\r\n\r\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>): void => {\r\n if (this.state.ignoreNextKeyUp) {\r\n this.setState({ ignoreNextKeyUp: false });\r\n return;\r\n }\r\n\r\n // istanbul ignore else\r\n if (event.key) {\r\n for (const [key, value] of this._hotKeyMap) {\r\n if (!this.props.hotkeySelect! && key > this.state.selectedIndex) { // Start search at current index.\r\n if (event.key.toUpperCase() === value) {\r\n this.setState({ selectedIndex: key });\r\n return;\r\n }\r\n }\r\n }\r\n for (const [key, value] of this._hotKeyMap) {\r\n if (event.key.toUpperCase() === value) {\r\n this.setState({ selectedIndex: key }, () => {\r\n if (this.props.hotkeySelect && this._selectedElement) {\r\n this._selectedElement.select();\r\n }\r\n });\r\n event.stopPropagation();\r\n return;\r\n }\r\n }\r\n }\r\n\r\n if (event.key === SpecialKey.ArrowLeft) {\r\n event.stopPropagation();\r\n if (this.props.parentMenu && this.props.parentSubmenu) {\r\n this.props.parentSubmenu.close();\r\n this.props.parentMenu.focus();\r\n }\r\n if (this.props.onEsc)\r\n this.props.onEsc(event);\r\n }\r\n\r\n if (event.key === SpecialKey.Escape) {\r\n // istanbul ignore else\r\n if (this.props.onEsc)\r\n this.props.onEsc(event);\r\n }\r\n\r\n if ((event.key === SpecialKey.Enter || event.key === SpecialKey.ArrowRight) && this._selectedElement) {\r\n event.stopPropagation();\r\n\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.Enter || /* istanbul ignore next */ this._selectedElement instanceof ContextSubMenu) {\r\n // istanbul ignore else\r\n if (this._selectedElement.select)\r\n this._selectedElement.select();\r\n }\r\n }\r\n\r\n let { selectedIndex } = this.state;\r\n if (event.key === SpecialKey.ArrowUp || event.key === SpecialKey.ArrowDown) {\r\n event.stopPropagation();\r\n if (selectedIndex === -1) {\r\n selectedIndex = 0;\r\n } else {\r\n if (event.key === SpecialKey.ArrowUp) {\r\n if (this.state.selectedIndex === 0)\r\n selectedIndex = this._length - 1;\r\n else\r\n selectedIndex--;\r\n }\r\n if (event.key === SpecialKey.ArrowDown) {\r\n if (this.state.selectedIndex === this._length - 1)\r\n selectedIndex = 0;\r\n else\r\n selectedIndex++;\r\n }\r\n }\r\n }\r\n this.setState({ selectedIndex });\r\n };\r\n\r\n public override componentDidUpdate(prevProps: ContextMenuProps) {\r\n if (prevProps.selectedIndex !== this.props.selectedIndex) {\r\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\r\n }\r\n if (!prevProps.opened && this.props.opened) {\r\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\r\n }\r\n if (!this.props.parentMenu) {\r\n // const direction = this.props.direction!;\r\n // if ((!this.props.opened && prevProps.opened && direction !== this.state.direction) || prevProps.direction !== direction)\r\n this.checkRenderDirection();\r\n }\r\n }\r\n}\r\n"]}
@@ -8,6 +8,6 @@ import { CommonProps } from "../utils/Props";
8
8
  * @public
9
9
  */
10
10
  export declare class ContextMenuDivider extends React.PureComponent<CommonProps> {
11
- render(): JSX.Element;
11
+ render(): React.JSX.Element;
12
12
  }
13
13
  //# sourceMappingURL=ContextMenuDivider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuDivider.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDivider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC;IACtD,MAAM,IAAI,GAAG,CAAC,OAAO;CAMtC"}
1
+ {"version":3,"file":"ContextMenuDivider.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDivider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC;IACtD,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO;CAM5C"}