@itwin/core-react 4.14.1 → 4.15.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 (524) hide show
  1. package/CHANGELOG.md +27 -1
  2. package/lib/cjs/core-react/UiCore.d.ts +1 -1
  3. package/lib/cjs/core-react/UiCore.js +1 -1
  4. package/lib/cjs/core-react/UiCore.js.map +1 -1
  5. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  6. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  7. package/lib/cjs/core-react/base/Centered.d.ts +1 -1
  8. package/lib/cjs/core-react/base/Centered.d.ts.map +1 -1
  9. package/lib/cjs/core-react/base/Centered.js +2 -1
  10. package/lib/cjs/core-react/base/Centered.js.map +1 -1
  11. package/lib/cjs/core-react/base/Div.d.ts +2 -2
  12. package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
  13. package/lib/cjs/core-react/base/Div.js +1 -1
  14. package/lib/cjs/core-react/base/Div.js.map +1 -1
  15. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +1 -1
  16. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  17. package/lib/cjs/core-react/base/DivWithOutsideClick.js +4 -2
  18. package/lib/cjs/core-react/base/DivWithOutsideClick.js.map +1 -1
  19. package/lib/cjs/core-react/base/FillCentered.d.ts +1 -1
  20. package/lib/cjs/core-react/base/FillCentered.d.ts.map +1 -1
  21. package/lib/cjs/core-react/base/FillCentered.js +2 -1
  22. package/lib/cjs/core-react/base/FillCentered.js.map +1 -1
  23. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +1 -1
  24. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  25. package/lib/cjs/core-react/base/FlexWrapContainer.js +2 -1
  26. package/lib/cjs/core-react/base/FlexWrapContainer.js.map +1 -1
  27. package/lib/cjs/core-react/base/Gap.d.ts +2 -2
  28. package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
  29. package/lib/cjs/core-react/base/Gap.js +1 -1
  30. package/lib/cjs/core-react/base/Gap.js.map +1 -1
  31. package/lib/cjs/core-react/base/ScrollView.d.ts +1 -1
  32. package/lib/cjs/core-react/base/ScrollView.d.ts.map +1 -1
  33. package/lib/cjs/core-react/base/ScrollView.js +2 -1
  34. package/lib/cjs/core-react/base/ScrollView.js.map +1 -1
  35. package/lib/cjs/core-react/button/UnderlinedButton.d.ts +2 -2
  36. package/lib/cjs/core-react/button/UnderlinedButton.js +1 -1
  37. package/lib/cjs/core-react/button/UnderlinedButton.js.map +1 -1
  38. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +4 -4
  39. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  40. package/lib/cjs/core-react/checklistbox/CheckListBox.js +3 -3
  41. package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
  42. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  43. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  44. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  45. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js +1 -0
  46. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  47. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  48. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  49. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  50. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  51. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  52. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js +3 -1
  53. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  54. package/lib/cjs/core-react/dialog/Dialog.d.ts +4 -5
  55. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  56. package/lib/cjs/core-react/dialog/Dialog.js +3 -3
  57. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  58. package/lib/cjs/core-react/dialog/GlobalDialog.d.ts +3 -3
  59. package/lib/cjs/core-react/dialog/GlobalDialog.js +1 -1
  60. package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
  61. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +3 -3
  62. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  63. package/lib/cjs/core-react/elementseparator/ElementSeparator.js +1 -1
  64. package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
  65. package/lib/cjs/core-react/enums/Alignment.d.ts +2 -0
  66. package/lib/cjs/core-react/enums/Alignment.d.ts.map +1 -1
  67. package/lib/cjs/core-react/enums/Alignment.js +2 -0
  68. package/lib/cjs/core-react/enums/Alignment.js.map +1 -1
  69. package/lib/cjs/core-react/enums/CheckBoxState.d.ts +1 -0
  70. package/lib/cjs/core-react/enums/CheckBoxState.d.ts.map +1 -1
  71. package/lib/cjs/core-react/enums/CheckBoxState.js.map +1 -1
  72. package/lib/cjs/core-react/enums/SortDirection.d.ts +1 -0
  73. package/lib/cjs/core-react/enums/SortDirection.d.ts.map +1 -1
  74. package/lib/cjs/core-react/enums/SortDirection.js +1 -0
  75. package/lib/cjs/core-react/enums/SortDirection.js.map +1 -1
  76. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +2 -2
  77. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  78. package/lib/cjs/core-react/expandable/ExpandableList.js +1 -1
  79. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  80. package/lib/cjs/core-react/hocs/withIsPressed.d.ts +2 -0
  81. package/lib/cjs/core-react/hocs/withIsPressed.d.ts.map +1 -1
  82. package/lib/cjs/core-react/hocs/withIsPressed.js +1 -0
  83. package/lib/cjs/core-react/hocs/withIsPressed.js.map +1 -1
  84. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts +2 -0
  85. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  86. package/lib/cjs/core-react/hocs/withOnOutsideClick.js +1 -0
  87. package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
  88. package/lib/cjs/core-react/hocs/withTimeout.d.ts +2 -0
  89. package/lib/cjs/core-react/hocs/withTimeout.d.ts.map +1 -1
  90. package/lib/cjs/core-react/hocs/withTimeout.js +4 -1
  91. package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
  92. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts +0 -4
  93. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
  94. package/lib/cjs/core-react/icons/ConditionalIconItem.js +2 -13
  95. package/lib/cjs/core-react/icons/ConditionalIconItem.js.map +1 -1
  96. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  97. package/lib/cjs/core-react/icons/IconComponent.js +1 -1
  98. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  99. package/lib/cjs/core-react/icons/SvgPath.d.ts +2 -0
  100. package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
  101. package/lib/cjs/core-react/icons/SvgPath.js +2 -0
  102. package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
  103. package/lib/cjs/core-react/icons/WebFontIcon.d.ts +2 -0
  104. package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
  105. package/lib/cjs/core-react/icons/WebFontIcon.js +2 -0
  106. package/lib/cjs/core-react/icons/WebFontIcon.js.map +1 -1
  107. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +2 -2
  108. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  109. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +1 -1
  110. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  111. package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
  112. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  113. package/lib/cjs/core-react/inputs/InputLabel.d.ts +2 -2
  114. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  115. package/lib/cjs/core-react/inputs/InputLabel.js +1 -1
  116. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  117. package/lib/cjs/core-react/inputs/InputStatus.d.ts +1 -1
  118. package/lib/cjs/core-react/inputs/InputStatus.js +1 -1
  119. package/lib/cjs/core-react/inputs/InputStatus.js.map +1 -1
  120. package/lib/cjs/core-react/inputs/LabeledComponentProps.d.ts +2 -2
  121. package/lib/cjs/core-react/inputs/LabeledComponentProps.js.map +1 -1
  122. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +2 -2
  123. package/lib/cjs/core-react/inputs/iconinput/IconInput.js +1 -1
  124. package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
  125. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +3 -3
  126. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +1 -1
  127. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  128. package/lib/cjs/core-react/listbox/Listbox.d.ts +7 -7
  129. package/lib/cjs/core-react/listbox/Listbox.js +3 -3
  130. package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
  131. package/lib/cjs/core-react/loading/LoadingBar.d.ts +2 -2
  132. package/lib/cjs/core-react/loading/LoadingBar.js +1 -1
  133. package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
  134. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +2 -2
  135. package/lib/cjs/core-react/loading/LoadingPrompt.js +1 -1
  136. package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
  137. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +3 -3
  138. package/lib/cjs/core-react/loading/LoadingSpinner.js +1 -1
  139. package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
  140. package/lib/cjs/core-react/loading/LoadingStatus.d.ts +2 -2
  141. package/lib/cjs/core-react/loading/LoadingStatus.js +1 -1
  142. package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
  143. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +5 -1
  144. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  145. package/lib/cjs/core-react/messagebox/MessageBox.js +8 -1
  146. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  147. package/lib/cjs/core-react/notification/MessageRenderer.d.ts +2 -0
  148. package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
  149. package/lib/cjs/core-react/notification/MessageRenderer.js +2 -0
  150. package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
  151. package/lib/cjs/core-react/notification/MessageType.d.ts +2 -0
  152. package/lib/cjs/core-react/notification/MessageType.d.ts.map +1 -1
  153. package/lib/cjs/core-react/notification/MessageType.js.map +1 -1
  154. package/lib/cjs/core-react/popup/Popup.d.ts +6 -1
  155. package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
  156. package/lib/cjs/core-react/popup/Popup.js +9 -2
  157. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  158. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +4 -4
  159. package/lib/cjs/core-react/radialmenu/RadialMenu.js +2 -2
  160. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  161. package/lib/cjs/core-react/searchbox/SearchBox.d.ts +2 -2
  162. package/lib/cjs/core-react/searchbox/SearchBox.js +1 -1
  163. package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
  164. package/lib/cjs/core-react/settings/SettingsManager.d.ts +8 -8
  165. package/lib/cjs/core-react/settings/SettingsManager.js +4 -4
  166. package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
  167. package/lib/cjs/core-react/tabs/Tabs.d.ts +4 -4
  168. package/lib/cjs/core-react/tabs/Tabs.js +1 -1
  169. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  170. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +1 -1
  171. package/lib/cjs/core-react/tabs/VerticalTabs.js +1 -1
  172. package/lib/cjs/core-react/tabs/VerticalTabs.js.map +1 -1
  173. package/lib/cjs/core-react/text/BlockText.d.ts +1 -1
  174. package/lib/cjs/core-react/text/BlockText.js +1 -1
  175. package/lib/cjs/core-react/text/BlockText.js.map +1 -1
  176. package/lib/cjs/core-react/text/BodyText.d.ts +1 -1
  177. package/lib/cjs/core-react/text/BodyText.js +1 -1
  178. package/lib/cjs/core-react/text/BodyText.js.map +1 -1
  179. package/lib/cjs/core-react/text/DisabledText.d.ts +1 -1
  180. package/lib/cjs/core-react/text/DisabledText.js +1 -1
  181. package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
  182. package/lib/cjs/core-react/text/FilteredText.d.ts +2 -0
  183. package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
  184. package/lib/cjs/core-react/text/FilteredText.js +2 -0
  185. package/lib/cjs/core-react/text/FilteredText.js.map +1 -1
  186. package/lib/cjs/core-react/text/MutedText.d.ts +1 -1
  187. package/lib/cjs/core-react/text/MutedText.js +1 -1
  188. package/lib/cjs/core-react/text/MutedText.js.map +1 -1
  189. package/lib/cjs/core-react/text/StyledText.d.ts +2 -2
  190. package/lib/cjs/core-react/text/StyledText.js +1 -1
  191. package/lib/cjs/core-react/text/StyledText.js.map +1 -1
  192. package/lib/cjs/core-react/text/TextProps.d.ts +1 -1
  193. package/lib/cjs/core-react/text/TextProps.js.map +1 -1
  194. package/lib/cjs/core-react/tree/Branch.d.ts +2 -0
  195. package/lib/cjs/core-react/tree/Branch.d.ts.map +1 -1
  196. package/lib/cjs/core-react/tree/Branch.js +2 -0
  197. package/lib/cjs/core-react/tree/Branch.js.map +1 -1
  198. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts +2 -0
  199. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  200. package/lib/cjs/core-react/tree/ExpansionToggle.js +2 -0
  201. package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
  202. package/lib/cjs/core-react/tree/Node.d.ts +3 -3
  203. package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
  204. package/lib/cjs/core-react/tree/Node.js +6 -1
  205. package/lib/cjs/core-react/tree/Node.js.map +1 -1
  206. package/lib/cjs/core-react/tree/Placeholder.d.ts +2 -0
  207. package/lib/cjs/core-react/tree/Placeholder.d.ts.map +1 -1
  208. package/lib/cjs/core-react/tree/Placeholder.js +2 -0
  209. package/lib/cjs/core-react/tree/Placeholder.js.map +1 -1
  210. package/lib/cjs/core-react/tree/Tree.d.ts +2 -0
  211. package/lib/cjs/core-react/tree/Tree.d.ts.map +1 -1
  212. package/lib/cjs/core-react/tree/Tree.js +2 -0
  213. package/lib/cjs/core-react/tree/Tree.js.map +1 -1
  214. package/lib/cjs/core-react/utils/IconHelper.d.ts +1 -0
  215. package/lib/cjs/core-react/utils/IconHelper.d.ts.map +1 -1
  216. package/lib/cjs/core-react/utils/IconHelper.js +4 -2
  217. package/lib/cjs/core-react/utils/IconHelper.js.map +1 -1
  218. package/lib/cjs/core-react/utils/Props.d.ts +5 -1
  219. package/lib/cjs/core-react/utils/Props.d.ts.map +1 -1
  220. package/lib/cjs/core-react/utils/Props.js.map +1 -1
  221. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts +1 -0
  222. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  223. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js +3 -0
  224. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  225. package/lib/cjs/core-react/utils/Timer.d.ts +2 -0
  226. package/lib/cjs/core-react/utils/Timer.d.ts.map +1 -1
  227. package/lib/cjs/core-react/utils/Timer.js +2 -0
  228. package/lib/cjs/core-react/utils/Timer.js.map +1 -1
  229. package/lib/cjs/core-react/utils/getCssVariable.d.ts +2 -0
  230. package/lib/cjs/core-react/utils/getCssVariable.d.ts.map +1 -1
  231. package/lib/cjs/core-react/utils/getCssVariable.js +3 -0
  232. package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
  233. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
  234. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +1 -0
  235. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  236. package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts +1 -0
  237. package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  238. package/lib/cjs/core-react/utils/hooks/useDisposable.js +1 -0
  239. package/lib/cjs/core-react/utils/hooks/useDisposable.js.map +1 -1
  240. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.d.ts +1 -0
  241. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
  242. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js +1 -0
  243. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  244. package/lib/cjs/core-react/utils/hooks/useInterval.d.ts +1 -0
  245. package/lib/cjs/core-react/utils/hooks/useInterval.d.ts.map +1 -1
  246. package/lib/cjs/core-react/utils/hooks/useInterval.js +1 -0
  247. package/lib/cjs/core-react/utils/hooks/useInterval.js.map +1 -1
  248. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts +5 -1
  249. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
  250. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js +1 -0
  251. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  252. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +2 -0
  253. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  254. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +2 -0
  255. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  256. package/lib/cjs/core-react/utils/typeUtils.d.ts +1 -0
  257. package/lib/cjs/core-react/utils/typeUtils.d.ts.map +1 -1
  258. package/lib/cjs/core-react/utils/typeUtils.js.map +1 -1
  259. package/lib/cjs/core-react.d.ts +0 -1
  260. package/lib/cjs/core-react.d.ts.map +1 -1
  261. package/lib/cjs/core-react.js +2 -1
  262. package/lib/cjs/core-react.js.map +1 -1
  263. package/lib/esm/core-react/UiCore.d.ts +1 -1
  264. package/lib/esm/core-react/UiCore.js +1 -1
  265. package/lib/esm/core-react/UiCore.js.map +1 -1
  266. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  267. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  268. package/lib/esm/core-react/base/Centered.d.ts +1 -1
  269. package/lib/esm/core-react/base/Centered.d.ts.map +1 -1
  270. package/lib/esm/core-react/base/Centered.js +2 -1
  271. package/lib/esm/core-react/base/Centered.js.map +1 -1
  272. package/lib/esm/core-react/base/Div.d.ts +2 -2
  273. package/lib/esm/core-react/base/Div.d.ts.map +1 -1
  274. package/lib/esm/core-react/base/Div.js +1 -1
  275. package/lib/esm/core-react/base/Div.js.map +1 -1
  276. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +1 -1
  277. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  278. package/lib/esm/core-react/base/DivWithOutsideClick.js +4 -2
  279. package/lib/esm/core-react/base/DivWithOutsideClick.js.map +1 -1
  280. package/lib/esm/core-react/base/FillCentered.d.ts +1 -1
  281. package/lib/esm/core-react/base/FillCentered.d.ts.map +1 -1
  282. package/lib/esm/core-react/base/FillCentered.js +2 -1
  283. package/lib/esm/core-react/base/FillCentered.js.map +1 -1
  284. package/lib/esm/core-react/base/FlexWrapContainer.d.ts +1 -1
  285. package/lib/esm/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  286. package/lib/esm/core-react/base/FlexWrapContainer.js +2 -1
  287. package/lib/esm/core-react/base/FlexWrapContainer.js.map +1 -1
  288. package/lib/esm/core-react/base/Gap.d.ts +2 -2
  289. package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
  290. package/lib/esm/core-react/base/Gap.js +1 -1
  291. package/lib/esm/core-react/base/Gap.js.map +1 -1
  292. package/lib/esm/core-react/base/ScrollView.d.ts +1 -1
  293. package/lib/esm/core-react/base/ScrollView.d.ts.map +1 -1
  294. package/lib/esm/core-react/base/ScrollView.js +2 -1
  295. package/lib/esm/core-react/base/ScrollView.js.map +1 -1
  296. package/lib/esm/core-react/button/UnderlinedButton.d.ts +2 -2
  297. package/lib/esm/core-react/button/UnderlinedButton.js +1 -1
  298. package/lib/esm/core-react/button/UnderlinedButton.js.map +1 -1
  299. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +4 -4
  300. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  301. package/lib/esm/core-react/checklistbox/CheckListBox.js +3 -3
  302. package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
  303. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  304. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  305. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  306. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js +1 -0
  307. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  308. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  309. package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  310. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  311. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  312. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  313. package/lib/esm/core-react/contextmenu/PopupContextMenu.js +3 -1
  314. package/lib/esm/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  315. package/lib/esm/core-react/dialog/Dialog.d.ts +4 -5
  316. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  317. package/lib/esm/core-react/dialog/Dialog.js +3 -3
  318. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  319. package/lib/esm/core-react/dialog/GlobalDialog.d.ts +3 -3
  320. package/lib/esm/core-react/dialog/GlobalDialog.js +1 -1
  321. package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
  322. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +3 -3
  323. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  324. package/lib/esm/core-react/elementseparator/ElementSeparator.js +1 -1
  325. package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
  326. package/lib/esm/core-react/enums/Alignment.d.ts +2 -0
  327. package/lib/esm/core-react/enums/Alignment.d.ts.map +1 -1
  328. package/lib/esm/core-react/enums/Alignment.js +2 -0
  329. package/lib/esm/core-react/enums/Alignment.js.map +1 -1
  330. package/lib/esm/core-react/enums/CheckBoxState.d.ts +1 -0
  331. package/lib/esm/core-react/enums/CheckBoxState.d.ts.map +1 -1
  332. package/lib/esm/core-react/enums/CheckBoxState.js.map +1 -1
  333. package/lib/esm/core-react/enums/SortDirection.d.ts +1 -0
  334. package/lib/esm/core-react/enums/SortDirection.d.ts.map +1 -1
  335. package/lib/esm/core-react/enums/SortDirection.js +1 -0
  336. package/lib/esm/core-react/enums/SortDirection.js.map +1 -1
  337. package/lib/esm/core-react/expandable/ExpandableList.d.ts +2 -2
  338. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  339. package/lib/esm/core-react/expandable/ExpandableList.js +1 -1
  340. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  341. package/lib/esm/core-react/hocs/withIsPressed.d.ts +2 -0
  342. package/lib/esm/core-react/hocs/withIsPressed.d.ts.map +1 -1
  343. package/lib/esm/core-react/hocs/withIsPressed.js +1 -0
  344. package/lib/esm/core-react/hocs/withIsPressed.js.map +1 -1
  345. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts +2 -0
  346. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  347. package/lib/esm/core-react/hocs/withOnOutsideClick.js +1 -0
  348. package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
  349. package/lib/esm/core-react/hocs/withTimeout.d.ts +2 -0
  350. package/lib/esm/core-react/hocs/withTimeout.d.ts.map +1 -1
  351. package/lib/esm/core-react/hocs/withTimeout.js +4 -1
  352. package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
  353. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts +0 -4
  354. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
  355. package/lib/esm/core-react/icons/ConditionalIconItem.js +2 -13
  356. package/lib/esm/core-react/icons/ConditionalIconItem.js.map +1 -1
  357. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  358. package/lib/esm/core-react/icons/IconComponent.js +1 -1
  359. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  360. package/lib/esm/core-react/icons/SvgPath.d.ts +2 -0
  361. package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
  362. package/lib/esm/core-react/icons/SvgPath.js +2 -0
  363. package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
  364. package/lib/esm/core-react/icons/WebFontIcon.d.ts +2 -0
  365. package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
  366. package/lib/esm/core-react/icons/WebFontIcon.js +2 -0
  367. package/lib/esm/core-react/icons/WebFontIcon.js.map +1 -1
  368. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +2 -2
  369. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  370. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +1 -1
  371. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  372. package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
  373. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  374. package/lib/esm/core-react/inputs/InputLabel.d.ts +2 -2
  375. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  376. package/lib/esm/core-react/inputs/InputLabel.js +1 -1
  377. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  378. package/lib/esm/core-react/inputs/InputStatus.d.ts +1 -1
  379. package/lib/esm/core-react/inputs/InputStatus.js +1 -1
  380. package/lib/esm/core-react/inputs/InputStatus.js.map +1 -1
  381. package/lib/esm/core-react/inputs/LabeledComponentProps.d.ts +2 -2
  382. package/lib/esm/core-react/inputs/LabeledComponentProps.js.map +1 -1
  383. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +2 -2
  384. package/lib/esm/core-react/inputs/iconinput/IconInput.js +1 -1
  385. package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
  386. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +3 -3
  387. package/lib/esm/core-react/inputs/numberinput/NumberInput.js +1 -1
  388. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  389. package/lib/esm/core-react/listbox/Listbox.d.ts +7 -7
  390. package/lib/esm/core-react/listbox/Listbox.js +3 -3
  391. package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
  392. package/lib/esm/core-react/loading/LoadingBar.d.ts +2 -2
  393. package/lib/esm/core-react/loading/LoadingBar.js +1 -1
  394. package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
  395. package/lib/esm/core-react/loading/LoadingPrompt.d.ts +2 -2
  396. package/lib/esm/core-react/loading/LoadingPrompt.js +1 -1
  397. package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
  398. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +3 -3
  399. package/lib/esm/core-react/loading/LoadingSpinner.js +1 -1
  400. package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
  401. package/lib/esm/core-react/loading/LoadingStatus.d.ts +2 -2
  402. package/lib/esm/core-react/loading/LoadingStatus.js +1 -1
  403. package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
  404. package/lib/esm/core-react/messagebox/MessageBox.d.ts +5 -1
  405. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  406. package/lib/esm/core-react/messagebox/MessageBox.js +8 -1
  407. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  408. package/lib/esm/core-react/notification/MessageRenderer.d.ts +2 -0
  409. package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
  410. package/lib/esm/core-react/notification/MessageRenderer.js +2 -0
  411. package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
  412. package/lib/esm/core-react/notification/MessageType.d.ts +2 -0
  413. package/lib/esm/core-react/notification/MessageType.d.ts.map +1 -1
  414. package/lib/esm/core-react/notification/MessageType.js.map +1 -1
  415. package/lib/esm/core-react/popup/Popup.d.ts +6 -1
  416. package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
  417. package/lib/esm/core-react/popup/Popup.js +9 -2
  418. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  419. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +4 -4
  420. package/lib/esm/core-react/radialmenu/RadialMenu.js +2 -2
  421. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  422. package/lib/esm/core-react/searchbox/SearchBox.d.ts +2 -2
  423. package/lib/esm/core-react/searchbox/SearchBox.js +1 -1
  424. package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
  425. package/lib/esm/core-react/settings/SettingsManager.d.ts +8 -8
  426. package/lib/esm/core-react/settings/SettingsManager.js +4 -4
  427. package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
  428. package/lib/esm/core-react/tabs/Tabs.d.ts +4 -4
  429. package/lib/esm/core-react/tabs/Tabs.js +1 -1
  430. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  431. package/lib/esm/core-react/tabs/VerticalTabs.d.ts +1 -1
  432. package/lib/esm/core-react/tabs/VerticalTabs.js +1 -1
  433. package/lib/esm/core-react/tabs/VerticalTabs.js.map +1 -1
  434. package/lib/esm/core-react/text/BlockText.d.ts +1 -1
  435. package/lib/esm/core-react/text/BlockText.js +1 -1
  436. package/lib/esm/core-react/text/BlockText.js.map +1 -1
  437. package/lib/esm/core-react/text/BodyText.d.ts +1 -1
  438. package/lib/esm/core-react/text/BodyText.js +1 -1
  439. package/lib/esm/core-react/text/BodyText.js.map +1 -1
  440. package/lib/esm/core-react/text/DisabledText.d.ts +1 -1
  441. package/lib/esm/core-react/text/DisabledText.js +1 -1
  442. package/lib/esm/core-react/text/DisabledText.js.map +1 -1
  443. package/lib/esm/core-react/text/FilteredText.d.ts +2 -0
  444. package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
  445. package/lib/esm/core-react/text/FilteredText.js +2 -0
  446. package/lib/esm/core-react/text/FilteredText.js.map +1 -1
  447. package/lib/esm/core-react/text/MutedText.d.ts +1 -1
  448. package/lib/esm/core-react/text/MutedText.js +1 -1
  449. package/lib/esm/core-react/text/MutedText.js.map +1 -1
  450. package/lib/esm/core-react/text/StyledText.d.ts +2 -2
  451. package/lib/esm/core-react/text/StyledText.js +1 -1
  452. package/lib/esm/core-react/text/StyledText.js.map +1 -1
  453. package/lib/esm/core-react/text/TextProps.d.ts +1 -1
  454. package/lib/esm/core-react/text/TextProps.js.map +1 -1
  455. package/lib/esm/core-react/tree/Branch.d.ts +2 -0
  456. package/lib/esm/core-react/tree/Branch.d.ts.map +1 -1
  457. package/lib/esm/core-react/tree/Branch.js +2 -0
  458. package/lib/esm/core-react/tree/Branch.js.map +1 -1
  459. package/lib/esm/core-react/tree/ExpansionToggle.d.ts +2 -0
  460. package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  461. package/lib/esm/core-react/tree/ExpansionToggle.js +2 -0
  462. package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
  463. package/lib/esm/core-react/tree/Node.d.ts +3 -3
  464. package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
  465. package/lib/esm/core-react/tree/Node.js +6 -1
  466. package/lib/esm/core-react/tree/Node.js.map +1 -1
  467. package/lib/esm/core-react/tree/Placeholder.d.ts +2 -0
  468. package/lib/esm/core-react/tree/Placeholder.d.ts.map +1 -1
  469. package/lib/esm/core-react/tree/Placeholder.js +2 -0
  470. package/lib/esm/core-react/tree/Placeholder.js.map +1 -1
  471. package/lib/esm/core-react/tree/Tree.d.ts +2 -0
  472. package/lib/esm/core-react/tree/Tree.d.ts.map +1 -1
  473. package/lib/esm/core-react/tree/Tree.js +2 -0
  474. package/lib/esm/core-react/tree/Tree.js.map +1 -1
  475. package/lib/esm/core-react/utils/IconHelper.d.ts +1 -0
  476. package/lib/esm/core-react/utils/IconHelper.d.ts.map +1 -1
  477. package/lib/esm/core-react/utils/IconHelper.js +4 -2
  478. package/lib/esm/core-react/utils/IconHelper.js.map +1 -1
  479. package/lib/esm/core-react/utils/Props.d.ts +5 -1
  480. package/lib/esm/core-react/utils/Props.d.ts.map +1 -1
  481. package/lib/esm/core-react/utils/Props.js.map +1 -1
  482. package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts +1 -0
  483. package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  484. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js +3 -0
  485. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  486. package/lib/esm/core-react/utils/Timer.d.ts +2 -0
  487. package/lib/esm/core-react/utils/Timer.d.ts.map +1 -1
  488. package/lib/esm/core-react/utils/Timer.js +2 -0
  489. package/lib/esm/core-react/utils/Timer.js.map +1 -1
  490. package/lib/esm/core-react/utils/getCssVariable.d.ts +2 -0
  491. package/lib/esm/core-react/utils/getCssVariable.d.ts.map +1 -1
  492. package/lib/esm/core-react/utils/getCssVariable.js +3 -0
  493. package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
  494. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
  495. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +1 -0
  496. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  497. package/lib/esm/core-react/utils/hooks/useDisposable.d.ts +1 -0
  498. package/lib/esm/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  499. package/lib/esm/core-react/utils/hooks/useDisposable.js +1 -0
  500. package/lib/esm/core-react/utils/hooks/useDisposable.js.map +1 -1
  501. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.d.ts +1 -0
  502. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
  503. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js +1 -0
  504. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  505. package/lib/esm/core-react/utils/hooks/useInterval.d.ts +1 -0
  506. package/lib/esm/core-react/utils/hooks/useInterval.d.ts.map +1 -1
  507. package/lib/esm/core-react/utils/hooks/useInterval.js +1 -0
  508. package/lib/esm/core-react/utils/hooks/useInterval.js.map +1 -1
  509. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts +5 -1
  510. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
  511. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js +1 -0
  512. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  513. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +2 -0
  514. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  515. package/lib/esm/core-react/utils/hooks/useResizeObserver.js +2 -0
  516. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  517. package/lib/esm/core-react/utils/typeUtils.d.ts +1 -0
  518. package/lib/esm/core-react/utils/typeUtils.d.ts.map +1 -1
  519. package/lib/esm/core-react/utils/typeUtils.js.map +1 -1
  520. package/lib/esm/core-react.d.ts +0 -1
  521. package/lib/esm/core-react.d.ts.map +1 -1
  522. package/lib/esm/core-react.js +2 -1
  523. package/lib/esm/core-react.js.map +1 -1
  524. package/package.json +2 -2
