@itwin/core-react 3.6.0-dev.7 → 4.0.0-dev.1

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 (243) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/LICENSE.md +1 -1
  3. package/lib/cjs/core-react/button/Button.d.ts +4 -4
  4. package/lib/cjs/core-react/button/Button.js +3 -3
  5. package/lib/cjs/core-react/button/Button.js.map +1 -1
  6. package/lib/cjs/core-react/checkbox/Checkbox.d.ts +2 -2
  7. package/lib/cjs/core-react/checkbox/Checkbox.js +1 -1
  8. package/lib/cjs/core-react/checkbox/Checkbox.js.map +1 -1
  9. package/lib/cjs/core-react/dialog/DialogButtonDef.d.ts +3 -3
  10. package/lib/cjs/core-react/dialog/DialogButtonDef.js +2 -2
  11. package/lib/cjs/core-react/dialog/DialogButtonDef.js.map +1 -1
  12. package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts +2 -2
  13. package/lib/cjs/core-react/expandable/ExpandableBlock.js +1 -1
  14. package/lib/cjs/core-react/expandable/ExpandableBlock.js.map +1 -1
  15. package/lib/cjs/core-react/form/Field.d.ts +2 -2
  16. package/lib/cjs/core-react/form/Field.js +1 -1
  17. package/lib/cjs/core-react/form/Field.js.map +1 -1
  18. package/lib/cjs/core-react/form/Form.d.ts +5 -5
  19. package/lib/cjs/core-react/form/Form.js +1 -1
  20. package/lib/cjs/core-react/form/Form.js.map +1 -1
  21. package/lib/cjs/core-react/icons/SvgSprite.d.ts +2 -2
  22. package/lib/cjs/core-react/icons/SvgSprite.js +1 -1
  23. package/lib/cjs/core-react/icons/SvgSprite.js.map +1 -1
  24. package/lib/cjs/core-react/inputs/Input.d.ts +2 -2
  25. package/lib/cjs/core-react/inputs/Input.js +1 -1
  26. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  27. package/lib/cjs/core-react/inputs/LabeledInput.d.ts +2 -2
  28. package/lib/cjs/core-react/inputs/LabeledInput.js +1 -1
  29. package/lib/cjs/core-react/inputs/LabeledInput.js.map +1 -1
  30. package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts +2 -2
  31. package/lib/cjs/core-react/inputs/LabeledTextarea.js +1 -1
  32. package/lib/cjs/core-react/inputs/LabeledTextarea.js.map +1 -1
  33. package/lib/cjs/core-react/inputs/Textarea.d.ts +2 -2
  34. package/lib/cjs/core-react/inputs/Textarea.js +1 -1
  35. package/lib/cjs/core-react/inputs/Textarea.js.map +1 -1
  36. package/lib/cjs/core-react/loading/Spinner.d.ts +3 -3
  37. package/lib/cjs/core-react/loading/Spinner.js +2 -2
  38. package/lib/cjs/core-react/loading/Spinner.js.map +1 -1
  39. package/lib/cjs/core-react/messagebox/MessageSeverity.d.ts +1 -1
  40. package/lib/cjs/core-react/messagebox/MessageSeverity.js +1 -1
  41. package/lib/cjs/core-react/messagebox/MessageSeverity.js.map +1 -1
  42. package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts +2 -2
  43. package/lib/cjs/core-react/progress-indicators/ProgressBar.js +1 -1
  44. package/lib/cjs/core-react/progress-indicators/ProgressBar.js.map +1 -1
  45. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts +2 -2
  46. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.js +1 -1
  47. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.js.map +1 -1
  48. package/lib/cjs/core-react/radio/Radio.d.ts +2 -2
  49. package/lib/cjs/core-react/radio/Radio.js +1 -1
  50. package/lib/cjs/core-react/radio/Radio.js.map +1 -1
  51. package/lib/cjs/core-react/select/LabeledSelect.d.ts +2 -2
  52. package/lib/cjs/core-react/select/LabeledSelect.js +1 -1
  53. package/lib/cjs/core-react/select/LabeledSelect.js.map +1 -1
  54. package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts +2 -2
  55. package/lib/cjs/core-react/select/LabeledThemedSelect.js +1 -1
  56. package/lib/cjs/core-react/select/LabeledThemedSelect.js.map +1 -1
  57. package/lib/cjs/core-react/select/Select.d.ts +3 -3
  58. package/lib/cjs/core-react/select/Select.js +1 -1
  59. package/lib/cjs/core-react/select/Select.js.map +1 -1
  60. package/lib/cjs/core-react/select/ThemedSelect.d.ts +4 -4
  61. package/lib/cjs/core-react/select/ThemedSelect.js +1 -1
  62. package/lib/cjs/core-react/select/ThemedSelect.js.map +1 -1
  63. package/lib/cjs/core-react/slider/Slider.d.ts +1 -1
  64. package/lib/cjs/core-react/slider/Slider.js +1 -1
  65. package/lib/cjs/core-react/slider/Slider.js.map +1 -1
  66. package/lib/cjs/core-react/splitbutton/SplitButton.d.ts +2 -2
  67. package/lib/cjs/core-react/splitbutton/SplitButton.js +1 -1
  68. package/lib/cjs/core-react/splitbutton/SplitButton.js.map +1 -1
  69. package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts +1 -1
  70. package/lib/cjs/core-react/tabs/HorizontalTabs.js +1 -1
  71. package/lib/cjs/core-react/tabs/HorizontalTabs.js.map +1 -1
  72. package/lib/cjs/core-react/text/Headline.d.ts +1 -1
  73. package/lib/cjs/core-react/text/Headline.js +1 -1
  74. package/lib/cjs/core-react/text/Headline.js.map +1 -1
  75. package/lib/cjs/core-react/text/LeadingText.d.ts +1 -1
  76. package/lib/cjs/core-react/text/LeadingText.js +1 -1
  77. package/lib/cjs/core-react/text/LeadingText.js.map +1 -1
  78. package/lib/cjs/core-react/text/LeadingText2.d.ts +1 -1
  79. package/lib/cjs/core-react/text/LeadingText2.js +1 -1
  80. package/lib/cjs/core-react/text/LeadingText2.js.map +1 -1
  81. package/lib/cjs/core-react/text/SmallText.d.ts +1 -1
  82. package/lib/cjs/core-react/text/SmallText.js +1 -1
  83. package/lib/cjs/core-react/text/SmallText.js.map +1 -1
  84. package/lib/cjs/core-react/text/Subheading.d.ts +1 -1
  85. package/lib/cjs/core-react/text/Subheading.js +1 -1
  86. package/lib/cjs/core-react/text/Subheading.js.map +1 -1
  87. package/lib/cjs/core-react/text/Subheading2.d.ts +1 -1
  88. package/lib/cjs/core-react/text/Subheading2.js +1 -1
  89. package/lib/cjs/core-react/text/Subheading2.js.map +1 -1
  90. package/lib/cjs/core-react/text/Title.d.ts +1 -1
  91. package/lib/cjs/core-react/text/Title.js +1 -1
  92. package/lib/cjs/core-react/text/Title.js.map +1 -1
  93. package/lib/cjs/core-react/text/Title2.d.ts +1 -1
  94. package/lib/cjs/core-react/text/Title2.js +1 -1
  95. package/lib/cjs/core-react/text/Title2.js.map +1 -1
  96. package/lib/cjs/core-react/tiles/FeaturedTile.d.ts +1 -1
  97. package/lib/cjs/core-react/tiles/FeaturedTile.js +1 -1
  98. package/lib/cjs/core-react/tiles/FeaturedTile.js.map +1 -1
  99. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts +1 -1
  100. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.js +1 -1
  101. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.js.map +1 -1
  102. package/lib/cjs/core-react/tiles/MinimalTile.d.ts +1 -1
  103. package/lib/cjs/core-react/tiles/MinimalTile.js +1 -1
  104. package/lib/cjs/core-react/tiles/MinimalTile.js.map +1 -1
  105. package/lib/cjs/core-react/tiles/Tile.d.ts +2 -2
  106. package/lib/cjs/core-react/tiles/Tile.js +1 -1
  107. package/lib/cjs/core-react/tiles/Tile.js.map +1 -1
  108. package/lib/cjs/core-react/toggle/LabeledToggle.d.ts +2 -2
  109. package/lib/cjs/core-react/toggle/LabeledToggle.js +1 -1
  110. package/lib/cjs/core-react/toggle/LabeledToggle.js.map +1 -1
  111. package/lib/cjs/core-react/toggle/Toggle.d.ts +4 -4
  112. package/lib/cjs/core-react/toggle/Toggle.d.ts.map +1 -1
  113. package/lib/cjs/core-react/toggle/Toggle.js +2 -2
  114. package/lib/cjs/core-react/toggle/Toggle.js.map +1 -1
  115. package/lib/cjs/core-react/tooltip/Tooltip.d.ts +3 -3
  116. package/lib/cjs/core-react/tooltip/Tooltip.js +1 -1
  117. package/lib/cjs/core-react/tooltip/Tooltip.js.map +1 -1
  118. package/lib/cjs/core-react/utils/PointProps.d.ts +1 -1
  119. package/lib/cjs/core-react/utils/PointProps.js.map +1 -1
  120. package/lib/cjs/core-react/utils/UiEvent.d.ts +1 -1
  121. package/lib/cjs/core-react/utils/UiEvent.js +1 -1
  122. package/lib/cjs/core-react/utils/UiEvent.js.map +1 -1
  123. package/lib/esm/core-react/button/Button.d.ts +4 -4
  124. package/lib/esm/core-react/button/Button.js +3 -3
  125. package/lib/esm/core-react/button/Button.js.map +1 -1
  126. package/lib/esm/core-react/checkbox/Checkbox.d.ts +2 -2
  127. package/lib/esm/core-react/checkbox/Checkbox.js +1 -1
  128. package/lib/esm/core-react/checkbox/Checkbox.js.map +1 -1
  129. package/lib/esm/core-react/dialog/DialogButtonDef.d.ts +3 -3
  130. package/lib/esm/core-react/dialog/DialogButtonDef.js +2 -2
  131. package/lib/esm/core-react/dialog/DialogButtonDef.js.map +1 -1
  132. package/lib/esm/core-react/expandable/ExpandableBlock.d.ts +2 -2
  133. package/lib/esm/core-react/expandable/ExpandableBlock.js +1 -1
  134. package/lib/esm/core-react/expandable/ExpandableBlock.js.map +1 -1
  135. package/lib/esm/core-react/form/Field.d.ts +2 -2
  136. package/lib/esm/core-react/form/Field.js +1 -1
  137. package/lib/esm/core-react/form/Field.js.map +1 -1
  138. package/lib/esm/core-react/form/Form.d.ts +5 -5
  139. package/lib/esm/core-react/form/Form.js +1 -1
  140. package/lib/esm/core-react/form/Form.js.map +1 -1
  141. package/lib/esm/core-react/icons/SvgSprite.d.ts +2 -2
  142. package/lib/esm/core-react/icons/SvgSprite.js +1 -1
  143. package/lib/esm/core-react/icons/SvgSprite.js.map +1 -1
  144. package/lib/esm/core-react/inputs/Input.d.ts +2 -2
  145. package/lib/esm/core-react/inputs/Input.js +1 -1
  146. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  147. package/lib/esm/core-react/inputs/LabeledInput.d.ts +2 -2
  148. package/lib/esm/core-react/inputs/LabeledInput.js +1 -1
  149. package/lib/esm/core-react/inputs/LabeledInput.js.map +1 -1
  150. package/lib/esm/core-react/inputs/LabeledTextarea.d.ts +2 -2
  151. package/lib/esm/core-react/inputs/LabeledTextarea.js +1 -1
  152. package/lib/esm/core-react/inputs/LabeledTextarea.js.map +1 -1
  153. package/lib/esm/core-react/inputs/Textarea.d.ts +2 -2
  154. package/lib/esm/core-react/inputs/Textarea.js +1 -1
  155. package/lib/esm/core-react/inputs/Textarea.js.map +1 -1
  156. package/lib/esm/core-react/loading/Spinner.d.ts +3 -3
  157. package/lib/esm/core-react/loading/Spinner.js +2 -2
  158. package/lib/esm/core-react/loading/Spinner.js.map +1 -1
  159. package/lib/esm/core-react/messagebox/MessageSeverity.d.ts +1 -1
  160. package/lib/esm/core-react/messagebox/MessageSeverity.js +1 -1
  161. package/lib/esm/core-react/messagebox/MessageSeverity.js.map +1 -1
  162. package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts +2 -2
  163. package/lib/esm/core-react/progress-indicators/ProgressBar.js +1 -1
  164. package/lib/esm/core-react/progress-indicators/ProgressBar.js.map +1 -1
  165. package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts +2 -2
  166. package/lib/esm/core-react/progress-indicators/ProgressSpinner.js +1 -1
  167. package/lib/esm/core-react/progress-indicators/ProgressSpinner.js.map +1 -1
  168. package/lib/esm/core-react/radio/Radio.d.ts +2 -2
  169. package/lib/esm/core-react/radio/Radio.js +1 -1
  170. package/lib/esm/core-react/radio/Radio.js.map +1 -1
  171. package/lib/esm/core-react/select/LabeledSelect.d.ts +2 -2
  172. package/lib/esm/core-react/select/LabeledSelect.js +1 -1
  173. package/lib/esm/core-react/select/LabeledSelect.js.map +1 -1
  174. package/lib/esm/core-react/select/LabeledThemedSelect.d.ts +2 -2
  175. package/lib/esm/core-react/select/LabeledThemedSelect.js +1 -1
  176. package/lib/esm/core-react/select/LabeledThemedSelect.js.map +1 -1
  177. package/lib/esm/core-react/select/Select.d.ts +3 -3
  178. package/lib/esm/core-react/select/Select.js +1 -1
  179. package/lib/esm/core-react/select/Select.js.map +1 -1
  180. package/lib/esm/core-react/select/ThemedSelect.d.ts +4 -4
  181. package/lib/esm/core-react/select/ThemedSelect.js +1 -1
  182. package/lib/esm/core-react/select/ThemedSelect.js.map +1 -1
  183. package/lib/esm/core-react/slider/Slider.d.ts +1 -1
  184. package/lib/esm/core-react/slider/Slider.js +1 -1
  185. package/lib/esm/core-react/slider/Slider.js.map +1 -1
  186. package/lib/esm/core-react/splitbutton/SplitButton.d.ts +2 -2
  187. package/lib/esm/core-react/splitbutton/SplitButton.js +1 -1
  188. package/lib/esm/core-react/splitbutton/SplitButton.js.map +1 -1
  189. package/lib/esm/core-react/tabs/HorizontalTabs.d.ts +1 -1
  190. package/lib/esm/core-react/tabs/HorizontalTabs.js +1 -1
  191. package/lib/esm/core-react/tabs/HorizontalTabs.js.map +1 -1
  192. package/lib/esm/core-react/text/Headline.d.ts +1 -1
  193. package/lib/esm/core-react/text/Headline.js +1 -1
  194. package/lib/esm/core-react/text/Headline.js.map +1 -1
  195. package/lib/esm/core-react/text/LeadingText.d.ts +1 -1
  196. package/lib/esm/core-react/text/LeadingText.js +1 -1
  197. package/lib/esm/core-react/text/LeadingText.js.map +1 -1
  198. package/lib/esm/core-react/text/LeadingText2.d.ts +1 -1
  199. package/lib/esm/core-react/text/LeadingText2.js +1 -1
  200. package/lib/esm/core-react/text/LeadingText2.js.map +1 -1
  201. package/lib/esm/core-react/text/SmallText.d.ts +1 -1
  202. package/lib/esm/core-react/text/SmallText.js +1 -1
  203. package/lib/esm/core-react/text/SmallText.js.map +1 -1
  204. package/lib/esm/core-react/text/Subheading.d.ts +1 -1
  205. package/lib/esm/core-react/text/Subheading.js +1 -1
  206. package/lib/esm/core-react/text/Subheading.js.map +1 -1
  207. package/lib/esm/core-react/text/Subheading2.d.ts +1 -1
  208. package/lib/esm/core-react/text/Subheading2.js +1 -1
  209. package/lib/esm/core-react/text/Subheading2.js.map +1 -1
  210. package/lib/esm/core-react/text/Title.d.ts +1 -1
  211. package/lib/esm/core-react/text/Title.js +1 -1
  212. package/lib/esm/core-react/text/Title.js.map +1 -1
  213. package/lib/esm/core-react/text/Title2.d.ts +1 -1
  214. package/lib/esm/core-react/text/Title2.js +1 -1
  215. package/lib/esm/core-react/text/Title2.js.map +1 -1
  216. package/lib/esm/core-react/tiles/FeaturedTile.d.ts +1 -1
  217. package/lib/esm/core-react/tiles/FeaturedTile.js +1 -1
  218. package/lib/esm/core-react/tiles/FeaturedTile.js.map +1 -1
  219. package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts +1 -1
  220. package/lib/esm/core-react/tiles/MinimalFeaturedTile.js +1 -1
  221. package/lib/esm/core-react/tiles/MinimalFeaturedTile.js.map +1 -1
  222. package/lib/esm/core-react/tiles/MinimalTile.d.ts +1 -1
  223. package/lib/esm/core-react/tiles/MinimalTile.js +1 -1
  224. package/lib/esm/core-react/tiles/MinimalTile.js.map +1 -1
  225. package/lib/esm/core-react/tiles/Tile.d.ts +2 -2
  226. package/lib/esm/core-react/tiles/Tile.js +1 -1
  227. package/lib/esm/core-react/tiles/Tile.js.map +1 -1
  228. package/lib/esm/core-react/toggle/LabeledToggle.d.ts +2 -2
  229. package/lib/esm/core-react/toggle/LabeledToggle.js +1 -1
  230. package/lib/esm/core-react/toggle/LabeledToggle.js.map +1 -1
  231. package/lib/esm/core-react/toggle/Toggle.d.ts +4 -4
  232. package/lib/esm/core-react/toggle/Toggle.d.ts.map +1 -1
  233. package/lib/esm/core-react/toggle/Toggle.js +2 -2
  234. package/lib/esm/core-react/toggle/Toggle.js.map +1 -1
  235. package/lib/esm/core-react/tooltip/Tooltip.d.ts +3 -3
  236. package/lib/esm/core-react/tooltip/Tooltip.js +1 -1
  237. package/lib/esm/core-react/tooltip/Tooltip.js.map +1 -1
  238. package/lib/esm/core-react/utils/PointProps.d.ts +1 -1
  239. package/lib/esm/core-react/utils/PointProps.js.map +1 -1
  240. package/lib/esm/core-react/utils/UiEvent.d.ts +1 -1
  241. package/lib/esm/core-react/utils/UiEvent.js +1 -1
  242. package/lib/esm/core-react/utils/UiEvent.js.map +1 -1
  243. package/package.json +20 -10
