@zohodesk/components 1.0.0-temp-252.4 → 1.0.0-temp-256

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 (88) hide show
  1. package/README.md +20 -3
  2. package/assets/Appearance/dark/mode/Component_DarkMode.module.css +4 -4
  3. package/assets/Appearance/dark/themes/blue/blue_componentsCTA_DarkModifyCategory.module.css +14 -0
  4. package/assets/Appearance/dark/themes/green/green_componentsCTA_DarkModifyCategory.module.css +14 -0
  5. package/assets/Appearance/dark/themes/orange/orange_componentsCTA_DarkModifyCategory.module.css +14 -0
  6. package/assets/Appearance/dark/themes/red/red_componentsCTA_DarkModifyCategory.module.css +14 -0
  7. package/assets/Appearance/dark/themes/yellow/yellow_componentsCTA_DarkModifyCategory.module.css +14 -0
  8. package/assets/Appearance/light/mode/Component_LightMode.module.css +6 -6
  9. package/assets/Appearance/light/themes/blue/blue_componentsCTA_LightModifyCategory.module.css +14 -0
  10. package/assets/Appearance/light/themes/green/green_componentsCTA_LightModifyCategory.module.css +14 -0
  11. package/assets/Appearance/light/themes/orange/orange_componentsCTA_LightModifyCategory.module.css +14 -0
  12. package/assets/Appearance/light/themes/red/red_componentsCTA_LightModifyCategory.module.css +14 -0
  13. package/assets/Appearance/light/themes/yellow/yellow_componentsCTA_LightModifyCategory.module.css +14 -0
  14. package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +3 -3
  15. package/assets/Appearance/pureDark/themes/blue/blue_componentsCTA_PureDarkModifyCategory.module.css +14 -0
  16. package/assets/Appearance/pureDark/themes/green/green_componentsCTA_PureDarkModifyCategory.module.css +14 -0
  17. package/assets/Appearance/pureDark/themes/orange/orange_componentsCTA_PureDarkModifyCategory.module.css +14 -0
  18. package/assets/Appearance/pureDark/themes/red/red_componentsCTA_PureDarkModifyCategory.module.css +14 -0
  19. package/assets/Appearance/pureDark/themes/yellow/yellow_componentsCTA_PureDarkModifyCategory.module.css +14 -0
  20. package/cbt.config.js +12 -3
  21. package/es/Avatar/Avatar.js +1 -2
  22. package/es/Button/css/cssJSLogic.js +4 -5
  23. package/es/DateTime/DateTime.js +3 -6
  24. package/es/DateTime/DateWidget.js +34 -11
  25. package/es/DateTime/YearView.js +5 -6
  26. package/es/DateTime/common.js +2 -9
  27. package/es/DateTime/dateFormatUtils/dateFormat.js +55 -76
  28. package/es/DateTime/dateFormatUtils/index.js +7 -12
  29. package/es/DateTime/dateFormatUtils/timeChange.js +3 -4
  30. package/es/DateTime/dateFormatUtils/yearChange.js +3 -4
  31. package/es/DropBox/DropBoxElement/css/cssJSLogic.js +5 -6
  32. package/es/Layout/utils.js +1 -2
  33. package/es/ListItem/ListContainer.js +4 -5
  34. package/es/Modal/Portal/Portal.js +4 -5
  35. package/es/MultiSelect/AdvancedGroupMultiSelect.js +91 -103
  36. package/es/MultiSelect/AdvancedMultiSelect.js +74 -80
  37. package/es/MultiSelect/MultiSelect.js +4 -13
  38. package/es/MultiSelect/Suggestions.js +14 -17
  39. package/es/Popup/Popup.js +1 -4
  40. package/es/Provider/IdProvider.js +4 -5
  41. package/es/Provider/LibraryContext.js +15 -12
  42. package/es/Provider/NumberGenerator/NumberGenerator.js +15 -17
  43. package/es/Provider/ZindexProvider.js +4 -5
  44. package/es/Responsive/CustomResponsive.js +8 -11
  45. package/es/Responsive/ResizeComponent.js +1 -3
  46. package/es/Responsive/Responsive.js +9 -12
  47. package/es/Responsive/sizeObservers.js +1 -5
  48. package/es/ResponsiveDropBox/ResponsiveDropBox.js +10 -14
  49. package/es/Select/GroupSelect.js +98 -103
  50. package/es/Select/Select.js +110 -116
  51. package/es/Select/SelectWithAvatar.js +91 -95
  52. package/es/Select/SelectWithIcon.js +104 -109
  53. package/es/Select/__tests__/Select.spec.js +6 -9
  54. package/es/Tab/Tab.js +90 -40
  55. package/es/Tab/Tab.module.css +25 -0
  56. package/es/Tab/TabContent.js +16 -19
  57. package/es/Tab/TabContentWrapper.js +19 -22
  58. package/es/Tab/TabWrapper.js +15 -16
  59. package/es/Tab/Tabs.js +105 -81
  60. package/es/Tab/Tabs.module.css +48 -3
  61. package/es/Tab/__tests__/Tab.spec.js +112 -0
  62. package/es/Tab/__tests__/__snapshots__/Tab.spec.js.snap +316 -0
  63. package/es/Tab/props/defaultProps.js +3 -2
  64. package/es/Tab/props/propTypes.js +12 -3
  65. package/es/Tab/utils/tabConfigs.js +5 -0
  66. package/es/Typography/css/cssJSLogic.js +4 -5
  67. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +1 -2
  68. package/es/utils/Common.js +10 -31
  69. package/es/utils/datetime/common.js +12 -9
  70. package/es/utils/dropDownUtils.js +7 -11
  71. package/es/utils/getInitial.js +1 -3
  72. package/es/v1/Button/css/cssJSLogic.js +4 -8
  73. package/es/v1/Label/css/cssJSLogic.js +4 -5
  74. package/es/v1/Switch/css/cssJSLogic.js +4 -5
  75. package/es/v1/helpers/colorHelpers/colorHelper.js +28 -39
  76. package/lib/DateTime/DateWidget.js +33 -6
  77. package/lib/Provider/LibraryContext.js +5 -1
  78. package/lib/Tab/Tab.js +62 -9
  79. package/lib/Tab/Tab.module.css +25 -0
  80. package/lib/Tab/Tabs.js +34 -3
  81. package/lib/Tab/Tabs.module.css +48 -3
  82. package/lib/Tab/__tests__/Tab.spec.js +115 -0
  83. package/lib/Tab/__tests__/__snapshots__/Tab.spec.js.snap +316 -0
  84. package/lib/Tab/props/defaultProps.js +3 -2
  85. package/lib/Tab/props/propTypes.js +14 -3
  86. package/lib/Tab/utils/tabConfigs.js +7 -1
  87. package/lib/utils/datetime/common.js +10 -2
  88. package/package.json +12 -11
