@itwin/core-react 4.0.0-dev.7 → 4.0.0-dev.9

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 (590) 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.scss +2 -3
  7. package/lib/cjs/core-react/badge/BetaBadge.d.ts +0 -1
  8. package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
  9. package/lib/cjs/core-react/badge/BetaBadge.js +0 -1
  10. package/lib/cjs/core-react/badge/BetaBadge.js.map +1 -1
  11. package/lib/cjs/core-react/button/button.scss +31 -42
  12. package/lib/cjs/core-react/button/variables.scss +10 -7
  13. package/lib/cjs/core-react/checkbox/checkbox.scss +11 -16
  14. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +4 -1
  15. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  16. package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
  17. package/lib/cjs/core-react/classes.scss +0 -4
  18. package/lib/cjs/core-react/colorthemes.scss +42 -10
  19. package/lib/cjs/core-react/colorvariables.scss +53 -15
  20. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +2 -0
  21. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  22. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  23. package/lib/cjs/core-react/contextmenu/ContextMenu.scss +7 -8
  24. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +1 -1
  25. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  26. package/lib/cjs/core-react/dialog/Dialog.scss +4 -5
  27. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +2 -0
  28. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  29. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  30. package/lib/cjs/core-react/expandable/list.scss +7 -17
  31. package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
  32. package/lib/cjs/core-react/icons/IconComponent.d.ts +1 -1
  33. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  34. package/lib/cjs/core-react/icons/IconComponent.js +1 -7
  35. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  36. package/lib/cjs/core-react/icons/SvgPath.d.ts +1 -1
  37. package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
  38. package/lib/cjs/core-react/icons/SvgPath.js +2 -2
  39. package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
  40. package/lib/{esm/core-react/icons/SvgSprite.scss → cjs/core-react/icons/SvgPath.scss} +1 -1
  41. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.scss +4 -5
  42. package/lib/cjs/core-react/index.scss +0 -4
  43. package/lib/cjs/core-react/inputs/Input.d.ts +2 -4
  44. package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
  45. package/lib/cjs/core-react/inputs/Input.js +1 -2
  46. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  47. package/lib/cjs/core-react/inputs/InputLabel.d.ts +2 -0
  48. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  49. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  50. package/lib/cjs/core-react/inputs/classes.scss +0 -2
  51. package/lib/cjs/core-react/inputs/index.scss +1 -3
  52. package/lib/cjs/core-react/inputs/input-label.scss +90 -0
  53. package/lib/cjs/core-react/inputs/input.scss +36 -38
  54. package/lib/cjs/core-react/inputs/variables.scss +20 -15
  55. package/lib/cjs/core-react/listbox/Listbox.scss +3 -3
  56. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +1 -2
  57. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  58. package/lib/cjs/core-react/loading/LoadingSpinner.js +1 -16
  59. package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
  60. package/lib/cjs/core-react/loading/LoadingSpinner.scss +4 -5
  61. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +4 -0
  62. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  63. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  64. package/lib/cjs/core-react/popup/Popup.d.ts +2 -0
  65. package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
  66. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  67. package/lib/cjs/core-react/popup/Popup.scss +123 -123
  68. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +4 -0
  69. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  70. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  71. package/lib/cjs/core-react/radialmenu/RadialMenu.scss +1 -2
  72. package/lib/cjs/core-react/searchbox/SearchBox.scss +2 -4
  73. package/lib/cjs/core-react/settings/SettingsContainer.js +1 -1
  74. package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
  75. package/lib/cjs/core-react/settings/SettingsContainer.scss +8 -7
  76. package/lib/cjs/core-react/style/baseline.scss +6 -8
  77. package/lib/cjs/core-react/style/data-viz.scss +11 -14
  78. package/lib/cjs/core-react/style/itwinui-overrides.scss +0 -1
  79. package/lib/cjs/core-react/style/mixins.scss +0 -1
  80. package/lib/cjs/core-react/style/opacity.scss +9 -10
  81. package/lib/cjs/core-react/style/space.scss +9 -13
  82. package/lib/cjs/core-react/style/speed.scss +3 -4
  83. package/lib/cjs/core-react/style/typography.scss +26 -25
  84. package/lib/cjs/core-react/style/variables.scss +4 -5
  85. package/lib/cjs/core-react/tabs/Tabs.d.ts +1 -1
  86. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  87. package/lib/cjs/core-react/tabs/classes.scss +0 -1
  88. package/lib/cjs/core-react/tabs/index.scss +0 -1
  89. package/lib/cjs/core-react/tabs/tabs.scss +38 -49
  90. package/lib/cjs/core-react/tabs/vertical.scss +17 -23
  91. package/lib/cjs/core-react/text/classes.scss +0 -8
  92. package/lib/cjs/core-react/text/index.scss +0 -8
  93. package/lib/cjs/core-react/text/mixins.scss +8 -46
  94. package/lib/cjs/core-react/tree/Node.scss +5 -5
  95. package/lib/cjs/core-react.d.ts +1 -41
  96. package/lib/cjs/core-react.d.ts.map +1 -1
  97. package/lib/cjs/core-react.js +1 -41
  98. package/lib/cjs/core-react.js.map +1 -1
  99. package/lib/esm/core-react/UiCore.d.ts +1 -1
  100. package/lib/esm/core-react/UiCore.js +1 -1
  101. package/lib/esm/core-react/UiCore.js.map +1 -1
  102. package/lib/esm/core-react/_typography.scss +7 -8
  103. package/lib/esm/core-react/autosuggest/AutoSuggest.scss +2 -3
  104. package/lib/esm/core-react/badge/BetaBadge.d.ts +0 -1
  105. package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
  106. package/lib/esm/core-react/badge/BetaBadge.js +0 -1
  107. package/lib/esm/core-react/badge/BetaBadge.js.map +1 -1
  108. package/lib/esm/core-react/button/button.scss +31 -42
  109. package/lib/esm/core-react/button/variables.scss +10 -7
  110. package/lib/esm/core-react/checkbox/checkbox.scss +11 -16
  111. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +4 -1
  112. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  113. package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
  114. package/lib/esm/core-react/classes.scss +0 -4
  115. package/lib/esm/core-react/colorthemes.scss +42 -10
  116. package/lib/esm/core-react/colorvariables.scss +53 -15
  117. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +2 -0
  118. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  119. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  120. package/lib/esm/core-react/contextmenu/ContextMenu.scss +7 -8
  121. package/lib/esm/core-react/contextmenu/ContextSubMenu.js +2 -2
  122. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  123. package/lib/esm/core-react/dialog/Dialog.scss +4 -5
  124. package/lib/esm/core-react/expandable/ExpandableList.d.ts +2 -0
  125. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  126. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  127. package/lib/esm/core-react/expandable/list.scss +7 -17
  128. package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
  129. package/lib/esm/core-react/icons/IconComponent.d.ts +1 -1
  130. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  131. package/lib/esm/core-react/icons/IconComponent.js +1 -7
  132. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  133. package/lib/esm/core-react/icons/SvgPath.d.ts +1 -1
  134. package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
  135. package/lib/esm/core-react/icons/SvgPath.js +2 -2
  136. package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
  137. package/lib/{cjs/core-react/icons/SvgSprite.scss → esm/core-react/icons/SvgPath.scss} +1 -1
  138. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.scss +4 -5
  139. package/lib/esm/core-react/index.scss +0 -4
  140. package/lib/esm/core-react/inputs/Input.d.ts +2 -4
  141. package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
  142. package/lib/esm/core-react/inputs/Input.js +1 -2
  143. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  144. package/lib/esm/core-react/inputs/InputLabel.d.ts +2 -0
  145. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  146. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  147. package/lib/esm/core-react/inputs/classes.scss +0 -2
  148. package/lib/esm/core-react/inputs/index.scss +1 -3
  149. package/lib/esm/core-react/inputs/input-label.scss +90 -0
  150. package/lib/esm/core-react/inputs/input.scss +36 -38
  151. package/lib/esm/core-react/inputs/variables.scss +20 -15
  152. package/lib/esm/core-react/listbox/Listbox.scss +3 -3
  153. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +1 -2
  154. package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  155. package/lib/esm/core-react/loading/LoadingSpinner.js +1 -16
  156. package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
  157. package/lib/esm/core-react/loading/LoadingSpinner.scss +4 -5
  158. package/lib/esm/core-react/messagebox/MessageBox.d.ts +4 -0
  159. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  160. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  161. package/lib/esm/core-react/popup/Popup.d.ts +2 -0
  162. package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
  163. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  164. package/lib/esm/core-react/popup/Popup.scss +123 -123
  165. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +4 -0
  166. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  167. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  168. package/lib/esm/core-react/radialmenu/RadialMenu.scss +1 -2
  169. package/lib/esm/core-react/searchbox/SearchBox.scss +2 -4
  170. package/lib/esm/core-react/settings/SettingsContainer.js +1 -1
  171. package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
  172. package/lib/esm/core-react/settings/SettingsContainer.scss +8 -7
  173. package/lib/esm/core-react/style/baseline.scss +6 -8
  174. package/lib/esm/core-react/style/data-viz.scss +11 -14
  175. package/lib/esm/core-react/style/itwinui-overrides.scss +0 -1
  176. package/lib/esm/core-react/style/mixins.scss +0 -1
  177. package/lib/esm/core-react/style/opacity.scss +9 -10
  178. package/lib/esm/core-react/style/space.scss +9 -13
  179. package/lib/esm/core-react/style/speed.scss +3 -4
  180. package/lib/esm/core-react/style/typography.scss +26 -25
  181. package/lib/esm/core-react/style/variables.scss +4 -5
  182. package/lib/esm/core-react/tabs/Tabs.d.ts +1 -1
  183. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  184. package/lib/esm/core-react/tabs/classes.scss +0 -1
  185. package/lib/esm/core-react/tabs/index.scss +0 -1
  186. package/lib/esm/core-react/tabs/tabs.scss +38 -49
  187. package/lib/esm/core-react/tabs/vertical.scss +17 -23
  188. package/lib/esm/core-react/text/classes.scss +0 -8
  189. package/lib/esm/core-react/text/index.scss +0 -8
  190. package/lib/esm/core-react/text/mixins.scss +8 -46
  191. package/lib/esm/core-react/tree/Node.scss +5 -5
  192. package/lib/esm/core-react.d.ts +1 -41
  193. package/lib/esm/core-react.d.ts.map +1 -1
  194. package/lib/esm/core-react.js +1 -41
  195. package/lib/esm/core-react.js.map +1 -1
  196. package/package.json +23 -21
  197. package/lib/cjs/core-react/badge/BetaBadge.scss +0 -9
  198. package/lib/cjs/core-react/button/Button.d.ts +0 -48
  199. package/lib/cjs/core-react/button/Button.d.ts.map +0 -1
  200. package/lib/cjs/core-react/button/Button.js +0 -86
  201. package/lib/cjs/core-react/button/Button.js.map +0 -1
  202. package/lib/cjs/core-react/checkbox/Checkbox.d.ts +0 -57
  203. package/lib/cjs/core-react/checkbox/Checkbox.d.ts.map +0 -1
  204. package/lib/cjs/core-react/checkbox/Checkbox.js +0 -65
  205. package/lib/cjs/core-react/checkbox/Checkbox.js.map +0 -1
  206. package/lib/cjs/core-react/dialog/DialogButtonDef.d.ts +0 -47
  207. package/lib/cjs/core-react/dialog/DialogButtonDef.d.ts.map +0 -1
  208. package/lib/cjs/core-react/dialog/DialogButtonDef.js +0 -38
  209. package/lib/cjs/core-react/dialog/DialogButtonDef.js.map +0 -1
  210. package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts +0 -34
  211. package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts.map +0 -1
  212. package/lib/cjs/core-react/expandable/ExpandableBlock.js +0 -36
  213. package/lib/cjs/core-react/expandable/ExpandableBlock.js.map +0 -1
  214. package/lib/cjs/core-react/expandable/ExpandableBlock.scss +0 -145
  215. package/lib/cjs/core-react/form/Field.d.ts +0 -20
  216. package/lib/cjs/core-react/form/Field.d.ts.map +0 -1
  217. package/lib/cjs/core-react/form/Field.js +0 -45
  218. package/lib/cjs/core-react/form/Field.js.map +0 -1
  219. package/lib/cjs/core-react/form/Form.d.ts +0 -132
  220. package/lib/cjs/core-react/form/Form.d.ts.map +0 -1
  221. package/lib/cjs/core-react/form/Form.js +0 -132
  222. package/lib/cjs/core-react/form/Form.js.map +0 -1
  223. package/lib/cjs/core-react/form/Form.scss +0 -78
  224. package/lib/cjs/core-react/icons/SvgSprite.d.ts +0 -21
  225. package/lib/cjs/core-react/icons/SvgSprite.d.ts.map +0 -1
  226. package/lib/cjs/core-react/icons/SvgSprite.js +0 -27
  227. package/lib/cjs/core-react/icons/SvgSprite.js.map +0 -1
  228. package/lib/cjs/core-react/inputs/LabeledInput.d.ts +0 -18
  229. package/lib/cjs/core-react/inputs/LabeledInput.d.ts.map +0 -1
  230. package/lib/cjs/core-react/inputs/LabeledInput.js +0 -34
  231. package/lib/cjs/core-react/inputs/LabeledInput.js.map +0 -1
  232. package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts +0 -18
  233. package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts.map +0 -1
  234. package/lib/cjs/core-react/inputs/LabeledTextarea.js +0 -32
  235. package/lib/cjs/core-react/inputs/LabeledTextarea.js.map +0 -1
  236. package/lib/cjs/core-react/inputs/Textarea.d.ts +0 -23
  237. package/lib/cjs/core-react/inputs/Textarea.d.ts.map +0 -1
  238. package/lib/cjs/core-react/inputs/Textarea.js +0 -36
  239. package/lib/cjs/core-react/inputs/Textarea.js.map +0 -1
  240. package/lib/cjs/core-react/inputs/labeled-input.scss +0 -103
  241. package/lib/cjs/core-react/inputs/labeled-textarea.scss +0 -77
  242. package/lib/cjs/core-react/inputs/textarea.scss +0 -55
  243. package/lib/cjs/core-react/loading/Spinner.d.ts +0 -38
  244. package/lib/cjs/core-react/loading/Spinner.d.ts.map +0 -1
  245. package/lib/cjs/core-react/loading/Spinner.js +0 -61
  246. package/lib/cjs/core-react/loading/Spinner.js.map +0 -1
  247. package/lib/cjs/core-react/loading/Spinner.scss +0 -26
  248. package/lib/cjs/core-react/messagebox/MessageSeverity.d.ts +0 -16
  249. package/lib/cjs/core-react/messagebox/MessageSeverity.d.ts.map +0 -1
  250. package/lib/cjs/core-react/messagebox/MessageSeverity.js +0 -24
  251. package/lib/cjs/core-react/messagebox/MessageSeverity.js.map +0 -1
  252. package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts +0 -29
  253. package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts.map +0 -1
  254. package/lib/cjs/core-react/progress-indicators/ProgressBar.js +0 -48
  255. package/lib/cjs/core-react/progress-indicators/ProgressBar.js.map +0 -1
  256. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts +0 -49
  257. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts.map +0 -1
  258. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.js +0 -74
  259. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.js.map +0 -1
  260. package/lib/cjs/core-react/progress-indicators/classes.scss +0 -33
  261. package/lib/cjs/core-react/progress-indicators/index.scss +0 -6
  262. package/lib/cjs/core-react/progress-indicators/progress-bar.scss +0 -91
  263. package/lib/cjs/core-react/progress-indicators/progress-spinner.scss +0 -132
  264. package/lib/cjs/core-react/radio/Radio.d.ts +0 -20
  265. package/lib/cjs/core-react/radio/Radio.d.ts.map +0 -1
  266. package/lib/cjs/core-react/radio/Radio.js +0 -28
  267. package/lib/cjs/core-react/radio/Radio.js.map +0 -1
  268. package/lib/cjs/core-react/radio/classes.scss +0 -7
  269. package/lib/cjs/core-react/radio/index.scss +0 -8
  270. package/lib/cjs/core-react/radio/radio.scss +0 -89
  271. package/lib/cjs/core-react/select/LabeledSelect.d.ts +0 -20
  272. package/lib/cjs/core-react/select/LabeledSelect.d.ts.map +0 -1
  273. package/lib/cjs/core-react/select/LabeledSelect.js +0 -34
  274. package/lib/cjs/core-react/select/LabeledSelect.js.map +0 -1
  275. package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts +0 -16
  276. package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts.map +0 -1
  277. package/lib/cjs/core-react/select/LabeledThemedSelect.js +0 -31
  278. package/lib/cjs/core-react/select/LabeledThemedSelect.js.map +0 -1
  279. package/lib/cjs/core-react/select/Select.d.ts +0 -53
  280. package/lib/cjs/core-react/select/Select.d.ts.map +0 -1
  281. package/lib/cjs/core-react/select/Select.js +0 -60
  282. package/lib/cjs/core-react/select/Select.js.map +0 -1
  283. package/lib/cjs/core-react/select/ThemedSelect.d.ts +0 -104
  284. package/lib/cjs/core-react/select/ThemedSelect.d.ts.map +0 -1
  285. package/lib/cjs/core-react/select/ThemedSelect.js +0 -57
  286. package/lib/cjs/core-react/select/ThemedSelect.js.map +0 -1
  287. package/lib/cjs/core-react/select/classes.scss +0 -9
  288. package/lib/cjs/core-react/select/index.scss +0 -10
  289. package/lib/cjs/core-react/select/labeled-select.scss +0 -72
  290. package/lib/cjs/core-react/select/labeled-themed-select.scss +0 -77
  291. package/lib/cjs/core-react/select/modalHelper.d.ts +0 -5
  292. package/lib/cjs/core-react/select/modalHelper.d.ts.map +0 -1
  293. package/lib/cjs/core-react/select/modalHelper.js +0 -21
  294. package/lib/cjs/core-react/select/modalHelper.js.map +0 -1
  295. package/lib/cjs/core-react/select/select.scss +0 -74
  296. package/lib/cjs/core-react/select/themed-select.scss +0 -159
  297. package/lib/cjs/core-react/slider/Slider.d.ts +0 -80
  298. package/lib/cjs/core-react/slider/Slider.d.ts.map +0 -1
  299. package/lib/cjs/core-react/slider/Slider.js +0 -91
  300. package/lib/cjs/core-react/slider/Slider.js.map +0 -1
  301. package/lib/cjs/core-react/slider/Slider.scss +0 -96
  302. package/lib/cjs/core-react/splitbutton/SplitButton.d.ts +0 -62
  303. package/lib/cjs/core-react/splitbutton/SplitButton.d.ts.map +0 -1
  304. package/lib/cjs/core-react/splitbutton/SplitButton.js +0 -104
  305. package/lib/cjs/core-react/splitbutton/SplitButton.js.map +0 -1
  306. package/lib/cjs/core-react/splitbutton/SplitButton.scss +0 -137
  307. package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts +0 -11
  308. package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts.map +0 -1
  309. package/lib/cjs/core-react/tabs/HorizontalTabs.js +0 -22
  310. package/lib/cjs/core-react/tabs/HorizontalTabs.js.map +0 -1
  311. package/lib/cjs/core-react/tabs/horizontal.scss +0 -77
  312. package/lib/cjs/core-react/text/Headline.d.ts +0 -11
  313. package/lib/cjs/core-react/text/Headline.d.ts.map +0 -1
  314. package/lib/cjs/core-react/text/Headline.js +0 -21
  315. package/lib/cjs/core-react/text/Headline.js.map +0 -1
  316. package/lib/cjs/core-react/text/LeadingText.d.ts +0 -11
  317. package/lib/cjs/core-react/text/LeadingText.d.ts.map +0 -1
  318. package/lib/cjs/core-react/text/LeadingText.js +0 -21
  319. package/lib/cjs/core-react/text/LeadingText.js.map +0 -1
  320. package/lib/cjs/core-react/text/LeadingText2.d.ts +0 -11
  321. package/lib/cjs/core-react/text/LeadingText2.d.ts.map +0 -1
  322. package/lib/cjs/core-react/text/LeadingText2.js +0 -21
  323. package/lib/cjs/core-react/text/LeadingText2.js.map +0 -1
  324. package/lib/cjs/core-react/text/SmallText.d.ts +0 -11
  325. package/lib/cjs/core-react/text/SmallText.d.ts.map +0 -1
  326. package/lib/cjs/core-react/text/SmallText.js +0 -21
  327. package/lib/cjs/core-react/text/SmallText.js.map +0 -1
  328. package/lib/cjs/core-react/text/Subheading.d.ts +0 -11
  329. package/lib/cjs/core-react/text/Subheading.d.ts.map +0 -1
  330. package/lib/cjs/core-react/text/Subheading.js +0 -21
  331. package/lib/cjs/core-react/text/Subheading.js.map +0 -1
  332. package/lib/cjs/core-react/text/Subheading2.d.ts +0 -11
  333. package/lib/cjs/core-react/text/Subheading2.d.ts.map +0 -1
  334. package/lib/cjs/core-react/text/Subheading2.js +0 -21
  335. package/lib/cjs/core-react/text/Subheading2.js.map +0 -1
  336. package/lib/cjs/core-react/text/Title.d.ts +0 -11
  337. package/lib/cjs/core-react/text/Title.d.ts.map +0 -1
  338. package/lib/cjs/core-react/text/Title.js +0 -21
  339. package/lib/cjs/core-react/text/Title.js.map +0 -1
  340. package/lib/cjs/core-react/text/Title2.d.ts +0 -11
  341. package/lib/cjs/core-react/text/Title2.d.ts.map +0 -1
  342. package/lib/cjs/core-react/text/Title2.js +0 -21
  343. package/lib/cjs/core-react/text/Title2.js.map +0 -1
  344. package/lib/cjs/core-react/text/headline.scss +0 -10
  345. package/lib/cjs/core-react/text/leading-2.scss +0 -11
  346. package/lib/cjs/core-react/text/leading.scss +0 -10
  347. package/lib/cjs/core-react/text/small.scss +0 -10
  348. package/lib/cjs/core-react/text/subheading-2.scss +0 -11
  349. package/lib/cjs/core-react/text/subheading.scss +0 -11
  350. package/lib/cjs/core-react/text/title-2.scss +0 -11
  351. package/lib/cjs/core-react/text/title.scss +0 -10
  352. package/lib/cjs/core-react/tiles/FeaturedTile.d.ts +0 -11
  353. package/lib/cjs/core-react/tiles/FeaturedTile.d.ts.map +0 -1
  354. package/lib/cjs/core-react/tiles/FeaturedTile.js +0 -21
  355. package/lib/cjs/core-react/tiles/FeaturedTile.js.map +0 -1
  356. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts +0 -11
  357. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts.map +0 -1
  358. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.js +0 -21
  359. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.js.map +0 -1
  360. package/lib/cjs/core-react/tiles/MinimalTile.d.ts +0 -11
  361. package/lib/cjs/core-react/tiles/MinimalTile.d.ts.map +0 -1
  362. package/lib/cjs/core-react/tiles/MinimalTile.js +0 -21
  363. package/lib/cjs/core-react/tiles/MinimalTile.js.map +0 -1
  364. package/lib/cjs/core-react/tiles/Tile.d.ts +0 -32
  365. package/lib/cjs/core-react/tiles/Tile.d.ts.map +0 -1
  366. package/lib/cjs/core-react/tiles/Tile.js +0 -40
  367. package/lib/cjs/core-react/tiles/Tile.js.map +0 -1
  368. package/lib/cjs/core-react/tiles/classes.scss +0 -7
  369. package/lib/cjs/core-react/tiles/index.scss +0 -5
  370. package/lib/cjs/core-react/tiles/tile.scss +0 -134
  371. package/lib/cjs/core-react/toggle/LabeledToggle.d.ts +0 -26
  372. package/lib/cjs/core-react/toggle/LabeledToggle.d.ts.map +0 -1
  373. package/lib/cjs/core-react/toggle/LabeledToggle.js +0 -29
  374. package/lib/cjs/core-react/toggle/LabeledToggle.js.map +0 -1
  375. package/lib/cjs/core-react/toggle/LabeledToggle.scss +0 -21
  376. package/lib/cjs/core-react/toggle/Toggle.d.ts +0 -52
  377. package/lib/cjs/core-react/toggle/Toggle.d.ts.map +0 -1
  378. package/lib/cjs/core-react/toggle/Toggle.js +0 -105
  379. package/lib/cjs/core-react/toggle/Toggle.js.map +0 -1
  380. package/lib/cjs/core-react/toggle/Toggle.scss +0 -135
  381. package/lib/cjs/core-react/tooltip/Tooltip.d.ts +0 -34
  382. package/lib/cjs/core-react/tooltip/Tooltip.d.ts.map +0 -1
  383. package/lib/cjs/core-react/tooltip/Tooltip.js +0 -57
  384. package/lib/cjs/core-react/tooltip/Tooltip.js.map +0 -1
  385. package/lib/cjs/core-react/tooltip/Tooltip.scss +0 -18
  386. package/lib/cjs/core-react/utils/PointProps.d.ts +0 -12
  387. package/lib/cjs/core-react/utils/PointProps.d.ts.map +0 -1
  388. package/lib/cjs/core-react/utils/PointProps.js +0 -10
  389. package/lib/cjs/core-react/utils/PointProps.js.map +0 -1
  390. package/lib/cjs/core-react/utils/UiEvent.d.ts +0 -10
  391. package/lib/cjs/core-react/utils/UiEvent.d.ts.map +0 -1
  392. package/lib/cjs/core-react/utils/UiEvent.js +0 -18
  393. package/lib/cjs/core-react/utils/UiEvent.js.map +0 -1
  394. package/lib/esm/core-react/badge/BetaBadge.scss +0 -9
  395. package/lib/esm/core-react/button/Button.d.ts +0 -48
  396. package/lib/esm/core-react/button/Button.d.ts.map +0 -1
  397. package/lib/esm/core-react/button/Button.js +0 -81
  398. package/lib/esm/core-react/button/Button.js.map +0 -1
  399. package/lib/esm/core-react/checkbox/Checkbox.d.ts +0 -57
  400. package/lib/esm/core-react/checkbox/Checkbox.d.ts.map +0 -1
  401. package/lib/esm/core-react/checkbox/Checkbox.js +0 -61
  402. package/lib/esm/core-react/checkbox/Checkbox.js.map +0 -1
  403. package/lib/esm/core-react/dialog/DialogButtonDef.d.ts +0 -47
  404. package/lib/esm/core-react/dialog/DialogButtonDef.d.ts.map +0 -1
  405. package/lib/esm/core-react/dialog/DialogButtonDef.js +0 -35
  406. package/lib/esm/core-react/dialog/DialogButtonDef.js.map +0 -1
  407. package/lib/esm/core-react/expandable/ExpandableBlock.d.ts +0 -34
  408. package/lib/esm/core-react/expandable/ExpandableBlock.d.ts.map +0 -1
  409. package/lib/esm/core-react/expandable/ExpandableBlock.js +0 -32
  410. package/lib/esm/core-react/expandable/ExpandableBlock.js.map +0 -1
  411. package/lib/esm/core-react/expandable/ExpandableBlock.scss +0 -145
  412. package/lib/esm/core-react/form/Field.d.ts +0 -20
  413. package/lib/esm/core-react/form/Field.d.ts.map +0 -1
  414. package/lib/esm/core-react/form/Field.js +0 -41
  415. package/lib/esm/core-react/form/Field.js.map +0 -1
  416. package/lib/esm/core-react/form/Form.d.ts +0 -132
  417. package/lib/esm/core-react/form/Form.d.ts.map +0 -1
  418. package/lib/esm/core-react/form/Form.js +0 -128
  419. package/lib/esm/core-react/form/Form.js.map +0 -1
  420. package/lib/esm/core-react/form/Form.scss +0 -78
  421. package/lib/esm/core-react/icons/SvgSprite.d.ts +0 -21
  422. package/lib/esm/core-react/icons/SvgSprite.d.ts.map +0 -1
  423. package/lib/esm/core-react/icons/SvgSprite.js +0 -23
  424. package/lib/esm/core-react/icons/SvgSprite.js.map +0 -1
  425. package/lib/esm/core-react/inputs/LabeledInput.d.ts +0 -18
  426. package/lib/esm/core-react/inputs/LabeledInput.d.ts.map +0 -1
  427. package/lib/esm/core-react/inputs/LabeledInput.js +0 -30
  428. package/lib/esm/core-react/inputs/LabeledInput.js.map +0 -1
  429. package/lib/esm/core-react/inputs/LabeledTextarea.d.ts +0 -18
  430. package/lib/esm/core-react/inputs/LabeledTextarea.d.ts.map +0 -1
  431. package/lib/esm/core-react/inputs/LabeledTextarea.js +0 -28
  432. package/lib/esm/core-react/inputs/LabeledTextarea.js.map +0 -1
  433. package/lib/esm/core-react/inputs/Textarea.d.ts +0 -23
  434. package/lib/esm/core-react/inputs/Textarea.d.ts.map +0 -1
  435. package/lib/esm/core-react/inputs/Textarea.js +0 -33
  436. package/lib/esm/core-react/inputs/Textarea.js.map +0 -1
  437. package/lib/esm/core-react/inputs/labeled-input.scss +0 -103
  438. package/lib/esm/core-react/inputs/labeled-textarea.scss +0 -77
  439. package/lib/esm/core-react/inputs/textarea.scss +0 -55
  440. package/lib/esm/core-react/loading/Spinner.d.ts +0 -38
  441. package/lib/esm/core-react/loading/Spinner.d.ts.map +0 -1
  442. package/lib/esm/core-react/loading/Spinner.js +0 -57
  443. package/lib/esm/core-react/loading/Spinner.js.map +0 -1
  444. package/lib/esm/core-react/loading/Spinner.scss +0 -26
  445. package/lib/esm/core-react/messagebox/MessageSeverity.d.ts +0 -16
  446. package/lib/esm/core-react/messagebox/MessageSeverity.d.ts.map +0 -1
  447. package/lib/esm/core-react/messagebox/MessageSeverity.js +0 -21
  448. package/lib/esm/core-react/messagebox/MessageSeverity.js.map +0 -1
  449. package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts +0 -29
  450. package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts.map +0 -1
  451. package/lib/esm/core-react/progress-indicators/ProgressBar.js +0 -44
  452. package/lib/esm/core-react/progress-indicators/ProgressBar.js.map +0 -1
  453. package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts +0 -49
  454. package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts.map +0 -1
  455. package/lib/esm/core-react/progress-indicators/ProgressSpinner.js +0 -70
  456. package/lib/esm/core-react/progress-indicators/ProgressSpinner.js.map +0 -1
  457. package/lib/esm/core-react/progress-indicators/classes.scss +0 -33
  458. package/lib/esm/core-react/progress-indicators/index.scss +0 -6
  459. package/lib/esm/core-react/progress-indicators/progress-bar.scss +0 -91
  460. package/lib/esm/core-react/progress-indicators/progress-spinner.scss +0 -132
  461. package/lib/esm/core-react/radio/Radio.d.ts +0 -20
  462. package/lib/esm/core-react/radio/Radio.d.ts.map +0 -1
  463. package/lib/esm/core-react/radio/Radio.js +0 -24
  464. package/lib/esm/core-react/radio/Radio.js.map +0 -1
  465. package/lib/esm/core-react/radio/classes.scss +0 -7
  466. package/lib/esm/core-react/radio/index.scss +0 -8
  467. package/lib/esm/core-react/radio/radio.scss +0 -89
  468. package/lib/esm/core-react/select/LabeledSelect.d.ts +0 -20
  469. package/lib/esm/core-react/select/LabeledSelect.d.ts.map +0 -1
  470. package/lib/esm/core-react/select/LabeledSelect.js +0 -30
  471. package/lib/esm/core-react/select/LabeledSelect.js.map +0 -1
  472. package/lib/esm/core-react/select/LabeledThemedSelect.d.ts +0 -16
  473. package/lib/esm/core-react/select/LabeledThemedSelect.d.ts.map +0 -1
  474. package/lib/esm/core-react/select/LabeledThemedSelect.js +0 -27
  475. package/lib/esm/core-react/select/LabeledThemedSelect.js.map +0 -1
  476. package/lib/esm/core-react/select/Select.d.ts +0 -53
  477. package/lib/esm/core-react/select/Select.d.ts.map +0 -1
  478. package/lib/esm/core-react/select/Select.js +0 -57
  479. package/lib/esm/core-react/select/Select.js.map +0 -1
  480. package/lib/esm/core-react/select/ThemedSelect.d.ts +0 -104
  481. package/lib/esm/core-react/select/ThemedSelect.d.ts.map +0 -1
  482. package/lib/esm/core-react/select/ThemedSelect.js +0 -53
  483. package/lib/esm/core-react/select/ThemedSelect.js.map +0 -1
  484. package/lib/esm/core-react/select/classes.scss +0 -9
  485. package/lib/esm/core-react/select/index.scss +0 -10
  486. package/lib/esm/core-react/select/labeled-select.scss +0 -72
  487. package/lib/esm/core-react/select/labeled-themed-select.scss +0 -77
  488. package/lib/esm/core-react/select/modalHelper.d.ts +0 -5
  489. package/lib/esm/core-react/select/modalHelper.d.ts.map +0 -1
  490. package/lib/esm/core-react/select/modalHelper.js +0 -17
  491. package/lib/esm/core-react/select/modalHelper.js.map +0 -1
  492. package/lib/esm/core-react/select/select.scss +0 -74
  493. package/lib/esm/core-react/select/themed-select.scss +0 -159
  494. package/lib/esm/core-react/slider/Slider.d.ts +0 -80
  495. package/lib/esm/core-react/slider/Slider.d.ts.map +0 -1
  496. package/lib/esm/core-react/slider/Slider.js +0 -87
  497. package/lib/esm/core-react/slider/Slider.js.map +0 -1
  498. package/lib/esm/core-react/slider/Slider.scss +0 -96
  499. package/lib/esm/core-react/splitbutton/SplitButton.d.ts +0 -62
  500. package/lib/esm/core-react/splitbutton/SplitButton.d.ts.map +0 -1
  501. package/lib/esm/core-react/splitbutton/SplitButton.js +0 -100
  502. package/lib/esm/core-react/splitbutton/SplitButton.js.map +0 -1
  503. package/lib/esm/core-react/splitbutton/SplitButton.scss +0 -137
  504. package/lib/esm/core-react/tabs/HorizontalTabs.d.ts +0 -11
  505. package/lib/esm/core-react/tabs/HorizontalTabs.d.ts.map +0 -1
  506. package/lib/esm/core-react/tabs/HorizontalTabs.js +0 -18
  507. package/lib/esm/core-react/tabs/HorizontalTabs.js.map +0 -1
  508. package/lib/esm/core-react/tabs/horizontal.scss +0 -77
  509. package/lib/esm/core-react/text/Headline.d.ts +0 -11
  510. package/lib/esm/core-react/text/Headline.d.ts.map +0 -1
  511. package/lib/esm/core-react/text/Headline.js +0 -17
  512. package/lib/esm/core-react/text/Headline.js.map +0 -1
  513. package/lib/esm/core-react/text/LeadingText.d.ts +0 -11
  514. package/lib/esm/core-react/text/LeadingText.d.ts.map +0 -1
  515. package/lib/esm/core-react/text/LeadingText.js +0 -17
  516. package/lib/esm/core-react/text/LeadingText.js.map +0 -1
  517. package/lib/esm/core-react/text/LeadingText2.d.ts +0 -11
  518. package/lib/esm/core-react/text/LeadingText2.d.ts.map +0 -1
  519. package/lib/esm/core-react/text/LeadingText2.js +0 -17
  520. package/lib/esm/core-react/text/LeadingText2.js.map +0 -1
  521. package/lib/esm/core-react/text/SmallText.d.ts +0 -11
  522. package/lib/esm/core-react/text/SmallText.d.ts.map +0 -1
  523. package/lib/esm/core-react/text/SmallText.js +0 -17
  524. package/lib/esm/core-react/text/SmallText.js.map +0 -1
  525. package/lib/esm/core-react/text/Subheading.d.ts +0 -11
  526. package/lib/esm/core-react/text/Subheading.d.ts.map +0 -1
  527. package/lib/esm/core-react/text/Subheading.js +0 -17
  528. package/lib/esm/core-react/text/Subheading.js.map +0 -1
  529. package/lib/esm/core-react/text/Subheading2.d.ts +0 -11
  530. package/lib/esm/core-react/text/Subheading2.d.ts.map +0 -1
  531. package/lib/esm/core-react/text/Subheading2.js +0 -17
  532. package/lib/esm/core-react/text/Subheading2.js.map +0 -1
  533. package/lib/esm/core-react/text/Title.d.ts +0 -11
  534. package/lib/esm/core-react/text/Title.d.ts.map +0 -1
  535. package/lib/esm/core-react/text/Title.js +0 -17
  536. package/lib/esm/core-react/text/Title.js.map +0 -1
  537. package/lib/esm/core-react/text/Title2.d.ts +0 -11
  538. package/lib/esm/core-react/text/Title2.d.ts.map +0 -1
  539. package/lib/esm/core-react/text/Title2.js +0 -17
  540. package/lib/esm/core-react/text/Title2.js.map +0 -1
  541. package/lib/esm/core-react/text/headline.scss +0 -10
  542. package/lib/esm/core-react/text/leading-2.scss +0 -11
  543. package/lib/esm/core-react/text/leading.scss +0 -10
  544. package/lib/esm/core-react/text/small.scss +0 -10
  545. package/lib/esm/core-react/text/subheading-2.scss +0 -11
  546. package/lib/esm/core-react/text/subheading.scss +0 -11
  547. package/lib/esm/core-react/text/title-2.scss +0 -11
  548. package/lib/esm/core-react/text/title.scss +0 -10
  549. package/lib/esm/core-react/tiles/FeaturedTile.d.ts +0 -11
  550. package/lib/esm/core-react/tiles/FeaturedTile.d.ts.map +0 -1
  551. package/lib/esm/core-react/tiles/FeaturedTile.js +0 -17
  552. package/lib/esm/core-react/tiles/FeaturedTile.js.map +0 -1
  553. package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts +0 -11
  554. package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts.map +0 -1
  555. package/lib/esm/core-react/tiles/MinimalFeaturedTile.js +0 -17
  556. package/lib/esm/core-react/tiles/MinimalFeaturedTile.js.map +0 -1
  557. package/lib/esm/core-react/tiles/MinimalTile.d.ts +0 -11
  558. package/lib/esm/core-react/tiles/MinimalTile.d.ts.map +0 -1
  559. package/lib/esm/core-react/tiles/MinimalTile.js +0 -17
  560. package/lib/esm/core-react/tiles/MinimalTile.js.map +0 -1
  561. package/lib/esm/core-react/tiles/Tile.d.ts +0 -32
  562. package/lib/esm/core-react/tiles/Tile.d.ts.map +0 -1
  563. package/lib/esm/core-react/tiles/Tile.js +0 -36
  564. package/lib/esm/core-react/tiles/Tile.js.map +0 -1
  565. package/lib/esm/core-react/tiles/classes.scss +0 -7
  566. package/lib/esm/core-react/tiles/index.scss +0 -5
  567. package/lib/esm/core-react/tiles/tile.scss +0 -134
  568. package/lib/esm/core-react/toggle/LabeledToggle.d.ts +0 -26
  569. package/lib/esm/core-react/toggle/LabeledToggle.d.ts.map +0 -1
  570. package/lib/esm/core-react/toggle/LabeledToggle.js +0 -25
  571. package/lib/esm/core-react/toggle/LabeledToggle.js.map +0 -1
  572. package/lib/esm/core-react/toggle/LabeledToggle.scss +0 -21
  573. package/lib/esm/core-react/toggle/Toggle.d.ts +0 -52
  574. package/lib/esm/core-react/toggle/Toggle.d.ts.map +0 -1
  575. package/lib/esm/core-react/toggle/Toggle.js +0 -102
  576. package/lib/esm/core-react/toggle/Toggle.js.map +0 -1
  577. package/lib/esm/core-react/toggle/Toggle.scss +0 -135
  578. package/lib/esm/core-react/tooltip/Tooltip.d.ts +0 -34
  579. package/lib/esm/core-react/tooltip/Tooltip.d.ts.map +0 -1
  580. package/lib/esm/core-react/tooltip/Tooltip.js +0 -52
  581. package/lib/esm/core-react/tooltip/Tooltip.js.map +0 -1
  582. package/lib/esm/core-react/tooltip/Tooltip.scss +0 -18
  583. package/lib/esm/core-react/utils/PointProps.d.ts +0 -12
  584. package/lib/esm/core-react/utils/PointProps.d.ts.map +0 -1
  585. package/lib/esm/core-react/utils/PointProps.js +0 -9
  586. package/lib/esm/core-react/utils/PointProps.js.map +0 -1
  587. package/lib/esm/core-react/utils/UiEvent.d.ts +0 -10
  588. package/lib/esm/core-react/utils/UiEvent.d.ts.map +0 -1
  589. package/lib/esm/core-react/utils/UiEvent.js +0 -14
  590. package/lib/esm/core-react/utils/UiEvent.js.map +0 -1
