@zohodesk/components 1.6.2 → 1.6.4
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 +31 -13
- package/es/ColorSelect/_shared/ColorIndicator/ColorIndicator.module.css +4 -2
- package/es/ListItem/ListItem.js +6 -4
- package/es/ListItem/ListItem.module.css +40 -22
- package/es/ListItem/ListItemWithAvatar.js +7 -5
- package/es/ListItem/ListItemWithCheckBox.js +9 -5
- package/es/ListItem/ListItemWithIcon.js +10 -7
- package/es/ListItem/ListItemWithRadio.js +9 -6
- package/es/ListItem/__tests__/__snapshots__/ListItem.spec.js.snap +4 -4
- package/es/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +131 -82
- package/es/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +432 -390
- package/es/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +141 -92
- package/es/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +432 -390
- package/es/ListItem/props/defaultProps.js +2 -1
- package/es/ListItem/props/propTypes.js +4 -2
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +12 -3
- package/es/MultiSelect/MultiSelect.js +2 -2
- package/es/MultiSelect/Suggestions.js +7 -2
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +10 -10
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelectHeader.spec.js.snap +34 -28
- package/es/MultiSelect/__tests__/__snapshots__/Suggestions.spec.js.snap +20 -20
- package/es/MultiSelect/props/defaultProps.js +2 -0
- package/es/MultiSelect/props/propTypes.js +11 -3
- package/es/Popup/Popup.js +11 -4
- package/es/Select/GroupSelect.js +1 -1
- package/es/Select/SelectWithAvatar.js +3 -3
- package/es/Select/SelectWithIcon.js +10 -3
- package/es/Select/__tests__/__snapshots__/Select.spec.js.snap +66 -66
- package/es/Select/props/defaultProps.js +4 -2
- package/es/Select/props/propTypes.js +11 -3
- package/es/common/common.module.css +1 -1
- package/lib/ColorSelect/_shared/ColorIndicator/ColorIndicator.module.css +4 -2
- package/lib/ListItem/ListItem.js +7 -4
- package/lib/ListItem/ListItem.module.css +40 -22
- package/lib/ListItem/ListItemWithAvatar.js +7 -5
- package/lib/ListItem/ListItemWithCheckBox.js +9 -5
- package/lib/ListItem/ListItemWithIcon.js +10 -7
- package/lib/ListItem/ListItemWithRadio.js +9 -6
- package/lib/ListItem/__tests__/__snapshots__/ListItem.spec.js.snap +4 -4
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +131 -82
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +432 -390
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +141 -92
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +432 -390
- package/lib/ListItem/props/defaultProps.js +2 -1
- package/lib/ListItem/props/propTypes.js +4 -2
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +23 -16
- package/lib/MultiSelect/MultiSelect.js +2 -2
- package/lib/MultiSelect/Suggestions.js +6 -2
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +10 -10
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelectHeader.spec.js.snap +34 -28
- package/lib/MultiSelect/__tests__/__snapshots__/Suggestions.spec.js.snap +20 -20
- package/lib/MultiSelect/props/defaultProps.js +2 -0
- package/lib/MultiSelect/props/propTypes.js +13 -5
- package/lib/Popup/Popup.js +11 -4
- package/lib/Select/GroupSelect.js +2 -1
- package/lib/Select/SelectWithAvatar.js +4 -3
- package/lib/Select/SelectWithIcon.js +10 -3
- package/lib/Select/__tests__/__snapshots__/Select.spec.js.snap +66 -66
- package/lib/Select/props/defaultProps.js +5 -3
- package/lib/Select/props/propTypes.js +11 -3
- package/lib/common/common.module.css +1 -1
- package/package.json +7 -7
|
@@ -30,7 +30,8 @@ export const ListItemDefaultProps = {
|
|
|
30
30
|
customClass: {},
|
|
31
31
|
customProps: {},
|
|
32
32
|
dataSelectorId: 'listItem',
|
|
33
|
-
needMultiLineText: false
|
|
33
|
+
needMultiLineText: false,
|
|
34
|
+
lhsAlignContent: 'start'
|
|
34
35
|
};
|
|
35
36
|
export const ListItemWithAvatarDefaultProps = {
|
|
36
37
|
active: false,
|
|
@@ -61,14 +61,16 @@ export const ListItem_Props = {
|
|
|
61
61
|
customClass: PropTypes.shape({
|
|
62
62
|
customListItem: PropTypes.string,
|
|
63
63
|
customTickIcon: PropTypes.string,
|
|
64
|
-
customValueRightPlaceholder: PropTypes.string
|
|
64
|
+
customValueRightPlaceholder: PropTypes.string,
|
|
65
|
+
customTitleBox: PropTypes.string
|
|
65
66
|
}),
|
|
66
67
|
customProps: PropTypes.shape({
|
|
67
68
|
ListItemProps: PropTypes.object
|
|
68
69
|
}),
|
|
69
70
|
secondaryValue: PropTypes.string,
|
|
70
71
|
renderBeforeChildren: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
71
|
-
renderValueRightPlaceholderNode: PropTypes.oneOfType([PropTypes.node, PropTypes.func])
|
|
72
|
+
renderValueRightPlaceholderNode: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
73
|
+
lhsAlignContent: PropTypes.oneOf(['start', 'center', 'end'])
|
|
72
74
|
};
|
|
73
75
|
export const ListItemWithAvatar_Props = {
|
|
74
76
|
active: PropTypes.bool,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { AdvancedGroupMultiSelect_propTypes } from "./props/propTypes";
|
|
3
5
|
import { AdvancedGroupMultiSelect_defaultProps } from "./props/defaultProps";
|
|
@@ -17,6 +19,9 @@ import Card, { CardContent, CardHeader, CardFooter } from "../Card/Card";
|
|
|
17
19
|
import { getUniqueId } from "../Provider/IdProvider";
|
|
18
20
|
import ResponsiveDropBox from "../ResponsiveDropBox/ResponsiveDropBox";
|
|
19
21
|
import { ResponsiveReceiver } from "../Responsive/CustomResponsive";
|
|
22
|
+
/**** Constants ****/
|
|
23
|
+
|
|
24
|
+
import { DUMMY_OBJECT } from "./../utils/Common";
|
|
20
25
|
/**** Icons ****/
|
|
21
26
|
|
|
22
27
|
import { Icon } from '@zohodesk/icons';
|
|
@@ -890,8 +895,12 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
890
895
|
autoComplete,
|
|
891
896
|
getTargetRef,
|
|
892
897
|
isFocus,
|
|
893
|
-
limit
|
|
898
|
+
limit,
|
|
899
|
+
customProps
|
|
894
900
|
} = this.props;
|
|
901
|
+
const {
|
|
902
|
+
SuggestionsProps = DUMMY_OBJECT
|
|
903
|
+
} = customProps;
|
|
895
904
|
let {
|
|
896
905
|
clearText = MULTISELECT_I18N_KEYS.clearText,
|
|
897
906
|
limitReachedMessage = MULTISELECT_I18N_KEYS.limitReachedMessage
|
|
@@ -1060,7 +1069,7 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1060
1069
|
a11y: {
|
|
1061
1070
|
role: 'heading'
|
|
1062
1071
|
}
|
|
1063
|
-
})), /*#__PURE__*/React.createElement(Suggestions, {
|
|
1072
|
+
})), /*#__PURE__*/React.createElement(Suggestions, _extends({}, SuggestionsProps, {
|
|
1064
1073
|
suggestions: suggestions,
|
|
1065
1074
|
selectedOptions: selectedOptionIds,
|
|
1066
1075
|
getRef: this.suggestionItemRef,
|
|
@@ -1075,7 +1084,7 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1075
1084
|
limit: limit,
|
|
1076
1085
|
limitReachedMessage: limitReachedMessage,
|
|
1077
1086
|
dataId: `${dataId}_Options`
|
|
1078
|
-
}));
|
|
1087
|
+
})));
|
|
1079
1088
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1080
1089
|
options: revampedGroups,
|
|
1081
1090
|
searchString: searchStr,
|
|
@@ -1097,9 +1097,9 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1097
1097
|
isLoading,
|
|
1098
1098
|
selectAllText,
|
|
1099
1099
|
needSelectAll,
|
|
1100
|
-
customProps,
|
|
1101
1100
|
isVirtualizerEnabled,
|
|
1102
|
-
limit
|
|
1101
|
+
limit,
|
|
1102
|
+
customProps
|
|
1103
1103
|
} = this.props;
|
|
1104
1104
|
const {
|
|
1105
1105
|
selectedOptions,
|
|
@@ -195,18 +195,23 @@ export default class Suggestions extends React.PureComponent {
|
|
|
195
195
|
htmlId,
|
|
196
196
|
a11y,
|
|
197
197
|
getVirtualizerPublicMethods,
|
|
198
|
-
setVirtualizerContainerRefFunction
|
|
198
|
+
setVirtualizerContainerRefFunction,
|
|
199
|
+
customClass
|
|
199
200
|
} = this.props;
|
|
200
201
|
const {
|
|
201
202
|
ariaParentRole,
|
|
202
203
|
ariaMultiselectable
|
|
203
204
|
} = a11y;
|
|
205
|
+
const {
|
|
206
|
+
containerClass = ''
|
|
207
|
+
} = customClass;
|
|
204
208
|
return /*#__PURE__*/React.createElement(Container, {
|
|
205
209
|
isCover: false,
|
|
206
210
|
role: ariaParentRole,
|
|
207
211
|
id: htmlId,
|
|
208
212
|
tabindex: "0",
|
|
209
|
-
"aria-multiselectable": ariaMultiselectable
|
|
213
|
+
"aria-multiselectable": ariaMultiselectable,
|
|
214
|
+
className: containerClass
|
|
210
215
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
211
216
|
dataId: `${dataId}`,
|
|
212
217
|
className: className ? className : ''
|
|
@@ -217,13 +217,13 @@ exports[`AdvancedMultiSelect rendering the options array with objects and string
|
|
|
217
217
|
data-test-id="boxComponent"
|
|
218
218
|
>
|
|
219
219
|
<div
|
|
220
|
-
class="titleBox
|
|
220
|
+
class="titleBox shrinkOff"
|
|
221
221
|
data-id="boxComponent"
|
|
222
222
|
data-selector-id="box"
|
|
223
223
|
data-test-id="boxComponent"
|
|
224
224
|
>
|
|
225
225
|
<div
|
|
226
|
-
class="value basisAuto shrinkOn"
|
|
226
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
227
227
|
data-id="boxComponent"
|
|
228
228
|
data-selector-id="box"
|
|
229
229
|
data-test-id="boxComponent"
|
|
@@ -253,13 +253,13 @@ exports[`AdvancedMultiSelect rendering the options array with objects and string
|
|
|
253
253
|
data-test-id="boxComponent"
|
|
254
254
|
>
|
|
255
255
|
<div
|
|
256
|
-
class="titleBox
|
|
256
|
+
class="titleBox shrinkOff"
|
|
257
257
|
data-id="boxComponent"
|
|
258
258
|
data-selector-id="box"
|
|
259
259
|
data-test-id="boxComponent"
|
|
260
260
|
>
|
|
261
261
|
<div
|
|
262
|
-
class="value basisAuto shrinkOn"
|
|
262
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
263
263
|
data-id="boxComponent"
|
|
264
264
|
data-selector-id="box"
|
|
265
265
|
data-test-id="boxComponent"
|
|
@@ -289,13 +289,13 @@ exports[`AdvancedMultiSelect rendering the options array with objects and string
|
|
|
289
289
|
data-test-id="boxComponent"
|
|
290
290
|
>
|
|
291
291
|
<div
|
|
292
|
-
class="titleBox
|
|
292
|
+
class="titleBox shrinkOff"
|
|
293
293
|
data-id="boxComponent"
|
|
294
294
|
data-selector-id="box"
|
|
295
295
|
data-test-id="boxComponent"
|
|
296
296
|
>
|
|
297
297
|
<div
|
|
298
|
-
class="value basisAuto shrinkOn"
|
|
298
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
299
299
|
data-id="boxComponent"
|
|
300
300
|
data-selector-id="box"
|
|
301
301
|
data-test-id="boxComponent"
|
|
@@ -463,13 +463,13 @@ exports[`AdvancedMultiSelect rendering the options array with only objects using
|
|
|
463
463
|
data-test-id="boxComponent"
|
|
464
464
|
>
|
|
465
465
|
<div
|
|
466
|
-
class="titleBox
|
|
466
|
+
class="titleBox shrinkOff"
|
|
467
467
|
data-id="boxComponent"
|
|
468
468
|
data-selector-id="box"
|
|
469
469
|
data-test-id="boxComponent"
|
|
470
470
|
>
|
|
471
471
|
<div
|
|
472
|
-
class="value basisAuto shrinkOn"
|
|
472
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
473
473
|
data-id="boxComponent"
|
|
474
474
|
data-selector-id="box"
|
|
475
475
|
data-test-id="boxComponent"
|
|
@@ -499,13 +499,13 @@ exports[`AdvancedMultiSelect rendering the options array with only objects using
|
|
|
499
499
|
data-test-id="boxComponent"
|
|
500
500
|
>
|
|
501
501
|
<div
|
|
502
|
-
class="titleBox
|
|
502
|
+
class="titleBox shrinkOff"
|
|
503
503
|
data-id="boxComponent"
|
|
504
504
|
data-selector-id="box"
|
|
505
505
|
data-test-id="boxComponent"
|
|
506
506
|
>
|
|
507
507
|
<div
|
|
508
|
-
class="value basisAuto shrinkOn"
|
|
508
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
509
509
|
data-id="boxComponent"
|
|
510
510
|
data-selector-id="box"
|
|
511
511
|
data-test-id="boxComponent"
|
|
@@ -12,47 +12,53 @@ exports[`MultiSelectHeader rendering the basic value 1`] = `
|
|
|
12
12
|
tabindex="0"
|
|
13
13
|
>
|
|
14
14
|
<div
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
data-id="MultiSelectHeader_selectAll_Icon"
|
|
15
|
+
class="contentWrapper shrinkOff"
|
|
16
|
+
data-id="boxComponent"
|
|
18
17
|
data-selector-id="box"
|
|
19
|
-
data-test-id="
|
|
18
|
+
data-test-id="boxComponent"
|
|
20
19
|
>
|
|
21
20
|
<div
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
data-
|
|
25
|
-
data-test-id="
|
|
21
|
+
aria-hidden="true"
|
|
22
|
+
class="iconBox lhsJustifyContent_center"
|
|
23
|
+
data-id="MultiSelectHeader_selectAll_Icon"
|
|
24
|
+
data-test-id="MultiSelectHeader_selectAll_Icon"
|
|
26
25
|
>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
data-id="
|
|
31
|
-
data-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
<div
|
|
27
|
+
class="iconWrapper shrinkOff selfStart"
|
|
28
|
+
data-id="boxComponent"
|
|
29
|
+
data-selector-id="box"
|
|
30
|
+
data-test-id="boxComponent"
|
|
31
|
+
>
|
|
32
|
+
<i
|
|
33
|
+
aria-hidden="true"
|
|
34
|
+
class="zd_font_icons basic icon-androidd "
|
|
35
|
+
data-id="fontIcon"
|
|
36
|
+
data-selector-id="fontIcon"
|
|
37
|
+
data-test-id="fontIcon"
|
|
38
|
+
style="--zd-iconfont-size: var(--zd_font_size15);"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
35
41
|
</div>
|
|
36
|
-
</div>
|
|
37
|
-
<div
|
|
38
|
-
class="leftBox grow basis shrinkOff"
|
|
39
|
-
data-id="boxComponent"
|
|
40
|
-
data-selector-id="box"
|
|
41
|
-
data-test-id="boxComponent"
|
|
42
|
-
>
|
|
43
42
|
<div
|
|
44
|
-
class="
|
|
43
|
+
class="leftBox selfAlign_center grow basis shrinkOff"
|
|
45
44
|
data-id="boxComponent"
|
|
46
45
|
data-selector-id="box"
|
|
47
46
|
data-test-id="boxComponent"
|
|
48
47
|
>
|
|
49
48
|
<div
|
|
50
|
-
class="
|
|
51
|
-
data-id="
|
|
49
|
+
class="titleBox shrinkOff"
|
|
50
|
+
data-id="boxComponent"
|
|
52
51
|
data-selector-id="box"
|
|
53
|
-
data-test-id="
|
|
52
|
+
data-test-id="boxComponent"
|
|
54
53
|
>
|
|
55
|
-
|
|
54
|
+
<div
|
|
55
|
+
class="value basisAuto shrinkOn"
|
|
56
|
+
data-id="MultiSelectHeader_selectAll_Text"
|
|
57
|
+
data-selector-id="box"
|
|
58
|
+
data-test-id="MultiSelectHeader_selectAll_Text"
|
|
59
|
+
>
|
|
60
|
+
List
|
|
61
|
+
</div>
|
|
56
62
|
</div>
|
|
57
63
|
</div>
|
|
58
64
|
</div>
|
|
@@ -35,7 +35,7 @@ exports[`Suggestions Should render with renderBeforeChildren 1`] = `
|
|
|
35
35
|
data-test-id="boxComponent"
|
|
36
36
|
>
|
|
37
37
|
<div
|
|
38
|
-
class="titleBox
|
|
38
|
+
class="titleBox shrinkOff"
|
|
39
39
|
data-id="boxComponent"
|
|
40
40
|
data-selector-id="box"
|
|
41
41
|
data-test-id="boxComponent"
|
|
@@ -51,7 +51,7 @@ exports[`Suggestions Should render with renderBeforeChildren 1`] = `
|
|
|
51
51
|
</span>
|
|
52
52
|
</div>
|
|
53
53
|
<div
|
|
54
|
-
class="value basisAuto shrinkOn"
|
|
54
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
55
55
|
data-id="boxComponent"
|
|
56
56
|
data-selector-id="box"
|
|
57
57
|
data-test-id="boxComponent"
|
|
@@ -122,13 +122,13 @@ exports[`Suggestions rendering with limit props 1`] = `
|
|
|
122
122
|
data-test-id="boxComponent"
|
|
123
123
|
>
|
|
124
124
|
<div
|
|
125
|
-
class="titleBox
|
|
125
|
+
class="titleBox shrinkOff"
|
|
126
126
|
data-id="boxComponent"
|
|
127
127
|
data-selector-id="box"
|
|
128
128
|
data-test-id="boxComponent"
|
|
129
129
|
>
|
|
130
130
|
<div
|
|
131
|
-
class="value basisAuto shrinkOn"
|
|
131
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
132
132
|
data-id="boxComponent"
|
|
133
133
|
data-selector-id="box"
|
|
134
134
|
data-test-id="boxComponent"
|
|
@@ -160,13 +160,13 @@ exports[`Suggestions rendering with limit props 1`] = `
|
|
|
160
160
|
data-test-id="boxComponent"
|
|
161
161
|
>
|
|
162
162
|
<div
|
|
163
|
-
class="titleBox
|
|
163
|
+
class="titleBox shrinkOff"
|
|
164
164
|
data-id="boxComponent"
|
|
165
165
|
data-selector-id="box"
|
|
166
166
|
data-test-id="boxComponent"
|
|
167
167
|
>
|
|
168
168
|
<div
|
|
169
|
-
class="value basisAuto shrinkOn"
|
|
169
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
170
170
|
data-id="boxComponent"
|
|
171
171
|
data-selector-id="box"
|
|
172
172
|
data-test-id="boxComponent"
|
|
@@ -197,13 +197,13 @@ exports[`Suggestions rendering with limit props 1`] = `
|
|
|
197
197
|
data-test-id="boxComponent"
|
|
198
198
|
>
|
|
199
199
|
<div
|
|
200
|
-
class="titleBox
|
|
200
|
+
class="titleBox shrinkOff"
|
|
201
201
|
data-id="boxComponent"
|
|
202
202
|
data-selector-id="box"
|
|
203
203
|
data-test-id="boxComponent"
|
|
204
204
|
>
|
|
205
205
|
<div
|
|
206
|
-
class="value basisAuto shrinkOn"
|
|
206
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
207
207
|
data-id="boxComponent"
|
|
208
208
|
data-selector-id="box"
|
|
209
209
|
data-test-id="boxComponent"
|
|
@@ -232,13 +232,13 @@ exports[`Suggestions rendering with limit props 1`] = `
|
|
|
232
232
|
data-test-id="boxComponent"
|
|
233
233
|
>
|
|
234
234
|
<div
|
|
235
|
-
class="titleBox
|
|
235
|
+
class="titleBox shrinkOff"
|
|
236
236
|
data-id="boxComponent"
|
|
237
237
|
data-selector-id="box"
|
|
238
238
|
data-test-id="boxComponent"
|
|
239
239
|
>
|
|
240
240
|
<div
|
|
241
|
-
class="value basisAuto shrinkOn"
|
|
241
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
242
242
|
data-id="boxComponent"
|
|
243
243
|
data-selector-id="box"
|
|
244
244
|
data-test-id="boxComponent"
|
|
@@ -267,13 +267,13 @@ exports[`Suggestions rendering with limit props 1`] = `
|
|
|
267
267
|
data-test-id="boxComponent"
|
|
268
268
|
>
|
|
269
269
|
<div
|
|
270
|
-
class="titleBox
|
|
270
|
+
class="titleBox shrinkOff"
|
|
271
271
|
data-id="boxComponent"
|
|
272
272
|
data-selector-id="box"
|
|
273
273
|
data-test-id="boxComponent"
|
|
274
274
|
>
|
|
275
275
|
<div
|
|
276
|
-
class="value basisAuto shrinkOn"
|
|
276
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
277
277
|
data-id="boxComponent"
|
|
278
278
|
data-selector-id="box"
|
|
279
279
|
data-test-id="boxComponent"
|
|
@@ -302,13 +302,13 @@ exports[`Suggestions rendering with limit props 1`] = `
|
|
|
302
302
|
data-test-id="boxComponent"
|
|
303
303
|
>
|
|
304
304
|
<div
|
|
305
|
-
class="titleBox
|
|
305
|
+
class="titleBox shrinkOff"
|
|
306
306
|
data-id="boxComponent"
|
|
307
307
|
data-selector-id="box"
|
|
308
308
|
data-test-id="boxComponent"
|
|
309
309
|
>
|
|
310
310
|
<div
|
|
311
|
-
class="value basisAuto shrinkOn"
|
|
311
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
312
312
|
data-id="boxComponent"
|
|
313
313
|
data-selector-id="box"
|
|
314
314
|
data-test-id="boxComponent"
|
|
@@ -337,13 +337,13 @@ exports[`Suggestions rendering with limit props 1`] = `
|
|
|
337
337
|
data-test-id="boxComponent"
|
|
338
338
|
>
|
|
339
339
|
<div
|
|
340
|
-
class="titleBox
|
|
340
|
+
class="titleBox shrinkOff"
|
|
341
341
|
data-id="boxComponent"
|
|
342
342
|
data-selector-id="box"
|
|
343
343
|
data-test-id="boxComponent"
|
|
344
344
|
>
|
|
345
345
|
<div
|
|
346
|
-
class="value basisAuto shrinkOn"
|
|
346
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
347
347
|
data-id="boxComponent"
|
|
348
348
|
data-selector-id="box"
|
|
349
349
|
data-test-id="boxComponent"
|
|
@@ -372,13 +372,13 @@ exports[`Suggestions rendering with limit props 1`] = `
|
|
|
372
372
|
data-test-id="boxComponent"
|
|
373
373
|
>
|
|
374
374
|
<div
|
|
375
|
-
class="titleBox
|
|
375
|
+
class="titleBox shrinkOff"
|
|
376
376
|
data-id="boxComponent"
|
|
377
377
|
data-selector-id="box"
|
|
378
378
|
data-test-id="boxComponent"
|
|
379
379
|
>
|
|
380
380
|
<div
|
|
381
|
-
class="value basisAuto shrinkOn"
|
|
381
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
382
382
|
data-id="boxComponent"
|
|
383
383
|
data-selector-id="box"
|
|
384
384
|
data-test-id="boxComponent"
|
|
@@ -407,13 +407,13 @@ exports[`Suggestions rendering with limit props 1`] = `
|
|
|
407
407
|
data-test-id="boxComponent"
|
|
408
408
|
>
|
|
409
409
|
<div
|
|
410
|
-
class="titleBox
|
|
410
|
+
class="titleBox shrinkOff"
|
|
411
411
|
data-id="boxComponent"
|
|
412
412
|
data-selector-id="box"
|
|
413
413
|
data-test-id="boxComponent"
|
|
414
414
|
>
|
|
415
415
|
<div
|
|
416
|
-
class="value basisAuto shrinkOn"
|
|
416
|
+
class="selfAlign_center value basisAuto shrinkOn"
|
|
417
417
|
data-id="boxComponent"
|
|
418
418
|
data-selector-id="box"
|
|
419
419
|
data-test-id="boxComponent"
|
|
@@ -38,6 +38,7 @@ export const AdvancedGroupMultiSelect_defaultProps = {
|
|
|
38
38
|
palette: 'default',
|
|
39
39
|
isLoading: false,
|
|
40
40
|
dataSelectorId: 'advancedGroupMultiSelect',
|
|
41
|
+
customProps: {},
|
|
41
42
|
allowValueFallback: true
|
|
42
43
|
};
|
|
43
44
|
export const AdvancedMultiSelect_defaultProps = {
|
|
@@ -169,5 +170,6 @@ export const SelectedOptions_defaultProps = {
|
|
|
169
170
|
export const Suggestions_defaultProps = {
|
|
170
171
|
a11y: {},
|
|
171
172
|
isVirtualizerEnabled: false,
|
|
173
|
+
customClass: {},
|
|
172
174
|
needMultiLineText: false
|
|
173
175
|
};
|
|
@@ -116,7 +116,8 @@ export const MultiSelect_propTypes = {
|
|
|
116
116
|
setAriaId: PropTypes.string,
|
|
117
117
|
ariaErrorId: PropTypes.string,
|
|
118
118
|
customProps: PropTypes.shape({
|
|
119
|
-
TextBoxIconProps: PropTypes.object
|
|
119
|
+
TextBoxIconProps: PropTypes.object,
|
|
120
|
+
SuggestionsProps: PropTypes.object
|
|
120
121
|
}),
|
|
121
122
|
isFocus: PropTypes.bool,
|
|
122
123
|
allowValueFallback: PropTypes.bool,
|
|
@@ -201,7 +202,11 @@ export const Suggestions_propTypes = {
|
|
|
201
202
|
})),
|
|
202
203
|
renderBeforeChildren: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
203
204
|
limit: PropTypes.number,
|
|
204
|
-
limitReachedMessage: PropTypes.string
|
|
205
|
+
limitReachedMessage: PropTypes.string,
|
|
206
|
+
customClass: PropTypes.shape({
|
|
207
|
+
containerClass: PropTypes.string
|
|
208
|
+
}),
|
|
209
|
+
needMultiLineText: PropTypes.bool
|
|
205
210
|
};
|
|
206
211
|
export const AdvancedGroupMultiSelect_propTypes = {
|
|
207
212
|
animationStyle: PropTypes.string,
|
|
@@ -276,7 +281,10 @@ export const AdvancedGroupMultiSelect_propTypes = {
|
|
|
276
281
|
dataSelectorId: PropTypes.string,
|
|
277
282
|
isFocus: PropTypes.bool,
|
|
278
283
|
allowValueFallback: PropTypes.bool,
|
|
279
|
-
limit: PropTypes.number
|
|
284
|
+
limit: PropTypes.number,
|
|
285
|
+
customProps: PropTypes.shape({
|
|
286
|
+
SuggestionsProps: PropTypes.object
|
|
287
|
+
})
|
|
280
288
|
};
|
|
281
289
|
export const AdvancedMultiSelect_propTypes = { ...MultiSelect_propTypes,
|
|
282
290
|
selectedOptionDetails: PropTypes.string,
|
package/es/Popup/Popup.js
CHANGED
|
@@ -17,8 +17,15 @@ const Popup = function (Component) {
|
|
|
17
17
|
closeOnScroll = false,
|
|
18
18
|
isOutsideScrollBlocked = false
|
|
19
19
|
} = options;
|
|
20
|
-
|
|
21
|
-
const
|
|
20
|
+
|
|
21
|
+
const getRootElement = () => {
|
|
22
|
+
return getLibraryConfig('getRootElement');
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const getMobileWidth = () => {
|
|
26
|
+
return getLibraryConfig('mobileWidth');
|
|
27
|
+
};
|
|
28
|
+
|
|
22
29
|
const middleware = {
|
|
23
30
|
useAbsolutePositioning: isAbsolutePositioningNeeded,
|
|
24
31
|
positionOrder: customOrder,
|
|
@@ -30,8 +37,8 @@ const Popup = function (Component) {
|
|
|
30
37
|
};
|
|
31
38
|
const popupConfig = {
|
|
32
39
|
group,
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
getMobileWidth,
|
|
41
|
+
getRootElement,
|
|
35
42
|
middleware
|
|
36
43
|
};
|
|
37
44
|
return DotkitPopup(Component, popupConfig);
|
package/es/Select/GroupSelect.js
CHANGED
|
@@ -626,7 +626,7 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
626
626
|
let {
|
|
627
627
|
TextBoxIconProps = {},
|
|
628
628
|
TextBoxProps = {},
|
|
629
|
-
SuggestionsProps
|
|
629
|
+
SuggestionsProps = {}
|
|
630
630
|
} = customProps;
|
|
631
631
|
return /*#__PURE__*/React.createElement("div", {
|
|
632
632
|
className: `${style.container} ${style[`box_${size}`]} ${isReadOnly ? style.readonly : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''} ${iconOnHover && (isReadOnly || isDisabled) ? style.iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? style.iconOnHoverStyle : ''}`,
|
|
@@ -172,8 +172,8 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
172
172
|
needEffect,
|
|
173
173
|
isLoading,
|
|
174
174
|
dataSelectorId,
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
getTargetRef,
|
|
176
|
+
customProps
|
|
177
177
|
} = this.props;
|
|
178
178
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
179
179
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
@@ -198,7 +198,7 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
198
198
|
let {
|
|
199
199
|
TextBoxProps,
|
|
200
200
|
DropdownSearchTextBoxProps,
|
|
201
|
-
SuggestionsProps
|
|
201
|
+
SuggestionsProps = {}
|
|
202
202
|
} = customProps;
|
|
203
203
|
return /*#__PURE__*/React.createElement("div", {
|
|
204
204
|
className: `${style.wrapper} ${isDisabled ? style.disabled : ''} ${isReadOnly ? style.readOnly : ''} ${needEffect && !(isDisabled || isReadOnly) ? style.effect : ''} ${className ? className : ''}`,
|
|
@@ -360,7 +360,8 @@ class SelectWithIcon extends Component {
|
|
|
360
360
|
htmlId,
|
|
361
361
|
isLoading,
|
|
362
362
|
dataSelectorId,
|
|
363
|
-
customProps
|
|
363
|
+
customProps,
|
|
364
|
+
customClass
|
|
364
365
|
} = this.props;
|
|
365
366
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
366
367
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
@@ -378,8 +379,11 @@ class SelectWithIcon extends Component {
|
|
|
378
379
|
TextBoxProps = {},
|
|
379
380
|
DropdownSearchTextBoxProps = {},
|
|
380
381
|
TextBoxIconProps = {},
|
|
381
|
-
ListItemProps
|
|
382
|
+
ListItemProps = {}
|
|
382
383
|
} = customProps;
|
|
384
|
+
const {
|
|
385
|
+
dropBoxClass = ''
|
|
386
|
+
} = customClass;
|
|
383
387
|
return /*#__PURE__*/React.createElement("div", {
|
|
384
388
|
className: `${style.container} ${style[`box_${size}`]} ${isReadOnly ? style.readonly : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''}`,
|
|
385
389
|
"data-title": isDisabled ? title : null,
|
|
@@ -475,7 +479,10 @@ class SelectWithIcon extends Component {
|
|
|
475
479
|
size: boxSize,
|
|
476
480
|
isPadding: false,
|
|
477
481
|
isResponsivePadding: true,
|
|
478
|
-
alignBox: "row"
|
|
482
|
+
alignBox: "row",
|
|
483
|
+
customClass: {
|
|
484
|
+
customDropBox: dropBoxClass
|
|
485
|
+
}
|
|
479
486
|
}, isLoading ? /*#__PURE__*/React.createElement(Container, {
|
|
480
487
|
align: "both",
|
|
481
488
|
className: style.loader
|