datastake-daf 0.6.211 → 0.6.213
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/dist/components/index.js
CHANGED
|
@@ -21259,14 +21259,16 @@ function CustomArrowButton({
|
|
|
21259
21259
|
}) {
|
|
21260
21260
|
const [isHovered, setIsHovered] = React.useState(false);
|
|
21261
21261
|
|
|
21262
|
-
//
|
|
21263
|
-
const styledIcon = icon &&
|
|
21264
|
-
|
|
21265
|
-
|
|
21266
|
-
|
|
21267
|
-
|
|
21262
|
+
// Clone the icon and add color styling
|
|
21263
|
+
const styledIcon = icon && typeof icon === 'object' ? {
|
|
21264
|
+
...icon,
|
|
21265
|
+
props: {
|
|
21266
|
+
...icon.props,
|
|
21267
|
+
style: {
|
|
21268
|
+
color: isHovered ? hoverIconColor : iconColor
|
|
21269
|
+
}
|
|
21268
21270
|
}
|
|
21269
|
-
}
|
|
21271
|
+
} : icon;
|
|
21270
21272
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
21271
21273
|
type: "default",
|
|
21272
21274
|
shape: "circle",
|
|
@@ -21275,7 +21277,7 @@ function CustomArrowButton({
|
|
|
21275
21277
|
style: {
|
|
21276
21278
|
position: "absolute",
|
|
21277
21279
|
right: !isLeft ? "40px" : "auto",
|
|
21278
|
-
left: isLeft ? "
|
|
21280
|
+
left: !isLeft ? "auto" : "40px",
|
|
21279
21281
|
top: "58%",
|
|
21280
21282
|
transform: "translateY(-50%)",
|
|
21281
21283
|
zIndex: 10,
|
|
@@ -21357,8 +21359,9 @@ function ImageCarousel(_ref) {
|
|
|
21357
21359
|
inactiveDotColor: inactiveDotColor,
|
|
21358
21360
|
children: [/*#__PURE__*/jsxRuntime.jsx(CarouselWidget, {
|
|
21359
21361
|
title: title,
|
|
21360
|
-
arrows: false
|
|
21361
|
-
ref
|
|
21362
|
+
arrows: false
|
|
21363
|
+
// ref={carouselRef}
|
|
21364
|
+
,
|
|
21362
21365
|
afterChange: handleCarouselChange,
|
|
21363
21366
|
infinite: true,
|
|
21364
21367
|
dots: false,
|
package/package.json
CHANGED
|
@@ -1,60 +1,54 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Button } from "antd";
|
|
3
|
+
import { useState } from "react";
|
|
3
4
|
import PropTypes from "prop-types";
|
|
4
5
|
|
|
5
6
|
function CustomArrowButton({
|
|
6
|
-
icon,
|
|
7
|
-
onClick = () => {},
|
|
8
|
-
isLeft = false,
|
|
9
|
-
iconColor = "#666",
|
|
10
|
-
hoverIconColor = "#1890ff"
|
|
7
|
+
icon,
|
|
8
|
+
onClick = () => {},
|
|
9
|
+
isLeft = false,
|
|
10
|
+
iconColor = "#666",
|
|
11
|
+
hoverIconColor = "#1890ff"
|
|
11
12
|
}) {
|
|
12
13
|
const [isHovered, setIsHovered] = useState(false);
|
|
13
14
|
|
|
14
|
-
//
|
|
15
|
-
const styledIcon =
|
|
16
|
-
icon
|
|
17
|
-
|
|
18
|
-
style: {
|
|
19
|
-
...(icon.props.style || {}),
|
|
20
|
-
color: isHovered ? hoverIconColor : iconColor,
|
|
21
|
-
transition: "color 0.3s ease",
|
|
22
|
-
},
|
|
23
|
-
})
|
|
24
|
-
: icon;
|
|
15
|
+
// Clone the icon and add color styling
|
|
16
|
+
const styledIcon = icon && typeof icon === 'object' ?
|
|
17
|
+
{ ...icon, props: { ...icon.props, style: { color: isHovered ? hoverIconColor : iconColor } } } :
|
|
18
|
+
icon;
|
|
25
19
|
|
|
26
20
|
return (
|
|
27
21
|
<Button
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
22
|
+
type="default"
|
|
23
|
+
shape="circle"
|
|
24
|
+
icon={styledIcon}
|
|
25
|
+
onClick={onClick}
|
|
26
|
+
style={{
|
|
27
|
+
position: "absolute",
|
|
28
|
+
right: !isLeft ? "40px" : "auto",
|
|
29
|
+
left: !isLeft ? "auto" : "40px",
|
|
30
|
+
top: "58%",
|
|
31
|
+
transform: "translateY(-50%)",
|
|
32
|
+
zIndex: 10,
|
|
33
|
+
backgroundColor: "rgba(255, 255, 255, 0.4)",
|
|
34
|
+
border: "1px solid rgba(0, 0, 0, 0.1)",
|
|
35
|
+
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.2)",
|
|
36
|
+
width: "40px",
|
|
37
|
+
height: "40px",
|
|
38
|
+
display: "flex",
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
justifyContent: "center",
|
|
41
|
+
}}
|
|
42
|
+
onMouseEnter={(e) => {
|
|
43
|
+
e.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 1)";
|
|
44
|
+
setIsHovered(true);
|
|
45
|
+
}}
|
|
46
|
+
onMouseLeave={(e) => {
|
|
47
|
+
e.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.4)";
|
|
48
|
+
setIsHovered(false);
|
|
49
|
+
}}
|
|
56
50
|
/>
|
|
57
|
-
)
|
|
51
|
+
)
|
|
58
52
|
}
|
|
59
53
|
|
|
60
54
|
CustomArrowButton.propTypes = {
|
|
@@ -65,4 +59,5 @@ CustomArrowButton.propTypes = {
|
|
|
65
59
|
hoverIconColor: PropTypes.string,
|
|
66
60
|
};
|
|
67
61
|
|
|
68
|
-
|
|
62
|
+
|
|
63
|
+
export default CustomArrowButton
|