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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (385) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/lib/cjs/core-react/UiCore.js.map +1 -1
  3. package/lib/cjs/core-react/_geometry.scss +70 -70
  4. package/lib/cjs/core-react/_helpers.scss +51 -51
  5. package/lib/cjs/core-react/_math.scss +13 -13
  6. package/lib/cjs/core-react/_scrollbar.scss +51 -51
  7. package/lib/cjs/core-react/_typography.scss +44 -44
  8. package/lib/cjs/core-react/_z-index.scss +65 -65
  9. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  10. package/lib/cjs/core-react/autosuggest/AutoSuggest.scss +79 -79
  11. package/lib/cjs/core-react/badge/Badge.js.map +1 -1
  12. package/lib/cjs/core-react/badge/Badge.scss +13 -13
  13. package/lib/cjs/core-react/badge/BadgeUtilities.js.map +1 -1
  14. package/lib/cjs/core-react/badge/BetaBadge.js.map +1 -1
  15. package/lib/cjs/core-react/badge/NewBadge.js.map +1 -1
  16. package/lib/cjs/core-react/badge/NewBadge.scss +9 -9
  17. package/lib/cjs/core-react/base/Centered.js.map +1 -1
  18. package/lib/cjs/core-react/base/Div.js.map +1 -1
  19. package/lib/cjs/core-react/base/DivWithOutsideClick.js.map +1 -1
  20. package/lib/cjs/core-react/base/FillCentered.js.map +1 -1
  21. package/lib/cjs/core-react/base/FlexWrapContainer.js.map +1 -1
  22. package/lib/cjs/core-react/base/Gap.js.map +1 -1
  23. package/lib/cjs/core-react/base/PointerEvents.js.map +1 -1
  24. package/lib/cjs/core-react/base/ScrollView.js.map +1 -1
  25. package/lib/cjs/core-react/base/base.scss +42 -42
  26. package/lib/cjs/core-react/base/classes.scss +13 -13
  27. package/lib/cjs/core-react/base/index.scss +5 -5
  28. package/lib/cjs/core-react/button/UnderlinedButton.js.map +1 -1
  29. package/lib/cjs/core-react/button/UnderlinedButton.scss +32 -32
  30. package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
  31. package/lib/cjs/core-react/checklistbox/CheckListBox.scss +21 -21
  32. package/lib/cjs/core-react/classes.scss +11 -11
  33. package/lib/cjs/core-react/colorthemes.scss +61 -61
  34. package/lib/cjs/core-react/colorvariables.scss +131 -131
  35. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  36. package/lib/cjs/core-react/contextmenu/ContextMenu.scss +236 -236
  37. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
  38. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  39. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  40. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  41. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  42. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  43. package/lib/cjs/core-react/contextmenu/TildeFinder.js.map +1 -1
  44. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  45. package/lib/cjs/core-react/dialog/Dialog.scss +245 -245
  46. package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
  47. package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
  48. package/lib/cjs/core-react/elementseparator/ElementSeparator.scss +85 -85
  49. package/lib/cjs/core-react/enums/Alignment.js.map +1 -1
  50. package/lib/cjs/core-react/enums/CheckBoxState.js.map +1 -1
  51. package/lib/cjs/core-react/enums/Orientation.js.map +1 -1
  52. package/lib/cjs/core-react/enums/SortDirection.js.map +1 -1
  53. package/lib/cjs/core-react/enums/TimeFormat.js.map +1 -1
  54. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  55. package/lib/cjs/core-react/expandable/ExpandableList.scss +8 -8
  56. package/lib/cjs/core-react/expandable/classes.scss +7 -7
  57. package/lib/cjs/core-react/expandable/index.scss +5 -5
  58. package/lib/cjs/core-react/expandable/list.scss +35 -35
  59. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
  60. package/lib/cjs/core-react/focustrap/FocusTrap.js.map +1 -1
  61. package/lib/cjs/core-react/hocs/withIsPressed.js.map +1 -1
  62. package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
  63. package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
  64. package/lib/cjs/core-react/icons/ConditionalIconItem.js.map +1 -1
  65. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  66. package/lib/cjs/core-react/icons/IconComponent.scss +20 -20
  67. package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
  68. package/lib/cjs/core-react/icons/SvgPath.scss +15 -15
  69. package/lib/cjs/core-react/icons/WebFontIcon.js.map +1 -1
  70. package/lib/cjs/core-react/icons/WebFontIcon.scss +17 -17
  71. package/lib/cjs/core-react/icons/classes.scss +10 -10
  72. package/lib/cjs/core-react/icons/index.scss +6 -6
  73. package/lib/cjs/core-react/icons/mixins.scss +25 -25
  74. package/lib/cjs/core-react/icons/variables.scss +12 -12
  75. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  76. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.scss +54 -54
  77. package/lib/cjs/core-react/index.scss +21 -21
  78. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  79. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  80. package/lib/cjs/core-react/inputs/InputStatus.js.map +1 -1
  81. package/lib/cjs/core-react/inputs/LabeledComponentProps.js.map +1 -1
  82. package/lib/cjs/core-react/inputs/classes.scss +8 -8
  83. package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
  84. package/lib/cjs/core-react/inputs/iconinput/IconInput.scss +35 -35
  85. package/lib/cjs/core-react/inputs/index.scss +9 -9
  86. package/lib/cjs/core-react/inputs/input-label.scss +90 -90
  87. package/lib/cjs/core-react/inputs/input.scss +58 -58
  88. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  89. package/lib/cjs/core-react/inputs/numberinput/NumberInput.scss +88 -88
  90. package/lib/cjs/core-react/inputs/variables.scss +38 -38
  91. package/lib/cjs/core-react/layout-variables.scss +17 -17
  92. package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
  93. package/lib/cjs/core-react/listbox/Listbox.scss +54 -54
  94. package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
  95. package/lib/cjs/core-react/loading/LoadingBar.scss +29 -29
  96. package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
  97. package/lib/cjs/core-react/loading/LoadingPrompt.scss +33 -33
  98. package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
  99. package/lib/cjs/core-react/loading/LoadingSpinner.scss +26 -26
  100. package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
  101. package/lib/cjs/core-react/loading/LoadingStatus.scss +20 -20
  102. package/lib/cjs/core-react/loading/index.scss +5 -5
  103. package/lib/cjs/core-react/loading/mixins.scss +57 -57
  104. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  105. package/lib/cjs/core-react/messagebox/MessageBox.scss +56 -56
  106. package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
  107. package/lib/cjs/core-react/notification/MessageType.js.map +1 -1
  108. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  109. package/lib/cjs/core-react/popup/Popup.scss +240 -240
  110. package/lib/cjs/core-react/radialmenu/Annulus.js.map +1 -1
  111. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  112. package/lib/cjs/core-react/radialmenu/RadialMenu.scss +55 -55
  113. package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
  114. package/lib/cjs/core-react/searchbox/SearchBox.scss +47 -47
  115. package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
  116. package/lib/cjs/core-react/settings/SettingsContainer.scss +68 -68
  117. package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
  118. package/lib/cjs/core-react/style/baseline.scss +11 -11
  119. package/lib/cjs/core-react/style/breakpoints.scss +41 -41
  120. package/lib/cjs/core-react/style/colors.scss +77 -77
  121. package/lib/cjs/core-react/style/index.scss +10 -10
  122. package/lib/cjs/core-react/style/mixins.scss +27 -27
  123. package/lib/cjs/core-react/style/opacity.scss +16 -16
  124. package/lib/cjs/core-react/style/themecolors.scss +123 -123
  125. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  126. package/lib/cjs/core-react/tabs/VerticalTabs.js.map +1 -1
  127. package/lib/cjs/core-react/tabs/classes.scss +7 -7
  128. package/lib/cjs/core-react/tabs/index.scss +5 -5
  129. package/lib/cjs/core-react/tabs/tabs.scss +96 -96
  130. package/lib/cjs/core-react/tabs/vertical.scss +51 -51
  131. package/lib/cjs/core-react/text/BlockText.js.map +1 -1
  132. package/lib/cjs/core-react/text/BodyText.js.map +1 -1
  133. package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
  134. package/lib/cjs/core-react/text/FilteredText.js.map +1 -1
  135. package/lib/cjs/core-react/text/FilteredText.scss +10 -10
  136. package/lib/cjs/core-react/text/MutedText.js.map +1 -1
  137. package/lib/cjs/core-react/text/StyledText.js.map +1 -1
  138. package/lib/cjs/core-react/text/TextProps.js.map +1 -1
  139. package/lib/cjs/core-react/text/block.scss +15 -15
  140. package/lib/cjs/core-react/text/body.scss +13 -13
  141. package/lib/cjs/core-react/text/classes.scss +10 -10
  142. package/lib/cjs/core-react/text/disabled.scss +10 -10
  143. package/lib/cjs/core-react/text/index.scss +10 -10
  144. package/lib/cjs/core-react/text/mixins.scss +24 -24
  145. package/lib/cjs/core-react/text/muted.scss +10 -10
  146. package/lib/cjs/core-react/tree/Branch.js.map +1 -1
  147. package/lib/cjs/core-react/tree/Branch.scss +12 -12
  148. package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
  149. package/lib/cjs/core-react/tree/ExpansionToggle.scss +32 -32
  150. package/lib/cjs/core-react/tree/Node.js.map +1 -1
  151. package/lib/cjs/core-react/tree/Node.scss +67 -67
  152. package/lib/cjs/core-react/tree/Placeholder.js.map +1 -1
  153. package/lib/cjs/core-react/tree/Placeholder.scss +17 -17
  154. package/lib/cjs/core-react/tree/Tree.js.map +1 -1
  155. package/lib/cjs/core-react/tree/Tree.scss +21 -21
  156. package/lib/cjs/core-react/uistate/LocalStateStorage.js.map +1 -1
  157. package/lib/cjs/core-react/uistate/UiStateEntry.js.map +1 -1
  158. package/lib/cjs/core-react/uistate/UiStateStorage.js.map +1 -1
  159. package/lib/cjs/core-react/utils/IconHelper.js.map +1 -1
  160. package/lib/cjs/core-react/utils/IconWebComponent.js.map +1 -1
  161. package/lib/cjs/core-react/utils/Point.js.map +1 -1
  162. package/lib/cjs/core-react/utils/Props.js.map +1 -1
  163. package/lib/cjs/core-react/utils/Rectangle.js.map +1 -1
  164. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  165. package/lib/cjs/core-react/utils/Size.js.map +1 -1
  166. package/lib/cjs/core-react/utils/Timer.js.map +1 -1
  167. package/lib/cjs/core-react/utils/UiGeometry.js.map +1 -1
  168. package/lib/cjs/core-react/utils/flattenChildren.js.map +1 -1
  169. package/lib/cjs/core-react/utils/getBestBWContrastColor.js.map +1 -1
  170. package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
  171. package/lib/cjs/core-react/utils/getDisplayName.js.map +1 -1
  172. package/lib/cjs/core-react/utils/getUserColor.js.map +1 -1
  173. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
  174. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  175. package/lib/cjs/core-react/utils/hooks/useDisposable.js.map +1 -1
  176. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  177. package/lib/cjs/core-react/utils/hooks/useEventListener.js.map +1 -1
  178. package/lib/cjs/core-react/utils/hooks/useInterval.js.map +1 -1
  179. package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.js.map +1 -1
  180. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  181. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
  182. package/lib/cjs/core-react/utils/hooks/useRefEffect.js.map +1 -1
  183. package/lib/cjs/core-react/utils/hooks/useRefState.js.map +1 -1
  184. package/lib/cjs/core-react/utils/hooks/useRefs.js.map +1 -1
  185. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  186. package/lib/cjs/core-react/utils/hooks/useTargeted.js.map +1 -1
  187. package/lib/cjs/core-react/utils/hooks/useThrottledFn.js.map +1 -1
  188. package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.js.map +1 -1
  189. package/lib/cjs/core-react/utils/isPromiseLike.js.map +1 -1
  190. package/lib/cjs/core-react/utils/shallowDiffers.js.map +1 -1
  191. package/lib/cjs/core-react/utils/typeUtils.js.map +1 -1
  192. package/lib/cjs/core-react.js.map +1 -1
  193. package/lib/esm/core-react/UiCore.js.map +1 -1
  194. package/lib/esm/core-react/_geometry.scss +70 -70
  195. package/lib/esm/core-react/_helpers.scss +51 -51
  196. package/lib/esm/core-react/_math.scss +13 -13
  197. package/lib/esm/core-react/_scrollbar.scss +51 -51
  198. package/lib/esm/core-react/_typography.scss +44 -44
  199. package/lib/esm/core-react/_z-index.scss +65 -65
  200. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  201. package/lib/esm/core-react/autosuggest/AutoSuggest.scss +79 -79
  202. package/lib/esm/core-react/badge/Badge.js.map +1 -1
  203. package/lib/esm/core-react/badge/Badge.scss +13 -13
  204. package/lib/esm/core-react/badge/BadgeUtilities.js.map +1 -1
  205. package/lib/esm/core-react/badge/BetaBadge.js.map +1 -1
  206. package/lib/esm/core-react/badge/NewBadge.js.map +1 -1
  207. package/lib/esm/core-react/badge/NewBadge.scss +9 -9
  208. package/lib/esm/core-react/base/Centered.js.map +1 -1
  209. package/lib/esm/core-react/base/Div.js.map +1 -1
  210. package/lib/esm/core-react/base/DivWithOutsideClick.js.map +1 -1
  211. package/lib/esm/core-react/base/FillCentered.js.map +1 -1
  212. package/lib/esm/core-react/base/FlexWrapContainer.js.map +1 -1
  213. package/lib/esm/core-react/base/Gap.js.map +1 -1
  214. package/lib/esm/core-react/base/PointerEvents.js.map +1 -1
  215. package/lib/esm/core-react/base/ScrollView.js.map +1 -1
  216. package/lib/esm/core-react/base/base.scss +42 -42
  217. package/lib/esm/core-react/base/classes.scss +13 -13
  218. package/lib/esm/core-react/base/index.scss +5 -5
  219. package/lib/esm/core-react/button/UnderlinedButton.js.map +1 -1
  220. package/lib/esm/core-react/button/UnderlinedButton.scss +32 -32
  221. package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
  222. package/lib/esm/core-react/checklistbox/CheckListBox.scss +21 -21
  223. package/lib/esm/core-react/classes.scss +11 -11
  224. package/lib/esm/core-react/colorthemes.scss +61 -61
  225. package/lib/esm/core-react/colorvariables.scss +131 -131
  226. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  227. package/lib/esm/core-react/contextmenu/ContextMenu.scss +236 -236
  228. package/lib/esm/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
  229. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  230. package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  231. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  232. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  233. package/lib/esm/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  234. package/lib/esm/core-react/contextmenu/TildeFinder.js.map +1 -1
  235. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  236. package/lib/esm/core-react/dialog/Dialog.scss +245 -245
  237. package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
  238. package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
  239. package/lib/esm/core-react/elementseparator/ElementSeparator.scss +85 -85
  240. package/lib/esm/core-react/enums/Alignment.js.map +1 -1
  241. package/lib/esm/core-react/enums/CheckBoxState.js.map +1 -1
  242. package/lib/esm/core-react/enums/Orientation.js.map +1 -1
  243. package/lib/esm/core-react/enums/SortDirection.js.map +1 -1
  244. package/lib/esm/core-react/enums/TimeFormat.js.map +1 -1
  245. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  246. package/lib/esm/core-react/expandable/ExpandableList.scss +8 -8
  247. package/lib/esm/core-react/expandable/classes.scss +7 -7
  248. package/lib/esm/core-react/expandable/index.scss +5 -5
  249. package/lib/esm/core-react/expandable/list.scss +35 -35
  250. package/lib/esm/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
  251. package/lib/esm/core-react/focustrap/FocusTrap.js.map +1 -1
  252. package/lib/esm/core-react/hocs/withIsPressed.js.map +1 -1
  253. package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
  254. package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
  255. package/lib/esm/core-react/icons/ConditionalIconItem.js.map +1 -1
  256. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  257. package/lib/esm/core-react/icons/IconComponent.scss +20 -20
  258. package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
  259. package/lib/esm/core-react/icons/SvgPath.scss +15 -15
  260. package/lib/esm/core-react/icons/WebFontIcon.js.map +1 -1
  261. package/lib/esm/core-react/icons/WebFontIcon.scss +17 -17
  262. package/lib/esm/core-react/icons/classes.scss +10 -10
  263. package/lib/esm/core-react/icons/index.scss +6 -6
  264. package/lib/esm/core-react/icons/mixins.scss +25 -25
  265. package/lib/esm/core-react/icons/variables.scss +12 -12
  266. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  267. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.scss +54 -54
  268. package/lib/esm/core-react/index.scss +21 -21
  269. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  270. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  271. package/lib/esm/core-react/inputs/InputStatus.js.map +1 -1
  272. package/lib/esm/core-react/inputs/LabeledComponentProps.js.map +1 -1
  273. package/lib/esm/core-react/inputs/classes.scss +8 -8
  274. package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
  275. package/lib/esm/core-react/inputs/iconinput/IconInput.scss +35 -35
  276. package/lib/esm/core-react/inputs/index.scss +9 -9
  277. package/lib/esm/core-react/inputs/input-label.scss +90 -90
  278. package/lib/esm/core-react/inputs/input.scss +58 -58
  279. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  280. package/lib/esm/core-react/inputs/numberinput/NumberInput.scss +88 -88
  281. package/lib/esm/core-react/inputs/variables.scss +38 -38
  282. package/lib/esm/core-react/layout-variables.scss +17 -17
  283. package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
  284. package/lib/esm/core-react/listbox/Listbox.scss +54 -54
  285. package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
  286. package/lib/esm/core-react/loading/LoadingBar.scss +29 -29
  287. package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
  288. package/lib/esm/core-react/loading/LoadingPrompt.scss +33 -33
  289. package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
  290. package/lib/esm/core-react/loading/LoadingSpinner.scss +26 -26
  291. package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
  292. package/lib/esm/core-react/loading/LoadingStatus.scss +20 -20
  293. package/lib/esm/core-react/loading/index.scss +5 -5
  294. package/lib/esm/core-react/loading/mixins.scss +57 -57
  295. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  296. package/lib/esm/core-react/messagebox/MessageBox.scss +56 -56
  297. package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
  298. package/lib/esm/core-react/notification/MessageType.js.map +1 -1
  299. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  300. package/lib/esm/core-react/popup/Popup.scss +240 -240
  301. package/lib/esm/core-react/radialmenu/Annulus.js.map +1 -1
  302. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  303. package/lib/esm/core-react/radialmenu/RadialMenu.scss +55 -55
  304. package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
  305. package/lib/esm/core-react/searchbox/SearchBox.scss +47 -47
  306. package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
  307. package/lib/esm/core-react/settings/SettingsContainer.scss +68 -68
  308. package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
  309. package/lib/esm/core-react/style/baseline.scss +11 -11
  310. package/lib/esm/core-react/style/breakpoints.scss +41 -41
  311. package/lib/esm/core-react/style/colors.scss +77 -77
  312. package/lib/esm/core-react/style/index.scss +10 -10
  313. package/lib/esm/core-react/style/mixins.scss +27 -27
  314. package/lib/esm/core-react/style/opacity.scss +16 -16
  315. package/lib/esm/core-react/style/themecolors.scss +123 -123
  316. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  317. package/lib/esm/core-react/tabs/VerticalTabs.js.map +1 -1
  318. package/lib/esm/core-react/tabs/classes.scss +7 -7
  319. package/lib/esm/core-react/tabs/index.scss +5 -5
  320. package/lib/esm/core-react/tabs/tabs.scss +96 -96
  321. package/lib/esm/core-react/tabs/vertical.scss +51 -51
  322. package/lib/esm/core-react/text/BlockText.js.map +1 -1
  323. package/lib/esm/core-react/text/BodyText.js.map +1 -1
  324. package/lib/esm/core-react/text/DisabledText.js.map +1 -1
  325. package/lib/esm/core-react/text/FilteredText.js.map +1 -1
  326. package/lib/esm/core-react/text/FilteredText.scss +10 -10
  327. package/lib/esm/core-react/text/MutedText.js.map +1 -1
  328. package/lib/esm/core-react/text/StyledText.js.map +1 -1
  329. package/lib/esm/core-react/text/TextProps.js.map +1 -1
  330. package/lib/esm/core-react/text/block.scss +15 -15
  331. package/lib/esm/core-react/text/body.scss +13 -13
  332. package/lib/esm/core-react/text/classes.scss +10 -10
  333. package/lib/esm/core-react/text/disabled.scss +10 -10
  334. package/lib/esm/core-react/text/index.scss +10 -10
  335. package/lib/esm/core-react/text/mixins.scss +24 -24
  336. package/lib/esm/core-react/text/muted.scss +10 -10
  337. package/lib/esm/core-react/tree/Branch.js.map +1 -1
  338. package/lib/esm/core-react/tree/Branch.scss +12 -12
  339. package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
  340. package/lib/esm/core-react/tree/ExpansionToggle.scss +32 -32
  341. package/lib/esm/core-react/tree/Node.js.map +1 -1
  342. package/lib/esm/core-react/tree/Node.scss +67 -67
  343. package/lib/esm/core-react/tree/Placeholder.js.map +1 -1
  344. package/lib/esm/core-react/tree/Placeholder.scss +17 -17
  345. package/lib/esm/core-react/tree/Tree.js.map +1 -1
  346. package/lib/esm/core-react/tree/Tree.scss +21 -21
  347. package/lib/esm/core-react/uistate/LocalStateStorage.js.map +1 -1
  348. package/lib/esm/core-react/uistate/UiStateEntry.js.map +1 -1
  349. package/lib/esm/core-react/uistate/UiStateStorage.js.map +1 -1
  350. package/lib/esm/core-react/utils/IconHelper.js.map +1 -1
  351. package/lib/esm/core-react/utils/IconWebComponent.js.map +1 -1
  352. package/lib/esm/core-react/utils/Point.js.map +1 -1
  353. package/lib/esm/core-react/utils/Props.js.map +1 -1
  354. package/lib/esm/core-react/utils/Rectangle.js.map +1 -1
  355. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  356. package/lib/esm/core-react/utils/Size.js.map +1 -1
  357. package/lib/esm/core-react/utils/Timer.js.map +1 -1
  358. package/lib/esm/core-react/utils/UiGeometry.js.map +1 -1
  359. package/lib/esm/core-react/utils/flattenChildren.js.map +1 -1
  360. package/lib/esm/core-react/utils/getBestBWContrastColor.js.map +1 -1
  361. package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
  362. package/lib/esm/core-react/utils/getDisplayName.js.map +1 -1
  363. package/lib/esm/core-react/utils/getUserColor.js.map +1 -1
  364. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
  365. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  366. package/lib/esm/core-react/utils/hooks/useDisposable.js.map +1 -1
  367. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  368. package/lib/esm/core-react/utils/hooks/useEventListener.js.map +1 -1
  369. package/lib/esm/core-react/utils/hooks/useInterval.js.map +1 -1
  370. package/lib/esm/core-react/utils/hooks/useLifecycleLogging.js.map +1 -1
  371. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  372. package/lib/esm/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
  373. package/lib/esm/core-react/utils/hooks/useRefEffect.js.map +1 -1
  374. package/lib/esm/core-react/utils/hooks/useRefState.js.map +1 -1
  375. package/lib/esm/core-react/utils/hooks/useRefs.js.map +1 -1
  376. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  377. package/lib/esm/core-react/utils/hooks/useTargeted.js.map +1 -1
  378. package/lib/esm/core-react/utils/hooks/useThrottledFn.js.map +1 -1
  379. package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.js.map +1 -1
  380. package/lib/esm/core-react/utils/isPromiseLike.js.map +1 -1
  381. package/lib/esm/core-react/utils/shallowDiffers.js.map +1 -1
  382. package/lib/esm/core-react/utils/typeUtils.js.map +1 -1
  383. package/lib/esm/core-react.js.map +1 -1
  384. package/lib/public/locales/en/UiCore.json +30 -30
  385. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenu.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAA4B;AAC5B,2CAAoC;AACpC,+BAA+B;AAC/B,0DAA4E;AAE5E,qEAAkE;AAClE,iEAA8D;AAE9D,uDAAoD;AAEpD,qDAAkD;AA2ClD;;;;IAII;AACJ,MAAa,WAAY,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G,kDAAkD,CAAC;YAC/D,MAAM;KACT;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,AAzCyC,CAyCxC;AA1LS,kCAAW","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContextMenu\n */\n\nimport \"./ContextMenu.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { ConditionalBooleanValue, SpecialKey } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { DivWithOutsideClick } from \"../base/DivWithOutsideClick\";\nimport { ContextMenuDirection } from \"./ContextMenuDirection\";\nimport type { ContextMenuItemProps } from \"./ContextMenuItem\";\nimport { ContextMenuItem } from \"./ContextMenuItem\";\nimport type { ContextSubMenuProps } from \"./ContextSubMenu\";\nimport { ContextSubMenu } from \"./ContextSubMenu\";\n\n/** Properties for the [[ContextMenu]] component\n * @public\n */\nexport interface ContextMenuProps extends CommonProps {\n /** Whether ContextMenu is currently opened. */\n opened: boolean;\n /** Which direction the menu opens. Default: ContextMenuDirection.BottomRight */\n direction?: ContextMenuDirection;\n /** When click is registered outside of ContextMenu. */\n onOutsideClick?: (event: MouseEvent) => any;\n /** When list item or submenu is selected */\n onSelect?: (event: any) => any;\n /** when Escape button is pressed */\n onEsc?: (data: any) => any;\n /** Whether menu flips directions based on screen edge. Default: true */\n autoflip?: boolean;\n /** Whether menu hugs screen edge when autoflip is off. Default: true */\n edgeLimit?: boolean;\n /** Whether Hotkey press selects item, or just highlights item. Default: true */\n hotkeySelect?: boolean;\n /** starting menu item selected index Default: -1 */\n selectedIndex?: number;\n /** whether menu floats on the viewport, or the page. When false, container elements can clip menu with overflow: hidden; Default: true */\n floating?: boolean;\n /** @internal */\n parentMenu?: ContextMenu;\n /** @internal */\n parentSubmenu?: ContextSubMenu;\n /** @internal */\n ignoreNextKeyUp?: boolean;\n /** Content */\n children?: React.ReactNode;\n}\n\n/** @internal */\ninterface ContextMenuState {\n selectedIndex: number;\n direction: ContextMenuDirection;\n ignoreNextKeyUp: boolean;\n}\n\n/**\n * A context menu populated with [[ContextMenuItem]] components.\n * Can be nested using [[ContextSubMenu]] component.\n * @public\n */\nexport class ContextMenu extends React.PureComponent<ContextMenuProps, ContextMenuState> {\n private _rootElement: HTMLElement | null = null;\n private _menuElement: HTMLElement | null = null;\n private _selectedElement: ContextMenuItem | ContextSubMenu | null = null;\n private _length: number = 0;\n private _hotKeyMap: Map<number, string> = new Map();\n\n private _lastChildren: React.ReactNode;\n private _lastDirection: ContextMenuDirection | undefined = ContextMenuDirection.BottomRight;\n private _lastSelectedIndex: number = 0;\n private _injectedChildren: React.ReactNode;\n private _parentWindowHeight: number = 0;\n private _parentWindowWidth: number = 0;\n\n public static defaultProps: Partial<ContextMenuProps> = {\n direction: ContextMenuDirection.BottomRight,\n autoflip: true,\n edgeLimit: true,\n hotkeySelect: true,\n selectedIndex: -1,\n floating: true,\n };\n\n /** @internal */\n public override readonly state: Readonly<ContextMenuState>;\n constructor(props: ContextMenuProps) {\n super(props);\n this.state = {\n selectedIndex: this.props.selectedIndex!,\n direction: props.direction!,\n ignoreNextKeyUp: props.ignoreNextKeyUp!,\n };\n }\n\n /** @internal */\n public static autoFlip = (dir: ContextMenuDirection, rect: DOMRectReadOnly, windowWidth: number, windowHeight: number): ContextMenuDirection => {\n if (rect.right > windowWidth) {\n switch (dir) {\n case ContextMenuDirection.TopRight:\n dir = ContextMenuDirection.TopLeft;\n break;\n case ContextMenuDirection.Right:\n dir = ContextMenuDirection.Left;\n break;\n case ContextMenuDirection.BottomRight:\n dir = ContextMenuDirection.BottomLeft;\n break;\n }\n }\n if (rect.left < 0) {\n switch (dir) {\n case ContextMenuDirection.TopLeft:\n dir = ContextMenuDirection.TopRight;\n break;\n case ContextMenuDirection.Left:\n dir = ContextMenuDirection.Right;\n break;\n case ContextMenuDirection.BottomLeft:\n dir = ContextMenuDirection.BottomRight;\n break;\n }\n }\n if (rect.bottom > windowHeight) {\n switch (dir) {\n case ContextMenuDirection.BottomLeft:\n dir = ContextMenuDirection.TopLeft;\n break;\n case ContextMenuDirection.Bottom:\n dir = ContextMenuDirection.Top;\n break;\n case ContextMenuDirection.BottomRight:\n dir = ContextMenuDirection.TopRight;\n break;\n }\n }\n if (rect.top < 0) {\n switch (dir) {\n case ContextMenuDirection.TopLeft:\n dir = ContextMenuDirection.BottomLeft;\n break;\n case ContextMenuDirection.Top:\n dir = ContextMenuDirection.Bottom;\n break;\n case ContextMenuDirection.TopRight:\n dir = ContextMenuDirection.BottomRight;\n break;\n }\n }\n return dir;\n };\n\n private _handleHotKeyParsed = (index: number, hotKey: string) => {\n this._hotKeyMap.set(index, hotKey);\n };\n\n // istanbul ignore next\n private _handleOnOutsideClick = (event: MouseEvent): void => {\n if (this.props.opened && this.props.onOutsideClick)\n this.props.onOutsideClick(event);\n };\n\n public override render(): JSX.Element {\n const {\n opened, direction, onOutsideClick, onSelect, onEsc, autoflip, edgeLimit, hotkeySelect, // eslint-disable-line @typescript-eslint/no-unused-vars\n selectedIndex, floating, parentMenu, parentSubmenu, children, className, ignoreNextKeyUp, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...props } = this.props;\n const renderDirection = parentMenu === undefined ? this.state.direction : direction;\n\n if (this._lastChildren !== children || this._lastDirection !== renderDirection || this._lastSelectedIndex !== this.state.selectedIndex) {\n this._injectedChildren = this._injectMenuItemProps(children, renderDirection, this.state.selectedIndex);\n this._lastChildren = children;\n this._lastDirection = renderDirection;\n this._lastSelectedIndex = this.state.selectedIndex;\n }\n\n const classNames = classnames(\"core-context-menu\", className);\n\n return (\n <div\n role=\"presentation\"\n className={classNames}\n onKeyUp={this._handleKeyUp}\n onClick={this._handleClick}\n data-testid=\"core-context-menu-root\"\n {...props}\n ref={this._rootRef}>\n <DivWithOutsideClick onOutsideClick={this._handleOnOutsideClick}>\n <div\n ref={this._menuRef}\n role=\"menu\"\n tabIndex={0}\n data-testid=\"core-context-menu-container\"\n className={classnames(\"core-context-menu-container\",\n opened && \"core-context-menu-opened\",\n floating && \"core-context-menu-floating\",\n ContextMenu.getCSSClassNameFromDirection(renderDirection),\n )}>\n {this._injectedChildren}\n </div>\n </DivWithOutsideClick>\n </div>\n );\n }\n\n /** @internal */\n public static getCSSClassNameFromDirection = (direction?: ContextMenuDirection): string => {\n let className = \"\";\n\n // istanbul ignore next\n if (direction === undefined)\n direction = ContextMenuDirection.BottomRight;\n\n if (direction === ContextMenuDirection.None)\n return \"\";\n\n switch (direction) {\n case ContextMenuDirection.TopLeft:\n className = \"core-context-menu-top core-context-menu-left\";\n break;\n case ContextMenuDirection.Top:\n className = \"core-context-menu-top\";\n break;\n case ContextMenuDirection.TopRight:\n className = \"core-context-menu-top core-context-menu-right\";\n break;\n case ContextMenuDirection.Left:\n className = \"core-context-menu-left\";\n break;\n case ContextMenuDirection.Center:\n className = \"core-context-menu-center\";\n break;\n case ContextMenuDirection.Right:\n className = \"core-context-menu-right\";\n break;\n case ContextMenuDirection.BottomLeft:\n className = \"core-context-menu-bottom core-context-menu-left\";\n break;\n case ContextMenuDirection.Bottom:\n className = \"core-context-menu-bottom\";\n break;\n case ContextMenuDirection.BottomRight:\n className = \"core-context-menu-bottom core-context-menu-right\";\n break;\n }\n\n return className;\n };\n\n private _injectMenuItemProps = (children: React.ReactNode, direction: ContextMenuDirection | undefined, selectedIndex: number) => {\n let index = 0;\n // add inheritance data to submenu children\n const ch = React.Children.map(children, (child: React.ReactNode) => {\n // Capture only ContextSubMenus and ContextMenuItems.\n if (child && typeof child === \"object\" && \"props\" in child && (child.type === ContextSubMenu || child.type === ContextMenuItem) &&\n !ConditionalBooleanValue.getValue(child.props.disabled) && !ConditionalBooleanValue.getValue(child.props.hidden)) {\n const id = index; // get separate id variable so value stays the same when onHover is called later.\n const onHover = () => {\n this.setState({ selectedIndex: id });\n this.focus();\n };\n const ref = (el: ContextSubMenu | ContextMenuItem | null) => {\n if (selectedIndex === id) // only save to this._selectedElement if previously captured bool is true\n this._selectedElement = el;\n };\n const boundHandleHotKeyParse = this._handleHotKeyParsed.bind(this, id); // bind local callback for specific index\n const childProps: Partial<ContextSubMenuProps & ContextMenuItemProps & { ref: typeof ref }> = {\n parentMenu: this,\n ref,\n onHover,\n isSelected: selectedIndex === id,\n onHotKeyParsed: boundHandleHotKeyParse,\n };\n if (child.type === ContextSubMenu) { // add direction only to sub-menus\n childProps.direction = child.props.direction || /* istanbul ignore next */ direction;\n }\n index++;\n return React.cloneElement(child, childProps);\n } else return child; // Else, pass through unmodified\n });\n this._length = index;\n return ch;\n };\n\n private _rootRef = (el: HTMLDivElement | null) => {\n this._rootElement = el;\n };\n\n private _menuRef = (el: HTMLDivElement | null) => {\n this._menuElement = el;\n };\n\n private getWindow() {\n const el = this._rootElement ? this._rootElement : /* istanbul ignore next */ this._menuElement;\n const parentDocument = el!.ownerDocument;\n // istanbul ignore next\n return parentDocument.defaultView ?? window;\n }\n\n /** @internal */\n public override componentDidMount() {\n const parentWindow = this.getWindow();\n parentWindow.addEventListener(\"focus\", this._handleFocusChange);\n parentWindow.addEventListener(\"mouseup\", this._handleFocusChange);\n\n this.checkRenderDirection();\n\n if (this.props.opened)\n this.focus();\n }\n\n /** @internal */\n public override componentWillUnmount() {\n const parentWindow = this.getWindow();\n parentWindow.removeEventListener(\"focus\", this._handleFocusChange);\n parentWindow.removeEventListener(\"mouseup\", this._handleFocusChange);\n }\n\n private checkRenderDirection() {\n const { direction, autoflip, parentMenu } = this.props;\n const parentWindow = this.getWindow();\n\n let renderDirection = parentMenu === undefined ? this.state.direction : direction;\n\n if (parentWindow.innerHeight === this._parentWindowHeight && parentWindow.innerWidth === this._parentWindowWidth)\n return;\n this._parentWindowHeight = parentWindow.innerHeight;\n this._parentWindowWidth = parentWindow.innerWidth;\n\n // check if menu should flip\n if (parentWindow && autoflip && parentMenu === undefined) {\n const menuRect = this.getRect();\n renderDirection = ContextMenu.autoFlip(renderDirection!, menuRect, parentWindow.innerWidth, parentWindow.innerHeight);\n // istanbul ignore next\n if (renderDirection !== this.state.direction)\n this.setState({ direction: renderDirection });\n }\n }\n\n public focus = () => {\n // istanbul ignore else\n if (this._menuElement)\n this._menuElement.focus();\n };\n\n public blur = () => {\n // istanbul ignore else\n if (this._menuElement)\n this._menuElement.blur();\n };\n\n public getRect = (): DOMRect => {\n let clientRect = DOMRect.fromRect({ x: 0, y: 0, width: 0, height: 0});\n\n // istanbul ignore else\n if (this._menuElement) {\n clientRect = this._menuElement.getBoundingClientRect();\n }\n return clientRect;\n };\n\n private _handleFocusChange = (event: any): void => {\n // istanbul ignore else\n if (this._rootElement && this.props.opened && event.target instanceof Node && this.props.onOutsideClick && !this._rootElement.contains(event.target))\n this.props.onOutsideClick(event);\n };\n\n private _handleClick = (event: React.MouseEvent<HTMLDivElement>): void => {\n if (this.props.onSelect)\n this.props.onSelect(event);\n };\n\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>): void => {\n if (this.state.ignoreNextKeyUp) {\n this.setState({ ignoreNextKeyUp: false });\n return;\n }\n\n // istanbul ignore else\n if (event.key) {\n for (const [key, value] of this._hotKeyMap) {\n if (!this.props.hotkeySelect! && key > this.state.selectedIndex) { // Start search at current index.\n if (event.key.toUpperCase() === value) {\n this.setState({ selectedIndex: key });\n return;\n }\n }\n }\n for (const [key, value] of this._hotKeyMap) {\n if (event.key.toUpperCase() === value) {\n this.setState({ selectedIndex: key }, () => {\n if (this.props.hotkeySelect && this._selectedElement) {\n this._selectedElement.select();\n }\n });\n event.stopPropagation();\n return;\n }\n }\n }\n\n if (event.key === SpecialKey.ArrowLeft) {\n event.stopPropagation();\n if (this.props.parentMenu && this.props.parentSubmenu) {\n this.props.parentSubmenu.close();\n this.props.parentMenu.focus();\n }\n if (this.props.onEsc)\n this.props.onEsc(event);\n }\n\n if (event.key === SpecialKey.Escape) {\n // istanbul ignore else\n if (this.props.onEsc)\n this.props.onEsc(event);\n }\n\n if ((event.key === SpecialKey.Enter || event.key === SpecialKey.ArrowRight) && this._selectedElement) {\n event.stopPropagation();\n\n // istanbul ignore else\n if (event.key === SpecialKey.Enter || /* istanbul ignore next */ this._selectedElement instanceof ContextSubMenu) {\n // istanbul ignore else\n if (this._selectedElement.select)\n this._selectedElement.select();\n }\n }\n\n let { selectedIndex } = this.state;\n if (event.key === SpecialKey.ArrowUp || event.key === SpecialKey.ArrowDown) {\n event.stopPropagation();\n if (selectedIndex === -1) {\n selectedIndex = 0;\n } else {\n if (event.key === SpecialKey.ArrowUp) {\n if (this.state.selectedIndex === 0)\n selectedIndex = this._length - 1;\n else\n selectedIndex--;\n }\n if (event.key === SpecialKey.ArrowDown) {\n if (this.state.selectedIndex === this._length - 1)\n selectedIndex = 0;\n else\n selectedIndex++;\n }\n }\n }\n this.setState({ selectedIndex });\n };\n\n public override componentDidUpdate(prevProps: ContextMenuProps) {\n if (prevProps.selectedIndex !== this.props.selectedIndex) {\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\n }\n if (!prevProps.opened && this.props.opened) {\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\n }\n if (!this.props.parentMenu) {\n // const direction = this.props.direction!;\n // if ((!this.props.opened && prevProps.opened && direction !== this.state.direction) || prevProps.direction !== direction)\n this.checkRenderDirection();\n }\n }\n}\n"]}
