@itwin/core-react 4.0.0-dev.1 → 4.0.0-dev.11

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 (728) hide show
  1. package/CHANGELOG.md +1 -93
  2. package/lib/cjs/core-react/UiCore.d.ts +1 -1
  3. package/lib/cjs/core-react/UiCore.js +1 -1
  4. package/lib/cjs/core-react/UiCore.js.map +1 -1
  5. package/lib/cjs/core-react/_typography.scss +7 -8
  6. package/lib/cjs/core-react/autosuggest/AutoSuggest.js +1 -1
  7. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  8. package/lib/cjs/core-react/autosuggest/AutoSuggest.scss +7 -10
  9. package/lib/cjs/core-react/badge/BetaBadge.d.ts +0 -1
  10. package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
  11. package/lib/cjs/core-react/badge/BetaBadge.js +0 -1
  12. package/lib/cjs/core-react/badge/BetaBadge.js.map +1 -1
  13. package/lib/cjs/core-react/badge/NewBadge.scss +1 -1
  14. package/lib/cjs/core-react/button/blue.scss +3 -11
  15. package/lib/cjs/core-react/button/button.scss +31 -42
  16. package/lib/cjs/core-react/button/hollow.scss +5 -5
  17. package/lib/cjs/core-react/button/primary.scss +3 -11
  18. package/lib/cjs/core-react/button/variables.scss +10 -7
  19. package/lib/cjs/core-react/checkbox/checkbox.scss +15 -20
  20. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +4 -1
  21. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  22. package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
  23. package/lib/cjs/core-react/checklistbox/CheckListBox.scss +1 -1
  24. package/lib/cjs/core-react/classes.scss +0 -5
  25. package/lib/cjs/core-react/colorthemes.scss +15 -12
  26. package/lib/cjs/core-react/colorvariables.scss +65 -50
  27. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +2 -0
  28. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  29. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  30. package/lib/cjs/core-react/contextmenu/ContextMenu.scss +19 -21
  31. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  32. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +5 -2
  33. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  34. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  35. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js +7 -3
  36. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  37. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  38. package/lib/cjs/core-react/dialog/Dialog.js +16 -7
  39. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  40. package/lib/cjs/core-react/dialog/Dialog.scss +27 -27
  41. package/lib/cjs/core-react/elementseparator/ElementSeparator.scss +1 -1
  42. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +2 -0
  43. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  44. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  45. package/lib/cjs/core-react/expandable/list.scss +7 -17
  46. package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
  47. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts +27 -0
  48. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts.map +1 -0
  49. package/lib/cjs/core-react/icons/ConditionalIconItem.js +65 -0
  50. package/lib/cjs/core-react/icons/ConditionalIconItem.js.map +1 -0
  51. package/lib/cjs/core-react/icons/IconComponent.d.ts +3 -2
  52. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  53. package/lib/cjs/core-react/icons/IconComponent.js +1 -7
  54. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  55. package/lib/cjs/core-react/icons/SvgPath.d.ts +1 -1
  56. package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
  57. package/lib/cjs/core-react/icons/SvgPath.js +2 -2
  58. package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
  59. package/lib/{esm/core-react/icons/SvgSprite.scss → cjs/core-react/icons/SvgPath.scss} +1 -1
  60. package/lib/cjs/core-react/icons/WebFontIcon.d.ts +0 -1
  61. package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
  62. package/lib/cjs/core-react/icons/WebFontIcon.js +0 -1
  63. package/lib/cjs/core-react/icons/WebFontIcon.js.map +1 -1
  64. package/lib/cjs/core-react/icons/variables.scss +0 -9
  65. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.scss +6 -7
  66. package/lib/cjs/core-react/index.scss +0 -4
  67. package/lib/cjs/core-react/inputs/Input.d.ts +2 -4
  68. package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
  69. package/lib/cjs/core-react/inputs/Input.js +1 -2
  70. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  71. package/lib/cjs/core-react/inputs/InputLabel.d.ts +2 -0
  72. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  73. package/lib/cjs/core-react/inputs/InputLabel.js +9 -1
  74. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  75. package/lib/cjs/core-react/inputs/classes.scss +0 -2
  76. package/lib/cjs/core-react/inputs/index.scss +1 -3
  77. package/lib/cjs/core-react/inputs/input-label.scss +90 -0
  78. package/lib/cjs/core-react/inputs/input.scss +36 -38
  79. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +5 -0
  80. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  81. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +13 -8
  82. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  83. package/lib/cjs/core-react/inputs/numberinput/NumberInput.scss +12 -13
  84. package/lib/cjs/core-react/inputs/variables.scss +20 -15
  85. package/lib/cjs/core-react/listbox/Listbox.scss +11 -11
  86. package/lib/cjs/core-react/loading/LoadingPrompt.scss +2 -2
  87. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +1 -2
  88. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  89. package/lib/cjs/core-react/loading/LoadingSpinner.js +1 -16
  90. package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
  91. package/lib/cjs/core-react/loading/LoadingSpinner.scss +5 -6
  92. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +17 -1
  93. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  94. package/lib/cjs/core-react/messagebox/MessageBox.js +54 -10
  95. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  96. package/lib/cjs/core-react/messagebox/MessageBox.scss +24 -14
  97. package/lib/cjs/core-react/popup/Popup.d.ts +2 -0
  98. package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
  99. package/lib/cjs/core-react/popup/Popup.js +4 -1
  100. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  101. package/lib/cjs/core-react/popup/Popup.scss +123 -123
  102. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +4 -0
  103. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  104. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  105. package/lib/cjs/core-react/radialmenu/RadialMenu.scss +2 -3
  106. package/lib/cjs/core-react/searchbox/SearchBox.d.ts.map +1 -1
  107. package/lib/cjs/core-react/searchbox/SearchBox.js +8 -6
  108. package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
  109. package/lib/cjs/core-react/searchbox/SearchBox.scss +5 -10
  110. package/lib/cjs/core-react/settings/SettingsContainer.js +1 -1
  111. package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
  112. package/lib/cjs/core-react/settings/SettingsContainer.scss +11 -8
  113. package/lib/cjs/core-react/style/baseline.scss +6 -8
  114. package/lib/cjs/core-react/style/data-viz.scss +11 -14
  115. package/lib/cjs/core-react/style/mixins.scss +2 -3
  116. package/lib/cjs/core-react/style/opacity.scss +9 -10
  117. package/lib/cjs/core-react/style/space.scss +9 -13
  118. package/lib/cjs/core-react/style/speed.scss +3 -7
  119. package/lib/cjs/core-react/style/themecolors.scss +0 -6
  120. package/lib/cjs/core-react/style/typography.scss +22 -26
  121. package/lib/cjs/core-react/style/variables.scss +4 -8
  122. package/lib/cjs/core-react/tabs/Tabs.d.ts +1 -1
  123. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  124. package/lib/cjs/core-react/tabs/classes.scss +0 -1
  125. package/lib/cjs/core-react/tabs/index.scss +0 -1
  126. package/lib/cjs/core-react/tabs/tabs.scss +40 -61
  127. package/lib/cjs/core-react/tabs/vertical.scss +20 -33
  128. package/lib/cjs/core-react/text/BlockText.d.ts.map +1 -1
  129. package/lib/cjs/core-react/text/BlockText.js +1 -0
  130. package/lib/cjs/core-react/text/BlockText.js.map +1 -1
  131. package/lib/cjs/core-react/text/BodyText.d.ts +1 -0
  132. package/lib/cjs/core-react/text/BodyText.d.ts.map +1 -1
  133. package/lib/cjs/core-react/text/BodyText.js +2 -0
  134. package/lib/cjs/core-react/text/BodyText.js.map +1 -1
  135. package/lib/cjs/core-react/text/DisabledText.d.ts.map +1 -1
  136. package/lib/cjs/core-react/text/DisabledText.js +1 -0
  137. package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
  138. package/lib/cjs/core-react/text/MutedText.d.ts +1 -0
  139. package/lib/cjs/core-react/text/MutedText.d.ts.map +1 -1
  140. package/lib/cjs/core-react/text/MutedText.js +2 -0
  141. package/lib/cjs/core-react/text/MutedText.js.map +1 -1
  142. package/lib/cjs/core-react/text/StyledText.d.ts +1 -0
  143. package/lib/cjs/core-react/text/StyledText.d.ts.map +1 -1
  144. package/lib/cjs/core-react/text/StyledText.js +1 -0
  145. package/lib/cjs/core-react/text/StyledText.js.map +1 -1
  146. package/lib/cjs/core-react/text/block.scss +9 -4
  147. package/lib/cjs/core-react/text/body.scss +7 -4
  148. package/lib/cjs/core-react/text/classes.scss +0 -8
  149. package/lib/cjs/core-react/text/index.scss +0 -8
  150. package/lib/cjs/core-react/text/mixins.scss +10 -48
  151. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  152. package/lib/cjs/core-react/tree/ExpansionToggle.js +3 -1
  153. package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
  154. package/lib/cjs/core-react/tree/ExpansionToggle.scss +7 -4
  155. package/lib/cjs/core-react/tree/Node.scss +8 -9
  156. package/lib/cjs/core-react/tree/Placeholder.scss +1 -4
  157. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.d.ts.map +1 -1
  158. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js +2 -2
  159. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
  160. package/lib/cjs/core-react/utils/hooks/useRefs.d.ts +1 -1
  161. package/lib/cjs/core-react/utils/hooks/useRefs.d.ts.map +1 -1
  162. package/lib/cjs/core-react/utils/hooks/useRefs.js.map +1 -1
  163. package/lib/cjs/core-react.d.ts +2 -41
  164. package/lib/cjs/core-react.d.ts.map +1 -1
  165. package/lib/cjs/core-react.js +2 -41
  166. package/lib/cjs/core-react.js.map +1 -1
  167. package/lib/esm/core-react/UiCore.d.ts +1 -1
  168. package/lib/esm/core-react/UiCore.js +1 -1
  169. package/lib/esm/core-react/UiCore.js.map +1 -1
  170. package/lib/esm/core-react/_typography.scss +7 -8
  171. package/lib/esm/core-react/autosuggest/AutoSuggest.js +1 -1
  172. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  173. package/lib/esm/core-react/autosuggest/AutoSuggest.scss +7 -10
  174. package/lib/esm/core-react/badge/BetaBadge.d.ts +0 -1
  175. package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
  176. package/lib/esm/core-react/badge/BetaBadge.js +0 -1
  177. package/lib/esm/core-react/badge/BetaBadge.js.map +1 -1
  178. package/lib/esm/core-react/badge/NewBadge.scss +1 -1
  179. package/lib/esm/core-react/button/blue.scss +3 -11
  180. package/lib/esm/core-react/button/button.scss +31 -42
  181. package/lib/esm/core-react/button/hollow.scss +5 -5
  182. package/lib/esm/core-react/button/primary.scss +3 -11
  183. package/lib/esm/core-react/button/variables.scss +10 -7
  184. package/lib/esm/core-react/checkbox/checkbox.scss +15 -20
  185. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +4 -1
  186. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  187. package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
  188. package/lib/esm/core-react/checklistbox/CheckListBox.scss +1 -1
  189. package/lib/esm/core-react/classes.scss +0 -5
  190. package/lib/esm/core-react/colorthemes.scss +15 -12
  191. package/lib/esm/core-react/colorvariables.scss +65 -50
  192. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +2 -0
  193. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  194. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  195. package/lib/esm/core-react/contextmenu/ContextMenu.scss +19 -21
  196. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  197. package/lib/esm/core-react/contextmenu/ContextSubMenu.js +6 -3
  198. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  199. package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  200. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js +7 -3
  201. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  202. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  203. package/lib/esm/core-react/dialog/Dialog.js +16 -7
  204. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  205. package/lib/esm/core-react/dialog/Dialog.scss +27 -27
  206. package/lib/esm/core-react/elementseparator/ElementSeparator.scss +1 -1
  207. package/lib/esm/core-react/expandable/ExpandableList.d.ts +2 -0
  208. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  209. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  210. package/lib/esm/core-react/expandable/list.scss +7 -17
  211. package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
  212. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts +27 -0
  213. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts.map +1 -0
  214. package/lib/esm/core-react/icons/ConditionalIconItem.js +61 -0
  215. package/lib/esm/core-react/icons/ConditionalIconItem.js.map +1 -0
  216. package/lib/esm/core-react/icons/IconComponent.d.ts +3 -2
  217. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  218. package/lib/esm/core-react/icons/IconComponent.js +1 -7
  219. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  220. package/lib/esm/core-react/icons/SvgPath.d.ts +1 -1
  221. package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
  222. package/lib/esm/core-react/icons/SvgPath.js +2 -2
  223. package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
  224. package/lib/{cjs/core-react/icons/SvgSprite.scss → esm/core-react/icons/SvgPath.scss} +1 -1
  225. package/lib/esm/core-react/icons/WebFontIcon.d.ts +0 -1
  226. package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
  227. package/lib/esm/core-react/icons/WebFontIcon.js +0 -1
  228. package/lib/esm/core-react/icons/WebFontIcon.js.map +1 -1
  229. package/lib/esm/core-react/icons/variables.scss +0 -9
  230. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.scss +6 -7
  231. package/lib/esm/core-react/index.scss +0 -4
  232. package/lib/esm/core-react/inputs/Input.d.ts +2 -4
  233. package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
  234. package/lib/esm/core-react/inputs/Input.js +1 -2
  235. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  236. package/lib/esm/core-react/inputs/InputLabel.d.ts +2 -0
  237. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  238. package/lib/esm/core-react/inputs/InputLabel.js +9 -1
  239. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  240. package/lib/esm/core-react/inputs/classes.scss +0 -2
  241. package/lib/esm/core-react/inputs/index.scss +1 -3
  242. package/lib/esm/core-react/inputs/input-label.scss +90 -0
  243. package/lib/esm/core-react/inputs/input.scss +36 -38
  244. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +5 -0
  245. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  246. package/lib/esm/core-react/inputs/numberinput/NumberInput.js +13 -8
  247. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  248. package/lib/esm/core-react/inputs/numberinput/NumberInput.scss +12 -13
  249. package/lib/esm/core-react/inputs/variables.scss +20 -15
  250. package/lib/esm/core-react/listbox/Listbox.scss +11 -11
  251. package/lib/esm/core-react/loading/LoadingPrompt.scss +2 -2
  252. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +1 -2
  253. package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  254. package/lib/esm/core-react/loading/LoadingSpinner.js +1 -16
  255. package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
  256. package/lib/esm/core-react/loading/LoadingSpinner.scss +5 -6
  257. package/lib/esm/core-react/messagebox/MessageBox.d.ts +17 -1
  258. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  259. package/lib/esm/core-react/messagebox/MessageBox.js +54 -10
  260. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  261. package/lib/esm/core-react/messagebox/MessageBox.scss +24 -14
  262. package/lib/esm/core-react/popup/Popup.d.ts +2 -0
  263. package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
  264. package/lib/esm/core-react/popup/Popup.js +4 -1
  265. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  266. package/lib/esm/core-react/popup/Popup.scss +123 -123
  267. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +4 -0
  268. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  269. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  270. package/lib/esm/core-react/radialmenu/RadialMenu.scss +2 -3
  271. package/lib/esm/core-react/searchbox/SearchBox.d.ts.map +1 -1
  272. package/lib/esm/core-react/searchbox/SearchBox.js +8 -6
  273. package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
  274. package/lib/esm/core-react/searchbox/SearchBox.scss +5 -10
  275. package/lib/esm/core-react/settings/SettingsContainer.js +1 -1
  276. package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
  277. package/lib/esm/core-react/settings/SettingsContainer.scss +11 -8
  278. package/lib/esm/core-react/style/baseline.scss +6 -8
  279. package/lib/esm/core-react/style/data-viz.scss +11 -14
  280. package/lib/esm/core-react/style/mixins.scss +2 -3
  281. package/lib/esm/core-react/style/opacity.scss +9 -10
  282. package/lib/esm/core-react/style/space.scss +9 -13
  283. package/lib/esm/core-react/style/speed.scss +3 -7
  284. package/lib/esm/core-react/style/themecolors.scss +0 -6
  285. package/lib/esm/core-react/style/typography.scss +22 -26
  286. package/lib/esm/core-react/style/variables.scss +4 -8
  287. package/lib/esm/core-react/tabs/Tabs.d.ts +1 -1
  288. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  289. package/lib/esm/core-react/tabs/classes.scss +0 -1
  290. package/lib/esm/core-react/tabs/index.scss +0 -1
  291. package/lib/esm/core-react/tabs/tabs.scss +40 -61
  292. package/lib/esm/core-react/tabs/vertical.scss +20 -33
  293. package/lib/esm/core-react/text/BlockText.d.ts.map +1 -1
  294. package/lib/esm/core-react/text/BlockText.js +1 -0
  295. package/lib/esm/core-react/text/BlockText.js.map +1 -1
  296. package/lib/esm/core-react/text/BodyText.d.ts +1 -0
  297. package/lib/esm/core-react/text/BodyText.d.ts.map +1 -1
  298. package/lib/esm/core-react/text/BodyText.js +2 -0
  299. package/lib/esm/core-react/text/BodyText.js.map +1 -1
  300. package/lib/esm/core-react/text/DisabledText.d.ts.map +1 -1
  301. package/lib/esm/core-react/text/DisabledText.js +1 -0
  302. package/lib/esm/core-react/text/DisabledText.js.map +1 -1
  303. package/lib/esm/core-react/text/MutedText.d.ts +1 -0
  304. package/lib/esm/core-react/text/MutedText.d.ts.map +1 -1
  305. package/lib/esm/core-react/text/MutedText.js +2 -0
  306. package/lib/esm/core-react/text/MutedText.js.map +1 -1
  307. package/lib/esm/core-react/text/StyledText.d.ts +1 -0
  308. package/lib/esm/core-react/text/StyledText.d.ts.map +1 -1
  309. package/lib/esm/core-react/text/StyledText.js +1 -0
  310. package/lib/esm/core-react/text/StyledText.js.map +1 -1
  311. package/lib/esm/core-react/text/block.scss +9 -4
  312. package/lib/esm/core-react/text/body.scss +7 -4
  313. package/lib/esm/core-react/text/classes.scss +0 -8
  314. package/lib/esm/core-react/text/index.scss +0 -8
  315. package/lib/esm/core-react/text/mixins.scss +10 -48
  316. package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  317. package/lib/esm/core-react/tree/ExpansionToggle.js +3 -1
  318. package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
  319. package/lib/esm/core-react/tree/ExpansionToggle.scss +7 -4
  320. package/lib/esm/core-react/tree/Node.scss +8 -9
  321. package/lib/esm/core-react/tree/Placeholder.scss +1 -4
  322. package/lib/esm/core-react/utils/hooks/useProximityToMouse.d.ts.map +1 -1
  323. package/lib/esm/core-react/utils/hooks/useProximityToMouse.js +2 -2
  324. package/lib/esm/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
  325. package/lib/esm/core-react/utils/hooks/useRefs.d.ts +1 -1
  326. package/lib/esm/core-react/utils/hooks/useRefs.d.ts.map +1 -1
  327. package/lib/esm/core-react/utils/hooks/useRefs.js.map +1 -1
  328. package/lib/esm/core-react.d.ts +2 -41
  329. package/lib/esm/core-react.d.ts.map +1 -1
  330. package/lib/esm/core-react.js +2 -41
  331. package/lib/esm/core-react.js.map +1 -1
  332. package/package.json +27 -35
  333. package/lib/cjs/core-react/badge/BetaBadge.scss +0 -9
  334. package/lib/cjs/core-react/button/Button.d.ts +0 -48
  335. package/lib/cjs/core-react/button/Button.d.ts.map +0 -1
  336. package/lib/cjs/core-react/button/Button.js +0 -86
  337. package/lib/cjs/core-react/button/Button.js.map +0 -1
  338. package/lib/cjs/core-react/checkbox/Checkbox.d.ts +0 -57
  339. package/lib/cjs/core-react/checkbox/Checkbox.d.ts.map +0 -1
  340. package/lib/cjs/core-react/checkbox/Checkbox.js +0 -65
  341. package/lib/cjs/core-react/checkbox/Checkbox.js.map +0 -1
  342. package/lib/cjs/core-react/dialog/DialogButtonDef.d.ts +0 -47
  343. package/lib/cjs/core-react/dialog/DialogButtonDef.d.ts.map +0 -1
  344. package/lib/cjs/core-react/dialog/DialogButtonDef.js +0 -38
  345. package/lib/cjs/core-react/dialog/DialogButtonDef.js.map +0 -1
  346. package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts +0 -34
  347. package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts.map +0 -1
  348. package/lib/cjs/core-react/expandable/ExpandableBlock.js +0 -36
  349. package/lib/cjs/core-react/expandable/ExpandableBlock.js.map +0 -1
  350. package/lib/cjs/core-react/expandable/ExpandableBlock.scss +0 -145
  351. package/lib/cjs/core-react/form/Field.d.ts +0 -20
  352. package/lib/cjs/core-react/form/Field.d.ts.map +0 -1
  353. package/lib/cjs/core-react/form/Field.js +0 -45
  354. package/lib/cjs/core-react/form/Field.js.map +0 -1
  355. package/lib/cjs/core-react/form/Form.d.ts +0 -132
  356. package/lib/cjs/core-react/form/Form.d.ts.map +0 -1
  357. package/lib/cjs/core-react/form/Form.js +0 -132
  358. package/lib/cjs/core-react/form/Form.js.map +0 -1
  359. package/lib/cjs/core-react/form/Form.scss +0 -78
  360. package/lib/cjs/core-react/icons/SvgSprite.d.ts +0 -21
  361. package/lib/cjs/core-react/icons/SvgSprite.d.ts.map +0 -1
  362. package/lib/cjs/core-react/icons/SvgSprite.js +0 -27
  363. package/lib/cjs/core-react/icons/SvgSprite.js.map +0 -1
  364. package/lib/cjs/core-react/inputs/LabeledInput.d.ts +0 -18
  365. package/lib/cjs/core-react/inputs/LabeledInput.d.ts.map +0 -1
  366. package/lib/cjs/core-react/inputs/LabeledInput.js +0 -34
  367. package/lib/cjs/core-react/inputs/LabeledInput.js.map +0 -1
  368. package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts +0 -18
  369. package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts.map +0 -1
  370. package/lib/cjs/core-react/inputs/LabeledTextarea.js +0 -32
  371. package/lib/cjs/core-react/inputs/LabeledTextarea.js.map +0 -1
  372. package/lib/cjs/core-react/inputs/Textarea.d.ts +0 -23
  373. package/lib/cjs/core-react/inputs/Textarea.d.ts.map +0 -1
  374. package/lib/cjs/core-react/inputs/Textarea.js +0 -36
  375. package/lib/cjs/core-react/inputs/Textarea.js.map +0 -1
  376. package/lib/cjs/core-react/inputs/labeled-input.scss +0 -103
  377. package/lib/cjs/core-react/inputs/labeled-textarea.scss +0 -77
  378. package/lib/cjs/core-react/inputs/textarea.scss +0 -55
  379. package/lib/cjs/core-react/loading/Spinner.d.ts +0 -38
  380. package/lib/cjs/core-react/loading/Spinner.d.ts.map +0 -1
  381. package/lib/cjs/core-react/loading/Spinner.js +0 -61
  382. package/lib/cjs/core-react/loading/Spinner.js.map +0 -1
  383. package/lib/cjs/core-react/loading/Spinner.scss +0 -26
  384. package/lib/cjs/core-react/messagebox/MessageSeverity.d.ts +0 -16
  385. package/lib/cjs/core-react/messagebox/MessageSeverity.d.ts.map +0 -1
  386. package/lib/cjs/core-react/messagebox/MessageSeverity.js +0 -24
  387. package/lib/cjs/core-react/messagebox/MessageSeverity.js.map +0 -1
  388. package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts +0 -29
  389. package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts.map +0 -1
  390. package/lib/cjs/core-react/progress-indicators/ProgressBar.js +0 -48
  391. package/lib/cjs/core-react/progress-indicators/ProgressBar.js.map +0 -1
  392. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts +0 -49
  393. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts.map +0 -1
  394. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.js +0 -74
  395. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.js.map +0 -1
  396. package/lib/cjs/core-react/progress-indicators/classes.scss +0 -33
  397. package/lib/cjs/core-react/progress-indicators/index.scss +0 -6
  398. package/lib/cjs/core-react/progress-indicators/progress-bar.scss +0 -91
  399. package/lib/cjs/core-react/progress-indicators/progress-spinner.scss +0 -132
  400. package/lib/cjs/core-react/radio/Radio.d.ts +0 -20
  401. package/lib/cjs/core-react/radio/Radio.d.ts.map +0 -1
  402. package/lib/cjs/core-react/radio/Radio.js +0 -28
  403. package/lib/cjs/core-react/radio/Radio.js.map +0 -1
  404. package/lib/cjs/core-react/radio/classes.scss +0 -7
  405. package/lib/cjs/core-react/radio/index.scss +0 -8
  406. package/lib/cjs/core-react/radio/radio.scss +0 -89
  407. package/lib/cjs/core-react/select/LabeledSelect.d.ts +0 -20
  408. package/lib/cjs/core-react/select/LabeledSelect.d.ts.map +0 -1
  409. package/lib/cjs/core-react/select/LabeledSelect.js +0 -34
  410. package/lib/cjs/core-react/select/LabeledSelect.js.map +0 -1
  411. package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts +0 -16
  412. package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts.map +0 -1
  413. package/lib/cjs/core-react/select/LabeledThemedSelect.js +0 -31
  414. package/lib/cjs/core-react/select/LabeledThemedSelect.js.map +0 -1
  415. package/lib/cjs/core-react/select/Select.d.ts +0 -53
  416. package/lib/cjs/core-react/select/Select.d.ts.map +0 -1
  417. package/lib/cjs/core-react/select/Select.js +0 -60
  418. package/lib/cjs/core-react/select/Select.js.map +0 -1
  419. package/lib/cjs/core-react/select/ThemedSelect.d.ts +0 -104
  420. package/lib/cjs/core-react/select/ThemedSelect.d.ts.map +0 -1
  421. package/lib/cjs/core-react/select/ThemedSelect.js +0 -57
  422. package/lib/cjs/core-react/select/ThemedSelect.js.map +0 -1
  423. package/lib/cjs/core-react/select/classes.scss +0 -9
  424. package/lib/cjs/core-react/select/index.scss +0 -10
  425. package/lib/cjs/core-react/select/labeled-select.scss +0 -72
  426. package/lib/cjs/core-react/select/labeled-themed-select.scss +0 -77
  427. package/lib/cjs/core-react/select/modalHelper.d.ts +0 -5
  428. package/lib/cjs/core-react/select/modalHelper.d.ts.map +0 -1
  429. package/lib/cjs/core-react/select/modalHelper.js +0 -21
  430. package/lib/cjs/core-react/select/modalHelper.js.map +0 -1
  431. package/lib/cjs/core-react/select/select.scss +0 -74
  432. package/lib/cjs/core-react/select/themed-select.scss +0 -159
  433. package/lib/cjs/core-react/slider/Slider.d.ts +0 -80
  434. package/lib/cjs/core-react/slider/Slider.d.ts.map +0 -1
  435. package/lib/cjs/core-react/slider/Slider.js +0 -91
  436. package/lib/cjs/core-react/slider/Slider.js.map +0 -1
  437. package/lib/cjs/core-react/slider/Slider.scss +0 -96
  438. package/lib/cjs/core-react/splitbutton/SplitButton.d.ts +0 -62
  439. package/lib/cjs/core-react/splitbutton/SplitButton.d.ts.map +0 -1
  440. package/lib/cjs/core-react/splitbutton/SplitButton.js +0 -104
  441. package/lib/cjs/core-react/splitbutton/SplitButton.js.map +0 -1
  442. package/lib/cjs/core-react/splitbutton/SplitButton.scss +0 -137
  443. package/lib/cjs/core-react/style/itwinui-overrides.scss +0 -25
  444. package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts +0 -11
  445. package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts.map +0 -1
  446. package/lib/cjs/core-react/tabs/HorizontalTabs.js +0 -22
  447. package/lib/cjs/core-react/tabs/HorizontalTabs.js.map +0 -1
  448. package/lib/cjs/core-react/tabs/horizontal.scss +0 -77
  449. package/lib/cjs/core-react/text/Headline.d.ts +0 -11
  450. package/lib/cjs/core-react/text/Headline.d.ts.map +0 -1
  451. package/lib/cjs/core-react/text/Headline.js +0 -21
  452. package/lib/cjs/core-react/text/Headline.js.map +0 -1
  453. package/lib/cjs/core-react/text/LeadingText.d.ts +0 -11
  454. package/lib/cjs/core-react/text/LeadingText.d.ts.map +0 -1
  455. package/lib/cjs/core-react/text/LeadingText.js +0 -21
  456. package/lib/cjs/core-react/text/LeadingText.js.map +0 -1
  457. package/lib/cjs/core-react/text/LeadingText2.d.ts +0 -11
  458. package/lib/cjs/core-react/text/LeadingText2.d.ts.map +0 -1
  459. package/lib/cjs/core-react/text/LeadingText2.js +0 -21
  460. package/lib/cjs/core-react/text/LeadingText2.js.map +0 -1
  461. package/lib/cjs/core-react/text/SmallText.d.ts +0 -11
  462. package/lib/cjs/core-react/text/SmallText.d.ts.map +0 -1
  463. package/lib/cjs/core-react/text/SmallText.js +0 -21
  464. package/lib/cjs/core-react/text/SmallText.js.map +0 -1
  465. package/lib/cjs/core-react/text/Subheading.d.ts +0 -11
  466. package/lib/cjs/core-react/text/Subheading.d.ts.map +0 -1
  467. package/lib/cjs/core-react/text/Subheading.js +0 -21
  468. package/lib/cjs/core-react/text/Subheading.js.map +0 -1
  469. package/lib/cjs/core-react/text/Subheading2.d.ts +0 -11
  470. package/lib/cjs/core-react/text/Subheading2.d.ts.map +0 -1
  471. package/lib/cjs/core-react/text/Subheading2.js +0 -21
  472. package/lib/cjs/core-react/text/Subheading2.js.map +0 -1
  473. package/lib/cjs/core-react/text/Title.d.ts +0 -11
  474. package/lib/cjs/core-react/text/Title.d.ts.map +0 -1
  475. package/lib/cjs/core-react/text/Title.js +0 -21
  476. package/lib/cjs/core-react/text/Title.js.map +0 -1
  477. package/lib/cjs/core-react/text/Title2.d.ts +0 -11
  478. package/lib/cjs/core-react/text/Title2.d.ts.map +0 -1
  479. package/lib/cjs/core-react/text/Title2.js +0 -21
  480. package/lib/cjs/core-react/text/Title2.js.map +0 -1
  481. package/lib/cjs/core-react/text/headline.scss +0 -10
  482. package/lib/cjs/core-react/text/leading-2.scss +0 -11
  483. package/lib/cjs/core-react/text/leading.scss +0 -10
  484. package/lib/cjs/core-react/text/small.scss +0 -10
  485. package/lib/cjs/core-react/text/subheading-2.scss +0 -11
  486. package/lib/cjs/core-react/text/subheading.scss +0 -11
  487. package/lib/cjs/core-react/text/title-2.scss +0 -11
  488. package/lib/cjs/core-react/text/title.scss +0 -10
  489. package/lib/cjs/core-react/tiles/FeaturedTile.d.ts +0 -11
  490. package/lib/cjs/core-react/tiles/FeaturedTile.d.ts.map +0 -1
  491. package/lib/cjs/core-react/tiles/FeaturedTile.js +0 -21
  492. package/lib/cjs/core-react/tiles/FeaturedTile.js.map +0 -1
  493. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts +0 -11
  494. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts.map +0 -1
  495. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.js +0 -21
  496. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.js.map +0 -1
  497. package/lib/cjs/core-react/tiles/MinimalTile.d.ts +0 -11
  498. package/lib/cjs/core-react/tiles/MinimalTile.d.ts.map +0 -1
  499. package/lib/cjs/core-react/tiles/MinimalTile.js +0 -21
  500. package/lib/cjs/core-react/tiles/MinimalTile.js.map +0 -1
  501. package/lib/cjs/core-react/tiles/Tile.d.ts +0 -32
  502. package/lib/cjs/core-react/tiles/Tile.d.ts.map +0 -1
  503. package/lib/cjs/core-react/tiles/Tile.js +0 -40
  504. package/lib/cjs/core-react/tiles/Tile.js.map +0 -1
  505. package/lib/cjs/core-react/tiles/classes.scss +0 -7
  506. package/lib/cjs/core-react/tiles/index.scss +0 -5
  507. package/lib/cjs/core-react/tiles/tile.scss +0 -134
  508. package/lib/cjs/core-react/toggle/LabeledToggle.d.ts +0 -26
  509. package/lib/cjs/core-react/toggle/LabeledToggle.d.ts.map +0 -1
  510. package/lib/cjs/core-react/toggle/LabeledToggle.js +0 -29
  511. package/lib/cjs/core-react/toggle/LabeledToggle.js.map +0 -1
  512. package/lib/cjs/core-react/toggle/LabeledToggle.scss +0 -21
  513. package/lib/cjs/core-react/toggle/Toggle.d.ts +0 -52
  514. package/lib/cjs/core-react/toggle/Toggle.d.ts.map +0 -1
  515. package/lib/cjs/core-react/toggle/Toggle.js +0 -105
  516. package/lib/cjs/core-react/toggle/Toggle.js.map +0 -1
  517. package/lib/cjs/core-react/toggle/Toggle.scss +0 -135
  518. package/lib/cjs/core-react/tooltip/Tooltip.d.ts +0 -34
  519. package/lib/cjs/core-react/tooltip/Tooltip.d.ts.map +0 -1
  520. package/lib/cjs/core-react/tooltip/Tooltip.js +0 -57
  521. package/lib/cjs/core-react/tooltip/Tooltip.js.map +0 -1
  522. package/lib/cjs/core-react/tooltip/Tooltip.scss +0 -18
  523. package/lib/cjs/core-react/utils/PointProps.d.ts +0 -12
  524. package/lib/cjs/core-react/utils/PointProps.d.ts.map +0 -1
  525. package/lib/cjs/core-react/utils/PointProps.js +0 -10
  526. package/lib/cjs/core-react/utils/PointProps.js.map +0 -1
  527. package/lib/cjs/core-react/utils/UiEvent.d.ts +0 -10
  528. package/lib/cjs/core-react/utils/UiEvent.d.ts.map +0 -1
  529. package/lib/cjs/core-react/utils/UiEvent.js +0 -18
  530. package/lib/cjs/core-react/utils/UiEvent.js.map +0 -1
  531. package/lib/esm/core-react/badge/BetaBadge.scss +0 -9
  532. package/lib/esm/core-react/button/Button.d.ts +0 -48
  533. package/lib/esm/core-react/button/Button.d.ts.map +0 -1
  534. package/lib/esm/core-react/button/Button.js +0 -81
  535. package/lib/esm/core-react/button/Button.js.map +0 -1
  536. package/lib/esm/core-react/checkbox/Checkbox.d.ts +0 -57
  537. package/lib/esm/core-react/checkbox/Checkbox.d.ts.map +0 -1
  538. package/lib/esm/core-react/checkbox/Checkbox.js +0 -61
  539. package/lib/esm/core-react/checkbox/Checkbox.js.map +0 -1
  540. package/lib/esm/core-react/dialog/DialogButtonDef.d.ts +0 -47
  541. package/lib/esm/core-react/dialog/DialogButtonDef.d.ts.map +0 -1
  542. package/lib/esm/core-react/dialog/DialogButtonDef.js +0 -35
  543. package/lib/esm/core-react/dialog/DialogButtonDef.js.map +0 -1
  544. package/lib/esm/core-react/expandable/ExpandableBlock.d.ts +0 -34
  545. package/lib/esm/core-react/expandable/ExpandableBlock.d.ts.map +0 -1
  546. package/lib/esm/core-react/expandable/ExpandableBlock.js +0 -32
  547. package/lib/esm/core-react/expandable/ExpandableBlock.js.map +0 -1
  548. package/lib/esm/core-react/expandable/ExpandableBlock.scss +0 -145
  549. package/lib/esm/core-react/form/Field.d.ts +0 -20
  550. package/lib/esm/core-react/form/Field.d.ts.map +0 -1
  551. package/lib/esm/core-react/form/Field.js +0 -41
  552. package/lib/esm/core-react/form/Field.js.map +0 -1
  553. package/lib/esm/core-react/form/Form.d.ts +0 -132
  554. package/lib/esm/core-react/form/Form.d.ts.map +0 -1
  555. package/lib/esm/core-react/form/Form.js +0 -128
  556. package/lib/esm/core-react/form/Form.js.map +0 -1
  557. package/lib/esm/core-react/form/Form.scss +0 -78
  558. package/lib/esm/core-react/icons/SvgSprite.d.ts +0 -21
  559. package/lib/esm/core-react/icons/SvgSprite.d.ts.map +0 -1
  560. package/lib/esm/core-react/icons/SvgSprite.js +0 -23
  561. package/lib/esm/core-react/icons/SvgSprite.js.map +0 -1
  562. package/lib/esm/core-react/inputs/LabeledInput.d.ts +0 -18
  563. package/lib/esm/core-react/inputs/LabeledInput.d.ts.map +0 -1
  564. package/lib/esm/core-react/inputs/LabeledInput.js +0 -30
  565. package/lib/esm/core-react/inputs/LabeledInput.js.map +0 -1
  566. package/lib/esm/core-react/inputs/LabeledTextarea.d.ts +0 -18
  567. package/lib/esm/core-react/inputs/LabeledTextarea.d.ts.map +0 -1
  568. package/lib/esm/core-react/inputs/LabeledTextarea.js +0 -28
  569. package/lib/esm/core-react/inputs/LabeledTextarea.js.map +0 -1
  570. package/lib/esm/core-react/inputs/Textarea.d.ts +0 -23
  571. package/lib/esm/core-react/inputs/Textarea.d.ts.map +0 -1
  572. package/lib/esm/core-react/inputs/Textarea.js +0 -33
  573. package/lib/esm/core-react/inputs/Textarea.js.map +0 -1
  574. package/lib/esm/core-react/inputs/labeled-input.scss +0 -103
  575. package/lib/esm/core-react/inputs/labeled-textarea.scss +0 -77
  576. package/lib/esm/core-react/inputs/textarea.scss +0 -55
  577. package/lib/esm/core-react/loading/Spinner.d.ts +0 -38
  578. package/lib/esm/core-react/loading/Spinner.d.ts.map +0 -1
  579. package/lib/esm/core-react/loading/Spinner.js +0 -57
  580. package/lib/esm/core-react/loading/Spinner.js.map +0 -1
  581. package/lib/esm/core-react/loading/Spinner.scss +0 -26
  582. package/lib/esm/core-react/messagebox/MessageSeverity.d.ts +0 -16
  583. package/lib/esm/core-react/messagebox/MessageSeverity.d.ts.map +0 -1
  584. package/lib/esm/core-react/messagebox/MessageSeverity.js +0 -21
  585. package/lib/esm/core-react/messagebox/MessageSeverity.js.map +0 -1
  586. package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts +0 -29
  587. package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts.map +0 -1
  588. package/lib/esm/core-react/progress-indicators/ProgressBar.js +0 -44
  589. package/lib/esm/core-react/progress-indicators/ProgressBar.js.map +0 -1
  590. package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts +0 -49
  591. package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts.map +0 -1
  592. package/lib/esm/core-react/progress-indicators/ProgressSpinner.js +0 -70
  593. package/lib/esm/core-react/progress-indicators/ProgressSpinner.js.map +0 -1
  594. package/lib/esm/core-react/progress-indicators/classes.scss +0 -33
  595. package/lib/esm/core-react/progress-indicators/index.scss +0 -6
  596. package/lib/esm/core-react/progress-indicators/progress-bar.scss +0 -91
  597. package/lib/esm/core-react/progress-indicators/progress-spinner.scss +0 -132
  598. package/lib/esm/core-react/radio/Radio.d.ts +0 -20
  599. package/lib/esm/core-react/radio/Radio.d.ts.map +0 -1
  600. package/lib/esm/core-react/radio/Radio.js +0 -24
  601. package/lib/esm/core-react/radio/Radio.js.map +0 -1
  602. package/lib/esm/core-react/radio/classes.scss +0 -7
  603. package/lib/esm/core-react/radio/index.scss +0 -8
  604. package/lib/esm/core-react/radio/radio.scss +0 -89
  605. package/lib/esm/core-react/select/LabeledSelect.d.ts +0 -20
  606. package/lib/esm/core-react/select/LabeledSelect.d.ts.map +0 -1
  607. package/lib/esm/core-react/select/LabeledSelect.js +0 -30
  608. package/lib/esm/core-react/select/LabeledSelect.js.map +0 -1
  609. package/lib/esm/core-react/select/LabeledThemedSelect.d.ts +0 -16
  610. package/lib/esm/core-react/select/LabeledThemedSelect.d.ts.map +0 -1
  611. package/lib/esm/core-react/select/LabeledThemedSelect.js +0 -27
  612. package/lib/esm/core-react/select/LabeledThemedSelect.js.map +0 -1
  613. package/lib/esm/core-react/select/Select.d.ts +0 -53
  614. package/lib/esm/core-react/select/Select.d.ts.map +0 -1
  615. package/lib/esm/core-react/select/Select.js +0 -57
  616. package/lib/esm/core-react/select/Select.js.map +0 -1
  617. package/lib/esm/core-react/select/ThemedSelect.d.ts +0 -104
  618. package/lib/esm/core-react/select/ThemedSelect.d.ts.map +0 -1
  619. package/lib/esm/core-react/select/ThemedSelect.js +0 -53
  620. package/lib/esm/core-react/select/ThemedSelect.js.map +0 -1
  621. package/lib/esm/core-react/select/classes.scss +0 -9
  622. package/lib/esm/core-react/select/index.scss +0 -10
  623. package/lib/esm/core-react/select/labeled-select.scss +0 -72
  624. package/lib/esm/core-react/select/labeled-themed-select.scss +0 -77
  625. package/lib/esm/core-react/select/modalHelper.d.ts +0 -5
  626. package/lib/esm/core-react/select/modalHelper.d.ts.map +0 -1
  627. package/lib/esm/core-react/select/modalHelper.js +0 -17
  628. package/lib/esm/core-react/select/modalHelper.js.map +0 -1
  629. package/lib/esm/core-react/select/select.scss +0 -74
  630. package/lib/esm/core-react/select/themed-select.scss +0 -159
  631. package/lib/esm/core-react/slider/Slider.d.ts +0 -80
  632. package/lib/esm/core-react/slider/Slider.d.ts.map +0 -1
  633. package/lib/esm/core-react/slider/Slider.js +0 -87
  634. package/lib/esm/core-react/slider/Slider.js.map +0 -1
  635. package/lib/esm/core-react/slider/Slider.scss +0 -96
  636. package/lib/esm/core-react/splitbutton/SplitButton.d.ts +0 -62
  637. package/lib/esm/core-react/splitbutton/SplitButton.d.ts.map +0 -1
  638. package/lib/esm/core-react/splitbutton/SplitButton.js +0 -100
  639. package/lib/esm/core-react/splitbutton/SplitButton.js.map +0 -1
  640. package/lib/esm/core-react/splitbutton/SplitButton.scss +0 -137
  641. package/lib/esm/core-react/style/itwinui-overrides.scss +0 -25
  642. package/lib/esm/core-react/tabs/HorizontalTabs.d.ts +0 -11
  643. package/lib/esm/core-react/tabs/HorizontalTabs.d.ts.map +0 -1
  644. package/lib/esm/core-react/tabs/HorizontalTabs.js +0 -18
  645. package/lib/esm/core-react/tabs/HorizontalTabs.js.map +0 -1
  646. package/lib/esm/core-react/tabs/horizontal.scss +0 -77
  647. package/lib/esm/core-react/text/Headline.d.ts +0 -11
  648. package/lib/esm/core-react/text/Headline.d.ts.map +0 -1
  649. package/lib/esm/core-react/text/Headline.js +0 -17
  650. package/lib/esm/core-react/text/Headline.js.map +0 -1
  651. package/lib/esm/core-react/text/LeadingText.d.ts +0 -11
  652. package/lib/esm/core-react/text/LeadingText.d.ts.map +0 -1
  653. package/lib/esm/core-react/text/LeadingText.js +0 -17
  654. package/lib/esm/core-react/text/LeadingText.js.map +0 -1
  655. package/lib/esm/core-react/text/LeadingText2.d.ts +0 -11
  656. package/lib/esm/core-react/text/LeadingText2.d.ts.map +0 -1
  657. package/lib/esm/core-react/text/LeadingText2.js +0 -17
  658. package/lib/esm/core-react/text/LeadingText2.js.map +0 -1
  659. package/lib/esm/core-react/text/SmallText.d.ts +0 -11
  660. package/lib/esm/core-react/text/SmallText.d.ts.map +0 -1
  661. package/lib/esm/core-react/text/SmallText.js +0 -17
  662. package/lib/esm/core-react/text/SmallText.js.map +0 -1
  663. package/lib/esm/core-react/text/Subheading.d.ts +0 -11
  664. package/lib/esm/core-react/text/Subheading.d.ts.map +0 -1
  665. package/lib/esm/core-react/text/Subheading.js +0 -17
  666. package/lib/esm/core-react/text/Subheading.js.map +0 -1
  667. package/lib/esm/core-react/text/Subheading2.d.ts +0 -11
  668. package/lib/esm/core-react/text/Subheading2.d.ts.map +0 -1
  669. package/lib/esm/core-react/text/Subheading2.js +0 -17
  670. package/lib/esm/core-react/text/Subheading2.js.map +0 -1
  671. package/lib/esm/core-react/text/Title.d.ts +0 -11
  672. package/lib/esm/core-react/text/Title.d.ts.map +0 -1
  673. package/lib/esm/core-react/text/Title.js +0 -17
  674. package/lib/esm/core-react/text/Title.js.map +0 -1
  675. package/lib/esm/core-react/text/Title2.d.ts +0 -11
  676. package/lib/esm/core-react/text/Title2.d.ts.map +0 -1
  677. package/lib/esm/core-react/text/Title2.js +0 -17
  678. package/lib/esm/core-react/text/Title2.js.map +0 -1
  679. package/lib/esm/core-react/text/headline.scss +0 -10
  680. package/lib/esm/core-react/text/leading-2.scss +0 -11
  681. package/lib/esm/core-react/text/leading.scss +0 -10
  682. package/lib/esm/core-react/text/small.scss +0 -10
  683. package/lib/esm/core-react/text/subheading-2.scss +0 -11
  684. package/lib/esm/core-react/text/subheading.scss +0 -11
  685. package/lib/esm/core-react/text/title-2.scss +0 -11
  686. package/lib/esm/core-react/text/title.scss +0 -10
  687. package/lib/esm/core-react/tiles/FeaturedTile.d.ts +0 -11
  688. package/lib/esm/core-react/tiles/FeaturedTile.d.ts.map +0 -1
  689. package/lib/esm/core-react/tiles/FeaturedTile.js +0 -17
  690. package/lib/esm/core-react/tiles/FeaturedTile.js.map +0 -1
  691. package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts +0 -11
  692. package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts.map +0 -1
  693. package/lib/esm/core-react/tiles/MinimalFeaturedTile.js +0 -17
  694. package/lib/esm/core-react/tiles/MinimalFeaturedTile.js.map +0 -1
  695. package/lib/esm/core-react/tiles/MinimalTile.d.ts +0 -11
  696. package/lib/esm/core-react/tiles/MinimalTile.d.ts.map +0 -1
  697. package/lib/esm/core-react/tiles/MinimalTile.js +0 -17
  698. package/lib/esm/core-react/tiles/MinimalTile.js.map +0 -1
  699. package/lib/esm/core-react/tiles/Tile.d.ts +0 -32
  700. package/lib/esm/core-react/tiles/Tile.d.ts.map +0 -1
  701. package/lib/esm/core-react/tiles/Tile.js +0 -36
  702. package/lib/esm/core-react/tiles/Tile.js.map +0 -1
  703. package/lib/esm/core-react/tiles/classes.scss +0 -7
  704. package/lib/esm/core-react/tiles/index.scss +0 -5
  705. package/lib/esm/core-react/tiles/tile.scss +0 -134
  706. package/lib/esm/core-react/toggle/LabeledToggle.d.ts +0 -26
  707. package/lib/esm/core-react/toggle/LabeledToggle.d.ts.map +0 -1
  708. package/lib/esm/core-react/toggle/LabeledToggle.js +0 -25
  709. package/lib/esm/core-react/toggle/LabeledToggle.js.map +0 -1
  710. package/lib/esm/core-react/toggle/LabeledToggle.scss +0 -21
  711. package/lib/esm/core-react/toggle/Toggle.d.ts +0 -52
  712. package/lib/esm/core-react/toggle/Toggle.d.ts.map +0 -1
  713. package/lib/esm/core-react/toggle/Toggle.js +0 -102
  714. package/lib/esm/core-react/toggle/Toggle.js.map +0 -1
  715. package/lib/esm/core-react/toggle/Toggle.scss +0 -135
  716. package/lib/esm/core-react/tooltip/Tooltip.d.ts +0 -34
  717. package/lib/esm/core-react/tooltip/Tooltip.d.ts.map +0 -1
  718. package/lib/esm/core-react/tooltip/Tooltip.js +0 -52
  719. package/lib/esm/core-react/tooltip/Tooltip.js.map +0 -1
  720. package/lib/esm/core-react/tooltip/Tooltip.scss +0 -18
  721. package/lib/esm/core-react/utils/PointProps.d.ts +0 -12
  722. package/lib/esm/core-react/utils/PointProps.d.ts.map +0 -1
  723. package/lib/esm/core-react/utils/PointProps.js +0 -9
  724. package/lib/esm/core-react/utils/PointProps.js.map +0 -1
  725. package/lib/esm/core-react/utils/UiEvent.d.ts +0 -10
  726. package/lib/esm/core-react/utils/UiEvent.d.ts.map +0 -1
  727. package/lib/esm/core-react/utils/UiEvent.js +0 -14
  728. package/lib/esm/core-react/utils/UiEvent.js.map +0 -1
