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

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 (41) hide show
  1. package/README.md +5 -0
  2. package/assets/Appearance/dark/mode/darkMode.module.css +0 -2
  3. package/assets/Appearance/default/mode/defaultMode.module.css +1 -3
  4. package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +0 -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/ResponsiveDropBox/ResponsiveDropBox.js +74 -0
  14. package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
  15. package/es/Select/GroupSelect.js +99 -74
  16. package/es/Select/Select.js +95 -68
  17. package/es/Select/Select.module.css +6 -0
  18. package/es/Select/SelectWithAvatar.js +91 -66
  19. package/es/Select/SelectWithIcon.js +99 -74
  20. package/es/Tab/Tabs.js +68 -43
  21. package/es/Tab/Tabs.module.css +2 -1
  22. package/es/index.js +2 -1
  23. package/lib/DateTime/DateTime.js +42 -22
  24. package/lib/DateTime/DateWidget.module.css +0 -4
  25. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +99 -77
  26. package/lib/MultiSelect/AdvancedMultiSelect.js +76 -50
  27. package/lib/MultiSelect/MultiSelect.js +81 -56
  28. package/lib/MultiSelect/MultiSelect.module.css +6 -1
  29. package/lib/MultiSelect/MultiSelectWithAvatar.js +78 -53
  30. package/lib/PopOver/PopOver.js +11 -4
  31. package/lib/ResponsiveDropBox/ResponsiveDropBox.js +130 -0
  32. package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
  33. package/lib/Select/GroupSelect.js +99 -76
  34. package/lib/Select/Select.js +102 -75
  35. package/lib/Select/Select.module.css +6 -0
  36. package/lib/Select/SelectWithAvatar.js +96 -71
  37. package/lib/Select/SelectWithIcon.js +97 -74
  38. package/lib/Tab/Tabs.js +67 -44
  39. package/lib/Tab/Tabs.module.css +2 -1
  40. package/lib/index.js +10 -1
  41. 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 { Container, Box } from '../Layout';
10
9
  import Card, { CardContent, CardHeader, CardFooter } from '../Card/Card';
@@ -14,6 +13,8 @@ import EmptyState from './EmptyState';
14
13
  import MultiSelectHeader from './MultiSelectHeader';
15
14
  import CssProvider from '../Provider/CssProvider';
16
15
  import { getUniqueId } from '../Provider/IdProvider';
16
+ import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
17
+ import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
17
18
  /**** Icons ****/
18
19
 
19
20
  import Icon from '@zohodesk/icons/lib/Icon';
@@ -829,6 +830,17 @@ export class MultiSelectComponent extends React.Component {
829
830
  });
830
831
  }
831
832
 
