@itwin/core-react 4.14.1 → 4.15.0

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 (514) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/lib/cjs/core-react/UiCore.d.ts +1 -1
  3. package/lib/cjs/core-react/UiCore.js +1 -1
  4. package/lib/cjs/core-react/UiCore.js.map +1 -1
  5. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  6. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  7. package/lib/cjs/core-react/base/Centered.d.ts +1 -1
  8. package/lib/cjs/core-react/base/Centered.d.ts.map +1 -1
  9. package/lib/cjs/core-react/base/Centered.js +2 -1
  10. package/lib/cjs/core-react/base/Centered.js.map +1 -1
  11. package/lib/cjs/core-react/base/Div.d.ts +2 -2
  12. package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
  13. package/lib/cjs/core-react/base/Div.js +1 -1
  14. package/lib/cjs/core-react/base/Div.js.map +1 -1
  15. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +1 -1
  16. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  17. package/lib/cjs/core-react/base/DivWithOutsideClick.js +4 -2
  18. package/lib/cjs/core-react/base/DivWithOutsideClick.js.map +1 -1
  19. package/lib/cjs/core-react/base/FillCentered.d.ts +1 -1
  20. package/lib/cjs/core-react/base/FillCentered.d.ts.map +1 -1
  21. package/lib/cjs/core-react/base/FillCentered.js +2 -1
  22. package/lib/cjs/core-react/base/FillCentered.js.map +1 -1
  23. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +1 -1
  24. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  25. package/lib/cjs/core-react/base/FlexWrapContainer.js +2 -1
  26. package/lib/cjs/core-react/base/FlexWrapContainer.js.map +1 -1
  27. package/lib/cjs/core-react/base/Gap.d.ts +2 -2
  28. package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
  29. package/lib/cjs/core-react/base/Gap.js +1 -1
  30. package/lib/cjs/core-react/base/Gap.js.map +1 -1
  31. package/lib/cjs/core-react/base/ScrollView.d.ts +1 -1
  32. package/lib/cjs/core-react/base/ScrollView.d.ts.map +1 -1
  33. package/lib/cjs/core-react/base/ScrollView.js +2 -1
  34. package/lib/cjs/core-react/base/ScrollView.js.map +1 -1
  35. package/lib/cjs/core-react/button/UnderlinedButton.d.ts +2 -2
  36. package/lib/cjs/core-react/button/UnderlinedButton.js +1 -1
  37. package/lib/cjs/core-react/button/UnderlinedButton.js.map +1 -1
  38. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +4 -4
  39. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  40. package/lib/cjs/core-react/checklistbox/CheckListBox.js +3 -3
  41. package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
  42. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  43. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  44. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  45. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js +1 -0
  46. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  47. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  48. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  49. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  50. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  51. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  52. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js +3 -1
  53. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  54. package/lib/cjs/core-react/dialog/Dialog.d.ts +4 -5
  55. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  56. package/lib/cjs/core-react/dialog/Dialog.js +3 -3
  57. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  58. package/lib/cjs/core-react/dialog/GlobalDialog.d.ts +3 -3
  59. package/lib/cjs/core-react/dialog/GlobalDialog.js +1 -1
  60. package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
  61. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +3 -3
  62. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  63. package/lib/cjs/core-react/elementseparator/ElementSeparator.js +1 -1
  64. package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
  65. package/lib/cjs/core-react/enums/Alignment.d.ts +2 -0
  66. package/lib/cjs/core-react/enums/Alignment.d.ts.map +1 -1
  67. package/lib/cjs/core-react/enums/Alignment.js +2 -0
  68. package/lib/cjs/core-react/enums/Alignment.js.map +1 -1
  69. package/lib/cjs/core-react/enums/CheckBoxState.d.ts +1 -0
  70. package/lib/cjs/core-react/enums/CheckBoxState.d.ts.map +1 -1
  71. package/lib/cjs/core-react/enums/CheckBoxState.js.map +1 -1
  72. package/lib/cjs/core-react/enums/SortDirection.d.ts +1 -0
  73. package/lib/cjs/core-react/enums/SortDirection.d.ts.map +1 -1
  74. package/lib/cjs/core-react/enums/SortDirection.js +1 -0
  75. package/lib/cjs/core-react/enums/SortDirection.js.map +1 -1
  76. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +2 -2
  77. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  78. package/lib/cjs/core-react/expandable/ExpandableList.js +1 -1
  79. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  80. package/lib/cjs/core-react/hocs/withIsPressed.d.ts +2 -0
  81. package/lib/cjs/core-react/hocs/withIsPressed.d.ts.map +1 -1
  82. package/lib/cjs/core-react/hocs/withIsPressed.js +1 -0
  83. package/lib/cjs/core-react/hocs/withIsPressed.js.map +1 -1
  84. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts +2 -0
  85. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  86. package/lib/cjs/core-react/hocs/withOnOutsideClick.js +1 -0
  87. package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
  88. package/lib/cjs/core-react/hocs/withTimeout.d.ts +2 -0
  89. package/lib/cjs/core-react/hocs/withTimeout.d.ts.map +1 -1
  90. package/lib/cjs/core-react/hocs/withTimeout.js +4 -1
  91. package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
  92. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  93. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  94. package/lib/cjs/core-react/icons/SvgPath.d.ts +2 -0
  95. package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
  96. package/lib/cjs/core-react/icons/SvgPath.js +2 -0
  97. package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
  98. package/lib/cjs/core-react/icons/WebFontIcon.d.ts +2 -0
  99. package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
  100. package/lib/cjs/core-react/icons/WebFontIcon.js +2 -0
  101. package/lib/cjs/core-react/icons/WebFontIcon.js.map +1 -1
  102. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +2 -2
  103. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  104. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +1 -1
  105. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  106. package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
  107. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  108. package/lib/cjs/core-react/inputs/InputLabel.d.ts +2 -2
  109. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  110. package/lib/cjs/core-react/inputs/InputLabel.js +1 -1
  111. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  112. package/lib/cjs/core-react/inputs/InputStatus.d.ts +1 -1
  113. package/lib/cjs/core-react/inputs/InputStatus.js +1 -1
  114. package/lib/cjs/core-react/inputs/InputStatus.js.map +1 -1
  115. package/lib/cjs/core-react/inputs/LabeledComponentProps.d.ts +2 -2
  116. package/lib/cjs/core-react/inputs/LabeledComponentProps.js.map +1 -1
  117. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +2 -2
  118. package/lib/cjs/core-react/inputs/iconinput/IconInput.js +1 -1
  119. package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
  120. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +3 -3
  121. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +1 -1
  122. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  123. package/lib/cjs/core-react/listbox/Listbox.d.ts +7 -7
  124. package/lib/cjs/core-react/listbox/Listbox.js +3 -3
  125. package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
  126. package/lib/cjs/core-react/loading/LoadingBar.d.ts +2 -2
  127. package/lib/cjs/core-react/loading/LoadingBar.js +1 -1
  128. package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
  129. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +2 -2
  130. package/lib/cjs/core-react/loading/LoadingPrompt.js +1 -1
  131. package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
  132. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +3 -3
  133. package/lib/cjs/core-react/loading/LoadingSpinner.js +1 -1
  134. package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
  135. package/lib/cjs/core-react/loading/LoadingStatus.d.ts +2 -2
  136. package/lib/cjs/core-react/loading/LoadingStatus.js +1 -1
  137. package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
  138. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +5 -1
  139. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  140. package/lib/cjs/core-react/messagebox/MessageBox.js +8 -1
  141. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  142. package/lib/cjs/core-react/notification/MessageRenderer.d.ts +2 -0
  143. package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
  144. package/lib/cjs/core-react/notification/MessageRenderer.js +2 -0
  145. package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
  146. package/lib/cjs/core-react/notification/MessageType.d.ts +2 -0
  147. package/lib/cjs/core-react/notification/MessageType.d.ts.map +1 -1
  148. package/lib/cjs/core-react/notification/MessageType.js.map +1 -1
  149. package/lib/cjs/core-react/popup/Popup.d.ts +6 -1
  150. package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
  151. package/lib/cjs/core-react/popup/Popup.js +9 -2
  152. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  153. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +4 -4
  154. package/lib/cjs/core-react/radialmenu/RadialMenu.js +2 -2
  155. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  156. package/lib/cjs/core-react/searchbox/SearchBox.d.ts +2 -2
  157. package/lib/cjs/core-react/searchbox/SearchBox.js +1 -1
  158. package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
  159. package/lib/cjs/core-react/settings/SettingsManager.d.ts +8 -8
  160. package/lib/cjs/core-react/settings/SettingsManager.js +4 -4
  161. package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
  162. package/lib/cjs/core-react/tabs/Tabs.d.ts +4 -4
  163. package/lib/cjs/core-react/tabs/Tabs.js +1 -1
  164. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  165. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +1 -1
  166. package/lib/cjs/core-react/tabs/VerticalTabs.js +1 -1
  167. package/lib/cjs/core-react/tabs/VerticalTabs.js.map +1 -1
  168. package/lib/cjs/core-react/text/BlockText.d.ts +1 -1
  169. package/lib/cjs/core-react/text/BlockText.js +1 -1
  170. package/lib/cjs/core-react/text/BlockText.js.map +1 -1
  171. package/lib/cjs/core-react/text/BodyText.d.ts +1 -1
  172. package/lib/cjs/core-react/text/BodyText.js +1 -1
  173. package/lib/cjs/core-react/text/BodyText.js.map +1 -1
  174. package/lib/cjs/core-react/text/DisabledText.d.ts +1 -1
  175. package/lib/cjs/core-react/text/DisabledText.js +1 -1
  176. package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
  177. package/lib/cjs/core-react/text/FilteredText.d.ts +2 -0
  178. package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
  179. package/lib/cjs/core-react/text/FilteredText.js +2 -0
  180. package/lib/cjs/core-react/text/FilteredText.js.map +1 -1
  181. package/lib/cjs/core-react/text/MutedText.d.ts +1 -1
  182. package/lib/cjs/core-react/text/MutedText.js +1 -1
  183. package/lib/cjs/core-react/text/MutedText.js.map +1 -1
  184. package/lib/cjs/core-react/text/StyledText.d.ts +2 -2
  185. package/lib/cjs/core-react/text/StyledText.js +1 -1
  186. package/lib/cjs/core-react/text/StyledText.js.map +1 -1
  187. package/lib/cjs/core-react/text/TextProps.d.ts +1 -1
  188. package/lib/cjs/core-react/text/TextProps.js.map +1 -1
  189. package/lib/cjs/core-react/tree/Branch.d.ts +2 -0
  190. package/lib/cjs/core-react/tree/Branch.d.ts.map +1 -1
  191. package/lib/cjs/core-react/tree/Branch.js +2 -0
  192. package/lib/cjs/core-react/tree/Branch.js.map +1 -1
  193. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts +2 -0
  194. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  195. package/lib/cjs/core-react/tree/ExpansionToggle.js +2 -0
  196. package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
  197. package/lib/cjs/core-react/tree/Node.d.ts +3 -3
  198. package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
  199. package/lib/cjs/core-react/tree/Node.js +6 -1
  200. package/lib/cjs/core-react/tree/Node.js.map +1 -1
  201. package/lib/cjs/core-react/tree/Placeholder.d.ts +2 -0
  202. package/lib/cjs/core-react/tree/Placeholder.d.ts.map +1 -1
  203. package/lib/cjs/core-react/tree/Placeholder.js +2 -0
  204. package/lib/cjs/core-react/tree/Placeholder.js.map +1 -1
  205. package/lib/cjs/core-react/tree/Tree.d.ts +2 -0
  206. package/lib/cjs/core-react/tree/Tree.d.ts.map +1 -1
  207. package/lib/cjs/core-react/tree/Tree.js +2 -0
  208. package/lib/cjs/core-react/tree/Tree.js.map +1 -1
  209. package/lib/cjs/core-react/utils/IconHelper.d.ts +1 -0
  210. package/lib/cjs/core-react/utils/IconHelper.d.ts.map +1 -1
  211. package/lib/cjs/core-react/utils/IconHelper.js +2 -0
  212. package/lib/cjs/core-react/utils/IconHelper.js.map +1 -1
  213. package/lib/cjs/core-react/utils/Props.d.ts +5 -1
  214. package/lib/cjs/core-react/utils/Props.d.ts.map +1 -1
  215. package/lib/cjs/core-react/utils/Props.js.map +1 -1
  216. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts +1 -0
  217. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  218. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js +3 -0
  219. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  220. package/lib/cjs/core-react/utils/Timer.d.ts +2 -0
  221. package/lib/cjs/core-react/utils/Timer.d.ts.map +1 -1
  222. package/lib/cjs/core-react/utils/Timer.js +2 -0
  223. package/lib/cjs/core-react/utils/Timer.js.map +1 -1
  224. package/lib/cjs/core-react/utils/getCssVariable.d.ts +2 -0
  225. package/lib/cjs/core-react/utils/getCssVariable.d.ts.map +1 -1
  226. package/lib/cjs/core-react/utils/getCssVariable.js +3 -0
  227. package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
  228. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
  229. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +1 -0
  230. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  231. package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts +1 -0
  232. package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  233. package/lib/cjs/core-react/utils/hooks/useDisposable.js +1 -0
  234. package/lib/cjs/core-react/utils/hooks/useDisposable.js.map +1 -1
  235. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.d.ts +1 -0
  236. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
  237. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js +1 -0
  238. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  239. package/lib/cjs/core-react/utils/hooks/useInterval.d.ts +1 -0
  240. package/lib/cjs/core-react/utils/hooks/useInterval.d.ts.map +1 -1
  241. package/lib/cjs/core-react/utils/hooks/useInterval.js +1 -0
  242. package/lib/cjs/core-react/utils/hooks/useInterval.js.map +1 -1
  243. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts +5 -1
  244. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
  245. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js +1 -0
  246. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  247. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +2 -0
  248. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  249. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +2 -0
  250. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  251. package/lib/cjs/core-react/utils/typeUtils.d.ts +1 -0
  252. package/lib/cjs/core-react/utils/typeUtils.d.ts.map +1 -1
  253. package/lib/cjs/core-react/utils/typeUtils.js.map +1 -1
  254. package/lib/cjs/core-react.d.ts +0 -1
  255. package/lib/cjs/core-react.d.ts.map +1 -1
  256. package/lib/cjs/core-react.js +2 -1
  257. package/lib/cjs/core-react.js.map +1 -1
  258. package/lib/esm/core-react/UiCore.d.ts +1 -1
  259. package/lib/esm/core-react/UiCore.js +1 -1
  260. package/lib/esm/core-react/UiCore.js.map +1 -1
  261. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  262. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  263. package/lib/esm/core-react/base/Centered.d.ts +1 -1
  264. package/lib/esm/core-react/base/Centered.d.ts.map +1 -1
  265. package/lib/esm/core-react/base/Centered.js +2 -1
  266. package/lib/esm/core-react/base/Centered.js.map +1 -1
  267. package/lib/esm/core-react/base/Div.d.ts +2 -2
  268. package/lib/esm/core-react/base/Div.d.ts.map +1 -1
  269. package/lib/esm/core-react/base/Div.js +1 -1
  270. package/lib/esm/core-react/base/Div.js.map +1 -1
  271. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +1 -1
  272. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  273. package/lib/esm/core-react/base/DivWithOutsideClick.js +4 -2
  274. package/lib/esm/core-react/base/DivWithOutsideClick.js.map +1 -1
  275. package/lib/esm/core-react/base/FillCentered.d.ts +1 -1
  276. package/lib/esm/core-react/base/FillCentered.d.ts.map +1 -1
  277. package/lib/esm/core-react/base/FillCentered.js +2 -1
  278. package/lib/esm/core-react/base/FillCentered.js.map +1 -1
  279. package/lib/esm/core-react/base/FlexWrapContainer.d.ts +1 -1
  280. package/lib/esm/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  281. package/lib/esm/core-react/base/FlexWrapContainer.js +2 -1
  282. package/lib/esm/core-react/base/FlexWrapContainer.js.map +1 -1
  283. package/lib/esm/core-react/base/Gap.d.ts +2 -2
  284. package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
  285. package/lib/esm/core-react/base/Gap.js +1 -1
  286. package/lib/esm/core-react/base/Gap.js.map +1 -1
  287. package/lib/esm/core-react/base/ScrollView.d.ts +1 -1
  288. package/lib/esm/core-react/base/ScrollView.d.ts.map +1 -1
  289. package/lib/esm/core-react/base/ScrollView.js +2 -1
  290. package/lib/esm/core-react/base/ScrollView.js.map +1 -1
  291. package/lib/esm/core-react/button/UnderlinedButton.d.ts +2 -2
  292. package/lib/esm/core-react/button/UnderlinedButton.js +1 -1
  293. package/lib/esm/core-react/button/UnderlinedButton.js.map +1 -1
  294. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +4 -4
  295. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  296. package/lib/esm/core-react/checklistbox/CheckListBox.js +3 -3
  297. package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
  298. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  299. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  300. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  301. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js +1 -0
  302. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  303. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  304. package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  305. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  306. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  307. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  308. package/lib/esm/core-react/contextmenu/PopupContextMenu.js +3 -1
  309. package/lib/esm/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  310. package/lib/esm/core-react/dialog/Dialog.d.ts +4 -5
  311. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  312. package/lib/esm/core-react/dialog/Dialog.js +3 -3
  313. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  314. package/lib/esm/core-react/dialog/GlobalDialog.d.ts +3 -3
  315. package/lib/esm/core-react/dialog/GlobalDialog.js +1 -1
  316. package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
  317. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +3 -3
  318. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  319. package/lib/esm/core-react/elementseparator/ElementSeparator.js +1 -1
  320. package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
  321. package/lib/esm/core-react/enums/Alignment.d.ts +2 -0
  322. package/lib/esm/core-react/enums/Alignment.d.ts.map +1 -1
  323. package/lib/esm/core-react/enums/Alignment.js +2 -0
  324. package/lib/esm/core-react/enums/Alignment.js.map +1 -1
  325. package/lib/esm/core-react/enums/CheckBoxState.d.ts +1 -0
  326. package/lib/esm/core-react/enums/CheckBoxState.d.ts.map +1 -1
  327. package/lib/esm/core-react/enums/CheckBoxState.js.map +1 -1
  328. package/lib/esm/core-react/enums/SortDirection.d.ts +1 -0
  329. package/lib/esm/core-react/enums/SortDirection.d.ts.map +1 -1
  330. package/lib/esm/core-react/enums/SortDirection.js +1 -0
  331. package/lib/esm/core-react/enums/SortDirection.js.map +1 -1
  332. package/lib/esm/core-react/expandable/ExpandableList.d.ts +2 -2
  333. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  334. package/lib/esm/core-react/expandable/ExpandableList.js +1 -1
  335. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  336. package/lib/esm/core-react/hocs/withIsPressed.d.ts +2 -0
  337. package/lib/esm/core-react/hocs/withIsPressed.d.ts.map +1 -1
  338. package/lib/esm/core-react/hocs/withIsPressed.js +1 -0
  339. package/lib/esm/core-react/hocs/withIsPressed.js.map +1 -1
  340. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts +2 -0
  341. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  342. package/lib/esm/core-react/hocs/withOnOutsideClick.js +1 -0
  343. package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
  344. package/lib/esm/core-react/hocs/withTimeout.d.ts +2 -0
  345. package/lib/esm/core-react/hocs/withTimeout.d.ts.map +1 -1
  346. package/lib/esm/core-react/hocs/withTimeout.js +4 -1
  347. package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
  348. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  349. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  350. package/lib/esm/core-react/icons/SvgPath.d.ts +2 -0
  351. package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
  352. package/lib/esm/core-react/icons/SvgPath.js +2 -0
  353. package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
  354. package/lib/esm/core-react/icons/WebFontIcon.d.ts +2 -0
  355. package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
  356. package/lib/esm/core-react/icons/WebFontIcon.js +2 -0
  357. package/lib/esm/core-react/icons/WebFontIcon.js.map +1 -1
  358. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +2 -2
  359. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  360. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +1 -1
  361. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  362. package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
  363. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  364. package/lib/esm/core-react/inputs/InputLabel.d.ts +2 -2
  365. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  366. package/lib/esm/core-react/inputs/InputLabel.js +1 -1
  367. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  368. package/lib/esm/core-react/inputs/InputStatus.d.ts +1 -1
  369. package/lib/esm/core-react/inputs/InputStatus.js +1 -1
  370. package/lib/esm/core-react/inputs/InputStatus.js.map +1 -1
  371. package/lib/esm/core-react/inputs/LabeledComponentProps.d.ts +2 -2
  372. package/lib/esm/core-react/inputs/LabeledComponentProps.js.map +1 -1
  373. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +2 -2
  374. package/lib/esm/core-react/inputs/iconinput/IconInput.js +1 -1
  375. package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
  376. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +3 -3
  377. package/lib/esm/core-react/inputs/numberinput/NumberInput.js +1 -1
  378. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  379. package/lib/esm/core-react/listbox/Listbox.d.ts +7 -7
  380. package/lib/esm/core-react/listbox/Listbox.js +3 -3
  381. package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
  382. package/lib/esm/core-react/loading/LoadingBar.d.ts +2 -2
  383. package/lib/esm/core-react/loading/LoadingBar.js +1 -1
  384. package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
  385. package/lib/esm/core-react/loading/LoadingPrompt.d.ts +2 -2
  386. package/lib/esm/core-react/loading/LoadingPrompt.js +1 -1
  387. package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
  388. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +3 -3
  389. package/lib/esm/core-react/loading/LoadingSpinner.js +1 -1
  390. package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
  391. package/lib/esm/core-react/loading/LoadingStatus.d.ts +2 -2
  392. package/lib/esm/core-react/loading/LoadingStatus.js +1 -1
  393. package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
  394. package/lib/esm/core-react/messagebox/MessageBox.d.ts +5 -1
  395. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  396. package/lib/esm/core-react/messagebox/MessageBox.js +8 -1
  397. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  398. package/lib/esm/core-react/notification/MessageRenderer.d.ts +2 -0
  399. package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
  400. package/lib/esm/core-react/notification/MessageRenderer.js +2 -0
  401. package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
  402. package/lib/esm/core-react/notification/MessageType.d.ts +2 -0
  403. package/lib/esm/core-react/notification/MessageType.d.ts.map +1 -1
  404. package/lib/esm/core-react/notification/MessageType.js.map +1 -1
  405. package/lib/esm/core-react/popup/Popup.d.ts +6 -1
  406. package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
  407. package/lib/esm/core-react/popup/Popup.js +9 -2
  408. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  409. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +4 -4
  410. package/lib/esm/core-react/radialmenu/RadialMenu.js +2 -2
  411. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  412. package/lib/esm/core-react/searchbox/SearchBox.d.ts +2 -2
  413. package/lib/esm/core-react/searchbox/SearchBox.js +1 -1
  414. package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
  415. package/lib/esm/core-react/settings/SettingsManager.d.ts +8 -8
  416. package/lib/esm/core-react/settings/SettingsManager.js +4 -4
  417. package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
  418. package/lib/esm/core-react/tabs/Tabs.d.ts +4 -4
  419. package/lib/esm/core-react/tabs/Tabs.js +1 -1
  420. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  421. package/lib/esm/core-react/tabs/VerticalTabs.d.ts +1 -1
  422. package/lib/esm/core-react/tabs/VerticalTabs.js +1 -1
  423. package/lib/esm/core-react/tabs/VerticalTabs.js.map +1 -1
  424. package/lib/esm/core-react/text/BlockText.d.ts +1 -1
  425. package/lib/esm/core-react/text/BlockText.js +1 -1
  426. package/lib/esm/core-react/text/BlockText.js.map +1 -1
  427. package/lib/esm/core-react/text/BodyText.d.ts +1 -1
  428. package/lib/esm/core-react/text/BodyText.js +1 -1
  429. package/lib/esm/core-react/text/BodyText.js.map +1 -1
  430. package/lib/esm/core-react/text/DisabledText.d.ts +1 -1
  431. package/lib/esm/core-react/text/DisabledText.js +1 -1
  432. package/lib/esm/core-react/text/DisabledText.js.map +1 -1
  433. package/lib/esm/core-react/text/FilteredText.d.ts +2 -0
  434. package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
  435. package/lib/esm/core-react/text/FilteredText.js +2 -0
  436. package/lib/esm/core-react/text/FilteredText.js.map +1 -1
  437. package/lib/esm/core-react/text/MutedText.d.ts +1 -1
  438. package/lib/esm/core-react/text/MutedText.js +1 -1
  439. package/lib/esm/core-react/text/MutedText.js.map +1 -1
  440. package/lib/esm/core-react/text/StyledText.d.ts +2 -2
  441. package/lib/esm/core-react/text/StyledText.js +1 -1
  442. package/lib/esm/core-react/text/StyledText.js.map +1 -1
  443. package/lib/esm/core-react/text/TextProps.d.ts +1 -1
  444. package/lib/esm/core-react/text/TextProps.js.map +1 -1
  445. package/lib/esm/core-react/tree/Branch.d.ts +2 -0
  446. package/lib/esm/core-react/tree/Branch.d.ts.map +1 -1
  447. package/lib/esm/core-react/tree/Branch.js +2 -0
  448. package/lib/esm/core-react/tree/Branch.js.map +1 -1
  449. package/lib/esm/core-react/tree/ExpansionToggle.d.ts +2 -0
  450. package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  451. package/lib/esm/core-react/tree/ExpansionToggle.js +2 -0
  452. package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
  453. package/lib/esm/core-react/tree/Node.d.ts +3 -3
  454. package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
  455. package/lib/esm/core-react/tree/Node.js +6 -1
  456. package/lib/esm/core-react/tree/Node.js.map +1 -1
  457. package/lib/esm/core-react/tree/Placeholder.d.ts +2 -0
  458. package/lib/esm/core-react/tree/Placeholder.d.ts.map +1 -1
  459. package/lib/esm/core-react/tree/Placeholder.js +2 -0
  460. package/lib/esm/core-react/tree/Placeholder.js.map +1 -1
  461. package/lib/esm/core-react/tree/Tree.d.ts +2 -0
  462. package/lib/esm/core-react/tree/Tree.d.ts.map +1 -1
  463. package/lib/esm/core-react/tree/Tree.js +2 -0
  464. package/lib/esm/core-react/tree/Tree.js.map +1 -1
  465. package/lib/esm/core-react/utils/IconHelper.d.ts +1 -0
  466. package/lib/esm/core-react/utils/IconHelper.d.ts.map +1 -1
  467. package/lib/esm/core-react/utils/IconHelper.js +2 -0
  468. package/lib/esm/core-react/utils/IconHelper.js.map +1 -1
  469. package/lib/esm/core-react/utils/Props.d.ts +5 -1
  470. package/lib/esm/core-react/utils/Props.d.ts.map +1 -1
  471. package/lib/esm/core-react/utils/Props.js.map +1 -1
  472. package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts +1 -0
  473. package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  474. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js +3 -0
  475. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  476. package/lib/esm/core-react/utils/Timer.d.ts +2 -0
  477. package/lib/esm/core-react/utils/Timer.d.ts.map +1 -1
  478. package/lib/esm/core-react/utils/Timer.js +2 -0
  479. package/lib/esm/core-react/utils/Timer.js.map +1 -1
  480. package/lib/esm/core-react/utils/getCssVariable.d.ts +2 -0
  481. package/lib/esm/core-react/utils/getCssVariable.d.ts.map +1 -1
  482. package/lib/esm/core-react/utils/getCssVariable.js +3 -0
  483. package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
  484. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
  485. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +1 -0
  486. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  487. package/lib/esm/core-react/utils/hooks/useDisposable.d.ts +1 -0
  488. package/lib/esm/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  489. package/lib/esm/core-react/utils/hooks/useDisposable.js +1 -0
  490. package/lib/esm/core-react/utils/hooks/useDisposable.js.map +1 -1
  491. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.d.ts +1 -0
  492. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
  493. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js +1 -0
  494. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  495. package/lib/esm/core-react/utils/hooks/useInterval.d.ts +1 -0
  496. package/lib/esm/core-react/utils/hooks/useInterval.d.ts.map +1 -1
  497. package/lib/esm/core-react/utils/hooks/useInterval.js +1 -0
  498. package/lib/esm/core-react/utils/hooks/useInterval.js.map +1 -1
  499. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts +5 -1
  500. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
  501. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js +1 -0
  502. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  503. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +2 -0
  504. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  505. package/lib/esm/core-react/utils/hooks/useResizeObserver.js +2 -0
  506. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  507. package/lib/esm/core-react/utils/typeUtils.d.ts +1 -0
  508. package/lib/esm/core-react/utils/typeUtils.d.ts.map +1 -1
  509. package/lib/esm/core-react/utils/typeUtils.js.map +1 -1
  510. package/lib/esm/core-react.d.ts +0 -1
  511. package/lib/esm/core-react.d.ts.map +1 -1
  512. package/lib/esm/core-react.js +2 -1
  513. package/lib/esm/core-react.js.map +1 -1
  514. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"MessageBox.js","sourceRoot":"","sources":["../../../../src/core-react/messagebox/MessageBox.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE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tB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACF,CACP,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 Dialog\n */\n\nimport \"./MessageBox.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { DialogButtonDef } from \"@itwin/appui-abstract\";\nimport { MessageSeverity } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"../utils/Props\";\nimport {\n SvgHelpCircular,\n SvgHelpCircularHollow,\n SvgInfoCircular,\n SvgInfoCircularHollow,\n SvgStatusError,\n SvgStatusErrorHollow,\n SvgStatusRejected,\n SvgStatusRejectedHollow,\n SvgStatusSuccess,\n SvgStatusSuccessHollow,\n SvgStatusWarning,\n} from \"@itwin/itwinui-icons-react\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\nimport { Dialog } from \"../dialog/Dialog\";\n\n/** Properties for the [[MessageBox]] component\n * @public\n */\nexport interface MessageBoxProps extends CommonProps {\n /** Severity of MessageBox */\n severity: MessageSeverity;\n /** whether to show dialog or not */\n opened: boolean;\n /** List of [[DialogButtonDef]] objects specifying buttons and associated onClick events */\n buttonCluster: DialogButtonDef[];\n /** Title to show in title bar of dialog */\n title?: string | React.ReactElement;\n /** onClick event for X button for dialog */\n onClose?: () => void;\n /** 'keyup' event for <Esc> key */\n onEscape?: () => void;\n /** minimum width that the dialog may be resized to. Default: 400 */\n minWidth?: number;\n /** minimum height that the dialog may be resized to. Default: 400 */\n minHeight?: number;\n /** initial width of dialog.\n * Displayed in px if value is a number, otherwise displayed in specified CSS unit.\n * Default: \"50%\"\n */\n width?: string | number;\n /** initial height of dialog.\n * Displayed in px if value is a number, otherwise displayed in specified CSS unit.\n * Default: \"\"\n */\n height?: string | number;\n /** Whether to show background overlay. Default: true */\n modal?: boolean;\n /** Custom CSS class name for the content */\n contentClassName?: string;\n /** Custom CSS Style for the content */\n contentStyle?: React.CSSProperties;\n /** Message content */\n children?: React.ReactNode;\n}\n\n/** Message Box React component.\n * @public\n */\nexport class MessageBox extends React.PureComponent<MessageBoxProps> {\n public static defaultProps: Partial<MessageBoxProps> = {\n minWidth: 400,\n minHeight: 400,\n width: \"512px\",\n modal: true,\n };\n\n public override render(): React.ReactElement {\n return (\n // eslint-disable-next-line deprecation/deprecation\n <Dialog\n title={this.props.title}\n buttonCluster={this.props.buttonCluster}\n opened={this.props.opened}\n onClose={this.props.onClose}\n onEscape={this.props.onEscape}\n modal={this.props.modal}\n className={this.props.className}\n style={this.props.style}\n width={this.props.width}\n >\n <MessageContainer\n severity={this.props.severity}\n className={this.props.contentClassName}\n style={this.props.contentStyle}\n >\n {this.props.children}\n </MessageContainer>\n </Dialog>\n );\n }\n}\n\n/** Properties for the [[MessageContainer]] component\n * @public\n */\nexport interface MessageContainerProps extends CommonProps {\n severity: MessageSeverity;\n /** Message Content */\n children?: React.ReactNode;\n}\n\n/** Message Container React component.\n * @public\n */\nexport class MessageContainer extends React.PureComponent<MessageContainerProps> {\n /** Returns the class name corresponding to the MessageSeverity.\n * @param severity MessageSeverity\n */\n public static getIconClassName(severity: MessageSeverity): string;\n /** Returns the class name associated with the WebFont icon corresponding to the MessageSeverity.\n * @param severity MessageSeverity\n * @param hollow Should the icon be hollow\n * @deprecated in 4.0. Hollow parameter ignored, WebFont is not returned, only the color.\n */\n public static getIconClassName(\n severity: MessageSeverity,\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n hollow?: boolean\n ): string;\n\n public static getIconClassName(\n severity: MessageSeverity,\n _hollow?: boolean\n ): string {\n let iconClassName = \"\";\n\n switch (severity) {\n case MessageSeverity.None:\n iconClassName = \"\";\n break;\n case MessageSeverity.Success:\n iconClassName = \"core-message-box-success\";\n break;\n case MessageSeverity.Information:\n iconClassName = \"core-message-box-information\";\n break;\n case MessageSeverity.Question:\n iconClassName = \"core-message-box-question\";\n break;\n case MessageSeverity.Warning:\n iconClassName = \"core-message-box-warning\";\n break;\n case MessageSeverity.Error:\n iconClassName = \"core-message-box-error\";\n break;\n case MessageSeverity.Fatal:\n iconClassName = \"core-message-box-fatal\";\n break;\n }\n\n return iconClassName;\n }\n\n /** Returns the React icon corresponding to the MessageSeverity.\n * @param severity MessageSeverity\n * @param hollow set to true to return the hollow form of the icon.\n * @returns IconSpec\n */\n /* ignore for unit tests and replace with visual testing */\n\n public static getIcon(severity: MessageSeverity, hollow?: boolean): IconSpec {\n let iconSpec: IconSpec = \"\";\n switch (severity) {\n case MessageSeverity.None:\n iconSpec = \"\";\n break;\n case MessageSeverity.Success:\n iconSpec = hollow ? <SvgStatusSuccessHollow /> : <SvgStatusSuccess />;\n break;\n case MessageSeverity.Information:\n iconSpec = hollow ? <SvgInfoCircularHollow /> : <SvgInfoCircular />;\n break;\n case MessageSeverity.Question:\n iconSpec = hollow ? <SvgHelpCircularHollow /> : <SvgHelpCircular />;\n break;\n case MessageSeverity.Warning:\n iconSpec = <SvgStatusWarning />; // TODO - need icon-status-warning-hollow icon\n break;\n case MessageSeverity.Error:\n iconSpec = hollow ? <SvgStatusErrorHollow /> : <SvgStatusError />;\n break;\n case MessageSeverity.Fatal:\n iconSpec = hollow ? <SvgStatusRejectedHollow /> : <SvgStatusRejected />;\n break;\n }\n return iconSpec;\n }\n\n public override render(): React.ReactElement {\n const iconClassName = classnames(\n \"icon\",\n \"core-message-box-icon\",\n MessageContainer.getIconClassName(this.props.severity)\n );\n\n const iconSpec = MessageContainer.getIcon(this.props.severity);\n\n return (\n <div className=\"core-message-box-container\">\n <div className={iconClassName}>\n <Icon iconSpec={iconSpec} />\n </div>\n <div\n className={classnames(\n \"core-message-box-content\",\n this.props.className\n )}\n style={this.props.style}\n >\n {this.props.children}\n </div>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"MessageBox.js","sourceRoot":"","sources":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AC,CAAC;QAE/D,OAAO,CACL,6BAAK,SAAS,EAAC,4BAA4B;YACzC,6BAAK,SAAS,EAAE,aAAa;gBAC3B,oBAAC,IAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACxB;YACN,6BACE,SAAS,EAAE,UAAU,CACnB,0BAA0B,EAC1B,IAAI,CAAC,KAAK,CAAC,SAAS,CACrB,EACD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IAEtB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACF,CACP,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 Dialog\n */\n\nimport \"./MessageBox.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { DialogButtonDef } from \"@itwin/appui-abstract\";\nimport { MessageSeverity } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"../utils/Props\";\nimport {\n SvgHelpCircular,\n SvgHelpCircularHollow,\n SvgInfoCircular,\n SvgInfoCircularHollow,\n SvgStatusError,\n SvgStatusErrorHollow,\n SvgStatusRejected,\n SvgStatusRejectedHollow,\n SvgStatusSuccess,\n SvgStatusSuccessHollow,\n SvgStatusWarning,\n} from \"@itwin/itwinui-icons-react\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\nimport { Dialog } from \"../dialog/Dialog\";\n\n/** Properties for the [[MessageBox]] component\n * @public\n * @deprecated in 4.15.0. Props of deprecated {@link MessageBox} component.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface MessageBoxProps extends CommonProps {\n /** Severity of MessageBox */\n severity: MessageSeverity;\n /** whether to show dialog or not */\n opened: boolean;\n /** List of [[DialogButtonDef]] objects specifying buttons and associated onClick events */\n buttonCluster: DialogButtonDef[];\n /** Title to show in title bar of dialog */\n title?: string | React.ReactElement;\n /** onClick event for X button for dialog */\n onClose?: () => void;\n /** 'keyup' event for <Esc> key */\n onEscape?: () => void;\n /** minimum width that the dialog may be resized to. Default: 400 */\n minWidth?: number;\n /** minimum height that the dialog may be resized to. Default: 400 */\n minHeight?: number;\n /** initial width of dialog.\n * Displayed in px if value is a number, otherwise displayed in specified CSS unit.\n * Default: \"50%\"\n */\n width?: string | number;\n /** initial height of dialog.\n * Displayed in px if value is a number, otherwise displayed in specified CSS unit.\n * Default: \"\"\n */\n height?: string | number;\n /** Whether to show background overlay. Default: true */\n modal?: boolean;\n /** Custom CSS class name for the content */\n contentClassName?: string;\n /** Custom CSS Style for the content */\n contentStyle?: React.CSSProperties;\n /** Message content */\n children?: React.ReactNode;\n}\n\n/** Message Box React component.\n * @public\n * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/dialog iTwinUI Dialog} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class MessageBox extends React.PureComponent<MessageBoxProps> {\n // eslint-disable-next-line deprecation/deprecation\n public static defaultProps: Partial<MessageBoxProps> = {\n minWidth: 400,\n minHeight: 400,\n width: \"512px\",\n modal: true,\n };\n\n public override render(): React.ReactElement {\n return (\n // eslint-disable-next-line deprecation/deprecation\n <Dialog\n title={this.props.title}\n buttonCluster={this.props.buttonCluster}\n opened={this.props.opened}\n onClose={this.props.onClose}\n onEscape={this.props.onEscape}\n modal={this.props.modal}\n className={this.props.className}\n style={this.props.style}\n width={this.props.width}\n >\n {/* eslint-disable-next-line deprecation/deprecation */}\n <MessageContainer\n severity={this.props.severity}\n className={this.props.contentClassName}\n style={this.props.contentStyle}\n >\n {this.props.children}\n </MessageContainer>\n </Dialog>\n );\n }\n}\n\n/** Properties for the [[MessageContainer]] component\n * @public\n * @deprecated in 4.15.0. Props of deprecated {@link MessageContainer} component.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface MessageContainerProps extends CommonProps {\n severity: MessageSeverity;\n /** Message Content */\n children?: React.ReactNode;\n}\n\n/** Message Container React component.\n * @public\n * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/dialog iTwinUI Dialog} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class MessageContainer extends React.PureComponent<MessageContainerProps> {\n /** Returns the class name corresponding to the MessageSeverity.\n * @param severity MessageSeverity\n */\n public static getIconClassName(severity: MessageSeverity): string;\n /** Returns the class name associated with the WebFont icon corresponding to the MessageSeverity.\n * @param severity MessageSeverity\n * @param hollow Should the icon be hollow\n * @deprecated in 4.0.0. Hollow parameter ignored, WebFont is not returned, only the color.\n */\n public static getIconClassName(\n severity: MessageSeverity,\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n hollow?: boolean\n ): string;\n\n public static getIconClassName(\n severity: MessageSeverity,\n _hollow?: boolean\n ): string {\n let iconClassName = \"\";\n\n switch (severity) {\n case MessageSeverity.None:\n iconClassName = \"\";\n break;\n case MessageSeverity.Success:\n iconClassName = \"core-message-box-success\";\n break;\n case MessageSeverity.Information:\n iconClassName = \"core-message-box-information\";\n break;\n case MessageSeverity.Question:\n iconClassName = \"core-message-box-question\";\n break;\n case MessageSeverity.Warning:\n iconClassName = \"core-message-box-warning\";\n break;\n case MessageSeverity.Error:\n iconClassName = \"core-message-box-error\";\n break;\n case MessageSeverity.Fatal:\n iconClassName = \"core-message-box-fatal\";\n break;\n }\n\n return iconClassName;\n }\n\n /** Returns the React icon corresponding to the MessageSeverity.\n * @param severity MessageSeverity\n * @param hollow set to true to return the hollow form of the icon.\n * @returns IconSpec\n */\n /* ignore for unit tests and replace with visual testing */\n\n public static getIcon(severity: MessageSeverity, hollow?: boolean): IconSpec {\n let iconSpec: IconSpec = \"\";\n switch (severity) {\n case MessageSeverity.None:\n iconSpec = \"\";\n break;\n case MessageSeverity.Success:\n iconSpec = hollow ? <SvgStatusSuccessHollow /> : <SvgStatusSuccess />;\n break;\n case MessageSeverity.Information:\n iconSpec = hollow ? <SvgInfoCircularHollow /> : <SvgInfoCircular />;\n break;\n case MessageSeverity.Question:\n iconSpec = hollow ? <SvgHelpCircularHollow /> : <SvgHelpCircular />;\n break;\n case MessageSeverity.Warning:\n iconSpec = <SvgStatusWarning />; // TODO - need icon-status-warning-hollow icon\n break;\n case MessageSeverity.Error:\n iconSpec = hollow ? <SvgStatusErrorHollow /> : <SvgStatusError />;\n break;\n case MessageSeverity.Fatal:\n iconSpec = hollow ? <SvgStatusRejectedHollow /> : <SvgStatusRejected />;\n break;\n }\n return iconSpec;\n }\n\n public override render(): React.ReactElement {\n const iconClassName = classnames(\n \"icon\",\n \"core-message-box-icon\",\n MessageContainer.getIconClassName(this.props.severity) // eslint-disable-line deprecation/deprecation\n );\n\n // eslint-disable-next-line deprecation/deprecation\n const iconSpec = MessageContainer.getIcon(this.props.severity);\n\n return (\n <div className=\"core-message-box-container\">\n <div className={iconClassName}>\n <Icon iconSpec={iconSpec} />\n </div>\n <div\n className={classnames(\n \"core-message-box-content\",\n this.props.className\n )}\n style={this.props.style}\n >\n {this.props.children}\n </div>\n </div>\n );\n }\n}\n"]}
