@zohodesk/dot 1.4.1 → 1.4.2

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 (65) hide show
  1. package/.cli/PropLessFiles.html +1 -1
  2. package/.cli/PropUnificationExcludeFilesArray.js +345 -0
  3. package/.cli/PropValidationExcludeFilesArray.js +8 -1
  4. package/.cli/propValidation_report.html +24 -2
  5. package/README.md +6 -0
  6. package/coverage/ExternalLink/ExternalLink.js.html +1 -1
  7. package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
  8. package/coverage/ExternalLink/index.html +1 -1
  9. package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
  10. package/coverage/ExternalLink/props/index.html +1 -1
  11. package/coverage/ExternalLink/props/propTypes.js.html +1 -1
  12. package/coverage/IconButton/IconButton.js.html +1 -1
  13. package/coverage/IconButton/IconButton.module.css.html +1 -1
  14. package/coverage/IconButton/index.html +1 -1
  15. package/coverage/IconButton/props/defaultProps.js.html +1 -1
  16. package/coverage/IconButton/props/index.html +1 -1
  17. package/coverage/IconButton/props/propTypes.js.html +1 -1
  18. package/coverage/Image/Image.js.html +1 -1
  19. package/coverage/Image/Image.module.css.html +1 -1
  20. package/coverage/Image/index.html +1 -1
  21. package/coverage/Image/props/defaultProps.js.html +1 -1
  22. package/coverage/Image/props/index.html +1 -1
  23. package/coverage/Image/props/propTypes.js.html +1 -1
  24. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
  25. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
  26. package/coverage/avatar/AvatarWithTeam/index.html +1 -1
  27. package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
  28. package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
  29. package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
  30. package/coverage/coverage-final.json +16 -16
  31. package/coverage/coverage-summary.json +16 -16
  32. package/coverage/index.html +1 -1
  33. package/es/ActionButton/ActionButton.js +10 -1
  34. package/es/ActionButton/props/propTypes.js +2 -1
  35. package/es/Drawer/Drawer.js +2 -5
  36. package/es/Link/Link.js +1 -2
  37. package/es/avatar/AvatarStatus/AvatarStatus.js +0 -1
  38. package/es/list/ListLayout/ListLayout.js +1 -1
  39. package/es/list/status/StatusDropdown/StatusDropdown.js +6 -6
  40. package/es/lookup/Lookup/Lookup.js +1 -1
  41. package/es/v1/ActionButton/ActionButton.js +7 -2
  42. package/es/v1/Drawer/Drawer.js +2 -5
  43. package/es/v1/Link/Link.js +1 -2
  44. package/es/v1/avatar/AvatarStatus/AvatarStatus.js +0 -1
  45. package/es/v1/list/ListLayout/ListLayout.js +1 -1
  46. package/es/v1/list/status/StatusDropdown/StatusDropdown.js +6 -6
  47. package/es/v1/lookup/Lookup/Lookup.js +1 -1
  48. package/lib/ActionButton/ActionButton.js +41 -32
  49. package/lib/ActionButton/props/propTypes.js +2 -1
  50. package/lib/Drawer/Drawer.js +2 -5
  51. package/lib/Link/Link.js +1 -2
  52. package/lib/avatar/AvatarStatus/AvatarStatus.js +0 -1
  53. package/lib/list/ListLayout/ListLayout.js +1 -1
  54. package/lib/list/status/StatusDropdown/StatusDropdown.js +6 -6
  55. package/lib/lookup/Lookup/Lookup.js +1 -1
  56. package/lib/v1/ActionButton/ActionButton.js +7 -2
  57. package/lib/v1/Drawer/Drawer.js +2 -5
  58. package/lib/v1/Link/Link.js +1 -2
  59. package/lib/v1/avatar/AvatarStatus/AvatarStatus.js +0 -1
  60. package/lib/v1/list/ListLayout/ListLayout.js +1 -1
  61. package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +6 -6
  62. package/lib/v1/lookup/Lookup/Lookup.js +1 -1
  63. package/package.json +9 -9
  64. package/propValidationArg.json +8 -0
  65. package/result.json +1 -1
