@itwin/imodel-components-react 4.0.0-dev.2 → 4.0.0-dev.21

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 (265) hide show
  1. package/CHANGELOG.md +139 -2
  2. package/LICENSE.md +1 -1
  3. package/README.md +2 -2
  4. package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
  5. package/lib/cjs/imodel-components-react/UiIModelComponents.js +3 -7
  6. package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
  7. package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts +2 -2
  8. package/lib/cjs/imodel-components-react/color/AlphaSlider.js +6 -2
  9. package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
  10. package/lib/cjs/imodel-components-react/color/AlphaSlider.scss +63 -63
  11. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
  12. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +9 -4
  13. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  14. package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +90 -90
  15. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +5 -1
  16. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  17. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
  18. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +10 -4
  19. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  20. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +62 -63
  21. package/lib/cjs/imodel-components-react/color/HueSlider.js +5 -1
  22. package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
  23. package/lib/cjs/imodel-components-react/color/HueSlider.scss +61 -61
  24. package/lib/cjs/imodel-components-react/color/SaturationPicker.js +5 -1
  25. package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
  26. package/lib/cjs/imodel-components-react/color/SaturationPicker.scss +35 -35
  27. package/lib/cjs/imodel-components-react/color/Swatch.js +5 -1
  28. package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
  29. package/lib/cjs/imodel-components-react/color/Swatch.scss +22 -23
  30. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  31. package/lib/cjs/imodel-components-react/editors/ColorEditor.js +5 -1
  32. package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -1
  33. package/lib/cjs/imodel-components-react/editors/ColorEditor.scss +18 -18
  34. package/lib/cjs/imodel-components-react/editors/WeightEditor.js +5 -1
  35. package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -1
  36. package/lib/cjs/imodel-components-react/editors/WeightEditor.scss +16 -16
  37. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +5 -1
  38. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  39. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts +1 -1
  40. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  41. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +11 -4
  42. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  43. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +106 -107
  44. package/lib/cjs/imodel-components-react/lineweight/Swatch.js +5 -1
  45. package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +1 -1
  46. package/lib/cjs/imodel-components-react/lineweight/Swatch.scss +48 -48
  47. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +6 -2
  48. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  49. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +51 -52
  50. package/lib/cjs/imodel-components-react/navigationaids/Cube.js +5 -1
  51. package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +1 -1
  52. package/lib/cjs/imodel-components-react/navigationaids/Cube.scss +19 -19
  53. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +4 -24
  54. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  55. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +46 -54
  56. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  57. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -182
  58. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
  59. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +16 -6
  60. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  61. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -134
  62. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +6 -2
  63. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  64. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +59 -63
  65. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +7 -4
  66. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  67. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
  68. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +10 -5
  69. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  70. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +6 -3
  71. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  72. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +6 -3
  73. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  74. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +10 -10
  75. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  76. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +8 -5
  77. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  78. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +5 -1
  79. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  80. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +5 -1
  81. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  82. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +5 -1
  83. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  84. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +5 -1
  85. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  86. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +5 -1
  87. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  88. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +5 -1
  89. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  90. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +5 -1
  91. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  92. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +5 -1
  93. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  94. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +5 -1
  95. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  96. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +6 -3
  97. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  98. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +5 -1
  99. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  100. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
  101. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +22 -23
  102. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  103. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  104. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +5 -1
  105. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  106. package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +26 -26
  107. package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
  108. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +12 -4
  109. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  110. package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +28 -31
  111. package/lib/cjs/imodel-components-react/timeline/Scrubber.js +5 -1
  112. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
  113. package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +105 -112
  114. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  115. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +13 -5
  116. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  117. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +359 -356
  118. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +5 -1
  119. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  120. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
  121. package/lib/cjs/imodel-components-react/timeline/Timeline.scss +164 -164
  122. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts +3 -6
  123. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  124. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +59 -19
  125. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  126. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +178 -164
  127. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +3 -32
  128. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  129. package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
  130. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +1 -1
  131. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  132. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +12 -10
  133. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  134. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +1 -1
  135. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  136. package/lib/cjs/imodel-components-react.d.ts +0 -1
  137. package/lib/cjs/imodel-components-react.d.ts.map +1 -1
  138. package/lib/cjs/imodel-components-react.js +5 -2
  139. package/lib/cjs/imodel-components-react.js.map +1 -1
  140. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
  141. package/lib/esm/imodel-components-react/UiIModelComponents.js +4 -7
  142. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
  143. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +2 -2
  144. package/lib/esm/imodel-components-react/color/AlphaSlider.js +1 -1
  145. package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
  146. package/lib/esm/imodel-components-react/color/AlphaSlider.scss +63 -63
  147. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
  148. package/lib/esm/imodel-components-react/color/ColorPickerButton.js +5 -4
  149. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  150. package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +90 -90
  151. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  152. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
  153. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +6 -4
  154. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  155. package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +62 -63
  156. package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
  157. package/lib/esm/imodel-components-react/color/HueSlider.scss +61 -61
  158. package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
  159. package/lib/esm/imodel-components-react/color/SaturationPicker.scss +35 -35
  160. package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
  161. package/lib/esm/imodel-components-react/color/Swatch.scss +22 -23
  162. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  163. package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -1
  164. package/lib/esm/imodel-components-react/editors/ColorEditor.scss +18 -18
  165. package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -1
  166. package/lib/esm/imodel-components-react/editors/WeightEditor.scss +16 -16
  167. package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  168. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +1 -1
  169. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  170. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +7 -4
  171. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  172. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +106 -107
  173. package/lib/esm/imodel-components-react/lineweight/Swatch.js.map +1 -1
  174. package/lib/esm/imodel-components-react/lineweight/Swatch.scss +48 -48
  175. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +2 -1
  176. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  177. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +51 -52
  178. package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +1 -1
  179. package/lib/esm/imodel-components-react/navigationaids/Cube.scss +19 -19
  180. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +4 -24
  181. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  182. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +42 -52
  183. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  184. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -182
  185. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
  186. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +12 -5
  187. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  188. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -134
  189. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +1 -1
  190. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  191. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +59 -63
  192. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +2 -3
  193. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  194. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
  195. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +6 -5
  196. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  197. package/lib/esm/imodel-components-react/quantityformat/FormatType.js +1 -2
  198. package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  199. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +1 -2
  200. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  201. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +5 -9
  202. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  203. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +3 -4
  204. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  205. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  206. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  207. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  208. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  209. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  210. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  211. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  212. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  213. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  214. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +1 -2
  215. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  216. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  217. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
  218. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +22 -23
  219. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  220. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  221. package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  222. package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +26 -26
  223. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
  224. package/lib/esm/imodel-components-react/timeline/PlayerButton.js +7 -3
  225. package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  226. package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +28 -31
  227. package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
  228. package/lib/esm/imodel-components-react/timeline/Scrubber.scss +105 -112
  229. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  230. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +10 -6
  231. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  232. package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +359 -356
  233. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  234. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
  235. package/lib/esm/imodel-components-react/timeline/Timeline.scss +164 -164
  236. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts +3 -6
  237. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  238. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +47 -11
  239. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  240. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +178 -164
  241. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +3 -32
  242. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  243. package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
  244. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +1 -1
  245. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  246. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +7 -9
  247. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  248. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +2 -1
  249. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  250. package/lib/esm/imodel-components-react.d.ts +0 -1
  251. package/lib/esm/imodel-components-react.d.ts.map +1 -1
  252. package/lib/esm/imodel-components-react.js +0 -1
  253. package/lib/esm/imodel-components-react.js.map +1 -1
  254. package/lib/public/locales/en/UiIModelComponents.json +139 -139
  255. package/package.json +38 -39
  256. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts +0 -22
  257. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts.map +0 -1
  258. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js +0 -146
  259. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js.map +0 -1
  260. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.scss +0 -94
  261. package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts +0 -22
  262. package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts.map +0 -1
  263. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js +0 -123
  264. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js.map +0 -1
  265. package/lib/esm/imodel-components-react/color/ColorPickerPanel.scss +0 -94
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -30,7 +34,9 @@ exports.PlayButton = exports.PlayerButton = void 0;
30
34
  require("./PlayerButton.scss");
