@itwin/core-react 3.6.0-dev.55 → 3.6.0-dev.60

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 (241) hide show
  1. package/lib/cjs/core-react/button/Button.d.ts +4 -4
  2. package/lib/cjs/core-react/button/Button.js +3 -3
  3. package/lib/cjs/core-react/button/Button.js.map +1 -1
  4. package/lib/cjs/core-react/checkbox/Checkbox.d.ts +2 -2
  5. package/lib/cjs/core-react/checkbox/Checkbox.js +1 -1
  6. package/lib/cjs/core-react/checkbox/Checkbox.js.map +1 -1
  7. package/lib/cjs/core-react/dialog/DialogButtonDef.d.ts +3 -3
  8. package/lib/cjs/core-react/dialog/DialogButtonDef.js +2 -2
  9. package/lib/cjs/core-react/dialog/DialogButtonDef.js.map +1 -1
  10. package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts +2 -2
  11. package/lib/cjs/core-react/expandable/ExpandableBlock.js +1 -1
  12. package/lib/cjs/core-react/expandable/ExpandableBlock.js.map +1 -1
  13. package/lib/cjs/core-react/form/Field.d.ts +2 -2
  14. package/lib/cjs/core-react/form/Field.js +1 -1
  15. package/lib/cjs/core-react/form/Field.js.map +1 -1
  16. package/lib/cjs/core-react/form/Form.d.ts +5 -5
  17. package/lib/cjs/core-react/form/Form.js +1 -1
  18. package/lib/cjs/core-react/form/Form.js.map +1 -1
  19. package/lib/cjs/core-react/icons/SvgSprite.d.ts +2 -2
  20. package/lib/cjs/core-react/icons/SvgSprite.js +1 -1
  21. package/lib/cjs/core-react/icons/SvgSprite.js.map +1 -1
  22. package/lib/cjs/core-react/inputs/Input.d.ts +2 -2
  23. package/lib/cjs/core-react/inputs/Input.js +1 -1
  24. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  25. package/lib/cjs/core-react/inputs/LabeledInput.d.ts +2 -2
  26. package/lib/cjs/core-react/inputs/LabeledInput.js +1 -1
  27. package/lib/cjs/core-react/inputs/LabeledInput.js.map +1 -1
  28. package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts +2 -2
  29. package/lib/cjs/core-react/inputs/LabeledTextarea.js +1 -1
  30. package/lib/cjs/core-react/inputs/LabeledTextarea.js.map +1 -1
  31. package/lib/cjs/core-react/inputs/Textarea.d.ts +2 -2
  32. package/lib/cjs/core-react/inputs/Textarea.js +1 -1
  33. package/lib/cjs/core-react/inputs/Textarea.js.map +1 -1
  34. package/lib/cjs/core-react/loading/Spinner.d.ts +3 -3
  35. package/lib/cjs/core-react/loading/Spinner.js +2 -2
  36. package/lib/cjs/core-react/loading/Spinner.js.map +1 -1
  37. package/lib/cjs/core-react/messagebox/MessageSeverity.d.ts +1 -1
  38. package/lib/cjs/core-react/messagebox/MessageSeverity.js +1 -1
  39. package/lib/cjs/core-react/messagebox/MessageSeverity.js.map +1 -1
  40. package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts +2 -2
  41. package/lib/cjs/core-react/progress-indicators/ProgressBar.js +1 -1
  42. package/lib/cjs/core-react/progress-indicators/ProgressBar.js.map +1 -1
  43. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts +2 -2
  44. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.js +1 -1
  45. package/lib/cjs/core-react/progress-indicators/ProgressSpinner.js.map +1 -1
  46. package/lib/cjs/core-react/radio/Radio.d.ts +2 -2
  47. package/lib/cjs/core-react/radio/Radio.js +1 -1
  48. package/lib/cjs/core-react/radio/Radio.js.map +1 -1
  49. package/lib/cjs/core-react/select/LabeledSelect.d.ts +2 -2
  50. package/lib/cjs/core-react/select/LabeledSelect.js +1 -1
  51. package/lib/cjs/core-react/select/LabeledSelect.js.map +1 -1
  52. package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts +2 -2
  53. package/lib/cjs/core-react/select/LabeledThemedSelect.js +1 -1
  54. package/lib/cjs/core-react/select/LabeledThemedSelect.js.map +1 -1
  55. package/lib/cjs/core-react/select/Select.d.ts +3 -3
  56. package/lib/cjs/core-react/select/Select.js +1 -1
  57. package/lib/cjs/core-react/select/Select.js.map +1 -1
  58. package/lib/cjs/core-react/select/ThemedSelect.d.ts +4 -4
  59. package/lib/cjs/core-react/select/ThemedSelect.js +1 -1
  60. package/lib/cjs/core-react/select/ThemedSelect.js.map +1 -1
  61. package/lib/cjs/core-react/slider/Slider.d.ts +1 -1
  62. package/lib/cjs/core-react/slider/Slider.js +1 -1
  63. package/lib/cjs/core-react/slider/Slider.js.map +1 -1
  64. package/lib/cjs/core-react/splitbutton/SplitButton.d.ts +2 -2
  65. package/lib/cjs/core-react/splitbutton/SplitButton.js +1 -1
  66. package/lib/cjs/core-react/splitbutton/SplitButton.js.map +1 -1
  67. package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts +1 -1
  68. package/lib/cjs/core-react/tabs/HorizontalTabs.js +1 -1
  69. package/lib/cjs/core-react/tabs/HorizontalTabs.js.map +1 -1
  70. package/lib/cjs/core-react/text/Headline.d.ts +1 -1
  71. package/lib/cjs/core-react/text/Headline.js +1 -1
  72. package/lib/cjs/core-react/text/Headline.js.map +1 -1
  73. package/lib/cjs/core-react/text/LeadingText.d.ts +1 -1
  74. package/lib/cjs/core-react/text/LeadingText.js +1 -1
  75. package/lib/cjs/core-react/text/LeadingText.js.map +1 -1
  76. package/lib/cjs/core-react/text/LeadingText2.d.ts +1 -1
  77. package/lib/cjs/core-react/text/LeadingText2.js +1 -1
  78. package/lib/cjs/core-react/text/LeadingText2.js.map +1 -1
  79. package/lib/cjs/core-react/text/SmallText.d.ts +1 -1
  80. package/lib/cjs/core-react/text/SmallText.js +1 -1
  81. package/lib/cjs/core-react/text/SmallText.js.map +1 -1
  82. package/lib/cjs/core-react/text/Subheading.d.ts +1 -1
  83. package/lib/cjs/core-react/text/Subheading.js +1 -1
  84. package/lib/cjs/core-react/text/Subheading.js.map +1 -1
  85. package/lib/cjs/core-react/text/Subheading2.d.ts +1 -1
  86. package/lib/cjs/core-react/text/Subheading2.js +1 -1
  87. package/lib/cjs/core-react/text/Subheading2.js.map +1 -1
  88. package/lib/cjs/core-react/text/Title.d.ts +1 -1
  89. package/lib/cjs/core-react/text/Title.js +1 -1
  90. package/lib/cjs/core-react/text/Title.js.map +1 -1
  91. package/lib/cjs/core-react/text/Title2.d.ts +1 -1
  92. package/lib/cjs/core-react/text/Title2.js +1 -1
  93. package/lib/cjs/core-react/text/Title2.js.map +1 -1
  94. package/lib/cjs/core-react/tiles/FeaturedTile.d.ts +1 -1
  95. package/lib/cjs/core-react/tiles/FeaturedTile.js +1 -1
  96. package/lib/cjs/core-react/tiles/FeaturedTile.js.map +1 -1
  97. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts +1 -1
  98. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.js +1 -1
  99. package/lib/cjs/core-react/tiles/MinimalFeaturedTile.js.map +1 -1
  100. package/lib/cjs/core-react/tiles/MinimalTile.d.ts +1 -1
  101. package/lib/cjs/core-react/tiles/MinimalTile.js +1 -1
  102. package/lib/cjs/core-react/tiles/MinimalTile.js.map +1 -1
  103. package/lib/cjs/core-react/tiles/Tile.d.ts +2 -2
  104. package/lib/cjs/core-react/tiles/Tile.js +1 -1
  105. package/lib/cjs/core-react/tiles/Tile.js.map +1 -1
  106. package/lib/cjs/core-react/toggle/LabeledToggle.d.ts +2 -2
  107. package/lib/cjs/core-react/toggle/LabeledToggle.js +1 -1
  108. package/lib/cjs/core-react/toggle/LabeledToggle.js.map +1 -1
  109. package/lib/cjs/core-react/toggle/Toggle.d.ts +4 -4
  110. package/lib/cjs/core-react/toggle/Toggle.d.ts.map +1 -1
  111. package/lib/cjs/core-react/toggle/Toggle.js +2 -2
  112. package/lib/cjs/core-react/toggle/Toggle.js.map +1 -1
  113. package/lib/cjs/core-react/tooltip/Tooltip.d.ts +3 -3
  114. package/lib/cjs/core-react/tooltip/Tooltip.js +1 -1
  115. package/lib/cjs/core-react/tooltip/Tooltip.js.map +1 -1
  116. package/lib/cjs/core-react/utils/PointProps.d.ts +1 -1
  117. package/lib/cjs/core-react/utils/PointProps.js.map +1 -1
  118. package/lib/cjs/core-react/utils/UiEvent.d.ts +1 -1
  119. package/lib/cjs/core-react/utils/UiEvent.js +1 -1
  120. package/lib/cjs/core-react/utils/UiEvent.js.map +1 -1
  121. package/lib/esm/core-react/button/Button.d.ts +4 -4
  122. package/lib/esm/core-react/button/Button.js +3 -3
  123. package/lib/esm/core-react/button/Button.js.map +1 -1
  124. package/lib/esm/core-react/checkbox/Checkbox.d.ts +2 -2
  125. package/lib/esm/core-react/checkbox/Checkbox.js +1 -1
  126. package/lib/esm/core-react/checkbox/Checkbox.js.map +1 -1
  127. package/lib/esm/core-react/dialog/DialogButtonDef.d.ts +3 -3
  128. package/lib/esm/core-react/dialog/DialogButtonDef.js +2 -2
  129. package/lib/esm/core-react/dialog/DialogButtonDef.js.map +1 -1
  130. package/lib/esm/core-react/expandable/ExpandableBlock.d.ts +2 -2
  131. package/lib/esm/core-react/expandable/ExpandableBlock.js +1 -1
  132. package/lib/esm/core-react/expandable/ExpandableBlock.js.map +1 -1
  133. package/lib/esm/core-react/form/Field.d.ts +2 -2
  134. package/lib/esm/core-react/form/Field.js +1 -1
  135. package/lib/esm/core-react/form/Field.js.map +1 -1
  136. package/lib/esm/core-react/form/Form.d.ts +5 -5
  137. package/lib/esm/core-react/form/Form.js +1 -1
  138. package/lib/esm/core-react/form/Form.js.map +1 -1
  139. package/lib/esm/core-react/icons/SvgSprite.d.ts +2 -2
  140. package/lib/esm/core-react/icons/SvgSprite.js +1 -1
  141. package/lib/esm/core-react/icons/SvgSprite.js.map +1 -1
  142. package/lib/esm/core-react/inputs/Input.d.ts +2 -2
  143. package/lib/esm/core-react/inputs/Input.js +1 -1
  144. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  145. package/lib/esm/core-react/inputs/LabeledInput.d.ts +2 -2
  146. package/lib/esm/core-react/inputs/LabeledInput.js +1 -1
  147. package/lib/esm/core-react/inputs/LabeledInput.js.map +1 -1
  148. package/lib/esm/core-react/inputs/LabeledTextarea.d.ts +2 -2
  149. package/lib/esm/core-react/inputs/LabeledTextarea.js +1 -1
  150. package/lib/esm/core-react/inputs/LabeledTextarea.js.map +1 -1
  151. package/lib/esm/core-react/inputs/Textarea.d.ts +2 -2
  152. package/lib/esm/core-react/inputs/Textarea.js +1 -1
  153. package/lib/esm/core-react/inputs/Textarea.js.map +1 -1
  154. package/lib/esm/core-react/loading/Spinner.d.ts +3 -3
  155. package/lib/esm/core-react/loading/Spinner.js +2 -2
  156. package/lib/esm/core-react/loading/Spinner.js.map +1 -1
  157. package/lib/esm/core-react/messagebox/MessageSeverity.d.ts +1 -1
  158. package/lib/esm/core-react/messagebox/MessageSeverity.js +1 -1
  159. package/lib/esm/core-react/messagebox/MessageSeverity.js.map +1 -1
  160. package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts +2 -2
  161. package/lib/esm/core-react/progress-indicators/ProgressBar.js +1 -1
  162. package/lib/esm/core-react/progress-indicators/ProgressBar.js.map +1 -1
  163. package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts +2 -2
  164. package/lib/esm/core-react/progress-indicators/ProgressSpinner.js +1 -1
  165. package/lib/esm/core-react/progress-indicators/ProgressSpinner.js.map +1 -1
  166. package/lib/esm/core-react/radio/Radio.d.ts +2 -2
  167. package/lib/esm/core-react/radio/Radio.js +1 -1
  168. package/lib/esm/core-react/radio/Radio.js.map +1 -1
  169. package/lib/esm/core-react/select/LabeledSelect.d.ts +2 -2
  170. package/lib/esm/core-react/select/LabeledSelect.js +1 -1
  171. package/lib/esm/core-react/select/LabeledSelect.js.map +1 -1
  172. package/lib/esm/core-react/select/LabeledThemedSelect.d.ts +2 -2
  173. package/lib/esm/core-react/select/LabeledThemedSelect.js +1 -1
  174. package/lib/esm/core-react/select/LabeledThemedSelect.js.map +1 -1
  175. package/lib/esm/core-react/select/Select.d.ts +3 -3
  176. package/lib/esm/core-react/select/Select.js +1 -1
  177. package/lib/esm/core-react/select/Select.js.map +1 -1
  178. package/lib/esm/core-react/select/ThemedSelect.d.ts +4 -4
  179. package/lib/esm/core-react/select/ThemedSelect.js +1 -1
  180. package/lib/esm/core-react/select/ThemedSelect.js.map +1 -1
  181. package/lib/esm/core-react/slider/Slider.d.ts +1 -1
  182. package/lib/esm/core-react/slider/Slider.js +1 -1
  183. package/lib/esm/core-react/slider/Slider.js.map +1 -1
  184. package/lib/esm/core-react/splitbutton/SplitButton.d.ts +2 -2
  185. package/lib/esm/core-react/splitbutton/SplitButton.js +1 -1
  186. package/lib/esm/core-react/splitbutton/SplitButton.js.map +1 -1
  187. package/lib/esm/core-react/tabs/HorizontalTabs.d.ts +1 -1
  188. package/lib/esm/core-react/tabs/HorizontalTabs.js +1 -1
  189. package/lib/esm/core-react/tabs/HorizontalTabs.js.map +1 -1
  190. package/lib/esm/core-react/text/Headline.d.ts +1 -1
  191. package/lib/esm/core-react/text/Headline.js +1 -1
  192. package/lib/esm/core-react/text/Headline.js.map +1 -1
  193. package/lib/esm/core-react/text/LeadingText.d.ts +1 -1
  194. package/lib/esm/core-react/text/LeadingText.js +1 -1
  195. package/lib/esm/core-react/text/LeadingText.js.map +1 -1
  196. package/lib/esm/core-react/text/LeadingText2.d.ts +1 -1
  197. package/lib/esm/core-react/text/LeadingText2.js +1 -1
  198. package/lib/esm/core-react/text/LeadingText2.js.map +1 -1
  199. package/lib/esm/core-react/text/SmallText.d.ts +1 -1
  200. package/lib/esm/core-react/text/SmallText.js +1 -1
  201. package/lib/esm/core-react/text/SmallText.js.map +1 -1
  202. package/lib/esm/core-react/text/Subheading.d.ts +1 -1
  203. package/lib/esm/core-react/text/Subheading.js +1 -1
  204. package/lib/esm/core-react/text/Subheading.js.map +1 -1
  205. package/lib/esm/core-react/text/Subheading2.d.ts +1 -1
  206. package/lib/esm/core-react/text/Subheading2.js +1 -1
  207. package/lib/esm/core-react/text/Subheading2.js.map +1 -1
  208. package/lib/esm/core-react/text/Title.d.ts +1 -1
  209. package/lib/esm/core-react/text/Title.js +1 -1
  210. package/lib/esm/core-react/text/Title.js.map +1 -1
  211. package/lib/esm/core-react/text/Title2.d.ts +1 -1
  212. package/lib/esm/core-react/text/Title2.js +1 -1
  213. package/lib/esm/core-react/text/Title2.js.map +1 -1
  214. package/lib/esm/core-react/tiles/FeaturedTile.d.ts +1 -1
  215. package/lib/esm/core-react/tiles/FeaturedTile.js +1 -1
  216. package/lib/esm/core-react/tiles/FeaturedTile.js.map +1 -1
  217. package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts +1 -1
  218. package/lib/esm/core-react/tiles/MinimalFeaturedTile.js +1 -1
  219. package/lib/esm/core-react/tiles/MinimalFeaturedTile.js.map +1 -1
  220. package/lib/esm/core-react/tiles/MinimalTile.d.ts +1 -1
  221. package/lib/esm/core-react/tiles/MinimalTile.js +1 -1
  222. package/lib/esm/core-react/tiles/MinimalTile.js.map +1 -1
  223. package/lib/esm/core-react/tiles/Tile.d.ts +2 -2
  224. package/lib/esm/core-react/tiles/Tile.js +1 -1
  225. package/lib/esm/core-react/tiles/Tile.js.map +1 -1
  226. package/lib/esm/core-react/toggle/LabeledToggle.d.ts +2 -2
  227. package/lib/esm/core-react/toggle/LabeledToggle.js +1 -1
  228. package/lib/esm/core-react/toggle/LabeledToggle.js.map +1 -1
  229. package/lib/esm/core-react/toggle/Toggle.d.ts +4 -4
  230. package/lib/esm/core-react/toggle/Toggle.d.ts.map +1 -1
  231. package/lib/esm/core-react/toggle/Toggle.js +2 -2
  232. package/lib/esm/core-react/toggle/Toggle.js.map +1 -1
  233. package/lib/esm/core-react/tooltip/Tooltip.d.ts +3 -3
  234. package/lib/esm/core-react/tooltip/Tooltip.js +1 -1
  235. package/lib/esm/core-react/tooltip/Tooltip.js.map +1 -1
  236. package/lib/esm/core-react/utils/PointProps.d.ts +1 -1
  237. package/lib/esm/core-react/utils/PointProps.js.map +1 -1
  238. package/lib/esm/core-react/utils/UiEvent.d.ts +1 -1
  239. package/lib/esm/core-react/utils/UiEvent.js +1 -1
  240. package/lib/esm/core-react/utils/UiEvent.js.map +1 -1
  241. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandableBlock.js","sourceRoot":"","sources":["../../../../src/core-react/expandable/ExpandableBlock.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,wBAAwB,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAwB/B;;;GAGG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK,CAAC,aAAmC;IAE5D,MAAM;;QACpB,MAAM,KAAK,GAAG,UAAU,CACtB,gCAAgC,EAChC,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,cAAc,EACpC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,EACtD,IAAI,CAAC,KAAK,CAAC,SAAS,CACrB,CAAC;QACF,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;QAC9D,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAEjF,MAAM,KAAK,GAAG,MAAA,IAAI,CAAC,KAAK,CAAC,OAAO,mCAAI,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAEzG,OAAO,CACL,6BAAK,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;YAC5C,6BAAK,IAAI,EAAC,QAAQ,mBAAgB,YAAY,EAAE,SAAS,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC5F,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ;gBACtF,6BAAK,SAAS,EAAC,gBAAgB;oBAC7B,2BAAG,SAAS,EAAC,yBAAyB,GAAG,CACrC;gBACL,IAAI,CAAC,KAAK,CAAC,OAAO;oBACjB,6BAAK,SAAS,EAAC,SAAS,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,IAC/C,IAAI,CAAC,KAAK,CAAC,OAAO,CACf;gBAER,6BAAK,SAAS,EAAC,OAAO,EAAC,KAAK,EAAE,KAAK,IAChC,IAAI,CAAC,KAAK,CAAC,KAAK,CACb,CACF;YACN,6BAAK,SAAS,EAAC,SAAS,IACrB,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CACzC,CACF,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Expandable\r\n */\r\n\r\nimport \"./ExpandableBlock.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[ExpandableBlock]] React component\r\n * @public\r\n * @deprecated Use ExpandableBlockProps from itwinui-react instead\r\n */\r\nexport interface ExpandableBlockProps extends CommonProps {\r\n /** Label */\r\n title: string | JSX.Element;\r\n /** Indicates whether the ExpandableBlock is expanded */\r\n isExpanded: boolean;\r\n /** Callback function for click event */\r\n onClick: React.MouseEventHandler<HTMLDivElement>;\r\n /** Callback function for key press event */\r\n onKeyPress?: React.KeyboardEventHandler<HTMLDivElement>;\r\n /** Callback function for key down event */\r\n onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;\r\n /** Additional text displayed in the block below the label and in a smaller font size */\r\n caption?: string;\r\n /** Custom tooltip for the component. */\r\n tooltip?: string;\r\n}\r\n\r\n/** ExpandableBlock React component is a container that shows and hides child content.\r\n * @public\r\n * @deprecated Use ExpandableBlock from itwinui-react instead\r\n */\r\nexport class ExpandableBlock extends React.PureComponent<ExpandableBlockProps> { // eslint-disable-line deprecation/deprecation\r\n\r\n public override render() {\r\n const cName = classnames(\r\n \"uicore-expandable-blocks-block\",\r\n this.props.caption && \"with-caption\",\r\n this.props.isExpanded ? \"is-expanded\" : \"is-collapsed\",\r\n this.props.className,\r\n );\r\n const ariaExpanded = this.props.isExpanded ? \"true\" : \"false\";\r\n const tabIndex = (this.props.onKeyPress || this.props.onKeyDown) ? 0 : undefined;\r\n\r\n const title = this.props.tooltip ?? (typeof this.props.title == \"string\" ? this.props.title : undefined);\r\n\r\n return (\r\n <div className={cName} style={this.props.style}>\r\n <div role=\"button\" aria-expanded={ariaExpanded} className=\"header\" onClick={this.props.onClick}\r\n onKeyPress={this.props.onKeyPress} onKeyDown={this.props.onKeyDown} tabIndex={tabIndex}>\r\n <div className=\"icon-container\">\r\n <i className=\"icon icon-chevron-right\" />\r\n </div>\r\n {this.props.caption &&\r\n <div className=\"caption\" title={this.props.caption}>\r\n {this.props.caption}\r\n </div>\r\n }\r\n <div className=\"title\" title={title}>\r\n {this.props.title}\r\n </div>\r\n </div>\r\n <div className=\"content\">\r\n {this.props.isExpanded && this.props.children}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ExpandableBlock.js","sourceRoot":"","sources":["../../../../src/core-react/expandable/ExpandableBlock.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,wBAAwB,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MA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C,KAAK,CAAC,OAAO;oBACjB,6BAAK,SAAS,EAAC,SAAS,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,IAC/C,IAAI,CAAC,KAAK,CAAC,OAAO,CACf;gBAER,6BAAK,SAAS,EAAC,OAAO,EAAC,KAAK,EAAE,KAAK,IAChC,IAAI,CAAC,KAAK,CAAC,KAAK,CACb,CACF;YACN,6BAAK,SAAS,EAAC,SAAS,IACrB,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CACzC,CACF,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Expandable\r\n */\r\n\r\nimport \"./ExpandableBlock.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[ExpandableBlock]] React component\r\n * @public\r\n * @deprecated in 3.0. Use ExpandableBlockProps from itwinui-react instead\r\n */\r\nexport interface ExpandableBlockProps extends CommonProps {\r\n /** Label */\r\n title: string | JSX.Element;\r\n /** Indicates whether the ExpandableBlock is expanded */\r\n isExpanded: boolean;\r\n /** Callback function for click event */\r\n onClick: React.MouseEventHandler<HTMLDivElement>;\r\n /** Callback function for key press event */\r\n onKeyPress?: React.KeyboardEventHandler<HTMLDivElement>;\r\n /** Callback function for key down event */\r\n onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;\r\n /** Additional text displayed in the block below the label and in a smaller font size */\r\n caption?: string;\r\n /** Custom tooltip for the component. */\r\n tooltip?: string;\r\n}\r\n\r\n/** ExpandableBlock React component is a container that shows and hides child content.\r\n * @public\r\n * @deprecated in 3.0. Use ExpandableBlock from itwinui-react instead\r\n */\r\nexport class ExpandableBlock extends React.PureComponent<ExpandableBlockProps> { // eslint-disable-line deprecation/deprecation\r\n\r\n public override render() {\r\n const cName = classnames(\r\n \"uicore-expandable-blocks-block\",\r\n this.props.caption && \"with-caption\",\r\n this.props.isExpanded ? \"is-expanded\" : \"is-collapsed\",\r\n this.props.className,\r\n );\r\n const ariaExpanded = this.props.isExpanded ? \"true\" : \"false\";\r\n const tabIndex = (this.props.onKeyPress || this.props.onKeyDown) ? 0 : undefined;\r\n\r\n const title = this.props.tooltip ?? (typeof this.props.title == \"string\" ? this.props.title : undefined);\r\n\r\n return (\r\n <div className={cName} style={this.props.style}>\r\n <div role=\"button\" aria-expanded={ariaExpanded} className=\"header\" onClick={this.props.onClick}\r\n onKeyPress={this.props.onKeyPress} onKeyDown={this.props.onKeyDown} tabIndex={tabIndex}>\r\n <div className=\"icon-container\">\r\n <i className=\"icon icon-chevron-right\" />\r\n </div>\r\n {this.props.caption &&\r\n <div className=\"caption\" title={this.props.caption}>\r\n {this.props.caption}\r\n </div>\r\n }\r\n <div className=\"title\" title={title}>\r\n {this.props.title}\r\n </div>\r\n </div>\r\n <div className=\"content\">\r\n {this.props.isExpanded && this.props.children}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
@@ -4,13 +4,13 @@
4
4
  import * as React from "react";
5
5
  import { FieldDef } from "./Form";
6
6
  /** Properties used to create a [[Field]] in a [[Form]]
7
- * @public @deprecated
7
+ * @public @deprecated in 3.0.
8
8
  */
9
9
  export interface FieldProps extends FieldDef {
10
10
  id: string;
11
11
  }
12
12
  /** Component that represents a single field in an input form. Only four type of editors are supported. Field gets/sets state data from/to the context control by the form.
13
- * @public @deprecated
13
+ * @public @deprecated in 3.0.
14
14
  */
15
15
  export declare class Field extends React.Component<FieldProps> {
16
16
  constructor(props: FieldProps);
@@ -10,7 +10,7 @@ import * as React from "react";
10
10
  import { Checkbox, Input, Select, Textarea } from "@itwin/itwinui-react";
11
11
  import { FormContext } from "./Form";
12
12
  /** Component that represents a single field in an input form. Only four type of editors are supported. Field gets/sets state data from/to the context control by the form.
13
- * @public @deprecated
13
+ * @public @deprecated in 3.0.
14
14
  */
15
15
  export class Field extends React.Component {
16
16
  constructor(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../../src/core-react/form/Field.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAgB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAY,WAAW,EAAoB,MAAM,QAAQ,CAAC;AAcjE;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,KAAK,CAAC,SAAqB;IACpD,YAAY,KAAiB;QAC3B,KAAK,CAAC,KAAK,CAAC,CAAC;QAGP,2BAAsB,GAAG,CAAC,WAA4B,EAA0B,EAAE;YACxF,IAAI,aAAa,GAA2B,EAAE,CAAC;YAE/C,IAAI,WAAW,YAAY,KAAK,EAAE;gBAChC,aAAa,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,MAAc,EAAE,EAAE,CAAC,CAClD,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CACjC,CAAC,CAAC;aACJ;iBAAM,IAAI,WAAW,KAAK,SAAS,EAAE;gBACpC,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACpD,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CACxC,CAAC,CAAC;aACJ;YAED,OAAO,aAAa,CAAC;QACvB,CAAC,CAAC;IAhBF,CAAC;IAkBe,MAAM;QACpB,MAAM,aAAa,GAAG,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CA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AC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,GACxF,CACH;YACA,IAAI,CAAC,KAAK,CAAC,MAAO,CAAC,WAAW,EAAE,KAAK,kBAAkB,IAAI,CAC1D,oBAAC,QAAQ,IACP,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EACjB,KAAK,EAAE,OAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EACrC,QAAQ,EAAE,CAAC,KAA6C,EAAE,EAAE,CAAC,OAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,EAC/H,SAAS,EAAC,oBAAoB,GAC9B,CACH;YACA,IAAI,CAAC,KAAK,CAAC,MAAO,CAAC,WAAW,EAAE,KAAK,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,CACxE,oBAAC,MAAM,IACL,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE;gBACjB,uBAAuB;gBACvB,KAAK,EAAE,OAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EACrC,QAAQ,EAAE,CAAC,QAAa,EAAE,EAAE,CAAC,OAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAC9E,OAAO,EAAE,aAAa,EACtB,SAAS,EAAC,kBAAkB,EAC5B,IAAI,EAAC,OAAO,GACZ,CACH,CACG,CACP,CACoB,CACxB,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/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Form\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Checkbox, Input, Select, SelectOption, Textarea } from \"@itwin/itwinui-react\";\r\nimport { FieldDef, FormContext, FormContextState } from \"./Form\";\r\n\r\n// cSpell:ignore multilinetextbox\r\n\r\n/** Properties used to create a [[Field]] in a [[Form]]\r\n * @public @deprecated\r\n */\r\nexport interface FieldProps extends FieldDef {\r\n /* The unique field name */\r\n id: string;\r\n}\r\n\r\ntype FieldDefOptions = FieldDef[\"options\"];\r\n\r\n/** Component that represents a single field in an input form. Only four type of editors are supported. Field gets/sets state data from/to the context control by the form.\r\n * @public @deprecated\r\n */\r\nexport class Field extends React.Component<FieldProps> {\r\n constructor(props: FieldProps) {\r\n super(props);\r\n }\r\n\r\n private _generateSelectOptions = (propOptions: FieldDefOptions): SelectOption<string>[] => {\r\n let selectOptions: SelectOption<string>[] = [];\r\n\r\n if (propOptions instanceof Array) {\r\n selectOptions = propOptions.map((option: string) => (\r\n { value: option, label: option }\r\n ));\r\n } else if (propOptions !== undefined) {\r\n selectOptions = Object.keys(propOptions).map((key) => (\r\n { value: key, label: propOptions[key] }\r\n ));\r\n }\r\n\r\n return selectOptions;\r\n };\r\n\r\n public override render() {\r\n const selectOptions = this._generateSelectOptions(this.props.options);\r\n\r\n return (\r\n <FormContext.Consumer>\r\n {(context: FormContextState | undefined) => (\r\n <div className=\"core-form-group\">\r\n {this.props.editor!.toLowerCase() !== \"checkbox\" && this.props.label && <label className=\"core-form-label\" htmlFor={this.props.id}>{this.props.label}</label>}\r\n\r\n {this.props.editor!.toLowerCase() === \"textbox\" && (\r\n <Input\r\n id={this.props.id}\r\n value={context!.values[this.props.id]}\r\n onChange={(event: React.ChangeEvent<HTMLInputElement>) => context!.setValues({ [this.props.id]: event.currentTarget.value })}\r\n className=\"core-form-input\"\r\n size=\"small\"\r\n />\r\n )}\r\n {this.props.editor!.toLowerCase() === \"checkbox\" && (\r\n <Checkbox\r\n label={this.props.label}\r\n id={this.props.id}\r\n checked={context!.values[this.props.id]}\r\n onChange={() => context!.setValues({ [this.props.id]: !context!.values[this.props.id] })}\r\n />\r\n )}\r\n {this.props.editor!.toLowerCase() === \"multilinetextbox\" && (\r\n <Textarea\r\n id={this.props.id}\r\n value={context!.values[this.props.id]}\r\n onChange={(event: React.ChangeEvent<HTMLTextAreaElement>) => context!.setValues({ [this.props.id]: event.currentTarget.value })}\r\n className=\"core-form-textarea\"\r\n />\r\n )}\r\n {this.props.editor!.toLowerCase() === \"dropdown\" && this.props.options && (\r\n <Select\r\n id={this.props.id}\r\n // name={this.props.id}\r\n value={context!.values[this.props.id]}\r\n onChange={(newValue: any) => context!.setValues({ [this.props.id]: newValue })}\r\n options={selectOptions}\r\n className=\"core-form-select\"\r\n size=\"small\"\r\n />\r\n )}\r\n </div>\r\n )}\r\n </FormContext.Consumer>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../../src/core-react/form/Field.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAgB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAY,WAAW,EAAoB,MAAM,QAAQ,CAAC;AAcjE;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,KAAK,CAAC,SAAqB;IACpD,YAAY,KAAiB;QAC3B,KAAK,CAAC,KAAK,CAAC,CAAC;QAGP,2BAAsB,GAAG,CAAC,WAA4B,EAA0B,EAAE;YACxF,IAAI,aAAa,GAA2B,EAAE,CAAC;YAE/C,IAAI,WAAW,YAAY,KAAK,EAAE;gBAChC,aAAa,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,MAAc,EAAE,EAAE,CAAC,CAClD,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CACjC,CAAC,CAAC;aACJ;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,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAC9E,OAAO,EAAE,aAAa,EACtB,SAAS,EAAC,kBAAkB,EAC5B,IAAI,EAAC,OAAO,GACZ,CACH,CACG,CACP,CACoB,CACxB,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/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Form\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Checkbox, Input, Select, SelectOption, Textarea } from \"@itwin/itwinui-react\";\r\nimport { FieldDef, FormContext, FormContextState } from \"./Form\";\r\n\r\n// cSpell:ignore multilinetextbox\r\n\r\n/** Properties used to create a [[Field]] in a [[Form]]\r\n * @public @deprecated in 3.0.\r\n */\r\nexport interface FieldProps extends FieldDef {\r\n /* The unique field name */\r\n id: string;\r\n}\r\n\r\ntype FieldDefOptions = FieldDef[\"options\"];\r\n\r\n/** Component that represents a single field in an input form. Only four type of editors are supported. Field gets/sets state data from/to the context control by the form.\r\n * @public @deprecated in 3.0.\r\n */\r\nexport class Field extends React.Component<FieldProps> {\r\n constructor(props: FieldProps) {\r\n super(props);\r\n }\r\n\r\n private _generateSelectOptions = (propOptions: FieldDefOptions): SelectOption<string>[] => {\r\n let selectOptions: SelectOption<string>[] = [];\r\n\r\n if (propOptions instanceof Array) {\r\n selectOptions = propOptions.map((option: string) => (\r\n { value: option, label: option }\r\n ));\r\n } else if (propOptions !== undefined) {\r\n selectOptions = Object.keys(propOptions).map((key) => (\r\n { value: key, label: propOptions[key] }\r\n ));\r\n }\r\n\r\n return selectOptions;\r\n };\r\n\r\n public override render() {\r\n const selectOptions = this._generateSelectOptions(this.props.options);\r\n\r\n return (\r\n <FormContext.Consumer>\r\n {(context: FormContextState | undefined) => (\r\n <div className=\"core-form-group\">\r\n {this.props.editor!.toLowerCase() !== \"checkbox\" && this.props.label && <label className=\"core-form-label\" htmlFor={this.props.id}>{this.props.label}</label>}\r\n\r\n {this.props.editor!.toLowerCase() === \"textbox\" && (\r\n <Input\r\n id={this.props.id}\r\n value={context!.values[this.props.id]}\r\n onChange={(event: React.ChangeEvent<HTMLInputElement>) => context!.setValues({ [this.props.id]: event.currentTarget.value })}\r\n className=\"core-form-input\"\r\n size=\"small\"\r\n />\r\n )}\r\n {this.props.editor!.toLowerCase() === \"checkbox\" && (\r\n <Checkbox\r\n label={this.props.label}\r\n id={this.props.id}\r\n checked={context!.values[this.props.id]}\r\n onChange={() => context!.setValues({ [this.props.id]: !context!.values[this.props.id] })}\r\n />\r\n )}\r\n {this.props.editor!.toLowerCase() === \"multilinetextbox\" && (\r\n <Textarea\r\n id={this.props.id}\r\n value={context!.values[this.props.id]}\r\n onChange={(event: React.ChangeEvent<HTMLTextAreaElement>) => context!.setValues({ [this.props.id]: event.currentTarget.value })}\r\n className=\"core-form-textarea\"\r\n />\r\n )}\r\n {this.props.editor!.toLowerCase() === \"dropdown\" && this.props.options && (\r\n <Select\r\n id={this.props.id}\r\n // name={this.props.id}\r\n value={context!.values[this.props.id]}\r\n onChange={(newValue: any) => context!.setValues({ [this.props.id]: newValue })}\r\n options={selectOptions}\r\n className=\"core-form-select\"\r\n size=\"small\"\r\n />\r\n )}\r\n </div>\r\n )}\r\n </FormContext.Consumer>\r\n );\r\n }\r\n}\r\n"]}
@@ -4,11 +4,11 @@
4
4
  import "./Form.scss";
5
5
  import * as React from "react";
6
6
  /** The available editors for the fields in a [[Form]].
7
- * @public @deprecated
7
+ * @public @deprecated in 3.0.
8
8
  */
9
9
  export declare type FieldEditor = "textbox" | "multilinetextbox" | "dropdown" | "checkbox";
10
10
  /** Interface used to define each [[Field]] in a [[Form]]
11
- * @public @deprecated
11
+ * @public @deprecated in 3.0.
12
12
  */
13
13
  export interface FieldDef {
14
14
  label?: string;
@@ -19,13 +19,13 @@ export interface FieldDef {
19
19
  value?: any;
20
20
  }
21
21
  /** Key/value pairs for all the field values with key being the field HTML Id.
22
- * @public @deprecated
22
+ * @public @deprecated in 3.0.
23
23
  */
24
24
  export interface FieldValues {
25
25
  [key: string]: any;
26
26
  }
27
27
  /** The state data used by [[Form]] to hold state of each [[Field]] and the result of submit button processing.
28
- * @public @deprecated
28
+ * @public @deprecated in 3.0.
29
29
  */
30
30
  interface FormState {
31
31
  values: FieldValues;
@@ -40,7 +40,7 @@ export interface FormContextState extends FormState {
40
40
  setValues: (values: FieldValues) => void;
41
41
  }
42
42
  /** React context used by Form as a Provider and by the Fields as Consumers and updaters.
43
- * @public @deprecated
43
+ * @public @deprecated in 3.0.
44
44
  */
45
45
  export declare const FormContext: React.Context<FormContextState | undefined>;
46
46
  /** Key/value pairs for all the field definitions to be displayed in a [[Form]].
@@ -12,7 +12,7 @@ import { UiCore } from "../UiCore";
12
12
  import { Field } from "./Field";
13
13
  import { Button } from "@itwin/itwinui-react";
14
14
  /** React context used by Form as a Provider and by the Fields as Consumers and updaters.
15
- * @public @deprecated
15
+ * @public @deprecated in 3.0.
16
16
  */
17
17
  // eslint-disable-next-line @typescript-eslint/naming-convention
18
18
  export const FormContext = React.createContext(undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../../src/core-react/form/Form.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAEH,OAAO,aAAa,CAAC;AACrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAuD9C;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAA+B,SAAS,C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GAAG,CAAC,GAAI,CAAC;wBAC3F,6BAAK,SAAS,EAAC,kBAAkB;4BAC/B,6BAAK,SAAS,EAAC,mBAAmB;gCAChC,oBAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,iBAAiB,IAC9C,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CACzD,CACL;4BACL,aAAa,KAAK,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CACtD,6BAAK,SAAS,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,IAAE,GAAG,IAAI,CAAC,YAAY,IAAI,QAAQ,IAAI,IAAI,CAAC,YAAY,EAAE,CAAO,CAC9G,CACG,CACF,CACD,CACH,CACe,CACxB,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/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Form\r\n */\r\n\r\nimport \"./Form.scss\";\r\nimport * as React from \"react\";\r\nimport { UiCore } from \"../UiCore\";\r\nimport { Field } from \"./Field\";\r\nimport { Button } from \"@itwin/itwinui-react\";\r\n\r\n// cSpell:ignore multilinetextbox\r\n\r\n/** The available editors for the fields in a [[Form]].\r\n * @public @deprecated\r\n */\r\nexport type FieldEditor = \"textbox\" | \"multilinetextbox\" | \"dropdown\" | \"checkbox\";\r\n\r\n/** Interface used to define each [[Field]] in a [[Form]]\r\n * @public @deprecated\r\n */\r\nexport interface FieldDef {\r\n /* The label text for the field */\r\n label?: string;\r\n\r\n /* The editor for the field */\r\n editor?: FieldEditor;\r\n\r\n /* The drop down items for the field */\r\n options?: string[] | { [key: string]: string };\r\n\r\n /* The initial field value */\r\n value?: any;\r\n}\r\n\r\n/** Key/value pairs for all the field values with key being the field HTML Id.\r\n * @public @deprecated\r\n */\r\nexport interface FieldValues {\r\n [key: string]: any;\r\n}\r\n\r\n/** The state data used by [[Form]] to hold state of each [[Field]] and the result of submit button processing.\r\n * @public @deprecated\r\n */\r\ninterface FormState {\r\n /* The field values */\r\n values: FieldValues;\r\n\r\n /* The errorMsg message return in catch of async submit button processing */\r\n errorMsg: string;\r\n\r\n /* Whether the form has been successfully submitted */\r\n submitSuccess?: boolean;\r\n}\r\n\r\n/**\r\n * FormContextState combines the Form's state data with the callbacks used to update the value of the state data.\r\n * @public @deprecate\r\n */\r\nexport interface FormContextState extends FormState {\r\n setValues: (values: FieldValues) => void;\r\n}\r\n\r\n/** React context used by Form as a Provider and by the Fields as Consumers and updaters.\r\n * @public @deprecated\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const FormContext = React.createContext<FormContextState | undefined>(undefined);\r\nFormContext.displayName = \"core-react:FormContext\";\r\n\r\n/** Key/value pairs for all the field definitions to be displayed in a [[Form]].\r\n * @public\r\n */\r\nexport interface FieldDefinitions {\r\n [key: string]: FieldDef;\r\n}\r\n\r\n/** Properties that define [[Form]] including the callback to be called when the Submit button is pressed.\r\n * @public\r\n */\r\nexport interface FormProps {\r\n /** Required async callback the processes the Form data and throws and Error if the data cannot be processed. */\r\n handleFormSubmit: (values: FieldValues) => Promise<void>;\r\n /** Definition used to create each Field in the Form. */\r\n fields: FieldDefinitions;\r\n /** Optional label which will override default Submit button label. */\r\n submitButtonLabel?: string;\r\n}\r\n\r\n/** Component used to create a Form using supplied properties to specify the fields of the Form.\r\n * @example\r\n * // Example of using a form as contents of a modal dialog.\r\n * export class ExampleForm extends React.Component {\r\n * public static open() {\r\n * const form = new ExampleForm({});\r\n * ModalDialogManager.openDialog(form.render());\r\n * }\r\n *\r\n * protected async handleSubmit(values: FieldValues): Promise<void> {\r\n * await this.processFormSubmission(values);\r\n * ModalDialogManager.closeDialog();\r\n * const msg = JSON.stringify(values);\r\n * IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, \"Form Submitted\", msg));\r\n * }\r\n *\r\n * protected async processFormSubmission(values: FieldValues): Promise<void> {\r\n * // if error occurs during async processing throw an Error and return error message back to form.\r\n * throw new Error(\"Error processing form\");\r\n * }\r\n *\r\n * protected handleCancel() {\r\n * ModalDialogManager.closeDialog();\r\n * }\r\n *\r\n * public render() {\r\n * const fields: FieldDefinitions = {\r\n * Name: {\r\n * label: this._nameLabel,\r\n * editor: \"textbox\",\r\n * value: \"John Smith\",\r\n * },\r\n * PickList: {\r\n * label: this._pickListLabel,\r\n * editor: \"dropdown\",\r\n * value: \"one\",\r\n * options: [\"one\", \"two\", \"three\", \"four\"],\r\n * },\r\n * };\r\n *\r\n * return (\r\n * <div>\r\n * <Dialog title=\"Example Form\"\r\n * opened={true}\r\n * onClose={() => this.handleCancel()}>\r\n * <Form handleFormSubmit={(values: FieldValues) => this.handleSubmit(values)}\r\n * fields={fields}\r\n * />\r\n * </Dialog>\r\n * </div >\r\n * );\r\n * }\r\n * @public @deprecate\r\n */\r\nexport class Form extends React.Component<FormProps, FormState> {\r\n private _submitButtonLabel = UiCore.translate(\"form.submitButtonLabel\");\r\n private _errorPrefix = UiCore.translate(\"form.errorPrefix\");\r\n private _errorSuffix = UiCore.translate(\"form.errorSuffix\");\r\n\r\n constructor(props: FormProps) {\r\n super(props);\r\n\r\n // set initial values for field values\r\n const values: FieldValues = {};\r\n Object.keys(props.fields).forEach((key) => values[key] = props.fields[key].value);\r\n\r\n this.state = {\r\n errorMsg: \"\",\r\n values,\r\n };\r\n }\r\n\r\n /**\r\n * Returns whether there is an errorMsg message in the state/context\r\n * @param errorMsg - The form errorMsg\r\n */\r\n private haveError(errorMsg: string) {\r\n return errorMsg && errorMsg.length;\r\n }\r\n\r\n private _setValues = (values: FieldValues) => {\r\n this.setState((prevState) => ({ values: { ...prevState.values, ...values } }));\r\n };\r\n\r\n private _handleSubmit = (event: React.FormEvent<HTMLFormElement>, values: FieldValues) => {\r\n event.preventDefault();\r\n\r\n // istanbul ignore next\r\n if (!this.props.handleFormSubmit || !values || 0 === values.length)\r\n throw new Error(\"A handleFormSubmit function and values must be defined\");\r\n\r\n this.props.handleFormSubmit(values)\r\n .then(() => {\r\n // Currently we don't need to do anything if successful. Typically the hosting dialog will close when the\r\n // submission is successful.\r\n // console.log(rtnMsg);\r\n })\r\n .catch((reason: Error) => {\r\n this.setState({ submitSuccess: false, errorMsg: reason.message });\r\n });\r\n };\r\n\r\n public override render() {\r\n const { submitSuccess, errorMsg } = this.state;\r\n const { fields, submitButtonLabel } = this.props;\r\n const context: FormContextState = { ...this.state, setValues: this._setValues };\r\n\r\n return (\r\n <FormContext.Provider value={context}>\r\n <div className=\"core-form-wrapper\">\r\n <form onSubmit={(event: React.FormEvent<HTMLFormElement>) => this._handleSubmit(event, this.state.values)} noValidate={true}>\r\n <div className=\"core-form-container\">\r\n {Object.keys(fields).map((key) => <Field key={key} id={key} {...this.props.fields[key]} />)}\r\n <div className=\"core-form-footer\">\r\n <div className=\"core-form-buttons\">\r\n <Button type=\"submit\" styleType=\"high-visibility\">\r\n {submitButtonLabel ? submitButtonLabel : this._submitButtonLabel}\r\n </Button>\r\n </div>\r\n {submitSuccess === false && this.haveError(errorMsg) && (\r\n <div className=\"core-form-alert\" role=\"alert\">{`${this._errorPrefix}-${errorMsg} ${this._errorSuffix}`}</div>\r\n )}\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </FormContext.Provider>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../../src/core-react/form/Form.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAEH,OAAO,aAAa,CAAC;AACrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS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AC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,oBAAC,KAAK,IAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,KAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,GAAI,CAAC;wBAC3F,6BAAK,SAAS,EAAC,kBAAkB;4BAC/B,6BAAK,SAAS,EAAC,mBAAmB;gCAChC,oBAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,iBAAiB,IAC9C,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CACzD,CACL;4BACL,aAAa,KAAK,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CACtD,6BAAK,SAAS,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,IAAE,GAAG,IAAI,CAAC,YAAY,IAAI,QAAQ,IAAI,IAAI,CAAC,YAAY,EAAE,CAAO,CAC9G,CACG,CACF,CACD,CACH,CACe,CACxB,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/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Form\r\n */\r\n\r\nimport \"./Form.scss\";\r\nimport * as React from \"react\";\r\nimport { UiCore } from \"../UiCore\";\r\nimport { Field } from \"./Field\";\r\nimport { Button } from \"@itwin/itwinui-react\";\r\n\r\n// cSpell:ignore multilinetextbox\r\n\r\n/** The available editors for the fields in a [[Form]].\r\n * @public @deprecated in 3.0.\r\n */\r\nexport type FieldEditor = \"textbox\" | \"multilinetextbox\" | \"dropdown\" | \"checkbox\";\r\n\r\n/** Interface used to define each [[Field]] in a [[Form]]\r\n * @public @deprecated in 3.0.\r\n */\r\nexport interface FieldDef {\r\n /* The label text for the field */\r\n label?: string;\r\n\r\n /* The editor for the field */\r\n editor?: FieldEditor;\r\n\r\n /* The drop down items for the field */\r\n options?: string[] | { [key: string]: string };\r\n\r\n /* The initial field value */\r\n value?: any;\r\n}\r\n\r\n/** Key/value pairs for all the field values with key being the field HTML Id.\r\n * @public @deprecated in 3.0.\r\n */\r\nexport interface FieldValues {\r\n [key: string]: any;\r\n}\r\n\r\n/** The state data used by [[Form]] to hold state of each [[Field]] and the result of submit button processing.\r\n * @public @deprecated in 3.0.\r\n */\r\ninterface FormState {\r\n /* The field values */\r\n values: FieldValues;\r\n\r\n /* The errorMsg message return in catch of async submit button processing */\r\n errorMsg: string;\r\n\r\n /* Whether the form has been successfully submitted */\r\n submitSuccess?: boolean;\r\n}\r\n\r\n/**\r\n * FormContextState combines the Form's state data with the callbacks used to update the value of the state data.\r\n * @public @deprecate\r\n */\r\nexport interface FormContextState extends FormState {\r\n setValues: (values: FieldValues) => void;\r\n}\r\n\r\n/** React context used by Form as a Provider and by the Fields as Consumers and updaters.\r\n * @public @deprecated in 3.0.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const FormContext = React.createContext<FormContextState | undefined>(undefined);\r\nFormContext.displayName = \"core-react:FormContext\";\r\n\r\n/** Key/value pairs for all the field definitions to be displayed in a [[Form]].\r\n * @public\r\n */\r\nexport interface FieldDefinitions {\r\n [key: string]: FieldDef;\r\n}\r\n\r\n/** Properties that define [[Form]] including the callback to be called when the Submit button is pressed.\r\n * @public\r\n */\r\nexport interface FormProps {\r\n /** Required async callback the processes the Form data and throws and Error if the data cannot be processed. */\r\n handleFormSubmit: (values: FieldValues) => Promise<void>;\r\n /** Definition used to create each Field in the Form. */\r\n fields: FieldDefinitions;\r\n /** Optional label which will override default Submit button label. */\r\n submitButtonLabel?: string;\r\n}\r\n\r\n/** Component used to create a Form using supplied properties to specify the fields of the Form.\r\n * @example\r\n * // Example of using a form as contents of a modal dialog.\r\n * export class ExampleForm extends React.Component {\r\n * public static open() {\r\n * const form = new ExampleForm({});\r\n * ModalDialogManager.openDialog(form.render());\r\n * }\r\n *\r\n * protected async handleSubmit(values: FieldValues): Promise<void> {\r\n * await this.processFormSubmission(values);\r\n * ModalDialogManager.closeDialog();\r\n * const msg = JSON.stringify(values);\r\n * IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, \"Form Submitted\", msg));\r\n * }\r\n *\r\n * protected async processFormSubmission(values: FieldValues): Promise<void> {\r\n * // if error occurs during async processing throw an Error and return error message back to form.\r\n * throw new Error(\"Error processing form\");\r\n * }\r\n *\r\n * protected handleCancel() {\r\n * ModalDialogManager.closeDialog();\r\n * }\r\n *\r\n * public render() {\r\n * const fields: FieldDefinitions = {\r\n * Name: {\r\n * label: this._nameLabel,\r\n * editor: \"textbox\",\r\n * value: \"John Smith\",\r\n * },\r\n * PickList: {\r\n * label: this._pickListLabel,\r\n * editor: \"dropdown\",\r\n * value: \"one\",\r\n * options: [\"one\", \"two\", \"three\", \"four\"],\r\n * },\r\n * };\r\n *\r\n * return (\r\n * <div>\r\n * <Dialog title=\"Example Form\"\r\n * opened={true}\r\n * onClose={() => this.handleCancel()}>\r\n * <Form handleFormSubmit={(values: FieldValues) => this.handleSubmit(values)}\r\n * fields={fields}\r\n * />\r\n * </Dialog>\r\n * </div >\r\n * );\r\n * }\r\n * @public @deprecate\r\n */\r\nexport class Form extends React.Component<FormProps, FormState> {\r\n private _submitButtonLabel = UiCore.translate(\"form.submitButtonLabel\");\r\n private _errorPrefix = UiCore.translate(\"form.errorPrefix\");\r\n private _errorSuffix = UiCore.translate(\"form.errorSuffix\");\r\n\r\n constructor(props: FormProps) {\r\n super(props);\r\n\r\n // set initial values for field values\r\n const values: FieldValues = {};\r\n Object.keys(props.fields).forEach((key) => values[key] = props.fields[key].value);\r\n\r\n this.state = {\r\n errorMsg: \"\",\r\n values,\r\n };\r\n }\r\n\r\n /**\r\n * Returns whether there is an errorMsg message in the state/context\r\n * @param errorMsg - The form errorMsg\r\n */\r\n private haveError(errorMsg: string) {\r\n return errorMsg && errorMsg.length;\r\n }\r\n\r\n private _setValues = (values: FieldValues) => {\r\n this.setState((prevState) => ({ values: { ...prevState.values, ...values } }));\r\n };\r\n\r\n private _handleSubmit = (event: React.FormEvent<HTMLFormElement>, values: FieldValues) => {\r\n event.preventDefault();\r\n\r\n // istanbul ignore next\r\n if (!this.props.handleFormSubmit || !values || 0 === values.length)\r\n throw new Error(\"A handleFormSubmit function and values must be defined\");\r\n\r\n this.props.handleFormSubmit(values)\r\n .then(() => {\r\n // Currently we don't need to do anything if successful. Typically the hosting dialog will close when the\r\n // submission is successful.\r\n // console.log(rtnMsg);\r\n })\r\n .catch((reason: Error) => {\r\n this.setState({ submitSuccess: false, errorMsg: reason.message });\r\n });\r\n };\r\n\r\n public override render() {\r\n const { submitSuccess, errorMsg } = this.state;\r\n const { fields, submitButtonLabel } = this.props;\r\n const context: FormContextState = { ...this.state, setValues: this._setValues };\r\n\r\n return (\r\n <FormContext.Provider value={context}>\r\n <div className=\"core-form-wrapper\">\r\n <form onSubmit={(event: React.FormEvent<HTMLFormElement>) => this._handleSubmit(event, this.state.values)} noValidate={true}>\r\n <div className=\"core-form-container\">\r\n {Object.keys(fields).map((key) => <Field key={key} id={key} {...this.props.fields[key]} />)}\r\n <div className=\"core-form-footer\">\r\n <div className=\"core-form-buttons\">\r\n <Button type=\"submit\" styleType=\"high-visibility\">\r\n {submitButtonLabel ? submitButtonLabel : this._submitButtonLabel}\r\n </Button>\r\n </div>\r\n {submitSuccess === false && this.haveError(errorMsg) && (\r\n <div className=\"core-form-alert\" role=\"alert\">{`${this._errorPrefix}-${errorMsg} ${this._errorSuffix}`}</div>\r\n )}\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </FormContext.Provider>\r\n );\r\n }\r\n}\r\n"]}
@@ -5,7 +5,7 @@ import "./SvgSprite.scss";
5
5
  import * as React from "react";
6
6
  import { CommonProps } from "../utils/Props";
7
7
  /** Properties of [[SvgSprite]] component.
8
- * @public @deprecated
8
+ * @public @deprecated in 3.2.
9
9
  */
10
10
  export interface SvgSpriteProps extends CommonProps {
11
11
  /** Source for the Svg */
@@ -13,7 +13,7 @@ export interface SvgSpriteProps extends CommonProps {
13
13
  }
14
14
  /** Svg element wrapper.
15
15
  * This component is deprecate -- use IconComponent
16
- * @public @deprecated
16
+ * @public @deprecated in 3.2.
17
17
  */
18
18
  export declare class SvgSprite extends React.PureComponent<SvgSpriteProps> {
19
19
  render(): JSX.Element;
@@ -11,7 +11,7 @@ import classnames from "classnames";
11
11
  import * as React from "react";
12
12
  /** Svg element wrapper.
13
13
  * This component is deprecate -- use IconComponent
14
- * @public @deprecated
14
+ * @public @deprecated in 3.2.
15
15
  */
16
16
  export class SvgSprite extends React.PureComponent {
17
17
  render() {
@@ -1 +1 @@
1
- {"version":3,"file":"SvgSprite.js","sourceRoot":"","sources":["../../../../src/core-react/icons/SvgSprite.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B;;;GAGG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK,CAAC,aAA6B;IAChD,MAAM;QACpB,MAAM,SAAS,GAAG,UAAU,CAC1B,sBAAsB,EACtB,IAAI,CAAC,KAAK,CAAC,SAAS,CACrB,CAAC;QAEF,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM;YAC5E,6BAAK,UAAU,EAAC,8BAA8B,EAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAI,CACxE,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Icon\r\n */\r\n\r\nimport \"./SvgSprite.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties of [[SvgSprite]] component.\r\n * @public @deprecated\r\n */\r\nexport interface SvgSpriteProps extends CommonProps {\r\n /** Source for the Svg */\r\n src: string;\r\n}\r\n\r\n/** Svg element wrapper.\r\n * This component is deprecate -- use IconComponent\r\n * @public @deprecated\r\n */\r\nexport class SvgSprite extends React.PureComponent<SvgSpriteProps> {\r\n public override render() {\r\n const className = classnames(\r\n \"core-icons-svgSprite\",\r\n this.props.className,\r\n );\r\n\r\n return (\r\n <svg className={className} style={this.props.style} width=\"100%\" height=\"100%\">\r\n <use xmlnsXlink=\"http://www.w3.org/1999/xlink\" xlinkHref={this.props.src} />\r\n </svg>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"SvgSprite.js","sourceRoot":"","sources":["../../../../src/core-react/icons/SvgSprite.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B;;;GAGG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK,CAAC,aAA6B;IAChD,MAAM;QACpB,MAAM,SAAS,GAAG,UAAU,CAC1B,sBAAsB,EACtB,IAAI,CAAC,KAAK,CAAC,SAAS,CACrB,CAAC;QAEF,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM;YAC5E,6BAAK,UAAU,EAAC,8BAA8B,EAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAI,CACxE,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Icon\r\n */\r\n\r\nimport \"./SvgSprite.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties of [[SvgSprite]] component.\r\n * @public @deprecated in 3.2.\r\n */\r\nexport interface SvgSpriteProps extends CommonProps {\r\n /** Source for the Svg */\r\n src: string;\r\n}\r\n\r\n/** Svg element wrapper.\r\n * This component is deprecate -- use IconComponent\r\n * @public @deprecated in 3.2.\r\n */\r\nexport class SvgSprite extends React.PureComponent<SvgSpriteProps> {\r\n public override render() {\r\n const className = classnames(\r\n \"core-icons-svgSprite\",\r\n this.props.className,\r\n );\r\n\r\n return (\r\n <svg className={className} style={this.props.style} width=\"100%\" height=\"100%\">\r\n <use xmlnsXlink=\"http://www.w3.org/1999/xlink\" xlinkHref={this.props.src} />\r\n </svg>\r\n );\r\n }\r\n}\r\n"]}
@@ -5,7 +5,7 @@ import * as React from "react";
5
5
  import { CommonProps } from "../utils/Props";
6
6
  /** Properties for the [[Input]] component
7
7
  * @public
8
- * @deprecated Use InputProps in itwinui-react instead
8
+ * @deprecated in 3.0. Use InputProps in itwinui-react instead
9
9
  */
10
10
  export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps {
11
11
  /** Indicates whether to set focus to the input element */
@@ -17,7 +17,7 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>,
17
17
  }
18
18
  /** Basic text input, is a wrapper for the `<input type="text">` HTML element.
19
19
  * @public
20
- * @deprecated Use Input in itwinui-react instead
20
+ * @deprecated in 3.0. Use Input in itwinui-react instead
21
21
  */
22
22
  export declare const Input: (props: InputProps) => JSX.Element | null;
23
23
  //# sourceMappingURL=Input.d.ts.map
@@ -38,7 +38,7 @@ function ForwardRefInput(props, ref) {
38
38
  });
39
39
  /** Basic text input, is a wrapper for the `<input type="text">` HTML element.
40
40
  * @public
41
- * @deprecated Use Input in itwinui-react instead
41
+ * @deprecated in 3.0. Use Input in itwinui-react instead
42
42
  */
43
43
  export const Input = ForwardRefInput; // eslint-disable-line deprecation/deprecation
44
44
  //# sourceMappingURL=Input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/Input.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAgBjD,0GAA0G;AAC1G,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAAkC,8CAA8C;AACtH,SAAS,eAAe,CAAC,KAAK,EAAE,GAAG;IACjC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC,CAAC,wDAAwD;IAC7I,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAmB,IAAI,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC,CAAE,uGAAuG;IAEpJ,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,cAAc,GAAG,eAAe,CAAC,OAAO,CAAC;QAC/C,MAAM,cAAc,GAAG,gBAAgB,CAAC;QAExC,IAAI,cAAc,IAAI,cAAc,EAAE;YACpC,cAAc,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;SAC5D;QACD,OAAO,GAAG,EAAE;YACV,IAAI,cAAc,IAAI,cAAc,EAAE;gBACpC,cAAc,CAAC,mBAAmB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;aAC/D;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,eAAe,CAAC,OAAO,IAAI,QAAQ;YACrC,eAAe,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACpC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,KAAyC,EAAE,EAAE;QAClF,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,aAAa,IAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,KAAK,UAAU,EAAE,OAAO,EAAE,WAAW,EACxE,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,CAC5E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAA8C,eAAe,CAAC,CAAE,8CAA8C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Inputs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Input as ITwinUI_Input } from \"@itwin/itwinui-react\";\r\nimport { useRefs } from \"../utils/hooks/useRefs\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[Input]] component\r\n * @public\r\n * @deprecated Use InputProps in itwinui-react instead\r\n */\r\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps {\r\n /** Indicates whether to set focus to the input element */\r\n setFocus?: boolean;\r\n /** Native keydown event handler */\r\n nativeKeyHandler?: (e: KeyboardEvent) => void;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\n// Defined using following pattern (const Input at bottom) to ensure useful API documentation is extracted\r\nconst ForwardRefInput = React.forwardRef<HTMLInputElement, InputProps>( // eslint-disable-line deprecation/deprecation\r\n function ForwardRefInput(props, ref) {\r\n const { className, style, setFocus, nativeKeyHandler, size, ...otherProps } = props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const inputElementRef = React.useRef<HTMLInputElement>(null);\r\n const refs = useRefs(inputElementRef, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n\r\n React.useEffect(() => {\r\n const currentElement = inputElementRef.current;\r\n const currentHandler = nativeKeyHandler;\r\n\r\n if (currentElement && currentHandler) {\r\n currentElement.addEventListener(\"keydown\", currentHandler);\r\n }\r\n return () => {\r\n if (currentHandler && currentElement) {\r\n currentElement.removeEventListener(\"keydown\", currentHandler);\r\n }\r\n };\r\n }, [nativeKeyHandler]);\r\n\r\n React.useEffect(() => {\r\n if (inputElementRef.current && setFocus)\r\n inputElementRef.current.focus();\r\n }, [setFocus]);\r\n\r\n const handleFocus = React.useCallback((event: React.FocusEvent<HTMLInputElement>) => {\r\n event.currentTarget.select();\r\n }, []);\r\n\r\n return (\r\n <ITwinUI_Input ref={refs} type=\"text\" {...otherProps} onFocus={handleFocus}\r\n className={classnames(\"uicore-inputs-input\", className)} style={style} />\r\n );\r\n }\r\n);\r\n\r\n/** Basic text input, is a wrapper for the `<input type=\"text\">` HTML element.\r\n * @public\r\n * @deprecated Use Input in itwinui-react instead\r\n */\r\nexport const Input: (props: InputProps) => JSX.Element | null = ForwardRefInput; // eslint-disable-line deprecation/deprecation\r\n"]}
1
+ {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/Input.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAgBjD,0GAA0G;AAC1G,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAAkC,8CAA8C;AACtH,SAAS,eAAe,CAAC,KAAK,EAAE,GAAG;IACjC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC,CAAC,wDAAwD;IAC7I,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAmB,IAAI,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC,CAAE,uGAAuG;IAEpJ,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,cAAc,GAAG,eAAe,CAAC,OAAO,CAAC;QAC/C,MAAM,cAAc,GAAG,gBAAgB,CAAC;QAExC,IAAI,cAAc,IAAI,cAAc,EAAE;YACpC,cAAc,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;SAC5D;QACD,OAAO,GAAG,EAAE;YACV,IAAI,cAAc,IAAI,cAAc,EAAE;gBACpC,cAAc,CAAC,mBAAmB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;aAC/D;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,eAAe,CAAC,OAAO,IAAI,QAAQ;YACrC,eAAe,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACpC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,KAAyC,EAAE,EAAE;QAClF,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,aAAa,IAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,KAAK,UAAU,EAAE,OAAO,EAAE,WAAW,EACxE,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,CAC5E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAA8C,eAAe,CAAC,CAAE,8CAA8C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Inputs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Input as ITwinUI_Input } from \"@itwin/itwinui-react\";\r\nimport { useRefs } from \"../utils/hooks/useRefs\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[Input]] component\r\n * @public\r\n * @deprecated in 3.0. Use InputProps in itwinui-react instead\r\n */\r\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps {\r\n /** Indicates whether to set focus to the input element */\r\n setFocus?: boolean;\r\n /** Native keydown event handler */\r\n nativeKeyHandler?: (e: KeyboardEvent) => void;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\n// Defined using following pattern (const Input at bottom) to ensure useful API documentation is extracted\r\nconst ForwardRefInput = React.forwardRef<HTMLInputElement, InputProps>( // eslint-disable-line deprecation/deprecation\r\n function ForwardRefInput(props, ref) {\r\n const { className, style, setFocus, nativeKeyHandler, size, ...otherProps } = props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const inputElementRef = React.useRef<HTMLInputElement>(null);\r\n const refs = useRefs(inputElementRef, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n\r\n React.useEffect(() => {\r\n const currentElement = inputElementRef.current;\r\n const currentHandler = nativeKeyHandler;\r\n\r\n if (currentElement && currentHandler) {\r\n currentElement.addEventListener(\"keydown\", currentHandler);\r\n }\r\n return () => {\r\n if (currentHandler && currentElement) {\r\n currentElement.removeEventListener(\"keydown\", currentHandler);\r\n }\r\n };\r\n }, [nativeKeyHandler]);\r\n\r\n React.useEffect(() => {\r\n if (inputElementRef.current && setFocus)\r\n inputElementRef.current.focus();\r\n }, [setFocus]);\r\n\r\n const handleFocus = React.useCallback((event: React.FocusEvent<HTMLInputElement>) => {\r\n event.currentTarget.select();\r\n }, []);\r\n\r\n return (\r\n <ITwinUI_Input ref={refs} type=\"text\" {...otherProps} onFocus={handleFocus}\r\n className={classnames(\"uicore-inputs-input\", className)} style={style} />\r\n );\r\n }\r\n);\r\n\r\n/** Basic text input, is a wrapper for the `<input type=\"text\">` HTML element.\r\n * @public\r\n * @deprecated in 3.0. Use Input in itwinui-react instead\r\n */\r\nexport const Input: (props: InputProps) => JSX.Element | null = ForwardRefInput; // eslint-disable-line deprecation/deprecation\r\n"]}
@@ -6,13 +6,13 @@ import { InputProps } from "./Input";
6
6
  import { LabeledComponentProps, MessagedComponentProps } from "./LabeledComponentProps";
7
7
  /** Properties for [[LabeledInput]] components
8
8
  * @public
9
- * @deprecated Use LabeledInputProps in itwinui-react instead
9
+ * @deprecated in 3.0. Use LabeledInputProps in itwinui-react instead
10
10
  */
11
11
  export interface LabeledInputProps extends InputProps, LabeledComponentProps, MessagedComponentProps {
12
12
  }
13
13
  /** Text input wrapper that provides additional styling and labeling
14
14
  * @public
15
- * @deprecated Use LabeledInput in itwinui-react instead
15
+ * @deprecated in 3.0. Use LabeledInput in itwinui-react instead
16
16
  */
17
17
  export declare function LabeledInput(props: LabeledInputProps): JSX.Element;
18
18
  //# sourceMappingURL=LabeledInput.d.ts.map
@@ -10,7 +10,7 @@ import * as React from "react";
10
10
  import { Input } from "./Input";
11
11
  /** Text input wrapper that provides additional styling and labeling
12
12
  * @public
13
- * @deprecated Use LabeledInput in itwinui-react instead
13
+ * @deprecated in 3.0. Use LabeledInput in itwinui-react instead
14
14
  */
15
15
  export function LabeledInput(props) {
16
16
  const { label, status, className, style, inputClassName, inputStyle, labelClassName, labelStyle, disabled, message, messageClassName, messageStyle, ...otherProps } = props;
@@ -1 +1 @@
1
- {"version":3,"file":"LabeledInput.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/LabeledInput.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAc,MAAM,SAAS,CAAC;AAW5C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EACrC,cAAc,EAAE,UAAU,EAC1B,cAAc,EAAE,UAAU,EAAE,QAAQ,EACpC,OAAO,EAAE,gBAAgB,EAAE,YAAY,EACvC,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAE1B,OAAO,CACL,+BAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CACxC,6BAA6B,EAC7B,QAAQ,IAAI,iBAAiB,EAC7B,MAAM,EACN,SAAS,CACV;QACE,KAAK;YACJ,6BAAK,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU;;gBAAI,KAAK;oBAAQ;QAEhG,6BAAK,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;YAC5D,oBAAC,KAAK,IAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,KAAM,UAAU,GAAI;YAC1F,MAAM;gBACL,2BAAG,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,eAAe,MAAM,EAAE,CAAC,GAAI,CAE3D;QACL,OAAO;YACN,6BAAK,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,IAAG,OAAO,CAAO,CAEhG,CACT,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Inputs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Input, InputProps } from \"./Input\";\r\nimport { LabeledComponentProps, MessagedComponentProps } from \"./LabeledComponentProps\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** Properties for [[LabeledInput]] components\r\n * @public\r\n * @deprecated Use LabeledInputProps in itwinui-react instead\r\n */\r\nexport interface LabeledInputProps extends InputProps, LabeledComponentProps, MessagedComponentProps { } // eslint-disable-line deprecation/deprecation\r\n\r\n/** Text input wrapper that provides additional styling and labeling\r\n * @public\r\n * @deprecated Use LabeledInput in itwinui-react instead\r\n */\r\nexport function LabeledInput(props: LabeledInputProps) { // eslint-disable-line deprecation/deprecation\r\n const { label, status, className, style,\r\n inputClassName, inputStyle,\r\n labelClassName, labelStyle, disabled,\r\n message, messageClassName, messageStyle,\r\n ...otherProps } = props;\r\n\r\n return (\r\n <label style={style} className={classnames(\r\n \"uicore-inputs-labeled-input\",\r\n disabled && \"uicore-disabled\",\r\n status,\r\n className,\r\n )}>\r\n {label &&\r\n <div className={classnames(\"uicore-label\", labelClassName)} style={labelStyle}> {label} </div>\r\n }\r\n <div className={classnames(\"input\", { \"with-icon\": !!status })}>\r\n <Input disabled={disabled} className={inputClassName} style={inputStyle} {...otherProps} />\r\n {status &&\r\n <i className={classnames(\"icon\", `icon-status-${status}`)} />\r\n }\r\n </div>\r\n {message &&\r\n <div className={classnames(\"uicore-message\", messageClassName)} style={messageStyle}>{message}</div>\r\n }\r\n </label>\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"LabeledInput.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/LabeledInput.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAc,MAAM,SAAS,CAAC;AAW5C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EACrC,cAAc,EAAE,UAAU,EAC1B,cAAc,EAAE,UAAU,EAAE,QAAQ,EACpC,OAAO,EAAE,gBAAgB,EAAE,YAAY,EACvC,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAE1B,OAAO,CACL,+BAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CACxC,6BAA6B,EAC7B,QAAQ,IAAI,iBAAiB,EAC7B,MAAM,EACN,SAAS,CACV;QACE,KAAK;YACJ,6BAAK,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU;;gBAAI,KAAK;oBAAQ;QAEhG,6BAAK,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;YAC5D,oBAAC,KAAK,IAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,KAAM,UAAU,GAAI;YAC1F,MAAM;gBACL,2BAAG,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,eAAe,MAAM,EAAE,CAAC,GAAI,CAE3D;QACL,OAAO;YACN,6BAAK,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,IAAG,OAAO,CAAO,CAEhG,CACT,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Inputs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Input, InputProps } from \"./Input\";\r\nimport { LabeledComponentProps, MessagedComponentProps } from \"./LabeledComponentProps\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** Properties for [[LabeledInput]] components\r\n * @public\r\n * @deprecated in 3.0. Use LabeledInputProps in itwinui-react instead\r\n */\r\nexport interface LabeledInputProps extends InputProps, LabeledComponentProps, MessagedComponentProps { } // eslint-disable-line deprecation/deprecation\r\n\r\n/** Text input wrapper that provides additional styling and labeling\r\n * @public\r\n * @deprecated in 3.0. Use LabeledInput in itwinui-react instead\r\n */\r\nexport function LabeledInput(props: LabeledInputProps) { // eslint-disable-line deprecation/deprecation\r\n const { label, status, className, style,\r\n inputClassName, inputStyle,\r\n labelClassName, labelStyle, disabled,\r\n message, messageClassName, messageStyle,\r\n ...otherProps } = props;\r\n\r\n return (\r\n <label style={style} className={classnames(\r\n \"uicore-inputs-labeled-input\",\r\n disabled && \"uicore-disabled\",\r\n status,\r\n className,\r\n )}>\r\n {label &&\r\n <div className={classnames(\"uicore-label\", labelClassName)} style={labelStyle}> {label} </div>\r\n }\r\n <div className={classnames(\"input\", { \"with-icon\": !!status })}>\r\n <Input disabled={disabled} className={inputClassName} style={inputStyle} {...otherProps} />\r\n {status &&\r\n <i className={classnames(\"icon\", `icon-status-${status}`)} />\r\n }\r\n </div>\r\n {message &&\r\n <div className={classnames(\"uicore-message\", messageClassName)} style={messageStyle}>{message}</div>\r\n }\r\n </label>\r\n );\r\n}\r\n"]}
@@ -6,13 +6,13 @@ import { LabeledComponentProps, MessagedComponentProps } from "./LabeledComponen
6
6
  import { TextareaProps } from "./Textarea";
7
7
  /** Properties for [[LabeledTextarea]] component
8
8
  * @public
9
- * @deprecated Use LabeledTextareaProps in itwinui-react instead
9
+ * @deprecated in 3.0. Use LabeledTextareaProps in itwinui-react instead
10
10
  */
11
11
  export interface LabeledTextareaProps extends TextareaProps, LabeledComponentProps, MessagedComponentProps {
12
12
  }
13
13
  /** Textarea wrapper that allows for additional styling and labelling
14
14
  * @public
15
- * @deprecated Use LabeledTextarea in itwinui-react instead
15
+ * @deprecated in 3.0. Use LabeledTextarea in itwinui-react instead
16
16
  */
17
17
  export declare function LabeledTextarea(props: LabeledTextareaProps): JSX.Element;
18
18
  //# sourceMappingURL=LabeledTextarea.d.ts.map
@@ -10,7 +10,7 @@ import * as React from "react";
10
10
  import { Textarea } from "./Textarea";
11
11
  /** Textarea wrapper that allows for additional styling and labelling
12
12
  * @public
13
- * @deprecated Use LabeledTextarea in itwinui-react instead
13
+ * @deprecated in 3.0. Use LabeledTextarea in itwinui-react instead
14
14
  */
15
15
  export function LabeledTextarea(props) {
16
16
  const { label, status, className, disabled, style, // eslint-disable-line @typescript-eslint/no-unused-vars
@@ -1 +1 @@
1
- {"version":3,"file":"LabeledTextarea.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/LabeledTextarea.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAUrD;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,wDAAwD;IACzG,cAAc,EAAE,UAAU,EAC1B,cAAc,EAAE,UAAU,EAC1B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EACvC,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAE1B,OAAO,CACL,+BAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CACxC,gCAAgC,EAChC,QAAQ,IAAI,iBAAiB,EAC7B,MAAM,EACN,SAAS,CACV;QACE,KAAK;YACJ,6BAAK,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU;;gBAAI,KAAK;oBAAQ;QAEhG,oBAAC,QAAQ,IAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,KAAM,UAAU,GAAI;QAC7F,OAAO;YACN,6BAAK,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,IAAG,OAAO,CAAO,CAEhG,CACT,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Inputs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { LabeledComponentProps, MessagedComponentProps } from \"./LabeledComponentProps\";\r\nimport { Textarea, TextareaProps } from \"./Textarea\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** Properties for [[LabeledTextarea]] component\r\n * @public\r\n * @deprecated Use LabeledTextareaProps in itwinui-react instead\r\n */\r\nexport interface LabeledTextareaProps extends TextareaProps, LabeledComponentProps, MessagedComponentProps { } // eslint-disable-line deprecation/deprecation\r\n\r\n/** Textarea wrapper that allows for additional styling and labelling\r\n * @public\r\n * @deprecated Use LabeledTextarea in itwinui-react instead\r\n */\r\nexport function LabeledTextarea(props: LabeledTextareaProps) { // eslint-disable-line deprecation/deprecation\r\n const { label, status, className, disabled, style, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n inputClassName, inputStyle,\r\n labelClassName, labelStyle,\r\n message, messageClassName, messageStyle,\r\n ...otherProps } = props;\r\n\r\n return (\r\n <label style={style} className={classnames(\r\n \"uicore-inputs-labeled-textarea\",\r\n disabled && \"uicore-disabled\",\r\n status,\r\n className,\r\n )}>\r\n {label &&\r\n <div className={classnames(\"uicore-label\", labelClassName)} style={labelStyle}> {label} </div>\r\n }\r\n <Textarea disabled={disabled} className={inputClassName} style={inputStyle} {...otherProps} />\r\n {message &&\r\n <div className={classnames(\"uicore-message\", messageClassName)} style={messageStyle}>{message}</div>\r\n }\r\n </label>\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"LabeledTextarea.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/LabeledTextarea.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAUrD;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,wDAAwD;IACzG,cAAc,EAAE,UAAU,EAC1B,cAAc,EAAE,UAAU,EAC1B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EACvC,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAE1B,OAAO,CACL,+BAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CACxC,gCAAgC,EAChC,QAAQ,IAAI,iBAAiB,EAC7B,MAAM,EACN,SAAS,CACV;QACE,KAAK;YACJ,6BAAK,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU;;gBAAI,KAAK;oBAAQ;QAEhG,oBAAC,QAAQ,IAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,KAAM,UAAU,GAAI;QAC7F,OAAO;YACN,6BAAK,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,IAAG,OAAO,CAAO,CAEhG,CACT,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Inputs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { LabeledComponentProps, MessagedComponentProps } from \"./LabeledComponentProps\";\r\nimport { Textarea, TextareaProps } from \"./Textarea\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** Properties for [[LabeledTextarea]] component\r\n * @public\r\n * @deprecated in 3.0. Use LabeledTextareaProps in itwinui-react instead\r\n */\r\nexport interface LabeledTextareaProps extends TextareaProps, LabeledComponentProps, MessagedComponentProps { } // eslint-disable-line deprecation/deprecation\r\n\r\n/** Textarea wrapper that allows for additional styling and labelling\r\n * @public\r\n * @deprecated in 3.0. Use LabeledTextarea in itwinui-react instead\r\n */\r\nexport function LabeledTextarea(props: LabeledTextareaProps) { // eslint-disable-line deprecation/deprecation\r\n const { label, status, className, disabled, style, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n inputClassName, inputStyle,\r\n labelClassName, labelStyle,\r\n message, messageClassName, messageStyle,\r\n ...otherProps } = props;\r\n\r\n return (\r\n <label style={style} className={classnames(\r\n \"uicore-inputs-labeled-textarea\",\r\n disabled && \"uicore-disabled\",\r\n status,\r\n className,\r\n )}>\r\n {label &&\r\n <div className={classnames(\"uicore-label\", labelClassName)} style={labelStyle}> {label} </div>\r\n }\r\n <Textarea disabled={disabled} className={inputClassName} style={inputStyle} {...otherProps} />\r\n {message &&\r\n <div className={classnames(\"uicore-message\", messageClassName)} style={messageStyle}>{message}</div>\r\n }\r\n </label>\r\n );\r\n}\r\n"]}
@@ -5,7 +5,7 @@ import * as React from "react";
5
5
  import { CommonProps } from "../utils/Props";
6
6
  /** Properties for [[Textarea]] component
7
7
  * @public
8
- * @deprecated Use TextareaProps in itwinui-react instead
8
+ * @deprecated in 3.0. Use TextareaProps in itwinui-react instead
9
9
  */
10
10
  export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, CommonProps {
11
11
  /** Number of textarea rows. Default is 3. */
@@ -17,7 +17,7 @@ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextArea
17
17
  }
18
18
  /** Basic textarea component
19
19
  * @public
20
- * @deprecated Use Textarea in itwinui-react instead
20
+ * @deprecated in 3.0. Use Textarea in itwinui-react instead
21
21
  */
22
22
  export declare const Textarea: (props: TextareaProps) => JSX.Element | null;
23
23
  //# sourceMappingURL=Textarea.d.ts.map
@@ -27,7 +27,7 @@ function ForwardRefTextarea(props, ref) {
27
27
  });
28
28
  /** Basic textarea component
29
29
  * @public
30
- * @deprecated Use Textarea in itwinui-react instead
30
+ * @deprecated in 3.0. Use Textarea in itwinui-react instead
31
31
  */
32
32
  export const Textarea = ForwardRefTextarea; // eslint-disable-line deprecation/deprecation
33
33
  //#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EAC9B,GAAG,EAAE,IAAI,EACT,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,UAAU,CAAC,wBAAwB,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,CAC/E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAiD,kBAAkB,CAAC,CAAG,8CAA8C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Inputs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Textarea as ITwinUI_Textarea } from \"@itwin/itwinui-react\";\r\nimport { useRefs } from \"../utils/hooks/useRefs\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for [[Textarea]] component\r\n * @public\r\n * @deprecated Use TextareaProps in itwinui-react instead\r\n */\r\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, CommonProps {\r\n /** Number of textarea rows. Default is 3. */\r\n rows?: number;\r\n /** Indicates whether to set focus to the textarea element */\r\n setFocus?: boolean;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLTextAreaElement>;\r\n}\r\n\r\n// Defined using following pattern (const Input at bottom) to ensure useful API documentation is extracted\r\nconst ForwardRefTextarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>( // eslint-disable-line deprecation/deprecation\r\n function ForwardRefTextarea(props, ref) {\r\n const { className, style, rows, setFocus, ...otherProps } = props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const textRows = undefined !== rows ? rows : 3;\r\n const textAreaElementRef = React.useRef<HTMLTextAreaElement>(null);\r\n const refs = useRefs(textAreaElementRef, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n\r\n React.useEffect(() => {\r\n if (textAreaElementRef.current && setFocus)\r\n textAreaElementRef.current.focus();\r\n }, [setFocus]);\r\n\r\n const handleFocus = React.useCallback((event: React.FocusEvent<HTMLTextAreaElement>) => {\r\n event.currentTarget.select();\r\n }, []);\r\n\r\n return (\r\n <ITwinUI_Textarea {...otherProps}\r\n ref={refs}\r\n rows={textRows}\r\n onFocus={handleFocus}\r\n className={classnames(\"uicore-inputs-textarea\", className)} style={style} />\r\n );\r\n }\r\n);\r\n\r\n/** Basic textarea component\r\n * @public\r\n * @deprecated Use Textarea in itwinui-react instead\r\n */\r\nexport const Textarea: (props: TextareaProps) => JSX.Element | null = ForwardRefTextarea; // eslint-disable-line deprecation/deprecation\r\n"]}
1
+ {"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/Textarea.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAgBjD,0GAA0G;AAC1G,MAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAAyC,8CAA8C;AAChI,SAAS,kBAAkB,CAAC,KAAK,EAAE,GAAG;IACpC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC,CAAC,wDAAwD;IAC3H,MAAM,QAAQ,GAAG,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAAsB,IAAI,CAAC,CAAC;IACnE,MAAM,IAAI,GAAG,OAAO,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC,CAAE,uGAAuG;IAEvJ,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,kBAAkB,CAAC,OAAO,IAAI,QAAQ;YACxC,kBAAkB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,KAA4C,EAAE,EAAE;QACrF,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,gBAAgB,OAAK,UAAU,EAC9B,GAAG,EAAE,IAAI,EACT,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,UAAU,CAAC,wBAAwB,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,CAC/E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAiD,kBAAkB,CAAC,CAAG,8CAA8C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Inputs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Textarea as ITwinUI_Textarea } from \"@itwin/itwinui-react\";\r\nimport { useRefs } from \"../utils/hooks/useRefs\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for [[Textarea]] component\r\n * @public\r\n * @deprecated in 3.0. Use TextareaProps in itwinui-react instead\r\n */\r\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, CommonProps {\r\n /** Number of textarea rows. Default is 3. */\r\n rows?: number;\r\n /** Indicates whether to set focus to the textarea element */\r\n setFocus?: boolean;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLTextAreaElement>;\r\n}\r\n\r\n// Defined using following pattern (const Input at bottom) to ensure useful API documentation is extracted\r\nconst ForwardRefTextarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>( // eslint-disable-line deprecation/deprecation\r\n function ForwardRefTextarea(props, ref) {\r\n const { className, style, rows, setFocus, ...otherProps } = props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const textRows = undefined !== rows ? rows : 3;\r\n const textAreaElementRef = React.useRef<HTMLTextAreaElement>(null);\r\n const refs = useRefs(textAreaElementRef, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n\r\n React.useEffect(() => {\r\n if (textAreaElementRef.current && setFocus)\r\n textAreaElementRef.current.focus();\r\n }, [setFocus]);\r\n\r\n const handleFocus = React.useCallback((event: React.FocusEvent<HTMLTextAreaElement>) => {\r\n event.currentTarget.select();\r\n }, []);\r\n\r\n return (\r\n <ITwinUI_Textarea {...otherProps}\r\n ref={refs}\r\n rows={textRows}\r\n onFocus={handleFocus}\r\n className={classnames(\"uicore-inputs-textarea\", className)} style={style} />\r\n );\r\n }\r\n);\r\n\r\n/** Basic textarea component\r\n * @public\r\n * @deprecated in 3.0. Use Textarea in itwinui-react instead\r\n */\r\nexport const Textarea: (props: TextareaProps) => JSX.Element | null = ForwardRefTextarea; // eslint-disable-line deprecation/deprecation\r\n"]}
@@ -5,7 +5,7 @@ import "./Spinner.scss";
5
5
  import * as React from "react";
6
6
  /** Size for [[Spinner]] component
7
7
  * @public
8
- * @deprecated Use `size` in ProgressRadialProps in itwinui-react instead.
8
+ * @deprecated in 3.0. Use `size` in ProgressRadialProps in itwinui-react instead.
9
9
  */
10
10
  export declare enum SpinnerSize {
11
11
  /** width/height of 16px */
@@ -19,7 +19,7 @@ export declare enum SpinnerSize {
19
19
  }
20
20
  /** Properties for [[Spinner]] component
21
21
  * @public
22
- * @deprecated Use ProgressRadialProps in itwinui-react instead.
22
+ * @deprecated in 3.0. Use ProgressRadialProps in itwinui-react instead.
23
23
  */
24
24
  export interface SpinnerProps {
25
25
  /** Size of spinner */
@@ -30,7 +30,7 @@ export interface SpinnerProps {
30
30
  /**
31
31
  * An indeterminate spinner component.
32
32
  * @public
33
- * @deprecated Use ProgressRadial in itwinui-react with `indeterminate` prop instead.
33
+ * @deprecated in 3.0. Use ProgressRadial in itwinui-react with `indeterminate` prop instead.
34
34
  */
35
35
  export declare class Spinner extends React.PureComponent<SpinnerProps> {
36
36
  render(): JSX.Element;
@@ -11,7 +11,7 @@ import * as React from "react";
11
11
  // cspell:ignore xlarge
12
12
  /** Size for [[Spinner]] component
13
13
  * @public
14
- * @deprecated Use `size` in ProgressRadialProps in itwinui-react instead.
14
+ * @deprecated in 3.0. Use `size` in ProgressRadialProps in itwinui-react instead.
15
15
  */
16
16
  export var SpinnerSize;
17
17
  (function (SpinnerSize) {
@@ -27,7 +27,7 @@ export var SpinnerSize;
27
27
  /**
28
28
  * An indeterminate spinner component.
29
29
  * @public
30
- * @deprecated Use ProgressRadial in itwinui-react with `indeterminate` prop instead.
30
+ * @deprecated in 3.0. Use ProgressRadial in itwinui-react with `indeterminate` prop instead.
31
31
  */
32
32
  export class Spinner extends React.PureComponent {
33
33
  render() {
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../../../../src/core-react/loading/Spinner.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,gBAAgB,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,4CAA4C;AAC5C,uBAAuB;AAEvB;;;GAGG;AACH,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IACrB,2BAA2B;IAC3B,+CAAK,CAAA;IACL,2BAA2B;IAC3B,iDAAM,CAAA;IACN,2BAA2B;IAC3B,+CAAK,CAAA;IACL,2BAA2B;IAC3B,iDAAM,CAAA;AACR,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAaD;;;;GAIG;AACH,MAAM,OAAO,OAAQ,SAAQ,KAAK,CAAC,aAA2B;IAE5C,MAAM;QACpB,IAAI,SAAiB,CAAC;QAEtB,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS;YACtB,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;aAC9B;YACH,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;gBACvB,KAAK,WAAW,CAAC,KAAK;oBACpB,SAAS,GAAG,oBAAoB,CAAC;oBACjC,MAAM;gBACR,KAAK,WAAW,CAAC,KAAK;oBACpB,SAAS,GAAG,oBAAoB,CAAC;oBACjC,MAAM;gBACR,KAAK,WAAW,CAAC,MAAM;oBACrB,SAAS,GAAG,qBAAqB,CAAC;oBAClC,MAAM;gBACR,KAAK,WAAW,CAAC,MAAM,CAAC;gBACxB;oBACE,SAAS,GAAG,qBAAqB,CAAC;oBAClC,MAAM;aACT;SACF;QAED,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,GAAI,CAC9B,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 Loading\r\n */\r\n\r\nimport \"./Spinner.scss\";\r\nimport * as React from \"react\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n// cspell:ignore xlarge\r\n\r\n/** Size for [[Spinner]] component\r\n * @public\r\n * @deprecated Use `size` in ProgressRadialProps in itwinui-react instead.\r\n */\r\nexport enum SpinnerSize {\r\n /** width/height of 16px */\r\n Small,\r\n /** width/height of 32px */\r\n Medium,\r\n /** width/height of 64px */\r\n Large,\r\n /** width/height of 96px */\r\n XLarge,\r\n}\r\n\r\n/** Properties for [[Spinner]] component\r\n * @public\r\n * @deprecated Use ProgressRadialProps in itwinui-react instead.\r\n */\r\nexport interface SpinnerProps {\r\n /** Size of spinner */\r\n size?: SpinnerSize;\r\n /** CSS class for size of spinner */\r\n sizeClass?: string;\r\n}\r\n\r\n/**\r\n * An indeterminate spinner component.\r\n * @public\r\n * @deprecated Use ProgressRadial in itwinui-react with `indeterminate` prop instead.\r\n */\r\nexport class Spinner extends React.PureComponent<SpinnerProps> {\r\n\r\n public override render() {\r\n let sizeClass: string;\r\n\r\n if (this.props.sizeClass)\r\n sizeClass = this.props.sizeClass;\r\n else {\r\n switch (this.props.size) {\r\n case SpinnerSize.Small:\r\n sizeClass = \"core-spinner-small\";\r\n break;\r\n case SpinnerSize.Large:\r\n sizeClass = \"core-spinner-large\";\r\n break;\r\n case SpinnerSize.XLarge:\r\n sizeClass = \"core-spinner-xlarge\";\r\n break;\r\n case SpinnerSize.Medium:\r\n default:\r\n sizeClass = \"core-spinner-medium\";\r\n break;\r\n }\r\n }\r\n\r\n return (\r\n <div className={sizeClass} />\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../../../../src/core-react/loading/Spinner.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,gBAAgB,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,4CAA4C;AAC5C,uBAAuB;AAEvB;;;GAGG;AACH,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IACrB,2BAA2B;IAC3B,+CAAK,CAAA;IACL,2BAA2B;IAC3B,iDAAM,CAAA;IACN,2BAA2B;IAC3B,+CAAK,CAAA;IACL,2BAA2B;IAC3B,iDAAM,CAAA;AACR,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAaD;;;;GAIG;AACH,MAAM,OAAO,OAAQ,SAAQ,KAAK,CAAC,aAA2B;IAE5C,MAAM;QACpB,IAAI,SAAiB,CAAC;QAEtB,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS;YACtB,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;aAC9B;YACH,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;gBACvB,KAAK,WAAW,CAAC,KAAK;oBACpB,SAAS,GAAG,oBAAoB,CAAC;oBACjC,MAAM;gBACR,KAAK,WAAW,CAAC,KAAK;oBACpB,SAAS,GAAG,oBAAoB,CAAC;oBACjC,MAAM;gBACR,KAAK,WAAW,CAAC,MAAM;oBACrB,SAAS,GAAG,qBAAqB,CAAC;oBAClC,MAAM;gBACR,KAAK,WAAW,CAAC,MAAM,CAAC;gBACxB;oBACE,SAAS,GAAG,qBAAqB,CAAC;oBAClC,MAAM;aACT;SACF;QAED,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,GAAI,CAC9B,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 Loading\r\n */\r\n\r\nimport \"./Spinner.scss\";\r\nimport * as React from \"react\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n// cspell:ignore xlarge\r\n\r\n/** Size for [[Spinner]] component\r\n * @public\r\n * @deprecated in 3.0. Use `size` in ProgressRadialProps in itwinui-react instead.\r\n */\r\nexport enum SpinnerSize {\r\n /** width/height of 16px */\r\n Small,\r\n /** width/height of 32px */\r\n Medium,\r\n /** width/height of 64px */\r\n Large,\r\n /** width/height of 96px */\r\n XLarge,\r\n}\r\n\r\n/** Properties for [[Spinner]] component\r\n * @public\r\n * @deprecated in 3.0. Use ProgressRadialProps in itwinui-react instead.\r\n */\r\nexport interface SpinnerProps {\r\n /** Size of spinner */\r\n size?: SpinnerSize;\r\n /** CSS class for size of spinner */\r\n sizeClass?: string;\r\n}\r\n\r\n/**\r\n * An indeterminate spinner component.\r\n * @public\r\n * @deprecated in 3.0. Use ProgressRadial in itwinui-react with `indeterminate` prop instead.\r\n */\r\nexport class Spinner extends React.PureComponent<SpinnerProps> {\r\n\r\n public override render() {\r\n let sizeClass: string;\r\n\r\n if (this.props.sizeClass)\r\n sizeClass = this.props.sizeClass;\r\n else {\r\n switch (this.props.size) {\r\n case SpinnerSize.Small:\r\n sizeClass = \"core-spinner-small\";\r\n break;\r\n case SpinnerSize.Large:\r\n sizeClass = \"core-spinner-large\";\r\n break;\r\n case SpinnerSize.XLarge:\r\n sizeClass = \"core-spinner-xlarge\";\r\n break;\r\n case SpinnerSize.Medium:\r\n default:\r\n sizeClass = \"core-spinner-medium\";\r\n break;\r\n }\r\n }\r\n\r\n return (\r\n <div className={sizeClass} />\r\n );\r\n }\r\n}\r\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /** Message Severity enum.
5
5
  * @public
6
- * @deprecated Use [MessageSeverity]($appui-abstract) instead
6
+ * @deprecated in 3.0. Use [MessageSeverity]($appui-abstract) instead
7
7
  */
8
8
  export declare enum MessageSeverity {
9
9
  None = 0,
@@ -7,7 +7,7 @@
7
7
  */
8
8
  /** Message Severity enum.
9
9
  * @public
10
- * @deprecated Use [MessageSeverity]($appui-abstract) instead
10
+ * @deprecated in 3.0. Use [MessageSeverity]($appui-abstract) instead
11
11
  */
12
12
  export var MessageSeverity;
13
13
  (function (MessageSeverity) {
@@ -1 +1 @@
1
- {"version":3,"file":"MessageSeverity.js","sourceRoot":"","sources":["../../../../src/core-react/messagebox/MessageSeverity.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;IAGI;AACJ,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,qDAAQ,CAAA;IACR,mEAAe,CAAA;IACf,6DAAY,CAAA;IACZ,2DAAW,CAAA;IACX,uDAAS,CAAA;IACT,uDAAS,CAAA;AACX,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B","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/** Message Severity enum.\r\n * @public\r\n * @deprecated Use [MessageSeverity]($appui-abstract) instead\r\n */\r\nexport enum MessageSeverity {\r\n None = 0,\r\n Information = 1,\r\n Question = 2,\r\n Warning = 3,\r\n Error = 4,\r\n Fatal = 5,\r\n}\r\n"]}
1
+ {"version":3,"file":"MessageSeverity.js","sourceRoot":"","sources":["../../../../src/core-react/messagebox/MessageSeverity.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;IAGI;AACJ,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,qDAAQ,CAAA;IACR,mEAAe,CAAA;IACf,6DAAY,CAAA;IACZ,2DAAW,CAAA;IACX,uDAAS,CAAA;IACT,uDAAS,CAAA;AACX,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B","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/** Message Severity enum.\r\n * @public\r\n * @deprecated in 3.0. Use [MessageSeverity]($appui-abstract) instead\r\n */\r\nexport enum MessageSeverity {\r\n None = 0,\r\n Information = 1,\r\n Question = 2,\r\n Warning = 3,\r\n Error = 4,\r\n Fatal = 5,\r\n}\r\n"]}
@@ -5,7 +5,7 @@
5
5
  import { CommonProps } from "../utils/Props";
6
6
  /** Properties for [[ProgressBar]] component
7
7
  * @beta
8
- * @deprecated Use ProgressLinearProps in itwinui-react instead.
8
+ * @deprecated in 3.0. Use ProgressLinearProps in itwinui-react instead.
9
9
  */
10
10
  export interface ProgressBarProps extends CommonProps {
11
11
  /** Height (in pixels) of the progress bar. (defaults to 4px) */
@@ -23,7 +23,7 @@ export interface ProgressBarProps extends CommonProps {
23
23
  * ProgressBar React component shows a horizontal progress bar.
24
24
  * The determinate bar reflects a percentage and the indeterminate bar continuously animates.
25
25
  * @beta
26
- * @deprecated Use ProgressLinear in itwinui-react instead.
26
+ * @deprecated in 3.0. Use ProgressLinear in itwinui-react instead.
27
27
  */
28
28
  export declare function ProgressBar(props: ProgressBarProps): JSX.Element;
29
29
  //# sourceMappingURL=ProgressBar.d.ts.map
@@ -12,7 +12,7 @@ import { percentInRange } from "../loading/LoadingBar";
12
12
  * ProgressBar React component shows a horizontal progress bar.
13
13
  * The determinate bar reflects a percentage and the indeterminate bar continuously animates.
14
14
  * @beta
15
- * @deprecated Use ProgressLinear in itwinui-react instead.
15
+ * @deprecated in 3.0. Use ProgressLinear in itwinui-react instead.
16
16
  */
17
17
  export function ProgressBar(props) {
18
18
  const percent = props.percent !== undefined ? percentInRange(props.percent) : 0;
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../../../src/core-react/progress-indicators/ProgressBar.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAmBvD;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,MAAM,UAAU,GAAwB;QACtC,GAAG,KAAK,CAAC,KAAK;QACd,MAAM,EAAE,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS;KAC3E,CAAC;IACF,MAAM,UAAU,GAAwB;QACtC,KAAK,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,SAAS;KACxD,CAAC;IACF,MAAM,UAAU,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC,mCAAmC,CAAC;IAClH,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,CAAC;IACjF,MAAM,cAAc,GAAG,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,CAAC;IACvF,MAAM,GAAG,GAAG,CACV,6BAAK,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,UAAU;QACnF,6BAAK,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAI,CAC7C,CACP,CAAC;IACF,MAAM,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;QACzB,GAAG,CAAC,CAAC;QACL,CACE,6BAAK,SAAS,EAAC,6BAA6B;YACzC,GAAG;YACJ,6BAAK,SAAS,EAAC,cAAc;gBAC1B,cAAc,IAAI;oBAAE,kCAAO,KAAK,CAAC,SAAS,CAAQ;oBAAA,kCAAO,KAAK,CAAC,UAAU,CAAQ,CAAG;gBACpF,CAAC,cAAc,IAAI;oBAAG,KAAK,CAAC,SAAS;oBAAE,KAAK,CAAC,UAAU,CAAI,CACxD,CACF,CACP,CAAC;IAEJ,OAAO,OAAO,CAAC;AACjB,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 Loading\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { percentInRange } from \"../loading/LoadingBar\";\r\n\r\n/** Properties for [[ProgressBar]] component\r\n * @beta\r\n * @deprecated Use ProgressLinearProps in itwinui-react instead.\r\n */\r\nexport interface ProgressBarProps extends CommonProps {\r\n /** Height (in pixels) of the progress bar. (defaults to 4px) */\r\n barHeight?: number;\r\n /** Indicates whether the progress bar is determinate showing a percentage or indeterminate continuously animating. (defaults to false) */\r\n indeterminate?: boolean;\r\n /** One of two possible labels. If only one label is given it will be centered. Otherwise, this label is shown on the left. */\r\n labelLeft?: string;\r\n /** One of two possible labels. If only one label is given it will be centered. Otherwise, this label is shown on the right. */\r\n labelRight?: string;\r\n /** Percent for determinate progress bar. */\r\n percent?: number;\r\n}\r\n\r\n/**\r\n * ProgressBar React component shows a horizontal progress bar.\r\n * The determinate bar reflects a percentage and the indeterminate bar continuously animates.\r\n * @beta\r\n * @deprecated Use ProgressLinear in itwinui-react instead.\r\n */\r\nexport function ProgressBar(props: ProgressBarProps) { // eslint-disable-line deprecation/deprecation\r\n const percent = props.percent !== undefined ? percentInRange(props.percent) : 0;\r\n const outerStyle: React.CSSProperties = {\r\n ...props.style,\r\n height: props.barHeight !== undefined ? `${props.barHeight}px` : undefined,\r\n };\r\n const innerStyle: React.CSSProperties = {\r\n width: !props.indeterminate ? `${percent}%` : undefined,\r\n };\r\n const innerClass = !props.indeterminate ? \"uicore-progress-bar-determinate\" : \"uicore-progress-bar-indeterminate\";\r\n const hasLabel = props.labelLeft !== undefined || props.labelRight !== undefined;\r\n const multipleLabels = props.labelLeft !== undefined && props.labelRight !== undefined;\r\n const bar = (\r\n <div className={classnames(\"uicore-progress-bar\", props.className)} style={outerStyle}>\r\n <div className={innerClass} style={innerStyle} />\r\n </div>\r\n );\r\n const content = !hasLabel ?\r\n bar :\r\n (\r\n <div className=\"uicore-progress-bar-labeled\">\r\n {bar}\r\n <div className=\"uicore-label\">\r\n {multipleLabels && <><span>{props.labelLeft}</span><span>{props.labelRight}</span></>}\r\n {!multipleLabels && <>{props.labelLeft}{props.labelRight}</>}\r\n </div>\r\n </div>\r\n );\r\n\r\n return content;\r\n}\r\n"]}
1
+ {"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../../../src/core-react/progress-indicators/ProgressBar.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAmBvD;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,MAAM,UAAU,GAAwB;QACtC,GAAG,KAAK,CAAC,KAAK;QACd,MAAM,EAAE,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS;KAC3E,CAAC;IACF,MAAM,UAAU,GAAwB;QACtC,KAAK,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,SAAS;KACxD,CAAC;IACF,MAAM,UAAU,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC,mCAAmC,CAAC;IAClH,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,CAAC;IACjF,MAAM,cAAc,GAAG,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,CAAC;IACvF,MAAM,GAAG,GAAG,CACV,6BAAK,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,UAAU;QACnF,6BAAK,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAI,CAC7C,CACP,CAAC;IACF,MAAM,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;QACzB,GAAG,CAAC,CAAC;QACL,CACE,6BAAK,SAAS,EAAC,6BAA6B;YACzC,GAAG;YACJ,6BAAK,SAAS,EAAC,cAAc;gBAC1B,cAAc,IAAI;oBAAE,kCAAO,KAAK,CAAC,SAAS,CAAQ;oBAAA,kCAAO,KAAK,CAAC,UAAU,CAAQ,CAAG;gBACpF,CAAC,cAAc,IAAI;oBAAG,KAAK,CAAC,SAAS;oBAAE,KAAK,CAAC,UAAU,CAAI,CACxD,CACF,CACP,CAAC;IAEJ,OAAO,OAAO,CAAC;AACjB,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 Loading\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { percentInRange } from \"../loading/LoadingBar\";\r\n\r\n/** Properties for [[ProgressBar]] component\r\n * @beta\r\n * @deprecated in 3.0. Use ProgressLinearProps in itwinui-react instead.\r\n */\r\nexport interface ProgressBarProps extends CommonProps {\r\n /** Height (in pixels) of the progress bar. (defaults to 4px) */\r\n barHeight?: number;\r\n /** Indicates whether the progress bar is determinate showing a percentage or indeterminate continuously animating. (defaults to false) */\r\n indeterminate?: boolean;\r\n /** One of two possible labels. If only one label is given it will be centered. Otherwise, this label is shown on the left. */\r\n labelLeft?: string;\r\n /** One of two possible labels. If only one label is given it will be centered. Otherwise, this label is shown on the right. */\r\n labelRight?: string;\r\n /** Percent for determinate progress bar. */\r\n percent?: number;\r\n}\r\n\r\n/**\r\n * ProgressBar React component shows a horizontal progress bar.\r\n * The determinate bar reflects a percentage and the indeterminate bar continuously animates.\r\n * @beta\r\n * @deprecated in 3.0. Use ProgressLinear in itwinui-react instead.\r\n */\r\nexport function ProgressBar(props: ProgressBarProps) { // eslint-disable-line deprecation/deprecation\r\n const percent = props.percent !== undefined ? percentInRange(props.percent) : 0;\r\n const outerStyle: React.CSSProperties = {\r\n ...props.style,\r\n height: props.barHeight !== undefined ? `${props.barHeight}px` : undefined,\r\n };\r\n const innerStyle: React.CSSProperties = {\r\n width: !props.indeterminate ? `${percent}%` : undefined,\r\n };\r\n const innerClass = !props.indeterminate ? \"uicore-progress-bar-determinate\" : \"uicore-progress-bar-indeterminate\";\r\n const hasLabel = props.labelLeft !== undefined || props.labelRight !== undefined;\r\n const multipleLabels = props.labelLeft !== undefined && props.labelRight !== undefined;\r\n const bar = (\r\n <div className={classnames(\"uicore-progress-bar\", props.className)} style={outerStyle}>\r\n <div className={innerClass} style={innerStyle} />\r\n </div>\r\n );\r\n const content = !hasLabel ?\r\n bar :\r\n (\r\n <div className=\"uicore-progress-bar-labeled\">\r\n {bar}\r\n <div className=\"uicore-label\">\r\n {multipleLabels && <><span>{props.labelLeft}</span><span>{props.labelRight}</span></>}\r\n {!multipleLabels && <>{props.labelLeft}{props.labelRight}</>}\r\n </div>\r\n </div>\r\n );\r\n\r\n return content;\r\n}\r\n"]}