@itwin/core-react 3.7.16 → 3.7.17

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 (388) hide show
  1. package/CHANGELOG.md +6 -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.map +1 -1
  5. package/lib/cjs/core-react/badge/Badge.d.ts +1 -1
  6. package/lib/cjs/core-react/badge/Badge.d.ts.map +1 -1
  7. package/lib/cjs/core-react/badge/Badge.js.map +1 -1
  8. package/lib/cjs/core-react/badge/BetaBadge.d.ts +2 -2
  9. package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
  10. package/lib/cjs/core-react/badge/NewBadge.d.ts +2 -2
  11. package/lib/cjs/core-react/badge/NewBadge.d.ts.map +1 -1
  12. package/lib/cjs/core-react/base/Centered.d.ts +2 -2
  13. package/lib/cjs/core-react/base/Centered.d.ts.map +1 -1
  14. package/lib/cjs/core-react/base/Div.d.ts +2 -2
  15. package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
  16. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +2 -2
  17. package/lib/cjs/core-react/base/FillCentered.d.ts +2 -2
  18. package/lib/cjs/core-react/base/FillCentered.d.ts.map +1 -1
  19. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +2 -2
  20. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  21. package/lib/cjs/core-react/base/Gap.d.ts +2 -2
  22. package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
  23. package/lib/cjs/core-react/base/ScrollView.d.ts +2 -2
  24. package/lib/cjs/core-react/base/ScrollView.d.ts.map +1 -1
  25. package/lib/cjs/core-react/button/Button.d.ts +1 -1
  26. package/lib/cjs/core-react/button/UnderlinedButton.d.ts +1 -1
  27. package/lib/cjs/core-react/button/UnderlinedButton.d.ts.map +1 -1
  28. package/lib/cjs/core-react/checkbox/Checkbox.d.ts +1 -1
  29. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +3 -3
  30. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  31. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +1 -1
  32. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  33. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  34. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  35. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  36. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  37. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
  38. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  39. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  40. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
  41. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  42. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +3 -1
  43. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  44. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts +1 -1
  45. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  46. package/lib/cjs/core-react/dialog/Dialog.d.ts +3 -3
  47. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  48. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  49. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +2 -2
  50. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  51. package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts +2 -2
  52. package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts.map +1 -1
  53. package/lib/cjs/core-react/expandable/ExpandableBlock.js.map +1 -1
  54. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +1 -1
  55. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  56. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  57. package/lib/cjs/core-react/focustrap/FocusTrap.d.ts +1 -1
  58. package/lib/cjs/core-react/focustrap/FocusTrap.d.ts.map +1 -1
  59. package/lib/cjs/core-react/form/Field.d.ts +1 -1
  60. package/lib/cjs/core-react/form/Form.d.ts +1 -1
  61. package/lib/cjs/core-react/hocs/withIsPressed.d.ts +2 -2
  62. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts +2 -2
  63. package/lib/cjs/core-react/hocs/withTimeout.d.ts +2 -2
  64. package/lib/cjs/core-react/icons/IconComponent.d.ts +1 -1
  65. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  66. package/lib/cjs/core-react/icons/SvgPath.d.ts +1 -1
  67. package/lib/cjs/core-react/icons/SvgSprite.d.ts +1 -1
  68. package/lib/cjs/core-react/icons/WebFontIcon.d.ts +1 -1
  69. package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
  70. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +1 -1
  71. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +1 -1
  72. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  73. package/lib/cjs/core-react/inputs/Input.d.ts +1 -1
  74. package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
  75. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  76. package/lib/cjs/core-react/inputs/InputLabel.d.ts +1 -1
  77. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  78. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  79. package/lib/cjs/core-react/inputs/LabeledInput.d.ts +2 -2
  80. package/lib/cjs/core-react/inputs/LabeledInput.d.ts.map +1 -1
  81. package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts +2 -2
  82. package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts.map +1 -1
  83. package/lib/cjs/core-react/inputs/Textarea.d.ts +1 -1
  84. package/lib/cjs/core-react/inputs/Textarea.d.ts.map +1 -1
  85. package/lib/cjs/core-react/inputs/Textarea.js.map +1 -1
  86. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  87. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  88. package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
  89. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +1 -1
  90. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  91. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  92. package/lib/cjs/core-react/listbox/Listbox.d.ts +2 -2
  93. package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
  94. package/lib/cjs/core-react/loading/LoadingBar.d.ts +1 -1
  95. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +1 -1
  96. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +1 -1
  97. package/lib/cjs/core-react/loading/LoadingStatus.d.ts +1 -1
  98. package/lib/cjs/core-react/loading/Spinner.d.ts +1 -1
  99. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +3 -3
  100. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  101. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  102. package/lib/cjs/core-react/notification/MessageRenderer.d.ts +2 -2
  103. package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
  104. package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts +2 -2
  105. package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts.map +1 -1
  106. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts +1 -1
  107. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts.map +1 -1
  108. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +2 -2
  109. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  110. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  111. package/lib/cjs/core-react/radio/Radio.d.ts +1 -1
  112. package/lib/cjs/core-react/radio/Radio.d.ts.map +1 -1
  113. package/lib/cjs/core-react/radio/Radio.js.map +1 -1
  114. package/lib/cjs/core-react/select/LabeledSelect.d.ts +1 -1
  115. package/lib/cjs/core-react/select/LabeledSelect.d.ts.map +1 -1
  116. package/lib/cjs/core-react/select/LabeledSelect.js.map +1 -1
  117. package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts +2 -2
  118. package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts.map +1 -1
  119. package/lib/cjs/core-react/select/Select.d.ts +1 -1
  120. package/lib/cjs/core-react/select/Select.d.ts.map +1 -1
  121. package/lib/cjs/core-react/select/Select.js.map +1 -1
  122. package/lib/cjs/core-react/select/ThemedSelect.d.ts +1 -1
  123. package/lib/cjs/core-react/select/ThemedSelect.d.ts.map +1 -1
  124. package/lib/cjs/core-react/settings/SettingsContainer.d.ts +2 -2
  125. package/lib/cjs/core-react/settings/SettingsContainer.d.ts.map +1 -1
  126. package/lib/cjs/core-react/settings/SettingsManager.d.ts +3 -3
  127. package/lib/cjs/core-react/settings/SettingsManager.d.ts.map +1 -1
  128. package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
  129. package/lib/cjs/core-react/slider/Slider.d.ts +1 -1
  130. package/lib/cjs/core-react/slider/Slider.d.ts.map +1 -1
  131. package/lib/cjs/core-react/splitbutton/SplitButton.d.ts +1 -1
  132. package/lib/cjs/core-react/splitbutton/SplitButton.d.ts.map +1 -1
  133. package/lib/cjs/core-react/splitbutton/SplitButton.js.map +1 -1
  134. package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts +2 -2
  135. package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts.map +1 -1
  136. package/lib/cjs/core-react/tabs/Tabs.d.ts +4 -4
  137. package/lib/cjs/core-react/tabs/Tabs.d.ts.map +1 -1
  138. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  139. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +2 -2
  140. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  141. package/lib/cjs/core-react/text/BlockText.d.ts +2 -2
  142. package/lib/cjs/core-react/text/BlockText.d.ts.map +1 -1
  143. package/lib/cjs/core-react/text/BodyText.d.ts +2 -2
  144. package/lib/cjs/core-react/text/BodyText.d.ts.map +1 -1
  145. package/lib/cjs/core-react/text/DisabledText.d.ts +5 -2
  146. package/lib/cjs/core-react/text/DisabledText.d.ts.map +1 -1
  147. package/lib/cjs/core-react/text/FilteredText.d.ts +1 -1
  148. package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
  149. package/lib/cjs/core-react/text/Headline.d.ts +2 -2
  150. package/lib/cjs/core-react/text/Headline.d.ts.map +1 -1
  151. package/lib/cjs/core-react/text/LeadingText.d.ts +2 -2
  152. package/lib/cjs/core-react/text/LeadingText.d.ts.map +1 -1
  153. package/lib/cjs/core-react/text/LeadingText2.d.ts +2 -2
  154. package/lib/cjs/core-react/text/LeadingText2.d.ts.map +1 -1
  155. package/lib/cjs/core-react/text/MutedText.d.ts +2 -2
  156. package/lib/cjs/core-react/text/MutedText.d.ts.map +1 -1
  157. package/lib/cjs/core-react/text/SmallText.d.ts +2 -2
  158. package/lib/cjs/core-react/text/SmallText.d.ts.map +1 -1
  159. package/lib/cjs/core-react/text/StyledText.d.ts +2 -2
  160. package/lib/cjs/core-react/text/StyledText.d.ts.map +1 -1
  161. package/lib/cjs/core-react/text/Subheading.d.ts +2 -2
  162. package/lib/cjs/core-react/text/Subheading.d.ts.map +1 -1
  163. package/lib/cjs/core-react/text/Subheading2.d.ts +2 -2
  164. package/lib/cjs/core-react/text/Subheading2.d.ts.map +1 -1
  165. package/lib/cjs/core-react/text/Title.d.ts +2 -2
  166. package/lib/cjs/core-react/text/Title.d.ts.map +1 -1
  167. package/lib/cjs/core-react/text/Title2.d.ts +2 -2
  168. package/lib/cjs/core-react/text/Title2.d.ts.map +1 -1
  169. package/lib/cjs/core-react/tiles/FeaturedTile.d.ts +2 -2
  170. package/lib/cjs/core-react/tiles/FeaturedTile.d.ts.map +1 -1
  171. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts +2 -2
  172. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts.map +1 -1
  173. package/lib/cjs/core-react/tiles/MinimalTile.d.ts +2 -2
  174. package/lib/cjs/core-react/tiles/MinimalTile.d.ts.map +1 -1
  175. package/lib/cjs/core-react/tiles/Tile.d.ts +1 -1
  176. package/lib/cjs/core-react/tiles/Tile.d.ts.map +1 -1
  177. package/lib/cjs/core-react/tiles/Tile.js.map +1 -1
  178. package/lib/cjs/core-react/toggle/LabeledToggle.d.ts +1 -1
  179. package/lib/cjs/core-react/toggle/LabeledToggle.d.ts.map +1 -1
  180. package/lib/cjs/core-react/toggle/LabeledToggle.js.map +1 -1
  181. package/lib/cjs/core-react/toggle/Toggle.d.ts +1 -1
  182. package/lib/cjs/core-react/toggle/Toggle.d.ts.map +1 -1
  183. package/lib/cjs/core-react/toggle/Toggle.js +3 -1
  184. package/lib/cjs/core-react/toggle/Toggle.js.map +1 -1
  185. package/lib/cjs/core-react/tooltip/Tooltip.d.ts +1 -1
  186. package/lib/cjs/core-react/tooltip/Tooltip.d.ts.map +1 -1
  187. package/lib/cjs/core-react/tree/Branch.d.ts +1 -1
  188. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts +1 -1
  189. package/lib/cjs/core-react/tree/Node.d.ts +1 -1
  190. package/lib/cjs/core-react/tree/Placeholder.d.ts +1 -1
  191. package/lib/cjs/core-react/tree/Tree.d.ts +1 -1
  192. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +3 -3
  193. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  194. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  195. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  196. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  197. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  198. package/lib/esm/core-react/badge/Badge.d.ts +1 -1
  199. package/lib/esm/core-react/badge/Badge.d.ts.map +1 -1
  200. package/lib/esm/core-react/badge/Badge.js.map +1 -1
  201. package/lib/esm/core-react/badge/BetaBadge.d.ts +2 -2
  202. package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
  203. package/lib/esm/core-react/badge/NewBadge.d.ts +2 -2
  204. package/lib/esm/core-react/badge/NewBadge.d.ts.map +1 -1
  205. package/lib/esm/core-react/base/Centered.d.ts +2 -2
  206. package/lib/esm/core-react/base/Centered.d.ts.map +1 -1
  207. package/lib/esm/core-react/base/Div.d.ts +2 -2
  208. package/lib/esm/core-react/base/Div.d.ts.map +1 -1
  209. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +2 -2
  210. package/lib/esm/core-react/base/FillCentered.d.ts +2 -2
  211. package/lib/esm/core-react/base/FillCentered.d.ts.map +1 -1
  212. package/lib/esm/core-react/base/FlexWrapContainer.d.ts +2 -2
  213. package/lib/esm/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  214. package/lib/esm/core-react/base/Gap.d.ts +2 -2
  215. package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
  216. package/lib/esm/core-react/base/ScrollView.d.ts +2 -2
  217. package/lib/esm/core-react/base/ScrollView.d.ts.map +1 -1
  218. package/lib/esm/core-react/button/Button.d.ts +1 -1
  219. package/lib/esm/core-react/button/UnderlinedButton.d.ts +1 -1
  220. package/lib/esm/core-react/button/UnderlinedButton.d.ts.map +1 -1
  221. package/lib/esm/core-react/checkbox/Checkbox.d.ts +1 -1
  222. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +3 -3
  223. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  224. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +1 -1
  225. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  226. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  227. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  228. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  229. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  230. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
  231. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  232. package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  233. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
  234. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  235. package/lib/esm/core-react/contextmenu/ContextSubMenu.js +3 -1
  236. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  237. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts +1 -1
  238. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  239. package/lib/esm/core-react/dialog/Dialog.d.ts +3 -3
  240. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  241. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  242. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +2 -2
  243. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  244. package/lib/esm/core-react/expandable/ExpandableBlock.d.ts +2 -2
  245. package/lib/esm/core-react/expandable/ExpandableBlock.d.ts.map +1 -1
  246. package/lib/esm/core-react/expandable/ExpandableBlock.js.map +1 -1
  247. package/lib/esm/core-react/expandable/ExpandableList.d.ts +1 -1
  248. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  249. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  250. package/lib/esm/core-react/focustrap/FocusTrap.d.ts +1 -1
  251. package/lib/esm/core-react/focustrap/FocusTrap.d.ts.map +1 -1
  252. package/lib/esm/core-react/form/Field.d.ts +1 -1
  253. package/lib/esm/core-react/form/Form.d.ts +1 -1
  254. package/lib/esm/core-react/hocs/withIsPressed.d.ts +2 -2
  255. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts +2 -2
  256. package/lib/esm/core-react/hocs/withTimeout.d.ts +2 -2
  257. package/lib/esm/core-react/icons/IconComponent.d.ts +1 -1
  258. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  259. package/lib/esm/core-react/icons/SvgPath.d.ts +1 -1
  260. package/lib/esm/core-react/icons/SvgSprite.d.ts +1 -1
  261. package/lib/esm/core-react/icons/WebFontIcon.d.ts +1 -1
  262. package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
  263. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +1 -1
  264. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +1 -1
  265. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  266. package/lib/esm/core-react/inputs/Input.d.ts +1 -1
  267. package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
  268. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  269. package/lib/esm/core-react/inputs/InputLabel.d.ts +1 -1
  270. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  271. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  272. package/lib/esm/core-react/inputs/LabeledInput.d.ts +2 -2
  273. package/lib/esm/core-react/inputs/LabeledInput.d.ts.map +1 -1
  274. package/lib/esm/core-react/inputs/LabeledTextarea.d.ts +2 -2
  275. package/lib/esm/core-react/inputs/LabeledTextarea.d.ts.map +1 -1
  276. package/lib/esm/core-react/inputs/Textarea.d.ts +1 -1
  277. package/lib/esm/core-react/inputs/Textarea.d.ts.map +1 -1
  278. package/lib/esm/core-react/inputs/Textarea.js.map +1 -1
  279. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  280. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  281. package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
  282. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +1 -1
  283. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  284. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  285. package/lib/esm/core-react/listbox/Listbox.d.ts +2 -2
  286. package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
  287. package/lib/esm/core-react/loading/LoadingBar.d.ts +1 -1
  288. package/lib/esm/core-react/loading/LoadingPrompt.d.ts +1 -1
  289. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +1 -1
  290. package/lib/esm/core-react/loading/LoadingStatus.d.ts +1 -1
  291. package/lib/esm/core-react/loading/Spinner.d.ts +1 -1
  292. package/lib/esm/core-react/messagebox/MessageBox.d.ts +3 -3
  293. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  294. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  295. package/lib/esm/core-react/notification/MessageRenderer.d.ts +2 -2
  296. package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
  297. package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts +2 -2
  298. package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts.map +1 -1
  299. package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts +1 -1
  300. package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts.map +1 -1
  301. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +2 -2
  302. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  303. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  304. package/lib/esm/core-react/radio/Radio.d.ts +1 -1
  305. package/lib/esm/core-react/radio/Radio.d.ts.map +1 -1
  306. package/lib/esm/core-react/radio/Radio.js.map +1 -1
  307. package/lib/esm/core-react/select/LabeledSelect.d.ts +1 -1
  308. package/lib/esm/core-react/select/LabeledSelect.d.ts.map +1 -1
  309. package/lib/esm/core-react/select/LabeledSelect.js.map +1 -1
  310. package/lib/esm/core-react/select/LabeledThemedSelect.d.ts +2 -2
  311. package/lib/esm/core-react/select/LabeledThemedSelect.d.ts.map +1 -1
  312. package/lib/esm/core-react/select/Select.d.ts +1 -1
  313. package/lib/esm/core-react/select/Select.d.ts.map +1 -1
  314. package/lib/esm/core-react/select/Select.js.map +1 -1
  315. package/lib/esm/core-react/select/ThemedSelect.d.ts +1 -1
  316. package/lib/esm/core-react/select/ThemedSelect.d.ts.map +1 -1
  317. package/lib/esm/core-react/settings/SettingsContainer.d.ts +2 -2
  318. package/lib/esm/core-react/settings/SettingsContainer.d.ts.map +1 -1
  319. package/lib/esm/core-react/settings/SettingsManager.d.ts +3 -3
  320. package/lib/esm/core-react/settings/SettingsManager.d.ts.map +1 -1
  321. package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
  322. package/lib/esm/core-react/slider/Slider.d.ts +1 -1
  323. package/lib/esm/core-react/slider/Slider.d.ts.map +1 -1
  324. package/lib/esm/core-react/splitbutton/SplitButton.d.ts +1 -1
  325. package/lib/esm/core-react/splitbutton/SplitButton.d.ts.map +1 -1
  326. package/lib/esm/core-react/splitbutton/SplitButton.js.map +1 -1
  327. package/lib/esm/core-react/tabs/HorizontalTabs.d.ts +2 -2
  328. package/lib/esm/core-react/tabs/HorizontalTabs.d.ts.map +1 -1
  329. package/lib/esm/core-react/tabs/Tabs.d.ts +4 -4
  330. package/lib/esm/core-react/tabs/Tabs.d.ts.map +1 -1
  331. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  332. package/lib/esm/core-react/tabs/VerticalTabs.d.ts +2 -2
  333. package/lib/esm/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  334. package/lib/esm/core-react/text/BlockText.d.ts +2 -2
  335. package/lib/esm/core-react/text/BlockText.d.ts.map +1 -1
  336. package/lib/esm/core-react/text/BodyText.d.ts +2 -2
  337. package/lib/esm/core-react/text/BodyText.d.ts.map +1 -1
  338. package/lib/esm/core-react/text/DisabledText.d.ts +5 -2
  339. package/lib/esm/core-react/text/DisabledText.d.ts.map +1 -1
  340. package/lib/esm/core-react/text/FilteredText.d.ts +1 -1
  341. package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
  342. package/lib/esm/core-react/text/Headline.d.ts +2 -2
  343. package/lib/esm/core-react/text/Headline.d.ts.map +1 -1
  344. package/lib/esm/core-react/text/LeadingText.d.ts +2 -2
  345. package/lib/esm/core-react/text/LeadingText.d.ts.map +1 -1
  346. package/lib/esm/core-react/text/LeadingText2.d.ts +2 -2
  347. package/lib/esm/core-react/text/LeadingText2.d.ts.map +1 -1
  348. package/lib/esm/core-react/text/MutedText.d.ts +2 -2
  349. package/lib/esm/core-react/text/MutedText.d.ts.map +1 -1
  350. package/lib/esm/core-react/text/SmallText.d.ts +2 -2
  351. package/lib/esm/core-react/text/SmallText.d.ts.map +1 -1
  352. package/lib/esm/core-react/text/StyledText.d.ts +2 -2
  353. package/lib/esm/core-react/text/StyledText.d.ts.map +1 -1
  354. package/lib/esm/core-react/text/Subheading.d.ts +2 -2
  355. package/lib/esm/core-react/text/Subheading.d.ts.map +1 -1
  356. package/lib/esm/core-react/text/Subheading2.d.ts +2 -2
  357. package/lib/esm/core-react/text/Subheading2.d.ts.map +1 -1
  358. package/lib/esm/core-react/text/Title.d.ts +2 -2
  359. package/lib/esm/core-react/text/Title.d.ts.map +1 -1
  360. package/lib/esm/core-react/text/Title2.d.ts +2 -2
  361. package/lib/esm/core-react/text/Title2.d.ts.map +1 -1
  362. package/lib/esm/core-react/tiles/FeaturedTile.d.ts +2 -2
  363. package/lib/esm/core-react/tiles/FeaturedTile.d.ts.map +1 -1
  364. package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts +2 -2
  365. package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts.map +1 -1
  366. package/lib/esm/core-react/tiles/MinimalTile.d.ts +2 -2
  367. package/lib/esm/core-react/tiles/MinimalTile.d.ts.map +1 -1
  368. package/lib/esm/core-react/tiles/Tile.d.ts +1 -1
  369. package/lib/esm/core-react/tiles/Tile.d.ts.map +1 -1
  370. package/lib/esm/core-react/tiles/Tile.js.map +1 -1
  371. package/lib/esm/core-react/toggle/LabeledToggle.d.ts +1 -1
  372. package/lib/esm/core-react/toggle/LabeledToggle.d.ts.map +1 -1
  373. package/lib/esm/core-react/toggle/LabeledToggle.js.map +1 -1
  374. package/lib/esm/core-react/toggle/Toggle.d.ts +1 -1
  375. package/lib/esm/core-react/toggle/Toggle.d.ts.map +1 -1
  376. package/lib/esm/core-react/toggle/Toggle.js +3 -1
  377. package/lib/esm/core-react/toggle/Toggle.js.map +1 -1
  378. package/lib/esm/core-react/tooltip/Tooltip.d.ts +1 -1
  379. package/lib/esm/core-react/tooltip/Tooltip.d.ts.map +1 -1
  380. package/lib/esm/core-react/tree/Branch.d.ts +1 -1
  381. package/lib/esm/core-react/tree/ExpansionToggle.d.ts +1 -1
  382. package/lib/esm/core-react/tree/Node.d.ts +1 -1
  383. package/lib/esm/core-react/tree/Placeholder.d.ts +1 -1
  384. package/lib/esm/core-react/tree/Tree.d.ts +1 -1
  385. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +3 -3
  386. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  387. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  388. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuDivider.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDivider.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,2CAAoC;AAGpC;;;GAGG;AACH,MAAa,kBAAmB,SAAQ,KAAK,CAAC,aAA0B;IACtD,MAAM;QACpB,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC3C,OAAO,CACL,gCAAS,KAAK,iBAAc,2BAA2B,EAAC,SAAS,EAAE,IAAA,oBAAU,EAAC,2BAA2B,EAAE,SAAS,CAAC,GAAI,CAC1H,CAAC;IACJ,CAAC;CACF;AAPD,gDAOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/**\r\n * Menu Divider for [[ContextMenu]]. Inserts a line between items, used for list item grouping.\r\n * @public\r\n */\r\nexport class ContextMenuDivider extends React.PureComponent<CommonProps> {\r\n public override render(): JSX.Element {\r\n const { className, ...props } = this.props;\r\n return (\r\n <div {...props} data-testid=\"core-context-menu-divider\" className={classnames(\"core-context-menu-divider\", className)} />\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ContextMenuDivider.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDivider.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,2CAAoC;AAGpC;;;GAGG;AACH,MAAa,kBAAmB,SAAQ,KAAK,CAAC,aAA0B;IACtD,MAAM;QACpB,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC3C,OAAO,CACL,gCAAS,KAAK,iBAAc,2BAA2B,EAAC,SAAS,EAAE,IAAA,oBAAU,EAAC,2BAA2B,EAAE,SAAS,CAAC,GAAI,CAC1H,CAAC;IACJ,CAAC;CACF;AAPD,gDAOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/**\r\n * Menu Divider for [[ContextMenu]]. Inserts a line between items, used for list item grouping.\r\n * @public\r\n */\r\nexport class ContextMenuDivider extends React.PureComponent<CommonProps> {\r\n public override render(): React.JSX.Element {\r\n const { className, ...props } = this.props;\r\n return (\r\n <div {...props} data-testid=\"core-context-menu-divider\" className={classnames(\"core-context-menu-divider\", className)} />\r\n );\r\n }\r\n}\r\n"]}
@@ -48,7 +48,7 @@ export declare class ContextMenuItem extends React.PureComponent<ContextMenuItem
48
48
  constructor(props: ContextMenuItemProps);
49
49
  /** @internal */
50
50
  readonly state: Readonly<ContextMenuItemState>;
51
- render(): JSX.Element;
51
+ render(): React.JSX.Element;
52
52
  componentDidMount(): void;
53
53
  componentDidUpdate(prevProps: ContextMenuItemProps): void;
54
54
  private _updateHotkey;
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuItem.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuItem.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAc,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAQ,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,oBAAqB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AE,IAAI,GAAI,CAC3C;YACN,6BAAK,SAAS,EAAE,2BAA2B,IACxC,IAAI,CAAC,eAAe,CACjB;YACL,SAAS;gBACR,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,wBAAwB,EAAE,8BAA8B,CAAC;oBAClF,oBAAC,oBAAI,IAAC,QAAQ,EAAE,SAAS,GAAI,CACzB;YAEP,KAAK;gBACJ,6BAAK,SAAS,EAAC,yBAAyB,IACrC,KAAK,CACF,CAEJ,CACP,CAAC;IACJ,CAAC;IAEe,iBAAiB;QAC/B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAEe,kBAAkB,CAAC,SAA+B;QAChE,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,EAAE;YAC9C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;SACzC;IACH,CAAC;;AA5EH,0CAkIC;AA9HC,gBAAgB;AACF,4BAAY,GAAkC;IAC1D,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,KAAK;CAClB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { BadgeType, ConditionalBooleanValue, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { ContextMenu } from \"./ContextMenu\";\r\nimport { BadgeUtilities } from \"../badge/BadgeUtilities\";\r\nimport { TildeFinder } from \"./TildeFinder\";\r\nimport { Icon, IconSpec } from \"../icons/IconComponent\";\r\n\r\n/** Properties for the [[ContextMenuItem]] component\r\n * @public\r\n */\r\nexport interface ContextMenuItemProps extends Omit<React.AllHTMLAttributes<HTMLDivElement>, \"disabled\" | \"hidden\">, CommonProps {\r\n onSelect?: (event: any) => any;\r\n /** @internal */\r\n onHotKeyParsed?: (hotKey: string) => void;\r\n /** Icon to display in the left margin. */\r\n icon?: IconSpec;\r\n /** Disables any onSelect calls, hover/keyboard highlighting, and grays item. */\r\n disabled?: boolean | ConditionalBooleanValue;\r\n /** Indicates whether the item is visible or hidden. The default is for the item to be visible. */\r\n hidden?: boolean | ConditionalBooleanValue;\r\n /** Badge to be overlaid on the item. */\r\n badgeType?: BadgeType;\r\n /** Icon to display in the right margin. */\r\n iconRight?: IconSpec;\r\n /** Hide the icon container. This can be used to eliminate space used to display an icon at the left of the menu item. */\r\n hideIconContainer?: boolean;\r\n /** @internal */\r\n onHover?: () => any;\r\n /* @internal */\r\n isSelected?: boolean;\r\n /** @internal */\r\n parentMenu?: ContextMenu;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextMenuItemState {\r\n hotKey?: string;\r\n}\r\n\r\n/**\r\n * Menu Item class for use within a [[ContextMenu]] component.\r\n * @public\r\n */\r\nexport class ContextMenuItem extends React.PureComponent<ContextMenuItemProps, ContextMenuItemState> {\r\n private _root: HTMLElement | null = null;\r\n private _lastChildren: React.ReactNode;\r\n private _parsedChildren: React.ReactNode;\r\n /** @internal */\r\n public static defaultProps: Partial<ContextMenuItemProps> = {\r\n disabled: false,\r\n hidden: false,\r\n isSelected: false,\r\n };\r\n constructor(props: ContextMenuItemProps) {\r\n super(props);\r\n }\r\n /** @internal */\r\n public override readonly state: Readonly<ContextMenuItemState> = {};\r\n public override render(): JSX.Element {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { onClick, className, style, onSelect, icon, disabled, hidden, onHover, isSelected, parentMenu, onHotKeyParsed, badgeType, iconRight,\r\n hideIconContainer, ...props } = this.props;\r\n const badge = BadgeUtilities.getComponentForBadgeType(badgeType);\r\n const isDisabled = ConditionalBooleanValue.getValue(disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(hidden);\r\n\r\n if (this._lastChildren !== this.props.children) {\r\n this._parsedChildren = TildeFinder.findAfterTilde(this.props.children).node;\r\n this._lastChildren = this.props.children;\r\n }\r\n\r\n return (\r\n <div\r\n {...props}\r\n ref={(el) => { this._root = el; }}\r\n onClick={this._handleClick}\r\n style={style}\r\n onFocus={this._handleFocus}\r\n onKeyUp={this._handleKeyUp}\r\n onMouseOver={this._handleMouseOver}\r\n data-testid={\"core-context-menu-item\"}\r\n className={classnames(\"core-context-menu-item\", className,\r\n isDisabled && \"core-context-menu-disabled\",\r\n isHidden && \"core-context-menu-hidden\",\r\n isSelected && \"core-context-menu-is-selected\")\r\n }\r\n role=\"menuitem\"\r\n tabIndex={isSelected ? 0 : -1}\r\n aria-disabled={isDisabled}\r\n aria-hidden={isHidden}\r\n >\r\n {!hideIconContainer && <div className=\"core-context-menu-icon\">\r\n {icon !== undefined && <Icon iconSpec={icon} />}\r\n </div>}\r\n <div className={\"core-context-menu-content\"}>\r\n {this._parsedChildren}\r\n </div>\r\n {iconRight &&\r\n <div className={classnames(\"core-context-menu-icon\", \"core-context-menu-icon-right\")}>\r\n <Icon iconSpec={iconRight} />\r\n </div>\r\n }\r\n {badge &&\r\n <div className=\"core-context-menu-badge\">\r\n {badge}\r\n </div>\r\n }\r\n </div>\r\n );\r\n }\r\n\r\n public override componentDidMount() {\r\n this._updateHotkey(this.props.children);\r\n }\r\n\r\n public override componentDidUpdate(prevProps: ContextMenuItemProps) {\r\n if (this.props.children !== prevProps.children) {\r\n this._updateHotkey(this.props.children);\r\n }\r\n }\r\n\r\n private _updateHotkey = (node: React.ReactNode) => {\r\n let hotKey: string | undefined;\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(this.props.hidden);\r\n if (!isDisabled && !isHidden)\r\n hotKey = TildeFinder.findAfterTilde(node).character;\r\n else\r\n hotKey = undefined;\r\n if (hotKey && hotKey !== this.state.hotKey) {\r\n this.setState({ hotKey });\r\n if (this.props.onHotKeyParsed)\r\n this.props.onHotKeyParsed(hotKey);\r\n }\r\n };\r\n\r\n private _handleFocus = (event: React.FocusEvent<HTMLDivElement>) => {\r\n event.stopPropagation();\r\n };\r\n\r\n private _handleMouseOver = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n // istanbul ignore else\r\n if (this._root && this._root.style.visibility !== \"hidden\" && this.props.onHover) {\r\n this.props.onHover();\r\n }\r\n };\r\n\r\n public select = () => {\r\n // istanbul ignore else\r\n if (this._root) {\r\n this._root.click();\r\n if (this.props.parentMenu && this.props.parentMenu.props.parentSubmenu)\r\n this.props.parentMenu.props.parentSubmenu.close(true);\r\n }\r\n };\r\n\r\n private _handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n if (isDisabled)\r\n return;\r\n\r\n if (this.props.onClick)\r\n this.props.onClick(event);\r\n if (this.props.onSelect)\r\n this.props.onSelect(event);\r\n };\r\n\r\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>) => {\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n if (event.key === SpecialKey.Enter && this.props.onSelect !== undefined && !isDisabled) {\r\n this.props.onSelect(event);\r\n }\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"ContextMenuItem.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuItem.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,2CAAoC;AACpC,0DAAuF;AAGvF,4DAAyD;AACzD,+CAA4C;AAC5C,0DAAwD;AAkCxD;;;GAGG;AACH,MAAa,eAAgB,SAAQ,KAAK,CAAC,aAAyD;IAUlG,YAAY,KAA2B;QACrC,KAAK,CAAC,KAAK,CAAC,CAAC;QAVP,UAAK,GAAuB,IAAI,CAAC;QAYzC,g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AE,2BAA2B,IACxC,IAAI,CAAC,eAAe,CACjB;YACL,SAAS;gBACR,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,wBAAwB,EAAE,8BAA8B,CAAC;oBAClF,oBAAC,oBAAI,IAAC,QAAQ,EAAE,SAAS,GAAI,CACzB;YAEP,KAAK;gBACJ,6BAAK,SAAS,EAAC,yBAAyB,IACrC,KAAK,CACF,CAEJ,CACP,CAAC;IACJ,CAAC;IAEe,iBAAiB;QAC/B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAEe,kBAAkB,CAAC,SAA+B;QAChE,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,EAAE;YAC9C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;SACzC;IACH,CAAC;;AA5EH,0CAkIC;AA9HC,gBAAgB;AACF,4BAAY,GAAkC;IAC1D,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,KAAK;CAClB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { BadgeType, ConditionalBooleanValue, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { ContextMenu } from \"./ContextMenu\";\r\nimport { BadgeUtilities } from \"../badge/BadgeUtilities\";\r\nimport { TildeFinder } from \"./TildeFinder\";\r\nimport { Icon, IconSpec } from \"../icons/IconComponent\";\r\n\r\n/** Properties for the [[ContextMenuItem]] component\r\n * @public\r\n */\r\nexport interface ContextMenuItemProps extends Omit<React.AllHTMLAttributes<HTMLDivElement>, \"disabled\" | \"hidden\">, CommonProps {\r\n onSelect?: (event: any) => any;\r\n /** @internal */\r\n onHotKeyParsed?: (hotKey: string) => void;\r\n /** Icon to display in the left margin. */\r\n icon?: IconSpec;\r\n /** Disables any onSelect calls, hover/keyboard highlighting, and grays item. */\r\n disabled?: boolean | ConditionalBooleanValue;\r\n /** Indicates whether the item is visible or hidden. The default is for the item to be visible. */\r\n hidden?: boolean | ConditionalBooleanValue;\r\n /** Badge to be overlaid on the item. */\r\n badgeType?: BadgeType;\r\n /** Icon to display in the right margin. */\r\n iconRight?: IconSpec;\r\n /** Hide the icon container. This can be used to eliminate space used to display an icon at the left of the menu item. */\r\n hideIconContainer?: boolean;\r\n /** @internal */\r\n onHover?: () => any;\r\n /* @internal */\r\n isSelected?: boolean;\r\n /** @internal */\r\n parentMenu?: ContextMenu;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextMenuItemState {\r\n hotKey?: string;\r\n}\r\n\r\n/**\r\n * Menu Item class for use within a [[ContextMenu]] component.\r\n * @public\r\n */\r\nexport class ContextMenuItem extends React.PureComponent<ContextMenuItemProps, ContextMenuItemState> {\r\n private _root: HTMLElement | null = null;\r\n private _lastChildren: React.ReactNode;\r\n private _parsedChildren: React.ReactNode;\r\n /** @internal */\r\n public static defaultProps: Partial<ContextMenuItemProps> = {\r\n disabled: false,\r\n hidden: false,\r\n isSelected: false,\r\n };\r\n constructor(props: ContextMenuItemProps) {\r\n super(props);\r\n }\r\n /** @internal */\r\n public override readonly state: Readonly<ContextMenuItemState> = {};\r\n public override render(): React.JSX.Element {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { onClick, className, style, onSelect, icon, disabled, hidden, onHover, isSelected, parentMenu, onHotKeyParsed, badgeType, iconRight,\r\n hideIconContainer, ...props } = this.props;\r\n const badge = BadgeUtilities.getComponentForBadgeType(badgeType);\r\n const isDisabled = ConditionalBooleanValue.getValue(disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(hidden);\r\n\r\n if (this._lastChildren !== this.props.children) {\r\n this._parsedChildren = TildeFinder.findAfterTilde(this.props.children).node;\r\n this._lastChildren = this.props.children;\r\n }\r\n\r\n return (\r\n <div\r\n {...props}\r\n ref={(el) => { this._root = el; }}\r\n onClick={this._handleClick}\r\n style={style}\r\n onFocus={this._handleFocus}\r\n onKeyUp={this._handleKeyUp}\r\n onMouseOver={this._handleMouseOver}\r\n data-testid={\"core-context-menu-item\"}\r\n className={classnames(\"core-context-menu-item\", className,\r\n isDisabled && \"core-context-menu-disabled\",\r\n isHidden && \"core-context-menu-hidden\",\r\n isSelected && \"core-context-menu-is-selected\")\r\n }\r\n role=\"menuitem\"\r\n tabIndex={isSelected ? 0 : -1}\r\n aria-disabled={isDisabled}\r\n aria-hidden={isHidden}\r\n >\r\n {!hideIconContainer && <div className=\"core-context-menu-icon\">\r\n {icon !== undefined && <Icon iconSpec={icon} />}\r\n </div>}\r\n <div className={\"core-context-menu-content\"}>\r\n {this._parsedChildren}\r\n </div>\r\n {iconRight &&\r\n <div className={classnames(\"core-context-menu-icon\", \"core-context-menu-icon-right\")}>\r\n <Icon iconSpec={iconRight} />\r\n </div>\r\n }\r\n {badge &&\r\n <div className=\"core-context-menu-badge\">\r\n {badge}\r\n </div>\r\n }\r\n </div>\r\n );\r\n }\r\n\r\n public override componentDidMount() {\r\n this._updateHotkey(this.props.children);\r\n }\r\n\r\n public override componentDidUpdate(prevProps: ContextMenuItemProps) {\r\n if (this.props.children !== prevProps.children) {\r\n this._updateHotkey(this.props.children);\r\n }\r\n }\r\n\r\n private _updateHotkey = (node: React.ReactNode) => {\r\n let hotKey: string | undefined;\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(this.props.hidden);\r\n if (!isDisabled && !isHidden)\r\n hotKey = TildeFinder.findAfterTilde(node).character;\r\n else\r\n hotKey = undefined;\r\n if (hotKey && hotKey !== this.state.hotKey) {\r\n this.setState({ hotKey });\r\n if (this.props.onHotKeyParsed)\r\n this.props.onHotKeyParsed(hotKey);\r\n }\r\n };\r\n\r\n private _handleFocus = (event: React.FocusEvent<HTMLDivElement>) => {\r\n event.stopPropagation();\r\n };\r\n\r\n private _handleMouseOver = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n // istanbul ignore else\r\n if (this._root && this._root.style.visibility !== \"hidden\" && this.props.onHover) {\r\n this.props.onHover();\r\n }\r\n };\r\n\r\n public select = () => {\r\n // istanbul ignore else\r\n if (this._root) {\r\n this._root.click();\r\n if (this.props.parentMenu && this.props.parentMenu.props.parentSubmenu)\r\n this.props.parentMenu.props.parentSubmenu.close(true);\r\n }\r\n };\r\n\r\n private _handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n if (isDisabled)\r\n return;\r\n\r\n if (this.props.onClick)\r\n this.props.onClick(event);\r\n if (this.props.onSelect)\r\n this.props.onSelect(event);\r\n };\r\n\r\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>) => {\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n if (event.key === SpecialKey.Enter && this.props.onSelect !== undefined && !isDisabled) {\r\n this.props.onSelect(event);\r\n }\r\n };\r\n}\r\n"]}
@@ -11,7 +11,7 @@ import { ContextMenuDirection } from "./ContextMenuDirection";
11
11
  */
12
12
  export interface ContextSubMenuProps extends Omit<ContextMenuItemProps, "label">, Omit<ContextMenuProps, "label">, CommonProps {
13
13
  /** Text/jsx to display in the list item */
14
- label: string | JSX.Element;
14
+ label: string | React.JSX.Element;
15
15
  /** @internal */
16
16
  onHotKeyParsed?: (hotKey: string) => void;
17
17
  }
@@ -35,7 +35,7 @@ export declare class ContextSubMenu extends React.Component<ContextSubMenuProps,
35
35
  /** @internal */
36
36
  readonly state: Readonly<ContextSubMenuState>;
37
37
  constructor(props: ContextSubMenuProps);
38
- render(): JSX.Element;
38
+ render(): React.JSX.Element;
39
39
  componentDidMount(): void;
40
40
  componentWillUnmount(): void;
41
41
  componentDidUpdate(prevProps: ContextSubMenuProps, prevState: ContextSubMenuState): void;
@@ -1 +1 @@
1
- {"version":3,"file":"ContextSubMenu.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextSubMenu.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAe,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,EAAE,WAAW;IAC5H,2CAA2C;IAC3C,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;IAC5B,gBAAgB;IAChB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,gBAAgB;AAChB,UAAU,mBAAmB;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,oBAAoB,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,qBAAa,cAAe,SAAQ,KAAK,CAAC,SAAS,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAC3F,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,eAAe,CAA4B;IACnD,OAAO,CAAC,kBAAkB,CAA4B;IAEtD,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,YAAY,CAAkB;IAEtC,OAAc,YAAY,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAO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AAoB,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,qBAAa,cAAe,SAAQ,KAAK,CAAC,SAAS,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAC3F,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,eAAe,CAA4B;IACnD,OAAO,CAAC,kBAAkB,CAA4B;IAEtD,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,YAAY,CAAkB;IAEtC,OAAc,YAAY,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAOtD;IAEF,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;gBAClD,KAAK,EAAE,mBAAmB;IAQtB,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO;IAmE3B,iBAAiB;IAOjB,oBAAoB;IAIpB,kBAAkB,CAAC,SAAS,EAAE,mBAAmB,EAAE,SAAS,EAAE,mBAAmB;IASjG,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,oBAAoB;IAc5B,OAAO,CAAC,aAAa,CAanB;IAEK,MAAM,aAQX;IAEK,KAAK,4CAUV;IAEF,OAAO,CAAC,gBAAgB,CAKtB;IAEF,OAAO,CAAC,YAAY,CAgBlB;IAEF,OAAO,CAAC,kBAAkB,CAGxB;CACH"}
@@ -108,7 +108,9 @@ class ContextSubMenu extends React.Component {
108
108
  }
109
109
  return (
110
110
  // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
111
- React.createElement("div", { className: (0, classnames_1.default)("core-context-submenu", ContextMenu_1.ContextMenu.getCSSClassNameFromDirection(renderDirection), className), onMouseOver: this._handleMouseOver, ref: (el) => { this._subMenuElement = el; }, "data-testid": "core-context-submenu", ...props },
111
+ React.createElement("div", { className: (0, classnames_1.default)("core-context-submenu", ContextMenu_1.ContextMenu.getCSSClassNameFromDirection(renderDirection), className),
112
+ // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
113
+ onMouseOver: this._handleMouseOver, ref: (el) => { this._subMenuElement = el; }, "data-testid": "core-context-submenu", ...props },
112
114
  React.createElement("div", { onClick: this._handleClick, ref: (el) => { this._menuButtonElement = el; }, className: (0, classnames_1.default)("core-context-menu-item", "core-context-submenu-container", isDisabled && "core-context-menu-disabled", isHidden && "core-context-menu-hidden", isSelected && "core-context-menu-is-selected"), "data-testid": "core-context-submenu-container", role: "menuitem", tabIndex: isSelected ? 0 : -1, "aria-disabled": isDisabled, "aria-hidden": isHidden, "aria-haspopup": true },
113
115
  React.createElement("div", { className: (0, classnames_1.default)("core-context-menu-icon", "icon", icon instanceof appui_abstract_1.ConditionalStringValue && icon.value, typeof icon === "string" && icon) }),
114
116
  React.createElement("div", { className: "core-context-menu-content" }, this._parsedLabel),
@@ -1 +1 @@
1
- {"version":3,"file":"ContextSubMenu.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextSubMenu.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,2CAAoC;AACpC,0DAAwF;AAExF,+CAA8D;AAE9D,iEAA8D;AAC9D,+CAA4C;AAC5C,4DAAyD;AAmBzD;;;GAGG;AACH,MAAa,cAAe,SAAQ,KAAK,CAAC,SAAmD;IAmB3F,YAAY,KAA0B;QACpC,KAAK,CAAC,KAAK,CAAC,CAAC;QAnBP,iBAAY,GAAuB,IAAI,CAAC;QACxC,oBAAe,GAAuB,IAAI,CAAC;QAC3C,uBAAkB,GAAuB,IAAI,CAAC;QAkI9C,kBAAa,GAAG,CAAC,IAAqB,EAAE,EAAE;YAChD,IAAI,MAA0B,CAAC;YAC/B,MAAM,UAAU,GAAG,wCAAuB,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACzE,MAAM,QAAQ,GAAG,wCAAuB,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACrE,IAAI,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e,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;QAC3C,uBAAuB;QACvB,IAAI,YAAY,IAAI,QAAQ,IAAI,IAAI,CAAC,YAAY,EAAE;YACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;YAC7C,eAAe,GAAG,yBAAW,CAAC,QAAQ,CAAC,eAAe,EAAE,QAAQ,EAAE,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;YACrH,uBAAuB;YACvB,IAAI,eAAe,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS;gBAC1C,IAAI,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;SACjD;IACH,CAAC;;AAnIH,wCAuMC;AA/Le,2BAAY,GAAiC;IACzD,SAAS,EAAE,2CAAoB,CAAC,WAAW;IAC3C,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,CAAC;CACjB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { ConditionalBooleanValue, ConditionalStringValue } from \"@itwin/appui-abstract\";\r\nimport { ContextMenuItemProps } from \"./ContextMenuItem\";\r\nimport { ContextMenu, ContextMenuProps } from \"./ContextMenu\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { ContextMenuDirection } from \"./ContextMenuDirection\";\r\nimport { TildeFinder } from \"./TildeFinder\";\r\nimport { BadgeUtilities } from \"../badge/BadgeUtilities\";\r\n\r\n/** Properties for the [[ContextSubMenu]] component\r\n * @public\r\n */\r\nexport interface ContextSubMenuProps extends Omit<ContextMenuItemProps, \"label\">, Omit<ContextMenuProps, \"label\">, CommonProps {\r\n /** Text/jsx to display in the list item */\r\n label: string | JSX.Element;\r\n /** @internal */\r\n onHotKeyParsed?: (hotKey: string) => void;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextSubMenuState {\r\n opened: boolean;\r\n direction: ContextMenuDirection;\r\n hotKey?: string;\r\n}\r\n\r\n/**\r\n * Submenu wrapper class for use within a [[ContextMenu]] component.\r\n * @public\r\n */\r\nexport class ContextSubMenu extends React.Component<ContextSubMenuProps, ContextSubMenuState> {\r\n private _menuElement: ContextMenu | null = null;\r\n private _subMenuElement: HTMLElement | null = null;\r\n private _menuButtonElement: HTMLElement | null = null;\r\n\r\n private _lastLabel: React.ReactNode;\r\n private _parsedLabel: React.ReactNode;\r\n\r\n public static defaultProps: Partial<ContextSubMenuProps> = {\r\n direction: ContextMenuDirection.BottomRight,\r\n disabled: false,\r\n hidden: false,\r\n autoflip: true,\r\n isSelected: false,\r\n selectedIndex: 0,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContextSubMenuState>;\r\n constructor(props: ContextSubMenuProps) {\r\n super(props);\r\n this.state = {\r\n opened: false,\r\n direction: props.direction!,\r\n };\r\n }\r\n\r\n public override render(): JSX.Element {\r\n const {\r\n label,\r\n opened, direction, onOutsideClick, onEsc, autoflip, edgeLimit, selectedIndex, floating, parentMenu, parentSubmenu, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n onSelect, icon, disabled, hidden, onHover, isSelected, onHotKeyParsed, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n children, onClick, className, badgeType, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n\r\n const onOutsideClickWrapper = (event: MouseEvent) => {\r\n this.close();\r\n onOutsideClick && onOutsideClick(event);\r\n };\r\n const contextMenuProps = { onOutsideClick: onOutsideClickWrapper, onSelect, onEsc, autoflip, edgeLimit, selectedIndex, floating, parentMenu };\r\n const badge = BadgeUtilities.getComponentForBadgeType(badgeType);\r\n const renderDirection = this.state.direction;\r\n const isDisabled = ConditionalBooleanValue.getValue(disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(hidden);\r\n\r\n if (this._lastLabel !== label) {\r\n this._parsedLabel = TildeFinder.findAfterTilde(label).node;\r\n this._lastLabel = label;\r\n }\r\n return (\r\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\r\n <div className={classnames(\"core-context-submenu\", ContextMenu.getCSSClassNameFromDirection(renderDirection), className)}\r\n onMouseOver={this._handleMouseOver}\r\n ref={(el) => { this._subMenuElement = el; }}\r\n data-testid=\"core-context-submenu\"\r\n {...props} >\r\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\r\n <div\r\n onClick={this._handleClick}\r\n ref={(el) => { this._menuButtonElement = el; }}\r\n className={classnames(\"core-context-menu-item\",\r\n \"core-context-submenu-container\",\r\n isDisabled && \"core-context-menu-disabled\",\r\n isHidden && \"core-context-menu-hidden\",\r\n isSelected && \"core-context-menu-is-selected\")}\r\n data-testid=\"core-context-submenu-container\"\r\n role=\"menuitem\"\r\n tabIndex={isSelected ? 0 : -1}\r\n aria-disabled={isDisabled}\r\n aria-hidden={isHidden}\r\n aria-haspopup={true}\r\n >\r\n <div className={classnames(\"core-context-menu-icon\", \"icon\", icon instanceof ConditionalStringValue && icon.value, typeof icon === \"string\" && icon)} />\r\n <div className={\"core-context-menu-content\"}>{this._parsedLabel}</div>\r\n <div className={classnames(\"core-context-submenu-arrow\", \"icon\", \"icon-caret-right\")} />\r\n {badge &&\r\n <div className=\"core-context-menu-badge\">\r\n {badge}\r\n </div>\r\n }\r\n </div>\r\n <ContextMenu\r\n ref={(el) => { this._menuElement = el; }}\r\n className=\"core-context-submenu-popup\"\r\n opened={this.state.opened}\r\n direction={renderDirection}\r\n parentSubmenu={this}\r\n {...contextMenuProps} >\r\n {children}\r\n </ContextMenu>\r\n </div>\r\n );\r\n }\r\n\r\n public override componentDidMount() {\r\n document.addEventListener(\"click\", this._handleClickGlobal);\r\n this._updateHotkey(this.props.label);\r\n\r\n this.checkRenderDirection();\r\n }\r\n\r\n public override componentWillUnmount() {\r\n document.removeEventListener(\"click\", this._handleClickGlobal);\r\n }\r\n\r\n public override componentDidUpdate(prevProps: ContextSubMenuProps, prevState: ContextSubMenuState) {\r\n const direction = this.props.direction!;\r\n if ((this.state.opened !== prevState.opened && direction !== this.state.direction) || prevProps.direction !== direction)\r\n this.checkRenderDirection();\r\n if (this.props.label !== prevProps.label) {\r\n this._updateHotkey(this.props.label);\r\n }\r\n }\r\n\r\n private getWindow() {\r\n const el = this._subMenuElement;\r\n const parentDocument = el!.ownerDocument;\r\n return parentDocument.defaultView;\r\n }\r\n\r\n private checkRenderDirection() {\r\n const { autoflip } = this.props;\r\n const parentWindow = this.getWindow();\r\n let renderDirection = this.state.direction;\r\n // istanbul ignore else\r\n if (parentWindow && autoflip && this._menuElement) {\r\n const menuRect = this._menuElement.getRect();\r\n renderDirection = ContextMenu.autoFlip(renderDirection, menuRect, parentWindow.innerWidth, parentWindow.innerHeight);\r\n // istanbul ignore next\r\n if (renderDirection !== this.state.direction)\r\n this.setState({ direction: renderDirection });\r\n }\r\n }\r\n\r\n private _updateHotkey = (node: React.ReactNode) => {\r\n let hotKey: string | undefined;\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(this.props.hidden);\r\n if (!isDisabled && !isHidden)\r\n hotKey = TildeFinder.findAfterTilde(node).character;\r\n else\r\n hotKey = undefined;\r\n if (hotKey && hotKey !== this.state.hotKey) {\r\n this.setState({ hotKey });\r\n if (this.props.onHotKeyParsed)\r\n this.props.onHotKeyParsed(hotKey);\r\n }\r\n };\r\n\r\n public select = () => {\r\n this.setState({ opened: true }, () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.focus();\r\n if (this.props.onSelect !== undefined)\r\n this.props.onSelect(undefined);\r\n });\r\n };\r\n\r\n public close = (propagate?: boolean) => {\r\n this.setState({ opened: false }, () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.blur();\r\n });\r\n // istanbul ignore next\r\n if (propagate && this.props.parentMenu && this.props.parentMenu.props.parentSubmenu) {\r\n this.props.parentMenu.props.parentSubmenu.close(true);\r\n }\r\n };\r\n\r\n private _handleMouseOver = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n // istanbul ignore else\r\n if (this._menuButtonElement && this._menuButtonElement.style.visibility !== \"hidden\" && this.props.onHover) {\r\n this.props.onHover();\r\n }\r\n };\r\n\r\n private _handleClick = (event: any) => {\r\n event.stopPropagation();\r\n\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n\r\n // istanbul ignore else\r\n if (!isDisabled) {\r\n // istanbul ignore else\r\n if (this.props.onClick !== undefined)\r\n this.props.onClick(event);\r\n // istanbul ignore next\r\n if (this.props.opened)\r\n this.close();\r\n else\r\n this.select();\r\n }\r\n };\r\n\r\n private _handleClickGlobal = (event: any) => {\r\n if (this._subMenuElement && !this._subMenuElement.contains(event.target))\r\n this.setState((_prevState) => ({ opened: false }));\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"ContextSubMenu.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextSubMenu.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,2CAAoC;AACpC,0DAAwF;AAExF,+CAA8D;AAE9D,iEAA8D;AAC9D,+CAA4C;AAC5C,4DAAyD;AAmBzD;;;GAGG;AACH,MAAa,cAAe,SAAQ,KAAK,CAAC,SAAmD;IAmB3F,YAAY,KAA0B;QACpC,KAAK,CAAC,KAAK,CAAC,CAAC;QAnBP,iBAAY,GAAuB,IAAI,CAAC;QACxC,oBAAe,GAAuB,IAAI,CAAC;QAC3C,uBAAkB,GAAuB,IAAI,CAAC;QAmI9C,kBAAa,GAAG,CAAC,IAAqB,EAAE,E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AAC;QAChC,MAAM,cAAc,GAAG,EAAG,CAAC,aAAa,CAAC;QACzC,OAAO,cAAc,CAAC,WAAW,CAAC;IACpC,CAAC;IAEO,oBAAoB;QAC1B,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAChC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QACtC,IAAI,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;QAC3C,uBAAuB;QACvB,IAAI,YAAY,IAAI,QAAQ,IAAI,IAAI,CAAC,YAAY,EAAE;YACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;YAC7C,eAAe,GAAG,yBAAW,CAAC,QAAQ,CAAC,eAAe,EAAE,QAAQ,EAAE,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;YACrH,uBAAuB;YACvB,IAAI,eAAe,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS;gBAC1C,IAAI,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;SACjD;IACH,CAAC;;AApIH,wCAwMC;AAhMe,2BAAY,GAAiC;IACzD,SAAS,EAAE,2CAAoB,CAAC,WAAW;IAC3C,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,CAAC;CACjB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { ConditionalBooleanValue, ConditionalStringValue } from \"@itwin/appui-abstract\";\r\nimport { ContextMenuItemProps } from \"./ContextMenuItem\";\r\nimport { ContextMenu, ContextMenuProps } from \"./ContextMenu\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { ContextMenuDirection } from \"./ContextMenuDirection\";\r\nimport { TildeFinder } from \"./TildeFinder\";\r\nimport { BadgeUtilities } from \"../badge/BadgeUtilities\";\r\n\r\n/** Properties for the [[ContextSubMenu]] component\r\n * @public\r\n */\r\nexport interface ContextSubMenuProps extends Omit<ContextMenuItemProps, \"label\">, Omit<ContextMenuProps, \"label\">, CommonProps {\r\n /** Text/jsx to display in the list item */\r\n label: string | React.JSX.Element;\r\n /** @internal */\r\n onHotKeyParsed?: (hotKey: string) => void;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextSubMenuState {\r\n opened: boolean;\r\n direction: ContextMenuDirection;\r\n hotKey?: string;\r\n}\r\n\r\n/**\r\n * Submenu wrapper class for use within a [[ContextMenu]] component.\r\n * @public\r\n */\r\nexport class ContextSubMenu extends React.Component<ContextSubMenuProps, ContextSubMenuState> {\r\n private _menuElement: ContextMenu | null = null;\r\n private _subMenuElement: HTMLElement | null = null;\r\n private _menuButtonElement: HTMLElement | null = null;\r\n\r\n private _lastLabel: React.ReactNode;\r\n private _parsedLabel: React.ReactNode;\r\n\r\n public static defaultProps: Partial<ContextSubMenuProps> = {\r\n direction: ContextMenuDirection.BottomRight,\r\n disabled: false,\r\n hidden: false,\r\n autoflip: true,\r\n isSelected: false,\r\n selectedIndex: 0,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContextSubMenuState>;\r\n constructor(props: ContextSubMenuProps) {\r\n super(props);\r\n this.state = {\r\n opened: false,\r\n direction: props.direction!,\r\n };\r\n }\r\n\r\n public override render(): React.JSX.Element {\r\n const {\r\n label,\r\n opened, direction, onOutsideClick, onEsc, autoflip, edgeLimit, selectedIndex, floating, parentMenu, parentSubmenu, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n onSelect, icon, disabled, hidden, onHover, isSelected, onHotKeyParsed, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n children, onClick, className, badgeType, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n\r\n const onOutsideClickWrapper = (event: MouseEvent) => {\r\n this.close();\r\n onOutsideClick && onOutsideClick(event);\r\n };\r\n const contextMenuProps = { onOutsideClick: onOutsideClickWrapper, onSelect, onEsc, autoflip, edgeLimit, selectedIndex, floating, parentMenu };\r\n const badge = BadgeUtilities.getComponentForBadgeType(badgeType);\r\n const renderDirection = this.state.direction;\r\n const isDisabled = ConditionalBooleanValue.getValue(disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(hidden);\r\n\r\n if (this._lastLabel !== label) {\r\n this._parsedLabel = TildeFinder.findAfterTilde(label).node;\r\n this._lastLabel = label;\r\n }\r\n return (\r\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\r\n <div className={classnames(\"core-context-submenu\", ContextMenu.getCSSClassNameFromDirection(renderDirection), className)}\r\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\r\n onMouseOver={this._handleMouseOver}\r\n ref={(el) => { this._subMenuElement = el; }}\r\n data-testid=\"core-context-submenu\"\r\n {...props} >\r\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\r\n <div\r\n onClick={this._handleClick}\r\n ref={(el) => { this._menuButtonElement = el; }}\r\n className={classnames(\"core-context-menu-item\",\r\n \"core-context-submenu-container\",\r\n isDisabled && \"core-context-menu-disabled\",\r\n isHidden && \"core-context-menu-hidden\",\r\n isSelected && \"core-context-menu-is-selected\")}\r\n data-testid=\"core-context-submenu-container\"\r\n role=\"menuitem\"\r\n tabIndex={isSelected ? 0 : -1}\r\n aria-disabled={isDisabled}\r\n aria-hidden={isHidden}\r\n aria-haspopup={true}\r\n >\r\n <div className={classnames(\"core-context-menu-icon\", \"icon\", icon instanceof ConditionalStringValue && icon.value, typeof icon === \"string\" && icon)} />\r\n <div className={\"core-context-menu-content\"}>{this._parsedLabel}</div>\r\n <div className={classnames(\"core-context-submenu-arrow\", \"icon\", \"icon-caret-right\")} />\r\n {badge &&\r\n <div className=\"core-context-menu-badge\">\r\n {badge}\r\n </div>\r\n }\r\n </div>\r\n <ContextMenu\r\n ref={(el) => { this._menuElement = el; }}\r\n className=\"core-context-submenu-popup\"\r\n opened={this.state.opened}\r\n direction={renderDirection}\r\n parentSubmenu={this}\r\n {...contextMenuProps} >\r\n {children}\r\n </ContextMenu>\r\n </div>\r\n );\r\n }\r\n\r\n public override componentDidMount() {\r\n document.addEventListener(\"click\", this._handleClickGlobal);\r\n this._updateHotkey(this.props.label);\r\n\r\n this.checkRenderDirection();\r\n }\r\n\r\n public override componentWillUnmount() {\r\n document.removeEventListener(\"click\", this._handleClickGlobal);\r\n }\r\n\r\n public override componentDidUpdate(prevProps: ContextSubMenuProps, prevState: ContextSubMenuState) {\r\n const direction = this.props.direction!;\r\n if ((this.state.opened !== prevState.opened && direction !== this.state.direction) || prevProps.direction !== direction)\r\n this.checkRenderDirection();\r\n if (this.props.label !== prevProps.label) {\r\n this._updateHotkey(this.props.label);\r\n }\r\n }\r\n\r\n private getWindow() {\r\n const el = this._subMenuElement;\r\n const parentDocument = el!.ownerDocument;\r\n return parentDocument.defaultView;\r\n }\r\n\r\n private checkRenderDirection() {\r\n const { autoflip } = this.props;\r\n const parentWindow = this.getWindow();\r\n let renderDirection = this.state.direction;\r\n // istanbul ignore else\r\n if (parentWindow && autoflip && this._menuElement) {\r\n const menuRect = this._menuElement.getRect();\r\n renderDirection = ContextMenu.autoFlip(renderDirection, menuRect, parentWindow.innerWidth, parentWindow.innerHeight);\r\n // istanbul ignore next\r\n if (renderDirection !== this.state.direction)\r\n this.setState({ direction: renderDirection });\r\n }\r\n }\r\n\r\n private _updateHotkey = (node: React.ReactNode) => {\r\n let hotKey: string | undefined;\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(this.props.hidden);\r\n if (!isDisabled && !isHidden)\r\n hotKey = TildeFinder.findAfterTilde(node).character;\r\n else\r\n hotKey = undefined;\r\n if (hotKey && hotKey !== this.state.hotKey) {\r\n this.setState({ hotKey });\r\n if (this.props.onHotKeyParsed)\r\n this.props.onHotKeyParsed(hotKey);\r\n }\r\n };\r\n\r\n public select = () => {\r\n this.setState({ opened: true }, () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.focus();\r\n if (this.props.onSelect !== undefined)\r\n this.props.onSelect(undefined);\r\n });\r\n };\r\n\r\n public close = (propagate?: boolean) => {\r\n this.setState({ opened: false }, () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.blur();\r\n });\r\n // istanbul ignore next\r\n if (propagate && this.props.parentMenu && this.props.parentMenu.props.parentSubmenu) {\r\n this.props.parentMenu.props.parentSubmenu.close(true);\r\n }\r\n };\r\n\r\n private _handleMouseOver = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n // istanbul ignore else\r\n if (this._menuButtonElement && this._menuButtonElement.style.visibility !== \"hidden\" && this.props.onHover) {\r\n this.props.onHover();\r\n }\r\n };\r\n\r\n private _handleClick = (event: any) => {\r\n event.stopPropagation();\r\n\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n\r\n // istanbul ignore else\r\n if (!isDisabled) {\r\n // istanbul ignore else\r\n if (this.props.onClick !== undefined)\r\n this.props.onClick(event);\r\n // istanbul ignore next\r\n if (this.props.opened)\r\n this.close();\r\n else\r\n this.select();\r\n }\r\n };\r\n\r\n private _handleClickGlobal = (event: any) => {\r\n if (this._subMenuElement && !this._subMenuElement.contains(event.target))\r\n this.setState((_prevState) => ({ opened: false }));\r\n };\r\n}\r\n"]}
@@ -50,5 +50,5 @@ export interface PopupContextMenuProps extends CommonProps {
50
50
  /** Component that displays a ContextMenu within a Popup component, allowing the target element to be specified.
51
51
  * @public
52
52
  */
53
- export declare function PopupContextMenu(props: PopupContextMenuProps): JSX.Element;
53
+ export declare function PopupContextMenu(props: PopupContextMenuProps): React.JSX.Element;
54
54
  //# sourceMappingURL=PopupContextMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopupContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/PopupContextMenu.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,sEAAsE;IACtE,MAAM,EAAE,OAAO,CAAC;IAChB,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,uCAAuC;IACvC,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,0DAA0D;IAC1D,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,0DAA0D;IAC1D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,GAAG,SAAS,KAAK,IAAI,CAAC;IACzD,oCAAoC;IACpC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,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AAC;IAChB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,GAAG,SAAS,KAAK,IAAI,CAAC;IACzD,oCAAoC;IACpC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IAC7C,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gFAAgF;IAChF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oDAAoD;IACpD,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,wBAAwB;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,qBAiB5D"}
@@ -39,9 +39,9 @@ export interface DialogProps extends Omit<React.AllHTMLAttributes<HTMLDivElement
39
39
  /** Override for the header */
40
40
  header?: React.ReactNode;
41
41
  /** Title to show in title bar of dialog */
42
- title?: string | JSX.Element;
42
+ title?: string | React.JSX.Element;
43
43
  /** Footer to show at bottom of dialog. Note: will override buttonCluster */
44
- footer?: string | JSX.Element;
44
+ footer?: string | React.JSX.Element;
45
45
  /** List of DialogButtonDef objects specifying buttons and associated onClick events */
46
46
  buttonCluster?: DialogButtonDef[];
47
47
  /** Default alignment of dialog. Default: DialogAlignment.Center */
@@ -117,7 +117,7 @@ export declare class Dialog extends React.Component<DialogProps, DialogState> {
117
117
  private _handleAppWindowResize;
118
118
  componentDidMount(): void;
119
119
  handleRefSet: (containerDiv: HTMLDivElement | null) => void;
120
- render(): JSX.Element;
120
+ render(): React.JSX.Element;
121
121
  private getCSSClassNameFromAlignment;
122
122
  private getFooterButtons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,KAAK,CAAC;gBAE5B,OAAO,CAAC,IAAI,CAAC,oBAAC,sBAAM,IAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,IAAG,UAAU,CAAU,CAAC,CAAC;YACjJ,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;;AAlTH,wBAubC;AApbe,mBAAY,GAAyB;IACjD,SAAS,EAAE,eAAe,CAAC,MAAM;IACjC,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE,GAAG;IACd,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE,KAAK;IAChB,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,KAAK;CACjB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport \"./Dialog.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { DialogButtonDef, DialogButtonType, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { DivWithOutsideClick } from \"../base/DivWithOutsideClick\";\r\nimport { UiCore } from \"../UiCore\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Omit } from \"../utils/typeUtils\";\r\nimport { FocusTrap } from \"../focustrap/FocusTrap\";\r\nimport { Button } from \"@itwin/itwinui-react\";\r\n\r\n// cspell:ignore focustrap\r\n\r\n/** Enum for dialog alignment\r\n * @public\r\n */\r\nexport enum DialogAlignment {\r\n TopLeft = \"top-left\", Top = \"top\", TopRight = \"top-right\",\r\n Left = \"left\", Center = \"center\", Right = \"right\",\r\n BottomLeft = \"bottom-left\", Bottom = \"bottom\", BottomRight = \"bottom-right\",\r\n}\r\n\r\n/** Properties for the [[Dialog]] component\r\n * @public\r\n */\r\nexport interface DialogProps extends Omit<React.AllHTMLAttributes<HTMLDivElement>, \"title\">, CommonProps {\r\n /** Indicates whether to show dialog or not */\r\n opened: boolean;\r\n\r\n /** Indicates whether the user can resize dialog with cursor. Default: false */\r\n resizable?: boolean;\r\n /** Indicates whether the user can move dialog with cursor. Default: false */\r\n movable?: boolean;\r\n /** Indicates whether the content should be inset. Default: true */\r\n inset?: boolean;\r\n /** Indicates whether the focus should be trapped within the dialog. Default: false */\r\n trapFocus?: boolean;\r\n\r\n /** Whether the hide the header. Default: false */\r\n hideHeader?: boolean;\r\n /** Override for the header */\r\n header?: React.ReactNode;\r\n /** Title to show in title bar of dialog */\r\n title?: string | JSX.Element;\r\n /** Footer to show at bottom of dialog. Note: will override buttonCluster */\r\n footer?: string | JSX.Element;\r\n /** List of DialogButtonDef objects specifying buttons and associated onClick events */\r\n buttonCluster?: DialogButtonDef[];\r\n\r\n /** Default alignment of dialog. Default: DialogAlignment.Center */\r\n alignment?: DialogAlignment;\r\n /** Initial x/left position of dialog in px. */\r\n x?: number;\r\n /** Initial y/top position of dialog in px. */\r\n y?: number;\r\n\r\n /** onClick event for X button for dialog */\r\n onClose?: () => void;\r\n /** 'keyup' event for Esc key */\r\n onEscape?: () => void;\r\n /** Triggered when a click is triggered outside of this dialog. */\r\n onOutsideClick?: (event: MouseEvent) => any;\r\n\r\n /** Initial width of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: \"50%\" */\r\n width?: string | number;\r\n /** Initial height of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n height?: string | number;\r\n /** Minimum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 300px */\r\n minWidth?: string | number;\r\n /** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 100px */\r\n minHeight?: string | number;\r\n /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxWidth?: string | number;\r\n /** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxHeight?: string | number;\r\n\r\n /** Whether to show background overlay. Default: true.\r\n * @note Modeless dialogs require an id and an implementation of onModelessPointerDown.\r\n */\r\n modal?: boolean;\r\n /** An id for a modeless dialog */\r\n modelessId?: string;\r\n /** Pointer Down event handler when modeless (modal = false) */\r\n onModelessPointerDown?: (event: React.PointerEvent, id: string) => void;\r\n\r\n /** Custom CSS Style for overlay */\r\n backgroundStyle?: React.CSSProperties;\r\n /** Custom CSS Style for title */\r\n titleStyle?: React.CSSProperties;\r\n /** Custom CSS Style for footer */\r\n footerStyle?: React.CSSProperties;\r\n /** Custom CSS class name for the content */\r\n contentClassName?: string;\r\n /** Custom CSS Style for the content */\r\n contentStyle?: React.CSSProperties;\r\n}\r\n\r\n/** @internal */\r\ninterface DialogState {\r\n rightResizing: boolean;\r\n downResizing: boolean;\r\n moving: boolean;\r\n grabOffsetX: number;\r\n grabOffsetY: number;\r\n x?: number;\r\n y?: number;\r\n width?: number;\r\n height?: number;\r\n positionSet: boolean;\r\n}\r\n\r\n/**\r\n * Dialog React component with optional resizing and dragging functionality\r\n * @public\r\n */\r\nexport class Dialog extends React.Component<DialogProps, DialogState> {\r\n private _parentDocument = document;\r\n private _containerRef = React.createRef<HTMLDivElement>();\r\n public static defaultProps: Partial<DialogProps> = {\r\n alignment: DialogAlignment.Center,\r\n minWidth: 300,\r\n minHeight: 100,\r\n width: \"50%\",\r\n hideHeader: false,\r\n resizable: false,\r\n movable: false,\r\n modal: true,\r\n inset: true,\r\n trapFocus: false,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<DialogState>;\r\n\r\n constructor(props: DialogProps) {\r\n super(props);\r\n this.state = {\r\n rightResizing: false,\r\n downResizing: false,\r\n moving: false,\r\n grabOffsetX: 0,\r\n grabOffsetY: 0,\r\n positionSet: props.x !== undefined || props.y !== undefined,\r\n };\r\n }\r\n\r\n private getParentWindow() {\r\n // istanbul ignore next\r\n return this._parentDocument.defaultView ?? window;\r\n }\r\n\r\n public override componentWillUnmount(): void {\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.removeEventListener(\"pointerup\", this._handlePointerUp, true);\r\n parentWindow.removeEventListener(\"pointermove\", this._handlePointerMove, true);\r\n this._parentDocument.removeEventListener(\"keyup\", this._handleKeyUp, true);\r\n parentWindow.addEventListener(\"resize\", this._handleAppWindowResize);\r\n }\r\n\r\n /** Keep title bar of movable Dialog at least partially visible */\r\n // istanbul ignore next\r\n private _handleAppWindowResize = (): void => {\r\n if (!this._containerRef.current || !this.props.movable)\r\n return;\r\n\r\n const parentWindow = this.getParentWindow();\r\n const { x, y } = this.state;\r\n let newX: number | undefined;\r\n let newY: number | undefined;\r\n\r\n if (undefined !== y && undefined !== x) {\r\n if (y > parentWindow.innerHeight - 32)\r\n newY = parentWindow.innerHeight - 32;\r\n if (x > parentWindow.innerWidth - 32)\r\n newX = parentWindow.innerWidth - 32;\r\n }\r\n\r\n if (newX !== undefined || newY !== undefined)\r\n this.setState({ x: newX !== undefined ? newX : x, y: newY !== undefined ? newY : y, positionSet: true });\r\n };\r\n\r\n public override componentDidMount(): void {\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointerup\", this._handlePointerUp, true);\r\n this._parentDocument.addEventListener(\"keyup\", this._handleKeyUp, true);\r\n parentWindow.addEventListener(\"resize\", this._handleAppWindowResize);\r\n }\r\n\r\n public handleRefSet = (containerDiv: HTMLDivElement | null) => {\r\n if (containerDiv)\r\n this._parentDocument = containerDiv.ownerDocument;\r\n };\r\n\r\n public override render(): JSX.Element {\r\n const {\r\n opened, title, footer, buttonCluster, onClose, onEscape, onOutsideClick, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n minWidth, minHeight, x, y, width, height, maxHeight, maxWidth,\r\n backgroundStyle, titleStyle, footerStyle, style, contentStyle, contentClassName,\r\n modal, resizable, movable, className, alignment, inset, trapFocus, modelessId, onModelessPointerDown, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n hideHeader, header, ...props } = this.props;\r\n\r\n const containerStyle: React.CSSProperties = {\r\n margin: \"\",\r\n left: x, top: y,\r\n width, height,\r\n };\r\n\r\n if (this.state.x !== undefined || this.state.y !== undefined) {\r\n // istanbul ignore else\r\n if (this.state.x !== undefined) {\r\n containerStyle.marginLeft = \"0\";\r\n containerStyle.marginRight = \"0\";\r\n containerStyle.left = this.state.x;\r\n }\r\n // istanbul ignore else\r\n if (this.state.y !== undefined) {\r\n containerStyle.marginTop = \"0\";\r\n containerStyle.marginBottom = \"0\";\r\n containerStyle.top = this.state.y;\r\n }\r\n }\r\n\r\n if (this.state.width !== undefined || this.state.height !== undefined) {\r\n // istanbul ignore else\r\n if (this.state.width !== undefined)\r\n containerStyle.width = this.state.width;\r\n // istanbul ignore else\r\n if (this.state.height !== undefined)\r\n containerStyle.height = this.state.height;\r\n }\r\n\r\n const minMaxStyle: React.CSSProperties = {};\r\n minMaxStyle.minWidth = (typeof minWidth === \"number\") ? `${minWidth}px` : minWidth;\r\n minMaxStyle.minHeight = (typeof minHeight === \"number\") ? `${minHeight}px` : minHeight;\r\n if (maxWidth !== undefined)\r\n minMaxStyle.maxWidth = (typeof maxWidth === \"number\") ? `${maxWidth}px` : maxWidth;\r\n if (maxHeight !== undefined)\r\n minMaxStyle.maxHeight = (typeof maxHeight === \"number\") ? `${maxHeight}px` : maxHeight;\r\n\r\n const buttons = this.getFooterButtons(this.props);\r\n\r\n const footerElement: React.ReactNode = footer || (buttons.length > 0 && <div className={\"core-dialog-buttons\"}>{buttons}</div>);\r\n\r\n const divStyle: React.CSSProperties = {\r\n ...backgroundStyle,\r\n ...style,\r\n };\r\n\r\n const headerElement = header || (\r\n <div\r\n className={classnames(\r\n \"core-dialog-head\",\r\n { \"core-dialog-movable\": movable },\r\n { \"core-dialog-modal\": modal }\r\n )}\r\n data-testid=\"core-dialog-head\"\r\n onPointerDown={this._handleStartMove}>\r\n <div className={\"core-dialog-title\"} data-testid=\"core-dialog-title\" style={titleStyle}>{title}</div>\r\n <button\r\n className={\"core-focus-trap-ignore-initial core-dialog-close icon icon-close\"}\r\n data-testid=\"core-dialog-close\"\r\n onClick={onClose}\r\n />\r\n </div>\r\n );\r\n\r\n return (\r\n <div ref={this.handleRefSet}\r\n className={classnames(\r\n \"core-dialog\",\r\n !modal && \"core-dialog-hidden\",\r\n opened && \"core-dialog-opened\",\r\n className,\r\n )}\r\n style={divStyle}\r\n data-testid=\"core-dialog-root\"\r\n {...props}\r\n >\r\n {opened &&\r\n <DivWithOutsideClick onOutsideClick={onOutsideClick}>\r\n <FocusTrap active={trapFocus && modal} returnFocusOnDeactivate={true}>\r\n <div\r\n className={classnames(\"core-dialog-container\", this.getCSSClassNameFromAlignment(alignment))}\r\n style={{ ...containerStyle, ...minMaxStyle }}\r\n data-testid=\"core-dialog-container\"\r\n onPointerDown={this._handleContainerPointerDown}\r\n >\r\n <div className={\"core-dialog-area\"} ref={this._containerRef} style={minMaxStyle}>\r\n {!hideHeader &&\r\n headerElement\r\n }\r\n <div\r\n className={classnames(\r\n \"core-dialog-content\",\r\n { \"core-dialog-content-no-inset\": !inset },\r\n contentClassName)}\r\n style={contentStyle}>\r\n {this.props.children}\r\n </div>\r\n {footerElement &&\r\n <div className={\"core-dialog-footer\"} style={footerStyle}>\r\n {footerElement}\r\n </div>\r\n }\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-right\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-right\"\r\n onPointerDown={this._handleStartResizeRight}\r\n />\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-bottom-mid\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-bottom\"\r\n onPointerDown={this._handleStartResizeDown}\r\n />\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-bottom-right\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-bottom-right\"\r\n onPointerDown={this._handleStartResizeDownRight}\r\n />\r\n </div>\r\n </div>\r\n </FocusTrap>\r\n </DivWithOutsideClick>\r\n }\r\n </div>\r\n );\r\n }\r\n\r\n private getCSSClassNameFromAlignment(alignment?: DialogAlignment): string {\r\n let className = \"\";\r\n\r\n // Drop the alignment CSS class if the Dialog has been sized or moved.\r\n if (this.state.positionSet)\r\n return \"\";\r\n\r\n // istanbul ignore next\r\n if (!alignment)\r\n alignment = DialogAlignment.Center;\r\n\r\n switch (alignment) {\r\n case DialogAlignment.TopLeft:\r\n className = \"core-dialog-top-left\";\r\n break;\r\n case DialogAlignment.Top:\r\n className = \"core-dialog-top\";\r\n break;\r\n case DialogAlignment.TopRight:\r\n className = \"core-dialog-top-right\";\r\n break;\r\n case DialogAlignment.Left:\r\n className = \"core-dialog-left\";\r\n break;\r\n case DialogAlignment.Center:\r\n className = \"core-dialog-center\";\r\n break;\r\n case DialogAlignment.Right:\r\n className = \"core-dialog-right\";\r\n break;\r\n case DialogAlignment.BottomLeft:\r\n className = \"core-dialog-bottom-left\";\r\n break;\r\n case DialogAlignment.Bottom:\r\n className = \"core-dialog-bottom\";\r\n break;\r\n case DialogAlignment.BottomRight:\r\n className = \"core-dialog-bottom-right\";\r\n break;\r\n }\r\n\r\n return className;\r\n }\r\n\r\n private getFooterButtons(props: DialogProps) {\r\n const buttons: React.ReactNode[] = [];\r\n if (props.buttonCluster) {\r\n props.buttonCluster.forEach((button: DialogButtonDef, index: number) => {\r\n let buttonText = \"\";\r\n let buttonClass = classnames(\"core-dialog-button\", `dialog-button-${button.type}`, button.className);\r\n\r\n switch (button.type) {\r\n case DialogButtonType.OK:\r\n buttonText = UiCore.translate(\"dialog.ok\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.Retry:\r\n buttonText = UiCore.translate(\"dialog.retry\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.Yes:\r\n buttonText = UiCore.translate(\"dialog.yes\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.No:\r\n buttonText = UiCore.translate(\"dialog.no\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Cancel:\r\n buttonText = UiCore.translate(\"dialog.cancel\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Close:\r\n buttonText = UiCore.translate(\"dialog.close\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Next:\r\n buttonText = UiCore.translate(\"dialog.next\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.Previous:\r\n buttonText = UiCore.translate(\"dialog.previous\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n }\r\n\r\n if (button.label)\r\n buttonText = button.label;\r\n\r\n buttons.push(<Button className={buttonClass} disabled={button.disabled} key={index.toString()} onClick={button.onClick}>{buttonText}</Button>);\r\n });\r\n }\r\n return buttons;\r\n }\r\n\r\n private _handleKeyUp = (event: KeyboardEvent) => {\r\n if (event.key === SpecialKey.Escape && this.props.opened && this.props.onEscape) {\r\n this.props.onEscape();\r\n }\r\n };\r\n\r\n private _handleContainerPointerDown = (event: React.PointerEvent): void => {\r\n if (!this.props.modal) {\r\n if (this.props.onModelessPointerDown && this.props.modelessId)\r\n this.props.onModelessPointerDown(event, this.props.modelessId);\r\n }\r\n };\r\n\r\n private _handleStartResizeRight = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ rightResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartResizeDown = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ downResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartResizeDownRight = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ downResizing: true, rightResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartMove = (event: React.PointerEvent): void => {\r\n if (!this.props.movable)\r\n return;\r\n\r\n event.preventDefault();\r\n // istanbul ignore else\r\n if (this._containerRef.current) {\r\n const rect = this._containerRef.current.getBoundingClientRect();\r\n const grabOffsetX = event.clientX - rect.left;\r\n const grabOffsetY = event.clientY - rect.top;\r\n this.setState({\r\n grabOffsetX,\r\n grabOffsetY,\r\n moving: true,\r\n });\r\n\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n }\r\n };\r\n\r\n private _handlePointerMove = (event: PointerEvent): void => {\r\n if ((!this.props.resizable && !this.props.movable) || !this._containerRef.current)\r\n return;\r\n\r\n const { minWidth, maxWidth, minHeight, maxHeight, movable } = this.props;\r\n let { x, y, width, height } = this.state;\r\n\r\n // istanbul ignore else\r\n if (x === undefined) { // if x is undefined, so is y, width, and height\r\n const rect = this._containerRef.current.getBoundingClientRect();\r\n width = rect.width, height = rect.height, x = rect.left, y = rect.top;\r\n }\r\n\r\n if (this.props.resizable) {\r\n if (this.state.rightResizing) {\r\n const pointerX = event.clientX;\r\n width = pointerX - x;\r\n // istanbul ignore else\r\n if (typeof minWidth === \"number\")\r\n width = Math.max(width, minWidth);\r\n if (maxWidth !== undefined && typeof maxWidth === \"number\")\r\n width = Math.min(width, maxWidth);\r\n }\r\n\r\n if (this.state.downResizing) {\r\n const pointerY = event.clientY;\r\n height = pointerY - y!;\r\n // istanbul ignore else\r\n if (typeof minHeight === \"number\")\r\n height = Math.max(height, minHeight);\r\n if (maxHeight !== undefined && typeof maxHeight === \"number\")\r\n height = Math.min(height, maxHeight);\r\n }\r\n\r\n this.setState({ width, height });\r\n }\r\n\r\n // istanbul ignore next\r\n if (movable && this.state.moving) {\r\n x = event.clientX - this.state.grabOffsetX;\r\n y = event.clientY - this.state.grabOffsetY;\r\n if (y < 0)\r\n y = 0;\r\n if (event.view) {\r\n if (y > event.view.innerHeight - 32)\r\n y = event.view.innerHeight - 32;\r\n if (x > event.view.innerWidth - 32)\r\n x = event.view.innerWidth - 32;\r\n if (width) {\r\n if (x < (0 - width + 32))\r\n x = 0 - width + 32;\r\n }\r\n }\r\n\r\n this.setState({ x, y, positionSet: true });\r\n }\r\n };\r\n\r\n private _handlePointerUp = (_event: PointerEvent): void => {\r\n if (!this.props.movable && !this.props.resizable)\r\n return;\r\n\r\n // istanbul ignore else\r\n if (this._containerRef.current) {\r\n this.setState({\r\n rightResizing: false,\r\n downResizing: false,\r\n moving: false,\r\n grabOffsetX: 0,\r\n grabOffsetY: 0,\r\n });\r\n }\r\n\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.removeEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../../src/core-react/dialog/Dialog.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yBAAuB;AACvB,2CAAoC;AACpC,+BAA+B;AAC/B,0DAAsF;AACtF,qEAAkE;AAClE,sCAAmC;AAGnC,sDAAmD;AACnD,wDAA8C;AAE9C,0BAA0B;AAE1B;;GAEG;AACH,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,uCAAoB,CAAA;IAAE,8BAAW,CAAA;IAAE,yCAAsB,CAAA;IACzD,gCAAa,CAAA;IAAE,oCAAiB,CAAA;IAAE,kCAAe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AAI;IACX,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,KAAK;CACjB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport \"./Dialog.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { DialogButtonDef, DialogButtonType, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { DivWithOutsideClick } from \"../base/DivWithOutsideClick\";\r\nimport { UiCore } from \"../UiCore\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Omit } from \"../utils/typeUtils\";\r\nimport { FocusTrap } from \"../focustrap/FocusTrap\";\r\nimport { Button } from \"@itwin/itwinui-react\";\r\n\r\n// cspell:ignore focustrap\r\n\r\n/** Enum for dialog alignment\r\n * @public\r\n */\r\nexport enum DialogAlignment {\r\n TopLeft = \"top-left\", Top = \"top\", TopRight = \"top-right\",\r\n Left = \"left\", Center = \"center\", Right = \"right\",\r\n BottomLeft = \"bottom-left\", Bottom = \"bottom\", BottomRight = \"bottom-right\",\r\n}\r\n\r\n/** Properties for the [[Dialog]] component\r\n * @public\r\n */\r\nexport interface DialogProps extends Omit<React.AllHTMLAttributes<HTMLDivElement>, \"title\">, CommonProps {\r\n /** Indicates whether to show dialog or not */\r\n opened: boolean;\r\n\r\n /** Indicates whether the user can resize dialog with cursor. Default: false */\r\n resizable?: boolean;\r\n /** Indicates whether the user can move dialog with cursor. Default: false */\r\n movable?: boolean;\r\n /** Indicates whether the content should be inset. Default: true */\r\n inset?: boolean;\r\n /** Indicates whether the focus should be trapped within the dialog. Default: false */\r\n trapFocus?: boolean;\r\n\r\n /** Whether the hide the header. Default: false */\r\n hideHeader?: boolean;\r\n /** Override for the header */\r\n header?: React.ReactNode;\r\n /** Title to show in title bar of dialog */\r\n title?: string | React.JSX.Element;\r\n /** Footer to show at bottom of dialog. Note: will override buttonCluster */\r\n footer?: string | React.JSX.Element;\r\n /** List of DialogButtonDef objects specifying buttons and associated onClick events */\r\n buttonCluster?: DialogButtonDef[];\r\n\r\n /** Default alignment of dialog. Default: DialogAlignment.Center */\r\n alignment?: DialogAlignment;\r\n /** Initial x/left position of dialog in px. */\r\n x?: number;\r\n /** Initial y/top position of dialog in px. */\r\n y?: number;\r\n\r\n /** onClick event for X button for dialog */\r\n onClose?: () => void;\r\n /** 'keyup' event for Esc key */\r\n onEscape?: () => void;\r\n /** Triggered when a click is triggered outside of this dialog. */\r\n onOutsideClick?: (event: MouseEvent) => any;\r\n\r\n /** Initial width of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: \"50%\" */\r\n width?: string | number;\r\n /** Initial height of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n height?: string | number;\r\n /** Minimum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 300px */\r\n minWidth?: string | number;\r\n /** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 100px */\r\n minHeight?: string | number;\r\n /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxWidth?: string | number;\r\n /** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxHeight?: string | number;\r\n\r\n /** Whether to show background overlay. Default: true.\r\n * @note Modeless dialogs require an id and an implementation of onModelessPointerDown.\r\n */\r\n modal?: boolean;\r\n /** An id for a modeless dialog */\r\n modelessId?: string;\r\n /** Pointer Down event handler when modeless (modal = false) */\r\n onModelessPointerDown?: (event: React.PointerEvent, id: string) => void;\r\n\r\n /** Custom CSS Style for overlay */\r\n backgroundStyle?: React.CSSProperties;\r\n /** Custom CSS Style for title */\r\n titleStyle?: React.CSSProperties;\r\n /** Custom CSS Style for footer */\r\n footerStyle?: React.CSSProperties;\r\n /** Custom CSS class name for the content */\r\n contentClassName?: string;\r\n /** Custom CSS Style for the content */\r\n contentStyle?: React.CSSProperties;\r\n}\r\n\r\n/** @internal */\r\ninterface DialogState {\r\n rightResizing: boolean;\r\n downResizing: boolean;\r\n moving: boolean;\r\n grabOffsetX: number;\r\n grabOffsetY: number;\r\n x?: number;\r\n y?: number;\r\n width?: number;\r\n height?: number;\r\n positionSet: boolean;\r\n}\r\n\r\n/**\r\n * Dialog React component with optional resizing and dragging functionality\r\n * @public\r\n */\r\nexport class Dialog extends React.Component<DialogProps, DialogState> {\r\n private _parentDocument = document;\r\n private _containerRef = React.createRef<HTMLDivElement>();\r\n public static defaultProps: Partial<DialogProps> = {\r\n alignment: DialogAlignment.Center,\r\n minWidth: 300,\r\n minHeight: 100,\r\n width: \"50%\",\r\n hideHeader: false,\r\n resizable: false,\r\n movable: false,\r\n modal: true,\r\n inset: true,\r\n trapFocus: false,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<DialogState>;\r\n\r\n constructor(props: DialogProps) {\r\n super(props);\r\n this.state = {\r\n rightResizing: false,\r\n downResizing: false,\r\n moving: false,\r\n grabOffsetX: 0,\r\n grabOffsetY: 0,\r\n positionSet: props.x !== undefined || props.y !== undefined,\r\n };\r\n }\r\n\r\n private getParentWindow() {\r\n // istanbul ignore next\r\n return this._parentDocument.defaultView ?? window;\r\n }\r\n\r\n public override componentWillUnmount(): void {\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.removeEventListener(\"pointerup\", this._handlePointerUp, true);\r\n parentWindow.removeEventListener(\"pointermove\", this._handlePointerMove, true);\r\n this._parentDocument.removeEventListener(\"keyup\", this._handleKeyUp, true);\r\n parentWindow.addEventListener(\"resize\", this._handleAppWindowResize);\r\n }\r\n\r\n /** Keep title bar of movable Dialog at least partially visible */\r\n // istanbul ignore next\r\n private _handleAppWindowResize = (): void => {\r\n if (!this._containerRef.current || !this.props.movable)\r\n return;\r\n\r\n const parentWindow = this.getParentWindow();\r\n const { x, y } = this.state;\r\n let newX: number | undefined;\r\n let newY: number | undefined;\r\n\r\n if (undefined !== y && undefined !== x) {\r\n if (y > parentWindow.innerHeight - 32)\r\n newY = parentWindow.innerHeight - 32;\r\n if (x > parentWindow.innerWidth - 32)\r\n newX = parentWindow.innerWidth - 32;\r\n }\r\n\r\n if (newX !== undefined || newY !== undefined)\r\n this.setState({ x: newX !== undefined ? newX : x, y: newY !== undefined ? newY : y, positionSet: true });\r\n };\r\n\r\n public override componentDidMount(): void {\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointerup\", this._handlePointerUp, true);\r\n this._parentDocument.addEventListener(\"keyup\", this._handleKeyUp, true);\r\n parentWindow.addEventListener(\"resize\", this._handleAppWindowResize);\r\n }\r\n\r\n public handleRefSet = (containerDiv: HTMLDivElement | null) => {\r\n if (containerDiv)\r\n this._parentDocument = containerDiv.ownerDocument;\r\n };\r\n\r\n public override render(): React.JSX.Element {\r\n const {\r\n opened, title, footer, buttonCluster, onClose, onEscape, onOutsideClick, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n minWidth, minHeight, x, y, width, height, maxHeight, maxWidth,\r\n backgroundStyle, titleStyle, footerStyle, style, contentStyle, contentClassName,\r\n modal, resizable, movable, className, alignment, inset, trapFocus, modelessId, onModelessPointerDown, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n hideHeader, header, ...props } = this.props;\r\n\r\n const containerStyle: React.CSSProperties = {\r\n margin: \"\",\r\n left: x, top: y,\r\n width, height,\r\n };\r\n\r\n if (this.state.x !== undefined || this.state.y !== undefined) {\r\n // istanbul ignore else\r\n if (this.state.x !== undefined) {\r\n containerStyle.marginLeft = \"0\";\r\n containerStyle.marginRight = \"0\";\r\n containerStyle.left = this.state.x;\r\n }\r\n // istanbul ignore else\r\n if (this.state.y !== undefined) {\r\n containerStyle.marginTop = \"0\";\r\n containerStyle.marginBottom = \"0\";\r\n containerStyle.top = this.state.y;\r\n }\r\n }\r\n\r\n if (this.state.width !== undefined || this.state.height !== undefined) {\r\n // istanbul ignore else\r\n if (this.state.width !== undefined)\r\n containerStyle.width = this.state.width;\r\n // istanbul ignore else\r\n if (this.state.height !== undefined)\r\n containerStyle.height = this.state.height;\r\n }\r\n\r\n const minMaxStyle: React.CSSProperties = {};\r\n minMaxStyle.minWidth = (typeof minWidth === \"number\") ? `${minWidth}px` : minWidth;\r\n minMaxStyle.minHeight = (typeof minHeight === \"number\") ? `${minHeight}px` : minHeight;\r\n if (maxWidth !== undefined)\r\n minMaxStyle.maxWidth = (typeof maxWidth === \"number\") ? `${maxWidth}px` : maxWidth;\r\n if (maxHeight !== undefined)\r\n minMaxStyle.maxHeight = (typeof maxHeight === \"number\") ? `${maxHeight}px` : maxHeight;\r\n\r\n const buttons = this.getFooterButtons(this.props);\r\n\r\n const footerElement: React.ReactNode = footer || (buttons.length > 0 && <div className={\"core-dialog-buttons\"}>{buttons}</div>);\r\n\r\n const divStyle: React.CSSProperties = {\r\n ...backgroundStyle,\r\n ...style,\r\n };\r\n\r\n const headerElement = header || (\r\n <div\r\n className={classnames(\r\n \"core-dialog-head\",\r\n { \"core-dialog-movable\": movable },\r\n { \"core-dialog-modal\": modal }\r\n )}\r\n data-testid=\"core-dialog-head\"\r\n onPointerDown={this._handleStartMove}>\r\n <div className={\"core-dialog-title\"} data-testid=\"core-dialog-title\" style={titleStyle}>{title}</div>\r\n <button\r\n className={\"core-focus-trap-ignore-initial core-dialog-close icon icon-close\"}\r\n data-testid=\"core-dialog-close\"\r\n onClick={onClose}\r\n />\r\n </div>\r\n );\r\n\r\n return (\r\n <div ref={this.handleRefSet}\r\n className={classnames(\r\n \"core-dialog\",\r\n !modal && \"core-dialog-hidden\",\r\n opened && \"core-dialog-opened\",\r\n className,\r\n )}\r\n style={divStyle}\r\n data-testid=\"core-dialog-root\"\r\n {...props}\r\n >\r\n {opened &&\r\n <DivWithOutsideClick onOutsideClick={onOutsideClick}>\r\n <FocusTrap active={trapFocus && modal} returnFocusOnDeactivate={true}>\r\n <div\r\n className={classnames(\"core-dialog-container\", this.getCSSClassNameFromAlignment(alignment))}\r\n style={{ ...containerStyle, ...minMaxStyle }}\r\n data-testid=\"core-dialog-container\"\r\n onPointerDown={this._handleContainerPointerDown}\r\n >\r\n <div className={\"core-dialog-area\"} ref={this._containerRef} style={minMaxStyle}>\r\n {!hideHeader &&\r\n headerElement\r\n }\r\n <div\r\n className={classnames(\r\n \"core-dialog-content\",\r\n { \"core-dialog-content-no-inset\": !inset },\r\n contentClassName)}\r\n style={contentStyle}>\r\n {this.props.children}\r\n </div>\r\n {footerElement &&\r\n <div className={\"core-dialog-footer\"} style={footerStyle}>\r\n {footerElement}\r\n </div>\r\n }\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-right\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-right\"\r\n onPointerDown={this._handleStartResizeRight}\r\n />\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-bottom-mid\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-bottom\"\r\n onPointerDown={this._handleStartResizeDown}\r\n />\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-bottom-right\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-bottom-right\"\r\n onPointerDown={this._handleStartResizeDownRight}\r\n />\r\n </div>\r\n </div>\r\n </FocusTrap>\r\n </DivWithOutsideClick>\r\n }\r\n </div>\r\n );\r\n }\r\n\r\n private getCSSClassNameFromAlignment(alignment?: DialogAlignment): string {\r\n let className = \"\";\r\n\r\n // Drop the alignment CSS class if the Dialog has been sized or moved.\r\n if (this.state.positionSet)\r\n return \"\";\r\n\r\n // istanbul ignore next\r\n if (!alignment)\r\n alignment = DialogAlignment.Center;\r\n\r\n switch (alignment) {\r\n case DialogAlignment.TopLeft:\r\n className = \"core-dialog-top-left\";\r\n break;\r\n case DialogAlignment.Top:\r\n className = \"core-dialog-top\";\r\n break;\r\n case DialogAlignment.TopRight:\r\n className = \"core-dialog-top-right\";\r\n break;\r\n case DialogAlignment.Left:\r\n className = \"core-dialog-left\";\r\n break;\r\n case DialogAlignment.Center:\r\n className = \"core-dialog-center\";\r\n break;\r\n case DialogAlignment.Right:\r\n className = \"core-dialog-right\";\r\n break;\r\n case DialogAlignment.BottomLeft:\r\n className = \"core-dialog-bottom-left\";\r\n break;\r\n case DialogAlignment.Bottom:\r\n className = \"core-dialog-bottom\";\r\n break;\r\n case DialogAlignment.BottomRight:\r\n className = \"core-dialog-bottom-right\";\r\n break;\r\n }\r\n\r\n return className;\r\n }\r\n\r\n private getFooterButtons(props: DialogProps) {\r\n const buttons: React.ReactNode[] = [];\r\n if (props.buttonCluster) {\r\n props.buttonCluster.forEach((button: DialogButtonDef, index: number) => {\r\n let buttonText = \"\";\r\n let buttonClass = classnames(\"core-dialog-button\", `dialog-button-${button.type}`, button.className);\r\n\r\n switch (button.type) {\r\n case DialogButtonType.OK:\r\n buttonText = UiCore.translate(\"dialog.ok\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.Retry:\r\n buttonText = UiCore.translate(\"dialog.retry\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.Yes:\r\n buttonText = UiCore.translate(\"dialog.yes\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.No:\r\n buttonText = UiCore.translate(\"dialog.no\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Cancel:\r\n buttonText = UiCore.translate(\"dialog.cancel\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Close:\r\n buttonText = UiCore.translate(\"dialog.close\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Next:\r\n buttonText = UiCore.translate(\"dialog.next\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.Previous:\r\n buttonText = UiCore.translate(\"dialog.previous\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n }\r\n\r\n if (button.label)\r\n buttonText = button.label;\r\n\r\n buttons.push(<Button className={buttonClass} disabled={button.disabled} key={index.toString()} onClick={button.onClick}>{buttonText}</Button>);\r\n });\r\n }\r\n return buttons;\r\n }\r\n\r\n private _handleKeyUp = (event: KeyboardEvent) => {\r\n if (event.key === SpecialKey.Escape && this.props.opened && this.props.onEscape) {\r\n this.props.onEscape();\r\n }\r\n };\r\n\r\n private _handleContainerPointerDown = (event: React.PointerEvent): void => {\r\n if (!this.props.modal) {\r\n if (this.props.onModelessPointerDown && this.props.modelessId)\r\n this.props.onModelessPointerDown(event, this.props.modelessId);\r\n }\r\n };\r\n\r\n private _handleStartResizeRight = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ rightResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartResizeDown = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ downResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartResizeDownRight = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ downResizing: true, rightResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartMove = (event: React.PointerEvent): void => {\r\n if (!this.props.movable)\r\n return;\r\n\r\n event.preventDefault();\r\n // istanbul ignore else\r\n if (this._containerRef.current) {\r\n const rect = this._containerRef.current.getBoundingClientRect();\r\n const grabOffsetX = event.clientX - rect.left;\r\n const grabOffsetY = event.clientY - rect.top;\r\n this.setState({\r\n grabOffsetX,\r\n grabOffsetY,\r\n moving: true,\r\n });\r\n\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n }\r\n };\r\n\r\n private _handlePointerMove = (event: PointerEvent): void => {\r\n if ((!this.props.resizable && !this.props.movable) || !this._containerRef.current)\r\n return;\r\n\r\n const { minWidth, maxWidth, minHeight, maxHeight, movable } = this.props;\r\n let { x, y, width, height } = this.state;\r\n\r\n // istanbul ignore else\r\n if (x === undefined) { // if x is undefined, so is y, width, and height\r\n const rect = this._containerRef.current.getBoundingClientRect();\r\n width = rect.width, height = rect.height, x = rect.left, y = rect.top;\r\n }\r\n\r\n if (this.props.resizable) {\r\n if (this.state.rightResizing) {\r\n const pointerX = event.clientX;\r\n width = pointerX - x;\r\n // istanbul ignore else\r\n if (typeof minWidth === \"number\")\r\n width = Math.max(width, minWidth);\r\n if (maxWidth !== undefined && typeof maxWidth === \"number\")\r\n width = Math.min(width, maxWidth);\r\n }\r\n\r\n if (this.state.downResizing) {\r\n const pointerY = event.clientY;\r\n height = pointerY - y!;\r\n // istanbul ignore else\r\n if (typeof minHeight === \"number\")\r\n height = Math.max(height, minHeight);\r\n if (maxHeight !== undefined && typeof maxHeight === \"number\")\r\n height = Math.min(height, maxHeight);\r\n }\r\n\r\n this.setState({ width, height });\r\n }\r\n\r\n // istanbul ignore next\r\n if (movable && this.state.moving) {\r\n x = event.clientX - this.state.grabOffsetX;\r\n y = event.clientY - this.state.grabOffsetY;\r\n if (y < 0)\r\n y = 0;\r\n if (event.view) {\r\n if (y > event.view.innerHeight - 32)\r\n y = event.view.innerHeight - 32;\r\n if (x > event.view.innerWidth - 32)\r\n x = event.view.innerWidth - 32;\r\n if (width) {\r\n if (x < (0 - width + 32))\r\n x = 0 - width + 32;\r\n }\r\n }\r\n\r\n this.setState({ x, y, positionSet: true });\r\n }\r\n };\r\n\r\n private _handlePointerUp = (_event: PointerEvent): void => {\r\n if (!this.props.movable && !this.props.resizable)\r\n return;\r\n\r\n // istanbul ignore else\r\n if (this._containerRef.current) {\r\n this.setState({\r\n rightResizing: false,\r\n downResizing: false,\r\n moving: false,\r\n grabOffsetX: 0,\r\n grabOffsetY: 0,\r\n });\r\n }\r\n\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.removeEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n}\r\n"]}
@@ -1,8 +1,8 @@
1
1
  /** @packageDocumentation
2
2
  * @module ElementSeparator
3
3
  */
4
- /// <reference types="react" />
5
4
  import "./ElementSeparator.scss";
5
+ import * as React from "react";
6
6
  import { Orientation } from "../enums/Orientation";
7
7
  import { CommonProps } from "../utils/Props";
8
8
  /**
@@ -38,5 +38,5 @@ export interface ElementSeparatorProps extends CommonProps {
38
38
  /** A movable button, which allows to change the ratio between left element and right element
39
39
  * @public
40
40
  */
41
- export declare const ElementSeparator: (props: ElementSeparatorProps) => JSX.Element;
41
+ export declare const ElementSeparator: (props: ElementSeparatorProps) => React.JSX.Element;
42
42
  //# sourceMappingURL=ElementSeparator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ElementSeparator.d.ts","sourceRoot":"","sources":["../../../../src/core-react/elementseparator/ElementSeparator.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,yBAAyB,CAAC;AAIjC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,4BAA4B;IAC5B,WAAW,EAAE,WAAW,CAAC;IACzB,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,iBAAiB,CAAC;IAC7D,+BAA+B;IAC/B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,qCAAqC;IACrC,0BAA0B,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D,qCAAqC;IACrC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,oCAAoC;IACpC,yBAAyB,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9D;AAmKD;;GAEG;AAEH,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,gBAqC5D,CAAC"}
1
+ {"version":3,"file":"ElementSeparator.d.ts","sourceRoot":"","sources":["../../../../src/core-react/elementseparator/ElementSeparator.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,4BAA4B;IAC5B,WAAW,EAAE,WAAW,CAAC;IACzB,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,iBAAiB,CAAC;IAC7D,+BAA+B;IAC/B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,qCAAqC;IACrC,0BAA0B,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D,qCAAqC;IACrC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,oCAAoC;IACpC,yBAAyB,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9D;AAmKD;;GAEG;AAEH,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,sBAqC5D,CAAC"}
@@ -10,7 +10,7 @@ import { CommonProps } from "../utils/Props";
10
10
  */
11
11
  export interface ExpandableBlockProps extends CommonProps {
12
12
  /** Label */
13
- title: string | JSX.Element;
13
+ title: string | React.JSX.Element;
14
14
  /** Indicates whether the ExpandableBlock is expanded */
15
15
  isExpanded: boolean;
16
16
  /** Callback function for click event */
@@ -29,6 +29,6 @@ export interface ExpandableBlockProps extends CommonProps {
29
29
  * @deprecated in 3.0. Use ExpandableBlock from itwinui-react instead
30
30
  */
31
31
  export declare class ExpandableBlock extends React.PureComponent<ExpandableBlockProps> {
32
- render(): JSX.Element;
32
+ render(): React.JSX.Element;
33
33
  }
34
34
  //# sourceMappingURL=ExpandableBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandableBlock.d.ts","sourceRoot":"","sources":["../../../../src/core-react/expandable/ExpandableBlock.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,wBAAwB,CAAC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD,YAAY;IACZ,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;IAC5B,wDAAwD;IACxD,UAAU,EAAE,OAAO,CAAC;IACpB,wCAAwC;IACxC,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,cA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,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ;gBACtF,6BAAK,SAAS,EAAC,gBAAgB;oBAC7B,2BAAG,SAAS,EAAC,yBAAyB,GAAG,CACrC;gBACL,IAAI,CAAC,KAAK,CAAC,OAAO;oBACjB,6BAAK,SAAS,EAAC,SAAS,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,IAC/C,IAAI,CAAC,KAAK,CAAC,OAAO,CACf;gBAER,6BAAK,SAAS,EAAC,OAAO,EAAC,KAAK,EAAE,KAAK,IAChC,IAAI,CAAC,KAAK,CAAC,KAAK,CACb,CACF;YACN,6BAAK,SAAS,EAAC,SAAS,IACrB,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CACzC,CACF,CACP,CAAC;IACJ,CAAC;CACF;AApCD,0CAoCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Expandable\r\n */\r\n\r\nimport \"./ExpandableBlock.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[ExpandableBlock]] React component\r\n * @public\r\n * @deprecated in 3.0. Use ExpandableBlockProps from itwinui-react instead\r\n */\r\nexport interface ExpandableBlockProps extends CommonProps {\r\n /** Label */\r\n title: string | JSX.Element;\r\n /** Indicates whether the ExpandableBlock is expanded */\r\n isExpanded: boolean;\r\n /** Callback function for click event */\r\n onClick: React.MouseEventHandler<HTMLDivElement>;\r\n /** Callback function for key press event */\r\n onKeyPress?: React.KeyboardEventHandler<HTMLDivElement>;\r\n /** Callback function for key down event */\r\n onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;\r\n /** Additional text displayed in the block below the label and in a smaller font size */\r\n caption?: string;\r\n /** Custom tooltip for the component. */\r\n tooltip?: string;\r\n}\r\n\r\n/** ExpandableBlock React component is a container that shows and hides child content.\r\n * @public\r\n * @deprecated in 3.0. Use ExpandableBlock from itwinui-react instead\r\n */\r\nexport class ExpandableBlock extends React.PureComponent<ExpandableBlockProps> { // eslint-disable-line deprecation/deprecation\r\n\r\n public override render() {\r\n const cName = classnames(\r\n \"uicore-expandable-blocks-block\",\r\n this.props.caption && \"with-caption\",\r\n this.props.isExpanded ? \"is-expanded\" : \"is-collapsed\",\r\n this.props.className,\r\n );\r\n const ariaExpanded = this.props.isExpanded ? \"true\" : \"false\";\r\n const tabIndex = (this.props.onKeyPress || this.props.onKeyDown) ? 0 : undefined;\r\n\r\n const title = this.props.tooltip ?? (typeof this.props.title == \"string\" ? this.props.title : undefined);\r\n\r\n return (\r\n <div className={cName} style={this.props.style}>\r\n <div role=\"button\" aria-expanded={ariaExpanded} className=\"header\" onClick={this.props.onClick}\r\n onKeyPress={this.props.onKeyPress} onKeyDown={this.props.onKeyDown} tabIndex={tabIndex}>\r\n <div className=\"icon-container\">\r\n <i className=\"icon icon-chevron-right\" />\r\n </div>\r\n {this.props.caption &&\r\n <div className=\"caption\" title={this.props.caption}>\r\n {this.props.caption}\r\n </div>\r\n }\r\n <div className=\"title\" title={title}>\r\n {this.props.title}\r\n </div>\r\n </div>\r\n <div className=\"content\">\r\n {this.props.isExpanded && this.props.children}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ExpandableBlock.js","sourceRoot":"","sources":["../../../../src/core-react/expandable/ExpandableBlock.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,kCAAgC;AAChC,2CAAoC;AACpC,+BAA+B;AAwB/B;;;GAGG;AACH,MAAa,eAAgB,SAAQ,KAAK,CAAC,aAAmC;IAE5D,MAAM;;QACpB,MAAM,KAAK,G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AAI,CAAC,KAAK,CAAC,OAAO,CACf;gBAER,6BAAK,SAAS,EAAC,OAAO,EAAC,KAAK,EAAE,KAAK,IAChC,IAAI,CAAC,KAAK,CAAC,KAAK,CACb,CACF;YACN,6BAAK,SAAS,EAAC,SAAS,IACrB,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CACzC,CACF,CACP,CAAC;IACJ,CAAC;CACF;AApCD,0CAoCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Expandable\r\n */\r\n\r\nimport \"./ExpandableBlock.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[ExpandableBlock]] React component\r\n * @public\r\n * @deprecated in 3.0. Use ExpandableBlockProps from itwinui-react instead\r\n */\r\nexport interface ExpandableBlockProps extends CommonProps {\r\n /** Label */\r\n title: string | React.JSX.Element;\r\n /** Indicates whether the ExpandableBlock is expanded */\r\n isExpanded: boolean;\r\n /** Callback function for click event */\r\n onClick: React.MouseEventHandler<HTMLDivElement>;\r\n /** Callback function for key press event */\r\n onKeyPress?: React.KeyboardEventHandler<HTMLDivElement>;\r\n /** Callback function for key down event */\r\n onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;\r\n /** Additional text displayed in the block below the label and in a smaller font size */\r\n caption?: string;\r\n /** Custom tooltip for the component. */\r\n tooltip?: string;\r\n}\r\n\r\n/** ExpandableBlock React component is a container that shows and hides child content.\r\n * @public\r\n * @deprecated in 3.0. Use ExpandableBlock from itwinui-react instead\r\n */\r\nexport class ExpandableBlock extends React.PureComponent<ExpandableBlockProps> { // eslint-disable-line deprecation/deprecation\r\n\r\n public override render() {\r\n const cName = classnames(\r\n \"uicore-expandable-blocks-block\",\r\n this.props.caption && \"with-caption\",\r\n this.props.isExpanded ? \"is-expanded\" : \"is-collapsed\",\r\n this.props.className,\r\n );\r\n const ariaExpanded = this.props.isExpanded ? \"true\" : \"false\";\r\n const tabIndex = (this.props.onKeyPress || this.props.onKeyDown) ? 0 : undefined;\r\n\r\n const title = this.props.tooltip ?? (typeof this.props.title == \"string\" ? this.props.title : undefined);\r\n\r\n return (\r\n <div className={cName} style={this.props.style}>\r\n <div role=\"button\" aria-expanded={ariaExpanded} className=\"header\" onClick={this.props.onClick}\r\n onKeyPress={this.props.onKeyPress} onKeyDown={this.props.onKeyDown} tabIndex={tabIndex}>\r\n <div className=\"icon-container\">\r\n <i className=\"icon icon-chevron-right\" />\r\n </div>\r\n {this.props.caption &&\r\n <div className=\"caption\" title={this.props.caption}>\r\n {this.props.caption}\r\n </div>\r\n }\r\n <div className=\"title\" title={title}>\r\n {this.props.title}\r\n </div>\r\n </div>\r\n <div className=\"content\">\r\n {this.props.isExpanded && this.props.children}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
@@ -30,7 +30,7 @@ export declare class ExpandableList extends React.PureComponent<ExpandableListPr
30
30
  private renderBlocks;
31
31
  /** @internal */
32
32
  componentDidUpdate(prevProps: ExpandableListProps): void;
33
- render(): JSX.Element;
33
+ render(): React.JSX.Element;
34
34
  }
35
35
  export {};
36
36
  //# sourceMappingURL=ExpandableList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandableList.d.ts","sourceRoot":"","sources":["../../../../src/core-react/expandable/ExpandableList.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,wCAAwC;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC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CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU;gBACjG,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;aACtE,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,gBAAgB;IACA,kBAAkB,CAAC,SAA8B;QAC/D,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB,KAAK,SAAS,CAAC,kBAAkB,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB,KAAK,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YAC9H,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,kBAAmB,EAAE,CAAC,CAAC,CAAC;SAC3E;IACH,CAAC;IAEe,MAAM;QACpB,OAAO,CACL,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,+BAA+B,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IACvG,IAAI,CAAC,YAAY,EAAE,CAChB,CACP,CAAC;IACJ,CAAC;;AAnDH,wCAoDC;AA5Ce,2BAAY,GAAiC;IACzD,gBAAgB,EAAE,KAAK;IACvB,kBAAkB,EAAE,CAAC;CACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Expandable\r\n */\r\n\r\nimport \"./ExpandableList.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for [[ExpandableList]] component\r\n * @public\r\n */\r\nexport interface ExpandableListProps extends CommonProps {\r\n /** Index of the default active block */\r\n defaultActiveBlock?: number;\r\n /** Indicates whether to allow only one expanded block */\r\n singleExpandOnly?: boolean;\r\n /** Indicates whether the single expanded block is collapsible */\r\n singleIsCollapsible?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface ExpandableListState {\r\n activeBlock: number;\r\n}\r\n\r\n/**\r\n * ExpandableList React component is a container for ExpandableBlock components.\r\n * @public\r\n */\r\nexport class ExpandableList extends React.PureComponent<ExpandableListProps, ExpandableListState> {\r\n\r\n constructor(props: ExpandableListProps) {\r\n super(props);\r\n\r\n this.state = { activeBlock: this.props.defaultActiveBlock! };\r\n }\r\n\r\n public static defaultProps: Partial<ExpandableListProps> = {\r\n singleExpandOnly: false,\r\n defaultActiveBlock: 0,\r\n };\r\n\r\n // set active block\r\n private _handleBlockToggle = (index: number, onToggle: (isExpanding: boolean) => any) => {\r\n let activeBlock = index;\r\n\r\n if (this.props.singleIsCollapsible && index === this.state.activeBlock)\r\n activeBlock = -1;\r\n\r\n this.setState({ activeBlock });\r\n\r\n // istanbul ignore else\r\n if (onToggle) {\r\n onToggle(activeBlock === index); // fire the ExpandableBlock onToggle\r\n }\r\n };\r\n\r\n private renderBlocks() {\r\n return React.Children.map(this.props.children, (child: any, i) => {\r\n return React.cloneElement(child, {\r\n key: i,\r\n isExpanded: (this.props.singleExpandOnly) ? i === this.state.activeBlock : child.props.isExpanded,\r\n onToggle: this._handleBlockToggle.bind(this, i, child.props.onToggle),\r\n });\r\n });\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate(prevProps: ExpandableListProps) {\r\n if (this.props.defaultActiveBlock !== prevProps.defaultActiveBlock && this.props.defaultActiveBlock !== this.state.activeBlock) {\r\n this.setState((_, props) => ({ activeBlock: props.defaultActiveBlock! }));\r\n }\r\n }\r\n\r\n public override render(): JSX.Element {\r\n return (\r\n <div className={classnames(\"uicore-expandable-blocks-list\", this.props.className)} style={this.props.style}>\r\n {this.renderBlocks()}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ExpandableList.js","sourceRoot":"","sources":["../../../../src/core-react/expandable/ExpandableList.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,iCAA+B;AAC/B,2CAAoC;AACpC,+BAA+B;AAoB/B;;;GAGG;AACH,MAAa,cAAe,SAAQ,KAAK,CAAC,aAAuD;IAE/F,YAAY,KAA0B;QACpC,KAAK,CAAC,KAAK,CAAC,CAAC;QAUf,mBAAmB;QACX,uBAAkB,GAAG,CAAC,KAAa,EAAE,QAAuC,EAAE,EAAE;YACtF,IAAI,WAAW,GAAG,KAAK,CAAC;YAExB,IAAI,IAAI,CAAC,KAAK,CAAC,mBAAmB,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,WAAW;gBACpE,WAAW,GAAG,CAAC,CAAC,CAAC;YAEnB,IAAI,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;YAE/B,uBAAuB;YACvB,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,oCAAoC;aACtE;QACH,CAAC,CAAC;QArBA,IAAI,CAAC,KAAK,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAmB,EAAE,CAAC;IAC/D,CAAC;IAsBO,YAAY;QAClB,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAU,EAAE,CAAC,EAAE,EAAE;YAC/D,OAAO,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE;gBAC/B,GAAG,EAAE,CAAC;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU;gBACjG,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;aACtE,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,gBAAgB;IACA,kBAAkB,CAAC,SAA8B;QAC/D,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB,KAAK,SAAS,CAAC,kBAAkB,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB,KAAK,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YAC9H,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,kBAAmB,EAAE,CAAC,CAAC,CAAC;SAC3E;IACH,CAAC;IAEe,MAAM;QACpB,OAAO,CACL,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,+BAA+B,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IACvG,IAAI,CAAC,YAAY,EAAE,CAChB,CACP,CAAC;IACJ,CAAC;;AAnDH,wCAoDC;AA5Ce,2BAAY,GAAiC;IACzD,gBAAgB,EAAE,KAAK;IACvB,kBAAkB,EAAE,CAAC;CACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Expandable\r\n */\r\n\r\nimport \"./ExpandableList.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for [[ExpandableList]] component\r\n * @public\r\n */\r\nexport interface ExpandableListProps extends CommonProps {\r\n /** Index of the default active block */\r\n defaultActiveBlock?: number;\r\n /** Indicates whether to allow only one expanded block */\r\n singleExpandOnly?: boolean;\r\n /** Indicates whether the single expanded block is collapsible */\r\n singleIsCollapsible?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface ExpandableListState {\r\n activeBlock: number;\r\n}\r\n\r\n/**\r\n * ExpandableList React component is a container for ExpandableBlock components.\r\n * @public\r\n */\r\nexport class ExpandableList extends React.PureComponent<ExpandableListProps, ExpandableListState> {\r\n\r\n constructor(props: ExpandableListProps) {\r\n super(props);\r\n\r\n this.state = { activeBlock: this.props.defaultActiveBlock! };\r\n }\r\n\r\n public static defaultProps: Partial<ExpandableListProps> = {\r\n singleExpandOnly: false,\r\n defaultActiveBlock: 0,\r\n };\r\n\r\n // set active block\r\n private _handleBlockToggle = (index: number, onToggle: (isExpanding: boolean) => any) => {\r\n let activeBlock = index;\r\n\r\n if (this.props.singleIsCollapsible && index === this.state.activeBlock)\r\n activeBlock = -1;\r\n\r\n this.setState({ activeBlock });\r\n\r\n // istanbul ignore else\r\n if (onToggle) {\r\n onToggle(activeBlock === index); // fire the ExpandableBlock onToggle\r\n }\r\n };\r\n\r\n private renderBlocks() {\r\n return React.Children.map(this.props.children, (child: any, i) => {\r\n return React.cloneElement(child, {\r\n key: i,\r\n isExpanded: (this.props.singleExpandOnly) ? i === this.state.activeBlock : child.props.isExpanded,\r\n onToggle: this._handleBlockToggle.bind(this, i, child.props.onToggle),\r\n });\r\n });\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate(prevProps: ExpandableListProps) {\r\n if (this.props.defaultActiveBlock !== prevProps.defaultActiveBlock && this.props.defaultActiveBlock !== this.state.activeBlock) {\r\n this.setState((_, props) => ({ activeBlock: props.defaultActiveBlock! }));\r\n }\r\n }\r\n\r\n public override render(): React.JSX.Element {\r\n return (\r\n <div className={classnames(\"uicore-expandable-blocks-list\", this.props.className)} style={this.props.style}>\r\n {this.renderBlocks()}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}