@zohodesk/components 1.0.0-alpha-239 → 1.0.0-alpha-242

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 (49) hide show
  1. package/README.md +20 -6
  2. package/assets/Appearance/dark/mode/darkMode.module.css +2 -2
  3. package/assets/Appearance/default/mode/defaultMode.module.css +3 -3
  4. package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +2 -2
  5. package/es/DateTime/DateTime.js +42 -21
  6. package/es/DateTime/DateWidget.module.css +0 -4
  7. package/es/MultiSelect/AdvancedGroupMultiSelect.js +100 -75
  8. package/es/MultiSelect/AdvancedMultiSelect.js +75 -49
  9. package/es/MultiSelect/MultiSelect.js +80 -55
  10. package/es/MultiSelect/MultiSelect.module.css +6 -1
  11. package/es/MultiSelect/MultiSelectWithAvatar.js +77 -52
  12. package/es/PopOver/PopOver.js +10 -4
  13. package/es/Provider.js +5 -105
  14. package/es/ResponsiveDropBox/ResponsiveDropBox.js +74 -0
  15. package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
  16. package/es/Select/GroupSelect.js +99 -74
  17. package/es/Select/Select.js +95 -68
  18. package/es/Select/Select.module.css +6 -0
  19. package/es/Select/SelectWithAvatar.js +91 -66
  20. package/es/Select/SelectWithIcon.js +99 -74
  21. package/es/Tab/Tabs.js +68 -43
  22. package/es/Tab/Tabs.module.css +2 -1
  23. package/es/Tag/Tag.js +1 -1
  24. package/es/Tag/Tag.module.css +6 -2
  25. package/es/Tooltip/Tooltip.js +1 -1
  26. package/es/index.js +2 -1
  27. package/lib/DateTime/DateTime.js +42 -22
  28. package/lib/DateTime/DateWidget.module.css +0 -4
  29. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +99 -77
  30. package/lib/MultiSelect/AdvancedMultiSelect.js +76 -50
  31. package/lib/MultiSelect/MultiSelect.js +81 -56
  32. package/lib/MultiSelect/MultiSelect.module.css +6 -1
  33. package/lib/MultiSelect/MultiSelectWithAvatar.js +78 -53
  34. package/lib/PopOver/PopOver.js +11 -4
  35. package/lib/Provider.js +6 -123
  36. package/lib/ResponsiveDropBox/ResponsiveDropBox.js +130 -0
  37. package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
  38. package/lib/Select/GroupSelect.js +99 -76
  39. package/lib/Select/Select.js +102 -75
  40. package/lib/Select/Select.module.css +6 -0
  41. package/lib/Select/SelectWithAvatar.js +96 -71
  42. package/lib/Select/SelectWithIcon.js +97 -74
  43. package/lib/Tab/Tabs.js +67 -44
  44. package/lib/Tab/Tabs.module.css +2 -1
  45. package/lib/Tag/Tag.js +1 -1
  46. package/lib/Tag/Tag.module.css +6 -2
  47. package/lib/Tooltip/Tooltip.js +1 -1
  48. package/lib/index.js +10 -1
  49. package/package.json +3 -3
@@ -4,7 +4,6 @@ import PropTypes from 'prop-types';
4
4
  /**** Components ****/
5
5
 
6
6
  import Popup from '../Popup/Popup';
7
- import DropBox from '../DropBox/DropBox';
8
7
  import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
9
8
  import Textbox from '../TextBox/TextBox';
10
9
  import Card, { CardHeader, CardContent, CardFooter } from '../Card/Card';
@@ -12,8 +11,10 @@ import Suggestions from '../MultiSelect/Suggestions';
12
11
  import EmptyState from '../MultiSelect/EmptyState';
13
12
  import Icon from '@zohodesk/icons/lib/Icon';
14
13
  import DropDownHeading from '../DropDown/DropDownHeading';
