@zohodesk/dot 1.4.14 → 1.4.15

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 (140) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +8 -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 +1 -1
  10. package/coverage/IconButton/IconButton.module.css.html +1 -1
  11. package/coverage/IconButton/index.html +1 -1
  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 +16 -16
  28. package/coverage/coverage-summary.json +16 -16
  29. package/coverage/index.html +1 -1
  30. package/es/Drawer/Drawer.js +5 -4
  31. package/es/ExternalLink/ExternalLink.js +5 -4
  32. package/es/FlipCard/FlipCard.js +12 -14
  33. package/es/IconButton/IconButton.js +5 -4
  34. package/es/Link/Link.js +10 -8
  35. package/es/Message/Message.js +5 -4
  36. package/es/ToastMessage/ToastMessage.js +4 -2
  37. package/es/actions/AutoClose.js +1 -2
  38. package/es/alert/AlertLookup/AlertLookup.js +12 -14
  39. package/es/avatar/AvatarClose/AvatarClose.js +7 -7
  40. package/es/avatar/AvatarCollision/AvatarCollision.js +7 -7
  41. package/es/avatar/AvatarIcon/AvatarIcon.js +5 -4
  42. package/es/avatar/AvatarStatus/AvatarStatus.js +8 -7
  43. package/es/avatar/AvatarThread/AvatarThread.js +7 -7
  44. package/es/avatar/AvatarUser/AvatarUser.js +9 -10
  45. package/es/avatar/AvatarWithTeam/AvatarWithTeam.js +14 -17
  46. package/es/dropdown/ToggleDropDown/ToggleDropDown.js +24 -28
  47. package/es/form/fields/CheckBoxField/CheckBoxField.js +13 -15
  48. package/es/form/fields/CurrencyField/CurrencyField.js +12 -14
  49. package/es/form/fields/DateField/DateField.js +14 -14
  50. package/es/form/fields/MultiSelectField/MultiSelectField.js +12 -13
  51. package/es/form/fields/PhoneField/PhoneField.js +7 -7
  52. package/es/form/fields/RadioField/RadioField.js +15 -18
  53. package/es/form/fields/SelectField/SelectField.js +14 -14
  54. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +10 -13
  55. package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +11 -11
  56. package/es/form/fields/TextBoxField/TextBoxField.js +14 -14
  57. package/es/form/fields/TextEditorField/TextEditorField.js +10 -11
  58. package/es/form/fields/TextEditorWrapper/TextEditorWrapper.js +10 -11
  59. package/es/form/fields/TextareaField/TextareaField.js +13 -14
  60. package/es/layout/SubtabLayout/SubtabLayout.js +6 -4
  61. package/es/list/ListLayout/ListLayout.js +5 -4
  62. package/es/list/SecondaryText/AccountName.js +12 -12
  63. package/es/list/SecondaryText/ContactName.js +9 -8
  64. package/es/list/SecondaryText/Email.js +8 -8
  65. package/es/list/SecondaryText/PhoneNumber.js +8 -8
  66. package/es/list/SecondaryText/SecondaryText.js +5 -4
  67. package/es/list/SecondaryText/TicketId.js +7 -7
  68. package/es/list/Subject/Subject.js +7 -7
  69. package/es/list/Thread/Thread.js +1 -2
  70. package/es/list/status/StatusDropdown/StatusDropdown.js +50 -179
  71. package/es/list/status/StatusDropdown/StatusDropdown.module.css +1 -10
  72. package/es/list/status/StatusDropdown/props/defaultProps.js +2 -1
  73. package/es/list/status/StatusDropdown/props/propTypes.js +1 -1
  74. package/es/list/status/StatusListItem/StatusListItem.js +10 -6
  75. package/es/lookup/Lookup/Lookup.js +5 -4
  76. package/es/lookup/header/Search/Search.js +3 -5
  77. package/es/v1/Drawer/Drawer.js +5 -4
  78. package/es/v1/ExternalLink/ExternalLink.js +5 -4
  79. package/es/v1/FlipCard/FlipCard.js +12 -14
  80. package/es/v1/GlobalNotification/GlobalNotification.js +7 -6
  81. package/es/v1/IconButton/IconButton.js +5 -4
  82. package/es/v1/Link/Link.js +10 -8
  83. package/es/v1/Message/Message.js +5 -4
  84. package/es/v1/ToastMessage/ToastMessage.js +4 -2
  85. package/es/v1/actions/AutoClose.js +1 -2
  86. package/es/v1/alert/AlertLookup/AlertLookup.js +15 -15
  87. package/es/v1/avatar/AvatarClose/AvatarClose.js +7 -7
  88. package/es/v1/avatar/AvatarCollision/AvatarCollision.js +7 -7
  89. package/es/v1/avatar/AvatarIcon/AvatarIcon.js +5 -4
  90. package/es/v1/avatar/AvatarStatus/AvatarStatus.js +8 -7
  91. package/es/v1/avatar/AvatarThread/AvatarThread.js +7 -7
  92. package/es/v1/avatar/AvatarUser/AvatarUser.js +9 -10
  93. package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +14 -17
  94. package/es/v1/dropdown/ToggleDropDown/ToggleDropDown.js +24 -28
  95. package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +13 -15
  96. package/es/v1/form/fields/CurrencyField/CurrencyField.js +12 -14
  97. package/es/v1/form/fields/DateField/DateField.js +14 -14
  98. package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +12 -13
  99. package/es/v1/form/fields/PhoneField/PhoneField.js +7 -7
  100. package/es/v1/form/fields/RadioField/RadioField.js +16 -18
  101. package/es/v1/form/fields/SelectField/SelectField.js +14 -14
  102. package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +10 -13
  103. package/es/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +11 -11
  104. package/es/v1/form/fields/TextBoxField/TextBoxField.js +14 -14
  105. package/es/v1/form/fields/TextEditorField/TextEditorField.js +10 -11
  106. package/es/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +10 -11
  107. package/es/v1/form/fields/TextareaField/TextareaField.js +13 -14
  108. package/es/v1/layout/SubtabLayout/SubtabLayout.js +6 -4
  109. package/es/v1/list/ListLayout/ListLayout.js +5 -4
  110. package/es/v1/list/SecondaryText/AccountName.js +12 -12
  111. package/es/v1/list/SecondaryText/ContactName.js +9 -8
  112. package/es/v1/list/SecondaryText/Email.js +8 -8
  113. package/es/v1/list/SecondaryText/PhoneNumber.js +8 -8
  114. package/es/v1/list/SecondaryText/SecondaryText.js +5 -4
  115. package/es/v1/list/SecondaryText/TicketId.js +7 -7
  116. package/es/v1/list/Subject/Subject.js +7 -7
  117. package/es/v1/list/Thread/Thread.js +1 -2
  118. package/es/v1/list/status/StatusDropdown/StatusDropdown.js +49 -134
  119. package/es/v1/list/status/StatusDropdown/props/defaultProps.js +2 -1
  120. package/es/v1/list/status/StatusDropdown/props/propTypes.js +1 -1
  121. package/es/v1/list/status/StatusListItem/StatusListItem.js +10 -6
  122. package/es/v1/lookup/Lookup/Lookup.js +5 -4
  123. package/es/v1/lookup/header/Search/Search.js +3 -5
  124. package/es/v1/notification/DesktopNotification/DesktopNotification.js +7 -6
  125. package/es/version2/GlobalNotification/GlobalNotification.js +7 -6
  126. package/es/version2/lookup/AlertLookup/AlertLookup.js +15 -15
  127. package/es/version2/notification/DesktopNotification/DesktopNotification.js +7 -6
  128. package/lib/list/Thread/Thread.js +1 -2
  129. package/lib/list/status/StatusDropdown/StatusDropdown.js +96 -231
  130. package/lib/list/status/StatusDropdown/StatusDropdown.module.css +1 -10
  131. package/lib/list/status/StatusDropdown/props/defaultProps.js +2 -1
  132. package/lib/list/status/StatusDropdown/props/propTypes.js +1 -1
  133. package/lib/list/status/StatusListItem/StatusListItem.js +6 -1
  134. package/lib/v1/list/Thread/Thread.js +1 -2
  135. package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +41 -132
  136. package/lib/v1/list/status/StatusDropdown/props/defaultProps.js +2 -1
  137. package/lib/v1/list/status/StatusDropdown/props/propTypes.js +1 -1
  138. package/lib/v1/list/status/StatusListItem/StatusListItem.js +6 -1
  139. package/package.json +8 -8
  140. package/result.json +1 -1