@@ -6,6 +6,7 @@ import type { MessageType } from "./MessageType";
6
6
  import type { ClassNameProps } from "../utils/Props";
7
7
  /** Properties for the [[MessageRenderer]] component
8
8
  * @public
9
+ * @deprecated in 4.15.0. Props of deprecated {@link MessageRenderer} component.
9
10
  */
10
11
  export interface MessageRendererProps extends ClassNameProps {
11
12
  /** Message to render */
@@ -15,6 +16,7 @@ export interface MessageRendererProps extends ClassNameProps {
15
16
  }
16
17
  /** React component renders a string, HTMLElement or React node in a `div` or `span`
17
18
  * @public
19
+ * @deprecated in 4.15.0. Used internally.
18
20
  */
19
21
  export declare function MessageRenderer(props: MessageRendererProps): React.JSX.Element | null;
20
22
  //# sourceMappingURL=MessageRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MessageRenderer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIrD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,wBAAwB;IACxB,OAAO,EAAE,WAAW,CAAC;IACrB,uEAAuE;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,4BAuF1D"}
1
+ {"version":3,"file":"MessageRenderer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIrD;;;GAGG;AAEH,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,wBAAwB;IAExB,OAAO,EAAE,WAAW,CAAC;IACrB,uEAAuE;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AAEH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,4BAuF1D"}
@@ -10,7 +10,9 @@ import DOMPurify, * as DOMPurifyNS from "dompurify";
10
10
  import { isHTMLElement, isReactMessage } from "./MessageType";
11
11
  /** React component renders a string, HTMLElement or React node in a `div` or `span`
12
12
  * @public
13
+ * @deprecated in 4.15.0. Used internally.
13
14
  */
15
+ // eslint-disable-next-line deprecation/deprecation
14
16
  export function MessageRenderer(props) {
15
17
  let messageNode = null;
16
18
  const OutElement = props.useSpan ? "span" : "div";
@@ -1 +1 @@
1
- {"version":3,"file":"MessageRenderer.js","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageRenderer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,yDAAyD;YACzD,uBAAuB,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,GAClD,CACH,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,IAAI,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC;YAC/B,WAAW,GAAG,CACZ,oBAAC,UAAU,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,IACnC,KAAK,CAAC,OAAO,CAAC,SAAS,CACb,CACd,CAAC;IACN,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC","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 Notification\n */\n\nimport * as React from \"react\";\nimport DOMPurify, * as DOMPurifyNS from \"dompurify\";\nimport type { MessageType } from \"./MessageType\";\nimport { isHTMLElement, isReactMessage } from \"./MessageType\";\nimport type { ClassNameProps } from \"../utils/Props\";\n\n// cSpell:ignore dompurify\n\n/** Properties for the [[MessageRenderer]] component\n * @public\n */\nexport interface MessageRendererProps extends ClassNameProps {\n /** Message to render */\n message: MessageType;\n /** Indicates whether to use a `span` or `div` element for rendering */\n useSpan?: boolean;\n}\n\n/** React component renders a string, HTMLElement or React node in a `div` or `span`\n * @public\n */\nexport function MessageRenderer(props: MessageRendererProps) {\n let messageNode = null;\n const OutElement = props.useSpan ? \"span\" : \"div\";\n\n if (typeof props.message === \"string\") {\n messageNode = (\n <OutElement className={props.className}>{props.message}</OutElement>\n );\n } else if (isHTMLElement(props.message)) {\n // the esm build of dompurify has a default import but the cjs build does not\n // if there is a default export, use it (likely esm), otherwise use the namespace\n const sanitizer = DOMPurify ?? DOMPurifyNS; // `sanitizer` is default function name for \"jam3/no-sanitizer-with-danger\" ESLint rule\n\n let validAnchors = false;\n let hasAnchors = false;\n\n // verify that the tag has proper relationships\n const isAnchorValid = (anchor: HTMLAnchorElement): boolean => {\n return (\n anchor.hasAttribute(\"rel\") &&\n (anchor.rel.includes(\"noopener\") || anchor.rel.includes(\"noreferrer\"))\n );\n };\n\n // recursively check child elements for valid anchor tags\n const checkChildAnchors = (parent: Element) => {\n const children = Array.from(parent.children);\n for (const child of children) {\n if (\n child.hasAttribute(\"target\") &&\n (child as HTMLAnchorElement).target === \"_blank\"\n ) {\n hasAnchors = true;\n validAnchors = isAnchorValid(child as HTMLAnchorElement);\n if (!validAnchors) {\n return;\n }\n }\n checkChildAnchors(child);\n }\n };\n\n // check for anchor tags in the message that have target _blank also have a relationship that avoids security holes\n // https://web.dev/external-anchors-use-rel-noopener/\n // first check the message element\n\n if (\n props.message.hasAttribute(\"target\") &&\n (props.message as HTMLAnchorElement).target === \"_blank\"\n ) {\n hasAnchors = true;\n validAnchors = isAnchorValid(props.message as HTMLAnchorElement);\n } else {\n // if the message element is not an anchor, recursively verify it's children\n if (props.message.children) {\n checkChildAnchors(props.message);\n }\n }\n\n let sanitizedHtml;\n if (hasAnchors && validAnchors) {\n // all anchors are valid. do not remove the target attr\n sanitizedHtml = sanitizer.sanitize(props.message.outerHTML, {\n ADD_ATTR: [\"target\"],\n });\n } else {\n sanitizedHtml = sanitizer.sanitize(props.message.outerHTML);\n }\n\n messageNode = (\n <OutElement\n className={props.className}\n // we can safely disable jam3/no-sanitizer-with-danger as we are sanitizing above\n // eslint-disable-next-line jam3/no-sanitizer-with-danger\n dangerouslySetInnerHTML={{ __html: sanitizedHtml }}\n />\n );\n } else {\n if (isReactMessage(props.message))\n messageNode = (\n <OutElement className={props.className}>\n {props.message.reactNode}\n </OutElement>\n );\n }\n\n return messageNode;\n}\n"]}
1
+ {"version":3,"file":"MessageRenderer.js","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageRenderer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,SAAS,EAAE,KAAK,WAAW,MAAM,WAAW,CAAC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CAAC,OAAO,CAAC;YAC/B,WAAW,GAAG,CACZ,oBAAC,UAAU,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,IACnC,KAAK,CAAC,OAAO,CAAC,SAAS,CACb,CACd,CAAC;IACN,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC","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 Notification\n */\n\nimport * as React from \"react\";\nimport DOMPurify, * as DOMPurifyNS from \"dompurify\";\nimport type { MessageType } from \"./MessageType\";\nimport { isHTMLElement, isReactMessage } from \"./MessageType\";\nimport type { ClassNameProps } from \"../utils/Props\";\n\n// cSpell:ignore dompurify\n\n/** Properties for the [[MessageRenderer]] component\n * @public\n * @deprecated in 4.15.0. Props of deprecated {@link MessageRenderer} component.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface MessageRendererProps extends ClassNameProps {\n /** Message to render */\n // eslint-disable-next-line deprecation/deprecation\n message: MessageType;\n /** Indicates whether to use a `span` or `div` element for rendering */\n useSpan?: boolean;\n}\n\n/** React component renders a string, HTMLElement or React node in a `div` or `span`\n * @public\n * @deprecated in 4.15.0. Used internally.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function MessageRenderer(props: MessageRendererProps) {\n let messageNode = null;\n const OutElement = props.useSpan ? \"span\" : \"div\";\n\n if (typeof props.message === \"string\") {\n messageNode = (\n <OutElement className={props.className}>{props.message}</OutElement>\n );\n } else if (isHTMLElement(props.message)) {\n // the esm build of dompurify has a default import but the cjs build does not\n // if there is a default export, use it (likely esm), otherwise use the namespace\n const sanitizer = DOMPurify ?? DOMPurifyNS; // `sanitizer` is default function name for \"jam3/no-sanitizer-with-danger\" ESLint rule\n\n let validAnchors = false;\n let hasAnchors = false;\n\n // verify that the tag has proper relationships\n const isAnchorValid = (anchor: HTMLAnchorElement): boolean => {\n return (\n anchor.hasAttribute(\"rel\") &&\n (anchor.rel.includes(\"noopener\") || anchor.rel.includes(\"noreferrer\"))\n );\n };\n\n // recursively check child elements for valid anchor tags\n const checkChildAnchors = (parent: Element) => {\n const children = Array.from(parent.children);\n for (const child of children) {\n if (\n child.hasAttribute(\"target\") &&\n (child as HTMLAnchorElement).target === \"_blank\"\n ) {\n hasAnchors = true;\n validAnchors = isAnchorValid(child as HTMLAnchorElement);\n if (!validAnchors) {\n return;\n }\n }\n checkChildAnchors(child);\n }\n };\n\n // check for anchor tags in the message that have target _blank also have a relationship that avoids security holes\n // https://web.dev/external-anchors-use-rel-noopener/\n // first check the message element\n\n if (\n props.message.hasAttribute(\"target\") &&\n (props.message as HTMLAnchorElement).target === \"_blank\"\n ) {\n hasAnchors = true;\n validAnchors = isAnchorValid(props.message as HTMLAnchorElement);\n } else {\n // if the message element is not an anchor, recursively verify it's children\n if (props.message.children) {\n checkChildAnchors(props.message);\n }\n }\n\n let sanitizedHtml;\n if (hasAnchors && validAnchors) {\n // all anchors are valid. do not remove the target attr\n sanitizedHtml = sanitizer.sanitize(props.message.outerHTML, {\n ADD_ATTR: [\"target\"],\n });\n } else {\n sanitizedHtml = sanitizer.sanitize(props.message.outerHTML);\n }\n\n messageNode = (\n <OutElement\n className={props.className}\n // we can safely disable jam3/no-sanitizer-with-danger as we are sanitizing above\n // eslint-disable-next-line jam3/no-sanitizer-with-danger\n dangerouslySetInnerHTML={{ __html: sanitizedHtml }}\n />\n );\n } else {\n if (isReactMessage(props.message))\n messageNode = (\n <OutElement className={props.className}>\n {props.message.reactNode}\n </OutElement>\n );\n }\n\n return messageNode;\n}\n"]}
@@ -4,12 +4,14 @@
4
4
  import type * as React from "react";
