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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (758) hide show
  1. package/CHANGELOG.md +1609 -1602
  2. package/ContributeGuidelines.md +99 -99
  3. package/LICENSE.md +9 -9
  4. package/README.md +11 -11
  5. package/lib/cjs/core-react/UiCore.d.ts.map +1 -1
  6. package/lib/cjs/core-react/UiCore.js +9 -5
  7. package/lib/cjs/core-react/UiCore.js.map +1 -1
  8. package/lib/cjs/core-react/_helpers.scss +9 -8
  9. package/lib/cjs/core-react/_scrollbar.scss +8 -4
  10. package/lib/cjs/core-react/_z-index.scss +15 -33
  11. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  12. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  13. package/lib/cjs/core-react/autosuggest/AutoSuggest.js +14 -15
  14. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  15. package/lib/cjs/core-react/badge/Badge.d.ts +1 -1
  16. package/lib/cjs/core-react/badge/Badge.d.ts.map +1 -1
  17. package/lib/cjs/core-react/badge/Badge.js +3 -3
  18. package/lib/cjs/core-react/badge/Badge.js.map +1 -1
  19. package/lib/cjs/core-react/badge/BadgeUtilities.d.ts.map +1 -1
  20. package/lib/cjs/core-react/badge/BadgeUtilities.js +3 -3
  21. package/lib/cjs/core-react/badge/BadgeUtilities.js.map +1 -1
  22. package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
  23. package/lib/cjs/core-react/badge/BetaBadge.js +3 -3
  24. package/lib/cjs/core-react/badge/BetaBadge.js.map +1 -1
  25. package/lib/cjs/core-react/badge/NewBadge.d.ts.map +1 -1
  26. package/lib/cjs/core-react/badge/NewBadge.js +4 -4
  27. package/lib/cjs/core-react/badge/NewBadge.js.map +1 -1
  28. package/lib/cjs/core-react/base/Centered.js +3 -3
  29. package/lib/cjs/core-react/base/Centered.js.map +1 -1
  30. package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
  31. package/lib/cjs/core-react/base/Div.js +3 -3
  32. package/lib/cjs/core-react/base/Div.js.map +1 -1
  33. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  34. package/lib/cjs/core-react/base/DivWithOutsideClick.js +4 -4
  35. package/lib/cjs/core-react/base/DivWithOutsideClick.js.map +1 -1
  36. package/lib/cjs/core-react/base/FillCentered.js +3 -3
  37. package/lib/cjs/core-react/base/FillCentered.js.map +1 -1
  38. package/lib/cjs/core-react/base/FlexWrapContainer.js +3 -3
  39. package/lib/cjs/core-react/base/FlexWrapContainer.js.map +1 -1
  40. package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
  41. package/lib/cjs/core-react/base/Gap.js +4 -4
  42. package/lib/cjs/core-react/base/Gap.js.map +1 -1
  43. package/lib/cjs/core-react/base/PointerEvents.js +3 -3
  44. package/lib/cjs/core-react/base/PointerEvents.js.map +1 -1
  45. package/lib/cjs/core-react/base/ScrollView.js +3 -3
  46. package/lib/cjs/core-react/base/ScrollView.js.map +1 -1
  47. package/lib/cjs/core-react/base/classes.scss +24 -10
  48. package/lib/cjs/core-react/button/UnderlinedButton.d.ts.map +1 -1
  49. package/lib/cjs/core-react/button/UnderlinedButton.js +3 -3
  50. package/lib/cjs/core-react/button/UnderlinedButton.js.map +1 -1
  51. package/lib/cjs/core-react/button/UnderlinedButton.scss +4 -5
  52. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  53. package/lib/cjs/core-react/checklistbox/CheckListBox.js +4 -4
  54. package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
  55. package/lib/cjs/core-react/checklistbox/CheckListBox.scss +4 -4
  56. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +7 -7
  57. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  58. package/lib/cjs/core-react/contextmenu/ContextMenu.js +42 -23
  59. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  60. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.d.ts.map +1 -1
  61. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js +3 -3
  62. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
  63. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  64. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  65. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js +3 -3
  66. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  67. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
  68. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  69. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js +16 -12
  70. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  71. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
  72. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  73. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +37 -15
  74. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  75. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  76. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js +11 -7
  77. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  78. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  79. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js +3 -3
  80. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  81. package/lib/cjs/core-react/contextmenu/TildeFinder.d.ts.map +1 -1
  82. package/lib/cjs/core-react/contextmenu/TildeFinder.js +15 -7
  83. package/lib/cjs/core-react/contextmenu/TildeFinder.js.map +1 -1
  84. package/lib/cjs/core-react/dialog/Dialog.d.ts +6 -5
  85. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  86. package/lib/cjs/core-react/dialog/Dialog.js +94 -86
  87. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  88. package/lib/cjs/core-react/dialog/GlobalDialog.d.ts.map +1 -1
  89. package/lib/cjs/core-react/dialog/GlobalDialog.js +10 -6
  90. package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
  91. package/lib/cjs/core-react/dialog/SimpleDialog.d.ts +68 -0
  92. package/lib/cjs/core-react/dialog/SimpleDialog.d.ts.map +1 -0
  93. package/lib/cjs/core-react/dialog/SimpleDialog.js +51 -0
  94. package/lib/cjs/core-react/dialog/SimpleDialog.js.map +1 -0
  95. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  96. package/lib/cjs/core-react/elementseparator/ElementSeparator.js +14 -8
  97. package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
  98. package/lib/cjs/core-react/elementseparator/ElementSeparator.scss +19 -10
  99. package/lib/cjs/core-react/enums/Alignment.js +3 -3
  100. package/lib/cjs/core-react/enums/Alignment.js.map +1 -1
  101. package/lib/cjs/core-react/enums/CheckBoxState.js +3 -3
  102. package/lib/cjs/core-react/enums/CheckBoxState.js.map +1 -1
  103. package/lib/cjs/core-react/enums/Orientation.js +3 -3
  104. package/lib/cjs/core-react/enums/Orientation.js.map +1 -1
  105. package/lib/cjs/core-react/enums/SortDirection.js +3 -3
  106. package/lib/cjs/core-react/enums/SortDirection.js.map +1 -1
  107. package/lib/cjs/core-react/enums/TimeFormat.js +3 -3
  108. package/lib/cjs/core-react/enums/TimeFormat.js.map +1 -1
  109. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +1 -1
  110. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  111. package/lib/cjs/core-react/expandable/ExpandableList.js +8 -5
  112. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  113. package/lib/cjs/core-react/expandable/ExpandableList.scss +4 -4
  114. package/lib/cjs/core-react/expandable/classes.scss +6 -4
  115. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.d.ts.map +1 -1
  116. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.js +38 -15
  117. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
  118. package/lib/cjs/core-react/focustrap/FocusTrap.d.ts.map +1 -1
  119. package/lib/cjs/core-react/focustrap/FocusTrap.js +33 -16
  120. package/lib/cjs/core-react/focustrap/FocusTrap.js.map +1 -1
  121. package/lib/cjs/core-react/hocs/withIsPressed.d.ts.map +1 -1
  122. package/lib/cjs/core-react/hocs/withIsPressed.js +4 -7
  123. package/lib/cjs/core-react/hocs/withIsPressed.js.map +1 -1
  124. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  125. package/lib/cjs/core-react/hocs/withOnOutsideClick.js +16 -11
  126. package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
  127. package/lib/cjs/core-react/hocs/withTimeout.d.ts.map +1 -1
  128. package/lib/cjs/core-react/hocs/withTimeout.js +6 -8
  129. package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
  130. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts +5 -1
  131. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
  132. package/lib/cjs/core-react/icons/ConditionalIconItem.js +26 -9
  133. package/lib/cjs/core-react/icons/ConditionalIconItem.js.map +1 -1
  134. package/lib/cjs/core-react/icons/IconComponent.d.ts +1 -1
  135. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  136. package/lib/cjs/core-react/icons/IconComponent.js +20 -10
  137. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  138. package/lib/cjs/core-react/icons/IconComponent.scss +5 -6
  139. package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
  140. package/lib/cjs/core-react/icons/SvgPath.js +4 -4
  141. package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
  142. package/lib/cjs/core-react/icons/WebFontIcon.js +3 -3
  143. package/lib/cjs/core-react/icons/WebFontIcon.js.map +1 -1
  144. package/lib/cjs/core-react/icons/classes.scss +15 -7
  145. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  146. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +6 -4
  147. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  148. package/lib/cjs/core-react/inputs/Input.d.ts +1 -1
  149. package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
  150. package/lib/cjs/core-react/inputs/Input.js +6 -7
  151. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  152. package/lib/cjs/core-react/inputs/InputLabel.d.ts +1 -1
  153. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  154. package/lib/cjs/core-react/inputs/InputLabel.js +10 -13
  155. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  156. package/lib/cjs/core-react/inputs/InputStatus.js +3 -3
  157. package/lib/cjs/core-react/inputs/InputStatus.js.map +1 -1
  158. package/lib/cjs/core-react/inputs/LabeledComponentProps.js +3 -3
  159. package/lib/cjs/core-react/inputs/LabeledComponentProps.js.map +1 -1
  160. package/lib/cjs/core-react/inputs/classes.scss +9 -5
  161. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  162. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  163. package/lib/cjs/core-react/inputs/iconinput/IconInput.js +3 -4
  164. package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
  165. package/lib/cjs/core-react/inputs/iconinput/IconInput.scss +11 -12
  166. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +2 -2
  167. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  168. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +25 -16
  169. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  170. package/lib/cjs/core-react/layout-variables.scss +5 -7
  171. package/lib/cjs/core-react/listbox/Listbox.d.ts +2 -2
  172. package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
  173. package/lib/cjs/core-react/listbox/Listbox.js +19 -12
  174. package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
  175. package/lib/cjs/core-react/loading/LoadingBar.d.ts.map +1 -1
  176. package/lib/cjs/core-react/loading/LoadingBar.js +4 -4
  177. package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
  178. package/lib/cjs/core-react/loading/LoadingBar.scss +6 -6
  179. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts.map +1 -1
  180. package/lib/cjs/core-react/loading/LoadingPrompt.js +9 -9
  181. package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
  182. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +3 -3
  183. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  184. package/lib/cjs/core-react/loading/LoadingSpinner.js +5 -5
  185. package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
  186. package/lib/cjs/core-react/loading/LoadingStatus.d.ts.map +1 -1
  187. package/lib/cjs/core-react/loading/LoadingStatus.js +3 -3
  188. package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
  189. package/lib/cjs/core-react/loading/LoadingStatus.scss +4 -4
  190. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +3 -3
  191. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  192. package/lib/cjs/core-react/messagebox/MessageBox.js +5 -5
  193. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  194. package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
  195. package/lib/cjs/core-react/notification/MessageRenderer.js +18 -12
  196. package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
  197. package/lib/cjs/core-react/notification/MessageType.d.ts.map +1 -1
  198. package/lib/cjs/core-react/notification/MessageType.js +3 -3
  199. package/lib/cjs/core-react/notification/MessageType.js.map +1 -1
  200. package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
  201. package/lib/cjs/core-react/popup/Popup.js +46 -23
  202. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  203. package/lib/cjs/core-react/radialmenu/Annulus.d.ts.map +1 -1
  204. package/lib/cjs/core-react/radialmenu/Annulus.js +4 -4
  205. package/lib/cjs/core-react/radialmenu/Annulus.js.map +1 -1
  206. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +2 -2
  207. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  208. package/lib/cjs/core-react/radialmenu/RadialMenu.js +26 -11
  209. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  210. package/lib/cjs/core-react/searchbox/SearchBox.d.ts.map +1 -1
  211. package/lib/cjs/core-react/searchbox/SearchBox.js +17 -7
  212. package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
  213. package/lib/cjs/core-react/settings/SettingsContainer.d.ts +1 -1
  214. package/lib/cjs/core-react/settings/SettingsContainer.d.ts.map +1 -1
  215. package/lib/cjs/core-react/settings/SettingsContainer.js +54 -19
  216. package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
  217. package/lib/cjs/core-react/settings/SettingsManager.d.ts +3 -3
  218. package/lib/cjs/core-react/settings/SettingsManager.d.ts.map +1 -1
  219. package/lib/cjs/core-react/settings/SettingsManager.js +7 -8
  220. package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
  221. package/lib/cjs/core-react/style/breakpoints.scss +30 -12
  222. package/lib/cjs/core-react/style/colors.scss +52 -52
  223. package/lib/cjs/core-react/style/mixins.scss +7 -11
  224. package/lib/cjs/core-react/style/themecolors.scss +116 -106
  225. package/lib/cjs/core-react/tabs/Tabs.d.ts +4 -4
  226. package/lib/cjs/core-react/tabs/Tabs.d.ts.map +1 -1
  227. package/lib/cjs/core-react/tabs/Tabs.js +13 -11
  228. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  229. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  230. package/lib/cjs/core-react/tabs/VerticalTabs.js +3 -3
  231. package/lib/cjs/core-react/tabs/VerticalTabs.js.map +1 -1
  232. package/lib/cjs/core-react/tabs/classes.scss +6 -4
  233. package/lib/cjs/core-react/text/BlockText.js +4 -4
  234. package/lib/cjs/core-react/text/BlockText.js.map +1 -1
  235. package/lib/cjs/core-react/text/BodyText.js +4 -4
  236. package/lib/cjs/core-react/text/BodyText.js.map +1 -1
  237. package/lib/cjs/core-react/text/DisabledText.js +4 -4
  238. package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
  239. package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
  240. package/lib/cjs/core-react/text/FilteredText.js +5 -5
  241. package/lib/cjs/core-react/text/FilteredText.js.map +1 -1
  242. package/lib/cjs/core-react/text/MutedText.js +4 -4
  243. package/lib/cjs/core-react/text/MutedText.js.map +1 -1
  244. package/lib/cjs/core-react/text/StyledText.js +3 -3
  245. package/lib/cjs/core-react/text/StyledText.js.map +1 -1
  246. package/lib/cjs/core-react/text/TextProps.d.ts.map +1 -1
  247. package/lib/cjs/core-react/text/TextProps.js +3 -3
  248. package/lib/cjs/core-react/text/TextProps.js.map +1 -1
  249. package/lib/cjs/core-react/text/classes.scss +15 -7
  250. package/lib/cjs/core-react/text/disabled.scss +4 -5
  251. package/lib/cjs/core-react/text/muted.scss +4 -5
  252. package/lib/cjs/core-react/tree/Branch.d.ts.map +1 -1
  253. package/lib/cjs/core-react/tree/Branch.js +3 -3
  254. package/lib/cjs/core-react/tree/Branch.js.map +1 -1
  255. package/lib/cjs/core-react/tree/Branch.scss +4 -4
  256. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  257. package/lib/cjs/core-react/tree/ExpansionToggle.js +3 -3
  258. package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
  259. package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
  260. package/lib/cjs/core-react/tree/Node.js +11 -8
  261. package/lib/cjs/core-react/tree/Node.js.map +1 -1
  262. package/lib/cjs/core-react/tree/Node.scss +9 -9
  263. package/lib/cjs/core-react/tree/Placeholder.js +5 -5
  264. package/lib/cjs/core-react/tree/Placeholder.js.map +1 -1
  265. package/lib/cjs/core-react/tree/Tree.d.ts.map +1 -1
  266. package/lib/cjs/core-react/tree/Tree.js +20 -11
  267. package/lib/cjs/core-react/tree/Tree.js.map +1 -1
  268. package/lib/cjs/core-react/uistate/LocalStateStorage.d.ts.map +1 -1
  269. package/lib/cjs/core-react/uistate/LocalStateStorage.js +7 -4
  270. package/lib/cjs/core-react/uistate/LocalStateStorage.js.map +1 -1
  271. package/lib/cjs/core-react/uistate/UiStateEntry.d.ts.map +1 -1
  272. package/lib/cjs/core-react/uistate/UiStateEntry.js +3 -3
  273. package/lib/cjs/core-react/uistate/UiStateEntry.js.map +1 -1
  274. package/lib/cjs/core-react/uistate/UiStateStorage.d.ts.map +1 -1
  275. package/lib/cjs/core-react/uistate/UiStateStorage.js +3 -3
  276. package/lib/cjs/core-react/uistate/UiStateStorage.js.map +1 -1
  277. package/lib/cjs/core-react/utils/IconHelper.d.ts +3 -1
  278. package/lib/cjs/core-react/utils/IconHelper.d.ts.map +1 -1
  279. package/lib/cjs/core-react/utils/IconHelper.js +35 -6
  280. package/lib/cjs/core-react/utils/IconHelper.js.map +1 -1
  281. package/lib/cjs/core-react/utils/IconWebComponent.d.ts.map +1 -1
  282. package/lib/cjs/core-react/utils/IconWebComponent.js +71 -41
  283. package/lib/cjs/core-react/utils/IconWebComponent.js.map +1 -1
  284. package/lib/cjs/core-react/utils/Point.d.ts.map +1 -1
  285. package/lib/cjs/core-react/utils/Point.js +3 -3
  286. package/lib/cjs/core-react/utils/Point.js.map +1 -1
  287. package/lib/cjs/core-react/utils/Props.d.ts.map +1 -1
  288. package/lib/cjs/core-react/utils/Props.js +3 -3
  289. package/lib/cjs/core-react/utils/Props.js.map +1 -1
  290. package/lib/cjs/core-react/utils/Rectangle.d.ts.map +1 -1
  291. package/lib/cjs/core-react/utils/Rectangle.js +15 -7
  292. package/lib/cjs/core-react/utils/Rectangle.js.map +1 -1
  293. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  294. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js +4 -2
  295. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  296. package/lib/cjs/core-react/utils/Size.d.ts.map +1 -1
  297. package/lib/cjs/core-react/utils/Size.js +4 -5
  298. package/lib/cjs/core-react/utils/Size.js.map +1 -1
  299. package/lib/cjs/core-react/utils/Timer.d.ts.map +1 -1
  300. package/lib/cjs/core-react/utils/Timer.js +3 -3
  301. package/lib/cjs/core-react/utils/Timer.js.map +1 -1
  302. package/lib/cjs/core-react/utils/UiGeometry.d.ts.map +1 -1
  303. package/lib/cjs/core-react/utils/UiGeometry.js +9 -5
  304. package/lib/cjs/core-react/utils/UiGeometry.js.map +1 -1
  305. package/lib/cjs/core-react/utils/flattenChildren.js +3 -3
  306. package/lib/cjs/core-react/utils/flattenChildren.js.map +1 -1
  307. package/lib/cjs/core-react/utils/getBestBWContrastColor.js +5 -5
  308. package/lib/cjs/core-react/utils/getBestBWContrastColor.js.map +1 -1
  309. package/lib/cjs/core-react/utils/getCssVariable.d.ts.map +1 -1
  310. package/lib/cjs/core-react/utils/getCssVariable.js +3 -3
  311. package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
  312. package/lib/cjs/core-react/utils/getDisplayName.d.ts.map +1 -1
  313. package/lib/cjs/core-react/utils/getDisplayName.js +3 -3
  314. package/lib/cjs/core-react/utils/getDisplayName.js.map +1 -1
  315. package/lib/cjs/core-react/utils/getUserColor.d.ts.map +1 -1
  316. package/lib/cjs/core-react/utils/getUserColor.js +5 -4
  317. package/lib/cjs/core-react/utils/getUserColor.js.map +1 -1
  318. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
  319. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js +4 -4
  320. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
  321. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
  322. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +21 -9
  323. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  324. package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  325. package/lib/cjs/core-react/utils/hooks/useDisposable.js +3 -3
  326. package/lib/cjs/core-react/utils/hooks/useDisposable.js.map +1 -1
  327. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
  328. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js +3 -3
  329. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  330. package/lib/cjs/core-react/utils/hooks/useEventListener.d.ts.map +1 -1
  331. package/lib/cjs/core-react/utils/hooks/useEventListener.js +3 -3
  332. package/lib/cjs/core-react/utils/hooks/useEventListener.js.map +1 -1
  333. package/lib/cjs/core-react/utils/hooks/useInterval.d.ts.map +1 -1
  334. package/lib/cjs/core-react/utils/hooks/useInterval.js +6 -4
  335. package/lib/cjs/core-react/utils/hooks/useInterval.js.map +1 -1
  336. package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.d.ts.map +1 -1
  337. package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.js +7 -4
  338. package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.js.map +1 -1
  339. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
  340. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js +15 -6
  341. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  342. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js +3 -3
  343. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
  344. package/lib/cjs/core-react/utils/hooks/useRefEffect.d.ts +1 -1
  345. package/lib/cjs/core-react/utils/hooks/useRefEffect.d.ts.map +1 -1
  346. package/lib/cjs/core-react/utils/hooks/useRefEffect.js +3 -3
  347. package/lib/cjs/core-react/utils/hooks/useRefEffect.js.map +1 -1
  348. package/lib/cjs/core-react/utils/hooks/useRefState.js +3 -3
  349. package/lib/cjs/core-react/utils/hooks/useRefState.js.map +1 -1
  350. package/lib/cjs/core-react/utils/hooks/useRefs.d.ts.map +1 -1
  351. package/lib/cjs/core-react/utils/hooks/useRefs.js +8 -6
  352. package/lib/cjs/core-react/utils/hooks/useRefs.js.map +1 -1
  353. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +8 -8
  354. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  355. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +37 -20
  356. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  357. package/lib/cjs/core-react/utils/hooks/useTargeted.d.ts.map +1 -1
  358. package/lib/cjs/core-react/utils/hooks/useTargeted.js +7 -4
  359. package/lib/cjs/core-react/utils/hooks/useTargeted.js.map +1 -1
  360. package/lib/cjs/core-react/utils/hooks/useThrottledFn.js +3 -3
  361. package/lib/cjs/core-react/utils/hooks/useThrottledFn.js.map +1 -1
  362. package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.d.ts.map +1 -1
  363. package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.js +3 -4
  364. package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.js.map +1 -1
  365. package/lib/cjs/core-react/utils/isPromiseLike.d.ts.map +1 -1
  366. package/lib/cjs/core-react/utils/isPromiseLike.js +6 -4
  367. package/lib/cjs/core-react/utils/isPromiseLike.js.map +1 -1
  368. package/lib/cjs/core-react/utils/reuseOrCreatePromise.d.ts +14 -0
  369. package/lib/cjs/core-react/utils/reuseOrCreatePromise.d.ts.map +1 -0
  370. package/lib/cjs/core-react/utils/reuseOrCreatePromise.js +33 -0
  371. package/lib/cjs/core-react/utils/reuseOrCreatePromise.js.map +1 -0
  372. package/lib/cjs/core-react/utils/shallowDiffers.d.ts.map +1 -1
  373. package/lib/cjs/core-react/utils/shallowDiffers.js +3 -3
  374. package/lib/cjs/core-react/utils/shallowDiffers.js.map +1 -1
  375. package/lib/cjs/core-react/utils/typeUtils.js +3 -3
  376. package/lib/cjs/core-react/utils/typeUtils.js.map +1 -1
  377. package/lib/cjs/core-react.d.ts +3 -3
  378. package/lib/cjs/core-react.d.ts.map +1 -1
  379. package/lib/cjs/core-react.js +3 -3
  380. package/lib/cjs/core-react.js.map +1 -1
  381. package/lib/esm/core-react/UiCore.d.ts.map +1 -1
  382. package/lib/esm/core-react/UiCore.js +9 -5
  383. package/lib/esm/core-react/UiCore.js.map +1 -1
  384. package/lib/esm/core-react/_helpers.scss +9 -8
  385. package/lib/esm/core-react/_scrollbar.scss +8 -4
  386. package/lib/esm/core-react/_z-index.scss +15 -33
  387. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  388. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  389. package/lib/esm/core-react/autosuggest/AutoSuggest.js +14 -15
  390. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  391. package/lib/esm/core-react/badge/Badge.d.ts +1 -1
  392. package/lib/esm/core-react/badge/Badge.d.ts.map +1 -1
  393. package/lib/esm/core-react/badge/Badge.js +3 -3
  394. package/lib/esm/core-react/badge/Badge.js.map +1 -1
  395. package/lib/esm/core-react/badge/BadgeUtilities.d.ts.map +1 -1
  396. package/lib/esm/core-react/badge/BadgeUtilities.js +3 -3
  397. package/lib/esm/core-react/badge/BadgeUtilities.js.map +1 -1
  398. package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
  399. package/lib/esm/core-react/badge/BetaBadge.js +3 -3
  400. package/lib/esm/core-react/badge/BetaBadge.js.map +1 -1
  401. package/lib/esm/core-react/badge/NewBadge.d.ts.map +1 -1
  402. package/lib/esm/core-react/badge/NewBadge.js +4 -4
  403. package/lib/esm/core-react/badge/NewBadge.js.map +1 -1
  404. package/lib/esm/core-react/base/Centered.js +3 -3
  405. package/lib/esm/core-react/base/Centered.js.map +1 -1
  406. package/lib/esm/core-react/base/Div.d.ts.map +1 -1
  407. package/lib/esm/core-react/base/Div.js +3 -3
  408. package/lib/esm/core-react/base/Div.js.map +1 -1
  409. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  410. package/lib/esm/core-react/base/DivWithOutsideClick.js +4 -4
  411. package/lib/esm/core-react/base/DivWithOutsideClick.js.map +1 -1
  412. package/lib/esm/core-react/base/FillCentered.js +3 -3
  413. package/lib/esm/core-react/base/FillCentered.js.map +1 -1
  414. package/lib/esm/core-react/base/FlexWrapContainer.js +3 -3
  415. package/lib/esm/core-react/base/FlexWrapContainer.js.map +1 -1
  416. package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
  417. package/lib/esm/core-react/base/Gap.js +4 -4
  418. package/lib/esm/core-react/base/Gap.js.map +1 -1
  419. package/lib/esm/core-react/base/PointerEvents.js +3 -3
  420. package/lib/esm/core-react/base/PointerEvents.js.map +1 -1
  421. package/lib/esm/core-react/base/ScrollView.js +3 -3
  422. package/lib/esm/core-react/base/ScrollView.js.map +1 -1
  423. package/lib/esm/core-react/base/classes.scss +24 -10
  424. package/lib/esm/core-react/button/UnderlinedButton.d.ts.map +1 -1
  425. package/lib/esm/core-react/button/UnderlinedButton.js +3 -3
  426. package/lib/esm/core-react/button/UnderlinedButton.js.map +1 -1
  427. package/lib/esm/core-react/button/UnderlinedButton.scss +4 -5
  428. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  429. package/lib/esm/core-react/checklistbox/CheckListBox.js +4 -4
  430. package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
  431. package/lib/esm/core-react/checklistbox/CheckListBox.scss +4 -4
  432. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +7 -7
  433. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  434. package/lib/esm/core-react/contextmenu/ContextMenu.js +42 -23
  435. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  436. package/lib/esm/core-react/contextmenu/ContextMenuDirection.d.ts.map +1 -1
  437. package/lib/esm/core-react/contextmenu/ContextMenuDirection.js +3 -3
  438. package/lib/esm/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
  439. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  440. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  441. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js +3 -3
  442. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  443. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
  444. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  445. package/lib/esm/core-react/contextmenu/ContextMenuItem.js +16 -12
  446. package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  447. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
  448. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  449. package/lib/esm/core-react/contextmenu/ContextSubMenu.js +37 -15
  450. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  451. package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  452. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js +11 -7
  453. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  454. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  455. package/lib/esm/core-react/contextmenu/PopupContextMenu.js +3 -3
  456. package/lib/esm/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  457. package/lib/esm/core-react/contextmenu/TildeFinder.d.ts.map +1 -1
  458. package/lib/esm/core-react/contextmenu/TildeFinder.js +15 -7
  459. package/lib/esm/core-react/contextmenu/TildeFinder.js.map +1 -1
  460. package/lib/esm/core-react/dialog/Dialog.d.ts +6 -5
  461. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  462. package/lib/esm/core-react/dialog/Dialog.js +94 -86
  463. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  464. package/lib/esm/core-react/dialog/GlobalDialog.d.ts.map +1 -1
  465. package/lib/esm/core-react/dialog/GlobalDialog.js +10 -6
  466. package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
  467. package/lib/esm/core-react/dialog/SimpleDialog.d.ts +68 -0
  468. package/lib/esm/core-react/dialog/SimpleDialog.d.ts.map +1 -0
  469. package/lib/esm/core-react/dialog/SimpleDialog.js +47 -0
  470. package/lib/esm/core-react/dialog/SimpleDialog.js.map +1 -0
  471. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  472. package/lib/esm/core-react/elementseparator/ElementSeparator.js +14 -8
  473. package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
  474. package/lib/esm/core-react/elementseparator/ElementSeparator.scss +19 -10
  475. package/lib/esm/core-react/enums/Alignment.js +3 -3
  476. package/lib/esm/core-react/enums/Alignment.js.map +1 -1
  477. package/lib/esm/core-react/enums/CheckBoxState.js +3 -3
  478. package/lib/esm/core-react/enums/CheckBoxState.js.map +1 -1
  479. package/lib/esm/core-react/enums/Orientation.js +3 -3
  480. package/lib/esm/core-react/enums/Orientation.js.map +1 -1
  481. package/lib/esm/core-react/enums/SortDirection.js +3 -3
  482. package/lib/esm/core-react/enums/SortDirection.js.map +1 -1
  483. package/lib/esm/core-react/enums/TimeFormat.js +3 -3
  484. package/lib/esm/core-react/enums/TimeFormat.js.map +1 -1
  485. package/lib/esm/core-react/expandable/ExpandableList.d.ts +1 -1
  486. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  487. package/lib/esm/core-react/expandable/ExpandableList.js +8 -5
  488. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  489. package/lib/esm/core-react/expandable/ExpandableList.scss +4 -4
  490. package/lib/esm/core-react/expandable/classes.scss +6 -4
  491. package/lib/esm/core-react/focus/ItemKeyboardNavigator.d.ts.map +1 -1
  492. package/lib/esm/core-react/focus/ItemKeyboardNavigator.js +38 -15
  493. package/lib/esm/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
  494. package/lib/esm/core-react/focustrap/FocusTrap.d.ts.map +1 -1
  495. package/lib/esm/core-react/focustrap/FocusTrap.js +33 -16
  496. package/lib/esm/core-react/focustrap/FocusTrap.js.map +1 -1
  497. package/lib/esm/core-react/hocs/withIsPressed.d.ts.map +1 -1
  498. package/lib/esm/core-react/hocs/withIsPressed.js +4 -7
  499. package/lib/esm/core-react/hocs/withIsPressed.js.map +1 -1
  500. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  501. package/lib/esm/core-react/hocs/withOnOutsideClick.js +16 -11
  502. package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
  503. package/lib/esm/core-react/hocs/withTimeout.d.ts.map +1 -1
  504. package/lib/esm/core-react/hocs/withTimeout.js +6 -8
  505. package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
  506. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts +5 -1
  507. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
  508. package/lib/esm/core-react/icons/ConditionalIconItem.js +26 -9
  509. package/lib/esm/core-react/icons/ConditionalIconItem.js.map +1 -1
  510. package/lib/esm/core-react/icons/IconComponent.d.ts +1 -1
  511. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  512. package/lib/esm/core-react/icons/IconComponent.js +21 -11
  513. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  514. package/lib/esm/core-react/icons/IconComponent.scss +5 -6
  515. package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
  516. package/lib/esm/core-react/icons/SvgPath.js +4 -4
  517. package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
  518. package/lib/esm/core-react/icons/WebFontIcon.js +3 -3
  519. package/lib/esm/core-react/icons/WebFontIcon.js.map +1 -1
  520. package/lib/esm/core-react/icons/classes.scss +15 -7
  521. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  522. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +6 -4
  523. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  524. package/lib/esm/core-react/inputs/Input.d.ts +1 -1
  525. package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
  526. package/lib/esm/core-react/inputs/Input.js +6 -7
  527. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  528. package/lib/esm/core-react/inputs/InputLabel.d.ts +1 -1
  529. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  530. package/lib/esm/core-react/inputs/InputLabel.js +11 -14
  531. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  532. package/lib/esm/core-react/inputs/InputStatus.js +3 -3
  533. package/lib/esm/core-react/inputs/InputStatus.js.map +1 -1
  534. package/lib/esm/core-react/inputs/LabeledComponentProps.js +3 -3
  535. package/lib/esm/core-react/inputs/LabeledComponentProps.js.map +1 -1
  536. package/lib/esm/core-react/inputs/classes.scss +9 -5
  537. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  538. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  539. package/lib/esm/core-react/inputs/iconinput/IconInput.js +3 -4
  540. package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
  541. package/lib/esm/core-react/inputs/iconinput/IconInput.scss +11 -12
  542. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +2 -2
  543. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  544. package/lib/esm/core-react/inputs/numberinput/NumberInput.js +26 -17
  545. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  546. package/lib/esm/core-react/layout-variables.scss +5 -7
  547. package/lib/esm/core-react/listbox/Listbox.d.ts +2 -2
  548. package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
  549. package/lib/esm/core-react/listbox/Listbox.js +19 -12
  550. package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
  551. package/lib/esm/core-react/loading/LoadingBar.d.ts.map +1 -1
  552. package/lib/esm/core-react/loading/LoadingBar.js +4 -4
  553. package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
  554. package/lib/esm/core-react/loading/LoadingBar.scss +6 -6
  555. package/lib/esm/core-react/loading/LoadingPrompt.d.ts.map +1 -1
  556. package/lib/esm/core-react/loading/LoadingPrompt.js +9 -9
  557. package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
  558. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +3 -3
  559. package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  560. package/lib/esm/core-react/loading/LoadingSpinner.js +5 -5
  561. package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
  562. package/lib/esm/core-react/loading/LoadingStatus.d.ts.map +1 -1
  563. package/lib/esm/core-react/loading/LoadingStatus.js +3 -3
  564. package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
  565. package/lib/esm/core-react/loading/LoadingStatus.scss +4 -4
  566. package/lib/esm/core-react/messagebox/MessageBox.d.ts +3 -3
  567. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  568. package/lib/esm/core-react/messagebox/MessageBox.js +6 -6
  569. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  570. package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
  571. package/lib/esm/core-react/notification/MessageRenderer.js +18 -12
  572. package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
  573. package/lib/esm/core-react/notification/MessageType.d.ts.map +1 -1
  574. package/lib/esm/core-react/notification/MessageType.js +3 -3
  575. package/lib/esm/core-react/notification/MessageType.js.map +1 -1
  576. package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
  577. package/lib/esm/core-react/popup/Popup.js +46 -23
  578. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  579. package/lib/esm/core-react/radialmenu/Annulus.d.ts.map +1 -1
  580. package/lib/esm/core-react/radialmenu/Annulus.js +4 -4
  581. package/lib/esm/core-react/radialmenu/Annulus.js.map +1 -1
  582. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +2 -2
  583. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  584. package/lib/esm/core-react/radialmenu/RadialMenu.js +26 -11
  585. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  586. package/lib/esm/core-react/searchbox/SearchBox.d.ts.map +1 -1
  587. package/lib/esm/core-react/searchbox/SearchBox.js +17 -7
  588. package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
  589. package/lib/esm/core-react/settings/SettingsContainer.d.ts +1 -1
  590. package/lib/esm/core-react/settings/SettingsContainer.d.ts.map +1 -1
  591. package/lib/esm/core-react/settings/SettingsContainer.js +54 -19
  592. package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
  593. package/lib/esm/core-react/settings/SettingsManager.d.ts +3 -3
  594. package/lib/esm/core-react/settings/SettingsManager.d.ts.map +1 -1
  595. package/lib/esm/core-react/settings/SettingsManager.js +7 -8
  596. package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
  597. package/lib/esm/core-react/style/breakpoints.scss +30 -12
  598. package/lib/esm/core-react/style/colors.scss +52 -52
  599. package/lib/esm/core-react/style/mixins.scss +7 -11
  600. package/lib/esm/core-react/style/themecolors.scss +116 -106
  601. package/lib/esm/core-react/tabs/Tabs.d.ts +4 -4
  602. package/lib/esm/core-react/tabs/Tabs.d.ts.map +1 -1
  603. package/lib/esm/core-react/tabs/Tabs.js +13 -11
  604. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  605. package/lib/esm/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  606. package/lib/esm/core-react/tabs/VerticalTabs.js +3 -3
  607. package/lib/esm/core-react/tabs/VerticalTabs.js.map +1 -1
  608. package/lib/esm/core-react/tabs/classes.scss +6 -4
  609. package/lib/esm/core-react/text/BlockText.js +4 -4
  610. package/lib/esm/core-react/text/BlockText.js.map +1 -1
  611. package/lib/esm/core-react/text/BodyText.js +4 -4
  612. package/lib/esm/core-react/text/BodyText.js.map +1 -1
  613. package/lib/esm/core-react/text/DisabledText.js +4 -4
  614. package/lib/esm/core-react/text/DisabledText.js.map +1 -1
  615. package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
  616. package/lib/esm/core-react/text/FilteredText.js +5 -5
  617. package/lib/esm/core-react/text/FilteredText.js.map +1 -1
  618. package/lib/esm/core-react/text/MutedText.js +4 -4
  619. package/lib/esm/core-react/text/MutedText.js.map +1 -1
  620. package/lib/esm/core-react/text/StyledText.js +3 -3
  621. package/lib/esm/core-react/text/StyledText.js.map +1 -1
  622. package/lib/esm/core-react/text/TextProps.d.ts.map +1 -1
  623. package/lib/esm/core-react/text/TextProps.js +3 -3
  624. package/lib/esm/core-react/text/TextProps.js.map +1 -1
  625. package/lib/esm/core-react/text/classes.scss +15 -7
  626. package/lib/esm/core-react/text/disabled.scss +4 -5
  627. package/lib/esm/core-react/text/muted.scss +4 -5
  628. package/lib/esm/core-react/tree/Branch.d.ts.map +1 -1
  629. package/lib/esm/core-react/tree/Branch.js +3 -3
  630. package/lib/esm/core-react/tree/Branch.js.map +1 -1
  631. package/lib/esm/core-react/tree/Branch.scss +4 -4
  632. package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  633. package/lib/esm/core-react/tree/ExpansionToggle.js +3 -3
  634. package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
  635. package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
  636. package/lib/esm/core-react/tree/Node.js +11 -8
  637. package/lib/esm/core-react/tree/Node.js.map +1 -1
  638. package/lib/esm/core-react/tree/Node.scss +9 -9
  639. package/lib/esm/core-react/tree/Placeholder.js +5 -5
  640. package/lib/esm/core-react/tree/Placeholder.js.map +1 -1
  641. package/lib/esm/core-react/tree/Tree.d.ts.map +1 -1
  642. package/lib/esm/core-react/tree/Tree.js +20 -11
  643. package/lib/esm/core-react/tree/Tree.js.map +1 -1
  644. package/lib/esm/core-react/uistate/LocalStateStorage.d.ts.map +1 -1
  645. package/lib/esm/core-react/uistate/LocalStateStorage.js +7 -4
  646. package/lib/esm/core-react/uistate/LocalStateStorage.js.map +1 -1
  647. package/lib/esm/core-react/uistate/UiStateEntry.d.ts.map +1 -1
  648. package/lib/esm/core-react/uistate/UiStateEntry.js +3 -3
  649. package/lib/esm/core-react/uistate/UiStateEntry.js.map +1 -1
  650. package/lib/esm/core-react/uistate/UiStateStorage.d.ts.map +1 -1
  651. package/lib/esm/core-react/uistate/UiStateStorage.js +3 -3
  652. package/lib/esm/core-react/uistate/UiStateStorage.js.map +1 -1
  653. package/lib/esm/core-react/utils/IconHelper.d.ts +3 -1
  654. package/lib/esm/core-react/utils/IconHelper.d.ts.map +1 -1
  655. package/lib/esm/core-react/utils/IconHelper.js +35 -6
  656. package/lib/esm/core-react/utils/IconHelper.js.map +1 -1
  657. package/lib/esm/core-react/utils/IconWebComponent.d.ts.map +1 -1
  658. package/lib/esm/core-react/utils/IconWebComponent.js +71 -41
  659. package/lib/esm/core-react/utils/IconWebComponent.js.map +1 -1
  660. package/lib/esm/core-react/utils/Point.d.ts.map +1 -1
  661. package/lib/esm/core-react/utils/Point.js +3 -3
  662. package/lib/esm/core-react/utils/Point.js.map +1 -1
  663. package/lib/esm/core-react/utils/Props.d.ts.map +1 -1
  664. package/lib/esm/core-react/utils/Props.js +3 -3
  665. package/lib/esm/core-react/utils/Props.js.map +1 -1
  666. package/lib/esm/core-react/utils/Rectangle.d.ts.map +1 -1
  667. package/lib/esm/core-react/utils/Rectangle.js +15 -7
  668. package/lib/esm/core-react/utils/Rectangle.js.map +1 -1
  669. package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  670. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js +4 -2
  671. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  672. package/lib/esm/core-react/utils/Size.d.ts.map +1 -1
  673. package/lib/esm/core-react/utils/Size.js +4 -5
  674. package/lib/esm/core-react/utils/Size.js.map +1 -1
  675. package/lib/esm/core-react/utils/Timer.d.ts.map +1 -1
  676. package/lib/esm/core-react/utils/Timer.js +3 -3
  677. package/lib/esm/core-react/utils/Timer.js.map +1 -1
  678. package/lib/esm/core-react/utils/UiGeometry.d.ts.map +1 -1
  679. package/lib/esm/core-react/utils/UiGeometry.js +9 -5
  680. package/lib/esm/core-react/utils/UiGeometry.js.map +1 -1
  681. package/lib/esm/core-react/utils/flattenChildren.js +3 -3
  682. package/lib/esm/core-react/utils/flattenChildren.js.map +1 -1
  683. package/lib/esm/core-react/utils/getBestBWContrastColor.js +5 -5
  684. package/lib/esm/core-react/utils/getBestBWContrastColor.js.map +1 -1
  685. package/lib/esm/core-react/utils/getCssVariable.d.ts.map +1 -1
  686. package/lib/esm/core-react/utils/getCssVariable.js +3 -3
  687. package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
  688. package/lib/esm/core-react/utils/getDisplayName.d.ts.map +1 -1
  689. package/lib/esm/core-react/utils/getDisplayName.js +3 -3
  690. package/lib/esm/core-react/utils/getDisplayName.js.map +1 -1
  691. package/lib/esm/core-react/utils/getUserColor.d.ts.map +1 -1
  692. package/lib/esm/core-react/utils/getUserColor.js +5 -4
  693. package/lib/esm/core-react/utils/getUserColor.js.map +1 -1
  694. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
  695. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js +4 -4
  696. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
  697. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
  698. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +21 -9
  699. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  700. package/lib/esm/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  701. package/lib/esm/core-react/utils/hooks/useDisposable.js +3 -3
  702. package/lib/esm/core-react/utils/hooks/useDisposable.js.map +1 -1
  703. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
  704. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js +3 -3
  705. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  706. package/lib/esm/core-react/utils/hooks/useEventListener.d.ts.map +1 -1
  707. package/lib/esm/core-react/utils/hooks/useEventListener.js +3 -3
  708. package/lib/esm/core-react/utils/hooks/useEventListener.js.map +1 -1
  709. package/lib/esm/core-react/utils/hooks/useInterval.d.ts.map +1 -1
  710. package/lib/esm/core-react/utils/hooks/useInterval.js +6 -4
  711. package/lib/esm/core-react/utils/hooks/useInterval.js.map +1 -1
  712. package/lib/esm/core-react/utils/hooks/useLifecycleLogging.d.ts.map +1 -1
  713. package/lib/esm/core-react/utils/hooks/useLifecycleLogging.js +7 -4
  714. package/lib/esm/core-react/utils/hooks/useLifecycleLogging.js.map +1 -1
  715. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
  716. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js +15 -6
  717. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  718. package/lib/esm/core-react/utils/hooks/useProximityToMouse.js +3 -3
  719. package/lib/esm/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
  720. package/lib/esm/core-react/utils/hooks/useRefEffect.d.ts +1 -1
  721. package/lib/esm/core-react/utils/hooks/useRefEffect.d.ts.map +1 -1
  722. package/lib/esm/core-react/utils/hooks/useRefEffect.js +3 -3
  723. package/lib/esm/core-react/utils/hooks/useRefEffect.js.map +1 -1
  724. package/lib/esm/core-react/utils/hooks/useRefState.js +3 -3
  725. package/lib/esm/core-react/utils/hooks/useRefState.js.map +1 -1
  726. package/lib/esm/core-react/utils/hooks/useRefs.d.ts.map +1 -1
  727. package/lib/esm/core-react/utils/hooks/useRefs.js +8 -6
  728. package/lib/esm/core-react/utils/hooks/useRefs.js.map +1 -1
  729. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +8 -8
  730. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  731. package/lib/esm/core-react/utils/hooks/useResizeObserver.js +37 -20
  732. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  733. package/lib/esm/core-react/utils/hooks/useTargeted.d.ts.map +1 -1
  734. package/lib/esm/core-react/utils/hooks/useTargeted.js +7 -4
  735. package/lib/esm/core-react/utils/hooks/useTargeted.js.map +1 -1
  736. package/lib/esm/core-react/utils/hooks/useThrottledFn.js +3 -3
  737. package/lib/esm/core-react/utils/hooks/useThrottledFn.js.map +1 -1
  738. package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.d.ts.map +1 -1
  739. package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.js +3 -4
  740. package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.js.map +1 -1
  741. package/lib/esm/core-react/utils/isPromiseLike.d.ts.map +1 -1
  742. package/lib/esm/core-react/utils/isPromiseLike.js +6 -4
  743. package/lib/esm/core-react/utils/isPromiseLike.js.map +1 -1
  744. package/lib/esm/core-react/utils/reuseOrCreatePromise.d.ts +14 -0
  745. package/lib/esm/core-react/utils/reuseOrCreatePromise.d.ts.map +1 -0
  746. package/lib/esm/core-react/utils/reuseOrCreatePromise.js +29 -0
  747. package/lib/esm/core-react/utils/reuseOrCreatePromise.js.map +1 -0
  748. package/lib/esm/core-react/utils/shallowDiffers.d.ts.map +1 -1
  749. package/lib/esm/core-react/utils/shallowDiffers.js +3 -3
  750. package/lib/esm/core-react/utils/shallowDiffers.js.map +1 -1
  751. package/lib/esm/core-react/utils/typeUtils.js +3 -3
  752. package/lib/esm/core-react/utils/typeUtils.js.map +1 -1
  753. package/lib/esm/core-react.d.ts +3 -3
  754. package/lib/esm/core-react.d.ts.map +1 -1
  755. package/lib/esm/core-react.js +6 -6
  756. package/lib/esm/core-react.js.map +1 -1
  757. package/lib/public/locales/en/UiCore.json +1 -1
  758. package/package.json +8 -17
