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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (452) hide show
  1. package/CHANGELOG.md +39 -7
  2. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  3. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  4. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  5. package/lib/cjs/core-react/badge/Badge.d.ts +1 -1
  6. package/lib/cjs/core-react/badge/Badge.d.ts.map +1 -1
  7. package/lib/cjs/core-react/badge/Badge.js.map +1 -1
  8. package/lib/cjs/core-react/badge/BetaBadge.d.ts +1 -1
  9. package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
  10. package/lib/cjs/core-react/badge/BetaBadge.js.map +1 -1
  11. package/lib/cjs/core-react/badge/NewBadge.d.ts +1 -1
  12. package/lib/cjs/core-react/badge/NewBadge.d.ts.map +1 -1
  13. package/lib/cjs/core-react/badge/NewBadge.js.map +1 -1
  14. package/lib/cjs/core-react/base/Centered.d.ts +1 -1
  15. package/lib/cjs/core-react/base/Centered.d.ts.map +1 -1
  16. package/lib/cjs/core-react/base/Centered.js.map +1 -1
  17. package/lib/cjs/core-react/base/Div.d.ts +1 -1
  18. package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
  19. package/lib/cjs/core-react/base/Div.js.map +1 -1
  20. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +1 -1
  21. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  22. package/lib/cjs/core-react/base/DivWithOutsideClick.js.map +1 -1
  23. package/lib/cjs/core-react/base/FillCentered.d.ts +1 -1
  24. package/lib/cjs/core-react/base/FillCentered.d.ts.map +1 -1
  25. package/lib/cjs/core-react/base/FillCentered.js.map +1 -1
  26. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +1 -1
  27. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  28. package/lib/cjs/core-react/base/FlexWrapContainer.js.map +1 -1
  29. package/lib/cjs/core-react/base/Gap.d.ts +1 -1
  30. package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
  31. package/lib/cjs/core-react/base/Gap.js +1 -1
  32. package/lib/cjs/core-react/base/Gap.js.map +1 -1
  33. package/lib/cjs/core-react/base/ScrollView.d.ts +1 -1
  34. package/lib/cjs/core-react/base/ScrollView.d.ts.map +1 -1
  35. package/lib/cjs/core-react/base/ScrollView.js.map +1 -1
  36. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +1 -1
  37. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  38. package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
  39. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +1 -1
  40. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  41. package/lib/cjs/core-react/contextmenu/ContextMenu.js +2 -1
  42. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  43. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  44. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  45. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  46. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts +5 -4
  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 +3 -3
  50. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  51. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  52. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts +1 -1
  53. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  54. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js +5 -3
  55. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  56. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts +1 -1
  57. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  58. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  59. package/lib/cjs/core-react/dialog/Dialog.d.ts +3 -3
  60. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  61. package/lib/cjs/core-react/dialog/Dialog.js +2 -1
  62. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  63. package/lib/cjs/core-react/dialog/GlobalDialog.d.ts +1 -1
  64. package/lib/cjs/core-react/dialog/GlobalDialog.d.ts.map +1 -1
  65. package/lib/cjs/core-react/dialog/GlobalDialog.js +2 -1
  66. package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
  67. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +1 -1
  68. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  69. package/lib/cjs/core-react/elementseparator/ElementSeparator.js +2 -2
  70. package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
  71. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +1 -1
  72. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  73. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  74. package/lib/cjs/core-react/hocs/withOnOutsideClick.js +2 -1
  75. package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
  76. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts +1 -1
  77. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
  78. package/lib/cjs/core-react/icons/ConditionalIconItem.js.map +1 -1
  79. package/lib/cjs/core-react/icons/IconComponent.d.ts +2 -2
  80. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  81. package/lib/cjs/core-react/icons/IconComponent.js +1 -1
  82. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  83. package/lib/cjs/core-react/icons/SvgPath.d.ts +1 -1
  84. package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
  85. package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
  86. package/lib/cjs/core-react/icons/WebFontIcon.d.ts +1 -1
  87. package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
  88. package/lib/cjs/core-react/icons/WebFontIcon.js.map +1 -1
  89. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +1 -1
  90. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  91. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  92. package/lib/cjs/core-react/inputs/Input.d.ts +1 -1
  93. package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
  94. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  95. package/lib/cjs/core-react/inputs/InputLabel.d.ts +2 -2
  96. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  97. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  98. package/lib/cjs/core-react/inputs/LabeledComponentProps.d.ts +2 -2
  99. package/lib/cjs/core-react/inputs/LabeledComponentProps.d.ts.map +1 -1
  100. package/lib/cjs/core-react/inputs/LabeledComponentProps.js.map +1 -1
  101. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  102. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  103. package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
  104. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +1 -1
  105. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  106. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  107. package/lib/cjs/core-react/listbox/Listbox.js +3 -2
  108. package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
  109. package/lib/cjs/core-react/loading/LoadingBar.d.ts +1 -1
  110. package/lib/cjs/core-react/loading/LoadingBar.d.ts.map +1 -1
  111. package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
  112. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +1 -1
  113. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts.map +1 -1
  114. package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
  115. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +1 -1
  116. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  117. package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
  118. package/lib/cjs/core-react/loading/LoadingStatus.d.ts +1 -1
  119. package/lib/cjs/core-react/loading/LoadingStatus.d.ts.map +1 -1
  120. package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
  121. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +4 -3
  122. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  123. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  124. package/lib/cjs/core-react/notification/MessageRenderer.d.ts +2 -2
  125. package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
  126. package/lib/cjs/core-react/notification/MessageRenderer.js +1 -1
  127. package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
  128. package/lib/cjs/core-react/notification/MessageType.d.ts +1 -1
  129. package/lib/cjs/core-react/notification/MessageType.d.ts.map +1 -1
  130. package/lib/cjs/core-react/notification/MessageType.js.map +1 -1
  131. package/lib/cjs/core-react/popup/Popup.d.ts +1 -1
  132. package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
  133. package/lib/cjs/core-react/popup/Popup.js +8 -4
  134. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  135. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +2 -2
  136. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  137. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  138. package/lib/cjs/core-react/searchbox/SearchBox.d.ts +1 -1
  139. package/lib/cjs/core-react/searchbox/SearchBox.d.ts.map +1 -1
  140. package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
  141. package/lib/cjs/core-react/settings/SettingsContainer.d.ts +1 -1
  142. package/lib/cjs/core-react/settings/SettingsContainer.d.ts.map +1 -1
  143. package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
  144. package/lib/cjs/core-react/settings/SettingsManager.d.ts +1 -1
  145. package/lib/cjs/core-react/settings/SettingsManager.d.ts.map +1 -1
  146. package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
  147. package/lib/cjs/core-react/tabs/Tabs.d.ts +1 -1
  148. package/lib/cjs/core-react/tabs/Tabs.d.ts.map +1 -1
  149. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  150. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +1 -1
  151. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  152. package/lib/cjs/core-react/tabs/VerticalTabs.js.map +1 -1
  153. package/lib/cjs/core-react/text/BlockText.d.ts +1 -1
  154. package/lib/cjs/core-react/text/BlockText.d.ts.map +1 -1
  155. package/lib/cjs/core-react/text/BlockText.js.map +1 -1
  156. package/lib/cjs/core-react/text/BodyText.d.ts +1 -1
  157. package/lib/cjs/core-react/text/BodyText.d.ts.map +1 -1
  158. package/lib/cjs/core-react/text/BodyText.js.map +1 -1
  159. package/lib/cjs/core-react/text/DisabledText.d.ts +1 -1
  160. package/lib/cjs/core-react/text/DisabledText.d.ts.map +1 -1
  161. package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
  162. package/lib/cjs/core-react/text/FilteredText.d.ts +2 -2
  163. package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
  164. package/lib/cjs/core-react/text/FilteredText.js.map +1 -1
  165. package/lib/cjs/core-react/text/MutedText.d.ts +1 -1
  166. package/lib/cjs/core-react/text/MutedText.d.ts.map +1 -1
  167. package/lib/cjs/core-react/text/MutedText.js.map +1 -1
  168. package/lib/cjs/core-react/text/StyledText.d.ts +1 -1
  169. package/lib/cjs/core-react/text/StyledText.d.ts.map +1 -1
  170. package/lib/cjs/core-react/text/StyledText.js.map +1 -1
  171. package/lib/cjs/core-react/text/TextProps.d.ts +2 -2
  172. package/lib/cjs/core-react/text/TextProps.d.ts.map +1 -1
  173. package/lib/cjs/core-react/text/TextProps.js.map +1 -1
  174. package/lib/cjs/core-react/tree/Branch.d.ts +1 -1
  175. package/lib/cjs/core-react/tree/Branch.d.ts.map +1 -1
  176. package/lib/cjs/core-react/tree/Branch.js.map +1 -1
  177. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts +1 -1
  178. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  179. package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
  180. package/lib/cjs/core-react/tree/Node.d.ts +3 -3
  181. package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
  182. package/lib/cjs/core-react/tree/Node.js +2 -1
  183. package/lib/cjs/core-react/tree/Node.js.map +1 -1
  184. package/lib/cjs/core-react/tree/Node.scss +7 -7
  185. package/lib/cjs/core-react/tree/Placeholder.d.ts +1 -1
  186. package/lib/cjs/core-react/tree/Placeholder.d.ts.map +1 -1
  187. package/lib/cjs/core-react/tree/Placeholder.js.map +1 -1
  188. package/lib/cjs/core-react/tree/Tree.d.ts +1 -1
  189. package/lib/cjs/core-react/tree/Tree.d.ts.map +1 -1
  190. package/lib/cjs/core-react/tree/Tree.js.map +1 -1
  191. package/lib/cjs/core-react/uistate/LocalStateStorage.d.ts +1 -1
  192. package/lib/cjs/core-react/uistate/LocalStateStorage.d.ts.map +1 -1
  193. package/lib/cjs/core-react/uistate/LocalStateStorage.js.map +1 -1
  194. package/lib/cjs/core-react/uistate/UiStateEntry.d.ts +1 -1
  195. package/lib/cjs/core-react/uistate/UiStateEntry.d.ts.map +1 -1
  196. package/lib/cjs/core-react/uistate/UiStateEntry.js.map +1 -1
  197. package/lib/cjs/core-react/utils/IconHelper.d.ts +1 -1
  198. package/lib/cjs/core-react/utils/IconHelper.d.ts.map +1 -1
  199. package/lib/cjs/core-react/utils/IconHelper.js.map +1 -1
  200. package/lib/cjs/core-react/utils/IconWebComponent.js +1 -1
  201. package/lib/cjs/core-react/utils/IconWebComponent.js.map +1 -1
  202. package/lib/cjs/core-react/utils/Point.d.ts +1 -1
  203. package/lib/cjs/core-react/utils/Point.d.ts.map +1 -1
  204. package/lib/cjs/core-react/utils/Point.js.map +1 -1
  205. package/lib/cjs/core-react/utils/Props.d.ts +2 -2
  206. package/lib/cjs/core-react/utils/Props.d.ts.map +1 -1
  207. package/lib/cjs/core-react/utils/Props.js.map +1 -1
  208. package/lib/cjs/core-react/utils/Rectangle.d.ts +3 -2
  209. package/lib/cjs/core-react/utils/Rectangle.d.ts.map +1 -1
  210. package/lib/cjs/core-react/utils/Rectangle.js.map +1 -1
  211. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts +1 -1
  212. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  213. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  214. package/lib/cjs/core-react/utils/getCssVariable.js +1 -1
  215. package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
  216. package/lib/cjs/core-react/utils/getDisplayName.d.ts +1 -1
  217. package/lib/cjs/core-react/utils/getDisplayName.d.ts.map +1 -1
  218. package/lib/cjs/core-react/utils/getDisplayName.js.map +1 -1
  219. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
  220. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +2 -1
  221. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  222. package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts +1 -1
  223. package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  224. package/lib/cjs/core-react/utils/hooks/useDisposable.js.map +1 -1
  225. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +13 -8
  226. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  227. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  228. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  229. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  230. package/lib/esm/core-react/badge/Badge.d.ts +1 -1
  231. package/lib/esm/core-react/badge/Badge.d.ts.map +1 -1
  232. package/lib/esm/core-react/badge/Badge.js.map +1 -1
  233. package/lib/esm/core-react/badge/BetaBadge.d.ts +1 -1
  234. package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
  235. package/lib/esm/core-react/badge/BetaBadge.js.map +1 -1
  236. package/lib/esm/core-react/badge/NewBadge.d.ts +1 -1
  237. package/lib/esm/core-react/badge/NewBadge.d.ts.map +1 -1
  238. package/lib/esm/core-react/badge/NewBadge.js.map +1 -1
  239. package/lib/esm/core-react/base/Centered.d.ts +1 -1
  240. package/lib/esm/core-react/base/Centered.d.ts.map +1 -1
  241. package/lib/esm/core-react/base/Centered.js.map +1 -1
  242. package/lib/esm/core-react/base/Div.d.ts +1 -1
  243. package/lib/esm/core-react/base/Div.d.ts.map +1 -1
  244. package/lib/esm/core-react/base/Div.js.map +1 -1
  245. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +1 -1
  246. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  247. package/lib/esm/core-react/base/DivWithOutsideClick.js.map +1 -1
  248. package/lib/esm/core-react/base/FillCentered.d.ts +1 -1
  249. package/lib/esm/core-react/base/FillCentered.d.ts.map +1 -1
  250. package/lib/esm/core-react/base/FillCentered.js.map +1 -1
  251. package/lib/esm/core-react/base/FlexWrapContainer.d.ts +1 -1
  252. package/lib/esm/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  253. package/lib/esm/core-react/base/FlexWrapContainer.js.map +1 -1
  254. package/lib/esm/core-react/base/Gap.d.ts +1 -1
  255. package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
  256. package/lib/esm/core-react/base/Gap.js +1 -1
  257. package/lib/esm/core-react/base/Gap.js.map +1 -1
  258. package/lib/esm/core-react/base/ScrollView.d.ts +1 -1
  259. package/lib/esm/core-react/base/ScrollView.d.ts.map +1 -1
  260. package/lib/esm/core-react/base/ScrollView.js.map +1 -1
  261. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +1 -1
  262. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  263. package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
  264. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +1 -1
  265. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  266. package/lib/esm/core-react/contextmenu/ContextMenu.js +2 -1
  267. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  268. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  269. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  270. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  271. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts +5 -4
  272. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  273. package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  274. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts +3 -3
  275. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  276. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  277. package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts +1 -1
  278. package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  279. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js +5 -3
  280. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  281. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts +1 -1
  282. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  283. package/lib/esm/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  284. package/lib/esm/core-react/dialog/Dialog.d.ts +3 -3
  285. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  286. package/lib/esm/core-react/dialog/Dialog.js +2 -1
  287. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  288. package/lib/esm/core-react/dialog/GlobalDialog.d.ts +1 -1
  289. package/lib/esm/core-react/dialog/GlobalDialog.d.ts.map +1 -1
  290. package/lib/esm/core-react/dialog/GlobalDialog.js +2 -1
  291. package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
  292. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +1 -1
  293. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  294. package/lib/esm/core-react/elementseparator/ElementSeparator.js +2 -2
  295. package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
  296. package/lib/esm/core-react/expandable/ExpandableList.d.ts +1 -1
  297. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  298. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  299. package/lib/esm/core-react/hocs/withOnOutsideClick.js +2 -1
  300. package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
  301. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts +1 -1
  302. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
  303. package/lib/esm/core-react/icons/ConditionalIconItem.js.map +1 -1
  304. package/lib/esm/core-react/icons/IconComponent.d.ts +2 -2
  305. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  306. package/lib/esm/core-react/icons/IconComponent.js +1 -1
  307. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  308. package/lib/esm/core-react/icons/SvgPath.d.ts +1 -1
  309. package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
  310. package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
  311. package/lib/esm/core-react/icons/WebFontIcon.d.ts +1 -1
  312. package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
  313. package/lib/esm/core-react/icons/WebFontIcon.js.map +1 -1
  314. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +1 -1
  315. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  316. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  317. package/lib/esm/core-react/inputs/Input.d.ts +1 -1
  318. package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
  319. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  320. package/lib/esm/core-react/inputs/InputLabel.d.ts +2 -2
  321. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  322. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  323. package/lib/esm/core-react/inputs/LabeledComponentProps.d.ts +2 -2
  324. package/lib/esm/core-react/inputs/LabeledComponentProps.d.ts.map +1 -1
  325. package/lib/esm/core-react/inputs/LabeledComponentProps.js.map +1 -1
  326. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  327. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  328. package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
  329. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +1 -1
  330. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  331. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  332. package/lib/esm/core-react/listbox/Listbox.js +3 -2
  333. package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
  334. package/lib/esm/core-react/loading/LoadingBar.d.ts +1 -1
  335. package/lib/esm/core-react/loading/LoadingBar.d.ts.map +1 -1
  336. package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
  337. package/lib/esm/core-react/loading/LoadingPrompt.d.ts +1 -1
  338. package/lib/esm/core-react/loading/LoadingPrompt.d.ts.map +1 -1
  339. package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
  340. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +1 -1
  341. package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  342. package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
  343. package/lib/esm/core-react/loading/LoadingStatus.d.ts +1 -1
  344. package/lib/esm/core-react/loading/LoadingStatus.d.ts.map +1 -1
  345. package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
  346. package/lib/esm/core-react/messagebox/MessageBox.d.ts +4 -3
  347. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  348. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  349. package/lib/esm/core-react/notification/MessageRenderer.d.ts +2 -2
  350. package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
  351. package/lib/esm/core-react/notification/MessageRenderer.js +1 -1
  352. package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
  353. package/lib/esm/core-react/notification/MessageType.d.ts +1 -1
  354. package/lib/esm/core-react/notification/MessageType.d.ts.map +1 -1
  355. package/lib/esm/core-react/notification/MessageType.js.map +1 -1
  356. package/lib/esm/core-react/popup/Popup.d.ts +1 -1
  357. package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
  358. package/lib/esm/core-react/popup/Popup.js +8 -4
  359. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  360. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +2 -2
  361. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  362. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  363. package/lib/esm/core-react/searchbox/SearchBox.d.ts +1 -1
  364. package/lib/esm/core-react/searchbox/SearchBox.d.ts.map +1 -1
  365. package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
  366. package/lib/esm/core-react/settings/SettingsContainer.d.ts +1 -1
  367. package/lib/esm/core-react/settings/SettingsContainer.d.ts.map +1 -1
  368. package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
  369. package/lib/esm/core-react/settings/SettingsManager.d.ts +1 -1
  370. package/lib/esm/core-react/settings/SettingsManager.d.ts.map +1 -1
  371. package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
  372. package/lib/esm/core-react/tabs/Tabs.d.ts +1 -1
  373. package/lib/esm/core-react/tabs/Tabs.d.ts.map +1 -1
  374. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  375. package/lib/esm/core-react/tabs/VerticalTabs.d.ts +1 -1
  376. package/lib/esm/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  377. package/lib/esm/core-react/tabs/VerticalTabs.js.map +1 -1
  378. package/lib/esm/core-react/text/BlockText.d.ts +1 -1
  379. package/lib/esm/core-react/text/BlockText.d.ts.map +1 -1
  380. package/lib/esm/core-react/text/BlockText.js.map +1 -1
  381. package/lib/esm/core-react/text/BodyText.d.ts +1 -1
  382. package/lib/esm/core-react/text/BodyText.d.ts.map +1 -1
  383. package/lib/esm/core-react/text/BodyText.js.map +1 -1
  384. package/lib/esm/core-react/text/DisabledText.d.ts +1 -1
  385. package/lib/esm/core-react/text/DisabledText.d.ts.map +1 -1
  386. package/lib/esm/core-react/text/DisabledText.js.map +1 -1
  387. package/lib/esm/core-react/text/FilteredText.d.ts +2 -2
  388. package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
  389. package/lib/esm/core-react/text/FilteredText.js.map +1 -1
  390. package/lib/esm/core-react/text/MutedText.d.ts +1 -1
  391. package/lib/esm/core-react/text/MutedText.d.ts.map +1 -1
  392. package/lib/esm/core-react/text/MutedText.js.map +1 -1
  393. package/lib/esm/core-react/text/StyledText.d.ts +1 -1
  394. package/lib/esm/core-react/text/StyledText.d.ts.map +1 -1
  395. package/lib/esm/core-react/text/StyledText.js.map +1 -1
  396. package/lib/esm/core-react/text/TextProps.d.ts +2 -2
  397. package/lib/esm/core-react/text/TextProps.d.ts.map +1 -1
  398. package/lib/esm/core-react/text/TextProps.js.map +1 -1
  399. package/lib/esm/core-react/tree/Branch.d.ts +1 -1
  400. package/lib/esm/core-react/tree/Branch.d.ts.map +1 -1
  401. package/lib/esm/core-react/tree/Branch.js.map +1 -1
  402. package/lib/esm/core-react/tree/ExpansionToggle.d.ts +1 -1
  403. package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  404. package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
  405. package/lib/esm/core-react/tree/Node.d.ts +3 -3
  406. package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
  407. package/lib/esm/core-react/tree/Node.js +2 -1
  408. package/lib/esm/core-react/tree/Node.js.map +1 -1
  409. package/lib/esm/core-react/tree/Node.scss +7 -7
  410. package/lib/esm/core-react/tree/Placeholder.d.ts +1 -1
  411. package/lib/esm/core-react/tree/Placeholder.d.ts.map +1 -1
  412. package/lib/esm/core-react/tree/Placeholder.js.map +1 -1
  413. package/lib/esm/core-react/tree/Tree.d.ts +1 -1
  414. package/lib/esm/core-react/tree/Tree.d.ts.map +1 -1
  415. package/lib/esm/core-react/tree/Tree.js.map +1 -1
  416. package/lib/esm/core-react/uistate/LocalStateStorage.d.ts +1 -1
  417. package/lib/esm/core-react/uistate/LocalStateStorage.d.ts.map +1 -1
  418. package/lib/esm/core-react/uistate/LocalStateStorage.js.map +1 -1
  419. package/lib/esm/core-react/uistate/UiStateEntry.d.ts +1 -1
  420. package/lib/esm/core-react/uistate/UiStateEntry.d.ts.map +1 -1
  421. package/lib/esm/core-react/uistate/UiStateEntry.js.map +1 -1
  422. package/lib/esm/core-react/utils/IconHelper.d.ts +1 -1
  423. package/lib/esm/core-react/utils/IconHelper.d.ts.map +1 -1
  424. package/lib/esm/core-react/utils/IconHelper.js.map +1 -1
  425. package/lib/esm/core-react/utils/IconWebComponent.js +1 -1
  426. package/lib/esm/core-react/utils/IconWebComponent.js.map +1 -1
  427. package/lib/esm/core-react/utils/Point.d.ts +1 -1
  428. package/lib/esm/core-react/utils/Point.d.ts.map +1 -1
  429. package/lib/esm/core-react/utils/Point.js.map +1 -1
  430. package/lib/esm/core-react/utils/Props.d.ts +2 -2
  431. package/lib/esm/core-react/utils/Props.d.ts.map +1 -1
  432. package/lib/esm/core-react/utils/Props.js.map +1 -1
  433. package/lib/esm/core-react/utils/Rectangle.d.ts +3 -2
  434. package/lib/esm/core-react/utils/Rectangle.d.ts.map +1 -1
  435. package/lib/esm/core-react/utils/Rectangle.js.map +1 -1
  436. package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts +1 -1
  437. package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  438. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  439. package/lib/esm/core-react/utils/getCssVariable.js +1 -1
  440. package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
  441. package/lib/esm/core-react/utils/getDisplayName.d.ts +1 -1
  442. package/lib/esm/core-react/utils/getDisplayName.d.ts.map +1 -1
  443. package/lib/esm/core-react/utils/getDisplayName.js.map +1 -1
  444. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
  445. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +2 -1
  446. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  447. package/lib/esm/core-react/utils/hooks/useDisposable.d.ts +1 -1
  448. package/lib/esm/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  449. package/lib/esm/core-react/utils/hooks/useDisposable.js.map +1 -1
  450. package/lib/esm/core-react/utils/hooks/useResizeObserver.js +13 -8
  451. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  452. package/package.json +9 -4
