@rio-cloud/rio-uikit 0.16.2-beta.9 → 0.16.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/.DS_Store +0 -0
  2. package/AspectRatioPlaceholder.d.ts +5 -0
  3. package/AspectRatioPlaceholder.js +2 -0
  4. package/AspectRatioPlaceholder.ts +5 -0
  5. package/ConfirmationDialog.d.ts +2 -0
  6. package/Dialog.d.ts +2 -0
  7. package/Map.d.ts +2 -1
  8. package/README.md +11 -1
  9. package/ResponsiveColumnStripe.d.ts +5 -0
  10. package/ResponsiveColumnStripe.js +2 -0
  11. package/RuleConnector.d.ts +2 -1
  12. package/RuleContainer.d.ts +3 -2
  13. package/RulesWrapper.d.ts +2 -1
  14. package/SaveDialog.d.ts +2 -0
  15. package/SimpleDialog.d.ts +2 -0
  16. package/SplitDialog.d.ts +2 -0
  17. package/components/activity/Activity.js +6 -4
  18. package/components/animatedNumber/AnimatedNumber.js +6 -4
  19. package/components/applicationHeader/AppMenu.js +6 -3
  20. package/components/applicationHeader/AppMenuDropdown.js +6 -2
  21. package/components/applicationHeader/ApplicationHeader.js +16 -8
  22. package/components/applicationHeader/MobileAppMenu.js +8 -4
  23. package/components/applicationLayout/ApplicationLayout.js +8 -8
  24. package/components/applicationLayout/ApplicationLayoutBody.js +6 -3
  25. package/components/applicationLayout/ApplicationLayoutBodyBanner.js +4 -3
  26. package/components/applicationLayout/ApplicationLayoutBodyBottomBar.js +6 -4
  27. package/components/applicationLayout/ApplicationLayoutBodyNavigation.js +6 -4
  28. package/components/applicationLayout/ApplicationLayoutHeader.js +9 -7
  29. package/components/aspectRatioPlaceholder/AspectRatioPlaceholder.js +25 -0
  30. package/components/assetTree/AssetTree.js +6 -3
  31. package/components/assetTree/TypeCounter.js +6 -4
  32. package/components/dialog/Dialog.js +3 -1
  33. package/components/dialog/MediaDialog.js +5 -1
  34. package/components/dialog/SaveDialog.js +5 -2
  35. package/components/fade/Fade.js +5 -0
  36. package/components/filepicker/FilePicker.js +1 -1
  37. package/components/map/assets/icon_map_settings_bounding_box_active.svg +1 -1
  38. package/components/map/assets/icon_map_settings_bounding_box_inactive.svg +1 -1
  39. package/components/map/assets/icon_map_settings_construction_active.svg +1 -1
  40. package/components/map/assets/icon_map_settings_construction_inactive.svg +1 -1
  41. package/components/map/assets/icon_map_settings_layer_active.svg +1 -1
  42. package/components/map/assets/icon_map_settings_layer_inactive.svg +1 -1
  43. package/components/map/assets/icon_map_settings_maptype_flat_active.svg +1 -1
  44. package/components/map/assets/icon_map_settings_maptype_flat_inactive.svg +1 -1
  45. package/components/map/assets/icon_map_settings_maptype_flat_truck_active.svg +1 -1
  46. package/components/map/assets/icon_map_settings_maptype_flat_truck_inactive.svg +1 -1
  47. package/components/map/assets/icon_map_settings_maptype_night_active.svg +1 -12
  48. package/components/map/assets/icon_map_settings_maptype_night_inactive.svg +1 -12
  49. package/components/map/assets/icon_map_settings_maptype_satelite_active.svg +1 -1
  50. package/components/map/assets/icon_map_settings_maptype_satelite_inactive.svg +1 -1
  51. package/components/map/assets/icon_map_settings_maptype_terrain_active.svg +1 -1
  52. package/components/map/assets/icon_map_settings_maptype_terrain_inactive.svg +1 -1
  53. package/components/map/assets/icon_map_settings_road_restrictions_active.svg +1 -1
  54. package/components/map/assets/icon_map_settings_road_restrictions_inactive.svg +1 -1
  55. package/components/map/assets/icon_map_settings_system_pois_active.svg +1 -1
  56. package/components/map/assets/icon_map_settings_system_pois_inactive.svg +1 -1
  57. package/components/map/assets/icon_map_settings_workshop_pois_active.svg +1 -1
  58. package/components/map/assets/icon_map_settings_workshop_pois_inactive.svg +1 -1
  59. package/components/map/components/Map.js +47 -36
  60. package/components/map/components/features/ContextMenu.js +1 -1
  61. package/components/map/components/features/Route.js +1 -9
  62. package/components/map/components/features/basics/Circle.js +11 -6
  63. package/components/map/components/features/basics/MapLayerGroup.js +8 -5
  64. package/components/map/components/features/basics/Polygon.js +6 -5
  65. package/components/map/components/features/basics/Polyline.js +39 -42
  66. package/components/map/components/features/basics/marker/DomMarker.js +9 -3
  67. package/components/map/components/features/basics/marker/Marker.js +101 -121
  68. package/components/map/components/features/basics/marker/TextMarker.js +15 -43
  69. package/components/map/components/features/layers/Layer.js +1 -1
  70. package/components/map/components/features/layers/MarkerLayer.js +7 -4
  71. package/components/map/components/features/layers/RoadRestrictionLayer.js +1 -2
  72. package/components/map/components/features/layers/TrafficLayer.js +2 -2
  73. package/components/map/components/features/layers/baselayers/DefaultRasterLayer.js +2 -1
  74. package/components/map/components/features/layers/baselayers/useBaseLayer.js +4 -1
  75. package/components/map/components/features/layers/clustering/ClusterLayer.js +25 -9
  76. package/components/map/components/features/settings/builtinSettings/MapTypeSettings.js +18 -3
  77. package/components/map/icons/MapIcon.js +46 -66
  78. package/components/map/utils/hooks.js +3 -3
  79. package/components/mapMarker/ClusterMapMarker.js +16 -20
  80. package/components/mapMarker/SingleMapMarker.js +16 -30
  81. package/components/numberControl/NumberControl.js +13 -7
  82. package/components/numberInput/NumberInput.js +30 -12
  83. package/components/responsiveColumnStripe/ResponsiveColumnStripe.js +255 -0
  84. package/components/rules/RuleContainer.js +4 -0
  85. package/components/rules/RulesWrapper.js +3 -3
  86. package/hooks/useDarkMode.js +3 -2
  87. package/hooks/useMutationObserver.js +13 -4
  88. package/hooks/useScrollPosition.js +6 -7
  89. package/index.d.ts +31 -29
  90. package/index.js +4 -0
  91. package/lib/es/AspectRatioPlaceholder.d.ts +5 -0
  92. package/lib/es/AspectRatioPlaceholder.js +13 -0
  93. package/lib/es/AspectRatioPlaceholder.ts +5 -0
  94. package/lib/es/ConfirmationDialog.d.ts +2 -0
  95. package/lib/es/Dialog.d.ts +2 -0
  96. package/lib/es/Map.d.ts +2 -1
  97. package/lib/es/ResponsiveColumnStripe.d.ts +5 -0
  98. package/lib/es/ResponsiveColumnStripe.js +13 -0
  99. package/lib/es/RuleConnector.d.ts +2 -1
  100. package/lib/es/RuleContainer.d.ts +3 -2
  101. package/lib/es/RulesWrapper.d.ts +2 -1
  102. package/lib/es/SaveDialog.d.ts +2 -0
  103. package/lib/es/SimpleDialog.d.ts +2 -0
  104. package/lib/es/SplitDialog.d.ts +2 -0
  105. package/lib/es/components/activity/Activity.js +9 -4
  106. package/lib/es/components/animatedNumber/AnimatedNumber.js +5 -3
  107. package/lib/es/components/applicationHeader/AppMenu.js +6 -3
  108. package/lib/es/components/applicationHeader/AppMenuDropdown.js +6 -2
  109. package/lib/es/components/applicationHeader/ApplicationHeader.js +15 -7
  110. package/lib/es/components/applicationHeader/MobileAppMenu.js +8 -4
  111. package/lib/es/components/applicationLayout/ApplicationLayout.js +11 -8
  112. package/lib/es/components/applicationLayout/ApplicationLayoutBody.js +5 -2
  113. package/lib/es/components/applicationLayout/ApplicationLayoutBodyBanner.js +7 -3
  114. package/lib/es/components/applicationLayout/ApplicationLayoutBodyBottomBar.js +9 -4
  115. package/lib/es/components/applicationLayout/ApplicationLayoutBodyNavigation.js +9 -4
  116. package/lib/es/components/applicationLayout/ApplicationLayoutHeader.js +12 -7
  117. package/lib/es/components/aspectRatioPlaceholder/AspectRatioPlaceholder.js +33 -0
  118. package/lib/es/components/assetTree/AssetTree.js +5 -2
  119. package/lib/es/components/assetTree/TypeCounter.js +9 -4
  120. package/lib/es/components/dialog/Dialog.js +3 -1
  121. package/lib/es/components/dialog/MediaDialog.js +5 -1
  122. package/lib/es/components/dialog/SaveDialog.js +5 -2
  123. package/lib/es/components/fade/Fade.js +5 -0
  124. package/lib/es/components/filepicker/FilePicker.js +1 -1
  125. package/lib/es/components/map/assets/icon_map_settings_bounding_box_active.svg +1 -1
  126. package/lib/es/components/map/assets/icon_map_settings_bounding_box_inactive.svg +1 -1
  127. package/lib/es/components/map/assets/icon_map_settings_construction_active.svg +1 -1
  128. package/lib/es/components/map/assets/icon_map_settings_construction_inactive.svg +1 -1
  129. package/lib/es/components/map/assets/icon_map_settings_layer_active.svg +1 -1
  130. package/lib/es/components/map/assets/icon_map_settings_layer_inactive.svg +1 -1
  131. package/lib/es/components/map/assets/icon_map_settings_maptype_flat_active.svg +1 -1
  132. package/lib/es/components/map/assets/icon_map_settings_maptype_flat_inactive.svg +1 -1
  133. package/lib/es/components/map/assets/icon_map_settings_maptype_flat_truck_active.svg +1 -1
  134. package/lib/es/components/map/assets/icon_map_settings_maptype_flat_truck_inactive.svg +1 -1
  135. package/lib/es/components/map/assets/icon_map_settings_maptype_night_active.svg +1 -12
  136. package/lib/es/components/map/assets/icon_map_settings_maptype_night_inactive.svg +1 -12
  137. package/lib/es/components/map/assets/icon_map_settings_maptype_satelite_active.svg +1 -1
  138. package/lib/es/components/map/assets/icon_map_settings_maptype_satelite_inactive.svg +1 -1
  139. package/lib/es/components/map/assets/icon_map_settings_maptype_terrain_active.svg +1 -1
  140. package/lib/es/components/map/assets/icon_map_settings_maptype_terrain_inactive.svg +1 -1
  141. package/lib/es/components/map/assets/icon_map_settings_road_restrictions_active.svg +1 -1
  142. package/lib/es/components/map/assets/icon_map_settings_road_restrictions_inactive.svg +1 -1
  143. package/lib/es/components/map/assets/icon_map_settings_system_pois_active.svg +1 -1
  144. package/lib/es/components/map/assets/icon_map_settings_system_pois_inactive.svg +1 -1
  145. package/lib/es/components/map/assets/icon_map_settings_workshop_pois_active.svg +1 -1
  146. package/lib/es/components/map/assets/icon_map_settings_workshop_pois_inactive.svg +1 -1
  147. package/lib/es/components/map/components/Map.js +47 -36
  148. package/lib/es/components/map/components/features/ContextMenu.js +1 -1
  149. package/lib/es/components/map/components/features/Route.js +1 -9
  150. package/lib/es/components/map/components/features/basics/Circle.js +10 -5
  151. package/lib/es/components/map/components/features/basics/MapLayerGroup.js +8 -5
  152. package/lib/es/components/map/components/features/basics/Polygon.js +6 -5
  153. package/lib/es/components/map/components/features/basics/Polyline.js +39 -42
  154. package/lib/es/components/map/components/features/basics/marker/DomMarker.js +8 -3
  155. package/lib/es/components/map/components/features/basics/marker/Marker.js +105 -120
  156. package/lib/es/components/map/components/features/basics/marker/TextMarker.js +15 -42
  157. package/lib/es/components/map/components/features/layers/Layer.js +1 -1
  158. package/lib/es/components/map/components/features/layers/MarkerLayer.js +7 -4
  159. package/lib/es/components/map/components/features/layers/RoadRestrictionLayer.js +1 -2
  160. package/lib/es/components/map/components/features/layers/TrafficLayer.js +2 -2
  161. package/lib/es/components/map/components/features/layers/baselayers/DefaultRasterLayer.js +2 -1
  162. package/lib/es/components/map/components/features/layers/baselayers/useBaseLayer.js +4 -1
  163. package/lib/es/components/map/components/features/layers/clustering/ClusterLayer.js +25 -9
  164. package/lib/es/components/map/components/features/settings/builtinSettings/MapTypeSettings.js +18 -3
  165. package/lib/es/components/map/icons/MapIcon.js +46 -66
  166. package/lib/es/components/map/utils/hooks.js +3 -3
  167. package/lib/es/components/mapMarker/ClusterMapMarker.js +16 -20
  168. package/lib/es/components/mapMarker/SingleMapMarker.js +16 -30
  169. package/lib/es/components/numberControl/NumberControl.js +13 -7
  170. package/lib/es/components/numberInput/NumberInput.js +31 -12
  171. package/lib/es/components/responsiveColumnStripe/ResponsiveColumnStripe.js +266 -0
  172. package/lib/es/components/rules/RuleContainer.js +4 -0
  173. package/lib/es/components/rules/RulesWrapper.js +3 -3
  174. package/lib/es/hooks/useDarkMode.js +4 -3
  175. package/lib/es/hooks/useMutationObserver.js +15 -4
  176. package/lib/es/hooks/useScrollPosition.js +6 -7
  177. package/lib/es/index.d.ts +31 -29
  178. package/lib/es/index.js +24 -0
  179. package/lib/es/styles/components/ApplicationHeader.less +2 -0
  180. package/lib/es/styles/components/Dialog.less +41 -23
  181. package/lib/es/styles/components/MapMarker.less +224 -14
  182. package/lib/es/styles/components/MapSettings.less +45 -29
  183. package/lib/es/styles/components/Notification.less +1 -1
  184. package/lib/es/styles/design/alerts.less +7 -9
  185. package/lib/es/styles/design/aspect-ratio.less +1 -0
  186. package/lib/es/styles/design/blur.less +7 -0
  187. package/lib/es/styles/design/border.less +51 -14
  188. package/lib/es/styles/design/callouts.less +12 -11
  189. package/lib/es/styles/design/colors.less +15 -6
  190. package/lib/es/styles/design/cols.less +19 -18
  191. package/lib/es/styles/design/divide.less +165 -0
  192. package/lib/es/styles/design/divider.less +90 -0
  193. package/lib/es/styles/design/responsive/_imports.less +1 -0
  194. package/lib/es/styles/design/responsive/gap.less +0 -8
  195. package/lib/es/styles/design/responsive/spacing.less +25 -0
  196. package/lib/es/styles/design/text.less +16 -2
  197. package/lib/es/styles/mapping/color-map.less +10 -0
  198. package/lib/es/styles/mapping/spacings-map.less +5 -0
  199. package/lib/es/styles/rio-uikit-core.less +2 -0
  200. package/lib/es/styles/variables/colors.json +6 -0
  201. package/lib/es/styles/variables/concated_css_variables.less +6 -0
  202. package/lib/es/styles/variables/dark_colors.less +7 -0
  203. package/lib/es/styles/variables/dark_css_variables_map.less +7 -0
  204. package/lib/es/styles/variables/light_colors.less +7 -0
  205. package/lib/es/styles/variables/light_css_variables_map.less +7 -0
  206. package/lib/es/themes/Volkswagen/components/applicationHeader/VolkswagenApplicationHeader.js +14 -5
  207. package/lib/es/types.ts +71 -25
  208. package/lib/es/useDarkMode.d.ts +4 -0
  209. package/lib/es/useDarkMode.js +13 -0
  210. package/lib/es/useMutationObserver.d.ts +4 -0
  211. package/lib/es/useMutationObserver.js +13 -0
  212. package/lib/es/version.json +1 -1
  213. package/package.json +1 -1
  214. package/styles/components/ApplicationHeader.less +2 -0
  215. package/styles/components/Dialog.less +41 -23
  216. package/styles/components/MapMarker.less +224 -14
  217. package/styles/components/MapSettings.less +45 -29
  218. package/styles/components/Notification.less +1 -1
  219. package/styles/design/alerts.less +7 -9
  220. package/styles/design/aspect-ratio.less +1 -0
  221. package/styles/design/blur.less +7 -0
  222. package/styles/design/border.less +51 -14
  223. package/styles/design/callouts.less +12 -11
  224. package/styles/design/colors.less +15 -6
  225. package/styles/design/cols.less +19 -18
  226. package/styles/design/divide.less +165 -0
  227. package/styles/design/divider.less +90 -0
  228. package/styles/design/responsive/_imports.less +1 -0
  229. package/styles/design/responsive/gap.less +0 -8
  230. package/styles/design/responsive/spacing.less +25 -0
  231. package/styles/design/text.less +16 -2
  232. package/styles/mapping/color-map.less +10 -0
  233. package/styles/mapping/spacings-map.less +5 -0
  234. package/styles/rio-uikit-core.less +2 -0
  235. package/styles/variables/colors.json +6 -0
  236. package/styles/variables/concated_css_variables.less +6 -0
  237. package/styles/variables/dark_colors.less +7 -0
  238. package/styles/variables/dark_css_variables_map.less +7 -0
  239. package/styles/variables/light_colors.less +7 -0
  240. package/styles/variables/light_css_variables_map.less +7 -0
  241. package/themes/Volkswagen/components/applicationHeader/VolkswagenApplicationHeader.js +15 -6
  242. package/types.ts +71 -25
  243. package/useDarkMode.d.ts +4 -0
  244. package/useDarkMode.js +2 -0
  245. package/useMutationObserver.d.ts +4 -0
  246. package/useMutationObserver.js +2 -0
  247. package/version.json +1 -1
  248. package/components/.DS_Store +0 -0
  249. package/components/map/.DS_Store +0 -0
  250. package/components/map/components/.DS_Store +0 -0
  251. package/components/map/components/features/layers/TruckLayer.js +0 -20
  252. package/components/map/components/features/layers/baselayers/BaseLayer.js +0 -33
  253. package/components/map/components/features/layers/baselayers/DefaultLayer.js +0 -23
  254. package/hooks/useHereMap.ts +0 -23
  255. package/hooks/useScripts.ts +0 -52
  256. package/lib/.DS_Store +0 -0
  257. package/lib/es/.DS_Store +0 -0
  258. package/lib/es/components/.DS_Store +0 -0
  259. package/lib/es/components/map/components/features/layers/TruckLayer.js +0 -28
  260. package/lib/es/components/map/components/features/layers/baselayers/BaseLayer.js +0 -41
  261. package/lib/es/components/map/components/features/layers/baselayers/DefaultLayer.js +0 -30
  262. package/lib/es/hooks/useHereMap.ts +0 -23
  263. package/lib/es/hooks/useScripts.ts +0 -52
  264. package/lib/es/styles/.DS_Store +0 -0
  265. package/lib/es/styles/mixins/_mixins.less +0 -13
  266. package/lib/es/styles/mixins/alerts.less +0 -13
  267. package/lib/es/styles/shared/colors.json +0 -56
  268. package/lib/es/styles/shared/colors.less +0 -73
  269. package/lib/es/styles/shared/screens.less +0 -7
  270. package/lib/es/styles/shared/text.less +0 -23
  271. package/lib/es/styles/variables.less +0 -186
  272. package/lib/es/themes/.DS_Store +0 -0
  273. package/styles/.DS_Store +0 -0
  274. package/styles/mixins/_mixins.less +0 -13
  275. package/styles/mixins/alerts.less +0 -13
  276. package/styles/shared/colors.json +0 -56
  277. package/styles/shared/colors.less +0 -73
  278. package/styles/shared/screens.less +0 -7
  279. package/styles/shared/text.less +0 -23
  280. package/styles/variables.less +0 -186
  281. package/themes/.DS_Store +0 -0
  282. package/themes/Volkswagen/.DS_Store +0 -0
  283. package/themes/Website/.DS_Store +0 -0
