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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (685) hide show
  1. package/CHANGELOG.md +32 -7
  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.d.ts +1 -1
  10. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  11. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  12. package/lib/cjs/core-react/autosuggest/AutoSuggest.scss +79 -79
  13. package/lib/cjs/core-react/badge/Badge.d.ts +1 -1
  14. package/lib/cjs/core-react/badge/Badge.d.ts.map +1 -1
  15. package/lib/cjs/core-react/badge/Badge.js.map +1 -1
  16. package/lib/cjs/core-react/badge/Badge.scss +13 -13
  17. package/lib/cjs/core-react/badge/BadgeUtilities.js.map +1 -1
  18. package/lib/cjs/core-react/badge/BetaBadge.d.ts +1 -1
  19. package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
  20. package/lib/cjs/core-react/badge/BetaBadge.js.map +1 -1
  21. package/lib/cjs/core-react/badge/NewBadge.d.ts +1 -1
  22. package/lib/cjs/core-react/badge/NewBadge.d.ts.map +1 -1
  23. package/lib/cjs/core-react/badge/NewBadge.js.map +1 -1
  24. package/lib/cjs/core-react/badge/NewBadge.scss +9 -9
  25. package/lib/cjs/core-react/base/Centered.d.ts +1 -1
  26. package/lib/cjs/core-react/base/Centered.d.ts.map +1 -1
  27. package/lib/cjs/core-react/base/Centered.js.map +1 -1
  28. package/lib/cjs/core-react/base/Div.d.ts +1 -1
  29. package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
  30. package/lib/cjs/core-react/base/Div.js.map +1 -1
  31. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +1 -1
  32. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  33. package/lib/cjs/core-react/base/DivWithOutsideClick.js.map +1 -1
  34. package/lib/cjs/core-react/base/FillCentered.d.ts +1 -1
  35. package/lib/cjs/core-react/base/FillCentered.d.ts.map +1 -1
  36. package/lib/cjs/core-react/base/FillCentered.js.map +1 -1
  37. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +1 -1
  38. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  39. package/lib/cjs/core-react/base/FlexWrapContainer.js.map +1 -1
  40. package/lib/cjs/core-react/base/Gap.d.ts +1 -1
  41. package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
  42. package/lib/cjs/core-react/base/Gap.js +1 -1
  43. package/lib/cjs/core-react/base/Gap.js.map +1 -1
  44. package/lib/cjs/core-react/base/PointerEvents.js.map +1 -1
  45. package/lib/cjs/core-react/base/ScrollView.d.ts +1 -1
  46. package/lib/cjs/core-react/base/ScrollView.d.ts.map +1 -1
  47. package/lib/cjs/core-react/base/ScrollView.js.map +1 -1
  48. package/lib/cjs/core-react/base/base.scss +42 -42
  49. package/lib/cjs/core-react/base/classes.scss +13 -13
  50. package/lib/cjs/core-react/base/index.scss +5 -5
  51. package/lib/cjs/core-react/button/UnderlinedButton.js.map +1 -1
  52. package/lib/cjs/core-react/button/UnderlinedButton.scss +32 -32
  53. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +1 -1
  54. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  55. package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
  56. package/lib/cjs/core-react/checklistbox/CheckListBox.scss +21 -21
  57. package/lib/cjs/core-react/classes.scss +11 -11
  58. package/lib/cjs/core-react/colorthemes.scss +61 -61
  59. package/lib/cjs/core-react/colorvariables.scss +131 -131
  60. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +1 -1
  61. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  62. package/lib/cjs/core-react/contextmenu/ContextMenu.js +2 -1
  63. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  64. package/lib/cjs/core-react/contextmenu/ContextMenu.scss +236 -236
  65. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
  66. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  67. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  68. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  69. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts +5 -4
  70. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  71. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  72. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts +3 -3
  73. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  74. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  75. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts +1 -1
  76. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  77. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js +5 -3
  78. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  79. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts +1 -1
  80. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  81. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  82. package/lib/cjs/core-react/contextmenu/TildeFinder.js.map +1 -1
  83. package/lib/cjs/core-react/dialog/Dialog.d.ts +3 -3
  84. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  85. package/lib/cjs/core-react/dialog/Dialog.js +2 -1
  86. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  87. package/lib/cjs/core-react/dialog/Dialog.scss +245 -245
  88. package/lib/cjs/core-react/dialog/GlobalDialog.d.ts +1 -1
  89. package/lib/cjs/core-react/dialog/GlobalDialog.d.ts.map +1 -1
  90. package/lib/cjs/core-react/dialog/GlobalDialog.js +2 -1
  91. package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
  92. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +1 -1
  93. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  94. package/lib/cjs/core-react/elementseparator/ElementSeparator.js +2 -2
  95. package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
  96. package/lib/cjs/core-react/elementseparator/ElementSeparator.scss +85 -85
  97. package/lib/cjs/core-react/enums/Alignment.js.map +1 -1
  98. package/lib/cjs/core-react/enums/CheckBoxState.js.map +1 -1
  99. package/lib/cjs/core-react/enums/Orientation.js.map +1 -1
  100. package/lib/cjs/core-react/enums/SortDirection.js.map +1 -1
  101. package/lib/cjs/core-react/enums/TimeFormat.js.map +1 -1
  102. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +1 -1
  103. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  104. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  105. package/lib/cjs/core-react/expandable/ExpandableList.scss +8 -8
  106. package/lib/cjs/core-react/expandable/classes.scss +7 -7
  107. package/lib/cjs/core-react/expandable/index.scss +5 -5
  108. package/lib/cjs/core-react/expandable/list.scss +35 -35
  109. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
  110. package/lib/cjs/core-react/focustrap/FocusTrap.js.map +1 -1
  111. package/lib/cjs/core-react/hocs/withIsPressed.js.map +1 -1
  112. package/lib/cjs/core-react/hocs/withOnOutsideClick.js +2 -1
  113. package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
  114. package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
  115. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts +1 -1
  116. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
  117. package/lib/cjs/core-react/icons/ConditionalIconItem.js.map +1 -1
  118. package/lib/cjs/core-react/icons/IconComponent.d.ts +2 -2
  119. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  120. package/lib/cjs/core-react/icons/IconComponent.js +1 -1
  121. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  122. package/lib/cjs/core-react/icons/IconComponent.scss +20 -20
  123. package/lib/cjs/core-react/icons/SvgPath.d.ts +1 -1
  124. package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
  125. package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
  126. package/lib/cjs/core-react/icons/SvgPath.scss +15 -15
  127. package/lib/cjs/core-react/icons/WebFontIcon.d.ts +1 -1
  128. package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
  129. package/lib/cjs/core-react/icons/WebFontIcon.js.map +1 -1
  130. package/lib/cjs/core-react/icons/WebFontIcon.scss +17 -17
  131. package/lib/cjs/core-react/icons/classes.scss +10 -10
  132. package/lib/cjs/core-react/icons/index.scss +6 -6
  133. package/lib/cjs/core-react/icons/mixins.scss +25 -25
  134. package/lib/cjs/core-react/icons/variables.scss +12 -12
  135. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +1 -1
  136. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  137. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  138. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.scss +54 -54
  139. package/lib/cjs/core-react/index.scss +21 -21
  140. package/lib/cjs/core-react/inputs/Input.d.ts +1 -1
  141. package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
  142. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  143. package/lib/cjs/core-react/inputs/InputLabel.d.ts +2 -2
  144. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  145. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  146. package/lib/cjs/core-react/inputs/InputStatus.js.map +1 -1
  147. package/lib/cjs/core-react/inputs/LabeledComponentProps.d.ts +2 -2
  148. package/lib/cjs/core-react/inputs/LabeledComponentProps.d.ts.map +1 -1
  149. package/lib/cjs/core-react/inputs/LabeledComponentProps.js.map +1 -1
  150. package/lib/cjs/core-react/inputs/classes.scss +8 -8
  151. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  152. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  153. package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
  154. package/lib/cjs/core-react/inputs/iconinput/IconInput.scss +35 -35
  155. package/lib/cjs/core-react/inputs/index.scss +9 -9
  156. package/lib/cjs/core-react/inputs/input-label.scss +90 -90
  157. package/lib/cjs/core-react/inputs/input.scss +58 -58
  158. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +1 -1
  159. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  160. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  161. package/lib/cjs/core-react/inputs/numberinput/NumberInput.scss +88 -88
  162. package/lib/cjs/core-react/inputs/variables.scss +38 -38
  163. package/lib/cjs/core-react/layout-variables.scss +17 -17
  164. package/lib/cjs/core-react/listbox/Listbox.js +3 -2
  165. package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
  166. package/lib/cjs/core-react/listbox/Listbox.scss +54 -54
  167. package/lib/cjs/core-react/loading/LoadingBar.d.ts +1 -1
  168. package/lib/cjs/core-react/loading/LoadingBar.d.ts.map +1 -1
  169. package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
  170. package/lib/cjs/core-react/loading/LoadingBar.scss +29 -29
  171. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +1 -1
  172. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts.map +1 -1
  173. package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
  174. package/lib/cjs/core-react/loading/LoadingPrompt.scss +33 -33
  175. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +1 -1
  176. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  177. package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
  178. package/lib/cjs/core-react/loading/LoadingSpinner.scss +26 -26
  179. package/lib/cjs/core-react/loading/LoadingStatus.d.ts +1 -1
  180. package/lib/cjs/core-react/loading/LoadingStatus.d.ts.map +1 -1
  181. package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
  182. package/lib/cjs/core-react/loading/LoadingStatus.scss +20 -20
  183. package/lib/cjs/core-react/loading/index.scss +5 -5
  184. package/lib/cjs/core-react/loading/mixins.scss +57 -57
  185. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +4 -3
  186. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  187. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  188. package/lib/cjs/core-react/messagebox/MessageBox.scss +56 -56
  189. package/lib/cjs/core-react/notification/MessageRenderer.d.ts +2 -2
  190. package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
  191. package/lib/cjs/core-react/notification/MessageRenderer.js +1 -1
  192. package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
  193. package/lib/cjs/core-react/notification/MessageType.d.ts +1 -1
  194. package/lib/cjs/core-react/notification/MessageType.d.ts.map +1 -1
  195. package/lib/cjs/core-react/notification/MessageType.js.map +1 -1
  196. package/lib/cjs/core-react/popup/Popup.d.ts +1 -1
  197. package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
  198. package/lib/cjs/core-react/popup/Popup.js +8 -4
  199. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  200. package/lib/cjs/core-react/popup/Popup.scss +240 -240
  201. package/lib/cjs/core-react/radialmenu/Annulus.js.map +1 -1
  202. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +2 -2
  203. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  204. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  205. package/lib/cjs/core-react/radialmenu/RadialMenu.scss +55 -55
  206. package/lib/cjs/core-react/searchbox/SearchBox.d.ts +1 -1
  207. package/lib/cjs/core-react/searchbox/SearchBox.d.ts.map +1 -1
  208. package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
  209. package/lib/cjs/core-react/searchbox/SearchBox.scss +47 -47
  210. package/lib/cjs/core-react/settings/SettingsContainer.d.ts +1 -1
  211. package/lib/cjs/core-react/settings/SettingsContainer.d.ts.map +1 -1
  212. package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
  213. package/lib/cjs/core-react/settings/SettingsContainer.scss +68 -68
  214. package/lib/cjs/core-react/settings/SettingsManager.d.ts +1 -1
  215. package/lib/cjs/core-react/settings/SettingsManager.d.ts.map +1 -1
  216. package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
  217. package/lib/cjs/core-react/style/baseline.scss +11 -11
  218. package/lib/cjs/core-react/style/breakpoints.scss +41 -41
  219. package/lib/cjs/core-react/style/colors.scss +77 -77
  220. package/lib/cjs/core-react/style/index.scss +10 -10
  221. package/lib/cjs/core-react/style/mixins.scss +27 -27
  222. package/lib/cjs/core-react/style/opacity.scss +16 -16
  223. package/lib/cjs/core-react/style/themecolors.scss +123 -123
  224. package/lib/cjs/core-react/tabs/Tabs.d.ts +1 -1
  225. package/lib/cjs/core-react/tabs/Tabs.d.ts.map +1 -1
  226. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  227. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +1 -1
  228. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  229. package/lib/cjs/core-react/tabs/VerticalTabs.js.map +1 -1
  230. package/lib/cjs/core-react/tabs/classes.scss +7 -7
  231. package/lib/cjs/core-react/tabs/index.scss +5 -5
  232. package/lib/cjs/core-react/tabs/tabs.scss +96 -96
  233. package/lib/cjs/core-react/tabs/vertical.scss +51 -51
  234. package/lib/cjs/core-react/text/BlockText.d.ts +1 -1
  235. package/lib/cjs/core-react/text/BlockText.d.ts.map +1 -1
  236. package/lib/cjs/core-react/text/BlockText.js.map +1 -1
  237. package/lib/cjs/core-react/text/BodyText.d.ts +1 -1
  238. package/lib/cjs/core-react/text/BodyText.d.ts.map +1 -1
  239. package/lib/cjs/core-react/text/BodyText.js.map +1 -1
  240. package/lib/cjs/core-react/text/DisabledText.d.ts +1 -1
  241. package/lib/cjs/core-react/text/DisabledText.d.ts.map +1 -1
  242. package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
  243. package/lib/cjs/core-react/text/FilteredText.d.ts +2 -2
  244. package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
  245. package/lib/cjs/core-react/text/FilteredText.js.map +1 -1
  246. package/lib/cjs/core-react/text/FilteredText.scss +10 -10
  247. package/lib/cjs/core-react/text/MutedText.d.ts +1 -1
  248. package/lib/cjs/core-react/text/MutedText.d.ts.map +1 -1
  249. package/lib/cjs/core-react/text/MutedText.js.map +1 -1
  250. package/lib/cjs/core-react/text/StyledText.d.ts +1 -1
  251. package/lib/cjs/core-react/text/StyledText.d.ts.map +1 -1
  252. package/lib/cjs/core-react/text/StyledText.js.map +1 -1
  253. package/lib/cjs/core-react/text/TextProps.d.ts +2 -2
  254. package/lib/cjs/core-react/text/TextProps.d.ts.map +1 -1
  255. package/lib/cjs/core-react/text/TextProps.js.map +1 -1
  256. package/lib/cjs/core-react/text/block.scss +15 -15
  257. package/lib/cjs/core-react/text/body.scss +13 -13
  258. package/lib/cjs/core-react/text/classes.scss +10 -10
  259. package/lib/cjs/core-react/text/disabled.scss +10 -10
  260. package/lib/cjs/core-react/text/index.scss +10 -10
  261. package/lib/cjs/core-react/text/mixins.scss +24 -24
  262. package/lib/cjs/core-react/text/muted.scss +10 -10
  263. package/lib/cjs/core-react/tree/Branch.d.ts +1 -1
  264. package/lib/cjs/core-react/tree/Branch.d.ts.map +1 -1
  265. package/lib/cjs/core-react/tree/Branch.js.map +1 -1
  266. package/lib/cjs/core-react/tree/Branch.scss +12 -12
  267. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts +1 -1
  268. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  269. package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
  270. package/lib/cjs/core-react/tree/ExpansionToggle.scss +32 -32
  271. package/lib/cjs/core-react/tree/Node.d.ts +3 -3
  272. package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
  273. package/lib/cjs/core-react/tree/Node.js +2 -1
  274. package/lib/cjs/core-react/tree/Node.js.map +1 -1
  275. package/lib/cjs/core-react/tree/Node.scss +68 -68
  276. package/lib/cjs/core-react/tree/Placeholder.d.ts +1 -1
  277. package/lib/cjs/core-react/tree/Placeholder.d.ts.map +1 -1
  278. package/lib/cjs/core-react/tree/Placeholder.js.map +1 -1
  279. package/lib/cjs/core-react/tree/Placeholder.scss +17 -17
  280. package/lib/cjs/core-react/tree/Tree.d.ts +1 -1
  281. package/lib/cjs/core-react/tree/Tree.d.ts.map +1 -1
  282. package/lib/cjs/core-react/tree/Tree.js.map +1 -1
  283. package/lib/cjs/core-react/tree/Tree.scss +21 -21
  284. package/lib/cjs/core-react/uistate/LocalStateStorage.d.ts +1 -1
  285. package/lib/cjs/core-react/uistate/LocalStateStorage.d.ts.map +1 -1
  286. package/lib/cjs/core-react/uistate/LocalStateStorage.js.map +1 -1
  287. package/lib/cjs/core-react/uistate/UiStateEntry.d.ts +1 -1
  288. package/lib/cjs/core-react/uistate/UiStateEntry.d.ts.map +1 -1
  289. package/lib/cjs/core-react/uistate/UiStateEntry.js.map +1 -1
  290. package/lib/cjs/core-react/uistate/UiStateStorage.js.map +1 -1
  291. package/lib/cjs/core-react/utils/IconHelper.d.ts +1 -1
  292. package/lib/cjs/core-react/utils/IconHelper.d.ts.map +1 -1
  293. package/lib/cjs/core-react/utils/IconHelper.js.map +1 -1
  294. package/lib/cjs/core-react/utils/IconWebComponent.js +1 -1
  295. package/lib/cjs/core-react/utils/IconWebComponent.js.map +1 -1
  296. package/lib/cjs/core-react/utils/Point.d.ts +1 -1
  297. package/lib/cjs/core-react/utils/Point.d.ts.map +1 -1
  298. package/lib/cjs/core-react/utils/Point.js.map +1 -1
  299. package/lib/cjs/core-react/utils/Props.d.ts +2 -2
  300. package/lib/cjs/core-react/utils/Props.d.ts.map +1 -1
  301. package/lib/cjs/core-react/utils/Props.js.map +1 -1
  302. package/lib/cjs/core-react/utils/Rectangle.d.ts +3 -2
  303. package/lib/cjs/core-react/utils/Rectangle.d.ts.map +1 -1
  304. package/lib/cjs/core-react/utils/Rectangle.js.map +1 -1
  305. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts +1 -1
  306. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  307. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  308. package/lib/cjs/core-react/utils/Size.js.map +1 -1
  309. package/lib/cjs/core-react/utils/Timer.js.map +1 -1
  310. package/lib/cjs/core-react/utils/UiGeometry.js.map +1 -1
  311. package/lib/cjs/core-react/utils/flattenChildren.js.map +1 -1
  312. package/lib/cjs/core-react/utils/getBestBWContrastColor.js.map +1 -1
  313. package/lib/cjs/core-react/utils/getCssVariable.js +1 -1
  314. package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
  315. package/lib/cjs/core-react/utils/getDisplayName.d.ts +1 -1
  316. package/lib/cjs/core-react/utils/getDisplayName.d.ts.map +1 -1
  317. package/lib/cjs/core-react/utils/getDisplayName.js.map +1 -1
  318. package/lib/cjs/core-react/utils/getUserColor.js.map +1 -1
  319. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
  320. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +2 -1
  321. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  322. package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts +1 -1
  323. package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  324. package/lib/cjs/core-react/utils/hooks/useDisposable.js.map +1 -1
  325. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  326. package/lib/cjs/core-react/utils/hooks/useEventListener.js.map +1 -1
  327. package/lib/cjs/core-react/utils/hooks/useInterval.js.map +1 -1
  328. package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.js.map +1 -1
  329. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  330. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
  331. package/lib/cjs/core-react/utils/hooks/useRefEffect.js.map +1 -1
  332. package/lib/cjs/core-react/utils/hooks/useRefState.js.map +1 -1
  333. package/lib/cjs/core-react/utils/hooks/useRefs.js.map +1 -1
  334. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +13 -8
  335. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  336. package/lib/cjs/core-react/utils/hooks/useTargeted.js.map +1 -1
  337. package/lib/cjs/core-react/utils/hooks/useThrottledFn.js.map +1 -1
  338. package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.js.map +1 -1
  339. package/lib/cjs/core-react/utils/isPromiseLike.js.map +1 -1
  340. package/lib/cjs/core-react/utils/shallowDiffers.js.map +1 -1
  341. package/lib/cjs/core-react/utils/typeUtils.js.map +1 -1
  342. package/lib/cjs/core-react.js.map +1 -1
  343. package/lib/esm/core-react/UiCore.js.map +1 -1
  344. package/lib/esm/core-react/_geometry.scss +70 -70
  345. package/lib/esm/core-react/_helpers.scss +51 -51
  346. package/lib/esm/core-react/_math.scss +13 -13
  347. package/lib/esm/core-react/_scrollbar.scss +51 -51
  348. package/lib/esm/core-react/_typography.scss +44 -44
  349. package/lib/esm/core-react/_z-index.scss +65 -65
  350. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  351. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  352. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  353. package/lib/esm/core-react/autosuggest/AutoSuggest.scss +79 -79
  354. package/lib/esm/core-react/badge/Badge.d.ts +1 -1
  355. package/lib/esm/core-react/badge/Badge.d.ts.map +1 -1
  356. package/lib/esm/core-react/badge/Badge.js.map +1 -1
  357. package/lib/esm/core-react/badge/Badge.scss +13 -13
  358. package/lib/esm/core-react/badge/BadgeUtilities.js.map +1 -1
  359. package/lib/esm/core-react/badge/BetaBadge.d.ts +1 -1
  360. package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
  361. package/lib/esm/core-react/badge/BetaBadge.js.map +1 -1
  362. package/lib/esm/core-react/badge/NewBadge.d.ts +1 -1
  363. package/lib/esm/core-react/badge/NewBadge.d.ts.map +1 -1
  364. package/lib/esm/core-react/badge/NewBadge.js.map +1 -1
  365. package/lib/esm/core-react/badge/NewBadge.scss +9 -9
  366. package/lib/esm/core-react/base/Centered.d.ts +1 -1
  367. package/lib/esm/core-react/base/Centered.d.ts.map +1 -1
  368. package/lib/esm/core-react/base/Centered.js.map +1 -1
  369. package/lib/esm/core-react/base/Div.d.ts +1 -1
  370. package/lib/esm/core-react/base/Div.d.ts.map +1 -1
  371. package/lib/esm/core-react/base/Div.js.map +1 -1
  372. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +1 -1
  373. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  374. package/lib/esm/core-react/base/DivWithOutsideClick.js.map +1 -1
  375. package/lib/esm/core-react/base/FillCentered.d.ts +1 -1
  376. package/lib/esm/core-react/base/FillCentered.d.ts.map +1 -1
  377. package/lib/esm/core-react/base/FillCentered.js.map +1 -1
  378. package/lib/esm/core-react/base/FlexWrapContainer.d.ts +1 -1
  379. package/lib/esm/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  380. package/lib/esm/core-react/base/FlexWrapContainer.js.map +1 -1
  381. package/lib/esm/core-react/base/Gap.d.ts +1 -1
  382. package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
  383. package/lib/esm/core-react/base/Gap.js +1 -1
  384. package/lib/esm/core-react/base/Gap.js.map +1 -1
  385. package/lib/esm/core-react/base/PointerEvents.js.map +1 -1
  386. package/lib/esm/core-react/base/ScrollView.d.ts +1 -1
  387. package/lib/esm/core-react/base/ScrollView.d.ts.map +1 -1
  388. package/lib/esm/core-react/base/ScrollView.js.map +1 -1
  389. package/lib/esm/core-react/base/base.scss +42 -42
  390. package/lib/esm/core-react/base/classes.scss +13 -13
  391. package/lib/esm/core-react/base/index.scss +5 -5
  392. package/lib/esm/core-react/button/UnderlinedButton.js.map +1 -1
  393. package/lib/esm/core-react/button/UnderlinedButton.scss +32 -32
  394. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +1 -1
  395. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  396. package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
  397. package/lib/esm/core-react/checklistbox/CheckListBox.scss +21 -21
  398. package/lib/esm/core-react/classes.scss +11 -11
  399. package/lib/esm/core-react/colorthemes.scss +61 -61
  400. package/lib/esm/core-react/colorvariables.scss +131 -131
  401. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +1 -1
  402. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  403. package/lib/esm/core-react/contextmenu/ContextMenu.js +2 -1
  404. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  405. package/lib/esm/core-react/contextmenu/ContextMenu.scss +236 -236
  406. package/lib/esm/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
  407. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  408. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  409. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  410. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts +5 -4
  411. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  412. package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  413. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts +3 -3
  414. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  415. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  416. package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts +1 -1
  417. package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  418. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js +5 -3
  419. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  420. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts +1 -1
  421. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  422. package/lib/esm/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  423. package/lib/esm/core-react/contextmenu/TildeFinder.js.map +1 -1
  424. package/lib/esm/core-react/dialog/Dialog.d.ts +3 -3
  425. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  426. package/lib/esm/core-react/dialog/Dialog.js +2 -1
  427. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  428. package/lib/esm/core-react/dialog/Dialog.scss +245 -245
  429. package/lib/esm/core-react/dialog/GlobalDialog.d.ts +1 -1
  430. package/lib/esm/core-react/dialog/GlobalDialog.d.ts.map +1 -1
  431. package/lib/esm/core-react/dialog/GlobalDialog.js +2 -1
  432. package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
  433. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +1 -1
  434. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  435. package/lib/esm/core-react/elementseparator/ElementSeparator.js +2 -2
  436. package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
  437. package/lib/esm/core-react/elementseparator/ElementSeparator.scss +85 -85
  438. package/lib/esm/core-react/enums/Alignment.js.map +1 -1
  439. package/lib/esm/core-react/enums/CheckBoxState.js.map +1 -1
  440. package/lib/esm/core-react/enums/Orientation.js.map +1 -1
  441. package/lib/esm/core-react/enums/SortDirection.js.map +1 -1
  442. package/lib/esm/core-react/enums/TimeFormat.js.map +1 -1
  443. package/lib/esm/core-react/expandable/ExpandableList.d.ts +1 -1
  444. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  445. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  446. package/lib/esm/core-react/expandable/ExpandableList.scss +8 -8
  447. package/lib/esm/core-react/expandable/classes.scss +7 -7
  448. package/lib/esm/core-react/expandable/index.scss +5 -5
  449. package/lib/esm/core-react/expandable/list.scss +35 -35
  450. package/lib/esm/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
  451. package/lib/esm/core-react/focustrap/FocusTrap.js.map +1 -1
  452. package/lib/esm/core-react/hocs/withIsPressed.js.map +1 -1
  453. package/lib/esm/core-react/hocs/withOnOutsideClick.js +2 -1
  454. package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
  455. package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
  456. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts +1 -1
  457. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
  458. package/lib/esm/core-react/icons/ConditionalIconItem.js.map +1 -1
  459. package/lib/esm/core-react/icons/IconComponent.d.ts +2 -2
  460. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  461. package/lib/esm/core-react/icons/IconComponent.js +1 -1
  462. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  463. package/lib/esm/core-react/icons/IconComponent.scss +20 -20
  464. package/lib/esm/core-react/icons/SvgPath.d.ts +1 -1
  465. package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
  466. package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
  467. package/lib/esm/core-react/icons/SvgPath.scss +15 -15
  468. package/lib/esm/core-react/icons/WebFontIcon.d.ts +1 -1
  469. package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
  470. package/lib/esm/core-react/icons/WebFontIcon.js.map +1 -1
  471. package/lib/esm/core-react/icons/WebFontIcon.scss +17 -17
  472. package/lib/esm/core-react/icons/classes.scss +10 -10
  473. package/lib/esm/core-react/icons/index.scss +6 -6
  474. package/lib/esm/core-react/icons/mixins.scss +25 -25
  475. package/lib/esm/core-react/icons/variables.scss +12 -12
  476. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +1 -1
  477. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  478. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  479. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.scss +54 -54
  480. package/lib/esm/core-react/index.scss +21 -21
  481. package/lib/esm/core-react/inputs/Input.d.ts +1 -1
  482. package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
  483. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  484. package/lib/esm/core-react/inputs/InputLabel.d.ts +2 -2
  485. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  486. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  487. package/lib/esm/core-react/inputs/InputStatus.js.map +1 -1
  488. package/lib/esm/core-react/inputs/LabeledComponentProps.d.ts +2 -2
  489. package/lib/esm/core-react/inputs/LabeledComponentProps.d.ts.map +1 -1
  490. package/lib/esm/core-react/inputs/LabeledComponentProps.js.map +1 -1
  491. package/lib/esm/core-react/inputs/classes.scss +8 -8
  492. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  493. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  494. package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
  495. package/lib/esm/core-react/inputs/iconinput/IconInput.scss +35 -35
  496. package/lib/esm/core-react/inputs/index.scss +9 -9
  497. package/lib/esm/core-react/inputs/input-label.scss +90 -90
  498. package/lib/esm/core-react/inputs/input.scss +58 -58
  499. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +1 -1
  500. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  501. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  502. package/lib/esm/core-react/inputs/numberinput/NumberInput.scss +88 -88
  503. package/lib/esm/core-react/inputs/variables.scss +38 -38
  504. package/lib/esm/core-react/layout-variables.scss +17 -17
  505. package/lib/esm/core-react/listbox/Listbox.js +3 -2
  506. package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
  507. package/lib/esm/core-react/listbox/Listbox.scss +54 -54
  508. package/lib/esm/core-react/loading/LoadingBar.d.ts +1 -1
  509. package/lib/esm/core-react/loading/LoadingBar.d.ts.map +1 -1
  510. package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
  511. package/lib/esm/core-react/loading/LoadingBar.scss +29 -29
  512. package/lib/esm/core-react/loading/LoadingPrompt.d.ts +1 -1
  513. package/lib/esm/core-react/loading/LoadingPrompt.d.ts.map +1 -1
  514. package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
  515. package/lib/esm/core-react/loading/LoadingPrompt.scss +33 -33
  516. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +1 -1
  517. package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  518. package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
  519. package/lib/esm/core-react/loading/LoadingSpinner.scss +26 -26
  520. package/lib/esm/core-react/loading/LoadingStatus.d.ts +1 -1
  521. package/lib/esm/core-react/loading/LoadingStatus.d.ts.map +1 -1
  522. package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
  523. package/lib/esm/core-react/loading/LoadingStatus.scss +20 -20
  524. package/lib/esm/core-react/loading/index.scss +5 -5
  525. package/lib/esm/core-react/loading/mixins.scss +57 -57
  526. package/lib/esm/core-react/messagebox/MessageBox.d.ts +4 -3
  527. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  528. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  529. package/lib/esm/core-react/messagebox/MessageBox.scss +56 -56
  530. package/lib/esm/core-react/notification/MessageRenderer.d.ts +2 -2
  531. package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
  532. package/lib/esm/core-react/notification/MessageRenderer.js +1 -1
  533. package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
  534. package/lib/esm/core-react/notification/MessageType.d.ts +1 -1
  535. package/lib/esm/core-react/notification/MessageType.d.ts.map +1 -1
  536. package/lib/esm/core-react/notification/MessageType.js.map +1 -1
  537. package/lib/esm/core-react/popup/Popup.d.ts +1 -1
  538. package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
  539. package/lib/esm/core-react/popup/Popup.js +8 -4
  540. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  541. package/lib/esm/core-react/popup/Popup.scss +240 -240
  542. package/lib/esm/core-react/radialmenu/Annulus.js.map +1 -1
  543. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +2 -2
  544. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  545. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  546. package/lib/esm/core-react/radialmenu/RadialMenu.scss +55 -55
  547. package/lib/esm/core-react/searchbox/SearchBox.d.ts +1 -1
  548. package/lib/esm/core-react/searchbox/SearchBox.d.ts.map +1 -1
  549. package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
  550. package/lib/esm/core-react/searchbox/SearchBox.scss +47 -47
  551. package/lib/esm/core-react/settings/SettingsContainer.d.ts +1 -1
  552. package/lib/esm/core-react/settings/SettingsContainer.d.ts.map +1 -1
  553. package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
  554. package/lib/esm/core-react/settings/SettingsContainer.scss +68 -68
  555. package/lib/esm/core-react/settings/SettingsManager.d.ts +1 -1
  556. package/lib/esm/core-react/settings/SettingsManager.d.ts.map +1 -1
  557. package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
  558. package/lib/esm/core-react/style/baseline.scss +11 -11
  559. package/lib/esm/core-react/style/breakpoints.scss +41 -41
  560. package/lib/esm/core-react/style/colors.scss +77 -77
  561. package/lib/esm/core-react/style/index.scss +10 -10
  562. package/lib/esm/core-react/style/mixins.scss +27 -27
  563. package/lib/esm/core-react/style/opacity.scss +16 -16
  564. package/lib/esm/core-react/style/themecolors.scss +123 -123
  565. package/lib/esm/core-react/tabs/Tabs.d.ts +1 -1
  566. package/lib/esm/core-react/tabs/Tabs.d.ts.map +1 -1
  567. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  568. package/lib/esm/core-react/tabs/VerticalTabs.d.ts +1 -1
  569. package/lib/esm/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  570. package/lib/esm/core-react/tabs/VerticalTabs.js.map +1 -1
  571. package/lib/esm/core-react/tabs/classes.scss +7 -7
  572. package/lib/esm/core-react/tabs/index.scss +5 -5
  573. package/lib/esm/core-react/tabs/tabs.scss +96 -96
  574. package/lib/esm/core-react/tabs/vertical.scss +51 -51
  575. package/lib/esm/core-react/text/BlockText.d.ts +1 -1
  576. package/lib/esm/core-react/text/BlockText.d.ts.map +1 -1
  577. package/lib/esm/core-react/text/BlockText.js.map +1 -1
  578. package/lib/esm/core-react/text/BodyText.d.ts +1 -1
  579. package/lib/esm/core-react/text/BodyText.d.ts.map +1 -1
  580. package/lib/esm/core-react/text/BodyText.js.map +1 -1
  581. package/lib/esm/core-react/text/DisabledText.d.ts +1 -1
  582. package/lib/esm/core-react/text/DisabledText.d.ts.map +1 -1
  583. package/lib/esm/core-react/text/DisabledText.js.map +1 -1
  584. package/lib/esm/core-react/text/FilteredText.d.ts +2 -2
  585. package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
  586. package/lib/esm/core-react/text/FilteredText.js.map +1 -1
  587. package/lib/esm/core-react/text/FilteredText.scss +10 -10
  588. package/lib/esm/core-react/text/MutedText.d.ts +1 -1
  589. package/lib/esm/core-react/text/MutedText.d.ts.map +1 -1
  590. package/lib/esm/core-react/text/MutedText.js.map +1 -1
  591. package/lib/esm/core-react/text/StyledText.d.ts +1 -1
  592. package/lib/esm/core-react/text/StyledText.d.ts.map +1 -1
  593. package/lib/esm/core-react/text/StyledText.js.map +1 -1
  594. package/lib/esm/core-react/text/TextProps.d.ts +2 -2
  595. package/lib/esm/core-react/text/TextProps.d.ts.map +1 -1
  596. package/lib/esm/core-react/text/TextProps.js.map +1 -1
  597. package/lib/esm/core-react/text/block.scss +15 -15
  598. package/lib/esm/core-react/text/body.scss +13 -13
  599. package/lib/esm/core-react/text/classes.scss +10 -10
  600. package/lib/esm/core-react/text/disabled.scss +10 -10
  601. package/lib/esm/core-react/text/index.scss +10 -10
  602. package/lib/esm/core-react/text/mixins.scss +24 -24
  603. package/lib/esm/core-react/text/muted.scss +10 -10
  604. package/lib/esm/core-react/tree/Branch.d.ts +1 -1
  605. package/lib/esm/core-react/tree/Branch.d.ts.map +1 -1
  606. package/lib/esm/core-react/tree/Branch.js.map +1 -1
  607. package/lib/esm/core-react/tree/Branch.scss +12 -12
  608. package/lib/esm/core-react/tree/ExpansionToggle.d.ts +1 -1
  609. package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  610. package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
  611. package/lib/esm/core-react/tree/ExpansionToggle.scss +32 -32
  612. package/lib/esm/core-react/tree/Node.d.ts +3 -3
  613. package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
  614. package/lib/esm/core-react/tree/Node.js +2 -1
  615. package/lib/esm/core-react/tree/Node.js.map +1 -1
  616. package/lib/esm/core-react/tree/Node.scss +68 -68
  617. package/lib/esm/core-react/tree/Placeholder.d.ts +1 -1
  618. package/lib/esm/core-react/tree/Placeholder.d.ts.map +1 -1
  619. package/lib/esm/core-react/tree/Placeholder.js.map +1 -1
  620. package/lib/esm/core-react/tree/Placeholder.scss +17 -17
  621. package/lib/esm/core-react/tree/Tree.d.ts +1 -1
  622. package/lib/esm/core-react/tree/Tree.d.ts.map +1 -1
  623. package/lib/esm/core-react/tree/Tree.js.map +1 -1
  624. package/lib/esm/core-react/tree/Tree.scss +21 -21
  625. package/lib/esm/core-react/uistate/LocalStateStorage.d.ts +1 -1
  626. package/lib/esm/core-react/uistate/LocalStateStorage.d.ts.map +1 -1
  627. package/lib/esm/core-react/uistate/LocalStateStorage.js.map +1 -1
  628. package/lib/esm/core-react/uistate/UiStateEntry.d.ts +1 -1
  629. package/lib/esm/core-react/uistate/UiStateEntry.d.ts.map +1 -1
  630. package/lib/esm/core-react/uistate/UiStateEntry.js.map +1 -1
  631. package/lib/esm/core-react/uistate/UiStateStorage.js.map +1 -1
  632. package/lib/esm/core-react/utils/IconHelper.d.ts +1 -1
  633. package/lib/esm/core-react/utils/IconHelper.d.ts.map +1 -1
  634. package/lib/esm/core-react/utils/IconHelper.js.map +1 -1
  635. package/lib/esm/core-react/utils/IconWebComponent.js +1 -1
  636. package/lib/esm/core-react/utils/IconWebComponent.js.map +1 -1
  637. package/lib/esm/core-react/utils/Point.d.ts +1 -1
  638. package/lib/esm/core-react/utils/Point.d.ts.map +1 -1
  639. package/lib/esm/core-react/utils/Point.js.map +1 -1
  640. package/lib/esm/core-react/utils/Props.d.ts +2 -2
  641. package/lib/esm/core-react/utils/Props.d.ts.map +1 -1
  642. package/lib/esm/core-react/utils/Props.js.map +1 -1
  643. package/lib/esm/core-react/utils/Rectangle.d.ts +3 -2
  644. package/lib/esm/core-react/utils/Rectangle.d.ts.map +1 -1
  645. package/lib/esm/core-react/utils/Rectangle.js.map +1 -1
  646. package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts +1 -1
  647. package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  648. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  649. package/lib/esm/core-react/utils/Size.js.map +1 -1
  650. package/lib/esm/core-react/utils/Timer.js.map +1 -1
  651. package/lib/esm/core-react/utils/UiGeometry.js.map +1 -1
  652. package/lib/esm/core-react/utils/flattenChildren.js.map +1 -1
  653. package/lib/esm/core-react/utils/getBestBWContrastColor.js.map +1 -1
  654. package/lib/esm/core-react/utils/getCssVariable.js +1 -1
  655. package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
  656. package/lib/esm/core-react/utils/getDisplayName.d.ts +1 -1
  657. package/lib/esm/core-react/utils/getDisplayName.d.ts.map +1 -1
  658. package/lib/esm/core-react/utils/getDisplayName.js.map +1 -1
  659. package/lib/esm/core-react/utils/getUserColor.js.map +1 -1
  660. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
  661. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +2 -1
  662. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  663. package/lib/esm/core-react/utils/hooks/useDisposable.d.ts +1 -1
  664. package/lib/esm/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  665. package/lib/esm/core-react/utils/hooks/useDisposable.js.map +1 -1
  666. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  667. package/lib/esm/core-react/utils/hooks/useEventListener.js.map +1 -1
  668. package/lib/esm/core-react/utils/hooks/useInterval.js.map +1 -1
  669. package/lib/esm/core-react/utils/hooks/useLifecycleLogging.js.map +1 -1
  670. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  671. package/lib/esm/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
  672. package/lib/esm/core-react/utils/hooks/useRefEffect.js.map +1 -1
  673. package/lib/esm/core-react/utils/hooks/useRefState.js.map +1 -1
  674. package/lib/esm/core-react/utils/hooks/useRefs.js.map +1 -1
  675. package/lib/esm/core-react/utils/hooks/useResizeObserver.js +13 -8
  676. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  677. package/lib/esm/core-react/utils/hooks/useTargeted.js.map +1 -1
  678. package/lib/esm/core-react/utils/hooks/useThrottledFn.js.map +1 -1
  679. package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.js.map +1 -1
  680. package/lib/esm/core-react/utils/isPromiseLike.js.map +1 -1
  681. package/lib/esm/core-react/utils/shallowDiffers.js.map +1 -1
  682. package/lib/esm/core-react/utils/typeUtils.js.map +1 -1
  683. package/lib/esm/core-react.js.map +1 -1
  684. package/lib/public/locales/en/UiCore.json +30 -30
  685. package/package.json +9 -4
