@itwin/core-react 4.0.0-dev.12 → 4.0.0-dev.14

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 (616) hide show
  1. package/CHANGELOG.md +116 -1
  2. package/ContributeGuidelines.md +17 -14
  3. package/README.md +2 -2
  4. package/lib/cjs/core-react/UiCore.d.ts +40 -40
  5. package/lib/cjs/core-react/UiCore.js +85 -85
  6. package/lib/cjs/core-react/UiCore.js.map +1 -1
  7. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts +96 -96
  8. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  9. package/lib/cjs/core-react/autosuggest/AutoSuggest.js +174 -174
  10. package/lib/cjs/core-react/autosuggest/AutoSuggest.scss +1 -2
  11. package/lib/cjs/core-react/badge/Badge.d.ts +18 -18
  12. package/lib/cjs/core-react/badge/Badge.js +26 -26
  13. package/lib/cjs/core-react/badge/BadgeUtilities.d.ts +12 -12
  14. package/lib/cjs/core-react/badge/BadgeUtilities.js +38 -38
  15. package/lib/cjs/core-react/badge/BetaBadge.d.ts +9 -9
  16. package/lib/cjs/core-react/badge/BetaBadge.js +22 -22
  17. package/lib/cjs/core-react/badge/NewBadge.d.ts +10 -10
  18. package/lib/cjs/core-react/badge/NewBadge.js +23 -23
  19. package/lib/cjs/core-react/base/Centered.d.ts +10 -10
  20. package/lib/cjs/core-react/base/Centered.js +20 -20
  21. package/lib/cjs/core-react/base/Div.d.ts +16 -16
  22. package/lib/cjs/core-react/base/Div.js +20 -20
  23. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +79 -79
  24. package/lib/cjs/core-react/base/DivWithOutsideClick.js +16 -16
  25. package/lib/cjs/core-react/base/FillCentered.d.ts +10 -10
  26. package/lib/cjs/core-react/base/FillCentered.js +20 -20
  27. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +11 -11
  28. package/lib/cjs/core-react/base/FlexWrapContainer.js +21 -21
  29. package/lib/cjs/core-react/base/Gap.d.ts +15 -15
  30. package/lib/cjs/core-react/base/Gap.js +20 -20
  31. package/lib/cjs/core-react/base/Gap.js.map +1 -1
  32. package/lib/cjs/core-react/base/PointerEvents.d.ts +7 -7
  33. package/lib/cjs/core-react/base/PointerEvents.js +17 -17
  34. package/lib/cjs/core-react/base/ScrollView.d.ts +11 -11
  35. package/lib/cjs/core-react/base/ScrollView.js +21 -21
  36. package/lib/cjs/core-react/button/UnderlinedButton.d.ts +24 -24
  37. package/lib/cjs/core-react/button/UnderlinedButton.js +35 -35
  38. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +40 -40
  39. package/lib/cjs/core-react/checklistbox/CheckListBox.js +42 -42
  40. package/lib/cjs/core-react/checklistbox/CheckListBox.scss +0 -1
  41. package/lib/cjs/core-react/classes.scss +0 -2
  42. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +93 -93
  43. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  44. package/lib/cjs/core-react/contextmenu/ContextMenu.js +363 -364
  45. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  46. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.d.ts +18 -18
  47. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js +26 -26
  48. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts +12 -12
  49. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js +23 -23
  50. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts +61 -61
  51. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js +108 -108
  52. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  53. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts +51 -51
  54. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  55. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +162 -162
  56. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  57. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts +34 -34
  58. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js +61 -63
  59. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  60. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts +53 -53
  61. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js +55 -55
  62. package/lib/cjs/core-react/contextmenu/TildeFinder.d.ts +18 -18
  63. package/lib/cjs/core-react/contextmenu/TildeFinder.js +70 -70
  64. package/lib/cjs/core-react/contextmenu/TildeFinder.js.map +1 -1
  65. package/lib/cjs/core-react/dialog/Dialog.d.ts +132 -132
  66. package/lib/cjs/core-react/dialog/Dialog.js +374 -375
  67. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  68. package/lib/cjs/core-react/dialog/GlobalDialog.d.ts +28 -28
  69. package/lib/cjs/core-react/dialog/GlobalDialog.js +52 -53
  70. package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
  71. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +41 -41
  72. package/lib/cjs/core-react/elementseparator/ElementSeparator.js +163 -163
  73. package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
  74. package/lib/cjs/core-react/enums/Alignment.d.ts +22 -22
  75. package/lib/cjs/core-react/enums/Alignment.js +31 -31
  76. package/lib/cjs/core-react/enums/CheckBoxState.d.ts +20 -20
  77. package/lib/cjs/core-react/enums/CheckBoxState.js +19 -19
  78. package/lib/cjs/core-react/enums/Orientation.d.ts +11 -11
  79. package/lib/cjs/core-react/enums/Orientation.js +19 -19
  80. package/lib/cjs/core-react/enums/SortDirection.d.ts +12 -12
  81. package/lib/cjs/core-react/enums/SortDirection.js +20 -20
  82. package/lib/cjs/core-react/enums/TimeFormat.d.ts +14 -14
  83. package/lib/cjs/core-react/enums/TimeFormat.js +22 -22
  84. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +37 -37
  85. package/lib/cjs/core-react/expandable/ExpandableList.js +57 -57
  86. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  87. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.d.ts +53 -53
  88. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.d.ts.map +1 -1
  89. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.js +150 -150
  90. package/lib/cjs/core-react/focustrap/FocusTrap.d.ts +28 -28
  91. package/lib/cjs/core-react/focustrap/FocusTrap.js +196 -196
  92. package/lib/cjs/core-react/hocs/withIsPressed.d.ts +77 -77
  93. package/lib/cjs/core-react/hocs/withIsPressed.js +46 -46
  94. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts +103 -103
  95. package/lib/cjs/core-react/hocs/withOnOutsideClick.js +114 -115
  96. package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
  97. package/lib/cjs/core-react/hocs/withTimeout.d.ts +74 -74
  98. package/lib/cjs/core-react/hocs/withTimeout.js +46 -46
  99. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts +26 -26
  100. package/lib/cjs/core-react/icons/ConditionalIconItem.js +64 -64
  101. package/lib/cjs/core-react/icons/IconComponent.d.ts +25 -25
  102. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  103. package/lib/cjs/core-react/icons/IconComponent.js +48 -48
  104. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  105. package/lib/cjs/core-react/icons/SvgPath.d.ts +23 -23
  106. package/lib/cjs/core-react/icons/SvgPath.js +27 -27
  107. package/lib/cjs/core-react/icons/WebFontIcon.d.ts +25 -25
  108. package/lib/cjs/core-react/icons/WebFontIcon.js +21 -21
  109. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +42 -42
  110. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +56 -56
  111. package/lib/cjs/core-react/index.scss +0 -2
  112. package/lib/cjs/core-react/inputs/Input.d.ts +20 -20
  113. package/lib/cjs/core-react/inputs/Input.js +45 -45
  114. package/lib/cjs/core-react/inputs/InputLabel.d.ts +20 -20
  115. package/lib/cjs/core-react/inputs/InputLabel.js +41 -41
  116. package/lib/cjs/core-react/inputs/InputStatus.d.ts +11 -11
  117. package/lib/cjs/core-react/inputs/InputStatus.js +19 -19
  118. package/lib/cjs/core-react/inputs/LabeledComponentProps.d.ts +33 -33
  119. package/lib/cjs/core-react/inputs/LabeledComponentProps.js +9 -9
  120. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +23 -23
  121. package/lib/cjs/core-react/inputs/iconinput/IconInput.js +29 -29
  122. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +50 -50
  123. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  124. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +153 -153
  125. package/lib/cjs/core-react/listbox/Listbox.d.ts +55 -55
  126. package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
  127. package/lib/cjs/core-react/listbox/Listbox.js +221 -222
  128. package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
  129. package/lib/cjs/core-react/loading/LoadingBar.d.ts +29 -29
  130. package/lib/cjs/core-react/loading/LoadingBar.js +40 -40
  131. package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
  132. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +39 -39
  133. package/lib/cjs/core-react/loading/LoadingPrompt.js +44 -44
  134. package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
  135. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +32 -32
  136. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  137. package/lib/cjs/core-react/loading/LoadingSpinner.js +30 -30
  138. package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
  139. package/lib/cjs/core-react/loading/LoadingStatus.d.ts +24 -24
  140. package/lib/cjs/core-react/loading/LoadingStatus.js +37 -37
  141. package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
  142. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +80 -80
  143. package/lib/cjs/core-react/messagebox/MessageBox.js +114 -114
  144. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  145. package/lib/cjs/core-react/notification/MessageRenderer.d.ts +19 -19
  146. package/lib/cjs/core-react/notification/MessageRenderer.js +81 -81
  147. package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
  148. package/lib/cjs/core-react/notification/MessageType.d.ts +22 -22
  149. package/lib/cjs/core-react/notification/MessageType.d.ts.map +1 -1
  150. package/lib/cjs/core-react/notification/MessageType.js +24 -24
  151. package/lib/cjs/core-react/popup/Popup.d.ts +111 -111
  152. package/lib/cjs/core-react/popup/Popup.js +418 -422
  153. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  154. package/lib/cjs/core-react/radialmenu/Annulus.d.ts +54 -54
  155. package/lib/cjs/core-react/radialmenu/Annulus.js +82 -82
  156. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +97 -97
  157. package/lib/cjs/core-react/radialmenu/RadialMenu.js +179 -179
  158. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  159. package/lib/cjs/core-react/searchbox/SearchBox.d.ts +52 -52
  160. package/lib/cjs/core-react/searchbox/SearchBox.js +111 -111
  161. package/lib/cjs/core-react/searchbox/SearchBox.scss +2 -3
  162. package/lib/cjs/core-react/settings/SettingsContainer.d.ts +30 -30
  163. package/lib/cjs/core-react/settings/SettingsContainer.js +121 -121
  164. package/lib/cjs/core-react/settings/SettingsManager.d.ts +132 -132
  165. package/lib/cjs/core-react/settings/SettingsManager.js +122 -122
  166. package/lib/cjs/core-react/style/index.scss +0 -7
  167. package/lib/cjs/core-react/tabs/Tabs.d.ts +71 -71
  168. package/lib/cjs/core-react/tabs/Tabs.js +125 -125
  169. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +9 -9
  170. package/lib/cjs/core-react/tabs/VerticalTabs.js +20 -20
  171. package/lib/cjs/core-react/text/BlockText.d.ts +9 -9
  172. package/lib/cjs/core-react/text/BlockText.js +20 -20
  173. package/lib/cjs/core-react/text/BodyText.d.ts +10 -10
  174. package/lib/cjs/core-react/text/BodyText.js +21 -21
  175. package/lib/cjs/core-react/text/BodyText.js.map +1 -1
  176. package/lib/cjs/core-react/text/DisabledText.d.ts +6 -6
  177. package/lib/cjs/core-react/text/DisabledText.js +20 -20
  178. package/lib/cjs/core-react/text/FilteredText.d.ts +24 -24
  179. package/lib/cjs/core-react/text/FilteredText.js +40 -40
  180. package/lib/cjs/core-react/text/FilteredText.js.map +1 -1
  181. package/lib/cjs/core-react/text/MutedText.d.ts +10 -10
  182. package/lib/cjs/core-react/text/MutedText.js +21 -21
  183. package/lib/cjs/core-react/text/MutedText.js.map +1 -1
  184. package/lib/cjs/core-react/text/StyledText.d.ts +17 -17
  185. package/lib/cjs/core-react/text/StyledText.js +21 -21
  186. package/lib/cjs/core-react/text/StyledText.js.map +1 -1
  187. package/lib/cjs/core-react/text/TextProps.d.ts +10 -10
  188. package/lib/cjs/core-react/text/TextProps.js +9 -9
  189. package/lib/cjs/core-react/tree/Branch.d.ts +19 -19
  190. package/lib/cjs/core-react/tree/Branch.js +23 -23
  191. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts +20 -20
  192. package/lib/cjs/core-react/tree/ExpansionToggle.js +30 -30
  193. package/lib/cjs/core-react/tree/Node.d.ts +79 -79
  194. package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
  195. package/lib/cjs/core-react/tree/Node.js +87 -88
  196. package/lib/cjs/core-react/tree/Node.js.map +1 -1
  197. package/lib/cjs/core-react/tree/Node.scss +0 -15
  198. package/lib/cjs/core-react/tree/Placeholder.d.ts +22 -22
  199. package/lib/cjs/core-react/tree/Placeholder.js +31 -31
  200. package/lib/cjs/core-react/tree/Tree.d.ts +28 -28
  201. package/lib/cjs/core-react/tree/Tree.js +100 -100
  202. package/lib/cjs/core-react/uistate/LocalStateStorage.d.ts +16 -16
  203. package/lib/cjs/core-react/uistate/LocalStateStorage.js +49 -49
  204. package/lib/cjs/core-react/uistate/UiStateEntry.d.ts +30 -30
  205. package/lib/cjs/core-react/uistate/UiStateEntry.js +59 -59
  206. package/lib/cjs/core-react/uistate/UiStateStorage.d.ts +28 -28
  207. package/lib/cjs/core-react/uistate/UiStateStorage.js +21 -21
  208. package/lib/cjs/core-react/utils/IconHelper.d.ts +23 -23
  209. package/lib/cjs/core-react/utils/IconHelper.js +62 -62
  210. package/lib/cjs/core-react/utils/IconWebComponent.d.ts +10 -10
  211. package/lib/cjs/core-react/utils/IconWebComponent.js +72 -72
  212. package/lib/cjs/core-react/utils/IconWebComponent.js.map +1 -1
  213. package/lib/cjs/core-react/utils/Point.d.ts +37 -37
  214. package/lib/cjs/core-react/utils/Point.js +73 -73
  215. package/lib/cjs/core-react/utils/Point.js.map +1 -1
  216. package/lib/cjs/core-react/utils/Props.d.ts +38 -38
  217. package/lib/cjs/core-react/utils/Props.d.ts.map +1 -1
  218. package/lib/cjs/core-react/utils/Props.js +9 -9
  219. package/lib/cjs/core-react/utils/Rectangle.d.ts +144 -144
  220. package/lib/cjs/core-react/utils/Rectangle.js +270 -270
  221. package/lib/cjs/core-react/utils/Rectangle.js.map +1 -1
  222. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts +23 -23
  223. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js +36 -36
  224. package/lib/cjs/core-react/utils/Size.d.ts +23 -23
  225. package/lib/cjs/core-react/utils/Size.js +32 -32
  226. package/lib/cjs/core-react/utils/Size.js.map +1 -1
  227. package/lib/cjs/core-react/utils/Timer.d.ts +35 -35
  228. package/lib/cjs/core-react/utils/Timer.d.ts.map +1 -1
  229. package/lib/cjs/core-react/utils/Timer.js +64 -64
  230. package/lib/cjs/core-react/utils/UiGeometry.d.ts +20 -20
  231. package/lib/cjs/core-react/utils/UiGeometry.js +28 -28
  232. package/lib/cjs/core-react/utils/flattenChildren.d.ts +8 -8
  233. package/lib/cjs/core-react/utils/flattenChildren.js +27 -27
  234. package/lib/cjs/core-react/utils/getBestBWContrastColor.d.ts +7 -7
  235. package/lib/cjs/core-react/utils/getBestBWContrastColor.js +22 -22
  236. package/lib/cjs/core-react/utils/getBestBWContrastColor.js.map +1 -1
  237. package/lib/cjs/core-react/utils/getCssVariable.d.ts +11 -11
  238. package/lib/cjs/core-react/utils/getCssVariable.js +31 -31
  239. package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
  240. package/lib/cjs/core-react/utils/getDisplayName.d.ts +8 -8
  241. package/lib/cjs/core-react/utils/getDisplayName.js +21 -21
  242. package/lib/cjs/core-react/utils/getUserColor.d.ts +7 -7
  243. package/lib/cjs/core-react/utils/getUserColor.js +38 -38
  244. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.d.ts +4 -4
  245. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
  246. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js +19 -19
  247. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.d.ts +7 -7
  248. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +88 -89
  249. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  250. package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts +17 -17
  251. package/lib/cjs/core-react/utils/hooks/useDisposable.js +38 -38
  252. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.d.ts +8 -8
  253. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js +26 -26
  254. package/lib/cjs/core-react/utils/hooks/useEventListener.d.ts +11 -11
  255. package/lib/cjs/core-react/utils/hooks/useEventListener.js +43 -43
  256. package/lib/cjs/core-react/utils/hooks/useInterval.d.ts +5 -5
  257. package/lib/cjs/core-react/utils/hooks/useInterval.js +36 -36
  258. package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.d.ts +5 -5
  259. package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.js +64 -64
  260. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts +12 -12
  261. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
  262. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js +92 -92
  263. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.d.ts +55 -55
  264. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js +114 -114
  265. package/lib/cjs/core-react/utils/hooks/useRefEffect.d.ts +7 -7
  266. package/lib/cjs/core-react/utils/hooks/useRefEffect.js +23 -23
  267. package/lib/cjs/core-react/utils/hooks/useRefState.d.ts +21 -21
  268. package/lib/cjs/core-react/utils/hooks/useRefState.js +35 -35
  269. package/lib/cjs/core-react/utils/hooks/useRefs.d.ts +12 -12
  270. package/lib/cjs/core-react/utils/hooks/useRefs.js +53 -53
  271. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +39 -39
  272. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +203 -208
  273. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  274. package/lib/cjs/core-react/utils/hooks/useTargeted.d.ts +8 -8
  275. package/lib/cjs/core-react/utils/hooks/useTargeted.js +28 -28
  276. package/lib/cjs/core-react/utils/hooks/useThrottledFn.d.ts +15 -15
  277. package/lib/cjs/core-react/utils/hooks/useThrottledFn.js +25 -25
  278. package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.d.ts +20 -20
  279. package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.js +27 -27
  280. package/lib/cjs/core-react/utils/isPromiseLike.d.ts +7 -7
  281. package/lib/cjs/core-react/utils/isPromiseLike.js +17 -17
  282. package/lib/cjs/core-react/utils/shallowDiffers.d.ts +11 -11
  283. package/lib/cjs/core-react/utils/shallowDiffers.js +29 -29
  284. package/lib/cjs/core-react/utils/typeUtils.d.ts +7 -7
  285. package/lib/cjs/core-react/utils/typeUtils.d.ts.map +1 -1
  286. package/lib/cjs/core-react/utils/typeUtils.js +9 -9
  287. package/lib/cjs/core-react.d.ts +236 -236
  288. package/lib/cjs/core-react.js +263 -259
  289. package/lib/cjs/core-react.js.map +1 -1
  290. package/lib/esm/core-react/UiCore.d.ts +40 -40
  291. package/lib/esm/core-react/UiCore.js +82 -81
  292. package/lib/esm/core-react/UiCore.js.map +1 -1
  293. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +96 -96
  294. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  295. package/lib/esm/core-react/autosuggest/AutoSuggest.js +170 -170
  296. package/lib/esm/core-react/autosuggest/AutoSuggest.scss +1 -2
  297. package/lib/esm/core-react/badge/Badge.d.ts +18 -18
  298. package/lib/esm/core-react/badge/Badge.js +22 -22
  299. package/lib/esm/core-react/badge/BadgeUtilities.d.ts +12 -12
  300. package/lib/esm/core-react/badge/BadgeUtilities.js +34 -34
  301. package/lib/esm/core-react/badge/BetaBadge.d.ts +9 -9
  302. package/lib/esm/core-react/badge/BetaBadge.js +18 -18
  303. package/lib/esm/core-react/badge/NewBadge.d.ts +10 -10
  304. package/lib/esm/core-react/badge/NewBadge.js +19 -19
  305. package/lib/esm/core-react/base/Centered.d.ts +10 -10
  306. package/lib/esm/core-react/base/Centered.js +16 -16
  307. package/lib/esm/core-react/base/Div.d.ts +16 -16
  308. package/lib/esm/core-react/base/Div.js +16 -16
  309. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +79 -79
  310. package/lib/esm/core-react/base/DivWithOutsideClick.js +13 -13
  311. package/lib/esm/core-react/base/FillCentered.d.ts +10 -10
  312. package/lib/esm/core-react/base/FillCentered.js +16 -16
  313. package/lib/esm/core-react/base/FlexWrapContainer.d.ts +11 -11
  314. package/lib/esm/core-react/base/FlexWrapContainer.js +17 -17
  315. package/lib/esm/core-react/base/Gap.d.ts +15 -15
  316. package/lib/esm/core-react/base/Gap.js +16 -16
  317. package/lib/esm/core-react/base/Gap.js.map +1 -1
  318. package/lib/esm/core-react/base/PointerEvents.d.ts +7 -7
  319. package/lib/esm/core-react/base/PointerEvents.js +13 -13
  320. package/lib/esm/core-react/base/ScrollView.d.ts +11 -11
  321. package/lib/esm/core-react/base/ScrollView.js +17 -17
  322. package/lib/esm/core-react/button/UnderlinedButton.d.ts +24 -24
  323. package/lib/esm/core-react/button/UnderlinedButton.js +31 -31
  324. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +40 -40
  325. package/lib/esm/core-react/checklistbox/CheckListBox.js +36 -36
  326. package/lib/esm/core-react/checklistbox/CheckListBox.scss +0 -1
  327. package/lib/esm/core-react/classes.scss +0 -2
  328. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +93 -93
  329. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  330. package/lib/esm/core-react/contextmenu/ContextMenu.js +360 -360
  331. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  332. package/lib/esm/core-react/contextmenu/ContextMenuDirection.d.ts +18 -18
  333. package/lib/esm/core-react/contextmenu/ContextMenuDirection.js +23 -23
  334. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts +12 -12
  335. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js +19 -19
  336. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts +61 -61
  337. package/lib/esm/core-react/contextmenu/ContextMenuItem.js +105 -104
  338. package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  339. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts +51 -51
  340. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  341. package/lib/esm/core-react/contextmenu/ContextSubMenu.js +159 -158
  342. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  343. package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts +34 -34
  344. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js +57 -59
  345. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  346. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts +53 -53
  347. package/lib/esm/core-react/contextmenu/PopupContextMenu.js +51 -51
  348. package/lib/esm/core-react/contextmenu/TildeFinder.d.ts +18 -18
  349. package/lib/esm/core-react/contextmenu/TildeFinder.js +67 -66
  350. package/lib/esm/core-react/contextmenu/TildeFinder.js.map +1 -1
  351. package/lib/esm/core-react/dialog/Dialog.d.ts +132 -132
  352. package/lib/esm/core-react/dialog/Dialog.js +371 -371
  353. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  354. package/lib/esm/core-react/dialog/GlobalDialog.d.ts +28 -28
  355. package/lib/esm/core-react/dialog/GlobalDialog.js +48 -49
  356. package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
  357. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +41 -41
  358. package/lib/esm/core-react/elementseparator/ElementSeparator.js +159 -159
  359. package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
  360. package/lib/esm/core-react/enums/Alignment.d.ts +22 -22
  361. package/lib/esm/core-react/enums/Alignment.js +28 -28
  362. package/lib/esm/core-react/enums/CheckBoxState.d.ts +20 -20
  363. package/lib/esm/core-react/enums/CheckBoxState.js +16 -16
  364. package/lib/esm/core-react/enums/Orientation.d.ts +11 -11
  365. package/lib/esm/core-react/enums/Orientation.js +16 -16
  366. package/lib/esm/core-react/enums/SortDirection.d.ts +12 -12
  367. package/lib/esm/core-react/enums/SortDirection.js +17 -17
  368. package/lib/esm/core-react/enums/TimeFormat.d.ts +14 -14
  369. package/lib/esm/core-react/enums/TimeFormat.js +19 -19
  370. package/lib/esm/core-react/expandable/ExpandableList.d.ts +37 -37
  371. package/lib/esm/core-react/expandable/ExpandableList.js +54 -53
  372. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  373. package/lib/esm/core-react/focus/ItemKeyboardNavigator.d.ts +53 -53
  374. package/lib/esm/core-react/focus/ItemKeyboardNavigator.d.ts.map +1 -1
  375. package/lib/esm/core-react/focus/ItemKeyboardNavigator.js +145 -145
  376. package/lib/esm/core-react/focustrap/FocusTrap.d.ts +28 -28
  377. package/lib/esm/core-react/focustrap/FocusTrap.js +191 -191
  378. package/lib/esm/core-react/hocs/withIsPressed.d.ts +77 -77
  379. package/lib/esm/core-react/hocs/withIsPressed.js +42 -42
  380. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts +103 -103
  381. package/lib/esm/core-react/hocs/withOnOutsideClick.js +110 -111
  382. package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
  383. package/lib/esm/core-react/hocs/withTimeout.d.ts +74 -74
  384. package/lib/esm/core-react/hocs/withTimeout.js +42 -42
  385. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts +26 -26
  386. package/lib/esm/core-react/icons/ConditionalIconItem.js +60 -60
  387. package/lib/esm/core-react/icons/IconComponent.d.ts +25 -25
  388. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  389. package/lib/esm/core-react/icons/IconComponent.js +44 -44
  390. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  391. package/lib/esm/core-react/icons/SvgPath.d.ts +23 -23
  392. package/lib/esm/core-react/icons/SvgPath.js +23 -23
  393. package/lib/esm/core-react/icons/WebFontIcon.d.ts +25 -25
  394. package/lib/esm/core-react/icons/WebFontIcon.js +17 -17
  395. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +42 -42
  396. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +52 -52
  397. package/lib/esm/core-react/index.scss +0 -2
  398. package/lib/esm/core-react/inputs/Input.d.ts +20 -20
  399. package/lib/esm/core-react/inputs/Input.js +42 -42
  400. package/lib/esm/core-react/inputs/InputLabel.d.ts +20 -20
  401. package/lib/esm/core-react/inputs/InputLabel.js +37 -37
  402. package/lib/esm/core-react/inputs/InputStatus.d.ts +11 -11
  403. package/lib/esm/core-react/inputs/InputStatus.js +16 -16
  404. package/lib/esm/core-react/inputs/LabeledComponentProps.d.ts +33 -33
  405. package/lib/esm/core-react/inputs/LabeledComponentProps.js +8 -8
  406. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +23 -23
  407. package/lib/esm/core-react/inputs/iconinput/IconInput.js +26 -26
  408. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +50 -50
  409. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  410. package/lib/esm/core-react/inputs/numberinput/NumberInput.js +150 -150
  411. package/lib/esm/core-react/listbox/Listbox.d.ts +55 -55
  412. package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
  413. package/lib/esm/core-react/listbox/Listbox.js +216 -217
  414. package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
  415. package/lib/esm/core-react/loading/LoadingBar.d.ts +29 -29
  416. package/lib/esm/core-react/loading/LoadingBar.js +36 -35
  417. package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
  418. package/lib/esm/core-react/loading/LoadingPrompt.d.ts +39 -39
  419. package/lib/esm/core-react/loading/LoadingPrompt.js +41 -40
  420. package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
  421. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +32 -32
  422. package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  423. package/lib/esm/core-react/loading/LoadingSpinner.js +27 -26
  424. package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
  425. package/lib/esm/core-react/loading/LoadingStatus.d.ts +24 -24
  426. package/lib/esm/core-react/loading/LoadingStatus.js +34 -33
  427. package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
  428. package/lib/esm/core-react/messagebox/MessageBox.d.ts +80 -80
  429. package/lib/esm/core-react/messagebox/MessageBox.js +110 -109
  430. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  431. package/lib/esm/core-react/notification/MessageRenderer.d.ts +19 -19
  432. package/lib/esm/core-react/notification/MessageRenderer.js +77 -77
  433. package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
  434. package/lib/esm/core-react/notification/MessageType.d.ts +22 -22
  435. package/lib/esm/core-react/notification/MessageType.d.ts.map +1 -1
  436. package/lib/esm/core-react/notification/MessageType.js +19 -19
  437. package/lib/esm/core-react/popup/Popup.d.ts +111 -111
  438. package/lib/esm/core-react/popup/Popup.js +415 -418
  439. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  440. package/lib/esm/core-react/radialmenu/Annulus.d.ts +54 -54
  441. package/lib/esm/core-react/radialmenu/Annulus.js +75 -75
  442. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +97 -97
  443. package/lib/esm/core-react/radialmenu/RadialMenu.js +175 -174
  444. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  445. package/lib/esm/core-react/searchbox/SearchBox.d.ts +52 -52
  446. package/lib/esm/core-react/searchbox/SearchBox.js +107 -107
  447. package/lib/esm/core-react/searchbox/SearchBox.scss +2 -3
  448. package/lib/esm/core-react/settings/SettingsContainer.d.ts +30 -30
  449. package/lib/esm/core-react/settings/SettingsContainer.js +115 -115
  450. package/lib/esm/core-react/settings/SettingsManager.d.ts +132 -132
  451. package/lib/esm/core-react/settings/SettingsManager.js +113 -113
  452. package/lib/esm/core-react/style/index.scss +0 -7
  453. package/lib/esm/core-react/tabs/Tabs.d.ts +71 -71
  454. package/lib/esm/core-react/tabs/Tabs.js +121 -121
  455. package/lib/esm/core-react/tabs/VerticalTabs.d.ts +9 -9
  456. package/lib/esm/core-react/tabs/VerticalTabs.js +16 -16
  457. package/lib/esm/core-react/text/BlockText.d.ts +9 -9
  458. package/lib/esm/core-react/text/BlockText.js +16 -16
  459. package/lib/esm/core-react/text/BodyText.d.ts +10 -10
  460. package/lib/esm/core-react/text/BodyText.js +17 -17
  461. package/lib/esm/core-react/text/BodyText.js.map +1 -1
  462. package/lib/esm/core-react/text/DisabledText.d.ts +6 -6
  463. package/lib/esm/core-react/text/DisabledText.js +16 -16
  464. package/lib/esm/core-react/text/FilteredText.d.ts +24 -24
  465. package/lib/esm/core-react/text/FilteredText.js +36 -36
  466. package/lib/esm/core-react/text/FilteredText.js.map +1 -1
  467. package/lib/esm/core-react/text/MutedText.d.ts +10 -10
  468. package/lib/esm/core-react/text/MutedText.js +17 -17
  469. package/lib/esm/core-react/text/MutedText.js.map +1 -1
  470. package/lib/esm/core-react/text/StyledText.d.ts +17 -17
  471. package/lib/esm/core-react/text/StyledText.js +17 -17
  472. package/lib/esm/core-react/text/StyledText.js.map +1 -1
  473. package/lib/esm/core-react/text/TextProps.d.ts +10 -10
  474. package/lib/esm/core-react/text/TextProps.js +8 -8
  475. package/lib/esm/core-react/tree/Branch.d.ts +19 -19
  476. package/lib/esm/core-react/tree/Branch.js +19 -19
  477. package/lib/esm/core-react/tree/ExpansionToggle.d.ts +20 -20
  478. package/lib/esm/core-react/tree/ExpansionToggle.js +26 -26
  479. package/lib/esm/core-react/tree/Node.d.ts +79 -79
  480. package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
  481. package/lib/esm/core-react/tree/Node.js +83 -84
  482. package/lib/esm/core-react/tree/Node.js.map +1 -1
  483. package/lib/esm/core-react/tree/Node.scss +0 -15
  484. package/lib/esm/core-react/tree/Placeholder.d.ts +22 -22
  485. package/lib/esm/core-react/tree/Placeholder.js +27 -27
  486. package/lib/esm/core-react/tree/Tree.d.ts +28 -28
  487. package/lib/esm/core-react/tree/Tree.js +96 -96
  488. package/lib/esm/core-react/uistate/LocalStateStorage.d.ts +16 -16
  489. package/lib/esm/core-react/uistate/LocalStateStorage.js +45 -45
  490. package/lib/esm/core-react/uistate/UiStateEntry.d.ts +30 -30
  491. package/lib/esm/core-react/uistate/UiStateEntry.js +55 -55
  492. package/lib/esm/core-react/uistate/UiStateStorage.d.ts +28 -28
  493. package/lib/esm/core-react/uistate/UiStateStorage.js +18 -18
  494. package/lib/esm/core-react/utils/IconHelper.d.ts +23 -23
  495. package/lib/esm/core-react/utils/IconHelper.js +58 -58
  496. package/lib/esm/core-react/utils/IconWebComponent.d.ts +10 -10
  497. package/lib/esm/core-react/utils/IconWebComponent.js +68 -68
  498. package/lib/esm/core-react/utils/IconWebComponent.js.map +1 -1
  499. package/lib/esm/core-react/utils/Point.d.ts +37 -37
  500. package/lib/esm/core-react/utils/Point.js +69 -69
  501. package/lib/esm/core-react/utils/Point.js.map +1 -1
  502. package/lib/esm/core-react/utils/Props.d.ts +38 -38
  503. package/lib/esm/core-react/utils/Props.d.ts.map +1 -1
  504. package/lib/esm/core-react/utils/Props.js +8 -8
  505. package/lib/esm/core-react/utils/Rectangle.d.ts +144 -144
  506. package/lib/esm/core-react/utils/Rectangle.js +266 -266
  507. package/lib/esm/core-react/utils/Rectangle.js.map +1 -1
  508. package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts +23 -23
  509. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js +32 -32
  510. package/lib/esm/core-react/utils/Size.d.ts +23 -23
  511. package/lib/esm/core-react/utils/Size.js +28 -28
  512. package/lib/esm/core-react/utils/Size.js.map +1 -1
  513. package/lib/esm/core-react/utils/Timer.d.ts +35 -35
  514. package/lib/esm/core-react/utils/Timer.d.ts.map +1 -1
  515. package/lib/esm/core-react/utils/Timer.js +60 -60
  516. package/lib/esm/core-react/utils/UiGeometry.d.ts +20 -20
  517. package/lib/esm/core-react/utils/UiGeometry.js +24 -24
  518. package/lib/esm/core-react/utils/flattenChildren.d.ts +8 -8
  519. package/lib/esm/core-react/utils/flattenChildren.js +23 -23
  520. package/lib/esm/core-react/utils/getBestBWContrastColor.d.ts +7 -7
  521. package/lib/esm/core-react/utils/getBestBWContrastColor.js +18 -18
  522. package/lib/esm/core-react/utils/getBestBWContrastColor.js.map +1 -1
  523. package/lib/esm/core-react/utils/getCssVariable.d.ts +11 -11
  524. package/lib/esm/core-react/utils/getCssVariable.js +26 -26
  525. package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
  526. package/lib/esm/core-react/utils/getDisplayName.d.ts +8 -8
  527. package/lib/esm/core-react/utils/getDisplayName.js +17 -17
  528. package/lib/esm/core-react/utils/getUserColor.d.ts +7 -7
  529. package/lib/esm/core-react/utils/getUserColor.js +34 -34
  530. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.d.ts +4 -4
  531. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
  532. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js +16 -16
  533. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.d.ts +7 -7
  534. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +84 -85
  535. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  536. package/lib/esm/core-react/utils/hooks/useDisposable.d.ts +17 -17
  537. package/lib/esm/core-react/utils/hooks/useDisposable.js +33 -33
  538. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.d.ts +8 -8
  539. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js +22 -22
  540. package/lib/esm/core-react/utils/hooks/useEventListener.d.ts +11 -11
  541. package/lib/esm/core-react/utils/hooks/useEventListener.js +39 -39
  542. package/lib/esm/core-react/utils/hooks/useInterval.d.ts +5 -5
  543. package/lib/esm/core-react/utils/hooks/useInterval.js +32 -32
  544. package/lib/esm/core-react/utils/hooks/useLifecycleLogging.d.ts +5 -5
  545. package/lib/esm/core-react/utils/hooks/useLifecycleLogging.js +60 -60
  546. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts +12 -12
  547. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
  548. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js +88 -88
  549. package/lib/esm/core-react/utils/hooks/useProximityToMouse.d.ts +55 -55
  550. package/lib/esm/core-react/utils/hooks/useProximityToMouse.js +102 -102
  551. package/lib/esm/core-react/utils/hooks/useRefEffect.d.ts +7 -7
  552. package/lib/esm/core-react/utils/hooks/useRefEffect.js +19 -19
  553. package/lib/esm/core-react/utils/hooks/useRefState.d.ts +21 -21
  554. package/lib/esm/core-react/utils/hooks/useRefState.js +31 -31
  555. package/lib/esm/core-react/utils/hooks/useRefs.d.ts +12 -12
  556. package/lib/esm/core-react/utils/hooks/useRefs.js +48 -48
  557. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +39 -39
  558. package/lib/esm/core-react/utils/hooks/useResizeObserver.js +196 -201
  559. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  560. package/lib/esm/core-react/utils/hooks/useTargeted.d.ts +8 -8
  561. package/lib/esm/core-react/utils/hooks/useTargeted.js +24 -24
  562. package/lib/esm/core-react/utils/hooks/useThrottledFn.d.ts +15 -15
  563. package/lib/esm/core-react/utils/hooks/useThrottledFn.js +21 -21
  564. package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.d.ts +20 -20
  565. package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.js +23 -23
  566. package/lib/esm/core-react/utils/isPromiseLike.d.ts +7 -7
  567. package/lib/esm/core-react/utils/isPromiseLike.js +13 -13
  568. package/lib/esm/core-react/utils/shallowDiffers.d.ts +11 -11
  569. package/lib/esm/core-react/utils/shallowDiffers.js +25 -25
  570. package/lib/esm/core-react/utils/typeUtils.d.ts +7 -7
  571. package/lib/esm/core-react/utils/typeUtils.d.ts.map +1 -1
  572. package/lib/esm/core-react/utils/typeUtils.js +8 -8
  573. package/lib/esm/core-react.d.ts +236 -236
  574. package/lib/esm/core-react.js +241 -241
  575. package/package.json +15 -13
  576. package/ThirdPartyNotices.md +0 -28
  577. package/lib/cjs/core-react/button/blue-large.scss +0 -12
  578. package/lib/cjs/core-react/button/blue.scss +0 -17
  579. package/lib/cjs/core-react/button/button.scss +0 -70
  580. package/lib/cjs/core-react/button/classes.scss +0 -14
  581. package/lib/cjs/core-react/button/disabled-large.scss +0 -12
  582. package/lib/cjs/core-react/button/disabled.scss +0 -17
  583. package/lib/cjs/core-react/button/hollow-large.scss +0 -13
  584. package/lib/cjs/core-react/button/hollow.scss +0 -30
  585. package/lib/cjs/core-react/button/index.scss +0 -14
  586. package/lib/cjs/core-react/button/primary-large.scss +0 -12
  587. package/lib/cjs/core-react/button/primary.scss +0 -17
  588. package/lib/cjs/core-react/button/variables.scss +0 -22
  589. package/lib/cjs/core-react/checkbox/checkbox.scss +0 -124
  590. package/lib/cjs/core-react/checkbox/classes.scss +0 -8
  591. package/lib/cjs/core-react/checkbox/index.scss +0 -8
  592. package/lib/cjs/core-react/style/data-viz.scss +0 -20
  593. package/lib/cjs/core-react/style/space.scss +0 -13
  594. package/lib/cjs/core-react/style/speed.scss +0 -9
  595. package/lib/cjs/core-react/style/typography.scss +0 -39
  596. package/lib/cjs/core-react/style/variables.scss +0 -9
  597. package/lib/esm/core-react/button/blue-large.scss +0 -12
  598. package/lib/esm/core-react/button/blue.scss +0 -17
  599. package/lib/esm/core-react/button/button.scss +0 -70
  600. package/lib/esm/core-react/button/classes.scss +0 -14
  601. package/lib/esm/core-react/button/disabled-large.scss +0 -12
  602. package/lib/esm/core-react/button/disabled.scss +0 -17
  603. package/lib/esm/core-react/button/hollow-large.scss +0 -13
  604. package/lib/esm/core-react/button/hollow.scss +0 -30
  605. package/lib/esm/core-react/button/index.scss +0 -14
  606. package/lib/esm/core-react/button/primary-large.scss +0 -12
  607. package/lib/esm/core-react/button/primary.scss +0 -17
  608. package/lib/esm/core-react/button/variables.scss +0 -22
  609. package/lib/esm/core-react/checkbox/checkbox.scss +0 -124
  610. package/lib/esm/core-react/checkbox/classes.scss +0 -8
  611. package/lib/esm/core-react/checkbox/index.scss +0 -8
  612. package/lib/esm/core-react/style/data-viz.scss +0 -20
  613. package/lib/esm/core-react/style/space.scss +0 -13
  614. package/lib/esm/core-react/style/speed.scss +0 -9
  615. package/lib/esm/core-react/style/typography.scss +0 -39
  616. package/lib/esm/core-react/style/variables.scss +0 -9
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.js","sourceRoot":"","sources":["../../../../src/core-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CACV,CACR,CACP;QACD,uBAAuB;QACvB,MAAA,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,CAC1C,qCAAqC,CACtC,mCAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CACpC,CAAC;IACJ,CAAC;;AArea,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,CAAC;AAgeJ,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,0BAA0B,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Popup\r\n */\r\n\r\nimport \"./Popup.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport { RelativePosition, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { FocusTrap } from \"../focustrap/FocusTrap\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n// cSpell:ignore focustrap focusable alertdialog\r\n\r\n/** @internal */\r\ninterface PopupPoint {\r\n x: number;\r\n y: number;\r\n}\r\n\r\n/** Properties for the [[Popup]] component\r\n * @public\r\n */\r\nexport interface PopupProps extends CommonProps {\r\n /** Show or hide the box shadow (defaults to true) */\r\n showShadow: boolean;\r\n /** Show or hide the arrow (defaults to false) */\r\n showArrow: boolean;\r\n /** Indicates whether the popup is shown or not (defaults to false) */\r\n isOpen: boolean;\r\n /** Direction (relative to the target) to which the popup is expanded (defaults to Bottom) */\r\n position: RelativePosition;\r\n /** Top position (absolute positioning - defaults to 0) */\r\n top: number;\r\n /** Left position (absolute positioning - defaults to 0) */\r\n left: number;\r\n /** Function called when the popup is opened */\r\n onOpen?: () => void;\r\n /** Function called when user clicks outside the popup */\r\n onOutsideClick?: (e: MouseEvent) => void;\r\n /** Function called when the popup is closed */\r\n onClose?: () => void;\r\n /** Function called when the popup is closed on Enter */\r\n onEnter?: () => void;\r\n /** Function called when the wheel is used */\r\n onWheel?: (e: WheelEvent) => void;\r\n /** Function called when the right mouse button is pressed */\r\n onContextMenu?: (e: MouseEvent) => void;\r\n /** Offset from the parent (defaults to 4) */\r\n offset: number;\r\n /** Target element to position popup */\r\n target?: HTMLElement | null;\r\n /** Role - if not specified \"dialog\" is used */\r\n role?: \"dialog\" | \"alert\" | \"alertdialog\";\r\n /** accessibility label */\r\n ariaLabel?: string;\r\n /** set focus to popup - default to not set focus */\r\n moveFocus?: boolean;\r\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. */\r\n focusTarget?: React.RefObject<HTMLElement> | string;\r\n /** Indicates whether the popup is pinned. */\r\n isPinned?: boolean;\r\n /** Indicates whether to use animation for open/close (defaults to true) */\r\n animate?: boolean;\r\n /** Indicates whether to close the popup when Enter is pressed (defaults to true) */\r\n closeOnEnter?: boolean;\r\n /** Indicates whether to close the popup when the wheel is used (defaults to true) */\r\n closeOnWheel?: boolean;\r\n /** Indicates whether to close the popup when the right mouse button is pressed (defaults to true) */\r\n closeOnContextMenu?: boolean;\r\n /** If false outside click processing and closing are skipped if click occurs in another Popup component, default to false. */\r\n closeOnNestedPopupOutsideClick?: boolean;\r\n /** If true the children are mounted once and unmounted when this component is unmounted. If false the\r\n * children are unmounted each time the popup is closed. */\r\n keepContentsMounted?: boolean;\r\n\r\n /**\r\n * If true the popup will remain open and will be repositioned when window resize events occur, default to false.\r\n * @beta\r\n * */\r\n repositionOnResize?: boolean;\r\n\r\n /** Content */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/** @internal */\r\ninterface PopupState {\r\n isOpen: boolean;\r\n top: number;\r\n left: number;\r\n position: RelativePosition;\r\n parentDocument: Document;\r\n animationEnded: boolean;\r\n}\r\n\r\n/** Popup React component displays a popup relative to an optional target element.\r\n * @public\r\n */\r\nexport class Popup extends React.Component<PopupProps, PopupState> {\r\n private _popup: HTMLElement | null = null;\r\n\r\n constructor(props: PopupProps) {\r\n super(props);\r\n const parentDocument = this.props.target?.ownerDocument ?? document;\r\n\r\n this.state = {\r\n animationEnded: false,\r\n isOpen: this.props.isOpen,\r\n top: 0,\r\n left: 0,\r\n position: this.props.position,\r\n parentDocument,\r\n };\r\n }\r\n\r\n public static defaultProps: Partial<PopupProps> = {\r\n position: RelativePosition.Bottom,\r\n showShadow: true,\r\n showArrow: false,\r\n isOpen: false,\r\n offset: 4,\r\n top: -1,\r\n left: -1,\r\n };\r\n\r\n public override componentDidMount() {\r\n if (this.props.isOpen) {\r\n this._onShow();\r\n }\r\n }\r\n\r\n private getParentWindow() {\r\n // istanbul ignore next\r\n return this.state.parentDocument.defaultView ?? window;\r\n }\r\n\r\n public override componentDidUpdate(previousProps: PopupProps, prevState: PopupState) {\r\n if (this.state.position !== prevState.position) {\r\n this.setState( { animationEnded: false });\r\n }\r\n\r\n if (this.props.target !== previousProps.target) {\r\n // istanbul ignore next\r\n {\r\n const parentDocument = this.props.target?.ownerDocument ?? document;\r\n if (parentDocument !== this.state.parentDocument) {\r\n this._unBindWindowEvents();\r\n this.setState({ parentDocument });\r\n }\r\n }\r\n }\r\n\r\n if (this.props.isOpen === previousProps.isOpen) {\r\n if (this.props.isOpen) {\r\n const position = this._toggleRelativePosition();\r\n const point = this._fitPopup(this._getPosition(position));\r\n if ((Math.abs(this.state.left - point.x) < 3) &&\r\n (Math.abs(this.state.top - point.y) < 3) &&\r\n this.state.position === position)\r\n return;\r\n\r\n this.setState({\r\n left: point.x,\r\n top: point.y,\r\n position,\r\n });\r\n }\r\n return;\r\n }\r\n\r\n if (this.props.isOpen) {\r\n this._onShow();\r\n } else {\r\n this._onClose();\r\n }\r\n }\r\n\r\n public override componentWillUnmount() {\r\n this._unBindWindowEvents();\r\n }\r\n\r\n private _bindWindowEvents = () => {\r\n const activeWindow = this.getParentWindow();\r\n activeWindow.addEventListener(\"pointerdown\", this._handleOutsideClick);\r\n activeWindow.addEventListener(\"resize\", this._resize);\r\n activeWindow.addEventListener(\"contextmenu\", this._handleContextMenu);\r\n activeWindow.addEventListener(\"scroll\", this._hide);\r\n activeWindow.addEventListener(\"wheel\", this._handleWheel);\r\n activeWindow.addEventListener(\"keydown\", this._handleKeyboard);\r\n };\r\n\r\n private _unBindWindowEvents = () => {\r\n const activeWindow = this.getParentWindow();\r\n activeWindow.removeEventListener(\"pointerdown\", this._handleOutsideClick);\r\n activeWindow.removeEventListener(\"resize\", this._resize);\r\n activeWindow.removeEventListener(\"contextmenu\", this._handleContextMenu);\r\n activeWindow.removeEventListener(\"scroll\", this._hide);\r\n activeWindow.removeEventListener(\"wheel\", this._handleWheel);\r\n activeWindow.removeEventListener(\"keydown\", this._handleKeyboard);\r\n };\r\n\r\n private _handleWheel = (event: WheelEvent) => {\r\n if (this._popup && this._popup.contains(event.target as Node))\r\n return;\r\n\r\n if (this.props.onWheel)\r\n return this.props.onWheel(event);\r\n\r\n const closeOnWheel = this.props.closeOnWheel !== undefined ? this.props.closeOnWheel : true;\r\n if (closeOnWheel)\r\n this._hide();\r\n };\r\n\r\n private isInCorePopup(element: HTMLElement): boolean {\r\n if (element.nodeName === \"DIV\") {\r\n if (element.classList && element.classList.contains(\"core-popup\"))\r\n return true;\r\n if (element.parentElement && this.isInCorePopup(element.parentElement))\r\n return true;\r\n } else {\r\n // istanbul ignore else\r\n if (element.parentElement && this.isInCorePopup(element.parentElement))\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n private _handleOutsideClick = (event: MouseEvent): void => {\r\n if (this._popup && this._popup.contains(event.target as Node))\r\n return;\r\n\r\n if (this.props.isPinned)\r\n return;\r\n\r\n if (!this.props.closeOnNestedPopupOutsideClick && this.isInCorePopup(event.target as HTMLElement))\r\n return;\r\n\r\n if (this.props.onOutsideClick)\r\n return this.props.onOutsideClick(event);\r\n\r\n if (this.props.target && this.props.target.contains(event.target as Node))\r\n return;\r\n\r\n this._onClose();\r\n };\r\n\r\n private _handleContextMenu = (event: MouseEvent) => {\r\n if (this._popup && this._popup.contains(event.target as Node))\r\n return;\r\n\r\n if (this.props.onContextMenu)\r\n return this.props.onContextMenu(event);\r\n\r\n const closeOnContextMenu = this.props.closeOnContextMenu !== undefined ? this.props.closeOnContextMenu : true;\r\n if (closeOnContextMenu)\r\n this._hide();\r\n };\r\n\r\n private _handleKeyboard = (event: KeyboardEvent): void => {\r\n if (this.props.isPinned)\r\n return;\r\n\r\n if (event.key === SpecialKey.Escape || event.key === SpecialKey.Enter) {\r\n const closeOnEnter = this.props.closeOnEnter !== undefined ? this.props.closeOnEnter : true;\r\n if (event.key === SpecialKey.Enter) {\r\n if (closeOnEnter)\r\n this._onClose(true);\r\n else\r\n this.props.onEnter && this.props.onEnter();\r\n } else {\r\n this._onClose(false);\r\n }\r\n }\r\n };\r\n\r\n private _resize = () => {\r\n if (this.props.repositionOnResize) {\r\n const position = this._toggleRelativePosition();\r\n const point = this._fitPopup(this._getPosition(position));\r\n this.setState({ left: point.x, top: point.y, position });\r\n } else {\r\n this._hide(); // legacy behavior\r\n }\r\n };\r\n\r\n private _hide = () => {\r\n if (this.props.isPinned)\r\n return;\r\n\r\n this._onClose();\r\n };\r\n\r\n private _onShow() {\r\n this._bindWindowEvents();\r\n const position = this._toggleRelativePosition();\r\n const point = this._fitPopup(this._getPosition(position));\r\n\r\n this.setState({ left: point.x, top: point.y, isOpen: true, position }, () => {\r\n if (this.props.onOpen)\r\n this.props.onOpen();\r\n });\r\n }\r\n\r\n private _onClose(enterKey?: boolean) {\r\n if (!this.state.isOpen)\r\n return;\r\n\r\n this._unBindWindowEvents();\r\n\r\n this.setState({ isOpen: false }, () => {\r\n if (enterKey && this.props.onEnter)\r\n this.props.onEnter();\r\n if (this.props.onClose)\r\n this.props.onClose();\r\n });\r\n }\r\n\r\n private _isPositionAbsolute(): boolean {\r\n return (this.props.top !== -1 && this.props.left !== -1);\r\n }\r\n\r\n private _getClassNameByPosition(position: RelativePosition): string {\r\n if (!this._isPositionAbsolute()) {\r\n switch (position) {\r\n case RelativePosition.TopLeft:\r\n return \"core-popup-top-left\";\r\n case RelativePosition.TopRight:\r\n return \"core-popup-top-right\";\r\n case RelativePosition.BottomLeft:\r\n return \"core-popup-bottom-left\";\r\n case RelativePosition.BottomRight:\r\n return \"core-popup-bottom-right\";\r\n case RelativePosition.Top:\r\n return \"core-popup-top\";\r\n case RelativePosition.Left:\r\n return \"core-popup-left\";\r\n case RelativePosition.Right:\r\n return \"core-popup-right\";\r\n case RelativePosition.Bottom:\r\n return \"core-popup-bottom\";\r\n case RelativePosition.LeftTop:\r\n return \"core-popup-left-top\";\r\n case RelativePosition.RightTop:\r\n return \"core-popup-right-top\";\r\n }\r\n }\r\n\r\n return \"\";\r\n }\r\n\r\n private _getPopupDimensions(): { popupWidth: number, popupHeight: number } {\r\n let popupWidth = 0;\r\n let popupHeight = 0;\r\n // istanbul ignore else\r\n if (this._popup) {\r\n const activeWindow = this.getParentWindow();\r\n const style = activeWindow.getComputedStyle(this._popup);\r\n const borderLeftWidth = parsePxString(style.borderLeftWidth);\r\n const borderRightWidth = parsePxString(style.borderRightWidth);\r\n const borderTopWidth = parsePxString(style.borderTopWidth);\r\n const borderBottomWidth = parsePxString(style.borderBottomWidth);\r\n popupWidth = this._popup.clientWidth + borderLeftWidth + borderRightWidth;\r\n popupHeight = this._popup.clientHeight + borderTopWidth + borderBottomWidth;\r\n }\r\n\r\n return { popupWidth, popupHeight };\r\n }\r\n\r\n private _getPosition = (position: RelativePosition) => {\r\n const activeWindow = this.getParentWindow();\r\n const { target, offset, top, left } = this.props;\r\n const offsetArrow = (this.props.showArrow) ? 6 : 0;\r\n\r\n // absolute position\r\n if (this._isPositionAbsolute())\r\n return { x: left, y: top };\r\n\r\n // sanity check\r\n const point = { x: 0, y: 0 };\r\n if (!this._popup || !target)\r\n return point;\r\n\r\n // relative position\r\n const scrollY = activeWindow.scrollY;\r\n const scrollX = activeWindow.scrollX;\r\n\r\n const targetRect = target.getBoundingClientRect();\r\n\r\n const { popupWidth, popupHeight } = this._getPopupDimensions();\r\n\r\n switch (position) {\r\n case RelativePosition.Top:\r\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\r\n point.x = scrollX + targetRect.left + (targetRect.width / 2) - (popupWidth / 2);\r\n break;\r\n\r\n case RelativePosition.TopLeft:\r\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\r\n point.x = scrollX + targetRect.left;\r\n break;\r\n\r\n case RelativePosition.TopRight:\r\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\r\n point.x = scrollX + targetRect.right - popupWidth;\r\n break;\r\n\r\n case RelativePosition.Bottom:\r\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\r\n point.x = scrollX + targetRect.left + (targetRect.width / 2) - (popupWidth / 2);\r\n break;\r\n\r\n case RelativePosition.BottomLeft:\r\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\r\n point.x = scrollX + targetRect.left;\r\n break;\r\n\r\n case RelativePosition.BottomRight:\r\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\r\n point.x = scrollX + targetRect.right - popupWidth;\r\n break;\r\n\r\n case RelativePosition.Left:\r\n point.y = scrollY + targetRect.top + (targetRect.height / 2) - (popupHeight / 2);\r\n point.x = scrollX + targetRect.left - popupWidth - offset - offsetArrow;\r\n break;\r\n\r\n case RelativePosition.LeftTop:\r\n point.y = scrollY + targetRect.top;\r\n point.x = scrollX + targetRect.left - popupWidth - offset - offsetArrow;\r\n break;\r\n\r\n case RelativePosition.Right:\r\n point.y = scrollY + targetRect.top + (targetRect.height / 2) - (popupHeight / 2);\r\n point.x = scrollX + targetRect.right + offset + offsetArrow;\r\n break;\r\n\r\n case RelativePosition.RightTop:\r\n point.y = scrollY + targetRect.top;\r\n point.x = scrollX + targetRect.right + offset + offsetArrow;\r\n break;\r\n }\r\n\r\n return point;\r\n };\r\n\r\n private _toggleRelativePosition(): RelativePosition {\r\n const { target, position, offset } = this.props;\r\n\r\n if (!this._popup || !target)\r\n return position;\r\n\r\n // istanbul ignore if\r\n if (this._isPositionAbsolute())\r\n return position;\r\n\r\n let newPosition = position;\r\n\r\n interface Rect {\r\n left: number;\r\n top: number;\r\n right: number;\r\n bottom: number;\r\n }\r\n\r\n const activeWindow = this.getParentWindow();\r\n\r\n // Note: Cannot use DOMRect yet since it's experimental and not available in all browsers (Nov. 2018)\r\n const viewportRect: Rect = { left: activeWindow.scrollX, top: activeWindow.scrollY, right: activeWindow.scrollX + activeWindow.innerWidth, bottom: activeWindow.scrollY + activeWindow.innerHeight };\r\n const targetRect = target.getBoundingClientRect();\r\n const { popupWidth, popupHeight } = this._getPopupDimensions();\r\n const containerStyle = activeWindow.getComputedStyle(target);\r\n const offsetArrow = this.props.showArrow ? /* istanbul ignore next */ 10 : 2;\r\n\r\n const bottomMargin = parseMargin(containerStyle.marginBottom);\r\n if ((targetRect.bottom + popupHeight + bottomMargin + offsetArrow + offset) > viewportRect.bottom) {\r\n if (newPosition === RelativePosition.Bottom)\r\n newPosition = RelativePosition.Top;\r\n else if (newPosition === RelativePosition.BottomLeft)\r\n newPosition = RelativePosition.TopLeft;\r\n else if (newPosition === RelativePosition.BottomRight)\r\n newPosition = RelativePosition.TopRight;\r\n }\r\n\r\n const topMargin = parseMargin(containerStyle.marginTop);\r\n if ((targetRect.top - popupHeight - topMargin - offsetArrow - offset) < viewportRect.top) {\r\n if (newPosition === RelativePosition.Top)\r\n newPosition = RelativePosition.Bottom;\r\n else if (newPosition === RelativePosition.TopLeft)\r\n newPosition = RelativePosition.BottomLeft;\r\n else if (newPosition === RelativePosition.TopRight)\r\n newPosition = RelativePosition.BottomRight;\r\n }\r\n\r\n const leftMargin = parseMargin(containerStyle.marginLeft);\r\n if ((targetRect.left - popupWidth - leftMargin - offsetArrow - offset) < viewportRect.left) {\r\n if (newPosition === RelativePosition.Left)\r\n newPosition = RelativePosition.Right;\r\n else if (newPosition === RelativePosition.LeftTop)\r\n newPosition = RelativePosition.RightTop;\r\n }\r\n\r\n const rightMargin = parseMargin(containerStyle.marginRight);\r\n if ((targetRect.right + popupWidth + rightMargin + offsetArrow + offset) > viewportRect.right) {\r\n if (newPosition === RelativePosition.Right)\r\n newPosition = RelativePosition.Left;\r\n else if (newPosition === RelativePosition.RightTop)\r\n newPosition = RelativePosition.LeftTop;\r\n }\r\n\r\n return newPosition;\r\n }\r\n\r\n // fit the popup within the extents of the view port\r\n private _fitPopup = (point: PopupPoint) => {\r\n const fittedPoint = point;\r\n\r\n // istanbul ignore if\r\n if (!this._popup) {\r\n return fittedPoint;\r\n }\r\n\r\n // const popupRect = this._popup.getBoundingClientRect();\r\n const { popupWidth, popupHeight } = this._getPopupDimensions();\r\n const { innerWidth, innerHeight } = window;\r\n\r\n // istanbul ignore if\r\n if (fittedPoint.y + popupHeight > innerHeight) {\r\n fittedPoint.y = innerHeight - popupHeight;\r\n }\r\n\r\n // istanbul ignore if\r\n if (fittedPoint.x + popupWidth > innerWidth) {\r\n fittedPoint.x = innerWidth - popupWidth;\r\n }\r\n\r\n // istanbul ignore if\r\n if (fittedPoint.y < 0) {\r\n fittedPoint.y = 0;\r\n }\r\n\r\n if (fittedPoint.x < 0) {\r\n fittedPoint.x = 0;\r\n }\r\n\r\n return fittedPoint;\r\n };\r\n\r\n private _handleAnimationEnd = (event: React.AnimationEvent<HTMLDivElement>) => {\r\n if (event.target === this._popup) {\r\n this.setState({ animationEnded: true });\r\n }\r\n };\r\n\r\n public override render() {\r\n const animate = this.props.animate !== undefined ? this.props.animate : true;\r\n const className = classnames(\r\n \"core-popup\",\r\n this._getClassNameByPosition(this.state.position),\r\n this.props.showShadow && \"core-popup-shadow\",\r\n this.props.showArrow && \"arrow\",\r\n !animate && \"core-popup-animation-none\",\r\n this.props.className,\r\n this.state.animationEnded && \"core-animation-ended\",\r\n (!this.props.isOpen && this.props.keepContentsMounted) && \"core-popup-hidden\"\r\n );\r\n\r\n const style: React.CSSProperties = {\r\n top: this.state.top,\r\n left: this.state.left,\r\n ...this.props.style,\r\n };\r\n\r\n const role = this.props.role ? this.props.role : \"dialog\"; // accessibility property\r\n\r\n if (!this.props.isOpen && !this.props.keepContentsMounted) {\r\n return null;\r\n }\r\n\r\n return ReactDOM.createPortal(\r\n (\r\n <div\r\n className={className} data-testid=\"core-popup\"\r\n ref={(element) => { this._popup = element; }}\r\n style={style}\r\n role={role}\r\n aria-modal={true}\r\n tabIndex={-1}\r\n aria-label={this.props.ariaLabel}\r\n onAnimationEnd={this._handleAnimationEnd}\r\n >\r\n <FocusTrap active={!!this.props.moveFocus} initialFocusElement={this.props.focusTarget} returnFocusOnDeactivate={true}>\r\n {this.props.children}\r\n </FocusTrap>\r\n </div>\r\n ),\r\n // istanbul ignore next\r\n this.state.parentDocument.body.querySelector(\r\n '[data-root-container=\"iui-root-id\"]'\r\n ) ?? this.state.parentDocument.body\r\n );\r\n }\r\n}\r\n\r\nfunction parsePxString(pxStr: string): number {\r\n const parsed = parseInt(pxStr, 10);\r\n return parsed || 0;\r\n}\r\n\r\nfunction parseMargin(value: string) {\r\n return value ? /* istanbul ignore next */ parseFloat(value) : 0;\r\n}\r\n"]}
1
+ {"version":3,"file":"Popup.js","sourceRoot":"","sources":["../../../../src/core-react/popup/Popup.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAE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AI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CACpC,CAAC;IACJ,CAAC;;AArea,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;SAzBS,KAAK;AAyflB,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,0BAA0B,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Popup\r\n */\r\n\r\nimport \"./Popup.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport { RelativePosition, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { FocusTrap } from \"../focustrap/FocusTrap\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n// cSpell:ignore focustrap focusable alertdialog\r\n\r\n/** @internal */\r\ninterface PopupPoint {\r\n x: number;\r\n y: number;\r\n}\r\n\r\n/** Properties for the [[Popup]] component\r\n * @public\r\n */\r\nexport interface PopupProps extends CommonProps {\r\n /** Show or hide the box shadow (defaults to true) */\r\n showShadow: boolean;\r\n /** Show or hide the arrow (defaults to false) */\r\n showArrow: boolean;\r\n /** Indicates whether the popup is shown or not (defaults to false) */\r\n isOpen: boolean;\r\n /** Direction (relative to the target) to which the popup is expanded (defaults to Bottom) */\r\n position: RelativePosition;\r\n /** Top position (absolute positioning - defaults to 0) */\r\n top: number;\r\n /** Left position (absolute positioning - defaults to 0) */\r\n left: number;\r\n /** Function called when the popup is opened */\r\n onOpen?: () => void;\r\n /** Function called when user clicks outside the popup */\r\n onOutsideClick?: (e: MouseEvent) => void;\r\n /** Function called when the popup is closed */\r\n onClose?: () => void;\r\n /** Function called when the popup is closed on Enter */\r\n onEnter?: () => void;\r\n /** Function called when the wheel is used */\r\n onWheel?: (e: WheelEvent) => void;\r\n /** Function called when the right mouse button is pressed */\r\n onContextMenu?: (e: MouseEvent) => void;\r\n /** Offset from the parent (defaults to 4) */\r\n offset: number;\r\n /** Target element to position popup */\r\n target?: HTMLElement | null;\r\n /** Role - if not specified \"dialog\" is used */\r\n role?: \"dialog\" | \"alert\" | \"alertdialog\";\r\n /** accessibility label */\r\n ariaLabel?: string;\r\n /** set focus to popup - default to not set focus */\r\n moveFocus?: boolean;\r\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. */\r\n focusTarget?: React.RefObject<HTMLElement> | string;\r\n /** Indicates whether the popup is pinned. */\r\n isPinned?: boolean;\r\n /** Indicates whether to use animation for open/close (defaults to true) */\r\n animate?: boolean;\r\n /** Indicates whether to close the popup when Enter is pressed (defaults to true) */\r\n closeOnEnter?: boolean;\r\n /** Indicates whether to close the popup when the wheel is used (defaults to true) */\r\n closeOnWheel?: boolean;\r\n /** Indicates whether to close the popup when the right mouse button is pressed (defaults to true) */\r\n closeOnContextMenu?: boolean;\r\n /** If false outside click processing and closing are skipped if click occurs in another Popup component, default to false. */\r\n closeOnNestedPopupOutsideClick?: boolean;\r\n /** If true the children are mounted once and unmounted when this component is unmounted. If false the\r\n * children are unmounted each time the popup is closed. */\r\n keepContentsMounted?: boolean;\r\n\r\n /**\r\n * If true the popup will remain open and will be repositioned when window resize events occur, default to false.\r\n * @beta\r\n * */\r\n repositionOnResize?: boolean;\r\n\r\n /** Content */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/** @internal */\r\ninterface PopupState {\r\n isOpen: boolean;\r\n top: number;\r\n left: number;\r\n position: RelativePosition;\r\n parentDocument: Document;\r\n animationEnded: boolean;\r\n}\r\n\r\n/** Popup React component displays a popup relative to an optional target element.\r\n * @public\r\n */\r\nexport class Popup extends React.Component<PopupProps, PopupState> {\r\n private _popup: HTMLElement | null = null;\r\n\r\n constructor(props: PopupProps) {\r\n super(props);\r\n const parentDocument = this.props.target?.ownerDocument ?? document;\r\n\r\n this.state = {\r\n animationEnded: false,\r\n isOpen: this.props.isOpen,\r\n top: 0,\r\n left: 0,\r\n position: this.props.position,\r\n parentDocument,\r\n };\r\n }\r\n\r\n public static defaultProps: Partial<PopupProps> = {\r\n position: RelativePosition.Bottom,\r\n showShadow: true,\r\n showArrow: false,\r\n isOpen: false,\r\n offset: 4,\r\n top: -1,\r\n left: -1,\r\n };\r\n\r\n public override componentDidMount() {\r\n if (this.props.isOpen) {\r\n this._onShow();\r\n }\r\n }\r\n\r\n private getParentWindow() {\r\n // istanbul ignore next\r\n return this.state.parentDocument.defaultView ?? window;\r\n }\r\n\r\n public override componentDidUpdate(previousProps: PopupProps, prevState: PopupState) {\r\n if (this.state.position !== prevState.position) {\r\n this.setState( { animationEnded: false });\r\n }\r\n\r\n if (this.props.target !== previousProps.target) {\r\n // istanbul ignore next\r\n {\r\n const parentDocument = this.props.target?.ownerDocument ?? document;\r\n if (parentDocument !== this.state.parentDocument) {\r\n this._unBindWindowEvents();\r\n this.setState({ parentDocument });\r\n }\r\n }\r\n }\r\n\r\n if (this.props.isOpen === previousProps.isOpen) {\r\n if (this.props.isOpen) {\r\n const position = this._toggleRelativePosition();\r\n const point = this._fitPopup(this._getPosition(position));\r\n if ((Math.abs(this.state.left - point.x) < 3) &&\r\n (Math.abs(this.state.top - point.y) < 3) &&\r\n this.state.position === position)\r\n return;\r\n\r\n this.setState({\r\n left: point.x,\r\n top: point.y,\r\n position,\r\n });\r\n }\r\n return;\r\n }\r\n\r\n if (this.props.isOpen) {\r\n this._onShow();\r\n } else {\r\n this._onClose();\r\n }\r\n }\r\n\r\n public override componentWillUnmount() {\r\n this._unBindWindowEvents();\r\n }\r\n\r\n private _bindWindowEvents = () => {\r\n const activeWindow = this.getParentWindow();\r\n activeWindow.addEventListener(\"pointerdown\", this._handleOutsideClick);\r\n activeWindow.addEventListener(\"resize\", this._resize);\r\n activeWindow.addEventListener(\"contextmenu\", this._handleContextMenu);\r\n activeWindow.addEventListener(\"scroll\", this._hide);\r\n activeWindow.addEventListener(\"wheel\", this._handleWheel);\r\n activeWindow.addEventListener(\"keydown\", this._handleKeyboard);\r\n };\r\n\r\n private _unBindWindowEvents = () => {\r\n const activeWindow = this.getParentWindow();\r\n activeWindow.removeEventListener(\"pointerdown\", this._handleOutsideClick);\r\n activeWindow.removeEventListener(\"resize\", this._resize);\r\n activeWindow.removeEventListener(\"contextmenu\", this._handleContextMenu);\r\n activeWindow.removeEventListener(\"scroll\", this._hide);\r\n activeWindow.removeEventListener(\"wheel\", this._handleWheel);\r\n activeWindow.removeEventListener(\"keydown\", this._handleKeyboard);\r\n };\r\n\r\n private _handleWheel = (event: WheelEvent) => {\r\n if (this._popup && this._popup.contains(event.target as Node))\r\n return;\r\n\r\n if (this.props.onWheel)\r\n return this.props.onWheel(event);\r\n\r\n const closeOnWheel = this.props.closeOnWheel !== undefined ? this.props.closeOnWheel : true;\r\n if (closeOnWheel)\r\n this._hide();\r\n };\r\n\r\n private isInCorePopup(element: HTMLElement): boolean {\r\n if (element.nodeName === \"DIV\") {\r\n if (element.classList && element.classList.contains(\"core-popup\"))\r\n return true;\r\n if (element.parentElement && this.isInCorePopup(element.parentElement))\r\n return true;\r\n } else {\r\n // istanbul ignore else\r\n if (element.parentElement && this.isInCorePopup(element.parentElement))\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n private _handleOutsideClick = (event: MouseEvent): void => {\r\n if (this._popup && this._popup.contains(event.target as Node))\r\n return;\r\n\r\n if (this.props.isPinned)\r\n return;\r\n\r\n if (!this.props.closeOnNestedPopupOutsideClick && this.isInCorePopup(event.target as HTMLElement))\r\n return;\r\n\r\n if (this.props.onOutsideClick)\r\n return this.props.onOutsideClick(event);\r\n\r\n if (this.props.target && this.props.target.contains(event.target as Node))\r\n return;\r\n\r\n this._onClose();\r\n };\r\n\r\n private _handleContextMenu = (event: MouseEvent) => {\r\n if (this._popup && this._popup.contains(event.target as Node))\r\n return;\r\n\r\n if (this.props.onContextMenu)\r\n return this.props.onContextMenu(event);\r\n\r\n const closeOnContextMenu = this.props.closeOnContextMenu !== undefined ? this.props.closeOnContextMenu : true;\r\n if (closeOnContextMenu)\r\n this._hide();\r\n };\r\n\r\n private _handleKeyboard = (event: KeyboardEvent): void => {\r\n if (this.props.isPinned)\r\n return;\r\n\r\n if (event.key === SpecialKey.Escape || event.key === SpecialKey.Enter) {\r\n const closeOnEnter = this.props.closeOnEnter !== undefined ? this.props.closeOnEnter : true;\r\n if (event.key === SpecialKey.Enter) {\r\n if (closeOnEnter)\r\n this._onClose(true);\r\n else\r\n this.props.onEnter && this.props.onEnter();\r\n } else {\r\n this._onClose(false);\r\n }\r\n }\r\n };\r\n\r\n private _resize = () => {\r\n if (this.props.repositionOnResize) {\r\n const position = this._toggleRelativePosition();\r\n const point = this._fitPopup(this._getPosition(position));\r\n this.setState({ left: point.x, top: point.y, position });\r\n } else {\r\n this._hide(); // legacy behavior\r\n }\r\n };\r\n\r\n private _hide = () => {\r\n if (this.props.isPinned)\r\n return;\r\n\r\n this._onClose();\r\n };\r\n\r\n private _onShow() {\r\n this._bindWindowEvents();\r\n const position = this._toggleRelativePosition();\r\n const point = this._fitPopup(this._getPosition(position));\r\n\r\n this.setState({ left: point.x, top: point.y, isOpen: true, position }, () => {\r\n if (this.props.onOpen)\r\n this.props.onOpen();\r\n });\r\n }\r\n\r\n private _onClose(enterKey?: boolean) {\r\n if (!this.state.isOpen)\r\n return;\r\n\r\n this._unBindWindowEvents();\r\n\r\n this.setState({ isOpen: false }, () => {\r\n if (enterKey && this.props.onEnter)\r\n this.props.onEnter();\r\n if (this.props.onClose)\r\n this.props.onClose();\r\n });\r\n }\r\n\r\n private _isPositionAbsolute(): boolean {\r\n return (this.props.top !== -1 && this.props.left !== -1);\r\n }\r\n\r\n private _getClassNameByPosition(position: RelativePosition): string {\r\n if (!this._isPositionAbsolute()) {\r\n switch (position) {\r\n case RelativePosition.TopLeft:\r\n return \"core-popup-top-left\";\r\n case RelativePosition.TopRight:\r\n return \"core-popup-top-right\";\r\n case RelativePosition.BottomLeft:\r\n return \"core-popup-bottom-left\";\r\n case RelativePosition.BottomRight:\r\n return \"core-popup-bottom-right\";\r\n case RelativePosition.Top:\r\n return \"core-popup-top\";\r\n case RelativePosition.Left:\r\n return \"core-popup-left\";\r\n case RelativePosition.Right:\r\n return \"core-popup-right\";\r\n case RelativePosition.Bottom:\r\n return \"core-popup-bottom\";\r\n case RelativePosition.LeftTop:\r\n return \"core-popup-left-top\";\r\n case RelativePosition.RightTop:\r\n return \"core-popup-right-top\";\r\n }\r\n }\r\n\r\n return \"\";\r\n }\r\n\r\n private _getPopupDimensions(): { popupWidth: number, popupHeight: number } {\r\n let popupWidth = 0;\r\n let popupHeight = 0;\r\n // istanbul ignore else\r\n if (this._popup) {\r\n const activeWindow = this.getParentWindow();\r\n const style = activeWindow.getComputedStyle(this._popup);\r\n const borderLeftWidth = parsePxString(style.borderLeftWidth);\r\n const borderRightWidth = parsePxString(style.borderRightWidth);\r\n const borderTopWidth = parsePxString(style.borderTopWidth);\r\n const borderBottomWidth = parsePxString(style.borderBottomWidth);\r\n popupWidth = this._popup.clientWidth + borderLeftWidth + borderRightWidth;\r\n popupHeight = this._popup.clientHeight + borderTopWidth + borderBottomWidth;\r\n }\r\n\r\n return { popupWidth, popupHeight };\r\n }\r\n\r\n private _getPosition = (position: RelativePosition) => {\r\n const activeWindow = this.getParentWindow();\r\n const { target, offset, top, left } = this.props;\r\n const offsetArrow = (this.props.showArrow) ? 6 : 0;\r\n\r\n // absolute position\r\n if (this._isPositionAbsolute())\r\n return { x: left, y: top };\r\n\r\n // sanity check\r\n const point = { x: 0, y: 0 };\r\n if (!this._popup || !target)\r\n return point;\r\n\r\n // relative position\r\n const scrollY = activeWindow.scrollY;\r\n const scrollX = activeWindow.scrollX;\r\n\r\n const targetRect = target.getBoundingClientRect();\r\n\r\n const { popupWidth, popupHeight } = this._getPopupDimensions();\r\n\r\n switch (position) {\r\n case RelativePosition.Top:\r\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\r\n point.x = scrollX + targetRect.left + (targetRect.width / 2) - (popupWidth / 2);\r\n break;\r\n\r\n case RelativePosition.TopLeft:\r\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\r\n point.x = scrollX + targetRect.left;\r\n break;\r\n\r\n case RelativePosition.TopRight:\r\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\r\n point.x = scrollX + targetRect.right - popupWidth;\r\n break;\r\n\r\n case RelativePosition.Bottom:\r\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\r\n point.x = scrollX + targetRect.left + (targetRect.width / 2) - (popupWidth / 2);\r\n break;\r\n\r\n case RelativePosition.BottomLeft:\r\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\r\n point.x = scrollX + targetRect.left;\r\n break;\r\n\r\n case RelativePosition.BottomRight:\r\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\r\n point.x = scrollX + targetRect.right - popupWidth;\r\n break;\r\n\r\n case RelativePosition.Left:\r\n point.y = scrollY + targetRect.top + (targetRect.height / 2) - (popupHeight / 2);\r\n point.x = scrollX + targetRect.left - popupWidth - offset - offsetArrow;\r\n break;\r\n\r\n case RelativePosition.LeftTop:\r\n point.y = scrollY + targetRect.top;\r\n point.x = scrollX + targetRect.left - popupWidth - offset - offsetArrow;\r\n break;\r\n\r\n case RelativePosition.Right:\r\n point.y = scrollY + targetRect.top + (targetRect.height / 2) - (popupHeight / 2);\r\n point.x = scrollX + targetRect.right + offset + offsetArrow;\r\n break;\r\n\r\n case RelativePosition.RightTop:\r\n point.y = scrollY + targetRect.top;\r\n point.x = scrollX + targetRect.right + offset + offsetArrow;\r\n break;\r\n }\r\n\r\n return point;\r\n };\r\n\r\n private _toggleRelativePosition(): RelativePosition {\r\n const { target, position, offset } = this.props;\r\n\r\n if (!this._popup || !target)\r\n return position;\r\n\r\n // istanbul ignore if\r\n if (this._isPositionAbsolute())\r\n return position;\r\n\r\n let newPosition = position;\r\n\r\n interface Rect {\r\n left: number;\r\n top: number;\r\n right: number;\r\n bottom: number;\r\n }\r\n\r\n const activeWindow = this.getParentWindow();\r\n\r\n // Note: Cannot use DOMRect yet since it's experimental and not available in all browsers (Nov. 2018)\r\n const viewportRect: Rect = { left: activeWindow.scrollX, top: activeWindow.scrollY, right: activeWindow.scrollX + activeWindow.innerWidth, bottom: activeWindow.scrollY + activeWindow.innerHeight };\r\n const targetRect = target.getBoundingClientRect();\r\n const { popupWidth, popupHeight } = this._getPopupDimensions();\r\n const containerStyle = activeWindow.getComputedStyle(target);\r\n const offsetArrow = this.props.showArrow ? /* istanbul ignore next */ 10 : 2;\r\n\r\n const bottomMargin = parseMargin(containerStyle.marginBottom);\r\n if ((targetRect.bottom + popupHeight + bottomMargin + offsetArrow + offset) > viewportRect.bottom) {\r\n if (newPosition === RelativePosition.Bottom)\r\n newPosition = RelativePosition.Top;\r\n else if (newPosition === RelativePosition.BottomLeft)\r\n newPosition = RelativePosition.TopLeft;\r\n else if (newPosition === RelativePosition.BottomRight)\r\n newPosition = RelativePosition.TopRight;\r\n }\r\n\r\n const topMargin = parseMargin(containerStyle.marginTop);\r\n if ((targetRect.top - popupHeight - topMargin - offsetArrow - offset) < viewportRect.top) {\r\n if (newPosition === RelativePosition.Top)\r\n newPosition = RelativePosition.Bottom;\r\n else if (newPosition === RelativePosition.TopLeft)\r\n newPosition = RelativePosition.BottomLeft;\r\n else if (newPosition === RelativePosition.TopRight)\r\n newPosition = RelativePosition.BottomRight;\r\n }\r\n\r\n const leftMargin = parseMargin(containerStyle.marginLeft);\r\n if ((targetRect.left - popupWidth - leftMargin - offsetArrow - offset) < viewportRect.left) {\r\n if (newPosition === RelativePosition.Left)\r\n newPosition = RelativePosition.Right;\r\n else if (newPosition === RelativePosition.LeftTop)\r\n newPosition = RelativePosition.RightTop;\r\n }\r\n\r\n const rightMargin = parseMargin(containerStyle.marginRight);\r\n if ((targetRect.right + popupWidth + rightMargin + offsetArrow + offset) > viewportRect.right) {\r\n if (newPosition === RelativePosition.Right)\r\n newPosition = RelativePosition.Left;\r\n else if (newPosition === RelativePosition.RightTop)\r\n newPosition = RelativePosition.LeftTop;\r\n }\r\n\r\n return newPosition;\r\n }\r\n\r\n // fit the popup within the extents of the view port\r\n private _fitPopup = (point: PopupPoint) => {\r\n const fittedPoint = point;\r\n\r\n // istanbul ignore if\r\n if (!this._popup) {\r\n return fittedPoint;\r\n }\r\n\r\n // const popupRect = this._popup.getBoundingClientRect();\r\n const { popupWidth, popupHeight } = this._getPopupDimensions();\r\n const { innerWidth, innerHeight } = window;\r\n\r\n // istanbul ignore if\r\n if (fittedPoint.y + popupHeight > innerHeight) {\r\n fittedPoint.y = innerHeight - popupHeight;\r\n }\r\n\r\n // istanbul ignore if\r\n if (fittedPoint.x + popupWidth > innerWidth) {\r\n fittedPoint.x = innerWidth - popupWidth;\r\n }\r\n\r\n // istanbul ignore if\r\n if (fittedPoint.y < 0) {\r\n fittedPoint.y = 0;\r\n }\r\n\r\n if (fittedPoint.x < 0) {\r\n fittedPoint.x = 0;\r\n }\r\n\r\n return fittedPoint;\r\n };\r\n\r\n private _handleAnimationEnd = (event: React.AnimationEvent<HTMLDivElement>) => {\r\n if (event.target === this._popup) {\r\n this.setState({ animationEnded: true });\r\n }\r\n };\r\n\r\n public override render() {\r\n const animate = this.props.animate !== undefined ? this.props.animate : true;\r\n const className = classnames(\r\n \"core-popup\",\r\n this._getClassNameByPosition(this.state.position),\r\n this.props.showShadow && \"core-popup-shadow\",\r\n this.props.showArrow && \"arrow\",\r\n !animate && \"core-popup-animation-none\",\r\n this.props.className,\r\n this.state.animationEnded && \"core-animation-ended\",\r\n (!this.props.isOpen && this.props.keepContentsMounted) && \"core-popup-hidden\"\r\n );\r\n\r\n const style: React.CSSProperties = {\r\n top: this.state.top,\r\n left: this.state.left,\r\n ...this.props.style,\r\n };\r\n\r\n const role = this.props.role ? this.props.role : \"dialog\"; // accessibility property\r\n\r\n if (!this.props.isOpen && !this.props.keepContentsMounted) {\r\n return null;\r\n }\r\n\r\n return ReactDOM.createPortal(\r\n (\r\n <div\r\n className={className} data-testid=\"core-popup\"\r\n ref={(element) => { this._popup = element; }}\r\n style={style}\r\n role={role}\r\n aria-modal={true}\r\n tabIndex={-1}\r\n aria-label={this.props.ariaLabel}\r\n onAnimationEnd={this._handleAnimationEnd}\r\n >\r\n <FocusTrap active={!!this.props.moveFocus} initialFocusElement={this.props.focusTarget} returnFocusOnDeactivate={true}>\r\n {this.props.children}\r\n </FocusTrap>\r\n </div>\r\n ),\r\n // istanbul ignore next\r\n this.state.parentDocument.body.querySelector(\r\n '[data-root-container=\"iui-root-id\"]'\r\n ) ?? this.state.parentDocument.body\r\n );\r\n }\r\n}\r\n\r\nfunction parsePxString(pxStr: string): number {\r\n const parsed = parseInt(pxStr, 10);\r\n return parsed || 0;\r\n}\r\n\r\nfunction parseMargin(value: string) {\r\n return value ? /* istanbul ignore next */ parseFloat(value) : 0;\r\n}\r\n"]}
@@ -1,55 +1,55 @@
1
- /** @packageDocumentation
2
- * @module RadialMenu
3
- */
4
- import { Point } from "../utils/Point";
5
- /**
6
- * 2D Line consisting of a start point, and an end point
7
- * @internal
8
- */
9
- export declare class Line {
10
- p1: Point;
11
- p2: Point;
12
- constructor(p1?: Point, p2?: Point);
13
- /** checks for equality with the components of this, and line parameter */
14
- equals: (line: Line) => boolean;
15
- }
16
- /** @internal
17
- * 2D Circle
18
- */
19
- export declare class Circle {
20
- center: Point;
21
- radius: number;
22
- constructor(center?: Point, radius?: number);
23
- }
24
- /** @internal
25
- * 2D Annulus (2D doughnut shape/flattened torus) defined by an inner and outer circle with a shared center point.
26
- */
27
- export declare class Annulus {
28
- center: Point;
29
- inner: Circle;
30
- outer: Circle;
31
- constructor(center?: Point, innerRadius?: number, outerRadius?: number);
32
- }
33
- /** @internal
34
- * 2D Sector of an Annulus, defined by both a parent annulus, a startAngle, and an endAngle.
35
- */
36
- export declare class AnnularSector {
37
- parent: Annulus;
38
- startAngle: number;
39
- endAngle: number;
40
- path: string;
41
- innerStart: Point;
42
- outerStart: Point;
43
- start: Line;
44
- innerEnd: Point;
45
- outerEnd: Point;
46
- end: Line;
47
- /**
48
- * initialize AnnularSector on parent annulus, and generate SVG Path to store in this.path
49
- * @param parent parent annulus to initialize sector on.
50
- * @param startAngle angle to begin the annular sector on.
51
- * @param endAngle angle to end the annular sector on.
52
- */
53
- constructor(parent: Annulus, startAngle: number, endAngle: number);
54
- }
1
+ /** @packageDocumentation
2
+ * @module RadialMenu
3
+ */
4
+ import { Point } from "../utils/Point";
5
+ /**
6
+ * 2D Line consisting of a start point, and an end point
7
+ * @internal
8
+ */
9
+ export declare class Line {
10
+ p1: Point;
11
+ p2: Point;
12
+ constructor(p1?: Point, p2?: Point);
13
+ /** checks for equality with the components of this, and line parameter */
14
+ equals: (line: Line) => boolean;
15
+ }
16
+ /** @internal
17
+ * 2D Circle
18
+ */
19
+ export declare class Circle {
20
+ center: Point;
21
+ radius: number;
22
+ constructor(center?: Point, radius?: number);
23
+ }
24
+ /** @internal
25
+ * 2D Annulus (2D doughnut shape/flattened torus) defined by an inner and outer circle with a shared center point.
26
+ */
27
+ export declare class Annulus {
28
+ center: Point;
29
+ inner: Circle;
30
+ outer: Circle;
31
+ constructor(center?: Point, innerRadius?: number, outerRadius?: number);
32
+ }
33
+ /** @internal
34
+ * 2D Sector of an Annulus, defined by both a parent annulus, a startAngle, and an endAngle.
35
+ */
36
+ export declare class AnnularSector {
37
+ parent: Annulus;
38
+ startAngle: number;
39
+ endAngle: number;
40
+ path: string;
41
+ innerStart: Point;
42
+ outerStart: Point;
43
+ start: Line;
44
+ innerEnd: Point;
45
+ outerEnd: Point;
46
+ end: Line;
47
+ /**
48
+ * initialize AnnularSector on parent annulus, and generate SVG Path to store in this.path
49
+ * @param parent parent annulus to initialize sector on.
50
+ * @param startAngle angle to begin the annular sector on.
51
+ * @param endAngle angle to end the annular sector on.
52
+ */
53
+ constructor(parent: Annulus, startAngle: number, endAngle: number);
54
+ }
55
55
  //# sourceMappingURL=Annulus.d.ts.map
