@zohodesk/dot 1.4.6 → 1.4.8

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.
Files changed (72) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +11 -0
  3. package/coverage/ExternalLink/ExternalLink.js.html +1 -1
  4. package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
  5. package/coverage/ExternalLink/index.html +1 -1
  6. package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
  7. package/coverage/ExternalLink/props/index.html +1 -1
  8. package/coverage/ExternalLink/props/propTypes.js.html +1 -1
  9. package/coverage/IconButton/IconButton.js.html +7 -7
  10. package/coverage/IconButton/IconButton.module.css.html +1 -1
  11. package/coverage/IconButton/index.html +11 -11
  12. package/coverage/IconButton/props/defaultProps.js.html +1 -1
  13. package/coverage/IconButton/props/index.html +1 -1
  14. package/coverage/IconButton/props/propTypes.js.html +1 -1
  15. package/coverage/Image/Image.js.html +1 -1
  16. package/coverage/Image/Image.module.css.html +1 -1
  17. package/coverage/Image/index.html +1 -1
  18. package/coverage/Image/props/defaultProps.js.html +1 -1
  19. package/coverage/Image/props/index.html +1 -1
  20. package/coverage/Image/props/propTypes.js.html +1 -1
  21. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
  22. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
  23. package/coverage/avatar/AvatarWithTeam/index.html +1 -1
  24. package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
  25. package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
  26. package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
  27. package/coverage/coverage-final.json +1 -1
  28. package/coverage/coverage-summary.json +2 -2
  29. package/coverage/index.html +11 -11
  30. package/es/Drawer/Drawer.js +6 -3
  31. package/es/Drawer/props/defaultProps.js +2 -1
  32. package/es/Drawer/props/propTypes.js +2 -1
  33. package/es/Hooks/Dragger/useDragger.js +4 -3
  34. package/es/IconButton/IconButton.js +2 -2
  35. package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +4 -0
  36. package/es/list/status/StatusDropdown/StatusDropdown.js +2 -1
  37. package/es/list/status/StatusListItem/StatusListItem.js +12 -5
  38. package/es/list/status/StatusListItem/props/defaultProps.js +2 -1
  39. package/es/list/status/StatusListItem/props/propTypes.js +3 -1
  40. package/es/lookup/Lookup/Lookup.js +6 -3
  41. package/es/v1/Drawer/Drawer.js +6 -3
  42. package/es/v1/Drawer/props/defaultProps.js +2 -1
  43. package/es/v1/Drawer/props/propTypes.js +2 -1
  44. package/es/v1/IconButton/IconButton.js +2 -2
  45. package/es/v1/list/status/StatusDropdown/StatusDropdown.js +2 -1
  46. package/es/v1/list/status/StatusListItem/StatusListItem.js +12 -5
  47. package/es/v1/list/status/StatusListItem/props/defaultProps.js +2 -1
  48. package/es/v1/list/status/StatusListItem/props/propTypes.js +3 -1
  49. package/es/v1/lookup/Lookup/Lookup.js +6 -3
  50. package/lib/Drawer/Drawer.js +6 -3
  51. package/lib/Drawer/props/defaultProps.js +2 -1
  52. package/lib/Drawer/props/propTypes.js +2 -1
  53. package/lib/Hooks/Dragger/useDragger.js +4 -3
  54. package/lib/IconButton/IconButton.js +2 -2
  55. package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +4 -0
  56. package/lib/list/status/StatusDropdown/StatusDropdown.js +2 -1
  57. package/lib/list/status/StatusListItem/StatusListItem.js +12 -5
  58. package/lib/list/status/StatusListItem/props/defaultProps.js +2 -1
  59. package/lib/list/status/StatusListItem/props/propTypes.js +3 -1
  60. package/lib/lookup/Lookup/Lookup.js +14 -3
  61. package/lib/v1/Drawer/Drawer.js +6 -3
  62. package/lib/v1/Drawer/props/defaultProps.js +2 -1
  63. package/lib/v1/Drawer/props/propTypes.js +2 -1
  64. package/lib/v1/IconButton/IconButton.js +2 -2
  65. package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +2 -1
  66. package/lib/v1/list/status/StatusListItem/StatusListItem.js +12 -5
  67. package/lib/v1/list/status/StatusListItem/props/defaultProps.js +2 -1
  68. package/lib/v1/list/status/StatusListItem/props/propTypes.js +3 -1
  69. package/lib/v1/lookup/Lookup/Lookup.js +11 -6
  70. package/package.json +5 -5
  71. package/result.json +1 -1
  72. package/unittest/index.html +1 -1
