@synerise/ds-scrollbar 0.5.5 → 0.6.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,27 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.6.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-scrollbar@0.6.0...@synerise/ds-scrollbar@0.6.1) (2023-04-19)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-scrollbar
9
+
10
+
11
+
12
+
13
+
14
+ # [0.6.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-scrollbar@0.5.5...@synerise/ds-scrollbar@0.6.0) (2023-04-05)
15
+
16
+
17
+ ### Features
18
+
19
+ * **scrollbar:** adds additional type with optional props, improve style ([ceb5f90](https://github.com/Synerise/synerise-design/commit/ceb5f907f36f98e92875b44e76e2012e77d290f8))
20
+ * **scrollbar:** exports types from index.ts ([d561879](https://github.com/Synerise/synerise-design/commit/d5618792a6cfbb4197e610469151f782975189e7))
21
+ * **scrollbar:** improves styles of the loading state ([c3c6a6c](https://github.com/Synerise/synerise-design/commit/c3c6a6cc8d7eefc07be308454dc14cffdb96319d))
22
+
23
+
24
+
25
+
26
+
6
27
  ## [0.5.5](https://github.com/Synerise/synerise-design/compare/@synerise/ds-scrollbar@0.5.4...@synerise/ds-scrollbar@0.5.5) (2023-03-02)
7
28
 
8
29
  **Note:** Version bump only for package @synerise/ds-scrollbar
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ScrollbarProps } from './Scrollbar.types';
3
- declare const Scrollbar: React.ForwardRefExoticComponent<ScrollbarProps & React.RefAttributes<HTMLElement>>;
2
+ declare const Scrollbar: React.ForwardRefExoticComponent<import("./Scrollbar.types").ScrollbarAdditionalProps & {
3
+ children: React.ReactNode;
4
+ } & React.RefAttributes<HTMLElement>>;
4
5
  export default Scrollbar;
package/dist/Scrollbar.js CHANGED
@@ -6,6 +6,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
6
6
 
7
7
  import * as React from 'react';
8
8
  import Icon, { SpinnerM } from '@synerise/ds-icon';
9
+ import theme from '@synerise/ds-core/dist/js/DSProvider/ThemeProvider/theme';
9
10
  import * as S from './Scrollbar.styles';
10
11
  import { DnDScrollbar } from './DnDScrollbar';
11
12
  import { VirtualScrollbar } from './VirtualScrollbar';
@@ -23,11 +24,11 @@ var Scrollbar = React.forwardRef(function (_ref, forwardedRef) {
23
24
  ref: forwardedRef
24
25
  }), children);
25
26
  }, [children, fetchData, forwardedRef, props]);
26
- return fetchData ? /*#__PURE__*/React.createElement(S.ScrollbarContainer, null, renderScrollbar, loading && /*#__PURE__*/React.createElement(S.Loader, {
27
+ return /*#__PURE__*/React.createElement(S.ScrollbarContainer, null, renderScrollbar, loading && /*#__PURE__*/React.createElement(S.LoaderWrapper, null, /*#__PURE__*/React.createElement(S.Loader, {
27
28
  loading: loading
28
29
  }, /*#__PURE__*/React.createElement(Icon, {
29
30
  component: /*#__PURE__*/React.createElement(SpinnerM, null),
30
- color: "#6a7580"
31
- }))) : renderScrollbar;
31
+ color: theme.palette['grey-600']
32
+ }))));
32
33
  });
33
34
  export default Scrollbar;
@@ -1,4 +1,5 @@
1
1
  export declare const Loader: import("styled-components").StyledComponent<"div", any, {
2
2
  loading?: boolean | undefined;
3
3
  }, never>;
4
+ export declare const LoaderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
4
5
  export declare const ScrollbarContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -6,11 +6,15 @@ export var Loader = styled.div.withConfig({
6
6
  })(["width:0;height:0;position:absolute;top:calc(50% - 12px);left:calc(50% - 12px);z-index:99;pointer-events:none;display:flex;opacity:", ";transform-origin:12px 12px;transition:opacity 0.3s ease-in-out;animation:", " 1s forwards linear infinite;svg{color:", ";fill:", ";}"], function (props) {
7
7
  return props.loading ? '1' : '0';
8
8
  }, spinnerAnimation, function (props) {
9
- return props.theme.palette['blue-600'];
9
+ return props.theme.palette['grey-600'];
10
10
  }, function (props) {
11
- return props.theme.palette['blue-600'];
11
+ return props.theme.palette['grey-600'];
12
12
  });
13
+ export var LoaderWrapper = styled.div.withConfig({
14
+ displayName: "Scrollbarstyles__LoaderWrapper",
15
+ componentId: "rfwkf7-1"
16
+ })(["width:100%;height:100%;bottom:0;left:0;position:absolute;background-color:rgba(255,255,255,0.6);"]);
13
17
  export var ScrollbarContainer = styled.div.withConfig({
14
18
  displayName: "Scrollbarstyles__ScrollbarContainer",
15
- componentId: "rfwkf7-1"
19
+ componentId: "rfwkf7-2"
16
20
  })(["position:relative;height:100%;"]);
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
- export declare type ScrollbarProps = {
2
+ export declare type ScrollbarAdditionalProps = {
3
3
  absolute?: boolean;
4
- children: React.ReactNode | string;
5
4
  classes?: string;
6
5
  hasMore?: boolean;
7
6
  loading?: boolean;
@@ -12,3 +11,6 @@ export declare type ScrollbarProps = {
12
11
  onYReachEnd?: () => void;
13
12
  withDnd?: boolean;
14
13
  };
14
+ export declare type ScrollbarProps = ScrollbarAdditionalProps & {
15
+ children: React.ReactNode | string;
16
+ };
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import './style/index.less';
3
- import { ScrollbarProps } from '../Scrollbar.types';
4
- export declare const VirtualScrollbar: React.ForwardRefExoticComponent<ScrollbarProps & React.RefAttributes<HTMLElement>>;
3
+ export declare const VirtualScrollbar: React.ForwardRefExoticComponent<import("../Scrollbar.types").ScrollbarAdditionalProps & {
4
+ children: React.ReactNode;
5
+ } & React.RefAttributes<HTMLElement>>;
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export { default } from './Scrollbar';
2
+ export * from './Scrollbar.types';
package/dist/index.js CHANGED
@@ -1 +1,2 @@
1
- export { default } from './Scrollbar';
1
+ export { default } from './Scrollbar';
2
+ export * from './Scrollbar.types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-scrollbar",
3
- "version": "0.5.5",
3
+ "version": "0.6.1",
4
4
  "description": "Scrollbar UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -32,7 +32,7 @@
32
32
  ],
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
- "@synerise/ds-icon": "^0.54.0",
35
+ "@synerise/ds-icon": "^0.55.0",
36
36
  "react-perfect-scrollbar": "^1.5.8"
37
37
  },
38
38
  "peerDependencies": {
@@ -43,5 +43,5 @@
43
43
  "@synerise/ds-utils": "^0.19.0",
44
44
  "@types/resize-observer-browser": "^0.1.7"
45
45
  },
46
- "gitHead": "91c3937d5564d273bfb0ad2029eecaf14ca921c8"
46
+ "gitHead": "3b8c3b1437ecbdda775a790ac3c27d6b1b6cbf26"
47
47
  }