@@ -1,11 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["unit", "inputAddon", "className", "bsSize", "disabled", "onValueChanged", "min", "max", "value", "step", "placeholder"];
4
+ var _excluded = ["unit", "inputAddon", "className", "bsSize", "disabled", "onChange", "onValueChanged", "min", "max", "value", "step", "digitPrecision", "placeholder"];
5
5
  import React, { useEffect, useState } from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import classNames from 'classnames';
8
8
  import useAfterMount from '../../hooks/useAfterMount';
9
+ var DEFAULT_DIGIT_PRECISION = 3;
10
+ var DEFAULT_VALUE = 0;
11
+ var DEFAULT_STEP = 1;
9
12
 
10
13
  // Note: even if limits are set and input type is number, many browsers allow to enter invalid data
11
14
  // like entering characters or values outside the boundaries, hence we have to check the input here
@@ -14,9 +17,8 @@ import useAfterMount from '../../hooks/useAfterMount';
14
17
  export var defaultProps = {
15
18
  min: 0,
16
19
  max: Number.MAX_VALUE,
17
- step: 1
20
+ step: DEFAULT_STEP
18
21
  };
19
- var DEFAULT_VALUE = 0;
20
22
  var getValueFromProps = function getValueFromProps(val, min, max, placeholder) {
21
23
  // Show placeholders if given instead of 0
22
24
  if (val === undefined && placeholder) {
@@ -45,15 +47,21 @@ var NumberInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
45
47
  className = props.className,
46
48
  bsSize = props.bsSize,
47
49
  disabled = props.disabled,
50
+ onChange = props.onChange,
48
51
  _props$onValueChanged = props.onValueChanged,
49
52
  onValueChanged = _props$onValueChanged === void 0 ? function () {} : _props$onValueChanged,
50
53
  propMin = props.min,
51
54
  propMax = props.max,
52
55
  propValue = props.value,
53
56
  _props$step = props.step,
54
- step = _props$step === void 0 ? 1 : _props$step,
57
+ step = _props$step === void 0 ? DEFAULT_STEP : _props$step,
58
+ _props$digitPrecision = props.digitPrecision,
59
+ digitPrecision = _props$digitPrecision === void 0 ? DEFAULT_DIGIT_PRECISION : _props$digitPrecision,
55
60
  placeholder = props.placeholder,
56
61
  remainingProps = _objectWithoutProperties(props, _excluded);
62
+
63
+ // Note, "onChange" should replace "onValueChanged" in the future but it's widely used
64
+ var callback = onChange || onValueChanged;
57
65
  var min = Number.isFinite(propMin) ? propMin : defaultProps.min;
58
66
  var max = Number.isFinite(propMax) ? propMax : defaultProps.max;
59
67
  var value = getValueFromProps(propValue, min, max, placeholder);
@@ -95,25 +103,32 @@ var NumberInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
95
103
  });
