@zohodesk/dot 1.0.0-temp-228.2 → 1.0.0-temp-229

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 (177) hide show
  1. package/README.md +16 -0
  2. package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +2 -0
  3. package/assets/Appearance/light/mode/Dot_LightMode.module.css +2 -0
  4. package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +2 -0
  5. package/es/ActionButton/ActionButton.module.css +12 -11
  6. package/es/ActionButton/__tests__/__snapshots__/ActionButton.spec.js.snap +47 -60
  7. package/es/AlphabeticList/AlphabeticList.module.css +7 -8
  8. package/es/Attachment/Attachment.module.css +9 -10
  9. package/es/AttachmentViewer/AttachmentViewer.module.css +24 -45
  10. package/es/AudioPlayer/AudioPlayer.module.css +5 -8
  11. package/es/DotProvider/DotProvider.js +2 -0
  12. package/es/DotProvider/__tests__/DotProvider.spec.js +106 -0
  13. package/es/DotProvider/hooks/useDotProvider.js +4 -2
  14. package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +44 -15
  15. package/es/DotProvider/props/defaultProps.js +2 -0
  16. package/es/DotProvider/props/propTypes.js +1 -0
  17. package/es/Drawer/Drawer.module.css +17 -64
  18. package/es/FormAction/FormAction.module.css +20 -54
  19. package/es/ImportantNotes/ImportantNotes.module.css +2 -9
  20. package/es/Message/Message.module.css +3 -16
  21. package/es/MessageBanner/MessageBanner.module.css +4 -13
  22. package/es/Separator/Separator.module.css +2 -1
  23. package/es/TagWithIcon/TagWithIcon.module.css +5 -8
  24. package/es/ToastMessage/ToastMessage.module.css +16 -30
  25. package/es/Upload/Upload.module.css +7 -9
  26. package/es/alert/AlertHeader/AlertHeader.module.css +11 -25
  27. package/es/alert/AlertLookup/AlertLookup.module.css +9 -10
  28. package/es/avatar/AvatarCollision/AvatarCollision.module.css +1 -1
  29. package/es/avatar/AvatarWithTeam/AvatarWithTeam.module.css +1 -1
  30. package/es/common/dot_boxShadow.module.css +2 -0
  31. package/es/dropdown/ToggleDropDown/ToggleDropDown.module.css +16 -16
  32. package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +7 -9
  33. package/es/emptystate/EditionPage/EditionPage.css +7 -4
  34. package/es/errorstate/EmptyStates.module.css +7 -8
  35. package/es/errorstate/Inconvenience/Inconvenience.module.css +2 -5
  36. package/es/errorstate/NoRequestFound/NoRequestFound.module.css +1 -1
  37. package/es/errorstate/PermissionPlay/PermissionPlay.module.css +5 -4
  38. package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.module.css +1 -1
  39. package/es/errorstate/UnableToProcess/UnableToProcess.module.css +1 -1
  40. package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.module.css +1 -1
  41. package/es/errorstate/WillBack/WillBack.module.css +6 -4
  42. package/es/form/fields/Fields.module.css +23 -68
  43. package/es/form/fields/SelectField/SelectField.js +4 -2
  44. package/es/form/fields/SelectField/props/propTypes.js +1 -0
  45. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +11 -16
  46. package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.module.css +1 -4
  47. package/es/form/fields/TextEditor/TextEditor.module.css +40 -66
  48. package/es/form/fields/TextEditorWrapper/TextEditorWrapper.module.css +2 -7
  49. package/es/form/fields/ValidationMessage/ValidationMessage.module.css +4 -3
  50. package/es/layout/SetupDetailLayout/SetupDetailLayout.module.css +14 -36
  51. package/es/layout/SubtabLayout/SubtabLayout.module.css +33 -46
  52. package/es/list/BluePrintStatus/BluePrintStatus.module.css +1 -4
  53. package/es/list/Comment/Comment.module.css +2 -1
  54. package/es/list/Dot/Dot.module.css +4 -2
  55. package/es/list/GridStencils/GridStencils.module.css +7 -9
  56. package/es/list/ListLayout/ListLayout.module.css +7 -4
  57. package/es/list/ListStencils/ListStencils.module.css +14 -15
  58. package/es/list/SecondaryText/SecondaryText.module.css +4 -13
  59. package/es/list/SentimentStatus/SentimentStatus.module.css +2 -4
  60. package/es/list/TagNew/TagNew.module.css +3 -2
  61. package/es/list/listCommon.module.css +3 -7
  62. package/es/list/status/StatusDropdown/StatusDropdown.js +121 -79
  63. package/es/list/status/StatusDropdown/StatusDropdown.module.css +65 -18
  64. package/es/list/status/StatusDropdown/props/defaultProps.js +2 -1
  65. package/es/list/status/StatusDropdown/props/propTypes.js +1 -0
  66. package/es/list/status/StatusListItem/StatusListItem.module.css +10 -18
  67. package/es/lookup/EmptyPage/LookupEmptyPage.module.css +4 -3
  68. package/es/lookup/Lookup/Lookup.module.css +2 -2
  69. package/es/lookup/header/Search/LookupSearch.module.css +10 -23
  70. package/es/lookup/header/TicketHeader/TicketHeader.module.css +3 -2
  71. package/es/lookup/header/ViewDropDown/ViewDropDown.module.css +8 -12
  72. package/es/lookup/header/lookupHeaderCommon.module.css +8 -7
  73. package/es/lookup/header/lookupHeaderCommonResponsive.module.css +2 -6
  74. package/es/setup/header/Button/HeaderButton.module.css +2 -4
  75. package/es/setup/header/Link/HeaderLink.module.css +3 -9
  76. package/es/setup/header/Search/Search.module.css +2 -10
  77. package/es/setup/header/Views/Views.module.css +1 -4
  78. package/es/setup/helptips/Description/HelpTipsDescription.module.css +2 -1
  79. package/es/setup/helptips/Link/HelpTipsLink.module.css +2 -2
  80. package/es/setup/helptips/ListGroup/ListGroup.module.css +2 -6
  81. package/es/setup/table/TableData/SetupTableData.module.css +2 -4
  82. package/es/setup/table/TableHead/SetupTableHead.module.css +1 -6
  83. package/es/setup/table/TableRow/SetupTableRow.module.css +2 -7
  84. package/es/version2/GlobalNotification/GlobalNotification.module.css +7 -12
  85. package/es/version2/errorstate/V2_ErrorStates.module.css +5 -5
  86. package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +8 -23
  87. package/es/version2/lookup/AlertLookup/AlertLookupNew.module.css +9 -10
  88. package/es/version2/lookup/alertLookupCommonNew.module.css +6 -4
  89. package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +8 -11
  90. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +10 -22
  91. package/lib/ActionButton/ActionButton.module.css +12 -11
  92. package/lib/ActionButton/__tests__/__snapshots__/ActionButton.spec.js.snap +47 -60
  93. package/lib/AlphabeticList/AlphabeticList.module.css +7 -8
  94. package/lib/Attachment/Attachment.module.css +9 -10
  95. package/lib/AttachmentViewer/AttachmentViewer.module.css +24 -45
  96. package/lib/AudioPlayer/AudioPlayer.module.css +5 -8
  97. package/lib/DotProvider/DotProvider.js +3 -1
  98. package/lib/DotProvider/__tests__/DotProvider.spec.js +216 -0
  99. package/lib/DotProvider/hooks/useDotProvider.js +4 -2
  100. package/lib/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +46 -15
  101. package/lib/DotProvider/props/defaultProps.js +3 -0
  102. package/lib/DotProvider/props/propTypes.js +1 -0
  103. package/lib/Drawer/Drawer.module.css +17 -64
  104. package/lib/FormAction/FormAction.module.css +20 -54
  105. package/lib/ImportantNotes/ImportantNotes.module.css +2 -9
  106. package/lib/Message/Message.module.css +3 -16
  107. package/lib/MessageBanner/MessageBanner.module.css +4 -13
  108. package/lib/Separator/Separator.module.css +2 -1
  109. package/lib/TagWithIcon/TagWithIcon.module.css +5 -8
  110. package/lib/ToastMessage/ToastMessage.module.css +16 -30
  111. package/lib/Upload/Upload.module.css +7 -9
  112. package/lib/alert/AlertHeader/AlertHeader.module.css +11 -25
  113. package/lib/alert/AlertLookup/AlertLookup.module.css +9 -10
  114. package/lib/avatar/AvatarCollision/AvatarCollision.module.css +1 -1
  115. package/lib/avatar/AvatarWithTeam/AvatarWithTeam.module.css +1 -1
  116. package/lib/common/dot_boxShadow.module.css +2 -0
  117. package/lib/dropdown/ToggleDropDown/ToggleDropDown.module.css +16 -16
  118. package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +7 -9
  119. package/lib/emptystate/EditionPage/EditionPage.css +7 -4
  120. package/lib/errorstate/EmptyStates.module.css +7 -8
  121. package/lib/errorstate/Inconvenience/Inconvenience.module.css +2 -5
  122. package/lib/errorstate/NoRequestFound/NoRequestFound.module.css +1 -1
  123. package/lib/errorstate/PermissionPlay/PermissionPlay.module.css +5 -4
  124. package/lib/errorstate/RequestUrlNotFound/RequestUrlNotFound.module.css +1 -1
  125. package/lib/errorstate/UnableToProcess/UnableToProcess.module.css +1 -1
  126. package/lib/errorstate/UnauthorizedLogin/UnauthorizedLogin.module.css +1 -1
  127. package/lib/errorstate/WillBack/WillBack.module.css +6 -4
  128. package/lib/form/fields/Fields.module.css +23 -68
  129. package/lib/form/fields/SelectField/SelectField.js +4 -2
  130. package/lib/form/fields/SelectField/props/propTypes.js +1 -0
  131. package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +11 -16
  132. package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.module.css +1 -4
  133. package/lib/form/fields/TextEditor/TextEditor.module.css +40 -66
  134. package/lib/form/fields/TextEditorWrapper/TextEditorWrapper.module.css +2 -7
  135. package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +4 -3
  136. package/lib/layout/SetupDetailLayout/SetupDetailLayout.module.css +14 -36
  137. package/lib/layout/SubtabLayout/SubtabLayout.module.css +33 -46
  138. package/lib/list/BluePrintStatus/BluePrintStatus.module.css +1 -4
  139. package/lib/list/Comment/Comment.module.css +2 -1
  140. package/lib/list/Dot/Dot.module.css +4 -2
  141. package/lib/list/GridStencils/GridStencils.module.css +7 -9
  142. package/lib/list/ListLayout/ListLayout.module.css +7 -4
  143. package/lib/list/ListStencils/ListStencils.module.css +14 -15
  144. package/lib/list/SecondaryText/SecondaryText.module.css +4 -13
  145. package/lib/list/SentimentStatus/SentimentStatus.module.css +2 -4
  146. package/lib/list/TagNew/TagNew.module.css +3 -2
  147. package/lib/list/listCommon.module.css +3 -7
  148. package/lib/list/status/StatusDropdown/StatusDropdown.js +133 -81
  149. package/lib/list/status/StatusDropdown/StatusDropdown.module.css +65 -18
  150. package/lib/list/status/StatusDropdown/props/defaultProps.js +2 -1
  151. package/lib/list/status/StatusDropdown/props/propTypes.js +1 -1
  152. package/lib/list/status/StatusListItem/StatusListItem.module.css +10 -18
  153. package/lib/lookup/EmptyPage/LookupEmptyPage.module.css +4 -3
  154. package/lib/lookup/Lookup/Lookup.module.css +2 -2
  155. package/lib/lookup/header/Search/LookupSearch.module.css +10 -23
  156. package/lib/lookup/header/TicketHeader/TicketHeader.module.css +3 -2
  157. package/lib/lookup/header/ViewDropDown/ViewDropDown.module.css +8 -12
  158. package/lib/lookup/header/lookupHeaderCommon.module.css +8 -7
  159. package/lib/lookup/header/lookupHeaderCommonResponsive.module.css +2 -6
  160. package/lib/setup/header/Button/HeaderButton.module.css +2 -4
  161. package/lib/setup/header/Link/HeaderLink.module.css +3 -9
  162. package/lib/setup/header/Search/Search.module.css +2 -10
  163. package/lib/setup/header/Views/Views.module.css +1 -4
  164. package/lib/setup/helptips/Description/HelpTipsDescription.module.css +2 -1
  165. package/lib/setup/helptips/Link/HelpTipsLink.module.css +2 -2
  166. package/lib/setup/helptips/ListGroup/ListGroup.module.css +2 -6
  167. package/lib/setup/table/TableData/SetupTableData.module.css +2 -4
  168. package/lib/setup/table/TableHead/SetupTableHead.module.css +1 -6
  169. package/lib/setup/table/TableRow/SetupTableRow.module.css +2 -7
  170. package/lib/version2/GlobalNotification/GlobalNotification.module.css +7 -12
  171. package/lib/version2/errorstate/V2_ErrorStates.module.css +5 -5
  172. package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +8 -23
  173. package/lib/version2/lookup/AlertLookup/AlertLookupNew.module.css +9 -10
  174. package/lib/version2/lookup/alertLookupCommonNew.module.css +6 -4
  175. package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +8 -11
  176. package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +10 -22
  177. package/package.json +14 -14