package/CHANGELOG.md CHANGED
@@ -1,6 +1,38 @@
1
1
  # Change Log - @itwin/core-react
2
2
 
3
- This log was last generated on Wed, 12 Apr 2023 13:12:42 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 29 May 2023 14:05:04 GMT and should not be manually modified.
4
+
5
+ ## 4.1.0
6
+ Mon, 29 May 2023 14:05:04 GMT
7
+
8
+ ### Updates
9
+
10
+ - Add gaps between TreeNodeItem content items.
11
+
12
+ ## 4.0.1
13
+ Fri, 19 May 2023 12:24:31 GMT
14
+
15
+ _Version update only_
16
+
17
+ ## 4.0.0
18
+ Mon, 01 May 2023 13:32:16 GMT
19
+
20
+ ### Updates
21
+
22
+ - Promote APIs in use by apps.
23
+ - Using iTwinUI-variables.
24
+ - Update iTwinUI-react to v2.x.
25
+ - Fix tree node chevron alignment.
26
+ - Clean dependencies.
27
+ - Remove deprecated components and API.
28
+ - Bump minimum of core packages to 3.7.0.
29
+ - peerDependency allow react: ^18.0.0.
30
+ - Update typings for React18.
31
+ - Remove deprecated SCSS files.
32
+ - Remove SvgSprite component and support.
33
+ - Remove deprecated components.
34
+ - Update package.json dependencies and repo documentation.
35
+ - Remove webfont icons from components. Add ConditionIconComponent to allow IconSpec to be used conditionally instead of just a string.
4
36
 
