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.
@@ -21259,14 +21259,16 @@ function CustomArrowButton({
21259
21259
  }) {
21260
21260
  const [isHovered, setIsHovered] = React.useState(false);
21261
21261
 
21262
- // Properly clone the icon and override color on hover
21263
- const styledIcon = icon && /*#__PURE__*/React__default["default"].isValidElement(icon) ? /*#__PURE__*/React__default["default"].cloneElement(icon, {
21264
- style: {
21265
- ...(icon.props.style || {}),
21266
- color: isHovered ? hoverIconColor : iconColor,
21267
- transition: "color 0.3s ease"
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
- }) : icon;
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 ? "40px" : "auto",
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: carouselRef,
21362
+ arrows: false
21363
+ // ref={carouselRef}
21364
+ ,
21362
21365
  afterChange: handleCarouselChange,
21363
21366
  infinite: true,
21364
21367
  dots: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.211",
3
+ "version": "0.6.213",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -1,60 +1,54 @@
1
- import React, { useState } from "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
- // Properly clone the icon and override color on hover
15
- const styledIcon =
16
- icon && React.isValidElement(icon)
17
- ? React.cloneElement(icon, {
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
- type="default"
29
- shape="circle"
30
- icon={styledIcon}
31
- onClick={onClick}
32
- style={{
33
- position: "absolute",
34
- right: !isLeft ? "40px" : "auto",
35
- left: isLeft ? "40px" : "auto",
36
- top: "58%",
37
- transform: "translateY(-50%)",
38
- zIndex: 10,
39
- backgroundColor: "rgba(255, 255, 255, 0.4)",
40
- border: "1px solid rgba(0, 0, 0, 0.1)",
41
- boxShadow: "0 2px 8px rgba(0, 0, 0, 0.2)",
42
- width: "40px",
43
- height: "40px",
44
- display: "flex",
45
- alignItems: "center",
46
- justifyContent: "center",
47
- }}
48
- onMouseEnter={(e) => {
49
- e.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 1)";
50
- setIsHovered(true);
51
- }}
52
- onMouseLeave={(e) => {
53
- e.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.4)";
54
- setIsHovered(false);
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
- export default CustomArrowButton;
62
+
63
+ export default CustomArrowButton
@@ -102,7 +102,7 @@ function ImageCarousel({
102
102
  <CarouselWidget
103
103
  title={title}
104
104
  arrows={false}
105
- ref={carouselRef}
105
+ // ref={carouselRef}
106
106
  afterChange={handleCarouselChange}
107
107
  infinite
108
108
  dots={false}