@itwin/core-react 4.1.0-dev.1 → 4.2.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (758) hide show
  1. package/CHANGELOG.md +1609 -1602
  2. package/ContributeGuidelines.md +99 -99
  3. package/LICENSE.md +9 -9
  4. package/README.md +11 -11
  5. package/lib/cjs/core-react/UiCore.d.ts.map +1 -1
  6. package/lib/cjs/core-react/UiCore.js +9 -5
  7. package/lib/cjs/core-react/UiCore.js.map +1 -1
  8. package/lib/cjs/core-react/_helpers.scss +9 -8
  9. package/lib/cjs/core-react/_scrollbar.scss +8 -4
  10. package/lib/cjs/core-react/_z-index.scss +15 -33
  11. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  12. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  13. package/lib/cjs/core-react/autosuggest/AutoSuggest.js +14 -15
  14. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  15. package/lib/cjs/core-react/badge/Badge.d.ts +1 -1
  16. package/lib/cjs/core-react/badge/Badge.d.ts.map +1 -1
  17. package/lib/cjs/core-react/badge/Badge.js +3 -3
  18. package/lib/cjs/core-react/badge/Badge.js.map +1 -1
  19. package/lib/cjs/core-react/badge/BadgeUtilities.d.ts.map +1 -1
  20. package/lib/cjs/core-react/badge/BadgeUtilities.js +3 -3
  21. package/lib/cjs/core-react/badge/BadgeUtilities.js.map +1 -1
  22. package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
  23. package/lib/cjs/core-react/badge/BetaBadge.js +3 -3
  24. package/lib/cjs/core-react/badge/BetaBadge.js.map +1 -1
  25. package/lib/cjs/core-react/badge/NewBadge.d.ts.map +1 -1
  26. package/lib/cjs/core-react/badge/NewBadge.js +4 -4
  27. package/lib/cjs/core-react/badge/NewBadge.js.map +1 -1
  28. package/lib/cjs/core-react/base/Centered.js +3 -3
  29. package/lib/cjs/core-react/base/Centered.js.map +1 -1
  30. package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
  31. package/lib/cjs/core-react/base/Div.js +3 -3
  32. package/lib/cjs/core-react/base/Div.js.map +1 -1
  33. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  34. package/lib/cjs/core-react/base/DivWithOutsideClick.js +4 -4
  35. package/lib/cjs/core-react/base/DivWithOutsideClick.js.map +1 -1
  36. package/lib/cjs/core-react/base/FillCentered.js +3 -3
  37. package/lib/cjs/core-react/base/FillCentered.js.map +1 -1
  38. package/lib/cjs/core-react/base/FlexWrapContainer.js +3 -3
  39. package/lib/cjs/core-react/base/FlexWrapContainer.js.map +1 -1
  40. package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
  41. package/lib/cjs/core-react/base/Gap.js +4 -4
  42. package/lib/cjs/core-react/base/Gap.js.map +1 -1
  43. package/lib/cjs/core-react/base/PointerEvents.js +3 -3
  44. package/lib/cjs/core-react/base/PointerEvents.js.map +1 -1
  45. package/lib/cjs/core-react/base/ScrollView.js +3 -3
  46. package/lib/cjs/core-react/base/ScrollView.js.map +1 -1
  47. package/lib/cjs/core-react/base/classes.scss +24 -10
  48. package/lib/cjs/core-react/button/UnderlinedButton.d.ts.map +1 -1
  49. package/lib/cjs/core-react/button/UnderlinedButton.js +3 -3
  50. package/lib/cjs/core-react/button/UnderlinedButton.js.map +1 -1
  51. package/lib/cjs/core-react/button/UnderlinedButton.scss +4 -5
  52. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  53. package/lib/cjs/core-react/checklistbox/CheckListBox.js +4 -4
  54. package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
  55. package/lib/cjs/core-react/checklistbox/CheckListBox.scss +4 -4
  56. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +7 -7
  57. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  58. package/lib/cjs/core-react/contextmenu/ContextMenu.js +42 -23
  59. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  60. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.d.ts.map +1 -1
  61. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js +3 -3
  62. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
  63. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  64. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  65. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js +3 -3
  66. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  67. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
  68. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  69. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js +16 -12
  70. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  71. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
  72. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  73. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +37 -15
  74. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  75. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  76. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js +11 -7
  77. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  78. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  79. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js +3 -3
  80. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  81. package/lib/cjs/core-react/contextmenu/TildeFinder.d.ts.map +1 -1
  82. package/lib/cjs/core-react/contextmenu/TildeFinder.js +15 -7
  83. package/lib/cjs/core-react/contextmenu/TildeFinder.js.map +1 -1
  84. package/lib/cjs/core-react/dialog/Dialog.d.ts +6 -5
  85. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  86. package/lib/cjs/core-react/dialog/Dialog.js +94 -86
  87. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  88. package/lib/cjs/core-react/dialog/GlobalDialog.d.ts.map +1 -1
  89. package/lib/cjs/core-react/dialog/GlobalDialog.js +10 -6
  90. package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
  91. package/lib/cjs/core-react/dialog/SimpleDialog.d.ts +68 -0
  92. package/lib/cjs/core-react/dialog/SimpleDialog.d.ts.map +1 -0
  93. package/lib/cjs/core-react/dialog/SimpleDialog.js +51 -0
  94. package/lib/cjs/core-react/dialog/SimpleDialog.js.map +1 -0
  95. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  96. package/lib/cjs/core-react/elementseparator/ElementSeparator.js +14 -8
  97. package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
  98. package/lib/cjs/core-react/elementseparator/ElementSeparator.scss +19 -10
  99. package/lib/cjs/core-react/enums/Alignment.js +3 -3
  100. package/lib/cjs/core-react/enums/Alignment.js.map +1 -1
  101. package/lib/cjs/core-react/enums/CheckBoxState.js +3 -3
  102. package/lib/cjs/core-react/enums/CheckBoxState.js.map +1 -1
  103. package/lib/cjs/core-react/enums/Orientation.js +3 -3
  104. package/lib/cjs/core-react/enums/Orientation.js.map +1 -1
  105. package/lib/cjs/core-react/enums/SortDirection.js +3 -3
  106. package/lib/cjs/core-react/enums/SortDirection.js.map +1 -1
  107. package/lib/cjs/core-react/enums/TimeFormat.js +3 -3
  108. package/lib/cjs/core-react/enums/TimeFormat.js.map +1 -1
  109. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +1 -1
  110. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  111. package/lib/cjs/core-react/expandable/ExpandableList.js +8 -5
  112. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  113. package/lib/cjs/core-react/expandable/ExpandableList.scss +4 -4
  114. package/lib/cjs/core-react/expandable/classes.scss +6 -4
  115. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.d.ts.map +1 -1
  116. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.js +38 -15
  117. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
  118. package/lib/cjs/core-react/focustrap/FocusTrap.d.ts.map +1 -1
  119. package/lib/cjs/core-react/focustrap/FocusTrap.js +33 -16
  120. package/lib/cjs/core-react/focustrap/FocusTrap.js.map +1 -1
  121. package/lib/cjs/core-react/hocs/withIsPressed.d.ts.map +1 -1
  122. package/lib/cjs/core-react/hocs/withIsPressed.js +4 -7
  123. package/lib/cjs/core-react/hocs/withIsPressed.js.map +1 -1
  124. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  125. package/lib/cjs/core-react/hocs/withOnOutsideClick.js +16 -11
  126. package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
  127. package/lib/cjs/core-react/hocs/withTimeout.d.ts.map +1 -1
  128. package/lib/cjs/core-react/hocs/withTimeout.js +6 -8
  129. package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
  130. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts +5 -1
  131. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
  132. package/lib/cjs/core-react/icons/ConditionalIconItem.js +26 -9
  133. package/lib/cjs/core-react/icons/ConditionalIconItem.js.map +1 -1
  134. package/lib/cjs/core-react/icons/IconComponent.d.ts +1 -1
  135. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  136. package/lib/cjs/core-react/icons/IconComponent.js +20 -10
  137. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  138. package/lib/cjs/core-react/icons/IconComponent.scss +5 -6
  139. package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
  140. package/lib/cjs/core-react/icons/SvgPath.js +4 -4
  141. package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
  142. package/lib/cjs/core-react/icons/WebFontIcon.js +3 -3
  143. package/lib/cjs/core-react/icons/WebFontIcon.js.map +1 -1
  144. package/lib/cjs/core-react/icons/classes.scss +15 -7
  145. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  146. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +6 -4
  147. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  148. package/lib/cjs/core-react/inputs/Input.d.ts +1 -1
  149. package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
  150. package/lib/cjs/core-react/inputs/Input.js +6 -7
  151. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  152. package/lib/cjs/core-react/inputs/InputLabel.d.ts +1 -1
  153. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  154. package/lib/cjs/core-react/inputs/InputLabel.js +10 -13
  155. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  156. package/lib/cjs/core-react/inputs/InputStatus.js +3 -3
  157. package/lib/cjs/core-react/inputs/InputStatus.js.map +1 -1
  158. package/lib/cjs/core-react/inputs/LabeledComponentProps.js +3 -3
  159. package/lib/cjs/core-react/inputs/LabeledComponentProps.js.map +1 -1
  160. package/lib/cjs/core-react/inputs/classes.scss +9 -5
  161. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  162. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  163. package/lib/cjs/core-react/inputs/iconinput/IconInput.js +3 -4
  164. package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
  165. package/lib/cjs/core-react/inputs/iconinput/IconInput.scss +11 -12
  166. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +2 -2
  167. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  168. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +25 -16
  169. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  170. package/lib/cjs/core-react/layout-variables.scss +5 -7
  171. package/lib/cjs/core-react/listbox/Listbox.d.ts +2 -2
  172. package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
  173. package/lib/cjs/core-react/listbox/Listbox.js +19 -12
  174. package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
  175. package/lib/cjs/core-react/loading/LoadingBar.d.ts.map +1 -1
  176. package/lib/cjs/core-react/loading/LoadingBar.js +4 -4
  177. package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
  178. package/lib/cjs/core-react/loading/LoadingBar.scss +6 -6
  179. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts.map +1 -1
  180. package/lib/cjs/core-react/loading/LoadingPrompt.js +9 -9
  181. package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
  182. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +3 -3
  183. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  184. package/lib/cjs/core-react/loading/LoadingSpinner.js +5 -5
  185. package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
  186. package/lib/cjs/core-react/loading/LoadingStatus.d.ts.map +1 -1
  187. package/lib/cjs/core-react/loading/LoadingStatus.js +3 -3
  188. package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
  189. package/lib/cjs/core-react/loading/LoadingStatus.scss +4 -4
  190. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +3 -3
  191. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  192. package/lib/cjs/core-react/messagebox/MessageBox.js +5 -5
  193. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  194. package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
  195. package/lib/cjs/core-react/notification/MessageRenderer.js +18 -12
  196. package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
  197. package/lib/cjs/core-react/notification/MessageType.d.ts.map +1 -1
  198. package/lib/cjs/core-react/notification/MessageType.js +3 -3
  199. package/lib/cjs/core-react/notification/MessageType.js.map +1 -1
  200. package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
  201. package/lib/cjs/core-react/popup/Popup.js +46 -23
  202. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  203. package/lib/cjs/core-react/radialmenu/Annulus.d.ts.map +1 -1
  204. package/lib/cjs/core-react/radialmenu/Annulus.js +4 -4
  205. package/lib/cjs/core-react/radialmenu/Annulus.js.map +1 -1
  206. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +2 -2
  207. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  208. package/lib/cjs/core-react/radialmenu/RadialMenu.js +26 -11
  209. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  210. package/lib/cjs/core-react/searchbox/SearchBox.d.ts.map +1 -1
  211. package/lib/cjs/core-react/searchbox/SearchBox.js +17 -7
  212. package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
  213. package/lib/cjs/core-react/settings/SettingsContainer.d.ts +1 -1
  214. package/lib/cjs/core-react/settings/SettingsContainer.d.ts.map +1 -1
  215. package/lib/cjs/core-react/settings/SettingsContainer.js +54 -19
  216. package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
  217. package/lib/cjs/core-react/settings/SettingsManager.d.ts +3 -3
  218. package/lib/cjs/core-react/settings/SettingsManager.d.ts.map +1 -1
  219. package/lib/cjs/core-react/settings/SettingsManager.js +7 -8
  220. package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
  221. package/lib/cjs/core-react/style/breakpoints.scss +30 -12
  222. package/lib/cjs/core-react/style/colors.scss +52 -52
  223. package/lib/cjs/core-react/style/mixins.scss +7 -11
  224. package/lib/cjs/core-react/style/themecolors.scss +116 -106
  225. package/lib/cjs/core-react/tabs/Tabs.d.ts +4 -4
  226. package/lib/cjs/core-react/tabs/Tabs.d.ts.map +1 -1
  227. package/lib/cjs/core-react/tabs/Tabs.js +13 -11
  228. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  229. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  230. package/lib/cjs/core-react/tabs/VerticalTabs.js +3 -3
  231. package/lib/cjs/core-react/tabs/VerticalTabs.js.map +1 -1
  232. package/lib/cjs/core-react/tabs/classes.scss +6 -4
  233. package/lib/cjs/core-react/text/BlockText.js +4 -4
  234. package/lib/cjs/core-react/text/BlockText.js.map +1 -1
  235. package/lib/cjs/core-react/text/BodyText.js +4 -4
  236. package/lib/cjs/core-react/text/BodyText.js.map +1 -1
  237. package/lib/cjs/core-react/text/DisabledText.js +4 -4
  238. package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
  239. package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
  240. package/lib/cjs/core-react/text/FilteredText.js +5 -5
  241. package/lib/cjs/core-react/text/FilteredText.js.map +1 -1
  242. package/lib/cjs/core-react/text/MutedText.js +4 -4
  243. package/lib/cjs/core-react/text/MutedText.js.map +1 -1
  244. package/lib/cjs/core-react/text/StyledText.js +3 -3
  245. package/lib/cjs/core-react/text/StyledText.js.map +1 -1
  246. package/lib/cjs/core-react/text/TextProps.d.ts.map +1 -1
  247. package/lib/cjs/core-react/text/TextProps.js +3 -3
  248. package/lib/cjs/core-react/text/TextProps.js.map +1 -1
  249. package/lib/cjs/core-react/text/classes.scss +15 -7
  250. package/lib/cjs/core-react/text/disabled.scss +4 -5
  251. package/lib/cjs/core-react/text/muted.scss +4 -5
  252. package/lib/cjs/core-react/tree/Branch.d.ts.map +1 -1
  253. package/lib/cjs/core-react/tree/Branch.js +3 -3
  254. package/lib/cjs/core-react/tree/Branch.js.map +1 -1
  255. package/lib/cjs/core-react/tree/Branch.scss +4 -4
  256. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  257. package/lib/cjs/core-react/tree/ExpansionToggle.js +3 -3
  258. package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
  259. package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
  260. package/lib/cjs/core-react/tree/Node.js +11 -8
  261. package/lib/cjs/core-react/tree/Node.js.map +1 -1
  262. package/lib/cjs/core-react/tree/Node.scss +9 -9
  263. package/lib/cjs/core-react/tree/Placeholder.js +5 -5
  264. package/lib/cjs/core-react/tree/Placeholder.js.map +1 -1
  265. package/lib/cjs/core-react/tree/Tree.d.ts.map +1 -1
  266. package/lib/cjs/core-react/tree/Tree.js +20 -11
  267. package/lib/cjs/core-react/tree/Tree.js.map +1 -1
  268. package/lib/cjs/core-react/uistate/LocalStateStorage.d.ts.map +1 -1
  269. package/lib/cjs/core-react/uistate/LocalStateStorage.js +7 -4
  270. package/lib/cjs/core-react/uistate/LocalStateStorage.js.map +1 -1
  271. package/lib/cjs/core-react/uistate/UiStateEntry.d.ts.map +1 -1
  272. package/lib/cjs/core-react/uistate/UiStateEntry.js +3 -3
  273. package/lib/cjs/core-react/uistate/UiStateEntry.js.map +1 -1
  274. package/lib/cjs/core-react/uistate/UiStateStorage.d.ts.map +1 -1
  275. package/lib/cjs/core-react/uistate/UiStateStorage.js +3 -3
  276. package/lib/cjs/core-react/uistate/UiStateStorage.js.map +1 -1
  277. package/lib/cjs/core-react/utils/IconHelper.d.ts +3 -1
  278. package/lib/cjs/core-react/utils/IconHelper.d.ts.map +1 -1
  279. package/lib/cjs/core-react/utils/IconHelper.js +35 -6
  280. package/lib/cjs/core-react/utils/IconHelper.js.map +1 -1
  281. package/lib/cjs/core-react/utils/IconWebComponent.d.ts.map +1 -1
  282. package/lib/cjs/core-react/utils/IconWebComponent.js +71 -41
  283. package/lib/cjs/core-react/utils/IconWebComponent.js.map +1 -1
  284. package/lib/cjs/core-react/utils/Point.d.ts.map +1 -1
  285. package/lib/cjs/core-react/utils/Point.js +3 -3
  286. package/lib/cjs/core-react/utils/Point.js.map +1 -1
  287. package/lib/cjs/core-react/utils/Props.d.ts.map +1 -1
  288. package/lib/cjs/core-react/utils/Props.js +3 -3
  289. package/lib/cjs/core-react/utils/Props.js.map +1 -1
  290. package/lib/cjs/core-react/utils/Rectangle.d.ts.map +1 -1
  291. package/lib/cjs/core-react/utils/Rectangle.js +15 -7
  292. package/lib/cjs/core-react/utils/Rectangle.js.map +1 -1
  293. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  294. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js +4 -2
  295. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  296. package/lib/cjs/core-react/utils/Size.d.ts.map +1 -1
  297. package/lib/cjs/core-react/utils/Size.js +4 -5
  298. package/lib/cjs/core-react/utils/Size.js.map +1 -1
  299. package/lib/cjs/core-react/utils/Timer.d.ts.map +1 -1
  300. package/lib/cjs/core-react/utils/Timer.js +3 -3
  301. package/lib/cjs/core-react/utils/Timer.js.map +1 -1
  302. package/lib/cjs/core-react/utils/UiGeometry.d.ts.map +1 -1
  303. package/lib/cjs/core-react/utils/UiGeometry.js +9 -5
  304. package/lib/cjs/core-react/utils/UiGeometry.js.map +1 -1
  305. package/lib/cjs/core-react/utils/flattenChildren.js +3 -3
  306. package/lib/cjs/core-react/utils/flattenChildren.js.map +1 -1
  307. package/lib/cjs/core-react/utils/getBestBWContrastColor.js +5 -5
  308. package/lib/cjs/core-react/utils/getBestBWContrastColor.js.map +1 -1
  309. package/lib/cjs/core-react/utils/getCssVariable.d.ts.map +1 -1
  310. package/lib/cjs/core-react/utils/getCssVariable.js +3 -3
  311. package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
  312. package/lib/cjs/core-react/utils/getDisplayName.d.ts.map +1 -1
  313. package/lib/cjs/core-react/utils/getDisplayName.js +3 -3
  314. package/lib/cjs/core-react/utils/getDisplayName.js.map +1 -1
  315. package/lib/cjs/core-react/utils/getUserColor.d.ts.map +1 -1
  316. package/lib/cjs/core-react/utils/getUserColor.js +5 -4
  317. package/lib/cjs/core-react/utils/getUserColor.js.map +1 -1
  318. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
  319. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js +4 -4
  320. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
  321. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
  322. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +21 -9
  323. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  324. package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  325. package/lib/cjs/core-react/utils/hooks/useDisposable.js +3 -3
  326. package/lib/cjs/core-react/utils/hooks/useDisposable.js.map +1 -1
  327. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
  328. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js +3 -3
  329. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  330. package/lib/cjs/core-react/utils/hooks/useEventListener.d.ts.map +1 -1
  331. package/lib/cjs/core-react/utils/hooks/useEventListener.js +3 -3
  332. package/lib/cjs/core-react/utils/hooks/useEventListener.js.map +1 -1
  333. package/lib/cjs/core-react/utils/hooks/useInterval.d.ts.map +1 -1
  334. package/lib/cjs/core-react/utils/hooks/useInterval.js +6 -4
  335. package/lib/cjs/core-react/utils/hooks/useInterval.js.map +1 -1
  336. package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.d.ts.map +1 -1
  337. package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.js +7 -4
  338. package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.js.map +1 -1
  339. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
  340. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js +15 -6
  341. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  342. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js +3 -3
  343. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
  344. package/lib/cjs/core-react/utils/hooks/useRefEffect.d.ts +1 -1
  345. package/lib/cjs/core-react/utils/hooks/useRefEffect.d.ts.map +1 -1
  346. package/lib/cjs/core-react/utils/hooks/useRefEffect.js +3 -3
  347. package/lib/cjs/core-react/utils/hooks/useRefEffect.js.map +1 -1
  348. package/lib/cjs/core-react/utils/hooks/useRefState.js +3 -3
  349. package/lib/cjs/core-react/utils/hooks/useRefState.js.map +1 -1
  350. package/lib/cjs/core-react/utils/hooks/useRefs.d.ts.map +1 -1
  351. package/lib/cjs/core-react/utils/hooks/useRefs.js +8 -6
  352. package/lib/cjs/core-react/utils/hooks/useRefs.js.map +1 -1
  353. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +8 -8
  354. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  355. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +37 -20
  356. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  357. package/lib/cjs/core-react/utils/hooks/useTargeted.d.ts.map +1 -1
  358. package/lib/cjs/core-react/utils/hooks/useTargeted.js +7 -4
  359. package/lib/cjs/core-react/utils/hooks/useTargeted.js.map +1 -1
  360. package/lib/cjs/core-react/utils/hooks/useThrottledFn.js +3 -3
  361. package/lib/cjs/core-react/utils/hooks/useThrottledFn.js.map +1 -1
  362. package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.d.ts.map +1 -1
  363. package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.js +3 -4
  364. package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.js.map +1 -1
  365. package/lib/cjs/core-react/utils/isPromiseLike.d.ts.map +1 -1
  366. package/lib/cjs/core-react/utils/isPromiseLike.js +6 -4
  367. package/lib/cjs/core-react/utils/isPromiseLike.js.map +1 -1
  368. package/lib/cjs/core-react/utils/reuseOrCreatePromise.d.ts +14 -0
  369. package/lib/cjs/core-react/utils/reuseOrCreatePromise.d.ts.map +1 -0
  370. package/lib/cjs/core-react/utils/reuseOrCreatePromise.js +33 -0
  371. package/lib/cjs/core-react/utils/reuseOrCreatePromise.js.map +1 -0
  372. package/lib/cjs/core-react/utils/shallowDiffers.d.ts.map +1 -1
  373. package/lib/cjs/core-react/utils/shallowDiffers.js +3 -3
  374. package/lib/cjs/core-react/utils/shallowDiffers.js.map +1 -1
  375. package/lib/cjs/core-react/utils/typeUtils.js +3 -3
  376. package/lib/cjs/core-react/utils/typeUtils.js.map +1 -1
  377. package/lib/cjs/core-react.d.ts +3 -3
  378. package/lib/cjs/core-react.d.ts.map +1 -1
  379. package/lib/cjs/core-react.js +3 -3
  380. package/lib/cjs/core-react.js.map +1 -1
  381. package/lib/esm/core-react/UiCore.d.ts.map +1 -1
  382. package/lib/esm/core-react/UiCore.js +9 -5
  383. package/lib/esm/core-react/UiCore.js.map +1 -1
  384. package/lib/esm/core-react/_helpers.scss +9 -8
  385. package/lib/esm/core-react/_scrollbar.scss +8 -4
  386. package/lib/esm/core-react/_z-index.scss +15 -33
  387. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  388. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  389. package/lib/esm/core-react/autosuggest/AutoSuggest.js +14 -15
  390. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  391. package/lib/esm/core-react/badge/Badge.d.ts +1 -1
  392. package/lib/esm/core-react/badge/Badge.d.ts.map +1 -1
  393. package/lib/esm/core-react/badge/Badge.js +3 -3
  394. package/lib/esm/core-react/badge/Badge.js.map +1 -1
  395. package/lib/esm/core-react/badge/BadgeUtilities.d.ts.map +1 -1
  396. package/lib/esm/core-react/badge/BadgeUtilities.js +3 -3
  397. package/lib/esm/core-react/badge/BadgeUtilities.js.map +1 -1
  398. package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
  399. package/lib/esm/core-react/badge/BetaBadge.js +3 -3
  400. package/lib/esm/core-react/badge/BetaBadge.js.map +1 -1
  401. package/lib/esm/core-react/badge/NewBadge.d.ts.map +1 -1
  402. package/lib/esm/core-react/badge/NewBadge.js +4 -4
  403. package/lib/esm/core-react/badge/NewBadge.js.map +1 -1
  404. package/lib/esm/core-react/base/Centered.js +3 -3
  405. package/lib/esm/core-react/base/Centered.js.map +1 -1
  406. package/lib/esm/core-react/base/Div.d.ts.map +1 -1
  407. package/lib/esm/core-react/base/Div.js +3 -3
  408. package/lib/esm/core-react/base/Div.js.map +1 -1
  409. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  410. package/lib/esm/core-react/base/DivWithOutsideClick.js +4 -4
  411. package/lib/esm/core-react/base/DivWithOutsideClick.js.map +1 -1
  412. package/lib/esm/core-react/base/FillCentered.js +3 -3
  413. package/lib/esm/core-react/base/FillCentered.js.map +1 -1
  414. package/lib/esm/core-react/base/FlexWrapContainer.js +3 -3
  415. package/lib/esm/core-react/base/FlexWrapContainer.js.map +1 -1
  416. package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
  417. package/lib/esm/core-react/base/Gap.js +4 -4
  418. package/lib/esm/core-react/base/Gap.js.map +1 -1
  419. package/lib/esm/core-react/base/PointerEvents.js +3 -3
  420. package/lib/esm/core-react/base/PointerEvents.js.map +1 -1
  421. package/lib/esm/core-react/base/ScrollView.js +3 -3
  422. package/lib/esm/core-react/base/ScrollView.js.map +1 -1
  423. package/lib/esm/core-react/base/classes.scss +24 -10
  424. package/lib/esm/core-react/button/UnderlinedButton.d.ts.map +1 -1
  425. package/lib/esm/core-react/button/UnderlinedButton.js +3 -3
  426. package/lib/esm/core-react/button/UnderlinedButton.js.map +1 -1
  427. package/lib/esm/core-react/button/UnderlinedButton.scss +4 -5
  428. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  429. package/lib/esm/core-react/checklistbox/CheckListBox.js +4 -4
  430. package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
  431. package/lib/esm/core-react/checklistbox/CheckListBox.scss +4 -4
  432. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +7 -7
  433. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  434. package/lib/esm/core-react/contextmenu/ContextMenu.js +42 -23
  435. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  436. package/lib/esm/core-react/contextmenu/ContextMenuDirection.d.ts.map +1 -1
  437. package/lib/esm/core-react/contextmenu/ContextMenuDirection.js +3 -3
  438. package/lib/esm/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
  439. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  440. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  441. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js +3 -3
  442. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  443. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
  444. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  445. package/lib/esm/core-react/contextmenu/ContextMenuItem.js +16 -12
  446. package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  447. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
  448. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  449. package/lib/esm/core-react/contextmenu/ContextSubMenu.js +37 -15
  450. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  451. package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  452. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js +11 -7
  453. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  454. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  455. package/lib/esm/core-react/contextmenu/PopupContextMenu.js +3 -3
  456. package/lib/esm/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  457. package/lib/esm/core-react/contextmenu/TildeFinder.d.ts.map +1 -1
  458. package/lib/esm/core-react/contextmenu/TildeFinder.js +15 -7
  459. package/lib/esm/core-react/contextmenu/TildeFinder.js.map +1 -1
  460. package/lib/esm/core-react/dialog/Dialog.d.ts +6 -5
  461. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  462. package/lib/esm/core-react/dialog/Dialog.js +94 -86
  463. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  464. package/lib/esm/core-react/dialog/GlobalDialog.d.ts.map +1 -1
  465. package/lib/esm/core-react/dialog/GlobalDialog.js +10 -6
  466. package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
  467. package/lib/esm/core-react/dialog/SimpleDialog.d.ts +68 -0
  468. package/lib/esm/core-react/dialog/SimpleDialog.d.ts.map +1 -0
  469. package/lib/esm/core-react/dialog/SimpleDialog.js +47 -0
  470. package/lib/esm/core-react/dialog/SimpleDialog.js.map +1 -0
  471. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  472. package/lib/esm/core-react/elementseparator/ElementSeparator.js +14 -8
  473. package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
  474. package/lib/esm/core-react/elementseparator/ElementSeparator.scss +19 -10
  475. package/lib/esm/core-react/enums/Alignment.js +3 -3
  476. package/lib/esm/core-react/enums/Alignment.js.map +1 -1
  477. package/lib/esm/core-react/enums/CheckBoxState.js +3 -3
  478. package/lib/esm/core-react/enums/CheckBoxState.js.map +1 -1
  479. package/lib/esm/core-react/enums/Orientation.js +3 -3
  480. package/lib/esm/core-react/enums/Orientation.js.map +1 -1
  481. package/lib/esm/core-react/enums/SortDirection.js +3 -3
  482. package/lib/esm/core-react/enums/SortDirection.js.map +1 -1
  483. package/lib/esm/core-react/enums/TimeFormat.js +3 -3
  484. package/lib/esm/core-react/enums/TimeFormat.js.map +1 -1
  485. package/lib/esm/core-react/expandable/ExpandableList.d.ts +1 -1
  486. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  487. package/lib/esm/core-react/expandable/ExpandableList.js +8 -5
  488. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  489. package/lib/esm/core-react/expandable/ExpandableList.scss +4 -4
  490. package/lib/esm/core-react/expandable/classes.scss +6 -4
  491. package/lib/esm/core-react/focus/ItemKeyboardNavigator.d.ts.map +1 -1
  492. package/lib/esm/core-react/focus/ItemKeyboardNavigator.js +38 -15
  493. package/lib/esm/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
  494. package/lib/esm/core-react/focustrap/FocusTrap.d.ts.map +1 -1
  495. package/lib/esm/core-react/focustrap/FocusTrap.js +33 -16
  496. package/lib/esm/core-react/focustrap/FocusTrap.js.map +1 -1
  497. package/lib/esm/core-react/hocs/withIsPressed.d.ts.map +1 -1
  498. package/lib/esm/core-react/hocs/withIsPressed.js +4 -7
  499. package/lib/esm/core-react/hocs/withIsPressed.js.map +1 -1
  500. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  501. package/lib/esm/core-react/hocs/withOnOutsideClick.js +16 -11
  502. package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
  503. package/lib/esm/core-react/hocs/withTimeout.d.ts.map +1 -1
  504. package/lib/esm/core-react/hocs/withTimeout.js +6 -8
  505. package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
  506. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts +5 -1
  507. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
  508. package/lib/esm/core-react/icons/ConditionalIconItem.js +26 -9
  509. package/lib/esm/core-react/icons/ConditionalIconItem.js.map +1 -1
  510. package/lib/esm/core-react/icons/IconComponent.d.ts +1 -1
  511. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  512. package/lib/esm/core-react/icons/IconComponent.js +21 -11
  513. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  514. package/lib/esm/core-react/icons/IconComponent.scss +5 -6
  515. package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
  516. package/lib/esm/core-react/icons/SvgPath.js +4 -4
  517. package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
  518. package/lib/esm/core-react/icons/WebFontIcon.js +3 -3
  519. package/lib/esm/core-react/icons/WebFontIcon.js.map +1 -1
  520. package/lib/esm/core-react/icons/classes.scss +15 -7
  521. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  522. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +6 -4
  523. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  524. package/lib/esm/core-react/inputs/Input.d.ts +1 -1
  525. package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
  526. package/lib/esm/core-react/inputs/Input.js +6 -7
  527. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  528. package/lib/esm/core-react/inputs/InputLabel.d.ts +1 -1
  529. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  530. package/lib/esm/core-react/inputs/InputLabel.js +11 -14
  531. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  532. package/lib/esm/core-react/inputs/InputStatus.js +3 -3
  533. package/lib/esm/core-react/inputs/InputStatus.js.map +1 -1
  534. package/lib/esm/core-react/inputs/LabeledComponentProps.js +3 -3
  535. package/lib/esm/core-react/inputs/LabeledComponentProps.js.map +1 -1
  536. package/lib/esm/core-react/inputs/classes.scss +9 -5
  537. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  538. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  539. package/lib/esm/core-react/inputs/iconinput/IconInput.js +3 -4
  540. package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
  541. package/lib/esm/core-react/inputs/iconinput/IconInput.scss +11 -12
  542. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +2 -2
  543. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  544. package/lib/esm/core-react/inputs/numberinput/NumberInput.js +26 -17
  545. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  546. package/lib/esm/core-react/layout-variables.scss +5 -7
  547. package/lib/esm/core-react/listbox/Listbox.d.ts +2 -2
  548. package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
  549. package/lib/esm/core-react/listbox/Listbox.js +19 -12
  550. package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
  551. package/lib/esm/core-react/loading/LoadingBar.d.ts.map +1 -1
  552. package/lib/esm/core-react/loading/LoadingBar.js +4 -4
  553. package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
  554. package/lib/esm/core-react/loading/LoadingBar.scss +6 -6
  555. package/lib/esm/core-react/loading/LoadingPrompt.d.ts.map +1 -1
  556. package/lib/esm/core-react/loading/LoadingPrompt.js +9 -9
  557. package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
  558. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +3 -3
  559. package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  560. package/lib/esm/core-react/loading/LoadingSpinner.js +5 -5
  561. package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
  562. package/lib/esm/core-react/loading/LoadingStatus.d.ts.map +1 -1
  563. package/lib/esm/core-react/loading/LoadingStatus.js +3 -3
  564. package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
  565. package/lib/esm/core-react/loading/LoadingStatus.scss +4 -4
  566. package/lib/esm/core-react/messagebox/MessageBox.d.ts +3 -3
  567. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  568. package/lib/esm/core-react/messagebox/MessageBox.js +6 -6
  569. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  570. package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
  571. package/lib/esm/core-react/notification/MessageRenderer.js +18 -12
  572. package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
  573. package/lib/esm/core-react/notification/MessageType.d.ts.map +1 -1
  574. package/lib/esm/core-react/notification/MessageType.js +3 -3
  575. package/lib/esm/core-react/notification/MessageType.js.map +1 -1
  576. package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
  577. package/lib/esm/core-react/popup/Popup.js +46 -23
  578. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  579. package/lib/esm/core-react/radialmenu/Annulus.d.ts.map +1 -1
  580. package/lib/esm/core-react/radialmenu/Annulus.js +4 -4
  581. package/lib/esm/core-react/radialmenu/Annulus.js.map +1 -1
  582. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +2 -2
  583. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  584. package/lib/esm/core-react/radialmenu/RadialMenu.js +26 -11
  585. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  586. package/lib/esm/core-react/searchbox/SearchBox.d.ts.map +1 -1
  587. package/lib/esm/core-react/searchbox/SearchBox.js +17 -7
  588. package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
  589. package/lib/esm/core-react/settings/SettingsContainer.d.ts +1 -1
  590. package/lib/esm/core-react/settings/SettingsContainer.d.ts.map +1 -1
  591. package/lib/esm/core-react/settings/SettingsContainer.js +54 -19
  592. package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
  593. package/lib/esm/core-react/settings/SettingsManager.d.ts +3 -3
  594. package/lib/esm/core-react/settings/SettingsManager.d.ts.map +1 -1
  595. package/lib/esm/core-react/settings/SettingsManager.js +7 -8
  596. package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
  597. package/lib/esm/core-react/style/breakpoints.scss +30 -12
  598. package/lib/esm/core-react/style/colors.scss +52 -52
  599. package/lib/esm/core-react/style/mixins.scss +7 -11
  600. package/lib/esm/core-react/style/themecolors.scss +116 -106
  601. package/lib/esm/core-react/tabs/Tabs.d.ts +4 -4
  602. package/lib/esm/core-react/tabs/Tabs.d.ts.map +1 -1
  603. package/lib/esm/core-react/tabs/Tabs.js +13 -11
  604. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  605. package/lib/esm/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  606. package/lib/esm/core-react/tabs/VerticalTabs.js +3 -3
  607. package/lib/esm/core-react/tabs/VerticalTabs.js.map +1 -1
  608. package/lib/esm/core-react/tabs/classes.scss +6 -4
  609. package/lib/esm/core-react/text/BlockText.js +4 -4
  610. package/lib/esm/core-react/text/BlockText.js.map +1 -1
  611. package/lib/esm/core-react/text/BodyText.js +4 -4
  612. package/lib/esm/core-react/text/BodyText.js.map +1 -1
  613. package/lib/esm/core-react/text/DisabledText.js +4 -4
  614. package/lib/esm/core-react/text/DisabledText.js.map +1 -1
  615. package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
  616. package/lib/esm/core-react/text/FilteredText.js +5 -5
  617. package/lib/esm/core-react/text/FilteredText.js.map +1 -1
  618. package/lib/esm/core-react/text/MutedText.js +4 -4
  619. package/lib/esm/core-react/text/MutedText.js.map +1 -1
  620. package/lib/esm/core-react/text/StyledText.js +3 -3
  621. package/lib/esm/core-react/text/StyledText.js.map +1 -1
  622. package/lib/esm/core-react/text/TextProps.d.ts.map +1 -1
  623. package/lib/esm/core-react/text/TextProps.js +3 -3
  624. package/lib/esm/core-react/text/TextProps.js.map +1 -1
  625. package/lib/esm/core-react/text/classes.scss +15 -7
  626. package/lib/esm/core-react/text/disabled.scss +4 -5
  627. package/lib/esm/core-react/text/muted.scss +4 -5
  628. package/lib/esm/core-react/tree/Branch.d.ts.map +1 -1
  629. package/lib/esm/core-react/tree/Branch.js +3 -3
  630. package/lib/esm/core-react/tree/Branch.js.map +1 -1
  631. package/lib/esm/core-react/tree/Branch.scss +4 -4
  632. package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  633. package/lib/esm/core-react/tree/ExpansionToggle.js +3 -3
  634. package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
  635. package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
  636. package/lib/esm/core-react/tree/Node.js +11 -8
  637. package/lib/esm/core-react/tree/Node.js.map +1 -1
  638. package/lib/esm/core-react/tree/Node.scss +9 -9
  639. package/lib/esm/core-react/tree/Placeholder.js +5 -5
  640. package/lib/esm/core-react/tree/Placeholder.js.map +1 -1
  641. package/lib/esm/core-react/tree/Tree.d.ts.map +1 -1
  642. package/lib/esm/core-react/tree/Tree.js +20 -11
  643. package/lib/esm/core-react/tree/Tree.js.map +1 -1
  644. package/lib/esm/core-react/uistate/LocalStateStorage.d.ts.map +1 -1
  645. package/lib/esm/core-react/uistate/LocalStateStorage.js +7 -4
  646. package/lib/esm/core-react/uistate/LocalStateStorage.js.map +1 -1
  647. package/lib/esm/core-react/uistate/UiStateEntry.d.ts.map +1 -1
  648. package/lib/esm/core-react/uistate/UiStateEntry.js +3 -3
  649. package/lib/esm/core-react/uistate/UiStateEntry.js.map +1 -1
  650. package/lib/esm/core-react/uistate/UiStateStorage.d.ts.map +1 -1
  651. package/lib/esm/core-react/uistate/UiStateStorage.js +3 -3
  652. package/lib/esm/core-react/uistate/UiStateStorage.js.map +1 -1
  653. package/lib/esm/core-react/utils/IconHelper.d.ts +3 -1
  654. package/lib/esm/core-react/utils/IconHelper.d.ts.map +1 -1
  655. package/lib/esm/core-react/utils/IconHelper.js +35 -6
  656. package/lib/esm/core-react/utils/IconHelper.js.map +1 -1
  657. package/lib/esm/core-react/utils/IconWebComponent.d.ts.map +1 -1
  658. package/lib/esm/core-react/utils/IconWebComponent.js +71 -41
  659. package/lib/esm/core-react/utils/IconWebComponent.js.map +1 -1
  660. package/lib/esm/core-react/utils/Point.d.ts.map +1 -1
  661. package/lib/esm/core-react/utils/Point.js +3 -3
  662. package/lib/esm/core-react/utils/Point.js.map +1 -1
  663. package/lib/esm/core-react/utils/Props.d.ts.map +1 -1
  664. package/lib/esm/core-react/utils/Props.js +3 -3
  665. package/lib/esm/core-react/utils/Props.js.map +1 -1
  666. package/lib/esm/core-react/utils/Rectangle.d.ts.map +1 -1
  667. package/lib/esm/core-react/utils/Rectangle.js +15 -7
  668. package/lib/esm/core-react/utils/Rectangle.js.map +1 -1
  669. package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  670. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js +4 -2
  671. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  672. package/lib/esm/core-react/utils/Size.d.ts.map +1 -1
  673. package/lib/esm/core-react/utils/Size.js +4 -5
  674. package/lib/esm/core-react/utils/Size.js.map +1 -1
  675. package/lib/esm/core-react/utils/Timer.d.ts.map +1 -1
  676. package/lib/esm/core-react/utils/Timer.js +3 -3
  677. package/lib/esm/core-react/utils/Timer.js.map +1 -1
  678. package/lib/esm/core-react/utils/UiGeometry.d.ts.map +1 -1
  679. package/lib/esm/core-react/utils/UiGeometry.js +9 -5
  680. package/lib/esm/core-react/utils/UiGeometry.js.map +1 -1
  681. package/lib/esm/core-react/utils/flattenChildren.js +3 -3
  682. package/lib/esm/core-react/utils/flattenChildren.js.map +1 -1
  683. package/lib/esm/core-react/utils/getBestBWContrastColor.js +5 -5
  684. package/lib/esm/core-react/utils/getBestBWContrastColor.js.map +1 -1
  685. package/lib/esm/core-react/utils/getCssVariable.d.ts.map +1 -1
  686. package/lib/esm/core-react/utils/getCssVariable.js +3 -3
  687. package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
  688. package/lib/esm/core-react/utils/getDisplayName.d.ts.map +1 -1
  689. package/lib/esm/core-react/utils/getDisplayName.js +3 -3
  690. package/lib/esm/core-react/utils/getDisplayName.js.map +1 -1
  691. package/lib/esm/core-react/utils/getUserColor.d.ts.map +1 -1
  692. package/lib/esm/core-react/utils/getUserColor.js +5 -4
  693. package/lib/esm/core-react/utils/getUserColor.js.map +1 -1
  694. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
  695. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js +4 -4
  696. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
  697. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
  698. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +21 -9
  699. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  700. package/lib/esm/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  701. package/lib/esm/core-react/utils/hooks/useDisposable.js +3 -3
  702. package/lib/esm/core-react/utils/hooks/useDisposable.js.map +1 -1
  703. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
  704. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js +3 -3
  705. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  706. package/lib/esm/core-react/utils/hooks/useEventListener.d.ts.map +1 -1
  707. package/lib/esm/core-react/utils/hooks/useEventListener.js +3 -3
  708. package/lib/esm/core-react/utils/hooks/useEventListener.js.map +1 -1
  709. package/lib/esm/core-react/utils/hooks/useInterval.d.ts.map +1 -1
  710. package/lib/esm/core-react/utils/hooks/useInterval.js +6 -4
  711. package/lib/esm/core-react/utils/hooks/useInterval.js.map +1 -1
  712. package/lib/esm/core-react/utils/hooks/useLifecycleLogging.d.ts.map +1 -1
  713. package/lib/esm/core-react/utils/hooks/useLifecycleLogging.js +7 -4
  714. package/lib/esm/core-react/utils/hooks/useLifecycleLogging.js.map +1 -1
  715. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
  716. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js +15 -6
  717. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  718. package/lib/esm/core-react/utils/hooks/useProximityToMouse.js +3 -3
  719. package/lib/esm/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
  720. package/lib/esm/core-react/utils/hooks/useRefEffect.d.ts +1 -1
  721. package/lib/esm/core-react/utils/hooks/useRefEffect.d.ts.map +1 -1
  722. package/lib/esm/core-react/utils/hooks/useRefEffect.js +3 -3
  723. package/lib/esm/core-react/utils/hooks/useRefEffect.js.map +1 -1
  724. package/lib/esm/core-react/utils/hooks/useRefState.js +3 -3
  725. package/lib/esm/core-react/utils/hooks/useRefState.js.map +1 -1
  726. package/lib/esm/core-react/utils/hooks/useRefs.d.ts.map +1 -1
  727. package/lib/esm/core-react/utils/hooks/useRefs.js +8 -6
  728. package/lib/esm/core-react/utils/hooks/useRefs.js.map +1 -1
  729. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +8 -8
  730. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  731. package/lib/esm/core-react/utils/hooks/useResizeObserver.js +37 -20
  732. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  733. package/lib/esm/core-react/utils/hooks/useTargeted.d.ts.map +1 -1
  734. package/lib/esm/core-react/utils/hooks/useTargeted.js +7 -4
  735. package/lib/esm/core-react/utils/hooks/useTargeted.js.map +1 -1
  736. package/lib/esm/core-react/utils/hooks/useThrottledFn.js +3 -3
  737. package/lib/esm/core-react/utils/hooks/useThrottledFn.js.map +1 -1
  738. package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.d.ts.map +1 -1
  739. package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.js +3 -4
  740. package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.js.map +1 -1
  741. package/lib/esm/core-react/utils/isPromiseLike.d.ts.map +1 -1
  742. package/lib/esm/core-react/utils/isPromiseLike.js +6 -4
  743. package/lib/esm/core-react/utils/isPromiseLike.js.map +1 -1
  744. package/lib/esm/core-react/utils/reuseOrCreatePromise.d.ts +14 -0
  745. package/lib/esm/core-react/utils/reuseOrCreatePromise.d.ts.map +1 -0
  746. package/lib/esm/core-react/utils/reuseOrCreatePromise.js +29 -0
  747. package/lib/esm/core-react/utils/reuseOrCreatePromise.js.map +1 -0
  748. package/lib/esm/core-react/utils/shallowDiffers.d.ts.map +1 -1
  749. package/lib/esm/core-react/utils/shallowDiffers.js +3 -3
  750. package/lib/esm/core-react/utils/shallowDiffers.js.map +1 -1
  751. package/lib/esm/core-react/utils/typeUtils.js +3 -3
  752. package/lib/esm/core-react/utils/typeUtils.js.map +1 -1
  753. package/lib/esm/core-react.d.ts +3 -3
  754. package/lib/esm/core-react.d.ts.map +1 -1
  755. package/lib/esm/core-react.js +6 -6
  756. package/lib/esm/core-react.js.map +1 -1
  757. package/lib/public/locales/en/UiCore.json +1 -1
  758. package/package.json +8 -17