5
37
  ## 3.7.2
6
38
  Wed, 12 Apr 2023 13:12:42 GMT
@@ -215,7 +247,7 @@ Fri, 20 May 2022 13:10:54 GMT
215
247
 
216
248
  - Added 'useCrossOriginPopup' and 'useInterval' hooks
217
249
  - ListBox component: `onKeyPress` has been deprecated, switch to `onKeyDown`
218
- - Fix for losing viewport content after clicking PW link
250
+ - Fix for losing viewport content after clicking PW link
219
251
  - Implement svg icons loading as a web component.
220
252
  - Allow React icons to be used on Wedget tabs, backstage, and status bar items
221
253
 
@@ -569,9 +601,9 @@ Mon, 24 May 2021 15:58:39 GMT
569
601
  ### Updates
570
602
 
571
603
  - Wrap resizeObserver in a windows animation frame to prevent loop limit exceeded error.
572
- - Add support for child popup windows.
604
+ - Add support for child popup windows.
573
605
  - Improved Multi-Value column filtering in the Table component
574
- - Update to latest classnames package
606
+ - Update to latest classnames package
575
607
  - Fix GlobalContextMenu layout issue in presentation-test-app by setting display:none on anchoring div.
576
608
 
577
609
  ## 2.15.6
@@ -699,7 +731,7 @@ Thu, 28 Jan 2021 13:39:27 GMT
699
731
 
700
732
  ### Updates
701
733
 
702
- - Update components that support providing refs via React.forwardRef to work better with document generation.
734
+ - Update components that support providing refs via React.forwardRef to work better with document generation.
703
735
  - Add option to use a 'x-small' webfont icon.
704
736
  - Add nested popup support to components that use HOC withOnOutsideClick.
705
737
  - Fix bug processing zero value in Select options.
@@ -970,7 +1002,7 @@ Tue, 28 Jul 2020 16:26:24 GMT
970
1002
  - Add support for a basic single selection aria compliant listbox.
971
1003
  - Checkboxes in lists & trees are out of place
972
1004
  - Disabled component styling. Fixed Dialog focus problems.
973
- - Map Layer UX
1005
+ - Map Layer UX
974
1006
  - Allowing Input component user to override the type
975
1007
  - Fix ThemeSelect formatOptionLabel prop to return React.ReactNode.
976
1008
  - Added Arrow key navigation in Tabs components. Added ItemKeyboardNavigator.
@@ -1293,7 +1325,7 @@ Mon, 13 May 2019 15:52:05 GMT
1293
1325
  - Put sourcemap in npm package.
1294
1326
  - Added SignIn presentational component to ui-components. Removed --ignoreMissingTags extract-api option.
1295
1327
  - Require React & React-dom 16.8
1296
- - Setup a generic context for tracking client requests, and made various related enhancements to logging, usage tracking and authorization.
1328
+ - Setup a generic context for tracking client requests, and made various related enhancements to logging, usage tracking and authorization.
1297
1329
  - Added ViewportDialog in ui-test-app, ui-core/ContributeGuidelines.md. TSLint rules in ui-core for no-default-export & completed-docs. @beta release tags.
1298
1330
  - Update icons-generic-webfont version to latest available.
1299
1331
  - Added TableProp to hide header and supporting style changes
@@ -4,7 +4,7 @@
4
4
  import "./AutoSuggest.scss";
5
5
  import * as React from "react";
6
6
  import * as ReactAutosuggest from "react-autosuggest";
