@itwin/core-react 3.7.15 → 3.7.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  3. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  4. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  5. package/lib/cjs/core-react/badge/Badge.d.ts +1 -1
  6. package/lib/cjs/core-react/badge/Badge.d.ts.map +1 -1
  7. package/lib/cjs/core-react/badge/Badge.js.map +1 -1
  8. package/lib/cjs/core-react/badge/BetaBadge.d.ts +2 -2
  9. package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
  10. package/lib/cjs/core-react/badge/NewBadge.d.ts +2 -2
  11. package/lib/cjs/core-react/badge/NewBadge.d.ts.map +1 -1
  12. package/lib/cjs/core-react/base/Centered.d.ts +2 -2
  13. package/lib/cjs/core-react/base/Centered.d.ts.map +1 -1
  14. package/lib/cjs/core-react/base/Div.d.ts +2 -2
  15. package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
  16. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +2 -2
  17. package/lib/cjs/core-react/base/FillCentered.d.ts +2 -2
  18. package/lib/cjs/core-react/base/FillCentered.d.ts.map +1 -1
  19. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +2 -2
  20. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  21. package/lib/cjs/core-react/base/Gap.d.ts +2 -2
  22. package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
  23. package/lib/cjs/core-react/base/ScrollView.d.ts +2 -2
  24. package/lib/cjs/core-react/base/ScrollView.d.ts.map +1 -1
  25. package/lib/cjs/core-react/button/Button.d.ts +1 -1
  26. package/lib/cjs/core-react/button/UnderlinedButton.d.ts +1 -1
  27. package/lib/cjs/core-react/button/UnderlinedButton.d.ts.map +1 -1
  28. package/lib/cjs/core-react/checkbox/Checkbox.d.ts +1 -1
  29. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +3 -3
  30. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  31. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +1 -1
  32. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  33. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  34. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  35. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  36. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  37. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
  38. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  39. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  40. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
  41. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  42. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +3 -1
  43. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  44. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts +1 -1
  45. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  46. package/lib/cjs/core-react/dialog/Dialog.d.ts +3 -3
  47. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  48. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  49. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +2 -2
  50. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  51. package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts +2 -2
  52. package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts.map +1 -1
  53. package/lib/cjs/core-react/expandable/ExpandableBlock.js.map +1 -1
  54. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +1 -1
  55. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  56. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  57. package/lib/cjs/core-react/focustrap/FocusTrap.d.ts +1 -1
  58. package/lib/cjs/core-react/focustrap/FocusTrap.d.ts.map +1 -1
  59. package/lib/cjs/core-react/form/Field.d.ts +1 -1
  60. package/lib/cjs/core-react/form/Form.d.ts +1 -1
  61. package/lib/cjs/core-react/hocs/withIsPressed.d.ts +2 -2
  62. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts +2 -2
  63. package/lib/cjs/core-react/hocs/withTimeout.d.ts +2 -2
  64. package/lib/cjs/core-react/icons/IconComponent.d.ts +1 -1
  65. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  66. package/lib/cjs/core-react/icons/SvgPath.d.ts +1 -1
  67. package/lib/cjs/core-react/icons/SvgSprite.d.ts +1 -1
  68. package/lib/cjs/core-react/icons/WebFontIcon.d.ts +1 -1
  69. package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
  70. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +1 -1
  71. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +1 -1
  72. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  73. package/lib/cjs/core-react/inputs/Input.d.ts +1 -1
  74. package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
  75. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  76. package/lib/cjs/core-react/inputs/InputLabel.d.ts +1 -1
  77. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  78. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  79. package/lib/cjs/core-react/inputs/LabeledInput.d.ts +2 -2
  80. package/lib/cjs/core-react/inputs/LabeledInput.d.ts.map +1 -1
  81. package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts +2 -2
  82. package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts.map +1 -1
  83. package/lib/cjs/core-react/inputs/Textarea.d.ts +1 -1
  84. package/lib/cjs/core-react/inputs/Textarea.d.ts.map +1 -1
  85. package/lib/cjs/core-react/inputs/Textarea.js.map +1 -1
  86. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  87. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  88. package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
  89. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +1 -1
  90. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  91. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  92. package/lib/cjs/core-react/listbox/Listbox.d.ts +2 -2
  93. package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
  94. package/lib/cjs/core-react/loading/LoadingBar.d.ts +1 -1
  95. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +1 -1
  96. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +1 -1
  97. package/lib/cjs/core-react/loading/LoadingStatus.d.ts +1 -1
  98. package/lib/cjs/core-react/loading/Spinner.d.ts +1 -1
  99. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +3 -3
  100. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  101. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  102. package/lib/cjs/core-react/notification/MessageRenderer.d.ts +2 -2
  103. package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
  104. package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts +2 -2
  105. package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts.map +1 -1
  106. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts +1 -1
  107. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts.map +1 -1
  108. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +2 -2
  109. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  110. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  111. package/lib/cjs/core-react/radio/Radio.d.ts +1 -1
  112. package/lib/cjs/core-react/radio/Radio.d.ts.map +1 -1
  113. package/lib/cjs/core-react/radio/Radio.js.map +1 -1
  114. package/lib/cjs/core-react/select/LabeledSelect.d.ts +1 -1
  115. package/lib/cjs/core-react/select/LabeledSelect.d.ts.map +1 -1
  116. package/lib/cjs/core-react/select/LabeledSelect.js.map +1 -1
  117. package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts +2 -2
  118. package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts.map +1 -1
  119. package/lib/cjs/core-react/select/Select.d.ts +1 -1
  120. package/lib/cjs/core-react/select/Select.d.ts.map +1 -1
  121. package/lib/cjs/core-react/select/Select.js.map +1 -1
  122. package/lib/cjs/core-react/select/ThemedSelect.d.ts +1 -1
  123. package/lib/cjs/core-react/select/ThemedSelect.d.ts.map +1 -1
  124. package/lib/cjs/core-react/settings/SettingsContainer.d.ts +2 -2
  125. package/lib/cjs/core-react/settings/SettingsContainer.d.ts.map +1 -1
  126. package/lib/cjs/core-react/settings/SettingsManager.d.ts +3 -3
  127. package/lib/cjs/core-react/settings/SettingsManager.d.ts.map +1 -1
  128. package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
  129. package/lib/cjs/core-react/slider/Slider.d.ts +1 -1
  130. package/lib/cjs/core-react/slider/Slider.d.ts.map +1 -1
  131. package/lib/cjs/core-react/splitbutton/SplitButton.d.ts +1 -1
  132. package/lib/cjs/core-react/splitbutton/SplitButton.d.ts.map +1 -1
  133. package/lib/cjs/core-react/splitbutton/SplitButton.js.map +1 -1
  134. package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts +2 -2
  135. package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts.map +1 -1
  136. package/lib/cjs/core-react/tabs/Tabs.d.ts +4 -4
  137. package/lib/cjs/core-react/tabs/Tabs.d.ts.map +1 -1
  138. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  139. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +2 -2
  140. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  141. package/lib/cjs/core-react/text/BlockText.d.ts +2 -2
  142. package/lib/cjs/core-react/text/BlockText.d.ts.map +1 -1
  143. package/lib/cjs/core-react/text/BodyText.d.ts +2 -2
  144. package/lib/cjs/core-react/text/BodyText.d.ts.map +1 -1
  145. package/lib/cjs/core-react/text/DisabledText.d.ts +5 -2
  146. package/lib/cjs/core-react/text/DisabledText.d.ts.map +1 -1
  147. package/lib/cjs/core-react/text/FilteredText.d.ts +1 -1
  148. package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
  149. package/lib/cjs/core-react/text/Headline.d.ts +2 -2
  150. package/lib/cjs/core-react/text/Headline.d.ts.map +1 -1
  151. package/lib/cjs/core-react/text/LeadingText.d.ts +2 -2
  152. package/lib/cjs/core-react/text/LeadingText.d.ts.map +1 -1
  153. package/lib/cjs/core-react/text/LeadingText2.d.ts +2 -2
  154. package/lib/cjs/core-react/text/LeadingText2.d.ts.map +1 -1
  155. package/lib/cjs/core-react/text/MutedText.d.ts +2 -2
  156. package/lib/cjs/core-react/text/MutedText.d.ts.map +1 -1
  157. package/lib/cjs/core-react/text/SmallText.d.ts +2 -2
  158. package/lib/cjs/core-react/text/SmallText.d.ts.map +1 -1
  159. package/lib/cjs/core-react/text/StyledText.d.ts +2 -2
  160. package/lib/cjs/core-react/text/StyledText.d.ts.map +1 -1
  161. package/lib/cjs/core-react/text/Subheading.d.ts +2 -2
  162. package/lib/cjs/core-react/text/Subheading.d.ts.map +1 -1
  163. package/lib/cjs/core-react/text/Subheading2.d.ts +2 -2
  164. package/lib/cjs/core-react/text/Subheading2.d.ts.map +1 -1
  165. package/lib/cjs/core-react/text/Title.d.ts +2 -2
  166. package/lib/cjs/core-react/text/Title.d.ts.map +1 -1
  167. package/lib/cjs/core-react/text/Title2.d.ts +2 -2
  168. package/lib/cjs/core-react/text/Title2.d.ts.map +1 -1
  169. package/lib/cjs/core-react/tiles/FeaturedTile.d.ts +2 -2
  170. package/lib/cjs/core-react/tiles/FeaturedTile.d.ts.map +1 -1
  171. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts +2 -2
  172. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts.map +1 -1
  173. package/lib/cjs/core-react/tiles/MinimalTile.d.ts +2 -2
  174. package/lib/cjs/core-react/tiles/MinimalTile.d.ts.map +1 -1
  175. package/lib/cjs/core-react/tiles/Tile.d.ts +1 -1
  176. package/lib/cjs/core-react/tiles/Tile.d.ts.map +1 -1
  177. package/lib/cjs/core-react/tiles/Tile.js.map +1 -1
  178. package/lib/cjs/core-react/toggle/LabeledToggle.d.ts +1 -1
  179. package/lib/cjs/core-react/toggle/LabeledToggle.d.ts.map +1 -1
  180. package/lib/cjs/core-react/toggle/LabeledToggle.js.map +1 -1
  181. package/lib/cjs/core-react/toggle/Toggle.d.ts +1 -1
  182. package/lib/cjs/core-react/toggle/Toggle.d.ts.map +1 -1
  183. package/lib/cjs/core-react/toggle/Toggle.js +3 -1
  184. package/lib/cjs/core-react/toggle/Toggle.js.map +1 -1
  185. package/lib/cjs/core-react/tooltip/Tooltip.d.ts +1 -1
  186. package/lib/cjs/core-react/tooltip/Tooltip.d.ts.map +1 -1
  187. package/lib/cjs/core-react/tree/Branch.d.ts +1 -1
  188. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts +1 -1
  189. package/lib/cjs/core-react/tree/Node.d.ts +1 -1
  190. package/lib/cjs/core-react/tree/Placeholder.d.ts +1 -1
  191. package/lib/cjs/core-react/tree/Tree.d.ts +1 -1
  192. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +3 -3
  193. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  194. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  195. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  196. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  197. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  198. package/lib/esm/core-react/badge/Badge.d.ts +1 -1
  199. package/lib/esm/core-react/badge/Badge.d.ts.map +1 -1
  200. package/lib/esm/core-react/badge/Badge.js.map +1 -1
  201. package/lib/esm/core-react/badge/BetaBadge.d.ts +2 -2
  202. package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
  203. package/lib/esm/core-react/badge/NewBadge.d.ts +2 -2
  204. package/lib/esm/core-react/badge/NewBadge.d.ts.map +1 -1
  205. package/lib/esm/core-react/base/Centered.d.ts +2 -2
  206. package/lib/esm/core-react/base/Centered.d.ts.map +1 -1
  207. package/lib/esm/core-react/base/Div.d.ts +2 -2
  208. package/lib/esm/core-react/base/Div.d.ts.map +1 -1
  209. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +2 -2
  210. package/lib/esm/core-react/base/FillCentered.d.ts +2 -2
  211. package/lib/esm/core-react/base/FillCentered.d.ts.map +1 -1
  212. package/lib/esm/core-react/base/FlexWrapContainer.d.ts +2 -2
  213. package/lib/esm/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  214. package/lib/esm/core-react/base/Gap.d.ts +2 -2
  215. package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
  216. package/lib/esm/core-react/base/ScrollView.d.ts +2 -2
  217. package/lib/esm/core-react/base/ScrollView.d.ts.map +1 -1
  218. package/lib/esm/core-react/button/Button.d.ts +1 -1
  219. package/lib/esm/core-react/button/UnderlinedButton.d.ts +1 -1
  220. package/lib/esm/core-react/button/UnderlinedButton.d.ts.map +1 -1
  221. package/lib/esm/core-react/checkbox/Checkbox.d.ts +1 -1
  222. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +3 -3
  223. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  224. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +1 -1
  225. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  226. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  227. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  228. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  229. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  230. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
  231. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  232. package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  233. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
  234. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  235. package/lib/esm/core-react/contextmenu/ContextSubMenu.js +3 -1
  236. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  237. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts +1 -1
  238. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  239. package/lib/esm/core-react/dialog/Dialog.d.ts +3 -3
  240. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  241. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  242. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +2 -2
  243. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  244. package/lib/esm/core-react/expandable/ExpandableBlock.d.ts +2 -2
  245. package/lib/esm/core-react/expandable/ExpandableBlock.d.ts.map +1 -1
  246. package/lib/esm/core-react/expandable/ExpandableBlock.js.map +1 -1
  247. package/lib/esm/core-react/expandable/ExpandableList.d.ts +1 -1
  248. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  249. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  250. package/lib/esm/core-react/focustrap/FocusTrap.d.ts +1 -1
  251. package/lib/esm/core-react/focustrap/FocusTrap.d.ts.map +1 -1
  252. package/lib/esm/core-react/form/Field.d.ts +1 -1
  253. package/lib/esm/core-react/form/Form.d.ts +1 -1
  254. package/lib/esm/core-react/hocs/withIsPressed.d.ts +2 -2
  255. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts +2 -2
  256. package/lib/esm/core-react/hocs/withTimeout.d.ts +2 -2
  257. package/lib/esm/core-react/icons/IconComponent.d.ts +1 -1
  258. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  259. package/lib/esm/core-react/icons/SvgPath.d.ts +1 -1
  260. package/lib/esm/core-react/icons/SvgSprite.d.ts +1 -1
  261. package/lib/esm/core-react/icons/WebFontIcon.d.ts +1 -1
  262. package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
  263. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +1 -1
  264. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +1 -1
  265. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  266. package/lib/esm/core-react/inputs/Input.d.ts +1 -1
  267. package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
  268. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  269. package/lib/esm/core-react/inputs/InputLabel.d.ts +1 -1
  270. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  271. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  272. package/lib/esm/core-react/inputs/LabeledInput.d.ts +2 -2
  273. package/lib/esm/core-react/inputs/LabeledInput.d.ts.map +1 -1
  274. package/lib/esm/core-react/inputs/LabeledTextarea.d.ts +2 -2
  275. package/lib/esm/core-react/inputs/LabeledTextarea.d.ts.map +1 -1
  276. package/lib/esm/core-react/inputs/Textarea.d.ts +1 -1
  277. package/lib/esm/core-react/inputs/Textarea.d.ts.map +1 -1
  278. package/lib/esm/core-react/inputs/Textarea.js.map +1 -1
  279. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  280. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  281. package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
  282. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +1 -1
  283. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  284. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  285. package/lib/esm/core-react/listbox/Listbox.d.ts +2 -2
  286. package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
  287. package/lib/esm/core-react/loading/LoadingBar.d.ts +1 -1
  288. package/lib/esm/core-react/loading/LoadingPrompt.d.ts +1 -1
  289. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +1 -1
  290. package/lib/esm/core-react/loading/LoadingStatus.d.ts +1 -1
  291. package/lib/esm/core-react/loading/Spinner.d.ts +1 -1
  292. package/lib/esm/core-react/messagebox/MessageBox.d.ts +3 -3
  293. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  294. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  295. package/lib/esm/core-react/notification/MessageRenderer.d.ts +2 -2
  296. package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
  297. package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts +2 -2
  298. package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts.map +1 -1
  299. package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts +1 -1
  300. package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts.map +1 -1
  301. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +2 -2
  302. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  303. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  304. package/lib/esm/core-react/radio/Radio.d.ts +1 -1
  305. package/lib/esm/core-react/radio/Radio.d.ts.map +1 -1
  306. package/lib/esm/core-react/radio/Radio.js.map +1 -1
  307. package/lib/esm/core-react/select/LabeledSelect.d.ts +1 -1
  308. package/lib/esm/core-react/select/LabeledSelect.d.ts.map +1 -1
  309. package/lib/esm/core-react/select/LabeledSelect.js.map +1 -1
  310. package/lib/esm/core-react/select/LabeledThemedSelect.d.ts +2 -2
  311. package/lib/esm/core-react/select/LabeledThemedSelect.d.ts.map +1 -1
  312. package/lib/esm/core-react/select/Select.d.ts +1 -1
  313. package/lib/esm/core-react/select/Select.d.ts.map +1 -1
  314. package/lib/esm/core-react/select/Select.js.map +1 -1
  315. package/lib/esm/core-react/select/ThemedSelect.d.ts +1 -1
  316. package/lib/esm/core-react/select/ThemedSelect.d.ts.map +1 -1
  317. package/lib/esm/core-react/settings/SettingsContainer.d.ts +2 -2
  318. package/lib/esm/core-react/settings/SettingsContainer.d.ts.map +1 -1
  319. package/lib/esm/core-react/settings/SettingsManager.d.ts +3 -3
  320. package/lib/esm/core-react/settings/SettingsManager.d.ts.map +1 -1
  321. package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
  322. package/lib/esm/core-react/slider/Slider.d.ts +1 -1
  323. package/lib/esm/core-react/slider/Slider.d.ts.map +1 -1
  324. package/lib/esm/core-react/splitbutton/SplitButton.d.ts +1 -1
  325. package/lib/esm/core-react/splitbutton/SplitButton.d.ts.map +1 -1
  326. package/lib/esm/core-react/splitbutton/SplitButton.js.map +1 -1
  327. package/lib/esm/core-react/tabs/HorizontalTabs.d.ts +2 -2
  328. package/lib/esm/core-react/tabs/HorizontalTabs.d.ts.map +1 -1
  329. package/lib/esm/core-react/tabs/Tabs.d.ts +4 -4
  330. package/lib/esm/core-react/tabs/Tabs.d.ts.map +1 -1
  331. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  332. package/lib/esm/core-react/tabs/VerticalTabs.d.ts +2 -2
  333. package/lib/esm/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  334. package/lib/esm/core-react/text/BlockText.d.ts +2 -2
  335. package/lib/esm/core-react/text/BlockText.d.ts.map +1 -1
  336. package/lib/esm/core-react/text/BodyText.d.ts +2 -2
  337. package/lib/esm/core-react/text/BodyText.d.ts.map +1 -1
  338. package/lib/esm/core-react/text/DisabledText.d.ts +5 -2
  339. package/lib/esm/core-react/text/DisabledText.d.ts.map +1 -1
  340. package/lib/esm/core-react/text/FilteredText.d.ts +1 -1
  341. package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
  342. package/lib/esm/core-react/text/Headline.d.ts +2 -2
  343. package/lib/esm/core-react/text/Headline.d.ts.map +1 -1
  344. package/lib/esm/core-react/text/LeadingText.d.ts +2 -2
  345. package/lib/esm/core-react/text/LeadingText.d.ts.map +1 -1
  346. package/lib/esm/core-react/text/LeadingText2.d.ts +2 -2
  347. package/lib/esm/core-react/text/LeadingText2.d.ts.map +1 -1
  348. package/lib/esm/core-react/text/MutedText.d.ts +2 -2
  349. package/lib/esm/core-react/text/MutedText.d.ts.map +1 -1
  350. package/lib/esm/core-react/text/SmallText.d.ts +2 -2
  351. package/lib/esm/core-react/text/SmallText.d.ts.map +1 -1
  352. package/lib/esm/core-react/text/StyledText.d.ts +2 -2
  353. package/lib/esm/core-react/text/StyledText.d.ts.map +1 -1
  354. package/lib/esm/core-react/text/Subheading.d.ts +2 -2
  355. package/lib/esm/core-react/text/Subheading.d.ts.map +1 -1
  356. package/lib/esm/core-react/text/Subheading2.d.ts +2 -2
  357. package/lib/esm/core-react/text/Subheading2.d.ts.map +1 -1
  358. package/lib/esm/core-react/text/Title.d.ts +2 -2
  359. package/lib/esm/core-react/text/Title.d.ts.map +1 -1
  360. package/lib/esm/core-react/text/Title2.d.ts +2 -2
  361. package/lib/esm/core-react/text/Title2.d.ts.map +1 -1
  362. package/lib/esm/core-react/tiles/FeaturedTile.d.ts +2 -2
  363. package/lib/esm/core-react/tiles/FeaturedTile.d.ts.map +1 -1
  364. package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts +2 -2
  365. package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts.map +1 -1
  366. package/lib/esm/core-react/tiles/MinimalTile.d.ts +2 -2
  367. package/lib/esm/core-react/tiles/MinimalTile.d.ts.map +1 -1
  368. package/lib/esm/core-react/tiles/Tile.d.ts +1 -1
  369. package/lib/esm/core-react/tiles/Tile.d.ts.map +1 -1
  370. package/lib/esm/core-react/tiles/Tile.js.map +1 -1
  371. package/lib/esm/core-react/toggle/LabeledToggle.d.ts +1 -1
  372. package/lib/esm/core-react/toggle/LabeledToggle.d.ts.map +1 -1
  373. package/lib/esm/core-react/toggle/LabeledToggle.js.map +1 -1
  374. package/lib/esm/core-react/toggle/Toggle.d.ts +1 -1
  375. package/lib/esm/core-react/toggle/Toggle.d.ts.map +1 -1
  376. package/lib/esm/core-react/toggle/Toggle.js +3 -1
  377. package/lib/esm/core-react/toggle/Toggle.js.map +1 -1
  378. package/lib/esm/core-react/tooltip/Tooltip.d.ts +1 -1
  379. package/lib/esm/core-react/tooltip/Tooltip.d.ts.map +1 -1
  380. package/lib/esm/core-react/tree/Branch.d.ts +1 -1
  381. package/lib/esm/core-react/tree/ExpansionToggle.d.ts +1 -1
  382. package/lib/esm/core-react/tree/Node.d.ts +1 -1
  383. package/lib/esm/core-react/tree/Placeholder.d.ts +1 -1
  384. package/lib/esm/core-react/tree/Tree.d.ts +1 -1
  385. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +3 -3
  386. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  387. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  388. package/package.json +10 -10