31
35
  const classnames_1 = __importDefault(require("classnames"));
32
36
  const React = __importStar(require("react"));
37
+ const core_react_1 = require("@itwin/core-react");
33
38
  const UiIModelComponents_1 = require("../UiIModelComponents");
39
+ const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
34
40
  /** Player button used by buttons on timeline control
35
41
  * @internal
36
42
  */
@@ -46,7 +52,8 @@ class PlayerButton extends React.PureComponent {
46
52
  render() {
47
53
  const { icon, title } = this.props;
48
54
  return (React.createElement("button", { "data-testid": this.props.className, className: (0, classnames_1.default)("player-button", this.props.className), onClick: this._onClick, title: title },
49
- React.createElement("span", { className: (0, classnames_1.default)("icon", !!icon) })));
55
+ React.createElement("span", { className: "icon" },
56
+ React.createElement(core_react_1.Icon, { iconSpec: icon }))));
50
57
  }
51
58
  }
52
59
  exports.PlayerButton = PlayerButton;
@@ -80,12 +87,13 @@ class PlayButton extends React.Component {
80
87
  }
81
88
  render() {
82
89
  const { tooltip } = this.props;
83
- const iconClassName = this.state.isPlaying ? "icon icon-media-controls-pause" : "icon icon-media-controls-play";
90
+ const iconSpec = this.state.isPlaying ? React.createElement(itwinui_icons_react_1.SvgPause, null) : React.createElement(itwinui_icons_react_1.SvgPlay, null);
84
91
  let title = tooltip;
85
92
  if (!title)
86
93
  title = UiIModelComponents_1.UiIModelComponents.translate(this.state.isPlaying ? "timeline.pause" : "timeline.play");
87
94
  return (React.createElement("button", { "data-testid": this.props.className, title: title, className: (0, classnames_1.default)("player-button", this.props.className), onClick: this._onClick },
88
- React.createElement("span", { className: iconClassName })));
95
+ React.createElement("span", { className: "icon", "data-testid": this.state.isPlaying ? "pause" : "play" },
96
+ React.createElement(core_react_1.Icon, { iconSpec: iconSpec, "data-testid": this.state.isPlaying ? "pause" : "play" }))));
89
97
  }
90
98
  }
91
99
  exports.PlayButton = PlayButton;