@@ -1 +1 @@
1
- {"version":3,"file":"Placeholder.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Placeholder.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAA4B;AAC5B,2CAAoC;AACpC,+BAA+B;AAE/B,iCAAsC;AAYtC;;;GAGG;AACH,MAAa,mBAAoB,SAAQ,KAAK,CAAC,aAAuC;IACpE,MAAM;QACpB,MAAM,SAAS,GAAG,IAAA,oBAAU,EAAC,uBAAuB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC5E,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,mBAAY,CAAC;QAC/C,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;QACxC,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,GAAG,CAAC,CAAC;QACzC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC;QAC5D,MAAM,KAAK,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAClE,OAAO,CACL,6BACE,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,iBACC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;YAEtC,6BAAK,SAAS,EAAC,UAAU,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,EAAE,GAAI,CACxD,CACP,CAAC;IACJ,CAAC;CACF;AAlBD,kDAkBC","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 Tree\r\n */\r\n\r\nimport \"./Placeholder.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { LEVEL_OFFSET } from \"./Node\";\r\n\r\n/** Properties for the [[TreeNodePlaceholder]] React component\r\n * @public\r\n */\r\nexport interface TreeNodePlaceholderProps extends CommonProps {\r\n level: number;\r\n minWidth?: number;\r\n maxWidth?: number;\r\n [\"data-testid\"]?: string;\r\n}\r\n\r\n/**\r\n * Presentation React component for a placeholder to be displayed instead of a node while it's being loaded\r\n * @public\r\n */\r\nexport class TreeNodePlaceholder extends React.PureComponent<TreeNodePlaceholderProps> {\r\n public override render() {\r\n const className = classnames(\"core-tree-placeholder\", this.props.className);\r\n const offset = this.props.level * LEVEL_OFFSET;\r\n const min = (this.props.minWidth || 50);\r\n const max = (this.props.maxWidth || 200);\r\n const width = Math.floor(min + Math.random() * (max - min));\r\n const style = { ...this.props.style, paddingLeft: `${offset}px` };\r\n return (\r\n <div\r\n className={className}\r\n style={style}\r\n data-testid={this.props[\"data-testid\"]}\r\n >\r\n <div className=\"contents\" style={{ width: `${width}px` }} />\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Placeholder.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Placeholder.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAA4B;AAC5B,2CAAoC;AACpC,+BAA+B;AAE/B,iCAAsC;AAYtC;;;GAGG;AACH,MAAa,mBAAoB,SAAQ,KAAK,CAAC,aAAuC;IACpE,MAAM;QACpB,MAAM,SAAS,GAAG,IAAA,oBAAU,EAAC,uBAAuB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC5E,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,mBAAY,CAAC;QAC/C,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;QACxC,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,GAAG,CAAC,CAAC;QACzC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC;QAC5D,MAAM,KAAK,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAClE,OAAO,CACL,6BACE,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,iBACC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;YAEtC,6BAAK,SAAS,EAAC,UAAU,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,EAAE,GAAI,CACxD,CACP,CAAC;IACJ,CAAC;CACF;AAlBD,kDAkBC","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 Tree\n */\n\nimport \"./Placeholder.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { LEVEL_OFFSET } from \"./Node\";\n\n/** Properties for the [[TreeNodePlaceholder]] React component\n * @public\n */\nexport interface TreeNodePlaceholderProps extends CommonProps {\n level: number;\n minWidth?: number;\n maxWidth?: number;\n [\"data-testid\"]?: string;\n}\n\n/**\n * Presentation React component for a placeholder to be displayed instead of a node while it's being loaded\n * @public\n */\nexport class TreeNodePlaceholder extends React.PureComponent<TreeNodePlaceholderProps> {\n public override render() {\n const className = classnames(\"core-tree-placeholder\", this.props.className);\n const offset = this.props.level * LEVEL_OFFSET;\n const min = (this.props.minWidth || 50);\n const max = (this.props.maxWidth || 200);\n const width = Math.floor(min + Math.random() * (max - min));\n const style = { ...this.props.style, paddingLeft: `${offset}px` };\n return (\n <div\n className={className}\n style={style}\n data-testid={this.props[\"data-testid\"]}\n >\n <div className=\"contents\" style={{ width: `${width}px` }} />\n </div>\n );\n }\n}\n"]}
@@ -1,17 +1,17 @@
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
-
6
- .core-tree-placeholder {
7
- display: block;
8
- box-sizing: border-box;
9
- height: 24px;
10
- padding-top: 3px;
11
- padding-bottom: 3px;
12
- > .contents {
13
- margin-left: 24px; // offset for expander
14
- height: 18px;
15
- background-color: var(--iui-color-background-backdrop);
16
- }
17
- }
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
+
6
+ .core-tree-placeholder {
7
+ display: block;
8
+ box-sizing: border-box;
9
+ height: 24px;
10
+ padding-top: 3px;
11
+ padding-bottom: 3px;
12
+ > .contents {
13
+ margin-left: 24px; // offset for expander
14
+ height: 18px;
15
+ background-color: var(--iui-color-background-backdrop);
16
+ }
17
+ }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import "./Tree.scss";
5
5
  import * as React from "react";