833
+ responsiveFunc(_ref) {
834
+ let {
835
+ mediaQueryOR
836
+ } = _ref;
837
+ return {
838
+ tabletMode: mediaQueryOR([{
839
+ maxWidth: 700
840
+ }])
841
+ };
842
+ }
843
+
832
844
  render() {
833
845
  let {
834
846
  isReadOnly,
@@ -978,60 +990,73 @@ export class MultiSelectComponent extends React.Component {
978
990
  size: "15"
979
991
  })) : null, children ? /*#__PURE__*/React.createElement(Box, {
980
992
  dataId: `${dataId}_children`
981
- }, children) : null)))), !isReadOnly && !isDisabled && !disableAction && isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, {
982
- animationStyle: animationStyle,
983
- boxPosition: position || `${defaultDropBoxPosition}`,
984
- getRef: getContainerRef,
985
- isActive: isPopupReady,
986
- isAnimate: isAnimate,
987
- isArrow: false,
988
- onClick: removeClose,
989
- needResponsive: needResponsive,
990
- isPadding: false,
991
- isBoxPaddingNeed: isBoxPaddingNeed,
992
- palette: palette,
993
- htmlId: setAriaId,
994
- a11y: {
995
- role: 'listbox',
996
- ariaMultiselectable: true
997
- },
998
- size: boxSize
999
- }, /*#__PURE__*/React.createElement(Card, {
1000
- customClass: `${style.box} ${style[`${palette}Box`]}`,
1001
- onScroll: this.handleScroll
1002
- }, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
1003
- needSelectAll: needSelectAll,
1004
- onSelect: this.handleSelectAll,
1005
- selectAllText: selectAllText,
1006
- suggestions: suggestions,
1007
- dataId: dataId
1008
- })), /*#__PURE__*/React.createElement(CardContent, {
1009
- customClass: dropBoxSize ? style[dropBoxSize] : '',
1010
- eleRef: this.suggestionContainerRef
1011
- }, isSearching ? /*#__PURE__*/React.createElement("div", {
1012
- className: style[palette]
1013
- }, searchText) : suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
1014
- suggestions: suggestions,
1015
- getRef: this.suggestionItemRef,
1016
- hoverOption: hoverOption,
1017
- onClick: this.handleSelectOption,
1018
- onMouseEnter: this.handleMouseEnter,
1019
- needBorder: false,
1020
- dataId: `${dataId}_Options`,
1021
- palette: palette,
1022
- a11y: {
1023
- role: 'option'
1024
- }
1025
- }) : /*#__PURE__*/React.createElement(EmptyState, {
1026
- isLoading: isFetchingOptions,
1027
- options: options,
1028
- searchString: searchStr,
1029
- suggestions: suggestions,
1030
- dataId: dataId,
1031
- palette: palette,
1032
- i18nKeys: i18nKeys,
1033
- htmlId: ariaErrorId
1034
- })), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)) : null);
993
+ }, children) : null)))), !isReadOnly && !isDisabled && !disableAction && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
994
+ query: this.responsiveFunc,
995
+ responsiveId: "Helmet"
996
+ }, _ref2 => {
997
+ let {
998
+ tabletMode
999
+ } = _ref2;
1000
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
1001
+ animationStyle: animationStyle,
1002
+ boxPosition: position || `${defaultDropBoxPosition}`,
1003
+ getRef: getContainerRef,
1004
+ isActive: isPopupReady,
1005
+ isAnimate: isAnimate,
1006
+ isArrow: false,
1007
+ onClick: removeClose,
1008
+ needResponsive: needResponsive,
1009
+ isPadding: false,
1010
+ isBoxPaddingNeed: isBoxPaddingNeed,
1011
+ palette: palette,
1012
+ htmlId: setAriaId,
1013
+ a11y: {
1014
+ role: 'listbox',
1015
+ ariaMultiselectable: true
1016
+ },
1017
+ size: boxSize,
1018
+ alignBox: "row",
1019
+ isResponsivePadding: getFooter ? false : true
1020
+ }, /*#__PURE__*/React.createElement(Box, {
1021
+ flexible: true
1022
+ }, /*#__PURE__*/React.createElement(Card, {
1023
+ customClass: `${style.box} ${style[`${palette}Box`]}`,
1024
+ onScroll: this.handleScroll
1025
+ }, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
1026
+ needSelectAll: needSelectAll,
1027
+ onSelect: this.handleSelectAll,
1028
+ selectAllText: selectAllText,
1029
+ suggestions: suggestions,
1030
+ dataId: dataId
1031
+ })), /*#__PURE__*/React.createElement(CardContent, {
1032
+ shrink: true,
1033
+ customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : '',
1034
+ eleRef: this.suggestionContainerRef
1035
+ }, isSearching ? /*#__PURE__*/React.createElement("div", {
1036
+ className: style[palette]
1037
+ }, searchText) : suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
1038
+ suggestions: suggestions,
1039
+ getRef: this.suggestionItemRef,
1040
+ hoverOption: hoverOption,
1041
+ onClick: this.handleSelectOption,
1042
+ onMouseEnter: this.handleMouseEnter,
1043
+ needBorder: false,
1044
+ dataId: `${dataId}_Options`,
1045
+ palette: palette,
1046
+ a11y: {
1047
+ role: 'option'
1048
+ }
1049
+ }) : /*#__PURE__*/React.createElement(EmptyState, {
1050
+ isLoading: isFetchingOptions,
1051
+ options: options,
1052
+ searchString: searchStr,
1053
+ suggestions: suggestions,
1054
+ dataId: dataId,
1055
+ palette: palette,
1056
+ i18nKeys: i18nKeys,
1057
+ htmlId: ariaErrorId
1058
+ })), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)));
1059
+ }) : null);
1035
1060
  }
