@itwin/core-react 4.12.0 → 4.13.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 (374) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  3. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  4. package/lib/cjs/core-react/autosuggest/AutoSuggest.js +2 -2
  5. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  6. package/lib/cjs/core-react/base/Centered.d.ts +1 -0
  7. package/lib/cjs/core-react/base/Centered.d.ts.map +1 -1
  8. package/lib/cjs/core-react/base/Centered.js +2 -0
  9. package/lib/cjs/core-react/base/Centered.js.map +1 -1
  10. package/lib/cjs/core-react/base/Div.d.ts +2 -0
  11. package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
  12. package/lib/cjs/core-react/base/Div.js +2 -0
  13. package/lib/cjs/core-react/base/Div.js.map +1 -1
  14. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +1 -0
  15. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  16. package/lib/cjs/core-react/base/DivWithOutsideClick.js +1 -0
  17. package/lib/cjs/core-react/base/DivWithOutsideClick.js.map +1 -1
  18. package/lib/cjs/core-react/base/FillCentered.d.ts +1 -0
  19. package/lib/cjs/core-react/base/FillCentered.d.ts.map +1 -1
  20. package/lib/cjs/core-react/base/FillCentered.js +2 -0
  21. package/lib/cjs/core-react/base/FillCentered.js.map +1 -1
  22. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +1 -0
  23. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  24. package/lib/cjs/core-react/base/FlexWrapContainer.js +2 -0
  25. package/lib/cjs/core-react/base/FlexWrapContainer.js.map +1 -1
  26. package/lib/cjs/core-react/base/Gap.d.ts +2 -0
  27. package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
  28. package/lib/cjs/core-react/base/Gap.js +3 -1
  29. package/lib/cjs/core-react/base/Gap.js.map +1 -1
  30. package/lib/cjs/core-react/base/ScrollView.d.ts +1 -0
  31. package/lib/cjs/core-react/base/ScrollView.d.ts.map +1 -1
  32. package/lib/cjs/core-react/base/ScrollView.js +2 -0
  33. package/lib/cjs/core-react/base/ScrollView.js.map +1 -1
  34. package/lib/cjs/core-react/button/UnderlinedButton.d.ts +2 -0
  35. package/lib/cjs/core-react/button/UnderlinedButton.d.ts.map +1 -1
  36. package/lib/cjs/core-react/button/UnderlinedButton.js +2 -0
  37. package/lib/cjs/core-react/button/UnderlinedButton.js.map +1 -1
  38. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +4 -0
  39. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  40. package/lib/cjs/core-react/checklistbox/CheckListBox.js +4 -0
  41. package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
  42. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  43. package/lib/cjs/core-react/contextmenu/ContextMenu.js +1 -2
  44. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  45. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js +3 -5
  46. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  47. package/lib/cjs/core-react/dialog/Dialog.d.ts +3 -0
  48. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  49. package/lib/cjs/core-react/dialog/Dialog.js +17 -3
  50. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  51. package/lib/cjs/core-react/dialog/GlobalDialog.d.ts +3 -0
  52. package/lib/cjs/core-react/dialog/GlobalDialog.d.ts.map +1 -1
  53. package/lib/cjs/core-react/dialog/GlobalDialog.js +7 -3
  54. package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
  55. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +4 -2
  56. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  57. package/lib/cjs/core-react/elementseparator/ElementSeparator.js +4 -2
  58. package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
  59. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +3 -3
  60. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  61. package/lib/cjs/core-react/expandable/ExpandableList.js +5 -2
  62. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  63. package/lib/cjs/core-react/hocs/withOnOutsideClick.js +1 -2
  64. package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
  65. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  66. package/lib/cjs/core-react/icons/IconComponent.js +22 -12
  67. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  68. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +3 -2
  69. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  70. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +3 -2
  71. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  72. package/lib/cjs/core-react/inputs/InputLabel.d.ts +2 -0
  73. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  74. package/lib/cjs/core-react/inputs/InputLabel.js +5 -0
  75. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  76. package/lib/cjs/core-react/inputs/InputStatus.d.ts +1 -0
  77. package/lib/cjs/core-react/inputs/InputStatus.d.ts.map +1 -1
  78. package/lib/cjs/core-react/inputs/InputStatus.js +1 -0
  79. package/lib/cjs/core-react/inputs/InputStatus.js.map +1 -1
  80. package/lib/cjs/core-react/inputs/LabeledComponentProps.d.ts +2 -0
  81. package/lib/cjs/core-react/inputs/LabeledComponentProps.d.ts.map +1 -1
  82. package/lib/cjs/core-react/inputs/LabeledComponentProps.js.map +1 -1
  83. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +2 -0
  84. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  85. package/lib/cjs/core-react/inputs/iconinput/IconInput.js +3 -0
  86. package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
  87. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +3 -0
  88. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  89. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +1 -0
  90. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  91. package/lib/cjs/core-react/l10n/usePackageTranslation.js +1 -1
  92. package/lib/cjs/core-react/l10n/usePackageTranslation.js.map +1 -1
  93. package/lib/cjs/core-react/listbox/Listbox.d.ts +14 -14
  94. package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
  95. package/lib/cjs/core-react/listbox/Listbox.js +8 -10
  96. package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
  97. package/lib/cjs/core-react/loading/LoadingBar.d.ts +3 -2
  98. package/lib/cjs/core-react/loading/LoadingBar.d.ts.map +1 -1
  99. package/lib/cjs/core-react/loading/LoadingBar.js +2 -2
  100. package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
  101. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +3 -2
  102. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts.map +1 -1
  103. package/lib/cjs/core-react/loading/LoadingPrompt.js +2 -2
  104. package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
  105. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +4 -2
  106. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  107. package/lib/cjs/core-react/loading/LoadingSpinner.js +2 -2
  108. package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
  109. package/lib/cjs/core-react/loading/LoadingStatus.d.ts +3 -2
  110. package/lib/cjs/core-react/loading/LoadingStatus.d.ts.map +1 -1
  111. package/lib/cjs/core-react/loading/LoadingStatus.js +2 -2
  112. package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
  113. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  114. package/lib/cjs/core-react/messagebox/MessageBox.js +3 -1
  115. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  116. package/lib/cjs/core-react/notification/MessageRenderer.js +1 -1
  117. package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
  118. package/lib/cjs/core-react/popup/Popup.js +4 -8
  119. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  120. package/lib/cjs/core-react/radialmenu/Annulus.d.ts +7 -8
  121. package/lib/cjs/core-react/radialmenu/Annulus.d.ts.map +1 -1
  122. package/lib/cjs/core-react/radialmenu/Annulus.js +7 -8
  123. package/lib/cjs/core-react/radialmenu/Annulus.js.map +1 -1
  124. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +0 -1
  125. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  126. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  127. package/lib/cjs/core-react/searchbox/SearchBox.d.ts +3 -3
  128. package/lib/cjs/core-react/searchbox/SearchBox.d.ts.map +1 -1
  129. package/lib/cjs/core-react/searchbox/SearchBox.js +2 -2
  130. package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
  131. package/lib/cjs/core-react/settings/SettingsContainer.d.ts.map +1 -1
  132. package/lib/cjs/core-react/settings/SettingsContainer.js +8 -4
  133. package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
  134. package/lib/cjs/core-react/settings/SettingsManager.d.ts +10 -7
  135. package/lib/cjs/core-react/settings/SettingsManager.d.ts.map +1 -1
  136. package/lib/cjs/core-react/settings/SettingsManager.js +14 -12
  137. package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
  138. package/lib/cjs/core-react/tabs/Tabs.d.ts +5 -5
  139. package/lib/cjs/core-react/tabs/Tabs.d.ts.map +1 -1
  140. package/lib/cjs/core-react/tabs/Tabs.js +1 -0
  141. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  142. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +1 -0
  143. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  144. package/lib/cjs/core-react/tabs/VerticalTabs.js +2 -0
  145. package/lib/cjs/core-react/tabs/VerticalTabs.js.map +1 -1
  146. package/lib/cjs/core-react/text/BlockText.d.ts +1 -0
  147. package/lib/cjs/core-react/text/BlockText.d.ts.map +1 -1
  148. package/lib/cjs/core-react/text/BlockText.js +2 -0
  149. package/lib/cjs/core-react/text/BlockText.js.map +1 -1
  150. package/lib/cjs/core-react/text/BodyText.d.ts +1 -1
  151. package/lib/cjs/core-react/text/BodyText.d.ts.map +1 -1
  152. package/lib/cjs/core-react/text/BodyText.js +2 -1
  153. package/lib/cjs/core-react/text/BodyText.js.map +1 -1
  154. package/lib/cjs/core-react/text/DisabledText.d.ts +1 -0
  155. package/lib/cjs/core-react/text/DisabledText.d.ts.map +1 -1
  156. package/lib/cjs/core-react/text/DisabledText.js +2 -1
  157. package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
  158. package/lib/cjs/core-react/text/MutedText.d.ts.map +1 -1
  159. package/lib/cjs/core-react/text/MutedText.js +1 -0
  160. package/lib/cjs/core-react/text/MutedText.js.map +1 -1
  161. package/lib/cjs/core-react/text/StyledText.d.ts +1 -0
  162. package/lib/cjs/core-react/text/StyledText.d.ts.map +1 -1
  163. package/lib/cjs/core-react/text/StyledText.js.map +1 -1
  164. package/lib/cjs/core-react/text/TextProps.d.ts +1 -0
  165. package/lib/cjs/core-react/text/TextProps.d.ts.map +1 -1
  166. package/lib/cjs/core-react/text/TextProps.js.map +1 -1
  167. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  168. package/lib/cjs/core-react/tree/ExpansionToggle.js +1 -1
  169. package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
  170. package/lib/cjs/core-react/tree/Node.js +1 -2
  171. package/lib/cjs/core-react/tree/Node.js.map +1 -1
  172. package/lib/cjs/core-react/utils/IconWebComponent.js +1 -1
  173. package/lib/cjs/core-react/utils/IconWebComponent.js.map +1 -1
  174. package/lib/cjs/core-react/utils/getCssVariable.js +1 -1
  175. package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
  176. package/lib/cjs/core-react/utils/getObjectClassName.js +2 -3
  177. package/lib/cjs/core-react/utils/getObjectClassName.js.map +1 -1
  178. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.d.ts +4 -1
  179. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
  180. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js +5 -2
  181. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
  182. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.d.ts +1 -1
  183. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +2 -3
  184. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  185. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  186. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +12 -16
  187. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  188. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  189. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  190. package/lib/esm/core-react/autosuggest/AutoSuggest.js +1 -1
  191. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  192. package/lib/esm/core-react/base/Centered.d.ts +1 -0
  193. package/lib/esm/core-react/base/Centered.d.ts.map +1 -1
  194. package/lib/esm/core-react/base/Centered.js +2 -0
  195. package/lib/esm/core-react/base/Centered.js.map +1 -1
  196. package/lib/esm/core-react/base/Div.d.ts +2 -0
  197. package/lib/esm/core-react/base/Div.d.ts.map +1 -1
  198. package/lib/esm/core-react/base/Div.js +2 -0
  199. package/lib/esm/core-react/base/Div.js.map +1 -1
  200. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +1 -0
  201. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  202. package/lib/esm/core-react/base/DivWithOutsideClick.js +1 -0
  203. package/lib/esm/core-react/base/DivWithOutsideClick.js.map +1 -1
  204. package/lib/esm/core-react/base/FillCentered.d.ts +1 -0
  205. package/lib/esm/core-react/base/FillCentered.d.ts.map +1 -1
  206. package/lib/esm/core-react/base/FillCentered.js +2 -0
  207. package/lib/esm/core-react/base/FillCentered.js.map +1 -1
  208. package/lib/esm/core-react/base/FlexWrapContainer.d.ts +1 -0
  209. package/lib/esm/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  210. package/lib/esm/core-react/base/FlexWrapContainer.js +2 -0
  211. package/lib/esm/core-react/base/FlexWrapContainer.js.map +1 -1
  212. package/lib/esm/core-react/base/Gap.d.ts +2 -0
  213. package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
  214. package/lib/esm/core-react/base/Gap.js +3 -1
  215. package/lib/esm/core-react/base/Gap.js.map +1 -1
  216. package/lib/esm/core-react/base/ScrollView.d.ts +1 -0
  217. package/lib/esm/core-react/base/ScrollView.d.ts.map +1 -1
  218. package/lib/esm/core-react/base/ScrollView.js +2 -0
  219. package/lib/esm/core-react/base/ScrollView.js.map +1 -1
  220. package/lib/esm/core-react/button/UnderlinedButton.d.ts +2 -0
  221. package/lib/esm/core-react/button/UnderlinedButton.d.ts.map +1 -1
  222. package/lib/esm/core-react/button/UnderlinedButton.js +2 -0
  223. package/lib/esm/core-react/button/UnderlinedButton.js.map +1 -1
  224. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +4 -0
  225. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  226. package/lib/esm/core-react/checklistbox/CheckListBox.js +4 -0
  227. package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
  228. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  229. package/lib/esm/core-react/contextmenu/ContextMenu.js +1 -2
  230. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  231. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js +3 -5
  232. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  233. package/lib/esm/core-react/dialog/Dialog.d.ts +3 -0
  234. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  235. package/lib/esm/core-react/dialog/Dialog.js +17 -3
  236. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  237. package/lib/esm/core-react/dialog/GlobalDialog.d.ts +3 -0
  238. package/lib/esm/core-react/dialog/GlobalDialog.d.ts.map +1 -1
  239. package/lib/esm/core-react/dialog/GlobalDialog.js +7 -3
  240. package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
  241. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +4 -2
  242. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  243. package/lib/esm/core-react/elementseparator/ElementSeparator.js +4 -2
  244. package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
  245. package/lib/esm/core-react/expandable/ExpandableList.d.ts +3 -3
  246. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  247. package/lib/esm/core-react/expandable/ExpandableList.js +5 -2
  248. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  249. package/lib/esm/core-react/hocs/withOnOutsideClick.js +1 -2
  250. package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
  251. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  252. package/lib/esm/core-react/icons/IconComponent.js +21 -11
  253. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  254. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +3 -2
  255. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  256. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +3 -2
  257. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  258. package/lib/esm/core-react/inputs/InputLabel.d.ts +2 -0
  259. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  260. package/lib/esm/core-react/inputs/InputLabel.js +5 -0
  261. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  262. package/lib/esm/core-react/inputs/InputStatus.d.ts +1 -0
  263. package/lib/esm/core-react/inputs/InputStatus.d.ts.map +1 -1
  264. package/lib/esm/core-react/inputs/InputStatus.js +1 -0
  265. package/lib/esm/core-react/inputs/InputStatus.js.map +1 -1
  266. package/lib/esm/core-react/inputs/LabeledComponentProps.d.ts +2 -0
  267. package/lib/esm/core-react/inputs/LabeledComponentProps.d.ts.map +1 -1
  268. package/lib/esm/core-react/inputs/LabeledComponentProps.js.map +1 -1
  269. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +2 -0
  270. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  271. package/lib/esm/core-react/inputs/iconinput/IconInput.js +3 -0
  272. package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
  273. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +3 -0
  274. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  275. package/lib/esm/core-react/inputs/numberinput/NumberInput.js +1 -0
  276. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  277. package/lib/esm/core-react/l10n/usePackageTranslation.js +1 -1
  278. package/lib/esm/core-react/l10n/usePackageTranslation.js.map +1 -1
  279. package/lib/esm/core-react/listbox/Listbox.d.ts +14 -14
  280. package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
  281. package/lib/esm/core-react/listbox/Listbox.js +8 -10
  282. package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
  283. package/lib/esm/core-react/loading/LoadingBar.d.ts +3 -2
  284. package/lib/esm/core-react/loading/LoadingBar.d.ts.map +1 -1
  285. package/lib/esm/core-react/loading/LoadingBar.js +2 -2
  286. package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
  287. package/lib/esm/core-react/loading/LoadingPrompt.d.ts +3 -2
  288. package/lib/esm/core-react/loading/LoadingPrompt.d.ts.map +1 -1
  289. package/lib/esm/core-react/loading/LoadingPrompt.js +2 -2
  290. package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
  291. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +4 -2
  292. package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  293. package/lib/esm/core-react/loading/LoadingSpinner.js +2 -2
  294. package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
  295. package/lib/esm/core-react/loading/LoadingStatus.d.ts +3 -2
  296. package/lib/esm/core-react/loading/LoadingStatus.d.ts.map +1 -1
  297. package/lib/esm/core-react/loading/LoadingStatus.js +2 -2
  298. package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
  299. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  300. package/lib/esm/core-react/messagebox/MessageBox.js +3 -1
  301. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  302. package/lib/esm/core-react/notification/MessageRenderer.js +1 -1
  303. package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
  304. package/lib/esm/core-react/popup/Popup.js +4 -8
  305. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  306. package/lib/esm/core-react/radialmenu/Annulus.d.ts +7 -8
  307. package/lib/esm/core-react/radialmenu/Annulus.d.ts.map +1 -1
  308. package/lib/esm/core-react/radialmenu/Annulus.js +7 -8
  309. package/lib/esm/core-react/radialmenu/Annulus.js.map +1 -1
  310. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +0 -1
  311. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  312. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  313. package/lib/esm/core-react/searchbox/SearchBox.d.ts +3 -3
  314. package/lib/esm/core-react/searchbox/SearchBox.d.ts.map +1 -1
  315. package/lib/esm/core-react/searchbox/SearchBox.js +2 -2
  316. package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
  317. package/lib/esm/core-react/settings/SettingsContainer.d.ts.map +1 -1
  318. package/lib/esm/core-react/settings/SettingsContainer.js +8 -4
  319. package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
  320. package/lib/esm/core-react/settings/SettingsManager.d.ts +10 -7
  321. package/lib/esm/core-react/settings/SettingsManager.d.ts.map +1 -1
  322. package/lib/esm/core-react/settings/SettingsManager.js +13 -10
  323. package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
  324. package/lib/esm/core-react/tabs/Tabs.d.ts +5 -5
  325. package/lib/esm/core-react/tabs/Tabs.d.ts.map +1 -1
  326. package/lib/esm/core-react/tabs/Tabs.js +1 -0
  327. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  328. package/lib/esm/core-react/tabs/VerticalTabs.d.ts +1 -0
  329. package/lib/esm/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  330. package/lib/esm/core-react/tabs/VerticalTabs.js +2 -0
  331. package/lib/esm/core-react/tabs/VerticalTabs.js.map +1 -1
  332. package/lib/esm/core-react/text/BlockText.d.ts +1 -0
  333. package/lib/esm/core-react/text/BlockText.d.ts.map +1 -1
  334. package/lib/esm/core-react/text/BlockText.js +2 -0
  335. package/lib/esm/core-react/text/BlockText.js.map +1 -1
  336. package/lib/esm/core-react/text/BodyText.d.ts +1 -1
  337. package/lib/esm/core-react/text/BodyText.d.ts.map +1 -1
  338. package/lib/esm/core-react/text/BodyText.js +2 -1
  339. package/lib/esm/core-react/text/BodyText.js.map +1 -1
  340. package/lib/esm/core-react/text/DisabledText.d.ts +1 -0
  341. package/lib/esm/core-react/text/DisabledText.d.ts.map +1 -1
  342. package/lib/esm/core-react/text/DisabledText.js +2 -1
  343. package/lib/esm/core-react/text/DisabledText.js.map +1 -1
  344. package/lib/esm/core-react/text/MutedText.d.ts.map +1 -1
  345. package/lib/esm/core-react/text/MutedText.js +1 -0
  346. package/lib/esm/core-react/text/MutedText.js.map +1 -1
  347. package/lib/esm/core-react/text/StyledText.d.ts +1 -0
  348. package/lib/esm/core-react/text/StyledText.d.ts.map +1 -1
  349. package/lib/esm/core-react/text/StyledText.js.map +1 -1
  350. package/lib/esm/core-react/text/TextProps.d.ts +1 -0
  351. package/lib/esm/core-react/text/TextProps.d.ts.map +1 -1
  352. package/lib/esm/core-react/text/TextProps.js.map +1 -1
  353. package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  354. package/lib/esm/core-react/tree/ExpansionToggle.js +1 -1
  355. package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
  356. package/lib/esm/core-react/tree/Node.js +1 -2
  357. package/lib/esm/core-react/tree/Node.js.map +1 -1
  358. package/lib/esm/core-react/utils/IconWebComponent.js +1 -1
  359. package/lib/esm/core-react/utils/IconWebComponent.js.map +1 -1
  360. package/lib/esm/core-react/utils/getCssVariable.js +1 -1
  361. package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
  362. package/lib/esm/core-react/utils/getObjectClassName.js +2 -3
  363. package/lib/esm/core-react/utils/getObjectClassName.js.map +1 -1
  364. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.d.ts +4 -1
  365. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
  366. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js +3 -1
  367. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
  368. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.d.ts +1 -1
  369. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +2 -3
  370. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  371. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  372. package/lib/esm/core-react/utils/hooks/useResizeObserver.js +13 -17
  373. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  374. package/package.json +7 -31
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsContainer.js","sourceRoot":"","sources":["../../../../src/core-react/settings/SettingsContainer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;;;;;;;;;6GAW6G;AAE7G;;GAEG;AACH,MAAM,UAAU,qCAAqC,CACnD,eAAgC,EAChC,YAA2E;IAE3E,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,mCAAmC,GAAG,CAAC,EAC3C,SAAS,EACT,aAAa,GAC0B,EAAE,EAAE;YAC3C,YAAY,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QACzC,CAAC,CAAC;QACF,OAAO,eAAe,CAAC,+BAA+B,CAAC,WAAW,CAChE,mCAAmC,CACpC,CAAC;IACJ,CAAC,EAAE,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qCAAqC,CACnD,eAAgC,EAChC,YAGS;IAET,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,kCAAkC,GAAG,CAAC,EAC1C,gBAAgB,EAChB,sBAAsB,GACgB,EAAE,EAAE;YAC1C,YAAY,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,CAAC;QACzD,CAAC,CAAC;QACF,OAAO,eAAe,CAAC,8BAA8B,CAAC,WAAW,CAC/D,kCAAkC,CACn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B;YAC3C,oBAAC,YAAY,IACX,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,GAC5B,CACE;QACN,6BAAK,SAAS,EAAC,+BAA+B;YAC3C,UAAU,IAAI,CACb,6BAAK,SAAS,EAAC,sCAAsC;gBACnD,8BAAM,SAAS,EAAC,qCAAqC,IAClD,OAAO,CAAC,KAAK,CACT;gBACN,OAAO,CAAC,QAAQ,IAAI,CACnB,8BAAM,SAAS,EAAC,yCAAyC,IACtD,OAAO,CAAC,QAAQ,CACZ,CACR,CACG,CACP;YACD,6BAAK,SAAS,EAAC,wCAAwC,IACpD,OAAO,CAAC,IAAI,CACT,CACF,CACF,CACP,CAAC;AACJ,CAAC,CAAC","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 Settings\n */\n\nimport \"./SettingsContainer.scss\";\nimport * as React from \"react\";\nimport type {\n ActivateSettingsTabEventArgs,\n ProcessSettingsContainerCloseEventArgs,\n ProcessSettingsTabActivationEventArgs,\n SettingsManager,\n SettingsTabEntry,\n} from \"./SettingsManager\";\nimport { VerticalTabs } from \"../tabs/VerticalTabs\";\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\n\n/* ---------------------------------------------------------------------------------------------------\n// A typical implementation of a saveFunction callback\nconst saveChanges = React.useCallback((afterSaveFunction: (args: any) => void, args?: any) => {\n if (dataIsDirty) {\n // prompt user to save changes passing in function and arguments to call after saving changes.\n UiFramework.dialogs.modal.openDialog(<CustomSavePromptModalDialog customProps={customProps}\n onDialogCloseArgs={args} onDialogClose={afterSaveFunction} />);\n return;\n }\n afterSaveFunction(args);\n}, []);\n---------------------------------------------------------------------------------------------------------- */\n\n/** Hook to use within Settings Page component to allow saving the current page's data before the Setting Container is closed.\n * @public\n */\nexport function useSaveBeforeClosingSettingsContainer(\n settingsManager: SettingsManager,\n saveFunction: (closeFunc: (args: any) => void, closeFuncArgs?: any) => void\n) {\n React.useEffect(() => {\n const handleProcessSettingsContainerClose = ({\n closeFunc,\n closeFuncArgs,\n }: ProcessSettingsContainerCloseEventArgs) => {\n saveFunction(closeFunc, closeFuncArgs);\n };\n return settingsManager.onProcessSettingsContainerClose.addListener(\n handleProcessSettingsContainerClose\n );\n }, [saveFunction, settingsManager]);\n}\n\n/** Hook to use within Settings Page component to allow saving the current page's data before loading to the requested Setting Tab's page.\n * @public\n */\nexport function useSaveBeforeActivatingNewSettingsTab(\n settingsManager: SettingsManager,\n saveFunction: (\n tabSelectionFunc: (args: any) => void,\n requestedSettingsTabId?: string\n ) => void\n) {\n React.useEffect(() => {\n const handleProcessSettingsTabActivation = ({\n tabSelectionFunc,\n requestedSettingsTabId,\n }: ProcessSettingsTabActivationEventArgs) => {\n saveFunction(tabSelectionFunc, requestedSettingsTabId);\n };\n return settingsManager.onProcessSettingsTabActivation.addListener(\n handleProcessSettingsTabActivation\n );\n }, [saveFunction, settingsManager]);\n}\n\n/**\n * @public\n */\nexport interface SettingsContainerProps {\n tabs: SettingsTabEntry[];\n // sets tab to set as active tab\n currentSettingsTab?: SettingsTabEntry;\n // If plugging into a SPA and you need to modify the route, you can pass in additional logic here\n onSettingsTabSelected?: (tab: SettingsTabEntry) => void;\n // The SettingsManager that can have event handlers registered against it so pages can save its settings before the page is closed.\n settingsManager: SettingsManager;\n // if true show tab label as header above page contents.\n showHeader?: boolean;\n}\n\n/**\n * SettingsContainer component that displays Setting Tabs on Left and the P\n * Note: that SettingsContainer is not rendered if tabs array is empty\n * @public\n */\nexport const SettingsContainer = ({\n tabs,\n onSettingsTabSelected,\n currentSettingsTab,\n settingsManager,\n showHeader,\n}: SettingsContainerProps) => {\n // sort the tabs based on itemPriority\n tabs = tabs.sort((a, b) => a.itemPriority - b.itemPriority);\n\n const [openTab, setOpenTab] = React.useState(() => {\n if (\n currentSettingsTab &&\n !ConditionalBooleanValue.getValue(currentSettingsTab.isDisabled)\n )\n return currentSettingsTab;\n else return tabs[0];\n });\n\n const processTabSelection = React.useCallback(\n (tab: SettingsTabEntry) => {\n if (ConditionalBooleanValue.getValue(tab.isDisabled)) return;\n onSettingsTabSelected && onSettingsTabSelected(tab);\n setOpenTab(tab);\n },\n [onSettingsTabSelected]\n );\n\n const processTabSelectionById = React.useCallback(\n (tabId: string) => {\n const tabToActivate = tabs.find((tab) => tab.tabId === tabId);\n tabToActivate && processTabSelection(tabToActivate);\n },\n [processTabSelection, tabs]\n );\n\n const onActivateTab = React.useCallback(\n (tabIndex: number) => {\n const selectedTab = tabs[tabIndex];\n if (openTab && openTab.pageWillHandleCloseRequest)\n settingsManager.onProcessSettingsTabActivation.emit({\n requestedSettingsTabId: selectedTab.tabId,\n tabSelectionFunc: processTabSelectionById,\n });\n else processTabSelection(selectedTab);\n },\n [\n openTab,\n processTabSelection,\n processTabSelectionById,\n settingsManager,\n tabs,\n ]\n );\n\n React.useEffect(() => {\n const handleActivateSettingsTab = ({\n settingsTabId,\n }: ActivateSettingsTabEventArgs) => {\n const idToFind = settingsTabId.toLowerCase();\n let tabToActivate = tabs.find(\n (tab) => tab.tabId.toLowerCase() === idToFind\n );\n if (!tabToActivate)\n tabToActivate = tabs.find(\n (tab) => tab.label.toLowerCase() === idToFind\n );\n // istanbul ignore else\n if (tabToActivate) {\n if (openTab && openTab.pageWillHandleCloseRequest)\n settingsManager.onProcessSettingsTabActivation.emit({\n requestedSettingsTabId: tabToActivate.tabId,\n tabSelectionFunc: processTabSelectionById,\n });\n else processTabSelection(tabToActivate);\n }\n };\n\n return settingsManager.onActivateSettingsTab.addListener(\n handleActivateSettingsTab\n );\n }, [\n openTab,\n processTabSelection,\n processTabSelectionById,\n settingsManager,\n settingsManager.onActivateSettingsTab,\n tabs,\n ]);\n\n React.useEffect(() => {\n const handleSettingsContainerClose = ({\n closeFunc,\n closeFuncArgs,\n }: ProcessSettingsContainerCloseEventArgs) => {\n if (openTab && openTab.pageWillHandleCloseRequest)\n settingsManager.onProcessSettingsContainerClose.emit({\n closeFunc,\n closeFuncArgs,\n });\n else closeFunc(closeFuncArgs);\n };\n return settingsManager.onCloseSettingsContainer.addListener(\n handleSettingsContainerClose\n );\n }, [\n openTab,\n processTabSelection,\n settingsManager,\n settingsManager.onActivateSettingsTab,\n tabs,\n ]);\n\n const labels = tabs.map((tab) => {\n return {\n label: tab.label,\n subLabel: tab.subLabel,\n icon: tab.icon,\n tooltip: tab.tooltip,\n tabId: tab.tabId,\n disabled: ConditionalBooleanValue.getValue(tab.isDisabled),\n };\n });\n const activeIndex = tabs.findIndex((tab) => tab.tabId === openTab.tabId);\n return (\n <div className=\"core-settings-container\">\n <div className=\"core-settings-container-left\">\n <VerticalTabs\n labels={labels}\n activeIndex={activeIndex}\n onActivateTab={onActivateTab}\n />\n </div>\n <div className=\"core-settings-container-right\">\n {showHeader && (\n <div className=\"core-settings-container-right-header\">\n <span className=\"core-settings-container-main-header\">\n {openTab.label}\n </span>\n {openTab.subLabel && (\n <span className=\"core-settings-container-main-sub-header\">\n {openTab.subLabel}\n </span>\n )}\n </div>\n )}\n <div className=\"core-settings-container-right-contents\">\n {openTab.page}\n </div>\n </div>\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"SettingsContainer.js","sourceRoot":"","sources":["../../../../src/core-react/settings/SettingsContainer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;;;;;;;;;6GAW6G;AAE7G;;GAEG;AACH,MAAM,UAAU,qCAAqC,CACnD,eAAgC,EAChC,YAA2E;IAE3E,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,m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,eAAe;QACf,eAAe,CAAC,qBAAqB;QACrC,IAAI;KACL,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QAC9B,OAAO;YACL,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,QAAQ,EAAE,uBAAuB,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC;SAC3D,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;IACzE,OAAO,CACL,6BAAK,SAAS,EAAC,yBAAyB;QACtC,6BAAK,SAAS,EAAC,8BAA8B;YAE3C,oBAAC,YAAY,IACX,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,GAC5B,CACE;QACN,6BAAK,SAAS,EAAC,+BAA+B;YAC3C,UAAU,IAAI,CACb,6BAAK,SAAS,EAAC,sCAAsC;gBACnD,8BAAM,SAAS,EAAC,qCAAqC,IAClD,OAAO,CAAC,KAAK,CACT;gBACN,OAAO,CAAC,QAAQ,IAAI,CACnB,8BAAM,SAAS,EAAC,yCAAyC,IACtD,OAAO,CAAC,QAAQ,CACZ,CACR,CACG,CACP;YACD,6BAAK,SAAS,EAAC,wCAAwC,IACpD,OAAO,CAAC,IAAI,CACT,CACF,CACF,CACP,CAAC;AACJ,CAAC,CAAC","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 Settings\n */\n\nimport \"./SettingsContainer.scss\";\nimport * as React from \"react\";\nimport type {\n ActivateSettingsTabEventArgs,\n ProcessSettingsContainerCloseEventArgs,\n ProcessSettingsTabActivationEventArgs,\n SettingsManager,\n SettingsTabEntry,\n} from \"./SettingsManager\";\nimport { VerticalTabs } from \"../tabs/VerticalTabs\";\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\n\n/* ---------------------------------------------------------------------------------------------------\n// A typical implementation of a saveFunction callback\nconst saveChanges = React.useCallback((afterSaveFunction: (args: any) => void, args?: any) => {\n if (dataIsDirty) {\n // prompt user to save changes passing in function and arguments to call after saving changes.\n UiFramework.dialogs.modal.openDialog(<CustomSavePromptModalDialog customProps={customProps}\n onDialogCloseArgs={args} onDialogClose={afterSaveFunction} />);\n return;\n }\n afterSaveFunction(args);\n}, []);\n---------------------------------------------------------------------------------------------------------- */\n\n/** Hook to use within Settings Page component to allow saving the current page's data before the Setting Container is closed.\n * @public\n */\nexport function useSaveBeforeClosingSettingsContainer(\n settingsManager: SettingsManager,\n saveFunction: (closeFunc: (args: any) => void, closeFuncArgs?: any) => void\n) {\n React.useEffect(() => {\n const handleProcessSettingsContainerClose = (\n { closeFunc, closeFuncArgs }: ProcessSettingsContainerCloseEventArgs // eslint-disable-line deprecation/deprecation\n ) => {\n saveFunction(closeFunc, closeFuncArgs);\n };\n return settingsManager.onProcessSettingsContainerClose.addListener(\n handleProcessSettingsContainerClose\n );\n }, [saveFunction, settingsManager]);\n}\n\n/** Hook to use within Settings Page component to allow saving the current page's data before loading to the requested Setting Tab's page.\n * @public\n */\nexport function useSaveBeforeActivatingNewSettingsTab(\n settingsManager: SettingsManager,\n saveFunction: (\n tabSelectionFunc: (args: any) => void,\n requestedSettingsTabId?: string\n ) => void\n) {\n React.useEffect(() => {\n const handleProcessSettingsTabActivation = (\n {\n tabSelectionFunc,\n requestedSettingsTabId,\n }: ProcessSettingsTabActivationEventArgs // eslint-disable-line deprecation/deprecation\n ) => {\n saveFunction(tabSelectionFunc, requestedSettingsTabId);\n };\n return settingsManager.onProcessSettingsTabActivation.addListener(\n handleProcessSettingsTabActivation\n );\n }, [saveFunction, settingsManager]);\n}\n\n/**\n * @public\n */\nexport interface SettingsContainerProps {\n tabs: SettingsTabEntry[];\n // sets tab to set as active tab\n currentSettingsTab?: SettingsTabEntry;\n // If plugging into a SPA and you need to modify the route, you can pass in additional logic here\n onSettingsTabSelected?: (tab: SettingsTabEntry) => void;\n // The SettingsManager that can have event handlers registered against it so pages can save its settings before the page is closed.\n settingsManager: SettingsManager;\n // if true show tab label as header above page contents.\n showHeader?: boolean;\n}\n\n/**\n * SettingsContainer component that displays Setting Tabs on Left and the P\n * Note: that SettingsContainer is not rendered if tabs array is empty\n * @public\n */\nexport const SettingsContainer = ({\n tabs,\n onSettingsTabSelected,\n currentSettingsTab,\n settingsManager,\n showHeader,\n}: SettingsContainerProps) => {\n // sort the tabs based on itemPriority\n tabs = tabs.sort((a, b) => a.itemPriority - b.itemPriority);\n\n const [openTab, setOpenTab] = React.useState(() => {\n if (\n currentSettingsTab &&\n !ConditionalBooleanValue.getValue(currentSettingsTab.isDisabled)\n )\n return currentSettingsTab;\n else return tabs[0];\n });\n\n const processTabSelection = React.useCallback(\n (tab: SettingsTabEntry) => {\n if (ConditionalBooleanValue.getValue(tab.isDisabled)) return;\n onSettingsTabSelected && onSettingsTabSelected(tab);\n setOpenTab(tab);\n },\n [onSettingsTabSelected]\n );\n\n const processTabSelectionById = React.useCallback(\n (tabId: string) => {\n const tabToActivate = tabs.find((tab) => tab.tabId === tabId);\n tabToActivate && processTabSelection(tabToActivate);\n },\n [processTabSelection, tabs]\n );\n\n const onActivateTab = React.useCallback(\n (tabIndex: number) => {\n const selectedTab = tabs[tabIndex];\n if (openTab && openTab.pageWillHandleCloseRequest)\n settingsManager.onProcessSettingsTabActivation.emit({\n requestedSettingsTabId: selectedTab.tabId,\n tabSelectionFunc: processTabSelectionById,\n });\n else processTabSelection(selectedTab);\n },\n [\n openTab,\n processTabSelection,\n processTabSelectionById,\n settingsManager,\n tabs,\n ]\n );\n\n React.useEffect(() => {\n const handleActivateSettingsTab = (\n { settingsTabId }: ActivateSettingsTabEventArgs // eslint-disable-line deprecation/deprecation\n ) => {\n const idToFind = settingsTabId.toLowerCase();\n let tabToActivate = tabs.find(\n (tab) => tab.tabId.toLowerCase() === idToFind\n );\n if (!tabToActivate)\n tabToActivate = tabs.find(\n (tab) => tab.label.toLowerCase() === idToFind\n );\n // istanbul ignore else\n if (tabToActivate) {\n if (openTab && openTab.pageWillHandleCloseRequest)\n settingsManager.onProcessSettingsTabActivation.emit({\n requestedSettingsTabId: tabToActivate.tabId,\n tabSelectionFunc: processTabSelectionById,\n });\n else processTabSelection(tabToActivate);\n }\n };\n\n return settingsManager.onActivateSettingsTab.addListener(\n handleActivateSettingsTab\n );\n }, [\n openTab,\n processTabSelection,\n processTabSelectionById,\n settingsManager,\n settingsManager.onActivateSettingsTab,\n tabs,\n ]);\n\n React.useEffect(() => {\n const handleSettingsContainerClose = (\n { closeFunc, closeFuncArgs }: ProcessSettingsContainerCloseEventArgs // eslint-disable-line deprecation/deprecation\n ) => {\n if (openTab && openTab.pageWillHandleCloseRequest)\n settingsManager.onProcessSettingsContainerClose.emit({\n closeFunc,\n closeFuncArgs,\n });\n else closeFunc(closeFuncArgs);\n };\n return settingsManager.onCloseSettingsContainer.addListener(\n handleSettingsContainerClose\n );\n }, [\n openTab,\n processTabSelection,\n settingsManager,\n settingsManager.onActivateSettingsTab,\n tabs,\n ]);\n\n const labels = tabs.map((tab) => {\n return {\n label: tab.label,\n subLabel: tab.subLabel,\n icon: tab.icon,\n tooltip: tab.tooltip,\n tabId: tab.tabId,\n disabled: ConditionalBooleanValue.getValue(tab.isDisabled),\n };\n });\n const activeIndex = tabs.findIndex((tab) => tab.tabId === openTab.tabId);\n return (\n <div className=\"core-settings-container\">\n <div className=\"core-settings-container-left\">\n {/* eslint-disable-next-line deprecation/deprecation */}\n <VerticalTabs\n labels={labels}\n activeIndex={activeIndex}\n onActivateTab={onActivateTab}\n />\n </div>\n <div className=\"core-settings-container-right\">\n {showHeader && (\n <div className=\"core-settings-container-right-header\">\n <span className=\"core-settings-container-main-header\">\n {openTab.label}\n </span>\n {openTab.subLabel && (\n <span className=\"core-settings-container-main-sub-header\">\n {openTab.subLabel}\n </span>\n )}\n </div>\n )}\n <div className=\"core-settings-container-right-contents\">\n {openTab.page}\n </div>\n </div>\n </div>\n );\n};\n"]}
@@ -29,11 +29,13 @@ export interface SettingsTabEntry {
29
29
  }