6
- import { CommonProps } from "../utils/Props";
6
+ import type { CommonProps } from "../utils/Props";
7
7
  /** Properties for the [[Tree]] presentational React component
8
8
  * @public
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/Tree.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACtD,WAAW,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACtD,SAAS,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACpD,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;CACtD;AAED;;GAEG;AACH,qBAAa,IAAK,SAAQ,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC;IACtD,OAAO,CAAC,YAAY,CAAsD;IAE1E,OAAO,KAAK,oBAAoB,GAe/B;IAEM,eAAe,CAAC,OAAO,EAAE,OAAO;IAwChC,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,EAAE;IAWpD,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAarC,MAAM;CAqBvB"}
1
+ {"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/Tree.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACtD,WAAW,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACtD,SAAS,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACpD,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;CACtD;AAED;;GAEG;AACH,qBAAa,IAAK,SAAQ,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC;IACtD,OAAO,CAAC,YAAY,CAAsD;IAE1E,OAAO,KAAK,oBAAoB,GAe/B;IAEM,eAAe,CAAC,OAAO,EAAE,OAAO;IAwChC,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,EAAE;IAWpD,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAarC,MAAM;CAqBvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tree.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Tree.tsx"],"names":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AAC,KAAK,CAAC,WAAW,EACnC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,CAAC,CAAC,IAEX,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACP,CAAC;IACJ,CAAC;CACF;AAzGD,oBAyGC","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 Tree\r\n */\r\n\r\nimport \"./Tree.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Rectangle } from \"../utils/Rectangle\";\r\n\r\n/** Properties for the [[Tree]] presentational React component\r\n * @public\r\n */\r\nexport interface TreeProps extends CommonProps {\r\n children?: React.ReactNode;\r\n onMouseDown?: React.MouseEventHandler<HTMLDivElement>;\r\n onMouseMove?: React.MouseEventHandler<HTMLDivElement>;\r\n onMouseUp?: React.MouseEventHandler<HTMLDivElement>;\r\n onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;\r\n onKeyUp?: React.KeyboardEventHandler<HTMLDivElement>;\r\n}\r\n\r\n/** Presentation React component for a Tree\r\n * @public\r\n */\r\nexport class Tree extends React.PureComponent<TreeProps> {\r\n private _treeElement: React.RefObject<HTMLDivElement> = React.createRef();\r\n\r\n private get _scrollableContainer(): Element | undefined {\r\n if (!this._treeElement.current)\r\n return undefined;\r\n\r\n const isScrollable = (element: Element) => {\r\n const style = window.getComputedStyle(element);\r\n return style.overflow === \"auto\" || style.overflow === \"scroll\"\r\n || style.overflowY === \"auto\" || style.overflowY === \"scroll\"\r\n || style.overflowX === \"auto\" || style.overflowX === \"scroll\";\r\n };\r\n let scrollableContainer: Element | undefined = this._treeElement.current;\r\n while (scrollableContainer && !isScrollable(scrollableContainer))\r\n scrollableContainer = (scrollableContainer.children.length > 0) ? scrollableContainer.children[0] : undefined;\r\n\r\n return scrollableContainer;\r\n }\r\n\r\n public scrollToElement(element: Element) {\r\n const container = this._scrollableContainer;\r\n if (!container)\r\n return;\r\n\r\n // istanbul ignore next\r\n if (!Element.prototype.scrollTo) { // eslint-disable-line @typescript-eslint/unbound-method\r\n // workaround for Edge scrollTo issue https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15534521/\r\n element.scrollIntoView();\r\n return;\r\n }\r\n\r\n const elementBox = element.getBoundingClientRect();\r\n const elementRange = Rectangle.createXYXY(elementBox.left, elementBox.top, elementBox.right, elementBox.bottom);\r\n const containerBox = container.getBoundingClientRect();\r\n const containerRange = Rectangle.createXYXY(containerBox.left - container.scrollLeft, containerBox.top - container.scrollTop,\r\n containerBox.right - container.scrollLeft, containerBox.bottom - container.scrollTop);\r\n\r\n let left: number;\r\n if (container.scrollLeft > 0 && elementRange.right <= containerRange.right) {\r\n // always attempt to keep horizontal scroll at 0\r\n left = 0;\r\n } else if (containerRange.left <= elementRange.left && containerRange.right >= elementRange.right) {\r\n // already visible - no need to scroll to\r\n left = container.scrollLeft;\r\n } else {\r\n left = elementRange.left - containerRange.left;\r\n }\r\n\r\n let top: number;\r\n if (containerRange.top <= elementRange.top && containerRange.bottom >= elementRange.bottom) {\r\n // already visible - no need to scroll to\r\n top = container.scrollTop;\r\n } else {\r\n top = elementRange.top - containerRange.top;\r\n }\r\n\r\n container.scrollTo({ left, top });\r\n }\r\n\r\n public getElementsByClassName(className: string): Element[] {\r\n if (!this._treeElement.current)\r\n return [];\r\n\r\n const elems = new Array<Element>();\r\n const collection = this._treeElement.current.getElementsByClassName(className);\r\n for (let i = 0; i < collection.length; ++i)\r\n elems.push(collection.item(i)!);\r\n return elems;\r\n }\r\n // istanbul ignore next\r\n public setFocusByClassName(selector: string): boolean {\r\n let status = false;\r\n if (this._treeElement.current) {\r\n const element = this._treeElement.current.querySelector(selector) as HTMLElement;\r\n // istanbul ignore else\r\n if (element && element.focus) {\r\n element.focus();\r\n status = true;\r\n }\r\n }\r\n return status;\r\n }\r\n\r\n public override render() {\r\n const className = classnames(\r\n \"core-tree\",\r\n this.props.className);\r\n\r\n return (\r\n <div ref={this._treeElement}\r\n className={className}\r\n style={this.props.style}\r\n onMouseDown={this.props.onMouseDown}\r\n onMouseMove={this.props.onMouseMove}\r\n onMouseUp={this.props.onMouseUp}\r\n onKeyDown={this.props.onKeyDown}\r\n onKeyUp={this.props.onKeyUp}\r\n role=\"tree\"\r\n tabIndex={-1}\r\n >\r\n {this.props.children}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Tree.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Tree.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,uBAAqB;AACrB,2CAAoC;AACpC,+BAA+B;AAE/B,kDAA+C;AAc/C;;GAEG;AACH,MAAa,IAAK,SAAQ,KAAK,CAAC,aAAwB;IAAxD;;QACU,iBAAY,GAAoC,KAAK,CAAC,SAAS,EAAE,CAAC;IAwG5E,CAAC;IAtGC,IAAY,oBAAoB;QAC9B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO;YAC5B,OAAO,SAAS,CAAC;QAEnB,MAAM,YAAY,GAAG,CAAC,OAAgB,EAAE,EAAE;YACxC,MAAM,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;YAC/C,OAAO,KAAK,CAAC,QAAQ,KAAK,MAAM,IAAI,KAAK,CAAC,QAAQ,KAAK,QAAQ;mBAC1D,KAAK,CAAC,SAAS,KAAK,MAAM,IAAI,KAAK,CAAC,SAAS,KAAK,QAAQ;mBAC1D,KAAK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C,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;YAC7B,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAgB,CAAC;YACjF,uBAAuB;YACvB,IAAI,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE;gBAC5B,OAAO,CAAC,KAAK,EAAE,CAAC;gBAChB,MAAM,GAAG,IAAI,CAAC;aACf;SACF;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEe,MAAM;QACpB,MAAM,SAAS,GAAG,IAAA,oBAAU,EAC1B,WAAW,EACX,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAExB,OAAO,CACL,6BAAK,GAAG,EAAE,IAAI,CAAC,YAAY,EACzB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,CAAC,CAAC,IAEX,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACP,CAAC;IACJ,CAAC;CACF;AAzGD,oBAyGC","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 Tree\n */\n\nimport \"./Tree.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Rectangle } from \"../utils/Rectangle\";\n\n/** Properties for the [[Tree]] presentational React component\n * @public\n */\nexport interface TreeProps extends CommonProps {\n children?: React.ReactNode;\n onMouseDown?: React.MouseEventHandler<HTMLDivElement>;\n onMouseMove?: React.MouseEventHandler<HTMLDivElement>;\n onMouseUp?: React.MouseEventHandler<HTMLDivElement>;\n onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;\n onKeyUp?: React.KeyboardEventHandler<HTMLDivElement>;\n}\n\n/** Presentation React component for a Tree\n * @public\n */\nexport class Tree extends React.PureComponent<TreeProps> {\n private _treeElement: React.RefObject<HTMLDivElement> = React.createRef();\n\n private get _scrollableContainer(): Element | undefined {\n if (!this._treeElement.current)\n return undefined;\n\n const isScrollable = (element: Element) => {\n const style = window.getComputedStyle(element);\n return style.overflow === \"auto\" || style.overflow === \"scroll\"\n || style.overflowY === \"auto\" || style.overflowY === \"scroll\"\n || style.overflowX === \"auto\" || style.overflowX === \"scroll\";\n };\n let scrollableContainer: Element | undefined = this._treeElement.current;\n while (scrollableContainer && !isScrollable(scrollableContainer))\n scrollableContainer = (scrollableContainer.children.length > 0) ? scrollableContainer.children[0] : undefined;\n\n return scrollableContainer;\n }\n\n public scrollToElement(element: Element) {\n const container = this._scrollableContainer;\n if (!container)\n return;\n\n // istanbul ignore next\n if (!Element.prototype.scrollTo) { // eslint-disable-line @typescript-eslint/unbound-method\n // workaround for Edge scrollTo issue https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15534521/\n element.scrollIntoView();\n return;\n }\n\n const elementBox = element.getBoundingClientRect();\n const elementRange = Rectangle.createXYXY(elementBox.left, elementBox.top, elementBox.right, elementBox.bottom);\n const containerBox = container.getBoundingClientRect();\n const containerRange = Rectangle.createXYXY(containerBox.left - container.scrollLeft, containerBox.top - container.scrollTop,\n containerBox.right - container.scrollLeft, containerBox.bottom - container.scrollTop);\n\n let left: number;\n if (container.scrollLeft > 0 && elementRange.right <= containerRange.right) {\n // always attempt to keep horizontal scroll at 0\n left = 0;\n } else if (containerRange.left <= elementRange.left && containerRange.right >= elementRange.right) {\n // already visible - no need to scroll to\n left = container.scrollLeft;\n } else {\n left = elementRange.left - containerRange.left;\n }\n\n let top: number;\n if (containerRange.top <= elementRange.top && containerRange.bottom >= elementRange.bottom) {\n // already visible - no need to scroll to\n top = container.scrollTop;\n } else {\n top = elementRange.top - containerRange.top;\n }\n\n container.scrollTo({ left, top });\n }\n\n public getElementsByClassName(className: string): Element[] {\n if (!this._treeElement.current)\n return [];\n\n const elems = new Array<Element>();\n const collection = this._treeElement.current.getElementsByClassName(className);\n for (let i = 0; i < collection.length; ++i)\n elems.push(collection.item(i)!);\n return elems;\n }\n // istanbul ignore next\n public setFocusByClassName(selector: string): boolean {\n let status = false;\n if (this._treeElement.current) {\n const element = this._treeElement.current.querySelector(selector) as HTMLElement;\n // istanbul ignore else\n if (element && element.focus) {\n element.focus();\n status = true;\n }\n }\n return status;\n }\n\n public override render() {\n const className = classnames(\n \"core-tree\",\n this.props.className);\n\n return (\n <div ref={this._treeElement}\n className={className}\n style={this.props.style}\n onMouseDown={this.props.onMouseDown}\n onMouseMove={this.props.onMouseMove}\n onMouseUp={this.props.onMouseUp}\n onKeyDown={this.props.onKeyDown}\n onKeyUp={this.props.onKeyUp}\n role=\"tree\"\n tabIndex={-1}\n >\n {this.props.children}\n </div>\n );\n }\n}\n"]}
@@ -1,21 +1,21 @@
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
-
6
- .core-tree {
7
- user-select: none;
8
- box-sizing: border-box;
9
- width: 100%;
10
- height: 100%;
11
-
12
- &:focus {
13
- outline: none;
14
- }
15
-
16
- > * {
17
- position: relative;
18
- display: block;
19
- padding: 0;
20
- }
21
- }
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
+
6
+ .core-tree {
7
+ user-select: none;
8
+ box-sizing: border-box;
9
+ width: 100%;
10
+ height: 100%;
11
+
12
+ &:focus {
13
+ outline: none;
14
+ }
15
+
16
+ > * {
17
+ position: relative;
18
+ display: block;
19
+ padding: 0;
20
+ }
21
+ }
@@ -1,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module UiStateStorage
3
3
  */