1036
1061
 
1037
1062
  }
@@ -101,7 +101,9 @@
101
101
  [dir=rtl] .container.medium .tag {
102
102
  margin: var(--zd_size5) 0 0 var(--zd_size10);
103
103
  }
104
-
104
+ .responsiveParent{
105
+ width: 100%;
106
+ }
105
107
  .box {
106
108
  background: var(--zdt_multiselect_box_bg);
107
109
  }
@@ -191,3 +193,6 @@
191
193
  [dir=rtl] .clearIconSpace {
192
194
  padding-left: var(--zd_size37)
193
195
  }
196
+ .search{
197
+ padding: 0px 20px;
198
+ }
@@ -5,7 +5,6 @@ import PropTypes from 'prop-types';
5
5
 
6
6
  import { MultiSelectComponent } from './MultiSelect';
7
7
  import Popup from '../Popup/Popup';
8
- import DropBox from '../DropBox/DropBox';
9
8
  import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
10
9
  import { Container, Box } from '../Layout';
11
10
  import Card, { CardContent, CardHeader } from '../Card/Card';
@@ -15,6 +14,8 @@ import EmptyState from './EmptyState';
15
14
  import MultiSelectHeader from './MultiSelectHeader';
16
15
  import CssProvider from '../Provider/CssProvider';
17
16
  import { getUniqueId } from '../Provider/IdProvider';
17
+ import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
18
+ import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
18
19
  /**** Icons ****/
19
20
 
20
21
  import Icon from '@zohodesk/icons/lib/Icon';
@@ -52,6 +53,17 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
52
53
  });
53
54
  }
54
55
 