@@ -1 +1 @@
1
- {"version":3,"file":"CheckListBox.js","sourceRoot":"","sources":["../../../../src/core-react/checklistbox/CheckListBox.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAmBhD;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK,CAAC,aAAoC;IAC9D,MAAM;QACpB,MAAM,SAAS,GAAG,UAAU,CAAC,+BAA+B,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACpF,OAAO,CACL;YACE,oBAAC,QAAQ,IAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAClE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAC7C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,iBACvE,+BAA+B,GAAG,CAC7C,CACN,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO,CACL,6BAAK,SAAS,EAAC,4BAA4B,GAAG,CAC/C,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK,CAAC,aAGtC;IACgB,MAAM;QACpB,MAAM,SAAS,GAAG,UAAU,CAAC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACvE,OAAO,CACL,4BAAI,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IAC9C,IAAI,CAAC,KAAK,CAAC,QAAQ,CACjB,CACN,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module CheckListBox\n */\n\nimport \"./CheckListBox.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Checkbox } from \"@itwin/itwinui-react\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/** Properties for the [[CheckListBoxItem]] component\n * @public\n */\nexport interface CheckListBoxItemProps extends CommonProps {\n /** Label */\n label: string;\n /** Indicates whether the item is checked or not */\n checked?: boolean;\n /** Indicates whether the item is disabled or not */\n disabled?: boolean;\n /** Function called when item is clicked. */\n onClick?: () => any;\n /** Function called when item is changed. */\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => any;\n}\n\n/** Item with a checkbox added to a [[CheckListBox]].\n * @public\n */\nexport class CheckListBoxItem extends React.PureComponent<CheckListBoxItemProps> {\n public override render() {\n const className = classnames(\"core-chk-listboxitem-checkbox\", this.props.className);\n return (\n <li>\n <Checkbox checked={this.props.checked} disabled={this.props.disabled}\n className={className} style={this.props.style}\n label={this.props.label} onClick={this.props.onClick} onChange={this.props.onChange}\n data-testid=\"core-chk-listboxitem-checkbox\" />\n </li>\n );\n }\n}\n\n/** Separator added to a [[CheckListBox]].\n * @public\n */\nexport function CheckListBoxSeparator() {\n return (\n <div className=\"core-chk-listbox-separator\" />\n );\n}\n\n/** React component showing a list of Checkbox items.\n * @public\n */\nexport class CheckListBox extends React.PureComponent<CommonProps & {\n /** Content */\n children?: React.ReactNode;\n}> {\n public override render() {\n const className = classnames(\"core-chk-listbox\", this.props.className);\n return (\n <ul className={className} style={this.props.style}>\n {this.props.children}\n </ul>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"CheckListBox.js","sourceRoot":"","sources":["../../../../src/core-react/checklistbox/CheckListBox.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAmBhD;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK,CAAC,aAAoC;IAC9D,MAAM;QACpB,MAAM,SAAS,GAAG,UAAU,CAC1B,+BAA+B,EAC/B,IAAI,CAAC,KAAK,CAAC,SAAS,CACrB,CAAC;QACF,OAAO,CACL;YACE,oBAAC,QAAQ,IACP,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,iBACjB,+BAA+B,GAC3C,CACC,CACN,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO,6BAAK,SAAS,EAAC,4BAA4B,GAAG,CAAC;AACxD,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK,CAAC,aAKvC;IACiB,MAAM;QACpB,MAAM,SAAS,GAAG,UAAU,CAAC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACvE,OAAO,CACL,4BAAI,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IAC9C,IAAI,CAAC,KAAK,CAAC,QAAQ,CACjB,CACN,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module CheckListBox\n */\n\nimport \"./CheckListBox.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Checkbox } from \"@itwin/itwinui-react\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/** Properties for the [[CheckListBoxItem]] component\n * @public\n */\nexport interface CheckListBoxItemProps extends CommonProps {\n /** Label */\n label: string;\n /** Indicates whether the item is checked or not */\n checked?: boolean;\n /** Indicates whether the item is disabled or not */\n disabled?: boolean;\n /** Function called when item is clicked. */\n onClick?: () => any;\n /** Function called when item is changed. */\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => any;\n}\n\n/** Item with a checkbox added to a [[CheckListBox]].\n * @public\n */\nexport class CheckListBoxItem extends React.PureComponent<CheckListBoxItemProps> {\n public override render() {\n const className = classnames(\n \"core-chk-listboxitem-checkbox\",\n this.props.className\n );\n return (\n <li>\n <Checkbox\n checked={this.props.checked}\n disabled={this.props.disabled}\n className={className}\n style={this.props.style}\n label={this.props.label}\n onClick={this.props.onClick}\n onChange={this.props.onChange}\n data-testid=\"core-chk-listboxitem-checkbox\"\n />\n </li>\n );\n }\n}\n\n/** Separator added to a [[CheckListBox]].\n * @public\n */\nexport function CheckListBoxSeparator() {\n return <div className=\"core-chk-listbox-separator\" />;\n}\n\n/** React component showing a list of Checkbox items.\n * @public\n */\nexport class CheckListBox extends React.PureComponent<\n CommonProps & {\n /** Content */\n children?: React.ReactNode;\n }\n> {\n public override render() {\n const className = classnames(\"core-chk-listbox\", this.props.className);\n return (\n <ul className={className} style={this.props.style}>\n {this.props.children}\n </ul>\n );\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
 
6
6
  .core-chk-listbox {
7
7
  margin: 0;
@@ -19,4 +19,4 @@
19
19
  margin: 4px 0;
20
20
  pointer-events: none;
21
21
  }
22
- }
22
+ }
@@ -7,8 +7,8 @@ import type { CommonProps } from "../utils/Props";
7
7
  import { ContextMenuDirection } from "./ContextMenuDirection";