@@ -25,5 +25,5 @@ export interface FocusTrapProps extends React.AllHTMLAttributes<any> {
25
25
  /** Trap Focus in container while trap is active.
26
26
  * @internal
27
27
  */
28
- export declare function FocusTrap(props: FocusTrapProps): JSX.Element | null;
28
+ export declare function FocusTrap(props: FocusTrapProps): React.JSX.Element | null;
29
29
  //# sourceMappingURL=FocusTrap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FocusTrap.d.ts","sourceRoot":"","sources":["../../../../src/core-react/focustrap/FocusTrap.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgH/B;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,cAAc,EAAE,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,MAAM,GAAG,OAAO,CAWvI;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC;IAClE,uBAAuB;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,oEAAoE;IACpE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,uBAAuB,EAAE,OAAO,CAAC;IACjC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC;CAC7D;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,sBAoF9C"}
1
+ {"version":3,"file":"FocusTrap.d.ts","sourceRoot":"","sources":["../../../../src/core-react/focustrap/FocusTrap.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgH/B;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,cAAc,EAAE,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,MAAM,GAAG,OAAO,CAWvI;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC;IAClE,uBAAuB;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,oEAAoE;IACpE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,uBAAuB,EAAE,OAAO,CAAC;IACjC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC;CAC7D;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,4BAoF9C"}
@@ -15,6 +15,6 @@ export interface FieldProps extends FieldDef {
15
15
  export declare class Field extends React.Component<FieldProps> {
16
16
  constructor(props: FieldProps);
17
17
  private _generateSelectOptions;
18
- render(): JSX.Element;
18
+ render(): React.JSX.Element;
19
19
  }
20
20
  //# sourceMappingURL=Field.d.ts.map
@@ -126,7 +126,7 @@ export declare class Form extends React.Component<FormProps, FormState> {
126
126
  private haveError;
127
127
  private _setValues;
128
128
  private _handleSubmit;
129
- render(): JSX.Element;
129
+ render(): React.JSX.Element;
130
130
  }
131
131
  export {};
132
132
  //# sourceMappingURL=Form.d.ts.map
@@ -20,7 +20,7 @@ export declare const withIsPressed: <ComponentProps extends {}>(Component: React
20
20
  handleOnPointerUp: () => void;
21
21
  handleOnMouseLeave: () => void;
22
22
  changeIsPressed: (isPressed: boolean) => void;
23
- render(): JSX.Element;
23
+ render(): React.JSX.Element;
24
24
  context: any;
25
25
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps & WithIsPressedProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
26
26
  forceUpdate(callback?: (() => void) | undefined): void;
@@ -49,7 +49,7 @@ export declare const withIsPressed: <ComponentProps extends {}>(Component: React
49
49
  handleOnPointerUp: () => void;
50
50
  handleOnMouseLeave: () => void;
51
51
  changeIsPressed: (isPressed: boolean) => void;
52
- render(): JSX.Element;
52
+ render(): React.JSX.Element;
53
53
  context: any;
54
54
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps & WithIsPressedProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
55
55
  forceUpdate(callback?: (() => void) | undefined): void;
@@ -35,7 +35,7 @@ export declare const withOnOutsideClick: <ComponentProps extends {}>(Component:
35
35
  componentDidMount(): void;
36
36
  /** @internal */
37
37
  componentWillUnmount(): void;
38
- render(): JSX.Element;
38
+ render(): React.JSX.Element;
39
39
  context: any;
40
40
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps & WithOnOutsideClickProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
41
41
  forceUpdate(callback?: (() => void) | undefined): void;
@@ -77,7 +77,7 @@ export declare const withOnOutsideClick: <ComponentProps extends {}>(Component:
77
77
  componentDidMount(): void;
78
78
  /** @internal */
79
79
  componentWillUnmount(): void;
80
- render(): JSX.Element;
80
+ render(): React.JSX.Element;
81
81
  context: any;
82
82
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps & WithOnOutsideClickProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
83
83
  forceUpdate(callback?: (() => void) | undefined): void;
@@ -21,7 +21,7 @@ export declare const withTimeout: <ComponentProps extends {}>(Component: React.C
21
21
  componentDidMount(): void;
22
22
  componentDidUpdate(_prevProps: Readonly<ComponentProps & WithTimeoutProps>): void;
23
23
  componentWillUnmount(): void;
24
- render(): JSX.Element;
24
+ render(): React.JSX.Element;
25
25
  startTimer(timeout: number): void;
26
26
  context: any;
27
27
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps & WithTimeoutProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -48,7 +48,7 @@ export declare const withTimeout: <ComponentProps extends {}>(Component: React.C
48
48
  componentDidMount(): void;
49
49
  componentDidUpdate(_prevProps: Readonly<ComponentProps & WithTimeoutProps>): void;
50
50
  componentWillUnmount(): void;
51
- render(): JSX.Element;
51
+ render(): React.JSX.Element;
52
52
  startTimer(timeout: number): void;
53
53
  context: any;
54
54
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps & WithTimeoutProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -21,5 +21,5 @@ export interface IconProps extends CommonProps {
21
21
  /** Icon Functional component displays an icon based on an [[IconSpec]].
22
22
  * @public
23
23
  */
24
- export declare function Icon(props: IconProps): JSX.Element | null;
24
+ export declare function Icon(props: IconProps): React.JSX.Element | null;
25
25
  //# sourceMappingURL=IconComponent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconComponent.d.ts","sourceRoot":"","sources":["../../../../src/core-react/icons/IconComponent.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,sBAAsB,EAAqB,MAAM,uBAAuB,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;GAEG;AACH,oBAAY,QAAQ,GAAG,MAAM,GAAG,sBAAsB,GAAG,KAAK,CAAC,SAAS,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,sBAgDpC"}
1
+ {"version":3,"file":"IconComponent.d.ts","sourceRoot":"","sources":["../../../../src/core-react/icons/IconComponent.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,sBAAsB,EAAqB,MAAM,uBAAuB,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;GAEG;AACH,oBAAY,QAAQ,GAAG,MAAM,GAAG,sBAAsB,GAAG,KAAK,CAAC,SAAS,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,4BAgDpC"}
@@ -19,6 +19,6 @@ export interface SvgPathProps extends CommonProps {
19
19
  * @public
20
20
  */
21
21
  export declare class SvgPath extends React.PureComponent<SvgPathProps> {
22
- render(): JSX.Element;
22
+ render(): React.JSX.Element;
23
23
  }
24
24
  //# sourceMappingURL=SvgPath.d.ts.map
@@ -16,6 +16,6 @@ export interface SvgSpriteProps extends CommonProps {
16
16
  * @public @deprecated in 3.2. Replaced sprite loader with use of Web Compponents for SVG icons.
17
17
  */
18
18
  export declare class SvgSprite extends React.PureComponent<SvgSpriteProps> {
19
- render(): JSX.Element;
19
+ render(): React.JSX.Element;
20
20
  }
21
21
  //# sourceMappingURL=SvgSprite.d.ts.map
@@ -23,5 +23,5 @@ export interface WebFontIconProps extends CommonProps {
23
23
  /** WebFontIcon React component
24
24
  * @public
25
25
  */
26
- export declare function WebFontIcon(props: WebFontIconProps): JSX.Element;
26
+ export declare function WebFontIcon(props: WebFontIconProps): React.JSX.Element;
27
27
  //# sourceMappingURL=WebFontIcon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WebFontIcon.d.ts","sourceRoot":"","sources":["../../../../src/core-react/icons/WebFontIcon.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uEAAuE,CAAC;AAE/E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACnD,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IAChE,2DAA2D;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,eAiBlD"}
1
+ {"version":3,"file":"WebFontIcon.d.ts","sourceRoot":"","sources":["../../../../src/core-react/icons/WebFontIcon.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uEAAuE,CAAC;AAE/E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACnD,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IAChE,2DAA2D;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAiBlD"}
@@ -38,6 +38,6 @@ export declare class ImageCheckBox extends React.PureComponent<ImageCheckBoxProp
38
38
  private _onInputClick;
39
39
  private _onLabelClick;
40
40
  /** @internal */
41
- render(): JSX.Element;
41
+ render(): React.JSX.Element;
42
42
  }
43
43
  //# sourceMappingURL=ImageCheckBox.d.ts.map
@@ -46,7 +46,7 @@ class ImageCheckBox extends React.PureComponent {
46
46
  const iconSpec = this.props.checked ? this.props.imageOn : this.props.imageOff;
47
47
  return (
48
48
  /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
49
- /* eslint-disable-next-line jsx-a11y/click-events-have-key-events */
49
+ /* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/label-has-associated-control */
50
50
  React.createElement("label", { className: checkBoxClass, style: this.props.style, onClick: this._onLabelClick, title: this.props.tooltip },
51
51
  React.createElement("input", { type: "checkbox", className: this.props.inputClassName, style: this.props.inputStyle, checked: this.props.checked, disabled: this.props.disabled, onChange: this._onChange, onClick: this._onInputClick, ref: this.props.inputRef }),
52
52
  React.createElement("span", { className: imageClass },
@@ -1 +1 @@
1
- {"version":3,"file":"ImageCheckBox.js","sourceRoot":"","sources":["../../../../src/core-react/imagecheckbox/ImageCheckBox.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gCAA8B;AAC9B,2CAAoC;AACpC,+BAA+B;AAC/B,0DAA8C;AA6B9C;;;GAGG;AACH,MAAa,aAAc,SAAQ,KAAK,CAAC,aAAiC;IAA1E;;QAEU,cAAS,GAAG,CAAC,CAAsC,EAAE,EAAE;YAC7D,uBAAuB;YACvB,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe;gBACxB,CAAC,CAAC,eAAe,EAAE,CAAC;YAEtB,uBAAuB;YACvB,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;gBACtB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;aACtC;QACH,CAAC,CAAC;QAEM,kBAAa,GAAG,CAAC,CAAqC,EAAE,EAAE;YAChE,uBAAuB;YACvB,IAAI,CAAC,IAAI,CAAC,CAAC,e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AAC,oBAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CAAO,CAC1D,CACT,CAAC;IACJ,CAAC;CACF;AA1CD,sCA0CC","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 Checkbox\r\n */\r\n\r\nimport \"./ImageCheckBox.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[ImageCheckBox]] component\r\n * @public\r\n */\r\nexport interface ImageCheckBoxProps extends CommonProps {\r\n /** Image for the \"checked\" state */\r\n imageOn: string | React.ReactNode;\r\n /** Image for the \"unchecked\" (default) state */\r\n imageOff: string | React.ReactNode;\r\n /** Determine if the item is checked or not */\r\n checked?: boolean;\r\n /** Determine if the item is disabled or not */\r\n disabled?: boolean;\r\n /** Function called when item is clicked. */\r\n onClick?: (checked: boolean) => any;\r\n /** Custom CSS class name for the checkbox input element */\r\n inputClassName?: string;\r\n /** Custom CSS Style for the checkbox input element */\r\n inputStyle?: React.CSSProperties;\r\n /** Tooltip to be displayed when mouse is hovered over the checkbox */\r\n tooltip?: string;\r\n /** If true, draw a border around the image checkbox */\r\n border?: boolean;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n inputRef?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\n/**\r\n * ImageCheckBox React component shows a checked or unchecked image\r\n * @public\r\n */\r\nexport class ImageCheckBox extends React.PureComponent<ImageCheckBoxProps> {\r\n\r\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n // istanbul ignore next\r\n if (e && e.stopPropagation)\r\n e.stopPropagation();\r\n\r\n // istanbul ignore else\r\n if (this.props.onClick) {\r\n this.props.onClick(e.target.checked);\r\n }\r\n };\r\n\r\n private _onInputClick = (e: React.MouseEvent<HTMLInputElement>) => {\r\n // istanbul ignore next\r\n if (e && e.stopPropagation)\r\n e.stopPropagation();\r\n };\r\n\r\n private _onLabelClick = (e: React.MouseEvent<HTMLLabelElement>) => {\r\n // istanbul ignore next\r\n if (e && e.stopPropagation)\r\n e.stopPropagation();\r\n };\r\n\r\n /** @internal */\r\n public override render() {\r\n const checkBoxClass = classnames(\"core-image-checkbox\", this.props.className);\r\n const imageClass = classnames(\"image\", this.props.border && \"image-checkbox-border\");\r\n const iconSpec = this.props.checked ? this.props.imageOn : this.props.imageOff;\r\n\r\n return (\r\n /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\r\n /* eslint-disable-next-line jsx-a11y/click-events-have-key-events */\r\n <label className={checkBoxClass} style={this.props.style} onClick={this._onLabelClick} title={this.props.tooltip}>\r\n <input type=\"checkbox\" className={this.props.inputClassName} style={this.props.inputStyle}\r\n checked={this.props.checked} disabled={this.props.disabled} onChange={this._onChange} onClick={this._onInputClick}\r\n ref={this.props.inputRef} />\r\n <span className={imageClass}><Icon iconSpec={iconSpec} /></span>\r\n </label>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ImageCheckBox.js","sourceRoot":"","sources":["../../../../src/core-react/imagecheckbox/ImageCheckBox.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gCAA8B;AAC9B,2CAAoC;AACpC,+BAA+B;AAC/B,0DAA8C;AA6B9C;;;GAGG;AACH,MAAa,aAAc,SAAQ,KAAK,CAAC,aAAiC;IAA1E;;QAEU,cAAS,GAAG,CAAC,CAAsC,EAAE,EAAE;YAC7D,uBAAuB;YACvB,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe;gBACxB,CAAC,CAAC,eAAe,EAAE,CAAC;YAEtB,uBAAuB;YACvB,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;gBACtB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,C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AE,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,EACjH,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAI;YAC9B,8BAAM,SAAS,EAAE,UAAU;gBAAE,oBAAC,oBAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CAAO,CAC1D,CACT,CAAC;IACJ,CAAC;CACF;AA1CD,sCA0CC","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 Checkbox\r\n */\r\n\r\nimport \"./ImageCheckBox.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[ImageCheckBox]] component\r\n * @public\r\n */\r\nexport interface ImageCheckBoxProps extends CommonProps {\r\n /** Image for the \"checked\" state */\r\n imageOn: string | React.ReactNode;\r\n /** Image for the \"unchecked\" (default) state */\r\n imageOff: string | React.ReactNode;\r\n /** Determine if the item is checked or not */\r\n checked?: boolean;\r\n /** Determine if the item is disabled or not */\r\n disabled?: boolean;\r\n /** Function called when item is clicked. */\r\n onClick?: (checked: boolean) => any;\r\n /** Custom CSS class name for the checkbox input element */\r\n inputClassName?: string;\r\n /** Custom CSS Style for the checkbox input element */\r\n inputStyle?: React.CSSProperties;\r\n /** Tooltip to be displayed when mouse is hovered over the checkbox */\r\n tooltip?: string;\r\n /** If true, draw a border around the image checkbox */\r\n border?: boolean;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n inputRef?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\n/**\r\n * ImageCheckBox React component shows a checked or unchecked image\r\n * @public\r\n */\r\nexport class ImageCheckBox extends React.PureComponent<ImageCheckBoxProps> {\r\n\r\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n // istanbul ignore next\r\n if (e && e.stopPropagation)\r\n e.stopPropagation();\r\n\r\n // istanbul ignore else\r\n if (this.props.onClick) {\r\n this.props.onClick(e.target.checked);\r\n }\r\n };\r\n\r\n private _onInputClick = (e: React.MouseEvent<HTMLInputElement>) => {\r\n // istanbul ignore next\r\n if (e && e.stopPropagation)\r\n e.stopPropagation();\r\n };\r\n\r\n private _onLabelClick = (e: React.MouseEvent<HTMLLabelElement>) => {\r\n // istanbul ignore next\r\n if (e && e.stopPropagation)\r\n e.stopPropagation();\r\n };\r\n\r\n /** @internal */\r\n public override render() {\r\n const checkBoxClass = classnames(\"core-image-checkbox\", this.props.className);\r\n const imageClass = classnames(\"image\", this.props.border && \"image-checkbox-border\");\r\n const iconSpec = this.props.checked ? this.props.imageOn : this.props.imageOff;\r\n\r\n return (\r\n /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\r\n /* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/label-has-associated-control */\r\n <label className={checkBoxClass} style={this.props.style} onClick={this._onLabelClick} title={this.props.tooltip}>\r\n <input type=\"checkbox\" className={this.props.inputClassName} style={this.props.inputStyle}\r\n checked={this.props.checked} disabled={this.props.disabled} onChange={this._onChange} onClick={this._onInputClick}\r\n ref={this.props.inputRef} />\r\n <span className={imageClass}><Icon iconSpec={iconSpec} /></span>\r\n </label>\r\n );\r\n }\r\n}\r\n"]}
@@ -19,5 +19,5 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>,
19
19
  * @public
20
20
  * @deprecated in 3.0. Use Input in itwinui-react instead
21
21
  */
22
- export declare const Input: (props: InputProps) => JSX.Element | null;
22
+ export declare const Input: (props: InputProps) => React.JSX.Element | null;
23
23
  //# 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;;;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,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAsB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/core-react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K,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;;;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;AAgBjD,0GAA0G;AAC1G,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAAkC,8CAA8C;AACtH,SAAS,eAAe,CAAC,KAAK,EAAE,GAAG;IACjC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC,CAAC,wDAAwD;IAC7I,MAAM,eAAe,GAAG,KAAK,CA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------------------------------------------------------\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) => React.JSX.Element | null = ForwardRefInput; // eslint-disable-line deprecation/deprecation\r\n"]}
@@ -14,6 +14,6 @@ export interface InputLabelProps extends LabeledComponentProps, MessagedComponen
14
14
  * @public
15
15
  */
16
16
  export declare class InputLabel extends React.PureComponent<InputLabelProps> {
17
- render(): JSX.Element;
17
+ render(): React.JSX.Element;
18
18
  }
19
19
  //# sourceMappingURL=InputLabel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputLabel.d.ts","sourceRoot":"","sources":["../../../../src/core-react/inputs/InputLabel.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAExF;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,qBAAqB,EAAE,sBAAsB,EAAE,WAAW;IACjG,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC;IAClD,MAAM,IAAI,GAAG,CAAC,OAAO;CA2BtC"}
1
+ {"version":3,"file":"InputLabel.d.ts","sourceRoot":"","sources":["../../../../src/core-react/inputs/InputLabel.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC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AAG,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,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(): React.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,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module Inputs
3
3
  */
4
- /// <reference types="react" />
4
+ import * as React from "react";
5
5
  import { InputProps } from "./Input";
6
6
  import { LabeledComponentProps, MessagedComponentProps } from "./LabeledComponentProps";
7
7
  /** Properties for [[LabeledInput]] components
@@ -14,5 +14,5 @@ export interface LabeledInputProps extends InputProps, LabeledComponentProps, Me
14
14
  * @public
15
15
  * @deprecated in 3.0. Use LabeledInput in itwinui-react instead
16
16
  */
17
- export declare function LabeledInput(props: LabeledInputProps): JSX.Element;
17
+ export declare function LabeledInput(props: LabeledInputProps): React.JSX.Element;
18
18
  //# sourceMappingURL=LabeledInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LabeledInput.d.ts","sourceRoot":"","sources":["../../../../src/core-react/inputs/LabeledInput.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,EAAS,UAAU,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAIxF;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,UAAU,EAAE,qBAAqB,EAAE,sBAAsB;CAAI;AAExG;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,eA4BpD"}
1
+ {"version":3,"file":"LabeledInput.d.ts","sourceRoot":"","sources":["../../../../src/core-react/inputs/LabeledInput.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAS,UAAU,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAIxF;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,UAAU,EAAE,qBAAqB,EAAE,sBAAsB;CAAI;AAExG;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBA4BpD"}
@@ -1,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module Inputs
3
3
  */
4
- /// <reference types="react" />
4
+ import * as React from "react";
5
5
  import { LabeledComponentProps, MessagedComponentProps } from "./LabeledComponentProps";
6
6
  import { TextareaProps } from "./Textarea";
7
7
  /** Properties for [[LabeledTextarea]] component
@@ -14,5 +14,5 @@ export interface LabeledTextareaProps extends TextareaProps, LabeledComponentPro
14
14
  * @public
15
15
  * @deprecated in 3.0. Use LabeledTextarea in itwinui-react instead
16
16
  */
17
- export declare function LabeledTextarea(props: LabeledTextareaProps): JSX.Element;
17
+ export declare function LabeledTextarea(props: LabeledTextareaProps): React.JSX.Element;
18
18
  //# sourceMappingURL=LabeledTextarea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LabeledTextarea.d.ts","sourceRoot":"","sources":["../../../../src/core-react/inputs/LabeledTextarea.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAY,aAAa,EAAE,MAAM,YAAY,CAAC;AAIrD;;;GAGG;AACH,MAAM,WAAW,oBAAqB,SAAQ,aAAa,EAAE,qBAAqB,EAAE,sBAAsB;CAAI;AAE9G;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,eAuB1D"}
1
+ {"version":3,"file":"LabeledTextarea.d.ts","sourceRoot":"","sources":["../../../../src/core-react/inputs/LabeledTextarea.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAY,aAAa,EAAE,MAAM,YAAY,CAAC;AAIrD;;;GAGG;AACH,MAAM,WAAW,oBAAqB,SAAQ,aAAa,EAAE,qBAAqB,EAAE,sBAAsB;CAAI;AAE9G;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qBAuB1D"}
@@ -19,5 +19,5 @@ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextArea
19
19
  * @public
20
20
  * @deprecated in 3.0. Use Textarea in itwinui-react instead
21
21
  */
22
- export declare const Textarea: (props: TextareaProps) => JSX.Element | null;
22
+ export declare const Textarea: (props: TextareaProps) => React.JSX.Element | null;
23
23
  //# sourceMappingURL=Textarea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../../src/core-react/inputs/Textarea.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,aAAc,SAAQ,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,WAAW;IACnG,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+DAA+D;IAC/D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;CACtC;AA6BD;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,GAAG,CAAC,OAAO,GAAG,IAAyB,CAAC"}
1
+ {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../../src/core-react/inputs/Textarea.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,aAAc,SAAQ,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,WAAW;IACnG,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+DAA+D;IAC/D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;CACtC;AA6BD;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAyB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/Textarea.tsx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AQ,GAAiD,kBAAkB,CAAC,CAAG,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 { Textarea as ITwinUI_Textarea } from \"@itwin/itwinui-react\";\r\nimport { useRefs } from \"../utils/hooks/useRefs\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for [[Textarea]] component\r\n * @public\r\n * @deprecated in 3.0. Use TextareaProps in itwinui-react instead\r\n */\r\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, CommonProps {\r\n /** Number of textarea rows. Default is 3. */\r\n rows?: number;\r\n /** Indicates whether to set focus to the textarea element */\r\n setFocus?: boolean;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLTextAreaElement>;\r\n}\r\n\r\n// Defined using following pattern (const Input at bottom) to ensure useful API documentation is extracted\r\nconst ForwardRefTextarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>( // eslint-disable-line deprecation/deprecation\r\n function ForwardRefTextarea(props, ref) {\r\n const { className, style, rows, setFocus, ...otherProps } = props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const textRows = undefined !== rows ? rows : 3;\r\n const textAreaElementRef = React.useRef<HTMLTextAreaElement>(null);\r\n const refs = useRefs(textAreaElementRef, 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 if (textAreaElementRef.current && setFocus)\r\n textAreaElementRef.current.focus();\r\n }, [setFocus]);\r\n\r\n const handleFocus = React.useCallback((event: React.FocusEvent<HTMLTextAreaElement>) => {\r\n event.currentTarget.select();\r\n }, []);\r\n\r\n return (\r\n <ITwinUI_Textarea {...otherProps}\r\n ref={refs}\r\n rows={textRows}\r\n onFocus={handleFocus}\r\n className={classnames(\"uicore-inputs-textarea\", className)} style={style} />\r\n );\r\n }\r\n);\r\n\r\n/** Basic textarea component\r\n * @public\r\n * @deprecated in 3.0. Use Textarea in itwinui-react instead\r\n */\r\nexport const Textarea: (props: TextareaProps) => JSX.Element | null = ForwardRefTextarea; // eslint-disable-line deprecation/deprecation\r\n"]}
1
+ {"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/Textarea.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAC/B,wDAAoE;AACpE,oDAAiD;AAgBjD,0GAA0G;AAC1G,MAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAAyC,8CAA8C;AAChI,SAAS,kBAAkB,CAAC,KAAK,EAAE,GAAG;IACpC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC,CAAC,wDAAwD;IAC3H,MAAM,QAAQ,GAAG,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAAsB,IAAI,CAAC,CAAC;IACnE,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC,CAAE,uGAAuG;IAEvJ,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,kBAAkB,CAAC,OAAO,IAAI,QAAQ;YACxC,kBAAkB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,KAA4C,EAAE,EAAE;QACrF,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,wBAAgB,OAAK,UAAU,EAC9B,GAAG,EAAE,IAAI,EACT,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,IAAA,oBAAU,EAAC,wBAAwB,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,CAC/E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;GAGG;AACU,QAAA,QAAQ,GAAuD,kBAAkB,CAAC,CAAG,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 { Textarea as ITwinUI_Textarea } from \"@itwin/itwinui-react\";\r\nimport { useRefs } from \"../utils/hooks/useRefs\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for [[Textarea]] component\r\n * @public\r\n * @deprecated in 3.0. Use TextareaProps in itwinui-react instead\r\n */\r\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, CommonProps {\r\n /** Number of textarea rows. Default is 3. */\r\n rows?: number;\r\n /** Indicates whether to set focus to the textarea element */\r\n setFocus?: boolean;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLTextAreaElement>;\r\n}\r\n\r\n// Defined using following pattern (const Input at bottom) to ensure useful API documentation is extracted\r\nconst ForwardRefTextarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>( // eslint-disable-line deprecation/deprecation\r\n function ForwardRefTextarea(props, ref) {\r\n const { className, style, rows, setFocus, ...otherProps } = props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const textRows = undefined !== rows ? rows : 3;\r\n const textAreaElementRef = React.useRef<HTMLTextAreaElement>(null);\r\n const refs = useRefs(textAreaElementRef, 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 if (textAreaElementRef.current && setFocus)\r\n textAreaElementRef.current.focus();\r\n }, [setFocus]);\r\n\r\n const handleFocus = React.useCallback((event: React.FocusEvent<HTMLTextAreaElement>) => {\r\n event.currentTarget.select();\r\n }, []);\r\n\r\n return (\r\n <ITwinUI_Textarea {...otherProps}\r\n ref={refs}\r\n rows={textRows}\r\n onFocus={handleFocus}\r\n className={classnames(\"uicore-inputs-textarea\", className)} style={style} />\r\n );\r\n }\r\n);\r\n\r\n/** Basic textarea component\r\n * @public\r\n * @deprecated in 3.0. Use Textarea in itwinui-react instead\r\n */\r\nexport const Textarea: (props: TextareaProps) => React.JSX.Element | null = ForwardRefTextarea; // eslint-disable-line deprecation/deprecation\r\n"]}
@@ -20,5 +20,5 @@ export interface IconInputProps extends Omit<InputProps, "size"> {
20
20
  /** Input component with icon to the left of the input field
21
21
  * @public
22
22
  */
23
- export declare const IconInput: (props: IconInputProps) => JSX.Element | null;
23
+ export declare const IconInput: (props: IconInputProps) => React.JSX.Element | null;
24
24
  //# sourceMappingURL=IconInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconInput.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/inputs/iconinput/IconInput.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAS,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC;IAC9D,mFAAmF;IACnF,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,+DAA+D;IAC/D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+DAA+D;IAC/D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC,gCAAgC;IAChC,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CAC1B;AAsBD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,GAAG,CAAC,OAAO,GAAG,IAA0B,CAAC"}
1
+ {"version":3,"file":"IconInput.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/inputs/iconinput/IconInput.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAS,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC;IAC9D,mFAAmF;IACnF,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,+DAA+D;IAC/D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+DAA+D;IAC/D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC,gCAAgC;IAChC,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CAC1B;AAsBD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"IconInput.js","sourceRoot":"","sources":["../../../../../src/core-react/inputs/iconinput/IconInput.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,4BAA0B;AAC1B,2CAAoC;AACpC,+BAA+B;AAC/B,oCAA6C,CAAG,mCAAmC;AAgBnF;;GAEG;AACH,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAC1C,SAAS,mBAAmB,CAAC,KAAK,EAAE,GAAG;IACrC,6DAA6D;IAC7D,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAEhE,uFAAuF;IACvF,OAAO,CACL,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,0BAA0B,EAAE,kBAAkB,CAAC;QAExE,oBAAC,aAAK,IAAC,GAAG,EAAE,GAAG,KAAM,UAAU,GAAI;QACnC,6BAAK,SAAS,EAAC,qBAAqB,IACjC,IAAI,CACD,CACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEL;;GAEG;AACU,QAAA,SAAS,GAAkD,mBAAmB,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 \"./IconInput.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Input, InputProps } from \"../Input\"; // NEEDSWORK - for nativeKeyHandler\r\n\r\n/** Properties for the [[IconInput]] component\r\n * @public\r\n */\r\nexport interface IconInputProps extends Omit<InputProps, \"size\"> { // eslint-disable-line deprecation/deprecation\r\n /** Icon displayed to the left of the Input field within the IconInput component */\r\n icon: React.ReactNode;\r\n /** CSS class name for the IconInput component container div */\r\n containerClassName?: string;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLInputElement>;\r\n /** Modify size of the input. */\r\n size?: \"small\" | \"large\";\r\n}\r\n\r\n/** Input component with icon to the left of the input field\r\n * @public\r\n */\r\nconst ForwardRefIconInput = React.forwardRef<HTMLInputElement, IconInputProps>(\r\n function ForwardRefIconInput(props, ref) {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { icon, containerClassName, size, ...otherProps } = props;\r\n\r\n // NEEDSWORK: still using core-react Input component because of `nativeKeyHandler` prop\r\n return (\r\n <div className={classnames(\"core-iconInput-container\", containerClassName)} >\r\n {/* eslint-disable-next-line deprecation/deprecation */}\r\n <Input ref={ref} {...otherProps} />\r\n <div className=\"core-iconInput-icon\">\r\n {icon}\r\n </div>\r\n </div>\r\n );\r\n });\r\n\r\n/** Input component with icon to the left of the input field\r\n * @public\r\n */\r\nexport const IconInput: (props: IconInputProps) => JSX.Element | null = ForwardRefIconInput;\r\n"]}
1
+ {"version":3,"file":"IconInput.js","sourceRoot":"","sources":["../../../../../src/core-react/inputs/iconinput/IconInput.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,4BAA0B;AAC1B,2CAAoC;AACpC,+BAA+B;AAC/B,oCAA6C,CAAG,mCAAmC;AAgBnF;;GAEG;AACH,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAC1C,SAAS,mBAAmB,CAAC,KAAK,EAAE,GAAG;IACrC,6DAA6D;IAC7D,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAEhE,uFAAuF;IACvF,OAAO,CACL,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,0BAA0B,EAAE,kBAAkB,CAAC;QAExE,oBAAC,aAAK,IAAC,GAAG,EAAE,GAAG,KAAM,UAAU,GAAI;QACnC,6BAAK,SAAS,EAAC,qBAAqB,IACjC,IAAI,CACD,CACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEL;;GAEG;AACU,QAAA,SAAS,GAAwD,mBAAmB,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 \"./IconInput.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Input, InputProps } from \"../Input\"; // NEEDSWORK - for nativeKeyHandler\r\n\r\n/** Properties for the [[IconInput]] component\r\n * @public\r\n */\r\nexport interface IconInputProps extends Omit<InputProps, \"size\"> { // eslint-disable-line deprecation/deprecation\r\n /** Icon displayed to the left of the Input field within the IconInput component */\r\n icon: React.ReactNode;\r\n /** CSS class name for the IconInput component container div */\r\n containerClassName?: string;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLInputElement>;\r\n /** Modify size of the input. */\r\n size?: \"small\" | \"large\";\r\n}\r\n\r\n/** Input component with icon to the left of the input field\r\n * @public\r\n */\r\nconst ForwardRefIconInput = React.forwardRef<HTMLInputElement, IconInputProps>(\r\n function ForwardRefIconInput(props, ref) {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { icon, containerClassName, size, ...otherProps } = props;\r\n\r\n // NEEDSWORK: still using core-react Input component because of `nativeKeyHandler` prop\r\n return (\r\n <div className={classnames(\"core-iconInput-container\", containerClassName)} >\r\n {/* eslint-disable-next-line deprecation/deprecation */}\r\n <Input ref={ref} {...otherProps} />\r\n <div className=\"core-iconInput-icon\">\r\n {icon}\r\n </div>\r\n </div>\r\n );\r\n });\r\n\r\n/** Input component with icon to the left of the input field\r\n * @public\r\n */\r\nexport const IconInput: (props: IconInputProps) => React.JSX.Element | null = ForwardRefIconInput;\r\n"]}
@@ -42,5 +42,5 @@ export interface NumberInputProps extends Omit<InputProps, "min" | "max" | "step
42
42
  /** Input component for numbers with up and down buttons to increment and decrement the value.
43
43
  * @public
44
44
  */
45
- export declare const NumberInput: (props: NumberInputProps) => JSX.Element | null;
45
+ export declare const NumberInput: (props: NumberInputProps) => React.JSX.Element | null;
46
46
  //# sourceMappingURL=NumberInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/inputs/numberinput/NumberInput.tsx"],"names":[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M,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;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,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;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,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;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,GAA0D,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) => React.JSX.Element | null = ForwardRefNumberInput;\r\n"]}
@@ -47,10 +47,10 @@ export declare const ListboxContext: React.Context<ListboxContextProps>;
47
47
  * Single select `Listbox` component
48
48
  * @alpha
49
49
  */
50
- export declare function Listbox(props: ListboxProps): JSX.Element;
50
+ export declare function Listbox(props: ListboxProps): React.JSX.Element;
51
51
  /**
52
52
  * `ListboxItem` component.
53
53
  * @alpha
54
54
  */
55
- export declare function ListboxItem(props: ListboxItemProps): JSX.Element;
55
+ export declare function ListboxItem(props: ListboxItemProps): React.JSX.Element;
56
56
  //# sourceMappingURL=Listbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Listbox.d.ts","sourceRoot":"","sources":["../../../../src/core-react/listbox/Listbox.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,O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oCAAmH,CAAC;AAmD/I;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,qBAyJ1C;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBA8DlD"}
@@ -21,7 +21,7 @@ export interface LoadingBarProps extends CommonProps {
21
21
  */
22
22
  export declare class LoadingBar extends React.PureComponent<LoadingBarProps> {
23
23
  static defaultProps: Partial<LoadingBarProps>;
24
- render(): JSX.Element;
24
+ render(): React.JSX.Element;
25
25
  }
26
26
  /** Sanity check to keep percentage between 0 & 100
27
27
  * @internal
@@ -35,6 +35,6 @@ export interface LoadingPromptProps extends CommonProps {
35
35
  */
36
36
  export declare class LoadingPrompt extends React.PureComponent<LoadingPromptProps> {
37
37
  static defaultProps: Partial<LoadingPromptProps>;
38
- render(): JSX.Element;
38
+ render(): React.JSX.Element;
39
39
  }
40
40
  //# sourceMappingURL=LoadingPrompt.d.ts.map
@@ -29,6 +29,6 @@ export interface LoadingSpinnerProps extends Omit<ProgressRadialProps, "size"> {
29
29
  */
30
30
  export declare class LoadingSpinner extends React.PureComponent<LoadingSpinnerProps> {
31
31
  static defaultProps: Partial<LoadingSpinnerProps>;
32
- render(): JSX.Element;
32
+ render(): React.JSX.Element;
33
33
  }
34
34
  //# sourceMappingURL=LoadingSpinner.d.ts.map
@@ -20,6 +20,6 @@ export interface LoadingStatusProps extends CommonProps {
20
20
  export declare class LoadingStatus extends React.PureComponent<LoadingStatusProps> {
21
21
  static defaultProps: Partial<LoadingStatusProps>;
22
22
  private inRange;
23
- render(): JSX.Element;
23
+ render(): React.JSX.Element;
24
24
  }
25
25
  //# sourceMappingURL=LoadingStatus.d.ts.map
@@ -33,6 +33,6 @@ export interface SpinnerProps {
33
33
  * @deprecated in 3.0. Use ProgressRadial in itwinui-react with `indeterminate` prop instead.
34
34
  */
35
35
  export declare class Spinner extends React.PureComponent<SpinnerProps> {
36
- render(): JSX.Element;
36
+ render(): React.JSX.Element;
37
37
  }
38
38
  //# sourceMappingURL=Spinner.d.ts.map
@@ -16,7 +16,7 @@ export interface MessageBoxProps extends CommonProps {
16
16
  /** List of [[DialogButtonDef]] objects specifying buttons and associated onClick events */
17
17
  buttonCluster: DialogButtonDef[];
18
18
  /** Title to show in title bar of dialog */
19
- title?: string | JSX.Element;
19
+ title?: string | React.JSX.Element;
20
20
  /** onClick event for X button for dialog */
21
21
  onClose?: () => void;
22
22
  /** 'keyup' event for <Esc> key */
@@ -47,7 +47,7 @@ export interface MessageBoxProps extends CommonProps {
47
47
  */
48
48
  export declare class MessageBox extends React.PureComponent<MessageBoxProps> {
49
49
  static defaultProps: Partial<MessageBoxProps>;
50
- render(): JSX.Element;
50
+ render(): React.JSX.Element;
51
51
  }
52
52
  /** Properties for the [[MessageContainer]] component
53
53
  * @public
@@ -60,6 +60,6 @@ export interface MessageContainerProps extends CommonProps {
60
60
  */
61
61
  export declare class MessageContainer extends React.PureComponent<MessageContainerProps> {
62
62
  static getIconClassName(severity: MessageSeverity, hollow?: boolean): string;
63
- render(): JSX.Element;
63
+ render(): React.JSX.Element;
64
64
  }
65
65
  //# sourceMappingURL=MessageBox.d.ts.map