15
- import { Container } from '../Layout';
14
+ import { Container, Box } from '../Layout';
16
15
  import { getUniqueId } from '../Provider/IdProvider';
16
+ import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
17
+ import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
17
18
  import style from './Select.module.css';
18
19
  /**** Methods ****/
19
20
 
@@ -533,6 +534,17 @@ export class GroupSelectComponent extends PureComponent {
533
534
  isNextOptions && getNextOptions && this.handleFetchOptions(getNextOptions, searchStr);
534
535
  }
535
536
 
537
+ responsiveFunc(_ref) {
538
+ let {
539
+ mediaQueryOR
540
+ } = _ref;
541
+ return {
542
+ tabletMode: mediaQueryOR([{
543
+ maxWidth: 700
544
+ }])
545
+ };
546
+ }
547
+
536
548
  render() {
537
549
  let {
538
550
  isDisabled,
@@ -671,80 +683,93 @@ export class GroupSelectComponent extends PureComponent {
671
683
  },
672
684
  autoComplete: false,
673
685
  isFocus: isPopupReady
674
- }))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, {
675
- animationStyle: animationStyle,
676
- boxPosition: position || `${defaultDropBoxPosition}Center`,
677
- getRef: getContainerRef,
678
- isActive: isPopupReady,
679
- isAnimate: true,
680
- isArrow: false,
681
- onClick: removeClose,
682
- needResponsive: needResponsive,
683
- isPadding: false
684
- }, /*#__PURE__*/React.createElement(Card, {
685
- customClass: style.box,
686
- onScroll: this.handleScroll
687
- }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
688
- className: `${style.search} ${style[size]}`
689
- }, /*#__PURE__*/React.createElement(TextBoxIcon, {
690
- inputRef: this.searchInputRef,
691
- maxLength: maxLength,
692
- onChange: this.handleSearch,
693
- onKeyDown: this.handleKeyDown,
694
- placeHolder: searchBoxPlaceHolder,
695
- size: searchBoxSize,
696
- value: searchStr,
697
- onClear: this.handleClearSearch,
698
- a11y: {
699
- ariaControls: setAriaId,
700
- ariaAutocomplete: 'list',
701
- ariaDescribedby: ariaErrorId
702
- },
703
- autoComplete: false
704
- }))) : null, /*#__PURE__*/React.createElement(CardContent, {
705
- customClass: dropBoxSize ? style[dropBoxSize] : '',
706
- eleRef: this.suggestionContainerRef
707
- }, suggestionGroups.length ? suggestionGroups.map(group => {
686
+ }))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
687
+ query: this.responsiveFunc,
688
+ responsiveId: "Helmet"
689
+ }, _ref2 => {
708
690
  let {
709
- id: groupId,
710
- name: groupName,
711
- options
712
- } = group;
713
- let hoverId = suggestionOptionIds[hoverIndex];
714
- return /*#__PURE__*/React.createElement(React.Fragment, {
715
- key: groupId
716
- }, groupName && /*#__PURE__*/React.createElement("div", {
717
- className: style.groupTitle
718
- }, /*#__PURE__*/React.createElement(DropDownHeading, {
719
- text: groupName,
691
+ tabletMode
692
+ } = _ref2;
693
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
694
+ animationStyle: animationStyle,
695
+ boxPosition: position || `${defaultDropBoxPosition}Center`,
696
+ getRef: getContainerRef,
697
+ isActive: isPopupReady,
698
+ isAnimate: true,
699
+ isArrow: false,
700
+ onClick: removeClose,
701
+ needResponsive: needResponsive,
702
+ isPadding: false,
703
+ isResponsivePadding: getFooter ? false : true,
704
+ alignBox: "row"
705
+ }, /*#__PURE__*/React.createElement(Box, {
706
+ flexible: true
707
+ }, /*#__PURE__*/React.createElement(Card, {
708
+ customClass: style.box,
709
+ onScroll: this.handleScroll
710
+ }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
711
+ className: `${style.search} ${style[size]}`
712
+ }, /*#__PURE__*/React.createElement(TextBoxIcon, {
713
+ inputRef: this.searchInputRef,
714
+ maxLength: maxLength,
715
+ onChange: this.handleSearch,
716
+ onKeyDown: this.handleKeyDown,
717
+ placeHolder: searchBoxPlaceHolder,
718
+ size: searchBoxSize,
719
+ value: searchStr,
720
+ onClear: this.handleClearSearch,
720
721
  a11y: {
721
- role: 'heading'
722
- }
723
- })), /*#__PURE__*/React.createElement(Suggestions, {
724
- activeId: selectedId,
725
- suggestions: options,
726
- getRef: this.suggestionItemRef,
727
- hoverId: hoverId,
728
- onClick: this.handleChange,
729
- onMouseEnter: this.handleMouseEnter,
730
- selectedOptions: [selectedId],
731
- needTick: needTick,
732
- needBorder: false,
733
- htmlId: setAriaId,
734
- a11y: {
735
- ariaParentRole: 'listbox',
736
- role: 'option'
737
- }
738
- }));
739
- }) : /*#__PURE__*/React.createElement(EmptyState, {
740
- options: revampedGroups,
741
- searchString: searchStr,
742
- suggestions: suggestionGroups,
743
- dataId: dataIdSrchEmptyMsg,
744
- isLoading: isFetchingOptions,
745
- i18nKeys: i18nKeys,
746
- htmlId: ariaErrorId
747
- })), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)) : null);
722
+ ariaControls: setAriaId,
723
+ ariaAutocomplete: 'list',
724
+ ariaDescribedby: ariaErrorId
725
+ },
726
+ autoComplete: false
727
+ }))) : null, /*#__PURE__*/React.createElement(CardContent, {
728
+ shrink: true,
729
+ customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : '',
730
+ eleRef: this.suggestionContainerRef
731
+ }, suggestionGroups.length ? suggestionGroups.map(group => {
732
+ let {
733
+ id: groupId,
734
+ name: groupName,
735
+ options
736
+ } = group;
737
+ let hoverId = suggestionOptionIds[hoverIndex];
738
+ return /*#__PURE__*/React.createElement(React.Fragment, {
739
+ key: groupId
740
+ }, groupName && /*#__PURE__*/React.createElement("div", {
741
+ className: style.groupTitle
742
+ }, /*#__PURE__*/React.createElement(DropDownHeading, {
743
+ text: groupName,
744
+ a11y: {
745
+ role: 'heading'
746
+ }
747
+ })), /*#__PURE__*/React.createElement(Suggestions, {
748
+ activeId: selectedId,
749
+ suggestions: options,
750
+ getRef: this.suggestionItemRef,
751
+ hoverId: hoverId,
752
+ onClick: this.handleChange,
753
+ onMouseEnter: this.handleMouseEnter,
754
+ selectedOptions: [selectedId],
755
+ needTick: needTick,
756
+ needBorder: false,
757
+ htmlId: setAriaId,
758
+ a11y: {
759
+ ariaParentRole: 'listbox',
760
+ role: 'option'
761
+ }
762
+ }));
763
+ }) : /*#__PURE__*/React.createElement(EmptyState, {
764
+ options: revampedGroups,
765
+ searchString: searchStr,
766
+ suggestions: suggestionGroups,
767
+ dataId: dataIdSrchEmptyMsg,
768
+ isLoading: isFetchingOptions,
769
+ i18nKeys: i18nKeys,
770
+ htmlId: ariaErrorId
771
+ })), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)));
772
+ }) : null);
748
773
  }
