@zohoim/chat-components 1.0.9-alpha.0 → 1.0.10-alpha.0

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.
@@ -41,7 +41,8 @@ export default function ActionIcon(props) {
41
41
  id,
42
42
  title,
43
43
  isDisabled,
44
- needIconOnly
44
+ needIconOnly,
45
+ isActive
45
46
  } = props;
46
47
  const {
47
48
  actionIconWrapperProps = dummyObject
@@ -68,6 +69,7 @@ export default function ActionIcon(props) {
68
69
  }, [iconStyle, id]);
69
70
  return needIconOnly ? renderIcon() : /*#__PURE__*/React.createElement(ActionIconWrapper, {
70
71
  id: id,
72
+ isActive: isActive,
71
73
  isDisabled: isDisabled,
72
74
  onClick: onClick,
73
75
  onMouseEnter: onMouseEnter,
@@ -12,6 +12,7 @@ const actionIconPropTypes = {
12
12
  customStyle: PropTypes.object,
13
13
  isDisabled: PropTypes.bool,
14
14
  needIconOnly: PropTypes.bool,
15
- title: PropTypes.string
15
+ title: PropTypes.string,
16
+ isActive: PropTypes.bool
16
17
  };
17
18
  export default actionIconPropTypes;
@@ -23,7 +23,8 @@ export default function ActionIconWrapper(props) {
23
23
  onMouseEnter: propOnMouseEnter,
24
24
  id,
25
25
  title,
26
- isDisabled
26
+ isDisabled,
27
+ isActive
27
28
  } = props;
28
29
  const {
29
30
  onClick,
@@ -32,7 +33,8 @@ export default function ActionIconWrapper(props) {
32
33
  onClick: propOnClick,
33
34
  onMouseEnter: propOnMouseEnter,
34
35
  id,
35
- isDisabled
36
+ isDisabled,
37
+ isActive
36
38
  });
37
39
  /* External CSS Customization */
38
40
 
@@ -42,7 +44,8 @@ export default function ActionIconWrapper(props) {
42
44
  const {
43
45
  actionIconWrapperClass
44
46
  } = cssJSLogic({
45
- isDisabled
47
+ isDisabled,
48
+ isActive
46
49
  }, newStyle);
47
50
  /* Render Icon */
48
51
 
@@ -21,7 +21,7 @@
21
21
  border-radius: var(--actionIconWrapper-border_radius);
22
22
  }
23
23
 
24
- .actionIconWrapper:hover {
24
+ .actionIconWrapper:hover, .actionIconWrapperActive{
25
25
  background-color: var(--imlib_chat_components_actionIconWrapper_bg_color);
26
26
  border-color: var(--imlib_chat_components_actionIconWrapper_border_color);
27
27
  }
@@ -2,11 +2,13 @@
2
2
  import { compileClassNames } from '@zohodesk/utils';
3
3
  export default function cssJSLogic(props, style) {
4
4
  const {
5
- isDisabled
5
+ isDisabled,
6
+ isActive
6
7
  } = props;
7
8
  const actionIconWrapperClass = compileClassNames({
8
9
  [style.actionIconWrapper]: true,
9
- [style.disabled]: isDisabled
10
+ [style.disabled]: isDisabled,
11
+ [style.actionIconWrapperActive]: isActive
10
12
  });
11
13
  return {
12
14
  actionIconWrapperClass
@@ -7,6 +7,7 @@ const actionIconWrapperPropTypes = {
7
7
  renderIcon: PropTypes.func.isRequired,
8
8
  customStyle: PropTypes.object,
9
9
  isDisabled: PropTypes.bool,
10
- title: PropTypes.string
10
+ title: PropTypes.string,
11
+ isActive: PropTypes.bool
11
12
  };
12
13
  export default actionIconWrapperPropTypes;
@@ -20,6 +20,7 @@ export default function MessageAction(props) {
20
20
  customProps,
21
21
  closePopup,
22
22
  isDisabled,
23
+ isActive,
23
24
  needMoreActionItemIcon
24
25
  } = props;
25
26
  const {
@@ -50,6 +51,7 @@ export default function MessageAction(props) {
50
51
  ...moreActionItemProps
51
52
  }) : /*#__PURE__*/React.createElement(ActionIcon, {
52
53
  id: id,
54
+ isActive: isActive,
53
55
  isDisabled: isDisabled,
54
56
  onClick: onClick,
55
57
  onMouseEnter: onMouseEnter,
@@ -16,6 +16,7 @@ const messageActionPropTypes = {
16
16
  iconTitle: PropTypes.string,
17
17
  isDisabled: PropTypes.bool,
18
18
  isShowInMore: PropTypes.bool,
19
- needMoreActionItemIcon: PropTypes.bool
19
+ needMoreActionItemIcon: PropTypes.bool,
20
+ isActive: PropTypes.bool
20
21
  };
21
22
  export default messageActionPropTypes;
@@ -103,8 +103,9 @@ export default function MessageActions(props) {
103
103
  const renderMoreIcon = useCallback(() => /*#__PURE__*/React.createElement("div", {
104
104
  className: newStyle.moreIcon
105
105
  }, /*#__PURE__*/React.createElement(MoreIcon, null)), [newStyle.moreIcon]);
106
- const renderMore = useCallback(() => /*#__PURE__*/React.createElement(ActionIconWrapper, {
106
+ const renderMore = useCallback(componentProps => /*#__PURE__*/React.createElement(ActionIconWrapper, {
107
107
  renderIcon: renderMoreIcon,
108
+ ...componentProps,
108
109
  ...actionIconWrapperProps
109
110
  }), [actionIconWrapperProps, renderMoreIcon]);
110
111
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(MessageActionsWrapper, {
@@ -40,7 +40,9 @@ function MessageActionsMoreComp(props) {
40
40
  isAbsolutePositioningNeeded,
41
41
  positionsOffset
42
42
  } = props;
43
- const moreIcon = renderHandler(renderMoreIcon)();
43
+ const moreIcon = renderHandler(renderMoreIcon)({
44
+ isActive: isPopupReady
45
+ });
44
46
  /* External CSS Customization */
45
47
 
46
48
  const newStyle = useMergeStyle(style, customStyle);
@@ -91,7 +93,7 @@ function MessageActionsMoreComp(props) {
91
93
  }
92
94
 
93
95
  const MessageActionsMore = Popup(MessageActionsMoreComp, undefined, undefined, {
94
- isAbsolutePositioningNeeded: false
96
+ isAbsolutePositioningNeeded: true
95
97
  });
96
98
  MessageActionsMoreComp.defaultProps = messageActionsMoreDefaultProps;
97
99
  MessageActionsMoreComp.propTypes = messageActionsMorePropTypes;
@@ -4,6 +4,7 @@
4
4
 
5
5
  .morePopupContainer {
6
6
  composes: container;
7
+ position: relative;
7
8
  }
8
9
 
9
10
  .popup {
@@ -56,6 +56,7 @@ export default function MessageActionsWrapper(props) {
56
56
  }), [moreActions, renderMoreIcon, messageActionsMoreProps]);
57
57
  const renderRow = useCallback(() => /*#__PURE__*/React.createElement(Container, {
58
58
  alignBox: "row",
59
+ className: newStyle.row,
59
60
  isCover: false
60
61
  }, renderDefaultActions(), isShowMoreIcon ? renderMoreActions() : null), [renderDefaultActions, renderMoreActions, isShowMoreIcon]);
61
62
  return /*#__PURE__*/React.createElement("div", {
@@ -1,3 +1,7 @@
1
1
  .messageActionsWrapper {
2
2
  /* Use this class for message actions customization */
3
3
  }
4
+
5
+ .row{
6
+ gap: var(--zd_size2) ;
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohoim/chat-components",
3
- "version": "1.0.9-alpha.0",
3
+ "version": "1.0.10-alpha.0",
4
4
  "description": "Chat Components",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -52,5 +52,5 @@
52
52
  "jsdom": "23.0.0",
53
53
  "react-to-jsx": "1.3.2"
54
54
  },
55
- "gitHead": "9cda3855c3440ea8439c75bcb7b9e2a2ad41bc5b"
55
+ "gitHead": "9110a5872338d64aba014563ad4d5202e73e17f1"
56
56
  }