@antscorp/antsomi-ui 1.3.5-beta.286 → 1.3.5-beta.287

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.
@@ -13,19 +13,20 @@ import { Scrollbars as CustomScrollbars, } from 'react-custom-scrollbars';
13
13
  // Libraries
14
14
  import React from 'react';
15
15
  // Styled
16
- import { HorizontalTrack, ScrollbarsWrapper, ThumbBar, VerticalTrack } from './styled';
16
+ import { HorizontalTrack, ThumbBar, VerticalTrack } from './styled';
17
17
  import { cloneDeep } from 'lodash';
18
18
  const THUMB_SIZE = 4;
19
19
  export const Scrollbars = props => {
20
- const { autoHide = true, autoHeight = true, autoHeightMax = 500 } = props, restProps = __rest(props, ["autoHide", "autoHeight", "autoHeightMax"]);
21
- return (React.createElement(ScrollbarsWrapper, null,
22
- React.createElement(CustomScrollbars, Object.assign({ autoHide: autoHide, autoHeight: autoHeight, autoHeightMax: autoHeightMax, renderThumbVertical: props => React.createElement(ThumbBar, Object.assign({}, props)), renderThumbHorizontal: props => React.createElement(ThumbBar, Object.assign({}, props)), renderTrackVertical: props => React.createElement(VerticalTrack, Object.assign({}, props)), renderTrackHorizontal: props => React.createElement(HorizontalTrack, Object.assign({}, props)), renderView: props => {
23
- const { style } = props || {};
24
- const newStyle = cloneDeep(style);
25
- newStyle.marginBottom = -THUMB_SIZE;
26
- newStyle.marginRight = -THUMB_SIZE;
27
- newStyle.minHeight = THUMB_SIZE;
20
+ const { autoHide = true, autoHeightMax = 0 } = props, restProps = __rest(props, ["autoHide", "autoHeightMax"]);
21
+ return (React.createElement(CustomScrollbars, Object.assign({ autoHide: autoHide, autoHeightMax: autoHeightMax, renderThumbVertical: props => React.createElement(ThumbBar, Object.assign({}, props)), renderThumbHorizontal: props => React.createElement(ThumbBar, Object.assign({}, props)), renderTrackVertical: props => React.createElement(VerticalTrack, Object.assign({}, props)), renderTrackHorizontal: props => React.createElement(HorizontalTrack, Object.assign({}, props)), renderView: props => {
22
+ const { style } = props || {};
23
+ const newStyle = cloneDeep(style);
24
+ newStyle.marginBottom = -THUMB_SIZE;
25
+ newStyle.marginRight = -THUMB_SIZE;
26
+ newStyle.minHeight = THUMB_SIZE;
27
+ if (autoHeightMax) {
28
28
  newStyle.maxHeight = parseInt(`${autoHeightMax}`) + THUMB_SIZE;
29
- return React.createElement("div", Object.assign({ className: "scrollbar-view" }, props, { style: newStyle }));
30
- }, hideTracksWhenNotNeeded: true }, restProps))));
29
+ }
30
+ return React.createElement("div", Object.assign({ className: "scrollbar-view" }, props, { style: newStyle }));
31
+ }, hideTracksWhenNotNeeded: true }, restProps)));
31
32
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.286",
3
+ "version": "1.3.5-beta.287",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",