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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (728) hide show
  1. package/CHANGELOG.md +1 -93
  2. package/lib/cjs/core-react/UiCore.d.ts +1 -1
  3. package/lib/cjs/core-react/UiCore.js +1 -1
  4. package/lib/cjs/core-react/UiCore.js.map +1 -1
  5. package/lib/cjs/core-react/_typography.scss +7 -8
  6. package/lib/cjs/core-react/autosuggest/AutoSuggest.js +1 -1
  7. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  8. package/lib/cjs/core-react/autosuggest/AutoSuggest.scss +7 -10
  9. package/lib/cjs/core-react/badge/BetaBadge.d.ts +0 -1
  10. package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
  11. package/lib/cjs/core-react/badge/BetaBadge.js +0 -1
  12. package/lib/cjs/core-react/badge/BetaBadge.js.map +1 -1
  13. package/lib/cjs/core-react/badge/NewBadge.scss +1 -1
  14. package/lib/cjs/core-react/button/blue.scss +3 -11
  15. package/lib/cjs/core-react/button/button.scss +31 -42
  16. package/lib/cjs/core-react/button/hollow.scss +5 -5
  17. package/lib/cjs/core-react/button/primary.scss +3 -11
  18. package/lib/cjs/core-react/button/variables.scss +10 -7
  19. package/lib/cjs/core-react/checkbox/checkbox.scss +15 -20
  20. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +4 -1
  21. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  22. package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
  23. package/lib/cjs/core-react/checklistbox/CheckListBox.scss +1 -1
  24. package/lib/cjs/core-react/classes.scss +0 -5
  25. package/lib/cjs/core-react/colorthemes.scss +15 -12
  26. package/lib/cjs/core-react/colorvariables.scss +65 -50
  27. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +2 -0
  28. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  29. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  30. package/lib/cjs/core-react/contextmenu/ContextMenu.scss +19 -21
  31. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  32. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +5 -2
  33. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  34. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  35. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js +7 -3
  36. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  37. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  38. package/lib/cjs/core-react/dialog/Dialog.js +16 -7
  39. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  40. package/lib/cjs/core-react/dialog/Dialog.scss +27 -27
  41. package/lib/cjs/core-react/elementseparator/ElementSeparator.scss +1 -1
  42. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +2 -0
  43. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  44. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  45. package/lib/cjs/core-react/expandable/list.scss +7 -17
  46. package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
  47. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts +27 -0
  48. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts.map +1 -0
  49. package/lib/cjs/core-react/icons/ConditionalIconItem.js +65 -0
  50. package/lib/cjs/core-react/icons/ConditionalIconItem.js.map +1 -0
  51. package/lib/cjs/core-react/icons/IconComponent.d.ts +3 -2
  52. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  53. package/lib/cjs/core-react/icons/IconComponent.js +1 -7
  54. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  55. package/lib/cjs/core-react/icons/SvgPath.d.ts +1 -1
  56. package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
  57. package/lib/cjs/core-react/icons/SvgPath.js +2 -2
  58. package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
  59. package/lib/{esm/core-react/icons/SvgSprite.scss → cjs/core-react/icons/SvgPath.scss} +1 -1
  60. package/lib/cjs/core-react/icons/WebFontIcon.d.ts +0 -1
  61. package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
  62. package/lib/cjs/core-react/icons/WebFontIcon.js +0 -1
  63. package/lib/cjs/core-react/icons/WebFontIcon.js.map +1 -1
  64. package/lib/cjs/core-react/icons/variables.scss +0 -9
  65. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.scss +6 -7
  66. package/lib/cjs/core-react/index.scss +0 -4
  67. package/lib/cjs/core-react/inputs/Input.d.ts +2 -4
  68. package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
  69. package/lib/cjs/core-react/inputs/Input.js +1 -2
  70. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  71. package/lib/cjs/core-react/inputs/InputLabel.d.ts +2 -0
  72. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  73. package/lib/cjs/core-react/inputs/InputLabel.js +9 -1
  74. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  75. package/lib/cjs/core-react/inputs/classes.scss +0 -2
  76. package/lib/cjs/core-react/inputs/index.scss +1 -3
  77. package/lib/cjs/core-react/inputs/input-label.scss +90 -0
  78. package/lib/cjs/core-react/inputs/input.scss +36 -38
  79. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +5 -0
  80. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  81. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +13 -8
  82. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  83. package/lib/cjs/core-react/inputs/numberinput/NumberInput.scss +12 -13
  84. package/lib/cjs/core-react/inputs/variables.scss +20 -15
  85. package/lib/cjs/core-react/listbox/Listbox.scss +11 -11
  86. package/lib/cjs/core-react/loading/LoadingPrompt.scss +2 -2
  87. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +1 -2
  88. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  89. package/lib/cjs/core-react/loading/LoadingSpinner.js +1 -16
  90. package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
  91. package/lib/cjs/core-react/loading/LoadingSpinner.scss +5 -6
  92. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +17 -1
  93. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  94. package/lib/cjs/core-react/messagebox/MessageBox.js +54 -10
  95. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  96. package/lib/cjs/core-react/messagebox/MessageBox.scss +24 -14
  97. package/lib/cjs/core-react/popup/Popup.d.ts +2 -0
  98. package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
  99. package/lib/cjs/core-react/popup/Popup.js +4 -1
  100. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  101. package/lib/cjs/core-react/popup/Popup.scss +123 -123
  102. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +4 -0
  103. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  104. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  105. package/lib/cjs/core-react/radialmenu/RadialMenu.scss +2 -3
  106. package/lib/cjs/core-react/searchbox/SearchBox.d.ts.map +1 -1
  107. package/lib/cjs/core-react/searchbox/SearchBox.js +8 -6
  108. package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
  109. package/lib/cjs/core-react/searchbox/SearchBox.scss +5 -10
  110. package/lib/cjs/core-react/settings/SettingsContainer.js +1 -1
  111. package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
  112. package/lib/cjs/core-react/settings/SettingsContainer.scss +11 -8
  113. package/lib/cjs/core-react/style/baseline.scss +6 -8
  114. package/lib/cjs/core-react/style/data-viz.scss +11 -14
  115. package/lib/cjs/core-react/style/mixins.scss +2 -3
  116. package/lib/cjs/core-react/style/opacity.scss +9 -10
  117. package/lib/cjs/core-react/style/space.scss +9 -13
  118. package/lib/cjs/core-react/style/speed.scss +3 -7
  119. package/lib/cjs/core-react/style/themecolors.scss +0 -6
  120. package/lib/cjs/core-react/style/typography.scss +22 -26
  121. package/lib/cjs/core-react/style/variables.scss +4 -8
  122. package/lib/cjs/core-react/tabs/Tabs.d.ts +1 -1
  123. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  124. package/lib/cjs/core-react/tabs/classes.scss +0 -1
  125. package/lib/cjs/core-react/tabs/index.scss +0 -1
  126. package/lib/cjs/core-react/tabs/tabs.scss +40 -61
  127. package/lib/cjs/core-react/tabs/vertical.scss +20 -33
  128. package/lib/cjs/core-react/text/BlockText.d.ts.map +1 -1
  129. package/lib/cjs/core-react/text/BlockText.js +1 -0
  130. package/lib/cjs/core-react/text/BlockText.js.map +1 -1
  131. package/lib/cjs/core-react/text/BodyText.d.ts +1 -0
  132. package/lib/cjs/core-react/text/BodyText.d.ts.map +1 -1
  133. package/lib/cjs/core-react/text/BodyText.js +2 -0
  134. package/lib/cjs/core-react/text/BodyText.js.map +1 -1
  135. package/lib/cjs/core-react/text/DisabledText.d.ts.map +1 -1
  136. package/lib/cjs/core-react/text/DisabledText.js +1 -0
  137. package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
  138. package/lib/cjs/core-react/text/MutedText.d.ts +1 -0
  139. package/lib/cjs/core-react/text/MutedText.d.ts.map +1 -1
  140. package/lib/cjs/core-react/text/MutedText.js +2 -0
  141. package/lib/cjs/core-react/text/MutedText.js.map +1 -1
  142. package/lib/cjs/core-react/text/StyledText.d.ts +1 -0
  143. package/lib/cjs/core-react/text/StyledText.d.ts.map +1 -1
  144. package/lib/cjs/core-react/text/StyledText.js +1 -0
  145. package/lib/cjs/core-react/text/StyledText.js.map +1 -1
  146. package/lib/cjs/core-react/text/block.scss +9 -4
  147. package/lib/cjs/core-react/text/body.scss +7 -4
  148. package/lib/cjs/core-react/text/classes.scss +0 -8
  149. package/lib/cjs/core-react/text/index.scss +0 -8
  150. package/lib/cjs/core-react/text/mixins.scss +10 -48
  151. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  152. package/lib/cjs/core-react/tree/ExpansionToggle.js +3 -1
  153. package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
  154. package/lib/cjs/core-react/tree/ExpansionToggle.scss +7 -4
  155. package/lib/cjs/core-react/tree/Node.scss +8 -9
  156. package/lib/cjs/core-react/tree/Placeholder.scss +1 -4
  157. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.d.ts.map +1 -1
  158. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js +2 -2
  159. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
  160. package/lib/cjs/core-react/utils/hooks/useRefs.d.ts +1 -1
  161. package/lib/cjs/core-react/utils/hooks/useRefs.d.ts.map +1 -1
  162. package/lib/cjs/core-react/utils/hooks/useRefs.js.map +1 -1
  163. package/lib/cjs/core-react.d.ts +2 -41
  164. package/lib/cjs/core-react.d.ts.map +1 -1
  165. package/lib/cjs/core-react.js +2 -41
  166. package/lib/cjs/core-react.js.map +1 -1
  167. package/lib/esm/core-react/UiCore.d.ts +1 -1
  168. package/lib/esm/core-react/UiCore.js +1 -1
  169. package/lib/esm/core-react/UiCore.js.map +1 -1
  170. package/lib/esm/core-react/_typography.scss +7 -8
  171. package/lib/esm/core-react/autosuggest/AutoSuggest.js +1 -1
  172. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  173. package/lib/esm/core-react/autosuggest/AutoSuggest.scss +7 -10
  174. package/lib/esm/core-react/badge/BetaBadge.d.ts +0 -1
  175. package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
  176. package/lib/esm/core-react/badge/BetaBadge.js +0 -1
  177. package/lib/esm/core-react/badge/BetaBadge.js.map +1 -1
  178. package/lib/esm/core-react/badge/NewBadge.scss +1 -1
  179. package/lib/esm/core-react/button/blue.scss +3 -11
  180. package/lib/esm/core-react/button/button.scss +31 -42
  181. package/lib/esm/core-react/button/hollow.scss +5 -5
  182. package/lib/esm/core-react/button/primary.scss +3 -11
  183. package/lib/esm/core-react/button/variables.scss +10 -7
  184. package/lib/esm/core-react/checkbox/checkbox.scss +15 -20
  185. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +4 -1
  186. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  187. package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
  188. package/lib/esm/core-react/checklistbox/CheckListBox.scss +1 -1
  189. package/lib/esm/core-react/classes.scss +0 -5
  190. package/lib/esm/core-react/colorthemes.scss +15 -12
  191. package/lib/esm/core-react/colorvariables.scss +65 -50
  192. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +2 -0
  193. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  194. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  195. package/lib/esm/core-react/contextmenu/ContextMenu.scss +19 -21
  196. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  197. package/lib/esm/core-react/contextmenu/ContextSubMenu.js +6 -3
  198. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  199. package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  200. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js +7 -3
  201. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  202. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  203. package/lib/esm/core-react/dialog/Dialog.js +16 -7
  204. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  205. package/lib/esm/core-react/dialog/Dialog.scss +27 -27
  206. package/lib/esm/core-react/elementseparator/ElementSeparator.scss +1 -1
  207. package/lib/esm/core-react/expandable/ExpandableList.d.ts +2 -0
  208. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  209. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  210. package/lib/esm/core-react/expandable/list.scss +7 -17
  211. package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
  212. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts +27 -0
  213. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts.map +1 -0
  214. package/lib/esm/core-react/icons/ConditionalIconItem.js +61 -0
  215. package/lib/esm/core-react/icons/ConditionalIconItem.js.map +1 -0
  216. package/lib/esm/core-react/icons/IconComponent.d.ts +3 -2
  217. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  218. package/lib/esm/core-react/icons/IconComponent.js +1 -7
  219. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  220. package/lib/esm/core-react/icons/SvgPath.d.ts +1 -1
  221. package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
  222. package/lib/esm/core-react/icons/SvgPath.js +2 -2
  223. package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
  224. package/lib/{cjs/core-react/icons/SvgSprite.scss → esm/core-react/icons/SvgPath.scss} +1 -1
  225. package/lib/esm/core-react/icons/WebFontIcon.d.ts +0 -1
  226. package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
  227. package/lib/esm/core-react/icons/WebFontIcon.js +0 -1
  228. package/lib/esm/core-react/icons/WebFontIcon.js.map +1 -1
  229. package/lib/esm/core-react/icons/variables.scss +0 -9
  230. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.scss +6 -7
  231. package/lib/esm/core-react/index.scss +0 -4
  232. package/lib/esm/core-react/inputs/Input.d.ts +2 -4
  233. package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
  234. package/lib/esm/core-react/inputs/Input.js +1 -2
  235. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  236. package/lib/esm/core-react/inputs/InputLabel.d.ts +2 -0
  237. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  238. package/lib/esm/core-react/inputs/InputLabel.js +9 -1
  239. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  240. package/lib/esm/core-react/inputs/classes.scss +0 -2
  241. package/lib/esm/core-react/inputs/index.scss +1 -3
  242. package/lib/esm/core-react/inputs/input-label.scss +90 -0
  243. package/lib/esm/core-react/inputs/input.scss +36 -38
  244. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +5 -0
  245. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  246. package/lib/esm/core-react/inputs/numberinput/NumberInput.js +13 -8
  247. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  248. package/lib/esm/core-react/inputs/numberinput/NumberInput.scss +12 -13
  249. package/lib/esm/core-react/inputs/variables.scss +20 -15
  250. package/lib/esm/core-react/listbox/Listbox.scss +11 -11
  251. package/lib/esm/core-react/loading/LoadingPrompt.scss +2 -2
  252. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +1 -2
  253. package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  254. package/lib/esm/core-react/loading/LoadingSpinner.js +1 -16
  255. package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
  256. package/lib/esm/core-react/loading/LoadingSpinner.scss +5 -6
  257. package/lib/esm/core-react/messagebox/MessageBox.d.ts +17 -1
  258. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  259. package/lib/esm/core-react/messagebox/MessageBox.js +54 -10
  260. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  261. package/lib/esm/core-react/messagebox/MessageBox.scss +24 -14
  262. package/lib/esm/core-react/popup/Popup.d.ts +2 -0
  263. package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
  264. package/lib/esm/core-react/popup/Popup.js +4 -1
  265. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  266. package/lib/esm/core-react/popup/Popup.scss +123 -123
  267. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +4 -0
  268. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  269. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  270. package/lib/esm/core-react/radialmenu/RadialMenu.scss +2 -3
  271. package/lib/esm/core-react/searchbox/SearchBox.d.ts.map +1 -1
  272. package/lib/esm/core-react/searchbox/SearchBox.js +8 -6
  273. package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
  274. package/lib/esm/core-react/searchbox/SearchBox.scss +5 -10
  275. package/lib/esm/core-react/settings/SettingsContainer.js +1 -1
  276. package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
  277. package/lib/esm/core-react/settings/SettingsContainer.scss +11 -8
  278. package/lib/esm/core-react/style/baseline.scss +6 -8
  279. package/lib/esm/core-react/style/data-viz.scss +11 -14
  280. package/lib/esm/core-react/style/mixins.scss +2 -3
  281. package/lib/esm/core-react/style/opacity.scss +9 -10
  282. package/lib/esm/core-react/style/space.scss +9 -13
  283. package/lib/esm/core-react/style/speed.scss +3 -7
  284. package/lib/esm/core-react/style/themecolors.scss +0 -6
  285. package/lib/esm/core-react/style/typography.scss +22 -26
  286. package/lib/esm/core-react/style/variables.scss +4 -8
  287. package/lib/esm/core-react/tabs/Tabs.d.ts +1 -1
  288. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  289. package/lib/esm/core-react/tabs/classes.scss +0 -1
  290. package/lib/esm/core-react/tabs/index.scss +0 -1
  291. package/lib/esm/core-react/tabs/tabs.scss +40 -61
  292. package/lib/esm/core-react/tabs/vertical.scss +20 -33
  293. package/lib/esm/core-react/text/BlockText.d.ts.map +1 -1
  294. package/lib/esm/core-react/text/BlockText.js +1 -0
  295. package/lib/esm/core-react/text/BlockText.js.map +1 -1
  296. package/lib/esm/core-react/text/BodyText.d.ts +1 -0
  297. package/lib/esm/core-react/text/BodyText.d.ts.map +1 -1
  298. package/lib/esm/core-react/text/BodyText.js +2 -0
  299. package/lib/esm/core-react/text/BodyText.js.map +1 -1
  300. package/lib/esm/core-react/text/DisabledText.d.ts.map +1 -1
  301. package/lib/esm/core-react/text/DisabledText.js +1 -0
  302. package/lib/esm/core-react/text/DisabledText.js.map +1 -1
  303. package/lib/esm/core-react/text/MutedText.d.ts +1 -0
  304. package/lib/esm/core-react/text/MutedText.d.ts.map +1 -1
  305. package/lib/esm/core-react/text/MutedText.js +2 -0
  306. package/lib/esm/core-react/text/MutedText.js.map +1 -1
  307. package/lib/esm/core-react/text/StyledText.d.ts +1 -0
  308. package/lib/esm/core-react/text/StyledText.d.ts.map +1 -1
  309. package/lib/esm/core-react/text/StyledText.js +1 -0
  310. package/lib/esm/core-react/text/StyledText.js.map +1 -1
  311. package/lib/esm/core-react/text/block.scss +9 -4
  312. package/lib/esm/core-react/text/body.scss +7 -4
  313. package/lib/esm/core-react/text/classes.scss +0 -8
  314. package/lib/esm/core-react/text/index.scss +0 -8
  315. package/lib/esm/core-react/text/mixins.scss +10 -48
  316. package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  317. package/lib/esm/core-react/tree/ExpansionToggle.js +3 -1
  318. package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
  319. package/lib/esm/core-react/tree/ExpansionToggle.scss +7 -4
  320. package/lib/esm/core-react/tree/Node.scss +8 -9
  321. package/lib/esm/core-react/tree/Placeholder.scss +1 -4
  322. package/lib/esm/core-react/utils/hooks/useProximityToMouse.d.ts.map +1 -1
  323. package/lib/esm/core-react/utils/hooks/useProximityToMouse.js +2 -2
  324. package/lib/esm/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
  325. package/lib/esm/core-react/utils/hooks/useRefs.d.ts +1 -1
  326. package/lib/esm/core-react/utils/hooks/useRefs.d.ts.map +1 -1
  327. package/lib/esm/core-react/utils/hooks/useRefs.js.map +1 -1
  328. package/lib/esm/core-react.d.ts +2 -41
  329. package/lib/esm/core-react.d.ts.map +1 -1
  330. package/lib/esm/core-react.js +2 -41
  331. package/lib/esm/core-react.js.map +1 -1
  332. package/package.json +27 -35
  333. package/lib/cjs/core-react/badge/BetaBadge.scss +0 -9
  334. package/lib/cjs/core-react/button/Button.d.ts +0 -48
  335. package/lib/cjs/core-react/button/Button.d.ts.map +0 -1
  336. package/lib/cjs/core-react/button/Button.js +0 -86
  337. package/lib/cjs/core-react/button/Button.js.map +0 -1
  338. package/lib/cjs/core-react/checkbox/Checkbox.d.ts +0 -57
  339. package/lib/cjs/core-react/checkbox/Checkbox.d.ts.map +0 -1
  340. package/lib/cjs/core-react/checkbox/Checkbox.js +0 -65
  341. package/lib/cjs/core-react/checkbox/Checkbox.js.map +0 -1
  342. package/lib/cjs/core-react/dialog/DialogButtonDef.d.ts +0 -47
  343. package/lib/cjs/core-react/dialog/DialogButtonDef.d.ts.map +0 -1
  344. package/lib/cjs/core-react/dialog/DialogButtonDef.js +0 -38
  345. package/lib/cjs/core-react/dialog/DialogButtonDef.js.map +0 -1
  346. package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts +0 -34
  347. package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts.map +0 -1
  348. package/lib/cjs/core-react/expandable/ExpandableBlock.js +0 -36
  349. package/lib/cjs/core-react/expandable/ExpandableBlock.js.map +0 -1
  350. package/lib/cjs/core-react/expandable/ExpandableBlock.scss +0 -145
  351. package/lib/cjs/core-react/form/Field.d.ts +0 -20
  352. package/lib/cjs/core-react/form/Field.d.ts.map +0 -1
  353. package/lib/cjs/core-react/form/Field.js +0 -45
  354. package/lib/cjs/core-react/form/Field.js.map +0 -1
  355. package/lib/cjs/core-react/form/Form.d.ts +0 -132
  356. package/lib/cjs/core-react/form/Form.d.ts.map +0 -1
  357. package/lib/cjs/core-react/form/Form.js +0 -132
  358. package/lib/cjs/core-react/form/Form.js.map +0 -1
  359. package/lib/cjs/core-react/form/Form.scss +0 -78
  360. package/lib/cjs/core-react/icons/SvgSprite.d.ts +0 -21
  361. package/lib/cjs/core-react/icons/SvgSprite.d.ts.map +0 -1
  362. package/lib/cjs/core-react/icons/SvgSprite.js +0 -27
  363. package/lib/cjs/core-react/icons/SvgSprite.js.map +0 -1
  364. package/lib/cjs/core-react/inputs/LabeledInput.d.ts +0 -18
  365. package/lib/cjs/core-react/inputs/LabeledInput.d.ts.map +0 -1
  366. package/lib/cjs/core-react/inputs/LabeledInput.js +0 -34
  367. package/lib/cjs/core-react/inputs/LabeledInput.js.map +0 -1
  368. package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts +0 -18
  369. package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts.map +0 -1
  370. package/lib/cjs/core-react/inputs/LabeledTextarea.js +0 -32
  371. package/lib/cjs/core-react/inputs/LabeledTextarea.js.map +0 -1
  372. package/lib/cjs/core-react/inputs/Textarea.d.ts +0 -23
  373. package/lib/cjs/core-react/inputs/Textarea.d.ts.map +0 -1
  374. package/lib/cjs/core-react/inputs/Textarea.js +0 -36
  375. package/lib/cjs/core-react/inputs/Textarea.js.map +0 -1
  376. package/lib/cjs/core-react/inputs/labeled-input.scss +0 -103
  377. package/lib/cjs/core-react/inputs/labeled-textarea.scss +0 -77
  378. package/lib/cjs/core-react/inputs/textarea.scss +0 -55
  379. package/lib/cjs/core-react/loading/Spinner.d.ts +0 -38
  380. package/lib/cjs/core-react/loading/Spinner.d.ts.map +0 -1
  381. package/lib/cjs/core-react/loading/Spinner.js +0 -61
  382. package/lib/cjs/core-react/loading/Spinner.js.map +0 -1
  383. package/lib/cjs/core-react/loading/Spinner.scss +0 -26
  384. package/lib/cjs/core-react/messagebox/MessageSeverity.d.ts +0 -16
  385. package/lib/cjs/core-react/messagebox/MessageSeverity.d.ts.map +0 -1
  386. package/lib/cjs/core-react/messagebox/MessageSeverity.js +0 -24
  387. package/lib/cjs/core-react/messagebox/MessageSeverity.js.map +0 -1
  388. package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts +0 -29
  389. package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts.map +0 -1
  390. package/lib/cjs/core-react/progress-indicators/ProgressBar.js +0 -48
  391. package/lib/cjs/core-react/progress-indicators/ProgressBar.js.map +0 -1
  392. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts +0 -49
  393. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts.map +0 -1
  394. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.js +0 -74
  395. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.js.map +0 -1
  396. package/lib/cjs/core-react/progress-indicators/classes.scss +0 -33
  397. package/lib/cjs/core-react/progress-indicators/index.scss +0 -6
  398. package/lib/cjs/core-react/progress-indicators/progress-bar.scss +0 -91
  399. package/lib/cjs/core-react/progress-indicators/progress-spinner.scss +0 -132
  400. package/lib/cjs/core-react/radio/Radio.d.ts +0 -20
  401. package/lib/cjs/core-react/radio/Radio.d.ts.map +0 -1
  402. package/lib/cjs/core-react/radio/Radio.js +0 -28
  403. package/lib/cjs/core-react/radio/Radio.js.map +0 -1
  404. package/lib/cjs/core-react/radio/classes.scss +0 -7
  405. package/lib/cjs/core-react/radio/index.scss +0 -8
  406. package/lib/cjs/core-react/radio/radio.scss +0 -89
  407. package/lib/cjs/core-react/select/LabeledSelect.d.ts +0 -20
  408. package/lib/cjs/core-react/select/LabeledSelect.d.ts.map +0 -1
  409. package/lib/cjs/core-react/select/LabeledSelect.js +0 -34
  410. package/lib/cjs/core-react/select/LabeledSelect.js.map +0 -1
  411. package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts +0 -16
  412. package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts.map +0 -1
  413. package/lib/cjs/core-react/select/LabeledThemedSelect.js +0 -31
  414. package/lib/cjs/core-react/select/LabeledThemedSelect.js.map +0 -1
  415. package/lib/cjs/core-react/select/Select.d.ts +0 -53
  416. package/lib/cjs/core-react/select/Select.d.ts.map +0 -1
  417. package/lib/cjs/core-react/select/Select.js +0 -60
  418. package/lib/cjs/core-react/select/Select.js.map +0 -1
  419. package/lib/cjs/core-react/select/ThemedSelect.d.ts +0 -104
  420. package/lib/cjs/core-react/select/ThemedSelect.d.ts.map +0 -1
  421. package/lib/cjs/core-react/select/ThemedSelect.js +0 -57
  422. package/lib/cjs/core-react/select/ThemedSelect.js.map +0 -1
  423. package/lib/cjs/core-react/select/classes.scss +0 -9
  424. package/lib/cjs/core-react/select/index.scss +0 -10
  425. package/lib/cjs/core-react/select/labeled-select.scss +0 -72
  426. package/lib/cjs/core-react/select/labeled-themed-select.scss +0 -77
  427. package/lib/cjs/core-react/select/modalHelper.d.ts +0 -5
  428. package/lib/cjs/core-react/select/modalHelper.d.ts.map +0 -1
  429. package/lib/cjs/core-react/select/modalHelper.js +0 -21
  430. package/lib/cjs/core-react/select/modalHelper.js.map +0 -1
  431. package/lib/cjs/core-react/select/select.scss +0 -74
  432. package/lib/cjs/core-react/select/themed-select.scss +0 -159
  433. package/lib/cjs/core-react/slider/Slider.d.ts +0 -80
  434. package/lib/cjs/core-react/slider/Slider.d.ts.map +0 -1
  435. package/lib/cjs/core-react/slider/Slider.js +0 -91
  436. package/lib/cjs/core-react/slider/Slider.js.map +0 -1
  437. package/lib/cjs/core-react/slider/Slider.scss +0 -96
  438. package/lib/cjs/core-react/splitbutton/SplitButton.d.ts +0 -62
  439. package/lib/cjs/core-react/splitbutton/SplitButton.d.ts.map +0 -1
  440. package/lib/cjs/core-react/splitbutton/SplitButton.js +0 -104
  441. package/lib/cjs/core-react/splitbutton/SplitButton.js.map +0 -1
  442. package/lib/cjs/core-react/splitbutton/SplitButton.scss +0 -137
  443. package/lib/cjs/core-react/style/itwinui-overrides.scss +0 -25
  444. package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts +0 -11
  445. package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts.map +0 -1
  446. package/lib/cjs/core-react/tabs/HorizontalTabs.js +0 -22
  447. package/lib/cjs/core-react/tabs/HorizontalTabs.js.map +0 -1
  448. package/lib/cjs/core-react/tabs/horizontal.scss +0 -77
  449. package/lib/cjs/core-react/text/Headline.d.ts +0 -11
  450. package/lib/cjs/core-react/text/Headline.d.ts.map +0 -1
  451. package/lib/cjs/core-react/text/Headline.js +0 -21
  452. package/lib/cjs/core-react/text/Headline.js.map +0 -1
  453. package/lib/cjs/core-react/text/LeadingText.d.ts +0 -11
  454. package/lib/cjs/core-react/text/LeadingText.d.ts.map +0 -1
  455. package/lib/cjs/core-react/text/LeadingText.js +0 -21
  456. package/lib/cjs/core-react/text/LeadingText.js.map +0 -1
  457. package/lib/cjs/core-react/text/LeadingText2.d.ts +0 -11
  458. package/lib/cjs/core-react/text/LeadingText2.d.ts.map +0 -1
  459. package/lib/cjs/core-react/text/LeadingText2.js +0 -21
  460. package/lib/cjs/core-react/text/LeadingText2.js.map +0 -1
  461. package/lib/cjs/core-react/text/SmallText.d.ts +0 -11
  462. package/lib/cjs/core-react/text/SmallText.d.ts.map +0 -1
  463. package/lib/cjs/core-react/text/SmallText.js +0 -21
  464. package/lib/cjs/core-react/text/SmallText.js.map +0 -1
  465. package/lib/cjs/core-react/text/Subheading.d.ts +0 -11
  466. package/lib/cjs/core-react/text/Subheading.d.ts.map +0 -1
  467. package/lib/cjs/core-react/text/Subheading.js +0 -21
  468. package/lib/cjs/core-react/text/Subheading.js.map +0 -1
  469. package/lib/cjs/core-react/text/Subheading2.d.ts +0 -11
  470. package/lib/cjs/core-react/text/Subheading2.d.ts.map +0 -1
  471. package/lib/cjs/core-react/text/Subheading2.js +0 -21
  472. package/lib/cjs/core-react/text/Subheading2.js.map +0 -1
  473. package/lib/cjs/core-react/text/Title.d.ts +0 -11
  474. package/lib/cjs/core-react/text/Title.d.ts.map +0 -1
  475. package/lib/cjs/core-react/text/Title.js +0 -21
  476. package/lib/cjs/core-react/text/Title.js.map +0 -1
  477. package/lib/cjs/core-react/text/Title2.d.ts +0 -11
  478. package/lib/cjs/core-react/text/Title2.d.ts.map +0 -1
  479. package/lib/cjs/core-react/text/Title2.js +0 -21
  480. package/lib/cjs/core-react/text/Title2.js.map +0 -1
  481. package/lib/cjs/core-react/text/headline.scss +0 -10
  482. package/lib/cjs/core-react/text/leading-2.scss +0 -11
  483. package/lib/cjs/core-react/text/leading.scss +0 -10
  484. package/lib/cjs/core-react/text/small.scss +0 -10
  485. package/lib/cjs/core-react/text/subheading-2.scss +0 -11
  486. package/lib/cjs/core-react/text/subheading.scss +0 -11
  487. package/lib/cjs/core-react/text/title-2.scss +0 -11
  488. package/lib/cjs/core-react/text/title.scss +0 -10
  489. package/lib/cjs/core-react/tiles/FeaturedTile.d.ts +0 -11
  490. package/lib/cjs/core-react/tiles/FeaturedTile.d.ts.map +0 -1
  491. package/lib/cjs/core-react/tiles/FeaturedTile.js +0 -21
  492. package/lib/cjs/core-react/tiles/FeaturedTile.js.map +0 -1
  493. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts +0 -11
  494. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts.map +0 -1
  495. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.js +0 -21
  496. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.js.map +0 -1
  497. package/lib/cjs/core-react/tiles/MinimalTile.d.ts +0 -11
  498. package/lib/cjs/core-react/tiles/MinimalTile.d.ts.map +0 -1
  499. package/lib/cjs/core-react/tiles/MinimalTile.js +0 -21
  500. package/lib/cjs/core-react/tiles/MinimalTile.js.map +0 -1
  501. package/lib/cjs/core-react/tiles/Tile.d.ts +0 -32
  502. package/lib/cjs/core-react/tiles/Tile.d.ts.map +0 -1
  503. package/lib/cjs/core-react/tiles/Tile.js +0 -40
  504. package/lib/cjs/core-react/tiles/Tile.js.map +0 -1
  505. package/lib/cjs/core-react/tiles/classes.scss +0 -7
  506. package/lib/cjs/core-react/tiles/index.scss +0 -5
  507. package/lib/cjs/core-react/tiles/tile.scss +0 -134
  508. package/lib/cjs/core-react/toggle/LabeledToggle.d.ts +0 -26
  509. package/lib/cjs/core-react/toggle/LabeledToggle.d.ts.map +0 -1
  510. package/lib/cjs/core-react/toggle/LabeledToggle.js +0 -29
  511. package/lib/cjs/core-react/toggle/LabeledToggle.js.map +0 -1
  512. package/lib/cjs/core-react/toggle/LabeledToggle.scss +0 -21
  513. package/lib/cjs/core-react/toggle/Toggle.d.ts +0 -52
  514. package/lib/cjs/core-react/toggle/Toggle.d.ts.map +0 -1
  515. package/lib/cjs/core-react/toggle/Toggle.js +0 -105
  516. package/lib/cjs/core-react/toggle/Toggle.js.map +0 -1
  517. package/lib/cjs/core-react/toggle/Toggle.scss +0 -135
  518. package/lib/cjs/core-react/tooltip/Tooltip.d.ts +0 -34
  519. package/lib/cjs/core-react/tooltip/Tooltip.d.ts.map +0 -1
  520. package/lib/cjs/core-react/tooltip/Tooltip.js +0 -57
  521. package/lib/cjs/core-react/tooltip/Tooltip.js.map +0 -1
  522. package/lib/cjs/core-react/tooltip/Tooltip.scss +0 -18
  523. package/lib/cjs/core-react/utils/PointProps.d.ts +0 -12
  524. package/lib/cjs/core-react/utils/PointProps.d.ts.map +0 -1
  525. package/lib/cjs/core-react/utils/PointProps.js +0 -10
  526. package/lib/cjs/core-react/utils/PointProps.js.map +0 -1
  527. package/lib/cjs/core-react/utils/UiEvent.d.ts +0 -10
  528. package/lib/cjs/core-react/utils/UiEvent.d.ts.map +0 -1
  529. package/lib/cjs/core-react/utils/UiEvent.js +0 -18
  530. package/lib/cjs/core-react/utils/UiEvent.js.map +0 -1
  531. package/lib/esm/core-react/badge/BetaBadge.scss +0 -9
  532. package/lib/esm/core-react/button/Button.d.ts +0 -48
  533. package/lib/esm/core-react/button/Button.d.ts.map +0 -1
  534. package/lib/esm/core-react/button/Button.js +0 -81
  535. package/lib/esm/core-react/button/Button.js.map +0 -1
  536. package/lib/esm/core-react/checkbox/Checkbox.d.ts +0 -57
  537. package/lib/esm/core-react/checkbox/Checkbox.d.ts.map +0 -1
  538. package/lib/esm/core-react/checkbox/Checkbox.js +0 -61
  539. package/lib/esm/core-react/checkbox/Checkbox.js.map +0 -1
  540. package/lib/esm/core-react/dialog/DialogButtonDef.d.ts +0 -47
  541. package/lib/esm/core-react/dialog/DialogButtonDef.d.ts.map +0 -1
  542. package/lib/esm/core-react/dialog/DialogButtonDef.js +0 -35
  543. package/lib/esm/core-react/dialog/DialogButtonDef.js.map +0 -1
  544. package/lib/esm/core-react/expandable/ExpandableBlock.d.ts +0 -34
  545. package/lib/esm/core-react/expandable/ExpandableBlock.d.ts.map +0 -1
  546. package/lib/esm/core-react/expandable/ExpandableBlock.js +0 -32
  547. package/lib/esm/core-react/expandable/ExpandableBlock.js.map +0 -1
  548. package/lib/esm/core-react/expandable/ExpandableBlock.scss +0 -145
  549. package/lib/esm/core-react/form/Field.d.ts +0 -20
  550. package/lib/esm/core-react/form/Field.d.ts.map +0 -1
  551. package/lib/esm/core-react/form/Field.js +0 -41
  552. package/lib/esm/core-react/form/Field.js.map +0 -1
  553. package/lib/esm/core-react/form/Form.d.ts +0 -132
  554. package/lib/esm/core-react/form/Form.d.ts.map +0 -1
  555. package/lib/esm/core-react/form/Form.js +0 -128
  556. package/lib/esm/core-react/form/Form.js.map +0 -1
  557. package/lib/esm/core-react/form/Form.scss +0 -78
  558. package/lib/esm/core-react/icons/SvgSprite.d.ts +0 -21
  559. package/lib/esm/core-react/icons/SvgSprite.d.ts.map +0 -1
  560. package/lib/esm/core-react/icons/SvgSprite.js +0 -23
  561. package/lib/esm/core-react/icons/SvgSprite.js.map +0 -1
  562. package/lib/esm/core-react/inputs/LabeledInput.d.ts +0 -18
  563. package/lib/esm/core-react/inputs/LabeledInput.d.ts.map +0 -1
  564. package/lib/esm/core-react/inputs/LabeledInput.js +0 -30
  565. package/lib/esm/core-react/inputs/LabeledInput.js.map +0 -1
  566. package/lib/esm/core-react/inputs/LabeledTextarea.d.ts +0 -18
  567. package/lib/esm/core-react/inputs/LabeledTextarea.d.ts.map +0 -1
  568. package/lib/esm/core-react/inputs/LabeledTextarea.js +0 -28
  569. package/lib/esm/core-react/inputs/LabeledTextarea.js.map +0 -1
  570. package/lib/esm/core-react/inputs/Textarea.d.ts +0 -23
  571. package/lib/esm/core-react/inputs/Textarea.d.ts.map +0 -1
  572. package/lib/esm/core-react/inputs/Textarea.js +0 -33
  573. package/lib/esm/core-react/inputs/Textarea.js.map +0 -1
  574. package/lib/esm/core-react/inputs/labeled-input.scss +0 -103
  575. package/lib/esm/core-react/inputs/labeled-textarea.scss +0 -77
  576. package/lib/esm/core-react/inputs/textarea.scss +0 -55
  577. package/lib/esm/core-react/loading/Spinner.d.ts +0 -38
  578. package/lib/esm/core-react/loading/Spinner.d.ts.map +0 -1
  579. package/lib/esm/core-react/loading/Spinner.js +0 -57
  580. package/lib/esm/core-react/loading/Spinner.js.map +0 -1
  581. package/lib/esm/core-react/loading/Spinner.scss +0 -26
  582. package/lib/esm/core-react/messagebox/MessageSeverity.d.ts +0 -16
  583. package/lib/esm/core-react/messagebox/MessageSeverity.d.ts.map +0 -1
  584. package/lib/esm/core-react/messagebox/MessageSeverity.js +0 -21
  585. package/lib/esm/core-react/messagebox/MessageSeverity.js.map +0 -1
  586. package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts +0 -29
  587. package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts.map +0 -1
  588. package/lib/esm/core-react/progress-indicators/ProgressBar.js +0 -44
  589. package/lib/esm/core-react/progress-indicators/ProgressBar.js.map +0 -1
  590. package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts +0 -49
  591. package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts.map +0 -1
  592. package/lib/esm/core-react/progress-indicators/ProgressSpinner.js +0 -70
  593. package/lib/esm/core-react/progress-indicators/ProgressSpinner.js.map +0 -1
  594. package/lib/esm/core-react/progress-indicators/classes.scss +0 -33
  595. package/lib/esm/core-react/progress-indicators/index.scss +0 -6
  596. package/lib/esm/core-react/progress-indicators/progress-bar.scss +0 -91
  597. package/lib/esm/core-react/progress-indicators/progress-spinner.scss +0 -132
  598. package/lib/esm/core-react/radio/Radio.d.ts +0 -20
  599. package/lib/esm/core-react/radio/Radio.d.ts.map +0 -1
  600. package/lib/esm/core-react/radio/Radio.js +0 -24
  601. package/lib/esm/core-react/radio/Radio.js.map +0 -1
  602. package/lib/esm/core-react/radio/classes.scss +0 -7
  603. package/lib/esm/core-react/radio/index.scss +0 -8
  604. package/lib/esm/core-react/radio/radio.scss +0 -89
  605. package/lib/esm/core-react/select/LabeledSelect.d.ts +0 -20
  606. package/lib/esm/core-react/select/LabeledSelect.d.ts.map +0 -1
  607. package/lib/esm/core-react/select/LabeledSelect.js +0 -30
  608. package/lib/esm/core-react/select/LabeledSelect.js.map +0 -1
  609. package/lib/esm/core-react/select/LabeledThemedSelect.d.ts +0 -16
  610. package/lib/esm/core-react/select/LabeledThemedSelect.d.ts.map +0 -1
  611. package/lib/esm/core-react/select/LabeledThemedSelect.js +0 -27
  612. package/lib/esm/core-react/select/LabeledThemedSelect.js.map +0 -1
  613. package/lib/esm/core-react/select/Select.d.ts +0 -53
  614. package/lib/esm/core-react/select/Select.d.ts.map +0 -1
  615. package/lib/esm/core-react/select/Select.js +0 -57
  616. package/lib/esm/core-react/select/Select.js.map +0 -1
  617. package/lib/esm/core-react/select/ThemedSelect.d.ts +0 -104
  618. package/lib/esm/core-react/select/ThemedSelect.d.ts.map +0 -1
  619. package/lib/esm/core-react/select/ThemedSelect.js +0 -53
  620. package/lib/esm/core-react/select/ThemedSelect.js.map +0 -1
  621. package/lib/esm/core-react/select/classes.scss +0 -9
  622. package/lib/esm/core-react/select/index.scss +0 -10
  623. package/lib/esm/core-react/select/labeled-select.scss +0 -72
  624. package/lib/esm/core-react/select/labeled-themed-select.scss +0 -77
  625. package/lib/esm/core-react/select/modalHelper.d.ts +0 -5
  626. package/lib/esm/core-react/select/modalHelper.d.ts.map +0 -1
  627. package/lib/esm/core-react/select/modalHelper.js +0 -17
  628. package/lib/esm/core-react/select/modalHelper.js.map +0 -1
  629. package/lib/esm/core-react/select/select.scss +0 -74
  630. package/lib/esm/core-react/select/themed-select.scss +0 -159
  631. package/lib/esm/core-react/slider/Slider.d.ts +0 -80
  632. package/lib/esm/core-react/slider/Slider.d.ts.map +0 -1
  633. package/lib/esm/core-react/slider/Slider.js +0 -87
  634. package/lib/esm/core-react/slider/Slider.js.map +0 -1
  635. package/lib/esm/core-react/slider/Slider.scss +0 -96
  636. package/lib/esm/core-react/splitbutton/SplitButton.d.ts +0 -62
  637. package/lib/esm/core-react/splitbutton/SplitButton.d.ts.map +0 -1
  638. package/lib/esm/core-react/splitbutton/SplitButton.js +0 -100
  639. package/lib/esm/core-react/splitbutton/SplitButton.js.map +0 -1
  640. package/lib/esm/core-react/splitbutton/SplitButton.scss +0 -137
  641. package/lib/esm/core-react/style/itwinui-overrides.scss +0 -25
  642. package/lib/esm/core-react/tabs/HorizontalTabs.d.ts +0 -11
  643. package/lib/esm/core-react/tabs/HorizontalTabs.d.ts.map +0 -1
  644. package/lib/esm/core-react/tabs/HorizontalTabs.js +0 -18
  645. package/lib/esm/core-react/tabs/HorizontalTabs.js.map +0 -1
  646. package/lib/esm/core-react/tabs/horizontal.scss +0 -77
  647. package/lib/esm/core-react/text/Headline.d.ts +0 -11
  648. package/lib/esm/core-react/text/Headline.d.ts.map +0 -1
  649. package/lib/esm/core-react/text/Headline.js +0 -17
  650. package/lib/esm/core-react/text/Headline.js.map +0 -1
  651. package/lib/esm/core-react/text/LeadingText.d.ts +0 -11
  652. package/lib/esm/core-react/text/LeadingText.d.ts.map +0 -1
  653. package/lib/esm/core-react/text/LeadingText.js +0 -17
  654. package/lib/esm/core-react/text/LeadingText.js.map +0 -1
  655. package/lib/esm/core-react/text/LeadingText2.d.ts +0 -11
  656. package/lib/esm/core-react/text/LeadingText2.d.ts.map +0 -1
  657. package/lib/esm/core-react/text/LeadingText2.js +0 -17
  658. package/lib/esm/core-react/text/LeadingText2.js.map +0 -1
  659. package/lib/esm/core-react/text/SmallText.d.ts +0 -11
  660. package/lib/esm/core-react/text/SmallText.d.ts.map +0 -1
  661. package/lib/esm/core-react/text/SmallText.js +0 -17
  662. package/lib/esm/core-react/text/SmallText.js.map +0 -1
  663. package/lib/esm/core-react/text/Subheading.d.ts +0 -11
  664. package/lib/esm/core-react/text/Subheading.d.ts.map +0 -1
  665. package/lib/esm/core-react/text/Subheading.js +0 -17
  666. package/lib/esm/core-react/text/Subheading.js.map +0 -1
  667. package/lib/esm/core-react/text/Subheading2.d.ts +0 -11
  668. package/lib/esm/core-react/text/Subheading2.d.ts.map +0 -1
  669. package/lib/esm/core-react/text/Subheading2.js +0 -17
  670. package/lib/esm/core-react/text/Subheading2.js.map +0 -1
  671. package/lib/esm/core-react/text/Title.d.ts +0 -11
  672. package/lib/esm/core-react/text/Title.d.ts.map +0 -1
  673. package/lib/esm/core-react/text/Title.js +0 -17
  674. package/lib/esm/core-react/text/Title.js.map +0 -1
  675. package/lib/esm/core-react/text/Title2.d.ts +0 -11
  676. package/lib/esm/core-react/text/Title2.d.ts.map +0 -1
  677. package/lib/esm/core-react/text/Title2.js +0 -17
  678. package/lib/esm/core-react/text/Title2.js.map +0 -1
  679. package/lib/esm/core-react/text/headline.scss +0 -10
  680. package/lib/esm/core-react/text/leading-2.scss +0 -11
  681. package/lib/esm/core-react/text/leading.scss +0 -10
  682. package/lib/esm/core-react/text/small.scss +0 -10
  683. package/lib/esm/core-react/text/subheading-2.scss +0 -11
  684. package/lib/esm/core-react/text/subheading.scss +0 -11
  685. package/lib/esm/core-react/text/title-2.scss +0 -11
  686. package/lib/esm/core-react/text/title.scss +0 -10
  687. package/lib/esm/core-react/tiles/FeaturedTile.d.ts +0 -11
  688. package/lib/esm/core-react/tiles/FeaturedTile.d.ts.map +0 -1
  689. package/lib/esm/core-react/tiles/FeaturedTile.js +0 -17
  690. package/lib/esm/core-react/tiles/FeaturedTile.js.map +0 -1
  691. package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts +0 -11
  692. package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts.map +0 -1
  693. package/lib/esm/core-react/tiles/MinimalFeaturedTile.js +0 -17
  694. package/lib/esm/core-react/tiles/MinimalFeaturedTile.js.map +0 -1
  695. package/lib/esm/core-react/tiles/MinimalTile.d.ts +0 -11
  696. package/lib/esm/core-react/tiles/MinimalTile.d.ts.map +0 -1
  697. package/lib/esm/core-react/tiles/MinimalTile.js +0 -17
  698. package/lib/esm/core-react/tiles/MinimalTile.js.map +0 -1
  699. package/lib/esm/core-react/tiles/Tile.d.ts +0 -32
  700. package/lib/esm/core-react/tiles/Tile.d.ts.map +0 -1
  701. package/lib/esm/core-react/tiles/Tile.js +0 -36
  702. package/lib/esm/core-react/tiles/Tile.js.map +0 -1
  703. package/lib/esm/core-react/tiles/classes.scss +0 -7
  704. package/lib/esm/core-react/tiles/index.scss +0 -5
  705. package/lib/esm/core-react/tiles/tile.scss +0 -134
  706. package/lib/esm/core-react/toggle/LabeledToggle.d.ts +0 -26
  707. package/lib/esm/core-react/toggle/LabeledToggle.d.ts.map +0 -1
  708. package/lib/esm/core-react/toggle/LabeledToggle.js +0 -25
  709. package/lib/esm/core-react/toggle/LabeledToggle.js.map +0 -1
  710. package/lib/esm/core-react/toggle/LabeledToggle.scss +0 -21
  711. package/lib/esm/core-react/toggle/Toggle.d.ts +0 -52
  712. package/lib/esm/core-react/toggle/Toggle.d.ts.map +0 -1
  713. package/lib/esm/core-react/toggle/Toggle.js +0 -102
  714. package/lib/esm/core-react/toggle/Toggle.js.map +0 -1
  715. package/lib/esm/core-react/toggle/Toggle.scss +0 -135
  716. package/lib/esm/core-react/tooltip/Tooltip.d.ts +0 -34
  717. package/lib/esm/core-react/tooltip/Tooltip.d.ts.map +0 -1
  718. package/lib/esm/core-react/tooltip/Tooltip.js +0 -52
  719. package/lib/esm/core-react/tooltip/Tooltip.js.map +0 -1
  720. package/lib/esm/core-react/tooltip/Tooltip.scss +0 -18
  721. package/lib/esm/core-react/utils/PointProps.d.ts +0 -12
  722. package/lib/esm/core-react/utils/PointProps.d.ts.map +0 -1
  723. package/lib/esm/core-react/utils/PointProps.js +0 -9
  724. package/lib/esm/core-react/utils/PointProps.js.map +0 -1
  725. package/lib/esm/core-react/utils/UiEvent.d.ts +0 -10
  726. package/lib/esm/core-react/utils/UiEvent.d.ts.map +0 -1
  727. package/lib/esm/core-react/utils/UiEvent.js +0 -14
  728. package/lib/esm/core-react/utils/UiEvent.js.map +0 -1