@@ -10,6 +10,8 @@ import classnames from "classnames";
10
10
  import * as React from "react";
11
11
  import { MessageSeverity } from "@itwin/appui-abstract";
12
12
  import { Dialog } from "../dialog/Dialog";
13
+ import { SvgHelpCircular, SvgHelpCircularHollow, SvgInfoCircular, SvgInfoCircularHollow, SvgStatusError, SvgStatusErrorHollow, SvgStatusRejected, SvgStatusRejectedHollow, SvgStatusSuccess, SvgStatusSuccessHollow, SvgStatusWarning } from "@itwin/itwinui-icons-react";
14
+ import { Icon } from "../icons/IconComponent";
13
15
  /** Message Box React component.
14
16
  * @public
15
17
  */
@@ -29,37 +31,79 @@ MessageBox.defaultProps = {
29
31
  * @public
30
32
  */
31
33
  export class MessageContainer extends React.PureComponent {
32
- static getIconClassName(severity, hollow) {
34
+ /** Returns the class name associated with the WebFont icon corresponding to the MessageSeverity.
35
+ * @param severity MessageSeverity
36
+ * @param _hollow @deprecated in 4.0. Ignored.
37
+ * @deprecated in 4.0. Please use getIcon method
38
+ */
39
+ /* istanbul ignore next */
40
+ static getIconClassName(severity, _hollow) {
33
41
  let iconClassName = "";
34
42
  switch (severity) {
35
43
  case MessageSeverity.None:
36
- iconClassName = " ";
44
+ iconClassName = "";
37
45
  break;
38
46
  case MessageSeverity.Success:
39
- iconClassName = hollow ? "icon-status-success-hollow" : "icon-status-success" + " core-message-box-success";
47
+ iconClassName = "core-message-box-success";
40
48
  break;
41
49
  case MessageSeverity.Information:
42
- iconClassName = hollow ? "icon-info-hollow" : "icon-info" + " core-message-box-information";
50
+ iconClassName = "core-message-box-information";
43
51
  break;
44
52
  case MessageSeverity.Question:
45
- iconClassName = hollow ? "icon-help-hollow" : "icon-help" + " core-message-box-question";
53
+ iconClassName = "core-message-box-question";
46
54
  break;
47
55
  case MessageSeverity.Warning:
48
- iconClassName = hollow ? "icon-status-warning" : "icon-status-warning" + " core-message-box-warning"; // TODO - need icon-status-warning-hollow icon
56
+ iconClassName = "core-message-box-warning"; // TODO - need icon-status-warning-hollow icon
49
57
  break;
50
58
  case MessageSeverity.Error:
51
- iconClassName = hollow ? "icon-status-error-hollow" : "icon-status-error" + " core-message-box-error";
59
+ iconClassName = "core-message-box-error";
52
60
  break;
53
61
  case MessageSeverity.Fatal:
54
- iconClassName = hollow ? "icon-status-rejected" : "icon-status-rejected" + " core-message-box-fatal";
62
+ iconClassName = "core-message-box-fatal";
55
63
  break;
56
64
  }
57
65
  return iconClassName;
58
66
  }
67
+ /** Returns the React icon corresponding to the MessageSeverity.
68
+ * @param severity MessageSeverity
69
+ * @param hollow set to true to return the hollow form of the icon.
70
+ * @returns IconSpec
71
+ */
72
+ /* ignore for unit tests and replace with visual testing */
73
+ /* istanbul ignore next */
74
+ static getIcon(severity, hollow) {
75
+ let iconSpec = "";
76
+ switch (severity) {
77
+ case MessageSeverity.None:
78
+ iconSpec = "";
79
+ break;
80
+ case MessageSeverity.Success:
81
+ iconSpec = hollow ? React.createElement(SvgStatusSuccessHollow, null) : React.createElement(SvgStatusSuccess, null);
82
+ break;
83
+ case MessageSeverity.Information:
84
+ iconSpec = hollow ? React.createElement(SvgInfoCircularHollow, null) : React.createElement(SvgInfoCircular, null);
85
+ break;
86
+ case MessageSeverity.Question:
87
+ iconSpec = hollow ? React.createElement(SvgHelpCircularHollow, null) : React.createElement(SvgHelpCircular, null);
88
+ break;
89
+ case MessageSeverity.Warning:
90
+ iconSpec = React.createElement(SvgStatusWarning, null); // TODO - need icon-status-warning-hollow icon
91
+ break;
92
+ case MessageSeverity.Error:
93
+ iconSpec = hollow ? React.createElement(SvgStatusErrorHollow, null) : React.createElement(SvgStatusError, null);
94
+ break;
95
+ case MessageSeverity.Fatal:
96
+ iconSpec = hollow ? React.createElement(SvgStatusRejectedHollow, null) : React.createElement(SvgStatusRejected, null);
97
+ break;
98
+ }
99
+ return iconSpec;
100
+ }
59
101
  render() {
60
- const iconClassName = classnames("icon", "core-message-box-icon", MessageContainer.getIconClassName(this.props.severity));
102
+ const iconClassName = classnames("icon", "core-message-box-icon");
103
+ const iconSpec = MessageContainer.getIcon(this.props.severity);
61
104
  return (React.createElement("div", { className: "core-message-box-container" },
62
- React.createElement("div", { className: iconClassName }),
105
+ React.createElement("div", { className: iconClassName },
106
+ React.createElement(Icon, { iconSpec: iconSpec })),
63
107
  React.createElement("div", { className: classnames("core-message-box-content", this.props.className), style: this.props.style }, this.props.children)));
64
108
  }
65
109
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MessageBox.js","sourceRoot":"","sources":["../../../../src/core-react/messagebox/MessageBox.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAmB,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAyC1C;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK,CAAC,aAA8B;IAQlD,MAAM;QACpB,OAAO,CACL,oBAAC,MAAM,IACL,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,EACvC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACzB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC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B,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,qBAAqB,GAAG,2BAA2B,CAAC,CAAE,8CAA8C;gBACrJ,MAAM;YACR,KAAK,eAAe,CAAC,KAAK;gBACxB,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,mBAAmB,GAAG,yBAAyB,CAAC;gBACtG,MAAM;YACR,KAAK,eAAe,CAAC,KAAK;gBACxB,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,GAAG,yBAAyB,CAAC;gBACrG,MAAM;SACT;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;IAEe,MAAM;QACpB,MAAM,aAAa,GAAG,UAAU,CAC9B,MAAM,EACN,uBAAuB,EACvB,gBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CACvD,CAAC;QAEF,OAAO,CACL,6BAAK,SAAS,EAAC,4BAA4B;YACzC,6BAAK,SAAS,EAAE,aAAa,GAAI;YACjC,6BAAK,SAAS,EAAE,UAAU,CAAC,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IAClG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACF,CACP,CAAC;IACJ,CAAC;CACF","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 \"./MessageBox.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { DialogButtonDef, MessageSeverity } from \"@itwin/appui-abstract\";\r\nimport { Dialog } from \"../dialog/Dialog\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[MessageBox]] component\r\n * @public\r\n */\r\nexport interface MessageBoxProps extends CommonProps {\r\n /** Severity of MessageBox */\r\n severity: MessageSeverity;\r\n /** whether to show dialog or not */\r\n opened: boolean;\r\n /** List of [[DialogButtonDef]] objects specifying buttons and associated onClick events */\r\n buttonCluster: DialogButtonDef[];\r\n /** Title to show in title bar of dialog */\r\n title?: string | JSX.Element;\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 /** minimum width that the dialog may be resized to. Default: 400 */\r\n minWidth?: number;\r\n /** minimum height that the dialog may be resized to. Default: 400 */\r\n minHeight?: number;\r\n /** initial width of dialog.\r\n * Displayed in px if value is a number, otherwise displayed in specified CSS unit.\r\n * Default: \"50%\"\r\n */\r\n width?: string | number;\r\n /** initial height of dialog.\r\n * Displayed in px if value is a number, otherwise displayed in specified CSS unit.\r\n * Default: \"\"\r\n */\r\n height?: string | number;\r\n /** Whether to show background overlay. Default: true */\r\n modal?: boolean;\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/** Message Box React component.\r\n * @public\r\n */\r\nexport class MessageBox extends React.PureComponent<MessageBoxProps> {\r\n public static defaultProps: Partial<MessageBoxProps> = {\r\n minWidth: 400,\r\n minHeight: 400,\r\n width: \"512px\",\r\n modal: true,\r\n };\r\n\r\n public override render(): JSX.Element {\r\n return (\r\n <Dialog\r\n title={this.props.title}\r\n buttonCluster={this.props.buttonCluster}\r\n opened={this.props.opened}\r\n width={this.props.width}\r\n onClose={this.props.onClose}\r\n onEscape={this.props.onEscape}\r\n modal={this.props.modal}\r\n className={this.props.className}\r\n style={this.props.style} >\r\n <MessageContainer severity={this.props.severity} className={this.props.contentClassName} style={this.props.contentStyle}>\r\n {this.props.children}\r\n </MessageContainer>\r\n </Dialog>\r\n );\r\n }\r\n}\r\n\r\n/** Properties for the [[MessageContainer]] component\r\n * @public\r\n */\r\nexport interface MessageContainerProps extends CommonProps {\r\n severity: MessageSeverity;\r\n}\r\n\r\n/** Message Container React component.\r\n * @public\r\n */\r\nexport class MessageContainer extends React.PureComponent<MessageContainerProps> {\r\n public static getIconClassName(severity: MessageSeverity, hollow?: boolean): string {\r\n let iconClassName = \"\";\r\n\r\n switch (severity) {\r\n case MessageSeverity.None:\r\n iconClassName = \" \";\r\n break;\r\n case MessageSeverity.Success:\r\n iconClassName = hollow ? \"icon-status-success-hollow\" : \"icon-status-success\" + \" core-message-box-success\";\r\n break;\r\n case MessageSeverity.Information:\r\n iconClassName = hollow ? \"icon-info-hollow\" : \"icon-info\" + \" core-message-box-information\";\r\n break;\r\n case MessageSeverity.Question:\r\n iconClassName = hollow ? \"icon-help-hollow\" : \"icon-help\" + \" core-message-box-question\";\r\n break;\r\n case MessageSeverity.Warning:\r\n iconClassName = hollow ? \"icon-status-warning\" : \"icon-status-warning\" + \" core-message-box-warning\"; // TODO - need icon-status-warning-hollow icon\r\n break;\r\n case MessageSeverity.Error:\r\n iconClassName = hollow ? \"icon-status-error-hollow\" : \"icon-status-error\" + \" core-message-box-error\";\r\n break;\r\n case MessageSeverity.Fatal:\r\n iconClassName = hollow ? \"icon-status-rejected\" : \"icon-status-rejected\" + \" core-message-box-fatal\";\r\n break;\r\n }\r\n\r\n return iconClassName;\r\n }\r\n\r\n public override render(): JSX.Element {\r\n const iconClassName = classnames(\r\n \"icon\",\r\n \"core-message-box-icon\",\r\n MessageContainer.getIconClassName(this.props.severity),\r\n );\r\n\r\n return (\r\n <div className=\"core-message-box-container\">\r\n <div className={iconClassName} />\r\n <div className={classnames(\"core-message-box-content\", this.props.className)} style={this.props.style}>\r\n {this.props.children}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"MessageBox.js","sourceRoot":"","sources":["../../../../src/core-react/messagebox/MessageBox.tsx"],"names":[],"mappings":"AAAA;;;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AC,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IAClG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACF,CACP,CAAC;IACJ,CAAC;CACF","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 \"./MessageBox.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { DialogButtonDef, MessageSeverity } from \"@itwin/appui-abstract\";\r\nimport { Dialog } from \"../dialog/Dialog\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { SvgHelpCircular, SvgHelpCircularHollow, SvgInfoCircular, SvgInfoCircularHollow, SvgStatusError, SvgStatusErrorHollow, SvgStatusRejected,\r\n SvgStatusRejectedHollow,\r\n SvgStatusSuccess, SvgStatusSuccessHollow, SvgStatusWarning } from \"@itwin/itwinui-icons-react\";\r\nimport { Icon, IconSpec } from \"../icons/IconComponent\";\r\n\r\n/** Properties for the [[MessageBox]] component\r\n * @public\r\n */\r\nexport interface MessageBoxProps extends CommonProps {\r\n /** Severity of MessageBox */\r\n severity: MessageSeverity;\r\n /** whether to show dialog or not */\r\n opened: boolean;\r\n /** List of [[DialogButtonDef]] objects specifying buttons and associated onClick events */\r\n buttonCluster: DialogButtonDef[];\r\n /** Title to show in title bar of dialog */\r\n title?: string | JSX.Element;\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 /** minimum width that the dialog may be resized to. Default: 400 */\r\n minWidth?: number;\r\n /** minimum height that the dialog may be resized to. Default: 400 */\r\n minHeight?: number;\r\n /** initial width of dialog.\r\n * Displayed in px if value is a number, otherwise displayed in specified CSS unit.\r\n * Default: \"50%\"\r\n */\r\n width?: string | number;\r\n /** initial height of dialog.\r\n * Displayed in px if value is a number, otherwise displayed in specified CSS unit.\r\n * Default: \"\"\r\n */\r\n height?: string | number;\r\n /** Whether to show background overlay. Default: true */\r\n modal?: boolean;\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 /** Message content */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/** Message Box React component.\r\n * @public\r\n */\r\nexport class MessageBox extends React.PureComponent<MessageBoxProps> {\r\n public static defaultProps: Partial<MessageBoxProps> = {\r\n minWidth: 400,\r\n minHeight: 400,\r\n width: \"512px\",\r\n modal: true,\r\n };\r\n\r\n public override render(): JSX.Element {\r\n return (\r\n <Dialog\r\n title={this.props.title}\r\n buttonCluster={this.props.buttonCluster}\r\n opened={this.props.opened}\r\n width={this.props.width}\r\n onClose={this.props.onClose}\r\n onEscape={this.props.onEscape}\r\n modal={this.props.modal}\r\n className={this.props.className}\r\n style={this.props.style} >\r\n <MessageContainer severity={this.props.severity} className={this.props.contentClassName} style={this.props.contentStyle}>\r\n {this.props.children}\r\n </MessageContainer>\r\n </Dialog>\r\n );\r\n }\r\n}\r\n\r\n/** Properties for the [[MessageContainer]] component\r\n * @public\r\n */\r\nexport interface MessageContainerProps extends CommonProps {\r\n severity: MessageSeverity;\r\n /** Message Content */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/** Message Container React component.\r\n * @public\r\n */\r\nexport class MessageContainer extends React.PureComponent<MessageContainerProps> {\r\n /** Returns the class name associated with the WebFont icon corresponding to the MessageSeverity.\r\n * @param severity MessageSeverity\r\n * @param _hollow @deprecated in 4.0. Ignored.\r\n * @deprecated in 4.0. Please use getIcon method\r\n */\r\n /* istanbul ignore next */\r\n public static getIconClassName(severity: MessageSeverity, _hollow?: boolean): string {\r\n let iconClassName = \"\";\r\n\r\n switch (severity) {\r\n case MessageSeverity.None:\r\n iconClassName = \"\";\r\n break;\r\n case MessageSeverity.Success:\r\n iconClassName = \"core-message-box-success\";\r\n break;\r\n case MessageSeverity.Information:\r\n iconClassName = \"core-message-box-information\";\r\n break;\r\n case MessageSeverity.Question:\r\n iconClassName = \"core-message-box-question\";\r\n break;\r\n case MessageSeverity.Warning:\r\n iconClassName = \"core-message-box-warning\"; // TODO - need icon-status-warning-hollow icon\r\n break;\r\n case MessageSeverity.Error:\r\n iconClassName = \"core-message-box-error\";\r\n break;\r\n case MessageSeverity.Fatal:\r\n iconClassName = \"core-message-box-fatal\";\r\n break;\r\n }\r\n\r\n return iconClassName;\r\n }\r\n\r\n /** Returns the React icon corresponding to the MessageSeverity.\r\n * @param severity MessageSeverity\r\n * @param hollow set to true to return the hollow form of the icon.\r\n * @returns IconSpec\r\n */\r\n /* ignore for unit tests and replace with visual testing */\r\n /* istanbul ignore next */\r\n public static getIcon(severity: MessageSeverity, hollow?: boolean): IconSpec {\r\n let iconSpec: IconSpec = \"\";\r\n switch (severity) {\r\n case MessageSeverity.None:\r\n iconSpec = \"\";\r\n break;\r\n case MessageSeverity.Success:\r\n iconSpec = hollow ? <SvgStatusSuccessHollow /> : <SvgStatusSuccess />;\r\n break;\r\n case MessageSeverity.Information:\r\n iconSpec = hollow ? <SvgInfoCircularHollow /> : <SvgInfoCircular />;\r\n break;\r\n case MessageSeverity.Question:\r\n iconSpec = hollow ? <SvgHelpCircularHollow /> : <SvgHelpCircular />;\r\n break;\r\n case MessageSeverity.Warning:\r\n iconSpec = <SvgStatusWarning />; // TODO - need icon-status-warning-hollow icon\r\n break;\r\n case MessageSeverity.Error:\r\n iconSpec = hollow ? <SvgStatusErrorHollow /> : <SvgStatusError />;\r\n break;\r\n case MessageSeverity.Fatal:\r\n iconSpec = hollow ? <SvgStatusRejectedHollow /> : <SvgStatusRejected />;\r\n break;\r\n }\r\n return iconSpec;\r\n }\r\n\r\n public override render(): JSX.Element {\r\n const iconClassName = classnames(\r\n \"icon\",\r\n \"core-message-box-icon\"\r\n );\r\n\r\n const iconSpec = MessageContainer.getIcon(this.props.severity);\r\n\r\n return (\r\n <div className=\"core-message-box-container\">\r\n <div className={iconClassName} ><Icon iconSpec={iconSpec} /></div>\r\n <div className={classnames(\"core-message-box-content\", this.props.className)} style={this.props.style}>\r\n {this.props.children}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
@@ -2,19 +2,19 @@
2
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
- @import "../icons/variables";
6
- @import "../style/colors";
7
- @import "../style/themecolors";
8
- @import "../style/baseline";
5
+ @import "../icons/variables";
6
+ @import "../style/colors";
7
+ @import "../style/baseline";
9
8
 
10
9
  .core-message-box-container {
11
10
  display: flex;
12
- color: $buic-foreground-body;
11
+ color: var(--iui-color-text);
13
12
 
14
13
  .core-message-box-icon {
15
14
  flex: 0 0;
16
15
  font-size: $uicore-icons-medium;
17
- padding: 0 $uicore-unbordered-padding $uicore-unbordered-padding $uicore-unbordered-padding;
16
+ padding: 0 $uicore-unbordered-padding $uicore-unbordered-padding
17
+ $uicore-unbordered-padding;
18
18
  margin-top: 10px;
19
19
  }
20
20
 
@@ -22,23 +22,33 @@
22
22
  display: flex;
23
23
  align-items: center;
24
24
  flex: 1 1;
25
+
26
+ a {
27
+ // iTwinUI anchor link style
28
+ color: var(--iui-color-text-accent);
29
+ -webkit-tap-highlight-color: hsl(
30
+ var(--iui-color-accent-hsl) / var(--iui-opacity-6)
31
+ );
32
+ border-radius: var(--iui-border-radius-1);
33
+ cursor: pointer;
34
+ text-decoration: none;
35
+ }
25
36
  }
26
37
  }
27
38
 
28
39
  .core-message-box-success {
29
- color: $buic-foreground-success;
30
- }
31
- .core-message-box-information {
32
- color: $buic-foreground-primary;
40
+ color: var(--iui-color-text-positive);
33
41
  }
42
+ .core-message-box-information,
34
43
  .core-message-box-question {
35
- color: $uicore-yellow;
44
+ color: var(--iui-color-text-informational);
36
45
  }
37
46
  .core-message-box-warning {
38
- color: $buic-foreground-warning;
47
+ color: var(--iui-color-text-warning);
39
48
  }
40
- .core-message-box-error, .core-message-box-fatal {
41
- color: $buic-foreground-alert;
49
+ .core-message-box-error,
50
+ .core-message-box-fatal {
51
+ color: var(--iui-color-text-negative);
42
52
  }
43
53
 
44
54
  .notifymessage-icon {
@@ -65,6 +65,8 @@ export interface PopupProps extends CommonProps {
65
65
  * @beta
66
66
  * */
67
67
  repositionOnResize?: boolean;
68
+ /** Content */
69
+ children?: React.ReactNode;
68
70
  }
69
71
  /** @internal */
70
72
  interface PopupState {
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../../src/core-react/popup/Popup.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAc,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAU7C;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,qDAAqD;IACrD,UAAU,EAAE,OAAO,CAAC;IACpB,iDAAiD;IACjD,SAAS,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,MAAM,EAAE,OAAO,CAAC;IAChB,6FAA6F;IAC7F,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAC;IACZ,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,+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,OA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B;IA6B/B,OAAO,CAAC,mBAAmB;IAkB3B,OAAO,CAAC,YAAY,CA2ElB;IAEF,OAAO,CAAC,uBAAuB;IAoE/B,OAAO,CAAC,SAAS,CAgCf;IAEF,OAAO,CAAC,mBAAmB,CAIzB;IAEc,MAAM;CAgDvB"}
@@ -382,6 +382,7 @@ export class Popup extends React.Component {
382
382
  return newPosition;
383
383
  }
384
384
  render() {
385
+ var _a;
385
386
  const animate = this.props.animate !== undefined ? this.props.animate : true;
386
387
  const className = classnames("core-popup", this._getClassNameByPosition(this.state.position), this.props.showShadow && "core-popup-shadow", this.props.showArrow && "arrow", !animate && "core-popup-animation-none", this.props.className, this.state.animationEnded && "core-animation-ended", (!this.props.isOpen && this.props.keepContentsMounted) && "core-popup-hidden");
387
388
  const style = {
@@ -394,7 +395,9 @@ export class Popup extends React.Component {
394
395
  return null;
395
396
  }
396
397
  return ReactDOM.createPortal((React.createElement("div", { className: className, "data-testid": "core-popup", ref: (element) => { this._popup = element; }, style: style, role: role, "aria-modal": true, tabIndex: -1, "aria-label": this.props.ariaLabel, onAnimationEnd: this._handleAnimationEnd },
397
- React.createElement(FocusTrap, { active: !!this.props.moveFocus, initialFocusElement: this.props.focusTarget, returnFocusOnDeactivate: true }, this.props.children))), this.state.parentDocument.body);
398
+ React.createElement(FocusTrap, { active: !!this.props.moveFocus, initialFocusElement: this.props.focusTarget, returnFocusOnDeactivate: true }, this.props.children))),
399
+ // istanbul ignore next
400
+ (_a = this.state.parentDocument.body.querySelector('[data-root-container="iui-root-id"]')) !== null && _a !== void 0 ? _a : this.state.parentDocument.body);
398
401
  }
399
402
  }
400
403
  Popup.defaultProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.js","sourceRoot":"","sources":["../../../../src/core-react/popup/Popup.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,cAAc,CAAC;AACtB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,M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IACjC,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC,CAAC;IACP,IAAI,EAAE,CAAC,CAAC;CACT,CAAC;AA2dJ,SAAS,aAAa,CAAC,KAAa;IAClC,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACnC,OAAO,MAAM,IAAI,CAAC,CAAC;AACrB,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,KAAK,CAAC,CAAC,CAAC,0BAA0B,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,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 Popup\r\n */\r\n\r\nimport \"./Popup.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport { RelativePosition, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { FocusTrap } from \"../focustrap/FocusTrap\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n// cSpell:ignore focustrap focusable alertdialog\r\n\r\n/** @internal */\r\ninterface PopupPoint {\r\n x: number;\r\n y: number;\r\n}\r\n\r\n/** Properties for the [[Popup]] component\r\n * @public\r\n */\r\nexport interface PopupProps extends CommonProps {\r\n /** Show or hide the box shadow (defaults to true) */\r\n showShadow: boolean;\r\n /** Show or hide the arrow (defaults to false) */\r\n showArrow: boolean;\r\n /** Indicates whether the popup is shown or not (defaults to false) */\r\n isOpen: boolean;\r\n /** Direction (relative to the target) to which the popup is expanded (defaults to Bottom) */\r\n position: RelativePosition;\r\n /** Top position (absolute positioning - defaults to 0) */\r\n top: number;\r\n /** Left position (absolute positioning - defaults to 0) */\r\n left: number;\r\n /** Function called when the popup is opened */\r\n onOpen?: () => void;\r\n /** Function called when user clicks outside the popup */\r\n onOutsideClick?: (e: MouseEvent) => void;\r\n /** Function called when the popup is closed */\r\n onClose?: () => void;\r\n /** Function called when the popup is closed on Enter */\r\n onEnter?: () => void;\r\n /** Function called when the wheel is used */\r\n onWheel?: (e: WheelEvent) => void;\r\n /** Function called when the right mouse button is pressed */\r\n onContextMenu?: (e: MouseEvent) => void;\r\n /** Offset from the parent (defaults to 4) */\r\n offset: number;\r\n /** Target element to position popup */\r\n target?: HTMLElement | null;\r\n /** Role - if not specified \"dialog\" is used */\r\n role?: \"dialog\" | \"alert\" | \"alertdialog\";\r\n /** accessibility label */\r\n ariaLabel?: string;\r\n /** set focus to popup - default to not set focus */\r\n moveFocus?: boolean;\r\n /** Element to receive focus, specified by React.RefObject or CSS selector string. If undefined and moveFocus is true then focus is moved to first focusable element. */\r\n focusTarget?: React.RefObject<HTMLElement> | string;\r\n /** Indicates whether the popup is pinned. */\r\n isPinned?: boolean;\r\n /** Indicates whether to use animation for open/close (defaults to true) */\r\n animate?: boolean;\r\n /** Indicates whether to close the popup when Enter is pressed (defaults to true) */\r\n closeOnEnter?: boolean;\r\n /** Indicates whether to close the popup when the wheel is used (defaults to true) */\r\n closeOnWheel?: boolean;\r\n /** Indicates whether to close the popup when the right mouse button is pressed (defaults to true) */\r\n closeOnContextMenu?: boolean;\r\n /** If false outside click processing and closing are skipped if click occurs in another Popup component, default to false. */\r\n closeOnNestedPopupOutsideClick?: boolean;\r\n /** If true the children are mounted once and unmounted when this component is unmounted. If false the\r\n * children are unmounted each time the popup is closed. */\r\n keepContentsMounted?: boolean;\r\n\r\n /**\r\n * If true the popup will remain open and will be repositioned when window resize events occur, default to false.\r\n * @beta\r\n * */\r\n repositionOnResize?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface PopupState {\r\n isOpen: boolean;\r\n top: number;\r\n left: number;\r\n position: RelativePosition;\r\n parentDocument: Document;\r\n animationEnded: boolean;\r\n}\r\n\r\n/** Popup React component displays a popup relative to an optional target element.\r\n * @public\r\n */\r\nexport class Popup extends React.Component<PopupProps, PopupState> {\r\n private _popup: HTMLElement | null = null;\r\n\r\n constructor(props: PopupProps) {\r\n super(props);\r\n const parentDocument = this.props.target?.ownerDocument ?? document;\r\n\r\n this.state = {\r\n animationEnded: false,\r\n isOpen: this.props.isOpen,\r\n top: 0,\r\n left: 0,\r\n position: this.props.position,\r\n parentDocument,\r\n };\r\n }\r\n\r\n public static defaultProps: Partial<PopupProps> = {\r\n position: RelativePosition.Bottom,\r\n showShadow: true,\r\n showArrow: false,\r\n isOpen: false,\r\n offset: 4,\r\n top: -1,\r\n left: -1,\r\n };\r\n\r\n public override componentDidMount() {\r\n if (this.props.isOpen) {\r\n this._onShow();\r\n }\r\n }\r\n\r\n private getParentWindow() {\r\n // istanbul ignore next\r\n return this.state.parentDocument.defaultView ?? window;\r\n }\r\n\r\n public override componentDidUpdate(previousProps: PopupProps, prevState: PopupState) {\r\n if (this.state.position !== prevState.position) {\r\n this.setState( { animationEnded: false });\r\n }\r\n\r\n if (this.props.target !== previousProps.target) {\r\n // istanbul ignore next\r\n {\r\n const parentDocument = this.props.target?.ownerDocument ?? document;\r\n if (parentDocument !== this.state.parentDocument) {\r\n this._unBindWindowEvents();\r\n this.setState({ parentDocument });\r\n }\r\n }\r\n }\r\n\r\n if (this.props.isOpen === previousProps.isOpen) {\r\n if (this.props.isOpen) {\r\n const position = this._toggleRelativePosition();\r\n const point = this._fitPopup(this._getPosition(position));\r\n if ((Math.abs(this.state.left - point.x) < 3) &&\r\n (Math.abs(this.state.top - point.y) < 3) &&\r\n this.state.position === position)\r\n return;\r\n\r\n this.setState({\r\n left: point.x,\r\n top: point.y,\r\n position,\r\n });\r\n }\r\n return;\r\n }\r\n\r\n if (this.props.isOpen) {\r\n this._onShow();\r\n } else {\r\n this._onClose();\r\n }\r\n }\r\n\r\n public override componentWillUnmount() {\r\n this._unBindWindowEvents();\r\n }\r\n\r\n private _bindWindowEvents = () => {\r\n const activeWindow = this.getParentWindow();\r\n activeWindow.addEventListener(\"pointerdown\", this._handleOutsideClick);\r\n activeWindow.addEventListener(\"resize\", this._resize);\r\n activeWindow.addEventListener(\"contextmenu\", this._handleContextMenu);\r\n activeWindow.addEventListener(\"scroll\", this._hide);\r\n activeWindow.addEventListener(\"wheel\", this._handleWheel);\r\n activeWindow.addEventListener(\"keydown\", this._handleKeyboard);\r\n };\r\n\r\n private _unBindWindowEvents = () => {\r\n const activeWindow = this.getParentWindow();\r\n activeWindow.removeEventListener(\"pointerdown\", this._handleOutsideClick);\r\n activeWindow.removeEventListener(\"resize\", this._resize);\r\n activeWindow.removeEventListener(\"contextmenu\", this._handleContextMenu);\r\n activeWindow.removeEventListener(\"scroll\", this._hide);\r\n activeWindow.removeEventListener(\"wheel\", this._handleWheel);\r\n activeWindow.removeEventListener(\"keydown\", this._handleKeyboard);\r\n };\r\n\r\n private _handleWheel = (event: WheelEvent) => {\r\n if (this._popup && this._popup.contains(event.target as Node))\r\n return;\r\n\r\n if (this.props.onWheel)\r\n return this.props.onWheel(event);\r\n\r\n const closeOnWheel = this.props.closeOnWheel !== undefined ? this.props.closeOnWheel : true;\r\n if (closeOnWheel)\r\n this._hide();\r\n };\r\n\r\n private isInCorePopup(element: HTMLElement): boolean {\r\n if (element.nodeName === \"DIV\") {\r\n if (element.classList && element.classList.contains(\"core-popup\"))\r\n return true;\r\n if (element.parentElement && this.isInCorePopup(element.parentElement))\r\n return true;\r\n } else {\r\n // istanbul ignore else\r\n if (element.parentElement && this.isInCorePopup(element.parentElement))\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n private _handleOutsideClick = (event: MouseEvent): void => {\r\n if (this._popup && this._popup.contains(event.target as Node))\r\n return;\r\n\r\n if (this.props.isPinned)\r\n return;\r\n\r\n if (!this.props.closeOnNestedPopupOutsideClick && this.isInCorePopup(event.target as HTMLElement))\r\n return;\r\n\r\n if (this.props.onOutsideClick)\r\n return this.props.onOutsideClick(event);\r\n\r\n if (this.props.target && this.props.target.contains(event.target as Node))\r\n return;\r\n\r\n this._onClose();\r\n };\r\n\r\n private _handleContextMenu = (event: MouseEvent) => {\r\n if (this._popup && this._popup.contains(event.target as Node))\r\n return;\r\n\r\n if (this.props.onContextMenu)\r\n return this.props.onContextMenu(event);\r\n\r\n const closeOnContextMenu = this.props.closeOnContextMenu !== undefined ? this.props.closeOnContextMenu : true;\r\n if (closeOnContextMenu)\r\n this._hide();\r\n };\r\n\r\n private _handleKeyboard = (event: KeyboardEvent): void => {\r\n if (this.props.isPinned)\r\n return;\r\n\r\n if (event.key === SpecialKey.Escape || event.key === SpecialKey.Enter) {\r\n const closeOnEnter = this.props.closeOnEnter !== undefined ? this.props.closeOnEnter : true;\r\n if (event.key === SpecialKey.Enter) {\r\n if (closeOnEnter)\r\n this._onClose(true);\r\n else\r\n this.props.onEnter && this.props.onEnter();\r\n } else {\r\n this._onClose(false);\r\n }\r\n }\r\n };\r\n\r\n private _resize = () => {\r\n if (this.props.repositionOnResize) {\r\n const position = this._toggleRelativePosition();\r\n const point = this._fitPopup(this._getPosition(position));\r\n this.setState({ left: point.x, top: point.y, position });\r\n } else {\r\n this._hide(); // legacy behavior\r\n }\r\n };\r\n\r\n private _hide = () => {\r\n if (this.props.isPinned)\r\n return;\r\n\r\n this._onClose();\r\n };\r\n\r\n private _onShow() {\r\n this._bindWindowEvents();\r\n const position = this._toggleRelativePosition();\r\n const point = this._fitPopup(this._getPosition(position));\r\n\r\n this.setState({ left: point.x, top: point.y, isOpen: true, position }, () => {\r\n if (this.props.onOpen)\r\n this.props.onOpen();\r\n });\r\n }\r\n\r\n private _onClose(enterKey?: boolean) {\r\n if (!this.state.isOpen)\r\n return;\r\n\r\n this._unBindWindowEvents();\r\n\r\n this.setState({ isOpen: false }, () => {\r\n if (enterKey && this.props.onEnter)\r\n this.props.onEnter();\r\n if (this.props.onClose)\r\n this.props.onClose();\r\n });\r\n }\r\n\r\n private _isPositionAbsolute(): boolean {\r\n return (this.props.top !== -1 && this.props.left !== -1);\r\n }\r\n\r\n private _getClassNameByPosition(position: RelativePosition): string {\r\n if (!this._isPositionAbsolute()) {\r\n switch (position) {\r\n case RelativePosition.TopLeft:\r\n return \"core-popup-top-left\";\r\n case RelativePosition.TopRight:\r\n return \"core-popup-top-right\";\r\n case RelativePosition.BottomLeft:\r\n return \"core-popup-bottom-left\";\r\n case RelativePosition.BottomRight:\r\n return \"core-popup-bottom-right\";\r\n case RelativePosition.Top:\r\n return \"core-popup-top\";\r\n case RelativePosition.Left:\r\n return \"core-popup-left\";\r\n case RelativePosition.Right:\r\n return \"core-popup-right\";\r\n case RelativePosition.Bottom:\r\n return \"core-popup-bottom\";\r\n case RelativePosition.LeftTop:\r\n return \"core-popup-left-top\";\r\n case RelativePosition.RightTop:\r\n return \"core-popup-right-top\";\r\n }\r\n }\r\n\r\n return \"\";\r\n }\r\n\r\n private _getPopupDimensions(): { popupWidth: number, popupHeight: number } {\r\n let popupWidth = 0;\r\n let popupHeight = 0;\r\n // istanbul ignore else\r\n if (this._popup) {\r\n const activeWindow = this.getParentWindow();\r\n const style = activeWindow.getComputedStyle(this._popup);\r\n const borderLeftWidth = parsePxString(style.borderLeftWidth);\r\n const borderRightWidth = parsePxString(style.borderRightWidth);\r\n const borderTopWidth = parsePxString(style.borderTopWidth);\r\n const borderBottomWidth = parsePxString(style.borderBottomWidth);\r\n popupWidth = this._popup.clientWidth + borderLeftWidth + borderRightWidth;\r\n popupHeight = this._popup.clientHeight + borderTopWidth + borderBottomWidth;\r\n }\r\n\r\n return { popupWidth, popupHeight };\r\n }\r\n\r\n private _getPosition = (position: RelativePosition) => {\r\n const activeWindow = this.getParentWindow();\r\n const { target, offset, top, left } = this.props;\r\n const offsetArrow = (this.props.showArrow) ? 6 : 0;\r\n\r\n // absolute position\r\n if (this._isPositionAbsolute())\r\n return { x: left, y: top };\r\n\r\n // sanity check\r\n const point = { x: 0, y: 0 };\r\n if (!this._popup || !target)\r\n return point;\r\n\r\n // relative position\r\n const scrollY = activeWindow.scrollY;\r\n const scrollX = activeWindow.scrollX;\r\n\r\n const targetRect = target.getBoundingClientRect();\r\n\r\n const { popupWidth, popupHeight } = this._getPopupDimensions();\r\n\r\n switch (position) {\r\n case RelativePosition.Top:\r\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\r\n point.x = scrollX + targetRect.left + (targetRect.width / 2) - (popupWidth / 2);\r\n break;\r\n\r\n case RelativePosition.TopLeft:\r\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\r\n point.x = scrollX + targetRect.left;\r\n break;\r\n\r\n case RelativePosition.TopRight:\r\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\r\n point.x = scrollX + targetRect.right - popupWidth;\r\n break;\r\n\r\n case RelativePosition.Bottom:\r\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\r\n point.x = scrollX + targetRect.left + (targetRect.width / 2) - (popupWidth / 2);\r\n break;\r\n\r\n case RelativePosition.BottomLeft:\r\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\r\n point.x = scrollX + targetRect.left;\r\n break;\r\n\r\n case RelativePosition.BottomRight:\r\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\r\n point.x = scrollX + targetRect.right - popupWidth;\r\n break;\r\n\r\n case RelativePosition.Left:\r\n point.y = scrollY + targetRect.top + (targetRect.height / 2) - (popupHeight / 2);\r\n point.x = scrollX + targetRect.left - popupWidth - offset - offsetArrow;\r\n break;\r\n\r\n case RelativePosition.LeftTop:\r\n point.y = scrollY + targetRect.top;\r\n point.x = scrollX + targetRect.left - popupWidth - offset - offsetArrow;\r\n break;\r\n\r\n case RelativePosition.Right:\r\n point.y = scrollY + targetRect.top + (targetRect.height / 2) - (popupHeight / 2);\r\n point.x = scrollX + targetRect.right + offset + offsetArrow;\r\n break;\r\n\r\n case RelativePosition.RightTop:\r\n point.y = scrollY + targetRect.top;\r\n point.x = scrollX + targetRect.right + offset + offsetArrow;\r\n break;\r\n }\r\n\r\n return point;\r\n };\r\n\r\n private _toggleRelativePosition(): RelativePosition {\r\n const { target, position, offset } = this.props;\r\n\r\n if (!this._popup || !target)\r\n return position;\r\n\r\n // istanbul ignore if\r\n if (this._isPositionAbsolute())\r\n return position;\r\n\r\n let newPosition = position;\r\n\r\n interface Rect {\r\n left: number;\r\n top: number;\r\n right: number;\r\n bottom: number;\r\n }\r\n\r\n const activeWindow = this.getParentWindow();\r\n\r\n // Note: Cannot use DOMRect yet since it's experimental and not available in all browsers (Nov. 2018)\r\n const viewportRect: Rect = { left: activeWindow.scrollX, top: activeWindow.scrollY, right: activeWindow.scrollX + activeWindow.innerWidth, bottom: activeWindow.scrollY + activeWindow.innerHeight };\r\n const targetRect = target.getBoundingClientRect();\r\n const { popupWidth, popupHeight } = this._getPopupDimensions();\r\n const containerStyle = activeWindow.getComputedStyle(target);\r\n const offsetArrow = this.props.showArrow ? /* istanbul ignore next */ 10 : 2;\r\n\r\n const bottomMargin = parseMargin(containerStyle.marginBottom);\r\n if ((targetRect.bottom + popupHeight + bottomMargin + offsetArrow + offset) > viewportRect.bottom) {\r\n if (newPosition === RelativePosition.Bottom)\r\n newPosition = RelativePosition.Top;\r\n else if (newPosition === RelativePosition.BottomLeft)\r\n newPosition = RelativePosition.TopLeft;\r\n else if (newPosition === RelativePosition.BottomRight)\r\n newPosition = RelativePosition.TopRight;\r\n }\r\n\r\n const topMargin = parseMargin(containerStyle.marginTop);\r\n if ((targetRect.top - popupHeight - topMargin - offsetArrow - offset) < viewportRect.top) {\r\n if (newPosition === RelativePosition.Top)\r\n newPosition = RelativePosition.Bottom;\r\n else if (newPosition === RelativePosition.TopLeft)\r\n newPosition = RelativePosition.BottomLeft;\r\n else if (newPosition === RelativePosition.TopRight)\r\n newPosition = RelativePosition.BottomRight;\r\n }\r\n\r\n const leftMargin = parseMargin(containerStyle.marginLeft);\r\n if ((targetRect.left - popupWidth - leftMargin - offsetArrow - offset) < viewportRect.left) {\r\n if (newPosition === RelativePosition.Left)\r\n newPosition = RelativePosition.Right;\r\n else if (newPosition === RelativePosition.LeftTop)\r\n newPosition = RelativePosition.RightTop;\r\n }\r\n\r\n const rightMargin = parseMargin(containerStyle.marginRight);\r\n if ((targetRect.right + popupWidth + rightMargin + offsetArrow + offset) > viewportRect.right) {\r\n if (newPosition === RelativePosition.Right)\r\n newPosition = RelativePosition.Left;\r\n else if (newPosition === RelativePosition.RightTop)\r\n newPosition = RelativePosition.LeftTop;\r\n }\r\n\r\n return newPosition;\r\n }\r\n\r\n // fit the popup within the extents of the view port\r\n private _fitPopup = (point: PopupPoint) => {\r\n const fittedPoint = point;\r\n\r\n // istanbul ignore if\r\n if (!this._popup) {\r\n return fittedPoint;\r\n }\r\n\r\n // const popupRect = this._popup.getBoundingClientRect();\r\n const { popupWidth, popupHeight } = this._getPopupDimensions();\r\n const { innerWidth, innerHeight } = window;\r\n\r\n // istanbul ignore if\r\n if (fittedPoint.y + popupHeight > innerHeight) {\r\n fittedPoint.y = innerHeight - popupHeight;\r\n }\r\n\r\n // istanbul ignore if\r\n if (fittedPoint.x + popupWidth > innerWidth) {\r\n fittedPoint.x = innerWidth - popupWidth;\r\n }\r\n\r\n // istanbul ignore if\r\n if (fittedPoint.y < 0) {\r\n fittedPoint.y = 0;\r\n }\r\n\r\n if (fittedPoint.x < 0) {\r\n fittedPoint.x = 0;\r\n }\r\n\r\n return fittedPoint;\r\n };\r\n\r\n private _handleAnimationEnd = (event: React.AnimationEvent<HTMLDivElement>) => {\r\n if (event.target === this._popup) {\r\n this.setState({ animationEnded: true });\r\n }\r\n };\r\n\r\n public override render() {\r\n const animate = this.props.animate !== undefined ? this.props.animate : true;\r\n const className = classnames(\r\n \"core-popup\",\r\n this._getClassNameByPosition(this.state.position),\r\n this.props.showShadow && \"core-popup-shadow\",\r\n this.props.showArrow && \"arrow\",\r\n !animate && \"core-popup-animation-none\",\r\n this.props.className,\r\n this.state.animationEnded && \"core-animation-ended\",\r\n (!this.props.isOpen && this.props.keepContentsMounted) && \"core-popup-hidden\"\r\n );\r\n\r\n const style: React.CSSProperties = {\r\n top: this.state.top,\r\n left: this.state.left,\r\n ...this.props.style,\r\n };\r\n\r\n const role = this.props.role ? this.props.role : \"dialog\"; // accessibility property\r\n\r\n if (!this.props.isOpen && !this.props.keepContentsMounted) {\r\n return null;\r\n }\r\n\r\n return ReactDOM.createPortal(\r\n (\r\n <div\r\n className={className} data-testid=\"core-popup\"\r\n ref={(element) => { this._popup = element; }}\r\n style={style}\r\n role={role}\r\n aria-modal={true}\r\n tabIndex={-1}\r\n aria-label={this.props.ariaLabel}\r\n onAnimationEnd={this._handleAnimationEnd}\r\n >\r\n <FocusTrap active={!!this.props.moveFocus} initialFocusElement={this.props.focusTarget} returnFocusOnDeactivate={true}>\r\n {this.props.children}\r\n </FocusTrap>\r\n </div>\r\n ), this.state.parentDocument.body);\r\n }\r\n}\r\n\r\nfunction parsePxString(pxStr: string): number {\r\n const parsed = parseInt(pxStr, 10);\r\n return parsed || 0;\r\n}\r\n\r\nfunction parseMargin(value: string) {\r\n return value ? /* istanbul ignore next */ parseFloat(value) : 0;\r\n}\r\n"]}