@@ -1 +1 @@
1
- {"version":3,"file":"PlayerButton.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/PlayerButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,+BAA6B;AAC7B,4DAAoC;AACpC,6CAA+B;AAE/B,8DAA2D;AAE3D;;G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;QAxBA,IAAI,CAAC,KAAK,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;IACnD,CAAC;IAED,gBAAgB;IACA,kBAAkB;QAChC,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;YACjD,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;SAC/D;IACH,CAAC;IAkBe,MAAM;QACpB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC/B,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,+BAA+B,CAAC;QAChH,IAAI,KAAK,GAAG,OAAO,CAAC;QAEpB,IAAI,CAAC,KAAK;YACR,KAAK,GAAG,uCAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QAElG,OAAO,CACL,+CAAqB,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,IAAA,oBAAU,EAAC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ;YAC3I,8BAAM,SAAS,EAAE,aAAa,GAAS,CAChC,CACV,CAAC;IACJ,CAAC;CACF;AA7CD,gCA6CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport \"./PlayerButton.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { CommonProps } from \"@itwin/core-react\";\nimport { UiIModelComponents } from \"../UiIModelComponents\";\n\n/** Player button used by buttons on timeline control\n * @internal\n */\nexport class PlayerButton extends React.PureComponent<any> {\n private _onClick = () => {\n // istanbul ignore else\n if (this.props.onClick)\n this.props.onClick();\n };\n\n public override render() {\n const { icon, title } = this.props;\n return (\n <button data-testid={this.props.className} className={classnames(\"player-button\", this.props.className)} onClick={this._onClick} title={title}>\n <span className={classnames(\"icon\", !!icon)}></span>\n </button>\n );\n }\n}\n\n/** Properties for Play/Pause button used on timeline control\n * @internal\n */\nexport interface PlayerButtonProps extends CommonProps {\n isPlaying: boolean;\n onPlay?: () => void;\n onPause?: () => void;\n tooltip?: string;\n}\n\ninterface PlayButtonState {\n isPlaying: boolean;\n}\n\n/** Play/Pause button used on timeline control\n * @internal\n */\nexport class PlayButton extends React.Component<PlayerButtonProps, PlayButtonState> {\n\n constructor(props: PlayerButtonProps, context?: any) {\n super(props, context);\n\n this.state = { isPlaying: this.props.isPlaying };\n }\n\n /** @internal */\n public override componentDidUpdate() {\n if (this.props.isPlaying !== this.state.isPlaying) {\n this.setState((_, props) => ({ isPlaying: props.isPlaying }));\n }\n }\n\n private _onClick = () => {\n const _isPlaying = !this.state.isPlaying;\n\n this.setState({ isPlaying: _isPlaying });\n\n if (_isPlaying) {\n // istanbul ignore else\n if (this.props.onPlay)\n this.props.onPlay();\n } else {\n // istanbul ignore else\n if (this.props.onPause)\n this.props.onPause();\n }\n };\n\n public override render() {\n const { tooltip } = this.props;\n const iconClassName = this.state.isPlaying ? \"icon icon-media-controls-pause\" : \"icon icon-media-controls-play\";\n let title = tooltip;\n\n if (!title)\n title = UiIModelComponents.translate(this.state.isPlaying ? \"timeline.pause\" : \"timeline.play\");\n\n return (\n <button data-testid={this.props.className} title={title} className={classnames(\"player-button\", this.props.className)} onClick={this._onClick}>\n <span className={iconClassName}></span>\n </button>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"PlayerButton.js","sourceRoot":"","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Ac,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;gBAAG,oBAAC,iBAAI,IAAC,QAAQ,EAAE,QAAQ,iBAAe,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,GAAI,CAAO,CAChK,CACV,CAAC;IACJ,CAAC;CACF;AA7CD,gCA6CC","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\nimport \"./PlayerButton.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps, Icon } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"../UiIModelComponents\";\r\nimport { SvgPause, SvgPlay } from \"@itwin/itwinui-icons-react\";\r\n\r\n/** Player button used by buttons on timeline control\r\n * @internal\r\n */\r\nexport class PlayerButton extends React.PureComponent<any> {\r\n private _onClick = () => {\r\n // istanbul ignore else\r\n if (this.props.onClick)\r\n this.props.onClick();\r\n };\r\n\r\n public override render() {\r\n const { icon, title } = this.props;\r\n return (\r\n <button data-testid={this.props.className} className={classnames(\"player-button\", this.props.className)} onClick={this._onClick} title={title}>\r\n <span className=\"icon\"><Icon iconSpec={icon} /></span>\r\n </button>\r\n );\r\n }\r\n}\r\n\r\n/** Properties for Play/Pause button used on timeline control\r\n * @internal\r\n */\r\nexport interface PlayerButtonProps extends CommonProps {\r\n isPlaying: boolean;\r\n onPlay?: () => void;\r\n onPause?: () => void;\r\n tooltip?: string;\r\n}\r\n\r\ninterface PlayButtonState {\r\n isPlaying: boolean;\r\n}\r\n\r\n/** Play/Pause button used on timeline control\r\n * @internal\r\n */\r\nexport class PlayButton extends React.Component<PlayerButtonProps, PlayButtonState> {\r\n\r\n constructor(props: PlayerButtonProps, context?: any) {\r\n super(props, context);\r\n\r\n this.state = { isPlaying: this.props.isPlaying };\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate() {\r\n if (this.props.isPlaying !== this.state.isPlaying) {\r\n this.setState((_, props) => ({ isPlaying: props.isPlaying }));\r\n }\r\n }\r\n\r\n private _onClick = () => {\r\n const _isPlaying = !this.state.isPlaying;\r\n\r\n this.setState({ isPlaying: _isPlaying });\r\n\r\n if (_isPlaying) {\r\n // istanbul ignore else\r\n if (this.props.onPlay)\r\n this.props.onPlay();\r\n } else {\r\n // istanbul ignore else\r\n if (this.props.onPause)\r\n this.props.onPause();\r\n }\r\n };\r\n\r\n public override render() {\r\n const { tooltip } = this.props;\r\n const iconSpec = this.state.isPlaying ? <SvgPause /> : <SvgPlay />;\r\n let title = tooltip;\r\n\r\n if (!title)\r\n title = UiIModelComponents.translate(this.state.isPlaying ? \"timeline.pause\" : \"timeline.play\");\r\n\r\n return (\r\n <button data-testid={this.props.className} title={title} className={classnames(\"player-button\", this.props.className)} onClick={this._onClick}>\r\n <span className=\"icon\" data-testid={this.state.isPlaying ? \"pause\" : \"play\"} ><Icon iconSpec={iconSpec} data-testid={this.state.isPlaying ? \"pause\" : \"play\"} /></span>\r\n </button>\r\n );\r\n }\r\n}\r\n"]}
@@ -1,31 +1,28 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- @import "~@itwin/core-react/lib/cjs/core-react/style/themecolors";
6
-
7
- .player-button {
8
- width: 38px;
9
- height: 38px;
10
- display: flex;
11
- align-items: center;
12
- justify-content: center;
13
- font-size: 16px;
14
- outline: none;
15
- border-radius: var(--iui-border-radius-1);
16
- border: solid 1px $buic-background-5;
17
- // background-image: linear-gradient(to bottom, $buic-background-1, $buic-background-2);
18
- background-image: linear-gradient(
19
- to bottom,
20
- $buic-background-3,
21
- $buic-background-3
22
- ),
23
- linear-gradient(to bottom, $buic-background-1, $buic-background-1);
24
- color: $buic-foreground-body;
25
-
26
- cursor: pointer;
27
-
28
- &:hover {
29
- color: $buic-foreground-activehover;
30
- }
31
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ .player-button {
7
+ width: 38px;
8
+ height: 38px;
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: center;
12
+ font-size: 16px;
13
+ outline: none;
14
+ border-radius: var(--iui-border-radius-1);
15
+ border: solid 1px var(--iui-color-border-foreground);
16
+ background-color: var(--iui-color-background);
17
+ color: var(--iui-color-icon);
18
+ cursor: pointer;
19
+
20
+ &:hover {
21
+ color: var(--iui-color-icon-hover);
22
+ }
23
+
24
+ &:focus-visible {
25
+ outline: 1px solid var(--iui-color-border-accent);
26
+ outline-offset: -1px;
27
+ }
28
+ }
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1 +1 @@
1
- {"version":3,"file":"Scrubber.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/Scrubber.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,2BAAyB;AACzB,6CAA+B;AAC/B,wDAA8C;AAC9C,kDAAkE;AAClE,8DAAqE;AAGr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AAC,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACnH,OAAO,CAAC,oBAAC,WAAW,IAAC,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,iBAAiB,GAAI,CAAC,CAAC;IAC1H,CAAC,EAAE,CAAC,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE9J,OAAO,CACL,oBAAC,sBAAM,IAAC,GAAG,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,CAAC,EACP,GAAG,EAAE,CAAC,EACN,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAC,EAAE,EACX,QAAQ,EAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,CAAC,eAAe,CAAC,EACzB,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,SAAS,EACrB,kBAAkB,EAAE;YAClB,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,iBAAiB;YAChC,cAAc,EAAE,kBAAkB;SACnC,GACD,CACH,CAAC;AACJ,CAAC;AA9ED,4BA8EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport \"./Scrubber.scss\";\nimport * as React from \"react\";\nimport { Slider } from \"@itwin/itwinui-react\";\nimport { CommonProps, useEventListener } from \"@itwin/core-react\";\nimport { toDateString, toTimeString } from \"@itwin/components-react\";\nimport { TimelineDateMarkerProps } from \"./TimelineComponent\";\n\n/**\n * @internal\n */\nexport function getPercentageOfRectangle(rect: DOMRect, pointer: number) {\n const position = Math.min(rect.right, Math.max(rect.left, pointer));\n return (position - rect.left) / rect.width;\n}\n\n// istanbul ignore next - WIP\nconst formatDuration = (value: number) => {\n const addZero = (i: number) => {\n return (i < 10) ? `0${i}` : i;\n };\n\n const date = new Date(value);\n const minutes = date.getUTCMinutes();\n const seconds = date.getUTCSeconds();\n return `${addZero(minutes)}:${addZero(seconds)}`;\n};\n\nconst formatDate = (startDate: Date, endDate: Date, fraction: number, timeZoneOffset?: number) => {\n const delta = (endDate.getTime() - startDate.getTime()) * fraction;\n const date = new Date(startDate.getTime() + delta);\n return toDateString(date, timeZoneOffset);\n};\n\n// istanbul ignore next - WIP\nconst formatTime = (startDate: Date, endDate: Date, fraction: number, timeZoneOffset?: number) => {\n const delta = (endDate.getTime() - startDate.getTime()) * fraction;\n const date = new Date(startDate.getTime() + delta);\n return ` ${toTimeString(date, timeZoneOffset)}`;\n};\n\nfunction generateToolTipText(showTime: boolean, percent: number, min: number, max: number, startDate?: Date, endDate?: Date, timeZoneOffset = 0) {\n if (startDate && endDate)\n return `${formatDate(startDate, endDate, percent, timeZoneOffset)}${showTime ? formatTime(startDate, endDate, percent, timeZoneOffset) : \"\"} `;\n\n const val = Math.round(min + ((max - min) * percent));\n return formatDuration(val);\n}\n\nfunction getPercentageFromDate(startDate: Date, endDate: Date, date?: Date) {\n const newDate = date ? date : new Date();\n const startTime = startDate.getTime();\n const totalDuration = endDate.getTime() - startTime;\n return (newDate.getTime() - startTime) / totalDuration;\n}\n\nfunction getDateMarker(dateMarkerPropsIn: TimelineDateMarkerProps, startDate: Date, endDate: Date): DateMarkerProps {\n const percentage = getPercentageFromDate(startDate, endDate, dateMarkerPropsIn.date);\n const marker = dateMarkerPropsIn.dateMarker ? dateMarkerPropsIn.dateMarker : <span className=\"date-marker-default\"></span>;\n return { datePercentage: percentage, dateMarker: marker };\n}\n\nfunction markDateInTimelineRange(dateMarkerProps?: TimelineDateMarkerProps, startDate?: Date, endDate?: Date): boolean {\n // istanbul ignore else\n if (dateMarkerProps && startDate && endDate) {\n const inDate = dateMarkerProps.date ? dateMarkerProps.date : new Date();\n // istanbul ignore else\n if (inDate.getTime() >= startDate.getTime() && inDate.getTime() <= endDate.getTime())\n return true;\n }\n return false;\n}\n/**\n * @internal\n */\nexport function RailMarkers({ showToolTip, percent, tooltipText, markDate }: {\n showToolTip: boolean;\n percent: number;\n tooltipText: string;\n markDate?: DateMarkerProps;\n}) {\n\n return (\n <div className=\"components-timeline-rail-marker-container\">\n {showToolTip &&\n <div className=\"components-timeline-tooltip\" style={{ left: `${Math.round(percent * 100)}% ` }}>\n <span className=\"tooltip-text\">{tooltipText}</span>\n </div>}\n {markDate &&\n <div className=\"components-timeline-date-marker\" data-testid=\"test-date-marker\" style={{ left: `${Math.round(markDate.datePercentage * 100)}% ` }}>\n {markDate.dateMarker}\n </div>}\n </div>\n );\n}\n\n/**\n * Custom Timeline Thumb\n * @internal\n */\nexport function CustomThumb() {\n return (\n <div className=\"scrubber-handle\">\n <div /><div /><div />\n </div>\n );\n}\n\n/**\n * @internal\n */\nexport function useFocusedThumb(sliderContainer: HTMLDivElement | undefined) {\n const [thumbElement, setThumbElement] = React.useState<HTMLDivElement>();\n\n React.useLayoutEffect(() => {\n // istanbul ignore else\n if (sliderContainer) {\n const element = sliderContainer.querySelector(\".iui-slider-thumb\");\n if (element && thumbElement !== element) {\n setThumbElement(element as HTMLDivElement);\n }\n }\n }, [sliderContainer, thumbElement]);\n\n const [thumbHasFocus, setThumbHasFocus] = React.useState(false);\n\n const handleThumbFocus = React.useCallback(() => {\n setThumbHasFocus(true);\n }, []);\n\n const handleThumbBlur = React.useCallback(() => {\n setThumbHasFocus(false);\n }, []);\n\n useEventListener(\"focus\", handleThumbFocus, thumbElement);\n useEventListener(\"blur\", handleThumbBlur, thumbElement);\n return thumbHasFocus;\n}\n\n/** Properties for Scrubber/Slider used on timeline control\n * @internal\n */\nexport interface ScrubberProps extends CommonProps {\n currentDuration: number;\n totalDuration: number;\n isPlaying: boolean;\n inMiniMode: boolean;\n startDate?: Date;\n endDate?: Date;\n showTime?: boolean;\n onChange?: (values: ReadonlyArray<number>) => void;\n onUpdate?: (values: ReadonlyArray<number>) => void;\n timeZoneOffset?: number;\n markDate?: TimelineDateMarkerProps;\n}\n\n/** Properties for marking current date in RailMarkers\n * @internal\n */\ninterface DateMarkerProps {\n datePercentage: number;\n dateMarker?: React.ReactNode;\n}\n/** Scrubber/Slider for timeline control\n * @internal\n */\nexport function Scrubber(props: ScrubberProps) {\n const { startDate, endDate, showTime, isPlaying, totalDuration, timeZoneOffset,\n currentDuration, className, onChange, onUpdate } = props;\n\n const thumbProps = () => {\n return {\n className: \"components-timeline-thumb\",\n children: <CustomThumb />,\n };\n };\n\n const sliderRef = React.useRef<HTMLDivElement>(null);\n const [sliderContainer, setSliderContainer] = React.useState<HTMLDivElement>();\n const [pointerPercent, setPointerPercent] = React.useState(0);\n\n React.useLayoutEffect(() => {\n // istanbul ignore else\n if (sliderRef.current) {\n const container = sliderRef.current.querySelector(\".iui-slider-container\");\n if (container && sliderContainer !== container) {\n setSliderContainer(container as HTMLDivElement);\n }\n }\n }, [sliderContainer]);\n\n const tooltipProps = React.useCallback(() => {\n return { visible: false };\n }, []);\n\n const [showRailTooltip, setShowRailTooltip] = React.useState(false);\n\n // istanbul ignore next\n const handlePointerEnter = React.useCallback(() => {\n setShowRailTooltip(true);\n }, []);\n\n // istanbul ignore next\n const handlePointerLeave = React.useCallback(() => {\n setShowRailTooltip(false);\n }, []);\n\n const handlePointerMove = React.useCallback((event: React.PointerEvent) => {\n sliderContainer &&\n setPointerPercent(getPercentageOfRectangle(sliderContainer.getBoundingClientRect(), event.clientX));\n }, [sliderContainer]);\n\n const thumbHasFocus = useFocusedThumb(sliderContainer);\n\n const tickLabel = React.useMemo(() => {\n const showTip = isPlaying || showRailTooltip || thumbHasFocus;\n const percent = (isPlaying || thumbHasFocus) ? currentDuration / totalDuration : pointerPercent;\n const markDateInRange = markDateInTimelineRange(props.markDate, startDate, endDate);\n const currentDateMarker = props.markDate && markDateInRange && startDate && endDate ? getDateMarker(props.markDate, startDate, endDate) : undefined;\n const tooltipText = generateToolTipText(!!showTime, percent, 0, totalDuration, startDate, endDate, timeZoneOffset);\n return (<RailMarkers showToolTip={showTip} percent={percent} tooltipText={tooltipText} markDate={currentDateMarker} />);\n }, [isPlaying, showRailTooltip, currentDuration, totalDuration, pointerPercent, startDate, endDate, timeZoneOffset, showTime, thumbHasFocus, props.markDate]);\n\n return (\n <Slider ref={sliderRef}\n className={className}\n step={1}\n min={0}\n max={totalDuration}\n minLabel=\"\"\n maxLabel=\"\"\n onUpdate={onUpdate}\n onChange={onChange}\n values={[currentDuration]}\n tooltipProps={tooltipProps}\n thumbProps={thumbProps}\n tickLabels={tickLabel}\n railContainerProps={{\n onPointerEnter: handlePointerEnter,\n onPointerMove: handlePointerMove,\n onPointerLeave: handlePointerLeave,\n }}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"Scrubber.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/Scrubber.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,2BAAyB;AACzB,6CAA+B;AAC/B,wDAA8C;AAC9C,kDAAkE;AAClE,8DAAqE;AAGrE;;GAEG;AACH,SAAgB,wBAAwB,CAAC,IAAa,EAAE,OAAe;IACrE,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IACpE,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;AAC7C,CAAC;AAHD,4DAGC;AAED,6BAA6B;AAC7B,MAAM,cAAc,GAAG,CAAC,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AAO,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE9J,OAAO,CACL,oBAAC,sBAAM,IAAC,GAAG,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,CAAC,EACP,GAAG,EAAE,CAAC,EACN,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAC,EAAE,EACX,QAAQ,EAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,CAAC,eAAe,CAAC,EACzB,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,SAAS,EACrB,kBAAkB,EAAE;YAClB,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,iBAAiB;YAChC,cAAc,EAAE,kBAAkB;SACnC,GACD,CACH,CAAC;AACJ,CAAC;AA9ED,4BA8EC","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\nimport \"./Scrubber.scss\";\r\nimport * as React from \"react\";\r\nimport { Slider } from \"@itwin/itwinui-react\";\r\nimport { CommonProps, useEventListener } from \"@itwin/core-react\";\r\nimport { toDateString, toTimeString } from \"@itwin/components-react\";\r\nimport { TimelineDateMarkerProps } from \"./TimelineComponent\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function getPercentageOfRectangle(rect: DOMRect, pointer: number) {\r\n const position = Math.min(rect.right, Math.max(rect.left, pointer));\r\n return (position - rect.left) / rect.width;\r\n}\r\n\r\n// istanbul ignore next - WIP\r\nconst formatDuration = (value: number) => {\r\n const addZero = (i: number) => {\r\n return (i < 10) ? `0${i}` : i;\r\n };\r\n\r\n const date = new Date(value);\r\n const minutes = date.getUTCMinutes();\r\n const seconds = date.getUTCSeconds();\r\n return `${addZero(minutes)}:${addZero(seconds)}`;\r\n};\r\n\r\nconst formatDate = (startDate: Date, endDate: Date, fraction: number, timeZoneOffset?: number) => {\r\n const delta = (endDate.getTime() - startDate.getTime()) * fraction;\r\n const date = new Date(startDate.getTime() + delta);\r\n return toDateString(date, timeZoneOffset);\r\n};\r\n\r\n// istanbul ignore next - WIP\r\nconst formatTime = (startDate: Date, endDate: Date, fraction: number, timeZoneOffset?: number) => {\r\n const delta = (endDate.getTime() - startDate.getTime()) * fraction;\r\n const date = new Date(startDate.getTime() + delta);\r\n return ` ${toTimeString(date, timeZoneOffset)}`;\r\n};\r\n\r\nfunction generateToolTipText(showTime: boolean, percent: number, min: number, max: number, startDate?: Date, endDate?: Date, timeZoneOffset = 0) {\r\n if (startDate && endDate)\r\n return `${formatDate(startDate, endDate, percent, timeZoneOffset)}${showTime ? formatTime(startDate, endDate, percent, timeZoneOffset) : \"\"} `;\r\n\r\n const val = Math.round(min + ((max - min) * percent));\r\n return formatDuration(val);\r\n}\r\n\r\nfunction getPercentageFromDate(startDate: Date, endDate: Date, date?: Date) {\r\n const newDate = date ? date : new Date();\r\n const startTime = startDate.getTime();\r\n const totalDuration = endDate.getTime() - startTime;\r\n return (newDate.getTime() - startTime) / totalDuration;\r\n}\r\n\r\nfunction getDateMarker(dateMarkerPropsIn: TimelineDateMarkerProps, startDate: Date, endDate: Date): DateMarkerProps {\r\n const percentage = getPercentageFromDate(startDate, endDate, dateMarkerPropsIn.date);\r\n const marker = dateMarkerPropsIn.dateMarker ? dateMarkerPropsIn.dateMarker : <span className=\"date-marker-default\"></span>;\r\n return { datePercentage: percentage, dateMarker: marker };\r\n}\r\n\r\nfunction markDateInTimelineRange(dateMarkerProps?: TimelineDateMarkerProps, startDate?: Date, endDate?: Date): boolean {\r\n // istanbul ignore else\r\n if (dateMarkerProps && startDate && endDate) {\r\n const inDate = dateMarkerProps.date ? dateMarkerProps.date : new Date();\r\n // istanbul ignore else\r\n if (inDate.getTime() >= startDate.getTime() && inDate.getTime() <= endDate.getTime())\r\n return true;\r\n }\r\n return false;\r\n}\r\n/**\r\n * @internal\r\n */\r\nexport function RailMarkers({ showToolTip, percent, tooltipText, markDate }: {\r\n showToolTip: boolean;\r\n percent: number;\r\n tooltipText: string;\r\n markDate?: DateMarkerProps;\r\n}) {\r\n\r\n return (\r\n <div className=\"components-timeline-rail-marker-container\">\r\n {showToolTip &&\r\n <div className=\"components-timeline-tooltip\" style={{ left: `${Math.round(percent * 100)}% ` }}>\r\n <span className=\"tooltip-text\">{tooltipText}</span>\r\n </div>}\r\n {markDate &&\r\n <div className=\"components-timeline-date-marker\" data-testid=\"test-date-marker\" style={{ left: `${Math.round(markDate.datePercentage * 100)}% ` }}>\r\n {markDate.dateMarker}\r\n </div>}\r\n </div>\r\n );\r\n}\r\n\r\n/**\r\n * Custom Timeline Thumb\r\n * @internal\r\n */\r\nexport function CustomThumb() {\r\n return (\r\n <div className=\"scrubber-handle\">\r\n <div /><div /><div />\r\n </div>\r\n );\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function useFocusedThumb(sliderContainer: HTMLDivElement | undefined) {\r\n const [thumbElement, setThumbElement] = React.useState<HTMLDivElement>();\r\n\r\n React.useLayoutEffect(() => {\r\n // istanbul ignore else\r\n if (sliderContainer) {\r\n const element = sliderContainer.querySelector(\".iui-slider-thumb\");\r\n if (element && thumbElement !== element) {\r\n setThumbElement(element as HTMLDivElement);\r\n }\r\n }\r\n }, [sliderContainer, thumbElement]);\r\n\r\n const [thumbHasFocus, setThumbHasFocus] = React.useState(false);\r\n\r\n const handleThumbFocus = React.useCallback(() => {\r\n setThumbHasFocus(true);\r\n }, []);\r\n\r\n const handleThumbBlur = React.useCallback(() => {\r\n setThumbHasFocus(false);\r\n }, []);\r\n\r\n useEventListener(\"focus\", handleThumbFocus, thumbElement);\r\n useEventListener(\"blur\", handleThumbBlur, thumbElement);\r\n return thumbHasFocus;\r\n}\r\n\r\n/** Properties for Scrubber/Slider used on timeline control\r\n * @internal\r\n */\r\nexport interface ScrubberProps extends CommonProps {\r\n currentDuration: number;\r\n totalDuration: number;\r\n isPlaying: boolean;\r\n inMiniMode: boolean;\r\n startDate?: Date;\r\n endDate?: Date;\r\n showTime?: boolean;\r\n onChange?: (values: ReadonlyArray<number>) => void;\r\n onUpdate?: (values: ReadonlyArray<number>) => void;\r\n timeZoneOffset?: number;\r\n markDate?: TimelineDateMarkerProps;\r\n}\r\n\r\n/** Properties for marking current date in RailMarkers\r\n * @internal\r\n */\r\ninterface DateMarkerProps {\r\n datePercentage: number;\r\n dateMarker?: React.ReactNode;\r\n}\r\n/** Scrubber/Slider for timeline control\r\n * @internal\r\n */\r\nexport function Scrubber(props: ScrubberProps) {\r\n const { startDate, endDate, showTime, isPlaying, totalDuration, timeZoneOffset,\r\n currentDuration, className, onChange, onUpdate } = props;\r\n\r\n const thumbProps = () => {\r\n return {\r\n className: \"components-timeline-thumb\",\r\n children: <CustomThumb />,\r\n };\r\n };\r\n\r\n const sliderRef = React.useRef<HTMLDivElement>(null);\r\n const [sliderContainer, setSliderContainer] = React.useState<HTMLDivElement>();\r\n const [pointerPercent, setPointerPercent] = React.useState(0);\r\n\r\n React.useLayoutEffect(() => {\r\n // istanbul ignore else\r\n if (sliderRef.current) {\r\n const container = sliderRef.current.querySelector(\".iui-slider-container\");\r\n if (container && sliderContainer !== container) {\r\n setSliderContainer(container as HTMLDivElement);\r\n }\r\n }\r\n }, [sliderContainer]);\r\n\r\n const tooltipProps = React.useCallback(() => {\r\n return { visible: false };\r\n }, []);\r\n\r\n const [showRailTooltip, setShowRailTooltip] = React.useState(false);\r\n\r\n // istanbul ignore next\r\n const handlePointerEnter = React.useCallback(() => {\r\n setShowRailTooltip(true);\r\n }, []);\r\n\r\n // istanbul ignore next\r\n const handlePointerLeave = React.useCallback(() => {\r\n setShowRailTooltip(false);\r\n }, []);\r\n\r\n const handlePointerMove = React.useCallback((event: React.PointerEvent) => {\r\n sliderContainer &&\r\n setPointerPercent(getPercentageOfRectangle(sliderContainer.getBoundingClientRect(), event.clientX));\r\n }, [sliderContainer]);\r\n\r\n const thumbHasFocus = useFocusedThumb(sliderContainer);\r\n\r\n const tickLabel = React.useMemo(() => {\r\n const showTip = isPlaying || showRailTooltip || thumbHasFocus;\r\n const percent = (isPlaying || thumbHasFocus) ? currentDuration / totalDuration : pointerPercent;\r\n const markDateInRange = markDateInTimelineRange(props.markDate, startDate, endDate);\r\n const currentDateMarker = props.markDate && markDateInRange && startDate && endDate ? getDateMarker(props.markDate, startDate, endDate) : undefined;\r\n const tooltipText = generateToolTipText(!!showTime, percent, 0, totalDuration, startDate, endDate, timeZoneOffset);\r\n return (<RailMarkers showToolTip={showTip} percent={percent} tooltipText={tooltipText} markDate={currentDateMarker} />);\r\n }, [isPlaying, showRailTooltip, currentDuration, totalDuration, pointerPercent, startDate, endDate, timeZoneOffset, showTime, thumbHasFocus, props.markDate]);\r\n\r\n return (\r\n <Slider ref={sliderRef}\r\n className={className}\r\n step={1}\r\n min={0}\r\n max={totalDuration}\r\n minLabel=\"\"\r\n maxLabel=\"\"\r\n onUpdate={onUpdate}\r\n onChange={onChange}\r\n values={[currentDuration]}\r\n tooltipProps={tooltipProps}\r\n thumbProps={thumbProps}\r\n tickLabels={tickLabel}\r\n railContainerProps={{\r\n onPointerEnter: handlePointerEnter,\r\n onPointerMove: handlePointerMove,\r\n onPointerLeave: handlePointerLeave,\r\n }}\r\n />\r\n );\r\n}\r\n"]}
@@ -1,112 +1,105 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- @import "~@itwin/core-react/lib/cjs/core-react/style/themecolors";
6
- @import "~@itwin/core-react/lib/cjs/core-react/z-index";
7
-
8
- // the following overrides default iui-slider-thumb settings from iTwinUI
9
- div.components-timeline-thumb.iui-slider-thumb {
10
- display: flex;
11
- justify-content: center;
12
- align-items: center;
13
- background-image: linear-gradient(
14
- to bottom,
15
- $buic-background-3,
16
- $buic-background-3
17
- ),
18
- linear-gradient(to bottom, $buic-background-1, $buic-background-1);
19
- box-sizing: border-box;
20
- width: 38px;
21
- height: 20px;
22
- border-radius: var(--iui-border-radius-1);
23
- border: 1px solid $buic-background-5;
24
- transform: translateX(-19.2px);
25
- top: 4px;
26
- }
27
-
28
- .components-timeline-rail-marker-container {
29
- width: 100%;
30
- position: absolute;
31
-
32
- div.components-timeline-tooltip {
33
- @include uicore-z-index(tooltip);
34
- position: absolute;
35
- top: -8px;
36
- display: inline-block;
37
- transform: translateX(-50px);
38
- border-bottom: 1px dotted #222;
39
- font-size: 14px;
40
-
41
- .tooltip-text {
42
- width: 100px;
43
- background-color: #222;
44
- color: #fff;
45
- // opacity: 0.8;
46
- text-align: center;
47
- border-radius: 6px;
48
- padding: 8px 0;
49
- position: absolute;
50
- z-index: 1;
51
- bottom: 150%;
52
-
53
- &:after {
54
- content: "";
55
- position: absolute;
56
- top: 100%;
57
- left: 50%;
58
- margin-left: -5px;
59
- border-width: 5px;
60
- border-style: solid;
61
- border-color: #222 transparent transparent transparent;
62
- }
63
- }
64
- }
65
- }
66
-
67
- .scrubber-handle {
68
- pointer-events: none;
69
- position: absolute;
70
- width: 38px;
71
- height: 20px;
72
- border-radius: var(--iui-border-radius-1);
73
- display: flex;
74
- align-items: center;
75
- justify-content: center;
76
- box-sizing: border-box;
77
- cursor: pointer;
78
-
79
- > div {
80
- width: 1px;
81
- height: 10px;
82
- opacity: 0.25;
83
- margin: 0 1px;
84
- background-color: $buic-foreground-body;
85
- }
86
- }
87
-
88
- .scrubber-track {
89
- position: absolute;
90
- top: 50%;
91
- transform: translateY(-50%);
92
- height: 4px;
93
- z-index: 1;
94
- cursor: pointer;
95
- }
96
-
97
- .components-timeline-date-marker {
98
- pointer-events: none;
99
- position: absolute;
100
- display: flex;
101
- align-items: center;
102
- justify-content: center;
103
- transform: translateY(50%);
104
- }
105
-
106
- .date-marker-default {
107
- height: 12px;
108
- width: 3px;
109
- border-radius: var(--iui-border-radius-1);
110
- transform: translateY(1px);
111
- background-color: $buic-foreground-primary;
112
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ @import "~@itwin/core-react/lib/cjs/core-react/z-index";
6
+ // the following overrides default iui-slider-thumb settings from iTwinUI
7
+ div.components-timeline-thumb.iui-slider-thumb {
8
+ display: flex;
9
+ justify-content: center;
10
+ align-items: center;
11
+ background-color: var(--iui-color-background);
12
+ box-sizing: border-box;
13
+ width: 38px;
14
+ height: 20px;
15
+ border-radius: var(--iui-border-radius-1);
16
+ border: 1px solid var(--iui-color-border);
17
+ transform: translateX(-19.2px);
18
+ top: 4px;
19
+ }
20
+
21
+ .components-timeline-rail-marker-container {
22
+ width: 100%;
23
+ position: absolute;
24
+
25
+ div.components-timeline-tooltip {
26
+ @include uicore-z-index(tooltip);
27
+ position: absolute;
28
+ top: -8px;
29
+ display: inline-block;
30
+ transform: translateX(-50px);
31
+ border-bottom: 1px dotted rgba(0, 0, 0, var(--iui-opacity-3));
32
+ font-size: 14px;
33
+
34
+ .tooltip-text {
35
+ width: 100px;
36
+ background-color: rgba(0, 0, 0, var(--iui-opacity-3));
37
+ color: #fff;
38
+ // opacity: 0.8;
39
+ text-align: center;
40
+ border-radius: 6px;
41
+ padding: 8px 0;
42
+ position: absolute;
43
+ z-index: 1;
44
+ bottom: 150%;
45
+
46
+ &:after {
47
+ content: "";
48
+ position: absolute;
49
+ top: 100%;
50
+ left: 50%;
51
+ margin-left: -5px;
52
+ border-width: 5px;
53
+ border-style: solid;
54
+ border-color: rgba(0, 0, 0, var(--iui-opacity-3)) transparent
55
+ transparent transparent;
56
+ }
57
+ }
58
+ }
59
+ }
60
+
61
+ .scrubber-handle {
62
+ pointer-events: none;
63
+ position: absolute;
64
+ width: 38px;
65
+ height: 20px;
66
+ border-radius: var(--iui-border-radius-1);
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ box-sizing: border-box;
71
+ cursor: pointer;
72
+
73
+ > div {
74
+ width: 1px;
75
+ height: 10px;
76
+ margin: 0 1px;
77
+ background-color: var(--iui-color-border-subtle);
78
+ }
79
+ }
80
+
81
+ .scrubber-track {
82
+ position: absolute;
83
+ top: 50%;
84
+ transform: translateY(-50%);
85
+ height: 4px;
86
+ z-index: 1;
87
+ cursor: pointer;
88
+ }
89
+
90
+ .components-timeline-date-marker {
91
+ pointer-events: none;
92
+ position: absolute;
93
+ display: flex;
94
+ align-items: center;
95
+ justify-content: center;
96
+ transform: translateY(50%);
97
+ }
98
+
99
+ .date-marker-default {
100
+ height: 12px;
101
+ width: 3px;
102
+ border-radius: var(--iui-border-radius-1);
103
+ transform: translateY(1px);
104
+ background-color: var(--iui-color-border);
105
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"SolarTimeline.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/SolarTimeline.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAe,QAAQ,EAAY,MAAM,oBAAoB,CAAC;AAOrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAsHjD,UAAU,2BAA2B;IACnC,YAAY,EAAE,iBAAiB,CAAC;IAChC,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,2BAA2B;IACnC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,eAA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,OAAO,CAAC,SAAS,CAGf;IAEF,OAAO,CAAC,SAAS,CAGf;IAEF,OAAO,CAAC,cAAc,CAGpB;IAEF,OAAO,CAAC,aAAa,CAEnB;IAEF,OAAO,CAAC,WAAW,CASjB;IAEF,OAAO,CAAC,kBAAkB,CAExB;IAEF,OAAO,CAAC,4BAA4B,CAMlC;IAEK,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAMxB,MAAM;CAsFvB"}
@@ -8,7 +8,11 @@
8
8
  */
9
9
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
10
  if (k2 === undefined) k2 = k;
11
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
12
16
  }) : (function(o, m, k, k2) {
13
17
  if (k2 === undefined) k2 = k;
14
18
  o[k2] = m[k];
@@ -47,6 +51,7 @@ const PlayerButton_1 = require("./PlayerButton");
47
51
  const SpeedTimeline_1 = require("./SpeedTimeline");
48
52
  const Scrubber_1 = require("./Scrubber");
49
53
  const UiIModelComponents_1 = require("../UiIModelComponents");
54
+ const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
50
55
  // cSpell:ignore millisec solarsettings showticks shadowcolor solartimeline datepicker millisecs
51
56
  const millisecPerMinute = 1000 * 60;
52
57
  const millisecPerHour = millisecPerMinute * 60;
@@ -383,12 +388,13 @@ class SolarTimeline extends React.PureComponent {
383
388
  React.createElement("span", null, formattedDate),
384
389
  React.createElement("span", null, "/"),
385
390
  React.createElement("span", null, formattedTime),
386
- React.createElement("span", { className: "icon icon-calendar" })),
391
+ React.createElement("span", { className: "icon" },
392
+ React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgCalendar, null) }))),
387
393
  React.createElement(core_react_1.Popup, { style: { border: "none" }, offset: 11, target: this._datePicker, isOpen: this.state.isDateOpened, onClose: this._onCloseDayPicker, position: appui_abstract_1.RelativePosition.Top },
388
394
  React.createElement("div", { className: "components-date-picker-calendar-popup-panel", "data-testid": "components-date-picker-calendar-popup-panel" },
389
395
  React.createElement(components_react_1.DatePicker, { selected: localTime, onDateChange: this._onDayClick, showFocusOutline: false }),
390
396
  React.createElement("div", { className: "time-container" },
391
- React.createElement(core_react_1.BodyText, { className: "time-label" }, this._timeLabel),
397
+ React.createElement(itwinui_react_1.Text, { variant: "body", className: "time-label" }, this._timeLabel),
392
398
  React.createElement(components_react_1.TimeField, { time: { hours: localTime.getHours(), minutes: localTime.getMinutes(), seconds: 0 }, timeDisplay: appui_abstract_1.TimeDisplay.H12MC, onTimeChange: this._onTimeChanged })))),