4
- import { UiStateStorage, UiStateStorageResult } from "./UiStateStorage";
4
+ import type { UiStateStorage, UiStateStorageResult } from "./UiStateStorage";
5
5
  /**
6
6
  * Implementation of [[UiStateStorage]] using Window.localStorage.
7
7
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"LocalStateStorage.d.ts","sourceRoot":"","sources":["../../../../src/core-react/uistate/LocalStateStorage.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAwB,MAAM,kBAAkB,CAAC;AAK9F;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,cAAc;IAEnC,CAAC,EAAE,MAAM;gBAAT,CAAC,GAAE,MAAe;IAExB,UAAU,CAAC,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAQxF,WAAW,CAAC,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAKvG,UAAU,CAAC,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQ3E,aAAa,CAAC,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAQzG"}
1
+ {"version":3,"file":"LocalStateStorage.d.ts","sourceRoot":"","sources":["../../../../src/core-react/uistate/LocalStateStorage.ts"],"names":[],"mappings":"AAIA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CAAoB,CAAC,QAAQ,EAAE,CAAC;IACrD,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,gBAAwB,EAAE,WAAmB,EAAE,OAAY;QAClF,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,gBAAgB,IAAI,WAAW,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3F,OAAO,EAAE,MAAM,EAAE,qCAAoB,CAAC,OAAO,EAAE,CAAC;IAClD,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,gBAAwB,EAAE,WAAmB;QACnE,MAAM,IAAI,GAAG,GAAG,gBAAgB,IAAI,WAAW,EAAE,CAAC;QAClD,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,OAAO,KAAK,IAAI;YAClB,OAAO,KAAK,CAAC;QACf,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,gBAAwB,EAAE,WAAmB;QACtE,MAAM,IAAI,GAAG,GAAG,gBAAgB,IAAI,WAAW,EAAE,CAAC;QAClD,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,OAAO,KAAK,IAAI;YAClB,OAAO,EAAE,MAAM,EAAE,qCAAoB,CAAC,QAAQ,EAAE,CAAC;QACnD,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,EAAE,MAAM,EAAE,qCAAoB,CAAC,OAAO,EAAE,CAAC;IAClD,CAAC;CACF;AAjCD,8CAiCC","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 UiStateStorage\r\n */\r\n\r\nimport { UiStateStorage, UiStateStorageResult, UiStateStorageStatus } from \"./UiStateStorage\";\r\n\r\n// All of the Settings APIs that are available in core-react should be fully deprecated. However, some of the usage and implementation\r\n// of it from AppUI will continue to be supported there.\r\n\r\n/**\r\n * Implementation of [[UiStateStorage]] using Window.localStorage.\r\n * @public\r\n */\r\nexport class LocalStateStorage implements UiStateStorage {\r\n\r\n constructor(public w: Window = window) { }\r\n\r\n public async getSetting(settingNamespace: string, settingName: string): Promise<UiStateStorageResult> {\r\n const setting = this.w.localStorage.getItem(`${settingNamespace}.${settingName}`);\r\n if (setting !== null)\r\n return { status: UiStateStorageStatus.Success, setting: JSON.parse(setting) };\r\n else\r\n return { status: UiStateStorageStatus.NotFound };\r\n }\r\n\r\n public async saveSetting(settingNamespace: string, settingName: string, setting: any): Promise<UiStateStorageResult> {\r\n this.w.localStorage.setItem(`${settingNamespace}.${settingName}`, JSON.stringify(setting));\r\n return { status: UiStateStorageStatus.Success };\r\n }\r\n\r\n public async hasSetting(settingNamespace: string, settingName: string): Promise<boolean> {\r\n const name = `${settingNamespace}.${settingName}`;\r\n const setting = this.w.localStorage.getItem(name);\r\n if (setting === null)\r\n return false;\r\n return true;\r\n }\r\n\r\n public async deleteSetting(settingNamespace: string, settingName: string): Promise<UiStateStorageResult> {\r\n const name = `${settingNamespace}.${settingName}`;\r\n const setting = this.w.localStorage.getItem(name);\r\n if (setting === null)\r\n return { status: UiStateStorageStatus.NotFound };\r\n this.w.localStorage.removeItem(name);\r\n return { status: UiStateStorageStatus.Success };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"LocalStateStorage.js","sourceRoot":"","sources":["../../../../src/core-react/uistate/LocalStateStorage.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,qDAAwD;AAExD,sIAAsI;AACtI,wDAAwD;AAExD;;;GAGG;AACH,MAAa,iBAAiB;IAE5B,YAAmB,IAAY,MAAM;QA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KAAK,IAAI;YAClB,OAAO,EAAE,MAAM,EAAE,qCAAoB,CAAC,QAAQ,EAAE,CAAC;QACnD,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,EAAE,MAAM,EAAE,qCAAoB,CAAC,OAAO,EAAE,CAAC;IAClD,CAAC;CACF;AAjCD,8CAiCC","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 UiStateStorage\n */\n\nimport type { UiStateStorage, UiStateStorageResult} from \"./UiStateStorage\";\nimport { UiStateStorageStatus } from \"./UiStateStorage\";\n\n// All of the Settings APIs that are available in core-react should be fully deprecated. However, some of the usage and implementation\n// of it from AppUI will continue to be supported there.\n\n/**\n * Implementation of [[UiStateStorage]] using Window.localStorage.\n * @public\n */\nexport class LocalStateStorage implements UiStateStorage {\n\n constructor(public w: Window = window) { }\n\n public async getSetting(settingNamespace: string, settingName: string): Promise<UiStateStorageResult> {\n const setting = this.w.localStorage.getItem(`${settingNamespace}.${settingName}`);\n if (setting !== null)\n return { status: UiStateStorageStatus.Success, setting: JSON.parse(setting) };\n else\n return { status: UiStateStorageStatus.NotFound };\n }\n\n public async saveSetting(settingNamespace: string, settingName: string, setting: any): Promise<UiStateStorageResult> {\n this.w.localStorage.setItem(`${settingNamespace}.${settingName}`, JSON.stringify(setting));\n return { status: UiStateStorageStatus.Success };\n }\n\n public async hasSetting(settingNamespace: string, settingName: string): Promise<boolean> {\n const name = `${settingNamespace}.${settingName}`;\n const setting = this.w.localStorage.getItem(name);\n if (setting === null)\n return false;\n return true;\n }\n\n public async deleteSetting(settingNamespace: string, settingName: string): Promise<UiStateStorageResult> {\n const name = `${settingNamespace}.${settingName}`;\n const setting = this.w.localStorage.getItem(name);\n if (setting === null)\n return { status: UiStateStorageStatus.NotFound };\n this.w.localStorage.removeItem(name);\n return { status: UiStateStorageStatus.Success };\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module UiStateStorage
3
3
  */