@@ -13,6 +13,7 @@ import StatusListItem from "../StatusListItem/StatusListItem";
13
13
  import commonStyle from '@zohodesk/components/es/common/common.module.css';
14
14
  import ResponsiveDropBox from '@zohodesk/components/es/ResponsiveDropBox/ResponsiveDropBox';
15
15
  import { ResponsiveReceiver } from '@zohodesk/components/es/Responsive/CustomResponsive';
16
+ import Flex from '@zohodesk/layout/es/Flex/Flex';
16
17
  import { getUniqueId } from '@zohodesk/components/es/Provider/IdProvider';
17
18
  import btnStyle from '@zohodesk/components/es/semantic/Button/semanticButton.module.css';
18
19
  import style from "./StatusDropdown.module.css";
@@ -30,6 +31,11 @@ export class StatusDropdown extends React.Component {
30
31
  this.searchList = this.searchList.bind(this);
31
32
  this.handleScroll = this.handleScroll.bind(this);
32
33
  this.emptySearchSVG = this.emptySearchSVG.bind(this);
34
+ this.getSearchA11y = this.getSearchA11y.bind(this);
35
+ this.getHeadingA11y = this.getHeadingA11y.bind(this);
36
+ this.getListItemA11y = this.getListItemA11y.bind(this);
37
+ this.getTextBoxIconCustomProps = this.getTextBoxIconCustomProps.bind(this);
38
+ this.handleListItemClick = this.handleListItemClick.bind(this);
33
39
  this.getAriaId = getUniqueId(this);
34
40
  }