749
774
 
750
775
  }
@@ -6,7 +6,6 @@ import PropTypes from 'prop-types';
6
6
  /**** Components ****/
7
7
 
8
8
  import Popup from '../Popup/Popup';
9
- import DropBox from '../DropBox/DropBox';
10
9
  import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
11
10
  import { Container, Box } from '../Layout';
12
11
  import Textbox from '../TextBox/TextBox';
@@ -15,6 +14,8 @@ import Suggestions from '../MultiSelect/Suggestions';
15
14
  import EmptyState from '../MultiSelect/EmptyState';
16
15
  import { getUniqueId } from '../Provider/IdProvider';
17
16
  import Icon from '@zohodesk/icons/lib/Icon';
17
+ import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
18
+ import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
18
19
  /**** Methods ****/
19
20
 
20
21
  import { makeFormatOptions, makeGetMultiSelectFilterSuggestions as makeGetFilterSuggestions, makeGetSelectedValueText as makeGetSelectedValue } from '../utils/dropDownUtils';
@@ -278,6 +279,17 @@ export class SelectComponent extends Component {
278
279
  needCloseOnSelect && this.handlePopupClose(e);
279
280
  }
280
281
 
282
+ responsiveFunc(_ref) {
283
+ let {
284
+ mediaQueryOR
285
+ } = _ref;
286
+ return {
287
+ tabletMode: mediaQueryOR([{
288
+ maxWidth: 700
289
+ }])
290
+ };
291
+ }
292
+
281
293
  handleKeyDown(e) {
282
294
  let {
283
295
  onChange,
@@ -835,73 +847,88 @@ export class SelectComponent extends Component {
835
847
  autoComplete: autoComplete,
836
848
  isFocus: isPopupReady,
837
849
  customProps: TextBoxProps
838
- })), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, {
839
- animationStyle: animationStyle,
840
- boxPosition: position || `${defaultDropBoxPosition}`,
841
- getRef: getContainerRef,
842
- isActive: isPopupReady,
843
- isAnimate: true,
844
- isArrow: false,
845
- onClick: removeClose,
846
- needResponsive: needResponsive,
847
- dataId: `${dataId}_suggestions`,
848
- size: boxSize,
849
- isPadding: false
850
- }, !getChildren ? /*#__PURE__*/React.createElement(Card, {
851
- onScroll: this.handleScroll
852
- }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
853
- className: `${style.search} ${style[size]}`
854
- }, /*#__PURE__*/React.createElement(TextBoxIcon, {
855
- a11y: {
856
- ariaControls: setAriaId,
857
- ariaAutocomplete: 'list',
858
- ariaDescribedby: ariaErrorId
859
- },
860
- inputRef: this.searchInputRef,
861
- maxLength: maxLength,
862
- onChange: this.handleSearch,
863
- onKeyDown: this.handleKeyDown,
864
- placeHolder: searchBoxPlaceHolder,
865
- size: searchBoxSize,
866
- value: searchStr,
867
- onClear: this.handleClearSearch,
868
- dataId: `${dataId}_search`,
869
- i18nKeys: TextBoxIcon_i18n,
870
- autoComplete: autoComplete,
871
- customProps: {
872
- TextBoxProps: DropdownSearchTextBoxProps
873
- }
874
- }))) : null, /*#__PURE__*/React.createElement(CardContent, {
875
- customClass: dropBoxSize ? style[dropBoxSize] : '',
876
- eleRef: this.suggestionContainerRef
877
- }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
878
- activeId: selectedId,
879
- suggestions: suggestions,
880
- getRef: this.suggestionItemRef,
881
- hoverOption: hoverIndex,
882
- onClick: this.handleChange,
883
- onMouseEnter: this.handleMouseEnter,
884
- dataId: `${dataId}_Options`,
885
- needTick: needTick,
886
- needBorder: needListBorder,
887
- selectedOptions: [selectedId],
888
- className: style.listItemContainer,
889
- listItemSize: listItemSize,
890
- htmlId: setAriaId,
891
- a11y: {
892
- ariaParentRole: 'listbox',
893
- role: 'option'
894
- }
895
- }, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
896
- isLoading: isFetchingOptions,
897
- options: options,
898
- searchString: searchStr,
899
- suggestions: suggestions,
900
- dataId: dataId,
901
- getCustomEmptyState: getCustomEmptyState ? this.handleGetAddNewOptionText : null,
902
- i18nKeys: i18nKeys,
903
- htmlId: ariaErrorId
904
- })), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null) : getChildren()) : null);
850
+ })), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
851
+ query: this.responsiveFunc,
852
+ responsiveId: "Helmet"
853
+ }, _ref2 => {
854
+ let {
855
+ tabletMode
856
+ } = _ref2;
857
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
858
+ animationStyle: animationStyle,
859
+ boxPosition: position || `${defaultDropBoxPosition}`,
860
+ getRef: getContainerRef,
861
+ isActive: isPopupReady,
862
+ isAnimate: true,
863
+ isArrow: false,
864
+ onClick: removeClose,
865
+ needResponsive: needResponsive,
866
+ dataId: `${dataId}_suggestions`,
867
+ size: boxSize,
868
+ isPadding: false,
869
+ isResponsivePadding: getFooter ? false : true,
870
+ alignBox: "row"
871
+ }, !getChildren ? /*#__PURE__*/React.createElement(Box, {
872
+ flexible: true
873
+ }, /*#__PURE__*/React.createElement(Card, {
874
+ onScroll: this.handleScroll
875
+ }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
876
+ className: `${style.search} ${style[size]}`
877
+ }, /*#__PURE__*/React.createElement(TextBoxIcon, {
878
+ a11y: {
879
+ ariaControls: setAriaId,
880
+ ariaAutocomplete: 'list',
881
+ ariaDescribedby: ariaErrorId
882
+ },
883
+ inputRef: this.searchInputRef,
884
+ maxLength: maxLength,
885
+ onChange: this.handleSearch,
886
+ onKeyDown: this.handleKeyDown,
887
+ placeHolder: searchBoxPlaceHolder,
888
+ size: searchBoxSize,
889
+ value: searchStr,
890
+ onClear: this.handleClearSearch,
891
+ dataId: `${dataId}_search`,
892
+ i18nKeys: TextBoxIcon_i18n,
893
+ autoComplete: autoComplete,
894
+ customProps: {
895
+ TextBoxProps: DropdownSearchTextBoxProps
896
+ }
897
+ }))) : null, /*#__PURE__*/React.createElement(CardContent, {
898
+ shrink: true,
899
+ customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : '',
900
+ eleRef: this.suggestionContainerRef
901
+ }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
902
+ activeId: selectedId,
903
+ suggestions: suggestions,
904
+ getRef: this.suggestionItemRef,
905
+ hoverOption: hoverIndex,
906
+ onClick: this.handleChange,
907
+ onMouseEnter: this.handleMouseEnter,
908
+ dataId: `${dataId}_Options`,
909
+ needTick: needTick,
910
+ needBorder: needListBorder,
911
+ selectedOptions: [selectedId],
912
+ className: `${tabletMode ? style.responsivelistItemContainer : style.listItemContainer}`,
913
+ listItemSize: listItemSize,
914
+ htmlId: setAriaId,
915
+ a11y: {
916
+ ariaParentRole: 'listbox',
917
+ role: 'option'
918
+ }
919
+ }, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
920
+ isLoading: isFetchingOptions,
921
+ options: options,
922
+ searchString: searchStr,
923
+ suggestions: suggestions,
924
+ dataId: dataId,
925
+ getCustomEmptyState: getCustomEmptyState ? this.handleGetAddNewOptionText : null,
926
+ i18nKeys: i18nKeys,
927
+ htmlId: ariaErrorId
928
+ })), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)) : /*#__PURE__*/React.createElement(Box, {
929
+ flexible: true
930
+ }, getChildren()));
931
+ }) : null);
905
932
  }