4
- import { UiStateStorage, UiStateStorageResult } from "./UiStateStorage";
4
+ import type { UiStateStorage, UiStateStorageResult } from "./UiStateStorage";
5
5
  /** A single UI State enter that is identified by namespace and setting name.
6
6
  * @public
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"UiStateEntry.d.ts","sourceRoot":"","sources":["../../../../src/core-react/uistate/UiStateEntry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAwB,MAAM,kBAAkB,CAAC;AAE9F;;GAEG;AACH,qBAAa,YAAY,CAAC,CAAC;IAQC,gBAAgB,EAAE,MAAM;IAAS,WAAW,EAAE,MAAM;IAAS,QAAQ,EAAE,MAAM,CAAC;IAAS,UAAU,CAAC,OAAM,CAAC,KAAK,IAAI;IAAS,YAAY,CAAC;IAPlK;;;;;;OAMG;gBACuB,gBAAgB,EAAE,MAAM,EAAS,WAAW,EAAE,MAAM,EAAS,QAAQ,EAAE,MAAM,CAAC,EAAS,UAAU,CAAC,OAAM,CAAC,KAAK,IAAI,aAAA,EAAS,YAAY,CAAC,eAAG;IAGrK,+CAA+C;IAClC,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAI/E,6EAA6E;IAChE,WAAW,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAIhF,8CAA8C;IACjC,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAIlF,iGAAiG;IACpF,uBAAuB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAc7F"}
1
+ {"version":3,"file":"UiStateEntry.d.ts","sourceRoot":"","sources":["../../../../src/core-react/uistate/UiState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BAAY,GAAZ,YAAY,CAAI;IACrK,CAAC;IAED,+CAA+C;IACxC,KAAK,CAAC,UAAU,CAAC,OAAuB;QAC7C,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACrE,CAAC;IAED,6EAA6E;IACtE,KAAK,CAAC,WAAW,CAAC,OAAuB;QAC9C,OAAO,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvF,CAAC;IAED,8CAA8C;IACvC,KAAK,CAAC,aAAa,CAAC,OAAuB;QAChD,OAAO,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACxE,CAAC;IAED,iGAAiG;IAC1F,KAAK,CAAC,uBAAuB,CAAC,OAAuB;QAC1D,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YAC9C,IAAI,MAAM,CAAC,MAAM,KAAK,qCAAoB,CAAC,OAAO,EAAE;gBAClD,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;aACjC;iBAAM,IAAI,SAAS,KAAK,IAAI,CAAC,YAAY,EAAE;gBAC1C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBACnC,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC;gBACnC,MAAM,CAAC,MAAM,GAAG,qCAAoB,CAAC,OAAO,CAAC;aAC9C;YACD,OAAO,MAAM,CAAC;SACf;QACD,OAAO,EAAE,MAAM,EAAE,qCAAoB,CAAC,aAAa,EAAE,CAAC;IACxD,CAAC;CACF;AAzCD,oCAyCC","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 UiStateStorage\r\n */\r\n\r\nimport { UiStateStorage, UiStateStorageResult, UiStateStorageStatus } from \"./UiStateStorage\";\r\n\r\n/** A single UI State enter that is identified by namespace and setting name.\r\n * @public\r\n */\r\nexport class UiStateEntry<T> {\r\n /** Constructor\r\n * @param settingNamespace Namespace for the setting, passed to UiStateStorage.\r\n * @param settingName Name for the setting, passed to UiStateStorage.\r\n * @param getValue Function for getting the value from the application.\r\n * @param applyValue Function for applying the setting value to the application.\r\n * @param defaultValue Optional default value if not already stored.\r\n */\r\n public constructor(public settingNamespace: string, public settingName: string, public getValue: () => T, public applyValue?: (v: T) => void, public defaultValue?: T) {\r\n }\r\n\r\n /** Gets the setting from [[UiStateStorage]] */\r\n public async getSetting(storage: UiStateStorage): Promise<UiStateStorageResult> {\r\n return storage.getSetting(this.settingNamespace, this.settingName);\r\n }\r\n\r\n /** Saves the setting value from the `getValue` function to UiStateStorage */\r\n public async saveSetting(storage: UiStateStorage): Promise<UiStateStorageResult> {\r\n return storage.saveSetting(this.settingNamespace, this.settingName, this.getValue());\r\n }\r\n\r\n /** Deletes the setting from UiStateStorage */\r\n public async deleteSetting(storage: UiStateStorage): Promise<UiStateStorageResult> {\r\n return storage.deleteSetting(this.settingNamespace, this.settingName);\r\n }\r\n\r\n /** Gets the setting from UiStateStorage and applies the value using the `applyValue` function */\r\n public async getSettingAndApplyValue(storage: UiStateStorage): Promise<UiStateStorageResult> {\r\n if (this.applyValue) {\r\n const result = await this.getSetting(storage);\r\n if (result.status === UiStateStorageStatus.Success) {\r\n this.applyValue(result.setting);\r\n } else if (undefined !== this.defaultValue) {\r\n this.applyValue(this.defaultValue);\r\n result.setting = this.defaultValue;\r\n result.status = UiStateStorageStatus.Success;\r\n }\r\n return result;\r\n }\r\n return { status: UiStateStorageStatus.Uninitialized };\r\n }\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C,CAAC;aACjC;iBAAM,IAAI,SAAS,KAAK,IAAI,CAAC,YAAY,EAAE;gBAC1C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBACnC,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC;gBACnC,MAAM,CAAC,MAAM,GAAG,qCAAoB,CAAC,OAAO,CAAC;aAC9C;YACD,OAAO,MAAM,CAAC;SACf;QACD,OAAO,EAAE,MAAM,EAAE,qCAAoB,CAAC,aAAa,EAAE,CAAC;IACxD,CAAC;CACF;AAzCD,oCAyCC","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 UiStateStorage\n */\n\nimport type { UiStateStorage, UiStateStorageResult} from \"./UiStateStorage\";\nimport { UiStateStorageStatus } from \"./UiStateStorage\";\n\n/** A single UI State enter that is identified by namespace and setting name.\n * @public\n */\nexport class UiStateEntry<T> {\n /** Constructor\n * @param settingNamespace Namespace for the setting, passed to UiStateStorage.\n * @param settingName Name for the setting, passed to UiStateStorage.\n * @param getValue Function for getting the value from the application.\n * @param applyValue Function for applying the setting value to the application.\n * @param defaultValue Optional default value if not already stored.\n */\n public constructor(public settingNamespace: string, public settingName: string, public getValue: () => T, public applyValue?: (v: T) => void, public defaultValue?: T) {\n }\n\n /** Gets the setting from [[UiStateStorage]] */\n public async getSetting(storage: UiStateStorage): Promise<UiStateStorageResult> {\n return storage.getSetting(this.settingNamespace, this.settingName);\n }\n\n /** Saves the setting value from the `getValue` function to UiStateStorage */\n public async saveSetting(storage: UiStateStorage): Promise<UiStateStorageResult> {\n return storage.saveSetting(this.settingNamespace, this.settingName, this.getValue());\n }\n\n /** Deletes the setting from UiStateStorage */\n public async deleteSetting(storage: UiStateStorage): Promise<UiStateStorageResult> {\n return storage.deleteSetting(this.settingNamespace, this.settingName);\n }\n\n /** Gets the setting from UiStateStorage and applies the value using the `applyValue` function */\n public async getSettingAndApplyValue(storage: UiStateStorage): Promise<UiStateStorageResult> {\n if (this.applyValue) {\n const result = await this.getSetting(storage);\n if (result.status === UiStateStorageStatus.Success) {\n this.applyValue(result.setting);\n } else if (undefined !== this.defaultValue) {\n this.applyValue(this.defaultValue);\n result.setting = this.defaultValue;\n result.status = UiStateStorageStatus.Success;\n }\n return result;\n }\n return { status: UiStateStorageStatus.Uninitialized };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UiStateStorage.js","sourceRoot":"","sources":["../../../../src/core-react/uistate/UiStateStorage.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAWH;;GAEG;AACH,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,qEAAW,CAAA;IACX,uEAAY,CAAA;IACZ,+EAAgB,CAAA;IAChB,iFAAiB,CAAA;IACjB,2FAAsB,CAAA;AACxB,CAAC,EANW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAM/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 UiStateStorage\r\n */\r\n\r\n/** Interface for getting, saving and deleting settings.\r\n * @public\r\n */\r\nexport interface UiStateStorage {\r\n getSetting(settingNamespace: string, settingName: string): Promise<UiStateStorageResult>;\r\n saveSetting(settingNamespace: string, settingName: string, setting: any): Promise<UiStateStorageResult>;\r\n deleteSetting(settingNamespace: string, settingName: string): Promise<UiStateStorageResult>;\r\n}\r\n\r\n/** Enum for [[UiStateStorage]] status.\r\n * @public\r\n */\r\nexport enum UiStateStorageStatus {\r\n Success = 0,\r\n NotFound = 1,\r\n UnknownError = 2,\r\n Uninitialized = 3,\r\n AuthorizationError = 4,\r\n}\r\n\r\n/** Interface for result of accessing UI state setting in [[UiStateStorage]].\r\n * @public\r\n */\r\nexport interface UiStateStorageResult {\r\n status: UiStateStorageStatus;\r\n setting?: any;\r\n}\r\n"]}
1
+ {"version":3,"file":"UiStateStorage.js","sourceRoot":"","sources":["../../../../src/core-react/uistate/UiStateStorage.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAWH;;GAEG;AACH,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,qEAAW,CAAA;IACX,uEAAY,CAAA;IACZ,+EAAgB,CAAA;IAChB,iFAAiB,CAAA;IACjB,2FAAsB,CAAA;AACxB,CAAC,EANW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAM/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 UiStateStorage\n */\n\n/** Interface for getting, saving and deleting settings.\n * @public\n */\nexport interface UiStateStorage {\n getSetting(settingNamespace: string, settingName: string): Promise<UiStateStorageResult>;\n saveSetting(settingNamespace: string, settingName: string, setting: any): Promise<UiStateStorageResult>;\n deleteSetting(settingNamespace: string, settingName: string): Promise<UiStateStorageResult>;\n}\n\n/** Enum for [[UiStateStorage]] status.\n * @public\n */\nexport enum UiStateStorageStatus {\n Success = 0,\n NotFound = 1,\n UnknownError = 2,\n Uninitialized = 3,\n AuthorizationError = 4,\n}\n\n/** Interface for result of accessing UI state setting in [[UiStateStorage]].\n * @public\n */\nexport interface UiStateStorageResult {\n status: UiStateStorageStatus;\n setting?: any;\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as React from "react";
5
5
  import { ConditionalStringValue } from "@itwin/appui-abstract";
6
- import { IconSpec } from "../icons/IconComponent";
6
+ import type { IconSpec } from "../icons/IconComponent";
7
7
  /** Icon Helper Class used to store the data needed to generate an <Icon> for use in any control that shows an icon.
8
8
  * @public
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"IconHelper.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/IconHelper.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAQ,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAExD;;GAEG;AACH,qBAAa,UAAU;IACrB,WAAkB,YAAY,IAAI,MAAM,CAEvC;IACD;;;OAGG;WACW,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,GAAG,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,SAAS;IA2BzI;;;;OAIG;WACW,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,GAAG,sBAAsB;CAYhH"}
1
+ {"version":3,"file":"IconHelper.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/IconHelper.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGvD;;GAEG;AACH,qBAAa,UAAU;IACrB,WAAkB,YAAY,IAAI,MAAM,CAEvC;IACD;;;OAGG;WACW,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,GAAG,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,SAAS;IA2BzI;;;;OAIG;WACW,WAAW,CAAC,QAAQ,EAAE,QAAQ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AC3E,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC;QAEnF,IAAI,YAAY,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,YAAY,EAAE;YAChF,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;SACrD;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,YAAY,uCAAsB;YACpE,OAAO,IAAI,CAAC;QAEd,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AApDD,gCAoDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { ConditionalStringValue } from \"@itwin/appui-abstract\";\r\nimport { Icon, IconSpec } from \"../icons/IconComponent\";\r\n\r\n/** Icon Helper Class used to store the data needed to generate an <Icon> for use in any control that shows an icon.\r\n * @public\r\n */\r\nexport class IconHelper {\r\n public static get reactIconKey(): string {\r\n return \"#-react-iconspec-node-#\";\r\n }\r\n /** Returns an <Icon> ReactNode from the many ways an icon can be specified.\r\n * @param icon abstract icon specification.\r\n * @param internalData a map that may hold a React.ReactNode stored in an abstract item definition.\r\n */\r\n public static getIconReactNode(icon: string | ConditionalStringValue | React.ReactNode, internalData?: Map<string, any>): React.ReactNode {\r\n // istanbul ignore else\r\n if (!icon)\r\n return null;\r\n\r\n // istanbul ignore else\r\n if (React.isValidElement(icon))\r\n return <Icon iconSpec={icon} />;\r\n\r\n // istanbul ignore if\r\n if (!(icon instanceof ConditionalStringValue) && typeof icon !== \"string\")\r\n return null;\r\n\r\n const iconString = ConditionalStringValue.getValue(icon);\r\n if (!iconString)\r\n return null;\r\n\r\n // istanbul ignore else\r\n if (iconString === IconHelper.reactIconKey) {\r\n // istanbul ignore else\r\n if (internalData)\r\n return <Icon iconSpec={internalData.get(IconHelper.reactIconKey) as React.ReactNode} />;\r\n return null;\r\n }\r\n return <Icon iconSpec={iconString} />;\r\n }\r\n\r\n /** Returns an icon definition that can be stored in an abstract item definition. If the iconSpec specifies a ReactNode\r\n * then the react data is stored in the internalData map and the key to the react data is returned.\r\n * @param iconSpec any supported variations of how an icon can be defined in an abstract item or IconProps.\r\n * @param internalData a map supplied by the caller to store away react element if React.ReactNode\r\n */\r\n public static getIconData(iconSpec: IconSpec, internalData?: Map<string, any>): string | ConditionalStringValue {\r\n const icon = (React.isValidElement(iconSpec)) ? IconHelper.reactIconKey : iconSpec;\r\n\r\n if (internalData && typeof icon === \"string\" && icon === IconHelper.reactIconKey) {\r\n internalData.set(IconHelper.reactIconKey, iconSpec);\r\n }\r\n\r\n if (typeof icon === \"string\" || icon instanceof ConditionalStringValue)\r\n return icon;\r\n\r\n return \"\";\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"IconHelper.js","sourceRoot":"","sources":["../../../../src/core-react/utils/IconHelper.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,0DAA+D;AAE/D,0DAA8C;AAE9C;;GAEG;AACH,MAAa,UAAU;IACd,MAAM,KAAK,YAAY;QAC5B,OAAO,yBAAyB,CAAC;IACnC,CAAC;IACD;;;OAGG;IACI,MAAM,CAAC,gBAAgB,CAAC,IAAuD,EAAE,YAA+B;QACrH,uBAAuB;QACvB,IAAI,CAAC,IAAI;YACP,OAAO,IAAI,CAAC;QAEd,uBAAuB;QACvB,IAAI,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC;YAC5B,OAAO,oBAAC,oBAAI,IAAC,QAAQ,EAAE,IAAI,GAAI,CAAC;QAElC,qBAAqB;QACrB,IAAI,CAAC,CAAC,IAAI,YAAY,uCAAsB,CAAC,IAAI,OAAO,IAAI,KAAK,QAAQ;YACvE,OAAO,IAAI,CAAC;QAEd,MAAM,UAAU,GAAG,uCAAsB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACzD,IAAI,CAAC,UAAU;YACb,OAAO,IAAI,CAAC;QAEd,uBAAuB;QACvB,IAAI,UAAU,KAAK,UAAU,CAAC,YAAY,EAAE;YAC1C,uBAAuB;YACvB,IAAI,YAAY;gBACd,OAAO,oBAAC,oBAAI,IAAC,QAAQ,EAAE,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,CAAoB,GAAI,CAAC;YAC1F,OAAO,IAAI,CAAC;SACb;QACD,OAAO,oBAAC,oBAAI,IAAC,QAAQ,EAAE,UAAU,GAAI,CAAC;IACxC,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CAAC,QAAkB,EAAE,YAA+B;QAC3E,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC;QAEnF,IAAI,YAAY,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,YAAY,EAAE;YAChF,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;SACrD;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,YAAY,uCAAsB;YACpE,OAAO,IAAI,CAAC;QAEd,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AApDD,gCAoDC","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 Utilities\n */\n\nimport * as React from \"react\";\nimport { ConditionalStringValue } from \"@itwin/appui-abstract\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\n\n/** Icon Helper Class used to store the data needed to generate an <Icon> for use in any control that shows an icon.\n * @public\n */\nexport class IconHelper {\n public static get reactIconKey(): string {\n return \"#-react-iconspec-node-#\";\n }\n /** Returns an <Icon> ReactNode from the many ways an icon can be specified.\n * @param icon abstract icon specification.\n * @param internalData a map that may hold a React.ReactNode stored in an abstract item definition.\n */\n public static getIconReactNode(icon: string | ConditionalStringValue | React.ReactNode, internalData?: Map<string, any>): React.ReactNode {\n // istanbul ignore else\n if (!icon)\n return null;\n\n // istanbul ignore else\n if (React.isValidElement(icon))\n return <Icon iconSpec={icon} />;\n\n // istanbul ignore if\n if (!(icon instanceof ConditionalStringValue) && typeof icon !== \"string\")\n return null;\n\n const iconString = ConditionalStringValue.getValue(icon);\n if (!iconString)\n return null;\n\n // istanbul ignore else\n if (iconString === IconHelper.reactIconKey) {\n // istanbul ignore else\n if (internalData)\n return <Icon iconSpec={internalData.get(IconHelper.reactIconKey) as React.ReactNode} />;\n return null;\n }\n return <Icon iconSpec={iconString} />;\n }\n\n /** Returns an icon definition that can be stored in an abstract item definition. If the iconSpec specifies a ReactNode\n * then the react data is stored in the internalData map and the key to the react data is returned.\n * @param iconSpec any supported variations of how an icon can be defined in an abstract item or IconProps.\n * @param internalData a map supplied by the caller to store away react element if React.ReactNode\n */\n public static getIconData(iconSpec: IconSpec, internalData?: Map<string, any>): string | ConditionalStringValue {\n const icon = (React.isValidElement(iconSpec)) ? IconHelper.reactIconKey : iconSpec;\n\n if (internalData && typeof icon === \"string\" && icon === IconHelper.reactIconKey) {\n internalData.set(IconHelper.reactIconKey, iconSpec);\n }\n\n if (typeof icon === \"string\" || icon instanceof ConditionalStringValue)\n return icon;\n\n return \"\";\n }\n}\n"]}
@@ -35,7 +35,7 @@ class IconWebComponent extends HTMLElement {
35
35
  // the esm build of dompurify has a default import but the cjs build does not
36
36
  // if there is a default export, use it (likely esm), otherwise use the namespace
37
37
  // istanbul ignore next
38
- const sanitizer = dompurify_1.default ?? DOMPurifyNS;
38
+ const sanitizer = dompurify_1.default !== null && dompurify_1.default !== void 0 ? dompurify_1.default : DOMPurifyNS;
39
39
  // eslint-disable-next-line deprecation/deprecation
40
40
  const sanitizedSvg = sanitizer.sanitize(atob(dataUriParts[1]));
41
41
  const parsedSvg = new window.DOMParser().parseFromString(sanitizedSvg, "text/xml");
@@ -1 +1 @@
1
- {"version":3,"file":"IconWebComponent.js","sourceRoot":"","sources":["../../../../src/core-react/utils/IconWebComponent.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,uBAAuB;AACvB,+CAA+C;AAC/C;;GAEG;;;AAEH,0DAAgD;AAChD,sDAA6C;AAC7C,sCAAmC;AACnC,oEAAoD;AAEpD;;GAEG;AACH,MAAa,gBAAiB,SAAQ,WAAW;IACvC,KAAK,CAAC,iBAAiB;QAC7B,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9C,CAAC;IAEO,KAAK,CAAC,OAAO;QACnB,qDAAqD;QACrD,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM;YACxB,OAAO;QAET,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAE3C,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;YAC3B,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAEpC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,IAAI,2BAA2B,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE;gBAChF,qBAAM,CAAC,QAAQ,CAAC,eAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,sBAAsB,CAAC,CAAC;aACtE;YAED,6EAA6E;YAC7E,iFAAiF;YACjF,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AC,SAAS,EAAE,CAAC,CAAC,eAAe,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;aAClE;iBAAM;gBACL,MAAM,IAAI,wBAAO,CAAE,eAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,sBAAsB,CAAC,CAAC;aACzE;QACH,CAAC,CAAC;aACD,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAClF,CAAC;CACF;AAzDD,4CAyDC","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// istanbul ignore file\r\n// IconWebComponent requires in-browser testing\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport { UiError } from \"@itwin/appui-abstract\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { UiCore } from \"../UiCore\";\r\nimport DOMPurify, * as DOMPurifyNS from \"dompurify\";\r\n\r\n/**\r\n * IconWebComponent loads icon from an svg path\r\n */\r\nexport class IconWebComponent extends HTMLElement {\r\n private async connectedCallback() {\r\n await this.loadSvg();\r\n this.dispatchEvent(new CustomEvent(\"load\"));\r\n }\r\n\r\n private async loadSvg() {\r\n // if svg was already appended don't request it again\r\n if (this.childNodes.length)\r\n return;\r\n\r\n const src = this.getAttribute(\"src\") || \"\";\r\n\r\n if (src.startsWith(\"data:\")) {\r\n const dataUriParts = src.split(\",\");\r\n\r\n if (dataUriParts.length !== 2 || \"data:image/svg+xml;base64\" !== dataUriParts[0]) {\r\n Logger.logError(UiCore.loggerCategory(this), \"Unable to load icon.\");\r\n }\r\n\r\n // the esm build of dompurify has a default import but the cjs build does not\r\n // if there is a default export, use it (likely esm), otherwise use the namespace\r\n // istanbul ignore next\r\n const sanitizer = DOMPurify ?? DOMPurifyNS;\r\n // eslint-disable-next-line deprecation/deprecation\r\n const sanitizedSvg = sanitizer.sanitize(atob(dataUriParts[1]));\r\n\r\n const parsedSvg = new window.DOMParser().parseFromString(sanitizedSvg, \"text/xml\");\r\n const errorNode = parsedSvg.querySelector(\"parsererror\");\r\n if (errorNode || \"svg\" !== parsedSvg.documentElement.nodeName.toLowerCase()) {\r\n throw new UiError (UiCore.loggerCategory(this), \"Unable to load icon.\");\r\n }\r\n\r\n !this.childNodes.length && this.append(parsedSvg.documentElement);\r\n return;\r\n }\r\n\r\n await fetch(src)\r\n .catch((_error) => {\r\n Logger.logError(UiCore.loggerCategory(this), \"Unable to load icon.\");\r\n })\r\n .then(async (response) => {\r\n if (response && response.ok) {\r\n return response.text();\r\n } else {\r\n throw new UiError (UiCore.loggerCategory(this), \"Unable to load icon.\");\r\n }\r\n })\r\n .then((str) => {\r\n if (str !== undefined) {\r\n return (new window.DOMParser()).parseFromString(str, \"text/xml\");\r\n } else {\r\n throw new UiError (UiCore.loggerCategory(this), \"Unable to load icon.\");\r\n }\r\n })\r\n .then((data) => !this.childNodes.length && this.append(data.documentElement));\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"IconWebComponent.js","sourceRoot":"","sources":["../../../../src/core-react/utils/IconWebComponent.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,uBAAuB;AACvB,+CAA+C;AAC/C;;GAEG;;;AAEH,0DAAgD;AAChD,sDAA6C;AAC7C,sCAAmC;AACnC,oEAAoD;AAEpD;;GAEG;AACH,MAAa,gBAAiB,SAAQ,WAAW;IACvC,KAAK,CAAC,iBAAiB;QAC7B,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9C,CAAC;IAEO,KAAK,CAAC,OAAO;QACnB,qDAAqD;QACrD,IAAI,IAAI,CAAC,UAAU,CAAC,MAA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CAAC,eAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,sBAAsB,CAAC,CAAC;QACvE,CAAC,CAAC;aACD,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;YACvB,IAAI,QAAQ,IAAI,QAAQ,CAAC,EAAE,EAAE;gBAC3B,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;aACxB;iBAAM;gBACL,MAAM,IAAI,wBAAO,CAAE,eAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,sBAAsB,CAAC,CAAC;aACzE;QACH,CAAC,CAAC;aACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACZ,IAAI,GAAG,KAAK,SAAS,EAAE;gBACrB,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,eAAe,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;aAClE;iBAAM;gBACL,MAAM,IAAI,wBAAO,CAAE,eAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,sBAAsB,CAAC,CAAC;aACzE;QACH,CAAC,CAAC;aACD,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAClF,CAAC;CACF;AAzDD,4CAyDC","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// istanbul ignore file\n// IconWebComponent requires in-browser testing\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiCore } from \"../UiCore\";\nimport DOMPurify, * as DOMPurifyNS from \"dompurify\";\n\n/**\n * IconWebComponent loads icon from an svg path\n */\nexport class IconWebComponent extends HTMLElement {\n private async connectedCallback() {\n await this.loadSvg();\n this.dispatchEvent(new CustomEvent(\"load\"));\n }\n\n private async loadSvg() {\n // if svg was already appended don't request it again\n if (this.childNodes.length)\n return;\n\n const src = this.getAttribute(\"src\") || \"\";\n\n if (src.startsWith(\"data:\")) {\n const dataUriParts = src.split(\",\");\n\n if (dataUriParts.length !== 2 || \"data:image/svg+xml;base64\" !== dataUriParts[0]) {\n Logger.logError(UiCore.loggerCategory(this), \"Unable to load icon.\");\n }\n\n // the esm build of dompurify has a default import but the cjs build does not\n // if there is a default export, use it (likely esm), otherwise use the namespace\n // istanbul ignore next\n const sanitizer = DOMPurify ?? DOMPurifyNS;\n // eslint-disable-next-line deprecation/deprecation\n const sanitizedSvg = sanitizer.sanitize(atob(dataUriParts[1]));\n\n const parsedSvg = new window.DOMParser().parseFromString(sanitizedSvg, \"text/xml\");\n const errorNode = parsedSvg.querySelector(\"parsererror\");\n if (errorNode || \"svg\" !== parsedSvg.documentElement.nodeName.toLowerCase()) {\n throw new UiError (UiCore.loggerCategory(this), \"Unable to load icon.\");\n }\n\n !this.childNodes.length && this.append(parsedSvg.documentElement);\n return;\n }\n\n await fetch(src)\n .catch((_error) => {\n Logger.logError(UiCore.loggerCategory(this), \"Unable to load icon.\");\n })\n .then(async (response) => {\n if (response && response.ok) {\n return response.text();\n } else {\n throw new UiError (UiCore.loggerCategory(this), \"Unable to load icon.\");\n }\n })\n .then((str) => {\n if (str !== undefined) {\n return (new window.DOMParser()).parseFromString(str, \"text/xml\");\n } else {\n throw new UiError (UiCore.loggerCategory(this), \"Unable to load icon.\");\n }\n })\n .then((data) => !this.childNodes.length && this.append(data.documentElement));\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module Utilities
3
3
  */
4
- import { PointProps } from "@itwin/appui-abstract";
4
+ import type { PointProps } from "@itwin/appui-abstract";
5
5
  /** Describes and provides methods to work with 2d points.
6
6
  * @internal
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/Point.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;GAEG;AACH,qBAAa,KAAM,YAAW,UAAU;aAOH,CAAC;aAAsB,CAAC;IAN3D,yCAAyC;WAC3B,MAAM,CAAC,UAAU,EAAE,UAAU;IAI3C,2BAA2B;gBACQ,CAAC,SAAI,EAAkB,CAAC,SAAI;IAG/D,oDAAoD;IAC7C,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM;IAK/C,oDAAoD;IAC7C,sBAAsB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM;IAIxD,kCAAkC;IAC3B,WAAW,CAAC,KAAK,EAAE,UAAU;IAIpC,oEAAoE;IAC7D,MAAM,CAAC,MAAM,EAAE,UAAU;IAIhC,8DAA8D;IACvD,OAAO,CAAC,MAAM,EAAE,MAAM;IAI7B,8DAA8D;IACvD,OAAO,CAAC,MAAM,EAAE,MAAM;IAI7B,oEAAoE;IAC7D,MAAM,CAAC,KAAK,EAAE,UAAU;IAI/B,oDAAoD;IAC7C,IAAI,CAAC,CAAC,EAAE,MAAM;IAIrB,oDAAoD;IAC7C,IAAI,CAAC,CAAC,EAAE,MAAM;IAIrB,8EAA8E;IACvE,QAAQ,CAAC,MAAM,EAAE,MAAM;IAI9B,qDAAqD;IAC9C,OAAO,IAAI,UAAU;CAM7B"}
1
+ {"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/Point.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD;;GAEG;AACH,qBAAa,KAAM,YAAW,UAAU;aAOH,CAAC;aAAsB,CAAC;IAN3D,yCAAyC;WAC3B,MAAM,CAAC,UAAU,EAAE,UAAU;IAI3C,2BAA2B;gBACQ,CAAC,SAAI,EAAkB,CAAC,SAA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E,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,oDAAoD;IAC7C,IAAI,CAAC,CAAS;QACnB,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,8EAA8E;IACvE,QAAQ,CAAC,MAAc;QAC5B,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;IACrD,CAAC;IAED,qDAAqD;IAC9C,OAAO;QACZ,OAAO;YACL,CAAC,EAAE,IAAI,CAAC,CAAC;YACT,CAAC,EAAE,IAAI,CAAC,CAAC;SACV,CAAC;IACJ,CAAC;CACF;AApED,sBAoEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport { PointProps } from \"@itwin/appui-abstract\";\r\n\r\n/** Describes and provides methods to work with 2d points.\r\n * @internal\r\n */\r\nexport class Point implements PointProps {\r\n /** Creates point from [[PointProps]]. */\r\n public static create(pointProps: PointProps) {\r\n return new Point(pointProps.x, pointProps.y);\r\n }\r\n\r\n /** Creates a new point. */\r\n public constructor(public readonly x = 0, public readonly y = 0) {\r\n }\r\n\r\n /** Calculates Euclidean distance to other point. */\r\n public getDistanceTo(other: PointProps): number {\r\n const offset = this.getOffsetTo(other);\r\n return Math.sqrt(Math.pow(offset.x, 2) + Math.pow(offset.y, 2));\r\n }\r\n\r\n /** Calculates grid-like distance to other point. */\r\n public getManhattanDistanceTo(other: PointProps): number {\r\n return Math.abs(this.x - other.x) + Math.abs(this.y - other.y);\r\n }\r\n\r\n /** Gets offset to other point. */\r\n public getOffsetTo(other: PointProps) {\r\n return new Point(other.x - this.x, other.y - this.y);\r\n }\r\n\r\n /** @returns New [[Point]] that is offset along the X and Y axes. */\r\n public offset(offset: PointProps) {\r\n return new Point(this.x + offset.x, this.y + offset.y);\r\n }\r\n\r\n /** @returns New [[Point]] that is offset along the X axis. */\r\n public offsetX(offset: number) {\r\n return new Point(this.x + offset, this.y);\r\n }\r\n\r\n /** @returns New [[Point]] that is offset along the Y axis. */\r\n public offsetY(offset: number) {\r\n return new Point(this.x, this.y + offset);\r\n }\r\n\r\n /** @returns True if position of this and other points are equal. */\r\n public equals(other: PointProps) {\r\n return other.x === this.x && other.y === this.y;\r\n }\r\n\r\n /** @returns New [[Point]] with modified x value. */\r\n public setX(x: number) {\r\n return new Point(x, this.y);\r\n }\r\n\r\n /** @returns New [[Point]] with modified y value. */\r\n public setY(y: number) {\r\n return new Point(this.x, y);\r\n }\r\n\r\n /** @returns New [[Point]] with coordinates multiplied by specified factor. */\r\n public multiply(factor: number) {\r\n return new Point(this.x * factor, this.y * factor);\r\n }\r\n\r\n /** @returns [[PointProps]] object for this point. */\r\n public toProps(): PointProps {\r\n return {\r\n x: this.x,\r\n y: this.y,\r\n };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Point.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Point.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;GAEG;AACH,MAAa,KAAK;IAChB,yCAAyC;IAClC,MAAM,CAAC,MAAM,CAAC,UAAsB;QACzC,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;IAED,2BAA2B;IAC3B,YAAmC,IAAI,CAAC,EAAkB,IAAI,CAAC;QAA5B,MAAC,GAAD,CAAC,CAAI;QAAkB,MAAC,GAAD,CAAC,CAAI;IAC/D,CAAC;IAED,oDAAoD;IAC7C,aAAa,CAAC,KAAiB;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;Q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AC;IAED,oDAAoD;IAC7C,IAAI,CAAC,CAAS;QACnB,OAAO,IAAI,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,oDAAoD;IAC7C,IAAI,CAAC,CAAS;QACnB,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,8EAA8E;IACvE,QAAQ,CAAC,MAAc;QAC5B,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;IACrD,CAAC;IAED,qDAAqD;IAC9C,OAAO;QACZ,OAAO;YACL,CAAC,EAAE,IAAI,CAAC,CAAC;YACT,CAAC,EAAE,IAAI,CAAC,CAAC;SACV,CAAC;IACJ,CAAC;CACF;AApED,sBAoEC","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 Utilities\n */\n\nimport type { PointProps } from \"@itwin/appui-abstract\";\n\n/** Describes and provides methods to work with 2d points.\n * @internal\n */\nexport class Point implements PointProps {\n /** Creates point from [[PointProps]]. */\n public static create(pointProps: PointProps) {\n return new Point(pointProps.x, pointProps.y);\n }\n\n /** Creates a new point. */\n public constructor(public readonly x = 0, public readonly y = 0) {\n }\n\n /** Calculates Euclidean distance to other point. */\n public getDistanceTo(other: PointProps): number {\n const offset = this.getOffsetTo(other);\n return Math.sqrt(Math.pow(offset.x, 2) + Math.pow(offset.y, 2));\n }\n\n /** Calculates grid-like distance to other point. */\n public getManhattanDistanceTo(other: PointProps): number {\n return Math.abs(this.x - other.x) + Math.abs(this.y - other.y);\n }\n\n /** Gets offset to other point. */\n public getOffsetTo(other: PointProps) {\n return new Point(other.x - this.x, other.y - this.y);\n }\n\n /** @returns New [[Point]] that is offset along the X and Y axes. */\n public offset(offset: PointProps) {\n return new Point(this.x + offset.x, this.y + offset.y);\n }\n\n /** @returns New [[Point]] that is offset along the X axis. */\n public offsetX(offset: number) {\n return new Point(this.x + offset, this.y);\n }\n\n /** @returns New [[Point]] that is offset along the Y axis. */\n public offsetY(offset: number) {\n return new Point(this.x, this.y + offset);\n }\n\n /** @returns True if position of this and other points are equal. */\n public equals(other: PointProps) {\n return other.x === this.x && other.y === this.y;\n }\n\n /** @returns New [[Point]] with modified x value. */\n public setX(x: number) {\n return new Point(x, this.y);\n }\n\n /** @returns New [[Point]] with modified y value. */\n public setY(y: number) {\n return new Point(this.x, y);\n }\n\n /** @returns New [[Point]] with coordinates multiplied by specified factor. */\n public multiply(factor: number) {\n return new Point(this.x * factor, this.y * factor);\n }\n\n /** @returns [[PointProps]] object for this point. */\n public toProps(): PointProps {\n return {\n x: this.x,\n y: this.y,\n };\n }\n}\n"]}
@@ -1,8 +1,8 @@
1
1
  /** @packageDocumentation
2
2
  * @module Utilities
3
3
  */
4
- import * as React from "react";
5
- import { Omit } from "./typeUtils";
4
+ import type * as React from "react";
5
+ import type { Omit } from "./typeUtils";
6
6
  /** Props used by components that expect class name to be passed in.
7
7
  * @public
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Props.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/Props.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,kCAAkC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,gHAAgH;IAChH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,WAAW;CAAI;AAEhG;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,IAAI,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"Props.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/Props.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,kCAAkC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,gHAAgH;IAChH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,WAAW;CAAI;AAEhG;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,IAAI,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Props.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Props.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Omit } from \"./typeUtils\";\r\n\r\n/** Props used by components that expect class name to be passed in.\r\n * @public\r\n */\r\nexport interface ClassNameProps {\r\n /** Custom CSS class name */\r\n className?: string;\r\n}\r\n\r\n/** Common props used by components.\r\n * @public\r\n */\r\nexport interface CommonProps extends ClassNameProps {\r\n /** Custom CSS style properties */\r\n style?: React.CSSProperties;\r\n /** Optional unique identifier for item. If defined it will be added to DOM Element attribute as data-item-id */\r\n itemId?: string;\r\n}\r\n\r\n/** Common properties using a div element.\r\n * @public\r\n */\r\nexport interface CommonDivProps extends React.AllHTMLAttributes<HTMLDivElement>, CommonProps { }\r\n\r\n/** Props used by components that do not expect children to be passed in.\r\n * @public\r\n */\r\nexport interface NoChildrenProps {\r\n children?: undefined;\r\n}\r\n\r\n/** Omit children property from T.\r\n * @public\r\n */\r\nexport type OmitChildrenProp<T extends { children?: React.ReactNode }> = Omit<T, \"children\">;\r\n"]}
1
+ {"version":3,"file":"Props.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Props.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 Utilities\n */\n\nimport type * as React from \"react\";\nimport type { Omit } from \"./typeUtils\";\n\n/** Props used by components that expect class name to be passed in.\n * @public\n */\nexport interface ClassNameProps {\n /** Custom CSS class name */\n className?: string;\n}\n\n/** Common props used by components.\n * @public\n */\nexport interface CommonProps extends ClassNameProps {\n /** Custom CSS style properties */\n style?: React.CSSProperties;\n /** Optional unique identifier for item. If defined it will be added to DOM Element attribute as data-item-id */\n itemId?: string;\n}\n\n/** Common properties using a div element.\n * @public\n */\nexport interface CommonDivProps extends React.AllHTMLAttributes<HTMLDivElement>, CommonProps { }\n\n/** Props used by components that do not expect children to be passed in.\n * @public\n */\nexport interface NoChildrenProps {\n children?: undefined;\n}\n\n/** Omit children property from T.\n * @public\n */\nexport type OmitChildrenProp<T extends { children?: React.ReactNode }> = Omit<T, \"children\">;\n"]}
@@ -1,9 +1,10 @@
1
1
  /** @packageDocumentation
2
2
  * @module Utilities
3
3
  */
4
- import { PointProps } from "@itwin/appui-abstract";
4
+ import type { PointProps } from "@itwin/appui-abstract";
5
5
  import { Point } from "./Point";
6
- import { Size, SizeProps } from "./Size";
6
+ import type { SizeProps } from "./Size";
7
+ import { Size } from "./Size";
7
8
  /** Describes 2d bounds.
8
9
  * @public
9
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Rectangle.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/Rectangle.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGzC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,oBAAY,MAAM;IAChB,OAAO,IAAA;IACP,QAAQ,IAAA;IACR,WAAW,IAAA;IACX,UAAU,IAAA;CACX;AAED;;GAEG;AACH,qBAAa,SAAU,YA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,CAAC,GAAG;gBACpB,gBAAgB,GAAG,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;iBACnC,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM;gBAC7B,gBAAgB,GAAG,CAAC,CAAC;;gBAErB,gBAAgB,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;SAC5C;aAAM;YACL,IAAI,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG;gBACpB,gBAAgB,GAAG,uBAAU,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;iBAClF,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM;gBAC7B,gBAAgB,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;;gBAExC,gBAAgB,GAAG,uBAAU,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;SAC3F;QAED,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,6DAA6D;IACtD,OAAO;QACZ,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAC;IACJ,CAAC;CACF;AAjRD,8BAiRC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport { PointProps } from \"@itwin/appui-abstract\";\r\nimport { Point } from \"./Point\";\r\nimport { Size, SizeProps } from \"./Size\";\r\nimport { UiGeometry } from \"./UiGeometry\";\r\n\r\n/** Describes 2d bounds.\r\n * @public\r\n */\r\nexport interface RectangleProps {\r\n readonly left: number;\r\n readonly top: number;\r\n readonly right: number;\r\n readonly bottom: number;\r\n}\r\n\r\n/** Available corners of [[Rectangle]].\r\n * @internal\r\n */\r\nexport enum Corner {\r\n TopLeft,\r\n TopRight,\r\n BottomRight,\r\n BottomLeft,\r\n}\r\n\r\n/** Describes and provides methods to work with 2d bounds.\r\n * @internal\r\n */\r\nexport class Rectangle implements RectangleProps {\r\n /** Creates rectangle from [[RectangleProps]]. */\r\n public static create(props: RectangleProps): Rectangle {\r\n return new Rectangle(props.left, props.top, props.right, props.bottom);\r\n }\r\n\r\n /** Creates rectangle from [[SizeProps]]. */\r\n public static createFromSize(size: SizeProps): Rectangle {\r\n return new Rectangle(0, 0, size.width, size.height);\r\n }\r\n\r\n /** Create a rectangle with 2 pairs of xy candidates. Theses are compared and shuffled as needed for the rectangle. */\r\n public static createXYXY(xA: number, yA: number, xB: number, yB: number): Rectangle {\r\n return new Rectangle(\r\n Math.min(xA, xB), Math.min(yA, yB),\r\n Math.max(xA, xB), Math.max(yA, yB));\r\n }\r\n\r\n /** Creates rectangle with specified bounds. */\r\n public constructor(public readonly left = 0, public readonly top = 0, public readonly right = 0, public readonly bottom = 0) {\r\n }\r\n\r\n /** @returns Size of this rectangle. */\r\n public getSize(): Size {\r\n const width = this.getWidth();\r\n const height = this.getHeight();\r\n return new Size(width, height);\r\n }\r\n\r\n /** @returns Width of this rectangle. */\r\n public getWidth(): number {\r\n return this.right - this.left;\r\n }\r\n\r\n /** @returns Height of this rectangle. */\r\n public getHeight(): number {\r\n return this.bottom - this.top;\r\n }\r\n\r\n /** @returns Position of specified corner. */\r\n public getCorner(corner: Corner): Point {\r\n switch (corner) {\r\n case Corner.TopLeft: {\r\n return this.topLeft();\r\n }\r\n case Corner.TopRight: {\r\n return new Point(this.right, this.top);\r\n }\r\n case Corner.BottomLeft: {\r\n return new Point(this.left, this.bottom);\r\n }\r\n case Corner.BottomRight: {\r\n return new Point(this.right, this.bottom);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Inset the bounds of this rectangle.\r\n * @note Negative arguments will increase the size of rectangle.\r\n * @returns New [[Rectangle]] with modified bounds.\r\n */\r\n public inset(left: number, top: number, right: number, bottom: number): Rectangle {\r\n return new Rectangle(this.left + left, this.top + top, this.right - right, this.bottom - bottom);\r\n }\r\n\r\n /**\r\n * Offsets the rectangle along the X and Y axes.\r\n * @returns New [[Rectangle]] with modified position.\r\n */\r\n public offset(offset: PointProps): Rectangle {\r\n return new Rectangle(this.left + offset.x, this.top + offset.y, this.right + offset.x, this.bottom + offset.y);\r\n }\r\n\r\n /**\r\n * Offsets the rectangle along the X axis.\r\n * @returns New [[Rectangle]] with modified position along X axis.\r\n */\r\n public offsetX(offset: number): Rectangle {\r\n return new Rectangle(this.left + offset, this.top, this.right + offset, this.bottom);\r\n }\r\n\r\n /**\r\n * Offsets the rectangle along the Y axis.\r\n * @returns New [[Rectangle]] with modified position along Y axis.\r\n */\r\n public offsetY(offset: number): Rectangle {\r\n return new Rectangle(this.left, this.top + offset, this.right, this.bottom + offset);\r\n }\r\n\r\n /**\r\n * Moves the top left corner of rectangle to specified point.\r\n * @returns New [[Rectangle]] with modified position.\r\n */\r\n public setPosition(position: PointProps): Rectangle {\r\n return new Rectangle(position.x, position.y, position.x + this.getWidth(), position.y + this.getHeight());\r\n }\r\n\r\n /**\r\n * Sets the height of the rectangle.\r\n * @note Only [[Edge.Bottom]] is subject to change.\r\n * @returns New [[Rectangle]] with modified height.\r\n */\r\n public setHeight(height: number): Rectangle {\r\n return new Rectangle(this.left, this.top, this.right, this.top + height);\r\n }\r\n\r\n /**\r\n * Sets the width of the rectangle.\r\n * @note Only [[Edge.Right]] is subject to change.\r\n * @returns New [[Rectangle]] with modified width.\r\n */\r\n public setWidth(width: number): Rectangle {\r\n return new Rectangle(this.left, this.top, this.left + width, this.bottom);\r\n }\r\n\r\n /**\r\n * Sets the height and width of the rectangle.\r\n * @note Only [[Edge.Bottom]] and [[Edge.Right]] are subjects to change.\r\n * @returns New [[Rectangle]] with modified height.\r\n */\r\n public setSize(size: SizeProps): Rectangle {\r\n return new Rectangle(this.left, this.top, this.left + size.width, this.top + size.height);\r\n }\r\n\r\n /** Checks if bounds of two rectangles match. */\r\n public equals(other: RectangleProps): boolean {\r\n if (this.left === other.left &&\r\n this.top === other.top &&\r\n this.right === other.right &&\r\n this.bottom === other.bottom)\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Checks if point is within bounds of the rectangle.\r\n * @note Inclusive.\r\n */\r\n public containsPoint(point: PointProps): boolean {\r\n return point.x >= this.left && point.x <= this.right && point.y >= this.top && point.y <= this.bottom;\r\n }\r\n\r\n /**\r\n * Checks if a point given as x,y is within the rectangle.\r\n * @note Inclusive.\r\n */\r\n public containsXY(x: number, y: number): boolean {\r\n return this.containsPoint({x, y});\r\n }\r\n\r\n /**\r\n * @returns true if this rectangle contains other rectangle.\r\n * @note Inclusive.\r\n */\r\n public contains(other: RectangleProps): boolean {\r\n return other.left >= this.left && other.right <= this.right && other.top >= this.top && other.bottom <= this.bottom;\r\n }\r\n\r\n /** @returns New [[Rectangle]] which is contained in other rectangle. */\r\n public containIn(other: RectangleProps): Rectangle {\r\n let contained: Rectangle = this.containVerticallyIn(other);\r\n contained = contained.containHorizontallyIn(other);\r\n return contained;\r\n }\r\n\r\n /** @returns New [[Rectangle]] which is vertically contained in other rectangle. */\r\n public containVerticallyIn(other: RectangleProps): Rectangle {\r\n const contained = this.offsetY(Math.min(other.bottom - this.bottom, 0));\r\n return contained.offsetY(Math.max(other.top - contained.top, 0));\r\n }\r\n\r\n /** @returns New [[Rectangle]] which is horizontally contained in other rectangle. */\r\n public containHorizontallyIn(other: RectangleProps): Rectangle {\r\n const contained = this.offsetX(Math.min(other.right - this.right, 0));\r\n return contained.offsetX(Math.max(other.left - contained.left, 0));\r\n }\r\n\r\n /** @returns [[Corner.TopLeft]] position of this rectangle. */\r\n public topLeft(): Point {\r\n return new Point(this.left, this.top);\r\n }\r\n\r\n /** @returns Center point position of this rectangle. */\r\n public center(): Point {\r\n const x = this.left + (this.right - this.left) / 2;\r\n const y = this.top + (this.bottom - this.top) / 2;\r\n return new Point(x, y);\r\n }\r\n\r\n /** @returns true if this rectangle intersects other rectangle. */\r\n public intersects(other: RectangleProps): boolean {\r\n return this.left < other.right && this.right > other.left &&\r\n this.top < other.bottom && this.bottom > other.top;\r\n }\r\n\r\n /**\r\n * Merges outer edges of this and other rectangles.\r\n * @returns New [[Rectangle]] with merged bounds.\r\n */\r\n public outerMergeWith(other: RectangleProps): Rectangle {\r\n const left = Math.min(this.left, other.left);\r\n const top = Math.min(this.top, other.top);\r\n const right = Math.max(this.right, other.right);\r\n const bottom = Math.max(this.bottom, other.bottom);\r\n return new Rectangle(left, top, right, bottom);\r\n }\r\n\r\n /**\r\n * Vertically divides this rectangle into specified number of equal height segments.\r\n * @returns Vertical rectangle segment.\r\n */\r\n public getVerticalSegmentBounds(segmentId: number, numberOfSegments: number): Rectangle {\r\n const segmentHeight = this.getHeight() / numberOfSegments;\r\n\r\n const top = segmentId * segmentHeight;\r\n return this.inset(0, top, 0, 0).setHeight(segmentHeight);\r\n }\r\n\r\n /**\r\n * Horizontally divides this rectangle into specified number of equal width segments.\r\n * @returns Horizontal rectangle segment.\r\n */\r\n public getHorizontalSegmentBounds(segmentId: number, numberOfSegments: number): Rectangle {\r\n const segmentWidth = this.getWidth() / numberOfSegments;\r\n\r\n const left = segmentId * segmentWidth;\r\n return this.inset(left, 0, 0, 0).setWidth(segmentWidth);\r\n }\r\n\r\n /**\r\n * Calculates the shortest distance between this rectangle and a given point.\r\n * @returns The shortest distance to a point.\r\n */\r\n public getShortestDistanceToPoint(point: PointProps): number {\r\n let shortestDistance = 0;\r\n\r\n if (point.x < this.left) {\r\n if (point.y < this.top)\r\n shortestDistance = UiGeometry.hypotenuseXY(this.left - point.x, this.top - point.y);\r\n else if (point.y <= this.bottom)\r\n shortestDistance = this.left - point.x;\r\n else\r\n shortestDistance = UiGeometry.hypotenuseXY(this.left - point.x, this.bottom - point.y);\r\n } else if (point.x <= this.right) {\r\n if (point.y < this.top)\r\n shortestDistance = this.top - point.y;\r\n else if (point.y <= this.bottom)\r\n shortestDistance = 0;\r\n else\r\n shortestDistance = point.y - this.bottom;\r\n } else {\r\n if (point.y < this.top)\r\n shortestDistance = UiGeometry.hypotenuseXY(this.right - point.x, this.top - point.y);\r\n else if (point.y <= this.bottom)\r\n shortestDistance = point.x - this.right;\r\n else\r\n shortestDistance = UiGeometry.hypotenuseXY(this.right - point.x, this.bottom - point.y);\r\n }\r\n\r\n return shortestDistance;\r\n }\r\n\r\n /** @returns [[RectangleProps]] object for this rectangle. */\r\n public toProps(): RectangleProps {\r\n return {\r\n bottom: this.bottom,\r\n left: this.left,\r\n right: this.right,\r\n top: this.top,\r\n };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Rectangle.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Rectangle.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,mCAAgC;AAEhC,iCAA8B;AAC9B,6CAA0C;AAY1C;;GAEG;AACH,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,yCAAO,CAAA;IACP,2CAAQ,CAAA;IACR,iDAAW,CAAA;IACX,+CAAU,CAAA;AACZ,CAAC,EALW,MAAM,GAAN,cAAM,KAAN,cAAM,QAKjB;AAED;;GAEG;AACH,MAAa,SAAS;IACpB,iDAAiD;IAC1C,MAAM,CAAC,MAAM,CAAC,KAAqB;QACxC,OAAO,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzE,CAAC;IAED,4CAA4C;IACrC,MAAM,CA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,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;SAC3F;QAED,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,6DAA6D;IACtD,OAAO;QACZ,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAC;IACJ,CAAC;CACF;AAjRD,8BAiRC","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 Utilities\n */\n\nimport type { PointProps } from \"@itwin/appui-abstract\";\nimport { Point } from \"./Point\";\nimport type { SizeProps } from \"./Size\";\nimport { Size } from \"./Size\";\nimport { UiGeometry } from \"./UiGeometry\";\n\n/** Describes 2d bounds.\n * @public\n */\nexport interface RectangleProps {\n readonly left: number;\n readonly top: number;\n readonly right: number;\n readonly bottom: number;\n}\n\n/** Available corners of [[Rectangle]].\n * @internal\n */\nexport enum Corner {\n TopLeft,\n TopRight,\n BottomRight,\n BottomLeft,\n}\n\n/** Describes and provides methods to work with 2d bounds.\n * @internal\n */\nexport class Rectangle implements RectangleProps {\n /** Creates rectangle from [[RectangleProps]]. */\n public static create(props: RectangleProps): Rectangle {\n return new Rectangle(props.left, props.top, props.right, props.bottom);\n }\n\n /** Creates rectangle from [[SizeProps]]. */\n public static createFromSize(size: SizeProps): Rectangle {\n return new Rectangle(0, 0, size.width, size.height);\n }\n\n /** Create a rectangle with 2 pairs of xy candidates. Theses are compared and shuffled as needed for the rectangle. */\n public static createXYXY(xA: number, yA: number, xB: number, yB: number): Rectangle {\n return new Rectangle(\n Math.min(xA, xB), Math.min(yA, yB),\n Math.max(xA, xB), Math.max(yA, yB));\n }\n\n /** Creates rectangle with specified bounds. */\n public constructor(public readonly left = 0, public readonly top = 0, public readonly right = 0, public readonly bottom = 0) {\n }\n\n /** @returns Size of this rectangle. */\n public getSize(): Size {\n const width = this.getWidth();\n const height = this.getHeight();\n return new Size(width, height);\n }\n\n /** @returns Width of this rectangle. */\n public getWidth(): number {\n return this.right - this.left;\n }\n\n /** @returns Height of this rectangle. */\n public getHeight(): number {\n return this.bottom - this.top;\n }\n\n /** @returns Position of specified corner. */\n public getCorner(corner: Corner): Point {\n switch (corner) {\n case Corner.TopLeft: {\n return this.topLeft();\n }\n case Corner.TopRight: {\n return new Point(this.right, this.top);\n }\n case Corner.BottomLeft: {\n return new Point(this.left, this.bottom);\n }\n case Corner.BottomRight: {\n return new Point(this.right, this.bottom);\n }\n }\n }\n\n /**\n * Inset the bounds of this rectangle.\n * @note Negative arguments will increase the size of rectangle.\n * @returns New [[Rectangle]] with modified bounds.\n */\n public inset(left: number, top: number, right: number, bottom: number): Rectangle {\n return new Rectangle(this.left + left, this.top + top, this.right - right, this.bottom - bottom);\n }\n\n /**\n * Offsets the rectangle along the X and Y axes.\n * @returns New [[Rectangle]] with modified position.\n */\n public offset(offset: PointProps): Rectangle {\n return new Rectangle(this.left + offset.x, this.top + offset.y, this.right + offset.x, this.bottom + offset.y);\n }\n\n /**\n * Offsets the rectangle along the X axis.\n * @returns New [[Rectangle]] with modified position along X axis.\n */\n public offsetX(offset: number): Rectangle {\n return new Rectangle(this.left + offset, this.top, this.right + offset, this.bottom);\n }\n\n /**\n * Offsets the rectangle along the Y axis.\n * @returns New [[Rectangle]] with modified position along Y axis.\n */\n public offsetY(offset: number): Rectangle {\n return new Rectangle(this.left, this.top + offset, this.right, this.bottom + offset);\n }\n\n /**\n * Moves the top left corner of rectangle to specified point.\n * @returns New [[Rectangle]] with modified position.\n */\n public setPosition(position: PointProps): Rectangle {\n return new Rectangle(position.x, position.y, position.x + this.getWidth(), position.y + this.getHeight());\n }\n\n /**\n * Sets the height of the rectangle.\n * @note Only [[Edge.Bottom]] is subject to change.\n * @returns New [[Rectangle]] with modified height.\n */\n public setHeight(height: number): Rectangle {\n return new Rectangle(this.left, this.top, this.right, this.top + height);\n }\n\n /**\n * Sets the width of the rectangle.\n * @note Only [[Edge.Right]] is subject to change.\n * @returns New [[Rectangle]] with modified width.\n */\n public setWidth(width: number): Rectangle {\n return new Rectangle(this.left, this.top, this.left + width, this.bottom);\n }\n\n /**\n * Sets the height and width of the rectangle.\n * @note Only [[Edge.Bottom]] and [[Edge.Right]] are subjects to change.\n * @returns New [[Rectangle]] with modified height.\n */\n public setSize(size: SizeProps): Rectangle {\n return new Rectangle(this.left, this.top, this.left + size.width, this.top + size.height);\n }\n\n /** Checks if bounds of two rectangles match. */\n public equals(other: RectangleProps): boolean {\n if (this.left === other.left &&\n this.top === other.top &&\n this.right === other.right &&\n this.bottom === other.bottom)\n return true;\n\n return false;\n }\n\n /**\n * Checks if point is within bounds of the rectangle.\n * @note Inclusive.\n */\n public containsPoint(point: PointProps): boolean {\n return point.x >= this.left && point.x <= this.right && point.y >= this.top && point.y <= this.bottom;\n }\n\n /**\n * Checks if a point given as x,y is within the rectangle.\n * @note Inclusive.\n */\n public containsXY(x: number, y: number): boolean {\n return this.containsPoint({x, y});\n }\n\n /**\n * @returns true if this rectangle contains other rectangle.\n * @note Inclusive.\n */\n public contains(other: RectangleProps): boolean {\n return other.left >= this.left && other.right <= this.right && other.top >= this.top && other.bottom <= this.bottom;\n }\n\n /** @returns New [[Rectangle]] which is contained in other rectangle. */\n public containIn(other: RectangleProps): Rectangle {\n let contained: Rectangle = this.containVerticallyIn(other);\n contained = contained.containHorizontallyIn(other);\n return contained;\n }\n\n /** @returns New [[Rectangle]] which is vertically contained in other rectangle. */\n public containVerticallyIn(other: RectangleProps): Rectangle {\n const contained = this.offsetY(Math.min(other.bottom - this.bottom, 0));\n return contained.offsetY(Math.max(other.top - contained.top, 0));\n }\n\n /** @returns New [[Rectangle]] which is horizontally contained in other rectangle. */\n public containHorizontallyIn(other: RectangleProps): Rectangle {\n const contained = this.offsetX(Math.min(other.right - this.right, 0));\n return contained.offsetX(Math.max(other.left - contained.left, 0));\n }\n\n /** @returns [[Corner.TopLeft]] position of this rectangle. */\n public topLeft(): Point {\n return new Point(this.left, this.top);\n }\n\n /** @returns Center point position of this rectangle. */\n public center(): Point {\n const x = this.left + (this.right - this.left) / 2;\n const y = this.top + (this.bottom - this.top) / 2;\n return new Point(x, y);\n }\n\n /** @returns true if this rectangle intersects other rectangle. */\n public intersects(other: RectangleProps): boolean {\n return this.left < other.right && this.right > other.left &&\n this.top < other.bottom && this.bottom > other.top;\n }\n\n /**\n * Merges outer edges of this and other rectangles.\n * @returns New [[Rectangle]] with merged bounds.\n */\n public outerMergeWith(other: RectangleProps): Rectangle {\n const left = Math.min(this.left, other.left);\n const top = Math.min(this.top, other.top);\n const right = Math.max(this.right, other.right);\n const bottom = Math.max(this.bottom, other.bottom);\n return new Rectangle(left, top, right, bottom);\n }\n\n /**\n * Vertically divides this rectangle into specified number of equal height segments.\n * @returns Vertical rectangle segment.\n */\n public getVerticalSegmentBounds(segmentId: number, numberOfSegments: number): Rectangle {\n const segmentHeight = this.getHeight() / numberOfSegments;\n\n const top = segmentId * segmentHeight;\n return this.inset(0, top, 0, 0).setHeight(segmentHeight);\n }\n\n /**\n * Horizontally divides this rectangle into specified number of equal width segments.\n * @returns Horizontal rectangle segment.\n */\n public getHorizontalSegmentBounds(segmentId: number, numberOfSegments: number): Rectangle {\n const segmentWidth = this.getWidth() / numberOfSegments;\n\n const left = segmentId * segmentWidth;\n return this.inset(left, 0, 0, 0).setWidth(segmentWidth);\n }\n\n /**\n * Calculates the shortest distance between this rectangle and a given point.\n * @returns The shortest distance to a point.\n */\n public getShortestDistanceToPoint(point: PointProps): number {\n let shortestDistance = 0;\n\n if (point.x < this.left) {\n if (point.y < this.top)\n shortestDistance = UiGeometry.hypotenuseXY(this.left - point.x, this.top - point.y);\n else if (point.y <= this.bottom)\n shortestDistance = this.left - point.x;\n else\n shortestDistance = UiGeometry.hypotenuseXY(this.left - point.x, this.bottom - point.y);\n } else if (point.x <= this.right) {\n if (point.y < this.top)\n shortestDistance = this.top - point.y;\n else if (point.y <= this.bottom)\n shortestDistance = 0;\n else\n shortestDistance = point.y - this.bottom;\n } else {\n if (point.y < this.top)\n shortestDistance = UiGeometry.hypotenuseXY(this.right - point.x, this.top - point.y);\n else if (point.y <= this.bottom)\n shortestDistance = point.x - this.right;\n else\n shortestDistance = UiGeometry.hypotenuseXY(this.right - point.x, this.bottom - point.y);\n }\n\n return shortestDistance;\n }\n\n /** @returns [[RectangleProps]] object for this rectangle. */\n public toProps(): RectangleProps {\n return {\n bottom: this.bottom,\n left: this.left,\n right: this.right,\n top: this.top,\n };\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module Utilities
3
3
  */
4
- import { IDisposable } from "@itwin/core-bentley";
4
+ import type { IDisposable } from "@itwin/core-bentley";
5
5
  /**
6
6
  * A helper class to recursively save and restore scroll positions.
7
7
  * Usage:
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollPositionMaintainer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/ScrollPositionMaintainer.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;;;;;;;;;GAWG;AACH,qBAAa,wBAAyB,YAAW,WAAW;IAC1D,OAAO,CAAC,QAAQ,CAAuB;gBACpB,EAAE,EAAE,OAAO;IAIvB,OAAO;IACd,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAUlC,OAAO,CAAC,MAAM,CAAC,sBAAsB;CAGtC"}
1
+ {"version":3,"file":"ScrollPositionMaintainer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/ScrollPositionMaintainer.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,qBAAa,wBAAyB,YAAW,WAAW;IAC1D,OAAO,CAAC,QAAQ,CAAuB;gBACpB,EAAE,EAAE,OAAO;IAIvB,OAAO;IACd,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAUlC,OAAO,CAAC,MAAM,CAAC,sBAAsB;CAGtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollPositionMaintainer.js","sourceRoot":"","sources":["../../../../src/core-react/utils/ScrollPositionMaintainer.ts"],"names":[],"mappings":";;;AASA;;;;;;;;;;;GAWG;AACH,MAAa,wBAAwB;IAEnC,YAAmB,EAAW;QAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;QAC1B,wBAAwB,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpE,CAAC;IACM,OAAO,KAAK,wBAAwB,CAAC,sBAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5E,MAAM,CAAC,mBAAmB,CAAC,KAAiC,EAAE,OAA6B;QACjG,KAAK,MAAM,EAAE,IAAI,KAAK,EAAE;YACtB,uBAAuB;YACvB,IAAI,EAAE,CAAC,SAAS;gBACd,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC;YAChC,uBAAuB;YACvB,IAAI,EAAE,CAAC,QAAQ;gBACb,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SAClD;IACH,CAAC;IACO,MAAM,CAAC,sBAAsB,CAAC,OAA6B;QACjE,OAAO,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IAC/D,CAAC;CACF;AApBD,4DAoBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\nimport { IDisposable } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * A helper class to recursively save and restore scroll positions.\r\n * Usage:\r\n * ```ts\r\n * // scroll positions are saved when `ScrollPositionMaintainer` object is created\r\n * const maintainer = new ScrollPositionMaintainer(element);\r\n * // can do something with `element` here\r\n * // disposing the `maintainer` object restores scroll positions\r\n * maintainer.dispose();\r\n * ```\r\n * @public\r\n */\r\nexport class ScrollPositionMaintainer implements IDisposable {\r\n private _storage: Map<Element, number>;\r\n public constructor(el: Element) {\r\n this._storage = new Map();\r\n ScrollPositionMaintainer.saveScrollPositions([el], this._storage);\r\n }\r\n public dispose() { ScrollPositionMaintainer.restoreScrollPositions(this._storage); }\r\n private static saveScrollPositions(elems: Element[] | HTMLCollection, storage: Map<Element, number>) {\r\n for (const el of elems) {\r\n // istanbul ignore else\r\n if (el.scrollTop)\r\n storage.set(el, el.scrollTop);\r\n // istanbul ignore else\r\n if (el.children)\r\n this.saveScrollPositions(el.children, storage);\r\n }\r\n }\r\n private static restoreScrollPositions(storage: Map<Element, number>) {\r\n storage.forEach((scrollTop, el) => el.scrollTop = scrollTop);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ScrollPositionMaintainer.js","sourceRoot":"","sources":["../../../../src/core-react/utils/ScrollPositionMaintainer.ts"],"names":[],"mappings":";;;AASA;;;;;;;;;;;GAWG;AACH,MAAa,wBAAwB;IAEnC,YAAmB,EAAW;QAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;QAC1B,wBAAwB,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpE,CAAC;IACM,OAAO,KAAK,wBAAwB,CAAC,sBAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5E,MAAM,CAAC,mBAAmB,CAAC,KAAiC,EAAE,OAA6B;QACjG,KAAK,MAAM,EAAE,IAAI,KAAK,EAAE;YACtB,uBAAuB;YACvB,IAAI,EAAE,CAAC,SAAS;gBACd,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC;YAChC,uBAAuB;YACvB,IAAI,EAAE,CAAC,QAAQ;gBACb,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SAClD;IACH,CAAC;IACO,MAAM,CAAC,sBAAsB,CAAC,OAA6B;QACjE,OAAO,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IAC/D,CAAC;CACF;AApBD,4DAoBC","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 Utilities\n */\nimport type { IDisposable } from \"@itwin/core-bentley\";\n\n/**\n * A helper class to recursively save and restore scroll positions.\n * Usage:\n * ```ts\n * // scroll positions are saved when `ScrollPositionMaintainer` object is created\n * const maintainer = new ScrollPositionMaintainer(element);\n * // can do something with `element` here\n * // disposing the `maintainer` object restores scroll positions\n * maintainer.dispose();\n * ```\n * @public\n */\nexport class ScrollPositionMaintainer implements IDisposable {\n private _storage: Map<Element, number>;\n public constructor(el: Element) {\n this._storage = new Map();\n ScrollPositionMaintainer.saveScrollPositions([el], this._storage);\n }\n public dispose() { ScrollPositionMaintainer.restoreScrollPositions(this._storage); }\n private static saveScrollPositions(elems: Element[] | HTMLCollection, storage: Map<Element, number>) {\n for (const el of elems) {\n // istanbul ignore else\n if (el.scrollTop)\n storage.set(el, el.scrollTop);\n // istanbul ignore else\n if (el.children)\n this.saveScrollPositions(el.children, storage);\n }\n }\n private static restoreScrollPositions(storage: Map<Element, number>) {\n storage.forEach((scrollTop, el) => el.scrollTop = scrollTop);\n }\n}\n"]}