35
41
 
@@ -124,6 +130,44 @@ export class StatusDropdown extends React.Component {
124
130
  };
125
131
  }
126
132
 
133
+ getSearchA11y() {
134
+ return {
135
+ ariaHaspopup: this.props.isSearch ? 'listbox' : 'menu',
136
+ ariaExpanded: this.props.isPopupReady,
137
+ role: 'combobox',
138
+ ariaActivedescendant: this.props.isPopupReady ? this.props.value : '',
139
+ ariaOwns: this.getAriaId()
140
+ };
141
+ }
142
+
143
+ getHeadingA11y() {
144
+ return {
145
+ role: 'heading'
146
+ };
147
+ }
148
+
149
+ getListItemA11y(isActive, listItemText) {
150
+ return {
151
+ role: this.props.isSearch ? 'option' : 'menuitem',
152
+ ariaSelected: isActive,
153
+ ariaLabel: listItemText
154
+ };
155
+ }
156
+
157
+ getTextBoxIconCustomProps() {
158
+ return {
159
+ TextBoxProps: {
160
+ 'data-a11y-autofocus': true
161
+ }
162
+ };
163
+ }
164
+
165
+ handleListItemClick(item) {
166
+ return e => {
167
+ this.onSelect(item, e);
168
+ };
169
+ }
170
+
127
171
  render() {
128
172
  let {
129
173
  options
@@ -179,10 +223,12 @@ export class StatusDropdown extends React.Component {
179
223
  renderTargetElement,
180
224
  renderFooterElement,
181
225
  a11y = {},
182
- customClass
226
+ customClass,
227
+ renderSuggestedStatus
183
228
  } = this.props;
184
229
  const {
185
- dropBoxClass = ''
230
+ dropBoxClass = '',
231
+ suggestedStatusWrapper = ''
186
232
  } = customClass;
187
233
  const {
188
234
  tabIndex = 0,
@@ -195,6 +241,9 @@ export class StatusDropdown extends React.Component {
195
241
  } = this.state;
196
242
  let containerClass = `${className ? className : ''} ${isPopupReady ? activeStyle ? activeStyle : '' : showIconOnHover ? style.hoverIcon : ''} ${isDisabled ? commonStyle.disabled : isReadOnly ? style.readOnly : !isEditable ? style.cursorDefault : !showOnHover ? `${style.cursor} ${hoverStyle ? hoverStyle : ''}` : `${hoverStyle ? hoverStyle : ''} ${style.cursorDefault}`}`;
197
243
  let ariaTitleId = this.getAriaId();
244
+ let textBoxA11y = this.getSearchA11y();
245
+ let headingA11y = this.getHeadingA11y();
246
+ let textBoxIconCustomProps = this.getTextBoxIconCustomProps();
198
247
  return /*#__PURE__*/React.createElement("div", {
199
248
  className: style.posRel,
200
249
  onMouseEnter: showOnHover && !isDisabled && !isReadOnly && isEditable ? this.handleTogglePopup : undefined,
@@ -251,8 +300,8 @@ export class StatusDropdown extends React.Component {
251
300
  isAnimate: true,
252
301
  getRef: getContainerRef,
253
302
  customClass: {
254
- customDropBoxWrap: style.dropBoxContainer,
255
- customDropBox: dropBoxClass
303
+ customDropBoxWrap: `${style.dropBoxContainer} `,
304
+ customDropBox: `${dropBoxClass} ${renderSuggestedStatus ? style.dropBoxWithSuggestedStatus : ''}`
256
305
  },
257
306
  needResponsive: needResponsive,
258
307
  isResponsivePadding: true,
@@ -270,81 +319,74 @@ export class StatusDropdown extends React.Component {
270
319
  isFetchingOptions: isFetchingOptions
271
320
  }
272
321
  }
273
- }, /*#__PURE__*/React.createElement(React.Fragment, null, isSearch ? /*#__PURE__*/React.createElement(Box, {
274
- className: style.search
275
- }, /*#__PURE__*/React.createElement(TextBoxIcon, {
276
- placeHolder: placeHolderText,
277
- onChange: this.handleChange,
278
- value: searchString,
279
- onClear: this.onSearchClear,
280
- size: searchBoxSize,
281
- customProps: {
282
- TextBoxProps: {
283
- 'data-a11y-autofocus': true
284
- }
285
- },
286
- a11y: {
287
- ariaHaspopup: isSearch ? 'listbox' : 'menu',
288
- ariaExpanded: isPopupReady,
289
- role: 'combobox',
290
- ariaActivedescendant: isPopupReady ? value : '',
291
- ariaOwns: ariaTitleId
292
- },
293
- dataId: `${dataId}_search`
294
- })) : null, title && options.length != 0 && /*#__PURE__*/React.createElement(Box, {
295
- className: style.title
296
- }, /*#__PURE__*/React.createElement(DropDownHeading, {
297
- htmlId: ariaTitleId,
298
- text: title,
299
- a11y: {
300
- role: 'heading'
301
- }
302
- })), /*#__PURE__*/React.createElement(Box, {
303
- scroll: "vertical",
304
- flexible: true,
305
- shrink: true,
306
- dataId: `${dataId}_list`,
307
- preventParentScroll: "vertical",
308
- className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}`,
309
- onScroll: this.handleScroll,
310
- role: isSearch ? 'listbox' : 'menu',
311
- tabindex: "-1",
312
- isScrollAttribute: true
313
- }, options.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((item, i) => {
314
- const listItemText = item[keyName];
315
- const isActive = value === listItemText;
316
- return /*#__PURE__*/React.createElement(StatusListItem, {
317
- key: i,
318
- dataId: `dataid_${i}`,
319
- value: listItemText,
320
- id: item[idName],
321
- active: isActive,
322
- onClick: this.onSelect.bind(this, item),
323
- index: i,
324
- needTick: needTick,
325
- needBorder: false,
326
- bulletColor: item[statusColor],
327
- title: listItemText,
328
- needMultiLineText: needMultiLineText,
329
- autoHover: true,
330
- a11y: {
331
- role: isSearch ? 'option' : 'menuitem',
332
- ariaSelected: isActive,
333
- ariaLabel: listItemText
334
- }
335
- });
336
- }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
337
- isCover: false,
338
- align: "both"
339
- }, /*#__PURE__*/React.createElement(Loader, null))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
340
- className: style.svgWrapper,
341
- title: searchErrorText || 'No results',
342
- description: searchEmptyHint,
343
- size: "small",
344
- getEmptyState: this.emptySearchSVG
345
- }) : /*#__PURE__*/React.createElement("div", {
346
- className: style.loader
347
- }, /*#__PURE__*/React.createElement(Loader, null))), renderFooterElement ? renderFooterElement : null));
322
+ }, (() => {
323
+ const dropdownContent = /*#__PURE__*/React.createElement(React.Fragment, null, isSearch ? /*#__PURE__*/React.createElement(Box, {
324
+ className: style.search
325
+ }, /*#__PURE__*/React.createElement(TextBoxIcon, {
326
+ placeHolder: placeHolderText,
327
+ onChange: this.handleChange,
328
+ value: searchString,
329
+ onClear: this.onSearchClear,
330
+ size: searchBoxSize,
331
+ customProps: textBoxIconCustomProps,
332
+ a11y: textBoxA11y,
333
+ dataId: `${dataId}_search`
334
+ })) : null, title && options.length != 0 && /*#__PURE__*/React.createElement(Box, {
335
+ className: style.title
336
+ }, /*#__PURE__*/React.createElement(DropDownHeading, {
337
+ htmlId: ariaTitleId,
338
+ text: title,
339
+ a11y: headingA11y
340
+ })), /*#__PURE__*/React.createElement(Box, {
341
+ scroll: "vertical",
342
+ flexible: true,
343
+ shrink: true,
344
+ dataId: `${dataId}_list`,
345
+ preventParentScroll: "vertical",
346
+ className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}`,
347
+ onScroll: this.handleScroll,
348
+ role: isSearch ? 'listbox' : 'menu',
349
+ tabindex: "-1",
350
+ isScrollAttribute: true
351
+ }, options.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((item, i) => {
352
+ const listItemText = item[keyName];
353
+ const isActive = value === listItemText;
354
+ return /*#__PURE__*/React.createElement(StatusListItem, {
355
+ key: item[idName] || i,
356
+ dataId: `dataid_${i}`,
357
+ value: listItemText,
358
+ id: item[idName],
359
+ active: isActive,
360
+ onClick: this.handleListItemClick(item),
361
+ index: i,
362
+ needTick: needTick,
363
+ needBorder: false,
364
+ bulletColor: item[statusColor],
365
+ title: listItemText,
366
+ needMultiLineText: needMultiLineText,
367
+ autoHover: true,
368
+ a11y: this.getListItemA11y(isActive, listItemText)
369
+ });
370
+ }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
371
+ isCover: false,
372
+ align: "both"
373
+ }, /*#__PURE__*/React.createElement(Loader, null))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
374
+ className: style.svgWrapper,
375
+ title: searchErrorText || 'No results',
376
+ description: searchEmptyHint,
377
+ size: "small",
378
+ getEmptyState: this.emptySearchSVG
379
+ }) : /*#__PURE__*/React.createElement("div", {
380
+ className: style.loader
381
+ }, /*#__PURE__*/React.createElement(Loader, null))), renderFooterElement ? renderFooterElement : null);
382
+ return renderSuggestedStatus ? /*#__PURE__*/React.createElement("div", {
383
+ className: style.dropBoxListContainer
384
+ }, /*#__PURE__*/React.createElement(Flex, {
385
+ $ui_className: `${suggestedStatusWrapper} ${style.suggestedStatusContainer}`
386
+ }, renderSuggestedStatus), /*#__PURE__*/React.createElement("div", {
387
+ className: style.dropdownOptions
388
+ }, dropdownContent)) : dropdownContent;
389
+ })());
348
390
  }) : null);
