@itwin/core-react 4.15.4 → 4.16.0

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 (350) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/lib/cjs/core-react/UiCore.d.ts +1 -0
  3. package/lib/cjs/core-react/UiCore.d.ts.map +1 -1
  4. package/lib/cjs/core-react/UiCore.js +2 -0
  5. package/lib/cjs/core-react/UiCore.js.map +1 -1
  6. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts +5 -3
  7. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  8. package/lib/cjs/core-react/autosuggest/AutoSuggest.js +1 -2
  9. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  10. package/lib/cjs/core-react/badge/Badge.d.ts +3 -2
  11. package/lib/cjs/core-react/badge/Badge.d.ts.map +1 -1
  12. package/lib/cjs/core-react/badge/Badge.js +5 -2
  13. package/lib/cjs/core-react/badge/Badge.js.map +1 -1
  14. package/lib/cjs/core-react/badge/BadgeType.d.ts +6 -0
  15. package/lib/cjs/core-react/badge/BadgeType.d.ts.map +1 -1
  16. package/lib/cjs/core-react/badge/BadgeType.js +2 -1
  17. package/lib/cjs/core-react/badge/BadgeType.js.map +1 -1
  18. package/lib/cjs/core-react/badge/DeprecatedBadge.d.ts +10 -0
  19. package/lib/cjs/core-react/badge/DeprecatedBadge.d.ts.map +1 -0
  20. package/lib/cjs/core-react/badge/DeprecatedBadge.js +29 -0
  21. package/lib/cjs/core-react/badge/DeprecatedBadge.js.map +1 -0
  22. package/lib/cjs/core-react/badge/DeprecatedBadge.scss +11 -0
  23. package/lib/cjs/core-react/badge/NewBadge.scss +4 -0
  24. package/lib/cjs/core-react/badge/TechnicalPreviewBadge.js +2 -2
  25. package/lib/cjs/core-react/badge/TechnicalPreviewBadge.js.map +1 -1
  26. package/lib/cjs/core-react/badge/TechnicalPreviewBadge.scss +4 -0
  27. package/lib/cjs/core-react/colorthemes.scss +0 -8
  28. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +3 -6
  29. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  30. package/lib/cjs/core-react/contextmenu/ContextMenu.js +2 -4
  31. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  32. package/lib/cjs/core-react/contextmenu/ContextMenu.scss +5 -6
  33. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.d.ts +1 -3
  34. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.d.ts.map +1 -1
  35. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js +1 -7
  36. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
  37. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts +2 -2
  38. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  39. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js +3 -3
  40. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  41. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts +8 -6
  42. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  43. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js +6 -7
  44. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  45. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts +3 -4
  46. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  47. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +6 -5
  48. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  49. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts +2 -1
  50. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  51. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js +1 -0
  52. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  53. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts +2 -0
  54. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  55. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js +2 -3
  56. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  57. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  58. package/lib/cjs/core-react/elementseparator/ElementSeparator.js +0 -1
  59. package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
  60. package/lib/cjs/core-react/enums/CheckBoxState.d.ts +1 -0
  61. package/lib/cjs/core-react/enums/CheckBoxState.d.ts.map +1 -1
  62. package/lib/cjs/core-react/enums/CheckBoxState.js +1 -0
  63. package/lib/cjs/core-react/enums/CheckBoxState.js.map +1 -1
  64. package/lib/cjs/core-react/enums/Orientation.d.ts +1 -0
  65. package/lib/cjs/core-react/enums/Orientation.d.ts.map +1 -1
  66. package/lib/cjs/core-react/enums/Orientation.js +1 -0
  67. package/lib/cjs/core-react/enums/Orientation.js.map +1 -1
  68. package/lib/cjs/core-react/enums/TimeFormat.d.ts +1 -0
  69. package/lib/cjs/core-react/enums/TimeFormat.d.ts.map +1 -1
  70. package/lib/cjs/core-react/enums/TimeFormat.js +1 -0
  71. package/lib/cjs/core-react/enums/TimeFormat.js.map +1 -1
  72. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.d.ts.map +1 -1
  73. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
  74. package/lib/cjs/core-react/focustrap/FocusTrap.js +1 -1
  75. package/lib/cjs/core-react/focustrap/FocusTrap.js.map +1 -1
  76. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts +0 -2
  77. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  78. package/lib/cjs/core-react/hocs/withOnOutsideClick.js +0 -1
  79. package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
  80. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts +1 -0
  81. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
  82. package/lib/cjs/core-react/icons/ConditionalIconItem.js +2 -0
  83. package/lib/cjs/core-react/icons/ConditionalIconItem.js.map +1 -1
  84. package/lib/cjs/core-react/icons/IconComponent.d.ts +3 -0
  85. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  86. package/lib/cjs/core-react/icons/IconComponent.js +1 -0
  87. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  88. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +0 -1
  89. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  90. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +0 -2
  91. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  92. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  93. package/lib/cjs/core-react/inputs/InputLabel.js +1 -8
  94. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  95. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  96. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  97. package/lib/cjs/core-react/l10n/LocalizationProvider.d.ts +1 -0
  98. package/lib/cjs/core-react/l10n/LocalizationProvider.d.ts.map +1 -1
  99. package/lib/cjs/core-react/l10n/LocalizationProvider.js +1 -0
  100. package/lib/cjs/core-react/l10n/LocalizationProvider.js.map +1 -1
  101. package/lib/cjs/core-react/l10n/useTranslation.d.ts.map +1 -1
  102. package/lib/cjs/core-react/l10n/useTranslation.js +1 -1
  103. package/lib/cjs/core-react/l10n/useTranslation.js.map +1 -1
  104. package/lib/cjs/core-react/listbox/Listbox.d.ts +10 -7
  105. package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
  106. package/lib/cjs/core-react/listbox/Listbox.js +6 -3
  107. package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
  108. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  109. package/lib/cjs/core-react/messagebox/MessageBox.js +2 -9
  110. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  111. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +0 -2
  112. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  113. package/lib/cjs/core-react/radialmenu/RadialMenu.js +0 -2
  114. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  115. package/lib/cjs/core-react/radialmenu/RadialMenu.scss +3 -3
  116. package/lib/cjs/core-react/searchbox/SearchBox.d.ts +0 -2
  117. package/lib/cjs/core-react/searchbox/SearchBox.d.ts.map +1 -1
  118. package/lib/cjs/core-react/searchbox/SearchBox.js +0 -2
  119. package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
  120. package/lib/cjs/core-react/settings/SettingsContainer.d.ts +7 -3
  121. package/lib/cjs/core-react/settings/SettingsContainer.d.ts.map +1 -1
  122. package/lib/cjs/core-react/settings/SettingsContainer.js +14 -19
  123. package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
  124. package/lib/cjs/core-react/settings/SettingsManager.d.ts +3 -1
  125. package/lib/cjs/core-react/settings/SettingsManager.d.ts.map +1 -1
  126. package/lib/cjs/core-react/settings/SettingsManager.js +6 -10
  127. package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
  128. package/lib/cjs/core-react/tabs/Tabs.d.ts +0 -3
  129. package/lib/cjs/core-react/tabs/Tabs.d.ts.map +1 -1
  130. package/lib/cjs/core-react/tabs/Tabs.js +0 -4
  131. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  132. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  133. package/lib/cjs/core-react/tree/ExpansionToggle.js +0 -1
  134. package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
  135. package/lib/cjs/core-react/tree/Node.d.ts +2 -0
  136. package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
  137. package/lib/cjs/core-react/tree/Node.js +1 -5
  138. package/lib/cjs/core-react/tree/Node.js.map +1 -1
  139. package/lib/cjs/core-react/uistate/LocalStateStorage.d.ts +2 -2
  140. package/lib/cjs/core-react/uistate/LocalStateStorage.d.ts.map +1 -1
  141. package/lib/cjs/core-react/uistate/LocalStateStorage.js +3 -4
  142. package/lib/cjs/core-react/uistate/LocalStateStorage.js.map +1 -1
  143. package/lib/cjs/core-react/uistate/UiStateEntry.d.ts +1 -0
  144. package/lib/cjs/core-react/uistate/UiStateEntry.d.ts.map +1 -1
  145. package/lib/cjs/core-react/uistate/UiStateEntry.js +2 -0
  146. package/lib/cjs/core-react/uistate/UiStateEntry.js.map +1 -1
  147. package/lib/cjs/core-react/uistate/UiStateStorage.d.ts +3 -0
  148. package/lib/cjs/core-react/uistate/UiStateStorage.d.ts.map +1 -1
  149. package/lib/cjs/core-react/uistate/UiStateStorage.js +1 -0
  150. package/lib/cjs/core-react/uistate/UiStateStorage.js.map +1 -1
  151. package/lib/cjs/core-react/utils/IconWebComponent.d.ts.map +1 -1
  152. package/lib/cjs/core-react/utils/IconWebComponent.js +1 -3
  153. package/lib/cjs/core-react/utils/IconWebComponent.js.map +1 -1
  154. package/lib/cjs/core-react/utils/ListenerType.d.ts +15 -0
  155. package/lib/cjs/core-react/utils/ListenerType.d.ts.map +1 -0
  156. package/lib/cjs/core-react/utils/ListenerType.js +3 -0
  157. package/lib/cjs/core-react/utils/ListenerType.js.map +1 -0
  158. package/lib/cjs/core-react/utils/Rectangle.d.ts +1 -0
  159. package/lib/cjs/core-react/utils/Rectangle.d.ts.map +1 -1
  160. package/lib/cjs/core-react/utils/Rectangle.js.map +1 -1
  161. package/lib/cjs/core-react/utils/Size.d.ts +1 -0
  162. package/lib/cjs/core-react/utils/Size.d.ts.map +1 -1
  163. package/lib/cjs/core-react/utils/Size.js.map +1 -1
  164. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.d.ts +1 -0
  165. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
  166. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +1 -0
  167. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  168. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +3 -2
  169. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  170. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +2 -1
  171. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  172. package/lib/cjs/core-react.d.ts +5 -0
  173. package/lib/cjs/core-react.d.ts.map +1 -1
  174. package/lib/cjs/core-react.js +10 -6
  175. package/lib/cjs/core-react.js.map +1 -1
  176. package/lib/esm/core-react/UiCore.d.ts +1 -0
  177. package/lib/esm/core-react/UiCore.d.ts.map +1 -1
  178. package/lib/esm/core-react/UiCore.js +2 -0
  179. package/lib/esm/core-react/UiCore.js.map +1 -1
  180. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +5 -3
  181. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  182. package/lib/esm/core-react/autosuggest/AutoSuggest.js +1 -2
  183. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  184. package/lib/esm/core-react/badge/Badge.d.ts +3 -2
  185. package/lib/esm/core-react/badge/Badge.d.ts.map +1 -1
  186. package/lib/esm/core-react/badge/Badge.js +5 -2
  187. package/lib/esm/core-react/badge/Badge.js.map +1 -1
  188. package/lib/esm/core-react/badge/BadgeType.d.ts +6 -0
  189. package/lib/esm/core-react/badge/BadgeType.d.ts.map +1 -1
  190. package/lib/esm/core-react/badge/BadgeType.js +2 -1
  191. package/lib/esm/core-react/badge/BadgeType.js.map +1 -1
  192. package/lib/esm/core-react/badge/DeprecatedBadge.d.ts +10 -0
  193. package/lib/esm/core-react/badge/DeprecatedBadge.d.ts.map +1 -0
  194. package/lib/esm/core-react/badge/DeprecatedBadge.js +25 -0
  195. package/lib/esm/core-react/badge/DeprecatedBadge.js.map +1 -0
  196. package/lib/esm/core-react/badge/DeprecatedBadge.scss +11 -0
  197. package/lib/esm/core-react/badge/NewBadge.scss +4 -0
  198. package/lib/esm/core-react/badge/TechnicalPreviewBadge.js +2 -2
  199. package/lib/esm/core-react/badge/TechnicalPreviewBadge.js.map +1 -1
  200. package/lib/esm/core-react/badge/TechnicalPreviewBadge.scss +4 -0
  201. package/lib/esm/core-react/colorthemes.scss +0 -8
  202. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +3 -6
  203. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  204. package/lib/esm/core-react/contextmenu/ContextMenu.js +2 -4
  205. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  206. package/lib/esm/core-react/contextmenu/ContextMenu.scss +5 -6
  207. package/lib/esm/core-react/contextmenu/ContextMenuDirection.d.ts +1 -3
  208. package/lib/esm/core-react/contextmenu/ContextMenuDirection.d.ts.map +1 -1
  209. package/lib/esm/core-react/contextmenu/ContextMenuDirection.js +1 -7
  210. package/lib/esm/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
  211. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts +2 -2
  212. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  213. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js +3 -3
  214. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  215. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts +8 -6
  216. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  217. package/lib/esm/core-react/contextmenu/ContextMenuItem.js +6 -7
  218. package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  219. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts +3 -4
  220. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  221. package/lib/esm/core-react/contextmenu/ContextSubMenu.js +6 -5
  222. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  223. package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts +2 -1
  224. package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  225. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js +1 -0
  226. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  227. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts +2 -0
  228. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  229. package/lib/esm/core-react/contextmenu/PopupContextMenu.js +2 -3
  230. package/lib/esm/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  231. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  232. package/lib/esm/core-react/elementseparator/ElementSeparator.js +0 -1
  233. package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
  234. package/lib/esm/core-react/enums/CheckBoxState.d.ts +1 -0
  235. package/lib/esm/core-react/enums/CheckBoxState.d.ts.map +1 -1
  236. package/lib/esm/core-react/enums/CheckBoxState.js +1 -0
  237. package/lib/esm/core-react/enums/CheckBoxState.js.map +1 -1
  238. package/lib/esm/core-react/enums/Orientation.d.ts +1 -0
  239. package/lib/esm/core-react/enums/Orientation.d.ts.map +1 -1
  240. package/lib/esm/core-react/enums/Orientation.js +1 -0
  241. package/lib/esm/core-react/enums/Orientation.js.map +1 -1
  242. package/lib/esm/core-react/enums/TimeFormat.d.ts +1 -0
  243. package/lib/esm/core-react/enums/TimeFormat.d.ts.map +1 -1
  244. package/lib/esm/core-react/enums/TimeFormat.js +1 -0
  245. package/lib/esm/core-react/enums/TimeFormat.js.map +1 -1
  246. package/lib/esm/core-react/focus/ItemKeyboardNavigator.d.ts.map +1 -1
  247. package/lib/esm/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
  248. package/lib/esm/core-react/focustrap/FocusTrap.js +1 -1
  249. package/lib/esm/core-react/focustrap/FocusTrap.js.map +1 -1
  250. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts +0 -2
  251. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  252. package/lib/esm/core-react/hocs/withOnOutsideClick.js +0 -1
  253. package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
  254. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts +1 -0
  255. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
  256. package/lib/esm/core-react/icons/ConditionalIconItem.js +2 -0
  257. package/lib/esm/core-react/icons/ConditionalIconItem.js.map +1 -1
  258. package/lib/esm/core-react/icons/IconComponent.d.ts +3 -0
  259. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  260. package/lib/esm/core-react/icons/IconComponent.js +1 -0
  261. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  262. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +0 -1
  263. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  264. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +0 -2
  265. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  266. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  267. package/lib/esm/core-react/inputs/InputLabel.js +1 -8
  268. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  269. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  270. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  271. package/lib/esm/core-react/l10n/LocalizationProvider.d.ts +1 -0
  272. package/lib/esm/core-react/l10n/LocalizationProvider.d.ts.map +1 -1
  273. package/lib/esm/core-react/l10n/LocalizationProvider.js +1 -0
  274. package/lib/esm/core-react/l10n/LocalizationProvider.js.map +1 -1
  275. package/lib/esm/core-react/l10n/useTranslation.d.ts.map +1 -1
  276. package/lib/esm/core-react/l10n/useTranslation.js +1 -1
  277. package/lib/esm/core-react/l10n/useTranslation.js.map +1 -1
  278. package/lib/esm/core-react/listbox/Listbox.d.ts +10 -7
  279. package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
  280. package/lib/esm/core-react/listbox/Listbox.js +6 -3
  281. package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
  282. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  283. package/lib/esm/core-react/messagebox/MessageBox.js +2 -9
  284. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  285. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +0 -2
  286. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  287. package/lib/esm/core-react/radialmenu/RadialMenu.js +0 -2
  288. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  289. package/lib/esm/core-react/radialmenu/RadialMenu.scss +3 -3
  290. package/lib/esm/core-react/searchbox/SearchBox.d.ts +0 -2
  291. package/lib/esm/core-react/searchbox/SearchBox.d.ts.map +1 -1
  292. package/lib/esm/core-react/searchbox/SearchBox.js +0 -2
  293. package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
  294. package/lib/esm/core-react/settings/SettingsContainer.d.ts +7 -3
  295. package/lib/esm/core-react/settings/SettingsContainer.d.ts.map +1 -1
  296. package/lib/esm/core-react/settings/SettingsContainer.js +14 -19
  297. package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
  298. package/lib/esm/core-react/settings/SettingsManager.d.ts +3 -1
  299. package/lib/esm/core-react/settings/SettingsManager.d.ts.map +1 -1
  300. package/lib/esm/core-react/settings/SettingsManager.js +6 -10
  301. package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
  302. package/lib/esm/core-react/tabs/Tabs.d.ts +0 -3
  303. package/lib/esm/core-react/tabs/Tabs.d.ts.map +1 -1
  304. package/lib/esm/core-react/tabs/Tabs.js +0 -4
  305. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  306. package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  307. package/lib/esm/core-react/tree/ExpansionToggle.js +0 -1
  308. package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
  309. package/lib/esm/core-react/tree/Node.d.ts +2 -0
  310. package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
  311. package/lib/esm/core-react/tree/Node.js +1 -5
  312. package/lib/esm/core-react/tree/Node.js.map +1 -1
  313. package/lib/esm/core-react/uistate/LocalStateStorage.d.ts +2 -2
  314. package/lib/esm/core-react/uistate/LocalStateStorage.d.ts.map +1 -1
  315. package/lib/esm/core-react/uistate/LocalStateStorage.js +3 -4
  316. package/lib/esm/core-react/uistate/LocalStateStorage.js.map +1 -1
  317. package/lib/esm/core-react/uistate/UiStateEntry.d.ts +1 -0
  318. package/lib/esm/core-react/uistate/UiStateEntry.d.ts.map +1 -1
  319. package/lib/esm/core-react/uistate/UiStateEntry.js +2 -0
  320. package/lib/esm/core-react/uistate/UiStateEntry.js.map +1 -1
  321. package/lib/esm/core-react/uistate/UiStateStorage.d.ts +3 -0
  322. package/lib/esm/core-react/uistate/UiStateStorage.d.ts.map +1 -1
  323. package/lib/esm/core-react/uistate/UiStateStorage.js +1 -0
  324. package/lib/esm/core-react/uistate/UiStateStorage.js.map +1 -1
  325. package/lib/esm/core-react/utils/IconWebComponent.d.ts.map +1 -1
  326. package/lib/esm/core-react/utils/IconWebComponent.js +1 -3
  327. package/lib/esm/core-react/utils/IconWebComponent.js.map +1 -1
  328. package/lib/esm/core-react/utils/ListenerType.d.ts +15 -0
  329. package/lib/esm/core-react/utils/ListenerType.d.ts.map +1 -0
  330. package/lib/esm/core-react/utils/ListenerType.js +2 -0
  331. package/lib/esm/core-react/utils/ListenerType.js.map +1 -0
  332. package/lib/esm/core-react/utils/Rectangle.d.ts +1 -0
  333. package/lib/esm/core-react/utils/Rectangle.d.ts.map +1 -1
  334. package/lib/esm/core-react/utils/Rectangle.js.map +1 -1
  335. package/lib/esm/core-react/utils/Size.d.ts +1 -0
  336. package/lib/esm/core-react/utils/Size.d.ts.map +1 -1
  337. package/lib/esm/core-react/utils/Size.js.map +1 -1
  338. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.d.ts +1 -0
  339. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
  340. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +1 -0
  341. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  342. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +3 -2
  343. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  344. package/lib/esm/core-react/utils/hooks/useResizeObserver.js +2 -1
  345. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  346. package/lib/esm/core-react.d.ts +5 -0
  347. package/lib/esm/core-react.d.ts.map +1 -1
  348. package/lib/esm/core-react.js +6 -2
  349. package/lib/esm/core-react.js.map +1 -1
  350. package/package.json +1 -1