@@ -14,7 +14,9 @@ const classnames_1 = require("classnames");
14
14
  require("./FilteredText.scss");
15
15
  /** Component used to highlight filter matches within a text string.
16
16
  * @alpha
17
+ * @deprecated in 4.15.0. Used internally.
17
18
  */
19
+ // eslint-disable-next-line deprecation/deprecation
18
20
  function FilteredText(props) {
19
21
  const { value, className, matches, matchClassName, matchStyle, ...otherProps } = props;
20
22
  if (matches && matches.length > 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"FilteredText.js","sourceRoot":"","sources":["../../../../src/core-react/text/FilteredText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2BAA2B;AAE3B,+BAA+B;AAC/B,2CAAoC;AAGpC,+BAA6B;AAgB7B;;GAEG;AACH,SAAgB,YAAY,CAAC,KAAwB;IACnD,MAAM,EACJ,KAAK,EACL,SAAS,EACT,OAAO,EACP,cAAc,EACd,UAAU,EACV,GAAG,UAAU,EACd,GAAG,KAAK,CAAC;IACV,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClC,MAAM,KAAK,GAAsB,EAAE,CAAC;QAEpC,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;YAC3B,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ;gBACzB,KAAK,CAAC,IAAI,CACR,8BAAM,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAC,8BAA8B,IAC1D,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,CACjC,CACR,CAAC;YACJ,KAAK,CAAC,IAAI,CACR,8BACE,GAAG,EAAE,IAAI,CAAC,KAAK,EACf,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,IAAA,oBAAU,EAAC,4BAA4B,EAAE,cAAc,CAAC,IAElE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CACjC,CACR,CAAC;YACF,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC;QACtB,CAAC;QACD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,IAAI,QAAQ,GAAG,MAAM,EAAE,CAAC;YACtB,KAAK,CAAC,IAAI,CACR,8BAAM,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAC,8BAA8B,IAC1D,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,CAC7B,CACR,CAAC;QACJ,CAAC;QACD,OAAO,CACL,gCACM,UAAU,EACd,SAAS,EAAE,IAAA,oBAAU,EAAC,sBAAsB,EAAE,SAAS,CAAC,EACxD,KAAK,EAAE,KAAK,IAEX,KAAK,CACF,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,iCACM,UAAU,EACd,SAAS,EAAE,IAAA,oBAAU,EAAC,sBAAsB,EAAE,SAAS,CAAC,EACxD,KAAK,EAAE,KAAK,IAEX,KAAK,CACD,CACR,CAAC;AACJ,CAAC;AA3DD,oCA2DC","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 Text\n */\n\n// cSpell:ignore focusvalue\n\nimport * as React from \"react\";\nimport classnames from \"classnames\";\nimport type { CommonProps } from \"../utils/Props\";\nimport type { IMatch } from \"../utils/matches\";\nimport \"./FilteredText.scss\";\n\n/** Props supported by [FilteredText] component\n * @alpha\n */\nexport interface FilteredTextProps extends CommonProps {\n /** string that matched a filter string */\n value: string;\n /** define array of start and end positions of filter matches. */\n matches?: IMatch[];\n /** holds class name for matching span text. */\n matchClassName?: string;\n /** holds style for matching span text. */\n matchStyle?: React.CSSProperties;\n}\n\n/** Component used to highlight filter matches within a text string.\n * @alpha\n */\nexport function FilteredText(props: FilteredTextProps) {\n const {\n value,\n className,\n matches,\n matchClassName,\n matchStyle,\n ...otherProps\n } = props;\n if (matches && matches.length > 0) {\n const spans: React.ReactNode[] = [];\n\n let startPos = 0;\n for (const span of matches) {\n if (span.start !== startPos)\n spans.push(\n <span key={startPos} className=\"uicore-partial-filtered-text\">\n {value.substring(startPos, span.start)}\n </span>\n );\n spans.push(\n <span\n key={span.start}\n style={matchStyle}\n className={classnames(\"uicore-filtered-text-match\", matchClassName)}\n >\n {value.substring(span.start, span.end)}\n </span>\n );\n startPos = span.end;\n }\n const endPos = value.length;\n if (startPos < endPos) {\n spans.push(\n <span key={startPos} className=\"uicore-partial-filtered-text\">\n {value.substring(startPos, endPos)}\n </span>\n );\n }\n return (\n <div\n {...otherProps}\n className={classnames(\"uicore-filtered-text\", className)}\n title={value}\n >\n {spans}\n </div>\n );\n }\n\n return (\n <span\n {...otherProps}\n className={classnames(\"uicore-filtered-text\", className)}\n title={value}\n >\n {value}\n </span>\n );\n}\n"]}
1
+ {"version":3,"file":"FilteredText.js","sourceRoot":"","sources":["../../../../src/core-react/text/FilteredText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2BAA2B;AAE3B,+BAA+B;AAC/B,2CAAoC;AAGpC,+BAA6B;AAkB7B;;;GAGG;AACH,mDAAmD;AACnD,SAAgB,YAAY,CAAC,KAAwB;IACnD,MAAM,EACJ,KAAK,EACL,SAAS,EACT,OAAO,EACP,cAAc,EACd,UAAU,EACV,GAAG,UAAU,EACd,GAAG,KAAK,CAAC;IACV,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClC,MAAM,KAAK,GAAsB,EAAE,CAAC;QAEpC,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;YAC3B,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ;gBACzB,KAAK,CAAC,IAAI,CACR,8BAAM,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAC,8BAA8B,IAC1D,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,CACjC,CACR,CAAC;YACJ,KAAK,CAAC,IAAI,CACR,8BACE,GAAG,EAAE,IAAI,CAAC,KAAK,EACf,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,IAAA,oBAAU,EAAC,4BAA4B,EAAE,cAAc,CAAC,IAElE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CACjC,CACR,CAAC;YACF,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC;QACtB,CAAC;QACD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,IAAI,QAAQ,GAAG,MAAM,EAAE,CAAC;YACtB,KAAK,CAAC,IAAI,CACR,8BAAM,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAC,8BAA8B,IAC1D,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,CAC7B,CACR,CAAC;QACJ,CAAC;QACD,OAAO,CACL,gCACM,UAAU,EACd,SAAS,EAAE,IAAA,oBAAU,EAAC,sBAAsB,EAAE,SAAS,CAAC,EACxD,KAAK,EAAE,KAAK,IAEX,KAAK,CACF,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,iCACM,UAAU,EACd,SAAS,EAAE,IAAA,oBAAU,EAAC,sBAAsB,EAAE,SAAS,CAAC,EACxD,KAAK,EAAE,KAAK,IAEX,KAAK,CACD,CACR,CAAC;AACJ,CAAC;AA3DD,oCA2DC","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 Text\n */\n\n// cSpell:ignore focusvalue\n\nimport * as React from \"react\";\nimport classnames from \"classnames\";\nimport type { CommonProps } from \"../utils/Props\";\nimport type { IMatch } from \"../utils/matches\";\nimport \"./FilteredText.scss\";\n\n/** Props supported by [FilteredText] component\n * @alpha\n * @deprecated in 4.15.0. Props of deprecated {@link FilteredText} component.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface FilteredTextProps extends CommonProps {\n /** string that matched a filter string */\n value: string;\n /** define array of start and end positions of filter matches. */\n matches?: IMatch[];\n /** holds class name for matching span text. */\n matchClassName?: string;\n /** holds style for matching span text. */\n matchStyle?: React.CSSProperties;\n}\n\n/** Component used to highlight filter matches within a text string.\n * @alpha\n * @deprecated in 4.15.0. Used internally.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function FilteredText(props: FilteredTextProps) {\n const {\n value,\n className,\n matches,\n matchClassName,\n matchStyle,\n ...otherProps\n } = props;\n if (matches && matches.length > 0) {\n const spans: React.ReactNode[] = [];\n\n let startPos = 0;\n for (const span of matches) {\n if (span.start !== startPos)\n spans.push(\n <span key={startPos} className=\"uicore-partial-filtered-text\">\n {value.substring(startPos, span.start)}\n </span>\n );\n spans.push(\n <span\n key={span.start}\n style={matchStyle}\n className={classnames(\"uicore-filtered-text-match\", matchClassName)}\n >\n {value.substring(span.start, span.end)}\n </span>\n );\n startPos = span.end;\n }\n const endPos = value.length;\n if (startPos < endPos) {\n spans.push(\n <span key={startPos} className=\"uicore-partial-filtered-text\">\n {value.substring(startPos, endPos)}\n </span>\n );\n }\n return (\n <div\n {...otherProps}\n className={classnames(\"uicore-filtered-text\", className)}\n title={value}\n >\n {spans}\n </div>\n );\n }\n\n return (\n <span\n {...otherProps}\n className={classnames(\"uicore-filtered-text\", className)}\n title={value}\n >\n {value}\n </span>\n );\n}\n"]}
@@ -5,7 +5,7 @@ import * as React from "react";
5
5
  import type { TextProps } from "./TextProps";
6
6
  /** Styled muted/gray text React functional component
7
7
  * @public
8
- * @deprecated in 4.0 Use \<Text isMuted /\> from iTwinUI-react package.
8
+ * @deprecated in 4.0.0. Use \<Text isMuted /\> from iTwinUI-react package.
9
9
  */
10
10
  export declare function MutedText(props: TextProps): React.JSX.Element;
11
11
  //# sourceMappingURL=MutedText.d.ts.map
@@ -12,7 +12,7 @@ const React = require("react");
12
12
  const StyledText_1 = require("./StyledText");
13
13
  /** Styled muted/gray text React functional component
14
14
  * @public
15
- * @deprecated in 4.0 Use \<Text isMuted /\> from iTwinUI-react package.
15
+ * @deprecated in 4.0.0. Use \<Text isMuted /\> from iTwinUI-react package.
16
16
  */
17
17
  // eslint-disable-next-line deprecation/deprecation
18
18
  function MutedText(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"MutedText.js","sourceRoot":"","sources":["../../../../src/core-react/text/MutedText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,mDAAmD;AACnD,SAAgB,SAAS,CAAC,KAAgB;IACxC,mDAAmD;IACnD,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AACrE,CAAC;AAHD,8BAGC","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 Text\n */\n\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled muted/gray text React functional component\n * @public\n * @deprecated in 4.0 Use \\<Text isMuted /\\> from iTwinUI-react package.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function MutedText(props: TextProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <StyledText {...props} mainClassName=\"uicore-text-muted\" />;\n}\n"]}
1
+ {"version":3,"file":"MutedText.js","sourceRoot":"","sources":["../../../../src/core-react/text/MutedText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,mDAAmD;AACnD,SAAgB,SAAS,CAAC,KAAgB;IACxC,mDAAmD;IACnD,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AACrE,CAAC;AAHD,8BAGC","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 Text\n */\n\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled muted/gray text React functional component\n * @public\n * @deprecated in 4.0.0. Use \\<Text isMuted /\\> from iTwinUI-react package.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function MutedText(props: TextProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <StyledText {...props} mainClassName=\"uicore-text-muted\" />;\n}\n"]}
@@ -5,7 +5,7 @@ import * as React from "react";
5
5
  import type { TextProps } from "./TextProps";
6
6
  /** Properties for [[StyledText]] component
7
7
  * @public
8
- * @deprecated in 4.12.x. Props of deprecated component {@link StyledText}.
8
+ * @deprecated in 4.12.0. Props of deprecated component {@link StyledText}.
9
9
  */
10
10
  export interface StyledTextProps extends TextProps {
11
11
  /** Main CSS class name */
@@ -13,7 +13,7 @@ export interface StyledTextProps extends TextProps {
13
13
  }
14
14
  /** The base component for other text components that pass a main CSS class name.
15
15
  * @public
16
- * @deprecated in 4.0 Use \<Text /\> component from iTwinUI-react library.
16
+ * @deprecated in 4.0.0. Use \<Text /\> component from iTwinUI-react library.
17
17
  */
18
18
  export declare function StyledText(props: StyledTextProps): React.JSX.Element;
19
19
  //# sourceMappingURL=StyledText.d.ts.map
@@ -12,7 +12,7 @@ const classnames_1 = require("classnames");
12
12
  const React = require("react");
13
13
  /** The base component for other text components that pass a main CSS class name.
14
14
  * @public
15
- * @deprecated in 4.0 Use \<Text /\> component from iTwinUI-react library.
15
+ * @deprecated in 4.0.0. Use \<Text /\> component from iTwinUI-react library.
16
16
  */
17
17
  function StyledText(props) {
18
18
  const { mainClassName, className, style, children, ...spanProps } = props;
@@ -1 +1 @@
1
- {"version":3,"file":"StyledText.js","sourceRoot":"","sources":["../../../../src/core-react/text/StyledText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAc/B;;;GAGG;AACH,SAAgB,UAAU,CAAC,KAAsB;IAC/C,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAE1E,OAAO,CACL,iCACM,SAAS,EACb,SAAS,EAAE,IAAA,oBAAU,EAAC,aAAa,EAAE,SAAS,CAAC,EAC/C,KAAK,EAAE,KAAK,IAEX,QAAQ,CACJ,CACR,CAAC;AACJ,CAAC;AAZD,gCAYC","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 Text\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { TextProps } from \"./TextProps\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Properties for [[StyledText]] component\n * @public\n * @deprecated in 4.12.x. Props of deprecated component {@link StyledText}.\n */\nexport interface StyledTextProps extends TextProps {\n /** Main CSS class name */\n mainClassName: string;\n}\n\n/** The base component for other text components that pass a main CSS class name.\n * @public\n * @deprecated in 4.0 Use \\<Text /\\> component from iTwinUI-react library.\n */\nexport function StyledText(props: StyledTextProps) {\n const { mainClassName, className, style, children, ...spanProps } = props;\n\n return (\n <span\n {...spanProps}\n className={classnames(mainClassName, className)}\n style={style}\n >\n {children}\n </span>\n );\n}\n"]}
1
+ {"version":3,"file":"StyledText.js","sourceRoot":"","sources":["../../../../src/core-react/text/StyledText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAc/B;;;GAGG;AACH,SAAgB,UAAU,CAAC,KAAsB;IAC/C,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAE1E,OAAO,CACL,iCACM,SAAS,EACb,SAAS,EAAE,IAAA,oBAAU,EAAC,aAAa,EAAE,SAAS,CAAC,EAC/C,KAAK,EAAE,KAAK,IAEX,QAAQ,CACJ,CACR,CAAC;AACJ,CAAC;AAZD,gCAYC","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 Text\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { TextProps } from \"./TextProps\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Properties for [[StyledText]] component\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link StyledText}.\n */\nexport interface StyledTextProps extends TextProps {\n /** Main CSS class name */\n mainClassName: string;\n}\n\n/** The base component for other text components that pass a main CSS class name.\n * @public\n * @deprecated in 4.0.0. Use \\<Text /\\> component from iTwinUI-react library.\n */\nexport function StyledText(props: StyledTextProps) {\n const { mainClassName, className, style, children, ...spanProps } = props;\n\n return (\n <span\n {...spanProps}\n className={classnames(mainClassName, className)}\n style={style}\n >\n {children}\n </span>\n );\n}\n"]}
@@ -5,7 +5,7 @@ import type * as React from "react";
5
5
  import type { CommonProps } from "../utils/Props";
6
6
  /** Properties for various text components
7
7
  * @public
8
- * @deprecated in 4.12.x. Props of deprecated text components.
8
+ * @deprecated in 4.12.0. Props of deprecated text components.
9
9
  */
10
10
  export interface TextProps extends React.AllHTMLAttributes<HTMLSpanElement>, CommonProps {
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TextProps.js","sourceRoot":"","sources":["../../../../src/core-react/text/TextProps.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;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 Text\n */\n\nimport type * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/** Properties for various text components\n * @public\n * @deprecated in 4.12.x. Props of deprecated text components.\n */\nexport interface TextProps\n extends React.AllHTMLAttributes<HTMLSpanElement>,\n CommonProps {}\n"]}
1
+ {"version":3,"file":"TextProps.js","sourceRoot":"","sources":["../../../../src/core-react/text/TextProps.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;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 Text\n */\n\nimport type * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/** Properties for various text components\n * @public\n * @deprecated in 4.12.0. Props of deprecated text components.\n */\nexport interface TextProps\n extends React.AllHTMLAttributes<HTMLSpanElement>,\n CommonProps {} // eslint-disable-line deprecation/deprecation\n"]}
@@ -6,6 +6,7 @@ import * as React from "react";
6
6
  import type { CommonProps } from "../utils/Props";
7
7
  /** Properties for [[TreeBranch]] React component
8
8
  * @public
9
+ * @deprecated in 4.15.0. Props of deprecated {@link TreeBranch} component.
9
10
  */
10
11
  export interface TreeBranchProps extends CommonProps {
11
12
  /** Child nodes of the tree branch */
@@ -13,6 +14,7 @@ export interface TreeBranchProps extends CommonProps {
13
14
  }
14
15
  /** Presentation React component for a Tree branch
15
16
  * @public
17
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
16
18
  */
17
19
  export declare class TreeBranch extends React.PureComponent<TreeBranchProps> {
18
20
  render(): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Branch.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/Branch.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,eAAe,CAAC;AAEvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD,qCAAqC;IACrC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC;IAClD,MAAM;CASvB"}
1
+ {"version":3,"file":"Branch.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/Branch.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,eAAe,CAAC;AAEvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;GAGG;AAEH,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD,qCAAqC;IACrC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;GAGG;AAEH,qBAAa,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC;IAClD,MAAM;CASvB"}
@@ -13,7 +13,9 @@ const classnames_1 = require("classnames");
13
13
  const React = require("react");
14
14
  /** Presentation React component for a Tree branch
15
15
  * @public
16
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
16
17
  */
18
+ // eslint-disable-next-line deprecation/deprecation
17
19
  class TreeBranch extends React.PureComponent {
18
20
  render() {
19
21
  const className = (0, classnames_1.default)("core-tree-branch", this.props.className);
@@ -1 +1 @@
1
- {"version":3,"file":"Branch.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Branch.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,yBAAuB;AACvB,2CAAoC;AACpC,+BAA+B;AAW/B;;GAEG;AACH,MAAa,UAAW,SAAQ,KAAK,CAAC,aAA8B;IAClD,MAAM;QACpB,MAAM,SAAS,GAAG,IAAA,oBAAU,EAAC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAEvE,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IAC/C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACP,CAAC;IACJ,CAAC;CACF;AAVD,gCAUC","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 \"./Branch.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/** Properties for [[TreeBranch]] React component\n * @public\n */\nexport interface TreeBranchProps extends CommonProps {\n /** Child nodes of the tree branch */\n children?: React.ReactNode;\n}\n\n/** Presentation React component for a Tree branch\n * @public\n */\nexport class TreeBranch extends React.PureComponent<TreeBranchProps> {\n public override render() {\n const className = classnames(\"core-tree-branch\", this.props.className);\n\n return (\n <div className={className} style={this.props.style}>\n {this.props.children}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"Branch.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Branch.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,yBAAuB;AACvB,2CAAoC;AACpC,+BAA+B;AAa/B;;;GAGG;AACH,mDAAmD;AACnD,MAAa,UAAW,SAAQ,KAAK,CAAC,aAA8B;IAClD,MAAM;QACpB,MAAM,SAAS,GAAG,IAAA,oBAAU,EAAC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAEvE,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IAC/C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACP,CAAC;IACJ,CAAC;CACF;AAVD,gCAUC","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 \"./Branch.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/** Properties for [[TreeBranch]] React component\n * @public\n * @deprecated in 4.15.0. Props of deprecated {@link TreeBranch} component.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface TreeBranchProps extends CommonProps {\n /** Child nodes of the tree branch */\n children?: React.ReactNode;\n}\n\n/** Presentation React component for a Tree branch\n * @public\n * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class TreeBranch extends React.PureComponent<TreeBranchProps> {\n public override render() {\n const className = classnames(\"core-tree-branch\", this.props.className);\n\n return (\n <div className={className} style={this.props.style}>\n {this.props.children}\n </div>\n );\n }\n}\n"]}
@@ -6,6 +6,7 @@ import * as React from "react";
6
6
  import type { CommonProps } from "../utils/Props";
7
7
  /** Properties for the [[ExpansionToggle]] component
8
8
  * @public
9
+ * @deprecated in 4.15.0. Props of deprecated {@link ExpansionToggle} component.
9
10
  */
10
11
  export interface ExpansionToggleProps extends CommonProps {
11
12
  isExpanded?: boolean;
@@ -14,6 +15,7 @@ export interface ExpansionToggleProps extends CommonProps {
14
15
  }
15
16
  /** ExpansionToggle React component used by the [[TreeNode]] component to show collapsed or expanded state
16
17
  * @public
18
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
17
19
  */
18
20
  export declare function ExpansionToggle(props: ExpansionToggleProps): React.JSX.Element;
19
21
  //# sourceMappingURL=ExpansionToggle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpansionToggle.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/ExpansionToggle.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,wBAAwB,CAAC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKlD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACxD,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qBAwB1D"}
1
+ {"version":3,"file":"ExpansionToggle.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/ExpansionToggle.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,wBAAwB,CAAC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKlD;;;GAGG;AAEH,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACxD,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AAEH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qBAwB1D"}
@@ -16,7 +16,9 @@ const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
16
16
  const useTranslation_1 = require("../l10n/useTranslation");
17
17
  /** ExpansionToggle React component used by the [[TreeNode]] component to show collapsed or expanded state
18
18
  * @public
19
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
19
20
  */
21
+ // eslint-disable-next-line deprecation/deprecation
20
22
  function ExpansionToggle(props) {
21
23
  const { translate } = (0, useTranslation_1.useTranslation)();
22
24
  const className = (0, classnames_1.default)("core-tree-expansionToggle", props.isExpanded && "is-expanded", props.className);
@@ -1 +1 @@
1
- {"version":3,"file":"ExpansionToggle.js","sourceRoot":"","sources":["../../../../src/core-react/tree/ExpansionToggle.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,kCAAgC;AAChC,2CAAoC;AACpC,+BAA+B;AAE/B,0DAA8C;AAC9C,oEAA6D;AAC7D,2DAAwD;AAWxD;;GAEG;AACH,SAAgB,eAAe,CAAC,KAA2B;IACzD,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IACvC,MAAM,SAAS,GAAG,IAAA,oBAAU,EAC1B,2BAA2B,EAC3B,KAAK,CAAC,UAAU,IAAI,aAAa,EACjC,KAAK,CAAC,SAAS,CAChB,CAAC;IACF,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IAE5E,OAAO;IACL,iEAAiE;IACjE,6BACE,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EACvC,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,CAAC,KAAK,iBACL,KAAK,CAAC,aAAa,CAAC,EACjC,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,CAAC,gBACA,KAAK;QAEjB,oBAAC,oBAAI,IAAC,SAAS,EAAC,aAAa,EAAC,QAAQ,EAAE,oBAAC,qCAAe,OAAG,GAAI,CAC3D,CACP,CAAC;AACJ,CAAC;AAxBD,0CAwBC","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 \"./ExpansionToggle.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Icon } from \"../icons/IconComponent\";\nimport { SvgChevronRight } from \"@itwin/itwinui-icons-react\";\nimport { useTranslation } from \"../l10n/useTranslation\";\n\n/** Properties for the [[ExpansionToggle]] component\n * @public\n */\nexport interface ExpansionToggleProps extends CommonProps {\n isExpanded?: boolean;\n onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;\n [\"data-testid\"]?: string;\n}\n\n/** ExpansionToggle React component used by the [[TreeNode]] component to show collapsed or expanded state\n * @public\n */\nexport function ExpansionToggle(props: ExpansionToggleProps) {\n const { translate } = useTranslation();\n const className = classnames(\n \"core-tree-expansionToggle\",\n props.isExpanded && \"is-expanded\",\n props.className\n );\n const label = translate(props.isExpanded ? \"tree.collapse\" : \"tree.expand\");\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <div\n onMouseDown={(e) => e.stopPropagation()}\n onClick={props.onClick}\n className={className}\n style={props.style}\n data-testid={props[\"data-testid\"]}\n role=\"button\"\n tabIndex={-1}\n aria-label={label}\n >\n <Icon className=\"toggle icon\" iconSpec={<SvgChevronRight />} />\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"ExpansionToggle.js","sourceRoot":"","sources":["../../../../src/core-react/tree/ExpansionToggle.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,kCAAgC;AAChC,2CAAoC;AACpC,+BAA+B;AAE/B,0DAA8C;AAC9C,oEAA6D;AAC7D,2DAAwD;AAaxD;;;GAGG;AACH,mDAAmD;AACnD,SAAgB,eAAe,CAAC,KAA2B;IACzD,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IACvC,MAAM,SAAS,GAAG,IAAA,oBAAU,EAC1B,2BAA2B,EAC3B,KAAK,CAAC,UAAU,IAAI,aAAa,EACjC,KAAK,CAAC,SAAS,CAChB,CAAC;IACF,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IAE5E,OAAO;IACL,iEAAiE;IACjE,6BACE,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EACvC,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,CAAC,KAAK,iBACL,KAAK,CAAC,aAAa,CAAC,EACjC,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,CAAC,gBACA,KAAK;QAEjB,oBAAC,oBAAI,IAAC,SAAS,EAAC,aAAa,EAAC,QAAQ,EAAE,oBAAC,qCAAe,OAAG,GAAI,CAC3D,CACP,CAAC;AACJ,CAAC;AAxBD,0CAwBC","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 \"./ExpansionToggle.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Icon } from \"../icons/IconComponent\";\nimport { SvgChevronRight } from \"@itwin/itwinui-icons-react\";\nimport { useTranslation } from \"../l10n/useTranslation\";\n\n/** Properties for the [[ExpansionToggle]] component\n * @public\n * @deprecated in 4.15.0. Props of deprecated {@link ExpansionToggle} component.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface ExpansionToggleProps extends CommonProps {\n isExpanded?: boolean;\n onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;\n [\"data-testid\"]?: string;\n}\n\n/** ExpansionToggle React component used by the [[TreeNode]] component to show collapsed or expanded state\n * @public\n * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function ExpansionToggle(props: ExpansionToggleProps) {\n const { translate } = useTranslation();\n const className = classnames(\n \"core-tree-expansionToggle\",\n props.isExpanded && \"is-expanded\",\n props.className\n );\n const label = translate(props.isExpanded ? \"tree.collapse\" : \"tree.expand\");\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <div\n onMouseDown={(e) => e.stopPropagation()}\n onClick={props.onClick}\n className={className}\n style={props.style}\n data-testid={props[\"data-testid\"]}\n role=\"button\"\n tabIndex={-1}\n aria-label={label}\n >\n <Icon className=\"toggle icon\" iconSpec={<SvgChevronRight />} />\n </div>\n );\n}\n"]}
@@ -6,7 +6,6 @@ import * as React from "react";
6
6
  import { Checkbox } from "@itwin/itwinui-react";
7
7
  import { CheckBoxState } from "../enums/CheckBoxState";
8
8
  import type { CommonProps } from "../utils/Props";
9
- import type { Omit } from "../utils/typeUtils";
10
9
  type CheckboxProps = React.ComponentPropsWithoutRef<typeof Checkbox>;
11
10
  /** Props for node Checkbox renderer
12
11
  * @public
@@ -25,6 +24,7 @@ export type NodeCheckboxRenderer = (props: NodeCheckboxRenderProps) => React.Rea
25
24
  export declare const LEVEL_OFFSET = 20;
26
25
  /** Properties for Tree Node CheckBox
27
26
  * @public
27
+ * @deprecated in 4.15.0. Used in deprecated {@link TreeNodeProps} props.
28
28
  */
29
29
  export interface NodeCheckboxProps {
30
30
  /** State of the checkbox */
@@ -38,13 +38,12 @@ export interface NodeCheckboxProps {
38
38
  }
39
39
  /** Properties for the [[TreeNode]] React component
40
40
  * @public
41
+ * @deprecated in 4.15.0. Props of deprecated {@link TreeNode} component.
41
42
  */
42
43
  export interface TreeNodeProps extends CommonProps {
43
44
  label: React.ReactNode;
44
45
  level: number;
45
46
  icon?: React.ReactElement | string | number;
46
- /** Properties for the checkbox.
47
- * @public */
48
47
  checkboxProps?: NodeCheckboxProps;
49
48
  isLeaf?: boolean;
50
49
  isLoading?: boolean;
@@ -68,6 +67,7 @@ export interface TreeNodeProps extends CommonProps {
68
67
  }
69
68
  /** Presentation React component for a Tree node
70
69
  * @public
70
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
71
71
  */
72
72
  export declare class TreeNode extends React.Component<TreeNodeProps> {
73
73
  constructor(props: TreeNodeProps);
@@ -1 +1 @@
1
- {"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/Node.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAkB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG/C,KAAK,a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AE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC9C,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC1C,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,4EAA4E;IAC5E,eAAe,CAAC,EAAE;QAChB,6EAA6E;QAC7E,cAAc,CAAC,EAAE,oBAAoB,CAAC;KACvC,CAAC;IACF,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AAEH,qBAAa,QAAS,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;gBAE9C,KAAK,EAAE,aAAa;IAIhB,MAAM;IA8FtB,OAAO,CAAC,wBAAwB;IAKhC,OAAO,CAAC,iBAAiB,CASvB;IAEF,OAAO,CAAC,gBAAgB,CAEtB;IAEF,OAAO,CAAC,uBAAuB,CAG7B;IAEF,OAAO,CAAC,QAAQ,CAGd;CACH"}
@@ -21,8 +21,11 @@ exports.LEVEL_OFFSET = 20;
21
21
  const EXPANSION_TOGGLE_WIDTH = 24;
22
22
  /** Presentation React component for a Tree node
23
23
  * @public
24
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
24
25
  */
26
+ // eslint-disable-next-line deprecation/deprecation
25
27
  class TreeNode extends React.Component {
28
+ // eslint-disable-next-line deprecation/deprecation
26
29
  constructor(props) {
27
30
  super(props);
28
31
  this._onCheckboxChange = (checked) => {
@@ -69,7 +72,9 @@ class TreeNode extends React.Component {
69
72
  }
70
73
  }
71
74
  const icon = this.props.icon ? (React.createElement("div", { className: "core-tree-node-icon" }, this.props.icon)) : undefined;
72
- const toggle = this.props.isLoading ? undefined : this.props.isLeaf ? (React.createElement("div", null)) : (React.createElement(ExpansionToggle_1.ExpansionToggle, { className: "expansion-toggle", "data-testid": this.createSubComponentTestId("expansion-toggle"), onClick: this._onClickExpansionToggle, isExpanded: this.props.isExpanded }));
75
+ const toggle = this.props.isLoading ? undefined : this.props.isLeaf ? (React.createElement("div", null)) : (
76
+ // eslint-disable-next-line deprecation/deprecation
77
+ React.createElement(ExpansionToggle_1.ExpansionToggle, { className: "expansion-toggle", "data-testid": this.createSubComponentTestId("expansion-toggle"), onClick: this._onClickExpansionToggle, isExpanded: this.props.isExpanded }));
73
78
  return (
74
79
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events
75
80
  React.createElement("div", { className: className, style: this.props.style, "data-testid": this.props["data-testid"], onClick: this._onClick, onContextMenu: this.props.onContextMenu, onMouseDown: this.props.onMouseDown, onMouseUp: this.props.onMouseUp, onMouseMove: this.props.onMouseMove, role: "treeitem", "aria-selected": this.props.isSelected ? "true" : "false", tabIndex: -1 },
@@ -1 +1 @@
1
- {"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Node.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,uBAAqB;AACrB,2CAAoC;AACpC,+BAA+B;AAC/B,wDAAgE;AAChE,0DAAuD;AAGvD,uDAAoD;AAsBpD;;GAEG;AACU,QAAA,YAAY,GAAG,EAAE,CAAC;AAE/B,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAgDlC;;GAEG;AACH,MAAa,QAAS,SAAQ,KAAK,CAAC,SAAwB;IAC1D,YAAY,KAAoB;QAC9B,KAAK,CAAC,KAAK,CAAC,CAAC;QAqGP,sBAAiB,GAAG,CAAC,OAAgB,EAAE,EAAE;YAC/C,IACE,I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CAAC;IACJ,CAAC;IAEO,wBAAwB,CAAC,KAAa;QAC5C,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;YAAE,OAAO,SAAS,CAAC;QACjD,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,KAAK,EAAE,CAAC;IACjD,CAAC;CA0BF;AA/HD,4BA+HC","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 \"./Node.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Checkbox, ProgressRadial } from \"@itwin/itwinui-react\";\nimport { CheckBoxState } from \"../enums/CheckBoxState\";\nimport type { CommonProps } from \"../utils/Props\";\nimport type { Omit } from \"../utils/typeUtils\";\nimport { ExpansionToggle } from \"./ExpansionToggle\";\n\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof Checkbox>;\n\n/** Props for node Checkbox renderer\n * @public\n */\nexport type NodeCheckboxRenderProps = Omit<\n CheckboxProps,\n \"onChange\" | \"onClick\"\n> & {\n onChange: (checked: boolean) => void;\n onClick: (e: React.MouseEvent) => void;\n};\n\n/** Type for node Checkbox renderer\n * @public\n */\nexport type NodeCheckboxRenderer = (\n props: NodeCheckboxRenderProps\n) => React.ReactNode;\n\n/** Number of pixels the node gets offset per each hierarchy level\n * @internal\n */\nexport const LEVEL_OFFSET = 20;\n\nconst EXPANSION_TOGGLE_WIDTH = 24;\n\n/** Properties for Tree Node CheckBox\n * @public\n */\nexport interface NodeCheckboxProps {\n /** State of the checkbox */\n state?: CheckBoxState;\n /** Click event callback */\n onClick?: (newState: CheckBoxState) => void;\n /** Indicates whether checkbox is disabled */\n isDisabled?: boolean;\n /** Tooltip to be displayed when mouse is hovered over checkbox */\n tooltip?: string;\n}\n\n/** Properties for the [[TreeNode]] React component\n * @public\n */\nexport interface TreeNodeProps extends CommonProps {\n label: React.ReactNode;\n level: number;\n icon?: React.ReactElement | string | number;\n /** Properties for the checkbox.\n * @public */\n checkboxProps?: NodeCheckboxProps;\n isLeaf?: boolean;\n isLoading?: boolean;\n isExpanded?: boolean;\n isFocused?: boolean;\n isSelected?: boolean;\n isHoverDisabled?: boolean;\n onClick?: (e: React.MouseEvent) => void;\n onContextMenu?: (e: React.MouseEvent) => void;\n onMouseMove?: (e: React.MouseEvent) => void;\n onMouseDown?: (e: React.MouseEvent) => void;\n onMouseUp?: (e: React.MouseEvent) => void;\n onClickExpansionToggle?: () => void;\n children?: React.ReactNode;\n\n /** Contains render overrides for different pieces of the node component. */\n renderOverrides?: {\n /** Callback to render a checkbox. Only called when checkbox is displayed. */\n renderCheckbox?: NodeCheckboxRenderer;\n };\n [\"data-testid\"]?: string;\n}\n\n/** Presentation React component for a Tree node\n * @public\n */\nexport class TreeNode extends React.Component<TreeNodeProps> {\n constructor(props: TreeNodeProps) {\n super(props);\n }\n\n public override render() {\n const className = classnames(\n \"core-tree-node\",\n this.props.isFocused && \"is-focused\",\n this.props.isSelected && \"is-selected\",\n this.props.isHoverDisabled && \"is-hover-disabled\",\n this.props.className\n );\n let offset = this.props.level * LEVEL_OFFSET;\n if (!this.props.isLoading && this.props.isLeaf)\n offset += EXPANSION_TOGGLE_WIDTH; // Add expansion toggle/loader width if they're not rendered\n\n let checkbox: React.ReactNode;\n if (this.props.checkboxProps) {\n const props: NodeCheckboxRenderProps = {\n label: \"\",\n checked: this.props.checkboxProps.state === CheckBoxState.On,\n indeterminate: this.props.checkboxProps.state === CheckBoxState.Partial,\n disabled: this.props.checkboxProps.isDisabled,\n title: this.props.checkboxProps.tooltip,\n onClick: this._onCheckboxClick,\n onChange: this._onCheckboxChange,\n };\n if (\n this.props.renderOverrides &&\n this.props.renderOverrides.renderCheckbox\n ) {\n checkbox = this.props.renderOverrides.renderCheckbox(props);\n } else {\n checkbox = (\n <Checkbox\n {...props}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n this._onCheckboxChange(e.target.checked)\n }\n data-testid={this.createSubComponentTestId(\"checkbox\")}\n />\n );\n }\n }\n\n const icon = this.props.icon ? (\n <div className=\"core-tree-node-icon\">{this.props.icon}</div>\n ) : undefined;\n\n const toggle = this.props.isLoading ? undefined : this.props.isLeaf ? (\n <div />\n ) : (\n <ExpansionToggle\n className=\"expansion-toggle\"\n data-testid={this.createSubComponentTestId(\"expansion-toggle\")}\n onClick={this._onClickExpansionToggle}\n isExpanded={this.props.isExpanded}\n />\n );\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <div\n className={className}\n style={this.props.style}\n data-testid={this.props[\"data-testid\"]}\n onClick={this._onClick}\n onContextMenu={this.props.onContextMenu}\n onMouseDown={this.props.onMouseDown}\n onMouseUp={this.props.onMouseUp}\n onMouseMove={this.props.onMouseMove}\n role=\"treeitem\"\n aria-selected={this.props.isSelected ? \"true\" : \"false\"}\n tabIndex={-1}\n >\n <div\n className=\"contents\"\n style={{ marginLeft: offset }}\n data-testid={this.createSubComponentTestId(\"contents\")}\n >\n {this.props.isLoading && (\n <ProgressRadial\n size=\"x-small\"\n indeterminate\n className=\"core-progress-indicator\"\n />\n )}\n {toggle}\n {checkbox}\n {icon}\n {this.props.label}\n </div>\n {this.props.children}\n </div>\n );\n }\n\n private createSubComponentTestId(subId: string): string | undefined {\n if (!this.props[\"data-testid\"]) return undefined;\n return `${this.props[\"data-testid\"]}-${subId}`;\n }\n\n private _onCheckboxChange = (checked: boolean) => {\n if (\n this.props.checkboxProps &&\n this.props.checkboxProps.onClick &&\n !this.props.checkboxProps.isDisabled\n )\n this.props.checkboxProps.onClick(\n checked ? CheckBoxState.On : CheckBoxState.Off\n );\n };\n\n private _onCheckboxClick = (e: React.MouseEvent) => {\n e.stopPropagation();\n };\n\n private _onClickExpansionToggle = (e: React.MouseEvent<HTMLDivElement>) => {\n e.stopPropagation();\n if (this.props.onClickExpansionToggle) this.props.onClickExpansionToggle();\n };\n\n private _onClick = (e: React.MouseEvent<HTMLDivElement>) => {\n e.stopPropagation();\n this.props.onClick?.(e);\n };\n}\n"]}
1
+ {"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Node.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,uBAAqB;AACrB,2CAAoC;AACpC,+BAA+B;AAC/B,wDAAgE;AAChE,0DAAuD;AAEvD,uDAAoD;AAsBpD;;GAEG;AACU,QAAA,YAAY,GAAG,EAAE,CAAC;AAE/B,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAkDlC;;;GAGG;AACH,mDAAmD;AACnD,MAAa,QAAS,SAAQ,KAAK,CAAC,SAAwB;IAC1D,mDAAmD;IACnD,YAAY,KAAoB;QAC9B,KAAK,CAAC,KAAK,CAAC,CAAC;QAsGP,sBAAiB,GAAG,CAAC,OAAgB,EAAE,EAAE;YAC/C,IACE,IAAI,CAAC,KAAK,CAAC,aAAa;gBACxB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO;gBAChC,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU;gBAEpC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,CAC9B,OAAO,CAAC,CAAC,CAAC,6BAAa,CAAC,EAAE,CAAC,CAAC,CAAC,6BAAa,CAAC,GAAG,CAC/C,CAAC;QACN,CAAC,CAAC;QAEM,qBAAgB,GAAG,CAAC,CAAmB,EAAE,EAAE;YACjD,CAAC,CAAC,eAAe,EAAE,CAAC;QACtB,CAAC,CAAC;QAEM,4BAAuB,GAAG,CAAC,CAAmC,EAAE,EAAE;YACxE,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,IAAI,IAAI,CAAC,KAAK,CAAC,sBAAsB;gBAAE,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE,CAAC;QAC7E,CAAC,CAAC;QAEM,aAAQ,GAAG,CAAC,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EACnC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,IAAI,EAAC,UAAU,mBACA,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EACvD,QAAQ,EAAE,CAAC,CAAC;YAEZ,6BACE,SAAS,EAAC,UAAU,EACpB,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,iBAChB,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC;gBAErD,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,CACvB,oBAAC,8BAAc,IACb,IAAI,EAAC,SAAS,EACd,aAAa,QACb,SAAS,EAAC,yBAAyB,GACnC,CACH;gBACA,MAAM;gBACN,QAAQ;gBACR,IAAI;gBACJ,IAAI,CAAC,KAAK,CAAC,KAAK,CACb;YACL,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACP,CAAC;IACJ,CAAC;IAEO,wBAAwB,CAAC,KAAa;QAC5C,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;YAAE,OAAO,SAAS,CAAC;QACjD,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,KAAK,EAAE,CAAC;IACjD,CAAC;CA0BF;AAjID,4BAiIC","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 \"./Node.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Checkbox, ProgressRadial } from \"@itwin/itwinui-react\";\nimport { CheckBoxState } from \"../enums/CheckBoxState\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { ExpansionToggle } from \"./ExpansionToggle\";\n\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof Checkbox>;\n\n/** Props for node Checkbox renderer\n * @public\n */\nexport type NodeCheckboxRenderProps = Omit<\n CheckboxProps,\n \"onChange\" | \"onClick\"\n> & {\n onChange: (checked: boolean) => void;\n onClick: (e: React.MouseEvent) => void;\n};\n\n/** Type for node Checkbox renderer\n * @public\n */\nexport type NodeCheckboxRenderer = (\n props: NodeCheckboxRenderProps\n) => React.ReactNode;\n\n/** Number of pixels the node gets offset per each hierarchy level\n * @internal\n */\nexport const LEVEL_OFFSET = 20;\n\nconst EXPANSION_TOGGLE_WIDTH = 24;\n\n/** Properties for Tree Node CheckBox\n * @public\n * @deprecated in 4.15.0. Used in deprecated {@link TreeNodeProps} props.\n */\nexport interface NodeCheckboxProps {\n /** State of the checkbox */\n state?: CheckBoxState;\n /** Click event callback */\n onClick?: (newState: CheckBoxState) => void;\n /** Indicates whether checkbox is disabled */\n isDisabled?: boolean;\n /** Tooltip to be displayed when mouse is hovered over checkbox */\n tooltip?: string;\n}\n\n/** Properties for the [[TreeNode]] React component\n * @public\n * @deprecated in 4.15.0. Props of deprecated {@link TreeNode} component.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface TreeNodeProps extends CommonProps {\n label: React.ReactNode;\n level: number;\n icon?: React.ReactElement | string | number;\n // eslint-disable-next-line deprecation/deprecation\n checkboxProps?: NodeCheckboxProps;\n isLeaf?: boolean;\n isLoading?: boolean;\n isExpanded?: boolean;\n isFocused?: boolean;\n isSelected?: boolean;\n isHoverDisabled?: boolean;\n onClick?: (e: React.MouseEvent) => void;\n onContextMenu?: (e: React.MouseEvent) => void;\n onMouseMove?: (e: React.MouseEvent) => void;\n onMouseDown?: (e: React.MouseEvent) => void;\n onMouseUp?: (e: React.MouseEvent) => void;\n onClickExpansionToggle?: () => void;\n children?: React.ReactNode;\n\n /** Contains render overrides for different pieces of the node component. */\n renderOverrides?: {\n /** Callback to render a checkbox. Only called when checkbox is displayed. */\n renderCheckbox?: NodeCheckboxRenderer;\n };\n [\"data-testid\"]?: string;\n}\n\n/** Presentation React component for a Tree node\n * @public\n * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class TreeNode extends React.Component<TreeNodeProps> {\n // eslint-disable-next-line deprecation/deprecation\n constructor(props: TreeNodeProps) {\n super(props);\n }\n\n public override render() {\n const className = classnames(\n \"core-tree-node\",\n this.props.isFocused && \"is-focused\",\n this.props.isSelected && \"is-selected\",\n this.props.isHoverDisabled && \"is-hover-disabled\",\n this.props.className\n );\n let offset = this.props.level * LEVEL_OFFSET;\n if (!this.props.isLoading && this.props.isLeaf)\n offset += EXPANSION_TOGGLE_WIDTH; // Add expansion toggle/loader width if they're not rendered\n\n let checkbox: React.ReactNode;\n if (this.props.checkboxProps) {\n const props: NodeCheckboxRenderProps = {\n label: \"\",\n checked: this.props.checkboxProps.state === CheckBoxState.On,\n indeterminate: this.props.checkboxProps.state === CheckBoxState.Partial,\n disabled: this.props.checkboxProps.isDisabled,\n title: this.props.checkboxProps.tooltip,\n onClick: this._onCheckboxClick,\n onChange: this._onCheckboxChange,\n };\n if (\n this.props.renderOverrides &&\n this.props.renderOverrides.renderCheckbox\n ) {\n checkbox = this.props.renderOverrides.renderCheckbox(props);\n } else {\n checkbox = (\n <Checkbox\n {...props}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n this._onCheckboxChange(e.target.checked)\n }\n data-testid={this.createSubComponentTestId(\"checkbox\")}\n />\n );\n }\n }\n\n const icon = this.props.icon ? (\n <div className=\"core-tree-node-icon\">{this.props.icon}</div>\n ) : undefined;\n\n const toggle = this.props.isLoading ? undefined : this.props.isLeaf ? (\n <div />\n ) : (\n // eslint-disable-next-line deprecation/deprecation\n <ExpansionToggle\n className=\"expansion-toggle\"\n data-testid={this.createSubComponentTestId(\"expansion-toggle\")}\n onClick={this._onClickExpansionToggle}\n isExpanded={this.props.isExpanded}\n />\n );\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <div\n className={className}\n style={this.props.style}\n data-testid={this.props[\"data-testid\"]}\n onClick={this._onClick}\n onContextMenu={this.props.onContextMenu}\n onMouseDown={this.props.onMouseDown}\n onMouseUp={this.props.onMouseUp}\n onMouseMove={this.props.onMouseMove}\n role=\"treeitem\"\n aria-selected={this.props.isSelected ? \"true\" : \"false\"}\n tabIndex={-1}\n >\n <div\n className=\"contents\"\n style={{ marginLeft: offset }}\n data-testid={this.createSubComponentTestId(\"contents\")}\n >\n {this.props.isLoading && (\n <ProgressRadial\n size=\"x-small\"\n indeterminate\n className=\"core-progress-indicator\"\n />\n )}\n {toggle}\n {checkbox}\n {icon}\n {this.props.label}\n </div>\n {this.props.children}\n </div>\n );\n }\n\n private createSubComponentTestId(subId: string): string | undefined {\n if (!this.props[\"data-testid\"]) return undefined;\n return `${this.props[\"data-testid\"]}-${subId}`;\n }\n\n private _onCheckboxChange = (checked: boolean) => {\n if (\n this.props.checkboxProps &&\n this.props.checkboxProps.onClick &&\n !this.props.checkboxProps.isDisabled\n )\n this.props.checkboxProps.onClick(\n checked ? CheckBoxState.On : CheckBoxState.Off\n );\n };\n\n private _onCheckboxClick = (e: React.MouseEvent) => {\n e.stopPropagation();\n };\n\n private _onClickExpansionToggle = (e: React.MouseEvent<HTMLDivElement>) => {\n e.stopPropagation();\n if (this.props.onClickExpansionToggle) this.props.onClickExpansionToggle();\n };\n\n private _onClick = (e: React.MouseEvent<HTMLDivElement>) => {\n e.stopPropagation();\n this.props.onClick?.(e);\n };\n}\n"]}
@@ -6,6 +6,7 @@ import * as React from "react";
6
6
  import type { CommonProps } from "../utils/Props";
7
7
  /** Properties for the [[TreeNodePlaceholder]] React component
8
8
  * @public
9
+ * @deprecated in 4.15.0. Props of deprecated {@link TreeNodePlaceholder} component.
9
10
  */
10
11
  export interface TreeNodePlaceholderProps extends CommonProps {
11
12
  level: number;
@@ -16,6 +17,7 @@ export interface TreeNodePlaceholderProps extends CommonProps {
16
17
  /**
17
18
  * Presentation React component for a placeholder to be displayed instead of a node while it's being loaded
18
19
  * @public
20
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
19
21
  */
20
22
  export declare class TreeNodePlaceholder extends React.PureComponent<TreeNodePlaceholderProps> {
21
23
  render(): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/Placeholder.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,KAAK,CAAC,aAAa,CAAC,wBAAwB,CAAC;IACpE,MAAM;CAiBvB"}
1
+ {"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/Placeholder.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;;GAGG;AAEH,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AAEH,qBAAa,mBAAoB,SAAQ,KAAK,CAAC,aAAa,CAAC,wBAAwB,CAAC;IACpE,MAAM;CAiBvB"}
@@ -15,7 +15,9 @@ const Node_1 = require("./Node");
15
15
  /**
16
16
  * Presentation React component for a placeholder to be displayed instead of a node while it's being loaded
17
17
  * @public
18
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
18
19
  */
20
+ // eslint-disable-next-line deprecation/deprecation
19
21
  class TreeNodePlaceholder extends React.PureComponent {
20
22
  render() {
21
23
  const className = (0, classnames_1.default)("core-tree-placeholder", this.props.className);
@@ -1 +1 @@
1
- {"version":3,"file":"Placeholder.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Placeholder.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;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,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC;QACtC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,GAAG,CAAC;QACvC,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
+ {"version":3,"file":"Placeholder.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Placeholder.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,8BAA4B;AAC5B,2CAAoC;AACpC,+BAA+B;AAE/B,iCAAsC;AActC;;;;GAIG;AACH,mDAAmD;AACnD,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,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC;QACtC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,GAAG,CAAC;QACvC,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 * @deprecated in 4.15.0. Props of deprecated {@link TreeNodePlaceholder} component.\n */\n// eslint-disable-next-line deprecation/deprecation\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 * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\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"]}
@@ -6,6 +6,7 @@ import * as React from "react";
6
6
  import type { CommonProps } from "../utils/Props";
7
7
  /** Properties for the [[Tree]] presentational React component
8
8
  * @public
9
+ * @deprecated in 4.15.0. Props of deprecated {@link Tree} component.
9
10
  */
10
11
  export interface TreeProps extends CommonProps {
11
12
  children?: React.ReactNode;
@@ -17,6 +18,7 @@ export interface TreeProps extends CommonProps {
17
18
  }
18
19
  /** Presentation React component for a Tree
19
20
  * @public
21
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
20
22
  */
21
23
  export declare class Tree extends React.PureComponent<TreeProps> {
22
24
  private _treeElement;
@@ -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,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB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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;;;GAGG;AAEH,qBAAa,IAAK,SAAQ,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC;IACtD,OAAO,CAAC,YAAY,CAAsD;IAE1E,OAAO,KAAK,oBAAoB,GAsB/B;IAEM,eAAe,CAAC,OAAO,EAAE,OAAO;IAwDhC,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,EAAE;IASpD,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAcrC,MAAM;CAoBvB"}
@@ -14,7 +14,9 @@ const React = require("react");
14
14
  const Rectangle_1 = require("../utils/Rectangle");
15
15
  /** Presentation React component for a Tree
16
16
  * @public
17
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
17
18
  */
19
+ // eslint-disable-next-line deprecation/deprecation
18
20
  class Tree extends React.PureComponent {
19
21
  constructor() {
20
22
  super(...arguments);
@@ -1 +1 @@
1
- {"version":3,"file":"Tree.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Tree.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;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;IA6H5E,CAAC;IA3HC,IAAY,oBAAoB;QAC9B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO;YAAE,OAAO,SAAS,CAAC;QAEjD,MAAM,YAAY,GAAG,CAAC,OAAgB,EAAE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AAC;CACF;AA9HD,oBA8HC","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) return undefined;\n\n const isScrollable = (element: Element) => {\n const style = window.getComputedStyle(element);\n return (\n style.overflow === \"auto\" ||\n style.overflow === \"scroll\" ||\n style.overflowY === \"auto\" ||\n style.overflowY === \"scroll\" ||\n style.overflowX === \"auto\" ||\n style.overflowX === \"scroll\"\n );\n };\n let scrollableContainer: Element | undefined = this._treeElement.current;\n while (scrollableContainer && !isScrollable(scrollableContainer))\n scrollableContainer =\n scrollableContainer.children.length > 0\n ? scrollableContainer.children[0]\n : undefined;\n\n return scrollableContainer;\n }\n\n public scrollToElement(element: Element) {\n const container = this._scrollableContainer;\n if (!container) return;\n\n if (!Element.prototype.scrollTo) {\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(\n elementBox.left,\n elementBox.top,\n elementBox.right,\n elementBox.bottom\n );\n const containerBox = container.getBoundingClientRect();\n const containerRange = Rectangle.createXYXY(\n containerBox.left - container.scrollLeft,\n containerBox.top - container.scrollTop,\n containerBox.right - container.scrollLeft,\n containerBox.bottom - container.scrollTop\n );\n\n let left: number;\n if (\n container.scrollLeft > 0 &&\n elementRange.right <= containerRange.right\n ) {\n // always attempt to keep horizontal scroll at 0\n left = 0;\n } else if (\n containerRange.left <= elementRange.left &&\n containerRange.right >= elementRange.right\n ) {\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 (\n containerRange.top <= elementRange.top &&\n containerRange.bottom >= elementRange.bottom\n ) {\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) return [];\n\n const elems = new Array<Element>();\n const collection =\n this._treeElement.current.getElementsByClassName(className);\n for (let i = 0; i < collection.length; ++i) elems.push(collection.item(i)!);\n return elems;\n }\n public setFocusByClassName(selector: string): boolean {\n let status = false;\n if (this._treeElement.current) {\n const element = this._treeElement.current.querySelector(\n selector\n ) as HTMLElement;\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(\"core-tree\", this.props.className);\n\n return (\n <div\n 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
+ {"version":3,"file":"Tree.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Tree.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;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AE,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;AA9HD,oBA8HC","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 * @deprecated in 4.15.0. Props of deprecated {@link Tree} component.\n */\n// eslint-disable-next-line deprecation/deprecation\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 * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\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) return undefined;\n\n const isScrollable = (element: Element) => {\n const style = window.getComputedStyle(element);\n return (\n style.overflow === \"auto\" ||\n style.overflow === \"scroll\" ||\n style.overflowY === \"auto\" ||\n style.overflowY === \"scroll\" ||\n style.overflowX === \"auto\" ||\n style.overflowX === \"scroll\"\n );\n };\n let scrollableContainer: Element | undefined = this._treeElement.current;\n while (scrollableContainer && !isScrollable(scrollableContainer))\n scrollableContainer =\n scrollableContainer.children.length > 0\n ? scrollableContainer.children[0]\n : undefined;\n\n return scrollableContainer;\n }\n\n public scrollToElement(element: Element) {\n const container = this._scrollableContainer;\n if (!container) return;\n\n if (!Element.prototype.scrollTo) {\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(\n elementBox.left,\n elementBox.top,\n elementBox.right,\n elementBox.bottom\n );\n const containerBox = container.getBoundingClientRect();\n const containerRange = Rectangle.createXYXY(\n containerBox.left - container.scrollLeft,\n containerBox.top - container.scrollTop,\n containerBox.right - container.scrollLeft,\n containerBox.bottom - container.scrollTop\n );\n\n let left: number;\n if (\n container.scrollLeft > 0 &&\n elementRange.right <= containerRange.right\n ) {\n // always attempt to keep horizontal scroll at 0\n left = 0;\n } else if (\n containerRange.left <= elementRange.left &&\n containerRange.right >= elementRange.right\n ) {\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 (\n containerRange.top <= elementRange.top &&\n containerRange.bottom >= elementRange.bottom\n ) {\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) return [];\n\n const elems = new Array<Element>();\n const collection =\n this._treeElement.current.getElementsByClassName(className);\n for (let i = 0; i < collection.length; ++i) elems.push(collection.item(i)!);\n return elems;\n }\n public setFocusByClassName(selector: string): boolean {\n let status = false;\n if (this._treeElement.current) {\n const element = this._treeElement.current.querySelector(\n selector\n ) as HTMLElement;\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(\"core-tree\", this.props.className);\n\n return (\n <div\n 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"]}
@@ -7,6 +7,7 @@ import type { IconSpec } from "../icons/IconComponent";
7
7
  import { ConditionalIconItem } from "../icons/ConditionalIconItem";
8
8
  /** Icon Helper Class used to store the data needed to generate an <Icon> for use in any control that shows an icon.
9
9
  * @public
10
+ * @deprecated in 4.15.0. Used internally.
10
11
  */
11
12
  export declare class IconHelper {
12
13
  static get reactIconKey(): string;
@@ -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,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;GAEG;AACH,qBAAa,UAAU;IACrB,WAAkB,YAAY,IAAI,MAAM,CAEvC;IACD,WAAkB,sBAAsB,IAAI,MAAM,CAEjD;IACD;;;OAGG;WACW,gBAAgB,CAC5B,IAAI,EACA,MAAM,GACN,sBAAsB,GACtB,KAAK,CAAC,SAAS,GACf,mBAAmB,EACvB,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAC9B,KAAK,CAAC,SAAS;IAmClB;;;;OAIG;WACW,WAAW,CACvB,QAAQ,EAAE,QAAQ,EAClB,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAC9B,MAAM,GAAG,sBAAsB;CA0BnC"}
1
+ {"version":3,"file":"IconHelper.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/IconHelper.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,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;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;;GAGG;AACH,qBAAa,UAAU;IACrB,WAAkB,YAAY,IAAI,MAAM,CAEvC;IACD,WAAkB,sBAAsB,IAAI,MAAM,CAEjD;IACD;;;OAGG;WACW,gBAAgB,CAC5B,IAAI,EACA,MAAM,GACN,sBAAsB,GACtB,KAAK,CAAC,SAAS,GACf,mBAAmB,EACvB,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAC9B,KAAK,CAAC,SAAS;IAmClB;;;;OAIG;WACW,WAAW,CACvB,QAAQ,EAAE,QAAQ,EAClB,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAC9B,MAAM,GAAG,sBAAsB;CA0BnC"}
@@ -8,12 +8,14 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.IconHelper = void 0;
11
+ /* eslint-disable deprecation/deprecation */
11
12
  const React = require("react");
12
13
  const appui_abstract_1 = require("@itwin/appui-abstract");
13
14
  const IconComponent_1 = require("../icons/IconComponent");
14
15
  const ConditionalIconItem_1 = require("../icons/ConditionalIconItem");
15
16
  /** Icon Helper Class used to store the data needed to generate an <Icon> for use in any control that shows an icon.
16
17
  * @public
18
+ * @deprecated in 4.15.0. Used internally.
17
19
  */
18
20
  class IconHelper {
19
21
  static get reactIconKey() {
@@ -29,7 +31,7 @@ class IconHelper {
29
31
  static getIconReactNode(icon, internalData) {
30
32
  if (!icon)
31
33
  return null;
32
- if (ConditionalIconItem_1.ConditionalIconItem.isConditionalIconItem(icon))
34
+ if (icon instanceof ConditionalIconItem_1.ConditionalIconItem)
33
35
  return React.createElement(IconComponent_1.Icon, { iconSpec: ConditionalIconItem_1.ConditionalIconItem.getValue(icon) });
34
36
  if (React.isValidElement(icon))
35
37
  return React.createElement(IconComponent_1.Icon, { iconSpec: icon });
@@ -59,7 +61,7 @@ class IconHelper {
59
61
  */
60
62
  static getIconData(iconSpec, internalData) {
61
63
  let icon;
62
- if (ConditionalIconItem_1.ConditionalIconItem.isConditionalIconItem(iconSpec)) {
64
+ if (iconSpec instanceof ConditionalIconItem_1.ConditionalIconItem) {
63
65
  icon = IconHelper.conditionalIconItemKey;
64
66
  if (internalData)
65
67
  internalData.set(IconHelper.conditionalIconItemKey, iconSpec);
@@ -1 +1 @@
1
- {"version":3,"file":"IconHelper.js","sourceRoot":"","sources":["../../../../src/core-react/utils/IconHelper.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,0DAA+D;AAE/D,0DAA8C;AAC9C,sEAAmE;AAEnE;;GAEG;AACH,MAAa,UAAU;IACd,MAAM,KAAK,YAAY;QAC5B,OAAO,yBAAyB,CAAC;IACnC,CAAC;IACM,MAAM,KAAK,sBAAsB;QACtC,OAAO,gCAAgC,CAAC;IAC1C,CAAC;IACD;;;OAGG;IACI,MAAM,CAAC,gBAAgB,CAC5B,IAIuB,EACvB,YAA+B;QAE/B,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QAEvB,IAAI,yCAAmB,CAAC,qBAAqB,CAAC,IAAI,CAAC;YACjD,OAAO,oBAAC,oBAAI,IAAC,QAAQ,EAAE,yCAAmB,CAAC,QAAQ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UAAU,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC;YAChE,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC;gBACnC,CAAC,CAAC,UAAU,CAAC,YAAY;gBACzB,CAAC,CAAC,QAAQ,CAAC;QACf,CAAC;QAED,IACE,YAAY;YACZ,OAAO,IAAI,KAAK,QAAQ;YACxB,IAAI,KAAK,UAAU,CAAC,YAAY,EAChC,CAAC;YACD,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QACtD,CAAC;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,YAAY,uCAAsB;YACpE,OAAO,IAAI,CAAC;QAEd,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAvFD,gCAuFC","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\";\nimport { ConditionalIconItem } from \"../icons/ConditionalIconItem\";\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 public static get conditionalIconItemKey(): string {\n return \"#-conditional-icon-item-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(\n icon:\n | string\n | ConditionalStringValue\n | React.ReactNode\n | ConditionalIconItem,\n internalData?: Map<string, any>\n ): React.ReactNode {\n if (!icon) return null;\n\n if (ConditionalIconItem.isConditionalIconItem(icon))\n return <Icon iconSpec={ConditionalIconItem.getValue(icon)} />;\n if (React.isValidElement(icon)) return <Icon iconSpec={icon} />;\n\n if (!(icon instanceof ConditionalStringValue) && typeof icon !== \"string\")\n return null;\n\n const iconString = ConditionalStringValue.getValue(icon);\n if (!iconString) return null;\n\n if (iconString === IconHelper.reactIconKey) {\n if (internalData)\n return (\n <Icon\n iconSpec={\n internalData.get(IconHelper.reactIconKey) as React.ReactNode\n }\n />\n );\n return null;\n } else if (iconString === IconHelper.conditionalIconItemKey) {\n if (internalData) {\n const iconItem = internalData.get(\n IconHelper.conditionalIconItemKey\n ) as ConditionalIconItem;\n return <Icon iconSpec={ConditionalIconItem.getValue(iconItem)} />;\n }\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(\n iconSpec: IconSpec,\n internalData?: Map<string, any>\n ): string | ConditionalStringValue {\n let icon;\n if (ConditionalIconItem.isConditionalIconItem(iconSpec)) {\n icon = IconHelper.conditionalIconItemKey;\n if (internalData)\n internalData.set(IconHelper.conditionalIconItemKey, iconSpec);\n return icon;\n } else {\n icon = React.isValidElement(iconSpec)\n ? IconHelper.reactIconKey\n : iconSpec;\n }\n\n if (\n internalData &&\n typeof icon === \"string\" &&\n icon === IconHelper.reactIconKey\n ) {\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"]}
1
+ {"version":3,"file":"IconHelper.js","sourceRoot":"","sources":["../../../../src/core-react/utils/IconHelper.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,4CAA4C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AAC,QAAQ,EAAE,yCAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAI,CAAC;YACpE,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,oBAAC,oBAAI,IAAC,QAAQ,EAAE,UAAU,GAAI,CAAC;IACxC,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CACvB,QAAkB,EAClB,YAA+B;QAE/B,IAAI,IAAI,CAAC;QACT,IAAI,QAAQ,YAAY,yCAAmB,EAAE,CAAC;YAC5C,IAAI,GAAG,UAAU,CAAC,sBAAsB,CAAC;YACzC,IAAI,YAAY;gBACd,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC;YAChE,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC;gBACnC,CAAC,CAAC,UAAU,CAAC,YAAY;gBACzB,CAAC,CAAC,QAAQ,CAAC;QACf,CAAC;QAED,IACE,YAAY;YACZ,OAAO,IAAI,KAAK,QAAQ;YACxB,IAAI,KAAK,UAAU,CAAC,YAAY,EAChC,CAAC;YACD,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QACtD,CAAC;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,YAAY,uCAAsB;YACpE,OAAO,IAAI,CAAC;QAEd,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAvFD,gCAuFC","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\n/* eslint-disable deprecation/deprecation */\n\nimport * as React from \"react\";\nimport { ConditionalStringValue } from \"@itwin/appui-abstract\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\nimport { ConditionalIconItem } from \"../icons/ConditionalIconItem\";\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 * @deprecated in 4.15.0. Used internally.\n */\nexport class IconHelper {\n public static get reactIconKey(): string {\n return \"#-react-iconspec-node-#\";\n }\n public static get conditionalIconItemKey(): string {\n return \"#-conditional-icon-item-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(\n icon:\n | string\n | ConditionalStringValue\n | React.ReactNode\n | ConditionalIconItem,\n internalData?: Map<string, any>\n ): React.ReactNode {\n if (!icon) return null;\n\n if (icon instanceof ConditionalIconItem)\n return <Icon iconSpec={ConditionalIconItem.getValue(icon)} />;\n if (React.isValidElement(icon)) return <Icon iconSpec={icon} />;\n\n if (!(icon instanceof ConditionalStringValue) && typeof icon !== \"string\")\n return null;\n\n const iconString = ConditionalStringValue.getValue(icon);\n if (!iconString) return null;\n\n if (iconString === IconHelper.reactIconKey) {\n if (internalData)\n return (\n <Icon\n iconSpec={\n internalData.get(IconHelper.reactIconKey) as React.ReactNode\n }\n />\n );\n return null;\n } else if (iconString === IconHelper.conditionalIconItemKey) {\n if (internalData) {\n const iconItem = internalData.get(\n IconHelper.conditionalIconItemKey\n ) as ConditionalIconItem;\n return <Icon iconSpec={ConditionalIconItem.getValue(iconItem)} />;\n }\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(\n iconSpec: IconSpec,\n internalData?: Map<string, any>\n ): string | ConditionalStringValue {\n let icon;\n if (iconSpec instanceof ConditionalIconItem) {\n icon = IconHelper.conditionalIconItemKey;\n if (internalData)\n internalData.set(IconHelper.conditionalIconItemKey, iconSpec);\n return icon;\n } else {\n icon = React.isValidElement(iconSpec)\n ? IconHelper.reactIconKey\n : iconSpec;\n }\n\n if (\n internalData &&\n typeof icon === \"string\" &&\n icon === IconHelper.reactIconKey\n ) {\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"]}