5
5
  /** Describes a React based message
6
6
  * @public
7
+ * @deprecated in 4.15.0. Used internally.
7
8
  */
8
9
  export interface ReactMessage {
9
10
  reactNode: React.ReactNode;
10
11
  }
11
12
  /** Types for message
12
13
  * @public
14
+ * @deprecated in 4.15.0. Used internally.
13
15
  */
14
16
  export type MessageType = string | HTMLElement | ReactMessage;
15
17
  /** HTMLElement type guard.
@@ -1 +1 @@
1
- {"version":3,"file":"MessageType.d.ts","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageType.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,aAAa,YAAa,WAAW,2BAEjD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,YAChB,WAAW,4BAGrB,CAAC"}
1
+ {"version":3,"file":"MessageType.d.ts","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageType.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,aAAa,YAAa,WAAW,2BAEjD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,YAChB,WAAW,4BAGrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MessageType.js","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageType.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAgBH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAoB,EAA0B,EAAE;IAC5E,OAAQ,OAAuB,CAAC,SAAS,KAAK,SAAS,CAAC;AAC1D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,OAAoB,EACK,EAAE;IAC3B,OAAQ,OAAwB,CAAC,SAAS,KAAK,SAAS,CAAC;AAC3D,CAAC,CAAC","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 Notification\n */\n\nimport type * as React from \"react\";\n\n/** Describes a React based message\n * @public\n */\nexport interface ReactMessage {\n reactNode: React.ReactNode;\n}\n\n/** Types for message\n * @public\n */\nexport type MessageType = string | HTMLElement | ReactMessage;\n\n/** HTMLElement type guard.\n * @internal\n */\nexport const isHTMLElement = (message: MessageType): message is HTMLElement => {\n return (message as HTMLElement).outerHTML !== undefined;\n};\n\n/** ReactMessage type guard.\n * @internal\n */\nexport const isReactMessage = (\n message: MessageType\n): message is ReactMessage => {\n return (message as ReactMessage).reactNode !== undefined;\n};\n"]}
1
+ {"version":3,"file":"MessageType.js","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageType.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAoBH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAoB,EAA0B,EAAE;IAC5E,OAAQ,OAAuB,CAAC,SAAS,KAAK,SAAS,CAAC;AAC1D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,OAAoB,EACK,EAAE;IAC3B,OAAQ,OAAwB,CAAC,SAAS,KAAK,SAAS,CAAC;AAC3D,CAAC,CAAC","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 Notification\n */\n\nimport type * as React from \"react\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Describes a React based message\n * @public\n * @deprecated in 4.15.0. Used internally.\n */\nexport interface ReactMessage {\n reactNode: React.ReactNode;\n}\n\n/** Types for message\n * @public\n * @deprecated in 4.15.0. Used internally.\n */\nexport type MessageType = string | HTMLElement | ReactMessage;\n\n/** HTMLElement type guard.\n * @internal\n */\nexport const isHTMLElement = (message: MessageType): message is HTMLElement => {\n return (message as HTMLElement).outerHTML !== undefined;\n};\n\n/** ReactMessage type guard.\n * @internal\n */\nexport const isReactMessage = (\n message: MessageType\n): message is ReactMessage => {\n return (message as ReactMessage).reactNode !== undefined;\n};\n"]}
@@ -7,6 +7,7 @@ import { RelativePosition } from "@itwin/appui-abstract";
7
7
  import type { CommonProps } from "../utils/Props";