@@ -8,8 +8,6 @@ import DropDownHeading from '@zohodesk/components/lib/DropDown/DropDownHeading';
8
8
  import TextBoxIcon from '@zohodesk/components/lib/TextBoxIcon/TextBoxIcon';
9
9
  import Loader from '@zohodesk/svg/lib/Loader/Loader';
10
10
  import EmptySearch from '@zohodesk/svg/lib/emptystate/version3/EmptySearch';
11
- import { scrollTo } from '@zohodesk/components/lib/utils/Common.js';
12
- import TextBox from '@zohodesk/components/lib/TextBox/TextBox';
13
11
  import CommonEmptyState from '../../../emptystate/CommonEmptyState/CommonEmptyState';
14
12
  import StatusListItem from '../StatusListItem/StatusListItem';
15
13
  import commonStyle from '@zohodesk/components/lib/common/common.module.css';
@@ -23,20 +21,13 @@ export class StatusDropdown extends React.Component {
23
21
  super(props);
24
22
  this.state = {
25
23
  searchString: '',
26
- selectedIndex: 0,
27
24
  options: props.options
28
25
  };
29
26
  this.handleChange = this.handleChange.bind(this);
30
- this.handleKeyDown = this.handleKeyDown.bind(this);
31
27
  this.onSelect = this.onSelect.bind(this);
32
28
  this.handleTogglePopup = this.handleTogglePopup.bind(this);
33
29
  this.onSearchClear = this.onSearchClear.bind(this);
34
30
  this.searchList = this.searchList.bind(this);
35
- this.scrollContentRef = this.scrollContentRef.bind(this);
36
- this.handleMouseEnter = this.handleMouseEnter.bind(this);
37
- this.searchInputRef = this.searchInputRef.bind(this);
38
- this.itemRef = this.itemRef.bind(this);
39
- this.inputRef = this.inputRef.bind(this);
40
31
  this.handleScroll = this.handleScroll.bind(this);
41
32
  this.emptySearchSVG = this.emptySearchSVG.bind(this);
42
33
  this.getAriaId = getUniqueId(this);
@@ -48,18 +39,6 @@ export class StatusDropdown extends React.Component {
48
39
  });