7
- import { CommonProps } from "../utils/Props";
7
+ import type { CommonProps } from "../utils/Props";
8
8
  /** Data for the [[AutoSuggest]] options
9
9
  * @public
10
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AutoSuggest.d.ts","sourceRoot":"","sources":["../../../../src/core-react/autosuggest/AutoSuggest.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,eAAe,EAAE,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;AAExF;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,WAAW;IAChG,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,OAAO,CAAC,EAAE,eAAe,EAAE,GAAG,sBAAsB,CAAC;IACrD,sEAAsE;IACtE,cAAc,CAAC,EAAE,2BAA2B,CAAC;IAC7C,iDAAiD;IACjD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,CAAC;IACjD,2CAA2C;IAC3C,oBAAoB,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAC;IAC1D,6BAA6B;IAC7B,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAA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,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC1B,MAAM,gBAAgB,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;QAEjE,MAAM,UAAU,GAAiD;YAC/D,GAAG,KAAK;YACR,KAAK,EAAE,UAAU;YACjB,QAAQ,EAAE,IAAI,CAAC,SAAS;YACxB,OAAO,EAAE,IAAI,CAAC,QAAQ;YACtB,WAAW,EAAE,gBAAgB;YAC7B,SAAS,EAAE,QAAQ;SACpB,CAAC;QAEF,OAAO;QACL,2EAA2E;QAC3E,mEAAmE;QACnE,6BAAK,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,cAAc;YAC3F,oBAAC,gBAAgB,IACf,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,WAAW,EAAE,WAAW,EACxB,2BAA2B,EAAE,IAAI,CAAC,4BAA4B,EAC9D,2BAA2B,EAAE,IAAI,CAAC,4BAA4B,EAC9D,kBAAkB,EAAE,IAAI,CAAC,mBAAmB,EAC5C,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,EACxC,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,IAAI,CAAC,qBAAqB,EAChD,uBAAuB,EAAE,uBAAuB,EAChD,oBAAoB,EAAE,oBAAoB,EAC1C,0BAA0B,EAAE,0BAA0B,GACtD,CACE,CACP,CAAC;IACJ,CAAC;CACF;AAvMD,kCAuMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module AutoSuggest\r\n */\r\n\r\nimport \"./AutoSuggest.scss\";\r\nimport * as React from \"react\";\r\nimport * as ReactAutosuggest from \"react-autosuggest\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { UiCore } from \"../UiCore\";\r\n\r\n/** Data for the [[AutoSuggest]] options\r\n * @public\r\n */\r\nexport interface AutoSuggestData {\r\n /** Value of [[AutoSuggest]] option. */\r\n value: string;\r\n /** Label of [[AutoSuggest]] option. This is shown in the dropdown. */\r\n label: string;\r\n}\r\n\r\n/** Prototype for function returning AutoSuggestData\r\n * @public\r\n */\r\nexport type GetAutoSuggestDataFunc = (value: string) => AutoSuggestData[];\r\n\r\n/** Prototype for async function returning AutoSuggestData\r\n * @public\r\n */\r\nexport type AsyncGetAutoSuggestDataFunc = (value: string) => Promise<AutoSuggestData[]>;\r\n\r\n/** Properties for the [[AutoSuggest]] component.\r\n * @public\r\n */\r\nexport interface AutoSuggestProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps {\r\n /** Optional input value override. */\r\n value?: string;\r\n /** Options for dropdown. */\r\n options?: AutoSuggestData[] | GetAutoSuggestDataFunc;\r\n /** Asynchronously calculate suggestions for any given input value. */\r\n getSuggestions?: AsyncGetAutoSuggestDataFunc;\r\n /** Gets a label associated with a given value */\r\n getLabel?: (value: string | undefined) => string;\r\n /** Handler for when suggested selected. */\r\n onSuggestionSelected: (selected: AutoSuggestData) => void;\r\n /** Handler for Enter key. */\r\n onPressEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for Escape key. */\r\n onPressEscape?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for Tab key. */\r\n onPressTab?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for input receiving focus. */\r\n onInputFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;\r\n /** Called every time you need to clear suggestions. */\r\n onSuggestionsClearRequested?: () => void;\r\n /** Indicates whether to set focus to the input element */\r\n setFocus?: boolean;\r\n\r\n /** Use it only if you need to customize the rendering of the input.\r\n * @internal\r\n */\r\n renderInputComponent?: any; // ReactAutosuggest.RenderInputComponent<AutoSuggestData>; NOTE: changed to \"any\" because build was failing with RenderInputComponent is not generic?\r\n /** Use it if you want to customize things inside the suggestions container beyond rendering the suggestions themselves.\r\n * @internal\r\n */\r\n renderSuggestionsContainer?: ReactAutosuggest.RenderSuggestionsContainer;\r\n\r\n /** @internal */\r\n alwaysRenderSuggestions?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface AutoSuggestState {\r\n inputValue: string;\r\n suggestions: AutoSuggestData[];\r\n}\r\n\r\n/** Auto Suggest React component. Uses the react-autosuggest component internally.\r\n * @public\r\n */\r\nexport class AutoSuggest extends React.PureComponent<AutoSuggestProps, AutoSuggestState> {\r\n private _isMounted = false;\r\n\r\n constructor(props: AutoSuggestProps) {\r\n super(props);\r\n\r\n // Autosuggest is a controlled component.\r\n // This means that you need to provide an input value\r\n // and an onChange handler that updates this value (see below).\r\n // Suggestions also need to be provided to the Autosuggest,\r\n // and they are initially empty because the Autosuggest is closed.\r\n this.state = {\r\n inputValue: this.getLabel(props.value),\r\n suggestions: [],\r\n };\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._isMounted = true;\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n public override componentDidUpdate(prevProps: AutoSuggestProps) {\r\n if (this.props.value !== prevProps.value || this.props.options !== prevProps.options) {\r\n this.setState((_prevState, props) => ({\r\n inputValue: this.getLabel(props.value),\r\n }));\r\n }\r\n }\r\n\r\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n let newValue = \"\";\r\n\r\n if (e.target.tagName === \"LI\" && e.target.textContent)\r\n newValue = e.target.textContent;\r\n else if (e.target.value)\r\n newValue = e.target.value;\r\n\r\n this.setState({\r\n inputValue: newValue,\r\n });\r\n };\r\n\r\n private _onFocus = (e: React.FocusEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (this.props.onInputFocus)\r\n this.props.onInputFocus(e);\r\n };\r\n\r\n /** Autosuggest will call this function every time you need to update suggestions. */\r\n private _onSuggestionsFetchRequested = async (request: ReactAutosuggest.SuggestionsFetchRequestedParams): Promise<void> => {\r\n const value = request.value;\r\n const suggestions = await this._getSuggestions(value);\r\n\r\n if (this._isMounted)\r\n this.setState({ suggestions });\r\n };\r\n\r\n /** Autosuggest will call this function every time you need to clear suggestions. */\r\n private _onSuggestionsClearRequested = () => {\r\n this.setState({ suggestions: [] });\r\n this.props.onSuggestionsClearRequested && this.props.onSuggestionsClearRequested();\r\n };\r\n\r\n private _onSuggestionSelected = (_event: React.FormEvent<any>, data: ReactAutosuggest.SuggestionSelectedEventData<AutoSuggestData>): void => {\r\n this.props.onSuggestionSelected(data.suggestion);\r\n };\r\n\r\n /** Teach Autosuggest how to calculate suggestions for any given input value. */\r\n private _getSuggestions = async (value: string): Promise<AutoSuggestData[]> => {\r\n if (typeof this.props.options === \"function\")\r\n return Promise.resolve(this.props.options(value));\r\n\r\n if (this.props.getSuggestions)\r\n return this.props.getSuggestions(value);\r\n\r\n if (this.props.options === undefined) {\r\n Logger.logError(UiCore.loggerCategory(this), `props.options or props.getSuggestions should be provided`);\r\n return Promise.resolve([]);\r\n }\r\n\r\n const inputValue = value.trim().toLowerCase();\r\n const inputLength = inputValue.length;\r\n\r\n return Promise.resolve(\r\n inputLength === 0 ?\r\n /* istanbul ignore next */[] :\r\n this.props.options.filter((data: AutoSuggestData) => {\r\n return data.label.toLowerCase().includes(inputValue) || data.value.toLowerCase().includes(inputValue);\r\n })\r\n );\r\n };\r\n\r\n /** When suggestion is clicked, Autosuggest needs to populate the input based on the clicked suggestion. */\r\n private _getSuggestionValue = (suggestion: AutoSuggestData) => suggestion.label;\r\n\r\n /** Render each suggestion. */\r\n private _renderSuggestion = (suggestion: AutoSuggestData) => (\r\n <span>\r\n {suggestion.label}\r\n </span>\r\n );\r\n\r\n private getLabel(value: string | undefined): string {\r\n let label = \"\";\r\n\r\n if (this.props.getLabel) {\r\n label = this.props.getLabel(value);\r\n } else if (this.props.options instanceof Array) {\r\n const entry = this.props.options.find((data: AutoSuggestData) => data.value === value);\r\n if (entry)\r\n label = entry.label;\r\n } else {\r\n Logger.logError(UiCore.loggerCategory(this), `props.getLabel should be provided when props.options is a function`);\r\n }\r\n\r\n return label;\r\n }\r\n\r\n private _handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n switch (e.key) {\r\n case SpecialKey.Enter:\r\n // istanbul ignore else\r\n if (this.props.onPressEnter)\r\n this.props.onPressEnter(e);\r\n break;\r\n case SpecialKey.Escape:\r\n // istanbul ignore else\r\n if (this.props.onPressEscape)\r\n this.props.onPressEscape(e);\r\n break;\r\n case SpecialKey.Tab:\r\n // istanbul ignore else\r\n if (this.props.onPressTab)\r\n this.props.onPressTab(e);\r\n break;\r\n }\r\n };\r\n\r\n private _theme = {\r\n container: \"uicore-autosuggest__container\",\r\n containerOpen: \"uicore-autosuggest__container--open\",\r\n input: \"iui-input uicore-autosuggest__input\",\r\n inputOpen: \"uicore-autosuggest__input--open\",\r\n inputFocused: \"uicore-autosuggest__input--focused\",\r\n suggestionsContainer: \"uicore-autosuggest__suggestions-container\",\r\n suggestionsContainerOpen: \"uicore-autosuggest__suggestions-container--open\",\r\n suggestionsList: \"uicore-autosuggest__suggestions-list\",\r\n suggestion: \"uicore-autosuggest__suggestion\",\r\n suggestionFirst: \"uicore-autosuggest__suggestion--first\",\r\n suggestionHighlighted: \"uicore-autosuggest__suggestion--highlighted\",\r\n sectionContainer: \"uicore-autosuggest__section-container\",\r\n sectionContainerFirst: \"uicore-autosuggest__section-container--first\",\r\n sectionTitle: \"uicore-autosuggest__section-title\",\r\n };\r\n\r\n public override render(): JSX.Element {\r\n const { inputValue, suggestions } = this.state;\r\n const { value, onChange, placeholder, options, onSuggestionSelected, setFocus, alwaysRenderSuggestions, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n onPressEnter, onPressEscape, onPressTab, onInputFocus, getLabel, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n getSuggestions, // eslint-disable-line deprecation/deprecation, @typescript-eslint/no-unused-vars\r\n renderInputComponent, renderSuggestionsContainer, onSuggestionsClearRequested, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props;\r\n const inputPlaceholder = (!inputValue) ? placeholder : undefined;\r\n\r\n const inputProps: ReactAutosuggest.InputProps<AutoSuggestData> = {\r\n ...props,\r\n value: inputValue,\r\n onChange: this._onChange,\r\n onFocus: this._onFocus,\r\n placeholder: inputPlaceholder,\r\n autoFocus: setFocus,\r\n };\r\n\r\n return (\r\n // The onKeyDown event handler is only being used to capture bubbled events\r\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\r\n <div className={this.props.className} style={this.props.style} onKeyDown={this._handleKeyDown}>\r\n <ReactAutosuggest\r\n theme={this._theme}\r\n suggestions={suggestions}\r\n onSuggestionsFetchRequested={this._onSuggestionsFetchRequested}\r\n onSuggestionsClearRequested={this._onSuggestionsClearRequested}\r\n getSuggestionValue={this._getSuggestionValue}\r\n renderSuggestion={this._renderSuggestion}\r\n inputProps={inputProps}\r\n onSuggestionSelected={this._onSuggestionSelected}\r\n alwaysRenderSuggestions={alwaysRenderSuggestions}\r\n renderInputComponent={renderInputComponent}\r\n renderSuggestionsContainer={renderSuggestionsContainer}\r\n />\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"AutoSuggest.js","sourceRoot":"","sources":["../../../../src/core-react/autosuggest/AutoSuggest.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAA4B;AAC5B,+BAA+B;AAC/B,sDAAsD;AACtD,sDAA6C;AAC7C,0DAAmD;AAEnD,sCAAmC;AAoEnC;;GAEG;AACH,MAAa,WAAY,SAAQ,KAAK,CAAC,aAAiD;IAGtF,YAAY,KAAuB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;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AAoB,EAAE,IAAI,CAAC,qBAAqB,EAChD,uBAAuB,EAAE,uBAAuB,EAChD,oBAAoB,EAAE,oBAAoB,EAC1C,0BAA0B,EAAE,0BAA0B,GACtD,CACE,CACP,CAAC;IACJ,CAAC;CACF;AAvMD,kCAuMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module AutoSuggest\r\n */\r\n\r\nimport \"./AutoSuggest.scss\";\r\nimport * as React from \"react\";\r\nimport * as ReactAutosuggest from \"react-autosuggest\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { SpecialKey } from \"@itwin/appui-abstract\";\r\nimport type { CommonProps } from \"../utils/Props\";\r\nimport { UiCore } from \"../UiCore\";\r\n\r\n/** Data for the [[AutoSuggest]] options\r\n * @public\r\n */\r\nexport interface AutoSuggestData {\r\n /** Value of [[AutoSuggest]] option. */\r\n value: string;\r\n /** Label of [[AutoSuggest]] option. This is shown in the dropdown. */\r\n label: string;\r\n}\r\n\r\n/** Prototype for function returning AutoSuggestData\r\n * @public\r\n */\r\nexport type GetAutoSuggestDataFunc = (value: string) => AutoSuggestData[];\r\n\r\n/** Prototype for async function returning AutoSuggestData\r\n * @public\r\n */\r\nexport type AsyncGetAutoSuggestDataFunc = (value: string) => Promise<AutoSuggestData[]>;\r\n\r\n/** Properties for the [[AutoSuggest]] component.\r\n * @public\r\n */\r\nexport interface AutoSuggestProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps {\r\n /** Optional input value override. */\r\n value?: string;\r\n /** Options for dropdown. */\r\n options?: AutoSuggestData[] | GetAutoSuggestDataFunc;\r\n /** Asynchronously calculate suggestions for any given input value. */\r\n getSuggestions?: AsyncGetAutoSuggestDataFunc;\r\n /** Gets a label associated with a given value */\r\n getLabel?: (value: string | undefined) => string;\r\n /** Handler for when suggested selected. */\r\n onSuggestionSelected: (selected: AutoSuggestData) => void;\r\n /** Handler for Enter key. */\r\n onPressEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for Escape key. */\r\n onPressEscape?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for Tab key. */\r\n onPressTab?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for input receiving focus. */\r\n onInputFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;\r\n /** Called every time you need to clear suggestions. */\r\n onSuggestionsClearRequested?: () => void;\r\n /** Indicates whether to set focus to the input element */\r\n setFocus?: boolean;\r\n\r\n /** Use it only if you need to customize the rendering of the input.\r\n * @internal\r\n */\r\n renderInputComponent?: any; // ReactAutosuggest.RenderInputComponent<AutoSuggestData>; NOTE: changed to \"any\" because build was failing with RenderInputComponent is not generic?\r\n /** Use it if you want to customize things inside the suggestions container beyond rendering the suggestions themselves.\r\n * @internal\r\n */\r\n renderSuggestionsContainer?: ReactAutosuggest.RenderSuggestionsContainer;\r\n\r\n /** @internal */\r\n alwaysRenderSuggestions?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface AutoSuggestState {\r\n inputValue: string;\r\n suggestions: AutoSuggestData[];\r\n}\r\n\r\n/** Auto Suggest React component. Uses the react-autosuggest component internally.\r\n * @public\r\n */\r\nexport class AutoSuggest extends React.PureComponent<AutoSuggestProps, AutoSuggestState> {\r\n private _isMounted = false;\r\n\r\n constructor(props: AutoSuggestProps) {\r\n super(props);\r\n\r\n // Autosuggest is a controlled component.\r\n // This means that you need to provide an input value\r\n // and an onChange handler that updates this value (see below).\r\n // Suggestions also need to be provided to the Autosuggest,\r\n // and they are initially empty because the Autosuggest is closed.\r\n this.state = {\r\n inputValue: this.getLabel(props.value),\r\n suggestions: [],\r\n };\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._isMounted = true;\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n public override componentDidUpdate(prevProps: AutoSuggestProps) {\r\n if (this.props.value !== prevProps.value || this.props.options !== prevProps.options) {\r\n this.setState((_prevState, props) => ({\r\n inputValue: this.getLabel(props.value),\r\n }));\r\n }\r\n }\r\n\r\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n let newValue = \"\";\r\n\r\n if (e.target.tagName === \"LI\" && e.target.textContent)\r\n newValue = e.target.textContent;\r\n else if (e.target.value)\r\n newValue = e.target.value;\r\n\r\n this.setState({\r\n inputValue: newValue,\r\n });\r\n };\r\n\r\n private _onFocus = (e: React.FocusEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (this.props.onInputFocus)\r\n this.props.onInputFocus(e);\r\n };\r\n\r\n /** Autosuggest will call this function every time you need to update suggestions. */\r\n private _onSuggestionsFetchRequested = async (request: ReactAutosuggest.SuggestionsFetchRequestedParams): Promise<void> => {\r\n const value = request.value;\r\n const suggestions = await this._getSuggestions(value);\r\n\r\n if (this._isMounted)\r\n this.setState({ suggestions });\r\n };\r\n\r\n /** Autosuggest will call this function every time you need to clear suggestions. */\r\n private _onSuggestionsClearRequested = () => {\r\n this.setState({ suggestions: [] });\r\n this.props.onSuggestionsClearRequested && this.props.onSuggestionsClearRequested();\r\n };\r\n\r\n private _onSuggestionSelected = (_event: React.FormEvent<any>, data: ReactAutosuggest.SuggestionSelectedEventData<AutoSuggestData>): void => {\r\n this.props.onSuggestionSelected(data.suggestion);\r\n };\r\n\r\n /** Teach Autosuggest how to calculate suggestions for any given input value. */\r\n private _getSuggestions = async (value: string): Promise<AutoSuggestData[]> => {\r\n if (typeof this.props.options === \"function\")\r\n return Promise.resolve(this.props.options(value));\r\n\r\n if (this.props.getSuggestions)\r\n return this.props.getSuggestions(value);\r\n\r\n if (this.props.options === undefined) {\r\n Logger.logError(UiCore.loggerCategory(this), `props.options or props.getSuggestions should be provided`);\r\n return Promise.resolve([]);\r\n }\r\n\r\n const inputValue = value.trim().toLowerCase();\r\n const inputLength = inputValue.length;\r\n\r\n return Promise.resolve(\r\n inputLength === 0 ?\r\n /* istanbul ignore next */[] :\r\n this.props.options.filter((data: AutoSuggestData) => {\r\n return data.label.toLowerCase().includes(inputValue) || data.value.toLowerCase().includes(inputValue);\r\n })\r\n );\r\n };\r\n\r\n /** When suggestion is clicked, Autosuggest needs to populate the input based on the clicked suggestion. */\r\n private _getSuggestionValue = (suggestion: AutoSuggestData) => suggestion.label;\r\n\r\n /** Render each suggestion. */\r\n private _renderSuggestion = (suggestion: AutoSuggestData) => (\r\n <span>\r\n {suggestion.label}\r\n </span>\r\n );\r\n\r\n private getLabel(value: string | undefined): string {\r\n let label = \"\";\r\n\r\n if (this.props.getLabel) {\r\n label = this.props.getLabel(value);\r\n } else if (this.props.options instanceof Array) {\r\n const entry = this.props.options.find((data: AutoSuggestData) => data.value === value);\r\n if (entry)\r\n label = entry.label;\r\n } else {\r\n Logger.logError(UiCore.loggerCategory(this), `props.getLabel should be provided when props.options is a function`);\r\n }\r\n\r\n return label;\r\n }\r\n\r\n private _handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n switch (e.key) {\r\n case SpecialKey.Enter:\r\n // istanbul ignore else\r\n if (this.props.onPressEnter)\r\n this.props.onPressEnter(e);\r\n break;\r\n case SpecialKey.Escape:\r\n // istanbul ignore else\r\n if (this.props.onPressEscape)\r\n this.props.onPressEscape(e);\r\n break;\r\n case SpecialKey.Tab:\r\n // istanbul ignore else\r\n if (this.props.onPressTab)\r\n this.props.onPressTab(e);\r\n break;\r\n }\r\n };\r\n\r\n private _theme = {\r\n container: \"uicore-autosuggest__container\",\r\n containerOpen: \"uicore-autosuggest__container--open\",\r\n input: \"iui-input uicore-autosuggest__input\",\r\n inputOpen: \"uicore-autosuggest__input--open\",\r\n inputFocused: \"uicore-autosuggest__input--focused\",\r\n suggestionsContainer: \"uicore-autosuggest__suggestions-container\",\r\n suggestionsContainerOpen: \"uicore-autosuggest__suggestions-container--open\",\r\n suggestionsList: \"uicore-autosuggest__suggestions-list\",\r\n suggestion: \"uicore-autosuggest__suggestion\",\r\n suggestionFirst: \"uicore-autosuggest__suggestion--first\",\r\n suggestionHighlighted: \"uicore-autosuggest__suggestion--highlighted\",\r\n sectionContainer: \"uicore-autosuggest__section-container\",\r\n sectionContainerFirst: \"uicore-autosuggest__section-container--first\",\r\n sectionTitle: \"uicore-autosuggest__section-title\",\r\n };\r\n\r\n public override render(): JSX.Element {\r\n const { inputValue, suggestions } = this.state;\r\n const { value, onChange, placeholder, options, onSuggestionSelected, setFocus, alwaysRenderSuggestions, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n onPressEnter, onPressEscape, onPressTab, onInputFocus, getLabel, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n getSuggestions, // eslint-disable-line deprecation/deprecation, @typescript-eslint/no-unused-vars\r\n renderInputComponent, renderSuggestionsContainer, onSuggestionsClearRequested, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props;\r\n const inputPlaceholder = (!inputValue) ? placeholder : undefined;\r\n\r\n const inputProps: ReactAutosuggest.InputProps<AutoSuggestData> = {\r\n ...props,\r\n value: inputValue,\r\n onChange: this._onChange,\r\n onFocus: this._onFocus,\r\n placeholder: inputPlaceholder,\r\n autoFocus: setFocus,\r\n };\r\n\r\n return (\r\n // The onKeyDown event handler is only being used to capture bubbled events\r\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\r\n <div className={this.props.className} style={this.props.style} onKeyDown={this._handleKeyDown}>\r\n <ReactAutosuggest\r\n theme={this._theme}\r\n suggestions={suggestions}\r\n onSuggestionsFetchRequested={this._onSuggestionsFetchRequested}\r\n onSuggestionsClearRequested={this._onSuggestionsClearRequested}\r\n getSuggestionValue={this._getSuggestionValue}\r\n renderSuggestion={this._renderSuggestion}\r\n inputProps={inputProps}\r\n onSuggestionSelected={this._onSuggestionSelected}\r\n alwaysRenderSuggestions={alwaysRenderSuggestions}\r\n renderInputComponent={renderInputComponent}\r\n renderSuggestionsContainer={renderSuggestionsContainer}\r\n />\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import "./Badge.scss";
5
5
  import * as React from "react";