@@ -35,7 +35,6 @@ export declare const withOnOutsideClick: <ComponentProps extends {}>(Component:
35
35
  handleOutsideClickContainerDivSet: (outsideClickContainerDiv: HTMLDivElement | null) => void;
36
36
  getParentDocument(): Document;
37
37
  componentDidMount(): void;
38
- /** @internal */
39
38
  componentWillUnmount(): void;
40
39
  render(): React.JSX.Element;
41
40
  context: unknown;
@@ -75,7 +74,6 @@ export declare const withOnOutsideClick: <ComponentProps extends {}>(Component:
75
74
  handleOutsideClickContainerDivSet: (outsideClickContainerDiv: HTMLDivElement | null) => void;
76
75
  getParentDocument(): Document;
77
76
  componentDidMount(): void;
78
- /** @internal */
79
77
  componentWillUnmount(): void;
80
78
  render(): React.JSX.Element;
81
79
  context: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"withOnOutsideClick.d.ts","sourceRoot":"","sources":["../../../../src/core-react/hocs/withOnOutsideClick.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,sCAAsC;IACtC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAC;IAC5C,8HAA8H;IAC9H,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,+GAEG,UAAU,KAAK,GAAG,4BACtC,OAAO,qBACD,OAAO;;QAKvB,gBAAgB;;QAEhB,gBAAgB;;QAGhB,gBAAgB;+BACc,WAAW,GAAG,OAAO;QAanD,gBAAgB;0BACS,UAAU;QAanC,gBAAgB;iCACiB,UAAU;QAW3C,gBAAgB;uCACuB,YAAY;QAUnD,gBAAgB;qCACqB,YAAY;sEAerB,cAAc,GAAG,IAAI;;;QA8BjD,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;QAtGhB,gBAAgB;;QAEhB,gBAAgB;;QAGhB,gBAAgB;+BACc,WAAW,GAAG,OAAO;QAanD,gBAAgB;0BACS,UAAU;QAanC,gBAAgB;iCACiB,UAAU;QAW3C,gBAAgB;uCACuB,YAAY;QAUnD,gBAAgB;qCACqB,YAAY;sEAerB,cAAc,GAAG,IAAI;;;QA8BjD,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;CAgCnB,CAAC"}
1
+ {"version":3,"file":"withOnOutsideClick.d.ts","sourceRoot":"","sources":["../../../../src/core-react/hocs/withOnOutsideClick.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,sCAAsC;IACtC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAC;IAC5C,8HAA8H;IAC9H,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,+GAEG,UAAU,KAAK,GAAG,4BACtC,OAAO,qBACD,OAAO;;QAKvB,gBAAgB;;QAEhB,gBAAgB;;QAGhB,gBAAgB;+BACc,WAAW,GAAG,OAAO;QAanD,gBAAgB;0BACS,UAAU;QAanC,gBAAgB;iCACiB,UAAU;QAW3C,gBAAgB;uCACuB,YAAY;QAUnD,gBAAgB;qCACqB,YAAY;sEAerB,cAAc,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;QAxEjD,gBAAgB;;QAEhB,gBAAgB;;QAGhB,gBAAgB;+BACc,WAAW,GAAG,OAAO;QAanD,gBAAgB;0BACS,UAAU;QAanC,gBAAgB;iCACiB,UAAU;QAW3C,gBAAgB;uCACuB,YAAY;QAUnD,gBAAgB;qCACqB,YAAY;sEAerB,cAAc,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;CA6DpD,CAAC"}
@@ -91,7 +91,6 @@ export const withOnOutsideClick = (Component, defaultOnOutsideClick, useCapture
91
91
  else
92
92
  outsideClickParentDocument.addEventListener("click", this.handleDocumentClick, useCapture);
93
93
  }
94
- /** @internal */
95
94
  componentWillUnmount() {
96
95
  const outsideClickParentDocument = this.getParentDocument();
97
96
  if (usePointerEvents) {
@@ -1 +1 @@
1
- {"version":3,"file":"withOnOutsideClick.js","sourceRoot":"","sources":["../../../../src/core-react/hocs/withOnOutsideClick.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,SAA8C,EAC9C,qBAAkD,EAClD,aAAsB,IAAI,EAC1B,mBAA4B,IAAI,EAChC,EAAE;IACF,OAAO,MAAM,kBAAmB,SAAQ,KAAK,CAAC,aAE7C;QAFM;;YAGL,gBAAgB;YACT,6BAAwB,GAA2B,IAAI,CAAC;YAC/D,gBAAgB;YACT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E,CAAC;gBACrB,0BAA0B,CAAC,gBAAgB,CACzC,aAAa,EACb,IAAI,CAAC,yBAAyB,EAC9B,UAAU,CACX,CAAC;gBACF,0BAA0B,CAAC,gBAAgB,CACzC,WAAW,EACX,IAAI,CAAC,uBAAuB,EAC5B,UAAU,CACX,CAAC;YACJ,CAAC;;gBACC,0BAA0B,CAAC,gBAAgB,CACzC,OAAO,EACP,IAAI,CAAC,mBAAmB,EACxB,UAAU,CACX,CAAC;QACN,CAAC;QAED,gBAAgB;QACA,oBAAoB;YAClC,MAAM,0BAA0B,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC5D,IAAI,gBAAgB,EAAE,CAAC;gBACrB,0BAA0B,CAAC,mBAAmB,CAC5C,aAAa,EACb,IAAI,CAAC,yBAAyB,EAC9B,UAAU,CACX,CAAC;gBACF,0BAA0B,CAAC,mBAAmB,CAC5C,WAAW,EACX,IAAI,CAAC,uBAAuB,EAC5B,UAAU,CACX,CAAC;YACJ,CAAC;;gBACC,0BAA0B,CAAC,mBAAmB,CAC5C,OAAO,EACP,IAAI,CAAC,mBAAmB,EACxB,UAAU,CACX,CAAC;QACN,CAAC;QAEe,MAAM;YACpB,MAAM,EAAE,cAAc,EAAE,8BAA8B,EAAE,GAAG,KAAK,EAAE,GAChE,IAAI,CAAC,KAAK,CAAC;YACb,OAAO,CACL,6BAAK,GAAG,EAAE,IAAI,CAAC,iCAAiC;gBAC9C,oBAAC,SAAS,OAAM,KAAwB,GAAI,CACxC,CACP,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Common\n */\n\nimport * as React from \"react\";\n\n/** Properties for [[withOnOutsideClick]] React higher-order component\n * @public\n * @deprecated in 4.15.0. Props of deprecated {@link withOnOutsideClick} HOC.\n */\nexport interface WithOnOutsideClickProps {\n /** Outside click callback function */\n onOutsideClick?: (event: MouseEvent) => any;\n /** If false outside click processing and closing are skipped if click occurs in another Popup component, default to false. */\n closeOnNestedPopupOutsideClick?: boolean;\n}\n\n/** withOnOutsideClick is a React higher-order component that adds outside click support.\n * @public\n * @deprecated in 4.15.0. Used internally.\n */\nexport const withOnOutsideClick = <ComponentProps extends {}>(\n Component: React.ComponentType<ComponentProps>,\n defaultOnOutsideClick?: (event: MouseEvent) => any,\n useCapture: boolean = true,\n usePointerEvents: boolean = true\n) => {\n return class WithOnOutsideClick extends React.PureComponent<\n ComponentProps & WithOnOutsideClickProps // eslint-disable-line deprecation/deprecation\n > {\n /** @internal */\n public outsideClickContainerDiv?: HTMLDivElement | null = null;\n /** @internal */\n public isDownOutside = false;\n\n /** @internal */\n public isInCorePopup(element: HTMLElement): boolean {\n if (element.nodeName === \"DIV\") {\n if (element.classList && element.classList.contains(\"core-popup\"))\n return true;\n if (element.parentElement && this.isInCorePopup(element.parentElement))\n return true;\n } else {\n if (element.parentElement && this.isInCorePopup(element.parentElement))\n return true;\n }\n return false;\n }\n\n /** @internal */\n public onOutsideClick(e: MouseEvent) {\n if (e.target instanceof Node && e.target.nodeType === Node.ELEMENT_NODE) {\n if (\n !this.props.closeOnNestedPopupOutsideClick &&\n this.isInCorePopup(e.target as HTMLElement)\n )\n return;\n }\n\n if (this.props.onOutsideClick) return this.props.onOutsideClick(e);\n else if (defaultOnOutsideClick) return defaultOnOutsideClick(e);\n }\n\n /** @internal */\n public handleDocumentClick = (e: MouseEvent) => {\n if (\n !this.outsideClickContainerDiv ||\n !(e.target instanceof Node) ||\n this.outsideClickContainerDiv.contains(e.target)\n )\n return;\n\n return this.onOutsideClick(e);\n };\n\n /** @internal */\n public handleDocumentPointerDown = (e: PointerEvent) => {\n this.isDownOutside = true;\n if (this.outsideClickContainerDiv) {\n // typically e.target test for instance of Node, but this is not working from pop out windows\n this.isDownOutside =\n !!e.target &&\n !this.outsideClickContainerDiv.contains(e.target as any);\n }\n };\n\n /** @internal */\n public handleDocumentPointerUp = (e: PointerEvent) => {\n let isUpOutside = true;\n if (this.outsideClickContainerDiv) {\n // typically e.target test for instance of Node, but this is not working from pop out windows\n isUpOutside =\n !!e.target &&\n !this.outsideClickContainerDiv.contains(e.target as any);\n }\n\n const isOutsideClick = isUpOutside && this.isDownOutside;\n this.isDownOutside = false;\n isOutsideClick && this.onOutsideClick(e);\n };\n\n public handleOutsideClickContainerDivSet = (\n outsideClickContainerDiv: HTMLDivElement | null\n ) => {\n this.outsideClickContainerDiv = outsideClickContainerDiv;\n };\n\n public getParentDocument() {\n return this.outsideClickContainerDiv?.ownerDocument ?? document;\n }\n\n public override componentDidMount() {\n const outsideClickParentDocument = this.getParentDocument();\n if (usePointerEvents) {\n outsideClickParentDocument.addEventListener(\n \"pointerdown\",\n this.handleDocumentPointerDown,\n useCapture\n );\n outsideClickParentDocument.addEventListener(\n \"pointerup\",\n this.handleDocumentPointerUp,\n useCapture\n );\n } else\n outsideClickParentDocument.addEventListener(\n \"click\",\n this.handleDocumentClick,\n useCapture\n );\n }\n\n /** @internal */\n public override componentWillUnmount() {\n const outsideClickParentDocument = this.getParentDocument();\n if (usePointerEvents) {\n outsideClickParentDocument.removeEventListener(\n \"pointerdown\",\n this.handleDocumentPointerDown,\n useCapture\n );\n outsideClickParentDocument.removeEventListener(\n \"pointerup\",\n this.handleDocumentPointerUp,\n useCapture\n );\n } else\n outsideClickParentDocument.removeEventListener(\n \"click\",\n this.handleDocumentClick,\n useCapture\n );\n }\n\n public override render() {\n const { onOutsideClick, closeOnNestedPopupOutsideClick, ...props } =\n this.props;\n return (\n <div ref={this.handleOutsideClickContainerDivSet}>\n <Component {...(props as ComponentProps)} />\n </div>\n );\n }\n };\n};\n"]}
1
+ {"version":3,"file":"withOnOutsideClick.js","sourceRoot":"","sources":["../../../../src/core-react/hocs/withOnOutsideClick.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;A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P,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Common\n */\n\nimport * as React from \"react\";\n\n/** Properties for [[withOnOutsideClick]] React higher-order component\n * @public\n * @deprecated in 4.15.0. Props of deprecated {@link withOnOutsideClick} HOC.\n */\nexport interface WithOnOutsideClickProps {\n /** Outside click callback function */\n onOutsideClick?: (event: MouseEvent) => any;\n /** If false outside click processing and closing are skipped if click occurs in another Popup component, default to false. */\n closeOnNestedPopupOutsideClick?: boolean;\n}\n\n/** withOnOutsideClick is a React higher-order component that adds outside click support.\n * @public\n * @deprecated in 4.15.0. Used internally.\n */\nexport const withOnOutsideClick = <ComponentProps extends {}>(\n Component: React.ComponentType<ComponentProps>,\n defaultOnOutsideClick?: (event: MouseEvent) => any,\n useCapture: boolean = true,\n usePointerEvents: boolean = true\n) => {\n return class WithOnOutsideClick extends React.PureComponent<\n ComponentProps & WithOnOutsideClickProps // eslint-disable-line deprecation/deprecation\n > {\n /** @internal */\n public outsideClickContainerDiv?: HTMLDivElement | null = null;\n /** @internal */\n public isDownOutside = false;\n\n /** @internal */\n public isInCorePopup(element: HTMLElement): boolean {\n if (element.nodeName === \"DIV\") {\n if (element.classList && element.classList.contains(\"core-popup\"))\n return true;\n if (element.parentElement && this.isInCorePopup(element.parentElement))\n return true;\n } else {\n if (element.parentElement && this.isInCorePopup(element.parentElement))\n return true;\n }\n return false;\n }\n\n /** @internal */\n public onOutsideClick(e: MouseEvent) {\n if (e.target instanceof Node && e.target.nodeType === Node.ELEMENT_NODE) {\n if (\n !this.props.closeOnNestedPopupOutsideClick &&\n this.isInCorePopup(e.target as HTMLElement)\n )\n return;\n }\n\n if (this.props.onOutsideClick) return this.props.onOutsideClick(e);\n else if (defaultOnOutsideClick) return defaultOnOutsideClick(e);\n }\n\n /** @internal */\n public handleDocumentClick = (e: MouseEvent) => {\n if (\n !this.outsideClickContainerDiv ||\n !(e.target instanceof Node) ||\n this.outsideClickContainerDiv.contains(e.target)\n )\n return;\n\n return this.onOutsideClick(e);\n };\n\n /** @internal */\n public handleDocumentPointerDown = (e: PointerEvent) => {\n this.isDownOutside = true;\n if (this.outsideClickContainerDiv) {\n // typically e.target test for instance of Node, but this is not working from pop out windows\n this.isDownOutside =\n !!e.target &&\n !this.outsideClickContainerDiv.contains(e.target as any);\n }\n };\n\n /** @internal */\n public handleDocumentPointerUp = (e: PointerEvent) => {\n let isUpOutside = true;\n if (this.outsideClickContainerDiv) {\n // typically e.target test for instance of Node, but this is not working from pop out windows\n isUpOutside =\n !!e.target &&\n !this.outsideClickContainerDiv.contains(e.target as any);\n }\n\n const isOutsideClick = isUpOutside && this.isDownOutside;\n this.isDownOutside = false;\n isOutsideClick && this.onOutsideClick(e);\n };\n\n public handleOutsideClickContainerDivSet = (\n outsideClickContainerDiv: HTMLDivElement | null\n ) => {\n this.outsideClickContainerDiv = outsideClickContainerDiv;\n };\n\n public getParentDocument() {\n return this.outsideClickContainerDiv?.ownerDocument ?? document;\n }\n\n public override componentDidMount() {\n const outsideClickParentDocument = this.getParentDocument();\n if (usePointerEvents) {\n outsideClickParentDocument.addEventListener(\n \"pointerdown\",\n this.handleDocumentPointerDown,\n useCapture\n );\n outsideClickParentDocument.addEventListener(\n \"pointerup\",\n this.handleDocumentPointerUp,\n useCapture\n );\n } else\n outsideClickParentDocument.addEventListener(\n \"click\",\n this.handleDocumentClick,\n useCapture\n );\n }\n\n public override componentWillUnmount() {\n const outsideClickParentDocument = this.getParentDocument();\n if (usePointerEvents) {\n outsideClickParentDocument.removeEventListener(\n \"pointerdown\",\n this.handleDocumentPointerDown,\n useCapture\n );\n outsideClickParentDocument.removeEventListener(\n \"pointerup\",\n this.handleDocumentPointerUp,\n useCapture\n );\n } else\n outsideClickParentDocument.removeEventListener(\n \"click\",\n this.handleDocumentClick,\n useCapture\n );\n }\n\n public override render() {\n const { onOutsideClick, closeOnNestedPopupOutsideClick, ...props } =\n this.props;\n return (\n <div ref={this.handleOutsideClickContainerDivSet}>\n <Component {...(props as ComponentProps)} />\n </div>\n );\n }\n };\n};\n"]}
@@ -4,6 +4,7 @@
4
4
  import type { IconSpec } from "./IconComponent";
5
5
  /** Class used to return an icon. The icon is variable and can be changed in response to subscribed event ids.
6
6
  * @public
7
+ * @deprecated in 4.16.0. Use {@link @itwin/appui-react#ConditionalIconValue} instead.
7
8
  */
8
9
  export declare class ConditionalIconItem {
9
10
  readonly iconGetter: () => IconSpec;
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionalIconItem.d.ts","sourceRoot":"","sources":["../../../../src/core-react/icons/ConditionalIconItem.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;GAEG;AACH,qBAAa,mBAAmB;aASZ,UAAU,EAAE,MAAM,QAAQ;aAC1B,YAAY,EAAE,MAAM,EAAE;IATxC,OAAO,CAAC,MAAM,CAAC,CAAW;IAE1B;;;;OAIG;gBAEe,UAAU,EAAE,MAAM,QAAQ,EAC1B,YAAY,EAAE,MAAM,EAAE,EACtC,KAAK,CAAC,EAAE,QAAQ;IAKlB,mDAAmD;IACnD,IAAW,KAAK,IAAI,QAAQ,CAI3B;IAED,2DAA2D;IACpD,OAAO,IAAI,OAAO;IAUzB,gGAAgG;WAClF,YAAY,CACxB,gBAAgB,EAAE,mBAAmB,GAAG,MAAM,GAAG,SAAS,EAC1D,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,GACpB,OAAO;IAkBV,0FAA0F;WAC5E,QAAQ,CACpB,gBAAgB,EAAE,mBAAmB,GAAG,MAAM,GAAG,SAAS,GACzD,QAAQ,GAAG,SAAS;CAUxB"}
1
+ {"version":3,"file":"ConditionalIconItem.d.ts","sourceRoot":"","sources":["../../../../src/core-react/icons/ConditionalIconItem.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIhD;;;GAGG;AACH,qBAAa,mBAAmB;aASZ,UAAU,EAAE,MAAM,QAAQ;aAC1B,YAAY,EAAE,MAAM,EAAE;IATxC,OAAO,CAAC,MAAM,CAAC,CAAW;IAE1B;;;;OAIG;gBAEe,UAAU,EAAE,MAAM,QAAQ,EAC1B,YAAY,EAAE,MAAM,EAAE,EACtC,KAAK,CAAC,EAAE,QAAQ;IAKlB,mDAAmD;IACnD,IAAW,KAAK,IAAI,QAAQ,CAI3B;IAED,2DAA2D;IACpD,OAAO,IAAI,OAAO;IAUzB,gGAAgG;WAClF,YAAY,CACxB,gBAAgB,EAAE,mBAAmB,GAAG,MAAM,GAAG,SAAS,EAC1D,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,GACpB,OAAO;IAkBV,0FAA0F;WAC5E,QAAQ,CACpB,gBAAgB,EAAE,mBAAmB,GAAG,MAAM,GAAG,SAAS,GACzD,QAAQ,GAAG,SAAS;CAUxB"}
@@ -5,8 +5,10 @@
5
5
  /** @packageDocumentation
6
6
  * @module Icon
7
7
  */
8
+ /* eslint-disable deprecation/deprecation */
8
9
  /** Class used to return an icon. The icon is variable and can be changed in response to subscribed event ids.
9
10
  * @public
11
+ * @deprecated in 4.16.0. Use {@link @itwin/appui-react#ConditionalIconValue} instead.
10
12
  */
11
13
  export class ConditionalIconItem {
12
14
  /** Constructor for ConditionalIconItem
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionalIconItem.js","sourceRoot":"","sources":["../../../../src/core-react/icons/ConditionalIconItem.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAIH;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAG9B;;;;OAIG;IACH,YACkB,UAA0B,EAC1B,YAAsB,EACtC,KAAgB;QAFA,eAAU,GAAV,UAAU,CAAg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QAED,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Icon\n */\n\nimport type { IconSpec } from \"./IconComponent\";\n\n/** Class used to return an icon. The icon is variable and can be changed in response to subscribed event ids.\n * @public\n */\nexport class ConditionalIconItem {\n private _value?: IconSpec;\n\n /** Constructor for ConditionalIconItem\n * @param iconGetter Function to retrieve the icon that matches the condition. Returns an IconSpec.\n * @param syncEventIds The array of event ids to be monitored. These events are triggered when the condition(s) that control the icon change.\n * @param value The default IconSpec. If this is not specified, the function is run to get the initial value.\n */\n constructor(\n public readonly iconGetter: () => IconSpec,\n public readonly syncEventIds: string[],\n value?: IconSpec\n ) {\n this._value = value;\n }\n\n /** The current IconSpec according to conditions */\n public get value(): IconSpec {\n if (undefined !== this._value) return this._value;\n this._value = this.iconGetter();\n return this._value;\n }\n\n /** Called to update the value by running the iconGetter */\n public refresh(): boolean {\n const newValue = this.iconGetter();\n\n if (newValue !== this._value) {\n this._value = newValue;\n return true;\n }\n return false;\n }\n\n /** A helper function that updates the IconSpec value when the specified events are triggered */\n public static refreshValue(\n conditionalValue: ConditionalIconItem | string | undefined,\n eventIds: Set<string>\n ): boolean {\n if (\n undefined === conditionalValue ||\n !(conditionalValue instanceof ConditionalIconItem)\n )\n return false;\n\n const iconItem = conditionalValue;\n\n if (\n iconItem.syncEventIds.some((value: string): boolean =>\n eventIds.has(value.toLowerCase())\n )\n )\n return iconItem.refresh();\n\n return false;\n }\n /** helper function to get the iconSpec from a ConditionIconItem as IconSpec | undefined*/\n public static getValue(\n conditionalValue: ConditionalIconItem | string | undefined\n ): IconSpec | undefined {\n if (undefined === conditionalValue) return undefined;\n\n if (conditionalValue instanceof ConditionalIconItem) {\n const iconItem = conditionalValue;\n return iconItem.value;\n }\n\n return conditionalValue;\n }\n}\n"]}
1
+ {"version":3,"file":"ConditionalIconItem.js","sourceRoot":"","sources":["../../../../src/core-react/icons/ConditionalIconItem.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAIH,4CAA4C;AAE5C;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAG9B;;;;OAIG;IACH,YACkB,UAA0B,EAC1B,YAAsB,EACtC,KAAgB;QAFA,eAAU,GAAV,UAAU,CAAgB;QAC1B,iBAAY,GAAZ,YAAY,CAAU;QAGtC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,mDAAmD;IACnD,IAAW,KAAK;QACd,IAAI,SAAS,KAAK,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC,MAAM,CAAC;QAClD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,2DAA2D;IACpD,OAAO;QACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAEnC,IAAI,QAAQ,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC;YAC7B,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,gGAAgG;IACzF,MAAM,CAAC,YAAY,CACxB,gBAA0D,EAC1D,QAAqB;QAErB,IACE,SAAS,KAAK,gBAAgB;YAC9B,CAAC,CAAC,gBAAgB,YAAY,mBAAmB,CAAC;YAElD,OAAO,KAAK,CAAC;QAEf,MAAM,QAAQ,GAAG,gBAAgB,CAAC;QAElC,IACE,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,KAAa,EAAW,EAAE,CACpD,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAClC;YAED,OAAO,QAAQ,CAAC,OAAO,EAAE,CAAC;QAE5B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,0FAA0F;IACnF,MAAM,CAAC,QAAQ,CACpB,gBAA0D;QAE1D,IAAI,SAAS,KAAK,gBAAgB;YAAE,OAAO,SAAS,CAAC;QAErD,IAAI,gBAAgB,YAAY,mBAAmB,EAAE,CAAC;YACpD,MAAM,QAAQ,GAAG,gBAAgB,CAAC;YAClC,OAAO,QAAQ,CAAC,KAAK,CAAC;QACxB,CAAC;QAED,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Icon\n */\n\nimport type { IconSpec } from \"./IconComponent\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Class used to return an icon. The icon is variable and can be changed in response to subscribed event ids.\n * @public\n * @deprecated in 4.16.0. Use {@link @itwin/appui-react#ConditionalIconValue} instead.\n */\nexport class ConditionalIconItem {\n private _value?: IconSpec;\n\n /** Constructor for ConditionalIconItem\n * @param iconGetter Function to retrieve the icon that matches the condition. Returns an IconSpec.\n * @param syncEventIds The array of event ids to be monitored. These events are triggered when the condition(s) that control the icon change.\n * @param value The default IconSpec. If this is not specified, the function is run to get the initial value.\n */\n constructor(\n public readonly iconGetter: () => IconSpec,\n public readonly syncEventIds: string[],\n value?: IconSpec\n ) {\n this._value = value;\n }\n\n /** The current IconSpec according to conditions */\n public get value(): IconSpec {\n if (undefined !== this._value) return this._value;\n this._value = this.iconGetter();\n return this._value;\n }\n\n /** Called to update the value by running the iconGetter */\n public refresh(): boolean {\n const newValue = this.iconGetter();\n\n if (newValue !== this._value) {\n this._value = newValue;\n return true;\n }\n return false;\n }\n\n /** A helper function that updates the IconSpec value when the specified events are triggered */\n public static refreshValue(\n conditionalValue: ConditionalIconItem | string | undefined,\n eventIds: Set<string>\n ): boolean {\n if (\n undefined === conditionalValue ||\n !(conditionalValue instanceof ConditionalIconItem)\n )\n return false;\n\n const iconItem = conditionalValue;\n\n if (\n iconItem.syncEventIds.some((value: string): boolean =>\n eventIds.has(value.toLowerCase())\n )\n )\n return iconItem.refresh();\n\n return false;\n }\n /** helper function to get the iconSpec from a ConditionIconItem as IconSpec | undefined*/\n public static getValue(\n conditionalValue: ConditionalIconItem | string | undefined\n ): IconSpec | undefined {\n if (undefined === conditionalValue) return undefined;\n\n if (conditionalValue instanceof ConditionalIconItem) {\n const iconItem = conditionalValue;\n return iconItem.value;\n }\n\n return conditionalValue;\n }\n}\n"]}
@@ -13,10 +13,12 @@ import { ConditionalIconItem } from "./ConditionalIconItem";
13
13
  * - A dataURI with MimeTypes `image/svg+xml` (ensure valid dataURI encoding) or `image/svg+xml;base64`;
14
14
  * - Anything else will be treated as a class name and be directly added to the `class` attribute.
15
15
  * @public
16
+ * @deprecated in 4.16.0. Use `React.ReactNode` instead.
16
17
  */
17
18
  export type IconSpec = string | ConditionalStringValue | React.ReactNode | ConditionalIconItem;
18
19
  /** Properties for the [[Icon]] React component
19
20
  * @public
21
+ * @deprecated in 4.16.0. Props of deprecated {@link Icon} component.
20
22
  */
21
23
  export interface IconProps extends CommonProps {
22
24
  /** CSS class name or SvgPath for icon. This is optional because it is improperly
@@ -26,6 +28,7 @@ export interface IconProps extends CommonProps {
26
28
  }
27
29
  /** Icon Functional component displays an icon based on an [[IconSpec]].
28
30
  * @public
31
+ * @deprecated in 4.16.0. Used to render a deprecated {@link IconSpec} type. Use {@link https://itwinui.bentley.com/ iTwinUI Icon} instead.
29
32
  */
30
33
  export declare function Icon(props: IconProps): React.JSX.Element | null;
31
34
  //# sourceMappingURL=IconComponent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconComponent.d.ts","sourceRoot":"","sources":["../../../../src/core-react/icons/IconComponent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,sBAAsB,GACtB,KAAK,CAAC,SAAS,GACf,mBAAmB,CAAC;AAExB;;GAEG;AAEH,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAWD;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,4BA4DpC"}
1
+ {"version":3,"file":"IconComponent.d.ts","sourceRoot":"","sources":["../../../../src/core-react/icons/IconComponent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAI5D;;;;;;;;GAQG;AACH,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,sBAAsB,GACtB,KAAK,CAAC,SAAS,GACf,mBAAmB,CAAC;AAExB;;;GAGG;AACH,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAWD;;;GAGG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,4BA4DpC"}
@@ -20,6 +20,7 @@ function getWebComponentSource(iconSpec) {
20
20
  }
21
21
  /** Icon Functional component displays an icon based on an [[IconSpec]].
22
22
  * @public
23
+ * @deprecated in 4.16.0. Used to render a deprecated {@link IconSpec} type. Use {@link https://itwinui.bentley.com/ iTwinUI Icon} instead.
23
24
  */
24
25
  export function Icon(props) {
25
26
  if (!props.iconSpec)
@@ -1 +1 @@
1
- {"version":3,"file":"IconComponent.js","sourceRoot":"","sources":["../../../../src/core-react/icons/IconComponent.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,SAAS,EAAE,KAAK,WAAW,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA2B5D,qDAAqD;AACrD,SAAS,qBAAqB,CAAC,QAAgB;IAC7C,IAAI,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1D,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,IAAI,CAAC,KAAK,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAEjC,MAAM,aAAa,GAAG,gBAAgB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACvD,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;QACtC,MAAM,UAAU,GAAG,aAAa,CAAC;QACjC,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,UAAU,CAAC,CAAC;QAE7D,IACE,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC;YAC9B,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC;YAC3B,kBAAkB,EAClB,CAAC;YACD,MAAM,oBAAoB,GAAG,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IACrB,OAAO,IAAI,EAAE,CAAC;QACZ,IAAI,KAAK,YAAY,mBAAmB,EAAE,CAAC;YACzC,KAAK,GAAG,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC5C,SAAS;QACX,CAAC;QACD,IAAI,KAAK,YAAY,sBAAsB,EAAE,CAAC;YAC5C,KAAK,GAAG,sBAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC/C,MAAM;QACR,CAAC;QACD,MAAM;IACR,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Icon\n */\n\nimport \"./IconComponent.scss\";\nimport * as React from \"react\";\nimport classnames from \"classnames\";\nimport { ConditionalStringValue } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"../utils/Props\";\nimport DOMPurify, * as DOMPurifyNS from \"dompurify\";\nimport { ConditionalIconItem } from \"./ConditionalIconItem\";\n\n/** Prototype for an IconSpec which can be a string, ReactNode or ConditionalStringValue.\n * Strings are expected to be one of the following:\n * - Created by `IconSpecUtilities.createWebComponentIconSpec` in appui-abstract (deprecated).\n * - A URL to a SVG file (must end with \".svg\").\n * - A dataURI with MimeTypes `image/svg+xml` (ensure valid dataURI encoding) or `image/svg+xml;base64`;\n * - Anything else will be treated as a class name and be directly added to the `class` attribute.\n * @public\n */\nexport type IconSpec =\n | string\n | ConditionalStringValue\n | React.ReactNode\n | ConditionalIconItem;\n\n/** Properties for the [[Icon]] React component\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface IconProps extends CommonProps {\n /** CSS class name or SvgPath for icon. This is optional because it is improperly\n * used to extend other interfaces and changing it would break existing API.\n */\n iconSpec?: IconSpec;\n}\n\n/** Get the SVG Source from an svg-loader IconSpec */\nfunction getWebComponentSource(iconSpec: string): string | undefined {\n if (iconSpec.startsWith(\"webSvg:\") && iconSpec.length > 7) {\n return iconSpec.slice(7);\n }\n\n return undefined;\n}\n\n/** Icon Functional component displays an icon based on an [[IconSpec]].\n * @public\n */\nexport function Icon(props: IconProps) {\n if (!props.iconSpec) return null;\n\n const iconSpecValue = getIconSpecValue(props.iconSpec);\n if (typeof iconSpecValue === \"string\") {\n const iconString = iconSpecValue;\n const webComponentString = getWebComponentSource(iconString);\n\n if (\n iconString.startsWith(\"data:\") ||\n iconString.endsWith(\".svg\") ||\n webComponentString\n ) {\n const definitiveIconString = webComponentString\n ? webComponentString\n : iconString;\n const svgLoader = `<svg-loader src=\"${definitiveIconString}\"></svg-loader>`;\n const svgDiv = `<div>${svgLoader}</div>`;\n // the esm build of dompurify has a default import but the cjs build does not\n // if there is a default export, use it (likely esm), otherwise use the namespace\n const sanitizer = DOMPurify ?? DOMPurifyNS;\n\n const sanitizerConfig = {\n ALLOWED_TAGS: [\"svg-loader\"],\n ADD_URI_SAFE_ATTR: definitiveIconString.startsWith(\"data:\")\n ? [\"src\"]\n : [],\n };\n\n const sanitizedIconString = sanitizer.sanitize(svgDiv, sanitizerConfig);\n const webComponentNode = (\n // we can safely disable jam3/no-sanitizer-with-danger as we are sanitizing above\n // eslint-disable-next-line jam3/no-sanitizer-with-danger\n <div dangerouslySetInnerHTML={{ __html: sanitizedIconString }}></div>\n );\n return (\n <i className={classnames(\"icon\", \"core-svg-icon\", props.className)}>\n {webComponentNode}\n </i>\n );\n }\n\n // CSS icon\n return (\n <i\n className={classnames(\"icon\", iconString, props.className)}\n style={props.style}\n />\n );\n }\n\n // ReactNode icon\n return (\n <i\n className={classnames(\"icon\", \"core-svg-icon\", props.className)}\n style={props.style}\n >\n {iconSpecValue}\n </i>\n );\n}\n\nfunction getIconSpecValue(\n iconSpec: IconSpec\n): Exclude<IconSpec, ConditionalIconItem | ConditionalStringValue> {\n let value = iconSpec;\n while (true) {\n if (value instanceof ConditionalIconItem) {\n value = ConditionalIconItem.getValue(value);\n continue;\n }\n if (value instanceof ConditionalStringValue) {\n value = ConditionalStringValue.getValue(value);\n break;\n }\n break;\n }\n return value;\n}\n"]}
1
+ {"version":3,"file":"IconComponent.js","sourceRoot":"","sources":["../../../../src/core-react/icons/IconComponent.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,SAAS,EAAE,KAAK,WAAW,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA8B5D,qDAAqD;AACrD,SAAS,qBAAqB,CAAC,QAAgB;IAC7C,IAAI,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1D,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,IAAI,CAAC,KAAK,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAEjC,MAAM,aAAa,GAAG,gBAAgB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACvD,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;QACtC,MAAM,UAAU,GAAG,aAAa,CAAC;QACjC,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,UAAU,CAAC,CAAC;QAE7D,IACE,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC;YAC9B,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC;YAC3B,kBAAkB,EAClB,CAAC;YACD,MAAM,oBAAoB,GAAG,kBAAkB;g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O,IAAI,EAAE,CAAC;QACZ,IAAI,KAAK,YAAY,mBAAmB,EAAE,CAAC;YACzC,KAAK,GAAG,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC5C,SAAS;QACX,CAAC;QACD,IAAI,KAAK,YAAY,sBAAsB,EAAE,CAAC;YAC5C,KAAK,GAAG,sBAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC/C,MAAM;QACR,CAAC;QACD,MAAM;IACR,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Icon\n */\n\nimport \"./IconComponent.scss\";\nimport * as React from \"react\";\nimport classnames from \"classnames\";\nimport { ConditionalStringValue } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"../utils/Props\";\nimport DOMPurify, * as DOMPurifyNS from \"dompurify\";\nimport { ConditionalIconItem } from \"./ConditionalIconItem\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Prototype for an IconSpec which can be a string, ReactNode or ConditionalStringValue.\n * Strings are expected to be one of the following:\n * - Created by `IconSpecUtilities.createWebComponentIconSpec` in appui-abstract (deprecated).\n * - A URL to a SVG file (must end with \".svg\").\n * - A dataURI with MimeTypes `image/svg+xml` (ensure valid dataURI encoding) or `image/svg+xml;base64`;\n * - Anything else will be treated as a class name and be directly added to the `class` attribute.\n * @public\n * @deprecated in 4.16.0. Use `React.ReactNode` instead.\n */\nexport type IconSpec =\n | string\n | ConditionalStringValue\n | React.ReactNode\n | ConditionalIconItem;\n\n/** Properties for the [[Icon]] React component\n * @public\n * @deprecated in 4.16.0. Props of deprecated {@link Icon} component.\n */\nexport interface IconProps extends CommonProps {\n /** CSS class name or SvgPath for icon. This is optional because it is improperly\n * used to extend other interfaces and changing it would break existing API.\n */\n iconSpec?: IconSpec;\n}\n\n/** Get the SVG Source from an svg-loader IconSpec */\nfunction getWebComponentSource(iconSpec: string): string | undefined {\n if (iconSpec.startsWith(\"webSvg:\") && iconSpec.length > 7) {\n return iconSpec.slice(7);\n }\n\n return undefined;\n}\n\n/** Icon Functional component displays an icon based on an [[IconSpec]].\n * @public\n * @deprecated in 4.16.0. Used to render a deprecated {@link IconSpec} type. Use {@link https://itwinui.bentley.com/ iTwinUI Icon} instead.\n */\nexport function Icon(props: IconProps) {\n if (!props.iconSpec) return null;\n\n const iconSpecValue = getIconSpecValue(props.iconSpec);\n if (typeof iconSpecValue === \"string\") {\n const iconString = iconSpecValue;\n const webComponentString = getWebComponentSource(iconString);\n\n if (\n iconString.startsWith(\"data:\") ||\n iconString.endsWith(\".svg\") ||\n webComponentString\n ) {\n const definitiveIconString = webComponentString\n ? webComponentString\n : iconString;\n const svgLoader = `<svg-loader src=\"${definitiveIconString}\"></svg-loader>`;\n const svgDiv = `<div>${svgLoader}</div>`;\n // the esm build of dompurify has a default import but the cjs build does not\n // if there is a default export, use it (likely esm), otherwise use the namespace\n const sanitizer = DOMPurify ?? DOMPurifyNS;\n\n const sanitizerConfig = {\n ALLOWED_TAGS: [\"svg-loader\"],\n ADD_URI_SAFE_ATTR: definitiveIconString.startsWith(\"data:\")\n ? [\"src\"]\n : [],\n };\n\n const sanitizedIconString = sanitizer.sanitize(svgDiv, sanitizerConfig);\n const webComponentNode = (\n // we can safely disable jam3/no-sanitizer-with-danger as we are sanitizing above\n // eslint-disable-next-line jam3/no-sanitizer-with-danger\n <div dangerouslySetInnerHTML={{ __html: sanitizedIconString }}></div>\n );\n return (\n <i className={classnames(\"icon\", \"core-svg-icon\", props.className)}>\n {webComponentNode}\n </i>\n );\n }\n\n // CSS icon\n return (\n <i\n className={classnames(\"icon\", iconString, props.className)}\n style={props.style}\n />\n );\n }\n\n // ReactNode icon\n return (\n <i\n className={classnames(\"icon\", \"core-svg-icon\", props.className)}\n style={props.style}\n >\n {iconSpecValue}\n </i>\n );\n}\n\nfunction getIconSpecValue(\n iconSpec: IconSpec\n): Exclude<IconSpec, ConditionalIconItem | ConditionalStringValue> {\n let value = iconSpec;\n while (true) {\n if (value instanceof ConditionalIconItem) {\n value = ConditionalIconItem.getValue(value);\n continue;\n }\n if (value instanceof ConditionalStringValue) {\n value = ConditionalStringValue.getValue(value);\n break;\n }\n break;\n }\n return value;\n}\n"]}
@@ -38,7 +38,6 @@ export declare class ImageCheckBox extends React.PureComponent<ImageCheckBoxProp
38
38
  private _onChange;
39
39
  private _onInputClick;
40
40
  private _onLabelClick;
41
- /** @internal */
42
41
  render(): React.JSX.Element;
43
42
  }
44
43
  //# sourceMappingURL=ImageCheckBox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ImageCheckBox.d.ts","sourceRoot":"","sources":["../../../../src/core-react/imagecheckbox/ImageCheckBox.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;GAGG;AAEH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,oCAAoC;IACpC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAClC,gDAAgD;IAChD,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACnC,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,GAAG,CAAC;IACpC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACjC,sEAAsE;IACtE,OAAO,CAAC,E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AAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,qBAAa,aAAc,SAAQ,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC;IACxE,OAAO,CAAC,SAAS,CAMf;IAEF,OAAO,CAAC,aAAa,CAEnB;IAEF,OAAO,CAAC,aAAa,CAEnB;IAEc,MAAM;CAqCvB"}
@@ -13,7 +13,6 @@ import { Icon } from "../icons/IconComponent";
13
13
  * @public
14
14
  * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/checkbox iTwinUI checkbox} instead (custom icons are not supported at the moment, but feel free to submit your use cases).
15
15
  */
16
- // eslint-disable-next-line deprecation/deprecation
17
16
  export class ImageCheckBox extends React.PureComponent {
18
17
  constructor() {
19
18
  super(...arguments);
@@ -33,7 +32,6 @@ export class ImageCheckBox extends React.PureComponent {
33
32
  e.stopPropagation();
34
33
  };
35
34
  }
36
- /** @internal */
37
35
  render() {
38
36
  const checkBoxClass = classnames("core-image-checkbox", this.props.className);
39
37
  const imageClass = classnames("image", this.props.border && "image-checkbox-border");
@@ -1 +1 @@
1
- {"version":3,"file":"ImageCheckBox.js","sourceRoot":"","sources":["../../../../src/core-react/imagecheckbox/ImageCheckBox.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AA+B9C;;;GAGG;AACH,mDAAmD;AACnD,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,aAAiC;IAA1E;;QACU,cAAS,GAAG,CAAC,CAAsC,EAAE,EAAE;YAC7D,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe;gBAAE,CAAC,CAAC,eAAe,EAAE,CAAC;YAEhD,IAAI,IAAI,CAAC,KAAK,C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AQ,EAC7B,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GACxB;YACF,8BAAM,SAAS,EAAE,UAAU;gBACzB,oBAAC,IAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACvB,CACD,CACT,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Checkbox\n */\n\nimport \"./ImageCheckBox.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Icon } from \"../icons/IconComponent\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/** Properties for the [[ImageCheckBox]] component\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link ImageCheckBox}.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface ImageCheckBoxProps extends CommonProps {\n /** Image for the \"checked\" state */\n imageOn: string | React.ReactNode;\n /** Image for the \"unchecked\" (default) state */\n imageOff: string | React.ReactNode;\n /** Determine if the item is checked or not */\n checked?: boolean;\n /** Determine if the item is disabled or not */\n disabled?: boolean;\n /** Function called when item is clicked. */\n onClick?: (checked: boolean) => any;\n /** Custom CSS class name for the checkbox input element */\n inputClassName?: string;\n /** Custom CSS Style for the checkbox input element */\n inputStyle?: React.CSSProperties;\n /** Tooltip to be displayed when mouse is hovered over the checkbox */\n tooltip?: string;\n /** If true, draw a border around the image checkbox */\n border?: boolean;\n /** Provides ability to return reference to HTMLInputElement */\n inputRef?: React.Ref<HTMLInputElement>;\n}\n\n/** ImageCheckBox React component shows a checked or unchecked image\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/checkbox iTwinUI checkbox} instead (custom icons are not supported at the moment, but feel free to submit your use cases).\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ImageCheckBox extends React.PureComponent<ImageCheckBoxProps> {\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (e && e.stopPropagation) e.stopPropagation();\n\n if (this.props.onClick) {\n this.props.onClick(e.target.checked);\n }\n };\n\n private _onInputClick = (e: React.MouseEvent<HTMLInputElement>) => {\n if (e && e.stopPropagation) e.stopPropagation();\n };\n\n private _onLabelClick = (e: React.MouseEvent<HTMLLabelElement>) => {\n if (e && e.stopPropagation) e.stopPropagation();\n };\n\n /** @internal */\n public override render() {\n const checkBoxClass = classnames(\n \"core-image-checkbox\",\n this.props.className\n );\n const imageClass = classnames(\n \"image\",\n this.props.border && \"image-checkbox-border\"\n );\n const iconSpec = this.props.checked\n ? this.props.imageOn\n : this.props.imageOff;\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/label-has-associated-control, jsx-a11y/no-noninteractive-element-interactions\n <label\n className={checkBoxClass}\n style={this.props.style}\n onClick={this._onLabelClick}\n title={this.props.tooltip}\n >\n <input\n type=\"checkbox\"\n className={this.props.inputClassName}\n style={this.props.inputStyle}\n checked={this.props.checked}\n disabled={this.props.disabled}\n onChange={this._onChange}\n onClick={this._onInputClick}\n ref={this.props.inputRef}\n />\n <span className={imageClass}>\n <Icon iconSpec={iconSpec} />\n </span>\n </label>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ImageCheckBox.js","sourceRoot":"","sources":["../../../../src/core-react/imagecheckbox/ImageCheckBox.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAgC9C;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,aAAiC;IAA1E;;QACU,cAAS,GAAG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IAAI,CAAC,KAAK,CAAC,UAAU,EAC5B,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GACxB;YACF,8BAAM,SAAS,EAAE,UAAU;gBACzB,oBAAC,IAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACvB,CACD,CACT,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Checkbox\n */\n\nimport \"./ImageCheckBox.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Icon } from \"../icons/IconComponent\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Properties for the [[ImageCheckBox]] component\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link ImageCheckBox}.\n */\nexport interface ImageCheckBoxProps extends CommonProps {\n /** Image for the \"checked\" state */\n imageOn: string | React.ReactNode;\n /** Image for the \"unchecked\" (default) state */\n imageOff: string | React.ReactNode;\n /** Determine if the item is checked or not */\n checked?: boolean;\n /** Determine if the item is disabled or not */\n disabled?: boolean;\n /** Function called when item is clicked. */\n onClick?: (checked: boolean) => any;\n /** Custom CSS class name for the checkbox input element */\n inputClassName?: string;\n /** Custom CSS Style for the checkbox input element */\n inputStyle?: React.CSSProperties;\n /** Tooltip to be displayed when mouse is hovered over the checkbox */\n tooltip?: string;\n /** If true, draw a border around the image checkbox */\n border?: boolean;\n /** Provides ability to return reference to HTMLInputElement */\n inputRef?: React.Ref<HTMLInputElement>;\n}\n\n/** ImageCheckBox React component shows a checked or unchecked image\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/checkbox iTwinUI checkbox} instead (custom icons are not supported at the moment, but feel free to submit your use cases).\n */\nexport class ImageCheckBox extends React.PureComponent<ImageCheckBoxProps> {\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (e && e.stopPropagation) e.stopPropagation();\n\n if (this.props.onClick) {\n this.props.onClick(e.target.checked);\n }\n };\n\n private _onInputClick = (e: React.MouseEvent<HTMLInputElement>) => {\n if (e && e.stopPropagation) e.stopPropagation();\n };\n\n private _onLabelClick = (e: React.MouseEvent<HTMLLabelElement>) => {\n if (e && e.stopPropagation) e.stopPropagation();\n };\n\n public override render() {\n const checkBoxClass = classnames(\n \"core-image-checkbox\",\n this.props.className\n );\n const imageClass = classnames(\n \"image\",\n this.props.border && \"image-checkbox-border\"\n );\n const iconSpec = this.props.checked\n ? this.props.imageOn\n : this.props.imageOff;\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/label-has-associated-control, jsx-a11y/no-noninteractive-element-interactions\n <label\n className={checkBoxClass}\n style={this.props.style}\n onClick={this._onLabelClick}\n title={this.props.tooltip}\n >\n <input\n type=\"checkbox\"\n className={this.props.inputClassName}\n style={this.props.inputStyle}\n checked={this.props.checked}\n disabled={this.props.disabled}\n onChange={this._onChange}\n onClick={this._onInputClick}\n ref={this.props.inputRef}\n />\n <span className={imageClass}>\n <Icon iconSpec={iconSpec} />\n </span>\n </label>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"InputLabel.d.ts","sourceRoot":"","sources":["../../../../src/core-react/inputs/InputLabel.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAQH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AAEjC;;;GAGG;AACH,MAAM,WAAW,eAEf,SAAQ,qBAAqB,EAE3B,sBAAsB,EAEtB,WAAW;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAWD;;;GAGG;AAEH,qBAAa,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC;IAClD,MAAM,IAAI,KAAK,CAAC,YAAY;CAiD7C"}
1
+ {"version":3,"file":"InputLabel.d.ts","sourceRoot":"","sources":["../../../../src/core-react/inputs/InputLabel.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAQH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AAIjC;;;GAGG;AACH,MAAM,WAAW,eACf,SAAQ,qBAAqB,EAC3B,sBAAsB,EACtB,WAAW;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAQD;;;GAGG;AACH,qBAAa,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC;IAClD,MAAM,IAAI,KAAK,CAAC,YAAY;CAgD7C"}
@@ -11,26 +11,19 @@ import * as React from "react";
11
11
  import { Icon } from "../icons/IconComponent";
12
12
  import { InputStatus } from "./InputStatus";
13
13
  const inputLabelIconSpec = {
14
- // eslint-disable-next-line deprecation/deprecation
15
14
  [InputStatus.Error]: React.createElement(SvgStatusError, null),
16
- // eslint-disable-next-line deprecation/deprecation
17
15
  [InputStatus.Success]: React.createElement(SvgStatusSuccess, null),
18
- // eslint-disable-next-line deprecation/deprecation
19
16
  [InputStatus.Warning]: React.createElement(SvgStatusWarning, null),
20
17
  };
21
18
  /** Text input wrapper that provides additional styling and labeling
22
19
  * @public
23
20
  * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/input iTwinUI input} instead.
24
21
  */
25
- // eslint-disable-next-line deprecation/deprecation
26
22
  export class InputLabel extends React.PureComponent {
27
23
  render() {
28
24
  const { label, status, className, style, labelClassName, labelStyle, message, messageClassName, messageStyle, } = this.props;
29
25
  return (React.createElement("label", { style: style, className: classnames("uicore-inputs-labeled-input", this.props.disabled && "uicore-disabled", status, className) },
30
- label && (React.createElement("div", { className: classnames("uicore-label", labelClassName), style: labelStyle },
31
- " ",
32
- label,
33
- " ")),
26
+ label && (React.createElement("div", { className: classnames("uicore-label", labelClassName), style: labelStyle }, label)),
34
27
  React.createElement("div", { className: classnames("input", { "with-icon": !!status }) },
35
28
  this.props.children,
36
29
  status && (React.createElement(Icon, { className: "icon", iconSpec: inputLabelIconSpec[`{status}`] }))),
@@ -1 +1 @@
1
- {"version":3,"file":"InputLabel.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/InputLabel.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAsB5C,MAAM,kBAAkB,GAAgC;IACtD,mDAAmD;IACnD,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,oBAAC,cAAc,OAAG;IACvC,mDAAmD;IACnD,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAC,gBAAgB,OAAG;IAC3C,mDAAmD;IACnD,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAC,gBAAgB,OAAG;CAC5C,CAAC;AAEF;;;GAGG;AACH,mDAAmD;AACnD,MAAM,OAAO,UAAW,SAAQ,KAAK,CAAC,aAA8B;IAClD,MAAM;QACpB,MAAM,EACJ,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,cAAc,EACd,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,YAAY,GACb,GAAG,IAAI,CAAC,KAAK,CAAC;QAEf,OAAO,CACL,+BACE,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,UAAU,CACnB,6BAA6B,EAC7B,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACxC,MAAM,EACN,SAAS,CACV;YAEA,KAAK,IAAI,CACR,6BACE,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,EACrD,KAAK,EAAE,UAAU;gBAEhB,GAAG;gBACH,KAAK;gBAAE,GAAG,CACP,CACP;YACD,6BAAK,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;gBAC3D,IAAI,CAAC,KAAK,CAAC,QAAQ;gBACnB,MAAM,IAAI,CACT,oBAAC,IAAI,IAAC,SAAS,EAAC,MAAM,EAAC,QAAQ,EAAE,kBAAkB,CAAC,UAAU,CAAC,GAAI,CACpE,CACG;YACL,OAAO,IAAI,CACV,6BACE,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EACzD,KAAK,EAAE,YAAY,IAElB,OAAO,CACJ,CACP,CACK,CACT,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Inputs\n */\n\nimport {\n SvgStatusError,\n SvgStatusSuccess,\n SvgStatusWarning,\n} from \"@itwin/itwinui-icons-react\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { InputStatus } from \"./InputStatus\";\nimport type {\n LabeledComponentProps,\n MessagedComponentProps,\n} from \"./LabeledComponentProps\";\n\n/** Properties for [[InputLabel]] components\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link InputLabel}.\n */\nexport interface InputLabelProps\n // eslint-disable-next-line deprecation/deprecation\n extends LabeledComponentProps,\n // eslint-disable-next-line deprecation/deprecation\n MessagedComponentProps,\n // eslint-disable-next-line deprecation/deprecation\n CommonProps {\n disabled?: boolean;\n /** Labeled content */\n children?: React.ReactNode;\n}\n\nconst inputLabelIconSpec: { [key: string]: IconSpec } = {\n // eslint-disable-next-line deprecation/deprecation\n [InputStatus.Error]: <SvgStatusError />,\n // eslint-disable-next-line deprecation/deprecation\n [InputStatus.Success]: <SvgStatusSuccess />,\n // eslint-disable-next-line deprecation/deprecation\n [InputStatus.Warning]: <SvgStatusWarning />,\n};\n\n/** Text input wrapper that provides additional styling and labeling\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/input iTwinUI input} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class InputLabel extends React.PureComponent<InputLabelProps> {\n public override render(): React.ReactElement {\n const {\n label,\n status,\n className,\n style,\n labelClassName,\n labelStyle,\n message,\n messageClassName,\n messageStyle,\n } = this.props;\n\n return (\n <label\n style={style}\n className={classnames(\n \"uicore-inputs-labeled-input\",\n this.props.disabled && \"uicore-disabled\",\n status,\n className\n )}\n >\n {label && (\n <div\n className={classnames(\"uicore-label\", labelClassName)}\n style={labelStyle}\n >\n {\" \"}\n {label}{\" \"}\n </div>\n )}\n <div className={classnames(\"input\", { \"with-icon\": !!status })}>\n {this.props.children}\n {status && (\n <Icon className=\"icon\" iconSpec={inputLabelIconSpec[`{status}`]} />\n )}\n </div>\n {message && (\n <div\n className={classnames(\"uicore-message\", messageClassName)}\n style={messageStyle}\n >\n {message}\n </div>\n )}\n </label>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"InputLabel.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/InputLabel.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAqB5C,MAAM,kBAAkB,GAAgC;IACtD,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,oBAAC,cAAc,OAAG;IACvC,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAC,gBAAgB,OAAG;IAC3C,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAC,gBAAgB,OAAG;CAC5C,CAAC;AAEF;;;GAGG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK,CAAC,aAA8B;IAClD,MAAM;QACpB,MAAM,EACJ,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,cAAc,EACd,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,YAAY,GACb,GAAG,IAAI,CAAC,KAAK,CAAC;QAEf,OAAO,CACL,+BACE,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,UAAU,CACnB,6BAA6B,EAC7B,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACxC,MAAM,EACN,SAAS,CACV;YAEA,KAAK,IAAI,CACR,6BACE,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,EACrD,KAAK,EAAE,UAAU,IAEhB,KAAK,CACF,CACP;YACD,6BAAK,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;gBAC3D,IAAI,CAAC,KAAK,CAAC,QAAQ;gBACnB,MAAM,IAAI,CACT,oBAAC,IAAI,IAAC,SAAS,EAAC,MAAM,EAAC,QAAQ,EAAE,kBAAkB,CAAC,UAAU,CAAC,GAAI,CACpE,CACG;YACL,OAAO,IAAI,CACV,6BACE,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EACzD,KAAK,EAAE,YAAY,IAElB,OAAO,CACJ,CACP,CACK,CACT,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Inputs\n */\n\nimport {\n SvgStatusError,\n SvgStatusSuccess,\n SvgStatusWarning,\n} from \"@itwin/itwinui-icons-react\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { InputStatus } from \"./InputStatus\";\nimport type {\n LabeledComponentProps,\n MessagedComponentProps,\n} from \"./LabeledComponentProps\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Properties for [[InputLabel]] components\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link InputLabel}.\n */\nexport interface InputLabelProps\n extends LabeledComponentProps,\n MessagedComponentProps,\n CommonProps {\n disabled?: boolean;\n /** Labeled content */\n children?: React.ReactNode;\n}\n\nconst inputLabelIconSpec: { [key: string]: IconSpec } = {\n [InputStatus.Error]: <SvgStatusError />,\n [InputStatus.Success]: <SvgStatusSuccess />,\n [InputStatus.Warning]: <SvgStatusWarning />,\n};\n\n/** Text input wrapper that provides additional styling and labeling\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/input iTwinUI input} instead.\n */\nexport class InputLabel extends React.PureComponent<InputLabelProps> {\n public override render(): React.ReactElement {\n const {\n label,\n status,\n className,\n style,\n labelClassName,\n labelStyle,\n message,\n messageClassName,\n messageStyle,\n } = this.props;\n\n return (\n <label\n style={style}\n className={classnames(\n \"uicore-inputs-labeled-input\",\n this.props.disabled && \"uicore-disabled\",\n status,\n className\n )}\n >\n {label && (\n <div\n className={classnames(\"uicore-label\", labelClassName)}\n style={labelStyle}\n >\n {label}\n </div>\n )}\n <div className={classnames(\"input\", { \"with-icon\": !!status })}>\n {this.props.children}\n {status && (\n <Icon className=\"icon\" iconSpec={inputLabelIconSpec[`{status}`]} />\n )}\n </div>\n {message && (\n <div\n className={classnames(\"uicore-message\", messageClassName)}\n style={messageStyle}\n >\n {message}\n </div>\n )}\n </label>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/inputs/numberinput/NumberInput.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAS7C,KAAK,UAAU,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,KAAK,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC;AAEhD;;;GAGG;AACH,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,UAAU,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,CAAC;IAC7D,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yCAAyC;IACzC,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACr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AW,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,CAAC,SACtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInput.js","sourceRoot":"","sources":["../../../../../src/core-react/inputs/numberinput/NumberInput.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,eAAe,GAChB,MAAM,4BAA4B,CAAC;AAoDpC,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAI5C,SAAS,qBAAqB,CAAC,KAAK,EAAE,GAAG;IACzC,MAAM,EACJ,kBAAkB,EAClB,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,EACH,SAAS,EACT,MAAM,EACN,KAAK,EACL,QAAQ,EACR,MAAM,EACN,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,GAAG,UAAU,EACd,GAAG,KAAK,CAAC;IACV,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAE5C;;;;;;OAMG;IACH,MAAM,aAAa,GAAG,KAAK,CAAC,WAAW,CACrC,CAAC,CAAS,EAAE,EAAE;QACZ,IAAI,CAA4B,CAAC;QAEjC,IAAI,KAAK;YAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,SAAS,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;YAClC,CAAC,GAAG,UAAU,CAAC,CAAC,CA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AAG,CAAC;IACxE,MAAM,SAAS,GAAG,gBAAgB,CAAC,CAAC,CAAC,oBAAC,YAAY,OAAG,CAAC,CAAC,CAAC,oBAAC,iBAAiB,OAAG,CAAC;IAE9E,OAAO,CACL,6BAAK,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc;QACrD,oBAAC,KAAK,IACJ,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,UAAU,EAClB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC,KAC1C,UAAU,GACd;QACF,6BACE,SAAS,EAAE,UAAU,CACnB,qCAAqC,EACrC,gBAAgB,IAAI,+BAA+B,CACpD;YAGD,6BACE,SAAS,EAAC,sDAAsD,EAChE,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAE,aAAa,EACtB,IAAI,EAAC,cAAc;gBAEnB,oBAAC,IAAI,IAAC,QAAQ,EAAE,OAAO,GAAI,CACvB;YAEN,6BACE,SAAS,EAAC,wDAAwD,EAClE,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAE,eAAe,EACxB,IAAI,EAAC,cAAc;gBAEnB,oBAAC,IAAI,IAAC,QAAQ,EAAE,SAAS,GAAI,CACzB,CACF,CACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAGD,qBAAqB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Inputs\n */\n\nimport \"./NumberInput.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Key } from \"ts-key-enum\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport { Icon } from \"../../icons/IconComponent\";\nimport {\n SvgCaretDown,\n SvgCaretDownSmall,\n SvgCaretUp,\n SvgCaretUpSmall,\n} from \"@itwin/itwinui-icons-react\";\n\ntype InputProps = React.ComponentPropsWithoutRef<typeof Input>;\n\n/** Step function prototype for [[NumberInput]] component\n * @public\n * @deprecated in 4.12.0. Interface used in a deprecated component {@link NumberInput}.\n */\nexport type StepFunctionProp =\n | number\n | ((direction: string) => number | undefined);\n\n/** Properties for the [[NumberInput]] component\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link NumberInput}.\n */\nexport interface NumberInputProps\n extends Omit<InputProps, \"min\" | \"max\" | \"step\" | \"onChange\"> {\n /** Numeric value, set to `undefined` to show placeholder text */\n value?: number;\n /** CSS class name for the NumberInput component container div */\n containerClassName?: string;\n /** Style for component container div. */\n containerStyle?: React.CSSProperties;\n /** number or function\tNumber.MIN_SAFE_INTEGER */\n min?: number;\n /** number or function\tdefaults to Number.MAX_SAFE_INTEGER */\n max?: number;\n /** increment step value used while incrementing or decrementing (up/down buttons or arrow keys) defaults to 1. */\n // eslint-disable-next-line deprecation/deprecation\n step?: StepFunctionProp;\n /** number of decimal places, defaults to 0 */\n precision?: number;\n /** function parseFloat */\n parse?: (value: string) => number | null | undefined;\n /** function optional formatting function that takes the number value and the internal formatted value in case function just adds prefix or suffix. */\n format?: (num: number | null | undefined, formattedValue: string) => string;\n /** Set to true to \"snap\" to the closest step value while incrementing or decrementing (up/down buttons or arrow keys). */\n snap?: boolean;\n /** Function to call when value is changed. */\n onChange?: (value: number | undefined, stringValue: string) => void;\n /** if true up/down buttons are shown larger and side by side */\n showTouchButtons?: boolean;\n /** Provides ability to return reference to HTMLInputElement */\n ref?: React.Ref<HTMLInputElement>;\n /**\n * Makes this component behave as controlled component.\n * @internal\n */\n isControlled?: boolean;\n}\n\nconst ForwardRefNumberInput = React.forwardRef<\n HTMLInputElement,\n // eslint-disable-next-line deprecation/deprecation\n NumberInputProps\n>(function ForwardRefNumberInput(props, ref) {\n const {\n containerClassName,\n className,\n value,\n min,\n max,\n precision,\n format,\n parse,\n onChange,\n onBlur,\n onKeyDown,\n step,\n snap,\n showTouchButtons,\n containerStyle,\n isControlled,\n ...otherProps\n } = props;\n const currentValueRef = React.useRef(value);\n\n /**\n * Used internally to parse the argument x to it's numeric representation.\n * If the argument cannot be converted to finite number returns 0; If a\n * \"precision\" prop is specified uses it round the number with that\n * precision (no fixed precision here because the return value is float, not\n * string).\n */\n const parseInternal = React.useCallback(\n (x: string) => {\n let n: number | undefined | null;\n\n if (parse) n = parse(x);\n if (undefined === n || null === n) {\n n = parseFloat(x);\n if (isNaN(n) || !isFinite(n)) {\n n = 0;\n }\n }\n\n const localPrecision = undefined === precision ? 10 : precision;\n const q = Math.pow(10, localPrecision);\n const localMin = undefined === min ? Number.MIN_SAFE_INTEGER : min;\n const localMax = undefined === max ? Number.MAX_SAFE_INTEGER : max;\n n = Math.min(Math.max(n, localMin), localMax);\n n = Math.round(n * q) / q;\n\n return n;\n },\n [parse, precision, min, max]\n );\n\n /**\n * This is used internally to format a number to its display representation.\n * It will invoke the format function if one is provided.\n */\n const formatInternal = React.useCallback(\n (num: number | undefined | null) => {\n const localPrecision =\n undefined === precision || null === precision ? 0 : precision;\n const str =\n undefined === num || null === num ? \"\" : num.toFixed(localPrecision);\n\n if (format) return format(num, str);\n\n return str;\n },\n [format, precision]\n );\n\n const [formattedValue, setFormattedValue] = React.useState(() =>\n formatInternal(value)\n );\n\n // See if new initialValue props have changed since component mounted\n React.useEffect(() => {\n currentValueRef.current = value;\n const currentFormattedValue = formatInternal(currentValueRef.current);\n setFormattedValue(currentFormattedValue);\n }, [formatInternal, value]);\n\n const handleChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const newVal = event.currentTarget.value;\n setFormattedValue(newVal);\n isControlled && onChange && onChange(parseInternal(newVal), newVal);\n },\n [isControlled, onChange, parseInternal]\n );\n\n const updateValue = React.useCallback(\n (newVal: number) => {\n const newFormattedVal = formatInternal(newVal);\n onChange && onChange(newVal, newFormattedVal);\n setFormattedValue(newFormattedVal);\n },\n [onChange, formatInternal]\n );\n\n const updateValueFromString = React.useCallback(\n (strValue: string) => {\n const newVal = parseInternal(strValue);\n updateValue(newVal);\n },\n [parseInternal, updateValue]\n );\n\n const handleBlur = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n const newVal = parseInternal(event.target.value);\n onBlur && onBlur(event);\n updateValue(newVal);\n },\n [parseInternal, updateValue, onBlur]\n );\n\n const getIncrementValue = React.useCallback(\n (increment: boolean) => {\n if (typeof step === \"function\") {\n const stepVal = step(increment ? \"up\" : \"down\");\n return stepVal ? stepVal : 1;\n }\n\n return !step ? 1 : step;\n },\n [step]\n );\n\n /**\n * The internal method that actually sets the new value on the input\n */\n const applyStep = React.useCallback(\n (increment: boolean) => {\n const incrementValue = getIncrementValue(increment);\n\n let num =\n parseInternal(formattedValue) +\n (increment ? incrementValue : -incrementValue);\n if (snap) {\n num = Math.round(num / incrementValue) * incrementValue;\n }\n\n const localMin = undefined === min ? Number.MIN_SAFE_INTEGER : min;\n const localMax = undefined === max ? Number.MAX_SAFE_INTEGER : max;\n num = Math.min(Math.max(num, localMin), localMax);\n\n updateValue(num);\n },\n [\n formattedValue,\n getIncrementValue,\n max,\n min,\n parseInternal,\n snap,\n updateValue,\n ]\n );\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key === Key.Enter.valueOf()) {\n updateValueFromString(event.currentTarget.value);\n event.preventDefault();\n event.stopPropagation();\n } else if (event.key === Key.Escape.valueOf()) {\n setFormattedValue(formatInternal(currentValueRef.current));\n event.preventDefault();\n } else if (event.key === Key.ArrowDown.valueOf()) {\n applyStep(false);\n event.preventDefault();\n event.stopPropagation();\n } else if (event.key === Key.ArrowUp.valueOf()) {\n applyStep(true);\n event.preventDefault();\n event.stopPropagation();\n }\n onKeyDown && onKeyDown(event);\n },\n [applyStep, formatInternal, updateValueFromString, onKeyDown]\n );\n\n const handleDownClick = React.useCallback(\n (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n applyStep(false);\n event.preventDefault();\n },\n [applyStep]\n );\n\n const handleUpClick = React.useCallback(\n (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n applyStep(true);\n event.preventDefault();\n },\n [applyStep]\n );\n\n const handleFocus = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n event.currentTarget.select();\n },\n []\n );\n\n const isDisabled = !!otherProps.disabled;\n const containerClasses = classnames(\n \"core-number-input-container\",\n containerClassName,\n showTouchButtons && \"core-number-buttons-for-touch\",\n isDisabled && \"core-number-input-disabled\"\n );\n\n const caretUp = showTouchButtons ? <SvgCaretUp /> : <SvgCaretUpSmall />;\n const caretDown = showTouchButtons ? <SvgCaretDown /> : <SvgCaretDownSmall />;\n\n return (\n <div className={containerClasses} style={containerStyle}>\n <Input\n ref={ref}\n value={formattedValue}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n onBlur={handleBlur}\n size=\"small\"\n className={classnames(\"core-input\", className)}\n {...otherProps}\n />\n <div\n className={classnames(\n \"core-number-input-buttons-container\",\n showTouchButtons && \"core-number-buttons-for-touch\"\n )}\n >\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div\n className=\"core-number-input-button core-number-input-button-up\"\n tabIndex={-1}\n onClick={handleUpClick}\n role=\"presentation\"\n >\n <Icon iconSpec={caretUp} />\n </div>\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div\n className=\"core-number-input-button core-number-input-button-down\"\n tabIndex={-1}\n onClick={handleDownClick}\n role=\"presentation\"\n >\n <Icon iconSpec={caretDown} />\n </div>\n </div>\n </div>\n );\n});\n\n/** Input component for numbers with up and down buttons to increment and decrement the value.\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/input iTwinUI input} instead.\n */\nexport const NumberInput: (\n // eslint-disable-next-line deprecation/deprecation\n props: NumberInputProps\n) => React.ReactNode = ForwardRefNumberInput;\n"]}
1
+ {"version":3,"file":"NumberInput.js","sourceRoot":"","sources":["../../../../../src/core-react/inputs/numberinput/NumberInput.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,eAAe,GAChB,MAAM,4BAA4B,CAAC;AAqDpC,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAG5C,SAAS,qBAAqB,CAAC,KAAK,EAAE,GAAG;IACzC,MAAM,EACJ,kBAAkB,EAClB,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,EACH,SAAS,EACT,MAAM,EACN,KAAK,EACL,QAAQ,EACR,MAAM,EACN,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,GAAG,UAAU,EACd,GAAG,KAAK,CAAC;IACV,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAE5C;;;;;;OAMG;IACH,MAAM,aAAa,GAAG,KAAK,CAAC,WAAW,CACrC,CAAC,CAAS,EAAE,EAAE;QACZ,IAAI,CAA4B,CAAC;QAEjC,IAAI,KAAK;YAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,SAAS,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,EAAE,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UAAU,OAAG,CAAC,CAAC,CAAC,oBAAC,eAAe,OAAG,CAAC;IACxE,MAAM,SAAS,GAAG,gBAAgB,CAAC,CAAC,CAAC,oBAAC,YAAY,OAAG,CAAC,CAAC,CAAC,oBAAC,iBAAiB,OAAG,CAAC;IAE9E,OAAO,CACL,6BAAK,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc;QACrD,oBAAC,KAAK,IACJ,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,UAAU,EAClB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC,KAC1C,UAAU,GACd;QACF,6BACE,SAAS,EAAE,UAAU,CACnB,qCAAqC,EACrC,gBAAgB,IAAI,+BAA+B,CACpD;YAGD,6BACE,SAAS,EAAC,sDAAsD,EAChE,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAE,aAAa,EACtB,IAAI,EAAC,cAAc;gBAEnB,oBAAC,IAAI,IAAC,QAAQ,EAAE,OAAO,GAAI,CACvB;YAEN,6BACE,SAAS,EAAC,wDAAwD,EAClE,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAE,eAAe,EACxB,IAAI,EAAC,cAAc;gBAEnB,oBAAC,IAAI,IAAC,QAAQ,EAAE,SAAS,GAAI,CACzB,CACF,CACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GACtB,qBAAqB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Inputs\n */\n\nimport \"./NumberInput.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Key } from \"ts-key-enum\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport { Icon } from \"../../icons/IconComponent\";\nimport {\n SvgCaretDown,\n SvgCaretDownSmall,\n SvgCaretUp,\n SvgCaretUpSmall,\n} from \"@itwin/itwinui-icons-react\";\n\n/* eslint-disable deprecation/deprecation */\n\ntype InputProps = React.ComponentPropsWithoutRef<typeof Input>;\n\n/** Step function prototype for [[NumberInput]] component\n * @public\n * @deprecated in 4.12.0. Interface used in a deprecated component {@link NumberInput}.\n */\nexport type StepFunctionProp =\n | number\n | ((direction: string) => number | undefined);\n\n/** Properties for the [[NumberInput]] component\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link NumberInput}.\n */\nexport interface NumberInputProps\n extends Omit<InputProps, \"min\" | \"max\" | \"step\" | \"onChange\"> {\n /** Numeric value, set to `undefined` to show placeholder text */\n value?: number;\n /** CSS class name for the NumberInput component container div */\n containerClassName?: string;\n /** Style for component container div. */\n containerStyle?: React.CSSProperties;\n /** number or function\tNumber.MIN_SAFE_INTEGER */\n min?: number;\n /** number or function\tdefaults to Number.MAX_SAFE_INTEGER */\n max?: number;\n /** increment step value used while incrementing or decrementing (up/down buttons or arrow keys) defaults to 1. */\n step?: StepFunctionProp;\n /** number of decimal places, defaults to 0 */\n precision?: number;\n /** function parseFloat */\n parse?: (value: string) => number | null | undefined;\n /** function optional formatting function that takes the number value and the internal formatted value in case function just adds prefix or suffix. */\n format?: (num: number | null | undefined, formattedValue: string) => string;\n /** Set to true to \"snap\" to the closest step value while incrementing or decrementing (up/down buttons or arrow keys). */\n snap?: boolean;\n /** Function to call when value is changed. */\n onChange?: (value: number | undefined, stringValue: string) => void;\n /** if true up/down buttons are shown larger and side by side */\n showTouchButtons?: boolean;\n /** Provides ability to return reference to HTMLInputElement */\n ref?: React.Ref<HTMLInputElement>;\n /**\n * Makes this component behave as controlled component.\n * @internal\n */\n isControlled?: boolean;\n}\n\nconst ForwardRefNumberInput = React.forwardRef<\n HTMLInputElement,\n NumberInputProps\n>(function ForwardRefNumberInput(props, ref) {\n const {\n containerClassName,\n className,\n value,\n min,\n max,\n precision,\n format,\n parse,\n onChange,\n onBlur,\n onKeyDown,\n step,\n snap,\n showTouchButtons,\n containerStyle,\n isControlled,\n ...otherProps\n } = props;\n const currentValueRef = React.useRef(value);\n\n /**\n * Used internally to parse the argument x to it's numeric representation.\n * If the argument cannot be converted to finite number returns 0; If a\n * \"precision\" prop is specified uses it round the number with that\n * precision (no fixed precision here because the return value is float, not\n * string).\n */\n const parseInternal = React.useCallback(\n (x: string) => {\n let n: number | undefined | null;\n\n if (parse) n = parse(x);\n if (undefined === n || null === n) {\n n = parseFloat(x);\n if (isNaN(n) || !isFinite(n)) {\n n = 0;\n }\n }\n\n const localPrecision = undefined === precision ? 10 : precision;\n const q = Math.pow(10, localPrecision);\n const localMin = undefined === min ? Number.MIN_SAFE_INTEGER : min;\n const localMax = undefined === max ? Number.MAX_SAFE_INTEGER : max;\n n = Math.min(Math.max(n, localMin), localMax);\n n = Math.round(n * q) / q;\n\n return n;\n },\n [parse, precision, min, max]\n );\n\n /**\n * This is used internally to format a number to its display representation.\n * It will invoke the format function if one is provided.\n */\n const formatInternal = React.useCallback(\n (num: number | undefined | null) => {\n const localPrecision =\n undefined === precision || null === precision ? 0 : precision;\n const str =\n undefined === num || null === num ? \"\" : num.toFixed(localPrecision);\n\n if (format) return format(num, str);\n\n return str;\n },\n [format, precision]\n );\n\n const [formattedValue, setFormattedValue] = React.useState(() =>\n formatInternal(value)\n );\n\n // See if new initialValue props have changed since component mounted\n React.useEffect(() => {\n currentValueRef.current = value;\n const currentFormattedValue = formatInternal(currentValueRef.current);\n setFormattedValue(currentFormattedValue);\n }, [formatInternal, value]);\n\n const handleChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const newVal = event.currentTarget.value;\n setFormattedValue(newVal);\n isControlled && onChange && onChange(parseInternal(newVal), newVal);\n },\n [isControlled, onChange, parseInternal]\n );\n\n const updateValue = React.useCallback(\n (newVal: number) => {\n const newFormattedVal = formatInternal(newVal);\n onChange && onChange(newVal, newFormattedVal);\n setFormattedValue(newFormattedVal);\n },\n [onChange, formatInternal]\n );\n\n const updateValueFromString = React.useCallback(\n (strValue: string) => {\n const newVal = parseInternal(strValue);\n updateValue(newVal);\n },\n [parseInternal, updateValue]\n );\n\n const handleBlur = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n const newVal = parseInternal(event.target.value);\n onBlur && onBlur(event);\n updateValue(newVal);\n },\n [parseInternal, updateValue, onBlur]\n );\n\n const getIncrementValue = React.useCallback(\n (increment: boolean) => {\n if (typeof step === \"function\") {\n const stepVal = step(increment ? \"up\" : \"down\");\n return stepVal ? stepVal : 1;\n }\n\n return !step ? 1 : step;\n },\n [step]\n );\n\n /**\n * The internal method that actually sets the new value on the input\n */\n const applyStep = React.useCallback(\n (increment: boolean) => {\n const incrementValue = getIncrementValue(increment);\n\n let num =\n parseInternal(formattedValue) +\n (increment ? incrementValue : -incrementValue);\n if (snap) {\n num = Math.round(num / incrementValue) * incrementValue;\n }\n\n const localMin = undefined === min ? Number.MIN_SAFE_INTEGER : min;\n const localMax = undefined === max ? Number.MAX_SAFE_INTEGER : max;\n num = Math.min(Math.max(num, localMin), localMax);\n\n updateValue(num);\n },\n [\n formattedValue,\n getIncrementValue,\n max,\n min,\n parseInternal,\n snap,\n updateValue,\n ]\n );\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key === Key.Enter.valueOf()) {\n updateValueFromString(event.currentTarget.value);\n event.preventDefault();\n event.stopPropagation();\n } else if (event.key === Key.Escape.valueOf()) {\n setFormattedValue(formatInternal(currentValueRef.current));\n event.preventDefault();\n } else if (event.key === Key.ArrowDown.valueOf()) {\n applyStep(false);\n event.preventDefault();\n event.stopPropagation();\n } else if (event.key === Key.ArrowUp.valueOf()) {\n applyStep(true);\n event.preventDefault();\n event.stopPropagation();\n }\n onKeyDown && onKeyDown(event);\n },\n [applyStep, formatInternal, updateValueFromString, onKeyDown]\n );\n\n const handleDownClick = React.useCallback(\n (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n applyStep(false);\n event.preventDefault();\n },\n [applyStep]\n );\n\n const handleUpClick = React.useCallback(\n (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n applyStep(true);\n event.preventDefault();\n },\n [applyStep]\n );\n\n const handleFocus = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n event.currentTarget.select();\n },\n []\n );\n\n const isDisabled = !!otherProps.disabled;\n const containerClasses = classnames(\n \"core-number-input-container\",\n containerClassName,\n showTouchButtons && \"core-number-buttons-for-touch\",\n isDisabled && \"core-number-input-disabled\"\n );\n\n const caretUp = showTouchButtons ? <SvgCaretUp /> : <SvgCaretUpSmall />;\n const caretDown = showTouchButtons ? <SvgCaretDown /> : <SvgCaretDownSmall />;\n\n return (\n <div className={containerClasses} style={containerStyle}>\n <Input\n ref={ref}\n value={formattedValue}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n onBlur={handleBlur}\n size=\"small\"\n className={classnames(\"core-input\", className)}\n {...otherProps}\n />\n <div\n className={classnames(\n \"core-number-input-buttons-container\",\n showTouchButtons && \"core-number-buttons-for-touch\"\n )}\n >\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div\n className=\"core-number-input-button core-number-input-button-up\"\n tabIndex={-1}\n onClick={handleUpClick}\n role=\"presentation\"\n >\n <Icon iconSpec={caretUp} />\n </div>\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div\n className=\"core-number-input-button core-number-input-button-down\"\n tabIndex={-1}\n onClick={handleDownClick}\n role=\"presentation\"\n >\n <Icon iconSpec={caretDown} />\n </div>\n </div>\n </div>\n );\n});\n\n/** Input component for numbers with up and down buttons to increment and decrement the value.\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/input iTwinUI input} instead.\n */\nexport const NumberInput: (props: NumberInputProps) => React.ReactNode =\n ForwardRefNumberInput;\n"]}
@@ -10,6 +10,7 @@ interface LocalizationProviderProps {
10
10
  }
11
11
  /** Provides localization capability to the components.
12
12
  * @alpha
13
+ * @deprecated in 4.16.0. Use {@link @itwin/components-react#LocalizationProvider} instead.
13
14
  */
14
15
  export declare function LocalizationProvider(props: LocalizationProviderProps): React.JSX.Element;
15
16
  /** Returns localization context.
@@ -1 +1 @@
1
- {"version":3,"file":"LocalizationProvider.d.ts","sourceRoot":"","sources":["../../../../src/core-react/l10n/LocalizationProvider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3E,KAAK,YAAY,GAAG,IAAI,CACtB,gBAAgB,EAChB,oBAAoB,GAAG,mBAAmB,CAC3C,CAAC;AAMF,UAAU,yBAAyB;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,qBAOpE;AAED;;GAEG;AACH,wBAAgB,eAAe,6BAG9B"}
1
+ {"version":3,"file":"LocalizationProvider.d.ts","sourceRoot":"","sources":["../../../../src/core-react/l10n/LocalizationProvider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3E,KAAK,YAAY,GAAG,IAAI,CACtB,gBAAgB,EAChB,oBAAoB,GAAG,mBAAmB,CAC3C,CAAC;AAMF,UAAU,yBAAyB;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,qBAOpE;AAED;;GAEG;AACH,wBAAgB,eAAe,6BAG9B"}
@@ -9,6 +9,7 @@ import * as React from "react";
9
9
  const LocalizationContext = React.createContext(undefined);
10
10
  /** Provides localization capability to the components.
11
11
  * @alpha
12
+ * @deprecated in 4.16.0. Use {@link @itwin/components-react#LocalizationProvider} instead.
12
13
  */
13
14
  export function LocalizationProvider(props) {
14
15
  const { children, localization } = props;
@@ -1 +1 @@
1
- {"version":3,"file":"LocalizationProvider.js","sourceRoot":"","sources":["../../../../src/core-react/l10n/LocalizationProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,mBAAmB,GAAG,KAAK,CAAC,aAAa,CAC7C,SAAS,CACV,CAAC;AAOF;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IACnE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IACzC,OAAO,CACL,oBAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAC9C,QAAQ,CACoB,CAChC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAC3D,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\nimport * as React from \"react\";\nimport type { Localization as CoreLocalization } from \"@itwin/core-common\";\n\ntype Localization = Pick<\n CoreLocalization,\n \"getLocalizedString\" | \"registerNamespace\"\n>;\n\nconst LocalizationContext = React.createContext<Localization | undefined>(\n undefined\n);\n\ninterface LocalizationProviderProps {\n children?: React.ReactNode;\n localization: Localization;\n}\n\n/** Provides localization capability to the components.\n * @alpha\n */\nexport function LocalizationProvider(props: LocalizationProviderProps) {\n const { children, localization } = props;\n return (\n <LocalizationContext.Provider value={localization}>\n {children}\n </LocalizationContext.Provider>\n );\n}\n\n/** Returns localization context.\n * @internal\n */\nexport function useLocalization() {\n const localization = React.useContext(LocalizationContext);\n return localization;\n}\n"]}
1
+ {"version":3,"file":"LocalizationProvider.js","sourceRoot":"","sources":["../../../../src/core-react/l10n/LocalizationProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,mBAAmB,GAAG,KAAK,CAAC,aAAa,CAC7C,SAAS,CACV,CAAC;AAOF;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IACnE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IACzC,OAAO,CACL,oBAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAC9C,QAAQ,CACoB,CAChC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAC3D,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\nimport * as React from \"react\";\nimport type { Localization as CoreLocalization } from \"@itwin/core-common\";\n\ntype Localization = Pick<\n CoreLocalization,\n \"getLocalizedString\" | \"registerNamespace\"\n>;\n\nconst LocalizationContext = React.createContext<Localization | undefined>(\n undefined\n);\n\ninterface LocalizationProviderProps {\n children?: React.ReactNode;\n localization: Localization;\n}\n\n/** Provides localization capability to the components.\n * @alpha\n * @deprecated in 4.16.0. Use {@link @itwin/components-react#LocalizationProvider} instead.\n */\nexport function LocalizationProvider(props: LocalizationProviderProps) {\n const { children, localization } = props;\n return (\n <LocalizationContext.Provider value={localization}>\n {children}\n </LocalizationContext.Provider>\n );\n}\n\n/** Returns localization context.\n * @internal\n */\nexport function useLocalization() {\n const localization = React.useContext(LocalizationContext);\n return localization;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useTranslation.d.ts","sourceRoot":"","sources":["../../../../src/core-react/l10n/useTranslation.tsx"],"names":[],"mappings":"AASA;;GAEG;AACH,wBAAgB,cAAc;;EAc7B"}
1
+ {"version":3,"file":"useTranslation.d.ts","sourceRoot":"","sources":["../../../../src/core-react/l10n/useTranslation.tsx"],"names":[],"mappings":"AAWA;;GAEG;AACH,wBAAgB,cAAc;;EAa7B"}
@@ -6,6 +6,7 @@ import * as defaults from "../UiCore.json";
6
6
  import * as React from "react";
7
7
  import { UiCore } from "../UiCore";
8
8
  import { usePackageTranslation } from "./usePackageTranslation";
9
+ /* eslint-disable deprecation/deprecation */
9
10
  /** Returns a translation function to localize package components.
10
11
  * @internal
11
12
  */
@@ -14,7 +15,6 @@ export function useTranslation() {
14
15
  if (!UiCore.initialized) {
15
16
  return undefined;
16
17
  }
17
- // eslint-disable-next-line deprecation/deprecation
18
18
  return UiCore.translate(key);
19
19
  }, []);
20
20
  return usePackageTranslation({
@@ -1 +1 @@
1
- {"version":3,"file":"useTranslation.js","sourceRoot":"","sources":["../../../../src/core-react/l10n/useTranslation.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,GAAW,EAAE,EAAE;QACjD,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YACxB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,mDAAmD;QACnD,OAAO,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,qBAAqB,CAAC;QAC3B,SAAS,EAAE,MAAM,CAAC,qBAAqB;QACvC,QAAQ;QACR,QAAQ;KACT,CAAC,CAAC;AACL,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport * as defaults from \"../UiCore.json\";\nimport * as React from \"react\";\nimport { UiCore } from \"../UiCore\";\nimport { usePackageTranslation } from \"./usePackageTranslation\";\n\n/** Returns a translation function to localize package components.\n * @internal\n */\nexport function useTranslation() {\n const fallback = React.useCallback((key: string) => {\n if (!UiCore.initialized) {\n return undefined;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n return UiCore.translate(key);\n }, []);\n return usePackageTranslation({\n namespace: UiCore.localizationNamespace,\n fallback,\n defaults,\n });\n}\n"]}
1
+ {"version":3,"file":"useTranslation.js","sourceRoot":"","sources":["../../../../src/core-react/l10n/useTranslation.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,4CAA4C;AAE5C;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,GAAW,EAAE,EAAE;QACjD,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YACxB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,qBAAqB,CAAC;QAC3B,SAAS,EAAE,MAAM,CAAC,qBAAqB;QACvC,QAAQ;QACR,QAAQ;KACT,CAAC,CAAC;AACL,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport * as defaults from \"../UiCore.json\";\nimport * as React from \"react\";\nimport { UiCore } from \"../UiCore\";\nimport { usePackageTranslation } from \"./usePackageTranslation\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Returns a translation function to localize package components.\n * @internal\n */\nexport function useTranslation() {\n const fallback = React.useCallback((key: string) => {\n if (!UiCore.initialized) {\n return undefined;\n }\n\n return UiCore.translate(key);\n }, []);\n return usePackageTranslation({\n namespace: UiCore.localizationNamespace,\n fallback,\n defaults,\n });\n}\n"]}
@@ -1,13 +1,16 @@
1
+ /** @packageDocumentation
2
+ * @module Listbox
3
+ */
1
4
  import * as React from "react";
2
5
  import "./Listbox.scss";
3
6
  /** Ideas borrowed from https://reacttraining.com/reach-ui/listbox */
4
7
  /** `Listbox` value.
5
- * @alpha
8
+ * @public
6
9
  * @deprecated in 4.12.0. Value used in a deprecated component {@link Listbox}.
7
10
  */
8
11
  export type ListboxValue = string;
9
12
  /** `Listbox` Props.
10
- * @alpha
13
+ * @public
11
14
  * @deprecated in 4.12.0. Props of deprecated component {@link Listbox}.
12
15
  */
13
16
  export interface ListboxProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement> {
@@ -18,7 +21,7 @@ export interface ListboxProps extends React.DetailedHTMLProps<React.HTMLAttribut
18
21
  onListboxValueChange?: (newValue: ListboxValue, isControlOrCommandPressed?: boolean) => void;
19
22
  }
20
23
  /** `ListboxItem` Props.
21
- * @alpha
24
+ * @public
22
25
  * @deprecated in 4.12.0. Props of deprecated component {@link ListboxItem}.
23
26
  */
24
27
  export interface ListboxItemProps extends React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement> {
@@ -28,7 +31,7 @@ export interface ListboxItemProps extends React.DetailedHTMLProps<React.LiHTMLAt
28
31
  disabled?: boolean;
29
32
  }
30
33
  /** `Listbox` Context.
31
- * @alpha
34
+ * @public
32
35
  * @deprecated in 4.12.0. Props of deprecated context {@link ListboxContext}.
33
36
  */
34
37
  export interface ListboxContextProps {
@@ -39,17 +42,17 @@ export interface ListboxContextProps {
39
42
  listboxRef?: React.RefObject<HTMLUListElement>;
40
43
  }
41
44
  /** Context set up by listbox for use by `ListboxItems` .
42
- * @alpha
45
+ * @public
43
46
  * @deprecated in 4.12.0. Context of deprecated component {@link Listbox}.
44
47
  */
45
48
  export declare const ListboxContext: React.Context<ListboxContextProps>;
46
49
  /** Single select `Listbox` component
47
- * @alpha
50
+ * @public
48
51
  * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/list iTwinUI list} instead.
49
52
  */
50
53
  export declare function Listbox(props: ListboxProps): React.JSX.Element;
51
54
  /** `ListboxItem` component.
52
- * @alpha
55
+ * @public
53
56
  * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/list iTwinUI list} instead.
54
57
  */
55
58
  export declare function ListboxItem(props: ListboxItemProps): React.JSX.Element;
@@ -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;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