@@ -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"}
@@ -40,8 +40,7 @@ function ForwardRefInput(props, ref) {
40
40
  return (React.createElement(itwinui_react_1.Input, { ref: refs, type: "text", ...otherProps, onFocus: handleFocus, className: (0, classnames_1.default)("uicore-inputs-input", className), style: style }));
41
41
  });
42
42
  /** Basic text input, is a wrapper for the `<input type="text">` HTML element.
43
- * @public
44
- * @deprecated in 3.0. Use Input in itwinui-react instead
43
+ * @internal
45
44
  */
46
45
  exports.Input = ForwardRefInput; // eslint-disable-line deprecation/deprecation
47
46
  //# sourceMappingURL=Input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/Input.tsx"],"names":[],"mappings":";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AE,CAAC;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,qBAAa,IAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,KAAK,UAAU,EAAE,OAAO,EAAE,WAAW,EACxE,SAAS,EAAE,IAAA,oBAAU,EAAC,qBAAqB,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,CAC5E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;GAGG;AACU,QAAA,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/deprecation\r\n"]}
1
+ {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/Input.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAC/B,wDAA8D;AAC9D,oDAAiD;AAejD,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,IAAA,iBAAO,EAAC,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,qBAAa,IAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,KAAK,UAAU,EAAE,OAAO,EAAE,WAAW,EACxE,SAAS,EAAE,IAAA,oBAAU,EAAC,qBAAqB,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,CAC5E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;GAEG;AACU,QAAA,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;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,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;AAQD;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC;IAClD,MAAM,IAAI,GAAG,CAAC,OAAO;CA2BtC"}
@@ -8,8 +8,16 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.InputLabel = void 0;
11
+ const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
11
12
  const classnames_1 = require("classnames");
12
13
  const React = require("react");
14
+ const IconComponent_1 = require("../icons/IconComponent");
15
+ const InputStatus_1 = require("./InputStatus");
16
+ const inputLabelIconSpec = {
17
+ [InputStatus_1.InputStatus.Error]: React.createElement(itwinui_icons_react_1.SvgStatusError, null),
18
+ [InputStatus_1.InputStatus.Success]: React.createElement(itwinui_icons_react_1.SvgStatusSuccess, null),
19
+ [InputStatus_1.InputStatus.Warning]: React.createElement(itwinui_icons_react_1.SvgStatusWarning, null),
20
+ };
13
21
  /** Text input wrapper that provides additional styling and labeling
14
22
  * @public
15
23
  */
@@ -25,7 +33,7 @@ class InputLabel extends React.PureComponent {
25
33
  React.createElement("div", { className: (0, classnames_1.default)("input", { "with-icon": !!status }) },
26
34
  this.props.children,
27
35
  status &&
28
- React.createElement("i", { className: (0, classnames_1.default)("icon", `icon-status-${status}`) })),
36
+ React.createElement(IconComponent_1.Icon, { className: "icon", iconSpec: inputLabelIconSpec[`{status}`] })),
29
37
  message &&
30
38
  React.createElement("div", { className: (0, classnames_1.default)("uicore-message", messageClassName), style: messageStyle }, message)));