393
399
  React.createElement(Timeline, { className: "solar-timeline", dayStartMs: dataProvider.dayStartMs, sunSetOffsetMs: sunSetOffsetMs, sunRiseOffsetMs: sunRiseOffsetMs, currentTimeOffsetMs: currentTimeOffsetMs, onChange: this._onChange, onUpdate: this._onUpdate, formatTime: this._formatTime, isPlaying: this.state.isPlaying }),
394
400
  React.createElement("div", { className: "speed-container" },
@@ -396,9 +402,11 @@ class SolarTimeline extends React.PureComponent {
396
402
  speed,
397
403
  "x"),
398
404
  React.createElement(SpeedTimeline_1.SpeedTimeline, { className: "speed", onChange: this._onSpeedChange, speed: this.state.speed })),
399
- React.createElement("span", { title: this._loopLabel, className: (0, classnames_1.default)("icon", "icon-media-controls-loop", !loop && "no-loop-playback", loop && "loop-playback"), onClick: this._onToggleLoop, role: "button", tabIndex: -1 }),
405
+ React.createElement("span", { title: this._loopLabel, className: (0, classnames_1.default)("icon", !loop && "no-loop-playback", loop && "loop-playback"), onClick: this._onToggleLoop, role: "button", tabIndex: -1 },
406
+ React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgLoop, null) })),
400
407
  React.createElement("button", { "data-testid": "shadow-settings-button", title: this._settingLabel, className: "shadow-settings-button", ref: (element) => this._settings = element, onClick: this._onOpenSettingsPopup },
401
- React.createElement("span", { className: "icon icon-settings" })),
408
+ React.createElement("span", { className: "icon" },
409
+ React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgSettings, null) }))),
402
410
  React.createElement(core_react_1.Popup, { className: "shadow-settings-popup", target: this._settings, offset: 11, isOpen: this.state.isSettingsOpened, onClose: this._onCloseSettingsPopup, position: appui_abstract_1.RelativePosition.Top },
403
411
  React.createElement("div", { className: "shadow-settings-popup-container" },
404
412
  React.createElement("div", { className: "shadow-settings-header" }, this._settingsPopupTitle),