@@ -73,10 +73,7 @@ export class Header extends React.Component {
73
73
  shrink: true
74
74
  }, /*#__PURE__*/React.createElement(Heading, {
75
75
  title: title,
76
- className: style.title,
77
- a11y: {
78
- tabindex: '0'
79
- }
76
+ className: style.title
80
77
  })) : null, getTitleChildren ? /*#__PURE__*/React.createElement(Box, null, getTitleChildren()) : null)) : null, children ? /*#__PURE__*/React.createElement(Box, null, children) : null)), onClose ? /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(IconButton, {
81
78
  onClick: onClose,
82
79
  dataId: "closeButton",
@@ -161,7 +158,7 @@ export default class Drawer extends React.Component {
161
158
  needRestoreFocus = true,
162
159
  needListNavigation = false,
163
160
  needFocusLoop = true,
164
- needEnterAction = false
161
+ needEnterAction = true
165
162
  } = focusScopeProps;
166
163
  let childrenWithProps = React.Children.map(children, child => {
167
164
  if (child.type === Header || child.type === Footer || child.type === Content) {
package/es/Link/Link.js CHANGED
@@ -92,8 +92,7 @@ export default class Link extends React.Component {
92
92
  }, others, {
93
93
  onClick: this.onCallBack.bind(this, urlOutput, href)
94
94
  }, customProps, {
95
- "aria-label": ariaLabel,
96
- tabIndex: "0"
95
+ "aria-label": ariaLabel
97
96
  }), children);
98
97
  }
99
98
 
@@ -39,7 +39,6 @@ export default class AvatarStatus extends React.Component {
39
39
  return /*#__PURE__*/React.createElement("div", _extends({
40
40
  className: `${style.container} ${className} `
41
41
  }, AvatarStatusProps, {
42
- tabIndex: "0",
43
42
  "aria-label": `${title}, ${name}, ${statusTitle}`,
44
43
  "data-selector-id": dataSelectorId
45
44
  }), /*#__PURE__*/React.createElement(Avatar, _extends({
@@ -43,7 +43,7 @@ export default class ListLayout extends Component {
43
43
  "data-id": dataId,
44
44
  "data-test-id": dataId,
45
45
  "data-title": dataTitle,
46
- tabIndex: "0",
46
+ tabIndex: onClick ? '0' : null,
47
47
  role: role,
48
48
  "data-a11y-inset-focus": true,
49
49
  "aria-label": ariaLabel,
@@ -335,8 +335,8 @@ export class StatusDropdown extends React.Component {
335
335
  dataId: dataId,
336
336
  onClick: removeClose,
337
337
  disabled: isDisabled || isReadOnly ? true : false,
338
- "aria-haspopup": true,
339
- "aria-expanded": isPopupOpen && isEditable ? true : false,
338
+ "aria-haspopup": isSearch ? 'listbox' : 'menu',
339
+ "aria-expanded": isPopupReady && isEditable ? true : false,
340
340
  tabIndex: tabIndex,
341
341
  "aria-labelledby": ariaLabelledby,
342
342
  "aria-label": ariaLabel,
@@ -395,10 +395,10 @@ export class StatusDropdown extends React.Component {
395
395
  inputRef: this.searchInputRef,
396
396
  onKeyDown: this.handleKeyDown,
397
397
  a11y: {
398
- ariaHaspopup: true,
399
- ariaExpanded: true,
398
+ ariaHaspopup: isSearch ? 'listbox' : 'menu',
399
+ ariaExpanded: isPopupReady,
400
400
  role: 'combobox',
401
- ariaActivedescendant: value,
401
+ ariaActivedescendant: isPopupReady ? value : '',
402
402
  ariaOwns: ariaTitleId
403
403
  }
404
404
  })) : null, title && options.length != 0 && /*#__PURE__*/React.createElement(Box, {
@@ -420,7 +420,7 @@ export class StatusDropdown extends React.Component {
420
420
  onScroll: this.handleScroll,
421
421
  role: isSearch ? 'listbox' : 'menu',
422
422
  "aria-labelledby": ariaTitleId,
423
- tabindex: "0"
423
+ tabindex: "-1"
424
424
  }, options.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((item, i) => /*#__PURE__*/React.createElement(React.Fragment, {
425
425
  key: i
426
426
  }, /*#__PURE__*/React.createElement(StatusListItem, {
@@ -71,7 +71,7 @@ export default class Lookup extends Component {
71
71
  needRestoreFocus = true,
72
72
  needListNavigation = false,
73
73
  needFocusLoop = true,
74
- needEnterAction = false
74
+ needEnterAction = true
75
75
  } = focusScopeProps;
76
76
  const content = /*#__PURE__*/React.createElement("div", {
77
77
  ref: this.createRef,
@@ -40,13 +40,18 @@ function ActionButton(props) {
40
40
  innerClassName,
41
41
  popupGroup,
42
42
  togglePopup,
43
- defaultPosition
43
+ defaultPosition,
44
+ openPopupOnly
44
45
  } = props;
45
46
 
46
47
  const handleTogglePopup = e => {
47
48
  togglePopup(e, defaultPosition);
48
49
  };
49
50
 
51
+ const handlePopupOpen = e => {
52
+ openPopupOnly(e, defaultPosition);
53
+ };
54
+
50
55
  return /*#__PURE__*/React.createElement(Container, {
51
56
  alignBox: "row",
52
57
  isCover: false,
@@ -94,7 +99,7 @@ function ActionButton(props) {
94
99
  "data-title": removeChildrenTooltip ? null : subText,
95
100
  className: style.subTxt
96
101
  }, subText) : null)), children ? /*#__PURE__*/React.createElement(Box, {
97
- onClick: onClick ? !onHover && handleTogglePopup : undefined,
102
+ onClick: onClick && !onHover ? handleTogglePopup : handlePopupOpen,
98
103
  onMouseEnter: onClick ? onHover && handleTogglePopup : undefined,
99
104
  onMouseLeave: onClick ? onHover && handleTogglePopup : undefined,
100
105
  className: `${btnStyle.buttonReset} ${style[arrowBoxSize + '_arrowBox']} ${style[palette + 'Arw']} ${style.arrowWrapper} ${isPopupOpen ? style.arrowActive : ''}`,
@@ -72,10 +72,7 @@ export function Header(props) {
72
72
  shrink: true
73
73
  }, /*#__PURE__*/React.createElement(Heading, {
74
74
  title: title,
75
- className: style.title,
76
- a11y: {
77
- tabindex: '0'
78
- }
75
+ className: style.title
79
76
  })) : null, getTitleChildren ? /*#__PURE__*/React.createElement(Box, null, getTitleChildren()) : null)) : null, children ? /*#__PURE__*/React.createElement(Box, null, children) : null)), onClose ? /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(IconButton, {
80
77
  onClick: onClose,
81
78
  dataId: "closeButton",
@@ -147,7 +144,7 @@ export default function Drawer(props) {
147
144
  needRestoreFocus = true,
148
145
  needListNavigation = false,
149
146
  needFocusLoop = true,
150
- needEnterAction = false
147
+ needEnterAction = true
151
148
  } = focusScopeProps;
152
149
  let childrenWithProps = React.Children.map(children, child => {
153
150
  if (child.type === Header || child.type === Footer || child.type === Content) {
@@ -84,8 +84,7 @@ export default function Link(props) {
84
84
  }, others, {
85
85
  onClick: callBack
86
86
  }, customProps, {
87
- "aria-label": ariaLabel,
88
- tabIndex: "0"
87
+ "aria-label": ariaLabel
89
88
  }), children);
90
89
  }
91
90
  Link.defaultProps = defaultProps;
@@ -34,7 +34,6 @@ export default function AvatarStatus(props) {
34
34
  return /*#__PURE__*/React.createElement("div", _extends({
35
35
  className: `${style.container} ${className} `
36
36
  }, AvatarStatusProps, {
37
- tabIndex: "0",
38
37
  "aria-label": `${title}, ${name}, ${statusTitle}`,
39
38
  "data-selector-id": dataSelectorId
40
39
  }), /*#__PURE__*/React.createElement(Avatar, _extends({
@@ -38,7 +38,7 @@ export default function ListLayout(props) {
38
38
  "data-id": dataId,
39
39
  "data-test-id": dataId,
40
40
  "data-title": dataTitle,
41
- tabIndex: "0",
41
+ tabIndex: onClick ? '0' : null,
42
42
  role: role,
43
43
  "data-a11y-inset-focus": true,
44
44
  "aria-label": ariaLabel,
@@ -247,8 +247,8 @@ function StatusDropdown(props) {
247
247
  dataId: dataId,
248
248
  onClick: removeClose,
249
249
  disabled: isDisabled || isReadOnly ? true : false,
250
- "aria-haspopup": true,
251
- "aria-expanded": isPopupOpen && isEditable ? true : false,
250
+ "aria-haspopup": isSearch ? 'listbox' : 'menu',
251
+ "aria-expanded": isPopupReady && isEditable ? true : false,
252
252
  tabIndex: tabIndex,
253
253
  "aria-labelledby": ariaLabelledby,
254
254
  "aria-label": ariaLabel,
@@ -307,10 +307,10 @@ function StatusDropdown(props) {
307
307
  inputRef: searchInputRef,
308
308
  onKeyDown: handleKeyDown,
309
309
  a11y: {
310
- ariaHaspopup: true,
311
- ariaExpanded: true,
310
+ ariaHaspopup: isSearch ? 'listbox' : 'menu',
311
+ ariaExpanded: isPopupReady,
312
312
  role: 'combobox',
313
- ariaActivedescendant: value,
313
+ ariaActivedescendant: isPopupReady ? value : '',
314
314
  ariaOwns: ariaTitleId
315
315
  }
316
316
  })) : null, title && optionsList.length != 0 && /*#__PURE__*/React.createElement(Box, {
@@ -332,7 +332,7 @@ function StatusDropdown(props) {
332
332
  onScroll: handleScroll,
333
333
  role: isSearch ? 'listbox' : 'menu',
334
334
  "aria-labelledby": ariaTitleId,
335
- tabindex: "0"
335
+ tabindex: "-1"
336
336
  }, optionsList.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, optionsList.map((item, i) => /*#__PURE__*/React.createElement(React.Fragment, {
337
337
  key: i
338
338
  }, /*#__PURE__*/React.createElement(StatusListItem, {
@@ -45,7 +45,7 @@ export default function Lookup(props) {
45
45
  needRestoreFocus = true,
46
46
  needListNavigation = false,
47
47
  needFocusLoop = true,
48
- needEnterAction = false
48
+ needEnterAction = true
49
49
  } = focusScopeProps;
50
50
  const createRef = useRef(null);
51
51
  const handleKeyDown = useCallback(e => {
@@ -63,48 +63,57 @@ var ActionButton = /*#__PURE__*/function (_React$Component) {
63
63
 
64
64
  _this = _super.call(this, props);
65
65
  _this.handleTogglePopup = _this.handleTogglePopup.bind(_assertThisInitialized(_this));
66
+ _this.handlePopupOpen = _this.handlePopupOpen.bind(_assertThisInitialized(_this));
66
67
  return _this;
67
68
  }
68
69
 
69
70
  _createClass(ActionButton, [{
70
- key: "handleTogglePopup",
71
- value: function handleTogglePopup(e) {
71
+ key: "handlePopupOpen",
72
+ value: function handlePopupOpen(e) {
72
73
  var _this$props = this.props,
73
- togglePopup = _this$props.togglePopup,
74
+ openPopupOnly = _this$props.openPopupOnly,
74
75
  defaultPosition = _this$props.defaultPosition;
76
+ openPopupOnly(e, defaultPosition);
77
+ }
78
+ }, {
79
+ key: "handleTogglePopup",
80
+ value: function handleTogglePopup(e) {
81
+ var _this$props2 = this.props,
82
+ togglePopup = _this$props2.togglePopup,
83
+ defaultPosition = _this$props2.defaultPosition;
75
84
  togglePopup(e, defaultPosition);
76
85
  }
77
86
  }, {
78
87
  key: "render",
79
88
  value: function render() {
80
- var _this$props2 = this.props,
81
- isLoading = _this$props2.isLoading,
82
- onClick = _this$props2.onClick,
83
- size = _this$props2.size,
84
- dataId = _this$props2.dataId,
85
- dataSelectorId = _this$props2.dataSelectorId,
86
- isArrow = _this$props2.isArrow,
87
- text = _this$props2.text,
88
- subText = _this$props2.subText,
89
- arrowBoxSize = _this$props2.arrowBoxSize,
90
- palette = _this$props2.palette,
91
- onHover = _this$props2.onHover,
92
- position = _this$props2.position,
93
- className = _this$props2.className,
94
- iconName = _this$props2.iconName,
95
- iconSize = _this$props2.iconSize,
96
- dataTitle = _this$props2.dataTitle,
97
- isDisabled = _this$props2.isDisabled,
98
- isPopupOpen = _this$props2.isPopupOpen,
99
- removeClose = _this$props2.removeClose,
100
- children = _this$props2.children,
101
- dropBoxClass = _this$props2.dropBoxClass,
102
- isBoxPaddingNeed = _this$props2.isBoxPaddingNeed,
103
- getContainerRef = _this$props2.getContainerRef,
104
- getTargetRef = _this$props2.getTargetRef,
105
- removeChildrenTooltip = _this$props2.removeChildrenTooltip,
106
- innerClassName = _this$props2.innerClassName,
107
- popupGroup = _this$props2.popupGroup;
89
+ var _this$props3 = this.props,
90
+ isLoading = _this$props3.isLoading,
91
+ onClick = _this$props3.onClick,
92
+ size = _this$props3.size,
93
+ dataId = _this$props3.dataId,
94
+ dataSelectorId = _this$props3.dataSelectorId,
95
+ isArrow = _this$props3.isArrow,
96
+ text = _this$props3.text,
97
+ subText = _this$props3.subText,
98
+ arrowBoxSize = _this$props3.arrowBoxSize,
99
+ palette = _this$props3.palette,
100
+ onHover = _this$props3.onHover,
101
+ position = _this$props3.position,
102
+ className = _this$props3.className,
103
+ iconName = _this$props3.iconName,
104
+ iconSize = _this$props3.iconSize,
105
+ dataTitle = _this$props3.dataTitle,
106
+ isDisabled = _this$props3.isDisabled,
107
+ isPopupOpen = _this$props3.isPopupOpen,
108
+ removeClose = _this$props3.removeClose,
109
+ children = _this$props3.children,
110
+ dropBoxClass = _this$props3.dropBoxClass,
111
+ isBoxPaddingNeed = _this$props3.isBoxPaddingNeed,
112
+ getContainerRef = _this$props3.getContainerRef,
113
+ getTargetRef = _this$props3.getTargetRef,
114
+ removeChildrenTooltip = _this$props3.removeChildrenTooltip,
115
+ innerClassName = _this$props3.innerClassName,
116
+ popupGroup = _this$props3.popupGroup;
108
117
  return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
109
118
  alignBox: "row",
110
119
  isCover: false,
@@ -152,7 +161,7 @@ var ActionButton = /*#__PURE__*/function (_React$Component) {
152
161
  "data-title": removeChildrenTooltip ? null : subText,
153
162
  className: _ActionButtonModule["default"].subTxt
154
163
  }, subText) : null)), children ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
155
- onClick: onClick ? !onHover && this.handleTogglePopup : undefined,
164
+ onClick: onClick && !onHover ? this.handleTogglePopup : this.handlePopupOpen,
156
165
  onMouseEnter: onClick ? onHover && this.handleTogglePopup : undefined,
157
166
  onMouseLeave: onClick ? onHover && this.handleTogglePopup : undefined,
158
167
  className: "".concat(_semanticButtonModule["default"].buttonReset, " ").concat(_ActionButtonModule["default"][arrowBoxSize + '_arrowBox'], " ").concat(_ActionButtonModule["default"][palette + 'Arw'], " ").concat(_ActionButtonModule["default"].arrowWrapper, " ").concat(isPopupOpen ? _ActionButtonModule["default"].arrowActive : ''),
@@ -38,6 +38,7 @@ var propTypes = {
38
38
  removeChildrenTooltip: _propTypes["default"].bool,
39
39
  innerClassName: _propTypes["default"].string,
40
40
  popupGroup: _propTypes["default"].string,
41
- togglePopup: _propTypes["default"].func
41
+ togglePopup: _propTypes["default"].func,
42
+ openPopupOnly: _propTypes["default"].func
42
43
  };
43
44
  exports.propTypes = propTypes;
@@ -130,10 +130,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
130
130
  shrink: true
131
131
  }, /*#__PURE__*/_react["default"].createElement(_Heading["default"], {
132
132
  title: title,
133
- className: _DrawerModule["default"].title,
134
- a11y: {
135
- tabindex: '0'
136
- }
133
+ className: _DrawerModule["default"].title
137
134
  })) : null, getTitleChildren ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, getTitleChildren()) : null)) : null, children ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, children) : null)), onClose ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
138
135
  onClick: onClose,
139
136
  dataId: "closeButton",
@@ -268,7 +265,7 @@ var Drawer = /*#__PURE__*/function (_React$Component4) {
268
265
  _focusScopeProps$need4 = focusScopeProps.needFocusLoop,
269
266
  needFocusLoop = _focusScopeProps$need4 === void 0 ? true : _focusScopeProps$need4,
270
267
  _focusScopeProps$need5 = focusScopeProps.needEnterAction,
271
- needEnterAction = _focusScopeProps$need5 === void 0 ? false : _focusScopeProps$need5;
268
+ needEnterAction = _focusScopeProps$need5 === void 0 ? true : _focusScopeProps$need5;
272
269
 
273
270
  var childrenWithProps = _react["default"].Children.map(children, function (child) {
274
271
  if (child.type === Header || child.type === Footer || child.type === Content) {
package/lib/Link/Link.js CHANGED
@@ -141,8 +141,7 @@ var Link = /*#__PURE__*/function (_React$Component) {
141
141
  }, others, {
142
142
  onClick: this.onCallBack.bind(this, urlOutput, href)
143
143
  }, customProps, {
144
- "aria-label": ariaLabel,
145
- tabIndex: "0"
144
+ "aria-label": ariaLabel
146
145
  }), children);
147
146
  }
148
147
  }]);
@@ -82,7 +82,6 @@ var AvatarStatus = /*#__PURE__*/function (_React$Component) {
82
82
  return /*#__PURE__*/_react["default"].createElement("div", _extends({
83
83
  className: "".concat(_AvatarStatusModule["default"].container, " ").concat(className, " ")
84
84
  }, AvatarStatusProps, {
85
- tabIndex: "0",
86
85
  "aria-label": "".concat(title, ", ").concat(name, ", ").concat(statusTitle),
87
86
  "data-selector-id": dataSelectorId
88
87
  }), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], _extends({
@@ -89,7 +89,7 @@ var ListLayout = /*#__PURE__*/function (_Component) {
89
89
  "data-id": dataId,
90
90
  "data-test-id": dataId,
91
91
  "data-title": dataTitle,
92
- tabIndex: "0",
92
+ tabIndex: onClick ? '0' : null,
93
93
  role: role,
94
94
  "data-a11y-inset-focus": true,
95
95
  "aria-label": ariaLabel,
@@ -404,8 +404,8 @@ var StatusDropdown = /*#__PURE__*/function (_React$Component) {
404
404
  dataId: dataId,
405
405
  onClick: removeClose,
406
406
  disabled: isDisabled || isReadOnly ? true : false,
407
- "aria-haspopup": true,
408
- "aria-expanded": isPopupOpen && isEditable ? true : false,
407
+ "aria-haspopup": isSearch ? 'listbox' : 'menu',
408
+ "aria-expanded": isPopupReady && isEditable ? true : false,
409
409
  tabIndex: tabIndex,
410
410
  "aria-labelledby": ariaLabelledby,
411
411
  "aria-label": ariaLabel,
@@ -462,10 +462,10 @@ var StatusDropdown = /*#__PURE__*/function (_React$Component) {
462
462
  inputRef: _this3.searchInputRef,
463
463
  onKeyDown: _this3.handleKeyDown,
464
464
  a11y: {
465
- ariaHaspopup: true,
466
- ariaExpanded: true,
465
+ ariaHaspopup: isSearch ? 'listbox' : 'menu',
466
+ ariaExpanded: isPopupReady,
467
467
  role: 'combobox',
468
- ariaActivedescendant: value,
468
+ ariaActivedescendant: isPopupReady ? value : '',
469
469
  ariaOwns: ariaTitleId
470
470
  }
471
471
  })) : null, title && options.length != 0 && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
@@ -487,7 +487,7 @@ var StatusDropdown = /*#__PURE__*/function (_React$Component) {
487
487
  onScroll: _this3.handleScroll,
488
488
  role: isSearch ? 'listbox' : 'menu',
489
489
  "aria-labelledby": ariaTitleId,
490
- tabindex: "0"
490
+ tabindex: "-1"
491
491
  }, options.length != 0 && isDataLoaded ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, options.map(function (item, i) {
492
492
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
493
493
  key: i
@@ -119,7 +119,7 @@ var Lookup = /*#__PURE__*/function (_Component) {
119
119
  _focusScopeProps$need4 = focusScopeProps.needFocusLoop,
120
120
  needFocusLoop = _focusScopeProps$need4 === void 0 ? true : _focusScopeProps$need4,
121
121
  _focusScopeProps$need5 = focusScopeProps.needEnterAction,
122
- needEnterAction = _focusScopeProps$need5 === void 0 ? false : _focusScopeProps$need5;
122
+ needEnterAction = _focusScopeProps$need5 === void 0 ? true : _focusScopeProps$need5;
123
123
 
124
124
  var content = /*#__PURE__*/_react["default"].createElement("div", {
125
125
  ref: this.createRef,
@@ -58,12 +58,17 @@ function ActionButton(props) {
58
58
  innerClassName = props.innerClassName,
59
59
  popupGroup = props.popupGroup,
60
60
  togglePopup = props.togglePopup,
61
- defaultPosition = props.defaultPosition;
61
+ defaultPosition = props.defaultPosition,
62
+ openPopupOnly = props.openPopupOnly;
62
63
 
63
64
  var handleTogglePopup = function handleTogglePopup(e) {
64
65
  togglePopup(e, defaultPosition);
65
66
  };
66
67
 
68
+ var handlePopupOpen = function handlePopupOpen(e) {
69
+ openPopupOnly(e, defaultPosition);
70
+ };
71
+
67
72
  return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
68
73
  alignBox: "row",
69
74
  isCover: false,
@@ -111,7 +116,7 @@ function ActionButton(props) {
111
116
  "data-title": removeChildrenTooltip ? null : subText,
112
117
  className: _ActionButtonModule["default"].subTxt
113
118
  }, subText) : null)), children ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
114
- onClick: onClick ? !onHover && handleTogglePopup : undefined,
119
+ onClick: onClick && !onHover ? handleTogglePopup : handlePopupOpen,
115
120
  onMouseEnter: onClick ? onHover && handleTogglePopup : undefined,
116
121
  onMouseLeave: onClick ? onHover && handleTogglePopup : undefined,
117
122
  className: "".concat(_semanticButtonModule["default"].buttonReset, " ").concat(_ActionButtonModule["default"][arrowBoxSize + '_arrowBox'], " ").concat(_ActionButtonModule["default"][palette + 'Arw'], " ").concat(_ActionButtonModule["default"].arrowWrapper, " ").concat(isPopupOpen ? _ActionButtonModule["default"].arrowActive : ''),
@@ -103,10 +103,7 @@ function Header(props) {
103
103
  shrink: true
104
104
  }, /*#__PURE__*/_react["default"].createElement(_Heading["default"], {
105
105
  title: title,
106
- className: _DrawerModule["default"].title,
107
- a11y: {
108
- tabindex: '0'
109
- }
106
+ className: _DrawerModule["default"].title
110
107
  })) : null, getTitleChildren ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, getTitleChildren()) : null)) : null, children ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, children) : null)), onClose ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
111
108
  onClick: onClose,
112
109
  dataId: "closeButton",
@@ -181,7 +178,7 @@ function Drawer(props) {
181
178
  _focusScopeProps$need4 = focusScopeProps.needFocusLoop,
182
179
  needFocusLoop = _focusScopeProps$need4 === void 0 ? true : _focusScopeProps$need4,
183
180
  _focusScopeProps$need5 = focusScopeProps.needEnterAction,
184
- needEnterAction = _focusScopeProps$need5 === void 0 ? false : _focusScopeProps$need5;
181
+ needEnterAction = _focusScopeProps$need5 === void 0 ? true : _focusScopeProps$need5;
185
182
 
186
183
  var childrenWithProps = _react["default"].Children.map(children, function (child) {
187
184
  if (child.type === Header || child.type === Footer || child.type === Content) {
@@ -104,8 +104,7 @@ function Link(props) {
104
104
  }, others, {
105
105
  onClick: callBack
106
106
  }, customProps, {
107
- "aria-label": ariaLabel,
108
- tabIndex: "0"
107
+ "aria-label": ariaLabel
109
108
  }), children);
110
109
  }
111
110
 
@@ -46,7 +46,6 @@ function AvatarStatus(props) {
46
46
  return /*#__PURE__*/_react["default"].createElement("div", _extends({
47
47
  className: "".concat(_AvatarStatusModule["default"].container, " ").concat(className, " ")
48
48
  }, AvatarStatusProps, {
49
- tabIndex: "0",
50
49
  "aria-label": "".concat(title, ", ").concat(name, ", ").concat(statusTitle),
51
50
  "data-selector-id": dataSelectorId
52
51
  }), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], _extends({
@@ -50,7 +50,7 @@ function ListLayout(props) {
50
50
  "data-id": dataId,
51
51
  "data-test-id": dataId,
52
52
  "data-title": dataTitle,
53
- tabIndex: "0",
53
+ tabIndex: onClick ? '0' : null,
54
54
  role: role,
55
55
  "data-a11y-inset-focus": true,
56
56
  "aria-label": ariaLabel,
@@ -306,8 +306,8 @@ function StatusDropdown(props) {
306
306
  dataId: dataId,
307
307
  onClick: removeClose,
308
308
  disabled: isDisabled || isReadOnly ? true : false,
309
- "aria-haspopup": true,
310
- "aria-expanded": isPopupOpen && isEditable ? true : false,
309
+ "aria-haspopup": isSearch ? 'listbox' : 'menu',
310
+ "aria-expanded": isPopupReady && isEditable ? true : false,
311
311
  tabIndex: tabIndex,
312
312
  "aria-labelledby": ariaLabelledby,
313
313
  "aria-label": ariaLabel,
@@ -364,10 +364,10 @@ function StatusDropdown(props) {
364
364
  inputRef: searchInputRef,
365
365
  onKeyDown: handleKeyDown,
366
366
  a11y: {
367
- ariaHaspopup: true,
368
- ariaExpanded: true,
367
+ ariaHaspopup: isSearch ? 'listbox' : 'menu',
368
+ ariaExpanded: isPopupReady,
369
369
  role: 'combobox',
370
- ariaActivedescendant: value,
370
+ ariaActivedescendant: isPopupReady ? value : '',
371
371
  ariaOwns: ariaTitleId
372
372
  }
373
373
  })) : null, title && optionsList.length != 0 && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
@@ -389,7 +389,7 @@ function StatusDropdown(props) {
389
389
  onScroll: handleScroll,
390
390
  role: isSearch ? 'listbox' : 'menu',
391
391
  "aria-labelledby": ariaTitleId,
392
- tabindex: "0"
392
+ tabindex: "-1"
393
393
  }, optionsList.length != 0 && isDataLoaded ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, optionsList.map(function (item, i) {
394
394
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
395
395
  key: i
@@ -69,7 +69,7 @@ function Lookup(props) {
69
69
  _focusScopeProps$need4 = focusScopeProps.needFocusLoop,
70
70
  needFocusLoop = _focusScopeProps$need4 === void 0 ? true : _focusScopeProps$need4,
71
71
  _focusScopeProps$need5 = focusScopeProps.needEnterAction,
72
- needEnterAction = _focusScopeProps$need5 === void 0 ? false : _focusScopeProps$need5;
72
+ needEnterAction = _focusScopeProps$need5 === void 0 ? true : _focusScopeProps$need5;
73
73
  var createRef = (0, _react.useRef)(null);
74
74
  var handleKeyDown = (0, _react.useCallback)(function (e) {
75
75
  onKeyDown && onKeyDown(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/dot",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "main": "lib/index",
5
5
  "module": "es/index.js",
6
6
  "private": false,
@@ -46,17 +46,17 @@
46
46
  "variable:check": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/variableErrorCheck.js ./src ./node_modules/@zohodesk-private/css-variable-migrator/es/config/cssVariableReplacementOptions.json",
47
47
  "theme:validate": "node ./node_modules/@zohodesk-private/node-plugins/es/appearance_theme_validation validate ./src ./.cli",
48
48
  "theme:addignore": "node ./node_modules/@zohodesk-private/node-plugins/es/appearance_theme_validation addignore ./src ./.cli",
49
- "review:props": "node ./node_modules/@zohodesk-private/react-prop-validator/es/propValidation.js ./src/ ./.cli ./.cli "
49
+ "review:props": "node ./node_modules/@zohodesk-private/react-prop-validator/es/propValidation.js propValidationArg.json"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@zohodesk-private/css-variable-migrator": "^1.0.7",
53
- "@zohodesk-private/node-plugins": "1.1.0",
53
+ "@zohodesk-private/node-plugins": "1.1.1",
54
54
  "@zohodesk-private/color-variable-preprocessor": "1.1.0",
55
- "@zohodesk-private/react-prop-validator": "1.1.1",
56
- "@zohodesk/components": "1.2.18",
57
- "@zohodesk/a11y": "2.1.0",
55
+ "@zohodesk-private/react-prop-validator": "1.2.0",
56
+ "@zohodesk/components": "1.2.20",
57
+ "@zohodesk/a11y": "2.1.1",
58
58
  "@zohodesk/icons": "1.0.19",
59
- "@zohodesk/svg": "1.1.6",
59
+ "@zohodesk/svg": "1.1.8",
60
60
  "@zohodesk/variables": "1.0.0",
61
61
  "@zohodesk/virtualizer": "1.0.3",
62
62
  "react-sortable-hoc": "^0.8.3",
@@ -71,9 +71,9 @@
71
71
  "peerDependencies": {
72
72
  "velocity-react": "1.4.3",
73
73
  "@zohodesk/variables": "1.0.0",
74
- "@zohodesk/components": "1.2.18",
74
+ "@zohodesk/components": "1.2.19",
75
75
  "@zohodesk/icons": "1.0.19",
76
- "@zohodesk/svg": "1.1.6",
76
+ "@zohodesk/svg": "1.1.8",
77
77
  "@zohodesk/virtualizer": "1.0.3",
78
78
  "react-sortable-hoc": "^0.8.3",
79
79
  "@zohodesk/hooks": "2.0.2",
@@ -0,0 +1,8 @@
1
+ {
2
+ "inputDir": "./src",
3
+ "outputDir": "./.cli",
4
+ "excludeDir":"./.cli",
5
+ "propUnifiExcludeDir":"./.cli",
6
+ "propUnifiReport":"propUnifi",
7
+ "strictMode":""
8
+ }