@@ -1,76 +1,76 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- /** @packageDocumentation
6
- * @module RadialMenu
7
- */
8
- import { Point } from "../utils/Point";
9
- /**
10
- * 2D Line consisting of a start point, and an end point
11
- * @internal
12
- */
13
- export class Line {
14
- constructor(p1, p2) {
15
- /** checks for equality with the components of this, and line parameter */
16
- this.equals = (line) => this.p1.equals(line.p1) && this.p2.equals(line.p2);
17
- this.p1 = p1 || new Point();
18
- this.p2 = p2 || new Point();
19
- }
20
- }
21
- /** @internal
22
- * 2D Circle
23
- */
24
- export class Circle {
25
- constructor(center, radius) {
26
- this.center = center || new Point();
27
- this.radius = radius || 0;
28
- }
29
- }
30
- /** @internal
31
- * 2D Annulus (2D doughnut shape/flattened torus) defined by an inner and outer circle with a shared center point.
32
- */
33
- export class Annulus {
34
- constructor(center, innerRadius, outerRadius) {
35
- this.center = center || new Point();
36
- this.inner = new Circle(center, innerRadius);
37
- this.outer = new Circle(center, outerRadius);
38
- }
39
- }
40
- /** @internal
41
- * 2D Sector of an Annulus, defined by both a parent annulus, a startAngle, and an endAngle.
42
- */
43
- export class AnnularSector {
44
- /**
45
- * initialize AnnularSector on parent annulus, and generate SVG Path to store in this.path
46
- * @param parent parent annulus to initialize sector on.
47
- * @param startAngle angle to begin the annular sector on.
48
- * @param endAngle angle to end the annular sector on.
49
- */
50
- constructor(parent, startAngle, endAngle) {
51
- this.parent = parent;
52
- this.startAngle = startAngle;
53
- this.endAngle = endAngle;
54
- // adapted from https://gist.github.com/buschtoens/4190516
55
- const { x: cx, y: cy } = parent.center;
56
- const inner = parent.inner.radius;
57
- const outer = parent.outer.radius;
58
- this.innerStart = new Point(cx + inner * Math.cos(startAngle), cy + inner * Math.sin(startAngle));
59
- this.outerStart = new Point(cx + outer * Math.cos(startAngle), cy + outer * Math.sin(startAngle));
60
- this.start = new Line(this.innerStart, this.outerStart);
61
- this.outerEnd = new Point(cx + outer * Math.cos(endAngle), cy + outer * Math.sin(endAngle));
62
- this.innerEnd = new Point(cx + inner * Math.cos(endAngle), cy + inner * Math.sin(endAngle));
63
- this.end = new Line(this.outerEnd, this.innerEnd);
64
- const angleDiff = endAngle - startAngle;
65
- const largeArc = (angleDiff % (Math.PI * 2)) > Math.PI ? /* istanbul ignore next */ 1 : 0;
66
- const sectorCommands = [];
67
- sectorCommands.push(`M${this.innerStart.x},${this.innerStart.y}`); // moveTo
68
- sectorCommands.push(`L${this.outerStart.x},${this.outerStart.y}`); // lineTo
69
- sectorCommands.push(`A${outer},${outer} 0 ${largeArc} 1 ${this.outerEnd.x},${this.outerEnd.y}`); // arcTo
70
- sectorCommands.push(`L${this.innerEnd.x},${this.innerEnd.y}`); // lineTo
71
- sectorCommands.push(`A${inner},${inner} 0 ${largeArc} 0 ${this.innerStart.x},${this.innerStart.y}`); // arcTo
72
- sectorCommands.push(`z`); // closePath
73
- this.path = sectorCommands.join(" ");
74
- }
75
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module RadialMenu
7
+ */
8
+ import { Point } from "../utils/Point";
9
+ /**
10
+ * 2D Line consisting of a start point, and an end point
11
+ * @internal
12
+ */
13
+ export class Line {
14
+ constructor(p1, p2) {
15
+ /** checks for equality with the components of this, and line parameter */
16
+ this.equals = (line) => this.p1.equals(line.p1) && this.p2.equals(line.p2);
17
+ this.p1 = p1 || new Point();
18
+ this.p2 = p2 || new Point();
19
+ }
20
+ }
21
+ /** @internal
22
+ * 2D Circle
23
+ */
24
+ export class Circle {
25
+ constructor(center, radius) {
26
+ this.center = center || new Point();
27
+ this.radius = radius || 0;
28
+ }
29
+ }
30
+ /** @internal
31
+ * 2D Annulus (2D doughnut shape/flattened torus) defined by an inner and outer circle with a shared center point.
32
+ */
33
+ export class Annulus {
34
+ constructor(center, innerRadius, outerRadius) {
35
+ this.center = center || new Point();
36
+ this.inner = new Circle(center, innerRadius);
37
+ this.outer = new Circle(center, outerRadius);
38
+ }
39
+ }
40
+ /** @internal
41
+ * 2D Sector of an Annulus, defined by both a parent annulus, a startAngle, and an endAngle.
42
+ */
43
+ export class AnnularSector {
44
+ /**
45
+ * initialize AnnularSector on parent annulus, and generate SVG Path to store in this.path
46
+ * @param parent parent annulus to initialize sector on.
47
+ * @param startAngle angle to begin the annular sector on.
48
+ * @param endAngle angle to end the annular sector on.
49
+ */
50
+ constructor(parent, startAngle, endAngle) {
51
+ this.parent = parent;
52
+ this.startAngle = startAngle;
53
+ this.endAngle = endAngle;
54
+ // adapted from https://gist.github.com/buschtoens/4190516
55
+ const { x: cx, y: cy } = parent.center;
56
+ const inner = parent.inner.radius;
57
+ const outer = parent.outer.radius;
58
+ this.innerStart = new Point(cx + inner * Math.cos(startAngle), cy + inner * Math.sin(startAngle));
59
+ this.outerStart = new Point(cx + outer * Math.cos(startAngle), cy + outer * Math.sin(startAngle));
60
+ this.start = new Line(this.innerStart, this.outerStart);
61
+ this.outerEnd = new Point(cx + outer * Math.cos(endAngle), cy + outer * Math.sin(endAngle));
62
+ this.innerEnd = new Point(cx + inner * Math.cos(endAngle), cy + inner * Math.sin(endAngle));
63
+ this.end = new Line(this.outerEnd, this.innerEnd);
64
+ const angleDiff = endAngle - startAngle;
65
+ const largeArc = (angleDiff % (Math.PI * 2)) > Math.PI ? /* istanbul ignore next */ 1 : 0;
66
+ const sectorCommands = [];
67
+ sectorCommands.push(`M${this.innerStart.x},${this.innerStart.y}`); // moveTo
68
+ sectorCommands.push(`L${this.outerStart.x},${this.outerStart.y}`); // lineTo
69
+ sectorCommands.push(`A${outer},${outer} 0 ${largeArc} 1 ${this.outerEnd.x},${this.outerEnd.y}`); // arcTo
70
+ sectorCommands.push(`L${this.innerEnd.x},${this.innerEnd.y}`); // lineTo
71
+ sectorCommands.push(`A${inner},${inner} 0 ${largeArc} 0 ${this.innerStart.x},${this.innerStart.y}`); // arcTo
72
+ sectorCommands.push(`z`); // closePath
73
+ this.path = sectorCommands.join(" ");
74
+ }
75
+ }
76
76
  //# sourceMappingURL=Annulus.js.map
@@ -1,98 +1,98 @@
1
- /** @packageDocumentation
2
- * @module RadialMenu
3
- */
4
- import "./RadialMenu.scss";
5
- import * as React from "react";
6
- import { IconSpec } from "../icons/IconComponent";
7
- import { CommonProps } from "../utils/Props";
8
- import { AnnularSector } from "./Annulus";
9
- /** Properties for [[RadialMenu]]
10
- * @public
11
- */
12
- export interface RadialMenuProps extends CommonProps {
13
- /** Whether to show RadialMenu */
14
- opened: boolean;
15
- /** Radius of inner portion of RadialMenu */
16
- innerRadius: number;
17
- /** Radius of outer portion of RadialMenu */
18
- outerRadius: number;
19
- /** Optional parameter to specify left position in viewport. */
20
- left?: number | string;
21
- /** Optional parameter to specify top position in viewport. */
22
- top?: number | string;
23
- /** Whether to rotate labels according to location on the RadialMenu, or to keep labels upright.
24
- * Default: false
25
- */
26
- labelRotate?: boolean;
27
- /** Which child RadialButton to highlight */
28
- selected?: number;
29
- /** triggered in case of onClick events anywhere other than radial menu */
30
- onBlur?: (event: any) => any;
31
- /** triggered onKeyUp for <Esc> key */
32
- onEsc?: (event: any) => any;
33
- /** Content */
34
- children?: React.ReactNode;
35
- }
36
- /** @internal */
37
- interface RadialMenuState {
38
- sectors: AnnularSector[];
39
- }
40
- /**
41
- * A context menu arranged in a radial layout.
42
- * @public
43
- */
44
- export declare class RadialMenu extends React.Component<RadialMenuProps, RadialMenuState> {
45
- private _root;
46
- private _selectedButton;
47
- static defaultProps: Partial<RadialMenuProps>;
48
- /** @internal */
49
- readonly state: Readonly<RadialMenuState>;
50
- constructor(props: RadialMenuProps);
51
- render(): JSX.Element;
52
- componentDidMount(): void;
53
- componentWillUnmount(): void;
54
- componentDidUpdate(prevProps: RadialMenuProps): void;
55
- private _handleKeyUp;
56
- private _handleClick;
57
- /** Manually call onSelect of highlighted button. */
58
- select: () => void;
59
- private _generateAnnularSectors;
60
- }
61
- /** Properties for [[RadialButton]] component
62
- * @public
63
- */
64
- export interface RadialButtonProps extends CommonProps {
65
- /** Whether label is rotated to radial menu. Default: Inherit */
66
- labelRotate?: boolean;
67
- /** which icon to display in on the menu button */
68
- icon?: IconSpec;
69
- /** @internal */
70
- annularSector?: AnnularSector;
71
- /** listens to any onClick event, or any select event, which can be triggered by the select() method. */
72
- onSelect?: (e: any) => any;
73
- /** Whether item is highlighted */
74
- selected?: boolean;
75
- /** Content */
76
- children?: React.ReactNode;
77
- }
78
- /** @internal */
79
- interface RadialButtonState {
80
- hover: boolean;
81
- }
82
- /**
83
- * Button for use within a [[RadialMenu]]
84
- * @public
85
- */
86
- export declare class RadialButton extends React.Component<RadialButtonProps, RadialButtonState> {
87
- /** @internal */
88
- readonly state: Readonly<RadialButtonState>;
89
- constructor(props: RadialButtonProps);
90
- render(): JSX.Element;
91
- /** Manually call this.props.onSelect */
92
- select: () => void;
93
- private _handleClick;
94
- private _handleMouseOver;
95
- private _handleMouseOut;
96
- }
97
- export {};
1
+ /** @packageDocumentation
2
+ * @module RadialMenu
3
+ */
4
+ import "./RadialMenu.scss";
5
+ import * as React from "react";
6
+ import { IconSpec } from "../icons/IconComponent";
7
+ import { CommonProps } from "../utils/Props";
8
+ import { AnnularSector } from "./Annulus";
9
+ /** Properties for [[RadialMenu]]
10
+ * @public
11
+ */
12
+ export interface RadialMenuProps extends CommonProps {
13
+ /** Whether to show RadialMenu */
14
+ opened: boolean;
15
+ /** Radius of inner portion of RadialMenu */
16
+ innerRadius: number;
17
+ /** Radius of outer portion of RadialMenu */
18
+ outerRadius: number;
19
+ /** Optional parameter to specify left position in viewport. */
20
+ left?: number | string;
21
+ /** Optional parameter to specify top position in viewport. */
22
+ top?: number | string;
23
+ /** Whether to rotate labels according to location on the RadialMenu, or to keep labels upright.
24
+ * Default: false
25
+ */
26
+ labelRotate?: boolean;
27
+ /** Which child RadialButton to highlight */
28
+ selected?: number;
29
+ /** triggered in case of onClick events anywhere other than radial menu */
30
+ onBlur?: (event: any) => any;
31
+ /** triggered onKeyUp for <Esc> key */
32
+ onEsc?: (event: any) => any;
33
+ /** Content */
34
+ children?: React.ReactNode;
35
+ }
36
+ /** @internal */
37
+ interface RadialMenuState {
38
+ sectors: AnnularSector[];
39
+ }
40
+ /**
41
+ * A context menu arranged in a radial layout.
42
+ * @public
43
+ */
44
+ export declare class RadialMenu extends React.Component<RadialMenuProps, RadialMenuState> {
45
+ private _root;
46
+ private _selectedButton;
47
+ static defaultProps: Partial<RadialMenuProps>;
48
+ /** @internal */
49
+ readonly state: Readonly<RadialMenuState>;
50
+ constructor(props: RadialMenuProps);
51
+ render(): JSX.Element;
52
+ componentDidMount(): void;
53
+ componentWillUnmount(): void;
54
+ componentDidUpdate(prevProps: RadialMenuProps): void;
55
+ private _handleKeyUp;
56
+ private _handleClick;
57
+ /** Manually call onSelect of highlighted button. */
58
+ select: () => void;
59
+ private _generateAnnularSectors;
60
+ }
61
+ /** Properties for [[RadialButton]] component
62
+ * @public
63
+ */
64
+ export interface RadialButtonProps extends CommonProps {
65
+ /** Whether label is rotated to radial menu. Default: Inherit */
66
+ labelRotate?: boolean;
67
+ /** which icon to display in on the menu button */
68
+ icon?: IconSpec;
69
+ /** @internal */
70
+ annularSector?: AnnularSector;
71
+ /** listens to any onClick event, or any select event, which can be triggered by the select() method. */
72
+ onSelect?: (e: any) => any;
73
+ /** Whether item is highlighted */
74
+ selected?: boolean;
75
+ /** Content */
76
+ children?: React.ReactNode;
77
+ }
78
+ /** @internal */
79
+ interface RadialButtonState {
80
+ hover: boolean;
81
+ }
82
+ /**
83
+ * Button for use within a [[RadialMenu]]
84
+ * @public
85
+ */
86
+ export declare class RadialButton extends React.Component<RadialButtonProps, RadialButtonState> {
87
+ /** @internal */
88
+ readonly state: Readonly<RadialButtonState>;
89
+ constructor(props: RadialButtonProps);
90
+ render(): JSX.Element;
91
+ /** Manually call this.props.onSelect */
92
+ select: () => void;
93
+ private _handleClick;
94
+ private _handleMouseOver;
95
+ private _handleMouseOut;
96
+ }
97
+ export {};
98
98
  //# sourceMappingURL=RadialMenu.d.ts.map