6
- import { CommonProps } from "../utils/Props";
6
+ import type { CommonProps } from "../utils/Props";
7
7
  /** Properties for the [[Badge]] React component
8
8
  * @internal
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/Badge.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,GAAG,EAAE,GAAG,CAAC;CACV;AAED;;GAEG;AACH,qBAAa,KAAM,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IACxC,MAAM,IAAI,GAAG,CAAC,OAAO;CAQtC"}
1
+ {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/Badge.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,GAAG,EAAE,GAAG,CAAC;CACV;AAED;;GAEG;AACH,qBAAa,KAAM,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IACxC,MAAM,IAAI,GAAG,CAAC,OAAO;CAQtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../../src/core-react/badge/Badge.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wBAAsB;AACtB,2CAAoC;AACpC,+BAA+B;AAE/B,0DAA0D;AAC1D,0DAA8C;AAS9C;;GAEG;AACH,MAAa,KAAM,SAAQ,KAAK,CAAC,aAAyB;IACxC,MAAM;QACpB,MAAM,QAAQ,GAAG,kCAAiB,CAAC,0BAA0B,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9E,OAAO,CACL,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;YACrF,oBAAC,oBAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACxB,CACP,CAAC;IACJ,CAAC;CACF;AATD,sBASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport \"./Badge.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { IconSpecUtilities } from \"@itwin/appui-abstract\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\n\r\n/** Properties for the [[Badge]] React component\r\n * @internal\r\n */\r\nexport interface BadgeProps extends CommonProps {\r\n svg: any;\r\n}\r\n\r\n/** Beta Badge React component\r\n * @internal\r\n */\r\nexport class Badge extends React.PureComponent<BadgeProps> {\r\n public override render(): JSX.Element {\r\n const iconSpec = IconSpecUtilities.createWebComponentIconSpec(this.props.svg);\r\n return (\r\n <div className={classnames(\"core-badge\", this.props.className)} style={this.props.style}>\r\n <Icon iconSpec={iconSpec} />\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../../src/core-react/badge/Badge.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wBAAsB;AACtB,2CAAoC;AACpC,+BAA+B;AAE/B,0DAA0D;AAC1D,0DAA8C;AAS9C;;GAEG;AACH,MAAa,KAAM,SAAQ,KAAK,CAAC,aAAyB;IACxC,MAAM;QACpB,MAAM,QAAQ,GAAG,kCAAiB,CAAC,0BAA0B,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9E,OAAO,CACL,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;YACrF,oBAAC,oBAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACxB,CACP,CAAC;IACJ,CAAC;CACF;AATD,sBASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport \"./Badge.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport type { CommonProps } from \"../utils/Props\";\r\nimport { IconSpecUtilities } from \"@itwin/appui-abstract\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\n\r\n/** Properties for the [[Badge]] React component\r\n * @internal\r\n */\r\nexport interface BadgeProps extends CommonProps {\r\n svg: any;\r\n}\r\n\r\n/** Beta Badge React component\r\n * @internal\r\n */\r\nexport class Badge extends React.PureComponent<BadgeProps> {\r\n public override render(): JSX.Element {\r\n const iconSpec = IconSpecUtilities.createWebComponentIconSpec(this.props.svg);\r\n return (\r\n <div className={classnames(\"core-badge\", this.props.className)} style={this.props.style}>\r\n <Icon iconSpec={iconSpec} />\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Utilities
3
3
  */
4
4
  /// <reference types="react" />
5
- import { CommonProps } from "../utils/Props";
5
+ import type { CommonProps } from "../utils/Props";
6
6
  /** Beta Badge React component
7
7
  * @internal
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"BetaBadge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/BetaBadge.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,eAS3C"}
1
+ {"version":3,"file":"BetaBadge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/BetaBadge.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,eAS3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"BetaBadge.js","sourceRoot":"","sources":["../../../../src/core-react/badge/BetaBadge.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAE/B,mCAAgC;AAChC,+EAA0D;AAE1D;;GAEG;AACH,SAAgB,SAAS,CAAC,KAAkB;IAC1C,MAAM,SAAS,GAAG,IAAA,oBAAU,EAAC,sBAAsB,EACjD,KAAK,CAAC,SAAS,CAChB,CAAC;IACF,OAAO,oBAAC,aAAK,OACP,KAAK,EACT,GAAG,EAAE,qCAAa,EAClB,SAAS,EAAE,SAAS,GACpB,CAAC;AACL,CAAC;AATD,8BASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Badge } from \"./Badge\";\r\nimport betaBadgeIcon from \"./technical-preview-badge.svg\";\r\n\r\n/** Beta Badge React component\r\n * @internal\r\n */\r\nexport function BetaBadge(props: CommonProps) {\r\n const className = classnames(\"core-badge-betaBadge\",\r\n props.className,\r\n );\r\n return <Badge\r\n {...props}\r\n svg={betaBadgeIcon}\r\n className={className}\r\n />;\r\n}\r\n"]}
1
+ {"version":3,"file":"BetaBadge.js","sourceRoot":"","sources":["../../../../src/core-react/badge/BetaBadge.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAE/B,mCAAgC;AAChC,+EAA0D;AAE1D;;GAEG;AACH,SAAgB,SAAS,CAAC,KAAkB;IAC1C,MAAM,SAAS,GAAG,IAAA,oBAAU,EAAC,sBAAsB,EACjD,KAAK,CAAC,SAAS,CAChB,CAAC;IACF,OAAO,oBAAC,aAAK,OACP,KAAK,EACT,GAAG,EAAE,qCAAa,EAClB,SAAS,EAAE,SAAS,GACpB,CAAC;AACL,CAAC;AATD,8BASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport type { CommonProps } from \"../utils/Props\";\r\nimport { Badge } from \"./Badge\";\r\nimport betaBadgeIcon from \"./technical-preview-badge.svg\";\r\n\r\n/** Beta Badge React component\r\n * @internal\r\n */\r\nexport function BetaBadge(props: CommonProps) {\r\n const className = classnames(\"core-badge-betaBadge\",\r\n props.className,\r\n );\r\n return <Badge\r\n {...props}\r\n svg={betaBadgeIcon}\r\n className={className}\r\n />;\r\n}\r\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /// <reference types="react" />
5
5
  import "./NewBadge.scss";
6
- import { CommonProps } from "../utils/Props";
6
+ import type { CommonProps } from "../utils/Props";
7
7
  /** New Badge React component
8
8
  * @internal
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"NewBadge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/NewBadge.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,iBAAiB,CAAC;AAGzB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW,eAG1C"}
1
+ {"version":3,"file":"NewBadge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/NewBadge.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW,eAG1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"NewBadge.js","sourceRoot":"","sources":["../../../../src/core-react/badge/NewBadge.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,2BAAyB;AACzB,2CAAoC;AACpC,+BAA+B;AAE/B,mCAAgC;AAChC,mEAAmD;AAEnD;;GAEG;AACH,SAAgB,QAAQ,CAAC,KAAkB;IACzC,MAAM,EAAE,SAAS,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAC3C,OAAO,oBAAC,aAAK,OAAK,UAAU,EAAE,SAAS,EAAE,IAAA,oBAAU,EAAC,gBAAgB,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE,+BAAY,GAAI,CAAC;AAC1G,CAAC;AAHD,4BAGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport \"./NewBadge.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Badge } from \"./Badge\";\r\nimport newBadgeIcon from \"./new-feature-badge.svg\";\r\n\r\n/** New Badge React component\r\n * @internal\r\n */\r\nexport function NewBadge(props: CommonProps) {\r\n const { className, ...badgeProps } = props;\r\n return <Badge {...badgeProps} className={classnames(\"core-new-badge\", className)} svg={newBadgeIcon} />;\r\n}\r\n"]}
1
+ {"version":3,"file":"NewBadge.js","sourceRoot":"","sources":["../../../../src/core-react/badge/NewBadge.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,2BAAyB;AACzB,2CAAoC;AACpC,+BAA+B;AAE/B,mCAAgC;AAChC,mEAAmD;AAEnD;;GAEG;AACH,SAAgB,QAAQ,CAAC,KAAkB;IACzC,MAAM,EAAE,SAAS,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAC3C,OAAO,oBAAC,aAAK,OAAK,UAAU,EAAE,SAAS,EAAE,IAAA,oBAAU,EAAC,gBAAgB,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE,+BAAY,GAAI,CAAC;AAC1G,CAAC;AAHD,4BAGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport \"./NewBadge.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport type { CommonProps } from \"../utils/Props\";\r\nimport { Badge } from \"./Badge\";\r\nimport newBadgeIcon from \"./new-feature-badge.svg\";\r\n\r\n/** New Badge React component\r\n * @internal\r\n */\r\nexport function NewBadge(props: CommonProps) {\r\n const { className, ...badgeProps } = props;\r\n return <Badge {...badgeProps} className={classnames(\"core-new-badge\", className)} svg={newBadgeIcon} />;\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Base
3
3
  */
4
4
  /// <reference types="react" />
5
- import { CommonDivProps } from "../utils/Props";
5
+ import type { CommonDivProps } from "../utils/Props";
6
6
  /** Centered React functional component.
7
7
  * Displays content centered vertically and horizontally.
8
8
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"Centered.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/Centered.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,cAAc,eAE7C"}
1
+ {"version":3,"file":"Centered.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/Centered.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,cAAc,eAE7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Centered.js","sourceRoot":"","sources":["../../../../src/core-react/base/Centered.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAE/B,+BAA4B;AAE5B;;;GAGG;AACH,SAAgB,QAAQ,CAAC,KAAqB;IAC5C,OAAO,oBAAC,SAAG,OAAK,KAAK,EAAE,aAAa,EAAC,iBAAiB,GAAG,CAAC;AAC5D,CAAC;AAFD,4BAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Base\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { CommonDivProps } from \"../utils/Props\";\r\nimport { Div } from \"./Div\";\r\n\r\n/** Centered React functional component.\r\n * Displays content centered vertically and horizontally.\r\n * @public\r\n */\r\nexport function Centered(props: CommonDivProps) {\r\n return <Div {...props} mainClassName=\"uicore-centered\" />;\r\n}\r\n"]}
1
+ {"version":3,"file":"Centered.js","sourceRoot":"","sources":["../../../../src/core-react/base/Centered.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAE/B,+BAA4B;AAE5B;;;GAGG;AACH,SAAgB,QAAQ,CAAC,KAAqB;IAC5C,OAAO,oBAAC,SAAG,OAAK,KAAK,EAAE,aAAa,EAAC,iBAAiB,GAAG,CAAC;AAC5D,CAAC;AAFD,4BAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Base\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport type { CommonDivProps } from \"../utils/Props\";\r\nimport { Div } from \"./Div\";\r\n\r\n/** Centered React functional component.\r\n * Displays content centered vertically and horizontally.\r\n * @public\r\n */\r\nexport function Centered(props: CommonDivProps) {\r\n return <Div {...props} mainClassName=\"uicore-centered\" />;\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Base
3
3
  */
4
4
  /// <reference types="react" />
5
- import { CommonDivProps } from "../utils/Props";
5
+ import type { CommonDivProps } from "../utils/Props";
6
6
  /** Properties for the [[Div]] component
7
7
  * @public
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Div.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/Div.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,cAAc;IAC9C,0BAA0B;IAC1B,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,eAQlC"}
1
+ {"version":3,"file":"Div.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/Div.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,cAAc;IAC9C,0BAA0B;IAC1B,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,eAQlC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Div.js","sourceRoot":"","sources":["../../../../src/core-react/base/Div.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAW/B;;GAEG;AACH,SAAgB,GAAG,CAAC,KAAe;IACjC,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEzE,OAAO,CACL,gCAAS,QAAQ,EAAE,SAAS,EAAE,IAAA,oBAAU,EAAC,aAAa,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,IAC7E,QAAQ,CACL,CACP,CAAC;AACJ,CAAC;AARD,kBAQC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Base\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonDivProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[Div]] component\r\n * @public\r\n */\r\nexport interface DivProps extends CommonDivProps {\r\n /** Main CSS class name */\r\n mainClassName: string;\r\n}\r\n\r\n/** Base div element React component\r\n * @public\r\n */\r\nexport function Div(props: DivProps) {\r\n const { mainClassName, className, style, children, ...divProps } = props;\r\n\r\n return (\r\n <div {...divProps} className={classnames(mainClassName, className)} style={style} >\r\n {children}\r\n </div>\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"Div.js","sourceRoot":"","sources":["../../../../src/core-react/base/Div.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAW/B;;GAEG;AACH,SAAgB,GAAG,CAAC,KAAe;IACjC,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEzE,OAAO,CACL,gCAAS,QAAQ,EAAE,SAAS,EAAE,IAAA,oBAAU,EAAC,aAAa,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,IAC7E,QAAQ,CACL,CACP,CAAC;AACJ,CAAC;AARD,kBAQC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Base\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport type { CommonDivProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[Div]] component\r\n * @public\r\n */\r\nexport interface DivProps extends CommonDivProps {\r\n /** Main CSS class name */\r\n mainClassName: string;\r\n}\r\n\r\n/** Base div element React component\r\n * @public\r\n */\r\nexport function Div(props: DivProps) {\r\n const { mainClassName, className, style, children, ...divProps } = props;\r\n\r\n return (\r\n <div {...divProps} className={classnames(mainClassName, className)} style={style} >\r\n {children}\r\n </div>\r\n );\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Base
3
3
  */
4
4
  import * as React from "react";
5
- import { CommonDivProps } from "../utils/Props";
5
+ import type { CommonDivProps } from "../utils/Props";
6
6
  /** Div element with Outside Click behavior
7
7
  * @public
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"DivWithOutsideClick.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/DivWithOutsideClick.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAsE,CAAC"}
1
+ {"version":3,"file":"DivWithOutsideClick.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/DivWithOutsideClick.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAsE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DivWithOutsideClick.js","sourceRoot":"","sources":["../../../../src/core-react/base/DivWithOutsideClick.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,mEAAgE;AAGhE;;GAEG;AACU,QAAA,mBAAmB,GAAG,IAAA,uCAAkB,EAAC,CAAC,KAAqB,EAAE,EAAE,CAAC,CAAC,gCAAS,KAAK,GAAI,CAAC,CAAC,CAAC,CAAC,2DAA2D","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Base\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { withOnOutsideClick } from \"../hocs/withOnOutsideClick\";\r\nimport { CommonDivProps } from \"../utils/Props\";\r\n\r\n/** Div element with Outside Click behavior\r\n * @public\r\n */\r\nexport const DivWithOutsideClick = withOnOutsideClick((props: CommonDivProps) => (<div {...props} />)); // eslint-disable-line @typescript-eslint/naming-convention\r\n"]}
1
+ {"version":3,"file":"DivWithOutsideClick.js","sourceRoot":"","sources":["../../../../src/core-react/base/DivWithOutsideClick.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,mEAAgE;AAGhE;;GAEG;AACU,QAAA,mBAAmB,GAAG,IAAA,uCAAkB,EAAC,CAAC,KAAqB,EAAE,EAAE,CAAC,CAAC,gCAAS,KAAK,GAAI,CAAC,CAAC,CAAC,CAAC,2DAA2D","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Base\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { withOnOutsideClick } from \"../hocs/withOnOutsideClick\";\r\nimport type { CommonDivProps } from \"../utils/Props\";\r\n\r\n/** Div element with Outside Click behavior\r\n * @public\r\n */\r\nexport const DivWithOutsideClick = withOnOutsideClick((props: CommonDivProps) => (<div {...props} />)); // eslint-disable-line @typescript-eslint/naming-convention\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Base
3
3
  */
4
4
  /// <reference types="react" />
5
- import { CommonDivProps } from "../utils/Props";
5
+ import type { CommonDivProps } from "../utils/Props";
6
6
  /** Full height & width and centered React functional component.
7
7
  * Displays content centered vertically and horizontally and has a height and width of 100%.
8
8
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"FillCentered.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/FillCentered.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,eAEjD"}
1
+ {"version":3,"file":"FillCentered.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/FillCentered.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,eAEjD"}
@@ -1 +1 @@
1
- {"version":3,"file":"FillCentered.js","sourceRoot":"","sources":["../../../../src/core-react/base/FillCentered.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAE/B,+BAA4B;AAE5B;;;GAGG;AACH,SAAgB,YAAY,CAAC,KAAqB;IAChD,OAAO,oBAAC,SAAG,OAAK,KAAK,EAAE,aAAa,EAAC,sBAAsB,GAAG,CAAC;AACjE,CAAC;AAFD,oCAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Base\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { CommonDivProps } from \"../utils/Props\";\r\nimport { Div } from \"./Div\";\r\n\r\n/** Full height & width and centered React functional component.\r\n * Displays content centered vertically and horizontally and has a height and width of 100%.\r\n * @public\r\n */\r\nexport function FillCentered(props: CommonDivProps) {\r\n return <Div {...props} mainClassName=\"uicore-fill-centered\" />;\r\n}\r\n"]}
1
+ {"version":3,"file":"FillCentered.js","sourceRoot":"","sources":["../../../../src/core-react/base/FillCentered.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAE/B,+BAA4B;AAE5B;;;GAGG;AACH,SAAgB,YAAY,CAAC,KAAqB;IAChD,OAAO,oBAAC,SAAG,OAAK,KAAK,EAAE,aAAa,EAAC,sBAAsB,GAAG,CAAC;AACjE,CAAC;AAFD,oCAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Base\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport type { CommonDivProps } from \"../utils/Props\";\r\nimport { Div } from \"./Div\";\r\n\r\n/** Full height & width and centered React functional component.\r\n * Displays content centered vertically and horizontally and has a height and width of 100%.\r\n * @public\r\n */\r\nexport function FillCentered(props: CommonDivProps) {\r\n return <Div {...props} mainClassName=\"uicore-fill-centered\" />;\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Base
3
3
  */
4
4
  /// <reference types="react" />
5
- import { CommonDivProps } from "../utils/Props";
5
+ import type { CommonDivProps } from "../utils/Props";
6
6
  /** Flex Wrap Container React functional component.
7
7
  * Wraps content onto multiple lines and
8
8
  * has the 'display: flex' and 'flex-wrap: wrap' CSS properties.
@@ -1 +1 @@
1
- {"version":3,"file":"FlexWrapContainer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/FlexWrapContainer.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,eAEtD"}
1
+ {"version":3,"file":"FlexWrapContainer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/FlexWrapContainer.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,eAEtD"}
@@ -1 +1 @@
1
- {"version":3,"file":"FlexWrapContainer.js","sourceRoot":"","sources":["../../../../src/core-react/base/FlexWrapContainer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAE/B,+BAA4B;AAE5B;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,KAAqB;IACrD,OAAO,oBAAC,SAAG,OAAK,KAAK,EAAE,aAAa,EAAC,4BAA4B,GAAG,CAAC;AACvE,CAAC;AAFD,8CAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Base\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { CommonDivProps } from \"../utils/Props\";\r\nimport { Div } from \"./Div\";\r\n\r\n/** Flex Wrap Container React functional component.\r\n * Wraps content onto multiple lines and\r\n * has the 'display: flex' and 'flex-wrap: wrap' CSS properties.\r\n * @public\r\n */\r\nexport function FlexWrapContainer(props: CommonDivProps) {\r\n return <Div {...props} mainClassName=\"uicore-flex-wrap-container\" />;\r\n}\r\n"]}
1
+ {"version":3,"file":"FlexWrapContainer.js","sourceRoot":"","sources":["../../../../src/core-react/base/FlexWrapContainer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAE/B,+BAA4B;AAE5B;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,KAAqB;IACrD,OAAO,oBAAC,SAAG,OAAK,KAAK,EAAE,aAAa,EAAC,4BAA4B,GAAG,CAAC;AACvE,CAAC;AAFD,8CAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Base\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport type { CommonDivProps } from \"../utils/Props\";\r\nimport { Div } from \"./Div\";\r\n\r\n/** Flex Wrap Container React functional component.\r\n * Wraps content onto multiple lines and\r\n * has the 'display: flex' and 'flex-wrap: wrap' CSS properties.\r\n * @public\r\n */\r\nexport function FlexWrapContainer(props: CommonDivProps) {\r\n return <Div {...props} mainClassName=\"uicore-flex-wrap-container\" />;\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Base
3
3
  */
4
4
  /// <reference types="react" />
5
- import { CommonProps } from "../utils/Props";
5
+ import type { CommonProps } from "../utils/Props";
6
6
  /** Properties for the [[Gap]] component.
7
7
  * @public
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Gap.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/Gap.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,WAAW;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,eAOlC"}
1
+ {"version":3,"file":"Gap.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/Gap.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,WAAW;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,eAOlC"}
@@ -14,7 +14,7 @@ const React = require("react");
14
14
  */
15
15
  function Gap(props) {
16
16
  const { size, style, ...rest } = props;
17
- const paddingLeft = size ?? "10px";
17
+ const paddingLeft = size !== null && size !== void 0 ? size : "10px";
18
18
  return (React.createElement("span", { style: { ...style, paddingLeft }, ...rest }));
19
19
  }
20
20
  exports.Gap = Gap;
@@ -1 +1 @@
1
- {"version":3,"file":"Gap.js","sourceRoot":"","sources":["../../../../src/core-react/base/Gap.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAU/B;;GAEG;AACH,SAAgB,GAAG,CAAC,KAAe;IACjC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACvC,MAAM,WAAW,GAAG,IAAI,IAAI,MAAM,CAAC;IAEnC,OAAO,CACL,8BAAM,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,WAAW,EAAE,KAAM,IAAI,GAAI,CACrD,CAAC;AACJ,CAAC;AAPD,kBAOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Base\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[Gap]] component.\r\n * @public\r\n */\r\nexport interface GapProps extends CommonProps {\r\n size?: string;\r\n}\r\n\r\n/** Horizontal gap or space React component. Defaults to 10px.\r\n * @public\r\n */\r\nexport function Gap(props: GapProps) {\r\n const { size, style, ...rest } = props;\r\n const paddingLeft = size ?? \"10px\";\r\n\r\n return (\r\n <span style={{ ...style, paddingLeft }} {...rest} />\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"Gap.js","sourceRoot":"","sources":["../../../../src/core-react/base/Gap.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAU/B;;GAEG;AACH,SAAgB,GAAG,CAAC,KAAe;IACjC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACvC,MAAM,WAAW,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,MAAM,CAAC;IAEnC,OAAO,CACL,8BAAM,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,WAAW,EAAE,KAAM,IAAI,GAAI,CACrD,CAAC;AACJ,CAAC;AAPD,kBAOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Base\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport type { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[Gap]] component.\r\n * @public\r\n */\r\nexport interface GapProps extends CommonProps {\r\n size?: string;\r\n}\r\n\r\n/** Horizontal gap or space React component. Defaults to 10px.\r\n * @public\r\n */\r\nexport function Gap(props: GapProps) {\r\n const { size, style, ...rest } = props;\r\n const paddingLeft = size ?? \"10px\";\r\n\r\n return (\r\n <span style={{ ...style, paddingLeft }} {...rest} />\r\n );\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Base
3
3
  */
4
4
  /// <reference types="react" />
5
- import { CommonDivProps } from "../utils/Props";
5
+ import type { CommonDivProps } from "../utils/Props";
6
6
  /** Scroll View React functional component.
7
7
  * Scrolls content vertically and
8
8
  * has the 'overflow-y: auto' CSS property and has a height and width of 100%.
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/ScrollView.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,eAE/C"}
1
+ {"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/ScrollView.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,eAE/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollView.js","sourceRoot":"","sources":["../../../../src/core-react/base/ScrollView.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAE/B,+BAA4B;AAE5B;;;;GAIG;AACH,SAAgB,UAAU,CAAC,KAAqB;IAC9C,OAAO,oBAAC,SAAG,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AAC9D,CAAC;AAFD,gCAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Base\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { CommonDivProps } from \"../utils/Props\";\r\nimport { Div } from \"./Div\";\r\n\r\n/** Scroll View React functional component.\r\n * Scrolls content vertically and\r\n * has the 'overflow-y: auto' CSS property and has a height and width of 100%.\r\n * @public\r\n */\r\nexport function ScrollView(props: CommonDivProps) {\r\n return <Div {...props} mainClassName=\"uicore-scrollview\" />;\r\n}\r\n"]}
1
+ {"version":3,"file":"ScrollView.js","sourceRoot":"","sources":["../../../../src/core-react/base/ScrollView.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAE/B,+BAA4B;AAE5B;;;;GAIG;AACH,SAAgB,UAAU,CAAC,KAAqB;IAC9C,OAAO,oBAAC,SAAG,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AAC9D,CAAC;AAFD,gCAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Base\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport type { CommonDivProps } from \"../utils/Props\";\r\nimport { Div } from \"./Div\";\r\n\r\n/** Scroll View React functional component.\r\n * Scrolls content vertically and\r\n * has the 'overflow-y: auto' CSS property and has a height and width of 100%.\r\n * @public\r\n */\r\nexport function ScrollView(props: CommonDivProps) {\r\n return <Div {...props} mainClassName=\"uicore-scrollview\" />;\r\n}\r\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import "./CheckListBox.scss";
5
5
  import * as React from "react";
6
- import { CommonProps } from "../utils/Props";
6
+ import type { CommonProps } from "../utils/Props";
7
7
  /** Properties for the [[CheckListBoxItem]] component
8
8
  * @public
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"CheckListBox.d.ts","sourceRoot":"","sources":["../../../../src/core-react/checklistbox/CheckListBox.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAE7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,YAAY;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC;IACpB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC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AAQ,CACjB,CACN,CAAC;IACJ,CAAC;CACF;AAZD,oCAYC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module CheckListBox\r\n */\r\n\r\nimport \"./CheckListBox.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Checkbox } from \"@itwin/itwinui-react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[CheckListBoxItem]] component\r\n * @public\r\n */\r\nexport interface CheckListBoxItemProps extends CommonProps {\r\n /** Label */\r\n label: string;\r\n /** Indicates whether the item is checked or not */\r\n checked?: boolean;\r\n /** Indicates whether the item is disabled or not */\r\n disabled?: boolean;\r\n /** Function called when item is clicked. */\r\n onClick?: () => any;\r\n /** Function called when item is changed. */\r\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => any;\r\n}\r\n\r\n/** Item with a checkbox added to a [[CheckListBox]].\r\n * @public\r\n */\r\nexport class CheckListBoxItem extends React.PureComponent<CheckListBoxItemProps> {\r\n public override render() {\r\n const className = classnames(\"core-chk-listboxitem-checkbox\", this.props.className);\r\n return (\r\n <li>\r\n <Checkbox checked={this.props.checked} disabled={this.props.disabled}\r\n className={className} style={this.props.style}\r\n label={this.props.label} onClick={this.props.onClick} onChange={this.props.onChange}\r\n data-testid=\"core-chk-listboxitem-checkbox\" />\r\n </li>\r\n );\r\n }\r\n}\r\n\r\n/** Separator added to a [[CheckListBox]].\r\n * @public\r\n */\r\nexport function CheckListBoxSeparator() {\r\n return (\r\n <div className=\"core-chk-listbox-separator\" />\r\n );\r\n}\r\n\r\n/** React component showing a list of Checkbox items.\r\n * @public\r\n */\r\nexport class CheckListBox extends React.PureComponent<CommonProps & {\r\n /** Content */\r\n children?: React.ReactNode;\r\n}> {\r\n public override render() {\r\n const className = classnames(\"core-chk-listbox\", this.props.className);\r\n return (\r\n <ul className={className} style={this.props.style}>\r\n {this.props.children}\r\n </ul>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"CheckListBox.js","sourceRoot":"","sources":["../../../../src/core-react/checklistbox/CheckListBox.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA6B;AAC7B,2CAAoC;AACpC,+BAA+B;AAC/B,wDAAgD;AAmBhD;;GAEG;AACH,MAAa,gBAAiB,SAAQ,KAAK,CAAC,aAAoC;IAC9D,MAAM;QACpB,MAAM,SAAS,GAAG,IAAA,oBAAU,EAAC,+BAA+B,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACpF,OAAO,CACL;YACE,oBAAC,wBAAQ,IAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAClE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAC7C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,iBACvE,+BAA+B,GAAG,CAC7C,CACN,CAAC;IACJ,CAAC;CACF;AAZD,4CAYC;AAED;;GAEG;AACH,SAAgB,qBAAqB;IACnC,OAAO,CACL,6BAAK,SAAS,EAAC,4BAA4B,GAAG,CAC/C,CAAC;AACJ,CAAC;AAJD,sDAIC;AAED;;GAEG;AACH,MAAa,YAAa,SAAQ,KAAK,CAAC,aAGtC;IACgB,MAAM;QACpB,MAAM,SAAS,GAAG,IAAA,oBAAU,EAAC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACvE,OAAO,CACL,4BAAI,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IAC9C,IAAI,CAAC,KAAK,CAAC,QAAQ,CACjB,CACN,CAAC;IACJ,CAAC;CACF;AAZD,oCAYC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module CheckListBox\r\n */\r\n\r\nimport \"./CheckListBox.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Checkbox } from \"@itwin/itwinui-react\";\r\nimport type { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[CheckListBoxItem]] component\r\n * @public\r\n */\r\nexport interface CheckListBoxItemProps extends CommonProps {\r\n /** Label */\r\n label: string;\r\n /** Indicates whether the item is checked or not */\r\n checked?: boolean;\r\n /** Indicates whether the item is disabled or not */\r\n disabled?: boolean;\r\n /** Function called when item is clicked. */\r\n onClick?: () => any;\r\n /** Function called when item is changed. */\r\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => any;\r\n}\r\n\r\n/** Item with a checkbox added to a [[CheckListBox]].\r\n * @public\r\n */\r\nexport class CheckListBoxItem extends React.PureComponent<CheckListBoxItemProps> {\r\n public override render() {\r\n const className = classnames(\"core-chk-listboxitem-checkbox\", this.props.className);\r\n return (\r\n <li>\r\n <Checkbox checked={this.props.checked} disabled={this.props.disabled}\r\n className={className} style={this.props.style}\r\n label={this.props.label} onClick={this.props.onClick} onChange={this.props.onChange}\r\n data-testid=\"core-chk-listboxitem-checkbox\" />\r\n </li>\r\n );\r\n }\r\n}\r\n\r\n/** Separator added to a [[CheckListBox]].\r\n * @public\r\n */\r\nexport function CheckListBoxSeparator() {\r\n return (\r\n <div className=\"core-chk-listbox-separator\" />\r\n );\r\n}\r\n\r\n/** React component showing a list of Checkbox items.\r\n * @public\r\n */\r\nexport class CheckListBox extends React.PureComponent<CommonProps & {\r\n /** Content */\r\n children?: React.ReactNode;\r\n}> {\r\n public override render() {\r\n const className = classnames(\"core-chk-listbox\", this.props.className);\r\n return (\r\n <ul className={className} style={this.props.style}>\r\n {this.props.children}\r\n </ul>\r\n );\r\n }\r\n}\r\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import "./ContextMenu.scss";
5
5
  import * as React from "react";
6
- import { CommonProps } from "../utils/Props";
6
+ import type { CommonProps } from "../utils/Props";
7
7
  import { ContextMenuDirection } from "./ContextMenuDirection";
8
8
  import { ContextSubMenu } from "./ContextSubMenu";
9
9
  /** Properties for the [[ContextMenu]] component
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenu.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AAEvE;;IAEI;AACJ,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,+CAA+C;IAC/C,MAAM,EAAE,OAAO,CAAC;IAChB,gFAAgF;IAChF,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,uDAAuD;IACvD,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAC;IAC5C,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;IAC/B,oCAAoC;IACpC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,SAAS,CAAC,EAAE,O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OnD;IAEF,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;gBAC/C,KAAK,EAAE,gBAAgB;IASnC,gBAAgB;IAChB,OAAc,QAAQ,QAAS,oBAAoB,QAAQ,eAAe,eAAe,MAAM,gBAAgB,MAAM,KAAG,oBAAoB,CAsD1I;IAEF,OAAO,CAAC,mBAAmB,CAEzB;IAGF,OAAO,CAAC,qBAAqB,CAG3B;IAEc,MAAM,IAAI,GAAG,CAAC,OAAO;IA2CrC,gBAAgB;IAChB,OAAc,4BAA4B,eAAgB,oBAAoB,KAAG,MAAM,CAyCrF;IAEF,OAAO,CAAC,oBAAoB,CAiC1B;IAEF,OAAO,CAAC,QAAQ,CAEd;IAEF,OAAO,CAAC,QAAQ,CAEd;IAEF,OAAO,CAAC,SAAS;IAOjB,gBAAgB;IACA,iBAAiB;IAWjC,gBAAgB;IACA,oBAAoB;IAMpC,OAAO,CAAC,oBAAoB;IAqBrB,KAAK,aAIV;IAEK,IAAI,aAIT;IAEK,OAAO,QAAO,OAAO,CAQ1B;IAEF,OAAO,CAAC,kBAAkB,CAIxB;IAEF,OAAO,CAAC,YAAY,CAGlB;IAEF,OAAO,CAAC,YAAY,CA6ElB;IAEc,kBAAkB,CAAC,SAAS,EAAE,gBAAgB;CAa/D"}
@@ -206,10 +206,11 @@ class ContextMenu extends React.PureComponent {
206
206
  React.createElement("div", { ref: this._menuRef, role: "menu", tabIndex: 0, "data-testid": "core-context-menu-container", className: (0, classnames_1.default)("core-context-menu-container", opened && "core-context-menu-opened", floating && "core-context-menu-floating", ContextMenu.getCSSClassNameFromDirection(renderDirection)) }, this._injectedChildren))));
207
207
  }
208
208
  getWindow() {
209
+ var _a;
209
210
  const el = this._rootElement ? this._rootElement : /* istanbul ignore next */ this._menuElement;
210
211
  const parentDocument = el.ownerDocument;
211
212
  // istanbul ignore next
212
- return parentDocument.defaultView ?? window;
213
+ return (_a = parentDocument.defaultView) !== null && _a !== void 0 ? _a : window;
213
214
  }
214
215
  /** @internal */
215
216
  componentDidMount() {