8
8
  import { ContextSubMenu } from "./ContextSubMenu";
9
9
  /** Properties for the [[ContextMenu]] component
10
- * @public
11
- */
10
+ * @public
11
+ */
12
12
  export interface ContextMenuProps extends CommonProps {
13
13
  /** Whether ContextMenu is currently opened. */
14
14
  opened: boolean;
@@ -46,10 +46,10 @@ interface ContextMenuState {
46
46
  ignoreNextKeyUp: boolean;
47
47
  }
48
48
  /**
49
- * A context menu populated with [[ContextMenuItem]] components.
50
- * Can be nested using [[ContextSubMenu]] component.
51
- * @public
52
- */
49
+ * A context menu populated with [[ContextMenuItem]] components.
50
+ * Can be nested using [[ContextSubMenu]] component.
51
+ * @public
52
+ */
53
53
  export declare class ContextMenu extends React.PureComponent<ContextMenuProps, ContextMenuState> {
54
54
  private _rootElement;
55
55
  private _menuElement;
@@ -70,7 +70,7 @@ export declare class ContextMenu extends React.PureComponent<ContextMenuProps, C
70
70
  static autoFlip: (dir: ContextMenuDirection, rect: DOMRectReadOnly, windowWidth: number, windowHeight: number) => ContextMenuDirection;
71
71
  private _handleHotKeyParsed;
72
72
  private _handleOnOutsideClick;
73
- render(): JSX.Element;
73
+ render(): React.ReactElement;
74
74
  /** @internal */
75
75
  static getCSSClassNameFromDirection: (direction?: ContextMenuDirection) => string;
76
76
  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,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;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,C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QAAQ,CAAC,gBAAgB,CAAC,CAAC;gBAC/C,KAAK,EAAE,gBAAgB;IASnC,gBAAgB;IAChB,OAAc,QAAQ,QACf,oBAAoB,QACnB,eAAe,eACR,MAAM,gBACL,MAAM,KACnB,oBAAoB,CAsDrB;IAEF,OAAO,CAAC,mBAAmB,CAEzB;IAGF,OAAO,CAAC,qBAAqB,CAG3B;IAEc,MAAM,IAAI,KAAK,CAAC,YAAY;IAqE5C,gBAAgB;IAChB,OAAc,4BAA4B,eAC5B,oBAAoB,KAC/B,MAAM,CAuCP;IAEF,OAAO,CAAC,oBAAoB,CAgD1B;IAEF,OAAO,CAAC,QAAQ,CAEd;IAEF,OAAO,CAAC,QAAQ,CAEd;IAEF,OAAO,CAAC,SAAS;IASjB,gBAAgB;IACA,iBAAiB;IAUjC,gBAAgB;IACA,oBAAoB;IAMpC,OAAO,CAAC,oBAAoB;IA8BrB,KAAK,aAGV;IAEK,IAAI,aAGT;IAEK,OAAO,QAAO,OAAO,CAQ1B;IAEF,OAAO,CAAC,kBAAkB,CAUxB;IAEF,OAAO,CAAC,YAAY,CAElB;IAEF,OAAO,CAAC,YAAY,CAiFlB;IAEc,kBAAkB,CAAC,SAAS,EAAE,gBAAgB;CAa/D"}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  /** @packageDocumentation
6
6
  * @module ContextMenu
7
7
  */
@@ -14,10 +14,10 @@ import { ContextMenuDirection } from "./ContextMenuDirection";
14
14
  import { ContextMenuItem } from "./ContextMenuItem";
15
15
  import { ContextSubMenu } from "./ContextSubMenu";
16
16
  /**
17
- * A context menu populated with [[ContextMenuItem]] components.
18
- * Can be nested using [[ContextSubMenu]] component.
19
- * @public
20
- */
17
+ * A context menu populated with [[ContextMenuItem]] components.
18
+ * Can be nested using [[ContextSubMenu]] component.
19
+ * @public
20
+ */
21
21
  class ContextMenu extends React.PureComponent {
22
22
  constructor(props) {
23
23
  super(props);
@@ -43,15 +43,20 @@ class ContextMenu extends React.PureComponent {
43
43
  // add inheritance data to submenu children
44
44
  const ch = React.Children.map(children, (child) => {
45
45
  // Capture only ContextSubMenus and ContextMenuItems.
46
- if (child && typeof child === "object" && "props" in child && (child.type === ContextSubMenu || child.type === ContextMenuItem) &&
47
- !ConditionalBooleanValue.getValue(child.props.disabled) && !ConditionalBooleanValue.getValue(child.props.hidden)) {
46
+ if (child &&
47
+ typeof child === "object" &&
48
+ "props" in child &&
49
+ (child.type === ContextSubMenu || child.type === ContextMenuItem) &&
50
+ !ConditionalBooleanValue.getValue(child.props.disabled) &&
51
+ !ConditionalBooleanValue.getValue(child.props.hidden)) {
48
52
  const id = index; // get separate id variable so value stays the same when onHover is called later.
49
53
  const onHover = () => {
50
54
  this.setState({ selectedIndex: id });
51
55
  this.focus();
52
56
  };
53
57
  const ref = (el) => {
54
- if (selectedIndex === id) // only save to this._selectedElement if previously captured bool is true
58
+ if (selectedIndex === id)
59
+ // only save to this._selectedElement if previously captured bool is true
55
60
  this._selectedElement = el;
56
61
  };
57
62
  const boundHandleHotKeyParse = this._handleHotKeyParsed.bind(this, id); // bind local callback for specific index
@@ -62,8 +67,10 @@ class ContextMenu extends React.PureComponent {
62
67
  isSelected: selectedIndex === id,
63
68
  onHotKeyParsed: boundHandleHotKeyParse,
64
69
  };
65
- if (child.type === ContextSubMenu) { // add direction only to sub-menus
66
- childProps.direction = child.props.direction || /* istanbul ignore next */ direction;
70
+ if (child.type === ContextSubMenu) {
71
+ // add direction only to sub-menus
72
+ childProps.direction =
73
+ child.props.direction || /* istanbul ignore next */ direction;
67
74
  }
68
75
  index++;
69
76
  return React.cloneElement(child, childProps);
@@ -100,7 +107,11 @@ class ContextMenu extends React.PureComponent {
100
107
  };
101
108
  this._handleFocusChange = (event) => {
102
109
  // istanbul ignore else
103
- if (this._rootElement && this.props.opened && event.target instanceof Node && this.props.onOutsideClick && !this._rootElement.contains(event.target))
110
+ if (this._rootElement &&
111
+ this.props.opened &&
112
+ event.target instanceof Node &&
113
+ this.props.onOutsideClick &&
114
+ !this._rootElement.contains(event.target))
104
115
  this.props.onOutsideClick(event);
105
116
  };
106
117
  this._handleClick = (event) => {
@@ -115,7 +126,8 @@ class ContextMenu extends React.PureComponent {
115
126
  // istanbul ignore else
116
127
  if (event.key) {
117
128
  for (const [key, value] of this._hotKeyMap) {
118
- if (!this.props.hotkeySelect && key > this.state.selectedIndex) { // Start search at current index.
129
+ if (!this.props.hotkeySelect && key > this.state.selectedIndex) {
130
+ // Start search at current index.
119
131
  if (event.key.toUpperCase() === value) {
120
132
  this.setState({ selectedIndex: key });
121
133
  return;
@@ -148,17 +160,21 @@ class ContextMenu extends React.PureComponent {
148
160
  if (this.props.onEsc)
149
161
  this.props.onEsc(event);
150
162
  }
151
- if ((event.key === SpecialKey.Enter || event.key === SpecialKey.ArrowRight) && this._selectedElement) {
163
+ if ((event.key === SpecialKey.Enter || event.key === SpecialKey.ArrowRight) &&
164
+ this._selectedElement) {
152
165
  event.stopPropagation();
153
166
  // istanbul ignore else
154
- if (event.key === SpecialKey.Enter || /* istanbul ignore next */ this._selectedElement instanceof ContextSubMenu) {
167
+ if (event.key === SpecialKey.Enter ||
168
+ /* istanbul ignore next */ this._selectedElement instanceof
169
+ ContextSubMenu) {
155
170
  // istanbul ignore else
156
171
  if (this._selectedElement.select)
157
172
  this._selectedElement.select();
158
173
  }
159
174
  }
160
175
  let { selectedIndex } = this.state;
161
- if (event.key === SpecialKey.ArrowUp || event.key === SpecialKey.ArrowDown) {
176
+ if (event.key === SpecialKey.ArrowUp ||
177
+ event.key === SpecialKey.ArrowDown) {
162
178
  event.stopPropagation();
163
179
  if (selectedIndex === -1) {
164
180
  selectedIndex = 0;
@@ -187,11 +203,11 @@ class ContextMenu extends React.PureComponent {
187
203
  };
188
204
  }
189
205
  render() {
190
- const { opened, direction, onOutsideClick, onSelect, onEsc, autoflip, edgeLimit, hotkeySelect, // eslint-disable-line @typescript-eslint/no-unused-vars
191
- selectedIndex, floating, parentMenu, parentSubmenu, children, className, ignoreNextKeyUp, // eslint-disable-line @typescript-eslint/no-unused-vars
192
- ...props } = this.props;
206
+ const { opened, direction, onOutsideClick, onSelect, onEsc, autoflip, edgeLimit, hotkeySelect, selectedIndex, floating, parentMenu, parentSubmenu, children, className, ignoreNextKeyUp, ...props } = this.props;
193
207
  const renderDirection = parentMenu === undefined ? this.state.direction : direction;
194
- if (this._lastChildren !== children || this._lastDirection !== renderDirection || this._lastSelectedIndex !== this.state.selectedIndex) {
208
+ if (this._lastChildren !== children ||
209
+ this._lastDirection !== renderDirection ||
210
+ this._lastSelectedIndex !== this.state.selectedIndex) {
195
211
  this._injectedChildren = this._injectMenuItemProps(children, renderDirection, this.state.selectedIndex);
196
212
  this._lastChildren = children;
197
213
  this._lastDirection = renderDirection;
@@ -204,7 +220,9 @@ class ContextMenu extends React.PureComponent {
204
220
  }
205
221
  getWindow() {
206
222
  var _a;
207
- const el = this._rootElement ? this._rootElement : /* istanbul ignore next */ this._menuElement;
223
+ const el = this._rootElement
224
+ ? this._rootElement
225
+ : /* istanbul ignore next */ this._menuElement;
208
226
  const parentDocument = el.ownerDocument;
209
227
  // istanbul ignore next
210
228
  return (_a = parentDocument.defaultView) !== null && _a !== void 0 ? _a : window;
@@ -228,7 +246,8 @@ class ContextMenu extends React.PureComponent {
228
246
  const { direction, autoflip, parentMenu } = this.props;
229
247
  const parentWindow = this.getWindow();
230
248
  let renderDirection = parentMenu === undefined ? this.state.direction : direction;
231
- if (parentWindow.innerHeight === this._parentWindowHeight && parentWindow.innerWidth === this._parentWindowWidth)
249
+ if (parentWindow.innerHeight === this._parentWindowHeight &&
250
+ parentWindow.innerWidth === this._parentWindowWidth)
232
251
  return;
233
252
  this._parentWindowHeight = parentWindow.innerHeight;
234
253
  this._parentWindowWidth = parentWindow.innerWidth;
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenu.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA2ClD;;;;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,oBAAoB,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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C,CAAC;YAC3D,MAAM;QACR,KAAK,oBAAoB,CAAC,GAAG;YAC3B,SAAS,GAAG,uBAAuB,CAAC;YACpC,MAAM;QACR,KAAK,oBAAoB,CAAC,QAAQ;YAChC,SAAS,GAAG,+CAA+C,CAAC;YAC5D,MAAM;QACR,KAAK,oBAAoB,CAAC,IAAI;YAC5B,SAAS,GAAG,wBAAwB,CAAC;YACrC,MAAM;QACR,KAAK,oBAAoB,CAAC,MAAM;YAC9B,SAAS,GAAG,0BAA0B,CAAC;YACvC,MAAM;QACR,KAAK,oBAAoB,CAAC,KAAK;YAC7B,SAAS,GAAG,yBAAyB,CAAC;YACtC,MAAM;QACR,KAAK,oBAAoB,CAAC,UAAU;YAClC,SAAS,GAAG,iDAAiD,CAAC;YAC9D,MAAM;QACR,KAAK,oBAAoB,CAAC,MAAM;YAC9B,SAAS,GAAG,0BAA0B,CAAC;YACvC,MAAM;QACR,KAAK,oBAAoB,CAAC,WAAW;YACnC,SAAS,GAAG,kDAAkD,CAAC;YAC/D,MAAM;KACT;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,AAzCyC,CAyCxC;SA1LS,WAAW","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContextMenu\n */\n\nimport \"./ContextMenu.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { ConditionalBooleanValue, SpecialKey } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { DivWithOutsideClick } from \"../base/DivWithOutsideClick\";\nimport { ContextMenuDirection } from \"./ContextMenuDirection\";\nimport type { ContextMenuItemProps } from \"./ContextMenuItem\";\nimport { ContextMenuItem } from \"./ContextMenuItem\";\nimport type { ContextSubMenuProps } from \"./ContextSubMenu\";\nimport { ContextSubMenu } from \"./ContextSubMenu\";\n\n/** Properties for the [[ContextMenu]] component\n * @public\n */\nexport interface ContextMenuProps extends CommonProps {\n /** Whether ContextMenu is currently opened. */\n opened: boolean;\n /** Which direction the menu opens. Default: ContextMenuDirection.BottomRight */\n direction?: ContextMenuDirection;\n /** When click is registered outside of ContextMenu. */\n onOutsideClick?: (event: MouseEvent) => any;\n /** When list item or submenu is selected */\n onSelect?: (event: any) => any;\n /** when Escape button is pressed */\n onEsc?: (data: any) => any;\n /** Whether menu flips directions based on screen edge. Default: true */\n autoflip?: boolean;\n /** Whether menu hugs screen edge when autoflip is off. Default: true */\n edgeLimit?: boolean;\n /** Whether Hotkey press selects item, or just highlights item. Default: true */\n hotkeySelect?: boolean;\n /** starting menu item selected index Default: -1 */\n selectedIndex?: number;\n /** whether menu floats on the viewport, or the page. When false, container elements can clip menu with overflow: hidden; Default: true */\n floating?: boolean;\n /** @internal */\n parentMenu?: ContextMenu;\n /** @internal */\n parentSubmenu?: ContextSubMenu;\n /** @internal */\n ignoreNextKeyUp?: boolean;\n /** Content */\n children?: React.ReactNode;\n}\n\n/** @internal */\ninterface ContextMenuState {\n selectedIndex: number;\n direction: ContextMenuDirection;\n ignoreNextKeyUp: boolean;\n}\n\n/**\n * A context menu populated with [[ContextMenuItem]] components.\n * Can be nested using [[ContextSubMenu]] component.\n * @public\n */\nexport class ContextMenu extends React.PureComponent<ContextMenuProps, ContextMenuState> {\n private _rootElement: HTMLElement | null = null;\n private _menuElement: HTMLElement | null = null;\n private _selectedElement: ContextMenuItem | ContextSubMenu | null = null;\n private _length: number = 0;\n private _hotKeyMap: Map<number, string> = new Map();\n\n private _lastChildren: React.ReactNode;\n private _lastDirection: ContextMenuDirection | undefined = ContextMenuDirection.BottomRight;\n private _lastSelectedIndex: number = 0;\n private _injectedChildren: React.ReactNode;\n private _parentWindowHeight: number = 0;\n private _parentWindowWidth: number = 0;\n\n public static defaultProps: Partial<ContextMenuProps> = {\n direction: ContextMenuDirection.BottomRight,\n autoflip: true,\n edgeLimit: true,\n hotkeySelect: true,\n selectedIndex: -1,\n floating: true,\n };\n\n /** @internal */\n public override readonly state: Readonly<ContextMenuState>;\n constructor(props: ContextMenuProps) {\n super(props);\n this.state = {\n selectedIndex: this.props.selectedIndex!,\n direction: props.direction!,\n ignoreNextKeyUp: props.ignoreNextKeyUp!,\n };\n }\n\n /** @internal */\n public static autoFlip = (dir: ContextMenuDirection, rect: DOMRectReadOnly, windowWidth: number, windowHeight: number): ContextMenuDirection => {\n if (rect.right > windowWidth) {\n switch (dir) {\n case ContextMenuDirection.TopRight:\n dir = ContextMenuDirection.TopLeft;\n break;\n case ContextMenuDirection.Right:\n dir = ContextMenuDirection.Left;\n break;\n case ContextMenuDirection.BottomRight:\n dir = ContextMenuDirection.BottomLeft;\n break;\n }\n }\n if (rect.left < 0) {\n switch (dir) {\n case ContextMenuDirection.TopLeft:\n dir = ContextMenuDirection.TopRight;\n break;\n case ContextMenuDirection.Left:\n dir = ContextMenuDirection.Right;\n break;\n case ContextMenuDirection.BottomLeft:\n dir = ContextMenuDirection.BottomRight;\n break;\n }\n }\n if (rect.bottom > windowHeight) {\n switch (dir) {\n case ContextMenuDirection.BottomLeft:\n dir = ContextMenuDirection.TopLeft;\n break;\n case ContextMenuDirection.Bottom:\n dir = ContextMenuDirection.Top;\n break;\n case ContextMenuDirection.BottomRight:\n dir = ContextMenuDirection.TopRight;\n break;\n }\n }\n if (rect.top < 0) {\n switch (dir) {\n case ContextMenuDirection.TopLeft:\n dir = ContextMenuDirection.BottomLeft;\n break;\n case ContextMenuDirection.Top:\n dir = ContextMenuDirection.Bottom;\n break;\n case ContextMenuDirection.TopRight:\n dir = ContextMenuDirection.BottomRight;\n break;\n }\n }\n return dir;\n };\n\n private _handleHotKeyParsed = (index: number, hotKey: string) => {\n this._hotKeyMap.set(index, hotKey);\n };\n\n // istanbul ignore next\n private _handleOnOutsideClick = (event: MouseEvent): void => {\n if (this.props.opened && this.props.onOutsideClick)\n this.props.onOutsideClick(event);\n };\n\n public override render(): JSX.Element {\n const {\n opened, direction, onOutsideClick, onSelect, onEsc, autoflip, edgeLimit, hotkeySelect, // eslint-disable-line @typescript-eslint/no-unused-vars\n selectedIndex, floating, parentMenu, parentSubmenu, children, className, ignoreNextKeyUp, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...props } = this.props;\n const renderDirection = parentMenu === undefined ? this.state.direction : direction;\n\n if (this._lastChildren !== children || this._lastDirection !== renderDirection || this._lastSelectedIndex !== this.state.selectedIndex) {\n this._injectedChildren = this._injectMenuItemProps(children, renderDirection, this.state.selectedIndex);\n this._lastChildren = children;\n this._lastDirection = renderDirection;\n this._lastSelectedIndex = this.state.selectedIndex;\n }\n\n const classNames = classnames(\"core-context-menu\", className);\n\n return (\n <div\n role=\"presentation\"\n className={classNames}\n onKeyUp={this._handleKeyUp}\n onClick={this._handleClick}\n data-testid=\"core-context-menu-root\"\n {...props}\n ref={this._rootRef}>\n <DivWithOutsideClick onOutsideClick={this._handleOnOutsideClick}>\n <div\n ref={this._menuRef}\n role=\"menu\"\n tabIndex={0}\n data-testid=\"core-context-menu-container\"\n className={classnames(\"core-context-menu-container\",\n opened && \"core-context-menu-opened\",\n floating && \"core-context-menu-floating\",\n ContextMenu.getCSSClassNameFromDirection(renderDirection),\n )}>\n {this._injectedChildren}\n </div>\n </DivWithOutsideClick>\n </div>\n );\n }\n\n /** @internal */\n public static getCSSClassNameFromDirection = (direction?: ContextMenuDirection): string => {\n let className = \"\";\n\n // istanbul ignore next\n if (direction === undefined)\n direction = ContextMenuDirection.BottomRight;\n\n if (direction === ContextMenuDirection.None)\n return \"\";\n\n switch (direction) {\n case ContextMenuDirection.TopLeft:\n className = \"core-context-menu-top core-context-menu-left\";\n break;\n case ContextMenuDirection.Top:\n className = \"core-context-menu-top\";\n break;\n case ContextMenuDirection.TopRight:\n className = \"core-context-menu-top core-context-menu-right\";\n break;\n case ContextMenuDirection.Left:\n className = \"core-context-menu-left\";\n break;\n case ContextMenuDirection.Center:\n className = \"core-context-menu-center\";\n break;\n case ContextMenuDirection.Right:\n className = \"core-context-menu-right\";\n break;\n case ContextMenuDirection.BottomLeft:\n className = \"core-context-menu-bottom core-context-menu-left\";\n break;\n case ContextMenuDirection.Bottom:\n className = \"core-context-menu-bottom\";\n break;\n case ContextMenuDirection.BottomRight:\n className = \"core-context-menu-bottom core-context-menu-right\";\n break;\n }\n\n return className;\n };\n\n private _injectMenuItemProps = (children: React.ReactNode, direction: ContextMenuDirection | undefined, selectedIndex: number) => {\n let index = 0;\n // add inheritance data to submenu children\n const ch = React.Children.map(children, (child: React.ReactNode) => {\n // Capture only ContextSubMenus and ContextMenuItems.\n if (child && typeof child === \"object\" && \"props\" in child && (child.type === ContextSubMenu || child.type === ContextMenuItem) &&\n !ConditionalBooleanValue.getValue(child.props.disabled) && !ConditionalBooleanValue.getValue(child.props.hidden)) {\n const id = index; // get separate id variable so value stays the same when onHover is called later.\n const onHover = () => {\n this.setState({ selectedIndex: id });\n this.focus();\n };\n const ref = (el: ContextSubMenu | ContextMenuItem | null) => {\n if (selectedIndex === id) // only save to this._selectedElement if previously captured bool is true\n this._selectedElement = el;\n };\n const boundHandleHotKeyParse = this._handleHotKeyParsed.bind(this, id); // bind local callback for specific index\n const childProps: Partial<ContextSubMenuProps & ContextMenuItemProps & { ref: typeof ref }> = {\n parentMenu: this,\n ref,\n onHover,\n isSelected: selectedIndex === id,\n onHotKeyParsed: boundHandleHotKeyParse,\n };\n if (child.type === ContextSubMenu) { // add direction only to sub-menus\n childProps.direction = child.props.direction || /* istanbul ignore next */ direction;\n }\n index++;\n return React.cloneElement(child, childProps);\n } else return child; // Else, pass through unmodified\n });\n this._length = index;\n return ch;\n };\n\n private _rootRef = (el: HTMLDivElement | null) => {\n this._rootElement = el;\n };\n\n private _menuRef = (el: HTMLDivElement | null) => {\n this._menuElement = el;\n };\n\n private getWindow() {\n const el = this._rootElement ? this._rootElement : /* istanbul ignore next */ this._menuElement;\n const parentDocument = el!.ownerDocument;\n // istanbul ignore next\n return parentDocument.defaultView ?? window;\n }\n\n /** @internal */\n public override componentDidMount() {\n const parentWindow = this.getWindow();\n parentWindow.addEventListener(\"focus\", this._handleFocusChange);\n parentWindow.addEventListener(\"mouseup\", this._handleFocusChange);\n\n this.checkRenderDirection();\n\n if (this.props.opened)\n this.focus();\n }\n\n /** @internal */\n public override componentWillUnmount() {\n const parentWindow = this.getWindow();\n parentWindow.removeEventListener(\"focus\", this._handleFocusChange);\n parentWindow.removeEventListener(\"mouseup\", this._handleFocusChange);\n }\n\n private checkRenderDirection() {\n const { direction, autoflip, parentMenu } = this.props;\n const parentWindow = this.getWindow();\n\n let renderDirection = parentMenu === undefined ? this.state.direction : direction;\n\n if (parentWindow.innerHeight === this._parentWindowHeight && parentWindow.innerWidth === this._parentWindowWidth)\n return;\n this._parentWindowHeight = parentWindow.innerHeight;\n this._parentWindowWidth = parentWindow.innerWidth;\n\n // check if menu should flip\n if (parentWindow && autoflip && parentMenu === undefined) {\n const menuRect = this.getRect();\n renderDirection = ContextMenu.autoFlip(renderDirection!, menuRect, parentWindow.innerWidth, parentWindow.innerHeight);\n // istanbul ignore next\n if (renderDirection !== this.state.direction)\n this.setState({ direction: renderDirection });\n }\n }\n\n public focus = () => {\n // istanbul ignore else\n if (this._menuElement)\n this._menuElement.focus();\n };\n\n public blur = () => {\n // istanbul ignore else\n if (this._menuElement)\n this._menuElement.blur();\n };\n\n public getRect = (): DOMRect => {\n let clientRect = DOMRect.fromRect({ x: 0, y: 0, width: 0, height: 0});\n\n // istanbul ignore else\n if (this._menuElement) {\n clientRect = this._menuElement.getBoundingClientRect();\n }\n return clientRect;\n };\n\n private _handleFocusChange = (event: any): void => {\n // istanbul ignore else\n if (this._rootElement && this.props.opened && event.target instanceof Node && this.props.onOutsideClick && !this._rootElement.contains(event.target))\n this.props.onOutsideClick(event);\n };\n\n private _handleClick = (event: React.MouseEvent<HTMLDivElement>): void => {\n if (this.props.onSelect)\n this.props.onSelect(event);\n };\n\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>): void => {\n if (this.state.ignoreNextKeyUp) {\n this.setState({ ignoreNextKeyUp: false });\n return;\n }\n\n // istanbul ignore else\n if (event.key) {\n for (const [key, value] of this._hotKeyMap) {\n if (!this.props.hotkeySelect! && key > this.state.selectedIndex) { // Start search at current index.\n if (event.key.toUpperCase() === value) {\n this.setState({ selectedIndex: key });\n return;\n }\n }\n }\n for (const [key, value] of this._hotKeyMap) {\n if (event.key.toUpperCase() === value) {\n this.setState({ selectedIndex: key }, () => {\n if (this.props.hotkeySelect && this._selectedElement) {\n this._selectedElement.select();\n }\n });\n event.stopPropagation();\n return;\n }\n }\n }\n\n if (event.key === SpecialKey.ArrowLeft) {\n event.stopPropagation();\n if (this.props.parentMenu && this.props.parentSubmenu) {\n this.props.parentSubmenu.close();\n this.props.parentMenu.focus();\n }\n if (this.props.onEsc)\n this.props.onEsc(event);\n }\n\n if (event.key === SpecialKey.Escape) {\n // istanbul ignore else\n if (this.props.onEsc)\n this.props.onEsc(event);\n }\n\n if ((event.key === SpecialKey.Enter || event.key === SpecialKey.ArrowRight) && this._selectedElement) {\n event.stopPropagation();\n\n // istanbul ignore else\n if (event.key === SpecialKey.Enter || /* istanbul ignore next */ this._selectedElement instanceof ContextSubMenu) {\n // istanbul ignore else\n if (this._selectedElement.select)\n this._selectedElement.select();\n }\n }\n\n let { selectedIndex } = this.state;\n if (event.key === SpecialKey.ArrowUp || event.key === SpecialKey.ArrowDown) {\n event.stopPropagation();\n if (selectedIndex === -1) {\n selectedIndex = 0;\n } else {\n if (event.key === SpecialKey.ArrowUp) {\n if (this.state.selectedIndex === 0)\n selectedIndex = this._length - 1;\n else\n selectedIndex--;\n }\n if (event.key === SpecialKey.ArrowDown) {\n if (this.state.selectedIndex === this._length - 1)\n selectedIndex = 0;\n else\n selectedIndex++;\n }\n }\n }\n this.setState({ selectedIndex });\n };\n\n public override componentDidUpdate(prevProps: ContextMenuProps) {\n if (prevProps.selectedIndex !== this.props.selectedIndex) {\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\n }\n if (!prevProps.opened && this.props.opened) {\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\n }\n if (!this.props.parentMenu) {\n // const direction = this.props.direction!;\n // if ((!this.props.opened && prevProps.opened && direction !== this.state.direction) || prevProps.direction !== direction)\n this.checkRenderDirection();\n }\n }\n}\n"]}
1
+ {"version":3,"file":"ContextMenu.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenu.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA2ClD;;;;GAIG;AACH,MAAa,WAAY,SAAQ,KAAK,CAAC,aAGtC;IA0BC,YAAY,KAAuB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;QA1BP,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,GACpB,oBAAoB,CAAC,WAAW,CAAC;QAC3B,uBAAkB,GAAW,CAAC,CAAC;QAE/B,wBAAmB,GAAW,CAAC,CAAC;QAChC,uBAAkB,GAAW,CAAC,CAAC;QAoF/B,wBAAmB,GAAG,CAAC,KAAa,EAAE,MAAc,EAAE,EAAE;YAC9D,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,EAAE;QACjB,KAAK,oBAAoB,CAAC,OAAO;YAC/B,SAAS,GAAG,8CAA8C,CAAC;YAC3D,MAAM;QACR,KAAK,oBAAoB,CAAC,GAAG;YAC3B,SAAS,GAAG,uBAAuB,CAAC;YACpC,MAAM;QACR,KAAK,oBAAoB,CAAC,QAAQ;YAChC,SAAS,GAAG,+CAA+C,CAAC;YAC5D,MAAM;QACR,KAAK,oBAAoB,CAAC,IAAI;YAC5B,SAAS,GAAG,wBAAwB,CAAC;YACrC,MAAM;QACR,KAAK,oBAAoB,CAAC,MAAM;YAC9B,SAAS,GAAG,0BAA0B,CAAC;YACvC,MAAM;QACR,KAAK,oBAAoB,CAAC,KAAK;YAC7B,SAAS,GAAG,yBAAyB,CAAC;YACtC,MAAM;QACR,KAAK,oBAAoB,CAAC,UAAU;YAClC,SAAS,GAAG,iDAAiD,CAAC;YAC9D,MAAM;QACR,KAAK,oBAAoB,CAAC,MAAM;YAC9B,SAAS,GAAG,0BAA0B,CAAC;YACvC,MAAM;QACR,KAAK,oBAAoB,CAAC,WAAW;YACnC,SAAS,GAAG,kDAAkD,CAAC;YAC/D,MAAM;KACT;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,AAzCyC,CAyCxC;SA7NS,WAAW","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContextMenu\n */\n\nimport \"./ContextMenu.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { ConditionalBooleanValue, SpecialKey } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { DivWithOutsideClick } from \"../base/DivWithOutsideClick\";\nimport { ContextMenuDirection } from \"./ContextMenuDirection\";\nimport type { ContextMenuItemProps } from \"./ContextMenuItem\";\nimport { ContextMenuItem } from \"./ContextMenuItem\";\nimport type { ContextSubMenuProps } from \"./ContextSubMenu\";\nimport { ContextSubMenu } from \"./ContextSubMenu\";\n\n/** Properties for the [[ContextMenu]] component\n * @public\n */\nexport interface ContextMenuProps extends CommonProps {\n /** Whether ContextMenu is currently opened. */\n opened: boolean;\n /** Which direction the menu opens. Default: ContextMenuDirection.BottomRight */\n direction?: ContextMenuDirection;\n /** When click is registered outside of ContextMenu. */\n onOutsideClick?: (event: MouseEvent) => any;\n /** When list item or submenu is selected */\n onSelect?: (event: any) => any;\n /** when Escape button is pressed */\n onEsc?: (data: any) => any;\n /** Whether menu flips directions based on screen edge. Default: true */\n autoflip?: boolean;\n /** Whether menu hugs screen edge when autoflip is off. Default: true */\n edgeLimit?: boolean;\n /** Whether Hotkey press selects item, or just highlights item. Default: true */\n hotkeySelect?: boolean;\n /** starting menu item selected index Default: -1 */\n selectedIndex?: number;\n /** whether menu floats on the viewport, or the page. When false, container elements can clip menu with overflow: hidden; Default: true */\n floating?: boolean;\n /** @internal */\n parentMenu?: ContextMenu;\n /** @internal */\n parentSubmenu?: ContextSubMenu;\n /** @internal */\n ignoreNextKeyUp?: boolean;\n /** Content */\n children?: React.ReactNode;\n}\n\n/** @internal */\ninterface ContextMenuState {\n selectedIndex: number;\n direction: ContextMenuDirection;\n ignoreNextKeyUp: boolean;\n}\n\n/**\n * A context menu populated with [[ContextMenuItem]] components.\n * Can be nested using [[ContextSubMenu]] component.\n * @public\n */\nexport class ContextMenu extends React.PureComponent<\n ContextMenuProps,\n ContextMenuState\n> {\n private _rootElement: HTMLElement | null = null;\n private _menuElement: HTMLElement | null = null;\n private _selectedElement: ContextMenuItem | ContextSubMenu | null = null;\n private _length: number = 0;\n private _hotKeyMap: Map<number, string> = new Map();\n\n private _lastChildren: React.ReactNode;\n private _lastDirection: ContextMenuDirection | undefined =\n ContextMenuDirection.BottomRight;\n private _lastSelectedIndex: number = 0;\n private _injectedChildren: React.ReactNode;\n private _parentWindowHeight: number = 0;\n private _parentWindowWidth: number = 0;\n\n public static defaultProps: Partial<ContextMenuProps> = {\n direction: ContextMenuDirection.BottomRight,\n autoflip: true,\n edgeLimit: true,\n hotkeySelect: true,\n selectedIndex: -1,\n floating: true,\n };\n\n /** @internal */\n public override readonly state: Readonly<ContextMenuState>;\n constructor(props: ContextMenuProps) {\n super(props);\n this.state = {\n selectedIndex: this.props.selectedIndex!,\n direction: props.direction!,\n ignoreNextKeyUp: props.ignoreNextKeyUp!,\n };\n }\n\n /** @internal */\n public static autoFlip = (\n dir: ContextMenuDirection,\n rect: DOMRectReadOnly,\n windowWidth: number,\n windowHeight: number\n ): ContextMenuDirection => {\n if (rect.right > windowWidth) {\n switch (dir) {\n case ContextMenuDirection.TopRight:\n dir = ContextMenuDirection.TopLeft;\n break;\n case ContextMenuDirection.Right:\n dir = ContextMenuDirection.Left;\n break;\n case ContextMenuDirection.BottomRight:\n dir = ContextMenuDirection.BottomLeft;\n break;\n }\n }\n if (rect.left < 0) {\n switch (dir) {\n case ContextMenuDirection.TopLeft:\n dir = ContextMenuDirection.TopRight;\n break;\n case ContextMenuDirection.Left:\n dir = ContextMenuDirection.Right;\n break;\n case ContextMenuDirection.BottomLeft:\n dir = ContextMenuDirection.BottomRight;\n break;\n }\n }\n if (rect.bottom > windowHeight) {\n switch (dir) {\n case ContextMenuDirection.BottomLeft:\n dir = ContextMenuDirection.TopLeft;\n break;\n case ContextMenuDirection.Bottom:\n dir = ContextMenuDirection.Top;\n break;\n case ContextMenuDirection.BottomRight:\n dir = ContextMenuDirection.TopRight;\n break;\n }\n }\n if (rect.top < 0) {\n switch (dir) {\n case ContextMenuDirection.TopLeft:\n dir = ContextMenuDirection.BottomLeft;\n break;\n case ContextMenuDirection.Top:\n dir = ContextMenuDirection.Bottom;\n break;\n case ContextMenuDirection.TopRight:\n dir = ContextMenuDirection.BottomRight;\n break;\n }\n }\n return dir;\n };\n\n private _handleHotKeyParsed = (index: number, hotKey: string) => {\n this._hotKeyMap.set(index, hotKey);\n };\n\n // istanbul ignore next\n private _handleOnOutsideClick = (event: MouseEvent): void => {\n if (this.props.opened && this.props.onOutsideClick)\n this.props.onOutsideClick(event);\n };\n\n public override render(): React.ReactElement {\n const {\n opened,\n direction,\n onOutsideClick,\n onSelect,\n onEsc,\n autoflip,\n edgeLimit,\n hotkeySelect,\n selectedIndex,\n floating,\n parentMenu,\n parentSubmenu,\n children,\n className,\n ignoreNextKeyUp,\n ...props\n } = this.props;\n const renderDirection =\n parentMenu === undefined ? this.state.direction : direction;\n\n if (\n this._lastChildren !== children ||\n this._lastDirection !== renderDirection ||\n this._lastSelectedIndex !== this.state.selectedIndex\n ) {\n this._injectedChildren = this._injectMenuItemProps(\n children,\n renderDirection,\n this.state.selectedIndex\n );\n this._lastChildren = children;\n this._lastDirection = renderDirection;\n this._lastSelectedIndex = this.state.selectedIndex;\n }\n\n const classNames = classnames(\"core-context-menu\", className);\n\n return (\n <div\n role=\"presentation\"\n className={classNames}\n onKeyUp={this._handleKeyUp}\n onClick={this._handleClick}\n data-testid=\"core-context-menu-root\"\n {...props}\n ref={this._rootRef}\n >\n <DivWithOutsideClick onOutsideClick={this._handleOnOutsideClick}>\n <div\n ref={this._menuRef}\n role=\"menu\"\n tabIndex={0}\n data-testid=\"core-context-menu-container\"\n className={classnames(\n \"core-context-menu-container\",\n opened && \"core-context-menu-opened\",\n floating && \"core-context-menu-floating\",\n ContextMenu.getCSSClassNameFromDirection(renderDirection)\n )}\n >\n {this._injectedChildren}\n </div>\n </DivWithOutsideClick>\n </div>\n );\n }\n\n /** @internal */\n public static getCSSClassNameFromDirection = (\n direction?: ContextMenuDirection\n ): string => {\n let className = \"\";\n\n // istanbul ignore next\n if (direction === undefined) direction = ContextMenuDirection.BottomRight;\n\n if (direction === ContextMenuDirection.None) return \"\";\n\n switch (direction) {\n case ContextMenuDirection.TopLeft:\n className = \"core-context-menu-top core-context-menu-left\";\n break;\n case ContextMenuDirection.Top:\n className = \"core-context-menu-top\";\n break;\n case ContextMenuDirection.TopRight:\n className = \"core-context-menu-top core-context-menu-right\";\n break;\n case ContextMenuDirection.Left:\n className = \"core-context-menu-left\";\n break;\n case ContextMenuDirection.Center:\n className = \"core-context-menu-center\";\n break;\n case ContextMenuDirection.Right:\n className = \"core-context-menu-right\";\n break;\n case ContextMenuDirection.BottomLeft:\n className = \"core-context-menu-bottom core-context-menu-left\";\n break;\n case ContextMenuDirection.Bottom:\n className = \"core-context-menu-bottom\";\n break;\n case ContextMenuDirection.BottomRight:\n className = \"core-context-menu-bottom core-context-menu-right\";\n break;\n }\n\n return className;\n };\n\n private _injectMenuItemProps = (\n children: React.ReactNode,\n direction: ContextMenuDirection | undefined,\n selectedIndex: number\n ) => {\n let index = 0;\n // add inheritance data to submenu children\n const ch = React.Children.map(children, (child: React.ReactNode) => {\n // Capture only ContextSubMenus and ContextMenuItems.\n if (\n child &&\n typeof child === \"object\" &&\n \"props\" in child &&\n (child.type === ContextSubMenu || child.type === ContextMenuItem) &&\n !ConditionalBooleanValue.getValue(child.props.disabled) &&\n !ConditionalBooleanValue.getValue(child.props.hidden)\n ) {\n const id = index; // get separate id variable so value stays the same when onHover is called later.\n const onHover = () => {\n this.setState({ selectedIndex: id });\n this.focus();\n };\n const ref = (el: ContextSubMenu | ContextMenuItem | null) => {\n if (selectedIndex === id)\n // only save to this._selectedElement if previously captured bool is true\n this._selectedElement = el;\n };\n const boundHandleHotKeyParse = this._handleHotKeyParsed.bind(this, id); // bind local callback for specific index\n const childProps: Partial<\n ContextSubMenuProps & ContextMenuItemProps & { ref: typeof ref }\n > = {\n parentMenu: this,\n ref,\n onHover,\n isSelected: selectedIndex === id,\n onHotKeyParsed: boundHandleHotKeyParse,\n };\n if (child.type === ContextSubMenu) {\n // add direction only to sub-menus\n childProps.direction =\n child.props.direction || /* istanbul ignore next */ direction;\n }\n index++;\n return React.cloneElement(child, childProps);\n } else return child; // Else, pass through unmodified\n });\n this._length = index;\n return ch;\n };\n\n private _rootRef = (el: HTMLDivElement | null) => {\n this._rootElement = el;\n };\n\n private _menuRef = (el: HTMLDivElement | null) => {\n this._menuElement = el;\n };\n\n private getWindow() {\n const el = this._rootElement\n ? this._rootElement\n : /* istanbul ignore next */ this._menuElement;\n const parentDocument = el!.ownerDocument;\n // istanbul ignore next\n return parentDocument.defaultView ?? window;\n }\n\n /** @internal */\n public override componentDidMount() {\n const parentWindow = this.getWindow();\n parentWindow.addEventListener(\"focus\", this._handleFocusChange);\n parentWindow.addEventListener(\"mouseup\", this._handleFocusChange);\n\n this.checkRenderDirection();\n\n if (this.props.opened) this.focus();\n }\n\n /** @internal */\n public override componentWillUnmount() {\n const parentWindow = this.getWindow();\n parentWindow.removeEventListener(\"focus\", this._handleFocusChange);\n parentWindow.removeEventListener(\"mouseup\", this._handleFocusChange);\n }\n\n private checkRenderDirection() {\n const { direction, autoflip, parentMenu } = this.props;\n const parentWindow = this.getWindow();\n\n let renderDirection =\n parentMenu === undefined ? this.state.direction : direction;\n\n if (\n parentWindow.innerHeight === this._parentWindowHeight &&\n parentWindow.innerWidth === this._parentWindowWidth\n )\n return;\n this._parentWindowHeight = parentWindow.innerHeight;\n this._parentWindowWidth = parentWindow.innerWidth;\n\n // check if menu should flip\n if (parentWindow && autoflip && parentMenu === undefined) {\n const menuRect = this.getRect();\n renderDirection = ContextMenu.autoFlip(\n renderDirection!,\n menuRect,\n parentWindow.innerWidth,\n parentWindow.innerHeight\n );\n // istanbul ignore next\n if (renderDirection !== this.state.direction)\n this.setState({ direction: renderDirection });\n }\n }\n\n public focus = () => {\n // istanbul ignore else\n if (this._menuElement) this._menuElement.focus();\n };\n\n public blur = () => {\n // istanbul ignore else\n if (this._menuElement) this._menuElement.blur();\n };\n\n public getRect = (): DOMRect => {\n let clientRect = DOMRect.fromRect({ x: 0, y: 0, width: 0, height: 0 });\n\n // istanbul ignore else\n if (this._menuElement) {\n clientRect = this._menuElement.getBoundingClientRect();\n }\n return clientRect;\n };\n\n private _handleFocusChange = (event: any): void => {\n // istanbul ignore else\n if (\n this._rootElement &&\n this.props.opened &&\n event.target instanceof Node &&\n this.props.onOutsideClick &&\n !this._rootElement.contains(event.target)\n )\n this.props.onOutsideClick(event);\n };\n\n private _handleClick = (event: React.MouseEvent<HTMLDivElement>): void => {\n if (this.props.onSelect) this.props.onSelect(event);\n };\n\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>): void => {\n if (this.state.ignoreNextKeyUp) {\n this.setState({ ignoreNextKeyUp: false });\n return;\n }\n\n // istanbul ignore else\n if (event.key) {\n for (const [key, value] of this._hotKeyMap) {\n if (!this.props.hotkeySelect! && key > this.state.selectedIndex) {\n // Start search at current index.\n if (event.key.toUpperCase() === value) {\n this.setState({ selectedIndex: key });\n return;\n }\n }\n }\n for (const [key, value] of this._hotKeyMap) {\n if (event.key.toUpperCase() === value) {\n this.setState({ selectedIndex: key }, () => {\n if (this.props.hotkeySelect && this._selectedElement) {\n this._selectedElement.select();\n }\n });\n event.stopPropagation();\n return;\n }\n }\n }\n\n if (event.key === SpecialKey.ArrowLeft) {\n event.stopPropagation();\n if (this.props.parentMenu && this.props.parentSubmenu) {\n this.props.parentSubmenu.close();\n this.props.parentMenu.focus();\n }\n if (this.props.onEsc) this.props.onEsc(event);\n }\n\n if (event.key === SpecialKey.Escape) {\n // istanbul ignore else\n if (this.props.onEsc) this.props.onEsc(event);\n }\n\n if (\n (event.key === SpecialKey.Enter || event.key === SpecialKey.ArrowRight) &&\n this._selectedElement\n ) {\n event.stopPropagation();\n\n // istanbul ignore else\n if (\n event.key === SpecialKey.Enter ||\n /* istanbul ignore next */ this._selectedElement instanceof\n ContextSubMenu\n ) {\n // istanbul ignore else\n if (this._selectedElement.select) this._selectedElement.select();\n }\n }\n\n let { selectedIndex } = this.state;\n if (\n event.key === SpecialKey.ArrowUp ||\n event.key === SpecialKey.ArrowDown\n ) {\n event.stopPropagation();\n if (selectedIndex === -1) {\n selectedIndex = 0;\n } else {\n if (event.key === SpecialKey.ArrowUp) {\n if (this.state.selectedIndex === 0) selectedIndex = this._length - 1;\n else selectedIndex--;\n }\n if (event.key === SpecialKey.ArrowDown) {\n if (this.state.selectedIndex === this._length - 1) selectedIndex = 0;\n else selectedIndex++;\n }\n }\n }\n this.setState({ selectedIndex });\n };\n\n public override componentDidUpdate(prevProps: ContextMenuProps) {\n if (prevProps.selectedIndex !== this.props.selectedIndex) {\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\n }\n if (!prevProps.opened && this.props.opened) {\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\n }\n if (!this.props.parentMenu) {\n // const direction = this.props.direction!;\n // if ((!this.props.opened && prevProps.opened && direction !== this.state.direction) || prevProps.direction !== direction)\n this.checkRenderDirection();\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuDirection.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDirection.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,IAAI,KAAK;IACT,OAAO,aAAa;IAAE,GAAG,QAAQ;IAAE,QAAQ,cAAc;IACzD,IAAI,SAAS;IAAE,MAAM,WAAW;IAAE,KAAK,UAAU;IACjD,UAAU,gBAAgB;IAAE,MAAM,WAAW;IAAE,WAAW,iBAAiB;CAC5E"}
1
+ {"version":3,"file":"ContextMenuDirection.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDirection.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,IAAI,KAAK;IACT,OAAO,aAAa;IACpB,GAAG,QAAQ;IACX,QAAQ,cAAc;IACtB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,UAAU,gBAAgB;IAC1B,MAAM,WAAW;IACjB,WAAW,iBAAiB;CAC7B"}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  /** @packageDocumentation
6
6
  * @module ContextMenu
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuDirection.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDirection.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,iCAAS,CAAA;IACT,4CAAoB,CAAA;IAAE,mCAAW,CAAA;IAAE,8CAAsB,CAAA;IACzD,qCAAa,CAAA;IAAE,yCAAiB,CAAA;IAAE,uCAAe,CAAA;IACjD,kDAA0B,CAAA;IAAE,yCAAiB,CAAA;IAAE,oDAA4B,CAAA;AAC7E,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContextMenu\n */\n\n/** Enum to specify where a [[ContextMenu]] should anchor to its parent element\n * @public\n */\nexport enum ContextMenuDirection {\n None = \"\",\n TopLeft = \"top left\", Top = \"top\", TopRight = \"top right\",\n Left = \"left\", Center = \"center\", Right = \"right\",\n BottomLeft = \"bottom left\", Bottom = \"bottom\", BottomRight = \"bottom right\",\n}\n"]}
1
+ {"version":3,"file":"ContextMenuDirection.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDirection.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,oBAWX;AAXD,WAAY,oBAAoB;IAC9B,iCAAS,CAAA;IACT,4CAAoB,CAAA;IACpB,mCAAW,CAAA;IACX,8CAAsB,CAAA;IACtB,qCAAa,CAAA;IACb,yCAAiB,CAAA;IACjB,uCAAe,CAAA;IACf,kDAA0B,CAAA;IAC1B,yCAAiB,CAAA;IACjB,oDAA4B,CAAA;AAC9B,CAAC,EAXW,oBAAoB,KAApB,oBAAoB,QAW/B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContextMenu\n */\n\n/** Enum to specify where a [[ContextMenu]] should anchor to its parent element\n * @public\n */\nexport enum ContextMenuDirection {\n None = \"\",\n TopLeft = \"top left\",\n Top = \"top\",\n TopRight = \"top right\",\n Left = \"left\",\n Center = \"center\",\n Right = \"right\",\n BottomLeft = \"bottom left\",\n Bottom = \"bottom\",\n BottomRight = \"bottom right\",\n}\n"]}
@@ -8,6 +8,6 @@ import type { 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.ReactElement;
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,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;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,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC;IACtD,MAAM,IAAI,KAAK,CAAC,YAAY;CAU7C"}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  /** @packageDocumentation
6
6
  * @module ContextMenu
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuDivider.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDivider.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AAGpC;;;GAGG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK,CAAC,aAA0B;IACtD,MAAM;QACpB,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC3C,OAAO,CACL,gCAAS,KAAK,iBAAc,2BAA2B,EAAC,SAAS,EAAE,UAAU,CAAC,2BAA2B,EAAE,SAAS,CAAC,GAAI,CAC1H,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContextMenu\n */\n\nimport * as React from \"react\";\nimport classnames from \"classnames\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/**\n * Menu Divider for [[ContextMenu]]. Inserts a line between items, used for list item grouping.\n * @public\n */\nexport class ContextMenuDivider extends React.PureComponent<CommonProps> {\n public override render(): JSX.Element {\n const { className, ...props } = this.props;\n return (\n <div {...props} data-testid=\"core-context-menu-divider\" className={classnames(\"core-context-menu-divider\", className)} />\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ContextMenuDivider.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDivider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AAGpC;;;GAGG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK,CAAC,aAA0B;IACtD,MAAM;QACpB,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC3C,OAAO,CACL,gCACM,KAAK,iBACG,2BAA2B,EACvC,SAAS,EAAE,UAAU,CAAC,2BAA2B,EAAE,SAAS,CAAC,GAC7D,CACH,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContextMenu\n */\n\nimport * as React from \"react\";\nimport classnames from \"classnames\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/**\n * Menu Divider for [[ContextMenu]]. Inserts a line between items, used for list item grouping.\n * @public\n */\nexport class ContextMenuDivider extends React.PureComponent<CommonProps> {\n public override render(): React.ReactElement {\n const { className, ...props } = this.props;\n return (\n <div\n {...props}\n data-testid=\"core-context-menu-divider\"\n className={classnames(\"core-context-menu-divider\", className)}\n />\n );\n }\n}\n"]}
@@ -49,7 +49,7 @@ export declare class ContextMenuItem extends React.PureComponent<ContextMenuItem
49
49
  constructor(props: ContextMenuItemProps);
50
50
  /** @internal */
51
51
  readonly state: Readonly<ContextMenuItemState>;
52
- render(): JSX.Element;
52
+ render(): React.ReactElement;
53
53
  componentDidMount(): void;
54
54
  componentDidUpdate(prevProps: ContextMenuItemProps): void;
55
55
  private _updateHotkey;
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuItem.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuItem.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAC,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAc,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGvD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC,EAAE,WAAW;IAC7H,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;IAC/B,gBAAgB;IAChB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,0CAA0C;IAC1C,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,OAAO,GAAG,uBAAuB,CAAC;IAC7C,kGAAkG;IAClG,MAAM,CAAC,EAAE,OAAO,GAAG,uBAAuB,CAAC;IAC3C,wCAAwC;IACxC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,2CAA2C;IAC3C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Y,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAIvD;gBACU,KAAK,EAAE,oBAAoB;IAGvC,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAM;IACpD,MAAM,IAAI,KAAK,CAAC,YAAY;IA6E5B,iBAAiB;IAIjB,kBAAkB,CAAC,SAAS,EAAE,oBAAoB;IAMlE,OAAO,CAAC,aAAa,CAWnB;IAEF,OAAO,CAAC,YAAY,CAElB;IAEF,OAAO,CAAC,gBAAgB,CAStB;IAEK,MAAM,aAOX;IAEF,OAAO,CAAC,YAAY,CAMlB;IAEF,OAAO,CAAC,YAAY,CASlB;CACH"}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  /** @packageDocumentation
6
6
  * @module ContextMenu
7
7
  */
@@ -40,7 +40,9 @@ class ContextMenuItem extends React.PureComponent {
40
40
  };
41
41
  this._handleMouseOver = (_event) => {
42
42
  // istanbul ignore else
43
- if (this._root && this._root.style.visibility !== "hidden" && this.props.onHover) {
43
+ if (this._root &&
44
+ this._root.style.visibility !== "hidden" &&
45
+ this.props.onHover) {
44
46
  this.props.onHover();
45
47
  }
46
48
  };
@@ -63,7 +65,9 @@ class ContextMenuItem extends React.PureComponent {
63
65
  };
64
66
  this._handleKeyUp = (event) => {
65
67
  const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);
66
- if (event.key === SpecialKey.Enter && this.props.onSelect !== undefined && !isDisabled) {
68
+ if (event.key === SpecialKey.Enter &&
69
+ this.props.onSelect !== undefined &&
70
+ !isDisabled) {
67
71
  this.props.onSelect(event);
68
72
  }
69
73
  };
@@ -78,14 +82,14 @@ class ContextMenuItem extends React.PureComponent {
78
82
  this._parsedChildren = TildeFinder.findAfterTilde(this.props.children).node;
79
83
  this._lastChildren = this.props.children;
80
84
  }
81
- return (React.createElement("div", { ...props, ref: (el) => { this._root = el; }, onClick: this._handleClick, style: style, onFocus: this._handleFocus, onKeyUp: this._handleKeyUp, onMouseOver: this._handleMouseOver, "data-testid": "core-context-menu-item", className: classnames("core-context-menu-item", className, isDisabled && "core-context-menu-disabled", isHidden && "core-context-menu-hidden", isSelected && "core-context-menu-is-selected"), role: "menuitem", tabIndex: isSelected ? 0 : -1, "aria-disabled": isDisabled, "aria-hidden": isHidden },
82
- !hideIconContainer && React.createElement("div", { className: "core-context-menu-icon" }, icon !== undefined && React.createElement(Icon, { iconSpec: icon })),
85
+ return (React.createElement("div", { ...props, ref: (el) => {
86
+ this._root = el;
87
+ }, onClick: this._handleClick, style: style, onFocus: this._handleFocus, onKeyUp: this._handleKeyUp, onMouseOver: this._handleMouseOver, "data-testid": "core-context-menu-item", className: classnames("core-context-menu-item", className, isDisabled && "core-context-menu-disabled", isHidden && "core-context-menu-hidden", isSelected && "core-context-menu-is-selected"), role: "menuitem", tabIndex: isSelected ? 0 : -1, "aria-disabled": isDisabled, "aria-hidden": isHidden },
88
+ !hideIconContainer && (React.createElement("div", { className: "core-context-menu-icon" }, icon !== undefined && React.createElement(Icon, { iconSpec: icon }))),
83
89
  React.createElement("div", { className: "core-context-menu-content" }, this._parsedChildren),
84
- iconRight &&
85
- React.createElement("div", { className: classnames("core-context-menu-icon", "core-context-menu-icon-right") },
86
- React.createElement(Icon, { iconSpec: iconRight })),
87
- badge &&
88
- React.createElement("div", { className: "core-context-menu-badge" }, badge)));
90
+ iconRight && (React.createElement("div", { className: classnames("core-context-menu-icon", "core-context-menu-icon-right") },
91
+ React.createElement(Icon, { iconSpec: iconRight }))),
92
+ badge && React.createElement("div", { className: "core-context-menu-badge" }, badge)));
89
93
  }
90
94
  componentDidMount() {
91
95
  this._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AAM,EAAE,KAAK;IACb,UAAU,EAAE,KAAK;CAClB,AAJyB,CAIxB;SATS,eAAe","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContextMenu\n */\n\nimport * as React from \"react\";\nimport classnames from \"classnames\";\nimport type { BadgeType} from \"@itwin/appui-abstract\";\nimport { ConditionalBooleanValue, SpecialKey } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"../utils/Props\";\nimport type { ContextMenu } from \"./ContextMenu\";\nimport { BadgeUtilities } from \"../badge/BadgeUtilities\";\nimport { TildeFinder } from \"./TildeFinder\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\n\n/** Properties for the [[ContextMenuItem]] component\n * @public\n */\nexport interface ContextMenuItemProps extends Omit<React.AllHTMLAttributes<HTMLDivElement>, \"disabled\" | \"hidden\">, CommonProps {\n onSelect?: (event: any) => any;\n /** @internal */\n onHotKeyParsed?: (hotKey: string) => void;\n /** Icon to display in the left margin. */\n icon?: IconSpec;\n /** Disables any onSelect calls, hover/keyboard highlighting, and grays item. */\n disabled?: boolean | ConditionalBooleanValue;\n /** Indicates whether the item is visible or hidden. The default is for the item to be visible. */\n hidden?: boolean | ConditionalBooleanValue;\n /** Badge to be overlaid on the item. */\n badgeType?: BadgeType;\n /** Icon to display in the right margin. */\n iconRight?: IconSpec;\n /** Hide the icon container. This can be used to eliminate space used to display an icon at the left of the menu item. */\n hideIconContainer?: boolean;\n /** @internal */\n onHover?: () => any;\n /* @internal */\n isSelected?: boolean;\n /** @internal */\n parentMenu?: ContextMenu;\n}\n\n/** @internal */\ninterface ContextMenuItemState {\n hotKey?: string;\n}\n\n/**\n * Menu Item class for use within a [[ContextMenu]] component.\n * @public\n */\nexport class ContextMenuItem extends React.PureComponent<ContextMenuItemProps, ContextMenuItemState> {\n private _root: HTMLElement | null = null;\n private _lastChildren: React.ReactNode;\n private _parsedChildren: React.ReactNode;\n /** @internal */\n public static defaultProps: Partial<ContextMenuItemProps> = {\n disabled: false,\n hidden: false,\n isSelected: false,\n };\n constructor(props: ContextMenuItemProps) {\n super(props);\n }\n /** @internal */\n public override readonly state: Readonly<ContextMenuItemState> = {};\n public override render(): JSX.Element {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onClick, className, style, onSelect, icon, disabled, hidden, onHover, isSelected, parentMenu, onHotKeyParsed, badgeType, iconRight,\n hideIconContainer, ...props } = this.props;\n const badge = BadgeUtilities.getComponentForBadgeType(badgeType);\n const isDisabled = ConditionalBooleanValue.getValue(disabled);\n const isHidden = ConditionalBooleanValue.getValue(hidden);\n\n if (this._lastChildren !== this.props.children) {\n this._parsedChildren = TildeFinder.findAfterTilde(this.props.children).node;\n this._lastChildren = this.props.children;\n }\n\n return (\n <div\n {...props}\n ref={(el) => { this._root = el; }}\n onClick={this._handleClick}\n style={style}\n onFocus={this._handleFocus}\n onKeyUp={this._handleKeyUp}\n onMouseOver={this._handleMouseOver}\n data-testid={\"core-context-menu-item\"}\n className={classnames(\"core-context-menu-item\", className,\n isDisabled && \"core-context-menu-disabled\",\n isHidden && \"core-context-menu-hidden\",\n isSelected && \"core-context-menu-is-selected\")\n }\n role=\"menuitem\"\n tabIndex={isSelected ? 0 : -1}\n aria-disabled={isDisabled}\n aria-hidden={isHidden}\n >\n {!hideIconContainer && <div className=\"core-context-menu-icon\">\n {icon !== undefined && <Icon iconSpec={icon} />}\n </div>}\n <div className={\"core-context-menu-content\"}>\n {this._parsedChildren}\n </div>\n {iconRight &&\n <div className={classnames(\"core-context-menu-icon\", \"core-context-menu-icon-right\")}>\n <Icon iconSpec={iconRight} />\n </div>\n }\n {badge &&\n <div className=\"core-context-menu-badge\">\n {badge}\n </div>\n }\n </div>\n );\n }\n\n public override componentDidMount() {\n this._updateHotkey(this.props.children);\n }\n\n public override componentDidUpdate(prevProps: ContextMenuItemProps) {\n if (this.props.children !== prevProps.children) {\n this._updateHotkey(this.props.children);\n }\n }\n\n private _updateHotkey = (node: React.ReactNode) => {\n let hotKey: string | undefined;\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\n const isHidden = ConditionalBooleanValue.getValue(this.props.hidden);\n if (!isDisabled && !isHidden)\n hotKey = TildeFinder.findAfterTilde(node).character;\n else\n hotKey = undefined;\n if (hotKey && hotKey !== this.state.hotKey) {\n this.setState({ hotKey });\n if (this.props.onHotKeyParsed)\n this.props.onHotKeyParsed(hotKey);\n }\n };\n\n private _handleFocus = (event: React.FocusEvent<HTMLDivElement>) => {\n event.stopPropagation();\n };\n\n private _handleMouseOver = (_event: React.MouseEvent<HTMLDivElement>) => {\n // istanbul ignore else\n if (this._root && this._root.style.visibility !== \"hidden\" && this.props.onHover) {\n this.props.onHover();\n }\n };\n\n public select = () => {\n // istanbul ignore else\n if (this._root) {\n this._root.click();\n if (this.props.parentMenu && this.props.parentMenu.props.parentSubmenu)\n this.props.parentMenu.props.parentSubmenu.close(true);\n }\n };\n\n private _handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\n if (isDisabled)\n return;\n\n if (this.props.onClick)\n this.props.onClick(event);\n if (this.props.onSelect)\n this.props.onSelect(event);\n };\n\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>) => {\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\n if (event.key === SpecialKey.Enter && this.props.onSelect !== undefined && !isDisabled) {\n this.props.onSelect(event);\n }\n };\n}\n"]}
1
+ {"version":3,"file":"ContextMenuItem.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuItem.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,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B,EACtC,UAAU,IAAI,+BAA+B,CAC9C,EACD,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,mBACd,UAAU,iBACZ,QAAQ;YAEpB,CAAC,iBAAiB,IAAI,CACrB,6BAAK,SAAS,EAAC,wBAAwB,IACpC,IAAI,KAAK,SAAS,IAAI,oBAAC,IAAI,IAAC,QAAQ,EAAE,IAAI,GAAI,CAC3C,CACP;YACD,6BAAK,SAAS,EAAE,2BAA2B,IACxC,IAAI,CAAC,eAAe,CACjB;YACL,SAAS,IAAI,CACZ,6BACE,SAAS,EAAE,UAAU,CACnB,wBAAwB,EACxB,8BAA8B,CAC/B;gBAED,oBAAC,IAAI,IAAC,QAAQ,EAAE,SAAS,GAAI,CACzB,CACP;YACA,KAAK,IAAI,6BAAK,SAAS,EAAC,yBAAyB,IAAE,KAAK,CAAO,CAC5D,CACP,CAAC;IACJ,CAAC;IAEe,iBAAiB;QAC/B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAEe,kBAAkB,CAAC,SAA+B;QAChE,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,EAAE;YAC9C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;SACzC;IACH,CAAC;;AAhGD,gBAAgB;AACF,4BAAY,GAAkC;IAC1D,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,KAAK;CAClB,AAJyB,CAIxB;SAZS,eAAe","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContextMenu\n */\n\nimport * as React from \"react\";\nimport classnames from \"classnames\";\nimport type { BadgeType } from \"@itwin/appui-abstract\";\nimport { ConditionalBooleanValue, SpecialKey } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"../utils/Props\";\nimport type { ContextMenu } from \"./ContextMenu\";\nimport { BadgeUtilities } from \"../badge/BadgeUtilities\";\nimport { TildeFinder } from \"./TildeFinder\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\n\n/** Properties for the [[ContextMenuItem]] component\n * @public\n */\nexport interface ContextMenuItemProps\n extends Omit<React.AllHTMLAttributes<HTMLDivElement>, \"disabled\" | \"hidden\">,\n CommonProps {\n onSelect?: (event: any) => any;\n /** @internal */\n onHotKeyParsed?: (hotKey: string) => void;\n /** Icon to display in the left margin. */\n icon?: IconSpec;\n /** Disables any onSelect calls, hover/keyboard highlighting, and grays item. */\n disabled?: boolean | ConditionalBooleanValue;\n /** Indicates whether the item is visible or hidden. The default is for the item to be visible. */\n hidden?: boolean | ConditionalBooleanValue;\n /** Badge to be overlaid on the item. */\n badgeType?: BadgeType;\n /** Icon to display in the right margin. */\n iconRight?: IconSpec;\n /** Hide the icon container. This can be used to eliminate space used to display an icon at the left of the menu item. */\n hideIconContainer?: boolean;\n /** @internal */\n onHover?: () => any;\n /* @internal */\n isSelected?: boolean;\n /** @internal */\n parentMenu?: ContextMenu;\n}\n\n/** @internal */\ninterface ContextMenuItemState {\n hotKey?: string;\n}\n\n/**\n * Menu Item class for use within a [[ContextMenu]] component.\n * @public\n */\nexport class ContextMenuItem extends React.PureComponent<\n ContextMenuItemProps,\n ContextMenuItemState\n> {\n private _root: HTMLElement | null = null;\n private _lastChildren: React.ReactNode;\n private _parsedChildren: React.ReactNode;\n /** @internal */\n public static defaultProps: Partial<ContextMenuItemProps> = {\n disabled: false,\n hidden: false,\n isSelected: false,\n };\n constructor(props: ContextMenuItemProps) {\n super(props);\n }\n /** @internal */\n public override readonly state: Readonly<ContextMenuItemState> = {};\n public override render(): React.ReactElement {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n onClick,\n className,\n style,\n onSelect,\n icon,\n disabled,\n hidden,\n onHover,\n isSelected,\n parentMenu,\n onHotKeyParsed,\n badgeType,\n iconRight,\n hideIconContainer,\n ...props\n } = this.props;\n const badge = BadgeUtilities.getComponentForBadgeType(badgeType);\n const isDisabled = ConditionalBooleanValue.getValue(disabled);\n const isHidden = ConditionalBooleanValue.getValue(hidden);\n\n if (this._lastChildren !== this.props.children) {\n this._parsedChildren = TildeFinder.findAfterTilde(\n this.props.children\n ).node;\n this._lastChildren = this.props.children;\n }\n\n return (\n <div\n {...props}\n ref={(el) => {\n this._root = el;\n }}\n onClick={this._handleClick}\n style={style}\n onFocus={this._handleFocus}\n onKeyUp={this._handleKeyUp}\n onMouseOver={this._handleMouseOver}\n data-testid={\"core-context-menu-item\"}\n className={classnames(\n \"core-context-menu-item\",\n className,\n isDisabled && \"core-context-menu-disabled\",\n isHidden && \"core-context-menu-hidden\",\n isSelected && \"core-context-menu-is-selected\"\n )}\n role=\"menuitem\"\n tabIndex={isSelected ? 0 : -1}\n aria-disabled={isDisabled}\n aria-hidden={isHidden}\n >\n {!hideIconContainer && (\n <div className=\"core-context-menu-icon\">\n {icon !== undefined && <Icon iconSpec={icon} />}\n </div>\n )}\n <div className={\"core-context-menu-content\"}>\n {this._parsedChildren}\n </div>\n {iconRight && (\n <div\n className={classnames(\n \"core-context-menu-icon\",\n \"core-context-menu-icon-right\"\n )}\n >\n <Icon iconSpec={iconRight} />\n </div>\n )}\n {badge && <div className=\"core-context-menu-badge\">{badge}</div>}\n </div>\n );\n }\n\n public override componentDidMount() {\n this._updateHotkey(this.props.children);\n }\n\n public override componentDidUpdate(prevProps: ContextMenuItemProps) {\n if (this.props.children !== prevProps.children) {\n this._updateHotkey(this.props.children);\n }\n }\n\n private _updateHotkey = (node: React.ReactNode) => {\n let hotKey: string | undefined;\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\n const isHidden = ConditionalBooleanValue.getValue(this.props.hidden);\n if (!isDisabled && !isHidden)\n hotKey = TildeFinder.findAfterTilde(node).character;\n else hotKey = undefined;\n if (hotKey && hotKey !== this.state.hotKey) {\n this.setState({ hotKey });\n if (this.props.onHotKeyParsed) this.props.onHotKeyParsed(hotKey);\n }\n };\n\n private _handleFocus = (event: React.FocusEvent<HTMLDivElement>) => {\n event.stopPropagation();\n };\n\n private _handleMouseOver = (_event: React.MouseEvent<HTMLDivElement>) => {\n // istanbul ignore else\n if (\n this._root &&\n this._root.style.visibility !== \"hidden\" &&\n this.props.onHover\n ) {\n this.props.onHover();\n }\n };\n\n public select = () => {\n // istanbul ignore else\n if (this._root) {\n this._root.click();\n if (this.props.parentMenu && this.props.parentMenu.props.parentSubmenu)\n this.props.parentMenu.props.parentSubmenu.close(true);\n }\n };\n\n private _handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\n if (isDisabled) return;\n\n if (this.props.onClick) this.props.onClick(event);\n if (this.props.onSelect) this.props.onSelect(event);\n };\n\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>) => {\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\n if (\n event.key === SpecialKey.Enter &&\n this.props.onSelect !== undefined &&\n !isDisabled\n ) {\n this.props.onSelect(event);\n }\n };\n}\n"]}