@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.
- package/README.md +5 -0
- package/assets/Appearance/dark/mode/darkMode.module.css +0 -2
- package/assets/Appearance/default/mode/defaultMode.module.css +1 -3
- package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +0 -2
- package/es/DateTime/DateTime.js +42 -21
- package/es/DateTime/DateWidget.module.css +0 -4
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +100 -75
- package/es/MultiSelect/AdvancedMultiSelect.js +75 -49
- package/es/MultiSelect/MultiSelect.js +80 -55
- package/es/MultiSelect/MultiSelect.module.css +6 -1
- package/es/MultiSelect/MultiSelectWithAvatar.js +77 -52
- package/es/PopOver/PopOver.js +10 -4
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +74 -0
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
- package/es/Select/GroupSelect.js +99 -74
- package/es/Select/Select.js +95 -68
- package/es/Select/Select.module.css +6 -0
- package/es/Select/SelectWithAvatar.js +91 -66
- package/es/Select/SelectWithIcon.js +99 -74
- package/es/Tab/Tabs.js +68 -43
- package/es/Tab/Tabs.module.css +2 -1
- package/es/index.js +2 -1
- package/lib/DateTime/DateTime.js +42 -22
- package/lib/DateTime/DateWidget.module.css +0 -4
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +99 -77
- package/lib/MultiSelect/AdvancedMultiSelect.js +76 -50
- package/lib/MultiSelect/MultiSelect.js +81 -56
- package/lib/MultiSelect/MultiSelect.module.css +6 -1
- package/lib/MultiSelect/MultiSelectWithAvatar.js +78 -53
- package/lib/PopOver/PopOver.js +11 -4
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +130 -0
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
- package/lib/Select/GroupSelect.js +99 -76
- package/lib/Select/Select.js +102 -75
- package/lib/Select/Select.module.css +6 -0
- package/lib/Select/SelectWithAvatar.js +96 -71
- package/lib/Select/SelectWithIcon.js +97 -74
- package/lib/Tab/Tabs.js +67 -44
- package/lib/Tab/Tabs.module.css +2 -1
- package/lib/index.js +10 -1
- package/package.json +3 -3
package/es/Select/Select.js
CHANGED
|
@@ -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(
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
},
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
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(
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
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
|
}
|
|
@@ -6,12 +6,13 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import Popup from '../Popup/Popup';
|
|
7
7
|
import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
|
|
8
8
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
9
|
-
import DropBox from '../DropBox/DropBox';
|
|
10
9
|
import ListItemWithIcon from '../ListItem/ListItemWithIcon';
|
|
11
10
|
import Card, { CardHeader, CardContent } from '../Card/Card';
|
|
12
11
|
import EmptyState from '../MultiSelect/EmptyState';
|
|
13
12
|
import { Container, Box } from '../Layout';
|
|
14
13
|
import { getUniqueId } from '../Provider/IdProvider';
|
|
14
|
+
import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
|
15
|
+
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
15
16
|
/**** Methods ****/
|
|
16
17
|
|
|
17
18
|
import { scrollTo } from '../utils/Common.js';
|
|
@@ -234,6 +235,17 @@ class SelectWithIcon extends Component {
|
|
|
234
235
|
}
|
|
235
236
|
}
|
|
236
237
|
|
|
238
|
+
responsiveFunc(_ref) {
|
|
239
|
+
let {
|
|
240
|
+
mediaQueryOR
|
|
241
|
+
} = _ref;
|
|
242
|
+
return {
|
|
243
|
+
tabletMode: mediaQueryOR([{
|
|
244
|
+
maxWidth: 700
|
|
245
|
+
}])
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
|
|
237
249
|
render() {
|
|
238
250
|
let {
|
|
239
251
|
animationStyle,
|
|
@@ -346,82 +358,95 @@ class SelectWithIcon extends Component {
|
|
|
346
358
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
347
359
|
name: "ZD-down",
|
|
348
360
|
size: "7"
|
|
349
|
-
})))))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
isAnimate: true,
|
|
354
|
-
isArrow: false,
|
|
355
|
-
onClick: removeClose,
|
|
356
|
-
getRef: getContainerRef,
|
|
357
|
-
needResponsive: needResponsive,
|
|
358
|
-
dataId: `${dataId}_suggestions`,
|
|
359
|
-
size: boxSize,
|
|
360
|
-
isPadding: false
|
|
361
|
-
}, /*#__PURE__*/React.createElement(Card, {
|
|
362
|
-
onScroll: this.handleScroll,
|
|
363
|
-
htmlId: setAriaId,
|
|
364
|
-
a11y: {
|
|
365
|
-
role: 'listbox'
|
|
366
|
-
}
|
|
367
|
-
}, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
|
|
368
|
-
className: `${style.search} ${style[size]}`
|
|
369
|
-
}, /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
370
|
-
onClear: this.onSearchClear,
|
|
371
|
-
onChange: this.onSearch,
|
|
372
|
-
placeHolder: searchBoxPlaceHolder,
|
|
373
|
-
value: searchValue,
|
|
374
|
-
maxLength: maxLength,
|
|
375
|
-
onKeyDown: this.handleKeyDown,
|
|
376
|
-
inputRef: this.searchInputRef,
|
|
377
|
-
size: searchBoxSize,
|
|
378
|
-
dataId: `${dataId}_search`,
|
|
379
|
-
a11y: {
|
|
380
|
-
ariaDescribedby: ariaErrorId
|
|
381
|
-
},
|
|
382
|
-
autoComplete: false
|
|
383
|
-
}))) : null, /*#__PURE__*/React.createElement(CardContent, {
|
|
384
|
-
customClass: `${style.dropBoxList} ${dropBoxSize ? style[dropBoxSize] : ''}`,
|
|
385
|
-
eleRef: this.scrollContentRef
|
|
386
|
-
}, options.length ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((options, i) => {
|
|
361
|
+
})))))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
362
|
+
query: this.responsiveFunc,
|
|
363
|
+
responsiveId: "Helmet"
|
|
364
|
+
}, _ref2 => {
|
|
387
365
|
let {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
onClick:
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
highlight: selectedIndex === i,
|
|
410
|
-
getRef: this.itemRef,
|
|
366
|
+
tabletMode
|
|
367
|
+
} = _ref2;
|
|
368
|
+
return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
369
|
+
animationStyle: animationStyle,
|
|
370
|
+
boxPosition: position,
|
|
371
|
+
isActive: isPopupReady,
|
|
372
|
+
isAnimate: true,
|
|
373
|
+
isArrow: false,
|
|
374
|
+
onClick: removeClose,
|
|
375
|
+
getRef: getContainerRef,
|
|
376
|
+
needResponsive: needResponsive,
|
|
377
|
+
dataId: `${dataId}_suggestions`,
|
|
378
|
+
size: boxSize,
|
|
379
|
+
isPadding: false,
|
|
380
|
+
isResponsivePadding: true,
|
|
381
|
+
alignBox: "row"
|
|
382
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
383
|
+
flexible: true
|
|
384
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
385
|
+
onScroll: this.handleScroll,
|
|
386
|
+
htmlId: setAriaId,
|
|
411
387
|
a11y: {
|
|
412
|
-
role: '
|
|
413
|
-
ariaSelected: selectedId === options[idKey]
|
|
388
|
+
role: 'listbox'
|
|
414
389
|
}
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
390
|
+
}, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
|
|
391
|
+
className: `${style.search} ${style[size]}`
|
|
392
|
+
}, /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
393
|
+
onClear: this.onSearchClear,
|
|
394
|
+
onChange: this.onSearch,
|
|
395
|
+
placeHolder: searchBoxPlaceHolder,
|
|
396
|
+
value: searchValue,
|
|
397
|
+
maxLength: maxLength,
|
|
398
|
+
onKeyDown: this.handleKeyDown,
|
|
399
|
+
inputRef: this.searchInputRef,
|
|
400
|
+
size: searchBoxSize,
|
|
401
|
+
dataId: `${dataId}_search`,
|
|
402
|
+
a11y: {
|
|
403
|
+
ariaDescribedby: ariaErrorId
|
|
404
|
+
},
|
|
405
|
+
autoComplete: false
|
|
406
|
+
}))) : null, /*#__PURE__*/React.createElement(CardContent, {
|
|
407
|
+
customClass: `${tabletMode ? style.responsivedropBoxList : style.dropBoxList} ${!tabletMode && dropBoxSize ? style[dropBoxSize] : ''}`,
|
|
408
|
+
shrink: true,
|
|
409
|
+
eleRef: this.scrollContentRef
|
|
410
|
+
}, options.length ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((options, i) => {
|
|
411
|
+
let {
|
|
412
|
+
iconName,
|
|
413
|
+
iconSize,
|
|
414
|
+
iconColor
|
|
415
|
+
} = options;
|
|
416
|
+
return /*#__PURE__*/React.createElement(ListItemWithIcon, {
|
|
417
|
+
key: options[idKey],
|
|
418
|
+
value: options[valueKey],
|
|
419
|
+
size: "medium",
|
|
420
|
+
onClick: this.handleChange,
|
|
421
|
+
id: options[idKey],
|
|
422
|
+
index: i,
|
|
423
|
+
title: options[valueKey],
|
|
424
|
+
palette: "default",
|
|
425
|
+
dataId: options[idKey],
|
|
426
|
+
iconName: iconName,
|
|
427
|
+
iconSize: iconSize,
|
|
428
|
+
iconClass: iconColor,
|
|
429
|
+
active: selectedId === options[idKey],
|
|
430
|
+
needBorder: needListBorder,
|
|
431
|
+
needTick: needTick,
|
|
432
|
+
onMouseEnter: this.handleMouseEnter,
|
|
433
|
+
highlight: selectedIndex === i,
|
|
434
|
+
getRef: this.itemRef,
|
|
435
|
+
a11y: {
|
|
436
|
+
role: 'option',
|
|
437
|
+
ariaSelected: selectedId === options[idKey]
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
})) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
441
|
+
isLoading: isFetchingOptions,
|
|
442
|
+
options: options,
|
|
443
|
+
searchString: searchValue,
|
|
444
|
+
suggestions: options,
|
|
445
|
+
dataId: dataId,
|
|
446
|
+
i18nKeys: i18nKeys,
|
|
447
|
+
htmlId: ariaErrorId
|
|
448
|
+
})))));
|
|
449
|
+
}) : null);
|
|
425
450
|
}
|
|
426
451
|
|
|
427
452
|
}
|