31
39
  }
@@ -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,2CAAoC;AACpC,+BAA+B;AAW/B;;GAEG;AACH,MAAa,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,IAAA,oBAAU,EACxC,6BAA6B,EAC7B,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACxC,MAAM,EACN,SAAS,CACV;YACE,KAAK;gBACJ,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,cAAc,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU;;oBAAI,KAAK;wBAAQ;YAEhG,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,OAAO,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;gBAC3D,IAAI,CAAC,KAAK,CAAC,QAAQ;gBACnB,MAAM;oBACL,2BAAG,SAAS,EAAE,IAAA,oBAAU,EAAC,MAAM,EAAE,eAAe,MAAM,EAAE,CAAC,GAAI,CAE3D;YACL,OAAO;gBACN,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,IAAG,OAAO,CAAO,CAEhG,CACT,CAAC;IACJ,CAAC;CACF;AA5BD,gCA4BC","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,oEAAgG;AAChG,2CAAoC;AACpC,+BAA+B;AAC/B,0DAAwD;AAExD,+CAA4C;AAY5C,MAAM,kBAAkB,GAAgC;IACtD,CAAC,yBAAW,CAAC,KAAK,CAAC,EAAE,oBAAC,oCAAc,OAAG;IACvC,CAAC,yBAAW,CAAC,OAAO,CAAC,EAAE,oBAAC,sCAAgB,OAAG;IAC3C,CAAC,yBAAW,CAAC,OAAO,CAAC,EAAE,oBAAC,sCAAgB,OAAG;CAC5C,CAAC;AAEF;;GAEG;AACH,MAAa,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,IAAA,oBAAU,EACxC,6BAA6B,EAC7B,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACxC,MAAM,EACN,SAAS,CACV;YACE,KAAK;gBACJ,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,cAAc,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU;;oBAAI,KAAK;wBAAQ;YAEhG,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,OAAO,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;gBAC3D,IAAI,CAAC,KAAK,CAAC,QAAQ;gBACnB,MAAM;oBACL,oBAAC,oBAAI,IAAC,SAAS,EAAC,MAAM,EAAC,QAAQ,EAAE,kBAAkB,CAAC,UAAU,CAAC,GAAI,CAEjE;YACL,OAAO;gBACN,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,IAAG,OAAO,CAAO,CAEhG,CACT,CAAC;IACJ,CAAC;CACF;AA5BD,gCA4BC","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 { SvgStatusError, SvgStatusSuccess, SvgStatusWarning } from \"@itwin/itwinui-icons-react\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Icon, IconSpec } from \"../icons/IconComponent\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { InputStatus } from \"./InputStatus\";\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\nconst inputLabelIconSpec: { [key: string]: IconSpec } = {\r\n [InputStatus.Error]: <SvgStatusError />,\r\n [InputStatus.Success]: <SvgStatusSuccess />,\r\n [InputStatus.Warning]: <SvgStatusWarning />,\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 <Icon className=\"icon\" iconSpec={inputLabelIconSpec[`{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";
@@ -0,0 +1,90 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ @import "../style/index";
6
+
7
+ @mixin uicore-inputs-labeled-input {
8
+ display: block;
9
+ padding: 0;
10
+ margin: 0 0 $uicore-unbordered-padding;
11
+ text-align: left;
12
+ font-size: var(--iui-font-size-1);
13
+ font-weight: var(--iui-font-weight-normal);
14
+ cursor: pointer;
15
+
16
+ > .uicore-label {
17
+ padding: 0;
18
+ margin: 0;
19
+ border: 0 none transparent;
20
+ display: block;
21
+ font-size: var(--iui-font-size-1);
22
+ font-weight: var(--iui-font-weight-semibold);
23
+ line-height: var(--iui-size-l);
24
+ text-align: left;
25
+ color: var(--iui-color-text);
26
+ }
27
+
28
+ > .input {
29
+ position: relative;
30
+ /// Needed to vertically align the icon:
31
+ display: inline-block;
32
+ width: 100%;
33
+
34
+ &.with-icon {
35
+ > input,
36
+ > .bwx-inputs-input {
37
+ padding-right: calc(#{$uicore-bordered-padding} + var(--iui-size-l));
38
+ margin-right: calc(#{$uicore-bordered-padding} + var(--iui-size-l));
39
+ }
40
+ }
41
+
42
+ > .icon {
43
+ display: flex;
44
+ align-items: center;
45
+ position: absolute;
46
+ right: 0;
47
+ top: 0;
48
+ bottom: 0;
49
+ padding: $uicore-bordered-padding;
50
+
51
+ font-size: var(--iui-font-size-1);
52
+ font-weight: normal;
53
+ }
54
+ }
55
+
56
+ > .uicore-message {
57
+ display: block;
58
+ font-size: var(--iui-font-size-0);
59
+ line-height: var(--iui-size-l);
60
+ color: var(--iui-color-text-muted);
61
+ }
62
+
63
+ /// Status colors ----------------------------------------------------------
64
+
65
+ $status-colors: (
66
+ success: $buic-foreground-positive-rgb,
67
+ warning: $buic-foreground-warning-rgb,
68
+ error: $buic-foreground-negative-rgb,
69
+ );
70
+
71
+ @each $status, $color in $status-colors {
72
+ &.#{$status},
73
+ &.#{$status} > .uicore-message {
74
+ color: rgb($color);
75
+ }
76
+
77
+ &.#{$status} > .input {
78
+ > input,
79
+ > .uicore-inputs-input {
80
+ border-color: rgb($color);
81
+ box-shadow: $buic-inputs-boxshadow 0px 1px 1px inset;
82
+
83
+ &:focus {
84
+ border-color: rgb($color);
85
+ box-shadow: rgba($color, $uicore-opacity-boxshadow) 0px 0px 0px 2px;
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
@@ -4,57 +4,55 @@
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  @import "../style/index";
6
6
  @import "./variables";
7
- @import "~@itwin/itwinui-css/scss/style/space";
8
- @import "~@itwin/itwinui-css/scss/style/speed";
9
- @import "~@itwin/itwinui-css/scss/style/typography";
10
- @import "~@itwin/itwinui-css/scss/style/variables";
11
7
 
12
8
  @mixin uicore-inputs-input {
13
-
14
- display: block;
15
- width: 100%;
16
- padding: $uicore-inputs-padding-bordered $uicore-bordered-padding;
17
- margin: $uicore-inputs-margin 0;
18
- font-family: $iui-font-family;
19
- font-size: $iui-font-size;
20
- line-height: normal;
21
- color: $buic-text-color;
22
- background-color: $buic-background-control;
23
- background-image: none;
24
- border: 1px solid $buic-inputs-border;
25
- border-radius: $iui-border-radius;
26
- box-shadow: $buic-inputs-boxshadow 0px 1px 1px inset;
27
- box-sizing: border-box;
28
- transition: border-color $iui-speed-fast ease-in-out, box-shadow $iui-speed-fast ease-in-out;
29
-
30
- &:-ms-input-placeholder { color: $buic-foreground-disabled; }
31
- &::-webkit-input-placeholder { color: $buic-foreground-disabled; }
32
- &::placeholder { color: $buic-foreground-disabled; }
9
+ display: block;
10
+ width: 100%;
11
+ padding: $uicore-inputs-padding-bordered $uicore-bordered-padding;
12
+ margin: $uicore-inputs-margin 0;
13
+ font-family: var(--iui-font-sans);
14
+ font-size: var(--iui-font-size-1);
15
+ line-height: normal;
16
+ color: var(--iui-color-text);
17
+ background-color: $buic-background-control;
18
+ background-image: none;
19
+ border: 1px solid var(--iui-color-border-foreground);
20
+ border-radius: var(--iui-border-radius-1);
21
+ box-shadow: $buic-inputs-boxshadow 0px 1px 1px inset;
22
+ box-sizing: border-box;
23
+ transition: border-color var(--iui-duration-1) ease-in-out,
24
+ box-shadow var(--iui-duration-1) ease-in-out;
25
+
26
+ &:-ms-input-placeholder {
27
+ color: var(--iui-color-text-disabled);
28
+ }
29
+ &::-webkit-input-placeholder {
30
+ color: var(--iui-color-text-disabled);
31
+ }
32
+ &::placeholder {
33
+ color: var(--iui-color-text-disabled);
34
+ }
33
35
 
34
36
  &[disabled] {
35
-
36
- background-color: $buic-background-control-disabled;
37
- border-color: $buic-foreground-disabled;
38
- color: $buic-foreground-disabled;
39
- cursor: not-allowed;
40
- opacity: $uicore-opacity-disabled;
37
+ background-color: $buic-background-control-disabled;
38
+ border-color: $buic-foreground-disabled;
39
+ color: var(--iui-color-text-disabled);
40
+ cursor: not-allowed;
41
+ opacity: $uicore-opacity-disabled;
41
42
  }
42
43
 
43
44
  &[readonly] {
44
-
45
- color: $buic-foreground-muted;
46
- cursor: default;
45
+ color: var(--iui-color-text-muted);
46
+ cursor: default;
47
47
  }
48
48
 
49
49
  &:focus {
50
-
51
- outline: 0px;
52
- border-color: $buic-foreground-focus-border;
53
- box-shadow: $uicore-inputs-focus-boxshadow;
50
+ outline: 0px;
51
+ border-color: $buic-foreground-focus-border;
52
+ box-shadow: $uicore-inputs-focus-boxshadow;
54
53
  }
55
54
 
56
55
  &.iui-input {
57
56
  padding: $uicore-iui-input-padding;
58
57
  }
59
-
60
58
  }
@@ -38,6 +38,11 @@ export interface NumberInputProps extends Omit<InputProps, "min" | "max" | "step
38
38
  showTouchButtons?: boolean;
39
39
  /** Provides ability to return reference to HTMLInputElement */
40
40
  ref?: React.Ref<HTMLInputElement>;
41
+ /**
42
+ * Makes this component behave as controlled component.
43
+ * @internal
44
+ */
45
+ isControlled?: boolean;
41
46
  }
42
47
  /** Input component for numbers with up and down buttons to increment and decrement the value.
43
48
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/inputs/numberinput/NumberInput.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAS,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIzD;;GAEG;AACH,oBAAY,gBAAgB,GAAG,MAAM,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC;AAEpF;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,UAAU,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,CAAC;IAC7F,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yCAAyC;IACzC,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACrC,iDAAiD;IACjD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kHAAkH;IAClH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACvD,sJAAsJ;IACtJ,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,cAAc,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5E,0HAA0H;IAC1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,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACvD,sJAAsJ;IACtJ,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,cAAc,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5E,0HAA0H;IAC1H,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACpE,gEAAgE;IAChE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,+DAA+D;IAC/D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AA6KD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,GAAG,CAAC,OAAO,GAAG,IAA4B,CAAC"}
@@ -13,9 +13,10 @@ const classnames_1 = require("classnames");
13
13
  const React = require("react");
14
14
  const itwinui_react_1 = require("@itwin/itwinui-react");
15
15
  const appui_abstract_1 = require("@itwin/appui-abstract");
16
- const WebFontIcon_1 = require("../../icons/WebFontIcon");
16
+ const IconComponent_1 = require("../../icons/IconComponent");
17
+ const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
17
18
  const ForwardRefNumberInput = React.forwardRef(function ForwardRefNumberInput(props, ref) {
18
- const { containerClassName, value, min, max, precision, format, parse, onChange, onBlur, onKeyDown, step, snap, showTouchButtons, containerStyle, ...otherProps } = props;
19
+ const { containerClassName, value, min, max, precision, format, parse, onChange, onBlur, onKeyDown, step, snap, showTouchButtons, containerStyle, isControlled, ...otherProps } = props;
19
20
  const currentValueRef = React.useRef(value);
20
21
  /**
21
22
  * Used internally to parse the argument x to it's numeric representation.
@@ -61,8 +62,10 @@ const ForwardRefNumberInput = React.forwardRef(function ForwardRefNumberInput(pr
61
62
  setFormattedValue(currentFormattedValue);
62
63
  }, [formatInternal, value]);
63
64
  const handleChange = React.useCallback((event) => {
64
- setFormattedValue(event.currentTarget.value);
65
- }, []);
65
+ const newVal = event.currentTarget.value;
66
+ setFormattedValue(newVal);
67
+ isControlled && onChange && onChange(parseInternal(newVal), newVal);
68
+ }, [isControlled, onChange, parseInternal]);
66
69
  const updateValue = React.useCallback((newVal) => {
67
70
  const newFormattedVal = formatInternal(newVal);
68
71
  onChange && onChange(newVal, newFormattedVal);
@@ -134,13 +137,15 @@ const ForwardRefNumberInput = React.forwardRef(function ForwardRefNumberInput(pr
134
137
  }, []);
135
138
  const isDisabled = !!otherProps.disabled;
136
139
  const containerClasses = (0, classnames_1.default)("core-number-input-container", containerClassName, showTouchButtons && "core-number-buttons-for-touch", isDisabled && "core-number-input-disabled");
140
+ const caretUp = showTouchButtons ? React.createElement(itwinui_icons_react_1.SvgCaretUp, null) : React.createElement(itwinui_icons_react_1.SvgCaretUpSmall, null);
141
+ const caretDown = showTouchButtons ? React.createElement(itwinui_icons_react_1.SvgCaretDown, null) : React.createElement(itwinui_icons_react_1.SvgCaretDownSmall, null);
137
142
  return (React.createElement("div", { className: containerClasses, style: containerStyle },
138
143
  React.createElement(itwinui_react_1.Input, { ref: ref, value: formattedValue, onChange: handleChange, onKeyDown: handleKeyDown, onFocus: handleFocus, onBlur: handleBlur, size: "small", ...otherProps }),
139
144
  React.createElement("div", { className: (0, classnames_1.default)("core-number-input-buttons-container", showTouchButtons && "core-number-buttons-for-touch") },
140
- React.createElement("div", { className: "core-number-input-button core-number-input-button-up", tabIndex: -1, onClick: handleUpClick },
141
- React.createElement(WebFontIcon_1.WebFontIcon, { iconName: "icon-caret-up" })),
142
- React.createElement("div", { className: "core-number-input-button core-number-input-button-down", tabIndex: -1, onClick: handleDownClick },
143
- React.createElement(WebFontIcon_1.WebFontIcon, { iconName: "icon-caret-down" })))));
145
+ React.createElement("div", { className: "core-number-input-button core-number-input-button-up", tabIndex: -1, onClick: handleUpClick, role: "presentation" },
146
+ React.createElement(IconComponent_1.Icon, { iconSpec: caretUp })),
147
+ React.createElement("div", { className: "core-number-input-button core-number-input-button-down", tabIndex: -1, onClick: handleDownClick, role: "presentation" },
148
+ React.createElement(IconComponent_1.Icon, { iconSpec: caretDown })))));
144
149
  });
145
150
  /** Input component for numbers with up and down buttons to increment and decrement the value.
146
151
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInput.js","sourceRoot":"","sources":["../../../../../src/core-react/inputs/numberinput/NumberInput.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAA4B;AAC5B,2CAAoC;AACpC,+BAA+B;AAC/B,wDAAyD;AACzD,0DAAmD;AACnD,yDAAsD;AAuCtD,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAC5C,SAAS,qBAAqB,CAAC,KAAK,EAAE,GAAG;IACvC,MAAM,EAAE,kBAAkB,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EACnE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IACrG,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAE5C;;;;;;KAMC;IACD,MAAM,aAAa,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAS,EAAE,EAAE;QACpD,IAAI,CAA4B,CAAC;QAEjC,IAAI,KAAK;YACP,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACf,IAAI,SAAS,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,EAAE;YACjC,C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A+B,CAAC;YAEpH,6BAAK,SAAS,EAAC,sDAAsD,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa;gBACxG,oBAAC,yBAAW,IAAC,QAAQ,EAAC,eAAe,GAAG,CACpC;YAEN,6BAAK,SAAS,EAAC,wDAAwD,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,eAAe;gBAC5G,oBAAC,yBAAW,IAAC,QAAQ,EAAC,iBAAiB,GAAG,CACtC,CACF,CACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;GAEG;AACU,QAAA,WAAW,GAAoD,qBAAqB,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 Inputs\r\n */\r\n\r\nimport \"./NumberInput.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Input, InputProps } from \"@itwin/itwinui-react\";\r\nimport { SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { WebFontIcon } from \"../../icons/WebFontIcon\";\r\n\r\n/** Step function prototype for [[NumberInput]] component\r\n * @public\r\n */\r\nexport type StepFunctionProp = number | ((direction: string) => number | undefined);\r\n\r\n/** Properties for the [[NumberInput]] component\r\n * @public\r\n */\r\nexport interface NumberInputProps extends Omit<InputProps, \"min\" | \"max\" | \"step\" | \"onChange\"> {\r\n /** Numeric value, set to `undefined` to show placeholder text */\r\n value?: number;\r\n /** CSS class name for the NumberInput component container div */\r\n containerClassName?: string;\r\n /** Style for component container div. */\r\n containerStyle?: React.CSSProperties;\r\n /** number or function\tNumber.MIN_SAFE_INTEGER */\r\n min?: number;\r\n /** number or function\tdefaults to Number.MAX_SAFE_INTEGER */\r\n max?: number;\r\n /** increment step value used while incrementing or decrementing (up/down buttons or arrow keys) defaults to 1. */\r\n step?: StepFunctionProp;\r\n /** number of decimal places, defaults to 0 */\r\n precision?: number;\r\n /** function parseFloat */\r\n parse?: ((value: string) => number | null | undefined);\r\n /** function optional formatting function that takes the number value and the internal formatted value in case function just adds prefix or suffix. */\r\n format?: (num: number | null | undefined, formattedValue: string) => string;\r\n /** Set to true to \"snap\" to the closest step value while incrementing or decrementing (up/down buttons or arrow keys). */\r\n snap?: boolean;\r\n /** Function to call when value is changed. */\r\n onChange?: (value: number | undefined, stringValue: string) => void;\r\n /** if true up/down buttons are shown larger and side by side */\r\n showTouchButtons?: boolean;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\nconst ForwardRefNumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(\r\n function ForwardRefNumberInput(props, ref) {\r\n const { containerClassName, value, min, max, precision, format, parse,\r\n onChange, onBlur, onKeyDown, step, snap, showTouchButtons, containerStyle, ...otherProps } = props;\r\n const currentValueRef = React.useRef(value);\r\n\r\n /**\r\n * Used internally to parse the argument x to it's numeric representation.\r\n * If the argument cannot be converted to finite number returns 0; If a\r\n * \"precision\" prop is specified uses it round the number with that\r\n * precision (no fixed precision here because the return value is float, not\r\n * string).\r\n */\r\n const parseInternal = React.useCallback((x: string) => {\r\n let n: number | undefined | null;\r\n\r\n if (parse)\r\n n = parse(x);\r\n if (undefined === n || null === n) {\r\n n = parseFloat(x);\r\n if (isNaN(n) || !isFinite(n)) {\r\n n = 0;\r\n }\r\n }\r\n\r\n const localPrecision = undefined === precision ? 10 : precision;\r\n const q = Math.pow(10, localPrecision);\r\n const localMin = undefined === min ? Number.MIN_SAFE_INTEGER : min;\r\n const localMax = undefined === max ? Number.MAX_SAFE_INTEGER : max;\r\n n = Math.min(Math.max(n, localMin), localMax);\r\n n = Math.round(n * q) / q;\r\n\r\n return n;\r\n }, [parse, precision, min, max]);\r\n\r\n /**\r\n * This is used internally to format a number to its display representation.\r\n * It will invoke the format function if one is provided.\r\n */\r\n const formatInternal = React.useCallback((num: number | undefined | null) => {\r\n const localPrecision = undefined === precision || null === precision ? 0 : precision;\r\n const str = undefined === num || null === num ? \"\" : num.toFixed(localPrecision);\r\n\r\n if (format)\r\n return format(num, str);\r\n\r\n return str;\r\n }, [format, precision]);\r\n\r\n const [formattedValue, setFormattedValue] = React.useState(() => formatInternal(value));\r\n\r\n // See if new initialValue props have changed since component mounted\r\n React.useEffect(() => {\r\n currentValueRef.current = value;\r\n const currentFormattedValue = formatInternal(currentValueRef.current);\r\n setFormattedValue(currentFormattedValue);\r\n }, [formatInternal, value]);\r\n\r\n const handleChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\r\n setFormattedValue(event.currentTarget.value);\r\n }, []);\r\n\r\n const updateValue = React.useCallback((newVal: number) => {\r\n const newFormattedVal = formatInternal(newVal);\r\n onChange && onChange(newVal, newFormattedVal);\r\n setFormattedValue(newFormattedVal);\r\n }, [onChange, formatInternal]);\r\n\r\n const updateValueFromString = React.useCallback((strValue: string) => {\r\n const newVal = parseInternal(strValue);\r\n updateValue(newVal);\r\n }, [parseInternal, updateValue]);\r\n\r\n const handleBlur = React.useCallback((event: React.FocusEvent<HTMLInputElement>) => {\r\n const newVal = parseInternal(event.target.value);\r\n onBlur && onBlur(event);\r\n updateValue(newVal);\r\n }, [parseInternal, updateValue, onBlur]);\r\n\r\n const getIncrementValue = React.useCallback((increment: boolean) => {\r\n if (typeof step === \"function\") {\r\n const stepVal = step(increment ? \"up\" : \"down\");\r\n return stepVal ? stepVal : 1;\r\n }\r\n\r\n return !step ? 1 : step;\r\n }, [step]);\r\n\r\n /**\r\n * The internal method that actually sets the new value on the input\r\n */\r\n const applyStep = React.useCallback((increment: boolean) => {\r\n const incrementValue = getIncrementValue(increment);\r\n\r\n let num = parseInternal(formattedValue) + (increment ? incrementValue : -incrementValue);\r\n if (snap) {\r\n num = Math.round(num / incrementValue) * incrementValue;\r\n }\r\n\r\n const localMin = undefined === min ? Number.MIN_SAFE_INTEGER : min;\r\n const localMax = undefined === max ? Number.MAX_SAFE_INTEGER : max;\r\n num = Math.min(Math.max(num, localMin), localMax);\r\n\r\n updateValue(num);\r\n }, [formattedValue, getIncrementValue, max, min, parseInternal, snap, updateValue]);\r\n\r\n const handleKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.Enter) {\r\n updateValueFromString(event.currentTarget.value);\r\n event.preventDefault();\r\n event.stopPropagation();\r\n } else if (event.key === SpecialKey.Escape) {\r\n setFormattedValue(formatInternal(currentValueRef.current));\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.ArrowDown) {\r\n applyStep(false);\r\n event.preventDefault();\r\n event.stopPropagation();\r\n } else if (event.key === SpecialKey.ArrowUp) {\r\n applyStep(true);\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n onKeyDown && onKeyDown(event);\r\n }, [applyStep, formatInternal, updateValueFromString, onKeyDown]);\r\n\r\n const handleDownClick = React.useCallback((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\r\n applyStep(false);\r\n event.preventDefault();\r\n }, [applyStep]);\r\n\r\n const handleUpClick = React.useCallback((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\r\n applyStep(true);\r\n event.preventDefault();\r\n }, [applyStep]);\r\n\r\n const handleFocus = React.useCallback((event: React.FocusEvent<HTMLInputElement>) => {\r\n event.currentTarget.select();\r\n }, []);\r\n\r\n const isDisabled = !!otherProps.disabled;\r\n const containerClasses = classnames(\"core-number-input-container\",\r\n containerClassName,\r\n showTouchButtons && \"core-number-buttons-for-touch\",\r\n isDisabled && \"core-number-input-disabled\",\r\n );\r\n\r\n return (\r\n <div className={containerClasses} style={containerStyle} >\r\n <Input ref={ref} value={formattedValue} onChange={handleChange} onKeyDown={handleKeyDown} onFocus={handleFocus} onBlur={handleBlur} size=\"small\" {...otherProps} />\r\n <div className={classnames(\"core-number-input-buttons-container\", showTouchButtons && \"core-number-buttons-for-touch\")}>\r\n { /* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\r\n <div className=\"core-number-input-button core-number-input-button-up\" tabIndex={-1} onClick={handleUpClick}>\r\n <WebFontIcon iconName=\"icon-caret-up\" />\r\n </div>\r\n { /* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\r\n <div className=\"core-number-input-button core-number-input-button-down\" tabIndex={-1} onClick={handleDownClick}>\r\n <WebFontIcon iconName=\"icon-caret-down\" />\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n);\r\n\r\n/** Input component for numbers with up and down buttons to increment and decrement the value.\r\n * @public\r\n */\r\nexport const NumberInput: (props: NumberInputProps) => JSX.Element | null = ForwardRefNumberInput;\r\n"]}
1
+ {"version":3,"file":"NumberInput.js","sourceRoot":"","sources":["../../../../../src/core-react/inputs/numberinput/NumberInput.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAA4B;AAC5B,2CAAoC;AACpC,+BAA+B;AAC/B,wDAAyD;AACzD,0DAAmD;AACnD,6DAAiD;AACjD,oEAA0G;AA4C1G,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAC5C,SAAS,qBAAqB,CAAC,KAAK,EAAE,GAAG;IACvC,MAAM,EAAE,kBAAkB,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EACnE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IACnH,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAE5C;;;;;;KAMC;IACD,MAAM,aAAa,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAS,EAAE,EAAE;QACpD,IAAI,CAA4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AAC,oBAAC,gCAAU,OAAG,CAAC,CAAC,CAAC,oBAAC,qCAAe,OAAG,CAAC;IACxE,MAAM,SAAS,GAAG,gBAAgB,CAAC,CAAC,CAAC,oBAAC,kCAAY,OAAG,CAAC,CAAC,CAAC,oBAAC,uCAAiB,OAAG,CAAC;IAE9E,OAAO,CACL,6BAAK,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc;QACrD,oBAAC,qBAAK,IAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAC,OAAO,KAAK,UAAU,GAAI;QACnK,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,qCAAqC,EAAE,gBAAgB,IAAI,+BAA+B,CAAC;YAEpH,6BAAK,SAAS,EAAC,sDAAsD,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAC,cAAc;gBAC7H,oBAAC,oBAAI,IAAC,QAAQ,EAAE,OAAO,GAAI,CACvB;YAEN,6BAAK,SAAS,EAAC,wDAAwD,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAC,cAAc;gBACjI,oBAAC,oBAAI,IAAC,QAAQ,EAAE,SAAS,GAAI,CACzB,CACF,CACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;GAEG;AACU,QAAA,WAAW,GAAoD,qBAAqB,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 Inputs\r\n */\r\n\r\nimport \"./NumberInput.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Input, InputProps } from \"@itwin/itwinui-react\";\r\nimport { SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { Icon } from \"../../icons/IconComponent\";\r\nimport { SvgCaretDown, SvgCaretDownSmall, SvgCaretUp, SvgCaretUpSmall } from \"@itwin/itwinui-icons-react\";\r\n\r\n/** Step function prototype for [[NumberInput]] component\r\n * @public\r\n */\r\nexport type StepFunctionProp = number | ((direction: string) => number | undefined);\r\n\r\n/** Properties for the [[NumberInput]] component\r\n * @public\r\n */\r\nexport interface NumberInputProps extends Omit<InputProps, \"min\" | \"max\" | \"step\" | \"onChange\"> {\r\n /** Numeric value, set to `undefined` to show placeholder text */\r\n value?: number;\r\n /** CSS class name for the NumberInput component container div */\r\n containerClassName?: string;\r\n /** Style for component container div. */\r\n containerStyle?: React.CSSProperties;\r\n /** number or function\tNumber.MIN_SAFE_INTEGER */\r\n min?: number;\r\n /** number or function\tdefaults to Number.MAX_SAFE_INTEGER */\r\n max?: number;\r\n /** increment step value used while incrementing or decrementing (up/down buttons or arrow keys) defaults to 1. */\r\n step?: StepFunctionProp;\r\n /** number of decimal places, defaults to 0 */\r\n precision?: number;\r\n /** function parseFloat */\r\n parse?: ((value: string) => number | null | undefined);\r\n /** function optional formatting function that takes the number value and the internal formatted value in case function just adds prefix or suffix. */\r\n format?: (num: number | null | undefined, formattedValue: string) => string;\r\n /** Set to true to \"snap\" to the closest step value while incrementing or decrementing (up/down buttons or arrow keys). */\r\n snap?: boolean;\r\n /** Function to call when value is changed. */\r\n onChange?: (value: number | undefined, stringValue: string) => void;\r\n /** if true up/down buttons are shown larger and side by side */\r\n showTouchButtons?: boolean;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLInputElement>;\r\n /**\r\n * Makes this component behave as controlled component.\r\n * @internal\r\n */\r\n isControlled?: boolean;\r\n}\r\n\r\nconst ForwardRefNumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(\r\n function ForwardRefNumberInput(props, ref) {\r\n const { containerClassName, value, min, max, precision, format, parse,\r\n onChange, onBlur, onKeyDown, step, snap, showTouchButtons, containerStyle, isControlled, ...otherProps } = props;\r\n const currentValueRef = React.useRef(value);\r\n\r\n /**\r\n * Used internally to parse the argument x to it's numeric representation.\r\n * If the argument cannot be converted to finite number returns 0; If a\r\n * \"precision\" prop is specified uses it round the number with that\r\n * precision (no fixed precision here because the return value is float, not\r\n * string).\r\n */\r\n const parseInternal = React.useCallback((x: string) => {\r\n let n: number | undefined | null;\r\n\r\n if (parse)\r\n n = parse(x);\r\n if (undefined === n || null === n) {\r\n n = parseFloat(x);\r\n if (isNaN(n) || !isFinite(n)) {\r\n n = 0;\r\n }\r\n }\r\n\r\n const localPrecision = undefined === precision ? 10 : precision;\r\n const q = Math.pow(10, localPrecision);\r\n const localMin = undefined === min ? Number.MIN_SAFE_INTEGER : min;\r\n const localMax = undefined === max ? Number.MAX_SAFE_INTEGER : max;\r\n n = Math.min(Math.max(n, localMin), localMax);\r\n n = Math.round(n * q) / q;\r\n\r\n return n;\r\n }, [parse, precision, min, max]);\r\n\r\n /**\r\n * This is used internally to format a number to its display representation.\r\n * It will invoke the format function if one is provided.\r\n */\r\n const formatInternal = React.useCallback((num: number | undefined | null) => {\r\n const localPrecision = undefined === precision || null === precision ? 0 : precision;\r\n const str = undefined === num || null === num ? \"\" : num.toFixed(localPrecision);\r\n\r\n if (format)\r\n return format(num, str);\r\n\r\n return str;\r\n }, [format, precision]);\r\n\r\n const [formattedValue, setFormattedValue] = React.useState(() => formatInternal(value));\r\n\r\n // See if new initialValue props have changed since component mounted\r\n React.useEffect(() => {\r\n currentValueRef.current = value;\r\n const currentFormattedValue = formatInternal(currentValueRef.current);\r\n setFormattedValue(currentFormattedValue);\r\n }, [formatInternal, value]);\r\n\r\n const handleChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\r\n const newVal = event.currentTarget.value;\r\n setFormattedValue(newVal);\r\n isControlled && onChange && onChange(parseInternal(newVal), newVal);\r\n }, [isControlled, onChange, parseInternal]);\r\n\r\n const updateValue = React.useCallback((newVal: number) => {\r\n const newFormattedVal = formatInternal(newVal);\r\n onChange && onChange(newVal, newFormattedVal);\r\n setFormattedValue(newFormattedVal);\r\n }, [onChange, formatInternal]);\r\n\r\n const updateValueFromString = React.useCallback((strValue: string) => {\r\n const newVal = parseInternal(strValue);\r\n updateValue(newVal);\r\n }, [parseInternal, updateValue]);\r\n\r\n const handleBlur = React.useCallback((event: React.FocusEvent<HTMLInputElement>) => {\r\n const newVal = parseInternal(event.target.value);\r\n onBlur && onBlur(event);\r\n updateValue(newVal);\r\n }, [parseInternal, updateValue, onBlur]);\r\n\r\n const getIncrementValue = React.useCallback((increment: boolean) => {\r\n if (typeof step === \"function\") {\r\n const stepVal = step(increment ? \"up\" : \"down\");\r\n return stepVal ? stepVal : 1;\r\n }\r\n\r\n return !step ? 1 : step;\r\n }, [step]);\r\n\r\n /**\r\n * The internal method that actually sets the new value on the input\r\n */\r\n const applyStep = React.useCallback((increment: boolean) => {\r\n const incrementValue = getIncrementValue(increment);\r\n\r\n let num = parseInternal(formattedValue) + (increment ? incrementValue : -incrementValue);\r\n if (snap) {\r\n num = Math.round(num / incrementValue) * incrementValue;\r\n }\r\n\r\n const localMin = undefined === min ? Number.MIN_SAFE_INTEGER : min;\r\n const localMax = undefined === max ? Number.MAX_SAFE_INTEGER : max;\r\n num = Math.min(Math.max(num, localMin), localMax);\r\n\r\n updateValue(num);\r\n }, [formattedValue, getIncrementValue, max, min, parseInternal, snap, updateValue]);\r\n\r\n const handleKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.Enter) {\r\n updateValueFromString(event.currentTarget.value);\r\n event.preventDefault();\r\n event.stopPropagation();\r\n } else if (event.key === SpecialKey.Escape) {\r\n setFormattedValue(formatInternal(currentValueRef.current));\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.ArrowDown) {\r\n applyStep(false);\r\n event.preventDefault();\r\n event.stopPropagation();\r\n } else if (event.key === SpecialKey.ArrowUp) {\r\n applyStep(true);\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n onKeyDown && onKeyDown(event);\r\n }, [applyStep, formatInternal, updateValueFromString, onKeyDown]);\r\n\r\n const handleDownClick = React.useCallback((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\r\n applyStep(false);\r\n event.preventDefault();\r\n }, [applyStep]);\r\n\r\n const handleUpClick = React.useCallback((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\r\n applyStep(true);\r\n event.preventDefault();\r\n }, [applyStep]);\r\n\r\n const handleFocus = React.useCallback((event: React.FocusEvent<HTMLInputElement>) => {\r\n event.currentTarget.select();\r\n }, []);\r\n\r\n const isDisabled = !!otherProps.disabled;\r\n const containerClasses = classnames(\"core-number-input-container\",\r\n containerClassName,\r\n showTouchButtons && \"core-number-buttons-for-touch\",\r\n isDisabled && \"core-number-input-disabled\",\r\n );\r\n\r\n const caretUp = showTouchButtons ? <SvgCaretUp /> : <SvgCaretUpSmall />;\r\n const caretDown = showTouchButtons ? <SvgCaretDown /> : <SvgCaretDownSmall />;\r\n\r\n return (\r\n <div className={containerClasses} style={containerStyle} >\r\n <Input ref={ref} value={formattedValue} onChange={handleChange} onKeyDown={handleKeyDown} onFocus={handleFocus} onBlur={handleBlur} size=\"small\" {...otherProps} />\r\n <div className={classnames(\"core-number-input-buttons-container\", showTouchButtons && \"core-number-buttons-for-touch\")}>\r\n { /* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\r\n <div className=\"core-number-input-button core-number-input-button-up\" tabIndex={-1} onClick={handleUpClick} role=\"presentation\" >\r\n <Icon iconSpec={caretUp} />\r\n </div>\r\n { /* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\r\n <div className=\"core-number-input-button core-number-input-button-down\" tabIndex={-1} onClick={handleDownClick} role=\"presentation\" >\r\n <Icon iconSpec={caretDown} />\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n);\r\n\r\n/** Input component for numbers with up and down buttons to increment and decrement the value.\r\n * @public\r\n */\r\nexport const NumberInput: (props: NumberInputProps) => JSX.Element | null = ForwardRefNumberInput;\r\n"]}
@@ -7,12 +7,12 @@
7
7
 
8
8
  .core-number-input-container {
9
9
  position: relative;
10
- padding: 0;
11
- margin: 0;
10
+ padding: 0;
11
+ margin: 0;
12
12
  box-sizing: border-box;
13
13
 
14
14
  input {
15
- margin: 0;
15
+ margin: 0;
16
16
  padding-right: 1.5em;
17
17
 
18
18
  &.iui-input {
@@ -28,11 +28,10 @@
28
28
 
29
29
  .core-number-input-buttons-container {
30
30
  position: absolute;
31
- top: 0;
32
- right: 0;
33
- width: 20px;
34
- height: 100%;
35
- padding-top: 1.5px;
31
+ top: 0;
32
+ right: 0;
33
+ width: 20px;
34
+ height: 100%;
36
35
  @include uicore-centered;
37
36
  flex-direction: column;
38
37
 
@@ -43,7 +42,7 @@
43
42
  width: 100%;
44
43
  @include uicore-centered;
45
44
  &:hover {
46
- color: $buic-foreground-primary-tone;
45
+ color: var(--iui-color-text-accent-hover);
47
46
  transition-duration: 150ms;
48
47
  }
49
48
  &.core-number-input-button-up {
@@ -55,11 +54,12 @@
55
54
  }
56
55
 
57
56
  &.core-number-buttons-for-touch {
58
- width: 3.5em;
57
+ width: 3.5em;
59
58
  flex-direction: row-reverse;
60
59
 
61
60
  .core-number-input-button {
62
61
  font-size: 1em;
62
+
63
63
  &:hover {
64
64
  color: unset;
65
65
  transition-duration: unset;
@@ -77,13 +77,12 @@
77
77
  &.core-number-input-disabled {
78
78
  .core-number-input-button-up {
79
79
  pointer-events: none;
80
- color: $buic-foreground-disabled;
80
+ color: var(--iui-color-text-disabled);
81
81
  }
82
82
 
83
83
  .core-number-input-button-down {
84
84
  pointer-events: none;
85
- color: $buic-foreground-disabled;
85
+ color: var(--iui-color-text-disabled);
86
86
  }
87
87
  }
88
-
89
88
  }
@@ -4,30 +4,35 @@
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  @import "../style/baseline";
6
6
  @import "../style/themecolors";
7
- @import "~@itwin/itwinui-css/scss/style/space";
8
7
 
9
8
  // cspell:ignore unbordered
10
9
 
11
10
  $uicore-inputs-height: 22px;
12
11
  $uicore-inputs-height-large: 40px;
13
- $uicore-line-height: $uicore-baseline * 1.4;
14
- $uicore-bordered-padding: $uicore-bordered-padding * 0.5;
15
- $uicore-unbordered-padding: $uicore-unbordered-padding * 0.5;
12
+ $uicore-line-height: calc(var(--iui-size-s) * 1.4);
13
+ $uicore-bordered-padding: calc(#{$uicore-bordered-padding} * 0.5);
14
+ $uicore-unbordered-padding: calc(#{$uicore-unbordered-padding} * 0.5);
16
15
 
17
- $uicore-inputs-padding: ($uicore-inputs-height - $uicore-line-height) * 0.5;
18
- $uicore-inputs-padding-large: (
19
- $uicore-inputs-height-large - $uicore-line-height
20
- ) * 0.5;
21
- $uicore-inputs-padding-bordered: $uicore-inputs-padding - 2px;
22
- $uicore-inputs-padding-bordered-large: $uicore-inputs-padding-large - 2px;
16
+ $uicore-inputs-padding: calc(
17
+ (#{$uicore-inputs-height} - #{$uicore-line-height}) * 0.5
18
+ );
19
+ $uicore-inputs-padding-large: calc(
20
+ (#{$uicore-inputs-height-large} - #{$uicore-line-height}) * 0.5
21
+ );
22
+ $uicore-inputs-padding-bordered: calc(#{$uicore-inputs-padding} - 2px);
23
+ $uicore-inputs-padding-bordered-large: calc(
24
+ #{$uicore-inputs-padding-large} - 2px
25
+ );
23
26
 
24
- $uicore-inputs-margin: ($uicore-line-height * 2 - $uicore-inputs-height) * 0.5;
25
- $uicore-inputs-margin-large: (
26
- $uicore-line-height * 3 - $uicore-inputs-height-large
27
- ) * 0.5;
27
+ $uicore-inputs-margin: calc(
28
+ (#{$uicore-line-height} * 2 - #{$uicore-inputs-height}) * 0.5
29
+ );
30
+ $uicore-inputs-margin-large: calc(
31
+ (#{$uicore-line-height} * 3 - #{$uicore-inputs-height-large}) * 0.5
32
+ );
28
33
 
29
34
  $uicore-inputs-border-color: $buic-inputs-border;
30
35
 
31
36
  $uicore-inputs-focus-boxshadow: $buic-focus-boxshadow 0px 0px 0px 2px;
32
37
 
33
- $uicore-iui-input-padding: $iui-xxs $iui-s;
38
+ $uicore-iui-input-padding: var(--iui-size-3xs) var(--iui-size-xs);