96
104
 
97
105
  // Only call back the caller for valid values
98
- isValid && onValueChanged(newValidValue);
106
+ isValid && callback(newValidValue);
99
107
  };
100
108
  var handleOnChange = function handleOnChange(event) {
101
- return applyValue(event.target.value);
109
+ applyValue(event.target.value);
102
110
  };
103
- var handleBlur = function handleBlur(event) {
104
- // console.log({enteredValue: state.enteredValue, event: Number(event.target.value)});
105
111
 
106
- // When the value is removed, keep the input empty but trigger the onValueChanged callback
112
+ // Prevent entering exponent to avoide side effects
113
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=1398528
114
+ var handleKeyDown = function handleKeyDown(event) {
115
+ if (event.key === 'e' || event.key === 'E') {
116
+ event.preventDefault();
117
+ }
118
+ };
119
+ var handleBlur = function handleBlur(event) {
120
+ // When the value is removed, keep the input empty but trigger the outside callback
107
121
  // since the user has finished his input
108
122
  var lastEnteredValue = state.enteredValue;
109
123
  if (lastEnteredValue === '') {
110
- onValueChanged(lastEnteredValue);
124
+ callback(lastEnteredValue);
111
125
  return;
112
126
  }
113
127
 
114
- // Otherwise, validate the input and clamp it if the entered value exeeds the limitations
128
+ // Otherwise, validate the input, round it according to digitPrecision,
129
+ // and clamp the value if the entered value exeeds the limitations
115
130
  var convertedEnteredValue = convertNonIntegerToDefault(Number(lastEnteredValue));
116
- var validNumber = clampNumber(convertedEnteredValue, min, max);
131
+ var validNumber = clampNumber(Number(convertedEnteredValue).toFixed(digitPrecision), min, max);
117
132
  applyValue(validNumber);
118
133
  };
119
134
  var inputGroupClassNames = classNames('input-group', bsSize === 'sm' && 'input-group-sm', bsSize === 'lg' && 'input-group-lg');
@@ -128,6 +143,7 @@ var NumberInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
128
143
  disabled: disabled,
129
144
  onBlur: handleBlur,
130
145
  onChange: handleOnChange,
146
+ onKeyDown: handleKeyDown,
131
147
  ref: ref,
132
148
  "aria-label": "number-input",
133
149
  placeholder: placeholder,
@@ -151,11 +167,13 @@ NumberInput.propTypes = {
151
167
  value: PropTypes.number,
152
168
  step: PropTypes.number,
153
169
  disabled: PropTypes.bool,
170
+ onChange: PropTypes.func,
154
171
  onValueChanged: PropTypes.func,
155
172
  bsSize: PropTypes.oneOf(['sm', 'lg', 'small', 'large']),
156
173
  className: PropTypes.string,
157
174
  unit: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
158
175
  inputAddon: PropTypes.string,
176
+ digitPrecision: PropTypes.number,
159
177
  placeholder: PropTypes.string
160
178
  };
161
179
  export default NumberInput;
@@ -0,0 +1,255 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
5
+ var _excluded = ["minColumnWith", "minColumns", "maxColumns", "className", "buttonClassName", "columnsWrapperClassName", "onNextClick", "onPreviousClick", "stretchLastItems", "asType", "activePage", "disableAnimation", "children"];
6
+ import React, { useState, useRef, useEffect, forwardRef } from 'react';
7
+ import PropTypes from 'prop-types';
8
+ import classNames from 'classnames';
9
+ import findIndex from 'lodash/fp/findIndex';
10
+ import chunk from 'lodash/fp/chunk';
11
+ import { AnimatePresence, motion } from 'framer-motion';
12
+ import useAfterMount from '../../hooks/useAfterMount';
13
+ import useElementSize from '../../hooks/useElementSize';
14
+ var DEFAULT_MIN_COLUMN_WITH = 300;
15
+ var DEFAULT_MIN_COLUMNS = 1;
16
+ var DEFAULT_MAX_COLUMNS = 5;
17
+ var DEFAULT_COLUMN_WRAPPER_TYPE = 'div';
18
+ var DEFAULT_ACTIVE_PAGE = 0;
19
+ var MIN_WITH_THRESHOLD = 10;
20
+ var ANIMATION_DURATION = 0.2;
21
+ var ANIMATION_NEXT = 'page';
22
+ var ANIMATION_BACK = 'pageBack';
23
+ var COLUMN_ITEM_CLASSNAME = 'ColumnItem';
24
+ var pageTransitionVariants = function pageTransitionVariants(pageDirection) {
25
+ return {
26
+ pageEnter: function pageEnter() {
27
+ return {
28
+ x: pageDirection === ANIMATION_NEXT ? '60%' : '-60%',
29
+ opacity: 0
30
+ };
31
+ },
32
+ pageCenter: function pageCenter() {
33
+ return {
34
+ x: 0,
35
+ opacity: 1
36
+ };
37
+ }
38
+ };
39
+ };
40
+ var getFirstColumnItem = function getFirstColumnItem(node) {
41
+ if (_toConsumableArray(node.classList).includes(COLUMN_ITEM_CLASSNAME)) {
42
+ return node;
43
+ }
44
+ return getFirstColumnItem(node.children[0]);
45
+ };
46
+ var ResponsiveColumnStripe = /*#__PURE__*/forwardRef(function (props, ref) {
47
+ var _props$minColumnWith = props.minColumnWith,
48
+ minColumnWith = _props$minColumnWith === void 0 ? DEFAULT_MIN_COLUMN_WITH : _props$minColumnWith,
49
+ _props$minColumns = props.minColumns,
50
+ minColumns = _props$minColumns === void 0 ? DEFAULT_MIN_COLUMNS : _props$minColumns,
51
+ _props$maxColumns = props.maxColumns,
52
+ maxColumns = _props$maxColumns === void 0 ? DEFAULT_MAX_COLUMNS : _props$maxColumns,
53
+ _props$className = props.className,
54
+ className = _props$className === void 0 ? '' : _props$className,
55
+ _props$buttonClassNam = props.buttonClassName,
56
+ buttonClassName = _props$buttonClassNam === void 0 ? '' : _props$buttonClassNam,
57
+ _props$columnsWrapper = props.columnsWrapperClassName,
58
+ columnsWrapperClassName = _props$columnsWrapper === void 0 ? '' : _props$columnsWrapper,
59
+ _props$onNextClick = props.onNextClick,
60
+ onNextClick = _props$onNextClick === void 0 ? function () {} : _props$onNextClick,
61
+ _props$onPreviousClic = props.onPreviousClick,
62
+ onPreviousClick = _props$onPreviousClic === void 0 ? function () {} : _props$onPreviousClic,
63
+ _props$stretchLastIte = props.stretchLastItems,
64
+ stretchLastItems = _props$stretchLastIte === void 0 ? true : _props$stretchLastIte,
65
+ _props$asType = props.asType,
66
+ asType = _props$asType === void 0 ? DEFAULT_COLUMN_WRAPPER_TYPE : _props$asType,
67
+ _props$activePage = props.activePage,
68
+ activePage = _props$activePage === void 0 ? DEFAULT_ACTIVE_PAGE : _props$activePage,
69
+ _props$disableAnimati = props.disableAnimation,
70
+ disableAnimation = _props$disableAnimati === void 0 ? false : _props$disableAnimati,
71
+ children = props.children,
72
+ remainingProps = _objectWithoutProperties(props, _excluded);
73
+ var ComponentType = asType;
74
+ var _useState = useState(activePage),
75
+ _useState2 = _slicedToArray(_useState, 2),
76
+ currentPage = _useState2[0],
77
+ setCurrentPage = _useState2[1];
78
+ var _useState3 = useState(maxColumns),
79
+ _useState4 = _slicedToArray(_useState3, 2),
80
+ columnsPerPage = _useState4[0],
81
+ setColumnsPerPage = _useState4[1];
82
+ var _useState5 = useState(false),
83
+ _useState6 = _slicedToArray(_useState5, 2),
84
+ enableInitialAnimation = _useState6[0],
85
+ setEnableInitialAnimation = _useState6[1];
86
+ var _useState7 = useState(false),
87
+ _useState8 = _slicedToArray(_useState7, 2),
88
+ isResizePage = _useState8[0],
89
+ setIsResizePage = _useState8[1];
90
+ var _useState9 = useState(ANIMATION_NEXT),
91
+ _useState10 = _slicedToArray(_useState9, 2),
92
+ animationDirection = _useState10[0],
93
+ setAnimationDirection = _useState10[1];
94
+
95
+ // The base for reacting on changing width of the wrapping element.
96
+ // It uses a ResizeObserver under the hood.
97
+ var columnWrapperRef = useRef();
98
+ var _useElementSize = useElementSize(columnWrapperRef),
99
+ _useElementSize2 = _slicedToArray(_useElementSize, 1),
100
+ columnWrapperWidth = _useElementSize2[0];
101
+ useAfterMount(function () {
102
+ setEnableInitialAnimation(true);
103
+ });
104
+
105
+ // Update active page from outside to be used as controlled component
106
+ useEffect(function () {
107
+ if (Number.isFinite(activePage)) {
108
+ setCurrentPage(activePage);
109
+ }
110
+ }, [activePage]);
111
+ var updatePageOnColumnsSizeChange = function updatePageOnColumnsSizeChange(firstItem, columnsPerPage, children) {
112
+ // Split children in page chunks
113
+ var itemChunks = chunk(columnsPerPage)(children);
114
+
115
+ // find the currently rendered first item inside the chunks.
116
+ // The found chunk index is the new page to render.
117
+ // example of chunks => [['a', 'b', 'c'], ['d']]
118
+ var targetPage = findIndex(function (chunk) {
119
+ return chunk.some(function (chunkItem) {
120
+ var _firstItem$attributes;
121
+ return chunkItem.key === ((_firstItem$attributes = firstItem.attributes['data-key']) === null || _firstItem$attributes === void 0 ? void 0 : _firstItem$attributes.value);
122
+ });
123
+ })(itemChunks);
124
+ if (targetPage !== currentPage) {
125
+ setCurrentPage(targetPage);
126
+ }
127
+ };
128
+
129
+ // When the container size changes, adapt the amount of columns to be rendered according
130
+ // to the given min width of a single item. The new amount of columns also has to respect
131
+ // the lower and upper limit. When updating the amount, the current page hse to be updated as well.
132
+ useEffect(function () {
133
+ if (!columnWrapperRef.current) {
134
+ return;
135
+ }
136
+ var firstItem = getFirstColumnItem(columnWrapperRef.current.children[0]);
137
+ if (!firstItem) {
138
+ return;
139
+ }
140
+
141
+ // Get the width of the first column to calculate how many columns fit in one page
142
+ // according to the given minWidth per column
143
+ var columnWidth = firstItem.getBoundingClientRect().width;
144
+
145
+ // Limit columns per page for given min and max values
146
+ var allowForLessColumns = columnsPerPage - 1 >= minColumns;
147
+ var allowForMoreColumns = columnsPerPage + 1 <= maxColumns;
148
+
149
+ // The threshold is required to avoid jumping between bigger and smaller after the columns per page
150
+ // has changed and it continues to resize
151
+ var goSmaller = allowForLessColumns && columnWidth + MIN_WITH_THRESHOLD <= minColumnWith;
152
+ var goBigger = allowForMoreColumns && (columnsPerPage + 1) * minColumnWith <= columnWrapperWidth;
153
+
154
+ // During resizing, we don't want any animation
155
+ setIsResizePage(true);
156
+ if (goBigger) {
157
+ var newValue = columnsPerPage + 1;
158
+ setColumnsPerPage(newValue);
159
+ updatePageOnColumnsSizeChange(firstItem, newValue, children);
160
+ return;
161
+ }
162
+ if (goSmaller) {
163
+ var _newValue = columnsPerPage - 1;
164
+ setColumnsPerPage(_newValue);
165
+ updatePageOnColumnsSizeChange(firstItem, _newValue, children);
166
+ return;
167
+ }
168
+ }, [columnWrapperWidth, columnWrapperRef.current, children]);
169
+ var handlePrevClick = function handlePrevClick() {
170
+ setIsResizePage(false);
171
+ setAnimationDirection(ANIMATION_BACK);
172
+ var pageNumber = currentPage - 1;
173
+ setCurrentPage(pageNumber);
174
+ onPreviousClick(pageNumber, columnsPerPage);
175
+ };
176
+ var handleNextClick = function handleNextClick() {
177
+ setIsResizePage(false);
178
+ setAnimationDirection(ANIMATION_NEXT);
179
+ var pageNumber = currentPage + 1;
180
+ setCurrentPage(pageNumber);
181
+ onNextClick(pageNumber, columnsPerPage);
182
+ };
183
+ if (!children) {
184
+ return null;
185
+ }
186
+
187
+ // Split the children/columns in chunks according to the current columns per page size
188
+ // and get the current page chunk for rendering
189
+ var columnsToDisplay = chunk(columnsPerPage)(children)[currentPage];
190
+ var showPageButtons = minColumns < children.length;
191
+ var disablePreviousPage = currentPage === 0;
192
+ var disableNextPage = currentPage === Math.ceil(children.length / columnsPerPage) - 1;
193
+ var wrapperClassName = classNames('ResponsiveColumnStripe', 'display-flex align-items-center', 'overflow-hidden', className);
194
+ var baseButtonClassName = classNames('align-items-center', 'align-self-stretch', 'display-flex', 'hover-scale-105', 'hover-text-color-darkest', 'padding-10', 'cursor-pointer', 'text-color-darker', 'text-size-12');
195
+ var disabledButtonClassName = 'pointer-events-none opacity-30';
196
+ var previousButtonClassName = classNames('PreviousButton', baseButtonClassName, disablePreviousPage && disabledButtonClassName);
197
+ var nextButtonClassName = classNames('NextButton', baseButtonClassName, disableNextPage && disabledButtonClassName);
198
+ var mergedColumnsWrapperClassName = classNames('ColumnWrapper', 'flex-1-1', 'display-flex', columnsWrapperClassName);
199
+ var columnClassName = disableNextPage && !stretchLastItems ? 'flex-0-1' : 'flex-1-1';
200
+
201
+ // Use the given custom component type "div" or any other. Clone the children to inject certain
202
+ // properties that are required to stretch the items and deal with their size.
203
+ var columns = /*#__PURE__*/React.createElement(ComponentType, {
204
+ className: mergedColumnsWrapperClassName
205
+ }, React.Children.map(columnsToDisplay, function (column) {
206
+ var _column$props;
207
+ return /*#__PURE__*/React.cloneElement(column, {
208
+ className: "".concat(COLUMN_ITEM_CLASSNAME, " ").concat(columnClassName, " ").concat(((_column$props = column.props) === null || _column$props === void 0 ? void 0 : _column$props.className) || ''),
209
+ // style: { ...column.props?.style, minWidth: `${minColumnWith}px` },
210
+ 'data-key': column.key
211
+ });
212
+ }));
213
+ return /*#__PURE__*/React.createElement("div", _extends({}, remainingProps, {
214
+ ref: ref,
215
+ className: wrapperClassName
216
+ }), showPageButtons && /*#__PURE__*/React.createElement("div", {
217
+ className: previousButtonClassName,
218
+ onClick: handlePrevClick
219
+ }, /*#__PURE__*/React.createElement("span", {
220
+ className: "rioglyph rioglyph-chevron-left"
221
+ })), /*#__PURE__*/React.createElement("div", {
222
+ className: "ColumnsArea flex-1-1 overflow-hidden",
223
+ ref: columnWrapperRef
224
+ }, disableAnimation || isResizePage ? columns : null, !disableAnimation && !isResizePage && /*#__PURE__*/React.createElement(AnimatePresence, {
225
+ exitBeforeEnter: true
226
+ }, /*#__PURE__*/React.createElement(motion.div, {
227
+ key: currentPage,
228
+ variants: pageTransitionVariants(animationDirection),
229
+ initial: enableInitialAnimation ? 'pageEnter' : false,
230
+ animate: "pageCenter",
231
+ transition: {
232
+ duration: ANIMATION_DURATION
233
+ }
234
+ }, columns))), showPageButtons && /*#__PURE__*/React.createElement("div", {
235
+ className: nextButtonClassName,
236
+ onClick: handleNextClick
237
+ }, /*#__PURE__*/React.createElement("span", {
238
+ className: "rioglyph rioglyph-chevron-right"
239
+ })));
240
+ });
241
+ export default ResponsiveColumnStripe;
242
+ ResponsiveColumnStripe.propTypes = {
243
+ minColumnWith: PropTypes.number,
244
+ minColumns: PropTypes.number,
245
+ maxColumns: PropTypes.number,
246
+ className: PropTypes.string,
247
+ buttonClassName: PropTypes.string,
248
+ columnsWrapperClassName: PropTypes.string,
249
+ onNextClick: PropTypes.func,
250
+ onPreviousClick: PropTypes.func,
251
+ stretchLastItems: PropTypes.bool,
252
+ asType: PropTypes.string,
253
+ activePage: PropTypes.number,
254
+ disableAnimation: PropTypes.bool
255
+ };
@@ -29,6 +29,10 @@ var RuleContainer = function RuleContainer(props) {
29
29
  exitBeforeEnter: true
30
30
  }, React.Children.map(children, function (child) {
31
31
  var _child$type;
32
+ if (!child) {
33
+ return null;
34
+ }
35
+
32
36
  // In case there are multiple children of RuleContainer, use the
33
37
  // type name or the type itself as a key to animate between the two children
34
38
  return /*#__PURE__*/React.createElement(motion.div, {
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["children"];
4
4
  import React from 'react';
5
5
  import { AnimatePresence, motion } from 'framer-motion';
6
- var RuleWrapper = function RuleWrapper(_ref) {
6
+ var RulesWrapper = function RulesWrapper(_ref) {
7
7
  var children = _ref.children,
8
8
  remainigProps = _objectWithoutProperties(_ref, _excluded);
9
9
  return /*#__PURE__*/React.createElement(motion.div, _extends({
@@ -13,5 +13,5 @@ var RuleWrapper = function RuleWrapper(_ref) {
13
13
  layout: "position"
14
14
  }, children)));
15
15
  };
16
- RuleWrapper.defaultProps = {};
17
- export default RuleWrapper;
16
+ RulesWrapper.defaultProps = {};
17
+ export default RulesWrapper;
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { useCallback, useEffect, useState } from 'react';
3
3
  import { THEME_DARK, THEME_DATA_ATTRIBUTE } from './../utils/colorScheme';
4
4
  import useMutationObserver from './useMutationObserver';
5
- export var useDarkMode = function useDarkMode(widgetName) {
5
+ var useDarkMode = function useDarkMode() {
6
6
  var _useState = useState(false),
7
7
  _useState2 = _slicedToArray(_useState, 2),
8
8
  isDarkMode = _useState2[0],
@@ -26,4 +26,5 @@ export var useDarkMode = function useDarkMode(widgetName) {
26
26
  subtree: false
27
27
  });
28
28
  return isDarkMode;
29
- };
29
+ };
30
+ export default useDarkMode;
@@ -1,12 +1,20 @@
1
+ import _typeof from "@babel/runtime/helpers/typeof";
1
2
  import { useRef, useLayoutEffect, useCallback } from 'react';
3
+ var isRef = function isRef(obj) {
4
+ return obj !== null && _typeof(obj) === 'object' && Object.prototype.hasOwnProperty.call(obj, 'current');
5
+ };
6
+ var unRef = function unRef(target) {
7
+ return isRef(target) ? target.current : target;
8
+ };
2
9
 
3
10
  // Options for the observer (which mutations to observe)
4
11
  var DEFAULT_OPTIONS = {
5
12
  attributes: true,
6
- childList: true,
7
- subtree: true
13
+ childList: false,
14
+ subtree: false
8
15
  };
9
- var useMutationObserver = function useMutationObserver(targetElement, callback) {
16
+ var useMutationObserver = function useMutationObserver(target) {
17
+ var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
10
18
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_OPTIONS;
11
19
  var observer = useRef(null);
12
20
  var disconnect = useCallback(function () {
@@ -14,11 +22,12 @@ var useMutationObserver = function useMutationObserver(targetElement, callback)
14
22
  return (_observer$current = observer.current) === null || _observer$current === void 0 ? void 0 : _observer$current.disconnect();
15
23
  }, []);
16
24
  var observe = useCallback(function () {
25
+ var targetElement = unRef(target);
17
26
  observer.current = new MutationObserver(callback);
18
27
  if (targetElement) {
19
28
  observer.current.observe(targetElement, options);
20
29
  }
21
- }, [targetElement]);
30
+ }, [target]);
22
31
  useLayoutEffect(function () {
23
32
  observe();
24
33
  return function () {
@@ -19,8 +19,8 @@ var useScrollPosition = function useScrollPosition(target) {
19
19
  useEffect(function () {
20
20
  var checkForModuleContent = null;
21
21
 
22
- // In cae the target is undefined it might be that the module-content is not rendered yet,
23
- // hence check periodically for the existence
22
+ // In cae the target is undefined it might be that the module-content is
23
+ // not rendered yet, hence check periodically for the existence in the DOM
24
24
  if (!target) {
25
25
  checkForModuleContent = setInterval(function () {
26
26
  var element = getModuleContent();
@@ -29,7 +29,6 @@ var useScrollPosition = function useScrollPosition(target) {
29
29
  }
30
30
  }, 300);
31
31
  } else if (target && checkForModuleContent) {
32
- console.log('clearInterval');
33
32
  clearInterval(checkForModuleContent);
34
33
  }
35
34
 
@@ -38,13 +37,13 @@ var useScrollPosition = function useScrollPosition(target) {
38
37
  setTargetElement(target.current);
39
38
  }
40
39
 
41
- // In case it's "wondow" or "document.body"
40
+ // In case it's "window" or "document.body"
42
41
  else {
43
42
  setTargetElement(target);
44
43
  }
45
- return {
46
- "if": function _if(checkForModuleContent) {
47
- clearInterval(check);
44
+ return function () {
45
+ if (checkForModuleContent) {
46
+ clearInterval(checkForModuleContent);
48
47
  }
49
48
  };
50
49
  }, [target]);
package/index.d.ts CHANGED
@@ -1,36 +1,36 @@
1
1
  declare module '@rio-cloud/rio-uikit' {
2
2
  import React from 'react';
3
3
  import {
4
- ActionBarItemProps,
5
4
  ActionBarItemIconProps,
6
5
  ActionBarItemPopoverProps,
7
6
  ActionBarItemPopoverWidth,
7
+ ActionBarItemProps,
8
8
  ActivityProps,
9
9
  ApplicationHeaderProps,
10
- ApplicationLayoutProps,
11
- ApplicationLayoutHeaderProps,
12
- ApplicationLayoutBodyProps,
13
- ApplicationLayoutSidebarProps,
14
10
  ApplicationLayoutBodyBannerProps,
15
11
  ApplicationLayoutBodyBottomBarProps,
16
12
  ApplicationLayoutBodyNavigationProps,
13
+ ApplicationLayoutBodyProps,
14
+ ApplicationLayoutHeaderProps,
15
+ ApplicationLayoutProps,
16
+ ApplicationLayoutSidebarProps,
17
17
  Area as AreaProps,
18
18
  AreaChartProps,
19
19
  AreaGradient as AreaGradientProps,
20
20
  AssetTreeProps,
21
- AutoSuggestProps,
22
21
  AutoSuggestInputProps,
22
+ AutoSuggestProps,
23
23
  AutoSuggestSuggestion,
24
24
  Bar as BarProps,
25
25
  BarChartProps,
26
- ButtonDropdownProps,
26
+ BaseStateProps,
27
27
  BrowserWarningProps,
28
+ ButtonDropdownProps,
28
29
  CheckboxProps,
29
30
  ClearableInputProps,
30
- ConfirmationDialogProps,
31
31
  CollapseProps,
32
+ ConfirmationDialogProps,
32
33
  ContentLoaderProps,
33
- BaseStateProps,
34
34
  DataTabProps,
35
35
  DataTabsProps,
36
36
  DatePickerProps,
@@ -53,30 +53,30 @@ declare module '@rio-cloud/rio-uikit' {
53
53
  MenuItemProps,
54
54
  MultiselectProps,
55
55
  NoDataProps,
56
+ NotBookedStateProps,
56
57
  NotificationsContainerProps,
57
58
  notificationTriggerFunction,
58
- NotBookedStateProps,
59
59
  NumberControlProps,
60
60
  NumberInputProps,
61
+ OnboardingTipAlignment,
61
62
  OnboardingTipProps,
62
- OverlayTriggerProps,
63
- OverlayTriggerPlacement,
64
63
  OverlayTriggerEvent,
65
- OnboardingTipAlignment,
66
- PieChartProps,
64
+ OverlayTriggerPlacement,
65
+ OverlayTriggerProps,
67
66
  PagerProps,
67
+ PieChartProps,
68
68
  PopoverProps,
69
- ResizerDirection,
70
- ResizerPosition,
71
69
  RadioButtonProps,
72
70
  RangeSliderProps,
73
- ReleaseNotesProps,
74
71
  ReleaseNotesDialogProps,
72
+ ReleaseNotesProps,
73
+ ResizerDirection,
74
+ ResizerPosition,
75
75
  ResizerProps,
76
76
  ResponsiveVideoProps,
77
- RulesWrapperProps,
78
- RuleContainerProps,
79
77
  RuleConnectorProps,
78
+ RuleContainerProps,
79
+ RulesWrapperProps,
80
80
  SaveDialogProps,
81
81
  SelectProps,
82
82
  SidebarProps,
@@ -89,15 +89,15 @@ declare module '@rio-cloud/rio-uikit' {
89
89
  SortArrowsProps,
90
90
  SortDirection,
91
91
  SpinnerProps,
92
- SplitDialogProps,
93
92
  SplitButtonDropdownProps,
94
- StatsWidgetProps,
95
- StatsWidgetHeaderProps,
93
+ SplitDialogProps,
96
94
  StatsWidgetBodyProps,
97
95
  StatsWidgetFooterProps,
98
- StatsWidgetsProps,
99
- StatsWidgetSpacerProps,
96
+ StatsWidgetHeaderProps,
100
97
  StatsWidgetNumberProps,
98
+ StatsWidgetProps,
99
+ StatsWidgetSpacerProps,
100
+ StatsWidgetsProps,
101
101
  StatusBarProps,
102
102
  SteppedProgressBarProps,
103
103
  SwitchProps,
@@ -106,11 +106,11 @@ declare module '@rio-cloud/rio-uikit' {
106
106
  TableSettingsDialogProps,
107
107
  TableViewTogglesProps,
108
108
  TableViewTogglesValues,
109
- TagProps,
110
109
  TagListProps,
111
110
  TagManagerProps,
112
- TeaserProps,
111
+ TagProps,
113
112
  TeaserContainerProps,
113
+ TeaserProps,
114
114
  TimePickerProps,
115
115
  ToggleButtonProps,
116
116
  ToolTipProps,
@@ -158,6 +158,8 @@ declare module '@rio-cloud/rio-uikit' {
158
158
  export class Dialog extends React.Component<DialogProps> {
159
159
  public static SIZE_FULL_SCREEN: 'fullscreen';
160
160
  public static SIZE_FULL: 'full';
161
+ public static SIZE_FULL_WIDTH = 'fullwidth';
162
+ public static SIZE_FULL_HEIGHT = 'fullheight';
161
163
  public static SIZE_XL: 'xl';
162
164
  public static SIZE_LG: 'lg';
163
165
  public static SIZE_MD: 'md';
@@ -204,9 +206,9 @@ declare module '@rio-cloud/rio-uikit' {
204
206
  export class ReleaseNotesDialog extends React.Component<ReleaseNotesDialogProps> {}
205
207
  export class Resizer extends React.Component<ResizerProps> {}
206
208
  export class ResponsiveVideo extends React.Component<ResponsiveVideoProps> {}
207
- export class RulesWrapper extends React.Component<RulesWrapperProps> {}
208
- export class RuleContainer extends React.Component<RuleContainerProps> {}
209
- export class RuleConnector extends React.Component<RuleConnectorProps> {}
209
+ export class RulesWrapper extends React.Component<React.PropsWithChildren<RulesWrapperProps>> {}
210
+ export class RuleContainer extends React.Component<React.PropsWithChildren<RuleContainerProps>> {}
211
+ export class RuleConnector extends React.Component<React.PropsWithChildren<RuleConnectorProps>> {}
210
212
  export class SaveDialog extends React.Component<SaveDialogProps> {}
211
213
  export class Select extends React.Component<SelectProps> {}
212
214
  export class Sidebar extends React.Component<SidebarProps> {}
package/index.js CHANGED
@@ -135,6 +135,8 @@ import { default as _CustomState } from './components/states/CustomState';
135
135
  export { _CustomState as CustomState };
136
136
  import { default as _TimePicker } from './components/timepicker/TimePicker';
137
137
  export { _TimePicker as TimePicker };
138
+ import { default as _ResponsiveColumnStripe } from './components/responsiveColumnStripe/ResponsiveColumnStripe';
139
+ export { _ResponsiveColumnStripe as ResponsiveColumnStripe };
138
140
  import { SortArrowUp as _SortArrowUp, SortArrowDown as _SortArrowDown, SortArrows as _SortArrows } from './components/table/SortArrows';
139
141
  export { _SortArrowUp as SortArrowUp, _SortArrowDown as SortArrowDown, _SortArrows as SortArrows };
140
142
  import { SortDirection as _SortDirection, sortByProperty as _sortByProperty, naturalSortByProperty as _naturalSortByProperty } from './utils/SortUtils';
@@ -154,6 +156,8 @@ export { default as useClickOutside } from './hooks/useClickOutside';
154
156
  export { default as useClipboard } from './hooks/useClipboard';
155
157
  export { default as useElementSize } from './hooks/useElementSize';
156
158
  export { default as useScrollPosition } from './hooks/useScrollPosition';
159
+ export { default as useDarkMode } from './hooks/useDarkMode';
160
+ export { default as useMutationObserver } from './hooks/useMutationObserver';
157
161
  import { hasTouch as _hasTouch, inIframe as _inIframe, isDesktop as _isDesktop } from './utils/deviceUtils';
158
162
  export { _hasTouch as hasTouch, _inIframe as inIframe, _isDesktop as isDesktop };
159
163
  import { getColorScheme as _getColorScheme, setColorScheme as _setColorScheme } from './utils/colorScheme';
@@ -0,0 +1,5 @@
1
+ declare module '@rio-cloud/rio-uikit/lib/es/AspectRatioPlaceholder' {
2
+ import React from 'react';
3
+ import { AspectRatioPlaceholderProps } from './types';
4
+ export default class AspectRatioPlaceholder extends React.Component<AspectRatioPlaceholderProps> {}
5
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "default", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _AspectRatioPlaceholder2["default"];
11
+ }
12
+ });
13
+ var _AspectRatioPlaceholder2 = _interopRequireDefault(require("./components/aspectRatioPlaceholder/AspectRatioPlaceholder"));