@@ -9,12 +9,11 @@
9
9
  @import "../style/opacity";
10
10
  @import "../style/themecolors";
11
11
  @import "../z-index";
12
- @import "~@itwin/itwinui-css/scss/style/typography";
13
12
 
14
13
  // cspell:ignore themecolors unbordered
15
14
 
16
15
  $uicore-menu-padding: $uicore-bordered-padding;
17
- $uicore-menu-top-bottom-padding: $uicore-menu-padding * 0.6667;
16
+ $uicore-menu-top-bottom-padding: calc(#{$uicore-menu-padding} * 0.6667);
18
17
 
19
18
  .core-context-menu-global {
20
19
  position: fixed;
@@ -40,7 +39,7 @@ $uicore-menu-top-bottom-padding: $uicore-menu-padding * 0.6667;
40
39
 
41
40
  .core-context-menu-container {
42
41
  position: absolute;
43
- border-radius: 3px;
42
+ border-radius: var(--iui-border-radius-1);
44
43
  padding: 4px 0;
45
44
  box-shadow: 0px 3px 5px 0 rgba(0, 0, 0, 0.2);
46
45
  background-color: $buic-background-1;
@@ -128,9 +127,9 @@ $uicore-menu-top-bottom-padding: $uicore-menu-padding * 0.6667;
128
127
  flex-shrink: 0;
129
128
  flex-grow: 0;
130
129
  width: $uicore-icons-small;
131
- height: $uicore-line-height;
130
+ height: var(--iui-size-l);
132
131
  font-size: $uicore-icons-small;
133
- line-height: $uicore-line-height;
132
+ line-height: var(--iui-size-l);
134
133
  text-align: center;
135
134
  margin-right: $uicore-unbordered-padding;
136
135
  opacity: $uicore-opacity-2;
@@ -144,7 +143,7 @@ $uicore-menu-top-bottom-padding: $uicore-menu-padding * 0.6667;
144
143
  > .core-context-menu-content {
145
144
  flex-shrink: 0;
146
145
  flex-grow: 1;
147
- font-size: $iui-font-size;
146
+ font-size: var(--iui-font-size-1);
148
147
  text-align: left;
149
148
  }
150
149
 
@@ -219,9 +218,9 @@ $uicore-menu-top-bottom-padding: $uicore-menu-padding * 0.6667;
219
218
  flex-grow: 0;
220
219
  margin-left: $uicore-unbordered-padding;
221
220
  width: $uicore-icons-small;
222
- height: $uicore-line-height;
221
+ height: var(--iui-size-l);
223
222
  font-size: $uicore-icons-small * 0.5;
224
- line-height: $uicore-line-height;
223
+ line-height: var(--iui-size-l);
225
224
  text-align: center;
226
225
  }
227
226
  }
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import * as React from "react";
9
9
  import classnames from "classnames";
10
- import { ConditionalBooleanValue, ConditionalStringValue } from "@itwin/appui-abstract";
10
+ import { ConditionalBooleanValue } from "@itwin/appui-abstract";
11
11
  import { ContextMenu } from "./ContextMenu";
12
12
  import { ContextMenuDirection } from "./ContextMenuDirection";
13
13
  import { TildeFinder } from "./TildeFinder";
@@ -103,7 +103,7 @@ export class ContextSubMenu extends React.Component {
103
103
  // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
104
104
  React.createElement("div", { className: classnames("core-context-submenu", ContextMenu.getCSSClassNameFromDirection(renderDirection), className), onMouseOver: this._handleMouseOver, ref: (el) => { this._subMenuElement = el; }, "data-testid": "core-context-submenu", ...props },
105
105
  React.createElement("div", { onClick: this._handleClick, ref: (el) => { this._menuButtonElement = el; }, className: classnames("core-context-menu-item", "core-context-submenu-container", isDisabled && "core-context-menu-disabled", isHidden && "core-context-menu-hidden", isSelected && "core-context-menu-is-selected"), "data-testid": "core-context-submenu-container", role: "menuitem", tabIndex: isSelected ? 0 : -1, "aria-disabled": isDisabled, "aria-hidden": isHidden, "aria-haspopup": true },
106
- React.createElement("div", { className: classnames("core-context-menu-icon", "icon", icon instanceof ConditionalStringValue && icon.value, typeof icon === "string" && icon) }),
106
+ React.createElement("div", { className: classnames("core-context-menu-icon", "icon", icon) }),
107
107
  React.createElement("div", { className: "core-context-menu-content" }, this._parsedLabel),
108
108
  React.createElement("div", { className: classnames("core-context-submenu-arrow", "icon", "icon-caret-right") }),
109
109
  badge &&
@@ -1 +1 @@
1
- {"version":3,"file":"ContextSubMenu.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextSubMenu.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAExF,OAAO,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAC;AAE9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAmBzD;;;GAGG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK,CAAC,SAAmD;IAmB3F,YAAY,KAA0B;QACpC,KAAK,CAAC,KAAK,CAAC,CAAC;QAnBP,iBAAY,GAAuB,IAAI,CAAC;QACxC,oBAAe,GAAuB,IAAI,CAAC;QAC3C,uBAAkB,GAAuB,IAAI,CAAC;QA6H9C,kBAAa,GAAG,CAAC,IAAqB,EAAE,EAAE;YAChD,IAAI,M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C,IAAI,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;QAC3C,uBAAuB;QACvB,IAAI,YAAY,IAAI,QAAQ,IAAI,IAAI,CAAC,YAAY,EAAE;YACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;YAC7C,eAAe,GAAG,WAAW,CAAC,QAAQ,CAAC,eAAe,EAAE,QAAQ,EAAE,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;YACrH,uBAAuB;YACvB,IAAI,eAAe,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS;gBAC1C,IAAI,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;SACjD;IACH,CAAC;;AAtHa,2BAAY,GAAiC;IACzD,SAAS,EAAE,oBAAoB,CAAC,WAAW;IAC3C,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,CAAC;CACjB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { ConditionalBooleanValue, ConditionalStringValue } from \"@itwin/appui-abstract\";\r\nimport { ContextMenuItemProps } from \"./ContextMenuItem\";\r\nimport { ContextMenu, ContextMenuProps } from \"./ContextMenu\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { ContextMenuDirection } from \"./ContextMenuDirection\";\r\nimport { TildeFinder } from \"./TildeFinder\";\r\nimport { BadgeUtilities } from \"../badge/BadgeUtilities\";\r\n\r\n/** Properties for the [[ContextSubMenu]] component\r\n * @public\r\n */\r\nexport interface ContextSubMenuProps extends Omit<ContextMenuItemProps, \"label\">, Omit<ContextMenuProps, \"label\">, CommonProps {\r\n /** Text/jsx to display in the list item */\r\n label: string | JSX.Element;\r\n /** @internal */\r\n onHotKeyParsed?: (hotKey: string) => void;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextSubMenuState {\r\n opened: boolean;\r\n direction: ContextMenuDirection;\r\n hotKey?: string;\r\n}\r\n\r\n/**\r\n * Submenu wrapper class for use within a [[ContextMenu]] component.\r\n * @public\r\n */\r\nexport class ContextSubMenu extends React.Component<ContextSubMenuProps, ContextSubMenuState> {\r\n private _menuElement: ContextMenu | null = null;\r\n private _subMenuElement: HTMLElement | null = null;\r\n private _menuButtonElement: HTMLElement | null = null;\r\n\r\n private _lastLabel: React.ReactNode;\r\n private _parsedLabel: React.ReactNode;\r\n\r\n public static defaultProps: Partial<ContextSubMenuProps> = {\r\n direction: ContextMenuDirection.BottomRight,\r\n disabled: false,\r\n hidden: false,\r\n autoflip: true,\r\n isSelected: false,\r\n selectedIndex: 0,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContextSubMenuState>;\r\n constructor(props: ContextSubMenuProps) {\r\n super(props);\r\n this.state = {\r\n opened: false,\r\n direction: props.direction!,\r\n };\r\n }\r\n\r\n public override render(): JSX.Element {\r\n const {\r\n label,\r\n opened, direction, onOutsideClick, onEsc, autoflip, edgeLimit, selectedIndex, floating, parentMenu, parentSubmenu, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n onSelect, icon, disabled, hidden, onHover, isSelected, onHotKeyParsed, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n children, onClick, className, badgeType, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const contextMenuProps = { onOutsideClick, onSelect, onEsc, autoflip, edgeLimit, selectedIndex, floating, parentMenu };\r\n const badge = BadgeUtilities.getComponentForBadgeType(badgeType);\r\n const renderDirection = this.state.direction;\r\n const isDisabled = ConditionalBooleanValue.getValue(disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(hidden);\r\n\r\n if (this._lastLabel !== label) {\r\n this._parsedLabel = TildeFinder.findAfterTilde(label).node;\r\n this._lastLabel = label;\r\n }\r\n return (\r\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\r\n <div className={classnames(\"core-context-submenu\", ContextMenu.getCSSClassNameFromDirection(renderDirection), className)}\r\n onMouseOver={this._handleMouseOver}\r\n ref={(el) => { this._subMenuElement = el; }}\r\n data-testid=\"core-context-submenu\"\r\n {...props} >\r\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\r\n <div\r\n onClick={this._handleClick}\r\n ref={(el) => { this._menuButtonElement = el; }}\r\n className={classnames(\"core-context-menu-item\",\r\n \"core-context-submenu-container\",\r\n isDisabled && \"core-context-menu-disabled\",\r\n isHidden && \"core-context-menu-hidden\",\r\n isSelected && \"core-context-menu-is-selected\")}\r\n data-testid=\"core-context-submenu-container\"\r\n role=\"menuitem\"\r\n tabIndex={isSelected ? 0 : -1}\r\n aria-disabled={isDisabled}\r\n aria-hidden={isHidden}\r\n aria-haspopup={true}\r\n >\r\n <div className={classnames(\"core-context-menu-icon\", \"icon\", icon instanceof ConditionalStringValue && icon.value, typeof icon === \"string\" && icon)} />\r\n <div className={\"core-context-menu-content\"}>{this._parsedLabel}</div>\r\n <div className={classnames(\"core-context-submenu-arrow\", \"icon\", \"icon-caret-right\")} />\r\n {badge &&\r\n <div className=\"core-context-menu-badge\">\r\n {badge}\r\n </div>\r\n }\r\n </div>\r\n <ContextMenu\r\n ref={(el) => { this._menuElement = el; }}\r\n className=\"core-context-submenu-popup\"\r\n opened={this.state.opened}\r\n direction={renderDirection}\r\n parentSubmenu={this}\r\n {...contextMenuProps} >\r\n {children}\r\n </ContextMenu>\r\n </div>\r\n );\r\n }\r\n\r\n public override componentDidMount() {\r\n document.addEventListener(\"click\", this._handleClickGlobal);\r\n this._updateHotkey(this.props.label);\r\n\r\n this.checkRenderDirection();\r\n }\r\n\r\n public override componentWillUnmount() {\r\n document.removeEventListener(\"click\", this._handleClickGlobal);\r\n }\r\n\r\n public override componentDidUpdate(prevProps: ContextSubMenuProps, prevState: ContextSubMenuState) {\r\n const direction = this.props.direction!;\r\n if ((this.state.opened !== prevState.opened && direction !== this.state.direction) || prevProps.direction !== direction)\r\n this.checkRenderDirection();\r\n if (this.props.label !== prevProps.label) {\r\n this._updateHotkey(this.props.label);\r\n }\r\n }\r\n\r\n private getWindow() {\r\n const el = this._subMenuElement;\r\n const parentDocument = el!.ownerDocument;\r\n return parentDocument.defaultView;\r\n }\r\n\r\n private checkRenderDirection() {\r\n const { autoflip } = this.props;\r\n const parentWindow = this.getWindow();\r\n let renderDirection = this.state.direction;\r\n // istanbul ignore else\r\n if (parentWindow && autoflip && this._menuElement) {\r\n const menuRect = this._menuElement.getRect();\r\n renderDirection = ContextMenu.autoFlip(renderDirection, menuRect, parentWindow.innerWidth, parentWindow.innerHeight);\r\n // istanbul ignore next\r\n if (renderDirection !== this.state.direction)\r\n this.setState({ direction: renderDirection });\r\n }\r\n }\r\n\r\n private _updateHotkey = (node: React.ReactNode) => {\r\n let hotKey: string | undefined;\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(this.props.hidden);\r\n if (!isDisabled && !isHidden)\r\n hotKey = TildeFinder.findAfterTilde(node).character;\r\n else\r\n hotKey = undefined;\r\n if (hotKey && hotKey !== this.state.hotKey) {\r\n this.setState({ hotKey });\r\n if (this.props.onHotKeyParsed)\r\n this.props.onHotKeyParsed(hotKey);\r\n }\r\n };\r\n\r\n public select = () => {\r\n this.setState({ opened: true }, () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.focus();\r\n if (this.props.onSelect !== undefined)\r\n this.props.onSelect(undefined);\r\n });\r\n };\r\n\r\n public close = (propagate?: boolean) => {\r\n this.setState({ opened: false }, () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.blur();\r\n });\r\n // istanbul ignore next\r\n if (propagate && this.props.parentMenu && this.props.parentMenu.props.parentSubmenu) {\r\n this.props.parentMenu.props.parentSubmenu.close(true);\r\n }\r\n };\r\n\r\n private _handleMouseOver = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n // istanbul ignore else\r\n if (this._menuButtonElement && this._menuButtonElement.style.visibility !== \"hidden\" && this.props.onHover) {\r\n this.props.onHover();\r\n }\r\n };\r\n\r\n private _handleClick = (event: any) => {\r\n event.stopPropagation();\r\n\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n\r\n // istanbul ignore else\r\n if (!isDisabled) {\r\n // istanbul ignore else\r\n if (this.props.onClick !== undefined)\r\n this.props.onClick(event);\r\n // istanbul ignore next\r\n if (this.props.opened)\r\n this.close();\r\n else\r\n this.select();\r\n }\r\n };\r\n\r\n private _handleClickGlobal = (event: any) => {\r\n if (this._subMenuElement && !this._subMenuElement.contains(event.target))\r\n this.setState((_prevState) => ({ opened: false }));\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"ContextSubMenu.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextSubMenu.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAC;AAE9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAmBzD;;;GAGG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK,CAAC,SAAmD;IAmB3F,YAAY,KAA0B;QACpC,KAAK,CAAC,KAAK,CAAC,CAAC;QAnBP,i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KAAK,CAAC;QAChC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QACtC,IAAI,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;QAC3C,uBAAuB;QACvB,IAAI,YAAY,IAAI,QAAQ,IAAI,IAAI,CAAC,YAAY,EAAE;YACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;YAC7C,eAAe,GAAG,WAAW,CAAC,QAAQ,CAAC,eAAe,EAAE,QAAQ,EAAE,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;YACrH,uBAAuB;YACvB,IAAI,eAAe,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS;gBAC1C,IAAI,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;SACjD;IACH,CAAC;;AAtHa,2BAAY,GAAiC;IACzD,SAAS,EAAE,oBAAoB,CAAC,WAAW;IAC3C,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,CAAC;CACjB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\r\nimport { ContextMenuItemProps } from \"./ContextMenuItem\";\r\nimport { ContextMenu, ContextMenuProps } from \"./ContextMenu\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { ContextMenuDirection } from \"./ContextMenuDirection\";\r\nimport { TildeFinder } from \"./TildeFinder\";\r\nimport { BadgeUtilities } from \"../badge/BadgeUtilities\";\r\n\r\n/** Properties for the [[ContextSubMenu]] component\r\n * @public\r\n */\r\nexport interface ContextSubMenuProps extends Omit<ContextMenuItemProps, \"label\">, Omit<ContextMenuProps, \"label\">, CommonProps {\r\n /** Text/jsx to display in the list item */\r\n label: string | JSX.Element;\r\n /** @internal */\r\n onHotKeyParsed?: (hotKey: string) => void;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextSubMenuState {\r\n opened: boolean;\r\n direction: ContextMenuDirection;\r\n hotKey?: string;\r\n}\r\n\r\n/**\r\n * Submenu wrapper class for use within a [[ContextMenu]] component.\r\n * @public\r\n */\r\nexport class ContextSubMenu extends React.Component<ContextSubMenuProps, ContextSubMenuState> {\r\n private _menuElement: ContextMenu | null = null;\r\n private _subMenuElement: HTMLElement | null = null;\r\n private _menuButtonElement: HTMLElement | null = null;\r\n\r\n private _lastLabel: React.ReactNode;\r\n private _parsedLabel: React.ReactNode;\r\n\r\n public static defaultProps: Partial<ContextSubMenuProps> = {\r\n direction: ContextMenuDirection.BottomRight,\r\n disabled: false,\r\n hidden: false,\r\n autoflip: true,\r\n isSelected: false,\r\n selectedIndex: 0,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContextSubMenuState>;\r\n constructor(props: ContextSubMenuProps) {\r\n super(props);\r\n this.state = {\r\n opened: false,\r\n direction: props.direction!,\r\n };\r\n }\r\n\r\n public override render(): JSX.Element {\r\n const {\r\n label,\r\n opened, direction, onOutsideClick, onEsc, autoflip, edgeLimit, selectedIndex, floating, parentMenu, parentSubmenu, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n onSelect, icon, disabled, hidden, onHover, isSelected, onHotKeyParsed, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n children, onClick, className, badgeType, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const contextMenuProps = { onOutsideClick, onSelect, onEsc, autoflip, edgeLimit, selectedIndex, floating, parentMenu };\r\n const badge = BadgeUtilities.getComponentForBadgeType(badgeType);\r\n const renderDirection = this.state.direction;\r\n const isDisabled = ConditionalBooleanValue.getValue(disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(hidden);\r\n\r\n if (this._lastLabel !== label) {\r\n this._parsedLabel = TildeFinder.findAfterTilde(label).node;\r\n this._lastLabel = label;\r\n }\r\n return (\r\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\r\n <div className={classnames(\"core-context-submenu\", ContextMenu.getCSSClassNameFromDirection(renderDirection), className)}\r\n onMouseOver={this._handleMouseOver}\r\n ref={(el) => { this._subMenuElement = el; }}\r\n data-testid=\"core-context-submenu\"\r\n {...props} >\r\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\r\n <div\r\n onClick={this._handleClick}\r\n ref={(el) => { this._menuButtonElement = el; }}\r\n className={classnames(\"core-context-menu-item\",\r\n \"core-context-submenu-container\",\r\n isDisabled && \"core-context-menu-disabled\",\r\n isHidden && \"core-context-menu-hidden\",\r\n isSelected && \"core-context-menu-is-selected\")}\r\n data-testid=\"core-context-submenu-container\"\r\n role=\"menuitem\"\r\n tabIndex={isSelected ? 0 : -1}\r\n aria-disabled={isDisabled}\r\n aria-hidden={isHidden}\r\n aria-haspopup={true}\r\n >\r\n <div className={classnames(\"core-context-menu-icon\", \"icon\", icon)} />\r\n <div className={\"core-context-menu-content\"}>{this._parsedLabel}</div>\r\n <div className={classnames(\"core-context-submenu-arrow\", \"icon\", \"icon-caret-right\")} />\r\n {badge &&\r\n <div className=\"core-context-menu-badge\">\r\n {badge}\r\n </div>\r\n }\r\n </div>\r\n <ContextMenu\r\n ref={(el) => { this._menuElement = el; }}\r\n className=\"core-context-submenu-popup\"\r\n opened={this.state.opened}\r\n direction={renderDirection}\r\n parentSubmenu={this}\r\n {...contextMenuProps} >\r\n {children}\r\n </ContextMenu>\r\n </div>\r\n );\r\n }\r\n\r\n public override componentDidMount() {\r\n document.addEventListener(\"click\", this._handleClickGlobal);\r\n this._updateHotkey(this.props.label);\r\n\r\n this.checkRenderDirection();\r\n }\r\n\r\n public override componentWillUnmount() {\r\n document.removeEventListener(\"click\", this._handleClickGlobal);\r\n }\r\n\r\n public override componentDidUpdate(prevProps: ContextSubMenuProps, prevState: ContextSubMenuState) {\r\n const direction = this.props.direction!;\r\n if ((this.state.opened !== prevState.opened && direction !== this.state.direction) || prevProps.direction !== direction)\r\n this.checkRenderDirection();\r\n if (this.props.label !== prevProps.label) {\r\n this._updateHotkey(this.props.label);\r\n }\r\n }\r\n\r\n private getWindow() {\r\n const el = this._subMenuElement;\r\n const parentDocument = el!.ownerDocument;\r\n return parentDocument.defaultView;\r\n }\r\n\r\n private checkRenderDirection() {\r\n const { autoflip } = this.props;\r\n const parentWindow = this.getWindow();\r\n let renderDirection = this.state.direction;\r\n // istanbul ignore else\r\n if (parentWindow && autoflip && this._menuElement) {\r\n const menuRect = this._menuElement.getRect();\r\n renderDirection = ContextMenu.autoFlip(renderDirection, menuRect, parentWindow.innerWidth, parentWindow.innerHeight);\r\n // istanbul ignore next\r\n if (renderDirection !== this.state.direction)\r\n this.setState({ direction: renderDirection });\r\n }\r\n }\r\n\r\n private _updateHotkey = (node: React.ReactNode) => {\r\n let hotKey: string | undefined;\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(this.props.hidden);\r\n if (!isDisabled && !isHidden)\r\n hotKey = TildeFinder.findAfterTilde(node).character;\r\n else\r\n hotKey = undefined;\r\n if (hotKey && hotKey !== this.state.hotKey) {\r\n this.setState({ hotKey });\r\n if (this.props.onHotKeyParsed)\r\n this.props.onHotKeyParsed(hotKey);\r\n }\r\n };\r\n\r\n public select = () => {\r\n this.setState({ opened: true }, () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.focus();\r\n if (this.props.onSelect !== undefined)\r\n this.props.onSelect(undefined);\r\n });\r\n };\r\n\r\n public close = (propagate?: boolean) => {\r\n this.setState({ opened: false }, () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.blur();\r\n });\r\n // istanbul ignore next\r\n if (propagate && this.props.parentMenu && this.props.parentMenu.props.parentSubmenu) {\r\n this.props.parentMenu.props.parentSubmenu.close(true);\r\n }\r\n };\r\n\r\n private _handleMouseOver = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n // istanbul ignore else\r\n if (this._menuButtonElement && this._menuButtonElement.style.visibility !== \"hidden\" && this.props.onHover) {\r\n this.props.onHover();\r\n }\r\n };\r\n\r\n private _handleClick = (event: any) => {\r\n event.stopPropagation();\r\n\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n\r\n // istanbul ignore else\r\n if (!isDisabled) {\r\n // istanbul ignore else\r\n if (this.props.onClick !== undefined)\r\n this.props.onClick(event);\r\n // istanbul ignore next\r\n if (this.props.opened)\r\n this.close();\r\n else\r\n this.select();\r\n }\r\n };\r\n\r\n private _handleClickGlobal = (event: any) => {\r\n if (this._subMenuElement && !this._subMenuElement.contains(event.target))\r\n this.setState((_prevState) => ({ opened: false }));\r\n };\r\n}\r\n"]}
@@ -9,7 +9,6 @@
9
9
  @import "../z-index";
10
10
  @import "../scrollbar";
11
11
  @import "~@itwin/itwinui-css/scss/style/typography";
12
- @import "~@itwin/itwinui-css/scss/style/variables";
13
12
  @import "~@itwin/itwinui-css/scss/text/mixins";
14
13
 
15
14
  // cspell:ignore titlebar outoffocus nwse
@@ -107,7 +106,7 @@
107
106
  flex-grow: 1;
108
107
  flex-direction: column;
109
108
  border: 1px solid $buic-background-dialog-stroke;
110
- border-radius: $iui-border-radius;
109
+ border-radius: var(--iui-border-radius-1);
111
110
  background-color: $buic-background-dialog;
112
111
  color: $buic-text-color;
113
112
  padding: 0;
@@ -144,9 +143,9 @@
144
143
 
145
144
  > .core-dialog-close {
146
145
  cursor: pointer;
147
- height: $iui-font-size-title;
148
- width: $iui-font-size-title;
149
- line-height: $iui-font-size-title;
146
+ height: var(--iui-font-size-4);
147
+ width: var(--iui-font-size-4);
148
+ line-height: var(--iui-font-size-4);
150
149
  flex: 0 0 $uicore-icons-medium;
151
150
  text-align: center;
152
151
  color: $buic-text-color-muted;
@@ -14,6 +14,8 @@ export interface ExpandableListProps extends CommonProps {
14
14
  singleExpandOnly?: boolean;
15
15
  /** Indicates whether the single expanded block is collapsible */
16
16
  singleIsCollapsible?: boolean;
17
+ /** Content */
18
+ children?: React.ReactNode;
17
19
  }
18
20
  /** @internal */
19
21
  interface ExpandableListState {
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandableList.d.ts","sourceRoot":"","sources":["../../../../src/core-react/expandable/ExpandableList.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,wCAAwC;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,gBAAgB;AAChB,UAAU,mBAAmB;IAC3B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,qBAAa,cAAe,SAAQ,KAAK,CAAC,aAAa,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;gBAEnF,KAAK,EAAE,mBAAmB;IAMtC,OAAc,YAAY,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAGtD;IAGF,OAAO,CAAC,kBAAkB,CAYxB;IAEF,OAAO,CAAC,YAAY;IAUpB,gBAAgB;IACA,kBAAkB,CAAC,SAAS,EAAE,mBAAmB;IAMjD,MAAM,IAAI,GAAG,CAAC,OAAO;CAOtC"}
1
+ {"version":3,"file":"ExpandableList.d.ts","sourceRoot":"","sources":["../../../../src/core-react/expandable/ExpandableList.tsx"],"names":[],"m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AAW,EAAE;YAC9H,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,kBAAmB,EAAE,CAAC,CAAC,CAAC;SAC3E;IACH,CAAC;IAEe,MAAM;QACpB,OAAO,CACL,6BAAK,SAAS,EAAE,UAAU,CAAC,+BAA+B,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IACvG,IAAI,CAAC,YAAY,EAAE,CAChB,CACP,CAAC;IACJ,CAAC;;AA3Ca,2BAAY,GAAiC;IACzD,gBAAgB,EAAE,KAAK;IACvB,kBAAkB,EAAE,CAAC;CACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Expandable\r\n */\r\n\r\nimport \"./ExpandableList.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for [[ExpandableList]] component\r\n * @public\r\n */\r\nexport interface ExpandableListProps extends CommonProps {\r\n /** Index of the default active block */\r\n defaultActiveBlock?: number;\r\n /** Indicates whether to allow only one expanded block */\r\n singleExpandOnly?: boolean;\r\n /** Indicates whether the single expanded block is collapsible */\r\n singleIsCollapsible?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface ExpandableListState {\r\n activeBlock: number;\r\n}\r\n\r\n/**\r\n * ExpandableList React component is a container for ExpandableBlock components.\r\n * @public\r\n */\r\nexport class ExpandableList extends React.PureComponent<ExpandableListProps, ExpandableListState> {\r\n\r\n constructor(props: ExpandableListProps) {\r\n super(props);\r\n\r\n this.state = { activeBlock: this.props.defaultActiveBlock! };\r\n }\r\n\r\n public static defaultProps: Partial<ExpandableListProps> = {\r\n singleExpandOnly: false,\r\n defaultActiveBlock: 0,\r\n };\r\n\r\n // set active block\r\n private _handleBlockToggle = (index: number, onToggle: (isExpanding: boolean) => any) => {\r\n let activeBlock = index;\r\n\r\n if (this.props.singleIsCollapsible && index === this.state.activeBlock)\r\n activeBlock = -1;\r\n\r\n this.setState({ activeBlock });\r\n\r\n // istanbul ignore else\r\n if (onToggle) {\r\n onToggle(activeBlock === index); // fire the ExpandableBlock onToggle\r\n }\r\n };\r\n\r\n private renderBlocks() {\r\n return React.Children.map(this.props.children, (child: any, i) => {\r\n return React.cloneElement(child, {\r\n key: i,\r\n isExpanded: (this.props.singleExpandOnly) ? i === this.state.activeBlock : child.props.isExpanded,\r\n onToggle: this._handleBlockToggle.bind(this, i, child.props.onToggle),\r\n });\r\n });\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate(prevProps: ExpandableListProps) {\r\n if (this.props.defaultActiveBlock !== prevProps.defaultActiveBlock && this.props.defaultActiveBlock !== this.state.activeBlock) {\r\n this.setState((_, props) => ({ activeBlock: props.defaultActiveBlock! }));\r\n }\r\n }\r\n\r\n public override render(): JSX.Element {\r\n return (\r\n <div className={classnames(\"uicore-expandable-blocks-list\", this.props.className)} style={this.props.style}>\r\n {this.renderBlocks()}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ExpandableList.js","sourceRoot":"","sources":["../../../../src/core-react/expandable/ExpandableList.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsB/B;;;GAGG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK,CAAC,aAAuD;IAE/F,YAAY,KAA0B;QACpC,KAAK,CAAC,KAAK,CAAC,CAAC;QAUf,mBAAmB;QACX,uBAAkB,GAAG,CAAC,KAAa,EAAE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AC9H,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,kBAAmB,EAAE,CAAC,CAAC,CAAC;SAC3E;IACH,CAAC;IAEe,MAAM;QACpB,OAAO,CACL,6BAAK,SAAS,EAAE,UAAU,CAAC,+BAA+B,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IACvG,IAAI,CAAC,YAAY,EAAE,CAChB,CACP,CAAC;IACJ,CAAC;;AA3Ca,2BAAY,GAAiC;IACzD,gBAAgB,EAAE,KAAK;IACvB,kBAAkB,EAAE,CAAC;CACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Expandable\r\n */\r\n\r\nimport \"./ExpandableList.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for [[ExpandableList]] component\r\n * @public\r\n */\r\nexport interface ExpandableListProps extends CommonProps {\r\n /** Index of the default active block */\r\n defaultActiveBlock?: number;\r\n /** Indicates whether to allow only one expanded block */\r\n singleExpandOnly?: boolean;\r\n /** Indicates whether the single expanded block is collapsible */\r\n singleIsCollapsible?: boolean;\r\n /** Content */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/** @internal */\r\ninterface ExpandableListState {\r\n activeBlock: number;\r\n}\r\n\r\n/**\r\n * ExpandableList React component is a container for ExpandableBlock components.\r\n * @public\r\n */\r\nexport class ExpandableList extends React.PureComponent<ExpandableListProps, ExpandableListState> {\r\n\r\n constructor(props: ExpandableListProps) {\r\n super(props);\r\n\r\n this.state = { activeBlock: this.props.defaultActiveBlock! };\r\n }\r\n\r\n public static defaultProps: Partial<ExpandableListProps> = {\r\n singleExpandOnly: false,\r\n defaultActiveBlock: 0,\r\n };\r\n\r\n // set active block\r\n private _handleBlockToggle = (index: number, onToggle: (isExpanding: boolean) => any) => {\r\n let activeBlock = index;\r\n\r\n if (this.props.singleIsCollapsible && index === this.state.activeBlock)\r\n activeBlock = -1;\r\n\r\n this.setState({ activeBlock });\r\n\r\n // istanbul ignore else\r\n if (onToggle) {\r\n onToggle(activeBlock === index); // fire the ExpandableBlock onToggle\r\n }\r\n };\r\n\r\n private renderBlocks() {\r\n return React.Children.map(this.props.children, (child: any, i) => {\r\n return React.cloneElement(child, {\r\n key: i,\r\n isExpanded: (this.props.singleExpandOnly) ? i === this.state.activeBlock : child.props.isExpanded,\r\n onToggle: this._handleBlockToggle.bind(this, i, child.props.onToggle),\r\n });\r\n });\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate(prevProps: ExpandableListProps) {\r\n if (this.props.defaultActiveBlock !== prevProps.defaultActiveBlock && this.props.defaultActiveBlock !== this.state.activeBlock) {\r\n this.setState((_, props) => ({ activeBlock: props.defaultActiveBlock! }));\r\n }\r\n }\r\n\r\n public override render(): JSX.Element {\r\n return (\r\n <div className={classnames(\"uicore-expandable-blocks-list\", this.props.className)} style={this.props.style}>\r\n {this.renderBlocks()}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
@@ -3,43 +3,33 @@
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  @import "../style/index";
6
- @import "~@itwin/itwinui-css/scss/style/speed";
7
6
 
8
7
  @mixin uicore-expandable-blocks-list {
9
-
10
8
  > div {
11
-
12
- transition: margin $iui-speed-fast ease-in-out;
9
+ transition: margin var(--iui-duration-1) ease-in-out;
13
10
 
14
11
  > .iui-header {
15
-
16
- border-color: $uicore-gray-a transparent transparent;
12
+ border-color: $uicore-gray-a transparent transparent;
17
13
  }
18
14
 
19
15
  &:first-child {
20
-
21
16
  > .iui-header {
22
-
23
- border-top-color: transparent;
17
+ border-top-color: transparent;
24
18
  }
25
19
  }
26
20
  }
27
21
 
28
22
  > .iui-expanded + div {
29
-
30
23
  > .iui-header {
31
-
32
- border-top-color: transparent;
24
+ border-top-color: transparent;
33
25
  }
34
26
 
35
- &.iui-expanded > .iui-header {
36
-
37
- border-top-color: $uicore-blue;
27
+ &.iui-expanded > .iui-header {
28
+ border-top-color: $uicore-blue;
38
29
  }
39
30
  }
40
31
 
41
32
  > .iui-expanded + .iui-expanded {
42
-
43
- margin-top: 0; // $uicore-unbordered-padding;
33
+ margin-top: 0; // $uicore-unbordered-padding;
44
34
  }
45
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"withTimeout.js","sourceRoot":"","sources":["../../../../src/core-react/hocs/withTimeout.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAYvC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;AACzB,gEAAgE;AAChE,SAA8C,EAC9C,EAAE;IACF,OAAO,MAAM,WAAY,SAAQ,KAAK,CAAC,aAAgD;QAAhF;;YACE,UAAK,GAAU,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;QA6BrC,CAAC;QA3BiB,iBAAiB;YAC/B,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;YAC9E,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QAEe,kBAAkB,CAAC,UAAuD;YACxF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QAEe,oBAAoB;YAClC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QACpB,CAAC;QAEe,MAAM;YACpB,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,wDAAwD;YAC7G,OAAO,CACL,oBAAC,SAAS,OAAK,KAAuB,KAAM,IAAI,CAAC,KAAK,GAAI,CAC3D,CAAC;QACJ,CAAC;QAEM,UAAU,CAAC,OAAe;YAC/B,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS;gBACtB,OAAO;YAET,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC;YAC3B,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC;KACF,CAAC;AACJ,CAAC,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 Common\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Timer } from \"../utils/Timer\";\r\n\r\n/** Properties for [[withTimeout]] React higher-order component\r\n * @public\r\n */\r\nexport interface WithTimeoutProps {\r\n /** Timeout duration in milliseconds */\r\n timeout: number;\r\n /** Callback function for timeout */\r\n onTimeout?: () => void;\r\n}\r\n\r\n/** withTimeout is a React higher-order component that adds timeout support.\r\n * @public\r\n */\r\nexport const withTimeout = <ComponentProps extends {}>(\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n Component: React.ComponentType<ComponentProps>,\r\n) => {\r\n return class WithTimeout extends React.PureComponent<ComponentProps & WithTimeoutProps> {\r\n public timer: Timer = new Timer(0);\r\n\r\n public override componentDidMount(): void {\r\n this.timer.setOnExecute(() => this.props.onTimeout && this.props.onTimeout());\r\n this.startTimer(this.props.timeout);\r\n }\r\n\r\n public override componentDidUpdate(_prevProps: Readonly<ComponentProps & WithTimeoutProps>): void {\r\n this.startTimer(this.props.timeout);\r\n }\r\n\r\n public override componentWillUnmount(): void {\r\n this.timer.stop();\r\n }\r\n\r\n public override render() {\r\n const { timeout, onTimeout, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n return (\r\n <Component {...props as ComponentProps} {...this.state} />\r\n );\r\n }\r\n\r\n public startTimer(timeout: number) {\r\n if (this.timer.isRunning)\r\n return;\r\n\r\n this.timer.delay = timeout;\r\n this.timer.start();\r\n }\r\n };\r\n};\r\n"]}
1
+ {"version":3,"file":"withTimeout.js","sourceRoot":"","sources":["../../../../src/core-react/hocs/withTimeout.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAYvC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;AACzB,gEAAgE;AAChE,SAA8C,EAC9C,EAAE;IACF,OAAO,MAAM,WAAY,SAAQ,KAAK,CAAC,aAAgD;QAAhF;;YACE,UAAK,GAAU,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;QA6BrC,CAAC;QA3BiB,iBAAiB;YAC/B,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;YAC9E,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QAEe,kBAAkB,CAAC,UAAuD;YACxF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QAEe,oBAAoB;YAClC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QACpB,CAAC;QAEe,MAAM;YACpB,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,wDAAwD;YAC7G,OAAO,CACL,oBAAC,SAAS,OAAK,KAAY,KAAM,IAAI,CAAC,KAAK,GAAI,CAChD,CAAC;QACJ,CAAC;QAEM,UAAU,CAAC,OAAe;YAC/B,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS;gBACtB,OAAO;YAET,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC;YAC3B,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC;KACF,CAAC;AACJ,CAAC,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 Common\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Timer } from \"../utils/Timer\";\r\n\r\n/** Properties for [[withTimeout]] React higher-order component\r\n * @public\r\n */\r\nexport interface WithTimeoutProps {\r\n /** Timeout duration in milliseconds */\r\n timeout: number;\r\n /** Callback function for timeout */\r\n onTimeout?: () => void;\r\n}\r\n\r\n/** withTimeout is a React higher-order component that adds timeout support.\r\n * @public\r\n */\r\nexport const withTimeout = <ComponentProps extends {}>(\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n Component: React.ComponentType<ComponentProps>,\r\n) => {\r\n return class WithTimeout extends React.PureComponent<ComponentProps & WithTimeoutProps> {\r\n public timer: Timer = new Timer(0);\r\n\r\n public override componentDidMount(): void {\r\n this.timer.setOnExecute(() => this.props.onTimeout && this.props.onTimeout());\r\n this.startTimer(this.props.timeout);\r\n }\r\n\r\n public override componentDidUpdate(_prevProps: Readonly<ComponentProps & WithTimeoutProps>): void {\r\n this.startTimer(this.props.timeout);\r\n }\r\n\r\n public override componentWillUnmount(): void {\r\n this.timer.stop();\r\n }\r\n\r\n public override render() {\r\n const { timeout, onTimeout, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n return (\r\n <Component {...props as any} {...this.state} />\r\n );\r\n }\r\n\r\n public startTimer(timeout: number) {\r\n if (this.timer.isRunning)\r\n return;\r\n\r\n this.timer.delay = timeout;\r\n this.timer.start();\r\n }\r\n };\r\n};\r\n"]}
@@ -13,7 +13,7 @@ export declare type IconSpec = string | ConditionalStringValue | React.ReactNode
13
13
  * @public
14
14
  */
15
15
  export interface IconProps extends CommonProps {
16
- /** CSS class name or SvgSprite/SvgPath for icon. This is optional because it is improperly
16
+ /** CSS class name or SvgPath for icon. This is optional because it is improperly
17
17
  * used to extend other interfaces and changing it would break existing API.
18
18
  */
19
19
  iconSpec?: IconSpec;
@@ -1 +1 @@
1
- {"version":3,"file":"IconComponent.d.ts","sourceRoot":"","sources":["../../../../src/core-react/icons/IconComponent.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,sBAAsB,EAAqB,MAAM,uBAAuB,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;GAEG;AACH,oBAAY,QAAQ,GAAG,MAAM,GAAG,sBAAsB,GAAG,KAAK,CAAC,SAAS,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,sBAgDpC"}
1
+ {"version":3,"file":"IconComponent.d.ts","sourceRoot":"","sources":["../../../../src/core-react/icons/IconComponent.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,sBAAsB,EAAqB,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;GAEG;AACH,oBAAY,QAAQ,GAAG,MAAM,GAAG,sBAAsB,GAAG,KAAK,CAAC,SAAS,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,sBAwCpC"}
@@ -10,7 +10,6 @@ import "./IconComponent.scss";
10
10
  import * as React from "react";
11
11
  import classnames from "classnames";
12
12
  import { ConditionalStringValue, IconSpecUtilities } from "@itwin/appui-abstract";
13
- import { SvgSprite } from "./SvgSprite";
14
13
  import DOMPurify, * as DOMPurifyNS from "dompurify";
15
14
  /** Icon Functional component displays an icon based on an [[IconSpec]].
16
15
  * @public
@@ -21,11 +20,6 @@ export function Icon(props) {
21
20
  const iconString = (typeof props.iconSpec === "string" || props.iconSpec instanceof ConditionalStringValue) ?
22
21
  ConditionalStringValue.getValue(props.iconSpec) : undefined;
23
22
  if (iconString) {
24
- const svgSource = IconSpecUtilities.getSvgSource(iconString);
25
- // if string begins with "svg:" then we assume it was imported (into extension source file) using webpack loader svg-sprite-loader
26
- if (svgSource !== undefined)
27
- return (React.createElement("i", { className: classnames("icon", "core-svg-icon", props.className), style: props.style },
28
- React.createElement(SvgSprite, { src: svgSource })));
29
23
  const webComponentString = IconSpecUtilities.getWebComponentSource(iconString);
30
24
  if (webComponentString) {
31
25
  const svgLoader = `<svg-loader src="${webComponentString}"></svg-loader>`;
@@ -46,6 +40,6 @@ export function Icon(props) {
46
40
  }
47
41
  return (React.createElement("i", { className: classnames("icon", iconString, props.className), style: props.style }));
48
42
  }
49
- return (React.createElement("i", { className: classnames("icon", "core-svg-icon", props.className), style: props.style }, props.iconSpec));
43
+ return (React.createElement("i", { className: classnames("icon", "core-svg-icon", props.className), style: props.style }, props.iconSpec instanceof ConditionalStringValue ? undefined : props.iconSpec));
50
44
  }
51
45
  //# sourceMappingURL=IconComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconComponent.js","sourceRoot":"","sources":["../../../../src/core-react/icons/IconComponent.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,SAAS,EAAE,KAAK,WAAW,MAAM,WAAW,CAAC;AAiBpD;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,IAAI,CAAC,KAAK,CAAC,QAAQ;QACjB,OAAO,IAAI,CAAC;IAEd,MAAM,UAAU,GAAG,CAAC,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,YAAY,sBAAsB,CAAC,CAAC,CAAC;QAC3G,sBAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAE9D,IAAI,UAAU,EAAE;QACd,MAAM,SAAS,GAAG,iBAAiB,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAC7D,kIAAkI;QAClI,IAAI,SAAS,KAAK,SAAS;YACzB,OAAO,CACL,2BAAG,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK;gBACpF,oBAAC,SAAS,IAAC,GAAG,EAAE,SAAS,GAAI,CAC3B,CACL,CAAC;QACJ,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;QAC/E,IAAI,kBAAkB,EAAE;YACtB,MAAM,SAAS,GAAG,oBAAoB,kBAAkB,iBAAiB,CAAC;YAC1E,MAAM,MAAM,GAAG,QAAQ,SAAS,QAAQ,CAAC;YACzC,6EAA6E;YAC7E,iFAAiF;YACjF,uBAAuB;YACvB,MAAM,SAAS,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,WAAW,CAAC;YAE3C,MAAM,eAAe,GAAG;gBACtB,YAAY,EAAE,CAAC,YAAY,CAAC;gBAC5B,iBAAiB,EAAE,kBAAkB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;aACzE,CAAC;YAEF,MAAM,mBAAmB,GAAG,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;YACxE,iFAAiF;YACjF,+FAA+F;YAC/F,MAAM,gBAAgB,GAAG,6BAAK,uBAAuB,EAAE,EAAE,MAAM,EAAE,mBAAmB,EAAE,GAAQ,CAAC;YAC/F,OAAO,CACL,2BAAG,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,IAC/D,gBAAgB,CACf,CACL,CAAC;SACH;QACD,OAAO,CAAC,2BAAG,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI,CAAC,CAAC;KAChG;IAED,OAAO,CACL,2BAAG,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,IACnF,KAAK,CAAC,QAAQ,CACb,CACL,CAAC;AACJ,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/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Icon\r\n */\r\n\r\nimport \"./IconComponent.scss\";\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { ConditionalStringValue, IconSpecUtilities } from \"@itwin/appui-abstract\";\r\nimport { SvgSprite } from \"./SvgSprite\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport DOMPurify, * as DOMPurifyNS from \"dompurify\";\r\n\r\n/** Prototype for an IconSpec which can be a string, ReactNode or ConditionalStringValue.\r\n * @public\r\n */\r\nexport type IconSpec = string | ConditionalStringValue | React.ReactNode;\r\n\r\n/** Properties for the [[Icon]] React component\r\n * @public\r\n */\r\nexport interface IconProps extends CommonProps {\r\n /** CSS class name or SvgSprite/SvgPath for icon. This is optional because it is improperly\r\n * used to extend other interfaces and changing it would break existing API.\r\n */\r\n iconSpec?: IconSpec;\r\n}\r\n\r\n/** Icon Functional component displays an icon based on an [[IconSpec]].\r\n * @public\r\n */\r\nexport function Icon(props: IconProps) {\r\n if (!props.iconSpec)\r\n return null;\r\n\r\n const iconString = (typeof props.iconSpec === \"string\" || props.iconSpec instanceof ConditionalStringValue) ?\r\n ConditionalStringValue.getValue(props.iconSpec) : undefined;\r\n\r\n if (iconString) {\r\n const svgSource = IconSpecUtilities.getSvgSource(iconString);\r\n // if string begins with \"svg:\" then we assume it was imported (into extension source file) using webpack loader svg-sprite-loader\r\n if (svgSource !== undefined)\r\n return (\r\n <i className={classnames(\"icon\", \"core-svg-icon\", props.className)} style={props.style}>\r\n <SvgSprite src={svgSource} />\r\n </i>\r\n );\r\n const webComponentString = IconSpecUtilities.getWebComponentSource(iconString);\r\n if (webComponentString) {\r\n const svgLoader = `<svg-loader src=\"${webComponentString}\"></svg-loader>`;\r\n const svgDiv = `<div>${svgLoader}</div>`;\r\n // the esm build of dompurify has a default import but the cjs build does not\r\n // if there is a default export, use it (likely esm), otherwise use the namespace\r\n // istanbul ignore next\r\n const sanitizer = DOMPurify ?? DOMPurifyNS;\r\n\r\n const sanitizerConfig = {\r\n ALLOWED_TAGS: [\"svg-loader\"],\r\n ADD_URI_SAFE_ATTR: webComponentString.startsWith(\"data:\") ? [\"src\"] : [],\r\n };\r\n\r\n const sanitizedIconString = sanitizer.sanitize(svgDiv, sanitizerConfig);\r\n // we can safely disable jam3/no-sanitizer-with-danger as we are sanitizing above\r\n // eslint-disable-next-line @typescript-eslint/naming-convention, jam3/no-sanitizer-with-danger\r\n const webComponentNode = <div dangerouslySetInnerHTML={{ __html: sanitizedIconString }}></div>;\r\n return (\r\n <i className={classnames(\"icon\", \"core-svg-icon\", props.className)} >\r\n {webComponentNode}\r\n </i>\r\n );\r\n }\r\n return (<i className={classnames(\"icon\", iconString, props.className)} style={props.style} />);\r\n }\r\n\r\n return (\r\n <i className={classnames(\"icon\", \"core-svg-icon\", props.className)} style={props.style}>\r\n {props.iconSpec}\r\n </i>\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"IconComponent.js","sourceRoot":"","sources":["../../../../src/core-react/icons/IconComponent.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAElF,OAAO,SAAS,EAAE,KAAK,WAAW,MAAM,WAAW,CAAC;AAiBpD;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,IAAI,CAAC,KAAK,CAAC,QAAQ;QACjB,OAAO,IAAI,CAAC;IAEd,MAAM,UAAU,GAAG,CAAC,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,YAAY,sBAAsB,CAAC,CAAC,CAA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E,KAAK,EAAE,KAAK,CAAC,KAAK,IACnF,KAAK,CAAC,QAAQ,YAAY,sBAAsB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAC5E,CACL,CAAC;AACJ,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/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Icon\r\n */\r\n\r\nimport \"./IconComponent.scss\";\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { ConditionalStringValue, IconSpecUtilities } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport DOMPurify, * as DOMPurifyNS from \"dompurify\";\r\n\r\n/** Prototype for an IconSpec which can be a string, ReactNode or ConditionalStringValue.\r\n * @public\r\n */\r\nexport type IconSpec = string | ConditionalStringValue | React.ReactNode;\r\n\r\n/** Properties for the [[Icon]] React component\r\n * @public\r\n */\r\nexport interface IconProps extends CommonProps {\r\n /** CSS class name or SvgPath for icon. This is optional because it is improperly\r\n * used to extend other interfaces and changing it would break existing API.\r\n */\r\n iconSpec?: IconSpec;\r\n}\r\n\r\n/** Icon Functional component displays an icon based on an [[IconSpec]].\r\n * @public\r\n */\r\nexport function Icon(props: IconProps) {\r\n if (!props.iconSpec)\r\n return null;\r\n\r\n const iconString = (typeof props.iconSpec === \"string\" || props.iconSpec instanceof ConditionalStringValue) ?\r\n ConditionalStringValue.getValue(props.iconSpec) : undefined;\r\n\r\n if (iconString) {\r\n const webComponentString = IconSpecUtilities.getWebComponentSource(iconString);\r\n if (webComponentString) {\r\n const svgLoader = `<svg-loader src=\"${webComponentString}\"></svg-loader>`;\r\n const svgDiv = `<div>${svgLoader}</div>`;\r\n // the esm build of dompurify has a default import but the cjs build does not\r\n // if there is a default export, use it (likely esm), otherwise use the namespace\r\n // istanbul ignore next\r\n const sanitizer = DOMPurify ?? DOMPurifyNS;\r\n\r\n const sanitizerConfig = {\r\n ALLOWED_TAGS: [\"svg-loader\"],\r\n ADD_URI_SAFE_ATTR: webComponentString.startsWith(\"data:\") ? [\"src\"] : [],\r\n };\r\n\r\n const sanitizedIconString = sanitizer.sanitize(svgDiv, sanitizerConfig);\r\n // we can safely disable jam3/no-sanitizer-with-danger as we are sanitizing above\r\n // eslint-disable-next-line @typescript-eslint/naming-convention, jam3/no-sanitizer-with-danger\r\n const webComponentNode = <div dangerouslySetInnerHTML={{ __html: sanitizedIconString }}></div>;\r\n return (\r\n <i className={classnames(\"icon\", \"core-svg-icon\", props.className)} >\r\n {webComponentNode}\r\n </i>\r\n );\r\n }\r\n return (<i className={classnames(\"icon\", iconString, props.className)} style={props.style} />);\r\n }\r\n\r\n return (\r\n <i className={classnames(\"icon\", \"core-svg-icon\", props.className)} style={props.style}>\r\n {props.iconSpec instanceof ConditionalStringValue ? undefined : props.iconSpec}\r\n </i>\r\n );\r\n}\r\n"]}
@@ -1,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module Icon
3
3
  */
4
- import "./SvgSprite.scss";
4
+ import "./SvgPath.scss";
5
5
  import * as React from "react";
6
6
  import { CommonProps } from "../utils/Props";
7
7
  /** Properties of [[SvgPath]] component.
@@ -1 +1 @@
1
- {"version":3,"file":"SvgPath.d.ts","sourceRoot":"","sources":["../../../../src/core-react/icons/SvgPath.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,yBAAyB;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,wBAAwB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,qBAAa,OAAQ,SAAQ,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC;IAC5C,MAAM;CAqBvB"}
1
+ {"version":3,"file":"SvgPath.d.ts","sourceRoot":"","sources":["../../../../src/core-react/icons/SvgPath.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,gBAAgB,CAAC;AAExB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,yBAAyB;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,wBAAwB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,qBAAa,OAAQ,SAAQ,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC;IAC5C,MAAM;CAqBvB"}
@@ -5,7 +5,7 @@
5
5
  /** @packageDocumentation
6
6
  * @module Icon
7
7
  */
8
- import "./SvgSprite.scss";
8
+ import "./SvgPath.scss";
9
9
  import classnames from "classnames";
10
10
  import * as React from "react";
11
11
  /** Svg element wrapper with specified Svg paths.
@@ -13,7 +13,7 @@ import * as React from "react";
13
13
  */
14
14
  export class SvgPath extends React.PureComponent {
15
15
  render() {
16
- const className = classnames("core-icons-svgSprite", this.props.className);
16
+ const className = classnames("core-icons-svgPath", this.props.className);
17
17
  const viewBox = `0 0 ${this.props.viewBoxWidth} ${this.props.viewBoxHeight}`;
18
18
  return (React.createElement("svg", { className: className, style: this.props.style, width: "100%", height: "100%", viewBox: viewBox },
19
19
  React.createElement("g", null, this.props.paths.map((path, index) => {
@@ -1 +1 @@
1
- {"version":3,"file":"SvgPath.js","sourceRoot":"","sources":["../../../../src/core-react/icons/SvgPath.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,KAAK,CAAC,aAA2B;IAC5C,MAAM;QACpB,MAAM,SAAS,GAAG,UAAU,CAC1B,sBAAsB,EACtB,IAAI,CAAC,KAAK,CAAC,SAAS,CACrB,CAAC;QACF,MAAM,OAAO,GAAG,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QAE7E,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAE,OAAO;YAC7F,+BAEI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAY,EAAE,KAAa,EAAE,EAAE;gBACnD,OAAO,CACL,8BAAM,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,GAAI,CAC9B,CAAC;YACJ,CAAC,CAAC,CAEF,CACA,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 Icon\r\n */\r\n\r\nimport \"./SvgSprite.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties of [[SvgPath]] component.\r\n * @public\r\n */\r\nexport interface SvgPathProps extends CommonProps {\r\n /** Svg graphics paths */\r\n paths: string[];\r\n /** Svg viewBox width */\r\n viewBoxWidth: number;\r\n /** Svg viewBox height */\r\n viewBoxHeight: number;\r\n}\r\n\r\n/** Svg element wrapper with specified Svg paths.\r\n * @public\r\n */\r\nexport class SvgPath extends React.PureComponent<SvgPathProps> {\r\n public override render() {\r\n const className = classnames(\r\n \"core-icons-svgSprite\",\r\n this.props.className,\r\n );\r\n const viewBox = `0 0 ${this.props.viewBoxWidth} ${this.props.viewBoxHeight}`;\r\n\r\n return (\r\n <svg className={className} style={this.props.style} width=\"100%\" height=\"100%\" viewBox={viewBox}>\r\n <g>\r\n {\r\n this.props.paths.map((path: string, index: number) => {\r\n return (\r\n <path d={path} key={index} />\r\n );\r\n })\r\n }\r\n </g>\r\n </svg>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"SvgPath.js","sourceRoot":"","sources":["../../../../src/core-react/icons/SvgPath.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,gBAAgB,CAAC;AACxB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,KAAK,CAAC,aAA2B;IAC5C,MAAM;QACpB,MAAM,SAAS,GAAG,UAAU,CAC1B,oBAAoB,EACpB,IAAI,CAAC,KAAK,CAAC,SAAS,CACrB,CAAC;QACF,MAAM,OAAO,GAAG,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QAE7E,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAE,OAAO;YAC7F,+BAEI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAY,EAAE,KAAa,EAAE,EAAE;gBACnD,OAAO,CACL,8BAAM,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,GAAI,CAC9B,CAAC;YACJ,CAAC,CAAC,CAEF,CACA,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 Icon\r\n */\r\n\r\nimport \"./SvgPath.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties of [[SvgPath]] component.\r\n * @public\r\n */\r\nexport interface SvgPathProps extends CommonProps {\r\n /** Svg graphics paths */\r\n paths: string[];\r\n /** Svg viewBox width */\r\n viewBoxWidth: number;\r\n /** Svg viewBox height */\r\n viewBoxHeight: number;\r\n}\r\n\r\n/** Svg element wrapper with specified Svg paths.\r\n * @public\r\n */\r\nexport class SvgPath extends React.PureComponent<SvgPathProps> {\r\n public override render() {\r\n const className = classnames(\r\n \"core-icons-svgPath\",\r\n this.props.className,\r\n );\r\n const viewBox = `0 0 ${this.props.viewBoxWidth} ${this.props.viewBoxHeight}`;\r\n\r\n return (\r\n <svg className={className} style={this.props.style} width=\"100%\" height=\"100%\" viewBox={viewBox}>\r\n <g>\r\n {\r\n this.props.paths.map((path: string, index: number) => {\r\n return (\r\n <path d={path} key={index} />\r\n );\r\n })\r\n }\r\n </g>\r\n </svg>\r\n );\r\n }\r\n}\r\n"]}
@@ -2,7 +2,7 @@
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
- .core-icons-svgSprite {
5
+ .core-icons-svgPath {
6
6
  display: inline-block;
7
7
  box-sizing: border-box;
8
8
  background-color: transparent;
@@ -4,7 +4,6 @@
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  @import "../style/index.scss";
6
6
  @import "../icons/variables.scss";
7
- @import "~@itwin/itwinui-css/scss/style/variables";
8
7
 
9
8
  .core-image-checkbox {
10
9
  display: inline-block;
@@ -39,7 +38,7 @@
39
38
 
40
39
  input[type="checkbox"]:disabled:not(:checked) + .image,
41
40
  input[type="checkbox"]:disabled:checked + .image {
42
- opacity: .25;
41
+ opacity: 0.25;
43
42
  }
44
43
 
45
44
  /* accessibility */
@@ -49,7 +48,7 @@
49
48
  }
50
49
  .image-checkbox-border {
51
50
  border: 1px solid $buic-foreground-disabled;
52
- background-color: $buic-background-control;
53
- border-radius: $iui-border-radius;
51
+ background-color: $buic-background-control;
52
+ border-radius: var(--iui-border-radius-1);
54
53
  padding: 1px 3px 0 2px;
55
- }
54
+ }
@@ -19,9 +19,5 @@
19
19
  @import "./icons/index";
20
20
  @import "./inputs/index";
21
21
  @import "./loading/index";
22
- @import "./progress-indicators/index";
23
- @import "./radio/index";
24
- @import "./select/index";
25
22
  @import "./tabs/index";
26
23
  @import "./text/index";
27
- @import "./tiles/index";
@@ -4,8 +4,7 @@
4
4
  import * as React from "react";
5
5
  import { CommonProps } from "../utils/Props";
6
6
  /** Properties for the [[Input]] component
7
- * @public
8
- * @deprecated in 3.0. Use InputProps in itwinui-react instead
7
+ * @internal
9
8
  */
10
9
  export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps {
11
10
  /** Indicates whether to set focus to the input element */
@@ -16,8 +15,7 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>,
16
15
  ref?: React.Ref<HTMLInputElement>;
17
16
  }
18
17
  /** Basic text input, is a wrapper for the `<input type="text">` HTML element.
19
- * @public
20
- * @deprecated in 3.0. Use Input in itwinui-react instead
18
+ * @internal
21
19
  */
22
20
  export declare const Input: (props: InputProps) => JSX.Element | null;
23
21
  //# sourceMappingURL=Input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/core-react/inputs/Input.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,WAAW;IAC1F,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,gBAAgB,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C,+DAA+D;IAC/D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACnC;AAuCD;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAC,OAAO,GAAG,IAAsB,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/core-react/inputs/Input.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,WAAW;IAC1F,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,gBAAgB,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C,+DAA+D;IAC/D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACnC;AAuCD;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAC,OAAO,GAAG,IAAsB,CAAC"}
@@ -37,8 +37,7 @@ function ForwardRefInput(props, ref) {
37
37
  return (React.createElement(ITwinUI_Input, { ref: refs, type: "text", ...otherProps, onFocus: handleFocus, className: classnames("uicore-inputs-input", className), style: style }));
38
38
  });
39
39
  /** Basic text input, is a wrapper for the `<input type="text">` HTML element.
40
- * @public
41
- * @deprecated in 3.0. Use Input in itwinui-react instead
40
+ * @internal
42
41
  */
43
42
  export const Input = ForwardRefInput; // eslint-disable-line deprecation/deprecation
44
43
  //# sourceMappingURL=Input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/Input.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAgBjD,0GAA0G;AAC1G,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAAkC,8CAA8C;AACtH,SAAS,eAAe,CAAC,KAAK,EAAE,GAAG;IACjC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC,CAAC,wDAAwD;IAC7I,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAmB,IAAI,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC,CAAE,uGAAuG;IAEpJ,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,cAAc,GAAG,eAAe,CAAC,OAAO,CAAC;QAC/C,MAAM,cAAc,GAAG,gBAAgB,CAAC;QAExC,IAAI,cAAc,IAAI,cAAc,EAAE;YACpC,cAAc,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;SAC5D;QACD,OAAO,GAAG,EAAE;YACV,IAAI,cAAc,IAAI,cAAc,EAAE;gBACpC,cAAc,CAAC,mBAAmB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;aAC/D;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,eAAe,CAAC,OAAO,IAAI,QAAQ;YACrC,eAAe,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACpC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,KAAyC,EAAE,EAAE;QAClF,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,aAAa,IAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,KAAK,UAAU,EAAE,OAAO,EAAE,WAAW,EACxE,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,CAC5E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAA8C,eAAe,CAAC,CAAE,8CAA8C","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 Inputs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Input as ITwinUI_Input } from \"@itwin/itwinui-react\";\r\nimport { useRefs } from \"../utils/hooks/useRefs\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[Input]] component\r\n * @public\r\n * @deprecated in 3.0. Use InputProps in itwinui-react instead\r\n */\r\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps {\r\n /** Indicates whether to set focus to the input element */\r\n setFocus?: boolean;\r\n /** Native keydown event handler */\r\n nativeKeyHandler?: (e: KeyboardEvent) => void;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\n// Defined using following pattern (const Input at bottom) to ensure useful API documentation is extracted\r\nconst ForwardRefInput = React.forwardRef<HTMLInputElement, InputProps>( // eslint-disable-line deprecation/deprecation\r\n function ForwardRefInput(props, ref) {\r\n const { className, style, setFocus, nativeKeyHandler, size, ...otherProps } = props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const inputElementRef = React.useRef<HTMLInputElement>(null);\r\n const refs = useRefs(inputElementRef, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n\r\n React.useEffect(() => {\r\n const currentElement = inputElementRef.current;\r\n const currentHandler = nativeKeyHandler;\r\n\r\n if (currentElement && currentHandler) {\r\n currentElement.addEventListener(\"keydown\", currentHandler);\r\n }\r\n return () => {\r\n if (currentHandler && currentElement) {\r\n currentElement.removeEventListener(\"keydown\", currentHandler);\r\n }\r\n };\r\n }, [nativeKeyHandler]);\r\n\r\n React.useEffect(() => {\r\n if (inputElementRef.current && setFocus)\r\n inputElementRef.current.focus();\r\n }, [setFocus]);\r\n\r\n const handleFocus = React.useCallback((event: React.FocusEvent<HTMLInputElement>) => {\r\n event.currentTarget.select();\r\n }, []);\r\n\r\n return (\r\n <ITwinUI_Input ref={refs} type=\"text\" {...otherProps} onFocus={handleFocus}\r\n className={classnames(\"uicore-inputs-input\", className)} style={style} />\r\n );\r\n }\r\n);\r\n\r\n/** Basic text input, is a wrapper for the `<input type=\"text\">` HTML element.\r\n * @public\r\n * @deprecated in 3.0. Use Input in itwinui-react instead\r\n */\r\nexport const Input: (props: InputProps) => JSX.Element | null = ForwardRefInput; // eslint-disable-line deprecation/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AQ;YACrC,eAAe,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACpC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,KAAyC,EAAE,EAAE;QAClF,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,aAAa,IAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,KAAK,UAAU,EAAE,OAAO,EAAE,WAAW,EACxE,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,CAC5E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAA8C,eAAe,CAAC,CAAE,8CAA8C","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 Inputs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Input as ITwinUI_Input } from \"@itwin/itwinui-react\";\r\nimport { useRefs } from \"../utils/hooks/useRefs\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[Input]] component\r\n * @internal\r\n */\r\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps {\r\n /** Indicates whether to set focus to the input element */\r\n setFocus?: boolean;\r\n /** Native keydown event handler */\r\n nativeKeyHandler?: (e: KeyboardEvent) => void;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\n// Defined using following pattern (const Input at bottom) to ensure useful API documentation is extracted\r\nconst ForwardRefInput = React.forwardRef<HTMLInputElement, InputProps>( // eslint-disable-line deprecation/deprecation\r\n function ForwardRefInput(props, ref) {\r\n const { className, style, setFocus, nativeKeyHandler, size, ...otherProps } = props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const inputElementRef = React.useRef<HTMLInputElement>(null);\r\n const refs = useRefs(inputElementRef, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n\r\n React.useEffect(() => {\r\n const currentElement = inputElementRef.current;\r\n const currentHandler = nativeKeyHandler;\r\n\r\n if (currentElement && currentHandler) {\r\n currentElement.addEventListener(\"keydown\", currentHandler);\r\n }\r\n return () => {\r\n if (currentHandler && currentElement) {\r\n currentElement.removeEventListener(\"keydown\", currentHandler);\r\n }\r\n };\r\n }, [nativeKeyHandler]);\r\n\r\n React.useEffect(() => {\r\n if (inputElementRef.current && setFocus)\r\n inputElementRef.current.focus();\r\n }, [setFocus]);\r\n\r\n const handleFocus = React.useCallback((event: React.FocusEvent<HTMLInputElement>) => {\r\n event.currentTarget.select();\r\n }, []);\r\n\r\n return (\r\n <ITwinUI_Input ref={refs} type=\"text\" {...otherProps} onFocus={handleFocus}\r\n className={classnames(\"uicore-inputs-input\", className)} style={style} />\r\n );\r\n }\r\n);\r\n\r\n/** Basic text input, is a wrapper for the `<input type=\"text\">` HTML element.\r\n * @internal\r\n */\r\nexport const Input: (props: InputProps) => JSX.Element | null = ForwardRefInput; // eslint-disable-line deprecation/deprecation\r\n"]}
@@ -9,6 +9,8 @@ import { LabeledComponentProps, MessagedComponentProps } from "./LabeledComponen
9
9
  */
10
10
  export interface InputLabelProps extends LabeledComponentProps, MessagedComponentProps, CommonProps {
11
11
  disabled?: boolean;
12
+ /** Labeled content */
13
+ children?: React.ReactNode;
12
14
  }
13
15
  /** Text input wrapper that provides additional styling and labeling
14
16
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"InputLabel.d.ts","sourceRoot":"","sources":["../../../../src/core-react/inputs/InputLabel.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAExF;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,qBAAqB,EAAE,sBAAsB,EAAE,WAAW;IACjG,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC;IAClD,MAAM,IAAI,GAAG,CAAC,OAAO;CA2BtC"}
1
+ {"version":3,"file":"InputLabel.d.ts","sourceRoot":"","sources":["../../../../src/core-react/inputs/InputLabel.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAExF;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,qBAAqB,EAAE,sBAAsB,EAAE,WAAW;IACjG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC;IAClD,MAAM,IAAI,GAAG,CAAC,OAAO;CA2BtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"InputLabel.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/InputLabel.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK,CAAC,aAA8B;IAClD,MAAM;QACpB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EACrC,cAAc,EAAE,UAAU,EAC1B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzD,OAAO,CACL,+BAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CACxC,6BAA6B,EAC7B,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACxC,MAAM,EACN,SAAS,CACV;YACE,KAAK;gBACJ,6BAAK,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU;;oBAAI,KAAK;wBAAQ;YAEhG,6BAAK,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;gBAC3D,IAAI,CAAC,KAAK,CAAC,QAAQ;gBACnB,MAAM;oBACL,2BAAG,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,eAAe,MAAM,EAAE,CAAC,GAAI,CAE3D;YACL,OAAO;gBACN,6BAAK,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,IAAG,OAAO,CAAO,CAEhG,CACT,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 Inputs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { LabeledComponentProps, MessagedComponentProps } from \"./LabeledComponentProps\";\r\n\r\n/** Properties for [[InputLabel]] components\r\n * @public\r\n */\r\nexport interface InputLabelProps extends LabeledComponentProps, MessagedComponentProps, CommonProps {\r\n disabled?: boolean;\r\n}\r\n\r\n/** Text input wrapper that provides additional styling and labeling\r\n * @public\r\n */\r\nexport class InputLabel extends React.PureComponent<InputLabelProps> {\r\n public override render(): JSX.Element {\r\n const { label, status, className, style,\r\n labelClassName, labelStyle,\r\n message, messageClassName, messageStyle } = this.props;\r\n\r\n return (\r\n <label style={style} className={classnames(\r\n \"uicore-inputs-labeled-input\",\r\n this.props.disabled && \"uicore-disabled\",\r\n status,\r\n className,\r\n )}>\r\n {label &&\r\n <div className={classnames(\"uicore-label\", labelClassName)} style={labelStyle}> {label} </div>\r\n }\r\n <div className={classnames(\"input\", { \"with-icon\": !!status })}>\r\n {this.props.children}\r\n {status &&\r\n <i className={classnames(\"icon\", `icon-status-${status}`)} />\r\n }\r\n </div>\r\n {message &&\r\n <div className={classnames(\"uicore-message\", messageClassName)} style={messageStyle}>{message}</div>\r\n }\r\n </label>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"InputLabel.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/InputLabel.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK,CAAC,aAA8B;IAClD,MAAM;QACpB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EACrC,cAAc,EAAE,UAAU,EAC1B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzD,OAAO,CACL,+BAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CACxC,6BAA6B,EAC7B,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACxC,MAAM,EACN,SAAS,CACV;YACE,KAAK;gBACJ,6BAAK,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU;;oBAAI,KAAK;wBAAQ;YAEhG,6BAAK,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;gBAC3D,IAAI,CAAC,KAAK,CAAC,QAAQ;gBACnB,MAAM;oBACL,2BAAG,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,eAAe,MAAM,EAAE,CAAC,GAAI,CAE3D;YACL,OAAO;gBACN,6BAAK,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,IAAG,OAAO,CAAO,CAEhG,CACT,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 Inputs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { LabeledComponentProps, MessagedComponentProps } from \"./LabeledComponentProps\";\r\n\r\n/** Properties for [[InputLabel]] components\r\n * @public\r\n */\r\nexport interface InputLabelProps extends LabeledComponentProps, MessagedComponentProps, CommonProps {\r\n disabled?: boolean;\r\n /** Labeled content */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/** Text input wrapper that provides additional styling and labeling\r\n * @public\r\n */\r\nexport class InputLabel extends React.PureComponent<InputLabelProps> {\r\n public override render(): JSX.Element {\r\n const { label, status, className, style,\r\n labelClassName, labelStyle,\r\n message, messageClassName, messageStyle } = this.props;\r\n\r\n return (\r\n <label style={style} className={classnames(\r\n \"uicore-inputs-labeled-input\",\r\n this.props.disabled && \"uicore-disabled\",\r\n status,\r\n className,\r\n )}>\r\n {label &&\r\n <div className={classnames(\"uicore-label\", labelClassName)} style={labelStyle}> {label} </div>\r\n }\r\n <div className={classnames(\"input\", { \"with-icon\": !!status })}>\r\n {this.props.children}\r\n {status &&\r\n <i className={classnames(\"icon\", `icon-status-${status}`)} />\r\n }\r\n </div>\r\n {message &&\r\n <div className={classnames(\"uicore-message\", messageClassName)} style={messageStyle}>{message}</div>\r\n }\r\n </label>\r\n );\r\n }\r\n}\r\n"]}
@@ -6,5 +6,3 @@
6
6
 
7
7
  .uicore-inputs-input { @include uicore-inputs-input; }
8
8
  .uicore-inputs-labeled-input { @include uicore-inputs-labeled-input; }
9
- .uicore-inputs-labeled-textarea { @include uicore-inputs-labeled-textarea; }
10
- .uicore-inputs-textarea { @include uicore-inputs-textarea; }
@@ -6,6 +6,4 @@
6
6
 
7
7
  @import "./variables";
8
8
  @import "./input";
9
- @import "./labeled-input";
10
- @import "./labeled-textarea";
11
- @import "./textarea";
9
+ @import "./input-label";