49
40
  }
50
41
 
51
- inputRef(el) {
52
- this.hiddenInput = el;
53
- }
54
-
55
- itemRef(ele, index, id) {
56
- this[`suggestion_${id}`] = ele;
57
- }
58
-
59
- searchInputRef(el) {
60
- this.searchInput = el;
61
- }
62
-
63
42
  handleTogglePopup(e) {
64
43
  let {
65
44
  togglePopup,
@@ -73,16 +52,6 @@ export class StatusDropdown extends React.Component {
73
52
  togglePopup(e, boxPosition);
74
53
  }
75
54
 
76
- scrollContentRef(el) {
77
- let {
78
- isPopupOpen
79
- } = this.props;
80
-
81
- if (isPopupOpen) {
82
- this.optionsContainer = el;
83
- }
84
- }
85
-
86
55
  componentWillReceiveProps(nextProps) {
87
56
  if (nextProps.options.length != this.props.options.length) {
88
57
  this.setState({
@@ -104,108 +73,11 @@ export class StatusDropdown extends React.Component {
104
73
  }
105
74
 
106
75
  componentDidUpdate(prevProps) {
107
- let {
108
- isPopupOpen,
109
- isSearch,
110
- idName
111
- } = this.props;
112
- let {
113
- selectedIndex,
114
- options
115
- } = this.state;
116
-
117
- if (prevProps.isPopupOpen != isPopupOpen) {
118
- setTimeout(() => {
119
- isPopupOpen && isSearch ? this.searchInput && this.searchInput.focus() : this.hiddenInput && this.hiddenInput.focus();
120
- }, 10);
121
- }
122
-
123
- let mergeOptions = options;
124
- let option = mergeOptions[selectedIndex];
125
- let id = option && option[idName] || {};
126
- let selSuggestion = this[`suggestion_${id}`];
127
-
128
- if (isPopupOpen) {
129
- this.optionsContainer && scrollTo(this.optionsContainer, selSuggestion);
130
- }
131
-
132
76
  if (!prevProps.isPopupOpen && this.props.isPopupOpen) {
133
77
  this.onSearchClear();
134
78
  }
135
79
  }
136
80
 
137
- handleKeyDown(e) {
138
- let {
139
- keyCode
140
- } = e;
141
- let {
142
- selectedIndex,
143
- options
144
- } = this.state;
145
- let totalIndex = options.length;
146
- let {
147
- togglePopup,
148
- onClick,
149
- boxPosition,
150
- isPopupReady,
151
- isNextOptions,
152
- getNextOptions,
153
- onTogglePopup,
154
- isPopupOpen
155
- } = this.props;
156
-
157
- if (isPopupReady && (keyCode === 38 || keyCode === 40) && e.preventDefault) {
158
- e.preventDefault(); //prevent body scroll
159
- }
160
-
161
- if (isPopupReady) {
162
- switch (keyCode) {
163
- case 40:
164
- if (selectedIndex === totalIndex - 1) {
165
- this.setState({
166
- selectedIndex: 0
167
- });
168
- } else {
169
- if (selectedIndex === totalIndex - 3) {
170
- isNextOptions && getNextOptions && getNextOptions();
171
- }
172
-
173
- this.setState({
174
- selectedIndex: selectedIndex + 1
175
- });
176
- }
177
-
178
- break;
179
-
180
- case 38:
181
- if (selectedIndex === 0) {
182
- this.setState({
183
- selectedIndex: totalIndex - 1
184
- });
185
- } else {
186
- this.setState({
187
- selectedIndex: selectedIndex - 1
188
- });
189
- }
190
-
191
- break;
192
-
193
- case 13:
194
- onClick && onClick(options[selectedIndex].name, e);
195
- onTogglePopup && onTogglePopup(isPopupOpen);
196
- togglePopup(e, boxPosition);
197
- break;
198
-
199
- default:
200
- break;
201
- }
202
- } else {
203
- if (keyCode === 13 || keyCode === 40) {
204
- togglePopup(e, boxPosition);
205
- }
206
- }
207
- }
208
-
209
81
  searchList(value) {
210
82
  let {
211
83
  options,
@@ -219,7 +91,6 @@ export class StatusDropdown extends React.Component {
219
91
  let foptions = this.searchList(value);
220
92
  this.setState({
221
93
  searchString: value,
222
- selectedIndex: -1,
223
94
  options: foptions
224
95
  });
225
96
  }
@@ -232,20 +103,13 @@ export class StatusDropdown extends React.Component {
232
103
  });
233
104
  }
234
105
 
235
- handleMouseEnter(id, value, index, e) {
236
- this.setState({
237
- selectedIndex: index
238
- });
239
- }
240
-
241
106
  handleScroll(e) {
242
107
  const {
243
- isNextOptions,
244
108
  getNextOptions
245
109
  } = this.props;
246
110
 
247
111
  if (e.target.scrollTop + e.target.offsetHeight > e.target.scrollHeight - 1) {
248
- isNextOptions && getNextOptions && getNextOptions(e);
112
+ getNextOptions && getNextOptions(e);
249
113
  }
250
114
  }
251
115
 
@@ -262,8 +126,7 @@ export class StatusDropdown extends React.Component {
262
126
 
263
127
  render() {
264
128
  let {
265
- options,
266
- selectedIndex
129
+ options
267
130
  } = this.state;
268
131
  let {
269
132
  value,
@@ -307,6 +170,8 @@ export class StatusDropdown extends React.Component {
307
170
  needExternalPopupState = false,
308
171
  isPopupActive = false,
309
172
  needMultiLineText,
173
+ isFetchingOptions,
174
+ getNextOptions,
310
175
  a11y = {}
311
176
  } = this.props;
312
177
  const {
@@ -328,12 +193,11 @@ export class StatusDropdown extends React.Component {
328
193
  tagName: "button",
329
194
  alignBox: "row",
330
195
  className: `${style.container} ${containerClass} ${btnStyle.buttonReset}`,
331
- onMouseDown: !showOnHover && !isDisabled && !isReadOnly && isEditable ? this.handleTogglePopup : null,
196
+ onClick: !showOnHover && !isDisabled && !isReadOnly && isEditable ? this.handleTogglePopup : null,
332
197
  eleRef: getTargetRef,
333
198
  align: targetAlign,
334
199
  isCover: false,
335
200
  dataId: dataId,
336
- onClick: removeClose,
337
201
  disabled: isDisabled || isReadOnly ? true : false,
338
202
  "aria-haspopup": isSearch ? 'listbox' : 'menu',
339
203
  "aria-expanded": isPopupReady && isEditable ? true : false,
@@ -341,15 +205,7 @@ export class StatusDropdown extends React.Component {
341
205
  "aria-labelledby": ariaLabelledby,
342
206
  "aria-label": ariaLabel,
343
207
  "aria-disabled": isDisabled || isReadOnly
344
- }, isEditable ? /*#__PURE__*/React.createElement("div", {
345
- className: style.hiddenInput
346
- }, /*#__PURE__*/React.createElement(TextBox, {
347
- type: "text",
348
- inputRef: this.inputRef,
349
- onKeyDown: this.handleKeyDown,
350
- needAppearance: false,
351
- placeHolder: placeHolderText
352
- })) : null, children ? children : /*#__PURE__*/React.createElement(Box, {
208
+ }, children ? children : /*#__PURE__*/React.createElement(Box, {
353
209
  className: `${style.value} toggleDropText`,
354
210
  shrink: true,
355
211
  tagName: "span",
@@ -383,7 +239,16 @@ export class StatusDropdown extends React.Component {
383
239
  customDropBoxWrap: style.dropBoxContainer
384
240
  },
385
241
  needResponsive: needResponsive,
386
- isResponsivePadding: true
242
+ isResponsivePadding: true,
243
+ needFocusScope: true,
244
+ onClose: this.handleTogglePopup,
245
+ customProps: {
246
+ focusScopeProps: {
247
+ loadNextOptions: getNextOptions,
248
+ searchValue: searchString,
249
+ isFetchingOptions: isFetchingOptions
250
+ }
251
+ }
387
252
  }, /*#__PURE__*/React.createElement(React.Fragment, null, isSearch ? /*#__PURE__*/React.createElement(Box, {
388
253
  className: style.search
389
254
  }, /*#__PURE__*/React.createElement(TextBoxIcon, {
@@ -392,8 +257,11 @@ export class StatusDropdown extends React.Component {
392
257
  value: searchString,
393
258
  onClear: this.onSearchClear,
394
259
  size: searchBoxSize,
395
- inputRef: this.searchInputRef,
396
- onKeyDown: this.handleKeyDown,
260
+ customProps: {
261
+ TextBoxProps: {
262
+ 'data-a11y-autofocus': true
263
+ }
264
+ },
397
265
  a11y: {
398
266
  ariaHaspopup: isSearch ? 'listbox' : 'menu',
399
267
  ariaExpanded: isPopupReady,
@@ -416,34 +284,37 @@ export class StatusDropdown extends React.Component {
416
284
  dataId: `${dataId}_list`,
417
285
  preventParentScroll: "vertical",
418
286
  className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}`,
419
- eleRef: this.scrollContentRef,
420
287
  onScroll: this.handleScroll,
421
288
  role: isSearch ? 'listbox' : 'menu',
422
- "aria-labelledby": ariaTitleId,
423
- tabindex: "-1"
424
- }, options.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((item, i) => /*#__PURE__*/React.createElement(React.Fragment, {
425
- key: i
426
- }, /*#__PURE__*/React.createElement(StatusListItem, {
427
- dataId: `dataid_${i}`,
428
- value: item[keyName],
429
- id: item[idName],
430
- active: value === item[keyName],
431
- onClick: this.onSelect.bind(this, item),
432
- index: i,
433
- highlight: selectedIndex === i,
434
- needTick: needTick,
435
- needBorder: false,
436
- onMouseEnter: this.handleMouseEnter,
437
- getRef: this.itemRef,
438
- bulletColor: item[statusColor],
439
- title: item[keyName],
440
- needMultiLineText: needMultiLineText,
441
- a11y: {
442
- role: isSearch ? 'option' : 'menuitem',
443
- ariaSelected: value === item[keyName],
444
- 'data-a11y-list-active': selectedIndex === i
445
- }
446
- })))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
289
+ tabindex: "-1",
290
+ isScrollAttribute: true
291
+ }, options.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((item, i) => {
292
+ const listItemText = item[keyName];
293
+ const isActive = value === listItemText;
294
+ return /*#__PURE__*/React.createElement(StatusListItem, {
295
+ key: i,
296
+ dataId: `dataid_${i}`,
297
+ value: listItemText,
298
+ id: item[idName],
299
+ active: isActive,
300
+ onClick: this.onSelect.bind(this, item),
301
+ index: i,
302
+ needTick: needTick,
303
+ needBorder: false,
304
+ bulletColor: item[statusColor],
305
+ title: listItemText,
306
+ needMultiLineText: needMultiLineText,
307
+ autoHover: true,
308
+ a11y: {
309
+ role: isSearch ? 'option' : 'menuitem',
310
+ ariaSelected: isActive,
311
+ ariaLabel: listItemText
312
+ }
313
+ });
314
+ }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
315
+ isCover: false,
316
+ align: "both"
317
+ }, /*#__PURE__*/React.createElement(Loader, null))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
447
318
  className: style.svgWrapper,
448
319
  title: searchErrorText || 'No results',
449
320
  description: searchEmptyHint,
@@ -80,13 +80,4 @@
80
80
  height: var(--zd_size1) ;
81
81
  border-bottom: 1px solid var(--zdt_statusdropdown_line_border);
82
82
  margin: var(--zd_size9) 0 var(--zd_size10) ;
83
- }
84
- .hiddenInput {
85
- width: 0 ;
86
- height: 0 ;
87
- opacity: 0;
88
- }
89
- .hiddenInput > input {
90
- width: 100% ;
91
- padding: 0 ;
92
- }
83
+ }
@@ -15,5 +15,6 @@ export const defaultProps = {
15
15
  boxSize: 'medium',
16
16
  needExternalPopupState: false,
17
17
  statusColor: 'statusColor',
18
- needMultiLineText: false
18
+ needMultiLineText: false,
19
+ isFetchingOptions: false
19
20
  };
@@ -19,7 +19,7 @@ export const propTypes = {
19
19
  isDataLoaded: PropTypes.bool,
20
20
  isDisabled: PropTypes.bool,
21
21
  isEditable: PropTypes.bool,
22
- isNextOptions: PropTypes.bool,
22
+ isFetchingOptions: PropTypes.bool,
23
23
  isPopupActive: PropTypes.bool,
24
24
  isPopupOpen: PropTypes.bool,
25
25
  isPopupReady: PropTypes.bool,
@@ -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 from 'react';
3
5
  import { defaultProps } from './props/defaultProps';
@@ -74,7 +76,9 @@ export default class StatusListItem extends React.Component {
74
76
  let {
75
77
  role,
76
78
  ariaSelected,
77
- ariaHidden = true
79
+ ariaHidden = true,
80
+ ariaLabel,
81
+ insetFocus = true
78
82
  } = a11y;
79
83
 
80
84
  if (isLink) {
@@ -82,9 +86,11 @@ export default class StatusListItem extends React.Component {
82
86
  options.target = `_${target}`;
83
87
  }
84
88
 
85
- return /*#__PURE__*/React.createElement(Container, {
89
+ return /*#__PURE__*/React.createElement(Container, _extends({
86
90
  role: role,
87
91
  "aria-selected": ariaSelected,
92
+ "aria-label": ariaLabel,
93
+ "data-a11y-inset-focus": insetFocus,
88
94
  isCover: false,
89
95
  align: "baseline",
90
96
  alignBox: "row",
@@ -95,10 +101,8 @@ export default class StatusListItem extends React.Component {
95
101
  eleRef: this.getRef,
96
102
  tagName: isLink ? 'a' : 'li',
97
103
  "data-title": isDisabled ? disableTitle : null,
98
- tabindex: isDisabled ? '-1' : '0',
99
- ...options,
100
- ...a11y
101
- }, /*#__PURE__*/React.createElement(Box, {
104
+ tabindex: isDisabled ? '-1' : '0'
105
+ }, options, a11y), /*#__PURE__*/React.createElement(Box, {
102
106
  className: `${style.statusType} ${style[bulletColor]}`
103
107
  }), /*#__PURE__*/React.createElement(Box, {
104
108
  flexible: true,
@@ -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';
@@ -76,7 +78,7 @@ export default class Lookup extends Component {
76
78
  needFocusLoop = true,
77
79
  needEnterAction = true
78
80
  } = focusScopeProps;
79
- const content = /*#__PURE__*/React.createElement("div", {
81
+ const content = /*#__PURE__*/React.createElement("div", _extends({
80
82
  ref: this.createRef,
81
83
  tabIndex: "-1",
82
84
  "data-a11y-need-focus-style": "false",
@@ -88,9 +90,8 @@ export default class Lookup extends Component {
88
90
  id: htmlId,
89
91
  className: `${style.box} ${style[`${size}Size`]} ${lookupClass ? lookupClass : ''}`,
90
92
  "data-id": dataId,
91
- "data-test-id": dataId,
92
- ...a11yAttributes
93
- }, /*#__PURE__*/React.createElement(Container, {
93
+ "data-test-id": dataId
94
+ }, a11yAttributes), /*#__PURE__*/React.createElement(Container, {
94
95
  "data-drag-container": "true",
95
96
  isCover: false,
96
97
  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
  /* eslint-disable react/forbid-component-props */
2
4
 
3
5
  /*** Libraries ***/
@@ -98,11 +100,7 @@ export default class Search extends Component {
98
100
  selectedId: selectedId,
99
101
  onDropDownOpen: this.handleDropDownOpen,
100
102
  onDropDownClose: this.handleDropDownClose
101
- }, /*#__PURE__*/React.createElement(SearchUI, { ...this.props,
102
- ...searchUIExtraProps
103
- })) : /*#__PURE__*/React.createElement(SearchUI, { ...this.props,
104
- ...searchUIExtraProps
105
- });
103
+ }, /*#__PURE__*/React.createElement(SearchUI, _extends({}, this.props, searchUIExtraProps))) : /*#__PURE__*/React.createElement(SearchUI, _extends({}, this.props, searchUIExtraProps));
106
104
  }
107
105
 
108
106
  }
@@ -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';
@@ -159,13 +161,12 @@ export default function Drawer(props) {
159
161
 
160
162
  return child;
161
163
  });
162
- let content = /*#__PURE__*/React.createElement(Box, {
164
+ let content = /*#__PURE__*/React.createElement(Box, _extends({
163
165
  className: `${style.container} ${style.columns} ${style.drawerModal} ${uptoTablet ? style.mbleSize : style[size]}`,
164
166
  "data-a11y-need-focus-style": "false",
165
167
  tabindex: -1,
166
- eleRef: contentRef,
167
- ...a11y
168
- }, /*#__PURE__*/React.createElement(Card, {
168
+ eleRef: contentRef
169
+ }, a11y), /*#__PURE__*/React.createElement(Card, {
169
170
  onClick: e => {
170
171
  e && e.stopPropagation && e.stopPropagation();
171
172
  onBodyClick(e);
@@ -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 from 'react';
3
5
  import { defaultProps } from './props/defaultProps';
@@ -30,7 +32,7 @@ const ExternalLink = props => {
30
32
  };
31
33
 
32
34
  let urlOutput = href && typeof href !== 'boolean' ? addHttp(String(href)) : 'javascript:void(0);';
33
- return /*#__PURE__*/React.createElement("a", {
35
+ return /*#__PURE__*/React.createElement("a", _extends({
34
36
  href: urlOutput,
35
37
  target: target,
36
38
  className: `${style.link} ${className ? className : ''}`,
@@ -38,9 +40,8 @@ const ExternalLink = props => {
38
40
  rel: rel,
39
41
  "data-id": dataId,
40
42
  "data-test-id": dataId,
41
- onClick: onClick,
42
- ...customProps
43
- }, children);
43
+ onClick: onClick
44
+ }, customProps), children);
44
45
  };
45
46
 
46
47
  ExternalLink.defaultProps = defaultProps;
@@ -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 from 'react';
2
4
  import { defaultProps } from './props/defaultProps';
3
5
  import { propTypes } from './props/propTypes';
@@ -74,17 +76,16 @@ export default function FlipCard(props) {
74
76
  }, !noNeedFlip ? /*#__PURE__*/React.createElement(Container, {
75
77
  align: "both",
76
78
  className: `${style.front} ${frontClass ? frontClass : ''}`
77
- }, /*#__PURE__*/React.createElement(CheckBox, {
79
+ }, /*#__PURE__*/React.createElement(CheckBox, _extends({
78
80
  isFilled: isFilledCheckbox,
79
81
  checked: isChecked,
80
82
  onChange: onChange,
81
83
  id: `checkbox_${id}`,
82
- dataId: `listViewCheckBox_${id}`,
83
- ...CheckBoxProps
84
- })) : null, /*#__PURE__*/React.createElement(Container, {
84
+ dataId: `listViewCheckBox_${id}`
85
+ }, CheckBoxProps))) : null, /*#__PURE__*/React.createElement(Container, {
85
86
  align: "both",
86
87
  className: style.back
87
- }, channel && action ? /*#__PURE__*/React.createElement(ChannelIcon, {
88
+ }, channel && action ? /*#__PURE__*/React.createElement(ChannelIcon, _extends({
88
89
  name: channel,
89
90
  action: action,
90
91
  size: size,
@@ -97,9 +98,8 @@ export default function FlipCard(props) {
97
98
  customTextClass: customTextClass,
98
99
  iconColor: iconColor,
99
100
  title: channelTitle,
100
- iconTitle: channelTitle,
101
- ...ChannelIconProps
102
- }) : icon ? /*#__PURE__*/React.createElement(AvatarIcon, {
101
+ iconTitle: channelTitle
102
+ }, ChannelIconProps)) : icon ? /*#__PURE__*/React.createElement(AvatarIcon, _extends({
103
103
  name: icon,
104
104
  iconSize: iconSize,
105
105
  size: size,
@@ -107,9 +107,8 @@ export default function FlipCard(props) {
107
107
  dataId: icon,
108
108
  className: className,
109
109
  iconColor: iconColor,
110
- title: needTitle ? name : '',
111
- ...AvatarIconProps
112
- }) : /*#__PURE__*/React.createElement(AvatarUser, {
110
+ title: needTitle ? name : ''
111
+ }, AvatarIconProps)) : /*#__PURE__*/React.createElement(AvatarUser, _extends({
113
112
  name: name,
114
113
  initial: initial,
115
114
  size: size,
@@ -120,9 +119,8 @@ export default function FlipCard(props) {
120
119
  needTitle: needTitle,
121
120
  palette: palette,
122
121
  textPalette: textPalette,
123
- customTextClass: customTextClass,
124
- ...AvatarUserProps
125
- }))));
122
+ customTextClass: customTextClass
123
+ }, AvatarUserProps)))));
126
124
  }
127
125
  FlipCard.propTypes = propTypes;
128
126
  FlipCard.defaultProps = defaultProps; // if (__DOCS__) {
@@ -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, { useEffect } from 'react';
2
4
  import { defaultProps } from './props/defaultProps';
3
5
  import { propTypes, UI_propTypes, new_propTypes } from './props/propTypes';
@@ -94,7 +96,7 @@ export function GlobalNotificationUI(props) {
94
96
  onClose && onClose(e);
95
97
  }
96
98
 
97
- return /*#__PURE__*/React.createElement("div", {
99
+ return /*#__PURE__*/React.createElement("div", _extends({
98
100
  ref: eleRef,
99
101
  className: ` ${style.message}
100
102
  ${needShadow && shadowCount >= 2 ? shadowCount > 2 ? `${style.stackShadowTwo} ${style.stackShadowOne}` : style.stackShadowOne : ''}
@@ -103,9 +105,8 @@ export function GlobalNotificationUI(props) {
103
105
  "data-id": `show_${type}_message`,
104
106
  "data-test-id": `show_${type}_message`,
105
107
  tabIndex: 0,
106
- "data-selector-id": dataSelectorId,
107
- ...ExtraProps
108
- }, /*#__PURE__*/React.createElement(Container, {
108
+ "data-selector-id": dataSelectorId
109
+ }, ExtraProps), /*#__PURE__*/React.createElement(Container, {
109
110
  className: `${style.container}`,
110
111
  alignBox: "row",
111
112
  isCover: false,
@@ -137,8 +138,8 @@ export function GlobalNotificationUI(props) {
137
138
  }
138
139
  GlobalNotificationUI.propTypes = UI_propTypes;
139
140
  export function GlobalNotificationNew(props) {
140
- return /*#__PURE__*/React.createElement(AutoClose, { ...props,
141
+ return /*#__PURE__*/React.createElement(AutoClose, _extends({}, props, {
141
142
  Element: GlobalNotificationUI
142
- });
143
+ }));
143
144
  }
144
145
  GlobalNotificationNew.propTypes = new_propTypes;
@@ -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, { useState } from 'react';
2
4
  import { defaultProps } from './props/defaultProps';
3
5
  import { propTypes } from './props/propTypes';
@@ -71,7 +73,7 @@ export default function IconButton(props) {
71
73
  hoverType: hoverType,
72
74
  isDisabled: isDisabled,
73
75
  isNeedEffect: isNeedEffect
74
- }, /*#__PURE__*/React.createElement(Container, {
76
+ }, /*#__PURE__*/React.createElement(Container, _extends({
75
77
  "aria-label": ariaLabel,
76
78
  "aria-haspopup": ariaHaspopup,
77
79
  "aria-expanded": ariaExpanded,
@@ -95,9 +97,8 @@ export default function IconButton(props) {
95
97
  onKeyDown: handleToggle,
96
98
  onFocus: triggerMouseOver,
97
99
  onBlur: onBlur,
98
- disabled: isDisabled,
99
- ...customProps
100
- }, iconName ? /*#__PURE__*/React.createElement(Icon, {
100
+ disabled: isDisabled
101
+ }, customProps), iconName ? /*#__PURE__*/React.createElement(Icon, {
101
102
  isBold: isBold,
102
103
  size: iconSize,
103
104
  name: iconName,