@@ -23,6 +23,7 @@
23
23
  font-family: var(--zd_semibold);
24
24
  /* css:theme-validation:ignore */
25
25
  color: var(--titleColor);
26
+ word-wrap: break-word;
26
27
  }
27
28
  .small .title {
28
29
  font-size: var(--zd_font_size16) ;
@@ -52,6 +53,9 @@
52
53
  .linkDescWrapper {
53
54
  margin-top: var(--zd_size20) ;
54
55
  }
56
+ .desc{
57
+ word-wrap: break-word;
58
+ }
55
59
  [dir=ltr] .linkDesc, [dir=ltr] .desc {
56
60
  margin-right: var(--zd_size4) ;
57
61
  }
@@ -440,7 +440,8 @@ export class StatusDropdown extends React.Component {
440
440
  needMultiLineText: needMultiLineText,
441
441
  a11y: {
442
442
  role: isSearch ? 'option' : 'menuitem',
443
- ariaSelected: value === item[keyName]
443
+ ariaSelected: value === item[keyName],
444
+ 'data-a11y-list-active': selectedIndex === i
444
445
  }
445
446
  })))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
446
447
  className: style.svgWrapper,
@@ -68,7 +68,9 @@ export default class StatusListItem extends React.Component {
68
68
  isDisabled,
69
69
  bulletColor,
70
70
  a11y,
71
- needMultiLineText
71
+ needMultiLineText,
72
+ customClass,
73
+ children
72
74
  } = this.props;
73
75
  let options = {};
74
76
  let {
@@ -88,7 +90,7 @@ export default class StatusListItem extends React.Component {
88
90
  isCover: false,
89
91
  align: "baseline",
90
92
  alignBox: "row",
91
- className: `${style.list} ${style[size]} ${style[palette]} ${active ? style.active : highlight && !isDisabled ? style.hover : ''} ${autoHover && !isDisabled ? style.effect : ''} ${needTick ? style.withTick : ''} ${isDisabled ? CssProvider('isDisable') : ''} ${needBorder ? style.withBorder : ''}`,
93
+ className: `${style.list} ${style[size]} ${style[palette]} ${active ? style.active : highlight && !isDisabled ? style.hover : ''} ${autoHover && !isDisabled ? style.effect : ''} ${needTick ? style.withTick : ''} ${isDisabled ? CssProvider('isDisable') : ''} ${needBorder ? style.withBorder : ''} ${customClass}`,
92
94
  dataId: String(value).replace("'", '_'),
93
95
  onClick: !isDisabled && this.handleClick,
94
96
  onMouseEnter: this.handleMouseEnter,
@@ -96,14 +98,19 @@ export default class StatusListItem extends React.Component {
96
98
  tagName: isLink ? 'a' : 'li',
97
99
  "data-title": isDisabled ? disableTitle : null,
98
100
  tabindex: isDisabled ? '-1' : '0'
99
- }, options), /*#__PURE__*/React.createElement(Box, {
101
+ }, options, a11y), /*#__PURE__*/React.createElement(Box, {
100
102
  className: `${style.statusType} ${style[bulletColor]}`
101
103
  }), /*#__PURE__*/React.createElement(Box, {
102
- "data-title": isDisabled ? null : title,
103
104
  flexible: true,
105
+ shrink: true
106
+ }, /*#__PURE__*/React.createElement(Container, {
107
+ alignBox: "row",
108
+ align: needMultiLineText ? 'top' : 'vertical'
109
+ }, /*#__PURE__*/React.createElement(Box, {
110
+ "data-title": isDisabled ? null : title,
104
111
  shrink: true,
105
112
  className: needMultiLineText ? style.multiLineValue : style.value
106
- }, value), needTick && active ? /*#__PURE__*/React.createElement("div", {
113
+ }, value), /*#__PURE__*/React.createElement(Box, null, children && children))), needTick && active ? /*#__PURE__*/React.createElement("div", {
107
114
  className: style.tickIcon,
108
115
  "aria-hidden": ariaHidden
109
116
  }, /*#__PURE__*/React.createElement(Icon, {
@@ -11,5 +11,6 @@ export const defaultProps = {
11
11
  needBorder: true,
12
12
  bulletColor: 'black',
13
13
  a11y: {},
14
- needMultiLineText: false
14
+ needMultiLineText: false,
15
+ customClass: ''
15
16
  };
@@ -25,5 +25,7 @@ export const propTypes = {
25
25
  role: PropTypes.string,
26
26
  ariaSelected: PropTypes.bool,
27
27
  ariaHidden: PropTypes.bool
28
- })
28
+ }),
29
+ customClass: PropTypes.string,
30
+ children: PropTypes.node
29
31
  };