906
933
 
907
934
  }
@@ -46,6 +46,9 @@
46
46
  .listItemContainer {
47
47
  padding: var(--zd_size10) 0;
48
48
  }
49
+ .responsivelistItemContainer {
50
+ padding: var(--zd_size10) 0 0;
51
+ }
49
52
  .readonly {
50
53
  --textboxicon_icon_cursor: not-allowed;
51
54
  }
@@ -85,6 +88,9 @@
85
88
  .dropBoxList {
86
89
  padding: var(--zd_size10) 0;
87
90
  }
91
+ .responsivedropBoxList{
92
+ padding: var(--zd_size10) 0 0 0;
93
+ }
88
94
  .rotate {
89
95
  transform: rotateX(180deg);
90
96
  }
@@ -5,7 +5,6 @@ import PropTypes from 'prop-types';
5
5
 
6
6
  import { SelectComponent } from './Select';
7
7
  import Popup from '../Popup/Popup';
8
- import DropBox from '../DropBox/DropBox';
9
8
  import Tag from '../Tag/Tag';
10
9
  import Textbox from '../TextBox/TextBox';
11
10
  import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
@@ -15,6 +14,8 @@ import Suggestions from '../MultiSelect/Suggestions';
15
14
  import EmptyState from '../MultiSelect/EmptyState';