30
30
  /** Event class for [[this.onSettingsProvidersChanged]] which is emitted when a new SettingsTabsProvider is added or removed.
31
31
  * @public
32
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
32
33
  */
33
34
  export declare class SettingsProvidersChangedEvent extends BeUiEvent<SettingsProvidersChangedEventArgs> {
34
35
  }
35
36
  /** Arguments of [[this.onSettingsProvidersChanged]] event.
36
37
  * @public
38
+ * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.
37
39
  */
38
40
  export interface SettingsProvidersChangedEventArgs {
39
41
  readonly providers: ReadonlyArray<SettingsTabsProvider>;
@@ -41,11 +43,13 @@ export interface SettingsProvidersChangedEventArgs {
41
43
  /** Event class for [[this.onProcessSettingsTabActivation]] which is emitted when a new Tab needs to be activated. This allows the current
42
44
  * settings page to save its settings before activating the new SettingTab.
43
45
  * @public
46
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
44
47
  */
45
48
  export declare class ProcessSettingsTabActivationEvent extends BeUiEvent<ProcessSettingsTabActivationEventArgs> {
46
49
  }
47
50
  /** Arguments of [[this.onProcessSettingsTabActivation]] event.
48
51
  * @public
52
+ * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.
49
53
  */
50
54
  export interface ProcessSettingsTabActivationEventArgs {
51
55
  readonly tabSelectionFunc: (tabId: string) => void;
@@ -54,16 +58,13 @@ export interface ProcessSettingsTabActivationEventArgs {
54
58
  /** Event class for [[this.onProcessSettingsContainerClose]] which is emitted when the settings container will be closed. This allows the current
55
59
  * settings page to save its settings before calling the function to close the container.
56
60
  * @public
61
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
57
62
  */
58
63
  export declare class ProcessSettingsContainerCloseEvent extends BeUiEvent<ProcessSettingsContainerCloseEventArgs> {
59
64
  }
60
- /** Event class for [[this.onCloseSettingsContainer]] which is monitored by the settings container and indicates that some out process want to close the settings container.
61
- * @internal
62
- */
63
- export declare class CloseSettingsContainerEvent extends BeUiEvent<ProcessSettingsContainerCloseEventArgs> {
64
- }
65
65
  /** Arguments of [[this.onProcessSettingsContainerClose]] event.
66
66
  * @public
67
+ * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.
67
68
  */
68
69
  export interface ProcessSettingsContainerCloseEventArgs {
69
70
  readonly closeFunc: (args: any) => void;
@@ -71,11 +72,13 @@ export interface ProcessSettingsContainerCloseEventArgs {
71
72
  }
72
73
  /** Event class for [[this.onActivateSettingsTab]] which is emitted when API call needs to set the active settings tab (ie via Tool key-in).
73
74
  * @public
75
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
74
76
  */
75
77
  export declare class ActivateSettingsTabEvent extends BeUiEvent<ActivateSettingsTabEventArgs> {
76
78
  }
77
79
  /** Arguments of [[this.onActivateSettingsTab]] event.
78
80
  * @public
81
+ * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.
79
82
  */
80
83
  export interface ActivateSettingsTabEventArgs {
81
84
  readonly settingsTabId: string;
@@ -108,11 +111,11 @@ export declare class SettingsManager {
108
111
  /** Event raised to change the active settings tab shown in UI. Monitored by the SettingsContainer.
109
112
  * @internal
110
113
  */
111
- readonly onActivateSettingsTab: ActivateSettingsTabEvent;
114
+ readonly onActivateSettingsTab: BeUiEvent<ActivateSettingsTabEventArgs>;
112
115
  /** Event monitored by SettingsContainer to process request to close the settings container.
113
116
  * @internal
114
117
  */
115
- readonly onCloseSettingsContainer: CloseSettingsContainerEvent;
118
+ readonly onCloseSettingsContainer: BeUiEvent<ProcessSettingsContainerCloseEventArgs>;
116
119
  /** @public */
117
120
  get providers(): ReadonlyArray<SettingsTabsProvider>;
118
121
  set providers(p: ReadonlyArray<SettingsTabsProvider>);
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsManager.d.ts","sourceRoot":"","sources":["../../../../src/core-react/settings/SettingsManager.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAU,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAGrE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,0BAA0B;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8BAA8B;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iEAAiE;IACjE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IAClC;gHAC4G;IAC5G,QAAQ,CAAC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAC9C,4CAA4C;IAC5C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,6CAA6C;IAC7C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,yBAAyB;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IAC5C,qEAAqE;IACrE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IAC/C,2CAA2C;IAC3C,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,uBAAuB,CAAC;CACzD;AAED;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,SAAS,CAAC,iCAAiC,CAAC;CAAG;AAElG;;GAEG;AACH,MAAM,WAAW,iCAAiC;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AM,GACjB,aAAa,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAC;CAChD;AAED;;GAEG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,UAAU,CAA2C;IAE7D;OACG;IACH,SAAgB,0BAA0B,gCACJ;IAEtC;;OAEG;IACH,SAAgB,8BAA8B,oCACJ;IAE1C;;OAEG;IACH,SAAgB,+BAA+B,qCACJ;IAE3C;;OAEG;IACH,SAAgB,qBAAqB,0CACW;IAEhD;;OAEG;IACH,SAAgB,wBAAwB,oDACkB;IAE1D,cAAc;IACd,IAAW,SAAS,IAAI,aAAa,CAAC,oBAAoB,CAAC,CAE1D;IACD,IAAW,SAAS,CAAC,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,EAG1D;IAED;;OAEG;IACI,mBAAmB,CAAC,aAAa,EAAE,MAAM;IAIhD;;OAEG;IACI,sBAAsB,CAC3B,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,EAC9B,aAAa,CAAC,EAAE,GAAG;IAKd,mBAAmB,CAAC,gBAAgB,EAAE,oBAAoB,GAAG,IAAI;IAejE,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAW1D,mFAAmF;IAC5E,iBAAiB,CACtB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GACjB,KAAK,CAAC,gBAAgB,CAAC;CAU3B"}
@@ -9,29 +9,32 @@ import { BeUiEvent, Logger } from "@itwin/core-bentley";
9
9
  import { UiCore } from "../UiCore";
10
10
  /** Event class for [[this.onSettingsProvidersChanged]] which is emitted when a new SettingsTabsProvider is added or removed.
11
11
  * @public
12
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
12
13
  */
14
+ // eslint-disable-next-line deprecation/deprecation
13
15
  export class SettingsProvidersChangedEvent extends BeUiEvent {
14
16
  }
15
17
  /** Event class for [[this.onProcessSettingsTabActivation]] which is emitted when a new Tab needs to be activated. This allows the current
16
18
  * settings page to save its settings before activating the new SettingTab.
17
19
  * @public
20
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
18
21
  */
22
+ // eslint-disable-next-line deprecation/deprecation
19
23
  export class ProcessSettingsTabActivationEvent extends BeUiEvent {
20
24
  }
21
25
  /** Event class for [[this.onProcessSettingsContainerClose]] which is emitted when the settings container will be closed. This allows the current
22
26
  * settings page to save its settings before calling the function to close the container.
23
27
  * @public
28
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
24
29
  */
30
+ // eslint-disable-next-line deprecation/deprecation
25
31
  export class ProcessSettingsContainerCloseEvent extends BeUiEvent {
26
32
  }
27
- /** Event class for [[this.onCloseSettingsContainer]] which is monitored by the settings container and indicates that some out process want to close the settings container.
28
- * @internal
29
- */
30
- export class CloseSettingsContainerEvent extends BeUiEvent {
31
- }
32
33
  /** Event class for [[this.onActivateSettingsTab]] which is emitted when API call needs to set the active settings tab (ie via Tool key-in).
33
34
  * @public
35
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
34
36
  */
37
+ // eslint-disable-next-line deprecation/deprecation
35
38
  export class ActivateSettingsTabEvent extends BeUiEvent {
36
39
  }
37
40
  /** Settings Manager class. Hold registration of settings providers and supplies events for the provided settings pages to listen.
@@ -42,23 +45,23 @@ export class SettingsManager {
42
45
  this._providers = [];
43
46
  /** Event raised when SettingsProviders are changed.
44
47
  */
45
- this.onSettingsProvidersChanged = new SettingsProvidersChangedEvent();
48
+ this.onSettingsProvidersChanged = new SettingsProvidersChangedEvent(); // eslint-disable-line deprecation/deprecation
46
49
  /** Event raised solely for a settings page to monitor so it can save its settings before continuing tab activation.
47
50
  * See React hook function `useSaveBeforeActivatingNewSettingsTab`.
48
51
  */
49
- this.onProcessSettingsTabActivation = new ProcessSettingsTabActivationEvent();
52
+ this.onProcessSettingsTabActivation = new ProcessSettingsTabActivationEvent(); // eslint-disable-line deprecation/deprecation
50
53
  /** Event raised when the settings container will be closed. Any setting page component that is 'modal' should register to
51
54
  * listen to this event so that it can save its state before closing. See React hook function `useSaveBeforeClosingSettingsContainer`.
52
55
  */
53
- this.onProcessSettingsContainerClose = new ProcessSettingsContainerCloseEvent();
56
+ this.onProcessSettingsContainerClose = new ProcessSettingsContainerCloseEvent(); // eslint-disable-line deprecation/deprecation
54
57
  /** Event raised to change the active settings tab shown in UI. Monitored by the SettingsContainer.
55
58
  * @internal
56
59
  */
57
- this.onActivateSettingsTab = new ActivateSettingsTabEvent();
60
+ this.onActivateSettingsTab = new BeUiEvent(); // eslint-disable-line deprecation/deprecation
58
61
  /** Event monitored by SettingsContainer to process request to close the settings container.
59
62
  * @internal
60
63
  */
61
- this.onCloseSettingsContainer = new CloseSettingsContainerEvent();
64
+ this.onCloseSettingsContainer = new BeUiEvent(); // eslint-disable-line deprecation/deprecation
62
65
  }
63
66
  /** @public */
64
67
  get providers() {
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsManager.js","sourceRoot":"","sources":["../../../../src/core-react/settings/SettingsManager.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AA2BnC;;GAEG;AACH,MAAM,OAAO,6BAA8B,SAAQ,SAA4C;CAAG;AASlG;;;GAGG;AACH,MAAM,OAAO,iCAAkC,SAAQ,SAAgD;CAAG;AAU1G;;;GAGG;AACH,MAAM,OAAO,kCAAmC,SAAQ,SAAiD;CAAG;AAE5G;;GAEG;AACH,MAAM,OAAO,2BAA4B,SAAQ,SAAiD;CAAG;AAUrG;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,SAAuC;CAAG;AAsBxF;;GAEG;AACH,MAAM,OAAO,eAAe;IAA5B;QACU,eAAU,GAAwC,EAAE,CAAC;QAE7D;WACG;QACa,+BAA0B,GACxC,IAAI,6BAA6B,EAAE,CAAC;QAEtC;;WAEG;QACa,mCAA8B,GAC5C,IAA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IAEM,sBAAsB,CAAC,UAAkB;QAC9C,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC;QAC5E,IAAI,gBAAgB,CAAC,MAAM,KAAK,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACtD,IAAI,CAAC,SAAS,GAAG,gBAAgB,CAAC;YAClC,MAAM,GAAG,IAAI,CAAC;SACf;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,mFAAmF;IAC5E,iBAAiB,CACtB,OAAe,EACf,UAAkB;QAElB,MAAM,iBAAiB,GAAuB,EAAE,CAAC;QACjD,2CAA2C;QAC3C,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC5B,MAAM,OAAO,GAAG,CAAC,CAAC,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;YACzD,OAAO,IAAI,iBAAiB,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,OAAO,iBAAiB,CAAC;IAC3B,CAAC;CACF","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 Settings\n */\n\nimport { BeUiEvent, Logger } from \"@itwin/core-bentley\";\nimport type { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\nimport { UiCore } from \"../UiCore\";\n\n/** Interface used to populate a tab entry in the SettingContainer control\n * @public\n */\nexport interface SettingsTabEntry {\n /** unique id for entry */\n readonly tabId: string;\n /** localized display label */\n readonly label: string;\n /** Setting page content to display when tab item is selected. */\n readonly page: React.ReactElement;\n /** Setting to true if page will register to watch for stage closing event so it can save any dirty settings. Page component should register and handle the events:\n * `settingsManager.onProcessSettingsTabActivation` and `settingsManager.onProcessSettingsContainerClose` */\n readonly pageWillHandleCloseRequest?: boolean;\n /** used to determine position in tablist */\n readonly itemPriority: number;\n /** Optional Subtitle to show below label. */\n readonly subLabel?: string;\n /** Icon specification */\n readonly icon?: string | React.ReactElement;\n /** Tooltip. Allows JSX|Element to support react-tooltip component */\n readonly tooltip?: string | React.ReactElement;\n /** Allows Settings entry to be disabled */\n readonly isDisabled?: boolean | ConditionalBooleanValue;\n}\n\n/** Event class for [[this.onSettingsProvidersChanged]] which is emitted when a new SettingsTabsProvider is added or removed.\n * @public\n */\nexport class SettingsProvidersChangedEvent extends BeUiEvent<SettingsProvidersChangedEventArgs> {}\n\n/** Arguments of [[this.onSettingsProvidersChanged]] event.\n * @public\n */\nexport interface SettingsProvidersChangedEventArgs {\n readonly providers: ReadonlyArray<SettingsTabsProvider>;\n}\n\n/** Event class for [[this.onProcessSettingsTabActivation]] which is emitted when a new Tab needs to be activated. This allows the current\n * settings page to save its settings before activating the new SettingTab.\n * @public\n */\nexport class ProcessSettingsTabActivationEvent extends BeUiEvent<ProcessSettingsTabActivationEventArgs> {}\n\n/** Arguments of [[this.onProcessSettingsTabActivation]] event.\n * @public\n */\nexport interface ProcessSettingsTabActivationEventArgs {\n readonly tabSelectionFunc: (tabId: string) => void;\n readonly requestedSettingsTabId: string;\n}\n\n/** Event class for [[this.onProcessSettingsContainerClose]] which is emitted when the settings container will be closed. This allows the current\n * settings page to save its settings before calling the function to close the container.\n * @public\n */\nexport class ProcessSettingsContainerCloseEvent extends BeUiEvent<ProcessSettingsContainerCloseEventArgs> {}\n\n/** Event class for [[this.onCloseSettingsContainer]] which is monitored by the settings container and indicates that some out process want to close the settings container.\n * @internal\n */\nexport class CloseSettingsContainerEvent extends BeUiEvent<ProcessSettingsContainerCloseEventArgs> {}\n\n/** Arguments of [[this.onProcessSettingsContainerClose]] event.\n * @public\n */\nexport interface ProcessSettingsContainerCloseEventArgs {\n readonly closeFunc: (args: any) => void;\n readonly closeFuncArgs?: any;\n}\n\n/** Event class for [[this.onActivateSettingsTab]] which is emitted when API call needs to set the active settings tab (ie via Tool key-in).\n * @public\n */\nexport class ActivateSettingsTabEvent extends BeUiEvent<ActivateSettingsTabEventArgs> {}\n\n/** Arguments of [[this.onActivateSettingsTab]] event.\n * @public\n */\nexport interface ActivateSettingsTabEventArgs {\n readonly settingsTabId: string;\n}\n\n/** Setting Provider interface. Implemented by classes that want to supply settings pages for display in the SettingContainer. The\n * classes that implement this interface need to be registered with the [[SettingsManager]].\n * @public\n */\nexport interface SettingsTabsProvider {\n /** Id of provider, used to remove registration. */\n readonly id: string;\n getSettingEntries(\n stageId: string,\n stageUsage: string\n ): ReadonlyArray<SettingsTabEntry> | undefined;\n}\n\n/** Settings Manager class. Hold registration of settings providers and supplies events for the provided settings pages to listen.\n * @public\n */\nexport class SettingsManager {\n private _providers: ReadonlyArray<SettingsTabsProvider> = [];\n\n /** Event raised when SettingsProviders are changed.\n */\n public readonly onSettingsProvidersChanged =\n new SettingsProvidersChangedEvent();\n\n /** Event raised solely for a settings page to monitor so it can save its settings before continuing tab activation.\n * See React hook function `useSaveBeforeActivatingNewSettingsTab`.\n */\n public readonly onProcessSettingsTabActivation =\n new ProcessSettingsTabActivationEvent();\n\n /** Event raised when the settings container will be closed. Any setting page component that is 'modal' should register to\n * listen to this event so that it can save its state before closing. See React hook function `useSaveBeforeClosingSettingsContainer`.\n */\n public readonly onProcessSettingsContainerClose =\n new ProcessSettingsContainerCloseEvent();\n\n /** Event raised to change the active settings tab shown in UI. Monitored by the SettingsContainer.\n * @internal\n */\n public readonly onActivateSettingsTab = new ActivateSettingsTabEvent();\n\n /** Event monitored by SettingsContainer to process request to close the settings container.\n * @internal\n */\n public readonly onCloseSettingsContainer = new CloseSettingsContainerEvent();\n\n /** @public */\n public get providers(): ReadonlyArray<SettingsTabsProvider> {\n return this._providers;\n }\n public set providers(p: ReadonlyArray<SettingsTabsProvider>) {\n this._providers = p;\n this.onSettingsProvidersChanged.emit({ providers: p });\n }\n\n /** Called by application when an tool, keyin, or other process want to change the active settings tab/page giving the current tab/page and opportunity\n * to save its state.\n */\n public activateSettingsTab(settingsTabId: string) {\n this.onActivateSettingsTab.emit({ settingsTabId });\n }\n\n /** Called by application when the Settings Container is to be closed. The function to invoke to actually close the Settings Container is\n * passed in and executed once the active settings tab/page has a chance to save its settings.\n */\n public closeSettingsContainer(\n closeFunc: (args: any) => void,\n closeFuncArgs?: any\n ) {\n this.onCloseSettingsContainer.emit({ closeFunc, closeFuncArgs });\n }\n\n public addSettingsProvider(settingsProvider: SettingsTabsProvider): void {\n const foundProvider = this._providers.find(\n (p) => p.id === settingsProvider.id\n );\n if (!foundProvider) {\n const updatedProviders = [...this.providers, settingsProvider];\n this.providers = updatedProviders;\n } else {\n Logger.logInfo(\n UiCore.loggerCategory(this),\n `Settings Provider with id of ${settingsProvider.id} has already been registered`\n );\n }\n }\n\n public removeSettingsProvider(providerId: string): boolean {\n let result = false;\n const updatedProviders = this._providers.filter((p) => p.id !== providerId);\n if (updatedProviders.length !== this._providers.length) {\n this.providers = updatedProviders;\n result = true;\n }\n\n return result;\n }\n\n /** Get an array of SettingsTabEntry objects to populate the settings container. */\n public getSettingEntries(\n stageId: string,\n stageUsage: string\n ): Array<SettingsTabEntry> {\n const allSettingEntries: SettingsTabEntry[] = [];\n // Consult the registered SettingsProviders\n this._providers.forEach((p) => {\n const entries = p.getSettingEntries(stageId, stageUsage);\n entries && allSettingEntries.push(...entries);\n });\n\n return allSettingEntries;\n }\n}\n"]}
1
+ {"version":3,"file":"SettingsManager.js","sourceRoot":"","sources":["../../../../src/core-react/settings/SettingsManager.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AA2BnC;;;GAGG;AAC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AAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,OAAO,iBAAiB,CAAC;IAC3B,CAAC;CACF","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 Settings\n */\n\nimport { BeUiEvent, Logger } from \"@itwin/core-bentley\";\nimport type { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\nimport { UiCore } from \"../UiCore\";\n\n/** Interface used to populate a tab entry in the SettingContainer control\n * @public\n */\nexport interface SettingsTabEntry {\n /** unique id for entry */\n readonly tabId: string;\n /** localized display label */\n readonly label: string;\n /** Setting page content to display when tab item is selected. */\n readonly page: React.ReactElement;\n /** Setting to true if page will register to watch for stage closing event so it can save any dirty settings. Page component should register and handle the events:\n * `settingsManager.onProcessSettingsTabActivation` and `settingsManager.onProcessSettingsContainerClose` */\n readonly pageWillHandleCloseRequest?: boolean;\n /** used to determine position in tablist */\n readonly itemPriority: number;\n /** Optional Subtitle to show below label. */\n readonly subLabel?: string;\n /** Icon specification */\n readonly icon?: string | React.ReactElement;\n /** Tooltip. Allows JSX|Element to support react-tooltip component */\n readonly tooltip?: string | React.ReactElement;\n /** Allows Settings entry to be disabled */\n readonly isDisabled?: boolean | ConditionalBooleanValue;\n}\n\n/** Event class for [[this.onSettingsProvidersChanged]] which is emitted when a new SettingsTabsProvider is added or removed.\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class SettingsProvidersChangedEvent extends BeUiEvent<SettingsProvidersChangedEventArgs> {}\n\n/** Arguments of [[this.onSettingsProvidersChanged]] event.\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface SettingsProvidersChangedEventArgs {\n readonly providers: ReadonlyArray<SettingsTabsProvider>;\n}\n\n/** Event class for [[this.onProcessSettingsTabActivation]] which is emitted when a new Tab needs to be activated. This allows the current\n * settings page to save its settings before activating the new SettingTab.\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ProcessSettingsTabActivationEvent extends BeUiEvent<ProcessSettingsTabActivationEventArgs> {}\n\n/** Arguments of [[this.onProcessSettingsTabActivation]] event.\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ProcessSettingsTabActivationEventArgs {\n readonly tabSelectionFunc: (tabId: string) => void;\n readonly requestedSettingsTabId: string;\n}\n\n/** Event class for [[this.onProcessSettingsContainerClose]] which is emitted when the settings container will be closed. This allows the current\n * settings page to save its settings before calling the function to close the container.\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ProcessSettingsContainerCloseEvent extends BeUiEvent<ProcessSettingsContainerCloseEventArgs> {}\n\n/** Arguments of [[this.onProcessSettingsContainerClose]] event.\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ProcessSettingsContainerCloseEventArgs {\n readonly closeFunc: (args: any) => void;\n readonly closeFuncArgs?: any;\n}\n\n/** Event class for [[this.onActivateSettingsTab]] which is emitted when API call needs to set the active settings tab (ie via Tool key-in).\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ActivateSettingsTabEvent extends BeUiEvent<ActivateSettingsTabEventArgs> {}\n\n/** Arguments of [[this.onActivateSettingsTab]] event.\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ActivateSettingsTabEventArgs {\n readonly settingsTabId: string;\n}\n\n/** Setting Provider interface. Implemented by classes that want to supply settings pages for display in the SettingContainer. The\n * classes that implement this interface need to be registered with the [[SettingsManager]].\n * @public\n */\nexport interface SettingsTabsProvider {\n /** Id of provider, used to remove registration. */\n readonly id: string;\n getSettingEntries(\n stageId: string,\n stageUsage: string\n ): ReadonlyArray<SettingsTabEntry> | undefined;\n}\n\n/** Settings Manager class. Hold registration of settings providers and supplies events for the provided settings pages to listen.\n * @public\n */\nexport class SettingsManager {\n private _providers: ReadonlyArray<SettingsTabsProvider> = [];\n\n /** Event raised when SettingsProviders are changed.\n */\n public readonly onSettingsProvidersChanged =\n new SettingsProvidersChangedEvent(); // eslint-disable-line deprecation/deprecation\n\n /** Event raised solely for a settings page to monitor so it can save its settings before continuing tab activation.\n * See React hook function `useSaveBeforeActivatingNewSettingsTab`.\n */\n public readonly onProcessSettingsTabActivation =\n new ProcessSettingsTabActivationEvent(); // eslint-disable-line deprecation/deprecation\n\n /** Event raised when the settings container will be closed. Any setting page component that is 'modal' should register to\n * listen to this event so that it can save its state before closing. See React hook function `useSaveBeforeClosingSettingsContainer`.\n */\n public readonly onProcessSettingsContainerClose =\n new ProcessSettingsContainerCloseEvent(); // eslint-disable-line deprecation/deprecation\n\n /** Event raised to change the active settings tab shown in UI. Monitored by the SettingsContainer.\n * @internal\n */\n public readonly onActivateSettingsTab =\n new BeUiEvent<ActivateSettingsTabEventArgs>(); // eslint-disable-line deprecation/deprecation\n\n /** Event monitored by SettingsContainer to process request to close the settings container.\n * @internal\n */\n public readonly onCloseSettingsContainer =\n new BeUiEvent<ProcessSettingsContainerCloseEventArgs>(); // eslint-disable-line deprecation/deprecation\n\n /** @public */\n public get providers(): ReadonlyArray<SettingsTabsProvider> {\n return this._providers;\n }\n public set providers(p: ReadonlyArray<SettingsTabsProvider>) {\n this._providers = p;\n this.onSettingsProvidersChanged.emit({ providers: p });\n }\n\n /** Called by application when an tool, keyin, or other process want to change the active settings tab/page giving the current tab/page and opportunity\n * to save its state.\n */\n public activateSettingsTab(settingsTabId: string) {\n this.onActivateSettingsTab.emit({ settingsTabId });\n }\n\n /** Called by application when the Settings Container is to be closed. The function to invoke to actually close the Settings Container is\n * passed in and executed once the active settings tab/page has a chance to save its settings.\n */\n public closeSettingsContainer(\n closeFunc: (args: any) => void,\n closeFuncArgs?: any\n ) {\n this.onCloseSettingsContainer.emit({ closeFunc, closeFuncArgs });\n }\n\n public addSettingsProvider(settingsProvider: SettingsTabsProvider): void {\n const foundProvider = this._providers.find(\n (p) => p.id === settingsProvider.id\n );\n if (!foundProvider) {\n const updatedProviders = [...this.providers, settingsProvider];\n this.providers = updatedProviders;\n } else {\n Logger.logInfo(\n UiCore.loggerCategory(this),\n `Settings Provider with id of ${settingsProvider.id} has already been registered`\n );\n }\n }\n\n public removeSettingsProvider(providerId: string): boolean {\n let result = false;\n const updatedProviders = this._providers.filter((p) => p.id !== providerId);\n if (updatedProviders.length !== this._providers.length) {\n this.providers = updatedProviders;\n result = true;\n }\n\n return result;\n }\n\n /** Get an array of SettingsTabEntry objects to populate the settings container. */\n public getSettingEntries(\n stageId: string,\n stageUsage: string\n ): Array<SettingsTabEntry> {\n const allSettingEntries: SettingsTabEntry[] = [];\n // Consult the registered SettingsProviders\n this._providers.forEach((p) => {\n const entries = p.getSettingEntries(stageId, stageUsage);\n entries && allSettingEntries.push(...entries);\n });\n\n return allSettingEntries;\n }\n}\n"]}
@@ -7,6 +7,7 @@ import { Orientation } from "../enums/Orientation";
7
7
  /** TabLabel provides ability to define label, icon, and tooltip for a tab entry. The tooltip can be defined as JSX|Element
8
8
  * to support react-tooltip component or a string that will be use to set the title property.
9
9
  * @public
10
+ * @deprecated in 4.12.x. Interface used in a deprecated component {@link Tabs}.
10
11
  */
11
12
  export interface TabLabel {
12
13
  label: string;
@@ -19,10 +20,10 @@ export interface TabLabel {
19
20
  }
20
21
  /** Properties for the [[VerticalTabs]] component
21
22
  * @public
23
+ * @deprecated in 4.12.x. Props of deprecated component {@link Tabs}.
22
24
  */
23
25
  export interface TabsProps extends React.AllHTMLAttributes<HTMLUListElement>, CommonProps {
24
- /** Text shown for each tab
25
- * @public */
26
+ /** Text shown for each tab */
26
27
  labels: Array<string | TabLabel>;
27
28
  /** Handler for activating a tab */
28
29
  onActivateTab?: (index: number) => any;
@@ -31,14 +32,12 @@ export interface TabsProps extends React.AllHTMLAttributes<HTMLUListElement>, Co
31
32
  /** Indicates whether the bar on the active tab is green instead of the default blue */
32
33
  green?: boolean;
33
34
  }
34
- /** State for [[Tabs]] component
35
- * @internal
36
- */
37
35
  interface TabsState {
38
36
  activeIndex: number;
39
37
  }
40
38
  /** Properties for the base [[Tabs]] component
41
39
  * @public
40
+ * @deprecated in 4.12.x. Props of deprecated component {@link Tabs}.
42
41
  */
43
42
  export interface MainTabsProps extends TabsProps {
44
43
  /** Main CSS class name */
@@ -48,6 +47,7 @@ export interface MainTabsProps extends TabsProps {
48
47
  }
49
48
  /** Tabs meant to represent the current position in a page/section
50
49
  * @public
50
+ * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/tabs iTwinUI Tabs} instead.
51
51
  */
52
52
  export declare class Tabs extends React.PureComponent<MainTabsProps, TabsState> {
53
53
  private _anchorRefs;
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tabs/Tabs.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAInD;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IACnC,KAAK,EAAE,MAAM,CAAoE;IACjF,uFAAuF;IACvF,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAUD;;G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AgB;IACA,kBAAkB,CAAC,SAAS,EAAE,aAAa;IA4B3D,OAAO,CAAC,gBAAgB,CAItB;IAEF,OAAO,CAAC,eAAe,CAErB;IAEF,6BAA6B;IAC7B,OAAO,CAAC,mBAAmB;IAI3B,2BAA2B;IAC3B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,YAAY,CAGlB;IAEF,gBAAgB;IACA,MAAM,IAAI,KAAK,CAAC,YAAY;CAyF7C"}
@@ -18,6 +18,7 @@ function isTabLabel(item) {
18
18
  }
19
19
  /** Tabs meant to represent the current position in a page/section
20
20
  * @public
21
+ * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/tabs iTwinUI Tabs} instead.
21
22
  */
22
23
  export class Tabs extends React.PureComponent {
23
24
  constructor(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/core-react/tabs/Tabs.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAgBjD,SAAS,kBAAkB,CAAC,IAAuB;IACjD,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;AACjD,CAAC;AAED,SAAS,UAAU,CAAC,IAAuB;IACzC,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC;AAClC,CAAC;AAoCD;;GAEG;AACH,MAAM,OAAO,IAAK,SAAQ,KAAK,CAAC,aAAuC;IAIrE,YAAY,KAAoB;QAC9B,KAAK,CAAC,KAAK,CAAC,CAAC;QAJP,gBAAW,GAA8C,EAAE,CAAC;QA6D5D,qBAAgB,G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ACvB,IAAI,EAAC,QAAQ;oBAEZ,GAAG;oBACJ,6BACE,SAAS,EAAE,UAAU,CACnB,0BAA0B,EAC1B,QAAQ,IAAI,wBAAwB,CACrC;wBAEA,eAAe,IAAI,CAClB,8BAAM,SAAS,EAAC,kBAAkB,IAAE,IAAI,CAAQ,CACjD;wBACD,6BAAK,SAAS,EAAC,sCAAsC;4BACnD,kCACG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAC3C;4BACN,QAAQ,IAAI,CACX,8BAAM,SAAS,EAAC,sBAAsB,IAAE,QAAQ,CAAQ,CACzD,CACG,CACF,CACJ,CACD,CACN,CAAC;QACJ,CAAC,CAAC,CACC,CACN,CAAC;IACJ,CAAC;CACF","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 Tabs\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Orientation } from \"../enums/Orientation\";\nimport { ItemKeyboardNavigator } from \"../focus/ItemKeyboardNavigator\";\nimport { IconHelper } from \"../utils/IconHelper\";\n\n/** TabLabel provides ability to define label, icon, and tooltip for a tab entry. The tooltip can be defined as JSX|Element\n * to support react-tooltip component or a string that will be use to set the title property.\n * @public\n */\nexport interface TabLabel {\n label: string;\n subLabel?: string;\n icon?: string | React.ReactElement;\n tabId: string /* optional id added to tab so it can be used by react-tooltip */;\n /** tooltip allows React.ReactElement to support styled tooltips like react-tooltip. */\n tooltip?: string | React.ReactElement;\n disabled?: boolean;\n}\n\nfunction isTabLabelWithIcon(item: string | TabLabel): item is TabLabel {\n return typeof item !== \"string\" && !!item.icon;\n}\n\nfunction isTabLabel(item: string | TabLabel): item is TabLabel {\n return typeof item !== \"string\";\n}\n\n/** Properties for the [[VerticalTabs]] component\n * @public\n */\nexport interface TabsProps\n extends React.AllHTMLAttributes<HTMLUListElement>,\n CommonProps {\n /** Text shown for each tab\n * @public */\n labels: Array<string | TabLabel>;\n /** Handler for activating a tab */\n onActivateTab?: (index: number) => any;\n /** Index of the initial active tab */\n activeIndex?: number;\n /** Indicates whether the bar on the active tab is green instead of the default blue */\n green?: boolean;\n}\n\n/** State for [[Tabs]] component\n * @internal\n */\ninterface TabsState {\n activeIndex: number;\n}\n\n/** Properties for the base [[Tabs]] component\n * @public\n */\nexport interface MainTabsProps extends TabsProps {\n /** Main CSS class name */\n mainClassName: string;\n /** Orientation of the Tabs list */\n orientation: Orientation;\n}\n\n/** Tabs meant to represent the current position in a page/section\n * @public\n */\nexport class Tabs extends React.PureComponent<MainTabsProps, TabsState> {\n private _anchorRefs: Array<React.RefObject<HTMLAnchorElement>> = [];\n private _itemKeyboardNavigator: ItemKeyboardNavigator;\n\n constructor(props: MainTabsProps) {\n super(props);\n\n const activeIndex = this.validateActiveIndex(props.activeIndex);\n this.state = {\n activeIndex,\n };\n\n props.labels.forEach(() =>\n this._anchorRefs.push(React.createRef<HTMLAnchorElement>())\n );\n this._itemKeyboardNavigator = new ItemKeyboardNavigator(\n this._handleFocusItem,\n this._activateTab\n );\n }\n\n private validateActiveIndex(idx?: number): number {\n let activeIndex = 0;\n if (idx && idx >= 0 && idx < this.props.labels.length) activeIndex = idx;\n return activeIndex;\n }\n\n /** @internal */\n public override componentDidMount() {\n this._itemKeyboardNavigator.itemCount = this.props.labels.length;\n this._itemKeyboardNavigator.orientation = this.props.orientation;\n }\n\n /** @internal */\n public override componentDidUpdate(prevProps: MainTabsProps) {\n if (prevProps.labels !== this.props.labels)\n this._itemKeyboardNavigator.itemCount = this.props.labels.length;\n\n if (prevProps.orientation !== this.props.orientation)\n this._itemKeyboardNavigator.orientation = this.props.orientation;\n\n if (prevProps.activeIndex !== this.props.activeIndex) {\n let hadFocus = false;\n const element = this._anchorRefs[this.state.activeIndex].current;\n // istanbul ignore else\n if (element && document.activeElement === element) hadFocus = true;\n const activeIndex = this.validateActiveIndex(this.props.activeIndex);\n\n this.setState(\n () => ({ activeIndex }),\n () => {\n // istanbul ignore else\n if (hadFocus) {\n const newElement = this._anchorRefs[activeIndex].current;\n // istanbul ignore else\n if (newElement) newElement.focus();\n }\n }\n );\n }\n }\n\n private _handleFocusItem = (index: number) => {\n const itemRef = this._anchorRefs[index];\n // istanbul ignore else\n if (itemRef && itemRef.current) itemRef.current.focus();\n };\n\n private _handleTabClick = (index: number) => {\n this._activateTab(index);\n };\n\n /** Handle keydown on tabs */\n private _handleKeyDownEvent(event: React.KeyboardEvent, index: number) {\n this._itemKeyboardNavigator.handleKeyDownEvent(event, index);\n }\n\n /** Handle keyup on tabs */\n private _handleKeyUpEvent(event: React.KeyboardEvent, index: number) {\n this._itemKeyboardNavigator.handleKeyUpEvent(event, index);\n }\n\n private _activateTab = (index: number) => {\n this.props.onActivateTab && this.props.onActivateTab(index);\n this.setState({ activeIndex: index });\n };\n\n /** @internal */\n public override render(): React.ReactElement {\n const ulClassNames = classnames(\n this.props.mainClassName,\n this.props.green && \"uicore-tabs-green\",\n this.props.className\n );\n\n const anyIconsPresent =\n this.props.labels.reduce(\n (a, b) => a + (isTabLabelWithIcon(b) ? 1 : 0),\n 0\n ) > 0;\n\n return (\n <ul\n className={ulClassNames}\n style={this.props.style}\n role=\"tablist\"\n aria-orientation={\n this.props.orientation === Orientation.Vertical\n ? \"vertical\"\n : \"horizontal\"\n }\n >\n {this.props.labels.map((label, index) => {\n let disabled;\n let tooltipElement: React.ReactElement | undefined;\n let title: string | undefined;\n let subLabel: string | undefined;\n let tabId = \"\";\n let icon;\n if (isTabLabel(label)) {\n icon = IconHelper.getIconReactNode(label.icon);\n subLabel = label.subLabel;\n disabled = label.disabled;\n tabId = label.tabId;\n if (React.isValidElement(label.tooltip))\n tooltipElement = label.tooltip;\n else if (typeof label.tooltip === \"string\") title = label.tooltip;\n }\n return (\n <li\n key={index}\n title={title}\n className={classnames(\n index === this.state.activeIndex && \"core-active\",\n disabled && \"core-tab-item-disabled\"\n )}\n role=\"tab\"\n aria-selected={index === this.state.activeIndex}\n data-for={`${tabId}`} /* to support react-tooltip */\n >\n {tooltipElement}\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n <a\n ref={this._anchorRefs[index]}\n tabIndex={index === this.state.activeIndex ? 0 : -1}\n onClick={() => this._handleTabClick(index)}\n onKeyDown={(event) => this._handleKeyDownEvent(event, index)}\n onKeyUp={(event) => this._handleKeyUpEvent(event, index)}\n data-testid={`${tabId}`}\n role=\"button\"\n >\n {\" \"}\n <div\n className={classnames(\n \"uicore-tabs-inline-label\",\n disabled && \"core-tab-item-disabled\"\n )}\n >\n {anyIconsPresent && (\n <span className=\"uicore-tabs-icon\">{icon}</span>\n )}\n <div className=\"uicore-tabs-label-subLabel-container\">\n <span>\n {typeof label === \"string\" ? label : label.label}\n </span>\n {subLabel && (\n <span className=\"uicore-tabs-subLabel\">{subLabel}</span>\n )}\n </div>\n </div>\n </a>\n </li>\n );\n })}\n </ul>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/core-react/tabs/Tabs.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAmBjD,SAAS,kBAAkB,CAAC,IAAuB;IACjD,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;AACjD,CAAC;AAED,SAAS,UAAU,CAAC,IAAuB;IACzC,OAAO,OAAO,IAAI,KA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KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,EAC5D,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,iBAC3C,GAAG,KAAK,EAAE,EACvB,IAAI,EAAC,QAAQ;oBAEZ,GAAG;oBACJ,6BACE,SAAS,EAAE,UAAU,CACnB,0BAA0B,EAC1B,QAAQ,IAAI,wBAAwB,CACrC;wBAEA,eAAe,IAAI,CAClB,8BAAM,SAAS,EAAC,kBAAkB,IAAE,IAAI,CAAQ,CACjD;wBACD,6BAAK,SAAS,EAAC,sCAAsC;4BACnD,kCACG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAC3C;4BACN,QAAQ,IAAI,CACX,8BAAM,SAAS,EAAC,sBAAsB,IAAE,QAAQ,CAAQ,CACzD,CACG,CACF,CACJ,CACD,CACN,CAAC;QACJ,CAAC,CAAC,CACC,CACN,CAAC;IACJ,CAAC;CACF","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 Tabs\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Orientation } from \"../enums/Orientation\";\nimport { ItemKeyboardNavigator } from \"../focus/ItemKeyboardNavigator\";\nimport { IconHelper } from \"../utils/IconHelper\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** TabLabel provides ability to define label, icon, and tooltip for a tab entry. The tooltip can be defined as JSX|Element\n * to support react-tooltip component or a string that will be use to set the title property.\n * @public\n * @deprecated in 4.12.x. Interface used in a deprecated component {@link Tabs}.\n */\nexport interface TabLabel {\n label: string;\n subLabel?: string;\n icon?: string | React.ReactElement;\n tabId: string /* optional id added to tab so it can be used by react-tooltip */;\n /** tooltip allows React.ReactElement to support styled tooltips like react-tooltip. */\n tooltip?: string | React.ReactElement;\n disabled?: boolean;\n}\n\nfunction isTabLabelWithIcon(item: string | TabLabel): item is TabLabel {\n return typeof item !== \"string\" && !!item.icon;\n}\n\nfunction isTabLabel(item: string | TabLabel): item is TabLabel {\n return typeof item !== \"string\";\n}\n\n/** Properties for the [[VerticalTabs]] component\n * @public\n * @deprecated in 4.12.x. Props of deprecated component {@link Tabs}.\n */\nexport interface TabsProps\n extends React.AllHTMLAttributes<HTMLUListElement>,\n CommonProps {\n /** Text shown for each tab */\n labels: Array<string | TabLabel>;\n /** Handler for activating a tab */\n onActivateTab?: (index: number) => any;\n /** Index of the initial active tab */\n activeIndex?: number;\n /** Indicates whether the bar on the active tab is green instead of the default blue */\n green?: boolean;\n}\n\ninterface TabsState {\n activeIndex: number;\n}\n\n/** Properties for the base [[Tabs]] component\n * @public\n * @deprecated in 4.12.x. Props of deprecated component {@link Tabs}.\n */\nexport interface MainTabsProps extends TabsProps {\n /** Main CSS class name */\n mainClassName: string;\n /** Orientation of the Tabs list */\n orientation: Orientation;\n}\n\n/** Tabs meant to represent the current position in a page/section\n * @public\n * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/tabs iTwinUI Tabs} instead.\n */\nexport class Tabs extends React.PureComponent<MainTabsProps, TabsState> {\n private _anchorRefs: Array<React.RefObject<HTMLAnchorElement>> = [];\n private _itemKeyboardNavigator: ItemKeyboardNavigator;\n\n constructor(props: MainTabsProps) {\n super(props);\n\n const activeIndex = this.validateActiveIndex(props.activeIndex);\n this.state = {\n activeIndex,\n };\n\n props.labels.forEach(() =>\n this._anchorRefs.push(React.createRef<HTMLAnchorElement>())\n );\n this._itemKeyboardNavigator = new ItemKeyboardNavigator(\n this._handleFocusItem,\n this._activateTab\n );\n }\n\n private validateActiveIndex(idx?: number): number {\n let activeIndex = 0;\n if (idx && idx >= 0 && idx < this.props.labels.length) activeIndex = idx;\n return activeIndex;\n }\n\n /** @internal */\n public override componentDidMount() {\n this._itemKeyboardNavigator.itemCount = this.props.labels.length;\n this._itemKeyboardNavigator.orientation = this.props.orientation;\n }\n\n /** @internal */\n public override componentDidUpdate(prevProps: MainTabsProps) {\n if (prevProps.labels !== this.props.labels)\n this._itemKeyboardNavigator.itemCount = this.props.labels.length;\n\n if (prevProps.orientation !== this.props.orientation)\n this._itemKeyboardNavigator.orientation = this.props.orientation;\n\n if (prevProps.activeIndex !== this.props.activeIndex) {\n let hadFocus = false;\n const element = this._anchorRefs[this.state.activeIndex].current;\n // istanbul ignore else\n if (element && document.activeElement === element) hadFocus = true;\n const activeIndex = this.validateActiveIndex(this.props.activeIndex);\n\n this.setState(\n () => ({ activeIndex }),\n () => {\n // istanbul ignore else\n if (hadFocus) {\n const newElement = this._anchorRefs[activeIndex].current;\n // istanbul ignore else\n if (newElement) newElement.focus();\n }\n }\n );\n }\n }\n\n private _handleFocusItem = (index: number) => {\n const itemRef = this._anchorRefs[index];\n // istanbul ignore else\n if (itemRef && itemRef.current) itemRef.current.focus();\n };\n\n private _handleTabClick = (index: number) => {\n this._activateTab(index);\n };\n\n /** Handle keydown on tabs */\n private _handleKeyDownEvent(event: React.KeyboardEvent, index: number) {\n this._itemKeyboardNavigator.handleKeyDownEvent(event, index);\n }\n\n /** Handle keyup on tabs */\n private _handleKeyUpEvent(event: React.KeyboardEvent, index: number) {\n this._itemKeyboardNavigator.handleKeyUpEvent(event, index);\n }\n\n private _activateTab = (index: number) => {\n this.props.onActivateTab && this.props.onActivateTab(index);\n this.setState({ activeIndex: index });\n };\n\n /** @internal */\n public override render(): React.ReactElement {\n const ulClassNames = classnames(\n this.props.mainClassName,\n this.props.green && \"uicore-tabs-green\",\n this.props.className\n );\n\n const anyIconsPresent =\n this.props.labels.reduce(\n (a, b) => a + (isTabLabelWithIcon(b) ? 1 : 0),\n 0\n ) > 0;\n\n return (\n <ul\n className={ulClassNames}\n style={this.props.style}\n role=\"tablist\"\n aria-orientation={\n this.props.orientation === Orientation.Vertical\n ? \"vertical\"\n : \"horizontal\"\n }\n >\n {this.props.labels.map((label, index) => {\n let disabled;\n let tooltipElement: React.ReactElement | undefined;\n let title: string | undefined;\n let subLabel: string | undefined;\n let tabId = \"\";\n let icon;\n if (isTabLabel(label)) {\n icon = IconHelper.getIconReactNode(label.icon);\n subLabel = label.subLabel;\n disabled = label.disabled;\n tabId = label.tabId;\n if (React.isValidElement(label.tooltip))\n tooltipElement = label.tooltip;\n else if (typeof label.tooltip === \"string\") title = label.tooltip;\n }\n return (\n <li\n key={index}\n title={title}\n className={classnames(\n index === this.state.activeIndex && \"core-active\",\n disabled && \"core-tab-item-disabled\"\n )}\n role=\"tab\"\n aria-selected={index === this.state.activeIndex}\n data-for={`${tabId}`} /* to support react-tooltip */\n >\n {tooltipElement}\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n <a\n ref={this._anchorRefs[index]}\n tabIndex={index === this.state.activeIndex ? 0 : -1}\n onClick={() => this._handleTabClick(index)}\n onKeyDown={(event) => this._handleKeyDownEvent(event, index)}\n onKeyUp={(event) => this._handleKeyUpEvent(event, index)}\n data-testid={`${tabId}`}\n role=\"button\"\n >\n {\" \"}\n <div\n className={classnames(\n \"uicore-tabs-inline-label\",\n disabled && \"core-tab-item-disabled\"\n )}\n >\n {anyIconsPresent && (\n <span className=\"uicore-tabs-icon\">{icon}</span>\n )}\n <div className=\"uicore-tabs-label-subLabel-container\">\n <span>\n {typeof label === \"string\" ? label : label.label}\n </span>\n {subLabel && (\n <span className=\"uicore-tabs-subLabel\">{subLabel}</span>\n )}\n </div>\n </div>\n </a>\n </li>\n );\n })}\n </ul>\n );\n }\n}\n"]}
@@ -5,6 +5,7 @@ import * as React from "react";
5
5
  import type { TabsProps } from "./Tabs";
6
6
  /** Vertical tabs meant to represent the current position in a page/section
7
7
  * @public
8
+ * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/tabs#vertical iTwinUI Tabs} instead.
8
9
  */
9
10
  export declare function VerticalTabs(props: TabsProps): React.JSX.Element;
10
11
  //# sourceMappingURL=VerticalTabs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VerticalTabs.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tabs/VerticalTabs.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAIxC;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,qBAQ5C"}
1
+ {"version":3,"file":"VerticalTabs.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tabs/VerticalTabs.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAMxC;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,qBAQ5C"}
@@ -8,8 +8,10 @@
8
8
  import * as React from "react";
9
9
  import { Tabs } from "./Tabs";
10
10
  import { Orientation } from "../enums/Orientation";
11
+ /* eslint-disable deprecation/deprecation */
11
12
  /** Vertical tabs meant to represent the current position in a page/section
12
13
  * @public
14
+ * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/tabs#vertical iTwinUI Tabs} instead.
13
15
  */
14
16
  export function VerticalTabs(props) {
15
17
  return (React.createElement(Tabs, { mainClassName: "uicore-tabs-vertical", orientation: Orientation.Vertical, ...props }));
@@ -1 +1 @@
1
- {"version":3,"file":"VerticalTabs.js","sourceRoot":"","sources":["../../../../src/core-react/tabs/VerticalTabs.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,KAAgB;IAC3C,OAAO,CACL,oBAAC,IAAI,IACH,aAAa,EAAC,sBAAsB,EACpC,WAAW,EAAE,WAAW,CAAC,QAAQ,KAC7B,KAAK,GACT,CACH,CAAC;AACJ,CAAC","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 Tabs\n */\n\nimport * as React from \"react\";\nimport type { TabsProps } from \"./Tabs\";\nimport { Tabs } from \"./Tabs\";\nimport { Orientation } from \"../enums/Orientation\";\n\n/** Vertical tabs meant to represent the current position in a page/section\n * @public\n */\nexport function VerticalTabs(props: TabsProps) {\n return (\n <Tabs\n mainClassName=\"uicore-tabs-vertical\"\n orientation={Orientation.Vertical}\n {...props}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"VerticalTabs.js","sourceRoot":"","sources":["../../../../src/core-react/tabs/VerticalTabs.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,4CAA4C;AAE5C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAgB;IAC3C,OAAO,CACL,oBAAC,IAAI,IACH,aAAa,EAAC,sBAAsB,EACpC,WAAW,EAAE,WAAW,CAAC,QAAQ,KAC7B,KAAK,GACT,CACH,CAAC;AACJ,CAAC","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 Tabs\n */\n\nimport * as React from \"react\";\nimport type { TabsProps } from \"./Tabs\";\nimport { Tabs } from \"./Tabs\";\nimport { Orientation } from \"../enums/Orientation\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Vertical tabs meant to represent the current position in a page/section\n * @public\n * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/tabs#vertical iTwinUI Tabs} instead.\n */\nexport function VerticalTabs(props: TabsProps) {\n return (\n <Tabs\n mainClassName=\"uicore-tabs-vertical\"\n orientation={Orientation.Vertical}\n {...props}\n />\n );\n}\n"]}
@@ -5,6 +5,7 @@ import * as React from "react";
5
5
  import type { TextProps } from "./TextProps";
6
6
  /** Styled block text React functional component
7
7
  * @public
8
+ * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/typography#text iTwinUI Text} instead.
8
9
  */
9
10
  export declare function BlockText(props: TextProps): React.JSX.Element;
10
11
  //# sourceMappingURL=BlockText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BlockText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/BlockText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,qBAGzC"}
1
+ {"version":3,"file":"BlockText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/BlockText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;GAGG;AAEH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,qBAGzC"}
@@ -9,7 +9,9 @@ import * as React from "react";
9
9
  import { StyledText } from "./StyledText";
10
10
  /** Styled block text React functional component
11
11
  * @public
12
+ * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/typography#text iTwinUI Text} instead.
12
13
  */
14
+ // eslint-disable-next-line deprecation/deprecation
13
15
  export function BlockText(props) {
14
16
  // eslint-disable-next-line deprecation/deprecation
15
17
  return React.createElement(StyledText, { ...props, mainClassName: "uicore-text-block" });
@@ -1 +1 @@
1
- {"version":3,"file":"BlockText.js","sourceRoot":"","sources":["../../../../src/core-react/text/BlockText.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAgB;IACxC,mDAAmD;IACnD,OAAO,oBAAC,UAAU,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AACrE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Text\n */\n\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled block text React functional component\n * @public\n */\nexport function BlockText(props: TextProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <StyledText {...props} mainClassName=\"uicore-text-block\" />;\n}\n"]}
1
+ {"version":3,"file":"BlockText.js","sourceRoot":"","sources":["../../../../src/core-react/text/BlockText.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;;GAGG;AACH,mDAAmD;AACnD,MAAM,UAAU,SAAS,CAAC,KAAgB;IACxC,mDAAmD;IACnD,OAAO,oBAAC,UAAU,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AACrE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Text\n */\n\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled block text React functional component\n * @public\n * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/typography#text iTwinUI Text} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function BlockText(props: TextProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <StyledText {...props} mainClassName=\"uicore-text-block\" />;\n}\n"]}
@@ -5,7 +5,7 @@ import * as React from "react";
5
5
  import type { TextProps } from "./TextProps";
6
6
  /** Styled body text React functional component
7
7
  * @public
8
- * @deprecated in 4.0 Use \<Text variant='body' /\> from iTwinUI-react package.
8
+ * @deprecated in 4.0 Use `<Text variant='body' />` from iTwinUI-react package.
9
9
  */
10
10
  export declare function BodyText(props: TextProps): React.JSX.Element;
11
11
  //# sourceMappingURL=BodyText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BodyText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/BodyText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,qBAGxC"}
1
+ {"version":3,"file":"BodyText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/BodyText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;GAGG;AAEH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,qBAGxC"}
@@ -9,8 +9,9 @@ import * as React from "react";
9
9
  import { StyledText } from "./StyledText";
10
10
  /** Styled body text React functional component
11
11
  * @public
12
- * @deprecated in 4.0 Use \<Text variant='body' /\> from iTwinUI-react package.
12
+ * @deprecated in 4.0 Use `<Text variant='body' />` from iTwinUI-react package.
13
13
  */
14
+ // eslint-disable-next-line deprecation/deprecation
14
15
  export function BodyText(props) {
15
16
  // eslint-disable-next-line deprecation/deprecation
16
17
  return React.createElement(StyledText, { ...props, mainClassName: "uicore-text-body" });
@@ -1 +1 @@
1
- {"version":3,"file":"BodyText.js","sourceRoot":"","sources":["../../../../src/core-react/text/BodyText.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAgB;IACvC,mDAAmD;IACnD,OAAO,oBAAC,UAAU,OAAK,KAAK,EAAE,aAAa,EAAC,kBAAkB,GAAG,CAAC;AACpE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Text\n */\n\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled body text React functional component\n * @public\n * @deprecated in 4.0 Use \\<Text variant='body' /\\> from iTwinUI-react package.\n */\nexport function BodyText(props: TextProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <StyledText {...props} mainClassName=\"uicore-text-body\" />;\n}\n"]}
1
+ {"version":3,"file":"BodyText.js","sourceRoot":"","sources":["../../../../src/core-react/text/BodyText.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;;GAGG;AACH,mDAAmD;AACnD,MAAM,UAAU,QAAQ,CAAC,KAAgB;IACvC,mDAAmD;IACnD,OAAO,oBAAC,UAAU,OAAK,KAAK,EAAE,aAAa,EAAC,kBAAkB,GAAG,CAAC;AACpE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Text\n */\n\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled body text React functional component\n * @public\n * @deprecated in 4.0 Use `<Text variant='body' />` from iTwinUI-react package.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function BodyText(props: TextProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <StyledText {...props} mainClassName=\"uicore-text-body\" />;\n}\n"]}
@@ -5,6 +5,7 @@ import * as React from "react";
5
5
  import type { TextProps } from "./TextProps";
6
6
  /** Styled disabled text React functional component
7
7
  * @public
8
+ * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/typography#text iTwinUI Text} instead.
8
9
  */
9
10
  export declare function DisabledText(props: TextProps): React.JSX.Element;
10
11
  //# sourceMappingURL=DisabledText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DisabledText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/DisabledText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,qBAG5C"}
1
+ {"version":3,"file":"DisabledText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/DisabledText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,qBAE5C"}
@@ -7,11 +7,12 @@
7
7
  */
8
8
  import * as React from "react";
9
9
  import { StyledText } from "./StyledText";
10
+ /* eslint-disable deprecation/deprecation */
10
11
  /** Styled disabled text React functional component
11
12
  * @public
13
+ * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/typography#text iTwinUI Text} instead.
12
14
  */
13
15
  export function DisabledText(props) {
14
- // eslint-disable-next-line deprecation/deprecation
15
16
  return React.createElement(StyledText, { ...props, mainClassName: "uicore-text-disabled" });
16
17
  }
17
18
  //# sourceMappingURL=DisabledText.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DisabledText.js","sourceRoot":"","sources":["../../../../src/core-react/text/DisabledText.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,KAAgB;IAC3C,mDAAmD;IACnD,OAAO,oBAAC,UAAU,OAAK,KAAK,EAAE,aAAa,EAAC,sBAAsB,GAAG,CAAC;AACxE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Text\n */\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled disabled text React functional component\n * @public\n */\nexport function DisabledText(props: TextProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <StyledText {...props} mainClassName=\"uicore-text-disabled\" />;\n}\n"]}
1
+ {"version":3,"file":"DisabledText.js","sourceRoot":"","sources":["../../../../src/core-react/text/DisabledText.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,4CAA4C;AAE5C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAgB;IAC3C,OAAO,oBAAC,UAAU,OAAK,KAAK,EAAE,aAAa,EAAC,sBAAsB,GAAG,CAAC;AACxE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Text\n */\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Styled disabled text React functional component\n * @public\n * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/typography#text iTwinUI Text} instead.\n */\nexport function DisabledText(props: TextProps) {\n return <StyledText {...props} mainClassName=\"uicore-text-disabled\" />;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutedText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/MutedText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,qBAGzC"}
1
+ {"version":3,"file":"MutedText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/MutedText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;GAGG;AAEH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,qBAGzC"}
@@ -11,6 +11,7 @@ import { StyledText } from "./StyledText";
11
11
  * @public
12
12
  * @deprecated in 4.0 Use \<Text isMuted /\> from iTwinUI-react package.
13
13
  */
14
+ // eslint-disable-next-line deprecation/deprecation
14
15
  export function MutedText(props) {
15
16
  // eslint-disable-next-line deprecation/deprecation
16
17
  return React.createElement(StyledText, { ...props, mainClassName: "uicore-text-muted" });
@@ -1 +1 @@
1
- {"version":3,"file":"MutedText.js","sourceRoot":"","sources":["../../../../src/core-react/text/MutedText.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAgB;IACxC,mDAAmD;IACnD,OAAO,oBAAC,UAAU,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AACrE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Text\n */\n\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled muted/gray text React functional component\n * @public\n * @deprecated in 4.0 Use \\<Text isMuted /\\> from iTwinUI-react package.\n */\nexport function MutedText(props: TextProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <StyledText {...props} mainClassName=\"uicore-text-muted\" />;\n}\n"]}
1
+ {"version":3,"file":"MutedText.js","sourceRoot":"","sources":["../../../../src/core-react/text/MutedText.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;;GAGG;AACH,mDAAmD;AACnD,MAAM,UAAU,SAAS,CAAC,KAAgB;IACxC,mDAAmD;IACnD,OAAO,oBAAC,UAAU,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AACrE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Text\n */\n\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled muted/gray text React functional component\n * @public\n * @deprecated in 4.0 Use \\<Text isMuted /\\> from iTwinUI-react package.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function MutedText(props: TextProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <StyledText {...props} mainClassName=\"uicore-text-muted\" />;\n}\n"]}