1
+ {"version":3,"file":"ContextMenu.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenu.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAA4B;AAC5B,2CAAoC;AACpC,+BAA+B;AAC/B,0DAA4E;AAE5E,qEAAkE;AAClE,iEAA8D;AAE9D,uDAAoD;AAEpD,qDAAkD;AA2ClD;;;;IAII;AACJ,MAAa,WAAY,SAAQ,KAAK,CAAC,aAAiD;IAyBtF,YAAY,KAAuB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;QAzBP,iBAAY,GAA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ourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport \"./ContextMenu.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ConditionalBooleanValue, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport type { CommonProps } from \"../utils/Props\";\r\nimport { DivWithOutsideClick } from \"../base/DivWithOutsideClick\";\r\nimport { ContextMenuDirection } from \"./ContextMenuDirection\";\r\nimport type { ContextMenuItemProps } from \"./ContextMenuItem\";\r\nimport { ContextMenuItem } from \"./ContextMenuItem\";\r\nimport type { ContextSubMenuProps } from \"./ContextSubMenu\";\r\nimport { ContextSubMenu } from \"./ContextSubMenu\";\r\n\r\n/** Properties for the [[ContextMenu]] component\r\n * @public\r\n */\r\nexport interface ContextMenuProps extends CommonProps {\r\n /** Whether ContextMenu is currently opened. */\r\n opened: boolean;\r\n /** Which direction the menu opens. Default: ContextMenuDirection.BottomRight */\r\n direction?: ContextMenuDirection;\r\n /** When click is registered outside of ContextMenu. */\r\n onOutsideClick?: (event: MouseEvent) => any;\r\n /** When list item or submenu is selected */\r\n onSelect?: (event: any) => any;\r\n /** when Escape button is pressed */\r\n onEsc?: (data: any) => any;\r\n /** Whether menu flips directions based on screen edge. Default: true */\r\n autoflip?: boolean;\r\n /** Whether menu hugs screen edge when autoflip is off. Default: true */\r\n edgeLimit?: boolean;\r\n /** Whether Hotkey press selects item, or just highlights item. Default: true */\r\n hotkeySelect?: boolean;\r\n /** starting menu item selected index Default: -1 */\r\n selectedIndex?: number;\r\n /** whether menu floats on the viewport, or the page. When false, container elements can clip menu with overflow: hidden; Default: true */\r\n floating?: boolean;\r\n /** @internal */\r\n parentMenu?: ContextMenu;\r\n /** @internal */\r\n parentSubmenu?: ContextSubMenu;\r\n /** @internal */\r\n ignoreNextKeyUp?: boolean;\r\n /** Content */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextMenuState {\r\n selectedIndex: number;\r\n direction: ContextMenuDirection;\r\n ignoreNextKeyUp: boolean;\r\n}\r\n\r\n/**\r\n * A context menu populated with [[ContextMenuItem]] components.\r\n * Can be nested using [[ContextSubMenu]] component.\r\n * @public\r\n */\r\nexport class ContextMenu extends React.PureComponent<ContextMenuProps, ContextMenuState> {\r\n private _rootElement: HTMLElement | null = null;\r\n private _menuElement: HTMLElement | null = null;\r\n private _selectedElement: ContextMenuItem | ContextSubMenu | null = null;\r\n private _length: number = 0;\r\n private _hotKeyMap: Map<number, string> = new Map();\r\n\r\n private _lastChildren: React.ReactNode;\r\n private _lastDirection: ContextMenuDirection | undefined = ContextMenuDirection.BottomRight;\r\n private _lastSelectedIndex: number = 0;\r\n private _injectedChildren: React.ReactNode;\r\n private _parentWindowHeight: number = 0;\r\n private _parentWindowWidth: number = 0;\r\n\r\n public static defaultProps: Partial<ContextMenuProps> = {\r\n direction: ContextMenuDirection.BottomRight,\r\n autoflip: true,\r\n edgeLimit: true,\r\n hotkeySelect: true,\r\n selectedIndex: -1,\r\n floating: true,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContextMenuState>;\r\n constructor(props: ContextMenuProps) {\r\n super(props);\r\n this.state = {\r\n selectedIndex: this.props.selectedIndex!,\r\n direction: props.direction!,\r\n ignoreNextKeyUp: props.ignoreNextKeyUp!,\r\n };\r\n }\r\n\r\n /** @internal */\r\n public static autoFlip = (dir: ContextMenuDirection, rect: DOMRectReadOnly, windowWidth: number, windowHeight: number): ContextMenuDirection => {\r\n if (rect.right > windowWidth) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopRight:\r\n dir = ContextMenuDirection.TopLeft;\r\n break;\r\n case ContextMenuDirection.Right:\r\n dir = ContextMenuDirection.Left;\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n dir = ContextMenuDirection.BottomLeft;\r\n break;\r\n }\r\n }\r\n if (rect.left < 0) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopLeft:\r\n dir = ContextMenuDirection.TopRight;\r\n break;\r\n case ContextMenuDirection.Left:\r\n dir = ContextMenuDirection.Right;\r\n break;\r\n case ContextMenuDirection.BottomLeft:\r\n dir = ContextMenuDirection.BottomRight;\r\n break;\r\n }\r\n }\r\n if (rect.bottom > windowHeight) {\r\n switch (dir) {\r\n case ContextMenuDirection.BottomLeft:\r\n dir = ContextMenuDirection.TopLeft;\r\n break;\r\n case ContextMenuDirection.Bottom:\r\n dir = ContextMenuDirection.Top;\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n dir = ContextMenuDirection.TopRight;\r\n break;\r\n }\r\n }\r\n if (rect.top < 0) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopLeft:\r\n dir = ContextMenuDirection.BottomLeft;\r\n break;\r\n case ContextMenuDirection.Top:\r\n dir = ContextMenuDirection.Bottom;\r\n break;\r\n case ContextMenuDirection.TopRight:\r\n dir = ContextMenuDirection.BottomRight;\r\n break;\r\n }\r\n }\r\n return dir;\r\n };\r\n\r\n private _handleHotKeyParsed = (index: number, hotKey: string) => {\r\n this._hotKeyMap.set(index, hotKey);\r\n };\r\n\r\n // istanbul ignore next\r\n private _handleOnOutsideClick = (event: MouseEvent): void => {\r\n if (this.props.opened && this.props.onOutsideClick)\r\n this.props.onOutsideClick(event);\r\n };\r\n\r\n public override render(): JSX.Element {\r\n const {\r\n opened, direction, onOutsideClick, onSelect, onEsc, autoflip, edgeLimit, hotkeySelect, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n selectedIndex, floating, parentMenu, parentSubmenu, children, className, ignoreNextKeyUp, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props;\r\n const renderDirection = parentMenu === undefined ? this.state.direction : direction;\r\n\r\n if (this._lastChildren !== children || this._lastDirection !== renderDirection || this._lastSelectedIndex !== this.state.selectedIndex) {\r\n this._injectedChildren = this._injectMenuItemProps(children, renderDirection, this.state.selectedIndex);\r\n this._lastChildren = children;\r\n this._lastDirection = renderDirection;\r\n this._lastSelectedIndex = this.state.selectedIndex;\r\n }\r\n\r\n const classNames = classnames(\"core-context-menu\", className);\r\n\r\n return (\r\n <div\r\n role=\"presentation\"\r\n className={classNames}\r\n onKeyUp={this._handleKeyUp}\r\n onClick={this._handleClick}\r\n data-testid=\"core-context-menu-root\"\r\n {...props}\r\n ref={this._rootRef}>\r\n <DivWithOutsideClick onOutsideClick={this._handleOnOutsideClick}>\r\n <div\r\n ref={this._menuRef}\r\n role=\"menu\"\r\n tabIndex={0}\r\n data-testid=\"core-context-menu-container\"\r\n className={classnames(\"core-context-menu-container\",\r\n opened && \"core-context-menu-opened\",\r\n floating && \"core-context-menu-floating\",\r\n ContextMenu.getCSSClassNameFromDirection(renderDirection),\r\n )}>\r\n {this._injectedChildren}\r\n </div>\r\n </DivWithOutsideClick>\r\n </div>\r\n );\r\n }\r\n\r\n /** @internal */\r\n public static getCSSClassNameFromDirection = (direction?: ContextMenuDirection): string => {\r\n let className = \"\";\r\n\r\n // istanbul ignore next\r\n if (direction === undefined)\r\n direction = ContextMenuDirection.BottomRight;\r\n\r\n if (direction === ContextMenuDirection.None)\r\n return \"\";\r\n\r\n switch (direction) {\r\n case ContextMenuDirection.TopLeft:\r\n className = \"core-context-menu-top core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Top:\r\n className = \"core-context-menu-top\";\r\n break;\r\n case ContextMenuDirection.TopRight:\r\n className = \"core-context-menu-top core-context-menu-right\";\r\n break;\r\n case ContextMenuDirection.Left:\r\n className = \"core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Center:\r\n className = \"core-context-menu-center\";\r\n break;\r\n case ContextMenuDirection.Right:\r\n className = \"core-context-menu-right\";\r\n break;\r\n case ContextMenuDirection.BottomLeft:\r\n className = \"core-context-menu-bottom core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Bottom:\r\n className = \"core-context-menu-bottom\";\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n className = \"core-context-menu-bottom core-context-menu-right\";\r\n break;\r\n }\r\n\r\n return className;\r\n };\r\n\r\n private _injectMenuItemProps = (children: React.ReactNode, direction: ContextMenuDirection | undefined, selectedIndex: number) => {\r\n let index = 0;\r\n // add inheritance data to submenu children\r\n const ch = React.Children.map(children, (child: React.ReactNode) => {\r\n // Capture only ContextSubMenus and ContextMenuItems.\r\n if (child && typeof child === \"object\" && \"props\" in child && (child.type === ContextSubMenu || child.type === ContextMenuItem) &&\r\n !ConditionalBooleanValue.getValue(child.props.disabled) && !ConditionalBooleanValue.getValue(child.props.hidden)) {\r\n const id = index; // get separate id variable so value stays the same when onHover is called later.\r\n const onHover = () => {\r\n this.setState({ selectedIndex: id });\r\n this.focus();\r\n };\r\n const ref = (el: ContextSubMenu | ContextMenuItem | null) => {\r\n if (selectedIndex === id) // only save to this._selectedElement if previously captured bool is true\r\n this._selectedElement = el;\r\n };\r\n const boundHandleHotKeyParse = this._handleHotKeyParsed.bind(this, id); // bind local callback for specific index\r\n const childProps: Partial<ContextSubMenuProps & ContextMenuItemProps & { ref: typeof ref }> = {\r\n parentMenu: this,\r\n ref,\r\n onHover,\r\n isSelected: selectedIndex === id,\r\n onHotKeyParsed: boundHandleHotKeyParse,\r\n };\r\n if (child.type === ContextSubMenu) { // add direction only to sub-menus\r\n childProps.direction = child.props.direction || /* istanbul ignore next */ direction;\r\n }\r\n index++;\r\n return React.cloneElement(child, childProps);\r\n } else return child; // Else, pass through unmodified\r\n });\r\n this._length = index;\r\n return ch;\r\n };\r\n\r\n private _rootRef = (el: HTMLDivElement | null) => {\r\n this._rootElement = el;\r\n };\r\n\r\n private _menuRef = (el: HTMLDivElement | null) => {\r\n this._menuElement = el;\r\n };\r\n\r\n private getWindow() {\r\n const el = this._rootElement ? this._rootElement : /* istanbul ignore next */ this._menuElement;\r\n const parentDocument = el!.ownerDocument;\r\n // istanbul ignore next\r\n return parentDocument.defaultView ?? window;\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n const parentWindow = this.getWindow();\r\n parentWindow.addEventListener(\"focus\", this._handleFocusChange);\r\n parentWindow.addEventListener(\"mouseup\", this._handleFocusChange);\r\n\r\n this.checkRenderDirection();\r\n\r\n if (this.props.opened)\r\n this.focus();\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n const parentWindow = this.getWindow();\r\n parentWindow.removeEventListener(\"focus\", this._handleFocusChange);\r\n parentWindow.removeEventListener(\"mouseup\", this._handleFocusChange);\r\n }\r\n\r\n private checkRenderDirection() {\r\n const { direction, autoflip, parentMenu } = this.props;\r\n const parentWindow = this.getWindow();\r\n\r\n let renderDirection = parentMenu === undefined ? this.state.direction : direction;\r\n\r\n if (parentWindow.innerHeight === this._parentWindowHeight && parentWindow.innerWidth === this._parentWindowWidth)\r\n return;\r\n this._parentWindowHeight = parentWindow.innerHeight;\r\n this._parentWindowWidth = parentWindow.innerWidth;\r\n\r\n // check if menu should flip\r\n if (parentWindow && autoflip && parentMenu === undefined) {\r\n const menuRect = this.getRect();\r\n renderDirection = ContextMenu.autoFlip(renderDirection!, menuRect, parentWindow.innerWidth, parentWindow.innerHeight);\r\n // istanbul ignore next\r\n if (renderDirection !== this.state.direction)\r\n this.setState({ direction: renderDirection });\r\n }\r\n }\r\n\r\n public focus = () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.focus();\r\n };\r\n\r\n public blur = () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.blur();\r\n };\r\n\r\n public getRect = (): DOMRect => {\r\n let clientRect = DOMRect.fromRect({ x: 0, y: 0, width: 0, height: 0});\r\n\r\n // istanbul ignore else\r\n if (this._menuElement) {\r\n clientRect = this._menuElement.getBoundingClientRect();\r\n }\r\n return clientRect;\r\n };\r\n\r\n private _handleFocusChange = (event: any): void => {\r\n // istanbul ignore else\r\n if (this._rootElement && this.props.opened && event.target instanceof Node && this.props.onOutsideClick && !this._rootElement.contains(event.target))\r\n this.props.onOutsideClick(event);\r\n };\r\n\r\n private _handleClick = (event: React.MouseEvent<HTMLDivElement>): void => {\r\n if (this.props.onSelect)\r\n this.props.onSelect(event);\r\n };\r\n\r\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>): void => {\r\n if (this.state.ignoreNextKeyUp) {\r\n this.setState({ ignoreNextKeyUp: false });\r\n return;\r\n }\r\n\r\n // istanbul ignore else\r\n if (event.key) {\r\n for (const [key, value] of this._hotKeyMap) {\r\n if (!this.props.hotkeySelect! && key > this.state.selectedIndex) { // Start search at current index.\r\n if (event.key.toUpperCase() === value) {\r\n this.setState({ selectedIndex: key });\r\n return;\r\n }\r\n }\r\n }\r\n for (const [key, value] of this._hotKeyMap) {\r\n if (event.key.toUpperCase() === value) {\r\n this.setState({ selectedIndex: key }, () => {\r\n if (this.props.hotkeySelect && this._selectedElement) {\r\n this._selectedElement.select();\r\n }\r\n });\r\n event.stopPropagation();\r\n return;\r\n }\r\n }\r\n }\r\n\r\n if (event.key === SpecialKey.ArrowLeft) {\r\n event.stopPropagation();\r\n if (this.props.parentMenu && this.props.parentSubmenu) {\r\n this.props.parentSubmenu.close();\r\n this.props.parentMenu.focus();\r\n }\r\n if (this.props.onEsc)\r\n this.props.onEsc(event);\r\n }\r\n\r\n if (event.key === SpecialKey.Escape) {\r\n // istanbul ignore else\r\n if (this.props.onEsc)\r\n this.props.onEsc(event);\r\n }\r\n\r\n if ((event.key === SpecialKey.Enter || event.key === SpecialKey.ArrowRight) && this._selectedElement) {\r\n event.stopPropagation();\r\n\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.Enter || /* istanbul ignore next */ this._selectedElement instanceof ContextSubMenu) {\r\n // istanbul ignore else\r\n if (this._selectedElement.select)\r\n this._selectedElement.select();\r\n }\r\n }\r\n\r\n let { selectedIndex } = this.state;\r\n if (event.key === SpecialKey.ArrowUp || event.key === SpecialKey.ArrowDown) {\r\n event.stopPropagation();\r\n if (selectedIndex === -1) {\r\n selectedIndex = 0;\r\n } else {\r\n if (event.key === SpecialKey.ArrowUp) {\r\n if (this.state.selectedIndex === 0)\r\n selectedIndex = this._length - 1;\r\n else\r\n selectedIndex--;\r\n }\r\n if (event.key === SpecialKey.ArrowDown) {\r\n if (this.state.selectedIndex === this._length - 1)\r\n selectedIndex = 0;\r\n else\r\n selectedIndex++;\r\n }\r\n }\r\n }\r\n this.setState({ selectedIndex });\r\n };\r\n\r\n public override componentDidUpdate(prevProps: ContextMenuProps) {\r\n if (prevProps.selectedIndex !== this.props.selectedIndex) {\r\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\r\n }\r\n if (!prevProps.opened && this.props.opened) {\r\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\r\n }\r\n if (!this.props.parentMenu) {\r\n // const direction = this.props.direction!;\r\n // if ((!this.props.opened && prevProps.opened && direction !== this.state.direction) || prevProps.direction !== direction)\r\n this.checkRenderDirection();\r\n }\r\n }\r\n}\r\n"]}
@@ -1,236 +1,236 @@
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
- @import "../icons/variables";
6
- @import "../inputs/variables";
7
- @import "../style/baseline";
8
- @import "../style/colors";
9
- @import "../style/opacity";
10
- @import "../style/themecolors";
11
- @import "../z-index";
12
-
13
- // cspell:ignore themecolors unbordered
14
-
15
- $uicore-menu-padding: $uicore-bordered-padding;
16
- $uicore-menu-top-bottom-padding: calc(#{$uicore-menu-padding} * 0.6667);
17
-
18
- .core-context-menu-global {
19
- position: fixed;
20
- width: 0px;
21
- height: 0px;
22
-
23
- @include uicore-z-index(context-menu-z);
24
- }
25
-
26
- .core-context-menu {
27
- color: var(--iui-color-text);
28
-
29
- &:hover {
30
- color: var(--iui-color-text-hover);
31
- cursor: auto;
32
- }
33
-
34
- width: 0px;
35
- height: 0px;
36
- position: relative;
37
-
38
- @include uicore-z-index(context-menu-z);
39
-
40
- .core-context-menu-container {
41
- position: absolute;
42
- border-radius: var(--iui-border-radius-1);
43
- padding: 4px 0;
44
- box-shadow: var(--iui-shadow-1);
45
- background-color: var(--iui-color-background);
46
- text-overflow: ellipsis;
47
- min-width: max-content;
48
- max-width: 350px;
49
- visibility: hidden;
50
- transform: scaleY(0);
51
- display: table;
52
- border: 1px solid var(--iui-color-border);
53
-
54
- &.core-context-menu-floating {
55
- position: fixed;
56
- }
57
-
58
- &.core-context-menu-opened {
59
- visibility: inherit;
60
- transform-origin: top;
61
- transform: scaleY(1);
62
- }
63
-
64
- &.core-context-menu-center {
65
- transform: translate(-50%, -50%);
66
- }
67
-
68
- &.core-context-menu-right {
69
- transform: translate(0%, -50%);
70
- }
71
-
72
- &.core-context-menu-left {
73
- transform: translate(-100%, -50%);
74
- }
75
-
76
- &.core-context-menu-top {
77
- transform: translate(-50%, -100%);
78
-
79
- &.core-context-menu-right {
80
- transform: translate(0%, -100%);
81
- }
82
-
83
- &.core-context-menu-left {
84
- transform: translate(-100%, -100%);
85
- }
86
- }
87
-
88
- &.core-context-menu-bottom {
89
- transform: translate(-50%, 0%);
90
-
91
- &.core-context-menu-right {
92
- transform: translate(0%, 0%);
93
- }
94
-
95
- &.core-context-menu-left {
96
- transform: translate(-100%, 0%);
97
- }
98
- }
99
-
100
- .core-context-menu-item {
101
- display: flex;
102
- cursor: default;
103
- padding: $uicore-menu-top-bottom-padding $uicore-menu-padding;
104
- width: calc(100% - 2 * #{$uicore-menu-padding});
105
- align-items: center;
106
- position: relative;
107
- box-sizing: content-box;
108
-
109
- &:hover {
110
- background-color: var(--iui-color-background-hover);
111
- }
112
-
113
- &.core-context-menu-is-selected {
114
- background-color: var(--iui-color-background-accent-muted);
115
- }
116
-
117
- &.core-context-menu-disabled {
118
- color: var(--iui-color-text-disabled);
119
- }
120
-
121
- &.core-context-menu-hidden {
122
- display: none;
123
- }
124
-
125
- > .core-context-menu-icon {
126
- flex-shrink: 0;
127
- flex-grow: 0;
128
- width: $uicore-icons-small;
129
- height: var(--iui-size-l);
130
- font-size: var(--iui-font-size-2);
131
- line-height: var(--iui-size-l);
132
- text-align: center;
133
- margin-right: $uicore-unbordered-padding;
134
- opacity: $uicore-opacity-2;
135
-
136
- &.core-context-menu-icon-right {
137
- margin-left: $uicore-unbordered-padding;
138
- margin-right: 0;
139
- }
140
- }
141
-
142
- > .core-context-menu-content {
143
- flex-shrink: 0;
144
- flex-grow: 1;
145
- font-size: var(--iui-font-size-1);
146
- text-align: left;
147
- }
148
-
149
- > .core-context-menu-badge {
150
- position: absolute;
151
- top: 0;
152
- left: 0;
153
- }
154
-
155
- &:focus {
156
- outline: none;
157
- }
158
- }
159
-
160
- &:focus {
161
- border: 1px solid $buic-background-divider;
162
- box-shadow: var(--iui-shadow-1);
163
- outline: 0px;
164
-
165
- > .core-context-menu-item.is-selected,
166
- > .context-submenu > .core-context-menu-item.is-selected {
167
- // .is-selected being applied on hover, overriding with hover color
168
- background-color: $buic-row-hover;
169
- }
170
- }
171
-
172
- .core-context-submenu {
173
- display: flex;
174
-
175
- &.core-context-menu-top {
176
- flex-direction: column;
177
- align-items: center;
178
- }
179
-
180
- &.core-context-menu-left {
181
- flex-direction: row-reverse;
182
- align-items: center;
183
- }
184
-
185
- &.core-context-menu-right {
186
- flex-direction: row;
187
- align-items: center;
188
- }
189
-
190
- &.core-context-menu-center {
191
- flex-direction: column;
192
- align-items: center;
193
- }
194
-
195
- &.core-context-menu-top.core-context-menu-left {
196
- flex-direction: column;
197
- align-items: flex-start;
198
- }
199
-
200
- &.core-context-menu-top.core-context-menu-right {
201
- flex-direction: row;
202
- align-items: flex-end;
203
- }
204
-
205
- &.core-context-menu-bottom.core-context-menu-left {
206
- flex-direction: row-reverse;
207
- align-items: flex-start;
208
- }
209
-
210
- &.core-context-menu-bottom.core-context-menu-right {
211
- flex-direction: row;
212
- align-items: flex-start;
213
- }
214
-
215
- .core-context-submenu-container .core-context-submenu-arrow {
216
- flex-shrink: 0;
217
- flex-grow: 0;
218
- margin-left: $uicore-unbordered-padding;
219
- width: $uicore-icons-small;
220
- height: var(--iui-size-l);
221
- font-size: calc(var(--iui-font-size-2) * 0.5);
222
- line-height: var(--iui-size-l);
223
- text-align: center;
224
- }
225
- }
226
- }
227
-
228
- .core-context-menu-divider {
229
- border-bottom: 1px solid var(--iui-color-border-foreground);
230
- height: 0px;
231
- }
232
-
233
- .core-context-submenu-popup {
234
- transform: translateY(-5px); // Compensate for the vertical padding
235
- }
236
- }
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
+ @import "../icons/variables";
6
+ @import "../inputs/variables";
7
+ @import "../style/baseline";
8
+ @import "../style/colors";
9
+ @import "../style/opacity";
10
+ @import "../style/themecolors";
11
+ @import "../z-index";
12
+
13
+ // cspell:ignore themecolors unbordered
14
+
15
+ $uicore-menu-padding: $uicore-bordered-padding;
16
+ $uicore-menu-top-bottom-padding: calc(#{$uicore-menu-padding} * 0.6667);
17
+
18
+ .core-context-menu-global {
19
+ position: fixed;
20
+ width: 0px;
21
+ height: 0px;
22
+
23
+ @include uicore-z-index(context-menu-z);
24
+ }
25
+
26
+ .core-context-menu {
27
+ color: var(--iui-color-text);
28
+
29
+ &:hover {
30
+ color: var(--iui-color-text-hover);
31
+ cursor: auto;
32
+ }
33
+
34
+ width: 0px;
35
+ height: 0px;
36
+ position: relative;
37
+
38
+ @include uicore-z-index(context-menu-z);
39
+
40
+ .core-context-menu-container {
41
+ position: absolute;
42
+ border-radius: var(--iui-border-radius-1);
43
+ padding: 4px 0;
44
+ box-shadow: var(--iui-shadow-1);
45
+ background-color: var(--iui-color-background);
46
+ text-overflow: ellipsis;
47
+ min-width: max-content;
48
+ max-width: 350px;
49
+ visibility: hidden;
50
+ transform: scaleY(0);
51
+ display: table;
52
+ border: 1px solid var(--iui-color-border);
53
+
54
+ &.core-context-menu-floating {
55
+ position: fixed;
56
+ }
57
+
58
+ &.core-context-menu-opened {
59
+ visibility: inherit;
60
+ transform-origin: top;
61
+ transform: scaleY(1);
62
+ }
63
+
64
+ &.core-context-menu-center {
65
+ transform: translate(-50%, -50%);
66
+ }
67
+
68
+ &.core-context-menu-right {
69
+ transform: translate(0%, -50%);
70
+ }
71
+
72
+ &.core-context-menu-left {
73
+ transform: translate(-100%, -50%);
74
+ }
75
+
76
+ &.core-context-menu-top {
77
+ transform: translate(-50%, -100%);
78
+
79
+ &.core-context-menu-right {
80
+ transform: translate(0%, -100%);
81
+ }
82
+
83
+ &.core-context-menu-left {
84
+ transform: translate(-100%, -100%);
85
+ }
86
+ }
87
+
88
+ &.core-context-menu-bottom {
89
+ transform: translate(-50%, 0%);
90
+
91
+ &.core-context-menu-right {
92
+ transform: translate(0%, 0%);
93
+ }
94
+
95
+ &.core-context-menu-left {
96
+ transform: translate(-100%, 0%);
97
+ }
98
+ }
99
+
100
+ .core-context-menu-item {
101
+ display: flex;
102
+ cursor: default;
103
+ padding: $uicore-menu-top-bottom-padding $uicore-menu-padding;
104
+ width: calc(100% - 2 * #{$uicore-menu-padding});
105
+ align-items: center;
106
+ position: relative;
107
+ box-sizing: content-box;
108
+
109
+ &:hover {
110
+ background-color: var(--iui-color-background-hover);
111
+ }
112
+
113
+ &.core-context-menu-is-selected {
114
+ background-color: var(--iui-color-background-accent-muted);
115
+ }
116
+
117
+ &.core-context-menu-disabled {
118
+ color: var(--iui-color-text-disabled);
119
+ }
120
+
121
+ &.core-context-menu-hidden {
122
+ display: none;
123
+ }
124
+
125
+ > .core-context-menu-icon {
126
+ flex-shrink: 0;
127
+ flex-grow: 0;
128
+ width: $uicore-icons-small;
129
+ height: var(--iui-size-l);
130
+ font-size: var(--iui-font-size-2);
131
+ line-height: var(--iui-size-l);
132
+ text-align: center;
133
+ margin-right: $uicore-unbordered-padding;
134
+ opacity: $uicore-opacity-2;
135
+
136
+ &.core-context-menu-icon-right {
137
+ margin-left: $uicore-unbordered-padding;
138
+ margin-right: 0;
139
+ }
140
+ }
141
+
142
+ > .core-context-menu-content {
143
+ flex-shrink: 0;
144
+ flex-grow: 1;
145
+ font-size: var(--iui-font-size-1);
146
+ text-align: left;
147
+ }
148
+
149
+ > .core-context-menu-badge {
150
+ position: absolute;
151
+ top: 0;
152
+ left: 0;
153
+ }
154
+
155
+ &:focus {
156
+ outline: none;
157
+ }
158
+ }
159
+
160
+ &:focus {
161
+ border: 1px solid $buic-background-divider;
162
+ box-shadow: var(--iui-shadow-1);
163
+ outline: 0px;
164
+
165
+ > .core-context-menu-item.is-selected,
166
+ > .context-submenu > .core-context-menu-item.is-selected {
167
+ // .is-selected being applied on hover, overriding with hover color
168
+ background-color: $buic-row-hover;
169
+ }
170
+ }
171
+
172
+ .core-context-submenu {
173
+ display: flex;
174
+
175
+ &.core-context-menu-top {
176
+ flex-direction: column;
177
+ align-items: center;
178
+ }
179
+
180
+ &.core-context-menu-left {
181
+ flex-direction: row-reverse;
182
+ align-items: center;
183
+ }
184
+
185
+ &.core-context-menu-right {
186
+ flex-direction: row;
187
+ align-items: center;
188
+ }
189
+
190
+ &.core-context-menu-center {
191
+ flex-direction: column;
192
+ align-items: center;
193
+ }
194
+
195
+ &.core-context-menu-top.core-context-menu-left {
196
+ flex-direction: column;
197
+ align-items: flex-start;
198
+ }
199
+
200
+ &.core-context-menu-top.core-context-menu-right {
201
+ flex-direction: row;
202
+ align-items: flex-end;
203
+ }
204
+
205
+ &.core-context-menu-bottom.core-context-menu-left {
206
+ flex-direction: row-reverse;
207
+ align-items: flex-start;
208
+ }
209
+
210
+ &.core-context-menu-bottom.core-context-menu-right {
211
+ flex-direction: row;
212
+ align-items: flex-start;
213
+ }
214
+
215
+ .core-context-submenu-container .core-context-submenu-arrow {
216
+ flex-shrink: 0;
217
+ flex-grow: 0;
218
+ margin-left: $uicore-unbordered-padding;
219
+ width: $uicore-icons-small;
220
+ height: var(--iui-size-l);
221
+ font-size: calc(var(--iui-font-size-2) * 0.5);
222
+ line-height: var(--iui-size-l);
223
+ text-align: center;
224
+ }
225
+ }
226
+ }
227
+
228
+ .core-context-menu-divider {
229
+ border-bottom: 1px solid var(--iui-color-border-foreground);
230
+ height: 0px;
231
+ }
232
+
233
+ .core-context-submenu-popup {
234
+ transform: translateY(-5px); // Compensate for the vertical padding
235
+ }
236
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuDirection.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDirection.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,iCAAS,CAAA;IACT,4CAAoB,CAAA;IAAE,mCAAW,CAAA;IAAE,8CAAsB,CAAA;IACzD,qCAAa,CAAA;IAAE,yCAAiB,CAAA;IAAE,uCAAe,CAAA;IACjD,kDAA0B,CAAA;IAAE,yCAAiB,CAAA;IAAE,oDAA4B,CAAA;AAC7E,CAAC,EALW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAK/B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContextMenu\n */\n\n/** Enum to specify where a [[ContextMenu]] should anchor to its parent element\n * @public\n */\nexport enum ContextMenuDirection {\n None = \"\",\n TopLeft = \"top left\", Top = \"top\", TopRight = \"top right\",\n Left = \"left\", Center = \"center\", Right = \"right\",\n BottomLeft = \"bottom left\", Bottom = \"bottom\", BottomRight = \"bottom right\",\n}\n"]}
1
+ {"version":3,"file":"ContextMenuDirection.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDirection.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,iCAAS,CAAA;IACT,4CAAoB,CAAA;IAAE,mCAAW,CAAA;IAAE,8CAAsB,CAAA;IACzD,qCAAa,CAAA;IAAE,yCAAiB,CAAA;IAAE,uCAAe,CAAA;IACjD,kDAA0B,CAAA;IAAE,yCAAiB,CAAA;IAAE,oDAA4B,CAAA;AAC7E,CAAC,EALW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAK/B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\n/** Enum to specify where a [[ContextMenu]] should anchor to its parent element\r\n * @public\r\n */\r\nexport enum ContextMenuDirection {\r\n None = \"\",\r\n TopLeft = \"top left\", Top = \"top\", TopRight = \"top right\",\r\n Left = \"left\", Center = \"center\", Right = \"right\",\r\n BottomLeft = \"bottom left\", Bottom = \"bottom\", BottomRight = \"bottom right\",\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuDivider.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDivider.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,2CAAoC;AAGpC;;;GAGG;AACH,MAAa,kBAAmB,SAAQ,KAAK,CAAC,aAA0B;IACtD,MAAM;QACpB,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC3C,OAAO,CACL,gCAAS,KAAK,iBAAc,2BAA2B,EAAC,SAAS,EAAE,IAAA,oBAAU,EAAC,2BAA2B,EAAE,SAAS,CAAC,GAAI,CAC1H,CAAC;IACJ,CAAC;CACF;AAPD,gDAOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContextMenu\n */\n\nimport * as React from \"react\";\nimport classnames from \"classnames\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/**\n * Menu Divider for [[ContextMenu]]. Inserts a line between items, used for list item grouping.\n * @public\n */\nexport class ContextMenuDivider extends React.PureComponent<CommonProps> {\n public override render(): JSX.Element {\n const { className, ...props } = this.props;\n return (\n <div {...props} data-testid=\"core-context-menu-divider\" className={classnames(\"core-context-menu-divider\", className)} />\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ContextMenuDivider.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDivider.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,2CAAoC;AAGpC;;;GAGG;AACH,MAAa,kBAAmB,SAAQ,KAAK,CAAC,aAA0B;IACtD,MAAM;QACpB,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC3C,OAAO,CACL,gCAAS,KAAK,iBAAc,2BAA2B,EAAC,SAAS,EAAE,IAAA,oBAAU,EAAC,2BAA2B,EAAE,SAAS,CAAC,GAAI,CAC1H,CAAC;IACJ,CAAC;CACF;AAPD,gDAOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport type { CommonProps } from \"../utils/Props\";\r\n\r\n/**\r\n * Menu Divider for [[ContextMenu]]. Inserts a line between items, used for list item grouping.\r\n * @public\r\n */\r\nexport class ContextMenuDivider extends React.PureComponent<CommonProps> {\r\n public override render(): JSX.Element {\r\n const { className, ...props } = this.props;\r\n return (\r\n <div {...props} data-testid=\"core-context-menu-divider\" className={classnames(\"core-context-menu-divider\", className)} />\r\n );\r\n }\r\n}\r\n"]}