@@ -12,7 +12,7 @@ const React = require("react");
12
12
  const Tile_1 = require("./Tile");
13
13
  /** Minimal [[Tile]] component
14
14
  * @beta
15
- * @deprecated Use Tile in itwinui-react instead
15
+ * @deprecated in 3.0. Use Tile in itwinui-react instead
16
16
  */
17
17
  function MinimalTile(props) {
18
18
  return React.createElement(Tile_1.Tile, { ...props, minimal: true }); // eslint-disable-line deprecation/deprecation
@@ -1 +1 @@
1
- {"version":3,"file":"MinimalTile.js","sourceRoot":"","sources":["../../../../src/core-react/tiles/MinimalTile.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,iCAAyC;AAEzC;;;GAGG;AACH,SAAgB,WAAW,CAAC,KAAgB;IAC1C,OAAO,oBAAC,WAAI,OAAK,KAAK,EAAE,OAAO,EAAE,IAAI,GAAI,CAAC,CAAE,8CAA8C;AAC5F,CAAC;AAFD,kCAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Tile, TileProps } from \"./Tile\";\r\n\r\n/** Minimal [[Tile]] component\r\n * @beta\r\n * @deprecated Use Tile in itwinui-react instead\r\n */\r\nexport function MinimalTile(props: TileProps) { // eslint-disable-line deprecation/deprecation\r\n return <Tile {...props} minimal={true} />; // eslint-disable-line deprecation/deprecation\r\n}\r\n"]}
1
+ {"version":3,"file":"MinimalTile.js","sourceRoot":"","sources":["../../../../src/core-react/tiles/MinimalTile.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,iCAAyC;AAEzC;;;GAGG;AACH,SAAgB,WAAW,CAAC,KAAgB;IAC1C,OAAO,oBAAC,WAAI,OAAK,KAAK,EAAE,OAAO,EAAE,IAAI,GAAI,CAAC,CAAE,8CAA8C;AAC5F,CAAC;AAFD,kCAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Tile, TileProps } from \"./Tile\";\r\n\r\n/** Minimal [[Tile]] component\r\n * @beta\r\n * @deprecated in 3.0. Use Tile in itwinui-react instead\r\n */\r\nexport function MinimalTile(props: TileProps) { // eslint-disable-line deprecation/deprecation\r\n return <Tile {...props} minimal={true} />; // eslint-disable-line deprecation/deprecation\r\n}\r\n"]}
@@ -5,7 +5,7 @@ import * as React from "react";
5
5
  import { CommonDivProps } from "../utils/Props";
6
6
  /** Properties for the [[Tile]] component
7
7
  * @beta
8
- * @deprecated Use TileProps in itwinui-react instead
8
+ * @deprecated in 3.0. Use TileProps in itwinui-react instead
9
9
  */
10
10
  export interface TileProps extends CommonDivProps {
11
11
  title: string;
@@ -21,7 +21,7 @@ export interface TileProps extends CommonDivProps {
21
21
  export declare type TileDefaultProps = Pick<TileProps, "stepNum">;
22
22
  /** The Tile React component is a container for rendering elements that can be grouped together.
23
23
  * @beta
24
- * @deprecated Use Tile in itwinui-react instead
24
+ * @deprecated in 3.0. Use Tile in itwinui-react instead
25
25
  */
26
26
  export declare class Tile extends React.Component<TileProps> {
27
27
  /** @internal */
@@ -13,7 +13,7 @@ const React = require("react");
13
13
  const IconComponent_1 = require("../icons/IconComponent");
14
14
  /** The Tile React component is a container for rendering elements that can be grouped together.
15
15
  * @beta
16
- * @deprecated Use Tile in itwinui-react instead
16
+ * @deprecated in 3.0. Use Tile in itwinui-react instead
17
17
  */
18
18
  class Tile ext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,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO;gBAC3E,6BAAK,SAAS,EAAC,aAAa,IACzB,IAAI,CACD;gBACN,2BAAG,SAAS,EAAC,cAAc,IAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAK,CAChD;YACH,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO;gBACzC,6BAAK,SAAS,EAAC,iBAAiB,IAC7B,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CAEJ,CACP,CAAC;IACJ,CAAC;;AAvCH,oBAwCC;AAtCC,gBAAgB;AACO,iBAAY,GAAqB;IACtD,OAAO,EAAE,CAAC;CACX,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\nimport { CommonDivProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[Tile]] component\r\n * @beta\r\n * @deprecated Use TileProps in itwinui-react instead\r\n */\r\nexport interface TileProps extends CommonDivProps {\r\n title: string;\r\n icon?: string | React.ReactNode;\r\n featured?: boolean;\r\n minimal?: boolean;\r\n href?: string;\r\n onClick?: (e: any) => any;\r\n stepNum?: number;\r\n stepCount?: number;\r\n}\r\n\r\n/** @internal */\r\nexport type TileDefaultProps = Pick<TileProps, \"stepNum\">; // eslint-disable-line deprecation/deprecation\r\n\r\n/** The Tile React component is a container for rendering elements that can be grouped together.\r\n * @beta\r\n * @deprecated Use Tile in itwinui-react instead\r\n */\r\nexport class Tile extends React.Component<TileProps> { // eslint-disable-line deprecation/deprecation\r\n\r\n /** @internal */\r\n public static readonly defaultProps: TileDefaultProps = {\r\n stepNum: 0,\r\n };\r\n\r\n /** @internal */\r\n public override render(): JSX.Element {\r\n const stepType =\r\n (this.props.stepCount && this.props.stepCount < 13)\r\n ? Math.floor(this.props.stepNum! * 12 / (this.props.stepCount - 1))\r\n : this.props.stepNum! % 16;\r\n const stepClass = `uicore-step-${stepType}`;\r\n\r\n const classNames = classnames(\r\n \"uicore-tiles-tile\",\r\n stepClass,\r\n this.props.featured && \"uicore-featured\",\r\n this.props.minimal && \"uicore-minimal\",\r\n );\r\n\r\n const icon: React.ReactNode = (typeof this.props.icon === \"string\") ? <Icon iconSpec={this.props.icon} /> : this.props.icon;\r\n\r\n return (\r\n <div className={classNames} style={this.props.style}>\r\n <a className=\"uicore-link\" href={this.props.href} onClick={this.props.onClick}>\r\n <div className=\"uicore-icon\">\r\n {icon}\r\n </div>\r\n <p className=\"uicore-title\">{this.props.title}</p>\r\n </a>\r\n {this.props.children && !this.props.minimal &&\r\n <div className=\"uicore-children\">\r\n {this.props.children}\r\n </div>\r\n }\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../../src/core-react/tiles/Tile.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAC/B,0DAA8C;AAqB9C;;;GAGG;AACH,MAAa,IAAK,SAAQ,KAAK,CAAC,SAAoB;IAOlD,gBAAgB;IACA,MAAM;QACpB,MAAM,QAAQ,GACZ,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC;YACjD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAQ,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;YACnE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAQ,GAAG,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAG,eAAe,QAAQ,EAAE,CAAC;QAE5C,MAAM,UAAU,GAAG,IAAA,oBAAU,EAC3B,mBAAmB,EACnB,SAAS,EACT,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACxC,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,gBAAgB,CACvC,CAAC;QAEF,MAAM,IAAI,GAAoB,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,oBAAC,oBAAI,IAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QAE5H,OAAO,CACL,6BAAK,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;YACjD,2BAAG,SAAS,EAAC,aAAa,EAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO;gBAC3E,6BAAK,SAAS,EAAC,aAAa,IACzB,IAAI,CACD;gBACN,2BAAG,SAAS,EAAC,cAAc,IAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAK,CAChD;YACH,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO;gBACzC,6BAAK,SAAS,EAAC,iBAAiB,IAC7B,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CAEJ,CACP,CAAC;IACJ,CAAC;;AAvCH,oBAwCC;AAtCC,gBAAgB;AACO,iBAAY,GAAqB;IACtD,OAAO,EAAE,CAAC;CACX,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\nimport { CommonDivProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[Tile]] component\r\n * @beta\r\n * @deprecated in 3.0. Use TileProps in itwinui-react instead\r\n */\r\nexport interface TileProps extends CommonDivProps {\r\n title: string;\r\n icon?: string | React.ReactNode;\r\n featured?: boolean;\r\n minimal?: boolean;\r\n href?: string;\r\n onClick?: (e: any) => any;\r\n stepNum?: number;\r\n stepCount?: number;\r\n}\r\n\r\n/** @internal */\r\nexport type TileDefaultProps = Pick<TileProps, \"stepNum\">; // eslint-disable-line deprecation/deprecation\r\n\r\n/** The Tile React component is a container for rendering elements that can be grouped together.\r\n * @beta\r\n * @deprecated in 3.0. Use Tile in itwinui-react instead\r\n */\r\nexport class Tile extends React.Component<TileProps> { // eslint-disable-line deprecation/deprecation\r\n\r\n /** @internal */\r\n public static readonly defaultProps: TileDefaultProps = {\r\n stepNum: 0,\r\n };\r\n\r\n /** @internal */\r\n public override render(): JSX.Element {\r\n const stepType =\r\n (this.props.stepCount && this.props.stepCount < 13)\r\n ? Math.floor(this.props.stepNum! * 12 / (this.props.stepCount - 1))\r\n : this.props.stepNum! % 16;\r\n const stepClass = `uicore-step-${stepType}`;\r\n\r\n const classNames = classnames(\r\n \"uicore-tiles-tile\",\r\n stepClass,\r\n this.props.featured && \"uicore-featured\",\r\n this.props.minimal && \"uicore-minimal\",\r\n );\r\n\r\n const icon: React.ReactNode = (typeof this.props.icon === \"string\") ? <Icon iconSpec={this.props.icon} /> : this.props.icon;\r\n\r\n return (\r\n <div className={classNames} style={this.props.style}>\r\n <a className=\"uicore-link\" href={this.props.href} onClick={this.props.onClick}>\r\n <div className=\"uicore-icon\">\r\n {icon}\r\n </div>\r\n <p className=\"uicore-title\">{this.props.title}</p>\r\n </a>\r\n {this.props.children && !this.props.minimal &&\r\n <div className=\"uicore-children\">\r\n {this.props.children}\r\n </div>\r\n }\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
@@ -6,7 +6,7 @@ import * as React from "react";
6
6
  import { ToggleSwitchProps } from "@itwin/itwinui-react";
7
7
  /** Properties for [[LabeledToggle]]
8
8
  * @public
9
- * @deprecated Use ToggleSwitchProps from itwinui-react instead
9
+ * @deprecated in 3.0. Use ToggleSwitchProps from itwinui-react instead
10
10
  */
11
11
  export interface LabeledToggleProps extends ToggleSwitchProps {
12
12
  /** Text that will be shown next to the Toggle. */
@@ -18,7 +18,7 @@ export interface LabeledToggleProps extends ToggleSwitchProps {
18
18
  }
19
19
  /** Toggle component with a Label to the right
20
20
  * @public
21
- * @deprecated Use ToggleSwitch from itwinui-react with `labelPosition="right"` instead
21
+ * @deprecated in 3.0. Use ToggleSwitch from itwinui-react with `labelPosition="right"` instead
22
22
  */
23
23
  export declare class LabeledToggle extends React.PureComponent<LabeledToggleProps> {
24
24
  render(): JSX.Element;
@@ -14,7 +14,7 @@ const React = require("react");
14
14
  const itwinui_react_1 = require("@itwin/itwinui-react");
15
15
  /** Toggle component with a Label to the right
16
16
  * @public
17
- * @deprecated Use ToggleSwitch from itwinui-react with `labelPosition="right"` instead
17
+ * @deprecated in 3.0. Use ToggleSwitch from itwinui-react with `labelPosition="right"` instead
18
18
  */
19
19
  class LabeledToggle extends React.PureComponent {
20
20
  render() {
@@ -1 +1 @@
1
- {"version":3,"file":"LabeledToggle.js","sourceRoot":"","sources":["../../../../src/core-react/toggle/LabeledToggle.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gCAA8B;AAC9B,2CAAoC;AACpC,+BAA+B;AAC/B,wDAAuE;AAevE;;;GAGG;AACH,MAAa,aAAc,SAAQ,KAAK,CAAC,aAAiC;IACxD,MAAM;QACpB,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzE,OAAO,CACL,+BAAO,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,IAAA,oBAAU,EACnD,4BAA4B,EAC5B,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACxC,IAAI,CAAC,KAAK,CAAC,SAAS,CACrB;YACC,oBAAC,4BAAY,IAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK,GAAI;YAC9D,KAAK;gBACJ,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,cAAc,EAAE,cAAc,CAAC,IAAG,KAAK,CAAO,CAErE,CACT,CAAC;IACJ,CAAC;CACF;AAjBD,sCAiBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Toggle\r\n */\r\n\r\nimport \"./LabeledToggle.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ToggleSwitch, ToggleSwitchProps } from \"@itwin/itwinui-react\";\r\n\r\n/** Properties for [[LabeledToggle]]\r\n * @public\r\n * @deprecated Use ToggleSwitchProps from itwinui-react instead\r\n */\r\nexport interface LabeledToggleProps extends ToggleSwitchProps {\r\n /** Text that will be shown next to the Toggle. */\r\n label?: string;\r\n /** Custom CSS class name for the label */\r\n labelClassName?: string;\r\n /** Custom CSS Style for the label */\r\n labelStyle?: React.CSSProperties;\r\n}\r\n\r\n/** Toggle component with a Label to the right\r\n * @public\r\n * @deprecated Use ToggleSwitch from itwinui-react with `labelPosition=\"right\"` instead\r\n */\r\nexport class LabeledToggle extends React.PureComponent<LabeledToggleProps> { // eslint-disable-line deprecation/deprecation\r\n public override render(): JSX.Element {\r\n const { label, labelClassName, className, style, ...props } = this.props;\r\n\r\n return (\r\n <label style={this.props.style} className={classnames(\r\n \"core-inputs-labeled-toggle\",\r\n this.props.disabled && \"uicore-disabled\",\r\n this.props.className,\r\n )}>\r\n <ToggleSwitch className={className} style={style} {...props} />\r\n {label &&\r\n <div className={classnames(\"uicore-label\", labelClassName)}>{label}</div>\r\n }\r\n </label>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"LabeledToggle.js","sourceRoot":"","sources":["../../../../src/core-react/toggle/LabeledToggle.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gCAA8B;AAC9B,2CAAoC;AACpC,+BAA+B;AAC/B,wDAAuE;AAevE;;;GAGG;AACH,MAAa,aAAc,SAAQ,KAAK,CAAC,aAAiC;IACxD,MAAM;QACpB,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzE,OAAO,CACL,+BAAO,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,IAAA,oBAAU,EACnD,4BAA4B,EAC5B,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACxC,IAAI,CAAC,KAAK,CAAC,SAAS,CACrB;YACC,oBAAC,4BAAY,IAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK,GAAI;YAC9D,KAAK;gBACJ,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,cAAc,EAAE,cAAc,CAAC,IAAG,KAAK,CAAO,CAErE,CACT,CAAC;IACJ,CAAC;CACF;AAjBD,sCAiBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Toggle\r\n */\r\n\r\nimport \"./LabeledToggle.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ToggleSwitch, ToggleSwitchProps } from \"@itwin/itwinui-react\";\r\n\r\n/** Properties for [[LabeledToggle]]\r\n * @public\r\n * @deprecated in 3.0. Use ToggleSwitchProps from itwinui-react instead\r\n */\r\nexport interface LabeledToggleProps extends ToggleSwitchProps {\r\n /** Text that will be shown next to the Toggle. */\r\n label?: string;\r\n /** Custom CSS class name for the label */\r\n labelClassName?: string;\r\n /** Custom CSS Style for the label */\r\n labelStyle?: React.CSSProperties;\r\n}\r\n\r\n/** Toggle component with a Label to the right\r\n * @public\r\n * @deprecated in 3.0. Use ToggleSwitch from itwinui-react with `labelPosition=\"right\"` instead\r\n */\r\nexport class LabeledToggle extends React.PureComponent<LabeledToggleProps> { // eslint-disable-line deprecation/deprecation\r\n public override render(): JSX.Element {\r\n const { label, labelClassName, className, style, ...props } = this.props;\r\n\r\n return (\r\n <label style={this.props.style} className={classnames(\r\n \"core-inputs-labeled-toggle\",\r\n this.props.disabled && \"uicore-disabled\",\r\n this.props.className,\r\n )}>\r\n <ToggleSwitch className={className} style={style} {...props} />\r\n {label &&\r\n <div className={classnames(\"uicore-label\", labelClassName)}>{label}</div>\r\n }\r\n </label>\r\n );\r\n }\r\n}\r\n"]}
@@ -6,7 +6,7 @@ import * as React from "react";
6
6
  import { CommonProps } from "../utils/Props";
7
7
  /** Toggle display types
8
8
  * @public
9
- * @deprecated
9
+ * @deprecated in 3.0.
10
10
  */
11
11
  export declare enum ToggleButtonType {
12
12
  /** Primary (green) background */
@@ -16,7 +16,7 @@ export declare enum ToggleButtonType {
16
16
  }
17
17
  /** Properties for [[Toggle]] component
18
18
  * @public
19
- * @deprecated Use ToggleSwitchProps in itwinui-react instead
19
+ * @deprecated in 3.0. Use ToggleSwitchProps in itwinui-react instead
20
20
  */
21
21
  export interface ToggleProps extends CommonProps {
22
22
  /** Indicates whether the Toggle is disabled (default is false) */
@@ -28,7 +28,7 @@ export interface ToggleProps extends CommonProps {
28
28
  /** Show a check mark icon when the toggle is "on" (false is default) */
29
29
  showCheckmark?: boolean;
30
30
  /** Button type, either Primary or Blue (Blue is default).
31
- * @deprecated */
31
+ * @deprecated in 3.0. */
32
32
  buttonType?: ToggleButtonType;
33
33
  /** Function called when the toggle state is changed */
34
34
  onChange?: (checked: boolean) => any;
@@ -46,7 +46,7 @@ export interface ToggleProps extends CommonProps {
46
46
  /**
47
47
  * Toggle React component to show an "on" or "off" state
48
48
  * @public
49
- * @deprecated Use ToggleSwitch in itwinui-react instead
49
+ * @deprecated in 3.0. Use ToggleSwitch in itwinui-react instead
50
50
  */
51
51
  export declare const Toggle: (props: ToggleProps) => JSX.Element | null;
52
52
  //# sourceMappingURL=Toggle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../../src/core-react/toggle/Toggle.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,eAAe,CAAC;AAEvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,iCAAiC;IACjC,OAAO,IAAA;IACP,sBAAsB;IACtB,IAAI,IAAA;CACL;AAED;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wEAAwE;IACxE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;qBACiB;IACjB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,GAAG,CAAC;IACrC,mDAAmD;IACnD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAA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IAChB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACnC;AA6GD;;;;GAIG;AACH,eAAO,MAAM,MAAM,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,GAAG,CAAC,OAAO,GAAG,IAAuB,CAAC"}
@@ -14,7 +14,7 @@ const React = require("react");
14
14
  const useRefs_1 = require("../utils/hooks/useRefs");
15
15
  /** Toggle display types
16
16
  * @public
17
- * @deprecated
17
+ * @deprecated in 3.0.
18
18
  */
19
19
  var ToggleButtonType;
20
20
  (function (ToggleButtonType) {
@@ -99,7 +99,7 @@ function ForwardRefToggle(props, ref) {
99
99
  /**
100
100
  * Toggle React component to show an "on" or "off" state
101
101
  * @public
102
- * @deprecated Use ToggleSwitch in itwinui-react instead
102
+ * @deprecated in 3.0. Use ToggleSwitch in itwinui-react instead
103
103
  */
104
104
  exports.Toggle = ForwardRefToggle; // eslint-disable-line deprecation/deprecation
105
105
  //# sourceMappingURL=Toggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toggle.js","sourceRoot":"","sources":["../../../../src/core-react/toggle/Toggle.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yBAAuB;AACvB,2CAAoC;AACpC,+BAA+B;AAE/B,oDAAiD;AAEjD;;;GAGG;AACH,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,iCAAiC;IACjC,6DAAO,CAAA;IACP,sBAAsB;IACtB,uDAAI,CAAA;AACN,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAgCD,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAAmC,8CAA8C;AACxH,SAAS,gBAAgB,CAAC,KAAK,EAAE,GAAG;IAClC,MAAM,Y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ACd,CAAC;IACF,MAAM,eAAe,GAAG,IAAA,oBAAU,EAChC,oBAAoB,EACpB,QAAQ,IAAI,eAAe,CAC5B,CAAC;IAEF,OAAO,CACL,+BAAO,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,UAAU;QAC9F,+BAAO,IAAI,EAAC,UAAU,EAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAC,mBAAmB,EAC7D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAC1C,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB,EAClD,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI;QACxB,8BAAM,SAAS,EAAC,wBAAwB,GAAG;QAC3C,8BAAM,SAAS,EAAE,kBAAkB,GAAI;QACvC,8BAAM,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,iBAAiB,GAAI,CACxD,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;;GAIG;AACU,QAAA,MAAM,GAA+C,gBAAgB,CAAC,CAAG,8CAA8C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Toggle\r\n */\r\n\r\nimport \"./Toggle.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { useRefs } from \"../utils/hooks/useRefs\";\r\n\r\n/** Toggle display types\r\n * @public\r\n * @deprecated\r\n */\r\nexport enum ToggleButtonType {\r\n /** Primary (green) background */\r\n Primary,\r\n /** Blue background */\r\n Blue,\r\n}\r\n\r\n/** Properties for [[Toggle]] component\r\n * @public\r\n * @deprecated Use ToggleSwitchProps in itwinui-react instead\r\n */\r\nexport interface ToggleProps extends CommonProps {\r\n /** Indicates whether the Toggle is disabled (default is false) */\r\n disabled?: boolean;\r\n /** Indicates whether the Toggle is \"on\" or \"off\" (default is false) */\r\n isOn?: boolean;\r\n /** Show the toggle rounded or square (rounded is default) */\r\n rounded?: boolean;\r\n /** Show a check mark icon when the toggle is \"on\" (false is default) */\r\n showCheckmark?: boolean;\r\n /** Button type, either Primary or Blue (Blue is default).\r\n * @deprecated */\r\n buttonType?: ToggleButtonType; // eslint-disable-line deprecation/deprecation\r\n /** Function called when the toggle state is changed */\r\n onChange?: (checked: boolean) => any;\r\n /** Function called when the toggle loses focus */\r\n onBlur?: (event: React.FocusEvent) => any;\r\n /** Use larger size (default is false) */\r\n large?: boolean;\r\n /** Indicates whether to set focus to the input element */\r\n setFocus?: boolean;\r\n /** Tooltip text */\r\n title?: string;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\nconst ForwardRefToggle = React.forwardRef<HTMLInputElement, ToggleProps>( // eslint-disable-line deprecation/deprecation\r\n function ForwardRefToggle(props, ref) {\r\n const inputElement = React.useRef<HTMLInputElement>(null);\r\n const refs = useRefs(inputElement, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n const padding = 2;\r\n const defaultHeight = props.large ? 32 : 21;\r\n const [height, setHeight] = React.useState(defaultHeight);\r\n const [width, setWidth] = React.useState(defaultHeight * 2);\r\n const [checked, setChecked] = React.useState(props.isOn ? true : false);\r\n const [toggling, setToggling] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n if (props.setFocus && inputElement.current)\r\n inputElement.current.focus();\r\n }, [props]);\r\n\r\n React.useEffect(() => {\r\n setChecked(props.isOn ? true : false);\r\n }, [props.isOn]);\r\n\r\n const handleChange = React.useCallback(() => {\r\n const newChecked = !checked;\r\n\r\n setToggling(true);\r\n setChecked(newChecked);\r\n\r\n // istanbul ignore else\r\n if (props.onChange)\r\n props.onChange(newChecked);\r\n\r\n setTimeout(() => {\r\n // istanbul ignore else\r\n if (inputElement.current)\r\n setToggling(false);\r\n }, 250);\r\n }, [props, checked]);\r\n\r\n const handleBlur = React.useCallback((event: React.FocusEvent) => {\r\n // istanbul ignore else\r\n if (props.onBlur)\r\n props.onBlur(event);\r\n }, [props]);\r\n\r\n const handleCheckboxBlur = React.useCallback((event: React.FocusEvent) => {\r\n event.stopPropagation();\r\n }, []);\r\n\r\n const setHeightFromRef = React.useCallback((el: HTMLLabelElement | null) => {\r\n if (el !== null) {\r\n // istanbul ignore next\r\n if (el.clientHeight > 0 && el.clientWidth > 0) {\r\n setHeight(el.clientHeight);\r\n setWidth(el.clientWidth);\r\n }\r\n }\r\n }, []);\r\n\r\n const getOffset = (): number => {\r\n return (checked) ? width - height : 0;\r\n };\r\n\r\n /** Default props */\r\n const rounded = props.rounded !== undefined ? props.rounded : true;\r\n const showCheckmark = props.showCheckmark !== undefined ? props.showCheckmark : false;\r\n const buttonType = props.buttonType !== undefined ? props.buttonType : ToggleButtonType.Blue; // eslint-disable-line deprecation/deprecation\r\n\r\n const halfHeight = height / 2;\r\n const checkmarkClassName = classnames(\r\n \"core-toggle-checkmark\",\r\n \"icon\", \"icon-checkmark\",\r\n showCheckmark && \"core-visible\",\r\n toggling && \"core-toggling\",\r\n );\r\n const toggleStyle: React.CSSProperties = { borderRadius: rounded ? halfHeight : 3, fontSize: halfHeight, ...props.style };\r\n const toggleClassName = classnames(\r\n \"core-toggle\",\r\n buttonType === ToggleButtonType.Primary && \"core-toggle-primary\", // eslint-disable-line deprecation/deprecation\r\n props.large && \"core-toggle-large\",\r\n rounded && \"core-toggle-rounded\",\r\n props.disabled && \"uicore-disabled\",\r\n props.className);\r\n const toggleHandleStyle: React.CSSProperties = {\r\n width: height - (padding * 2),\r\n transform: `translateX(${getOffset()}px)`,\r\n top: padding,\r\n bottom: padding,\r\n left: padding,\r\n };\r\n const handleClassName = classnames(\r\n \"core-toggle-handle\",\r\n toggling && \"core-toggling\",\r\n );\r\n\r\n return (\r\n <label ref={setHeightFromRef} style={toggleStyle} className={toggleClassName} onBlur={handleBlur}>\r\n <input type=\"checkbox\" ref={refs} className=\"core-toggle-input\"\r\n checked={checked} disabled={props.disabled}\r\n onChange={handleChange} onBlur={handleCheckboxBlur}\r\n title={props.title} />\r\n <span className=\"core-toggle-background\" />\r\n <span className={checkmarkClassName} />\r\n <span className={handleClassName} style={toggleHandleStyle} />\r\n </label>\r\n );\r\n }\r\n);\r\n\r\n/**\r\n * Toggle React component to show an \"on\" or \"off\" state\r\n * @public\r\n * @deprecated Use ToggleSwitch in itwinui-react instead\r\n */\r\nexport const Toggle: (props: ToggleProps) => JSX.Element | null = ForwardRefToggle; // eslint-disable-line deprecation/deprecation\r\n"]}
1
+ {"version":3,"file":"Toggle.js","sourceRoot":"","sources":["../../../../src/core-react/toggle/Toggle.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yBAAuB;AACvB,2CAAoC;AACpC,+BAA+B;AAE/B,oDAAiD;AAEjD;;;GAGG;AACH,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,iCAAiC;IACjC,6DAAO,CAAA;IACP,sBAAsB;IACtB,uDAAI,CAAA;AACN,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAgCD,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAAmC,8CAA8C;AACxH,SAAS,gBAAgB,CAAC,KAAK,EAAE,GAAG;IAClC,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAmB,IAAI,CAAC,CAAC;IAC1D,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,YAAY,EAAE,GAAG,CAAC,CAAC,CAAE,uGAAuG;IACjJ,MAAM,OAAO,GAAG,CAAC,CAAC;IAClB,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5C,MAAM,CAAC,MAAM,EA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,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAC1C,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB,EAClD,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI;QACxB,8BAAM,SAAS,EAAC,wBAAwB,GAAG;QAC3C,8BAAM,SAAS,EAAE,kBAAkB,GAAI;QACvC,8BAAM,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,iBAAiB,GAAI,CACxD,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;;GAIG;AACU,QAAA,MAAM,GAA+C,gBAAgB,CAAC,CAAG,8CAA8C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Toggle\r\n */\r\n\r\nimport \"./Toggle.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { useRefs } from \"../utils/hooks/useRefs\";\r\n\r\n/** Toggle display types\r\n * @public\r\n * @deprecated in 3.0.\r\n */\r\nexport enum ToggleButtonType {\r\n /** Primary (green) background */\r\n Primary,\r\n /** Blue background */\r\n Blue,\r\n}\r\n\r\n/** Properties for [[Toggle]] component\r\n * @public\r\n * @deprecated in 3.0. Use ToggleSwitchProps in itwinui-react instead\r\n */\r\nexport interface ToggleProps extends CommonProps {\r\n /** Indicates whether the Toggle is disabled (default is false) */\r\n disabled?: boolean;\r\n /** Indicates whether the Toggle is \"on\" or \"off\" (default is false) */\r\n isOn?: boolean;\r\n /** Show the toggle rounded or square (rounded is default) */\r\n rounded?: boolean;\r\n /** Show a check mark icon when the toggle is \"on\" (false is default) */\r\n showCheckmark?: boolean;\r\n /** Button type, either Primary or Blue (Blue is default).\r\n * @deprecated in 3.0. */\r\n buttonType?: ToggleButtonType; // eslint-disable-line deprecation/deprecation\r\n /** Function called when the toggle state is changed */\r\n onChange?: (checked: boolean) => any;\r\n /** Function called when the toggle loses focus */\r\n onBlur?: (event: React.FocusEvent) => any;\r\n /** Use larger size (default is false) */\r\n large?: boolean;\r\n /** Indicates whether to set focus to the input element */\r\n setFocus?: boolean;\r\n /** Tooltip text */\r\n title?: string;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\nconst ForwardRefToggle = React.forwardRef<HTMLInputElement, ToggleProps>( // eslint-disable-line deprecation/deprecation\r\n function ForwardRefToggle(props, ref) {\r\n const inputElement = React.useRef<HTMLInputElement>(null);\r\n const refs = useRefs(inputElement, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n const padding = 2;\r\n const defaultHeight = props.large ? 32 : 21;\r\n const [height, setHeight] = React.useState(defaultHeight);\r\n const [width, setWidth] = React.useState(defaultHeight * 2);\r\n const [checked, setChecked] = React.useState(props.isOn ? true : false);\r\n const [toggling, setToggling] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n if (props.setFocus && inputElement.current)\r\n inputElement.current.focus();\r\n }, [props]);\r\n\r\n React.useEffect(() => {\r\n setChecked(props.isOn ? true : false);\r\n }, [props.isOn]);\r\n\r\n const handleChange = React.useCallback(() => {\r\n const newChecked = !checked;\r\n\r\n setToggling(true);\r\n setChecked(newChecked);\r\n\r\n // istanbul ignore else\r\n if (props.onChange)\r\n props.onChange(newChecked);\r\n\r\n setTimeout(() => {\r\n // istanbul ignore else\r\n if (inputElement.current)\r\n setToggling(false);\r\n }, 250);\r\n }, [props, checked]);\r\n\r\n const handleBlur = React.useCallback((event: React.FocusEvent) => {\r\n // istanbul ignore else\r\n if (props.onBlur)\r\n props.onBlur(event);\r\n }, [props]);\r\n\r\n const handleCheckboxBlur = React.useCallback((event: React.FocusEvent) => {\r\n event.stopPropagation();\r\n }, []);\r\n\r\n const setHeightFromRef = React.useCallback((el: HTMLLabelElement | null) => {\r\n if (el !== null) {\r\n // istanbul ignore next\r\n if (el.clientHeight > 0 && el.clientWidth > 0) {\r\n setHeight(el.clientHeight);\r\n setWidth(el.clientWidth);\r\n }\r\n }\r\n }, []);\r\n\r\n const getOffset = (): number => {\r\n return (checked) ? width - height : 0;\r\n };\r\n\r\n /** Default props */\r\n const rounded = props.rounded !== undefined ? props.rounded : true;\r\n const showCheckmark = props.showCheckmark !== undefined ? props.showCheckmark : false;\r\n const buttonType = props.buttonType !== undefined ? props.buttonType : ToggleButtonType.Blue; // eslint-disable-line deprecation/deprecation\r\n\r\n const halfHeight = height / 2;\r\n const checkmarkClassName = classnames(\r\n \"core-toggle-checkmark\",\r\n \"icon\", \"icon-checkmark\",\r\n showCheckmark && \"core-visible\",\r\n toggling && \"core-toggling\",\r\n );\r\n const toggleStyle: React.CSSProperties = { borderRadius: rounded ? halfHeight : 3, fontSize: halfHeight, ...props.style };\r\n const toggleClassName = classnames(\r\n \"core-toggle\",\r\n buttonType === ToggleButtonType.Primary && \"core-toggle-primary\", // eslint-disable-line deprecation/deprecation\r\n props.large && \"core-toggle-large\",\r\n rounded && \"core-toggle-rounded\",\r\n props.disabled && \"uicore-disabled\",\r\n props.className);\r\n const toggleHandleStyle: React.CSSProperties = {\r\n width: height - (padding * 2),\r\n transform: `translateX(${getOffset()}px)`,\r\n top: padding,\r\n bottom: padding,\r\n left: padding,\r\n };\r\n const handleClassName = classnames(\r\n \"core-toggle-handle\",\r\n toggling && \"core-toggling\",\r\n );\r\n\r\n return (\r\n <label ref={setHeightFromRef} style={toggleStyle} className={toggleClassName} onBlur={handleBlur}>\r\n <input type=\"checkbox\" ref={refs} className=\"core-toggle-input\"\r\n checked={checked} disabled={props.disabled}\r\n onChange={handleChange} onBlur={handleCheckboxBlur}\r\n title={props.title} />\r\n <span className=\"core-toggle-background\" />\r\n <span className={checkmarkClassName} />\r\n <span className={handleClassName} style={toggleHandleStyle} />\r\n </label>\r\n );\r\n }\r\n);\r\n\r\n/**\r\n * Toggle React component to show an \"on\" or \"off\" state\r\n * @public\r\n * @deprecated in 3.0. Use ToggleSwitch in itwinui-react instead\r\n */\r\nexport const Toggle: (props: ToggleProps) => JSX.Element | null = ForwardRefToggle; // eslint-disable-line deprecation/deprecation\r\n"]}
@@ -7,12 +7,12 @@ import { CommonProps } from "../utils/Props";
7
7
  import { RelativePosition } from "@itwin/appui-abstract";
8
8
  /** Available tooltip placements.
9
9
  * @beta
10
- * @deprecated Use Placement in itwinui-react instead
10
+ * @deprecated in 3.0. Use Placement in itwinui-react instead
11
11
  */
12
12
  export declare type TooltipPlacement = "bottom" | "left" | "right" | "top";
13
13
  /** Properties for the [[Tooltip]] component
14
14
  * @beta
15
- * @deprecated Use TooltipProps in itwinui-react instead
15
+ * @deprecated in 3.0. Use TooltipProps in itwinui-react instead
16
16
  */
17
17
  export interface TooltipProps extends CommonProps {
18
18
  /** Tooltip content. */
@@ -26,7 +26,7 @@ export interface TooltipProps extends CommonProps {
26
26
  }
27
27
  /** Component that displays tooltip for a specified target element.
28
28
  * @beta
29
- * @deprecated Use Tooltip in itwinui-react instead
29
+ * @deprecated in 3.0. Use Tooltip in itwinui-react instead
30
30
  */
31
31
  export declare function Tooltip(props: TooltipProps): JSX.Element;
32
32
  /** @internal */
@@ -16,7 +16,7 @@ const Popup_1 = require("../popup/Popup");
16
16
  const appui_abstract_1 = require("@itwin/appui-abstract");
17
17
  /** Component that displays tooltip for a specified target element.
18
18
  * @beta
19
- * @deprecated Use Tooltip in itwinui-react instead
19
+ * @deprecated in 3.0. Use Tooltip in itwinui-react instead
20
20
  */
21
21
  function Tooltip(props) {
22
22
  const { visible, target, placement } = props;
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../../src/core-react/tooltip/Tooltip.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,4CAA4C;AAE5C,0BAAwB;AACxB,2CAAoC;AACpC,+BAA+B;AAE/B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B,CAAC,SAAS,CAAC,EACxC,UAAU,EAAE,KAAK,EACjB,MAAM,EAAE,MAAM,IAEb,KAAK,CAAC,QAAQ,CACT,CACT,CAAC;AACJ,CAAC;AAhCD,0BAgCC;AAED,gBAAgB;AAChB,SAAgB,mBAAmB,CAAC,SAAuC;IACzE,QAAQ,SAAS,EAAE;QACjB,KAAK,QAAQ;YACX,OAAO,iCAAgB,CAAC,MAAM,CAAC;QACjC,KAAK,MAAM;YACT,OAAO,iCAAgB,CAAC,IAAI,CAAC;QAC/B,KAAK,OAAO;YACV,OAAO,iCAAgB,CAAC,KAAK,CAAC;QAChC,KAAK,SAAS,CAAC;QACf,KAAK,KAAK;YACR,OAAO,iCAAgB,CAAC,GAAG,CAAC;KAC/B;AACH,CAAC;AAZD,kDAYC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tooltip\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\nimport \"./Tooltip.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Popup } from \"../popup/Popup\";\r\nimport { RelativePosition } from \"@itwin/appui-abstract\";\r\n\r\n/** Available tooltip placements.\r\n * @beta\r\n * @deprecated Use Placement in itwinui-react instead\r\n */\r\nexport type TooltipPlacement = \"bottom\" | \"left\" | \"right\" | \"top\";\r\n\r\n/** Properties for the [[Tooltip]] component\r\n * @beta\r\n * @deprecated Use TooltipProps in itwinui-react instead\r\n */\r\nexport interface TooltipProps extends CommonProps {\r\n /** Tooltip content. */\r\n children?: React.ReactNode;\r\n /** Target element of a tooltip. */\r\n target?: HTMLElement;\r\n /** Allows to control tooltip visibility state. */\r\n visible?: boolean;\r\n /** Preferred tooltip placement. Defaults to `top`. */\r\n placement?: TooltipPlacement;\r\n}\r\n\r\n/** Component that displays tooltip for a specified target element.\r\n * @beta\r\n * @deprecated Use Tooltip in itwinui-react instead\r\n */\r\nexport function Tooltip(props: TooltipProps) {\r\n const { visible, target, placement } = props;\r\n const [open, setOpen] = React.useState(false);\r\n React.useEffect(() => {\r\n const mouseenter = () => {\r\n setOpen(true);\r\n };\r\n const mouseleave = () => {\r\n setOpen(false);\r\n };\r\n visible === undefined && target && target.addEventListener(\"mouseenter\", mouseenter);\r\n visible === undefined && target && target.addEventListener(\"mouseleave\", mouseleave);\r\n return () => {\r\n visible === undefined && target && target.removeEventListener(\"mouseenter\", mouseenter);\r\n visible === undefined && target && target.removeEventListener(\"mouseleave\", mouseleave);\r\n };\r\n }, [visible, target]);\r\n const className = classnames(\r\n \"core-tooltip-tooltip\",\r\n props.className,\r\n );\r\n return (\r\n <Popup\r\n className={className}\r\n isOpen={props.visible === undefined ? open : props.visible}\r\n position={placementToPosition(placement)}\r\n showShadow={false}\r\n target={target}\r\n >\r\n {props.children}\r\n </Popup>\r\n );\r\n}\r\n\r\n/** @internal */\r\nexport function placementToPosition(placement: TooltipPlacement | undefined): RelativePosition {\r\n switch (placement) {\r\n case \"bottom\":\r\n return RelativePosition.Bottom;\r\n case \"left\":\r\n return RelativePosition.Left;\r\n case \"right\":\r\n return RelativePosition.Right;\r\n case undefined:\r\n case \"top\":\r\n return RelativePosition.Top;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../../src/core-react/tooltip/Tooltip.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,4CAA4C;AAE5C,0BAAwB;AACxB,2CAAoC;AACpC,+BAA+B;AAE/B,0CAAuC;AACvC,0DAAyD;AAuBzD;;;GAGG;AACH,SAAgB,OAAO,CAAC,KAAmB;IACzC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAC7C,MAAM,CAAC,I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BAAmB,CAAC,SAAuC;IACzE,QAAQ,SAAS,EAAE;QACjB,KAAK,QAAQ;YACX,OAAO,iCAAgB,CAAC,MAAM,CAAC;QACjC,KAAK,MAAM;YACT,OAAO,iCAAgB,CAAC,IAAI,CAAC;QAC/B,KAAK,OAAO;YACV,OAAO,iCAAgB,CAAC,KAAK,CAAC;QAChC,KAAK,SAAS,CAAC;QACf,KAAK,KAAK;YACR,OAAO,iCAAgB,CAAC,GAAG,CAAC;KAC/B;AACH,CAAC;AAZD,kDAYC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tooltip\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\nimport \"./Tooltip.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Popup } from \"../popup/Popup\";\r\nimport { RelativePosition } from \"@itwin/appui-abstract\";\r\n\r\n/** Available tooltip placements.\r\n * @beta\r\n * @deprecated in 3.0. Use Placement in itwinui-react instead\r\n */\r\nexport type TooltipPlacement = \"bottom\" | \"left\" | \"right\" | \"top\";\r\n\r\n/** Properties for the [[Tooltip]] component\r\n * @beta\r\n * @deprecated in 3.0. Use TooltipProps in itwinui-react instead\r\n */\r\nexport interface TooltipProps extends CommonProps {\r\n /** Tooltip content. */\r\n children?: React.ReactNode;\r\n /** Target element of a tooltip. */\r\n target?: HTMLElement;\r\n /** Allows to control tooltip visibility state. */\r\n visible?: boolean;\r\n /** Preferred tooltip placement. Defaults to `top`. */\r\n placement?: TooltipPlacement;\r\n}\r\n\r\n/** Component that displays tooltip for a specified target element.\r\n * @beta\r\n * @deprecated in 3.0. Use Tooltip in itwinui-react instead\r\n */\r\nexport function Tooltip(props: TooltipProps) {\r\n const { visible, target, placement } = props;\r\n const [open, setOpen] = React.useState(false);\r\n React.useEffect(() => {\r\n const mouseenter = () => {\r\n setOpen(true);\r\n };\r\n const mouseleave = () => {\r\n setOpen(false);\r\n };\r\n visible === undefined && target && target.addEventListener(\"mouseenter\", mouseenter);\r\n visible === undefined && target && target.addEventListener(\"mouseleave\", mouseleave);\r\n return () => {\r\n visible === undefined && target && target.removeEventListener(\"mouseenter\", mouseenter);\r\n visible === undefined && target && target.removeEventListener(\"mouseleave\", mouseleave);\r\n };\r\n }, [visible, target]);\r\n const className = classnames(\r\n \"core-tooltip-tooltip\",\r\n props.className,\r\n );\r\n return (\r\n <Popup\r\n className={className}\r\n isOpen={props.visible === undefined ? open : props.visible}\r\n position={placementToPosition(placement)}\r\n showShadow={false}\r\n target={target}\r\n >\r\n {props.children}\r\n </Popup>\r\n );\r\n}\r\n\r\n/** @internal */\r\nexport function placementToPosition(placement: TooltipPlacement | undefined): RelativePosition {\r\n switch (placement) {\r\n case \"bottom\":\r\n return RelativePosition.Bottom;\r\n case \"left\":\r\n return RelativePosition.Left;\r\n case \"right\":\r\n return RelativePosition.Right;\r\n case undefined:\r\n case \"top\":\r\n return RelativePosition.Top;\r\n }\r\n}\r\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /** Describes 2d points.
5
5
  * @public
6
- * @deprecated Use [PointProps]($appui-abstract) instead
6
+ * @deprecated in 3.0. Use [PointProps]($appui-abstract) instead
7
7
  */
8
8
  export interface PointProps {
9
9
  readonly x: number;
@@ -1 +1 @@
1
- {"version":3,"file":"PointProps.js","sourceRoot":"","sources":["../../../../src/core-react/utils/PointProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n/** Describes 2d points.\r\n * @public\r\n * @deprecated Use [PointProps]($appui-abstract) instead\r\n */\r\nexport interface PointProps {\r\n readonly x: number;\r\n readonly y: number;\r\n}\r\n"]}
1
+ {"version":3,"file":"PointProps.js","sourceRoot":"","sources":["../../../../src/core-react/utils/PointProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n/** Describes 2d points.\r\n * @public\r\n * @deprecated in 3.0. Use [PointProps]($appui-abstract) instead\r\n */\r\nexport interface PointProps {\r\n readonly x: number;\r\n readonly y: number;\r\n}\r\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { BeUiEvent } from "@itwin/core-bentley";
5
5
  /** iTwin.js UI UiEvent class is a subclass of BeEvent with argument type safety.
6
- * @public @deprecated Use UiEvent in appui-abstract instead
6
+ * @public @deprecated in 3.0. Use UiEvent in appui-abstract instead
7
7
  */
8
8
  export declare class UiEvent<TEventArgs> extends BeUiEvent<TEventArgs> {
9
9
  }
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.UiEvent = void 0;
11
11
  const core_bentley_1 = require("@itwin/core-bentley");
12
12
  /** iTwin.js UI UiEvent class is a subclass of BeEvent with argument type safety.
13
- * @public @deprecated Use UiEvent in appui-abstract instead
13
+ * @public @deprecated in 3.0. Use UiEvent in appui-abstract instead
14
14
  */
15
15
  class UiEvent extends core_bentley_1.BeUiEvent {
16
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"UiEvent.js","sourceRoot":"","sources":["../../../../src/core-react/utils/UiEvent.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAEhD;;GAEG;AACH,MAAa,OAAoB,SAAQ,wBAAqB;CAAI;AAAlE,0BAAkE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport { BeUiEvent } from \"@itwin/core-bentley\";\r\n\r\n/** iTwin.js UI UiEvent class is a subclass of BeEvent with argument type safety.\r\n * @public @deprecated Use UiEvent in appui-abstract instead\r\n */\r\nexport class UiEvent<TEventArgs> extends BeUiEvent<TEventArgs> { }\r\n"]}
1
+ {"version":3,"file":"UiEvent.js","sourceRoot":"","sources":["../../../../src/core-react/utils/UiEvent.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAEhD;;GAEG;AACH,MAAa,OAAoB,SAAQ,wBAAqB;CAAI;AAAlE,0BAAkE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport { BeUiEvent } from \"@itwin/core-bentley\";\r\n\r\n/** iTwin.js UI UiEvent class is a subclass of BeEvent with argument type safety.\r\n * @public @deprecated in 3.0. Use UiEvent in appui-abstract instead\r\n */\r\nexport class UiEvent<TEventArgs> extends BeUiEvent<TEventArgs> { }\r\n"]}
@@ -5,7 +5,7 @@ import * as React from "react";
5
5
  import { CommonProps } from "../utils/Props";
6
6
  /** Sizes for [[Button]] component
7
7
  * @public
8
- * @deprecated Use `size` prop for itwinui-react Button instead
8
+ * @deprecated in 3.0. Use `size` prop for itwinui-react Button instead
9
9
  */
10
10
  export declare enum ButtonSize {
11
11
  Default = "",
@@ -13,7 +13,7 @@ export declare enum ButtonSize {
13
13
  }
14
14
  /** Types for [[Button]] component
15
15
  * @public
16
- * @deprecated Use `styleType` prop for itwinui-react Button instead
16
+ * @deprecated in 3.0. Use `styleType` prop for itwinui-react Button instead
17
17
  */
18
18
  export declare enum ButtonType {
19
19
  Primary = "primary",
@@ -23,7 +23,7 @@ export declare enum ButtonType {
23
23
  }
24
24
  /** Properties for [[Button]] component
25
25
  * @public
26
- * @deprecated Use ButtonProps from itwinui-react instead
26
+ * @deprecated in 3.0. Use ButtonProps from itwinui-react instead
27
27
  */
28
28
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, CommonProps {
29
29
  /** Allow ID to be passed to Button */
@@ -37,7 +37,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
37
37
  }
38
38
  /** Generic button component
39
39
  * @public
40
- * @deprecated Use Button from itwinui-react instead
40
+ * @deprecated in 3.0. Use Button from itwinui-react instead
41
41
  */
42
42
  export declare class Button extends React.PureComponent<ButtonProps> {
43
43
  private getIuiButtonType;
@@ -9,7 +9,7 @@ import * as React from "react";
9
9
  import { Button as ITwinUI_Button } from "@itwin/itwinui-react";
10
10
  /** Sizes for [[Button]] component
11
11
  * @public
12
- * @deprecated Use `size` prop for itwinui-react Button instead
12
+ * @deprecated in 3.0. Use `size` prop for itwinui-react Button instead
13
13
  */
14
14
  export var ButtonSize;
15
15
  (function (ButtonSize) {
@@ -18,7 +18,7 @@ export var ButtonSize;
18
18
  })(ButtonSize || (ButtonSize = {}));
19
19
  /** Types for [[Button]] component
20
20
  * @public
21
- * @deprecated Use `styleType` prop for itwinui-react Button instead
21
+ * @deprecated in 3.0. Use `styleType` prop for itwinui-react Button instead
22
22
  */
23
23
  export var ButtonType;
24
24
  (function (ButtonType) {
@@ -29,7 +29,7 @@ export var ButtonType;
29
29
  })(ButtonType || (ButtonType = {}));
30
30
  /** Generic button component
31
31
  * @public
32
- * @deprecated Use Button from itwinui-react instead
32
+ * @deprecated in 3.0. Use Button from itwinui-react instead
33
33
  */
34
34
  export class Button extends React.PureComponent {
35
35
  constructor() {
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/core-react/button/Button.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,cAAc,EAAsC,MAAM,sBAAsB,CAAC;AAGpG;;;GAGG;AACH,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,0BAAY,CAAA;IACZ,6BAAe,CAAA;AACjB,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,2BAAa,CAAA;IACb,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;AACnB,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAiBD;;;GAGG;AACH,MAAM,OAAO,MAAO,SAAQ,KAAK,CAAC,aAA0B;IAA5D;;QACU,qBAAgB,GAAG,CAAC,UAAuB,EAAE,EAAE;YACrD,IAAI,aAA+C,CAAC;YACpD,QAAQ,UAAU,EAAE;gBAClB,KAAK,UAAU,CAAC,IAAI,EAAE,8CAA8C;oBAClE,aAAa,GAAG,iBAAiB,CAAC;oBAClC,MAAM;gBACR,KAAK,UAAU,CAAC,MAAM,EAAE,8CAA8C;oBACpE,aAAa,GAAG,SAAS,CAAC;oBAC1B,MAAM;gBACR,KAAK,UAAU,CAAC,OAAO,CAAC,CAAE,8CAA8C;gBACxE;oBACE,aAAa,GAAG,KAAK,CAAC;oBACtB,MAAM;aACT;YACD,OAAO,aAAa,CAAC;QACvB,CAAC,CAAC;IAUJ,CAAC;IARiB,MAAM;QACpB,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAE7E,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAExD,mDAAmD;QACnD,OAAO,oBAAC,cAAc,OAAK,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,KAAK,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,GAAI,CAAC;IAC9K,CAAC;CACF;AAED,gBAAgB;AAChB,MAAM,UAAU,sBAAsB,CAAC,UAAuB;IAC5D,IAAI,aAAqB,CAAC;IAC1B,QAAQ,UAAU,EAAE;QAClB,KAAK,UAAU,CAAC,IAAI,EAAE,8CAA8C;YAClE,aAAa,GAAG,qBAAqB,CAAC;YACtC,MAAM;QACR,KAAK,UAAU,CAAC,QAAQ,EAAE,8CAA8C;YACtE,aAAa,GAAG,yBAAyB,CAAC;YAC1C,MAAM;QACR,KAAK,UAAU,CAAC,MAAM,EAAE,8CAA8C;YACpE,aAAa,GAAG,uBAAuB,CAAC;YACxC,MAAM;QACR,KAAK,UAAU,CAAC,OAAO,CAAC,CAAE,8CAA8C;QACxE;YACE,aAAa,GAAG,wBAAwB,CAAC;YACzC,MAAM;KACT;IACD,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Button\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Button as ITwinUI_Button, ButtonProps as ITwinUI_ButtonProps } from \"@itwin/itwinui-react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Sizes for [[Button]] component\r\n * @public\r\n * @deprecated Use `size` prop for itwinui-react Button instead\r\n */\r\nexport enum ButtonSize {\r\n Default = \"\",\r\n Large = \"large\",\r\n}\r\n\r\n/** Types for [[Button]] component\r\n * @public\r\n * @deprecated Use `styleType` prop for itwinui-react Button instead\r\n */\r\nexport enum ButtonType {\r\n Primary = \"primary\",\r\n Blue = \"blue\",\r\n Disabled = \"disabled\",\r\n Hollow = \"hollow\",\r\n}\r\n\r\n/** Properties for [[Button]] component\r\n * @public\r\n * @deprecated Use ButtonProps from itwinui-react instead\r\n */\r\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, CommonProps {\r\n /** Allow ID to be passed to Button */\r\n id?: string;\r\n /** Default and large sizes */\r\n size?: ButtonSize; // eslint-disable-line deprecation/deprecation\r\n /** 4 styles to tweak the content of the button */\r\n buttonType?: ButtonType; // eslint-disable-line deprecation/deprecation\r\n /** A function to be run when the element is clicked */\r\n onClick?: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void);\r\n}\r\n\r\n/** Generic button component\r\n * @public\r\n * @deprecated Use Button from itwinui-react instead\r\n */\r\nexport class Button extends React.PureComponent<ButtonProps> { // eslint-disable-line deprecation/deprecation\r\n private getIuiButtonType = (buttonType?: ButtonType) => { // eslint-disable-line deprecation/deprecation\r\n let iuiButtonType: ITwinUI_ButtonProps[\"styleType\"];\r\n switch (buttonType) {\r\n case ButtonType.Blue: // eslint-disable-line deprecation/deprecation\r\n iuiButtonType = \"high-visibility\";\r\n break;\r\n case ButtonType.Hollow: // eslint-disable-line deprecation/deprecation\r\n iuiButtonType = \"default\";\r\n break;\r\n case ButtonType.Primary: // eslint-disable-line deprecation/deprecation\r\n default:\r\n iuiButtonType = \"cta\";\r\n break;\r\n }\r\n return iuiButtonType;\r\n };\r\n\r\n public override render() {\r\n const { buttonType, size, className, style, onClick, ...props } = this.props;\r\n\r\n const iuiButtonType = this.getIuiButtonType(buttonType);\r\n\r\n // eslint-disable-next-line deprecation/deprecation\r\n return <ITwinUI_Button {...props} className={className} style={style} onClick={onClick} styleType={iuiButtonType} size={size === ButtonSize.Large ? undefined : \"small\"} />;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function getButtonTypeClassName(buttonType?: ButtonType): string { // eslint-disable-line deprecation/deprecation\r\n let typeClassName: string;\r\n switch (buttonType) {\r\n case ButtonType.Blue: // eslint-disable-line deprecation/deprecation\r\n typeClassName = \"uicore-buttons-blue\";\r\n break;\r\n case ButtonType.Disabled: // eslint-disable-line deprecation/deprecation\r\n typeClassName = \"uicore-buttons-disabled\";\r\n break;\r\n case ButtonType.Hollow: // eslint-disable-line deprecation/deprecation\r\n typeClassName = \"uicore-buttons-hollow\";\r\n break;\r\n case ButtonType.Primary: // eslint-disable-line deprecation/deprecation\r\n default:\r\n typeClassName = \"uicore-buttons-primary\";\r\n break;\r\n }\r\n return typeClassName;\r\n}\r\n"]}
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/core-react/button/Button.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,cAAc,EAAsC,MAAM,sBAAsB,CAAC;AAGpG;;;GAGG;AACH,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,0BAAY,CAAA;IACZ,6BAAe,CAAA;AACjB,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,2BAAa,CAAA;IACb,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;AACnB,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAiBD;;;GAGG;AACH,MAAM,OAAO,MAAO,SAAQ,KAAK,CAAC,aAA0B;IAA5D;;QACU,qBAAgB,GAAG,CAAC,UAAuB,EAAE,EAAE;YACrD,IAAI,aAA+C,CAAC;YACpD,QAAQ,UAAU,EAAE;gBAClB,KAAK,UAAU,CAAC,IAAI,EA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AAG,wBAAwB,CAAC;YACzC,MAAM;KACT;IACD,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Button\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Button as ITwinUI_Button, ButtonProps as ITwinUI_ButtonProps } from \"@itwin/itwinui-react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Sizes for [[Button]] component\r\n * @public\r\n * @deprecated in 3.0. Use `size` prop for itwinui-react Button instead\r\n */\r\nexport enum ButtonSize {\r\n Default = \"\",\r\n Large = \"large\",\r\n}\r\n\r\n/** Types for [[Button]] component\r\n * @public\r\n * @deprecated in 3.0. Use `styleType` prop for itwinui-react Button instead\r\n */\r\nexport enum ButtonType {\r\n Primary = \"primary\",\r\n Blue = \"blue\",\r\n Disabled = \"disabled\",\r\n Hollow = \"hollow\",\r\n}\r\n\r\n/** Properties for [[Button]] component\r\n * @public\r\n * @deprecated in 3.0. Use ButtonProps from itwinui-react instead\r\n */\r\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, CommonProps {\r\n /** Allow ID to be passed to Button */\r\n id?: string;\r\n /** Default and large sizes */\r\n size?: ButtonSize; // eslint-disable-line deprecation/deprecation\r\n /** 4 styles to tweak the content of the button */\r\n buttonType?: ButtonType; // eslint-disable-line deprecation/deprecation\r\n /** A function to be run when the element is clicked */\r\n onClick?: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void);\r\n}\r\n\r\n/** Generic button component\r\n * @public\r\n * @deprecated in 3.0. Use Button from itwinui-react instead\r\n */\r\nexport class Button extends React.PureComponent<ButtonProps> { // eslint-disable-line deprecation/deprecation\r\n private getIuiButtonType = (buttonType?: ButtonType) => { // eslint-disable-line deprecation/deprecation\r\n let iuiButtonType: ITwinUI_ButtonProps[\"styleType\"];\r\n switch (buttonType) {\r\n case ButtonType.Blue: // eslint-disable-line deprecation/deprecation\r\n iuiButtonType = \"high-visibility\";\r\n break;\r\n case ButtonType.Hollow: // eslint-disable-line deprecation/deprecation\r\n iuiButtonType = \"default\";\r\n break;\r\n case ButtonType.Primary: // eslint-disable-line deprecation/deprecation\r\n default:\r\n iuiButtonType = \"cta\";\r\n break;\r\n }\r\n return iuiButtonType;\r\n };\r\n\r\n public override render() {\r\n const { buttonType, size, className, style, onClick, ...props } = this.props;\r\n\r\n const iuiButtonType = this.getIuiButtonType(buttonType);\r\n\r\n // eslint-disable-next-line deprecation/deprecation\r\n return <ITwinUI_Button {...props} className={className} style={style} onClick={onClick} styleType={iuiButtonType} size={size === ButtonSize.Large ? undefined : \"small\"} />;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function getButtonTypeClassName(buttonType?: ButtonType): string { // eslint-disable-line deprecation/deprecation\r\n let typeClassName: string;\r\n switch (buttonType) {\r\n case ButtonType.Blue: // eslint-disable-line deprecation/deprecation\r\n typeClassName = \"uicore-buttons-blue\";\r\n break;\r\n case ButtonType.Disabled: // eslint-disable-line deprecation/deprecation\r\n typeClassName = \"uicore-buttons-disabled\";\r\n break;\r\n case ButtonType.Hollow: // eslint-disable-line deprecation/deprecation\r\n typeClassName = \"uicore-buttons-hollow\";\r\n break;\r\n case ButtonType.Primary: // eslint-disable-line deprecation/deprecation\r\n default:\r\n typeClassName = \"uicore-buttons-primary\";\r\n break;\r\n }\r\n return typeClassName;\r\n}\r\n"]}
@@ -7,7 +7,7 @@ import { CommonProps } from "../utils/Props";
7
7
  import { Omit } from "../utils/typeUtils";
8
8
  /** Properties for [[Checkbox]] React component
9
9
  * @public
10
- * @deprecated Use CheckboxProps in itwinui-react instead
10
+ * @deprecated in 3.0. Use CheckboxProps in itwinui-react instead
11
11
  */
12
12
  export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "onClick" | "onBlur">, CommonProps {
13
13
  /** Text that will be shown next to the checkbox. */
@@ -39,7 +39,7 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
39
39
  /** A React component that renders a simple checkbox with label.
40
40
  * It is a wrapper for the `<input type="checkbox">` HTML element.
41
41
  * @public
42
- * @deprecated Use Checkbox in itwinui-react instead
42
+ * @deprecated in 3.0. Use Checkbox in itwinui-react instead
43
43
  */
44
44
  export declare class Checkbox extends React.PureComponent<CheckboxProps> {
45
45
  private _checkboxInput;
@@ -11,7 +11,7 @@ import { mergeRefs } from "../utils/hooks/useRefs";
11
11
  /** A React component that renders a simple checkbox with label.
12
12
  * It is a wrapper for the `<input type="checkbox">` HTML element.
13
13
  * @public
14
- * @deprecated Use Checkbox in itwinui-react instead
14
+ * @deprecated in 3.0. Use Checkbox in itwinui-react instead
15
15
  */
16
16
  export class Checkbox extends React.PureComponent {
17
17
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/core-react/checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAkCnD;;;;GAIG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAK,CAAC,aAA4B;IAI9D,gBAAgB;IAChB,YAAY,KAAoB;QAC9B,KAAK,CAAC,KAAK,CAAC,CAAC;QALP,mBAAc,GAAG,KAAK,CAAC,SAAS,EAAoB,CAAC;QACrD,UAAK,GAAG,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAUvC,qBAAgB,GAAG,CAAC,CAAmB,EAAE,EAAE;YACjD,CAAC,CAAC,eAAe,EAAE,CAAC;QACtB,CAAC,CAAC;QAEM,oBAAe,GAAG,CAAC,CAAmB,EAAE,EAAE;Y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CAAC,CAAC;QAEb,OAAO;QACL,oEAAoE;QACpE,oEAAoE;QACpE,+BAAO,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM;YAC9D,KAAK;gBACJ,8BAAM,SAAS,EAAC,qBAAqB,IAAE,KAAK,CAAQ;YAEtD,+BAAO,IAAI,EAAC,UAAU,EAAC,GAAG,EAAE,IAAI,CAAC,KAAK,KAAM,UAAU,EACpD,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAChE,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,EAAE,IAAI,CAAC,eAAe,GAAI;YAClE,8BAAM,SAAS,EAAC,yBAAyB,GAAQ,CAC1C,CACV,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Checkbox\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { InputStatus } from \"../inputs/InputStatus\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Omit } from \"../utils/typeUtils\";\r\nimport { mergeRefs } from \"../utils/hooks/useRefs\";\r\n\r\n/** Properties for [[Checkbox]] React component\r\n * @public\r\n * @deprecated Use CheckboxProps in itwinui-react instead\r\n */\r\nexport interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"type\" | \"onClick\" | \"onBlur\">, CommonProps {\r\n /** Text that will be shown next to the checkbox. */\r\n label?: string;\r\n /** Indicates checkbox is in an Indeterminate or Partial state, regardless of the `checked` state */\r\n indeterminate?: boolean;\r\n /** Input status like: \"Success\", \"Warning\" or \"Error\" */\r\n status?: InputStatus;\r\n /** Custom CSS class name for the checkbox input element */\r\n inputClassName?: string;\r\n /** Custom CSS Style for the checkbox input element */\r\n inputStyle?: React.CSSProperties;\r\n /** Custom CSS class name for the label element */\r\n labelClassName?: string;\r\n /** Custom CSS Style for the label element */\r\n labelStyle?: React.CSSProperties;\r\n /**\r\n * Event called when checkbox is clicked on. This is a good event to\r\n * use for preventing the action from bubbling to component's parents.\r\n */\r\n onClick?: (e: React.MouseEvent) => void;\r\n /** Event called when checkbox loses focus. */\r\n onBlur?: (e: React.FocusEvent) => void;\r\n /** Indicates whether the checkbox should set focus */\r\n setFocus?: boolean;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n inputRef?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\n/** A React component that renders a simple checkbox with label.\r\n * It is a wrapper for the `<input type=\"checkbox\">` HTML element.\r\n * @public\r\n * @deprecated Use Checkbox in itwinui-react instead\r\n */\r\nexport class Checkbox extends React.PureComponent<CheckboxProps> { // eslint-disable-line deprecation/deprecation\r\n private _checkboxInput = React.createRef<HTMLInputElement>();\r\n private _refs = mergeRefs(this._checkboxInput);\r\n\r\n /** @internal */\r\n constructor(props: CheckboxProps) { // eslint-disable-line deprecation/deprecation\r\n super(props);\r\n\r\n if (props.inputRef)\r\n this._refs = mergeRefs(this._checkboxInput, props.inputRef);\r\n }\r\n\r\n private _onCheckboxClick = (e: React.MouseEvent) => {\r\n e.stopPropagation();\r\n };\r\n\r\n private _onCheckboxBlur = (e: React.FocusEvent) => {\r\n e.stopPropagation();\r\n };\r\n\r\n private _setIndeterminate(indeterminate: boolean) {\r\n // istanbul ignore else\r\n if (this._checkboxInput.current)\r\n this._checkboxInput.current.indeterminate = indeterminate;\r\n }\r\n\r\n public override componentDidMount() {\r\n if (this.props.indeterminate !== undefined)\r\n this._setIndeterminate(this.props.indeterminate);\r\n\r\n if (this.props.setFocus && this._checkboxInput.current)\r\n this._checkboxInput.current.focus();\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate(_prevProps: CheckboxProps) { // eslint-disable-line deprecation/deprecation\r\n if (this.props.indeterminate !== undefined)\r\n this._setIndeterminate(this.props.indeterminate);\r\n }\r\n\r\n public override render() {\r\n const { status, disabled, label, indeterminate, className, inputClassName, inputStyle, labelClassName, labelStyle, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n onClick, onBlur, setFocus, inputRef, ...inputProps } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const checkBoxClass = classnames(\"core-checkbox\",\r\n disabled && \"core-disabled\",\r\n !label && \"core-checkbox-no-label\",\r\n status,\r\n className);\r\n\r\n return (\r\n /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\r\n /* eslint-disable-next-line jsx-a11y/click-events-have-key-events */\r\n <label className={checkBoxClass} onClick={onClick} onBlur={onBlur}>\r\n {label &&\r\n <span className=\"core-checkbox-label\">{label}</span>\r\n }\r\n <input type=\"checkbox\" ref={this._refs} {...inputProps}\r\n disabled={disabled} className={inputClassName} style={inputStyle}\r\n onClick={this._onCheckboxClick} onBlur={this._onCheckboxBlur} />\r\n <span className=\"core-checkbox-checkmark\"></span>\r\n </label >\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/core-react/checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAkCnD;;;;GAIG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAK,CAAC,aAA4B;IAI9D,gBAAgB;IAChB,YAAY,KAAoB;QAC9B,KAAK,CAAC,KAAK,CAAC,CAAC;QALP,mBAAc,GAAG,KAAK,CAAC,SAAS,EAAoB,CAAC;QACrD,UAAK,GAAG,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAUvC,qBAAgB,GAAG,CAAC,CAAmB,EAAE,EAAE;YACjD,CAAC,C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Ae,EAC9C,QAAQ,IAAI,eAAe,EAC3B,CAAC,KAAK,IAAI,wBAAwB,EAClC,MAAM,EACN,SAAS,CAAC,CAAC;QAEb,OAAO;QACL,oEAAoE;QACpE,oEAAoE;QACpE,+BAAO,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM;YAC9D,KAAK;gBACJ,8BAAM,SAAS,EAAC,qBAAqB,IAAE,KAAK,CAAQ;YAEtD,+BAAO,IAAI,EAAC,UAAU,EAAC,GAAG,EAAE,IAAI,CAAC,KAAK,KAAM,UAAU,EACpD,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAChE,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,EAAE,IAAI,CAAC,eAAe,GAAI;YAClE,8BAAM,SAAS,EAAC,yBAAyB,GAAQ,CAC1C,CACV,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Checkbox\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { InputStatus } from \"../inputs/InputStatus\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Omit } from \"../utils/typeUtils\";\r\nimport { mergeRefs } from \"../utils/hooks/useRefs\";\r\n\r\n/** Properties for [[Checkbox]] React component\r\n * @public\r\n * @deprecated in 3.0. Use CheckboxProps in itwinui-react instead\r\n */\r\nexport interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"type\" | \"onClick\" | \"onBlur\">, CommonProps {\r\n /** Text that will be shown next to the checkbox. */\r\n label?: string;\r\n /** Indicates checkbox is in an Indeterminate or Partial state, regardless of the `checked` state */\r\n indeterminate?: boolean;\r\n /** Input status like: \"Success\", \"Warning\" or \"Error\" */\r\n status?: InputStatus;\r\n /** Custom CSS class name for the checkbox input element */\r\n inputClassName?: string;\r\n /** Custom CSS Style for the checkbox input element */\r\n inputStyle?: React.CSSProperties;\r\n /** Custom CSS class name for the label element */\r\n labelClassName?: string;\r\n /** Custom CSS Style for the label element */\r\n labelStyle?: React.CSSProperties;\r\n /**\r\n * Event called when checkbox is clicked on. This is a good event to\r\n * use for preventing the action from bubbling to component's parents.\r\n */\r\n onClick?: (e: React.MouseEvent) => void;\r\n /** Event called when checkbox loses focus. */\r\n onBlur?: (e: React.FocusEvent) => void;\r\n /** Indicates whether the checkbox should set focus */\r\n setFocus?: boolean;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n inputRef?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\n/** A React component that renders a simple checkbox with label.\r\n * It is a wrapper for the `<input type=\"checkbox\">` HTML element.\r\n * @public\r\n * @deprecated in 3.0. Use Checkbox in itwinui-react instead\r\n */\r\nexport class Checkbox extends React.PureComponent<CheckboxProps> { // eslint-disable-line deprecation/deprecation\r\n private _checkboxInput = React.createRef<HTMLInputElement>();\r\n private _refs = mergeRefs(this._checkboxInput);\r\n\r\n /** @internal */\r\n constructor(props: CheckboxProps) { // eslint-disable-line deprecation/deprecation\r\n super(props);\r\n\r\n if (props.inputRef)\r\n this._refs = mergeRefs(this._checkboxInput, props.inputRef);\r\n }\r\n\r\n private _onCheckboxClick = (e: React.MouseEvent) => {\r\n e.stopPropagation();\r\n };\r\n\r\n private _onCheckboxBlur = (e: React.FocusEvent) => {\r\n e.stopPropagation();\r\n };\r\n\r\n private _setIndeterminate(indeterminate: boolean) {\r\n // istanbul ignore else\r\n if (this._checkboxInput.current)\r\n this._checkboxInput.current.indeterminate = indeterminate;\r\n }\r\n\r\n public override componentDidMount() {\r\n if (this.props.indeterminate !== undefined)\r\n this._setIndeterminate(this.props.indeterminate);\r\n\r\n if (this.props.setFocus && this._checkboxInput.current)\r\n this._checkboxInput.current.focus();\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate(_prevProps: CheckboxProps) { // eslint-disable-line deprecation/deprecation\r\n if (this.props.indeterminate !== undefined)\r\n this._setIndeterminate(this.props.indeterminate);\r\n }\r\n\r\n public override render() {\r\n const { status, disabled, label, indeterminate, className, inputClassName, inputStyle, labelClassName, labelStyle, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n onClick, onBlur, setFocus, inputRef, ...inputProps } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const checkBoxClass = classnames(\"core-checkbox\",\r\n disabled && \"core-disabled\",\r\n !label && \"core-checkbox-no-label\",\r\n status,\r\n className);\r\n\r\n return (\r\n /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\r\n /* eslint-disable-next-line jsx-a11y/click-events-have-key-events */\r\n <label className={checkBoxClass} onClick={onClick} onBlur={onBlur}>\r\n {label &&\r\n <span className=\"core-checkbox-label\">{label}</span>\r\n }\r\n <input type=\"checkbox\" ref={this._refs} {...inputProps}\r\n disabled={disabled} className={inputClassName} style={inputStyle}\r\n onClick={this._onCheckboxClick} onBlur={this._onCheckboxBlur} />\r\n <span className=\"core-checkbox-checkmark\"></span>\r\n </label >\r\n );\r\n }\r\n}\r\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /** Enum for button types. Determines button label, and default button style.
5
5
  * @public
6
- * @deprecated Use [DialogButtonType]($appui-abstract) instead
6
+ * @deprecated in 3.0. Use [DialogButtonType]($appui-abstract) instead
7
7
  */
8
8
  export declare enum DialogButtonType {
9
9
  None = "",
@@ -18,7 +18,7 @@ export declare enum DialogButtonType {
18
18
  }
19
19
  /** Enum for button style.
20
20
  * @public
21
- * @deprecated Use [DialogButtonStyle]($appui-abstract) instead
21
+ * @deprecated in 3.0. Use [DialogButtonStyle]($appui-abstract) instead
22
22
  */
23
23
  export declare enum DialogButtonStyle {
24
24
  None = "",
@@ -28,7 +28,7 @@ export declare enum DialogButtonStyle {
28
28
  }
29
29
  /** Interface for a dialog button in a button cluster
30
30
  * @public
31
- * @deprecated Use [DialogButtonDef]($appui-abstract) instead
31
+ * @deprecated in 3.0. Use [DialogButtonDef]($appui-abstract) instead
32
32
  */
33
33
  export interface DialogButtonDef {
34
34
  /** type of button */
@@ -7,7 +7,7 @@
7
7
  */
8
8
  /** Enum for button types. Determines button label, and default button style.
9
9
  * @public
10
- * @deprecated Use [DialogButtonType]($appui-abstract) instead
10
+ * @deprecated in 3.0. Use [DialogButtonType]($appui-abstract) instead
11
11
  */
12
12
  export var DialogButtonType;
13
13
  (function (DialogButtonType) {
@@ -23,7 +23,7 @@ export var DialogButtonType;
23
23
  })(DialogButtonType || (DialogButtonType = {}));
24
24
  /** Enum for button style.
25
25
  * @public
26
- * @deprecated Use [DialogButtonStyle]($appui-abstract) instead
26
+ * @deprecated in 3.0. Use [DialogButtonStyle]($appui-abstract) instead
27
27
  */
28
28
  export var DialogButtonStyle;
29
29
  (function (DialogButtonStyle) {
@@ -1 +1 @@
1
- {"version":3,"file":"DialogButtonDef.js","sourceRoot":"","sources":["../../../../src/core-react/dialog/DialogButtonDef.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;IAGI;AACJ,MAAM,CAAN,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,6BAAS,CAAA;IACT,qCAAiB,CAAA;IACjB,+BAAW,CAAA;IACX,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAVW,gBAAgB,KAAhB,gBAAgB,QAU3B;AAED;;;IAGI;AACJ,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,8BAAS,CAAA;IACT,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;IACtB,iDAA4B,CAAA;AAC9B,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\n/** Enum for button types. Determines button label, and default button style.\r\n * @public\r\n * @deprecated Use [DialogButtonType]($appui-abstract) instead\r\n */\r\nexport enum DialogButtonType {\r\n None = \"\",\r\n Close = \"close\",\r\n OK = \"ok\",\r\n Cancel = \"cancel\",\r\n Yes = \"yes\",\r\n No = \"no\",\r\n Retry = \"retry\",\r\n Next = \"next\",\r\n Previous = \"previous\"\r\n}\r\n\r\n/** Enum for button style.\r\n * @public\r\n * @deprecated Use [DialogButtonStyle]($appui-abstract) instead\r\n */\r\nexport enum DialogButtonStyle {\r\n None = \"\",\r\n Primary = \"iui-cta\",\r\n Hollow = \"iui-default\",\r\n Blue = \"iui-high-visibility\",\r\n}\r\n\r\n/** Interface for a dialog button in a button cluster\r\n * @public\r\n * @deprecated Use [DialogButtonDef]($appui-abstract) instead\r\n */\r\nexport interface DialogButtonDef {\r\n /** type of button */\r\n type: DialogButtonType; // eslint-disable-line deprecation/deprecation\r\n /** Triggered on button click */\r\n onClick: () => void;\r\n /** Which button style to decorate button width */\r\n buttonStyle?: DialogButtonStyle; // eslint-disable-line deprecation/deprecation\r\n /** Disable the button */\r\n disabled?: boolean;\r\n /** Custom label */\r\n label?: string;\r\n /** Custom CSS class */\r\n className?: string;\r\n}\r\n"]}
1
+ {"version":3,"file":"DialogButtonDef.js","sourceRoot":"","sources":["../../../../src/core-react/dialog/DialogButtonDef.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;IAGI;AACJ,MAAM,CAAN,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,6BAAS,CAAA;IACT,qCAAiB,CAAA;IACjB,+BAAW,CAAA;IACX,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAVW,gBAAgB,KAAhB,gBAAgB,QAU3B;AAED;;;IAGI;AACJ,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,8BAAS,CAAA;IACT,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;IACtB,iDAA4B,CAAA;AAC9B,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\n/** Enum for button types. Determines button label, and default button style.\r\n * @public\r\n * @deprecated in 3.0. Use [DialogButtonType]($appui-abstract) instead\r\n */\r\nexport enum DialogButtonType {\r\n None = \"\",\r\n Close = \"close\",\r\n OK = \"ok\",\r\n Cancel = \"cancel\",\r\n Yes = \"yes\",\r\n No = \"no\",\r\n Retry = \"retry\",\r\n Next = \"next\",\r\n Previous = \"previous\"\r\n}\r\n\r\n/** Enum for button style.\r\n * @public\r\n * @deprecated in 3.0. Use [DialogButtonStyle]($appui-abstract) instead\r\n */\r\nexport enum DialogButtonStyle {\r\n None = \"\",\r\n Primary = \"iui-cta\",\r\n Hollow = \"iui-default\",\r\n Blue = \"iui-high-visibility\",\r\n}\r\n\r\n/** Interface for a dialog button in a button cluster\r\n * @public\r\n * @deprecated in 3.0. Use [DialogButtonDef]($appui-abstract) instead\r\n */\r\nexport interface DialogButtonDef {\r\n /** type of button */\r\n type: DialogButtonType; // eslint-disable-line deprecation/deprecation\r\n /** Triggered on button click */\r\n onClick: () => void;\r\n /** Which button style to decorate button width */\r\n buttonStyle?: DialogButtonStyle; // eslint-disable-line deprecation/deprecation\r\n /** Disable the button */\r\n disabled?: boolean;\r\n /** Custom label */\r\n label?: string;\r\n /** Custom CSS class */\r\n className?: string;\r\n}\r\n"]}
@@ -6,7 +6,7 @@ import * as React from "react";
6
6
  import { CommonProps } from "../utils/Props";
7
7
  /** Properties for the [[ExpandableBlock]] React component
8
8
  * @public
9
- * @deprecated Use ExpandableBlockProps from itwinui-react instead
9
+ * @deprecated in 3.0. Use ExpandableBlockProps from itwinui-react instead
10
10
  */
11
11
  export interface ExpandableBlockProps extends CommonProps {
12
12
  /** Label */
@@ -26,7 +26,7 @@ export interface ExpandableBlockProps extends CommonProps {
26
26
  }
27
27
  /** ExpandableBlock React component is a container that shows and hides child content.
28
28
  * @public
29
- * @deprecated Use ExpandableBlock from itwinui-react instead
29
+ * @deprecated in 3.0. Use ExpandableBlock from itwinui-react instead
30
30
  */
31
31
  export declare class ExpandableBlock extends React.PureComponent<ExpandableBlockProps> {
32
32
  render(): JSX.Element;
@@ -10,7 +10,7 @@ import classnames from "classnames";
10
10
  import * as React from "react";
11
11
  /** ExpandableBlock React component is a container that shows and hides child content.
12
12
  * @public
13
- * @deprecated Use ExpandableBlock from itwinui-react instead
13
+ * @deprecated in 3.0. Use ExpandableBlock from itwinui-react instead
14
14
  */
15
15
  export class ExpandableBlock extends React.PureComponent {
16
16
  render() {