@@ -1,3 +1,5 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
1
3
  /*** Libraries ***/
2
4
  import React, { Component } from 'react';
3
5
  import { defaultProps } from './props/defaultProps';
@@ -62,7 +64,8 @@ export default class Lookup extends Component {
62
64
  ariaLabelledby,
63
65
  ariaDescribedby,
64
66
  ariaLabel,
65
- ariaModal = isActive ? true : undefined
67
+ ariaModal = isActive ? true : undefined,
68
+ ...a11yAttributes
66
69
  } = a11y;
67
70
  const {
68
71
  focusScopeProps = {}
@@ -74,7 +77,7 @@ export default class Lookup extends Component {
74
77
  needFocusLoop = true,
75
78
  needEnterAction = true
76
79
  } = focusScopeProps;
77
- const content = /*#__PURE__*/React.createElement("div", {
80
+ const content = /*#__PURE__*/React.createElement("div", _extends({
78
81
  ref: this.createRef,
79
82
  tabIndex: "-1",
80
83
  "data-a11y-need-focus-style": "false",
@@ -87,7 +90,7 @@ export default class Lookup extends Component {
87
90
  className: `${style.box} ${style[`${size}Size`]}`,
88
91
  "data-id": dataId,
89
92
  "data-test-id": dataId
90
- }, /*#__PURE__*/React.createElement(Container, {
93
+ }, a11yAttributes), /*#__PURE__*/React.createElement(Container, {
91
94
  "data-drag-container": "true",
92
95
  isCover: false,
93
96
  className: isMinHeight ? `${style.wrapper}` : `${style.coverwrap}`
@@ -1,3 +1,5 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
1
3
  import React, { useRef } from 'react';
2
4
  import { Header_defaultProps, Footer_defaultProps, Drawer_defaultProps } from './props/defaultProps';
3
5
  import { Header_propTypes, Content_propTypes, Footer_propTypes, Drawer_propTypes } from './props/propTypes';
@@ -134,7 +136,8 @@ export default function Drawer(props) {
134
136
  onBodyClick,
135
137
  onClose,
136
138
  needFocusScope,
137
- customProps
139
+ customProps,
140
+ a11y
138
141
  } = props;
139
142
  const {
140
143
  focusScopeProps = {}
@@ -158,12 +161,12 @@ export default function Drawer(props) {
158
161
 
159
162
  return child;
160
163
  });
161
- let content = /*#__PURE__*/React.createElement(Box, {
164
+ let content = /*#__PURE__*/React.createElement(Box, _extends({
162
165
  className: `${style.container} ${style.columns} ${style.drawerModal} ${uptoTablet ? style.mbleSize : style[size]}`,
163
166
  "data-a11y-need-focus-style": "false",
164
167
  tabindex: -1,
165
168
  eleRef: contentRef
166
- }, /*#__PURE__*/React.createElement(Card, {
169
+ }, a11y), /*#__PURE__*/React.createElement(Card, {
167
170
  onClick: e => {
168
171
  e && e.stopPropagation && e.stopPropagation();
169
172
  onBodyClick(e);
@@ -18,5 +18,6 @@ export const Drawer_defaultProps = {
18
18
  needAutoZindex: true,
19
19
  onBodyClick: () => {},
20
20
  needFocusScope: false,
21
- customProps: {}
21
+ customProps: {},
22
+ a11y: {}
22
23
  };
@@ -48,5 +48,6 @@ export const Drawer_propTypes = {
48
48
  subDrawerSize: PropTypes.oneOf(['xsmall', 'small', 'medium']),
49
49
  needFocusScope: PropTypes.bool,
50
50
  customProps: PropTypes.object,
51
- innerPortalName: PropTypes.string
51
+ innerPortalName: PropTypes.string,
52
+ a11y: PropTypes.object
52
53
  };
@@ -38,8 +38,8 @@ export default function IconButton(props) {
38
38
 
39
39
  function handleToggle(e) {
40
40
  if (e.key === ' ' || e.key === 'Enter' || e.key === 'Spacebar') {
41
- e.preventDefault();
42
- triggerClick(e);
41
+ e.preventDefault(); // triggerClick(e);
42
+
43
43
  triggerMouseDown(e);
44
44
  }
45
45
  }
@@ -352,7 +352,8 @@ function StatusDropdown(props) {
352
352
  needMultiLineText: needMultiLineText,
353
353
  a11y: {
354
354
  role: isSearch ? 'option' : 'menuitem',
355
- ariaSelected: value === item[keyName]
355
+ ariaSelected: value === item[keyName],
356
+ 'data-a11y-list-active': selectedIndex === i
356
357
  }
357
358
  })))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
358
359
  className: style.svgWrapper,
@@ -35,7 +35,9 @@ export default function StatusListItem(props) {
35
35
  getRef,
36
36
  id,
37
37
  onClick,
38
- onMouseEnter
38
+ onMouseEnter,
39
+ customClass,
40
+ children
39
41
  } = props;
40
42
  let options = {};
41
43
  let {
@@ -70,7 +72,7 @@ export default function StatusListItem(props) {
70
72
  isCover: false,
71
73
  align: "baseline",
72
74
  alignBox: "row",
73
- className: `${style.list} ${style[size]} ${style[palette]} ${active ? style.active : highlight && !isDisabled ? style.hover : ''} ${autoHover && !isDisabled ? style.effect : ''} ${needTick ? style.withTick : ''} ${isDisabled ? CssProvider('isDisable') : ''} ${needBorder ? style.withBorder : ''}`,
75
+ className: `${style.list} ${style[size]} ${style[palette]} ${active ? style.active : highlight && !isDisabled ? style.hover : ''} ${autoHover && !isDisabled ? style.effect : ''} ${needTick ? style.withTick : ''} ${isDisabled ? CssProvider('isDisable') : ''} ${needBorder ? style.withBorder : ''} ${customClass}`,
74
76
  dataId: String(value).replace("'", '_'),
75
77
  onClick: !isDisabled && handleClick,
76
78
  onMouseEnter: handleMouseEnter,
@@ -78,14 +80,19 @@ export default function StatusListItem(props) {
78
80
  tagName: isLink ? 'a' : 'li',
79
81
  "data-title": isDisabled ? disableTitle : null,
80
82
  tabindex: isDisabled ? '-1' : '0'
81
- }, options), /*#__PURE__*/React.createElement(Box, {
83
+ }, options, a11y), /*#__PURE__*/React.createElement(Box, {
82
84
  className: `${style.statusType} ${style[bulletColor]}`
83
85
  }), /*#__PURE__*/React.createElement(Box, {
84
- "data-title": isDisabled ? null : title,
85
86
  flexible: true,
87
+ shrink: true
88
+ }, /*#__PURE__*/React.createElement(Container, {
89
+ alignBox: "row",
90
+ align: needMultiLineText ? 'top' : 'vertical'
91
+ }, /*#__PURE__*/React.createElement(Box, {
92
+ "data-title": isDisabled ? null : title,
86
93
  shrink: true,
87
94
  className: needMultiLineText ? style.multiLineValue : style.value
88
- }, value), needTick && active ? /*#__PURE__*/React.createElement("div", {
95
+ }, value), /*#__PURE__*/React.createElement(Box, null, children && children))), needTick && active ? /*#__PURE__*/React.createElement("div", {
89
96
  className: style.tickIcon,
90
97
  "aria-hidden": ariaHidden
91
98
  }, /*#__PURE__*/React.createElement(Icon, {
@@ -11,5 +11,6 @@ export const defaultProps = {
11
11
  needBorder: true,
12
12
  bulletColor: 'black',
13
13
  a11y: {},
14
- needMultiLineText: false
14
+ needMultiLineText: false,
15
+ customClass: ''
15
16
  };
@@ -25,5 +25,7 @@ export const propTypes = {
25
25
  role: PropTypes.string,
26
26
  ariaSelected: PropTypes.bool,
27
27
  ariaHidden: PropTypes.bool
28
- })
28
+ }),
29
+ customClass: PropTypes.string,
30
+ children: PropTypes.node
29
31
  };
@@ -1,3 +1,5 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
1
3
  /*** Libraries ***/
2
4
  import React, { useRef, useCallback, useEffect } from 'react';
3
5
  import { useEffectCallOnlyAfterState } from '@zohodesk/hooks';
@@ -36,7 +38,8 @@ export default function Lookup(props) {
36
38
  ariaLabelledby,
37
39
  ariaDescribedby,
38
40
  ariaLabel,
39
- ariaModal = isActive ? true : undefined
41
+ ariaModal = isActive ? true : undefined,
42
+ ...a11yAttributes
40
43
  } = a11y;
41
44
  const {
42
45
  focusScopeProps = {}
@@ -64,7 +67,7 @@ export default function Lookup(props) {
64
67
  document.removeEventListener('keydown', handleKeyDown);
65
68
  };
66
69
  }, []);
67
- const content = /*#__PURE__*/React.createElement("div", {
70
+ const content = /*#__PURE__*/React.createElement("div", _extends({
68
71
  ref: createRef,
69
72
  tabIndex: "-1",
70
73
  "data-a11y-need-focus-style": "false",
@@ -77,7 +80,7 @@ export default function Lookup(props) {
77
80
  className: `${style.box} ${style[`${size}Size`]}`,
78
81
  "data-id": dataId,
79
82
  "data-test-id": dataId
80
- }, /*#__PURE__*/React.createElement(Container, {
83
+ }, a11yAttributes), /*#__PURE__*/React.createElement(Container, {
81
84
  "data-drag-container": "true",
82
85
  isCover: false,
83
86
  className: isMinHeight ? `${style.wrapper}` : `${style.coverwrap}`
@@ -39,6 +39,8 @@ var _FocusScope = _interopRequireDefault(require("@zohodesk/a11y/es/FocusScope/F
39
39
 
40
40
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
41
41
 
42
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
43
+
42
44
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
43
45
 
44
46
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -253,7 +255,8 @@ var Drawer = /*#__PURE__*/function (_React$Component4) {
253
255
  onBodyClick = _this$props4.onBodyClick,
254
256
  onClose = _this$props4.onClose,
255
257
  needFocusScope = _this$props4.needFocusScope,
256
- customProps = _this$props4.customProps;
258
+ customProps = _this$props4.customProps,
259
+ a11y = _this$props4.a11y;
257
260
  var _customProps$focusSco = customProps.focusScopeProps,
258
261
  focusScopeProps = _customProps$focusSco === void 0 ? {} : _customProps$focusSco;
259
262
  var _focusScopeProps$need = focusScopeProps.needAutoFocus,
@@ -280,12 +283,12 @@ var Drawer = /*#__PURE__*/function (_React$Component4) {
280
283
  return child;
281
284
  });
282
285
 
283
- var content = /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
286
+ var content = /*#__PURE__*/_react["default"].createElement(_Layout.Box, _extends({
284
287
  className: "".concat(_DrawerModule["default"].container, " ").concat(_DrawerModule["default"].columns, " ").concat(_DrawerModule["default"].drawerModal, " ").concat(uptoTablet ? _DrawerModule["default"].mbleSize : _DrawerModule["default"][size]),
285
288
  "data-a11y-need-focus-style": "false",
286
289
  tabindex: -1,
287
290
  eleRef: this.createRef
288
- }, /*#__PURE__*/_react["default"].createElement(_Card.Card, {
291
+ }, a11y), /*#__PURE__*/_react["default"].createElement(_Card.Card, {
289
292
  onClick: function onClick(e) {
290
293
  e && e.stopPropagation && e.stopPropagation();
291
294
  onBodyClick(e);
@@ -26,6 +26,7 @@ var Drawer_defaultProps = {
26
26
  needAutoZindex: true,
27
27
  onBodyClick: function onBodyClick() {},
28
28
  needFocusScope: false,
29
- customProps: {}
29
+ customProps: {},
30
+ a11y: {}
30
31
  };
31
32
  exports.Drawer_defaultProps = Drawer_defaultProps;
@@ -61,6 +61,7 @@ var Drawer_propTypes = {
61
61
  subDrawerSize: _propTypes["default"].oneOf(['xsmall', 'small', 'medium']),
62
62
  needFocusScope: _propTypes["default"].bool,
63
63
  customProps: _propTypes["default"].object,
64
- innerPortalName: _propTypes["default"].string
64
+ innerPortalName: _propTypes["default"].string,
65
+ a11y: _propTypes["default"].object
65
66
  };
66
67
  exports.Drawer_propTypes = Drawer_propTypes;
@@ -37,9 +37,10 @@ function useDragger(_ref) {
37
37
  });
38
38
  var draggable = (0, _react.useRef)(false);
39
39
  (0, _react.useEffect)(function () {
40
- parentEle.current = ChildRef.current.closest('[data-drag-parent=true]') || (0, _Config.getDotLibraryConfig)('draggerBoundary') || document.body;
41
- }, []); //did Mount
42
- //calculateDragPosition --> To sperate Dom action
40
+ if (isActive) {
41
+ parentEle.current = ChildRef.current.closest('[data-drag-parent=true]') || (0, _Config.getDotLibraryConfig)('draggerBoundary') || document.body;
42
+ }
43
+ }, [isActive]); //calculateDragPosition --> To sperate Dom action
43
44
 
44
45
  var calculateDragPosition = (0, _react.useCallback)(function (x, y) {
45
46
  if (parentEle.current && draggableEle.current) {
@@ -73,8 +73,8 @@ var IconButton = /*#__PURE__*/function (_React$Component) {
73
73
  key: "handleToggle",
74
74
  value: function handleToggle(e) {
75
75
  if (e.key === ' ' || e.key === 'Enter' || e.key === 'Spacebar') {
76
- e.preventDefault();
77
- this.triggerClick(e);
76
+ e.preventDefault(); // this.triggerClick(e);
77
+
78
78
  this.triggerMouseDown(e);
79
79
  }
80
80
  }
@@ -23,6 +23,7 @@
23
23
  font-family: var(--zd_semibold);
24
24
  /* css:theme-validation:ignore */
25
25
  color: var(--titleColor);
26
+ word-wrap: break-word;
26
27
  }
27
28
  .small .title {
28
29
  font-size: var(--zd_font_size16) ;
@@ -52,6 +53,9 @@
52
53
  .linkDescWrapper {
53
54
  margin-top: var(--zd_size20) ;
54
55
  }
56
+ .desc{
57
+ word-wrap: break-word;
58
+ }
55
59
  [dir=ltr] .linkDesc, [dir=ltr] .desc {
56
60
  margin-right: var(--zd_size4) ;
57
61
  }
@@ -508,7 +508,8 @@ var StatusDropdown = /*#__PURE__*/function (_React$Component) {
508
508
  needMultiLineText: needMultiLineText,
509
509
  a11y: {
510
510
  role: isSearch ? 'option' : 'menuitem',
511
- ariaSelected: value === item[keyName]
511
+ ariaSelected: value === item[keyName],
512
+ 'data-a11y-list-active': selectedIndex === i
512
513
  }
513
514
  }));
514
515
  })) : isDataLoaded ? /*#__PURE__*/_react["default"].createElement(_CommonEmptyState["default"], {
@@ -112,7 +112,9 @@ var StatusListItem = /*#__PURE__*/function (_React$Component) {
112
112
  isDisabled = _this$props4.isDisabled,
113
113
  bulletColor = _this$props4.bulletColor,
114
114
  a11y = _this$props4.a11y,
115
- needMultiLineText = _this$props4.needMultiLineText;
115
+ needMultiLineText = _this$props4.needMultiLineText,
116
+ customClass = _this$props4.customClass,
117
+ children = _this$props4.children;
116
118
  var options = {};
117
119
  var role = a11y.role,
118
120
  ariaSelected = a11y.ariaSelected,
@@ -130,7 +132,7 @@ var StatusListItem = /*#__PURE__*/function (_React$Component) {
130
132
  isCover: false,
131
133
  align: "baseline",
132
134
  alignBox: "row",
133
- className: "".concat(_StatusListItemModule["default"].list, " ").concat(_StatusListItemModule["default"][size], " ").concat(_StatusListItemModule["default"][palette], " ").concat(active ? _StatusListItemModule["default"].active : highlight && !isDisabled ? _StatusListItemModule["default"].hover : '', " ").concat(autoHover && !isDisabled ? _StatusListItemModule["default"].effect : '', " ").concat(needTick ? _StatusListItemModule["default"].withTick : '', " ").concat(isDisabled ? (0, _CssProvider["default"])('isDisable') : '', " ").concat(needBorder ? _StatusListItemModule["default"].withBorder : ''),
135
+ className: "".concat(_StatusListItemModule["default"].list, " ").concat(_StatusListItemModule["default"][size], " ").concat(_StatusListItemModule["default"][palette], " ").concat(active ? _StatusListItemModule["default"].active : highlight && !isDisabled ? _StatusListItemModule["default"].hover : '', " ").concat(autoHover && !isDisabled ? _StatusListItemModule["default"].effect : '', " ").concat(needTick ? _StatusListItemModule["default"].withTick : '', " ").concat(isDisabled ? (0, _CssProvider["default"])('isDisable') : '', " ").concat(needBorder ? _StatusListItemModule["default"].withBorder : '', " ").concat(customClass),
134
136
  dataId: String(value).replace("'", '_'),
135
137
  onClick: !isDisabled && this.handleClick,
136
138
  onMouseEnter: this.handleMouseEnter,
@@ -138,14 +140,19 @@ var StatusListItem = /*#__PURE__*/function (_React$Component) {
138
140
  tagName: isLink ? 'a' : 'li',
139
141
  "data-title": isDisabled ? disableTitle : null,
140
142
  tabindex: isDisabled ? '-1' : '0'
141
- }, options), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
143
+ }, options, a11y), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
142
144
  className: "".concat(_StatusListItemModule["default"].statusType, " ").concat(_StatusListItemModule["default"][bulletColor])
143
145
  }), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
144
- "data-title": isDisabled ? null : title,
145
146
  flexible: true,
147
+ shrink: true
148
+ }, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
149
+ alignBox: "row",
150
+ align: needMultiLineText ? 'top' : 'vertical'
151
+ }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
152
+ "data-title": isDisabled ? null : title,
146
153
  shrink: true,
147
154
  className: needMultiLineText ? _StatusListItemModule["default"].multiLineValue : _StatusListItemModule["default"].value
148
- }, value), needTick && active ? /*#__PURE__*/_react["default"].createElement("div", {
155
+ }, value), /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, children && children))), needTick && active ? /*#__PURE__*/_react["default"].createElement("div", {
149
156
  className: _StatusListItemModule["default"].tickIcon,
150
157
  "aria-hidden": ariaHidden
151
158
  }, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
@@ -17,6 +17,7 @@ var defaultProps = {
17
17
  needBorder: true,
18
18
  bulletColor: 'black',
19
19
  a11y: {},
20
- needMultiLineText: false
20
+ needMultiLineText: false,
21
+ customClass: ''
21
22
  };
22
23
  exports.defaultProps = defaultProps;
@@ -35,6 +35,8 @@ var propTypes = {
35
35
  role: _propTypes["default"].string,
36
36
  ariaSelected: _propTypes["default"].bool,
37
37
  ariaHidden: _propTypes["default"].bool
38
- })
38
+ }),
39
+ customClass: _propTypes["default"].string,
40
+ children: _propTypes["default"].node
39
41
  };
40
42
  exports.propTypes = propTypes;
@@ -21,12 +21,20 @@ var _LookupModule = _interopRequireDefault(require("./Lookup.module.css"));
21
21
 
22
22
  var _FocusScope = _interopRequireDefault(require("@zohodesk/a11y/es/FocusScope/FocusScope"));
23
23
 
24
+ var _excluded = ["role", "ariaLabelledby", "ariaDescribedby", "ariaLabel", "ariaModal"];
25
+
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
27
 
26
28
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
29
 
28
30
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
31
 
32
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
33
+
34
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
35
+
36
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
37
+
30
38
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
31
39
 
32
40
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -102,13 +110,16 @@ var Lookup = /*#__PURE__*/function (_Component) {
102
110
  needFocusScope = _this$props.needFocusScope,
103
111
  customProps = _this$props.customProps,
104
112
  isMinHeight = _this$props.isMinHeight;
113
+
105
114
  var _a11y$role = a11y.role,
106
115
  role = _a11y$role === void 0 ? 'dialog' : _a11y$role,
107
116
  ariaLabelledby = a11y.ariaLabelledby,
108
117
  ariaDescribedby = a11y.ariaDescribedby,
109
118
  ariaLabel = a11y.ariaLabel,
110
119
  _a11y$ariaModal = a11y.ariaModal,
111
- ariaModal = _a11y$ariaModal === void 0 ? isActive ? true : undefined : _a11y$ariaModal;
120
+ ariaModal = _a11y$ariaModal === void 0 ? isActive ? true : undefined : _a11y$ariaModal,
121
+ a11yAttributes = _objectWithoutProperties(a11y, _excluded);
122
+
112
123
  var _customProps$focusSco = customProps.focusScopeProps,
113
124
  focusScopeProps = _customProps$focusSco === void 0 ? {} : _customProps$focusSco;
114
125
  var _focusScopeProps$need = focusScopeProps.needAutoFocus,
@@ -122,7 +133,7 @@ var Lookup = /*#__PURE__*/function (_Component) {
122
133
  _focusScopeProps$need5 = focusScopeProps.needEnterAction,
123
134
  needEnterAction = _focusScopeProps$need5 === void 0 ? true : _focusScopeProps$need5;
124
135
 
125
- var content = /*#__PURE__*/_react["default"].createElement("div", {
136
+ var content = /*#__PURE__*/_react["default"].createElement("div", _extends({
126
137
  ref: this.createRef,
127
138
  tabIndex: "-1",
128
139
  "data-a11y-need-focus-style": "false",
@@ -135,7 +146,7 @@ var Lookup = /*#__PURE__*/function (_Component) {
135
146
  className: "".concat(_LookupModule["default"].box, " ").concat(_LookupModule["default"]["".concat(size, "Size")]),
136
147
  "data-id": dataId,
137
148
  "data-test-id": dataId
138
- }, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
149
+ }, a11yAttributes), /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
139
150
  "data-drag-container": "true",
140
151
  isCover: false,
141
152
  className: isMinHeight ? "".concat(_LookupModule["default"].wrapper) : "".concat(_LookupModule["default"].coverwrap)
@@ -46,6 +46,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
46
46
 
47
47
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
48
48
 
49
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
50
+
49
51
  function Header(props) {
50
52
  var title = props.title,
51
53
  onClose = props.onClose,
@@ -166,7 +168,8 @@ function Drawer(props) {
166
168
  onBodyClick = props.onBodyClick,
167
169
  onClose = props.onClose,
168
170
  needFocusScope = props.needFocusScope,
169
- customProps = props.customProps;
171
+ customProps = props.customProps,
172
+ a11y = props.a11y;
170
173
  var _customProps$focusSco = customProps.focusScopeProps,
171
174
  focusScopeProps = _customProps$focusSco === void 0 ? {} : _customProps$focusSco;
172
175
  var _focusScopeProps$need = focusScopeProps.needAutoFocus,
@@ -193,12 +196,12 @@ function Drawer(props) {
193
196
  return child;
194
197
  });
195
198
 
196
- var content = /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
199
+ var content = /*#__PURE__*/_react["default"].createElement(_Layout.Box, _extends({
197
200
  className: "".concat(_DrawerModule["default"].container, " ").concat(_DrawerModule["default"].columns, " ").concat(_DrawerModule["default"].drawerModal, " ").concat(uptoTablet ? _DrawerModule["default"].mbleSize : _DrawerModule["default"][size]),
198
201
  "data-a11y-need-focus-style": "false",
199
202
  tabindex: -1,
200
203
  eleRef: contentRef
201
- }, /*#__PURE__*/_react["default"].createElement(_Card.Card, {
204
+ }, a11y), /*#__PURE__*/_react["default"].createElement(_Card.Card, {
202
205
  onClick: function onClick(e) {
203
206
  e && e.stopPropagation && e.stopPropagation();
204
207
  onBodyClick(e);
@@ -26,6 +26,7 @@ var Drawer_defaultProps = {
26
26
  needAutoZindex: true,
27
27
  onBodyClick: function onBodyClick() {},
28
28
  needFocusScope: false,
29
- customProps: {}
29
+ customProps: {},
30
+ a11y: {}
30
31
  };
31
32
  exports.Drawer_defaultProps = Drawer_defaultProps;
@@ -61,6 +61,7 @@ var Drawer_propTypes = {
61
61
  subDrawerSize: _propTypes["default"].oneOf(['xsmall', 'small', 'medium']),
62
62
  needFocusScope: _propTypes["default"].bool,
63
63
  customProps: _propTypes["default"].object,
64
- innerPortalName: _propTypes["default"].string
64
+ innerPortalName: _propTypes["default"].string,
65
+ a11y: _propTypes["default"].object
65
66
  };
66
67
  exports.Drawer_propTypes = Drawer_propTypes;
@@ -75,8 +75,8 @@ function IconButton(props) {
75
75
 
76
76
  function handleToggle(e) {
77
77
  if (e.key === ' ' || e.key === 'Enter' || e.key === 'Spacebar') {
78
- e.preventDefault();
79
- triggerClick(e);
78
+ e.preventDefault(); // triggerClick(e);
79
+
80
80
  triggerMouseDown(e);
81
81
  }
82
82
  }
@@ -412,7 +412,8 @@ function StatusDropdown(props) {
412
412
  needMultiLineText: needMultiLineText,
413
413
  a11y: {
414
414
  role: isSearch ? 'option' : 'menuitem',
415
- ariaSelected: value === item[keyName]
415
+ ariaSelected: value === item[keyName],
416
+ 'data-a11y-list-active': selectedIndex === i
416
417
  }
417
418
  }));
418
419
  })) : isDataLoaded ? /*#__PURE__*/_react["default"].createElement(_CommonEmptyState["default"], {