1
+ {"version":3,"file":"Popup.js","sourceRoot":"","sources":["../../../../src/core-react/popup/Popup.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,cAAc,CAAC;AACtB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAuFnD;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,KAAK,CAAC,SAAiC;IAGhE,YAAY,KAAiB;;QAC3B,KAAK,CAAC,KAA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CAAC,KAAa;IAClC,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACnC,OAAO,MAAM,IAAI,CAAC,CAAC;AACrB,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,KAAK,CAAC,CAAC,CAAC,0BAA0B,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,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 Popup\r\n */\r\n\r\nimport \"./Popup.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport { RelativePosition, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { FocusTrap } from \"../focustrap/FocusTrap\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n// cSpell:ignore focustrap focusable alertdialog\r\n\r\n/** @internal */\r\ninterface PopupPoint {\r\n x: number;\r\n y: number;\r\n}\r\n\r\n/** Properties for the [[Popup]] component\r\n * @public\r\n */\r\nexport interface PopupProps extends CommonProps {\r\n /** Show or hide the box shadow (defaults to true) */\r\n showShadow: boolean;\r\n /** Show or hide the arrow (defaults to false) */\r\n showArrow: boolean;\r\n /** Indicates whether the popup is shown or not (defaults to false) */\r\n isOpen: boolean;\r\n /** Direction (relative to the target) to which the popup is expanded (defaults to Bottom) */\r\n position: RelativePosition;\r\n /** Top position (absolute positioning - defaults to 0) */\r\n top: number;\r\n /** Left position (absolute positioning - defaults to 0) */\r\n left: number;\r\n /** Function called when the popup is opened */\r\n onOpen?: () => void;\r\n /** Function called when user clicks outside the popup */\r\n onOutsideClick?: (e: MouseEvent) => void;\r\n /** Function called when the popup is closed */\r\n onClose?: () => void;\r\n /** Function called when the popup is closed on Enter */\r\n onEnter?: () => void;\r\n /** Function called when the wheel is used */\r\n onWheel?: (e: WheelEvent) => void;\r\n /** Function called when the right mouse button is pressed */\r\n onContextMenu?: (e: MouseEvent) => void;\r\n /** Offset from the parent (defaults to 4) */\r\n offset: number;\r\n /** Target element to position popup */\r\n target?: HTMLElement | null;\r\n /** Role - if not specified \"dialog\" is used */\r\n role?: \"dialog\" | \"alert\" | \"alertdialog\";\r\n /** accessibility label */\r\n ariaLabel?: string;\r\n /** set focus to popup - default to not set focus */\r\n moveFocus?: boolean;\r\n /** Element to receive focus, specified by React.RefObject or CSS selector string. If undefined and moveFocus is true then focus is moved to first focusable element. */\r\n focusTarget?: React.RefObject<HTMLElement> | string;\r\n /** Indicates whether the popup is pinned. */\r\n isPinned?: boolean;\r\n /** Indicates whether to use animation for open/close (defaults to true) */\r\n animate?: boolean;\r\n /** Indicates whether to close the popup when Enter is pressed (defaults to true) */\r\n closeOnEnter?: boolean;\r\n /** Indicates whether to close the popup when the wheel is used (defaults to true) */\r\n closeOnWheel?: boolean;\r\n /** Indicates whether to close the popup when the right mouse button is pressed (defaults to true) */\r\n closeOnContextMenu?: boolean;\r\n /** If false outside click processing and closing are skipped if click occurs in another Popup component, default to false. */\r\n closeOnNestedPopupOutsideClick?: boolean;\r\n /** If true the children are mounted once and unmounted when this component is unmounted. If false the\r\n * children are unmounted each time the popup is closed. */\r\n keepContentsMounted?: boolean;\r\n\r\n /**\r\n * If true the popup will remain open and will be repositioned when window resize events occur, default to false.\r\n * @beta\r\n * */\r\n repositionOnResize?: boolean;\r\n\r\n /** Content */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/** @internal */\r\ninterface PopupState {\r\n isOpen: boolean;\r\n top: number;\r\n left: number;\r\n position: RelativePosition;\r\n parentDocument: Document;\r\n animationEnded: boolean;\r\n}\r\n\r\n/** Popup React component displays a popup relative to an optional target element.\r\n * @public\r\n */\r\nexport class Popup extends React.Component<PopupProps, PopupState> {\r\n private _popup: HTMLElement | null = null;\r\n\r\n constructor(props: PopupProps) {\r\n super(props);\r\n const parentDocument = this.props.target?.ownerDocument ?? document;\r\n\r\n this.state = {\r\n animationEnded: false,\r\n isOpen: this.props.isOpen,\r\n top: 0,\r\n left: 0,\r\n position: this.props.position,\r\n parentDocument,\r\n };\r\n }\r\n\r\n public static defaultProps: Partial<PopupProps> = {\r\n position: RelativePosition.Bottom,\r\n showShadow: true,\r\n showArrow: false,\r\n isOpen: false,\r\n offset: 4,\r\n top: -1,\r\n left: -1,\r\n };\r\n\r\n public override componentDidMount() {\r\n if (this.props.isOpen) {\r\n this._onShow();\r\n }\r\n }\r\n\r\n private getParentWindow() {\r\n // istanbul ignore next\r\n return this.state.parentDocument.defaultView ?? window;\r\n }\r\n\r\n public override componentDidUpdate(previousProps: PopupProps, prevState: PopupState) {\r\n if (this.state.position !== prevState.position) {\r\n this.setState( { animationEnded: false });\r\n }\r\n\r\n if (this.props.target !== previousProps.target) {\r\n // istanbul ignore next\r\n {\r\n const parentDocument = this.props.target?.ownerDocument ?? document;\r\n if (parentDocument !== this.state.parentDocument) {\r\n this._unBindWindowEvents();\r\n this.setState({ parentDocument });\r\n }\r\n }\r\n }\r\n\r\n if (this.props.isOpen === previousProps.isOpen) {\r\n if (this.props.isOpen) {\r\n const position = this._toggleRelativePosition();\r\n const point = this._fitPopup(this._getPosition(position));\r\n if ((Math.abs(this.state.left - point.x) < 3) &&\r\n (Math.abs(this.state.top - point.y) < 3) &&\r\n this.state.position === position)\r\n return;\r\n\r\n this.setState({\r\n left: point.x,\r\n top: point.y,\r\n position,\r\n });\r\n }\r\n return;\r\n }\r\n\r\n if (this.props.isOpen) {\r\n this._onShow();\r\n } else {\r\n this._onClose();\r\n }\r\n }\r\n\r\n public override componentWillUnmount() {\r\n this._unBindWindowEvents();\r\n }\r\n\r\n private _bindWindowEvents = () => {\r\n const activeWindow = this.getParentWindow();\r\n activeWindow.addEventListener(\"pointerdown\", this._handleOutsideClick);\r\n activeWindow.addEventListener(\"resize\", this._resize);\r\n activeWindow.addEventListener(\"contextmenu\", this._handleContextMenu);\r\n activeWindow.addEventListener(\"scroll\", this._hide);\r\n activeWindow.addEventListener(\"wheel\", this._handleWheel);\r\n activeWindow.addEventListener(\"keydown\", this._handleKeyboard);\r\n };\r\n\r\n private _unBindWindowEvents = () => {\r\n const activeWindow = this.getParentWindow();\r\n activeWindow.removeEventListener(\"pointerdown\", this._handleOutsideClick);\r\n activeWindow.removeEventListener(\"resize\", this._resize);\r\n activeWindow.removeEventListener(\"contextmenu\", this._handleContextMenu);\r\n activeWindow.removeEventListener(\"scroll\", this._hide);\r\n activeWindow.removeEventListener(\"wheel\", this._handleWheel);\r\n activeWindow.removeEventListener(\"keydown\", this._handleKeyboard);\r\n };\r\n\r\n private _handleWheel = (event: WheelEvent) => {\r\n if (this._popup && this._popup.contains(event.target as Node))\r\n return;\r\n\r\n if (this.props.onWheel)\r\n return this.props.onWheel(event);\r\n\r\n const closeOnWheel = this.props.closeOnWheel !== undefined ? this.props.closeOnWheel : true;\r\n if (closeOnWheel)\r\n this._hide();\r\n };\r\n\r\n private isInCorePopup(element: HTMLElement): boolean {\r\n if (element.nodeName === \"DIV\") {\r\n if (element.classList && element.classList.contains(\"core-popup\"))\r\n return true;\r\n if (element.parentElement && this.isInCorePopup(element.parentElement))\r\n return true;\r\n } else {\r\n // istanbul ignore else\r\n if (element.parentElement && this.isInCorePopup(element.parentElement))\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n private _handleOutsideClick = (event: MouseEvent): void => {\r\n if (this._popup && this._popup.contains(event.target as Node))\r\n return;\r\n\r\n if (this.props.isPinned)\r\n return;\r\n\r\n if (!this.props.closeOnNestedPopupOutsideClick && this.isInCorePopup(event.target as HTMLElement))\r\n return;\r\n\r\n if (this.props.onOutsideClick)\r\n return this.props.onOutsideClick(event);\r\n\r\n if (this.props.target && this.props.target.contains(event.target as Node))\r\n return;\r\n\r\n this._onClose();\r\n };\r\n\r\n private _handleContextMenu = (event: MouseEvent) => {\r\n if (this._popup && this._popup.contains(event.target as Node))\r\n return;\r\n\r\n if (this.props.onContextMenu)\r\n return this.props.onContextMenu(event);\r\n\r\n const closeOnContextMenu = this.props.closeOnContextMenu !== undefined ? this.props.closeOnContextMenu : true;\r\n if (closeOnContextMenu)\r\n this._hide();\r\n };\r\n\r\n private _handleKeyboard = (event: KeyboardEvent): void => {\r\n if (this.props.isPinned)\r\n return;\r\n\r\n if (event.key === SpecialKey.Escape || event.key === SpecialKey.Enter) {\r\n const closeOnEnter = this.props.closeOnEnter !== undefined ? this.props.closeOnEnter : true;\r\n if (event.key === SpecialKey.Enter) {\r\n if (closeOnEnter)\r\n this._onClose(true);\r\n else\r\n this.props.onEnter && this.props.onEnter();\r\n } else {\r\n this._onClose(false);\r\n }\r\n }\r\n };\r\n\r\n private _resize = () => {\r\n if (this.props.repositionOnResize) {\r\n const position = this._toggleRelativePosition();\r\n const point = this._fitPopup(this._getPosition(position));\r\n this.setState({ left: point.x, top: point.y, position });\r\n } else {\r\n this._hide(); // legacy behavior\r\n }\r\n };\r\n\r\n private _hide = () => {\r\n if (this.props.isPinned)\r\n return;\r\n\r\n this._onClose();\r\n };\r\n\r\n private _onShow() {\r\n this._bindWindowEvents();\r\n const position = this._toggleRelativePosition();\r\n const point = this._fitPopup(this._getPosition(position));\r\n\r\n this.setState({ left: point.x, top: point.y, isOpen: true, position }, () => {\r\n if (this.props.onOpen)\r\n this.props.onOpen();\r\n });\r\n }\r\n\r\n private _onClose(enterKey?: boolean) {\r\n if (!this.state.isOpen)\r\n return;\r\n\r\n this._unBindWindowEvents();\r\n\r\n this.setState({ isOpen: false }, () => {\r\n if (enterKey && this.props.onEnter)\r\n this.props.onEnter();\r\n if (this.props.onClose)\r\n this.props.onClose();\r\n });\r\n }\r\n\r\n private _isPositionAbsolute(): boolean {\r\n return (this.props.top !== -1 && this.props.left !== -1);\r\n }\r\n\r\n private _getClassNameByPosition(position: RelativePosition): string {\r\n if (!this._isPositionAbsolute()) {\r\n switch (position) {\r\n case RelativePosition.TopLeft:\r\n return \"core-popup-top-left\";\r\n case RelativePosition.TopRight:\r\n return \"core-popup-top-right\";\r\n case RelativePosition.BottomLeft:\r\n return \"core-popup-bottom-left\";\r\n case RelativePosition.BottomRight:\r\n return \"core-popup-bottom-right\";\r\n case RelativePosition.Top:\r\n return \"core-popup-top\";\r\n case RelativePosition.Left:\r\n return \"core-popup-left\";\r\n case RelativePosition.Right:\r\n return \"core-popup-right\";\r\n case RelativePosition.Bottom:\r\n return \"core-popup-bottom\";\r\n case RelativePosition.LeftTop:\r\n return \"core-popup-left-top\";\r\n case RelativePosition.RightTop:\r\n return \"core-popup-right-top\";\r\n }\r\n }\r\n\r\n return \"\";\r\n }\r\n\r\n private _getPopupDimensions(): { popupWidth: number, popupHeight: number } {\r\n let popupWidth = 0;\r\n let popupHeight = 0;\r\n // istanbul ignore else\r\n if (this._popup) {\r\n const activeWindow = this.getParentWindow();\r\n const style = activeWindow.getComputedStyle(this._popup);\r\n const borderLeftWidth = parsePxString(style.borderLeftWidth);\r\n const borderRightWidth = parsePxString(style.borderRightWidth);\r\n const borderTopWidth = parsePxString(style.borderTopWidth);\r\n const borderBottomWidth = parsePxString(style.borderBottomWidth);\r\n popupWidth = this._popup.clientWidth + borderLeftWidth + borderRightWidth;\r\n popupHeight = this._popup.clientHeight + borderTopWidth + borderBottomWidth;\r\n }\r\n\r\n return { popupWidth, popupHeight };\r\n }\r\n\r\n private _getPosition = (position: RelativePosition) => {\r\n const activeWindow = this.getParentWindow();\r\n const { target, offset, top, left } = this.props;\r\n const offsetArrow = (this.props.showArrow) ? 6 : 0;\r\n\r\n // absolute position\r\n if (this._isPositionAbsolute())\r\n return { x: left, y: top };\r\n\r\n // sanity check\r\n const point = { x: 0, y: 0 };\r\n if (!this._popup || !target)\r\n return point;\r\n\r\n // relative position\r\n const scrollY = activeWindow.scrollY;\r\n const scrollX = activeWindow.scrollX;\r\n\r\n const targetRect = target.getBoundingClientRect();\r\n\r\n const { popupWidth, popupHeight } = this._getPopupDimensions();\r\n\r\n switch (position) {\r\n case RelativePosition.Top:\r\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\r\n point.x = scrollX + targetRect.left + (targetRect.width / 2) - (popupWidth / 2);\r\n break;\r\n\r\n case RelativePosition.TopLeft:\r\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\r\n point.x = scrollX + targetRect.left;\r\n break;\r\n\r\n case RelativePosition.TopRight:\r\n point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;\r\n point.x = scrollX + targetRect.right - popupWidth;\r\n break;\r\n\r\n case RelativePosition.Bottom:\r\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\r\n point.x = scrollX + targetRect.left + (targetRect.width / 2) - (popupWidth / 2);\r\n break;\r\n\r\n case RelativePosition.BottomLeft:\r\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\r\n point.x = scrollX + targetRect.left;\r\n break;\r\n\r\n case RelativePosition.BottomRight:\r\n point.y = scrollY + targetRect.bottom + offset + offsetArrow;\r\n point.x = scrollX + targetRect.right - popupWidth;\r\n break;\r\n\r\n case RelativePosition.Left:\r\n point.y = scrollY + targetRect.top + (targetRect.height / 2) - (popupHeight / 2);\r\n point.x = scrollX + targetRect.left - popupWidth - offset - offsetArrow;\r\n break;\r\n\r\n case RelativePosition.LeftTop:\r\n point.y = scrollY + targetRect.top;\r\n point.x = scrollX + targetRect.left - popupWidth - offset - offsetArrow;\r\n break;\r\n\r\n case RelativePosition.Right:\r\n point.y = scrollY + targetRect.top + (targetRect.height / 2) - (popupHeight / 2);\r\n point.x = scrollX + targetRect.right + offset + offsetArrow;\r\n break;\r\n\r\n case RelativePosition.RightTop:\r\n point.y = scrollY + targetRect.top;\r\n point.x = scrollX + targetRect.right + offset + offsetArrow;\r\n break;\r\n }\r\n\r\n return point;\r\n };\r\n\r\n private _toggleRelativePosition(): RelativePosition {\r\n const { target, position, offset } = this.props;\r\n\r\n if (!this._popup || !target)\r\n return position;\r\n\r\n // istanbul ignore if\r\n if (this._isPositionAbsolute())\r\n return position;\r\n\r\n let newPosition = position;\r\n\r\n interface Rect {\r\n left: number;\r\n top: number;\r\n right: number;\r\n bottom: number;\r\n }\r\n\r\n const activeWindow = this.getParentWindow();\r\n\r\n // Note: Cannot use DOMRect yet since it's experimental and not available in all browsers (Nov. 2018)\r\n const viewportRect: Rect = { left: activeWindow.scrollX, top: activeWindow.scrollY, right: activeWindow.scrollX + activeWindow.innerWidth, bottom: activeWindow.scrollY + activeWindow.innerHeight };\r\n const targetRect = target.getBoundingClientRect();\r\n const { popupWidth, popupHeight } = this._getPopupDimensions();\r\n const containerStyle = activeWindow.getComputedStyle(target);\r\n const offsetArrow = this.props.showArrow ? /* istanbul ignore next */ 10 : 2;\r\n\r\n const bottomMargin = parseMargin(containerStyle.marginBottom);\r\n if ((targetRect.bottom + popupHeight + bottomMargin + offsetArrow + offset) > viewportRect.bottom) {\r\n if (newPosition === RelativePosition.Bottom)\r\n newPosition = RelativePosition.Top;\r\n else if (newPosition === RelativePosition.BottomLeft)\r\n newPosition = RelativePosition.TopLeft;\r\n else if (newPosition === RelativePosition.BottomRight)\r\n newPosition = RelativePosition.TopRight;\r\n }\r\n\r\n const topMargin = parseMargin(containerStyle.marginTop);\r\n if ((targetRect.top - popupHeight - topMargin - offsetArrow - offset) < viewportRect.top) {\r\n if (newPosition === RelativePosition.Top)\r\n newPosition = RelativePosition.Bottom;\r\n else if (newPosition === RelativePosition.TopLeft)\r\n newPosition = RelativePosition.BottomLeft;\r\n else if (newPosition === RelativePosition.TopRight)\r\n newPosition = RelativePosition.BottomRight;\r\n }\r\n\r\n const leftMargin = parseMargin(containerStyle.marginLeft);\r\n if ((targetRect.left - popupWidth - leftMargin - offsetArrow - offset) < viewportRect.left) {\r\n if (newPosition === RelativePosition.Left)\r\n newPosition = RelativePosition.Right;\r\n else if (newPosition === RelativePosition.LeftTop)\r\n newPosition = RelativePosition.RightTop;\r\n }\r\n\r\n const rightMargin = parseMargin(containerStyle.marginRight);\r\n if ((targetRect.right + popupWidth + rightMargin + offsetArrow + offset) > viewportRect.right) {\r\n if (newPosition === RelativePosition.Right)\r\n newPosition = RelativePosition.Left;\r\n else if (newPosition === RelativePosition.RightTop)\r\n newPosition = RelativePosition.LeftTop;\r\n }\r\n\r\n return newPosition;\r\n }\r\n\r\n // fit the popup within the extents of the view port\r\n private _fitPopup = (point: PopupPoint) => {\r\n const fittedPoint = point;\r\n\r\n // istanbul ignore if\r\n if (!this._popup) {\r\n return fittedPoint;\r\n }\r\n\r\n // const popupRect = this._popup.getBoundingClientRect();\r\n const { popupWidth, popupHeight } = this._getPopupDimensions();\r\n const { innerWidth, innerHeight } = window;\r\n\r\n // istanbul ignore if\r\n if (fittedPoint.y + popupHeight > innerHeight) {\r\n fittedPoint.y = innerHeight - popupHeight;\r\n }\r\n\r\n // istanbul ignore if\r\n if (fittedPoint.x + popupWidth > innerWidth) {\r\n fittedPoint.x = innerWidth - popupWidth;\r\n }\r\n\r\n // istanbul ignore if\r\n if (fittedPoint.y < 0) {\r\n fittedPoint.y = 0;\r\n }\r\n\r\n if (fittedPoint.x < 0) {\r\n fittedPoint.x = 0;\r\n }\r\n\r\n return fittedPoint;\r\n };\r\n\r\n private _handleAnimationEnd = (event: React.AnimationEvent<HTMLDivElement>) => {\r\n if (event.target === this._popup) {\r\n this.setState({ animationEnded: true });\r\n }\r\n };\r\n\r\n public override render() {\r\n const animate = this.props.animate !== undefined ? this.props.animate : true;\r\n const className = classnames(\r\n \"core-popup\",\r\n this._getClassNameByPosition(this.state.position),\r\n this.props.showShadow && \"core-popup-shadow\",\r\n this.props.showArrow && \"arrow\",\r\n !animate && \"core-popup-animation-none\",\r\n this.props.className,\r\n this.state.animationEnded && \"core-animation-ended\",\r\n (!this.props.isOpen && this.props.keepContentsMounted) && \"core-popup-hidden\"\r\n );\r\n\r\n const style: React.CSSProperties = {\r\n top: this.state.top,\r\n left: this.state.left,\r\n ...this.props.style,\r\n };\r\n\r\n const role = this.props.role ? this.props.role : \"dialog\"; // accessibility property\r\n\r\n if (!this.props.isOpen && !this.props.keepContentsMounted) {\r\n return null;\r\n }\r\n\r\n return ReactDOM.createPortal(\r\n (\r\n <div\r\n className={className} data-testid=\"core-popup\"\r\n ref={(element) => { this._popup = element; }}\r\n style={style}\r\n role={role}\r\n aria-modal={true}\r\n tabIndex={-1}\r\n aria-label={this.props.ariaLabel}\r\n onAnimationEnd={this._handleAnimationEnd}\r\n >\r\n <FocusTrap active={!!this.props.moveFocus} initialFocusElement={this.props.focusTarget} returnFocusOnDeactivate={true}>\r\n {this.props.children}\r\n </FocusTrap>\r\n </div>\r\n ),\r\n // istanbul ignore next\r\n this.state.parentDocument.body.querySelector(\r\n '[data-root-container=\"iui-root-id\"]'\r\n ) ?? this.state.parentDocument.body\r\n );\r\n }\r\n}\r\n\r\nfunction parsePxString(pxStr: string): number {\r\n const parsed = parseInt(pxStr, 10);\r\n return parsed || 0;\r\n}\r\n\r\nfunction parseMargin(value: string) {\r\n return value ? /* istanbul ignore next */ parseFloat(value) : 0;\r\n}\r\n"]}