@synerise/ds-scrollbar 1.2.16 → 1.2.18
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 +8 -0
- package/dist/DnDScrollbar/DnDScrollbar.d.ts +2 -2
- package/dist/DnDScrollbar/DnDScrollbar.js +109 -117
- package/dist/DnDScrollbar/DnDScrollbar.styles.d.ts +7 -7
- package/dist/DnDScrollbar/DnDScrollbar.styles.js +29 -54
- package/dist/DnDScrollbar/index.js +4 -1
- package/dist/Scrollbar.d.ts +2 -2
- package/dist/Scrollbar.js +24 -30
- package/dist/Scrollbar.styles.d.ts +3 -3
- package/dist/Scrollbar.styles.js +12 -13
- package/dist/Scrollbar.types.d.ts +2 -2
- package/dist/Scrollbar.types.js +1 -1
- package/dist/VirtualScrollbar/VirtualScrollbar.d.ts +3 -4
- package/dist/VirtualScrollbar/VirtualScrollbar.js +79 -84
- package/dist/VirtualScrollbar/VirtualScrollbar.styles.d.ts +2 -2
- package/dist/VirtualScrollbar/VirtualScrollbar.styles.js +14 -12
- package/dist/VirtualScrollbar/index.js +4 -1
- package/dist/assets/style/index-tn0RQdqM.css +0 -0
- package/dist/index.js +4 -2
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [1.2.18](https://github.com/Synerise/synerise-design/compare/@synerise/ds-scrollbar@1.2.17...@synerise/ds-scrollbar@1.2.18) (2026-04-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-scrollbar
|
|
9
|
+
|
|
10
|
+
## [1.2.17](https://github.com/Synerise/synerise-design/compare/@synerise/ds-scrollbar@1.2.16...@synerise/ds-scrollbar@1.2.17) (2026-03-24)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @synerise/ds-scrollbar
|
|
13
|
+
|
|
6
14
|
## [1.2.16](https://github.com/Synerise/synerise-design/compare/@synerise/ds-scrollbar@1.2.15...@synerise/ds-scrollbar@1.2.16) (2026-03-20)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @synerise/ds-scrollbar
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ScrollbarProps } from '../Scrollbar.types';
|
|
3
3
|
export declare const DnDScrollbar: ({ children, classes, maxHeight, absolute, loading, largeSize, onScroll, onYReachEnd, fetchData, hasMore, confineScroll, ...props }: ScrollbarProps) => React.JSX.Element;
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
scrollStartPosition = _useState2[0],
|
|
29
|
-
setScrollStartPosition = _useState2[1];
|
|
30
|
-
var _useState3 = useState(0),
|
|
31
|
-
initialScrollTop = _useState3[0],
|
|
32
|
-
setInitialScrollTop = _useState3[1];
|
|
33
|
-
var _useState4 = useState(false),
|
|
34
|
-
isDragging = _useState4[0],
|
|
35
|
-
setIsDragging = _useState4[1];
|
|
36
|
-
var handleTrackClick = useCallback(function (event) {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState, useCallback, useEffect } from "react";
|
|
3
|
+
import { ScrollbarContainer, ScrollbarContent, ScrollbarWrapper, ScrollbarTrackWrapper, TrackVertical, ThumbVertical } from "./DnDScrollbar.styles.js";
|
|
4
|
+
const DnDScrollbar = ({
|
|
5
|
+
children,
|
|
6
|
+
classes,
|
|
7
|
+
maxHeight,
|
|
8
|
+
absolute,
|
|
9
|
+
loading,
|
|
10
|
+
largeSize,
|
|
11
|
+
onScroll,
|
|
12
|
+
onYReachEnd,
|
|
13
|
+
fetchData,
|
|
14
|
+
hasMore,
|
|
15
|
+
confineScroll,
|
|
16
|
+
...props
|
|
17
|
+
}) => {
|
|
18
|
+
const contentRef = useRef(null);
|
|
19
|
+
const wrapperRef = useRef(null);
|
|
20
|
+
const scrollTrackRef = useRef(null);
|
|
21
|
+
const scrollThumbRef = useRef(null);
|
|
22
|
+
const observer = useRef(null);
|
|
23
|
+
const [thumbHeight, setThumbHeight] = useState(48);
|
|
24
|
+
const [scrollStartPosition, setScrollStartPosition] = useState(0);
|
|
25
|
+
const [initialScrollTop, setInitialScrollTop] = useState(0);
|
|
26
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
27
|
+
const handleTrackClick = useCallback((event) => {
|
|
37
28
|
event.preventDefault();
|
|
38
29
|
event.stopPropagation();
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
const {
|
|
31
|
+
current: trackCurrent
|
|
32
|
+
} = scrollTrackRef;
|
|
33
|
+
const {
|
|
34
|
+
current: contentCurrent
|
|
35
|
+
} = contentRef;
|
|
41
36
|
if (trackCurrent && contentCurrent) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
const {
|
|
38
|
+
clientY
|
|
39
|
+
} = event;
|
|
40
|
+
const target = event.target;
|
|
41
|
+
const rect = target.getBoundingClientRect();
|
|
42
|
+
const trackTop = rect.top;
|
|
43
|
+
const thumbOffset = -(thumbHeight / 2);
|
|
44
|
+
const clickRatio = (clientY - trackTop + thumbOffset) / trackCurrent.clientHeight;
|
|
45
|
+
const scrollAmount = Math.floor(clickRatio * contentCurrent.scrollHeight);
|
|
49
46
|
contentCurrent.scrollTo({
|
|
50
47
|
top: scrollAmount,
|
|
51
|
-
behavior:
|
|
48
|
+
behavior: "smooth"
|
|
52
49
|
});
|
|
53
50
|
}
|
|
54
51
|
}, [thumbHeight]);
|
|
55
|
-
|
|
52
|
+
const handleThumbPosition = useCallback(() => {
|
|
56
53
|
if (!contentRef.current || !scrollTrackRef.current || !scrollThumbRef.current) {
|
|
57
54
|
return;
|
|
58
55
|
}
|
|
59
|
-
|
|
60
|
-
contentTop
|
|
61
|
-
contentHeight
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
const {
|
|
57
|
+
scrollTop: contentTop,
|
|
58
|
+
scrollHeight: contentHeight
|
|
59
|
+
} = contentRef.current;
|
|
60
|
+
const {
|
|
61
|
+
clientHeight: trackHeight
|
|
62
|
+
} = scrollTrackRef.current;
|
|
63
|
+
let newTop = +contentTop / +contentHeight * trackHeight;
|
|
64
64
|
newTop = Math.min(newTop, trackHeight - thumbHeight);
|
|
65
|
-
|
|
66
|
-
thumb.style.top = newTop
|
|
65
|
+
const thumb = scrollThumbRef.current;
|
|
66
|
+
thumb.style.top = `${newTop}px`;
|
|
67
67
|
}, [thumbHeight]);
|
|
68
|
-
|
|
68
|
+
const handleThumbMousedown = useCallback((event) => {
|
|
69
69
|
event.stopPropagation();
|
|
70
70
|
setScrollStartPosition(event.clientY);
|
|
71
71
|
if (contentRef.current) {
|
|
@@ -73,29 +73,31 @@ export var DnDScrollbar = function DnDScrollbar(_ref) {
|
|
|
73
73
|
}
|
|
74
74
|
setIsDragging(true);
|
|
75
75
|
}, []);
|
|
76
|
-
|
|
76
|
+
const handleThumbMouseup = useCallback((event) => {
|
|
77
77
|
event.stopPropagation();
|
|
78
78
|
if (isDragging) {
|
|
79
79
|
setIsDragging(false);
|
|
80
80
|
}
|
|
81
81
|
}, [isDragging]);
|
|
82
|
-
|
|
82
|
+
const handleThumbMousemove = useCallback((event) => {
|
|
83
83
|
event.stopPropagation();
|
|
84
84
|
if (isDragging && contentRef.current !== null) {
|
|
85
|
-
|
|
86
|
-
contentScrollHeight
|
|
87
|
-
contentOffsetHeight
|
|
88
|
-
|
|
85
|
+
const {
|
|
86
|
+
scrollHeight: contentScrollHeight,
|
|
87
|
+
offsetHeight: contentOffsetHeight
|
|
88
|
+
} = contentRef.current;
|
|
89
|
+
const deltaY = (event.clientY - scrollStartPosition) * (contentOffsetHeight / thumbHeight);
|
|
89
90
|
contentRef.current.scrollTop = Math.min(initialScrollTop + deltaY, contentScrollHeight - contentOffsetHeight);
|
|
90
91
|
}
|
|
91
92
|
}, [initialScrollTop, isDragging, scrollStartPosition, thumbHeight]);
|
|
92
|
-
|
|
93
|
+
const handleScroll = useCallback((event) => {
|
|
93
94
|
if (contentRef.current !== null) {
|
|
94
|
-
|
|
95
|
-
scrollHeight
|
|
96
|
-
offsetHeight
|
|
97
|
-
scrollTop
|
|
98
|
-
|
|
95
|
+
const {
|
|
96
|
+
scrollHeight,
|
|
97
|
+
offsetHeight,
|
|
98
|
+
scrollTop
|
|
99
|
+
} = contentRef.current;
|
|
100
|
+
const progress = Math.round((scrollTop + offsetHeight) / scrollHeight * 100) / 100;
|
|
99
101
|
if (progress === 1 && hasMore) {
|
|
100
102
|
onYReachEnd && onYReachEnd();
|
|
101
103
|
fetchData && fetchData();
|
|
@@ -103,11 +105,12 @@ export var DnDScrollbar = function DnDScrollbar(_ref) {
|
|
|
103
105
|
}
|
|
104
106
|
onScroll && onScroll(event);
|
|
105
107
|
}, [fetchData, hasMore, onScroll, onYReachEnd]);
|
|
106
|
-
|
|
108
|
+
const handleResize = useCallback((trackSize) => {
|
|
107
109
|
if (contentRef.current !== null) {
|
|
108
|
-
|
|
109
|
-
clientHeightContent
|
|
110
|
-
scrollHeightContent
|
|
110
|
+
const {
|
|
111
|
+
clientHeight: clientHeightContent,
|
|
112
|
+
scrollHeight: scrollHeightContent
|
|
113
|
+
} = contentRef.current;
|
|
111
114
|
if (clientHeightContent === scrollHeightContent) {
|
|
112
115
|
setThumbHeight(0);
|
|
113
116
|
} else {
|
|
@@ -116,65 +119,54 @@ export var DnDScrollbar = function DnDScrollbar(_ref) {
|
|
|
116
119
|
}
|
|
117
120
|
}
|
|
118
121
|
}, [handleThumbPosition]);
|
|
119
|
-
|
|
122
|
+
const handleWheel = (event) => {
|
|
120
123
|
if (confineScroll) {
|
|
121
124
|
event.stopPropagation();
|
|
122
125
|
}
|
|
123
126
|
};
|
|
124
|
-
useEffect(
|
|
127
|
+
useEffect(() => {
|
|
125
128
|
if (contentRef.current !== null && scrollTrackRef.current !== null && wrapperRef.current !== null) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
const ref = wrapperRef.current;
|
|
130
|
+
const content = contentRef.current;
|
|
131
|
+
const {
|
|
132
|
+
clientHeight: trackSize
|
|
133
|
+
} = scrollTrackRef.current;
|
|
134
|
+
observer.current = new ResizeObserver(() => {
|
|
130
135
|
handleResize(trackSize);
|
|
131
136
|
});
|
|
132
137
|
observer.current.observe(ref);
|
|
133
|
-
content.addEventListener(
|
|
134
|
-
return
|
|
138
|
+
content.addEventListener("scroll", handleThumbPosition);
|
|
139
|
+
return () => {
|
|
135
140
|
if (observer.current !== null) {
|
|
136
141
|
observer.current.unobserve(ref);
|
|
137
142
|
}
|
|
138
|
-
content.removeEventListener(
|
|
143
|
+
content.removeEventListener("scroll", handleThumbPosition);
|
|
139
144
|
};
|
|
140
145
|
}
|
|
141
|
-
return
|
|
146
|
+
return void 0;
|
|
142
147
|
}, [handleResize, handleThumbPosition]);
|
|
143
|
-
useEffect(
|
|
144
|
-
document.addEventListener(
|
|
145
|
-
document.addEventListener(
|
|
146
|
-
document.addEventListener(
|
|
147
|
-
return
|
|
148
|
-
document.removeEventListener(
|
|
149
|
-
document.removeEventListener(
|
|
150
|
-
document.removeEventListener(
|
|
148
|
+
useEffect(() => {
|
|
149
|
+
document.addEventListener("mousemove", handleThumbMousemove);
|
|
150
|
+
document.addEventListener("mouseup", handleThumbMouseup);
|
|
151
|
+
document.addEventListener("mouseleave", handleThumbMouseup);
|
|
152
|
+
return () => {
|
|
153
|
+
document.removeEventListener("mousemove", handleThumbMousemove);
|
|
154
|
+
document.removeEventListener("mouseup", handleThumbMouseup);
|
|
155
|
+
document.removeEventListener("mouseleave", handleThumbMouseup);
|
|
151
156
|
};
|
|
152
157
|
}, [handleThumbMousemove, handleThumbMouseup]);
|
|
153
|
-
return
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
ref:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
})
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}, children)), /*#__PURE__*/React.createElement(S.ScrollbarTrackWrapper, {
|
|
169
|
-
largeSize: largeSize
|
|
170
|
-
}, /*#__PURE__*/React.createElement(S.TrackVertical, {
|
|
171
|
-
ref: scrollTrackRef,
|
|
172
|
-
onClick: handleTrackClick
|
|
173
|
-
}), /*#__PURE__*/React.createElement(S.ThumbVertical, {
|
|
174
|
-
ref: scrollThumbRef,
|
|
175
|
-
onMouseDown: handleThumbMousedown,
|
|
176
|
-
style: {
|
|
177
|
-
height: thumbHeight + "px"
|
|
178
|
-
}
|
|
179
|
-
})));
|
|
180
|
-
};
|
|
158
|
+
return /* @__PURE__ */ jsxs(ScrollbarContainer, { "data-testid": "dnd-scrollbar", children: [
|
|
159
|
+
/* @__PURE__ */ jsx(ScrollbarContent, { ref: contentRef, ...props, style: {
|
|
160
|
+
maxHeight
|
|
161
|
+
}, onScroll: handleScroll, onWheel: handleWheel, children: /* @__PURE__ */ jsx(ScrollbarWrapper, { ref: wrapperRef, loading, absolute, largeSize, children }) }),
|
|
162
|
+
/* @__PURE__ */ jsxs(ScrollbarTrackWrapper, { largeSize, children: [
|
|
163
|
+
/* @__PURE__ */ jsx(TrackVertical, { ref: scrollTrackRef, onClick: handleTrackClick }),
|
|
164
|
+
/* @__PURE__ */ jsx(ThumbVertical, { ref: scrollThumbRef, onMouseDown: handleThumbMousedown, style: {
|
|
165
|
+
height: `${thumbHeight}px`
|
|
166
|
+
} })
|
|
167
|
+
] })
|
|
168
|
+
] });
|
|
169
|
+
};
|
|
170
|
+
export {
|
|
171
|
+
DnDScrollbar
|
|
172
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export declare const ScrollbarContent: import(
|
|
2
|
-
export declare const ScrollbarWrapper: import(
|
|
1
|
+
export declare const ScrollbarContent: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const ScrollbarWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
3
3
|
absolute?: boolean;
|
|
4
4
|
loading?: boolean;
|
|
5
5
|
largeSize?: boolean;
|
|
6
6
|
}, never>;
|
|
7
|
-
export declare const ThumbVertical: import(
|
|
7
|
+
export declare const ThumbVertical: import('styled-components').StyledComponent<"div", any, {
|
|
8
8
|
largeSize?: boolean;
|
|
9
9
|
}, never>;
|
|
10
|
-
export declare const ScrollbarTrackWrapper: import(
|
|
10
|
+
export declare const ScrollbarTrackWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
11
11
|
largeSize?: boolean;
|
|
12
12
|
}, never>;
|
|
13
|
-
export declare const TrackVertical: import(
|
|
14
|
-
export declare const Loader: import(
|
|
13
|
+
export declare const TrackVertical: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
14
|
+
export declare const Loader: import('styled-components').StyledComponent<"div", any, {
|
|
15
15
|
loading?: boolean;
|
|
16
16
|
}, never>;
|
|
17
|
-
export declare const ScrollbarContainer: import(
|
|
17
|
+
export declare const ScrollbarContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
@@ -1,74 +1,49 @@
|
|
|
1
|
-
import styled, { keyframes } from
|
|
2
|
-
|
|
1
|
+
import styled, { keyframes } from "styled-components";
|
|
2
|
+
const ScrollbarContent = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "DnDScrollbarstyles__ScrollbarContent",
|
|
4
4
|
componentId: "sc-12t6y2d-0"
|
|
5
5
|
})(["-ms-overflow-style:none;overflow:auto;scrollbar-width:none;width:100%;&::-webkit-scrollbar{display:none;}"]);
|
|
6
|
-
|
|
6
|
+
const ScrollbarWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
7
7
|
displayName: "DnDScrollbarstyles__ScrollbarWrapper",
|
|
8
8
|
componentId: "sc-12t6y2d-1"
|
|
9
|
-
})(["padding-right:", ";padding-bottom:", ";& > *{opacity:", ";transition:opacity 0.25s ease-in-out;}"],
|
|
9
|
+
})(["padding-right:", ";padding-bottom:", ";& > *{opacity:", ";transition:opacity 0.25s ease-in-out;}"], (props) => {
|
|
10
10
|
if (props.absolute) {
|
|
11
|
-
return
|
|
11
|
+
return "";
|
|
12
12
|
}
|
|
13
|
-
return props.largeSize ?
|
|
14
|
-
},
|
|
13
|
+
return props.largeSize ? "24px !important" : "11px !important";
|
|
14
|
+
}, (props) => {
|
|
15
15
|
if (props.absolute) {
|
|
16
|
-
return
|
|
16
|
+
return "";
|
|
17
17
|
}
|
|
18
|
-
return props.largeSize ?
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
});
|
|
22
|
-
export var ThumbVertical = styled.div.withConfig({
|
|
18
|
+
return props.largeSize ? "20px !important" : "11px !important";
|
|
19
|
+
}, (props) => props.loading ? "0.2" : "1");
|
|
20
|
+
const ThumbVertical = /* @__PURE__ */ styled.div.withConfig({
|
|
23
21
|
displayName: "DnDScrollbarstyles__ThumbVertical",
|
|
24
22
|
componentId: "sc-12t6y2d-2"
|
|
25
|
-
})(["width:", ";background-color:", ";border-radius:3px;right:", ";position:absolute;border:", ";&:hover,&:active{background-color:", ";border:", ";}"],
|
|
26
|
-
|
|
27
|
-
}, function (props) {
|
|
28
|
-
return props.largeSize ? props.theme.palette['blue-050'] : props.theme.palette['grey-300'];
|
|
29
|
-
}, function (props) {
|
|
30
|
-
return props.largeSize ? '0' : '4px';
|
|
31
|
-
}, function (props) {
|
|
32
|
-
return props.largeSize ? "1px solid " + props.theme.palette['grey-300'] : 'none';
|
|
33
|
-
}, function (props) {
|
|
34
|
-
return props.largeSize ? props.theme.palette['blue-100'] : props.theme.palette['grey-500'];
|
|
35
|
-
}, function (props) {
|
|
36
|
-
return props.largeSize ? "1px solid " + props.theme.palette['grey-400'] : 'none';
|
|
37
|
-
});
|
|
38
|
-
export var ScrollbarTrackWrapper = styled.div.withConfig({
|
|
23
|
+
})(["width:", ";background-color:", ";border-radius:3px;right:", ";position:absolute;border:", ";&:hover,&:active{background-color:", ";border:", ";}"], (props) => props.largeSize ? "16px" : "3px", (props) => props.largeSize ? props.theme.palette["blue-050"] : props.theme.palette["grey-300"], (props) => props.largeSize ? "0" : "4px", (props) => props.largeSize ? `1px solid ${props.theme.palette["grey-300"]}` : "none", (props) => props.largeSize ? props.theme.palette["blue-100"] : props.theme.palette["grey-500"], (props) => props.largeSize ? `1px solid ${props.theme.palette["grey-400"]}` : "none");
|
|
24
|
+
const ScrollbarTrackWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
39
25
|
displayName: "DnDScrollbarstyles__ScrollbarTrackWrapper",
|
|
40
26
|
componentId: "sc-12t6y2d-3"
|
|
41
|
-
})(["display:block;height:100%;position:absolute;width:", ";top:0;right:", ";bottom:0;user-select:none;opacity:0;transition:opacity 0.3s ease-in-out;", "{width:", ";background-color:", ";border:", ";}&:hover{", "{background-color:", ";border:", ";}}"],
|
|
42
|
-
|
|
43
|
-
}, function (props) {
|
|
44
|
-
return props.largeSize ? '3px' : '0';
|
|
45
|
-
}, ThumbVertical, function (props) {
|
|
46
|
-
return props.largeSize ? '16px' : '3px';
|
|
47
|
-
}, function (props) {
|
|
48
|
-
return props.largeSize ? props.theme.palette['blue-050'] : props.theme.palette['grey-300'];
|
|
49
|
-
}, function (props) {
|
|
50
|
-
return props.largeSize ? "1px solid " + props.theme.palette['grey-300'] : 'none';
|
|
51
|
-
}, ThumbVertical, function (props) {
|
|
52
|
-
return props.largeSize ? props.theme.palette['blue-100'] : props.theme.palette['grey-500'];
|
|
53
|
-
}, function (props) {
|
|
54
|
-
return props.largeSize ? "1px solid " + props.theme.palette['grey-400'] : 'none';
|
|
55
|
-
});
|
|
56
|
-
export var TrackVertical = styled.div.withConfig({
|
|
27
|
+
})(["display:block;height:100%;position:absolute;width:", ";top:0;right:", ";bottom:0;user-select:none;opacity:0;transition:opacity 0.3s ease-in-out;", "{width:", ";background-color:", ";border:", ";}&:hover{", "{background-color:", ";border:", ";}}"], (props) => props.largeSize ? "24px" : "11px", (props) => props.largeSize ? "3px" : "0", ThumbVertical, (props) => props.largeSize ? "16px" : "3px", (props) => props.largeSize ? props.theme.palette["blue-050"] : props.theme.palette["grey-300"], (props) => props.largeSize ? `1px solid ${props.theme.palette["grey-300"]}` : "none", ThumbVertical, (props) => props.largeSize ? props.theme.palette["blue-100"] : props.theme.palette["grey-500"], (props) => props.largeSize ? `1px solid ${props.theme.palette["grey-400"]}` : "none");
|
|
28
|
+
const TrackVertical = /* @__PURE__ */ styled.div.withConfig({
|
|
57
29
|
displayName: "DnDScrollbarstyles__TrackVertical",
|
|
58
30
|
componentId: "sc-12t6y2d-4"
|
|
59
31
|
})(["opacity:0.2;width:11px;height:calc(100% - 8px);transform:translateY(4px);overflow:hidden;right:0;top:0;bottom:0;position:absolute;&:hover,&:active,&:focus{opacity:0.6;}"]);
|
|
60
|
-
|
|
61
|
-
|
|
32
|
+
const spinnerAnimation = /* @__PURE__ */ keyframes(["from{transform:rotateZ(0deg);}to{transform:rotateZ(360deg);}"]);
|
|
33
|
+
const Loader = /* @__PURE__ */ styled.div.withConfig({
|
|
62
34
|
displayName: "DnDScrollbarstyles__Loader",
|
|
63
35
|
componentId: "sc-12t6y2d-5"
|
|
64
|
-
})(["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:", ";}"],
|
|
65
|
-
|
|
66
|
-
}, spinnerAnimation, function (props) {
|
|
67
|
-
return props.theme.palette['blue-600'];
|
|
68
|
-
}, function (props) {
|
|
69
|
-
return props.theme.palette['blue-600'];
|
|
70
|
-
});
|
|
71
|
-
export var ScrollbarContainer = styled.div.withConfig({
|
|
36
|
+
})(["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:", ";}"], (props) => props.loading ? "1" : "0", spinnerAnimation, (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-600"]);
|
|
37
|
+
const ScrollbarContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
72
38
|
displayName: "DnDScrollbarstyles__ScrollbarContainer",
|
|
73
39
|
componentId: "sc-12t6y2d-6"
|
|
74
|
-
})(["display:flex;height:100%;overflow:hidden;position:relative;&:hover{", "{opacity:1;}}"], ScrollbarTrackWrapper);
|
|
40
|
+
})(["display:flex;height:100%;overflow:hidden;position:relative;&:hover{", "{opacity:1;}}"], ScrollbarTrackWrapper);
|
|
41
|
+
export {
|
|
42
|
+
Loader,
|
|
43
|
+
ScrollbarContainer,
|
|
44
|
+
ScrollbarContent,
|
|
45
|
+
ScrollbarTrackWrapper,
|
|
46
|
+
ScrollbarWrapper,
|
|
47
|
+
ThumbVertical,
|
|
48
|
+
TrackVertical
|
|
49
|
+
};
|
package/dist/Scrollbar.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ScrollbarProps, VirtualScrollbarProps } from './Scrollbar.types';
|
|
3
3
|
declare const Scrollbar: React.ForwardRefExoticComponent<(ScrollbarProps | VirtualScrollbarProps) & React.RefAttributes<HTMLElement>>;
|
|
4
4
|
export default Scrollbar;
|
package/dist/Scrollbar.js
CHANGED
|
@@ -1,31 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
fetchData: fetchData,
|
|
23
|
-
ref: forwardedRef
|
|
24
|
-
}), children), loading && /*#__PURE__*/React.createElement(S.LoaderWrapper, null, /*#__PURE__*/React.createElement(S.Loader, {
|
|
25
|
-
loading: loading
|
|
26
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
27
|
-
component: /*#__PURE__*/React.createElement(SpinnerM, null),
|
|
28
|
-
color: theme.palette['grey-600']
|
|
29
|
-
}))));
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { useTheme } from "@synerise/ds-core";
|
|
4
|
+
import Icon, { SpinnerM } from "@synerise/ds-icon";
|
|
5
|
+
import { DnDScrollbar } from "./DnDScrollbar/DnDScrollbar.js";
|
|
6
|
+
import { ScrollbarContainer, LoaderWrapper, Loader } from "./Scrollbar.styles.js";
|
|
7
|
+
import { VirtualScrollbar } from "./VirtualScrollbar/VirtualScrollbar.js";
|
|
8
|
+
const Scrollbar = forwardRef(({
|
|
9
|
+
children,
|
|
10
|
+
className,
|
|
11
|
+
loading,
|
|
12
|
+
withDnd,
|
|
13
|
+
fetchData,
|
|
14
|
+
...props
|
|
15
|
+
}, forwardedRef) => {
|
|
16
|
+
const theme = useTheme();
|
|
17
|
+
const Component = withDnd ? DnDScrollbar : VirtualScrollbar;
|
|
18
|
+
return /* @__PURE__ */ jsxs(ScrollbarContainer, { className, children: [
|
|
19
|
+
/* @__PURE__ */ jsx(Component, { ...props, fetchData, ref: forwardedRef, children }),
|
|
20
|
+
loading && /* @__PURE__ */ jsx(LoaderWrapper, { children: /* @__PURE__ */ jsx(Loader, { loading, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SpinnerM, {}), color: theme.palette["grey-600"] }) }) })
|
|
21
|
+
] });
|
|
30
22
|
});
|
|
31
|
-
export
|
|
23
|
+
export {
|
|
24
|
+
Scrollbar as default
|
|
25
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const Loader: import(
|
|
1
|
+
export declare const Loader: import('styled-components').StyledComponent<"div", any, {
|
|
2
2
|
loading?: boolean;
|
|
3
3
|
}, never>;
|
|
4
|
-
export declare const LoaderWrapper: import(
|
|
5
|
-
export declare const ScrollbarContainer: import(
|
|
4
|
+
export declare const LoaderWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const ScrollbarContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
|
package/dist/Scrollbar.styles.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import styled, { keyframes } from
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import styled, { keyframes } from "styled-components";
|
|
2
|
+
const spinnerAnimation = /* @__PURE__ */ keyframes(["from{transform:rotateZ(0deg);}to{transform:rotateZ(360deg);}"]);
|
|
3
|
+
const Loader = /* @__PURE__ */ styled.div.withConfig({
|
|
4
4
|
displayName: "Scrollbarstyles__Loader",
|
|
5
5
|
componentId: "sc-rfwkf7-0"
|
|
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:", ";}"],
|
|
7
|
-
|
|
8
|
-
}, spinnerAnimation, function (props) {
|
|
9
|
-
return props.theme.palette['grey-600'];
|
|
10
|
-
}, function (props) {
|
|
11
|
-
return props.theme.palette['grey-600'];
|
|
12
|
-
});
|
|
13
|
-
export var LoaderWrapper = styled.div.withConfig({
|
|
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:", ";}"], (props) => props.loading ? "1" : "0", spinnerAnimation, (props) => props.theme.palette["grey-600"], (props) => props.theme.palette["grey-600"]);
|
|
7
|
+
const LoaderWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
14
8
|
displayName: "Scrollbarstyles__LoaderWrapper",
|
|
15
9
|
componentId: "sc-rfwkf7-1"
|
|
16
10
|
})(["width:100%;height:100%;bottom:0;left:0;position:absolute;background-color:rgba(255,255,255,0.6);"]);
|
|
17
|
-
|
|
11
|
+
const ScrollbarContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
18
12
|
displayName: "Scrollbarstyles__ScrollbarContainer",
|
|
19
13
|
componentId: "sc-rfwkf7-2"
|
|
20
|
-
})(["position:relative;height:100%;"]);
|
|
14
|
+
})(["position:relative;height:100%;"]);
|
|
15
|
+
export {
|
|
16
|
+
Loader,
|
|
17
|
+
LoaderWrapper,
|
|
18
|
+
ScrollbarContainer
|
|
19
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { CSSProperties, ReactNode, UIEvent } from 'react';
|
|
2
|
+
import { ScrollBarProps } from '@ofsajd/react-perfect-scrollbar';
|
|
3
3
|
export type ScrollbarAdditionalProps = {
|
|
4
4
|
absolute?: boolean;
|
|
5
5
|
classes?: string;
|
package/dist/Scrollbar.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
export declare const VirtualScrollbar: React.ForwardRefExoticComponent<import("../Scrollbar.types").ScrollbarAdditionalProps & {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const VirtualScrollbar: React.ForwardRefExoticComponent<import('../Scrollbar.types').ScrollbarAdditionalProps & {
|
|
4
3
|
children?: React.ReactNode;
|
|
5
4
|
} & {
|
|
6
|
-
scrollbarOptions?: import(
|
|
5
|
+
scrollbarOptions?: import('@ofsajd/react-perfect-scrollbar').ScrollBarProps["options"];
|
|
7
6
|
} & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,111 +1,106 @@
|
|
|
1
|
-
|
|
2
|
-
import classnames from
|
|
3
|
-
import
|
|
4
|
-
import PerfectScrollbar from
|
|
5
|
-
import { useCombinedRefs, useResizeObserver } from
|
|
6
|
-
import "
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var scrollEvent = new window.Event('scroll');
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import { forwardRef, useRef, useState, useCallback, useEffect } from "react";
|
|
4
|
+
import PerfectScrollbar from "@ofsajd/react-perfect-scrollbar";
|
|
5
|
+
import { useCombinedRefs, useResizeObserver } from "@synerise/ds-utils";
|
|
6
|
+
import { ScrollbarContent, ScrollbarWrapper } from "./VirtualScrollbar.styles.js";
|
|
7
|
+
import "./../style/index.css";
|
|
8
|
+
const VirtualScrollbar = forwardRef(({
|
|
9
|
+
absolute = false,
|
|
10
|
+
children,
|
|
11
|
+
classes,
|
|
12
|
+
hasMore,
|
|
13
|
+
loading,
|
|
14
|
+
maxHeight,
|
|
15
|
+
largeSize,
|
|
16
|
+
style,
|
|
17
|
+
fetchData,
|
|
18
|
+
onScroll,
|
|
19
|
+
scrollbarOptions,
|
|
20
|
+
onYReachEnd,
|
|
21
|
+
confineScroll
|
|
22
|
+
}, forwardedRef) => {
|
|
23
|
+
const scrollRef = useRef();
|
|
24
|
+
const wrapperRef = useRef(null);
|
|
25
|
+
const combinedScrollRef = useCombinedRefs(forwardedRef, scrollRef);
|
|
26
|
+
const [lastScrollTop, setLastScrollTop] = useState(0);
|
|
27
|
+
const {
|
|
28
|
+
height,
|
|
29
|
+
width
|
|
30
|
+
} = useResizeObserver(wrapperRef);
|
|
31
|
+
const triggerScrollbarGeometryUpdate = useCallback(() => {
|
|
32
|
+
const scrollEvent = new window.Event("scroll");
|
|
34
33
|
wrapperRef.current && wrapperRef.current.dispatchEvent(scrollEvent);
|
|
35
34
|
combinedScrollRef.current && combinedScrollRef.current.dispatchEvent(scrollEvent);
|
|
36
35
|
}, [combinedScrollRef]);
|
|
37
|
-
useEffect(
|
|
36
|
+
useEffect(() => {
|
|
38
37
|
triggerScrollbarGeometryUpdate();
|
|
39
38
|
}, [height, width, triggerScrollbarGeometryUpdate]);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if ((combinedScrollRef == null || (_combinedScrollRef$cu = combinedScrollRef.current) == null ? void 0 : _combinedScrollRef$cu.scrollTop) === lastScrollTop) {
|
|
39
|
+
const handleReachEnd = useCallback(() => {
|
|
40
|
+
if (combinedScrollRef?.current?.scrollTop === lastScrollTop) {
|
|
43
41
|
return;
|
|
44
42
|
}
|
|
45
43
|
combinedScrollRef.current && setLastScrollTop(combinedScrollRef.current.scrollTop);
|
|
46
|
-
if (typeof onYReachEnd ===
|
|
44
|
+
if (typeof onYReachEnd === "function") {
|
|
47
45
|
onYReachEnd();
|
|
48
46
|
}
|
|
49
47
|
if (!loading && hasMore && fetchData) {
|
|
50
48
|
fetchData();
|
|
51
49
|
}
|
|
52
50
|
}, [loading, hasMore, lastScrollTop, fetchData, onYReachEnd, combinedScrollRef]);
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if ((combinedScrollRef == null || (_combinedScrollRef$cu2 = combinedScrollRef.current) == null ? void 0 : _combinedScrollRef$cu2.scrollTop) !== 0) {
|
|
51
|
+
const handleScrollUp = useCallback(() => {
|
|
52
|
+
if (combinedScrollRef?.current?.scrollTop !== 0) {
|
|
56
53
|
setLastScrollTop(0);
|
|
57
54
|
}
|
|
58
55
|
}, [combinedScrollRef]);
|
|
59
|
-
useEffect(
|
|
60
|
-
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
const handleWheel = confineScroll && ((event) => {
|
|
61
58
|
event.preventDefault();
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
wrapper && handleWheel && wrapper.addEventListener(
|
|
65
|
-
return
|
|
66
|
-
wrapper && handleWheel && wrapper.removeEventListener(
|
|
59
|
+
});
|
|
60
|
+
const wrapper = wrapperRef.current;
|
|
61
|
+
wrapper && handleWheel && wrapper.addEventListener("wheel", handleWheel);
|
|
62
|
+
return () => {
|
|
63
|
+
wrapper && handleWheel && wrapper.removeEventListener("wheel", handleWheel);
|
|
67
64
|
};
|
|
68
65
|
}, [confineScroll]);
|
|
69
|
-
useEffect(
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
const endHandler = ({
|
|
68
|
+
target
|
|
69
|
+
}) => {
|
|
72
70
|
if (target instanceof HTMLElement && combinedScrollRef.current && target.contains(combinedScrollRef.current)) {
|
|
73
71
|
triggerScrollbarGeometryUpdate();
|
|
74
72
|
}
|
|
75
73
|
};
|
|
76
|
-
document.body.addEventListener(
|
|
77
|
-
document.body.addEventListener(
|
|
78
|
-
return
|
|
79
|
-
document.body.removeEventListener(
|
|
80
|
-
document.body.removeEventListener(
|
|
74
|
+
document.body.addEventListener("transitionend", endHandler);
|
|
75
|
+
document.body.addEventListener("animationend", endHandler);
|
|
76
|
+
return () => {
|
|
77
|
+
document.body.removeEventListener("transitionend", endHandler);
|
|
78
|
+
document.body.removeEventListener("animationend", endHandler);
|
|
81
79
|
};
|
|
82
80
|
});
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
const className = classnames("perfect-scrollbar-wrapper", {
|
|
82
|
+
"large-size": largeSize
|
|
85
83
|
});
|
|
86
|
-
return
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
largeSize: largeSize
|
|
110
|
-
}, children)));
|
|
111
|
-
});
|
|
84
|
+
return /* @__PURE__ */ jsx(
|
|
85
|
+
PerfectScrollbar,
|
|
86
|
+
{
|
|
87
|
+
containerRef: (ref) => {
|
|
88
|
+
combinedScrollRef.current = ref;
|
|
89
|
+
},
|
|
90
|
+
onScroll,
|
|
91
|
+
onScrollUp: handleScrollUp,
|
|
92
|
+
options: {
|
|
93
|
+
...scrollbarOptions,
|
|
94
|
+
minScrollbarLength: 48
|
|
95
|
+
},
|
|
96
|
+
onYReachEnd: handleReachEnd,
|
|
97
|
+
className,
|
|
98
|
+
children: /* @__PURE__ */ jsx(ScrollbarContent, { className: `${classes}`, style: {
|
|
99
|
+
maxHeight
|
|
100
|
+
}, "data-testid": "virtual-scrollbar", children: /* @__PURE__ */ jsx(ScrollbarWrapper, { ref: wrapperRef, absolute, loading, style, largeSize, children }) })
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
});
|
|
104
|
+
export {
|
|
105
|
+
VirtualScrollbar
|
|
106
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const ScrollbarContent: import(
|
|
2
|
-
export declare const ScrollbarWrapper: import(
|
|
1
|
+
export declare const ScrollbarContent: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const ScrollbarWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
3
3
|
absolute?: boolean;
|
|
4
4
|
loading?: boolean;
|
|
5
5
|
largeSize?: boolean;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const ScrollbarContent = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "VirtualScrollbarstyles__ScrollbarContent",
|
|
4
4
|
componentId: "sc-hoiad9-0"
|
|
5
5
|
})([""]);
|
|
6
|
-
|
|
6
|
+
const ScrollbarWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
7
7
|
displayName: "VirtualScrollbarstyles__ScrollbarWrapper",
|
|
8
8
|
componentId: "sc-hoiad9-1"
|
|
9
|
-
})(["padding-right:", ";.ps--active-x &{padding-bottom:", ";}& > *{opacity:", ";transition:all 0.25s ease-in-out;}"],
|
|
9
|
+
})(["padding-right:", ";.ps--active-x &{padding-bottom:", ";}& > *{opacity:", ";transition:all 0.25s ease-in-out;}"], (props) => {
|
|
10
10
|
if (props.absolute) {
|
|
11
|
-
return
|
|
11
|
+
return "";
|
|
12
12
|
}
|
|
13
|
-
return props.largeSize ?
|
|
14
|
-
},
|
|
13
|
+
return props.largeSize ? "24px !important" : "11px !important";
|
|
14
|
+
}, (props) => {
|
|
15
15
|
if (props.absolute) {
|
|
16
|
-
return
|
|
16
|
+
return "";
|
|
17
17
|
}
|
|
18
|
-
return props.largeSize ?
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
return props.largeSize ? "20px !important" : "11px !important";
|
|
19
|
+
}, (props) => props.loading ? "0.2" : "1");
|
|
20
|
+
export {
|
|
21
|
+
ScrollbarContent,
|
|
22
|
+
ScrollbarWrapper
|
|
23
|
+
};
|
|
File without changes
|
package/dist/index.js
CHANGED
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-scrollbar",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.18",
|
|
4
4
|
"description": "Scrollbar UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "vite build",
|
|
20
20
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
21
|
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
-
"build:watch": "
|
|
22
|
+
"build:watch": "vite build --watch",
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
|
|
25
25
|
"prepublish": "pnpm run build",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@ofsajd/react-perfect-scrollbar": "1.0.0",
|
|
39
|
-
"@synerise/ds-icon": "^1.15.
|
|
40
|
-
"@synerise/ds-utils": "^1.7.
|
|
39
|
+
"@synerise/ds-icon": "^1.15.2",
|
|
40
|
+
"@synerise/ds-utils": "^1.7.1",
|
|
41
41
|
"classnames": "^2.3.2"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"react": ">=16.9.0 <= 18.3.1",
|
|
46
46
|
"styled-components": "^5.3.3"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "c2384982c3533a31eb5e5e0408f8dcecb2b0f399"
|
|
49
49
|
}
|