16
15
  import DropDownHeading from '../DropDown/DropDownHeading';
17
16
  import { getUniqueId } from '../Provider/IdProvider';
17
+ import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
18
+ import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
18
19
  /**** CSS ****/
19
20
 
20
21
  import style from '../MultiSelect/MultiSelect.module.css';
@@ -107,6 +108,17 @@ class SelectWithAvatarComponent extends SelectComponent {
107
108
  }
108
109
  }
109
110
 
111
+ responsiveFunc(_ref) {
112
+ let {
113
+ mediaQueryOR
114
+ } = _ref;
115
+ return {
116
+ tabletMode: mediaQueryOR([{
117
+ maxWidth: 700
118
+ }])
119
+ };
120
+ }
121
+
110
122
  render() {
111
123
  let {
112
124
  dropBoxSize,
@@ -220,71 +232,84 @@ class SelectWithAvatarComponent extends SelectComponent {
220
232
  borderColor: borderColor,
221
233
  htmlId: htmlId,
222
234
  autoComplete: false
223
- }))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, {
224
- animationStyle: animationStyle,
225
- boxPosition: position || `${defaultDropBoxPosition}Center`,
226
- getRef: getContainerRef,
227
- isActive: isPopupReady,
228
- isAnimate: true,
229
- isArrow: false,
230
- onClick: removeClose,
231
- needResponsive: needResponsive,
232
- isPadding: false
233
- }, /*#__PURE__*/React.createElement(Card, {
234
- onScroll: this.handleScroll
235
- }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
236
- className: `${selectStyle.search} ${selectStyle[size]}`
237
- }, /*#__PURE__*/React.createElement(TextBoxIcon, {
238
- inputRef: this.searchInputRef,
239
- maxLength: maxLength,
240
- onChange: this.handleSearch,
241
- onKeyDown: this.handleKeyDown,
242
- placeHolder: searchBoxPlaceHolder,
243
- size: searchBoxSize,
244
- value: searchStr,
245
- onClear: this.handleClearSearch,
246
- dataId: `${dataId}_search`,
247
- a11y: {
248
- ariaAutocomplete: 'list',
249
- ariaControls: setAriaId,
250
- ariaDescribedby: ariaErrorId
251
- },
252
- autoComplete: false
253
- }))) : null, /*#__PURE__*/React.createElement(CardContent, {
254
- customClass: dropBoxSize ? style[dropBoxSize] : '',
255
- eleRef: this.suggestionContainerRef
256
- }, groupName ? /*#__PURE__*/React.createElement("div", {
257
- className: style.title
258
- }, /*#__PURE__*/React.createElement(DropDownHeading, {
259
- text: groupName,
260
- a11y: {
261
- role: 'heading'
262
- }
263
- })) : null, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
264
- activeId: selectedId,
265
- suggestions: suggestions,
266
- getRef: this.suggestionItemRef,
267
- hoverOption: hoverIndex,
268
- onClick: this.handleChange,
269
- onMouseEnter: this.handleMouseEnter,
270
- needTick: true,
271
- needBorder: false,
272
- selectedOptions: [selectedId],
273
- className: selectStyle.listItemContainer,
274
- htmlId: setAriaId,
275
- a11y: {
276
- ariaParentRole: 'listbox',
277
- role: 'option'
278
- }
279
- }) : /*#__PURE__*/React.createElement(EmptyState, {
280
- isLoading: isFetchingOptions,
281
- options: options,
282
- searchString: searchStr,
283
- suggestions: suggestions,
284
- dataId: dataId,
285
- i18nKeys: i18nKeys,
286
- htmlId: ariaErrorId
287
- })))) : null);
235
+ }))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
236
+ query: this.responsiveFunc,
237
+ responsiveId: "Helmet"
238
+ }, _ref2 => {
239
+ let {
240
+ tabletMode
241
+ } = _ref2;
242
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
243
+ animationStyle: animationStyle,
244
+ boxPosition: position || `${defaultDropBoxPosition}Center`,
245
+ getRef: getContainerRef,
246
+ isActive: isPopupReady,
247
+ isAnimate: true,
248
+ isArrow: false,
249
+ onClick: removeClose,
250
+ needResponsive: needResponsive,
251
+ isPadding: false,
252
+ isResponsivePadding: true,
253
+ alignBox: "row"
254
+ }, /*#__PURE__*/React.createElement(Box, {
255
+ flexible: true
256
+ }, /*#__PURE__*/React.createElement(Card, {
257
+ onScroll: this.handleScroll
258
+ }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
259
+ className: `${selectStyle.search} ${selectStyle[size]}`
260
+ }, /*#__PURE__*/React.createElement(TextBoxIcon, {
261
+ inputRef: this.searchInputRef,
262
+ maxLength: maxLength,
263
+ onChange: this.handleSearch,
264
+ onKeyDown: this.handleKeyDown,
265
+ placeHolder: searchBoxPlaceHolder,
266
+ size: searchBoxSize,
267
+ value: searchStr,
268
+ onClear: this.handleClearSearch,
269
+ dataId: `${dataId}_search`,
270
+ a11y: {
271
+ ariaAutocomplete: 'list',
272
+ ariaControls: setAriaId,
273
+ ariaDescribedby: ariaErrorId
274
+ },
275
+ autoComplete: false
276
+ }))) : null, /*#__PURE__*/React.createElement(CardContent, {
277
+ shrink: true,
278
+ customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : '',
279
+ eleRef: this.suggestionContainerRef
280
+ }, groupName ? /*#__PURE__*/React.createElement("div", {
281
+ className: style.title
282
+ }, /*#__PURE__*/React.createElement(DropDownHeading, {
283
+ text: groupName,
284
+ a11y: {
285
+ role: 'heading'
286
+ }
287
+ })) : null, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
288
+ activeId: selectedId,
289
+ suggestions: suggestions,
290
+ getRef: this.suggestionItemRef,
291
+ hoverOption: hoverIndex,
292
+ onClick: this.handleChange,
293
+ onMouseEnter: this.handleMouseEnter,
294
+ needTick: true,
295
+ needBorder: false,
296
+ selectedOptions: [selectedId],
297
+ className: selectStyle.listItemContainer,
298
+ htmlId: setAriaId,
299
+ a11y: {
300
+ ariaParentRole: 'listbox',
301
+ role: 'option'
302
+ }
303
+ }) : /*#__PURE__*/React.createElement(EmptyState, {
304
+ isLoading: isFetchingOptions,
305
+ options: options,
306
+ searchString: searchStr,
307
+ suggestions: suggestions,
308
+ dataId: dataId,
309
+ i18nKeys: i18nKeys,
310
+ htmlId: ariaErrorId
311
+ })))));
312
+ }) : null);
288
313
  }
289
314
 
290
315
  }