@@ -493,8 +493,7 @@ export class GroupSelectComponent extends PureComponent {
493
493
  isScrollReachedBottom && this.handleGetNextOptions();
494
494
  }
495
495
 
496
- handleFetchOptions(APICall) {
497
- let searchStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
496
+ handleFetchOptions(APICall, searchStr = '') {
498
497
  // let funcArgs = args.slice(1, args.length);
499
498
  let {
500
499
  isFetchingOptions = false
@@ -537,10 +536,9 @@ export class GroupSelectComponent extends PureComponent {
537
536
  isNextOptions && getNextOptions && this.handleFetchOptions(getNextOptions, searchStr);
538
537
  }
539
538
 
540
- responsiveFunc(_ref) {
541
- let {
542
- mediaQueryOR
543
- } = _ref;
539
+ responsiveFunc({
540
+ mediaQueryOR
541
+ }) {
544
542
  return {
545
543
  tabletMode: mediaQueryOR([{
546
544
  maxWidth: 700
@@ -716,107 +714,104 @@ export class GroupSelectComponent extends PureComponent {
716
714
  }, TextBoxProps)))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
717
715
  query: this.responsiveFunc,
718
716
  responsiveId: "Helmet"
719
- }, _ref2 => {
717
+ }, ({
718
+ tabletMode
719
+ }) => /*#__PURE__*/React.createElement(ResponsiveDropBox, {
720
+ animationStyle: animationStyle,
721
+ boxPosition: position || `${defaultDropBoxPosition}Center`,
722
+ getRef: getContainerRef,
723
+ isActive: isPopupReady,
724
+ isAnimate: true,
725
+ isArrow: false,
726
+ onClick: removeClose,
727
+ needResponsive: needResponsive,
728
+ isPadding: false,
729
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
730
+ positionsOffset: positionsOffset,
731
+ targetOffset: targetOffset,
732
+ isRestrictScroll: isRestrictScroll,
733
+ isResponsivePadding: getFooter ? false : true,
734
+ alignBox: "row",
735
+ dataId: `${dataId}_suggestionBox`,
736
+ customClass: {
737
+ customDropBox: dropBoxClass
738
+ }
739
+ }, isLoading ? /*#__PURE__*/React.createElement(Container, {
740
+ align: "both",
741
+ className: style.loader
742
+ }, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(Box, {
743
+ flexible: true
744
+ }, /*#__PURE__*/React.createElement(Card, {
745
+ customClass: style.box,
746
+ onScroll: this.handleScroll
747
+ }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
748
+ className: `${style.search} ${style[size]}`
749
+ }, /*#__PURE__*/React.createElement(TextBoxIcon, {
750
+ inputRef: this.searchInputRef,
751
+ maxLength: maxLength,
752
+ onChange: this.handleSearch,
753
+ onKeyDown: this.handleKeyDown,
754
+ placeHolder: searchBoxPlaceHolder,
755
+ size: searchBoxSize,
756
+ value: searchStr,
757
+ onClear: this.handleClearSearch,
758
+ a11y: {
759
+ ariaControls: setAriaId,
760
+ ariaAutocomplete: 'list',
761
+ ariaDescribedby: ariaErrorId
762
+ },
763
+ autoComplete: false,
764
+ dataId: `${dataId}_search`
765
+ }))) : null, /*#__PURE__*/React.createElement(CardContent, {
766
+ shrink: true,
767
+ customClass: `${!tabletMode && dropBoxSize ? style[dropBoxSize] : ''} ${cardContentClass}`,
768
+ eleRef: this.suggestionContainerRef
769
+ }, suggestionGroups.length ? suggestionGroups.map(group => {
720
770
  let {
721
- tabletMode
722
- } = _ref2;
723
- return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
724
- animationStyle: animationStyle,
725
- boxPosition: position || `${defaultDropBoxPosition}Center`,
726
- getRef: getContainerRef,
727
- isActive: isPopupReady,
728
- isAnimate: true,
729
- isArrow: false,
730
- onClick: removeClose,
731
- needResponsive: needResponsive,
732
- isPadding: false,
733
- isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
734
- positionsOffset: positionsOffset,
735
- targetOffset: targetOffset,
736
- isRestrictScroll: isRestrictScroll,
737
- isResponsivePadding: getFooter ? false : true,
738
- alignBox: "row",
739
- dataId: `${dataId}_suggestionBox`,
740
- customClass: {
741
- customDropBox: dropBoxClass
771
+ id: groupId,
772
+ name: groupName,
773
+ options
774
+ } = group;
775
+ let hoverId = suggestionOptionIds[hoverIndex];
776
+ return /*#__PURE__*/React.createElement(React.Fragment, {
777
+ key: groupId
778
+ }, groupName && /*#__PURE__*/React.createElement("div", {
779
+ className: style.groupTitle
780
+ }, /*#__PURE__*/React.createElement(DropDownHeading, {
781
+ text: groupName,
782
+ a11y: {
783
+ role: 'heading'
742
784
  }
743
- }, isLoading ? /*#__PURE__*/React.createElement(Container, {
744
- align: "both",
745
- className: style.loader
746
- }, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(Box, {
747
- flexible: true
748
- }, /*#__PURE__*/React.createElement(Card, {
749
- customClass: style.box,
750
- onScroll: this.handleScroll
751
- }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
752
- className: `${style.search} ${style[size]}`
753
- }, /*#__PURE__*/React.createElement(TextBoxIcon, {
754
- inputRef: this.searchInputRef,
755
- maxLength: maxLength,
756
- onChange: this.handleSearch,
757
- onKeyDown: this.handleKeyDown,
758
- placeHolder: searchBoxPlaceHolder,
759
- size: searchBoxSize,
760
- value: searchStr,
761
- onClear: this.handleClearSearch,
785
+ })), /*#__PURE__*/React.createElement(Suggestions, _extends({
786
+ activeId: selectedId,
787
+ suggestions: options,
788
+ getRef: this.suggestionItemRef,
789
+ hoverId: hoverId,
790
+ onClick: this.handleChange,
791
+ onMouseEnter: this.handleMouseEnter,
792
+ selectedOptions: [selectedId],
793
+ needTick: needTick,
794
+ needBorder: false,
795
+ htmlId: setAriaId,
762
796
  a11y: {
763
- ariaControls: setAriaId,
764
- ariaAutocomplete: 'list',
765
- ariaDescribedby: ariaErrorId
797
+ ariaParentRole: 'listbox',
798
+ role: 'option'
766
799
  },
767
- autoComplete: false,
768
- dataId: `${dataId}_search`
769
- }))) : null, /*#__PURE__*/React.createElement(CardContent, {
770
- shrink: true,
771
- customClass: `${!tabletMode && dropBoxSize ? style[dropBoxSize] : ''} ${cardContentClass}`,
772
- eleRef: this.suggestionContainerRef
773
- }, suggestionGroups.length ? suggestionGroups.map(group => {
774
- let {
775
- id: groupId,
776
- name: groupName,
777
- options
778
- } = group;
779
- let hoverId = suggestionOptionIds[hoverIndex];
780
- return /*#__PURE__*/React.createElement(React.Fragment, {
781
- key: groupId
782
- }, groupName && /*#__PURE__*/React.createElement("div", {
783
- className: style.groupTitle
784
- }, /*#__PURE__*/React.createElement(DropDownHeading, {
785
- text: groupName,
786
- a11y: {
787
- role: 'heading'
788
- }
789
- })), /*#__PURE__*/React.createElement(Suggestions, _extends({
790
- activeId: selectedId,
791
- suggestions: options,
792
- getRef: this.suggestionItemRef,
793
- hoverId: hoverId,
794
- onClick: this.handleChange,
795
- onMouseEnter: this.handleMouseEnter,
796
- selectedOptions: [selectedId],
797
- needTick: needTick,
798
- needBorder: false,
799
- htmlId: setAriaId,
800
- a11y: {
801
- ariaParentRole: 'listbox',
802
- role: 'option'
803
- },
804
- dataId: `${dataId}_Options`
805
- }, SuggestionsProps)));
806
- }) : /*#__PURE__*/React.createElement(EmptyState, {
807
- options: revampedGroups,
808
- searchString: searchStr,
809
- suggestions: suggestionGroups,
810
- renderCustomEmptyState: renderCustomEmptyState,
811
- dataId: dataIdSrchEmptyMsg,
812
- isLoading: isFetchingOptions,
813
- i18nKeys: i18nKeys,
814
- htmlId: ariaErrorId
815
- }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
816
- isCover: false,
817
- align: "both"
818
- }, /*#__PURE__*/React.createElement(Loader, null))), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)));
819
- }) : null);
800
+ dataId: `${dataId}_Options`
801
+ }, SuggestionsProps)));
802
+ }) : /*#__PURE__*/React.createElement(EmptyState, {
803
+ options: revampedGroups,
804
+ searchString: searchStr,
805
+ suggestions: suggestionGroups,
806
+ renderCustomEmptyState: renderCustomEmptyState,
807
+ dataId: dataIdSrchEmptyMsg,
808
+ isLoading: isFetchingOptions,
809
+ i18nKeys: i18nKeys,
810
+ htmlId: ariaErrorId
811
+ }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
812
+ isCover: false,
813
+ align: "both"
814
+ }, /*#__PURE__*/React.createElement(Loader, null))), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)))) : null);
820
815
  }