56
+ responsiveFunc(_ref) {
57
+ let {
58
+ mediaQueryOR
59
+ } = _ref;
60
+ return {
61
+ tabletMode: mediaQueryOR([{
62
+ maxWidth: 700
63
+ }])
64
+ };
65
+ }
66
+
55
67
  render() {
56
68
  let {
57
69
  isReadOnly,
@@ -189,57 +201,70 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
189
201
  }, /*#__PURE__*/React.createElement(Icon, {
190
202
  name: "ZD-delete",
191
203
  size: "15"
192
- })) : null)))), popUpState ? /*#__PURE__*/React.createElement(DropBox, {
193
- animationStyle: animationStyle,
194
- boxPosition: position || `${defaultDropBoxPosition}Center`,
195
- getRef: getContainerRef,
196
- isActive: isPopupReady,
197
- isAnimate: isAnimate,
198
- isArrow: false,
199
- onClick: removeClose,
200
- needResponsive: needResponsive,
201
- isPadding: false,
202
- isBoxPaddingNeed: isBoxPaddingNeed,
203
- palette: palette,
204
- htmlId: setAriaId,
205
- a11y: {
206
- ariaMultiselectable: true,
207
- role: 'listbox'
208
- }
209
- }, /*#__PURE__*/React.createElement(Card, {
210
- customClass: `${style.box} ${style[`${palette}Box`]}`,
211
- onScroll: this.handleScroll
212
- }, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
213
- needSelectAll: needSelectAll,
214
- onSelect: this.handleSelectAll,
215
- selectAllText: selectAllText,
216
- suggestions: suggestions,
217
- dataId: dataId
218
- })), /*#__PURE__*/React.createElement(CardContent, {
219
- customClass: dropBoxSize ? style[dropBoxSize] : '',
220
- eleRef: this.suggestionContainerRef
221
- }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
222
- suggestions: suggestions,
223
- getRef: this.suggestionItemRef,
224
- hoverOption: hoverOption,
225
- onClick: this.handleSelectOption,
226
- onMouseEnter: this.handleMouseEnter,
227
- needBorder: false,
228
- dataId: `${dataId}_Options`,
229
- palette: palette,
230
- a11y: {
231
- role: 'option'
232
- }
233
- }) : /*#__PURE__*/React.createElement(EmptyState, {
234
- isLoading: isFetchingOptions,
235
- options: options,
236
- searchString: searchStr,
237
- suggestions: suggestions,
238
- dataId: dataId,
239
- palette: palette,
240
- i18nKeys: i18nKeys,
241
- htmlId: ariaErrorId
242
- })))) : null);
204
+ })) : null)))), popUpState ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
205
+ query: this.responsiveFunc,
206
+ responsiveId: "Helmet"
207
+ }, _ref2 => {
208
+ let {
209
+ tabletMode
210
+ } = _ref2;
211
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
212
+ animationStyle: animationStyle,
213
+ boxPosition: position || `${defaultDropBoxPosition}Center`,
214
+ getRef: getContainerRef,
215
+ isActive: isPopupReady,
216
+ isAnimate: isAnimate,
217
+ isArrow: false,
218
+ onClick: removeClose,
219
+ needResponsive: needResponsive,
220
+ isPadding: false,
221
+ isBoxPaddingNeed: isBoxPaddingNeed,
222
+ palette: palette,
223
+ htmlId: setAriaId,
224
+ a11y: {
225
+ ariaMultiselectable: true,
226
+ role: 'listbox'
227
+ },
228
+ isResponsivePadding: true,
229
+ alignBox: "row"
230
+ }, /*#__PURE__*/React.createElement(Box, {
231
+ flexible: true
232
+ }, /*#__PURE__*/React.createElement(Card, {
233
+ customClass: `${style.box} ${style[`${palette}Box`]}`,
234
+ onScroll: this.handleScroll
235
+ }, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
236
+ needSelectAll: needSelectAll,
237
+ onSelect: this.handleSelectAll,
238
+ selectAllText: selectAllText,
239
+ suggestions: suggestions,
240
+ dataId: dataId
241
+ })), /*#__PURE__*/React.createElement(CardContent, {
242
+ shrink: true,
243
+ customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : '',
244
+ eleRef: this.suggestionContainerRef
245
+ }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
246
+ suggestions: suggestions,
247
+ getRef: this.suggestionItemRef,
248
+ hoverOption: hoverOption,
249
+ onClick: this.handleSelectOption,
250
+ onMouseEnter: this.handleMouseEnter,
251
+ needBorder: false,
252
+ dataId: `${dataId}_Options`,
253
+ palette: palette,
254
+ a11y: {
255
+ role: 'option'
256
+ }
257
+ }) : /*#__PURE__*/React.createElement(EmptyState, {
258
+ isLoading: isFetchingOptions,
259
+ options: options,
260
+ searchString: searchStr,
261
+ suggestions: suggestions,
262
+ dataId: dataId,
263
+ palette: palette,
264
+ i18nKeys: i18nKeys,
265
+ htmlId: ariaErrorId
266
+ })))));
267
+ }) : null);
243
268
  }
244
269
 
245
270
  }
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Popup from '../Popup/Popup';
4
- import DropBox from '../DropBox/DropBox';
4
+ import { Box } from '../Layout';
5
+ import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
5
6
  import style from './PopOver.module.css';
6
7
 