8
8
  /** Properties for the [[Popup]] component
9
9
  * @public
10
+ * @deprecated in 4.15.0. Props of deprecated {@link Popup} component.
10
11
  */
11
12
  export interface PopupProps extends CommonProps {
12
13
  /** Show or hide the box shadow (defaults to true) */
@@ -67,6 +68,8 @@ export interface PopupProps extends CommonProps {
67
68
  repositionOnResize?: boolean;
68
69
  /** Content */
69
70
  children?: React.ReactNode;
71
+ /** Target that should be used when portaling popup. */
72
+ portalTarget?: HTMLElement;
70
73
  }
71
74
  /** @internal */
72
75
  interface PopupState {
@@ -79,6 +82,7 @@ interface PopupState {
79
82
  }
80
83
  /** Popup React component displays a popup relative to an optional target element.
81
84
  * @public
85
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/popover iTwinUI Popover} instead.
82
86
  */
83
87
  export declare class Popup extends React.Component<PopupProps, PopupState> {
84
88
  private _popup;
@@ -86,7 +90,8 @@ export declare class Popup extends React.Component<PopupProps, PopupState> {
86
90
  static defaultProps: Partial<PopupProps>;
87
91
  componentDidMount(): void;
88
92
  private getParentWindow;
89
- componentDidUpdate(previousProps: PopupProps, prevState: PopupState): void;
93
+ componentDidUpdate(previousProps: PopupProps, // eslint-disable-line deprecation/deprecation
94
+ prevState: PopupState): void;
90
95
  componentWillUnmount(): void;
91
96
  private _bindWindowEvents;
92
97
  private _unBindWindowEvents;
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../../src/core-react/popup/Popup.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAWlD;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,qDAAqD;IACrD,UAAU,EAAE,OAAO,CAAC;IACpB,iDAAiD;IACjD,SAAS,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,MAAM,EAAE,OAAO,CAAC;IAChB,6FAA6F;IAC7F,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAC;IACZ,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,0DAA0D;IAC1D,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,6DAA6D;IAC7D,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACxC,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,+CAA+C;IAC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AMzB;IAEc,MAAM;IAsDtB,OAAO,CAAC,YAAY;CASrB"}
@@ -15,8 +15,11 @@ import { FocusTrap } from "../focustrap/FocusTrap";
15
15
  import { Rectangle } from "../utils/Rectangle";
16
16
  /** Popup React component displays a popup relative to an optional target element.
17
17
  * @public
18
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/popover iTwinUI Popover} instead.
18
19
  */
20
+ // eslint-disable-next-line deprecation/deprecation
19
21
  export class Popup extends React.Component {
22
+ // eslint-disable-next-line deprecation/deprecation
20
23
  constructor(props) {
21
24
  super(props);
22
25
  this._popup = null;
@@ -231,7 +234,8 @@ export class Popup extends React.Component {
231
234
  getParentWindow() {
232
235
  return this.state.parentDocument.defaultView ?? window;
233
236
  }
234
- componentDidUpdate(previousProps, prevState) {
237
+ componentDidUpdate(previousProps, // eslint-disable-line deprecation/deprecation
238
+ prevState) {
235
239
  if (this.state.position !== prevState.position) {
236
240
  this.setState({ animationEnded: false });
237
241
  }
@@ -426,9 +430,12 @@ export class Popup extends React.Component {
426
430
  React.createElement(FocusTrap, { active: !!this.props.moveFocus, initialFocusElement: this.props.focusTarget, returnFocusOnDeactivate: true }, this.props.children)), this.getContainer());
427
431
  }
428
432
  getContainer() {
429
- return (this.state.parentDocument.body.querySelector('[data-root-container="appui-root-id"]') ?? this.state.parentDocument.body);
433
+ return (this.props.portalTarget ??
434
+ this.state.parentDocument.body.querySelector('[data-root-container="appui-root-id"]') ??
435
+ this.state.parentDocument.body);
430
436
  }
431
437
  }
438
+ // eslint-disable-next-line deprecation/deprecation
432
439
  Popup.defaultProps = {
433
440
  position: RelativePosition.Bottom,
434
441
  showShadow: true,
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.js","sourceRoot":"","sources":["../../../../src/core-react/popup/Popup.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,cAAc,CAAC;AACtB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,K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IAAI,CAAC,KAAK,CAAC,SAAS,EAChC,cAAc,EAAE,IAAI,CAAC,mBAAmB;YAExC,oBAAC,SAAS,IACR,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAC9B,mBAAmB,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EAC3C,uBAAuB,EAAE,IAAI,IAE5B,IAAI,CAAC,KAAK,CAAC,QAAQ,CACV,CACR,EACN,IAAI,CAAC,YAAY,EAAE,CACpB,CAAC;IACJ,CAAC;IAEO,YAAY;QAClB,OAAO,CACL,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,CAC1C,uCAAuC,CACxC,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CACpC,CAAC;IACJ,CAAC;;AAhhBa,kBAAY,GAAwB;IAChD,QAAQ,EAAE,gBAAgB,CAAC,MAAM;IACjC,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC,CAAC;IACP,IAAI,EAAE,CAAC,CAAC;CACT,AARyB,CAQxB;AA2gBJ,SAAS,aAAa,CAAC,KAAa;IAClC,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACnC,OAAO,MAAM,IAAI,CAAC,CAAC;AACrB,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC","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 Popup\n */\n\nimport \"./Popup.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Key } from \"ts-key-enum\";\nimport { RelativePosition } from \"@itwin/appui-abstract\";\nimport { FocusTrap } from \"../focustrap/FocusTrap\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Rectangle } from \"../utils/Rectangle\";\n\n// cSpell:ignore focustrap focusable alertdialog\n\n/** @internal */\ninterface PopupPoint {\n x: number;\n y: number;\n}\n\n/** Properties for the [[Popup]] component\n * @public\n */\nexport interface PopupProps extends CommonProps {\n /** Show or hide the box shadow (defaults to true) */\n showShadow: boolean;\n /** Show or hide the arrow (defaults to false) */\n showArrow: boolean;\n /** Indicates whether the popup is shown or not (defaults to false) */\n isOpen: boolean;\n /** Direction (relative to the target) to which the popup is expanded (defaults to Bottom) */\n position: RelativePosition;\n /** Top position (absolute positioning - defaults to 0) */\n top: number;\n /** Left position (absolute positioning - defaults to 0) */\n left: number;\n /** Function called when the popup is opened */\n onOpen?: () => void;\n /** Function called when user clicks outside the popup */\n onOutsideClick?: (e: MouseEvent) => void;\n /** Function called when the popup is closed */\n onClose?: () => void;\n /** Function called when the popup is closed on Enter */\n onEnter?: () => void;\n /** Function called when the wheel is used */\n onWheel?: (e: WheelEvent) => void;\n /** Function called when the right mouse button is pressed */\n onContextMenu?: (e: MouseEvent) => void;\n /** Offset from the parent (defaults to 4) */\n offset: number;\n /** Target element to position popup */\n target?: HTMLElement | null;\n /** Role - if not specified \"dialog\" is used */\n role?: \"dialog\" | \"alert\" | \"alertdialog\";\n /** accessibility label */\n ariaLabel?: string;\n /** set focus to popup - default to not set focus */\n moveFocus?: boolean;\n /** Element to receive focus, specified by React.RefObject or CSS selector string. If undefined and moveFocus is true then focus is moved to first focusable element. */\n focusTarget?: React.RefObject<HTMLElement> | string;\n /** Indicates whether the popup is pinned. */\n isPinned?: boolean;\n /** Indicates whether to use animation for open/close (defaults to true) */\n animate?: boolean;\n /** Indicates whether to close the popup when Enter is pressed (defaults to true) */\n closeOnEnter?: boolean;\n /** Indicates whether to close the popup when the wheel is used (defaults to true) */\n closeOnWheel?: boolean;\n /** Indicates whether to close the popup when the right mouse button is pressed (defaults to true) */\n closeOnContextMenu?: boolean;\n /** If false outside click processing and closing are skipped if click occurs in another Popup component, default to false. */\n closeOnNestedPopupOutsideClick?: boolean;\n /** If true the children are mounted once and unmounted when this component is unmounted. If false the\n * children are unmounted each time the popup is closed. */\n keepContentsMounted?: boolean;\n\n /**\n * If true the popup will remain open and will be repositioned when window resize events occur, default to false.\n * @beta\n * */\n repositionOnResize?: boolean;\n\n /** Content */\n children?: React.ReactNode;\n}\n\n/** @internal */\ninterface PopupState {\n isOpen: boolean;\n top: number;\n left: number;\n position: RelativePosition;\n parentDocument: Document;\n animationEnded: boolean;\n}\n\n/** Popup React component displays a popup relative to an optional target element.\n * @public\n */\nexport class Popup extends React.Component<PopupProps, PopupState> {\n private _popup: HTMLElement | null = null;\n\n constructor(props: PopupProps) {\n super(props);\n const parentDocument = this.props.target?.ownerDocument ?? document;\n\n this.state = {\n animationEnded: false,\n isOpen: this.props.isOpen,\n top: 0,\n left: 0,\n position: this.props.position,\n parentDocument,\n };\n }\n\n public static defaultProps: Partial<PopupProps> = {\n position: RelativePosition.Bottom,\n showShadow: true,\n showArrow: false,\n isOpen: false,\n offset: 4,\n top: -1,\n left: -1,\n };\n\n public override componentDidMount() {\n if (this.props.isOpen) {\n this._onShow();\n }\n }\n\n private getParentWindow() {\n return this.state.parentDocument.defaultView ?? window;\n }\n\n public override componentDidUpdate(\n previousProps: PopupProps,\n prevState: PopupState\n ) {\n if (this.state.position !== prevState.position) {\n this.setState({ animationEnded: false });\n }\n\n if (this.props.target !== previousProps.target) {\n {\n const parentDocument = this.props.target?.ownerDocument ?? document;\n if (parentDocument !== this.state.parentDocument) {\n this._unBindWindowEvents();\n this.setState({ parentDocument });\n }\n }\n }\n\n if (this.props.isOpen === previousProps.isOpen) {\n if (this.props.isOpen) {\n const position = this._toggleRelativePosition();\n const point = this._fitPopup(this._getPosition(position));\n if (\n Math.abs(this.state.left - point.x) < 3 &&\n Math.abs(this.state.top - point.y) < 3 &&\n this.state.position === position\n )\n return;\n\n this.setState({\n left: point.x,\n top: point.y,\n position,\n });\n }\n return;\n }\n\n if (this.props.isOpen) {\n this._onShow();\n } else {\n this._onClose();\n }\n }\n\n public override componentWillUnmount() {\n this._unBindWindowEvents();\n }\n\n private _bindWindowEvents = () => {\n const activeWindow = this.getParentWindow();\n activeWindow.addEventListener(\"pointerdown\", this._handleOutsideClick);\n activeWindow.addEventListener(\"resize\", this._resize);\n activeWindow.addEventListener(\"contextmenu\", this._handleContextMenu);\n activeWindow.addEventListener(\"scroll\", this._hide);\n activeWindow.addEventListener(\"wheel\", this._handleWheel);\n activeWindow.addEventListener(\"keydown\", this._handleKeyboard);\n };\n\n private _unBindWindowEvents = () => {\n const activeWindow = this.getParentWindow();\n activeWindow.removeEventListener(\"pointerdown\", this._handleOutsideClick);\n activeWindow.removeEventListener(\"resize\", this._resize);\n activeWindow.removeEventListener(\"contextmenu\", this._handleContextMenu);\n activeWindow.removeEventListener(\"scroll\", this._hide);\n activeWindow.removeEventListener(\"wheel\", this._handleWheel);\n activeWindow.removeEventListener(\"keydown\", this._handleKeyboard);\n };\n\n private _handleWheel = (event: WheelEvent) => {\n if (this._popup && this._popup.contains(event.target as Node)) return;\n\n if (this.props.onWheel) return this.props.onWheel(event);\n\n const closeOnWheel =\n this.props.closeOnWheel !== undefined ? this.props.closeOnWheel : true;\n if (closeOnWheel) this._hide();\n };\n\n private isInCorePopup(element: HTMLElement): boolean {\n if (element.nodeName === \"DIV\") {\n if (element.classList && element.classList.contains(\"core-popup\"))\n return true;\n if (element.parentElement && this.isInCorePopup(element.parentElement))\n return true;\n } else {\n if (element.parentElement && this.isInCorePopup(element.parentElement))\n return true;\n }\n return false;\n }\n\n private _handleOutsideClick = (event: MouseEvent): void => {\n if (this._popup && this._popup.contains(event.target as Node)) return;\n\n if (this.props.isPinned) return;\n\n if (\n !this.props.closeOnNestedPopupOutsideClick &&\n this.isInCorePopup(event.target as HTMLElement)\n )\n return;\n\n if (this.props.onOutsideClick) return this.props.onOutsideClick(event);\n\n if (this.props.target && this.props.target.contains(event.target as Node))\n return;\n\n this._onClose();\n };\n\n private _handleContextMenu = (event: MouseEvent) => {\n if (this._popup && this._popup.contains(event.target as Node)) return;\n\n if (this.props.onContextMenu) return this.props.onContextMenu(event);\n\n const closeOnContextMenu =\n this.props.closeOnContextMenu !== undefined\n ? this.props.closeOnContextMenu\n : true;\n if (closeOnContextMenu) this._hide();\n };\n\n private _handleKeyboard = (event: KeyboardEvent): void => {\n if (this.props.isPinned) return;\n\n if (\n event.key === Key.Escape.valueOf() ||\n event.key === Key.Enter.valueOf()\n ) {\n const closeOnEnter =\n this.props.closeOnEnter !== undefined ? this.props.closeOnEnter : true;\n if (event.key === Key.Enter.valueOf()) {\n if (closeOnEnter) this._onClose(true);\n else this.props.onEnter && this.props.onEnter();\n } else {\n this._onClose(false);\n }\n }\n };\n\n private _resize = () => {\n if (this.props.repositionOnResize) {\n const position = this._toggleRelativePosition();\n const point = this._fitPopup(this._getPosition(position));\n this.setState({ left: point.x, top: point.y, position });\n } else {\n this._hide(); // legacy behavior\n }\n };\n\n private _hide = () => {\n if (this.props.isPinned) return;\n\n this._onClose();\n };\n\n private _onShow() {\n this._bindWindowEvents();\n const position = this._toggleRelativePosition();\n const point = this._fitPopup(this._getPosition(position));\n\n this.setState(\n { left: point.x, top: point.y, isOpen: true, position },\n () => {\n if (this.props.onOpen) this.props.onOpen();\n }\n );\n }\n\n private _onClose(enterKey?: boolean) {\n if (!this.state.isOpen) return;\n\n this._unBindWindowEvents();\n\n this.setState({ isOpen: false }, () => {\n if (enterKey && this.props.onEnter) this.props.onEnter();\n if (this.props.onClose) this.props.onClose();\n });\n }\n\n private _isPositionAbsolute(): boolean {\n return this.props.top !== -1 && this.props.left !== -1;\n }\n\n private _getClassNameByPosition(position: RelativePosition): string {\n if (!this._isPositionAbsolute()) {\n switch (position) {\n case RelativePosition.TopLeft:\n return \"core-popup-top-left\";\n case RelativePosition.TopRight:\n return \"core-popup-top-right\";\n case RelativePosition.BottomLeft:\n return \"core-popup-bottom-left\";\n case RelativePosition.BottomRight:\n return \"core-popup-bottom-right\";\n case RelativePosition.Top:\n return \"core-popup-top\";\n case RelativePosition.Left:\n return \"core-popup-left\";\n case RelativePosition.Right:\n return \"core-popup-right\";\n case RelativePosition.Bottom:\n return \"core-popup-bottom\";\n case RelativePosition.LeftTop:\n return \"core-popup-left-top\";\n case RelativePosition.RightTop:\n return \"core-popup-right-top\";\n }\n }\n\n return \"\";\n }\n\n private _getPopupDimensions(): { popupWidth: number; popupHeight: number } {\n let popupWidth = 0;\n let popupHeight = 0;\n if (this._popup) {\n const activeWindow = this.getParentWindow();\n const style = activeWindow.getComputedStyle(this._popup);\n const borderLeftWidth = parsePxString(style.borderLeftWidth);\n const borderRightWidth = parsePxString(style.borderRightWidth);\n const borderTopWidth = parsePxString(style.borderTopWidth);\n const borderBottomWidth = parsePxString(style.borderBottomWidth);\n popupWidth = this._popup.clientWidth + borderLeftWidth + borderRightWidth;\n popupHeight =\n this._popup.clientHeight + borderTopWidth + borderBottomWidth;\n }\n\n return { popupWidth, popupHeight };\n }\n\n private _getPosition = (position: RelativePosition) => {\n const activeWindow = this.getParentWindow();\n const { target, offset, top, left } = this.props;\n const offsetArrow = this.props.showArrow ? 6 : 0;\n\n // absolute position\n if (this._isPositionAbsolute()) return { x: left, y: top };\n\n // sanity check\n const point = { x: 0, y: 0 };\n if (!this._popup || !target) return point;\n\n // relative position\n const scrollY = activeWindow.scrollY;\n const scrollX = activeWindow.scrollX;\n\n const container = this.getContainer();\n const containerBounds = container.getBoundingClientRect();\n const targetRect = Rectangle.create(target.getBoundingClientRect()).offset({\n x: -containerBounds.left,\n y: -containerBounds.top,\n });\n\n const { popupWidth, popupHeight } = this._getPopupDimensions();\n\n switch (position) {\n case RelativePosition.Top:\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\n point.x =\n scrollX +\n targetRect.left +\n targetRect.getWidth() / 2 -\n popupWidth / 2;\n break;\n\n case RelativePosition.TopLeft:\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\n point.x = scrollX + targetRect.left;\n break;\n\n case RelativePosition.TopRight:\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\n point.x = scrollX + targetRect.right - popupWidth;\n break;\n\n case RelativePosition.Bottom:\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\n point.x =\n scrollX +\n targetRect.left +\n targetRect.getWidth() / 2 -\n popupWidth / 2;\n break;\n\n case RelativePosition.BottomLeft:\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\n point.x = scrollX + targetRect.left;\n break;\n\n case RelativePosition.BottomRight:\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\n point.x = scrollX + targetRect.right - popupWidth;\n break;\n\n case RelativePosition.Left:\n point.y =\n scrollY +\n targetRect.top +\n targetRect.getHeight() / 2 -\n popupHeight / 2;\n point.x = scrollX + targetRect.left - popupWidth - offset - offsetArrow;\n break;\n\n case RelativePosition.LeftTop:\n point.y = scrollY + targetRect.top;\n point.x = scrollX + targetRect.left - popupWidth - offset - offsetArrow;\n break;\n\n case RelativePosition.Right:\n point.y =\n scrollY +\n targetRect.top +\n targetRect.getHeight() / 2 -\n popupHeight / 2;\n point.x = scrollX + targetRect.right + offset + offsetArrow;\n break;\n\n case RelativePosition.RightTop:\n point.y = scrollY + targetRect.top;\n point.x = scrollX + targetRect.right + offset + offsetArrow;\n break;\n }\n\n return point;\n };\n\n private _toggleRelativePosition(): RelativePosition {\n const { target, position, offset } = this.props;\n\n if (!this._popup || !target) return position;\n\n if (this._isPositionAbsolute()) return position;\n\n let newPosition = position;\n\n interface Rect {\n left: number;\n top: number;\n right: number;\n bottom: number;\n }\n\n const activeWindow = this.getParentWindow();\n\n // Note: Cannot use DOMRect yet since it's experimental and not available in all browsers (Nov. 2018)\n const viewportRect: Rect = {\n left: activeWindow.scrollX,\n top: activeWindow.scrollY,\n right: activeWindow.scrollX + activeWindow.innerWidth,\n bottom: activeWindow.scrollY + activeWindow.innerHeight,\n };\n const targetRect = target.getBoundingClientRect();\n const { popupWidth, popupHeight } = this._getPopupDimensions();\n const containerStyle = activeWindow.getComputedStyle(target);\n const offsetArrow = this.props.showArrow ? 10 : 2;\n\n const bottomMargin = parseMargin(containerStyle.marginBottom);\n if (\n targetRect.bottom + popupHeight + bottomMargin + offsetArrow + offset >\n viewportRect.bottom\n ) {\n if (newPosition === RelativePosition.Bottom)\n newPosition = RelativePosition.Top;\n else if (newPosition === RelativePosition.BottomLeft)\n newPosition = RelativePosition.TopLeft;\n else if (newPosition === RelativePosition.BottomRight)\n newPosition = RelativePosition.TopRight;\n }\n\n const topMargin = parseMargin(containerStyle.marginTop);\n if (\n targetRect.top - popupHeight - topMargin - offsetArrow - offset <\n viewportRect.top\n ) {\n if (newPosition === RelativePosition.Top)\n newPosition = RelativePosition.Bottom;\n else if (newPosition === RelativePosition.TopLeft)\n newPosition = RelativePosition.BottomLeft;\n else if (newPosition === RelativePosition.TopRight)\n newPosition = RelativePosition.BottomRight;\n }\n\n const leftMargin = parseMargin(containerStyle.marginLeft);\n if (\n targetRect.left - popupWidth - leftMargin - offsetArrow - offset <\n viewportRect.left\n ) {\n if (newPosition === RelativePosition.Left)\n newPosition = RelativePosition.Right;\n else if (newPosition === RelativePosition.LeftTop)\n newPosition = RelativePosition.RightTop;\n }\n\n const rightMargin = parseMargin(containerStyle.marginRight);\n if (\n targetRect.right + popupWidth + rightMargin + offsetArrow + offset >\n viewportRect.right\n ) {\n if (newPosition === RelativePosition.Right)\n newPosition = RelativePosition.Left;\n else if (newPosition === RelativePosition.RightTop)\n newPosition = RelativePosition.LeftTop;\n }\n\n return newPosition;\n }\n\n // fit the popup within the extents of the view port\n private _fitPopup = (point: PopupPoint) => {\n const fittedPoint = point;\n\n if (!this._popup) {\n return fittedPoint;\n }\n\n // const popupRect = this._popup.getBoundingClientRect();\n const { popupWidth, popupHeight } = this._getPopupDimensions();\n const { innerWidth, innerHeight } = window;\n\n if (fittedPoint.y + popupHeight > innerHeight) {\n fittedPoint.y = innerHeight - popupHeight;\n }\n\n if (fittedPoint.x + popupWidth > innerWidth) {\n fittedPoint.x = innerWidth - popupWidth;\n }\n\n if (fittedPoint.y < 0) {\n fittedPoint.y = 0;\n }\n\n if (fittedPoint.x < 0) {\n fittedPoint.x = 0;\n }\n\n return fittedPoint;\n };\n\n private _handleAnimationEnd = (\n event: React.AnimationEvent<HTMLDivElement>\n ) => {\n if (event.target === this._popup) {\n this.setState({ animationEnded: true });\n }\n };\n\n public override render() {\n const animate =\n this.props.animate !== undefined ? this.props.animate : true;\n const className = classnames(\n \"core-popup\",\n this._getClassNameByPosition(this.state.position),\n this.props.showShadow && \"core-popup-shadow\",\n this.props.showArrow && \"arrow\",\n !animate && \"core-popup-animation-none\",\n this.props.className,\n this.state.animationEnded && \"core-animation-ended\",\n !this.props.isOpen &&\n this.props.keepContentsMounted &&\n \"core-popup-hidden\"\n );\n\n const style: React.CSSProperties = {\n top: this.state.top,\n left: this.state.left,\n ...this.props.style,\n };\n\n const role = this.props.role ? this.props.role : \"dialog\"; // accessibility property\n\n if (!this.props.isOpen && !this.props.keepContentsMounted) {\n return null;\n }\n\n return ReactDOM.createPortal(\n <div\n className={className}\n data-testid=\"core-popup\"\n ref={(element) => {\n this._popup = element;\n }}\n style={style}\n role={role}\n aria-modal={true}\n tabIndex={-1}\n aria-label={this.props.ariaLabel}\n onAnimationEnd={this._handleAnimationEnd}\n >\n <FocusTrap\n active={!!this.props.moveFocus}\n initialFocusElement={this.props.focusTarget}\n returnFocusOnDeactivate={true}\n >\n {this.props.children}\n </FocusTrap>\n </div>,\n this.getContainer()\n );\n }\n\n private getContainer() {\n return (\n this.state.parentDocument.body.querySelector(\n '[data-root-container=\"appui-root-id\"]'\n ) ?? this.state.parentDocument.body\n );\n }\n}\n\nfunction parsePxString(pxStr: string): number {\n const parsed = parseInt(pxStr, 10);\n return parsed || 0;\n}\n\nfunction parseMargin(value: string) {\n return value ? parseFloat(value) : 0;\n}\n"]}
1
+ {"version":3,"file":"Popup.js","sourceRoot":"","sources":["../../../../src/core-react/popup/Popup.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,cAAc,CAAC;AACtB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AA2F/C;;;GAGG;AACH,mDAAmD;AACnD,MAAM,OAAO,KAAM,SAAQ,KAAK,CAAC,SAAiC;IAGhE,mDAAmD;IACnD,YAAY,KAAiB;QAC3B,KAAK,CAAC,KAAK,CAAC,CAAC;QAJP,WAAM,GAAuB,IAAI,CAAC;QAuFlC,sBAAiB,GAAG,GAAG,EAAE;YAC/B,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;YAC5C,YAAY,CAAC,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;YACvE,YAAY,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YACtD,YAAY,CAAC,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;YACtE,YAAY,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YACpD,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;YAC1D,YAAY,CAAC,gBAAgB,CAAC,SAAS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AAC;AACrB,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC","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 Popup\n */\n\nimport \"./Popup.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Key } from \"ts-key-enum\";\nimport { RelativePosition } from \"@itwin/appui-abstract\";\nimport { FocusTrap } from \"../focustrap/FocusTrap\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Rectangle } from \"../utils/Rectangle\";\n\n// cSpell:ignore focustrap focusable alertdialog\n\n/** @internal */\ninterface PopupPoint {\n x: number;\n y: number;\n}\n\n/** Properties for the [[Popup]] component\n * @public\n * @deprecated in 4.15.0. Props of deprecated {@link Popup} component.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface PopupProps extends CommonProps {\n /** Show or hide the box shadow (defaults to true) */\n showShadow: boolean;\n /** Show or hide the arrow (defaults to false) */\n showArrow: boolean;\n /** Indicates whether the popup is shown or not (defaults to false) */\n isOpen: boolean;\n /** Direction (relative to the target) to which the popup is expanded (defaults to Bottom) */\n position: RelativePosition;\n /** Top position (absolute positioning - defaults to 0) */\n top: number;\n /** Left position (absolute positioning - defaults to 0) */\n left: number;\n /** Function called when the popup is opened */\n onOpen?: () => void;\n /** Function called when user clicks outside the popup */\n onOutsideClick?: (e: MouseEvent) => void;\n /** Function called when the popup is closed */\n onClose?: () => void;\n /** Function called when the popup is closed on Enter */\n onEnter?: () => void;\n /** Function called when the wheel is used */\n onWheel?: (e: WheelEvent) => void;\n /** Function called when the right mouse button is pressed */\n onContextMenu?: (e: MouseEvent) => void;\n /** Offset from the parent (defaults to 4) */\n offset: number;\n /** Target element to position popup */\n target?: HTMLElement | null;\n /** Role - if not specified \"dialog\" is used */\n role?: \"dialog\" | \"alert\" | \"alertdialog\";\n /** accessibility label */\n ariaLabel?: string;\n /** set focus to popup - default to not set focus */\n moveFocus?: boolean;\n /** Element to receive focus, specified by React.RefObject or CSS selector string. If undefined and moveFocus is true then focus is moved to first focusable element. */\n focusTarget?: React.RefObject<HTMLElement> | string;\n /** Indicates whether the popup is pinned. */\n isPinned?: boolean;\n /** Indicates whether to use animation for open/close (defaults to true) */\n animate?: boolean;\n /** Indicates whether to close the popup when Enter is pressed (defaults to true) */\n closeOnEnter?: boolean;\n /** Indicates whether to close the popup when the wheel is used (defaults to true) */\n closeOnWheel?: boolean;\n /** Indicates whether to close the popup when the right mouse button is pressed (defaults to true) */\n closeOnContextMenu?: boolean;\n /** If false outside click processing and closing are skipped if click occurs in another Popup component, default to false. */\n closeOnNestedPopupOutsideClick?: boolean;\n /** If true the children are mounted once and unmounted when this component is unmounted. If false the\n * children are unmounted each time the popup is closed. */\n keepContentsMounted?: boolean;\n\n /**\n * If true the popup will remain open and will be repositioned when window resize events occur, default to false.\n * @beta\n * */\n repositionOnResize?: boolean;\n\n /** Content */\n children?: React.ReactNode;\n\n /** Target that should be used when portaling popup. */\n portalTarget?: HTMLElement;\n}\n\n/** @internal */\ninterface PopupState {\n isOpen: boolean;\n top: number;\n left: number;\n position: RelativePosition;\n parentDocument: Document;\n animationEnded: boolean;\n}\n\n/** Popup React component displays a popup relative to an optional target element.\n * @public\n * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/popover iTwinUI Popover} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class Popup extends React.Component<PopupProps, PopupState> {\n private _popup: HTMLElement | null = null;\n\n // eslint-disable-next-line deprecation/deprecation\n constructor(props: PopupProps) {\n super(props);\n const parentDocument = this.props.target?.ownerDocument ?? document;\n\n this.state = {\n animationEnded: false,\n isOpen: this.props.isOpen,\n top: 0,\n left: 0,\n position: this.props.position,\n parentDocument,\n };\n }\n\n // eslint-disable-next-line deprecation/deprecation\n public static defaultProps: Partial<PopupProps> = {\n position: RelativePosition.Bottom,\n showShadow: true,\n showArrow: false,\n isOpen: false,\n offset: 4,\n top: -1,\n left: -1,\n };\n\n public override componentDidMount() {\n if (this.props.isOpen) {\n this._onShow();\n }\n }\n\n private getParentWindow() {\n return this.state.parentDocument.defaultView ?? window;\n }\n\n public override componentDidUpdate(\n previousProps: PopupProps, // eslint-disable-line deprecation/deprecation\n prevState: PopupState\n ) {\n if (this.state.position !== prevState.position) {\n this.setState({ animationEnded: false });\n }\n\n if (this.props.target !== previousProps.target) {\n {\n const parentDocument = this.props.target?.ownerDocument ?? document;\n if (parentDocument !== this.state.parentDocument) {\n this._unBindWindowEvents();\n this.setState({ parentDocument });\n }\n }\n }\n\n if (this.props.isOpen === previousProps.isOpen) {\n if (this.props.isOpen) {\n const position = this._toggleRelativePosition();\n const point = this._fitPopup(this._getPosition(position));\n if (\n Math.abs(this.state.left - point.x) < 3 &&\n Math.abs(this.state.top - point.y) < 3 &&\n this.state.position === position\n )\n return;\n\n this.setState({\n left: point.x,\n top: point.y,\n position,\n });\n }\n return;\n }\n\n if (this.props.isOpen) {\n this._onShow();\n } else {\n this._onClose();\n }\n }\n\n public override componentWillUnmount() {\n this._unBindWindowEvents();\n }\n\n private _bindWindowEvents = () => {\n const activeWindow = this.getParentWindow();\n activeWindow.addEventListener(\"pointerdown\", this._handleOutsideClick);\n activeWindow.addEventListener(\"resize\", this._resize);\n activeWindow.addEventListener(\"contextmenu\", this._handleContextMenu);\n activeWindow.addEventListener(\"scroll\", this._hide);\n activeWindow.addEventListener(\"wheel\", this._handleWheel);\n activeWindow.addEventListener(\"keydown\", this._handleKeyboard);\n };\n\n private _unBindWindowEvents = () => {\n const activeWindow = this.getParentWindow();\n activeWindow.removeEventListener(\"pointerdown\", this._handleOutsideClick);\n activeWindow.removeEventListener(\"resize\", this._resize);\n activeWindow.removeEventListener(\"contextmenu\", this._handleContextMenu);\n activeWindow.removeEventListener(\"scroll\", this._hide);\n activeWindow.removeEventListener(\"wheel\", this._handleWheel);\n activeWindow.removeEventListener(\"keydown\", this._handleKeyboard);\n };\n\n private _handleWheel = (event: WheelEvent) => {\n if (this._popup && this._popup.contains(event.target as Node)) return;\n\n if (this.props.onWheel) return this.props.onWheel(event);\n\n const closeOnWheel =\n this.props.closeOnWheel !== undefined ? this.props.closeOnWheel : true;\n if (closeOnWheel) this._hide();\n };\n\n private isInCorePopup(element: HTMLElement): boolean {\n if (element.nodeName === \"DIV\") {\n if (element.classList && element.classList.contains(\"core-popup\"))\n return true;\n if (element.parentElement && this.isInCorePopup(element.parentElement))\n return true;\n } else {\n if (element.parentElement && this.isInCorePopup(element.parentElement))\n return true;\n }\n return false;\n }\n\n private _handleOutsideClick = (event: MouseEvent): void => {\n if (this._popup && this._popup.contains(event.target as Node)) return;\n\n if (this.props.isPinned) return;\n\n if (\n !this.props.closeOnNestedPopupOutsideClick &&\n this.isInCorePopup(event.target as HTMLElement)\n )\n return;\n\n if (this.props.onOutsideClick) return this.props.onOutsideClick(event);\n\n if (this.props.target && this.props.target.contains(event.target as Node))\n return;\n\n this._onClose();\n };\n\n private _handleContextMenu = (event: MouseEvent) => {\n if (this._popup && this._popup.contains(event.target as Node)) return;\n\n if (this.props.onContextMenu) return this.props.onContextMenu(event);\n\n const closeOnContextMenu =\n this.props.closeOnContextMenu !== undefined\n ? this.props.closeOnContextMenu\n : true;\n if (closeOnContextMenu) this._hide();\n };\n\n private _handleKeyboard = (event: KeyboardEvent): void => {\n if (this.props.isPinned) return;\n\n if (\n event.key === Key.Escape.valueOf() ||\n event.key === Key.Enter.valueOf()\n ) {\n const closeOnEnter =\n this.props.closeOnEnter !== undefined ? this.props.closeOnEnter : true;\n if (event.key === Key.Enter.valueOf()) {\n if (closeOnEnter) this._onClose(true);\n else this.props.onEnter && this.props.onEnter();\n } else {\n this._onClose(false);\n }\n }\n };\n\n private _resize = () => {\n if (this.props.repositionOnResize) {\n const position = this._toggleRelativePosition();\n const point = this._fitPopup(this._getPosition(position));\n this.setState({ left: point.x, top: point.y, position });\n } else {\n this._hide(); // legacy behavior\n }\n };\n\n private _hide = () => {\n if (this.props.isPinned) return;\n\n this._onClose();\n };\n\n private _onShow() {\n this._bindWindowEvents();\n const position = this._toggleRelativePosition();\n const point = this._fitPopup(this._getPosition(position));\n\n this.setState(\n { left: point.x, top: point.y, isOpen: true, position },\n () => {\n if (this.props.onOpen) this.props.onOpen();\n }\n );\n }\n\n private _onClose(enterKey?: boolean) {\n if (!this.state.isOpen) return;\n\n this._unBindWindowEvents();\n\n this.setState({ isOpen: false }, () => {\n if (enterKey && this.props.onEnter) this.props.onEnter();\n if (this.props.onClose) this.props.onClose();\n });\n }\n\n private _isPositionAbsolute(): boolean {\n return this.props.top !== -1 && this.props.left !== -1;\n }\n\n private _getClassNameByPosition(position: RelativePosition): string {\n if (!this._isPositionAbsolute()) {\n switch (position) {\n case RelativePosition.TopLeft:\n return \"core-popup-top-left\";\n case RelativePosition.TopRight:\n return \"core-popup-top-right\";\n case RelativePosition.BottomLeft:\n return \"core-popup-bottom-left\";\n case RelativePosition.BottomRight:\n return \"core-popup-bottom-right\";\n case RelativePosition.Top:\n return \"core-popup-top\";\n case RelativePosition.Left:\n return \"core-popup-left\";\n case RelativePosition.Right:\n return \"core-popup-right\";\n case RelativePosition.Bottom:\n return \"core-popup-bottom\";\n case RelativePosition.LeftTop:\n return \"core-popup-left-top\";\n case RelativePosition.RightTop:\n return \"core-popup-right-top\";\n }\n }\n\n return \"\";\n }\n\n private _getPopupDimensions(): { popupWidth: number; popupHeight: number } {\n let popupWidth = 0;\n let popupHeight = 0;\n if (this._popup) {\n const activeWindow = this.getParentWindow();\n const style = activeWindow.getComputedStyle(this._popup);\n const borderLeftWidth = parsePxString(style.borderLeftWidth);\n const borderRightWidth = parsePxString(style.borderRightWidth);\n const borderTopWidth = parsePxString(style.borderTopWidth);\n const borderBottomWidth = parsePxString(style.borderBottomWidth);\n popupWidth = this._popup.clientWidth + borderLeftWidth + borderRightWidth;\n popupHeight =\n this._popup.clientHeight + borderTopWidth + borderBottomWidth;\n }\n\n return { popupWidth, popupHeight };\n }\n\n private _getPosition = (position: RelativePosition) => {\n const activeWindow = this.getParentWindow();\n const { target, offset, top, left } = this.props;\n const offsetArrow = this.props.showArrow ? 6 : 0;\n\n // absolute position\n if (this._isPositionAbsolute()) return { x: left, y: top };\n\n // sanity check\n const point = { x: 0, y: 0 };\n if (!this._popup || !target) return point;\n\n // relative position\n const scrollY = activeWindow.scrollY;\n const scrollX = activeWindow.scrollX;\n\n const container = this.getContainer();\n const containerBounds = container.getBoundingClientRect();\n const targetRect = Rectangle.create(target.getBoundingClientRect()).offset({\n x: -containerBounds.left,\n y: -containerBounds.top,\n });\n\n const { popupWidth, popupHeight } = this._getPopupDimensions();\n\n switch (position) {\n case RelativePosition.Top:\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\n point.x =\n scrollX +\n targetRect.left +\n targetRect.getWidth() / 2 -\n popupWidth / 2;\n break;\n\n case RelativePosition.TopLeft:\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\n point.x = scrollX + targetRect.left;\n break;\n\n case RelativePosition.TopRight:\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\n point.x = scrollX + targetRect.right - popupWidth;\n break;\n\n case RelativePosition.Bottom:\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\n point.x =\n scrollX +\n targetRect.left +\n targetRect.getWidth() / 2 -\n popupWidth / 2;\n break;\n\n case RelativePosition.BottomLeft:\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\n point.x = scrollX + targetRect.left;\n break;\n\n case RelativePosition.BottomRight:\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\n point.x = scrollX + targetRect.right - popupWidth;\n break;\n\n case RelativePosition.Left:\n point.y =\n scrollY +\n targetRect.top +\n targetRect.getHeight() / 2 -\n popupHeight / 2;\n point.x = scrollX + targetRect.left - popupWidth - offset - offsetArrow;\n break;\n\n case RelativePosition.LeftTop:\n point.y = scrollY + targetRect.top;\n point.x = scrollX + targetRect.left - popupWidth - offset - offsetArrow;\n break;\n\n case RelativePosition.Right:\n point.y =\n scrollY +\n targetRect.top +\n targetRect.getHeight() / 2 -\n popupHeight / 2;\n point.x = scrollX + targetRect.right + offset + offsetArrow;\n break;\n\n case RelativePosition.RightTop:\n point.y = scrollY + targetRect.top;\n point.x = scrollX + targetRect.right + offset + offsetArrow;\n break;\n }\n\n return point;\n };\n\n private _toggleRelativePosition(): RelativePosition {\n const { target, position, offset } = this.props;\n\n if (!this._popup || !target) return position;\n\n if (this._isPositionAbsolute()) return position;\n\n let newPosition = position;\n\n interface Rect {\n left: number;\n top: number;\n right: number;\n bottom: number;\n }\n\n const activeWindow = this.getParentWindow();\n\n // Note: Cannot use DOMRect yet since it's experimental and not available in all browsers (Nov. 2018)\n const viewportRect: Rect = {\n left: activeWindow.scrollX,\n top: activeWindow.scrollY,\n right: activeWindow.scrollX + activeWindow.innerWidth,\n bottom: activeWindow.scrollY + activeWindow.innerHeight,\n };\n const targetRect = target.getBoundingClientRect();\n const { popupWidth, popupHeight } = this._getPopupDimensions();\n const containerStyle = activeWindow.getComputedStyle(target);\n const offsetArrow = this.props.showArrow ? 10 : 2;\n\n const bottomMargin = parseMargin(containerStyle.marginBottom);\n if (\n targetRect.bottom + popupHeight + bottomMargin + offsetArrow + offset >\n viewportRect.bottom\n ) {\n if (newPosition === RelativePosition.Bottom)\n newPosition = RelativePosition.Top;\n else if (newPosition === RelativePosition.BottomLeft)\n newPosition = RelativePosition.TopLeft;\n else if (newPosition === RelativePosition.BottomRight)\n newPosition = RelativePosition.TopRight;\n }\n\n const topMargin = parseMargin(containerStyle.marginTop);\n if (\n targetRect.top - popupHeight - topMargin - offsetArrow - offset <\n viewportRect.top\n ) {\n if (newPosition === RelativePosition.Top)\n newPosition = RelativePosition.Bottom;\n else if (newPosition === RelativePosition.TopLeft)\n newPosition = RelativePosition.BottomLeft;\n else if (newPosition === RelativePosition.TopRight)\n newPosition = RelativePosition.BottomRight;\n }\n\n const leftMargin = parseMargin(containerStyle.marginLeft);\n if (\n targetRect.left - popupWidth - leftMargin - offsetArrow - offset <\n viewportRect.left\n ) {\n if (newPosition === RelativePosition.Left)\n newPosition = RelativePosition.Right;\n else if (newPosition === RelativePosition.LeftTop)\n newPosition = RelativePosition.RightTop;\n }\n\n const rightMargin = parseMargin(containerStyle.marginRight);\n if (\n targetRect.right + popupWidth + rightMargin + offsetArrow + offset >\n viewportRect.right\n ) {\n if (newPosition === RelativePosition.Right)\n newPosition = RelativePosition.Left;\n else if (newPosition === RelativePosition.RightTop)\n newPosition = RelativePosition.LeftTop;\n }\n\n return newPosition;\n }\n\n // fit the popup within the extents of the view port\n private _fitPopup = (point: PopupPoint) => {\n const fittedPoint = point;\n\n if (!this._popup) {\n return fittedPoint;\n }\n\n // const popupRect = this._popup.getBoundingClientRect();\n const { popupWidth, popupHeight } = this._getPopupDimensions();\n const { innerWidth, innerHeight } = window;\n\n if (fittedPoint.y + popupHeight > innerHeight) {\n fittedPoint.y = innerHeight - popupHeight;\n }\n\n if (fittedPoint.x + popupWidth > innerWidth) {\n fittedPoint.x = innerWidth - popupWidth;\n }\n\n if (fittedPoint.y < 0) {\n fittedPoint.y = 0;\n }\n\n if (fittedPoint.x < 0) {\n fittedPoint.x = 0;\n }\n\n return fittedPoint;\n };\n\n private _handleAnimationEnd = (\n event: React.AnimationEvent<HTMLDivElement>\n ) => {\n if (event.target === this._popup) {\n this.setState({ animationEnded: true });\n }\n };\n\n public override render() {\n const animate =\n this.props.animate !== undefined ? this.props.animate : true;\n const className = classnames(\n \"core-popup\",\n this._getClassNameByPosition(this.state.position),\n this.props.showShadow && \"core-popup-shadow\",\n this.props.showArrow && \"arrow\",\n !animate && \"core-popup-animation-none\",\n this.props.className,\n this.state.animationEnded && \"core-animation-ended\",\n !this.props.isOpen &&\n this.props.keepContentsMounted &&\n \"core-popup-hidden\"\n );\n\n const style: React.CSSProperties = {\n top: this.state.top,\n left: this.state.left,\n ...this.props.style,\n };\n\n const role = this.props.role ? this.props.role : \"dialog\"; // accessibility property\n\n if (!this.props.isOpen && !this.props.keepContentsMounted) {\n return null;\n }\n\n return ReactDOM.createPortal(\n <div\n className={className}\n data-testid=\"core-popup\"\n ref={(element) => {\n this._popup = element;\n }}\n style={style}\n role={role}\n aria-modal={true}\n tabIndex={-1}\n aria-label={this.props.ariaLabel}\n onAnimationEnd={this._handleAnimationEnd}\n >\n <FocusTrap\n active={!!this.props.moveFocus}\n initialFocusElement={this.props.focusTarget}\n returnFocusOnDeactivate={true}\n >\n {this.props.children}\n </FocusTrap>\n </div>,\n this.getContainer()\n );\n }\n\n private getContainer() {\n return (\n this.props.portalTarget ??\n this.state.parentDocument.body.querySelector(\n '[data-root-container=\"appui-root-id\"]'\n ) ??\n this.state.parentDocument.body\n );\n }\n}\n\nfunction parsePxString(pxStr: string): number {\n const parsed = parseInt(pxStr, 10);\n return parsed || 0;\n}\n\nfunction parseMargin(value: string) {\n return value ? parseFloat(value) : 0;\n}\n"]}
@@ -8,7 +8,7 @@ import type { CommonProps } from "../utils/Props";
8
8
  import { AnnularSector } from "./Annulus";
9
9
  /** Properties for [[RadialMenu]]
10
10
  * @public
11
- * @deprecated in 4.14.x. Props of deprecated component {@link RadialMenu}.
11
+ * @deprecated in 4.14.0. Props of deprecated component {@link RadialMenu}.
12
12
  */
13
13
  export interface RadialMenuProps extends CommonProps {
14
14
  /** Whether to show RadialMenu */
@@ -39,7 +39,7 @@ interface RadialMenuState {
39
39
  }
40
40
  /** A context menu arranged in a radial layout.
41
41
  * @public
42
- * @deprecated in 4.14.x. Use {@link ContextMenu} or {@link https://itwinui.bentley.com/docs/dropdownmenu iTwinUI dropdown menu} instead.
42
+ * @deprecated in 4.14.0. Use {@link ContextMenu} or {@link https://itwinui.bentley.com/docs/dropdownmenu iTwinUI dropdown menu} instead.
43
43
  */
44
44
  export declare class RadialMenu extends React.Component<RadialMenuProps, RadialMenuState> {
45
45
  private _root;
@@ -60,7 +60,7 @@ export declare class RadialMenu extends React.Component<RadialMenuProps, RadialM
60
60
  }
61
61
  /** Properties for [[RadialButton]] component
62
62
  * @public
63
- * @deprecated in 4.14.x. Props of deprecated component {@link RadialButton}.
63
+ * @deprecated in 4.14.0. Props of deprecated component {@link RadialButton}.
64
64
  */
65
65
  export interface RadialButtonProps extends CommonProps {
66
66
  /** Whether label is rotated to radial menu. Default: Inherit */
@@ -81,7 +81,7 @@ interface RadialButtonState {
81
81
  }
82
82
  /** Button for use within a [[RadialMenu]]
83
83
  * @public
84
- * @deprecated in 4.14.x. Component used in a deprecated component {@link RadialMenu}.
84
+ * @deprecated in 4.14.0. Component used in a deprecated component {@link RadialMenu}.
85
85
  */
86
86
  export declare class RadialButton extends React.Component<RadialButtonProps, RadialButtonState> {
87
87
  /** @internal */
@@ -14,7 +14,7 @@ import { Point } from "../utils/Point";
14
14
  import { AnnularSector, Annulus } from "./Annulus";
15
15
  /** A context menu arranged in a radial layout.
16
16
  * @public
17
- * @deprecated in 4.14.x. Use {@link ContextMenu} or {@link https://itwinui.bentley.com/docs/dropdownmenu iTwinUI dropdown menu} instead.
17
+ * @deprecated in 4.14.0. Use {@link ContextMenu} or {@link https://itwinui.bentley.com/docs/dropdownmenu iTwinUI dropdown menu} instead.
18
18
  */
19
19
  export class RadialMenu extends React.Component {
20
20
  constructor(props) {
@@ -121,7 +121,7 @@ RadialMenu.defaultProps = {
121
121
  };
122
122
  /** Button for use within a [[RadialMenu]]
123
123
  * @public
124
- * @deprecated in 4.14.x. Component used in a deprecated component {@link RadialMenu}.
124
+ * @deprecated in 4.14.0. Component used in a deprecated component {@link RadialMenu}.
125
125
  */
126
126
  export class RadialButton extends React.Component {
127
127
  constructor(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"RadialMenu.js","sourceRoot":"","sources":["../../../../src/core-react/radialmenu/R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,CAAC,GAAG,EAAE;oBAAE,CAAC,IAAI,GAAG,CAAC;gBACrB,IAAI,CAAC,GAAG,CAAC,EAAE;oBAAE,CAAC,IAAI,GAAG,CAAC;gBACtB,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;YACpC,CAAC;QACH,CAAC;QAED,OAAO,CACL,2BACE,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAClC,UAAU,EAAE,IAAI,CAAC,eAAe,EAChC,OAAO,EAAE,IAAI,CAAC,YAAY;YAE1B,8BACE,SAAS,EAAE,UAAU,CACnB,yBAAyB,EACzB,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,EAC9B,IAAI,CAAC,KAAK,CAAC,SAAS,CACrB,EACD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,CAAC,EAAE,IAAI,GACD;YACR,uCACE,SAAS,EAAE,CAAC,EACZ,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,EACjB,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,EACX,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,SAAS,EAAE,6BAA6B;gBAExC,6BACQ,KAAK,EAAE,8BAA8B,EAC3C,SAAS,EAAE,mCAAmC;oBAE9C,6BAAK,SAAS,EAAC,8BAA8B;wBAC3C,oBAAC,IAAI,IAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAI,CAC/B;oBACN,6BAAK,SAAS,EAAE,iCAAiC,IAC9C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACF,CACQ,CACd,CACL,CAAC;IACJ,CAAC;CAkBF","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 RadialMenu\n */\n\nimport \"./RadialMenu.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Key } from \"ts-key-enum\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\nimport { Point } from \"../utils/Point\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { AnnularSector, Annulus } from \"./Annulus\";\nimport type { ContextMenu } from \"../contextmenu/ContextMenu\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Properties for [[RadialMenu]]\n * @public\n * @deprecated in 4.14.x. Props of deprecated component {@link RadialMenu}.\n */\nexport interface RadialMenuProps extends CommonProps {\n /** Whether to show RadialMenu */\n opened: boolean;\n /** Radius of inner portion of RadialMenu */\n innerRadius: number;\n /** Radius of outer portion of RadialMenu */\n outerRadius: number;\n /** Optional parameter to specify left position in viewport. */\n left?: number | string;\n /** Optional parameter to specify top position in viewport. */\n top?: number | string;\n /** Whether to rotate labels according to location on the RadialMenu, or to keep labels upright.\n * Default: false\n */\n labelRotate?: boolean;\n /** Which child RadialButton to highlight */\n selected?: number;\n /** triggered in case of onClick events anywhere other than radial menu */\n onBlur?: (event: any) => any;\n /** triggered onKeyUp for <Esc> key */\n onEsc?: (event: any) => any;\n /** Content */\n children?: React.ReactNode;\n}\n\ninterface RadialMenuState {\n sectors: AnnularSector[];\n}\n\n/** A context menu arranged in a radial layout.\n * @public\n * @deprecated in 4.14.x. Use {@link ContextMenu} or {@link https://itwinui.bentley.com/docs/dropdownmenu iTwinUI dropdown menu} instead.\n */\nexport class RadialMenu extends React.Component<\n RadialMenuProps,\n RadialMenuState\n> {\n private _root: HTMLDivElement | null = null;\n private _selectedButton: RadialButton | null = null;\n public static defaultProps: Partial<RadialMenuProps> = {\n labelRotate: false,\n selected: -1,\n };\n\n /** @internal */\n public override readonly state: Readonly<RadialMenuState> = {\n sectors: [],\n };\n\n constructor(props: RadialMenuProps) {\n super(props);\n }\n\n public override render(): React.ReactElement {\n const width = 2 * (this.props.outerRadius + 1);\n let x = this.props.left,\n y = this.props.top;\n\n if (\n this.props.left &&\n this.props.top &&\n typeof this.props.left === \"number\" &&\n typeof this.props.top === \"number\"\n ) {\n x = this.props.left;\n y = this.props.top;\n\n if (x < 0) x = 0;\n if (x > window.innerWidth - width) x = window.innerWidth - width;\n if (y < 0) y = 0;\n if (y > window.innerHeight - width) y = window.innerHeight - width;\n }\n\n const divStyle: React.CSSProperties = {\n left: x,\n top: y,\n ...this.props.style,\n };\n\n return (\n <div\n ref={(el) => {\n this._root = el;\n }}\n className={classnames(\n \"core-radial-menu\",\n { opened: this.props.opened },\n this.props.className\n )}\n style={divStyle}\n data-testid=\"core-radial-menu\"\n >\n <svg\n xmlns=\"http://w3.org/2000/svg\"\n version=\"1.1\"\n width={width}\n height={width}\n className={\"core-radial-menu-container\"}\n >\n {React.Children.map(this.props.children, (child, index) => {\n if (!child || typeof child !== \"object\" || !(\"props\" in child))\n return child;\n\n const childElement = child as React.ReactElement<any>;\n return React.cloneElement(childElement, {\n key: index,\n ref: (el: any) => {\n if (this.props.selected === index) this._selectedButton = el;\n },\n selected: index === this.props.selected,\n labelRotate:\n childElement.props.labelRotate || this.props.labelRotate,\n annularSector: this.state.sectors[index],\n });\n })}\n </svg>\n </div>\n );\n }\n\n public override componentDidMount() {\n this._generateAnnularSectors();\n\n setTimeout(() => {\n window.addEventListener(\"keyup\", this._handleKeyUp);\n window.addEventListener(\"mouseup\", this._handleClick);\n });\n }\n\n public override componentWillUnmount() {\n window.removeEventListener(\"keyup\", this._handleKeyUp);\n window.removeEventListener(\"mouseup\", this._handleClick);\n }\n\n public override componentDidUpdate(prevProps: RadialMenuProps) {\n if (\n prevProps.innerRadius !== this.props.innerRadius ||\n prevProps.outerRadius !== this.props.outerRadius\n ) {\n this._generateAnnularSectors();\n }\n }\n\n private _handleKeyUp = (event: KeyboardEvent) => {\n if (event.key === Key.Escape.valueOf() && this.props.onEsc)\n this.props.onEsc(event);\n };\n\n private _handleClick = (event: MouseEvent) => {\n if (\n event.target instanceof HTMLElement &&\n this._root &&\n !event.target.contains(this._root) &&\n this.props.onBlur\n )\n this.props.onBlur(event);\n };\n\n /** Manually call onSelect of highlighted button. */\n public select = () => {\n if (this._selectedButton) this._selectedButton.select();\n };\n\n private _generateAnnularSectors = () => {\n const n = React.Children.count(this.props.children);\n const angle = (2 * Math.PI) / n;\n const outer = this.props.outerRadius;\n const inner = this.props.innerRadius;\n\n const offset = -Math.PI / 8;\n const annulus = new Annulus(\n new Point(outer + 1, outer + 1),\n inner + 1,\n outer - 1\n );\n const sectors: AnnularSector[] = [];\n for (let i = 0; i < n; i++) {\n sectors.push(\n new AnnularSector(annulus, angle * i + offset, angle * (i + 1) + offset)\n );\n }\n this.setState({ sectors });\n };\n}\n\n/** Properties for [[RadialButton]] component\n * @public\n * @deprecated in 4.14.x. Props of deprecated component {@link RadialButton}.\n */\nexport interface RadialButtonProps extends CommonProps {\n /** Whether label is rotated to radial menu. Default: Inherit */\n labelRotate?: boolean;\n /** which icon to display in on the menu button */\n icon?: IconSpec;\n /** @internal */\n annularSector?: AnnularSector;\n /** listens to any onClick event, or any select event, which can be triggered by the select() method. */\n onSelect?: (e: any) => any;\n /** Whether item is highlighted */\n selected?: boolean;\n /** Content */\n children?: React.ReactNode;\n}\n\ninterface RadialButtonState {\n hover: boolean;\n}\n\n/** Button for use within a [[RadialMenu]]\n * @public\n * @deprecated in 4.14.x. Component used in a deprecated component {@link RadialMenu}.\n */\nexport class RadialButton extends React.Component<\n RadialButtonProps,\n RadialButtonState\n> {\n /** @internal */\n public override readonly state: Readonly<RadialButtonState> = {\n hover: this.props.selected || false,\n };\n\n constructor(props: RadialButtonProps) {\n super(props);\n }\n\n public override render(): React.ReactElement {\n const sector = this.props.annularSector;\n let p = new Point();\n let size = 0;\n let t = \"\";\n let path = \"\";\n\n if (sector) {\n size = sector.start.p1.getDistanceTo(sector.end.p2) * 2;\n path = sector.path;\n\n const parent = sector.parent;\n const { x: cx, y: cy } = parent.center;\n const r = (parent.inner.radius + parent.outer.radius) / 2;\n const angle = (sector.startAngle + sector.endAngle) / 2;\n p = new Point(cx + r * Math.cos(angle), cy + r * Math.sin(angle));\n\n if (this.props.labelRotate) {\n let a = (angle * 180) / Math.PI + 90;\n while (a > 180) a -= 360;\n while (a < -180) a += 360;\n if (a > 90) a -= 180;\n if (a < -90) a += 180;\n t = `rotate(${a} ${p.x}, ${p.y})`;\n }\n }\n\n return (\n <g\n onMouseOver={this._handleMouseOver}\n onMouseOut={this._handleMouseOut}\n onClick={this._handleClick}\n >\n <path\n className={classnames(\n \"core-radial-menu-sector\",\n { selected: this.state.hover },\n this.props.className\n )}\n style={this.props.style}\n d={path}\n ></path>\n <foreignObject\n transform={t}\n x={p.x - size / 2}\n y={p.y - 16}\n width={size}\n height={size}\n className={\"core-radial-menu-button-svg\"}\n >\n <div\n {...{ xmlns: \"http://www.w3.org/1999/xhtml\" }}\n className={\"core-radial-menu-button-container\"}\n >\n <div className=\"core-radial-menu-button-icon\">\n <Icon iconSpec={this.props.icon} />\n </div>\n <div className={\"core-radial-menu-button-content\"}>\n {this.props.children}\n </div>\n </div>\n </foreignObject>\n </g>\n );\n }\n\n /** Manually call this.props.onSelect */\n public select = () => {\n if (this.props.onSelect) this.props.onSelect(undefined);\n };\n\n private _handleClick = (event: React.MouseEvent<SVGElement>) => {\n if (this.props.onSelect) this.props.onSelect(event);\n };\n\n private _handleMouseOver = (_event: React.MouseEvent<SVGElement>) => {\n this.setState({ hover: true });\n };\n\n private _handleMouseOut = (_event: React.MouseEvent<SVGElement>) => {\n this.setState({ hover: false });\n };\n}\n"]}
1
+ {"version":3,"file":"RadialMenu.js","sourceRoot":"","sources":["../../../../src/core-react/radialmenu/RadialMenu.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OA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AI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;YACpC,CAAC;QACH,CAAC;QAED,OAAO,CACL,2BACE,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAClC,UAAU,EAAE,IAAI,CAAC,eAAe,EAChC,OAAO,EAAE,IAAI,CAAC,YAAY;YAE1B,8BACE,SAAS,EAAE,UAAU,CACnB,yBAAyB,EACzB,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,EAC9B,IAAI,CAAC,KAAK,CAAC,SAAS,CACrB,EACD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,CAAC,EAAE,IAAI,GACD;YACR,uCACE,SAAS,EAAE,CAAC,EACZ,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,EACjB,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,EACX,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,SAAS,EAAE,6BAA6B;gBAExC,6BACQ,KAAK,EAAE,8BAA8B,EAC3C,SAAS,EAAE,mCAAmC;oBAE9C,6BAAK,SAAS,EAAC,8BAA8B;wBAC3C,oBAAC,IAAI,IAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAI,CAC/B;oBACN,6BAAK,SAAS,EAAE,iCAAiC,IAC9C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACF,CACQ,CACd,CACL,CAAC;IACJ,CAAC;CAkBF","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 RadialMenu\n */\n\nimport \"./RadialMenu.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Key } from \"ts-key-enum\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\nimport { Point } from \"../utils/Point\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { AnnularSector, Annulus } from \"./Annulus\";\nimport type { ContextMenu } from \"../contextmenu/ContextMenu\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Properties for [[RadialMenu]]\n * @public\n * @deprecated in 4.14.0. Props of deprecated component {@link RadialMenu}.\n */\nexport interface RadialMenuProps extends CommonProps {\n /** Whether to show RadialMenu */\n opened: boolean;\n /** Radius of inner portion of RadialMenu */\n innerRadius: number;\n /** Radius of outer portion of RadialMenu */\n outerRadius: number;\n /** Optional parameter to specify left position in viewport. */\n left?: number | string;\n /** Optional parameter to specify top position in viewport. */\n top?: number | string;\n /** Whether to rotate labels according to location on the RadialMenu, or to keep labels upright.\n * Default: false\n */\n labelRotate?: boolean;\n /** Which child RadialButton to highlight */\n selected?: number;\n /** triggered in case of onClick events anywhere other than radial menu */\n onBlur?: (event: any) => any;\n /** triggered onKeyUp for <Esc> key */\n onEsc?: (event: any) => any;\n /** Content */\n children?: React.ReactNode;\n}\n\ninterface RadialMenuState {\n sectors: AnnularSector[];\n}\n\n/** A context menu arranged in a radial layout.\n * @public\n * @deprecated in 4.14.0. Use {@link ContextMenu} or {@link https://itwinui.bentley.com/docs/dropdownmenu iTwinUI dropdown menu} instead.\n */\nexport class RadialMenu extends React.Component<\n RadialMenuProps,\n RadialMenuState\n> {\n private _root: HTMLDivElement | null = null;\n private _selectedButton: RadialButton | null = null;\n public static defaultProps: Partial<RadialMenuProps> = {\n labelRotate: false,\n selected: -1,\n };\n\n /** @internal */\n public override readonly state: Readonly<RadialMenuState> = {\n sectors: [],\n };\n\n constructor(props: RadialMenuProps) {\n super(props);\n }\n\n public override render(): React.ReactElement {\n const width = 2 * (this.props.outerRadius + 1);\n let x = this.props.left,\n y = this.props.top;\n\n if (\n this.props.left &&\n this.props.top &&\n typeof this.props.left === \"number\" &&\n typeof this.props.top === \"number\"\n ) {\n x = this.props.left;\n y = this.props.top;\n\n if (x < 0) x = 0;\n if (x > window.innerWidth - width) x = window.innerWidth - width;\n if (y < 0) y = 0;\n if (y > window.innerHeight - width) y = window.innerHeight - width;\n }\n\n const divStyle: React.CSSProperties = {\n left: x,\n top: y,\n ...this.props.style,\n };\n\n return (\n <div\n ref={(el) => {\n this._root = el;\n }}\n className={classnames(\n \"core-radial-menu\",\n { opened: this.props.opened },\n this.props.className\n )}\n style={divStyle}\n data-testid=\"core-radial-menu\"\n >\n <svg\n xmlns=\"http://w3.org/2000/svg\"\n version=\"1.1\"\n width={width}\n height={width}\n className={\"core-radial-menu-container\"}\n >\n {React.Children.map(this.props.children, (child, index) => {\n if (!child || typeof child !== \"object\" || !(\"props\" in child))\n return child;\n\n const childElement = child as React.ReactElement<any>;\n return React.cloneElement(childElement, {\n key: index,\n ref: (el: any) => {\n if (this.props.selected === index) this._selectedButton = el;\n },\n selected: index === this.props.selected,\n labelRotate:\n childElement.props.labelRotate || this.props.labelRotate,\n annularSector: this.state.sectors[index],\n });\n })}\n </svg>\n </div>\n );\n }\n\n public override componentDidMount() {\n this._generateAnnularSectors();\n\n setTimeout(() => {\n window.addEventListener(\"keyup\", this._handleKeyUp);\n window.addEventListener(\"mouseup\", this._handleClick);\n });\n }\n\n public override componentWillUnmount() {\n window.removeEventListener(\"keyup\", this._handleKeyUp);\n window.removeEventListener(\"mouseup\", this._handleClick);\n }\n\n public override componentDidUpdate(prevProps: RadialMenuProps) {\n if (\n prevProps.innerRadius !== this.props.innerRadius ||\n prevProps.outerRadius !== this.props.outerRadius\n ) {\n this._generateAnnularSectors();\n }\n }\n\n private _handleKeyUp = (event: KeyboardEvent) => {\n if (event.key === Key.Escape.valueOf() && this.props.onEsc)\n this.props.onEsc(event);\n };\n\n private _handleClick = (event: MouseEvent) => {\n if (\n event.target instanceof HTMLElement &&\n this._root &&\n !event.target.contains(this._root) &&\n this.props.onBlur\n )\n this.props.onBlur(event);\n };\n\n /** Manually call onSelect of highlighted button. */\n public select = () => {\n if (this._selectedButton) this._selectedButton.select();\n };\n\n private _generateAnnularSectors = () => {\n const n = React.Children.count(this.props.children);\n const angle = (2 * Math.PI) / n;\n const outer = this.props.outerRadius;\n const inner = this.props.innerRadius;\n\n const offset = -Math.PI / 8;\n const annulus = new Annulus(\n new Point(outer + 1, outer + 1),\n inner + 1,\n outer - 1\n );\n const sectors: AnnularSector[] = [];\n for (let i = 0; i < n; i++) {\n sectors.push(\n new AnnularSector(annulus, angle * i + offset, angle * (i + 1) + offset)\n );\n }\n this.setState({ sectors });\n };\n}\n\n/** Properties for [[RadialButton]] component\n * @public\n * @deprecated in 4.14.0. Props of deprecated component {@link RadialButton}.\n */\nexport interface RadialButtonProps extends CommonProps {\n /** Whether label is rotated to radial menu. Default: Inherit */\n labelRotate?: boolean;\n /** which icon to display in on the menu button */\n icon?: IconSpec;\n /** @internal */\n annularSector?: AnnularSector;\n /** listens to any onClick event, or any select event, which can be triggered by the select() method. */\n onSelect?: (e: any) => any;\n /** Whether item is highlighted */\n selected?: boolean;\n /** Content */\n children?: React.ReactNode;\n}\n\ninterface RadialButtonState {\n hover: boolean;\n}\n\n/** Button for use within a [[RadialMenu]]\n * @public\n * @deprecated in 4.14.0. Component used in a deprecated component {@link RadialMenu}.\n */\nexport class RadialButton extends React.Component<\n RadialButtonProps,\n RadialButtonState\n> {\n /** @internal */\n public override readonly state: Readonly<RadialButtonState> = {\n hover: this.props.selected || false,\n };\n\n constructor(props: RadialButtonProps) {\n super(props);\n }\n\n public override render(): React.ReactElement {\n const sector = this.props.annularSector;\n let p = new Point();\n let size = 0;\n let t = \"\";\n let path = \"\";\n\n if (sector) {\n size = sector.start.p1.getDistanceTo(sector.end.p2) * 2;\n path = sector.path;\n\n const parent = sector.parent;\n const { x: cx, y: cy } = parent.center;\n const r = (parent.inner.radius + parent.outer.radius) / 2;\n const angle = (sector.startAngle + sector.endAngle) / 2;\n p = new Point(cx + r * Math.cos(angle), cy + r * Math.sin(angle));\n\n if (this.props.labelRotate) {\n let a = (angle * 180) / Math.PI + 90;\n while (a > 180) a -= 360;\n while (a < -180) a += 360;\n if (a > 90) a -= 180;\n if (a < -90) a += 180;\n t = `rotate(${a} ${p.x}, ${p.y})`;\n }\n }\n\n return (\n <g\n onMouseOver={this._handleMouseOver}\n onMouseOut={this._handleMouseOut}\n onClick={this._handleClick}\n >\n <path\n className={classnames(\n \"core-radial-menu-sector\",\n { selected: this.state.hover },\n this.props.className\n )}\n style={this.props.style}\n d={path}\n ></path>\n <foreignObject\n transform={t}\n x={p.x - size / 2}\n y={p.y - 16}\n width={size}\n height={size}\n className={\"core-radial-menu-button-svg\"}\n >\n <div\n {...{ xmlns: \"http://www.w3.org/1999/xhtml\" }}\n className={\"core-radial-menu-button-container\"}\n >\n <div className=\"core-radial-menu-button-icon\">\n <Icon iconSpec={this.props.icon} />\n </div>\n <div className={\"core-radial-menu-button-content\"}>\n {this.props.children}\n </div>\n </div>\n </foreignObject>\n </g>\n );\n }\n\n /** Manually call this.props.onSelect */\n public select = () => {\n if (this.props.onSelect) this.props.onSelect(undefined);\n };\n\n private _handleClick = (event: React.MouseEvent<SVGElement>) => {\n if (this.props.onSelect) this.props.onSelect(event);\n };\n\n private _handleMouseOver = (_event: React.MouseEvent<SVGElement>) => {\n this.setState({ hover: true });\n };\n\n private _handleMouseOut = (_event: React.MouseEvent<SVGElement>) => {\n this.setState({ hover: false });\n };\n}\n"]}
@@ -6,7 +6,7 @@ import * as React from "react";
6
6
  import type { CommonProps } from "../utils/Props";
7
7
  /** Properties for [[SearchBox]] component
8
8
  * @public
9
- * @deprecated in 4.12.x. Props of deprecated component {@link SearchBox}.
9
+ * @deprecated in 4.12.0. Props of deprecated component {@link SearchBox}.
10
10
  */
11
11
  export interface SearchBoxProps extends CommonProps {
12
12
  /** Value to set SearchBox to initially */
@@ -30,7 +30,7 @@ interface SearchBoxState {
30
30
  /** Input box for entering text to search for.
31
31
  * The SearchBox has an icon right-justified and bounded by the box and shows a Search or Clear icon.
32
32
  * @public
33
- * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/searchbox iTwinUI SearchBox} instead.
33
+ * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/searchbox iTwinUI SearchBox} instead.
34
34
  */
35
35
  export declare class SearchBox extends React.Component<SearchBoxProps, SearchBoxState> {
36
36
  private _inputElement;