821
816
 
822
817
  }
@@ -325,10 +325,9 @@ export class SelectComponent extends Component {
325
325
  needCloseOnSelect && this.handlePopupClose(e);
326
326
  }
327
327
 
328
- responsiveFunc(_ref) {
329
- let {
330
- mediaQueryOR
331
- } = _ref;
328
+ responsiveFunc({
329
+ mediaQueryOR
330
+ }) {
332
331
  return {
333
332
  tabletMode: mediaQueryOR([{
334
333
  maxWidth: 700
@@ -508,8 +507,7 @@ export class SelectComponent extends Component {
508
507
  isScrollReachedBottom && this.handleGetNextOptions();
509
508
  }
510
509
 
511
- handleFetchOptions(APICall) {
512
- let searchStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
510
+ handleFetchOptions(APICall, searchStr = '') {
513
511
  // let funcArgs = args.slice(1, args.length);
514
512
  let {
515
513
  isFetchingOptions = false
@@ -724,14 +722,13 @@ export class SelectComponent extends Component {
724
722
  });
725
723
  }
726
724
 
727
- getInputFieldLineA11y(_ref2) {
728
- let {
729
- setAriaId,
730
- isReadOnly,
731
- isDisabled,
732
- isPopupOpen,
733
- inputFieldLineA11y
734
- } = _ref2;
725
+ getInputFieldLineA11y({
726
+ setAriaId,
727
+ isReadOnly,
728
+ isDisabled,
729
+ isPopupOpen,
730
+ inputFieldLineA11y
731
+ }) {
735
732
  return {
736
733
  tabIndex: 0,
737
734
  role: 'button',
@@ -996,109 +993,106 @@ export class SelectComponent extends Component {
996
993
  })), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
997
994
  query: this.responsiveFunc,
998
995
  responsiveId: "Helmet"
999
- }, _ref3 => {
1000
- let {
1001
- tabletMode
1002
- } = _ref3;
1003
- return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
1004
- animationStyle: animationStyle,
1005
- boxPosition: position || `${defaultDropBoxPosition}`,
1006
- getRef: getContainerRef,
1007
- isActive: isPopupReady,
1008
- isAnimate: isAnimate && !isVirtualizerEnabled // Note: Virtualizer gets element height at mount itself which causes issue with options height
1009
- ,
1010
- isArrow: false,
1011
- onClick: removeClose,
1012
- needResponsive: needResponsive,
1013
- dataId: `${dataId}_suggestions`,
1014
- size: boxSize,
1015
- isPadding: false,
1016
- isResponsivePadding: getFooter ? false : true,
1017
- alignBox: "row",
1018
- isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
1019
- positionsOffset: positionsOffset,
1020
- targetOffset: targetOffset,
1021
- isRestrictScroll: isRestrictScroll,
1022
- portalId: dropBoxPortalId,
1023
- customClass: {
1024
- customDropBox: dropBoxClass
1025
- }
1026
- }, isLoading ? /*#__PURE__*/React.createElement(Container, {
1027
- align: "both",
1028
- className: style.loader
1029
- }, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(React.Fragment, null, !getChildren ? /*#__PURE__*/React.createElement(Box, {
1030
- flexible: true
1031
- }, /*#__PURE__*/React.createElement(Card, {
1032
- onScroll: this.handleScroll
1033
- }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
1034
- className: `${style.search} ${style[size]}`
1035
- }, /*#__PURE__*/React.createElement(TextBoxIcon, {
1036
- a11y: {
1037
- ariaControls: setAriaId,
1038
- ariaAutocomplete: 'list',
1039
- ariaDescribedby: ariaErrorId
1040
- },
1041
- inputRef: this.searchInputRef,
1042
- maxLength: maxLength,
1043
- onChange: this.handleSearch,
1044
- onKeyDown: this.handleKeyDown,
1045
- placeHolder: searchBoxPlaceHolder,
1046
- size: searchBoxSize,
1047
- value: searchStr,
1048
- onClear: this.handleClearSearch,
1049
- dataId: `${dataId}_search`,
1050
- i18nKeys: TextBoxIcon_i18n,
1051
- autoComplete: autoComplete,
1052
- customProps: {
1053
- TextBoxProps: DropdownSearchTextBoxProps
1054
- },
1055
- renderCustomClearComponent: renderCustomSearchClearComponent
1056
- }))) : null, /*#__PURE__*/React.createElement(CardContent, {
1057
- shrink: true,
1058
- customClass: `
996
+ }, ({
997
+ tabletMode
998
+ }) => /*#__PURE__*/React.createElement(ResponsiveDropBox, {
999
+ animationStyle: animationStyle,
1000
+ boxPosition: position || `${defaultDropBoxPosition}`,
1001
+ getRef: getContainerRef,
1002
+ isActive: isPopupReady,
1003
+ isAnimate: isAnimate && !isVirtualizerEnabled // Note: Virtualizer gets element height at mount itself which causes issue with options height
1004
+ ,
1005
+ isArrow: false,
1006
+ onClick: removeClose,
1007
+ needResponsive: needResponsive,
1008
+ dataId: `${dataId}_suggestions`,
1009
+ size: boxSize,
1010
+ isPadding: false,
1011
+ isResponsivePadding: getFooter ? false : true,
1012
+ alignBox: "row",
1013
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
1014
+ positionsOffset: positionsOffset,
1015
+ targetOffset: targetOffset,
1016
+ isRestrictScroll: isRestrictScroll,
1017
+ portalId: dropBoxPortalId,
1018
+ customClass: {
1019
+ customDropBox: dropBoxClass
1020
+ }
1021
+ }, isLoading ? /*#__PURE__*/React.createElement(Container, {
1022
+ align: "both",
1023
+ className: style.loader
1024
+ }, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(React.Fragment, null, !getChildren ? /*#__PURE__*/React.createElement(Box, {
1025
+ flexible: true
1026
+ }, /*#__PURE__*/React.createElement(Card, {
1027
+ onScroll: this.handleScroll
1028
+ }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
1029
+ className: `${style.search} ${style[size]}`
1030
+ }, /*#__PURE__*/React.createElement(TextBoxIcon, {
1031
+ a11y: {
1032
+ ariaControls: setAriaId,
1033
+ ariaAutocomplete: 'list',
1034
+ ariaDescribedby: ariaErrorId
1035
+ },
1036
+ inputRef: this.searchInputRef,
1037
+ maxLength: maxLength,
1038
+ onChange: this.handleSearch,
1039
+ onKeyDown: this.handleKeyDown,
1040
+ placeHolder: searchBoxPlaceHolder,
1041
+ size: searchBoxSize,
1042
+ value: searchStr,
1043
+ onClear: this.handleClearSearch,
1044
+ dataId: `${dataId}_search`,
1045
+ i18nKeys: TextBoxIcon_i18n,
1046
+ autoComplete: autoComplete,
1047
+ customProps: {
1048
+ TextBoxProps: DropdownSearchTextBoxProps
1049
+ },
1050
+ renderCustomClearComponent: renderCustomSearchClearComponent
1051
+ }))) : null, /*#__PURE__*/React.createElement(CardContent, {
1052
+ shrink: true,
1053
+ customClass: `
1059
1054
  ${!tabletMode && dropBoxSize ? style[dropBoxSize] : ''} ${cardContentClass}`,
1060
- eleRef: this.suggestionContainerRef
1061
- }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
1062
- key: searchStr.trim(),
1063
- activeId: selectedId,
1064
- isVirtualizerEnabled: isVirtualizerEnabled,
1065
- getVirtualizerPublicMethods: this.getVirtualizerPublicMethods,
1066
- setVirtualizerContainerRefFunction: this.setSuggestionsVirtualizerContainerRefFunction,
1067
- suggestions: suggestions,
1068
- getRef: this.suggestionItemRef,
1069
- hoverOption: hoverIndex,
1070
- onClick: this.handleChange,
1071
- onMouseEnter: this.handleMouseEnter,
1072
- dataId: `${dataId}_Options`,
1073
- needTick: needTick,
1074
- needBorder: needListBorder,
1075
- selectedOptions: [selectedId],
1076
- className: `${tabletMode ? style.responsivelistItemContainer : style.listItemContainer}`,
1077
- listItemSize: listItemSize,
1078
- htmlId: setAriaId,
1079
- a11y: {
1080
- ariaParentRole: 'listbox',
1081
- role: 'option'
1082
- }
1083
- }, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
1084
- isLoading: isFetchingOptions,
1085
- options: options,
1086
- searchString: searchStr,
1087
- suggestions: suggestions,
1088
- dataId: dataId,
1089
- renderCustomEmptyState: renderCustomEmptyState,
1090
- getCustomEmptyState: getCustomEmptyState ? this.handleGetAddNewOptionText : null,
1091
- i18nKeys: i18nKeys,
1092
- htmlId: ariaErrorId
1093
- }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
1094
- isCover: false,
1095
- align: "both"
1096
- }, /*#__PURE__*/React.createElement(Loader, null))), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter({
1097
- closePopup: this.handlePopupClose
1098
- })) : null)) : /*#__PURE__*/React.createElement(Box, {
1099
- flexible: true
1100
- }, getChildren())));
1101
- }) : null);
1055
+ eleRef: this.suggestionContainerRef
1056
+ }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
1057
+ key: searchStr.trim(),
1058
+ activeId: selectedId,
1059
+ isVirtualizerEnabled: isVirtualizerEnabled,
1060
+ getVirtualizerPublicMethods: this.getVirtualizerPublicMethods,
1061
+ setVirtualizerContainerRefFunction: this.setSuggestionsVirtualizerContainerRefFunction,
1062
+ suggestions: suggestions,
1063
+ getRef: this.suggestionItemRef,
1064
+ hoverOption: hoverIndex,
1065
+ onClick: this.handleChange,
1066
+ onMouseEnter: this.handleMouseEnter,
1067
+ dataId: `${dataId}_Options`,
1068
+ needTick: needTick,
1069
+ needBorder: needListBorder,
1070
+ selectedOptions: [selectedId],
1071
+ className: `${tabletMode ? style.responsivelistItemContainer : style.listItemContainer}`,
1072
+ listItemSize: listItemSize,
1073
+ htmlId: setAriaId,
1074
+ a11y: {
1075
+ ariaParentRole: 'listbox',
1076
+ role: 'option'
1077
+ }
1078
+ }, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
1079
+ isLoading: isFetchingOptions,
1080
+ options: options,
1081
+ searchString: searchStr,
1082
+ suggestions: suggestions,
1083
+ dataId: dataId,
1084
+ renderCustomEmptyState: renderCustomEmptyState,
1085
+ getCustomEmptyState: getCustomEmptyState ? this.handleGetAddNewOptionText : null,
1086
+ i18nKeys: i18nKeys,
1087
+ htmlId: ariaErrorId
1088
+ }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
1089
+ isCover: false,
1090
+ align: "both"
1091
+ }, /*#__PURE__*/React.createElement(Loader, null))), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter({
1092
+ closePopup: this.handlePopupClose
1093
+ })) : null)) : /*#__PURE__*/React.createElement(Box, {
1094
+ flexible: true
1095
+ }, getChildren())))) : null);
1102
1096
  }
1103
1097
 
1104
1098
  }