349
391
  }
350
392
 
@@ -1,83 +1,130 @@
1
1
  .container {
2
2
  max-width: 100% ;
3
3
  }
4
+
5
+ .dropBoxListContainer {
6
+ border-radius: 7px;
7
+ padding: var(--zd_size10) ;
8
+ border: 1px solid var(--zdt_statusdropdown_wrapper_container_border);
9
+ background: var(--zdt_statusdropdown_wrapper_container_bg);
10
+ box-shadow: var(--zd_bs_statusdropdown_wrapper_container);
11
+ }
12
+
13
+ .dropdownOptions {
14
+ padding-inline: var(--zd_size1) ;
15
+ padding-block: var(--zd_size1) ;
16
+ background-color: var(--zdt_commentList_normal_bg);
17
+ border: 1px solid var(--zdt_statusdropdown_wrapper_container_border);
18
+ border-radius: 7px;
19
+ }
20
+
4
21
  .posRel {
5
22
  position: relative;
6
23
  }
24
+
7
25
  .maxHgt {
8
26
  max-height: var(--zd_size265) ;
9
- padding: var(--zd_size10) 0 ;
27
+ padding-block: var(--zd_size10) ;
28
+ padding-inline: 0 ;
10
29
  }
11
- .responsivemaxHgt{
12
- padding: var(--zd_size10) 0 0 ;
30
+
31
+ .responsivemaxHgt {
32
+ padding-block: var(--zd_size10) 0 ;
33
+ padding-inline: 0 ;
13
34
  }
35
+
14
36
  .title {
15
- padding-top: var(--zd_size6) ;
37
+ padding-block-start: var(--zd_size6) ;
16
38
  }
17
- [dir=ltr] .default_arrow, [dir=ltr] .overlay_arrow {
18
- padding: 0 0 0 var(--zd_size5) ;
19
- }
20
- [dir=rtl] .default_arrow, [dir=rtl] .overlay_arrow {
21
- padding: 0 var(--zd_size5) 0 0 ;
39
+
40
+ .default_arrow,
41
+ .overlay_arrow {
42
+ padding-inline: var(--zd_size5) 0 ;
43
+ padding-block: 0 ;
22
44
  }
45
+
23
46
  .overlay_arrow {
24
47
  position: absolute;
25
48
  top: 50% ;
26
49
  transform: translateY(-50%) perspective(1px);
27
50
  }
51
+
28
52
  [dir=ltr] .overlay_arrow {
29
53
  left: 100% ;
30
54
  }
55
+
31
56
  [dir=rtl] .overlay_arrow {
32
57
  right: 100% ;
33
58
  }
59
+
34
60
  .hoverIcon .arrow {
35
61
  opacity: 0;
36
62
  visibility: hidden;
37
63
  }
64
+
38
65
  .hoverIcon:hover .arrow {
39
66
  opacity: 1;
40
67
  visibility: visible;
41
68
  }
69
+
42
70
  .value {
43
71
  composes: dotted from '~@zohodesk/components/es/common/common.module.css';
44
72
  }
73
+
45
74
  .search {
46
- padding: var(--zd_size6) var(--zd_size20) 0 ;
75
+ padding-block: var(--zd_size6) 0 ;
76
+ padding-inline: var(--zd_size20) ;
47
77
  }
78
+
48
79
  .svgWrapper {
49
- padding-bottom: var(--zd_size25) ;
80
+ padding-block-end: var(--zd_size25) ;
50
81
  }
82
+
51
83
  .readOnly {
52
84
  cursor: no-drop;
53
85
  }
86
+
54
87
  .cursorDefault {
55
88
  cursor: default;
56
89
  }
90
+
57
91
  .cursor {
58
92
  cursor: pointer;
59
93
  }
94
+
60
95
  [dir=ltr] .dropBoxContainer {
61
96
  text-align: left;
62
97
  }
98
+
63
99
  [dir=rtl] .dropBoxContainer {
64
100
  text-align: right;
65
101
  }
66
- [dir=ltr] .iconBox {
67
- margin-right: var(--zd_size4) ;
68
- }
69
- [dir=rtl] .iconBox {
70
- margin-left: var(--zd_size4) ;
102
+
103
+ .iconBox {
104
+ margin-inline-end: var(--zd_size4) ;
71
105
  }
72
- .iconBox > i {
106
+
107
+ .iconBox>i {
73
108
  display: block;
74
109
  }
110
+
75
111
  .loader {
76
112
  width: var(--zd_size40) ;
77
113
  margin: 0 auto ;
78
114
  }
115
+
79
116
  .seperatedLine {
80
117
  height: var(--zd_size1) ;
118
+ margin-block: var(--zd_size9) var(--zd_size10) ;
119
+ margin-inline: 0 ;
81
120
  border-bottom: 1px solid var(--zdt_statusdropdown_line_border);
82
- margin: var(--zd_size9) 0 var(--zd_size10) ;
121
+ }
122
+
123
+ .suggestedStatusContainer {
124
+ margin-block-end: var(--zd_size6) ;
125
+ margin-inline: var(--zd_size1) ;
126
+ }
127
+
128
+ .dropBoxWithSuggestedStatus {
129
+ border-radius: 7px;
83
130
  }
@@ -19,5 +19,6 @@ export const defaultProps = {
19
19
  isFetchingOptions: false,
20
20
  isAbsolutePositioningNeeded: true,
21
21
  isRestrictScroll: false,
22
- customClass: {}
22
+ customClass: {},
23
+ renderSuggestedStatus: null
23
24
  };
@@ -56,6 +56,7 @@ export const propTypes = {
56
56
  positionsOffset: PropTypes.object,
57
57
  renderTargetElement: PropTypes.func,
58
58
  renderFooterElement: PropTypes.node,
59
+ renderSuggestedStatus: PropTypes.node,
59
60
  targetOffset: PropTypes.object,
60
61
  customClass: PropTypes.shape({
61
62
  dropBoxClass: PropTypes.string
@@ -19,24 +19,19 @@
19
19
  [dir=rtl] .withBorder {
20
20
  border-right: 1px solid var(--zdt_statuslistitem_default_border);
21
21
  }
22
- [dir=ltr] .small {
23
- padding: var(--zd_size7) var(--zd_size3) var(--zd_size7) var(--zd_size5) ;
24
- }
25
- [dir=rtl] .small {
26
- padding: var(--zd_size7) var(--zd_size5) var(--zd_size7) var(--zd_size3) ;
22
+ .small {
23
+ padding-block: var(--zd_size7) ;
24
+ padding-inline:var(--zd_size3) var(--zd_size5) ;
27
25
  }
28
26
  .medium {
29
- padding: var(--zd_size7) var(--zd_size20) ;
27
+ padding-block: var(--zd_size7) ;
28
+ padding-inline:var(--zd_size20) ;
30
29
  }
31
30
  .large {
31
+ padding-block: var(--zd_size10) ;
32
+ padding-inline:var(--zd_size25) var(--zd_size3) ;
32
33
  --statuslistitem_min_height: var(--zd_size48);
33
34
  }
34
- [dir=ltr] .large {
35
- padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25) ;
36
- }
37
- [dir=rtl] .large {
38
- padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size3) ;
39
- }
40
35
  .value,.multiLineValue {
41
36
  line-height: 1.5385;
42
37
  }
@@ -88,11 +83,8 @@
88
83
  .tickIcon > i {
89
84
  display: block;
90
85
  }
91
- [dir=ltr] .active.withTick {
92
- padding-right: var(--zd_size39) ;
93
- }
94
- [dir=rtl] .active.withTick {
95
- padding-left: var(--zd_size39) ;
86
+ .active.withTick {
87
+ padding-inline-end: var(--zd_size39) ;
96
88
  }
97
89
  .contentWrapper {
98
90
  composes: dflex flexrow alignVertical from '~@zohodesk/components/es/common/common.module.css';
@@ -129,4 +121,4 @@
129
121
  }
130
122
  .green.statusType::after {
131
123
  background-color: var(--zdt_statuslistitem_green_bg);
132
- }
124
+ }
@@ -3,12 +3,13 @@
3
3
  }
4
4
 
5
5
  .image {
6
- margin: var(--zd_size20) auto ;
6
+ margin-block: var(--zd_size20) ;
7
+ margin-inline:auto ;
7
8
  }
8
9
 
9
10
  .contentDiv {
10
11
  font-size: var(--zd_font_size20) ;
11
12
  font-weight: var(--zd-fw-semibold);
12
13
  composes: ftsmooth from '~@zohodesk/components/es/common/common.module.css';
13
- margin-top: var(--zd_size15) ;
14
- }
14
+ margin-block-start: var(--zd_size15) ;
15
+ }
@@ -8,8 +8,8 @@
8
8
  }
9
9
 
10
10
  .container {
11
+ padding-block-end: var(--zd_size10) ;
11
12
  font-size: var(--zd_font_size16) ;
12
- padding-bottom: var(--zd_size10) ;
13
13
  }
14
14
 
15
15
  .box {
@@ -46,4 +46,4 @@
46
46
 
47
47
  .fullSize {
48
48
  max-width: 90% ;
49
- }
49
+ }
@@ -26,38 +26,25 @@
26
26
  .drpSearchBox {
27
27
  position: relative;
28
28
  height: var(--zd_size28) ;
29
+ padding-inline-start: var(--zd_size12) ;
29
30
  cursor: pointer;
30
31
  }
31
- [dir=ltr] .drpSearchBox {
32
- padding-left: var(--zd_size12) ;
32
+ .searchIcon {
33
+ padding-inline-end: var(--zd_size8) ;
33
34
  }
34
- [dir=rtl] .drpSearchBox {
35
- padding-right: var(--zd_size12) ;
36
- }
37
- [dir=ltr] .searchIcon {
38
- padding-right: var(--zd_size8) ;
39
- }
40
- [dir=rtl] .searchIcon {
41
- padding-left: var(--zd_size8) ;
42
- }
43
- [dir=ltr] .searchIconBox {
44
- padding-left: var(--zd_size12) ;
45
- }
46
- [dir=rtl] .searchIconBox {
47
- padding-right: var(--zd_size12) ;
35
+ .searchIconBox {
36
+ padding-inline-start: var(--zd_size12) ;
48
37
  }
49
38
  .active, .boxStyle.active, .lineActive.drpSearchBox::after {
50
39
  border-color: var(--zdt_lookupsearch_boxstyle_activer_border);
51
40
  }
52
- [dir=ltr] .iconArrow {
53
- margin-left: var(--zd_size6) ;
54
- }
55
- [dir=rtl] .iconArrow {
56
- margin-right: var(--zd_size6) ;
41
+ .iconArrow {
42
+ margin-inline-start: var(--zd_size6) ;
57
43
  }
58
44
  .separator {
59
45
  width: var(--zd_size1) ;
60
46
  height: var(--zd_size16) ;
61
- margin: 0 var(--zd_size12) ;
47
+ margin-inline: var(--zd_size12) ;
48
+ margin-block:0 ;
62
49
  background-color: var(--zdt_lookupsearch_boxstyle_border);
63
- }
50
+ }
@@ -1,5 +1,6 @@
1
1
  .dropdown {
2
- margin: 0 var(--zd_size20) ;
2
+ margin-inline: var(--zd_size20) ;
3
+ margin-block:0 ;
3
4
  }
4
5
  /* Responsive */
5
6
  [dir=ltr] .small .searchContainer {
@@ -20,4 +21,4 @@
20
21
  .extraSmall .container {
21
22
  flex-direction: column;
22
23
  }
23
- .menuWrapper{display: inline-block;}
24
+ .menuWrapper{display: inline-block;}
@@ -12,10 +12,11 @@
12
12
 
13
13
  .emptyState {
14
14
  font-size: var(--zd_font_size14) ;
15
+ padding-block: var(--zd_size12) ;
16
+ padding-inline:var(--zd_size15) ;
15
17
  color: var(--zdt_viewdropdown_empty_text);
16
18
  font-weight: var(--zd-fw-semibold);
17
19
  composes: ftsmooth from '~@zohodesk/components/es/common/common.module.css';
18
- padding: var(--zd_size12) var(--zd_size15) ;
19
20
  }
20
21
 
21
22
  .hide {
@@ -27,7 +28,8 @@
27
28
  }
28
29
 
29
30
  .listItemContainer {
30
- padding: var(--zd_size10) 0 ;
31
+ padding-block: var(--zd_size10) ;
32
+ padding-inline:0 ;
31
33
  }
32
34
 
33
35
  /* Label Style */
@@ -40,22 +42,16 @@
40
42
 
41
43
  .labelText {
42
44
  font-size: var(--zd_font_size12) ;
45
+ margin-inline-end: var(--zd_size5) ;
43
46
  max-width: var(--zd_size180) ;
44
47
  composes: dotted from '~@zohodesk/components/es/common/common.module.css';
45
48
  }
46
49
 
47
- [dir=ltr] .labelText {
48
- margin-right: var(--zd_size5) ;
49
- }
50
-
51
- [dir=rtl] .labelText {
52
- margin-left: var(--zd_size5) ;
53
- }
54
-
55
50
  .labelCnt:hover .arrowIcon {
56
51
  color: var(--zdt_viewdropdown_hover_label_text);
57
52
  }
58
53
 
59
54
  .loader {
60
- padding: var(--zd_size12) var(--zd_size15) ;
61
- }
55
+ padding-block: var(--zd_size12) ;
56
+ padding-inline:var(--zd_size15) ;
57
+ }
@@ -1,10 +1,8 @@
1
1
  .container {
2
2
  min-height: var(--zd_size51) ;
3
3
  position: relative;
4
- }[dir=ltr] .container {
5
- padding: 0 var(--zd_size30) 0 var(--zd_size10) ;
6
- }[dir=rtl] .container {
7
- padding: 0 var(--zd_size10) 0 var(--zd_size30) ;
4
+ padding-inline:var(--zd_size10) var(--zd_size30) ;
5
+ padding-block:0 ;
8
6
  }
9
7
  .default {
10
8
  background-color: var(--zdt_lookupheader_default_bg);
@@ -14,8 +12,10 @@
14
12
  background-color: var(--zdt_lookupheader_white_bg);
15
13
  border-bottom: solid 1px var(--zdt_lookupheader_white_border);
16
14
  }
17
- .searchContainer, .title {
18
- margin: 0 var(--zd_size20) ;
15
+ .searchContainer,
16
+ .title {
17
+ margin-inline: var(--zd_size20) ;
18
+ margin-block:0 ;
19
19
  }
20
20
  [dir=ltr] .searchContainer {
21
21
  text-align: right;
@@ -30,7 +30,8 @@
30
30
  composes: middleY from '~@zohodesk/components/es/common/common.module.css'; */
31
31
  }
32
32
  .para {
33
+ margin-inline: var(--zd_size20) ;
34
+ margin-block:0 ;
33
35
  font-size: var(--zd_font_size12) ;
34
36
  color: var(--zdt_lookupheader_para_text);
35
- margin: 0 var(--zd_size20) ;
36
37
  }
@@ -1,15 +1,11 @@
1
1
  /* Responsive */
2
2
  .extraSmall {
3
+ padding-block: var(--zd_size12) ;
4
+ padding-inline:0 var(--zd_size45) ;
3
5
  justify-content: normal;
4
6
  flex-direction: column;
5
7
  align-items: flex-start;
6
8
  }
7
- [dir=ltr] .extraSmall {
8
- padding: var(--zd_size12) var(--zd_size45) var(--zd_size12) 0 ;
9
- }
10
- [dir=rtl] .extraSmall {
11
- padding: var(--zd_size12) 0 var(--zd_size12) var(--zd_size45) ;
12
- }
13
9
 
14
10
  [dir=ltr] .extraSmall .searchContainer {
15
11
  text-align: left;
@@ -1,5 +1,3 @@
1
- [dir=ltr] .container {
2
- margin-right: var(--zd_size15) ;
3
- }[dir=rtl] .container {
4
- margin-left: var(--zd_size15) ;
1
+ .container {
2
+ margin-inline-end: var(--zd_size15) ;
5
3
  }