@@ -1,99 +1,99 @@
1
- # Guidelines for Contributing to iTwin.js UI Source Code
2
-
3
- Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.
4
-
5
- ## Description
6
-
7
- In order to maintain consistency in the iTwin.js UI source code, please abide by the following guidelines for classes and React components.
8
-
9
- ## Guidelines
10
-
11
- * Include a copyright notice at the top of __all__ TypeScript and CSS/Sass files. The copyright notice comment should be similar to the following:
12
-
13
- ```typescript
14
- /*---------------------------------------------------------------------------------------------
15
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
16
- * See LICENSE.md in the project root for license terms and full copyright notice.
17
- *--------------------------------------------------------------------------------------------*/
18
- ```
19
-
20
- * Document __all__ exported classes, interfaces, enums, types, etc.
21
- * Add release tags (`@public`, `@beta`, `@alpha` or `@internal`) to all exported classes, interfaces, enums, types, etc. For more information on release tags, see [Release Tags](https://www.itwinjs.org/learning/guidelines/release-tags-guidelines/).
22
- * In addition, it’s preferable that all *Props interface members and component public methods be documented. You can put `@internal` on React lifecycle and render methods.
23
- * Add a,
24
-
25
- ```ts
26
- /** @packageDocumentation
27
- * @module xyz
28
- */
29
- ```
30
-
31
- comment to the top of the TypeScript file for the documentation module. An existing documentation module will often be appropriate to use. However, if you need to add a documentation module, see additional guidelines below. Example of `@module` comment:
32
-
33
- ```ts
34
- /** @packageDocumentation
35
- * @module Button
36
- */
37
- ```
38
-
39
- * Use the theme colors (e.g. $buic-text-color, $buic-background-control, $buic-background-widget, etc.). These are located in `appui/ui/core-react/src/core-react/style/themecolors.scss`. Please do __not__ use $uicore-text-color, $uicore-black, $uicore-white, $uicore-gray*, etc.)
40
- * Include an appropriate prefix on CSS class names to prevent class name clashes (e.g. `uifw-` in appui-react, `core-` in core-react, `components-` in components-react, `nz-` in appui-layout-react)
41
- * Add an export for the component to the barrel file of the package (e.g. appui-react.ts, components-react.ts, core-react.ts, appui-layout-react.ts). Example:
42
-
43
- ```typescript
44
- export * from "./core-react/badge/Badge";
45
- ```
46
-
47
- * Localize all strings to be seen by the user and use `Ui*.translate` to get the localized string. Please do __not__ use hard-coded strings. The translatable strings should be in a JSON file in the `public/locales/en` of the repository. Example:
48
-
49
- ```json
50
- {
51
- . . .
52
- "dialog": {
53
- "ok": "OK",
54
- . . .
55
- }
56
- }
57
- ```
58
-
59
- ```typescript
60
- buttonText = UiCore.translate("dialog.ok");
61
- ```
62
-
63
- * Run `npm run extract-api` to update the `*api.md` file for the package
64
- * Write unit tests for the new component or class. The tests should cover as many code statements, branches, functions and lines as possible (100% is the goal). To run the tests, run `npm run test` or `rush test`. To run coverage, run `npm run cover`. To see the coverage report, open the report from one of the following directories in your browser:
65
- * appui/ui/appui-layout-react/lib/test/coverage/lcov-report/index.html
66
- * appui/ui/appui-react/lib/test/coverage/lcov-report/index.html
67
- * appui/ui/components-react/lib/test/coverage/lcov-report/index.html
68
- * appui/ui/core-react/lib/test/coverage/lcov-report/index.html
69
- * appui/ui/imodel-components-react/lib/test/coverage/lcov-report/index.html
70
-
71
- ## New Documentation Module
72
-
73
- If the component’s documentation @module is new, please follow these guidelines:
74
-
75
- * Add a `@docs-group-description` comment to the barrel file of the package. Example:
76
-
77
- ```js
78
- /**
79
- * @docs-group-description Button
80
- * Classes for working with various Buttons.
81
- */
82
- ```
83
-
84
- Note: The following steps are in [itwinjs-core](https://github.com/itwin/itwinjs-core) repository, NOT in the appui repository:
85
-
86
- * Add the module to the itwinjs-core/docs/ui/reference/leftNav.md file in alphabetical order. Example:
87
-
88
- ```md
89
- - [Button]($core:Button)
90
- ```
91
-
92
- * Add the module to the appropriate `index.md` in the Learning section (e.g. itwinjs-core/docs/ui/learning/components/index.md or itwinjs-core/docs/ui/learning/core/index.md). Example:
93
-
94
- ```md
95
- * [Button](./Button.md)
96
- ```
97
-
98
- * Add a markdown file in the same folder as the `index.md` above (e.g. itwinjs-core/docs/ui/learning/components/Timeline.md)
99
- * Add learning content and an example usage to the new markdown file
1
+ # Guidelines for Contributing to iTwin.js UI Source Code
2
+
3
+ Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.
4
+
5
+ ## Description
6
+
7
+ In order to maintain consistency in the iTwin.js UI source code, please abide by the following guidelines for classes and React components.
8
+
9
+ ## Guidelines
10
+
11
+ - Include a copyright notice at the top of **all** TypeScript and CSS/Sass files. The copyright notice comment should be similar to the following:
12
+
13
+ ```typescript
14
+ /*---------------------------------------------------------------------------------------------
15
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
16
+ * See LICENSE.md in the project root for license terms and full copyright notice.
17
+ *--------------------------------------------------------------------------------------------*/
18
+ ```
19
+
20
+ - Document **all** exported classes, interfaces, enums, types, etc.
21
+ - Add release tags (`@public`, `@beta`, `@alpha` or `@internal`) to all exported classes, interfaces, enums, types, etc. For more information on release tags, see [Release Tags](https://www.itwinjs.org/learning/guidelines/release-tags-guidelines/).
22
+ - In addition, it’s preferable that all \*Props interface members and component public methods be documented. You can put `@internal` on React lifecycle and render methods.
23
+ - Add a,
24
+
25
+ ```ts
26
+ /** @packageDocumentation
27
+ * @module xyz
28
+ */
29
+ ```
30
+
31
+ comment to the top of the TypeScript file for the documentation module. An existing documentation module will often be appropriate to use. However, if you need to add a documentation module, see additional guidelines below. Example of `@module` comment:
32
+
33
+ ```ts
34
+ /** @packageDocumentation
35
+ * @module Button
36
+ */
37
+ ```
38
+
39
+ - Use the theme colors (e.g. $buic-text-color, $buic-background-control, $buic-background-widget, etc.). These are located in `appui/ui/core-react/src/core-react/style/themecolors.scss`. Please do **not** use $uicore-text-color, $uicore-black, $uicore-white, $uicore-gray\*, etc.)
40
+ - Include an appropriate prefix on CSS class names to prevent class name clashes (e.g. `uifw-` in appui-react, `core-` in core-react, `components-` in components-react, `nz-` in appui-layout-react)
41
+ - Add an export for the component to the barrel file of the package (e.g. appui-react.ts, components-react.ts, core-react.ts, appui-layout-react.ts). Example:
42
+
43
+ ```typescript
44
+ export * from "./core-react/badge/Badge";
45
+ ```
46
+
47
+ - Localize all strings to be seen by the user and use `Ui*.translate` to get the localized string. Please do **not** use hard-coded strings. The translatable strings should be in a JSON file in the `public/locales/en` of the repository. Example:
48
+
49
+ ```json
50
+ {
51
+ . . .
52
+ "dialog": {
53
+ "ok": "OK",
54
+ . . .
55
+ }
56
+ }
57
+ ```
58
+
59
+ ```typescript
60
+ buttonText = UiCore.translate("dialog.ok");
61
+ ```
62
+
63
+ - Run `npm run extract-api` to update the `*api.md` file for the package
64
+ - Write unit tests for the new component or class. The tests should cover as many code statements, branches, functions and lines as possible (100% is the goal). To run the tests, run `npm run test` or `rush test`. To run coverage, run `npm run cover`. To see the coverage report, open the report from one of the following directories in your browser:
65
+ - appui/ui/appui-layout-react/lib/test/coverage/lcov-report/index.html
66
+ - appui/ui/appui-react/lib/test/coverage/lcov-report/index.html
67
+ - appui/ui/components-react/lib/test/coverage/lcov-report/index.html
68
+ - appui/ui/core-react/lib/test/coverage/lcov-report/index.html
69
+ - appui/ui/imodel-components-react/lib/test/coverage/lcov-report/index.html
70
+
71
+ ## New Documentation Module
72
+
73
+ If the component’s documentation @module is new, please follow these guidelines:
74
+
75
+ - Add a `@docs-group-description` comment to the barrel file of the package. Example:
76
+
77
+ ```js
78
+ /**
79
+ * @docs-group-description Button
80
+ * Classes for working with various Buttons.
81
+ */
82
+ ```
83
+
84
+ Note: The following steps are in [itwinjs-core](https://github.com/itwin/itwinjs-core) repository, NOT in the appui repository:
85
+
86
+ - Add the module to the itwinjs-core/docs/ui/reference/leftNav.md file in alphabetical order. Example:
87
+
88
+ ```md
89
+ - [Button]($core:Button)
90
+ ```
91
+
92
+ - Add the module to the appropriate `index.md` in the Learning section (e.g. itwinjs-core/docs/ui/learning/components/index.md or itwinjs-core/docs/ui/learning/core/index.md). Example:
93
+
94
+ ```md
95
+ - [Button](./Button.md)
96
+ ```
97
+
98
+ - Add a markdown file in the same folder as the `index.md` above (e.g. itwinjs-core/docs/ui/learning/components/Timeline.md)
99
+ - Add learning content and an example usage to the new markdown file
package/LICENSE.md CHANGED
@@ -1,9 +1,9 @@
1
- # MIT License
2
-
3
- Copyright © 2017-2023 Bentley Systems, Incorporated. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ # MIT License
2
+
3
+ Copyright © 2017-2023 Bentley Systems, Incorporated. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # @itwin/core-react
2
-
3
- Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.
4
-
5
- ## Description
6
-
7
- The __@itwin/core-react__ package contains general purpose React components, such as Dialog, MessageBox, SearchBox, RadialMenu.
8
-
9
- ## Documentation
10
-
11
- See the [iTwin.js](https://www.itwinjs.org/learning/ui/core/) documentation for more information.
1
+ # @itwin/core-react
2
+
3
+ Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.
4
+
5
+ ## Description
6
+
7
+ The **@itwin/core-react** package contains general purpose React components, such as Dialog, MessageBox, SearchBox, RadialMenu.
8
+
9
+ ## Documentation
10
+
11
+ See the [iTwin.js](https://www.itwinjs.org/learning/ui/core/) documentation for more information.
@@ -1 +1 @@
1
- {"version":3,"file":"UiCore.d.ts","sourceRoot":"","sources":["../../../src/core-react/UiCore.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,4EAA4E;AAC5E,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,yBAAyB,C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AAO,CAEvC;IAED;;OAEG;IACH,WAAkB,YAAY,IAAI,YAAY,CAS7C;IAED,kDAAkD;IAClD,WAAkB,qBAAqB,IAAI,MAAM,CAEhD;IAED;;OAEG;WACW,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM;IAavD,gBAAgB;IAChB,WAAkB,WAAW,IAAI,MAAM,CAEtC;IAED,gBAAgB;WACF,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM;CAK/C"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module Utilities
8
8
  */
@@ -45,7 +45,9 @@ class UiCore {
45
45
  UiCore._initialized = false;
46
46
  }
47
47
  /** Determines if UiCore has been initialized */
48
- static get initialized() { return UiCore._initialized; }
48
+ static get initialized() {
49
+ return UiCore._initialized;
50
+ }
49
51
  /** The internationalization service created by the host application.
50
52
  * @internal
51
53
  */
@@ -68,7 +70,9 @@ class UiCore {
68
70
  core_bentley_1.Logger.logError(UiCore.loggerCategory(this), `translate: UiCore must be initialize with a localization provider. Returning blank string.`);
69
71
  return "";
70
72
  }
71
- return UiCore._localization.getLocalizedString(key, { ns: UiCore.localizationNamespace });
73
+ return UiCore._localization.getLocalizedString(key, {
74
+ ns: UiCore.localizationNamespace,
75
+ });
72
76
  }
73
77
  /** @internal */
74
78
  static get packageName() {
@@ -1 +1 @@
1
- {"version":3,"file":"UiCore.js","sourceRoot":"","sources":["../../../src/core-react/UiCore.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,4EAA4E;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,MAAM,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,kDAAkD;IAC3C,MAAM,KAAK,qBAAqB;QACrC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,SAAS,CAAC,GAAsB;QAC5C,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;YACzB,qBAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,4FAA4F,CAAC,CAAC;YAC3I,OAAO,EAAE,CAAC;SACX;QACD,OAAO,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,qBAAqB,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED,gBAAgB;IACT,MAAM,KAAK,WAAW;QAC3B,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,cAAc,CAAC,GAAQ;QACnC,MAAM,SAAS,GAAG,IAAA,6BAAY,EAAC,GAAG,CAAC,CAAC;QACpC,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACzE,OAAO,QAAQ,CAAC;IAClB,CAAC;;AAtEc,mBAAY,GAAG,KAAK,CAAC;AADzB,wBAAM","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\n/** Import color variables, layout variables and Sass classes barrel file */\nimport \"./colorthemes.scss\";\nimport \"./colorvariables.scss\";\nimport \"./layout-variables.scss\";\nimport \"./classes.scss\";\n\nimport { Logger } from \"@itwin/core-bentley\";\nimport type { Localization } from \"@itwin/core-common\";\nimport { getClassName, UiError } from \"@itwin/appui-abstract\";\nimport { IconWebComponent } from \"./utils/IconWebComponent\";\n// cSpell:ignore colorthemes colorvariables\n\n/**\n * Manages the Localization service for the core-react package.\n * @public\n */\nexport class UiCore {\n private static _initialized = false;\n private static _localization?: Localization;\n\n /**\n * Registers the Localization service namespace for UiCore.\n * @param localization The internationalization service created by the host application.\n */\n public static async initialize(localization: Localization): Promise<void> {\n if (UiCore._initialized) {\n Logger.logInfo(UiCore.loggerCategory(UiCore), `UiCore.initialize already called`);\n return;\n }\n\n UiCore._localization = localization;\n await UiCore._localization.registerNamespace(UiCore.localizationNamespace);\n if (window.customElements.get(\"svg-loader\") === undefined)\n window.customElements.define(\"svg-loader\", IconWebComponent);\n\n UiCore._initialized = true;\n }\n\n /** Unregisters the UiCore localization namespace */\n public static terminate() {\n if (UiCore._localization)\n UiCore._localization.unregisterNamespace(UiCore.localizationNamespace);\n UiCore._localization = undefined;\n\n UiCore._initialized = false;\n }\n\n /** Determines if UiCore has been initialized */\n public static get initialized(): boolean { return UiCore._initialized; }\n\n /** The internationalization service created by the host application.\n * @internal\n */\n public static get localization(): Localization {\n // istanbul ignore else\n if (!UiCore._localization)\n throw new UiError(UiCore.loggerCategory(this), \"localization: UiCore.initialize has not been called. Unable to return Localization object.\");\n // istanbul ignore next\n return UiCore._localization;\n }\n\n /** The internationalization service namespace. */\n public static get localizationNamespace(): string {\n return \"UiCore\";\n }\n\n /** Calls localization.getLocalizedStringWithNamespace with the \"UiCore\" namespace. Do NOT include the namespace in the key.\n * @internal\n */\n public static translate(key: string | string[]): string {\n if (!UiCore._localization) {\n Logger.logError(UiCore.loggerCategory(this), `translate: UiCore must be initialize with a localization provider. Returning blank string.`);\n return \"\";\n }\n return UiCore._localization.getLocalizedString(key, { ns: UiCore.localizationNamespace });\n }\n\n /** @internal */\n public static get packageName(): string {\n return \"core-react\";\n }\n\n /** @internal */\n public static loggerCategory(obj: any): string {\n const className = getClassName(obj);\n const category = UiCore.packageName + (className ? `.${className}` : \"\");\n return category;\n }\n\n}\n"]}
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Aa;YACvB,MAAM,IAAI,wBAAO,CACf,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAC3B,4FAA4F,CAC7F,CAAC;QACJ,uBAAuB;QACvB,OAAO,MAAM,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,kDAAkD;IAC3C,MAAM,KAAK,qBAAqB;QACrC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,SAAS,CAAC,GAAsB;QAC5C,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;YACzB,qBAAM,CAAC,QAAQ,CACb,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAC3B,4FAA4F,CAC7F,CAAC;YACF,OAAO,EAAE,CAAC;SACX;QACD,OAAO,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,EAAE;YAClD,EAAE,EAAE,MAAM,CAAC,qBAAqB;SACjC,CAAC,CAAC;IACL,CAAC;IAED,gBAAgB;IACT,MAAM,KAAK,WAAW;QAC3B,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,cAAc,CAAC,GAAQ;QACnC,MAAM,SAAS,GAAG,IAAA,6BAAY,EAAC,GAAG,CAAC,CAAC;QACpC,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACzE,OAAO,QAAQ,CAAC;IAClB,CAAC;;AAnFc,mBAAY,GAAG,KAAK,CAAC;AADzB,wBAAM","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\n/** Import color variables, layout variables and Sass classes barrel file */\nimport \"./colorthemes.scss\";\nimport \"./colorvariables.scss\";\nimport \"./layout-variables.scss\";\nimport \"./classes.scss\";\n\nimport { Logger } from \"@itwin/core-bentley\";\nimport type { Localization } from \"@itwin/core-common\";\nimport { getClassName, UiError } from \"@itwin/appui-abstract\";\nimport { IconWebComponent } from \"./utils/IconWebComponent\";\n// cSpell:ignore colorthemes colorvariables\n\n/**\n * Manages the Localization service for the core-react package.\n * @public\n */\nexport class UiCore {\n private static _initialized = false;\n private static _localization?: Localization;\n\n /**\n * Registers the Localization service namespace for UiCore.\n * @param localization The internationalization service created by the host application.\n */\n public static async initialize(localization: Localization): Promise<void> {\n if (UiCore._initialized) {\n Logger.logInfo(\n UiCore.loggerCategory(UiCore),\n `UiCore.initialize already called`\n );\n return;\n }\n\n UiCore._localization = localization;\n await UiCore._localization.registerNamespace(UiCore.localizationNamespace);\n if (window.customElements.get(\"svg-loader\") === undefined)\n window.customElements.define(\"svg-loader\", IconWebComponent);\n\n UiCore._initialized = true;\n }\n\n /** Unregisters the UiCore localization namespace */\n public static terminate() {\n if (UiCore._localization)\n UiCore._localization.unregisterNamespace(UiCore.localizationNamespace);\n UiCore._localization = undefined;\n\n UiCore._initialized = false;\n }\n\n /** Determines if UiCore has been initialized */\n public static get initialized(): boolean {\n return UiCore._initialized;\n }\n\n /** The internationalization service created by the host application.\n * @internal\n */\n public static get localization(): Localization {\n // istanbul ignore else\n if (!UiCore._localization)\n throw new UiError(\n UiCore.loggerCategory(this),\n \"localization: UiCore.initialize has not been called. Unable to return Localization object.\"\n );\n // istanbul ignore next\n return UiCore._localization;\n }\n\n /** The internationalization service namespace. */\n public static get localizationNamespace(): string {\n return \"UiCore\";\n }\n\n /** Calls localization.getLocalizedStringWithNamespace with the \"UiCore\" namespace. Do NOT include the namespace in the key.\n * @internal\n */\n public static translate(key: string | string[]): string {\n if (!UiCore._localization) {\n Logger.logError(\n UiCore.loggerCategory(this),\n `translate: UiCore must be initialize with a localization provider. Returning blank string.`\n );\n return \"\";\n }\n return UiCore._localization.getLocalizedString(key, {\n ns: UiCore.localizationNamespace,\n });\n }\n\n /** @internal */\n public static get packageName(): string {\n return \"core-react\";\n }\n\n /** @internal */\n public static loggerCategory(obj: any): string {\n const className = getClassName(obj);\n const category = UiCore.packageName + (className ? `.${className}` : \"\");\n return category;\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
 
6
6
  // Generates map from array.
7
7
  // Key of each entry is ($array entry value: result of $fn call).
@@ -19,9 +19,9 @@
19
19
  $map: ();
20
20
  @each $item in $array {
21
21
  $kvp: (
22
- $item: call($fn, $args...)
22
+ $item: call($fn, $args...),
23
23
  );
24
- $map: map-merge($map, $kvp)
24
+ $map: map-merge($map, $kvp);
25
25
  }
26
26
  @return $map;
27
27
  }
@@ -43,9 +43,10 @@
43
43
  $result: $initialArg;
44
44
  @each $item in $array {
45
45
  $result: call($fn, $result);
46
- $kvp: ($item: $result);
47
- $map: map-merge($map, $kvp)
46
+ $kvp: (
47
+ $item: $result,
48
+ );
49
+ $map: map-merge($map, $kvp);
48
50
  }
49
51
  @return $map;
50
52
  }
51
-
@@ -1,13 +1,17 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  @import "./style/themecolors.scss";
6
6
 
7
7
  $uicore-scrollbar-width: 12px;
8
8
  $uicore-scrollbar-padding: 2px;
9
9
 
10
- @mixin uicore-scrollbar($color: $buic-background-scrollbar, $width: $uicore-scrollbar-width, $padding: $uicore-scrollbar-padding) {
10
+ @mixin uicore-scrollbar(
11
+ $color: $buic-background-scrollbar,
12
+ $width: $uicore-scrollbar-width,
13
+ $padding: $uicore-scrollbar-padding
14
+ ) {
11
15
  &::-webkit-scrollbar {
12
16
  width: $width;
13
17
  height: $width;
@@ -1,36 +1,16 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  @import "_helpers";
6
6
 
7
7
  // Order matters, last is top-most on screen.
8
- $uicore-internal-z-index-layers: view-overlay,
9
- view-content-dialog,
10
- content-card-popup,
11
- widget-grip,
12
- drop-target,
13
- dragged-widget,
14
- zone-target,
15
- zone-outline,
16
- toolbar-panels,
17
- tool-settings-popup,
18
- status-overflow-popup,
19
- status-popup,
20
- modal-frontstage-overlay,
21
- modal-frontstage,
22
- dialog,
23
- dialog-popup,
24
- status-message,
25
- tooltip,
26
- context-menu-z,
27
- dragdrop,
28
- cursor-overlay,
29
- drag-target,
30
- drag-preview,
31
- backstage-overlay,
32
- backstage,
33
- keyin-palette-overlay;
8
+ $uicore-internal-z-index-layers: view-overlay, view-content-dialog,
9
+ content-card-popup, widget-grip, drop-target, dragged-widget, zone-target,
10
+ zone-outline, toolbar-panels, tool-settings-popup, status-overflow-popup,
11
+ status-popup, modal-frontstage-overlay, modal-frontstage, dialog, dialog-popup,
12
+ status-message, tooltip, context-menu-z, dragdrop, cursor-overlay, drag-target,
13
+ drag-preview, backstage-overlay, backstage, keyin-palette-overlay;
34
14
 
35
15
  $uicore-z-index-step: 1000;
36
16
 
@@ -38,15 +18,17 @@ $uicore-z-index-step: 1000;
38
18
  @return $counter + $uicore-z-index-step;
39
19
  }
40
20
 
41
- $uicore-internal-z-index-layer-map: uicore-map-from-array-with-result-arg($uicore-internal-z-index-layers, get-function(uicore-internal-get-next-z-index-step), 0);
21
+ $uicore-internal-z-index-layer-map: uicore-map-from-array-with-result-arg(
22
+ $uicore-internal-z-index-layers,
23
+ get-function(uicore-internal-get-next-z-index-step),
24
+ 0
25
+ );
42
26
 
43
27
  // Use this to get z-index value
44
28
  @function uicore-get-z-index($layer) {
45
29
  @if map_has_key($uicore-internal-z-index-layer-map, $layer) {
46
30
  @return map-get($uicore-internal-z-index-layer-map, $layer);
47
- }
48
-
49
- @else {
31
+ } @else {
50
32
  @error "Failed to get z-index for $layer: #{$layer}";
51
33
  }
52
34
  }
@@ -91,7 +91,7 @@ export declare class AutoSuggest extends React.PureComponent<AutoSuggestProps, A
91
91
  private getLabel;
92
92
  private _handleKeyDown;
93
93
  private _theme;
94
- render(): JSX.Element;
94
+ render(): React.ReactElement;
95
95
  }
96
96
  export {};
97
97
  //# sourceMappingURL=AutoSuggest.d.ts.map
@@ -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,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;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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AQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,oBAAoB,CAAC,EAAE,GAAG,CAAC;IAC3B;;OAEG;IACH,0BAA0B,CAAC,EAAE,gBAAgB,CAAC,0BAA0B,CAAC;IAEzE,gBAAgB;IAChB,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,gBAAgB;AAChB,UAAU,gBAAgB;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,eAAe,EAAE,CAAC;CAChC;AAED;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK,CAAC,aAAa,CAClD,gBAAgB,EAChB,gBAAgB,CACjB;IACC,OAAO,CAAC,UAAU,CAAS;gBAEf,KAAK,EAAE,gBAAgB;IAcnC,gBAAgB;IACA,iBAAiB;IAIjC,gBAAgB;IACA,oBAAoB;IAIpB,kBAAkB,CAAC,SAAS,EAAE,gBAAgB;IAW9D,OAAO,CAAC,SAAS,CAUf;IAEF,OAAO,CAAC,QAAQ,CAGd;IAEF,qFAAqF;IACrF,OAAO,CAAC,4BAA4B,CAOlC;IAEF,oFAAoF;IACpF,OAAO,CAAC,4BAA4B,CAIlC;IAEF,OAAO,CAAC,qBAAqB,CAK3B;IAEF,gFAAgF;IAChF,OAAO,CAAC,eAAe,CA6BrB;IAEF,4GAA4G;IAC5G,OAAO,CAAC,mBAAmB,CACR;IAEnB,8BAA8B;IAC9B,OAAO,CAAC,iBAAiB,CAEvB;IAEF,OAAO,CAAC,QAAQ;IAoBhB,OAAO,CAAC,cAAc,CAepB;IAEF,OAAO,CAAC,MAAM,CAeZ;IAEc,MAAM,IAAI,KAAK,CAAC,YAAY;CAwD7C"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module AutoSuggest
8
8
  */
@@ -46,7 +46,8 @@ class AutoSuggest extends React.PureComponent {
46
46
  /** Autosuggest will call this function every time you need to clear suggestions. */
47
47
  this._onSuggestionsClearRequested = () => {
48
48
  this.setState({ suggestions: [] });
49
- this.props.onSuggestionsClearRequested && this.props.onSuggestionsClearRequested();
49
+ this.props.onSuggestionsClearRequested &&
50
+ this.props.onSuggestionsClearRequested();
50
51
  };
51
52
  this._onSuggestionSelected = (_event, data) => {
52
53
  this.props.onSuggestionSelected(data.suggestion);
@@ -63,10 +64,11 @@ class AutoSuggest extends React.PureComponent {
63
64
  }
64
65
  const inputValue = value.trim().toLowerCase();
65
66
  const inputLength = inputValue.length;
66
- return Promise.resolve(inputLength === 0 ?
67
- /* istanbul ignore next */ [] :
68
- this.props.options.filter((data) => {
69
- return data.label.toLowerCase().includes(inputValue) || data.value.toLowerCase().includes(inputValue);
67
+ return Promise.resolve(inputLength === 0
68
+ ? /* istanbul ignore next */ []
69
+ : this.props.options.filter((data) => {
70
+ return (data.label.toLowerCase().includes(inputValue) ||
71
+ data.value.toLowerCase().includes(inputValue));
70
72
  }));
71
73
  };
72
74
  /** When suggestion is clicked, Autosuggest needs to populate the input based on the clicked suggestion. */
@@ -127,7 +129,8 @@ class AutoSuggest extends React.PureComponent {
127
129
  this._isMounted = false;
128
130
  }
129
131
  componentDidUpdate(prevProps) {
130
- if (this.props.value !== prevProps.value || this.props.options !== prevProps.options) {
132
+ if (this.props.value !== prevProps.value ||
133
+ this.props.options !== prevProps.options) {
131
134
  this.setState((_prevState, props) => ({
132
135
  inputValue: this.getLabel(props.value),
133
136
  }));
@@ -150,12 +153,8 @@ class AutoSuggest extends React.PureComponent {
150
153
  }
151
154
  render() {
152
155
  const { inputValue, suggestions } = this.state;
153
- const { value, onChange, placeholder, options, onSuggestionSelected, setFocus, alwaysRenderSuggestions, // eslint-disable-line @typescript-eslint/no-unused-vars
154
- onPressEnter, onPressEscape, onPressTab, onInputFocus, getLabel, // eslint-disable-line @typescript-eslint/no-unused-vars
155
- getSuggestions, // eslint-disable-line deprecation/deprecation, @typescript-eslint/no-unused-vars
156
- renderInputComponent, renderSuggestionsContainer, onSuggestionsClearRequested, // eslint-disable-line @typescript-eslint/no-unused-vars
157
- ...props } = this.props;
158
- const inputPlaceholder = (!inputValue) ? placeholder : undefined;
156
+ const { value, onChange, placeholder, options, onSuggestionSelected, setFocus, alwaysRenderSuggestions, onPressEnter, onPressEscape, onPressTab, onInputFocus, getLabel, getSuggestions, renderInputComponent, renderSuggestionsContainer, onSuggestionsClearRequested, ...props } = this.props;
157
+ const inputPlaceholder = !inputValue ? placeholder : undefined;
159
158
  const inputProps = {
160
159
  ...props,
161
160
  value: inputValue,
@@ -1 +1 @@
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;QAHP,eAAU,GAAG,KAAK,CAAC;QAkCnB,cAAS,GAAG,CAAC,CAAsC,EAAE,EAAE;YAC7D,IAAI,QAAQ,GAAG,EAAE,CAAC;YAElB,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,WAAW;gBACnD,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;iBAC7B,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK;gBACrB,QAAQ,GAAG,CAAC,CAAC,MAAM,CA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ClG,oBAAoB,EAAE,0BAA0B,EAAE,2BAA2B,EAAG,wDAAwD;QACxI,GAAG,KAAK,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":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module AutoSuggest\n */\n\nimport \"./AutoSuggest.scss\";\nimport * as React from \"react\";\nimport * as ReactAutosuggest from \"react-autosuggest\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { SpecialKey } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { UiCore } from \"../UiCore\";\n\n/** Data for the [[AutoSuggest]] options\n * @public\n */\nexport interface AutoSuggestData {\n /** Value of [[AutoSuggest]] option. */\n value: string;\n /** Label of [[AutoSuggest]] option. This is shown in the dropdown. */\n label: string;\n}\n\n/** Prototype for function returning AutoSuggestData\n * @public\n */\nexport type GetAutoSuggestDataFunc = (value: string) => AutoSuggestData[];\n\n/** Prototype for async function returning AutoSuggestData\n * @public\n */\nexport type AsyncGetAutoSuggestDataFunc = (value: string) => Promise<AutoSuggestData[]>;\n\n/** Properties for the [[AutoSuggest]] component.\n * @public\n */\nexport interface AutoSuggestProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps {\n /** Optional input value override. */\n value?: string;\n /** Options for dropdown. */\n options?: AutoSuggestData[] | GetAutoSuggestDataFunc;\n /** Asynchronously calculate suggestions for any given input value. */\n getSuggestions?: AsyncGetAutoSuggestDataFunc;\n /** Gets a label associated with a given value */\n getLabel?: (value: string | undefined) => string;\n /** Handler for when suggested selected. */\n onSuggestionSelected: (selected: AutoSuggestData) => void;\n /** Handler for Enter key. */\n onPressEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n /** Handler for Escape key. */\n onPressEscape?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n /** Handler for Tab key. */\n onPressTab?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n /** Handler for input receiving focus. */\n onInputFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;\n /** Called every time you need to clear suggestions. */\n onSuggestionsClearRequested?: () => void;\n /** Indicates whether to set focus to the input element */\n setFocus?: boolean;\n\n /** Use it only if you need to customize the rendering of the input.\n * @internal\n */\n renderInputComponent?: any; // ReactAutosuggest.RenderInputComponent<AutoSuggestData>; NOTE: changed to \"any\" because build was failing with RenderInputComponent is not generic?\n /** Use it if you want to customize things inside the suggestions container beyond rendering the suggestions themselves.\n * @internal\n */\n renderSuggestionsContainer?: ReactAutosuggest.RenderSuggestionsContainer;\n\n /** @internal */\n alwaysRenderSuggestions?: boolean;\n}\n\n/** @internal */\ninterface AutoSuggestState {\n inputValue: string;\n suggestions: AutoSuggestData[];\n}\n\n/** Auto Suggest React component. Uses the react-autosuggest component internally.\n * @public\n */\nexport class AutoSuggest extends React.PureComponent<AutoSuggestProps, AutoSuggestState> {\n private _isMounted = false;\n\n constructor(props: AutoSuggestProps) {\n super(props);\n\n // Autosuggest is a controlled component.\n // This means that you need to provide an input value\n // and an onChange handler that updates this value (see below).\n // Suggestions also need to be provided to the Autosuggest,\n // and they are initially empty because the Autosuggest is closed.\n this.state = {\n inputValue: this.getLabel(props.value),\n suggestions: [],\n };\n }\n\n /** @internal */\n public override componentDidMount() {\n this._isMounted = true;\n }\n\n /** @internal */\n public override componentWillUnmount() {\n this._isMounted = false;\n }\n\n public override componentDidUpdate(prevProps: AutoSuggestProps) {\n if (this.props.value !== prevProps.value || this.props.options !== prevProps.options) {\n this.setState((_prevState, props) => ({\n inputValue: this.getLabel(props.value),\n }));\n }\n }\n\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n let newValue = \"\";\n\n if (e.target.tagName === \"LI\" && e.target.textContent)\n newValue = e.target.textContent;\n else if (e.target.value)\n newValue = e.target.value;\n\n this.setState({\n inputValue: newValue,\n });\n };\n\n private _onFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n // istanbul ignore else\n if (this.props.onInputFocus)\n this.props.onInputFocus(e);\n };\n\n /** Autosuggest will call this function every time you need to update suggestions. */\n private _onSuggestionsFetchRequested = async (request: ReactAutosuggest.SuggestionsFetchRequestedParams): Promise<void> => {\n const value = request.value;\n const suggestions = await this._getSuggestions(value);\n\n if (this._isMounted)\n this.setState({ suggestions });\n };\n\n /** Autosuggest will call this function every time you need to clear suggestions. */\n private _onSuggestionsClearRequested = () => {\n this.setState({ suggestions: [] });\n this.props.onSuggestionsClearRequested && this.props.onSuggestionsClearRequested();\n };\n\n private _onSuggestionSelected = (_event: React.FormEvent<any>, data: ReactAutosuggest.SuggestionSelectedEventData<AutoSuggestData>): void => {\n this.props.onSuggestionSelected(data.suggestion);\n };\n\n /** Teach Autosuggest how to calculate suggestions for any given input value. */\n private _getSuggestions = async (value: string): Promise<AutoSuggestData[]> => {\n if (typeof this.props.options === \"function\")\n return Promise.resolve(this.props.options(value));\n\n if (this.props.getSuggestions)\n return this.props.getSuggestions(value);\n\n if (this.props.options === undefined) {\n Logger.logError(UiCore.loggerCategory(this), `props.options or props.getSuggestions should be provided`);\n return Promise.resolve([]);\n }\n\n const inputValue = value.trim().toLowerCase();\n const inputLength = inputValue.length;\n\n return Promise.resolve(\n inputLength === 0 ?\n /* istanbul ignore next */[] :\n this.props.options.filter((data: AutoSuggestData) => {\n return data.label.toLowerCase().includes(inputValue) || data.value.toLowerCase().includes(inputValue);\n })\n );\n };\n\n /** When suggestion is clicked, Autosuggest needs to populate the input based on the clicked suggestion. */\n private _getSuggestionValue = (suggestion: AutoSuggestData) => suggestion.label;\n\n /** Render each suggestion. */\n private _renderSuggestion = (suggestion: AutoSuggestData) => (\n <span>\n {suggestion.label}\n </span>\n );\n\n private getLabel(value: string | undefined): string {\n let label = \"\";\n\n if (this.props.getLabel) {\n label = this.props.getLabel(value);\n } else if (this.props.options instanceof Array) {\n const entry = this.props.options.find((data: AutoSuggestData) => data.value === value);\n if (entry)\n label = entry.label;\n } else {\n Logger.logError(UiCore.loggerCategory(this), `props.getLabel should be provided when props.options is a function`);\n }\n\n return label;\n }\n\n private _handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n switch (e.key) {\n case SpecialKey.Enter:\n // istanbul ignore else\n if (this.props.onPressEnter)\n this.props.onPressEnter(e);\n break;\n case SpecialKey.Escape:\n // istanbul ignore else\n if (this.props.onPressEscape)\n this.props.onPressEscape(e);\n break;\n case SpecialKey.Tab:\n // istanbul ignore else\n if (this.props.onPressTab)\n this.props.onPressTab(e);\n break;\n }\n };\n\n private _theme = {\n container: \"uicore-autosuggest__container\",\n containerOpen: \"uicore-autosuggest__container--open\",\n input: \"iui-input uicore-autosuggest__input\",\n inputOpen: \"uicore-autosuggest__input--open\",\n inputFocused: \"uicore-autosuggest__input--focused\",\n suggestionsContainer: \"uicore-autosuggest__suggestions-container\",\n suggestionsContainerOpen: \"uicore-autosuggest__suggestions-container--open\",\n suggestionsList: \"uicore-autosuggest__suggestions-list\",\n suggestion: \"uicore-autosuggest__suggestion\",\n suggestionFirst: \"uicore-autosuggest__suggestion--first\",\n suggestionHighlighted: \"uicore-autosuggest__suggestion--highlighted\",\n sectionContainer: \"uicore-autosuggest__section-container\",\n sectionContainerFirst: \"uicore-autosuggest__section-container--first\",\n sectionTitle: \"uicore-autosuggest__section-title\",\n };\n\n public override render(): JSX.Element {\n const { inputValue, suggestions } = this.state;\n const { value, onChange, placeholder, options, onSuggestionSelected, setFocus, alwaysRenderSuggestions, // eslint-disable-line @typescript-eslint/no-unused-vars\n onPressEnter, onPressEscape, onPressTab, onInputFocus, getLabel, // eslint-disable-line @typescript-eslint/no-unused-vars\n getSuggestions, // eslint-disable-line deprecation/deprecation, @typescript-eslint/no-unused-vars\n renderInputComponent, renderSuggestionsContainer, onSuggestionsClearRequested, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...props } = this.props;\n const inputPlaceholder = (!inputValue) ? placeholder : undefined;\n\n const inputProps: ReactAutosuggest.InputProps<AutoSuggestData> = {\n ...props,\n value: inputValue,\n onChange: this._onChange,\n onFocus: this._onFocus,\n placeholder: inputPlaceholder,\n autoFocus: setFocus,\n };\n\n return (\n // The onKeyDown event handler is only being used to capture bubbled events\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div className={this.props.className} style={this.props.style} onKeyDown={this._handleKeyDown}>\n <ReactAutosuggest\n theme={this._theme}\n suggestions={suggestions}\n onSuggestionsFetchRequested={this._onSuggestionsFetchRequested}\n onSuggestionsClearRequested={this._onSuggestionsClearRequested}\n getSuggestionValue={this._getSuggestionValue}\n renderSuggestion={this._renderSuggestion}\n inputProps={inputProps}\n onSuggestionSelected={this._onSuggestionSelected}\n alwaysRenderSuggestions={alwaysRenderSuggestions}\n renderInputComponent={renderInputComponent}\n renderSuggestionsContainer={renderSuggestionsContainer}\n />\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"AutoSuggest.js","sourceRoot":"","sources":["../../../../src/core-react/autosuggest/AutoSuggest.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,8BAA4B;AAC5B,+BAA+B;AAC/B,sDAAsD;AACtD,sDAA6C;AAC7C,0DAAmD;AAEnD,sCAAmC;AAwEnC;;GAEG;AACH,MAAa,WAAY,SAAQ,KAAK,CAAC,aAGtC;IAGC,YAAY,KAAuB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;QAHP,eAAU,GAAG,KAAK,CAAC;QAqCnB,cAAS,GAAG,CAAC,CAAsC,EAAE,EAAE;YAC7D,IAAI,QAAQ,GAAG,EAAE,CAAC;YAElB,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,WAAW;gBACnD,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;iBAC7B,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK;gBAAE,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YAEnD,IAAI,CAAC,QAAQ,CAAC;gBACZ,UAAU,EAAE,QAAQ;aACrB,CAAC,CAAC;QACL,CAAC,CAAC;QAEM,aAAQ,GAAG,CAAC,CAAqC,EAAE,EAAE;YAC3D,uBAAuB;YACvB,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY;gBAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,C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IAAI,CAAC,QAAQ;YACtB,WAAW,EAAE,gBAAgB;YAC7B,SAAS,EAAE,QAAQ;SACpB,CAAC;QAEF,OAAO;QACL,2EAA2E;QAC3E,mEAAmE;QACnE,6BACE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,SAAS,EAAE,IAAI,CAAC,cAAc;YAE9B,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;AAzOD,kCAyOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module AutoSuggest\n */\n\nimport \"./AutoSuggest.scss\";\nimport * as React from \"react\";\nimport * as ReactAutosuggest from \"react-autosuggest\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { SpecialKey } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { UiCore } from \"../UiCore\";\n\n/** Data for the [[AutoSuggest]] options\n * @public\n */\nexport interface AutoSuggestData {\n /** Value of [[AutoSuggest]] option. */\n value: string;\n /** Label of [[AutoSuggest]] option. This is shown in the dropdown. */\n label: string;\n}\n\n/** Prototype for function returning AutoSuggestData\n * @public\n */\nexport type GetAutoSuggestDataFunc = (value: string) => AutoSuggestData[];\n\n/** Prototype for async function returning AutoSuggestData\n * @public\n */\nexport type AsyncGetAutoSuggestDataFunc = (\n value: string\n) => Promise<AutoSuggestData[]>;\n\n/** Properties for the [[AutoSuggest]] component.\n * @public\n */\nexport interface AutoSuggestProps\n extends React.InputHTMLAttributes<HTMLInputElement>,\n CommonProps {\n /** Optional input value override. */\n value?: string;\n /** Options for dropdown. */\n options?: AutoSuggestData[] | GetAutoSuggestDataFunc;\n /** Asynchronously calculate suggestions for any given input value. */\n getSuggestions?: AsyncGetAutoSuggestDataFunc;\n /** Gets a label associated with a given value */\n getLabel?: (value: string | undefined) => string;\n /** Handler for when suggested selected. */\n onSuggestionSelected: (selected: AutoSuggestData) => void;\n /** Handler for Enter key. */\n onPressEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n /** Handler for Escape key. */\n onPressEscape?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n /** Handler for Tab key. */\n onPressTab?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n /** Handler for input receiving focus. */\n onInputFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;\n /** Called every time you need to clear suggestions. */\n onSuggestionsClearRequested?: () => void;\n /** Indicates whether to set focus to the input element */\n setFocus?: boolean;\n\n /** Use it only if you need to customize the rendering of the input.\n * @internal\n */\n renderInputComponent?: any; // ReactAutosuggest.RenderInputComponent<AutoSuggestData>; NOTE: changed to \"any\" because build was failing with RenderInputComponent is not generic?\n /** Use it if you want to customize things inside the suggestions container beyond rendering the suggestions themselves.\n * @internal\n */\n renderSuggestionsContainer?: ReactAutosuggest.RenderSuggestionsContainer;\n\n /** @internal */\n alwaysRenderSuggestions?: boolean;\n}\n\n/** @internal */\ninterface AutoSuggestState {\n inputValue: string;\n suggestions: AutoSuggestData[];\n}\n\n/** Auto Suggest React component. Uses the react-autosuggest component internally.\n * @public\n */\nexport class AutoSuggest extends React.PureComponent<\n AutoSuggestProps,\n AutoSuggestState\n> {\n private _isMounted = false;\n\n constructor(props: AutoSuggestProps) {\n super(props);\n\n // Autosuggest is a controlled component.\n // This means that you need to provide an input value\n // and an onChange handler that updates this value (see below).\n // Suggestions also need to be provided to the Autosuggest,\n // and they are initially empty because the Autosuggest is closed.\n this.state = {\n inputValue: this.getLabel(props.value),\n suggestions: [],\n };\n }\n\n /** @internal */\n public override componentDidMount() {\n this._isMounted = true;\n }\n\n /** @internal */\n public override componentWillUnmount() {\n this._isMounted = false;\n }\n\n public override componentDidUpdate(prevProps: AutoSuggestProps) {\n if (\n this.props.value !== prevProps.value ||\n this.props.options !== prevProps.options\n ) {\n this.setState((_prevState, props) => ({\n inputValue: this.getLabel(props.value),\n }));\n }\n }\n\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n let newValue = \"\";\n\n if (e.target.tagName === \"LI\" && e.target.textContent)\n newValue = e.target.textContent;\n else if (e.target.value) newValue = e.target.value;\n\n this.setState({\n inputValue: newValue,\n });\n };\n\n private _onFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n // istanbul ignore else\n if (this.props.onInputFocus) this.props.onInputFocus(e);\n };\n\n /** Autosuggest will call this function every time you need to update suggestions. */\n private _onSuggestionsFetchRequested = async (\n request: ReactAutosuggest.SuggestionsFetchRequestedParams\n ): Promise<void> => {\n const value = request.value;\n const suggestions = await this._getSuggestions(value);\n\n if (this._isMounted) this.setState({ suggestions });\n };\n\n /** Autosuggest will call this function every time you need to clear suggestions. */\n private _onSuggestionsClearRequested = () => {\n this.setState({ suggestions: [] });\n this.props.onSuggestionsClearRequested &&\n this.props.onSuggestionsClearRequested();\n };\n\n private _onSuggestionSelected = (\n _event: React.FormEvent<any>,\n data: ReactAutosuggest.SuggestionSelectedEventData<AutoSuggestData>\n ): void => {\n this.props.onSuggestionSelected(data.suggestion);\n };\n\n /** Teach Autosuggest how to calculate suggestions for any given input value. */\n private _getSuggestions = async (\n value: string\n ): Promise<AutoSuggestData[]> => {\n if (typeof this.props.options === \"function\")\n return Promise.resolve(this.props.options(value));\n\n if (this.props.getSuggestions) return this.props.getSuggestions(value);\n\n if (this.props.options === undefined) {\n Logger.logError(\n UiCore.loggerCategory(this),\n `props.options or props.getSuggestions should be provided`\n );\n return Promise.resolve([]);\n }\n\n const inputValue = value.trim().toLowerCase();\n const inputLength = inputValue.length;\n\n return Promise.resolve(\n inputLength === 0\n ? /* istanbul ignore next */ []\n : this.props.options.filter((data: AutoSuggestData) => {\n return (\n data.label.toLowerCase().includes(inputValue) ||\n data.value.toLowerCase().includes(inputValue)\n );\n })\n );\n };\n\n /** When suggestion is clicked, Autosuggest needs to populate the input based on the clicked suggestion. */\n private _getSuggestionValue = (suggestion: AutoSuggestData) =>\n suggestion.label;\n\n /** Render each suggestion. */\n private _renderSuggestion = (suggestion: AutoSuggestData) => (\n <span>{suggestion.label}</span>\n );\n\n private getLabel(value: string | undefined): string {\n let label = \"\";\n\n if (this.props.getLabel) {\n label = this.props.getLabel(value);\n } else if (this.props.options instanceof Array) {\n const entry = this.props.options.find(\n (data: AutoSuggestData) => data.value === value\n );\n if (entry) label = entry.label;\n } else {\n Logger.logError(\n UiCore.loggerCategory(this),\n `props.getLabel should be provided when props.options is a function`\n );\n }\n\n return label;\n }\n\n private _handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n switch (e.key) {\n case SpecialKey.Enter:\n // istanbul ignore else\n if (this.props.onPressEnter) this.props.onPressEnter(e);\n break;\n case SpecialKey.Escape:\n // istanbul ignore else\n if (this.props.onPressEscape) this.props.onPressEscape(e);\n break;\n case SpecialKey.Tab:\n // istanbul ignore else\n if (this.props.onPressTab) this.props.onPressTab(e);\n break;\n }\n };\n\n private _theme = {\n container: \"uicore-autosuggest__container\",\n containerOpen: \"uicore-autosuggest__container--open\",\n input: \"iui-input uicore-autosuggest__input\",\n inputOpen: \"uicore-autosuggest__input--open\",\n inputFocused: \"uicore-autosuggest__input--focused\",\n suggestionsContainer: \"uicore-autosuggest__suggestions-container\",\n suggestionsContainerOpen: \"uicore-autosuggest__suggestions-container--open\",\n suggestionsList: \"uicore-autosuggest__suggestions-list\",\n suggestion: \"uicore-autosuggest__suggestion\",\n suggestionFirst: \"uicore-autosuggest__suggestion--first\",\n suggestionHighlighted: \"uicore-autosuggest__suggestion--highlighted\",\n sectionContainer: \"uicore-autosuggest__section-container\",\n sectionContainerFirst: \"uicore-autosuggest__section-container--first\",\n sectionTitle: \"uicore-autosuggest__section-title\",\n };\n\n public override render(): React.ReactElement {\n const { inputValue, suggestions } = this.state;\n const {\n value,\n onChange,\n placeholder,\n options,\n onSuggestionSelected,\n setFocus,\n alwaysRenderSuggestions,\n onPressEnter,\n onPressEscape,\n onPressTab,\n onInputFocus,\n getLabel,\n getSuggestions,\n renderInputComponent,\n renderSuggestionsContainer,\n onSuggestionsClearRequested,\n ...props\n } = this.props;\n const inputPlaceholder = !inputValue ? placeholder : undefined;\n\n const inputProps: ReactAutosuggest.InputProps<AutoSuggestData> = {\n ...props,\n value: inputValue,\n onChange: this._onChange,\n onFocus: this._onFocus,\n placeholder: inputPlaceholder,\n autoFocus: setFocus,\n };\n\n return (\n // The onKeyDown event handler is only being used to capture bubbled events\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n className={this.props.className}\n style={this.props.style}\n onKeyDown={this._handleKeyDown}\n >\n <ReactAutosuggest\n theme={this._theme}\n suggestions={suggestions}\n onSuggestionsFetchRequested={this._onSuggestionsFetchRequested}\n onSuggestionsClearRequested={this._onSuggestionsClearRequested}\n getSuggestionValue={this._getSuggestionValue}\n renderSuggestion={this._renderSuggestion}\n inputProps={inputProps}\n onSuggestionSelected={this._onSuggestionSelected}\n alwaysRenderSuggestions={alwaysRenderSuggestions}\n renderInputComponent={renderInputComponent}\n renderSuggestionsContainer={renderSuggestionsContainer}\n />\n </div>\n );\n }\n}\n"]}
@@ -14,6 +14,6 @@ export interface BadgeProps extends CommonProps {
14
14
  * @internal
15
15
  */
16
16
  export declare class Badge extends React.PureComponent<BadgeProps> {
17
- render(): JSX.Element;
17
+ render(): React.ReactElement;
18
18
  }
19
19
  //# sourceMappingURL=Badge.d.ts.map