7
8
  class PopOver extends React.Component {
@@ -239,7 +240,7 @@ export class PopOverContainer extends React.Component {
239
240
  animationStyle,
240
241
  getRef
241
242
  } = this.props;
242
- return /*#__PURE__*/React.createElement(DropBox, {
243
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
243
244
  animationStyle: animationStyle,
244
245
  arrowBottom: arrowBottom,
245
246
  arrowLeft: arrowLeft,
@@ -255,8 +256,13 @@ export class PopOverContainer extends React.Component {
255
256
  left: left,
256
257
  right: right,
257
258
  size: size,
258
- top: top
259
- }, children);
259
+ top: top,
260
+ alignBox: "row"
261
+ }, /*#__PURE__*/React.createElement(Box, {
262
+ flexible: true,
263
+ shrink: true,
264
+ scroll: "vertical"
265
+ }, children));
260
266
  }
261
267
 
262
268
  }
@@ -0,0 +1,74 @@
1
+ function _extends() { _extends = Object.assign || 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
+
3
+ import React, { Component } from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import DropBox from '../DropBox/DropBox';
6
+ import { Container } from '../Layout';
7
+ import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
8
+ import style from './ResponsiveDropBox.module.css';
9
+ export default class ResponsiveDropBox extends Component {
10
+ constructor(props) {
11
+ super(props);
12
+ this.responsiveFunc = this.responsiveFunc.bind(this);
13
+ }
14
+
15
+ responsiveFunc(_ref) {
16
+ let {
17
+ mediaQueryOR
18
+ } = _ref;
19
+ return {
20
+ tabletMode: mediaQueryOR([{
21
+ maxWidth: 700
22
+ }])
23
+ };
24
+ }
25
+
26
+ render() {
27
+ const {
28
+ children,
29
+ customClass = {},
30
+ isResponsivePadding,
31
+ alignBox
32
+ } = this.props;
33
+ const {
34
+ customDropBox = '',
35
+ customMobileDropBox = '',
36
+ customDropBoxWrap = '',
37
+ customMobileDropBoxWrap = '',
38
+ customResponsiveContainer = ''
39
+ } = customClass;
40
+ const dropBoxClasses = {
41
+ customDropBox: `${customDropBox}`,
42
+ customMobileDropBox: `${customMobileDropBox}`,
43
+ customDropBoxWrap: `${customDropBoxWrap}`,
44
+ customMobileDropBoxWrap: `${customMobileDropBoxWrap}`,
45
+ customResponsiveContainer: `${customResponsiveContainer}`
46
+ };
47
+ return /*#__PURE__*/React.createElement(DropBox, _extends({}, this.props, {
48
+ customClass: dropBoxClasses
49
+ }), /*#__PURE__*/React.createElement(ResponsiveReceiver, {
50
+ query: this.responsiveFunc,
51
+ responsiveId: "Helmet"
52
+ }, _ref2 => {
53
+ let {
54
+ tabletMode
55
+ } = _ref2;
56
+ return /*#__PURE__*/React.createElement(Container, {
57
+ alignBox: alignBox,
58
+ isCover: false,
59
+ className: `${tabletMode ? style.dropBoxContainer : ''} ${tabletMode && isResponsivePadding ? style.boxPadding : ''} ${customResponsiveContainer}`
60
+ }, children);
61
+ }));
62
+ }
63
+
64
+ }
65
+ ResponsiveDropBox.propTypes = {
66
+ children: PropTypes.element,
67
+ customClass: PropTypes.object,
68
+ isResponsivePadding: PropTypes.bool,
69
+ alignBox: PropTypes.oneOf(['column', 'row'])
70
+ };
71
+ ResponsiveDropBox.defaultProps = {
72
+ isResponsivePadding: false,
73
+ alignBox: 'column'
74
+ };
@@ -0,0 +1,6 @@
1
+ .dropBoxContainer {
2
+ max-height: 70vh;
3
+ }
4
+ .boxPadding{
5
+ padding-bottom: var(--zd_size10);
6
+ }
@@ -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
  }