@zohodesk/components 1.0.0-temp-210.4 → 1.0.0-temp-199.3
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/.cli/propValidation_report.html +1 -1
- package/README.md +0 -8
- package/es/DateTime/DateTime.js +4 -8
- package/es/DateTime/DateWidget.js +1 -8
- package/es/DateTime/props/defaultProps.js +0 -4
- package/es/DateTime/props/propTypes.js +1 -6
- package/es/ListItem/ListItem.js +2 -2
- package/es/ListItem/ListItem.module.css +85 -18
- package/es/ListItem/ListItemWithAvatar.js +3 -3
- package/es/ListItem/ListItemWithIcon.js +2 -2
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +7 -2
- package/es/MultiSelect/AdvancedMultiSelect.js +2 -1
- package/es/MultiSelect/MultiSelect.js +7 -2
- package/es/MultiSelect/Suggestions.js +8 -4
- package/es/MultiSelect/props/defaultProps.js +6 -4
- package/es/MultiSelect/props/propTypes.js +4 -2
- package/es/Select/GroupSelect.js +7 -2
- package/es/Select/SelectWithAvatar.js +7 -2
- package/es/Select/SelectWithIcon.js +4 -2
- package/es/Select/props/defaultProps.js +4 -2
- package/es/Select/props/propTypes.js +4 -2
- package/lib/DateTime/DateTime.js +5 -11
- package/lib/DateTime/DateWidget.js +1 -8
- package/lib/DateTime/props/defaultProps.js +0 -4
- package/lib/DateTime/props/propTypes.js +1 -6
- package/lib/ListItem/ListItem.js +2 -2
- package/lib/ListItem/ListItem.module.css +85 -18
- package/lib/ListItem/ListItemWithAvatar.js +3 -3
- package/lib/ListItem/ListItemWithIcon.js +2 -2
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +7 -3
- package/lib/MultiSelect/AdvancedMultiSelect.js +3 -1
- package/lib/MultiSelect/MultiSelect.js +6 -3
- package/lib/MultiSelect/Suggestions.js +8 -4
- package/lib/MultiSelect/props/defaultProps.js +6 -4
- package/lib/MultiSelect/props/propTypes.js +6 -5
- package/lib/Select/GroupSelect.js +8 -3
- package/lib/Select/SelectWithAvatar.js +8 -3
- package/lib/Select/SelectWithIcon.js +5 -3
- package/lib/Select/props/defaultProps.js +4 -2
- package/lib/Select/props/propTypes.js +4 -2
- package/package.json +2 -2
- package/result.json +1 -1
package/README.md
CHANGED
|
@@ -32,14 +32,6 @@ In this Package, we Provide Some Basic Components to Build Web App
|
|
|
32
32
|
- TextBoxIcon
|
|
33
33
|
- Tooltip
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
# 1.2.49
|
|
37
|
-
|
|
38
|
-
- **DateTime, DateWidget**
|
|
39
|
-
|
|
40
|
-
- renderCustomHeader and renderCustomFooter props support added.
|
|
41
|
-
|
|
42
|
-
|
|
43
35
|
# 1.2.48
|
|
44
36
|
|
|
45
37
|
- **ResizeObserver**
|
package/es/DateTime/DateTime.js
CHANGED
|
@@ -650,13 +650,10 @@ export default class DateTime extends React.PureComponent {
|
|
|
650
650
|
targetOffset,
|
|
651
651
|
isRestrictScroll,
|
|
652
652
|
dropBoxPortalId,
|
|
653
|
-
renderCustomHeader,
|
|
654
|
-
renderCustomFooter,
|
|
655
653
|
customProps = {}
|
|
656
654
|
} = this.props;
|
|
657
655
|
const {
|
|
658
|
-
TimeProps = {}
|
|
659
|
-
DropBoxProps = {}
|
|
656
|
+
TimeProps = {}
|
|
660
657
|
} = customProps;
|
|
661
658
|
const {
|
|
662
659
|
timeText = 'Time',
|
|
@@ -677,7 +674,7 @@ export default class DateTime extends React.PureComponent {
|
|
|
677
674
|
"data-id": `${dataId}_Calendar`,
|
|
678
675
|
"data-test-id": `${dataId}_Calendar`,
|
|
679
676
|
onClick: this.closePopup
|
|
680
|
-
},
|
|
677
|
+
}, /*#__PURE__*/React.createElement(DateTimePopupHeader, {
|
|
681
678
|
onOpenYearView: this.handleOpenYearView,
|
|
682
679
|
showMonthTxt: showmonthtxt,
|
|
683
680
|
isYearView: isYearView,
|
|
@@ -721,7 +718,7 @@ export default class DateTime extends React.PureComponent {
|
|
|
721
718
|
cancelText: cancelText,
|
|
722
719
|
onCancel: this.handleClear,
|
|
723
720
|
dataId: dataId
|
|
724
|
-
}) : null,
|
|
721
|
+
}) : null, isYearView ? /*#__PURE__*/React.createElement("div", {
|
|
725
722
|
className: style.yearContainer
|
|
726
723
|
}, /*#__PURE__*/React.createElement(YearView, {
|
|
727
724
|
onSelectYear: this.handleSelectYear,
|
|
@@ -755,8 +752,7 @@ export default class DateTime extends React.PureComponent {
|
|
|
755
752
|
positionsOffset: positionsOffset,
|
|
756
753
|
targetOffset: targetOffset,
|
|
757
754
|
isRestrictScroll: isRestrictScroll,
|
|
758
|
-
portalId: dropBoxPortalId
|
|
759
|
-
...DropBoxProps
|
|
755
|
+
portalId: dropBoxPortalId
|
|
760
756
|
}, /*#__PURE__*/React.createElement(Box, null, childEle)) : null;
|
|
761
757
|
}
|
|
762
758
|
|
|
@@ -128,8 +128,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
128
128
|
dateFormat = '',
|
|
129
129
|
is24Hour,
|
|
130
130
|
isHideCurrentYear,
|
|
131
|
-
getPopupProps
|
|
132
|
-
handleBlur
|
|
131
|
+
getPopupProps
|
|
133
132
|
} = this.props;
|
|
134
133
|
|
|
135
134
|
if (validation && validation.validate) {
|
|
@@ -163,8 +162,6 @@ class DateWidgetComponent extends React.Component {
|
|
|
163
162
|
if (prevProps.isPopupReady !== isPopupReady) {
|
|
164
163
|
if (isPopupReady) {
|
|
165
164
|
this.resetLocalDate && this.resetLocalDate();
|
|
166
|
-
} else {
|
|
167
|
-
handleBlur && handleBlur();
|
|
168
165
|
}
|
|
169
166
|
|
|
170
167
|
if (getPopupProps) {
|
|
@@ -1007,8 +1004,6 @@ class DateWidgetComponent extends React.Component {
|
|
|
1007
1004
|
a11y,
|
|
1008
1005
|
boxSize,
|
|
1009
1006
|
onError,
|
|
1010
|
-
renderCustomHeader,
|
|
1011
|
-
renderCustomFooter,
|
|
1012
1007
|
customProps = {}
|
|
1013
1008
|
} = this.props;
|
|
1014
1009
|
const {
|
|
@@ -1111,8 +1106,6 @@ class DateWidgetComponent extends React.Component {
|
|
|
1111
1106
|
dropBoxPortalId: dropBoxPortalId,
|
|
1112
1107
|
boxSize: boxSize,
|
|
1113
1108
|
onError: onError,
|
|
1114
|
-
renderCustomHeader: renderCustomHeader,
|
|
1115
|
-
renderCustomFooter: renderCustomFooter,
|
|
1116
1109
|
customProps: DateTimeProps
|
|
1117
1110
|
}));
|
|
1118
1111
|
}
|
|
@@ -21,8 +21,6 @@ export const DateTime_defaultProps = {
|
|
|
21
21
|
is24Hour: false,
|
|
22
22
|
isDefaultPosition: false,
|
|
23
23
|
customDateFormat: null,
|
|
24
|
-
renderCustomHeader: null,
|
|
25
|
-
renderCustomFooter: null,
|
|
26
24
|
customProps: {}
|
|
27
25
|
};
|
|
28
26
|
export const DateWidget_defaultProps = {
|
|
@@ -46,8 +44,6 @@ export const DateWidget_defaultProps = {
|
|
|
46
44
|
needErrorOnBlur: false,
|
|
47
45
|
isEditable: false,
|
|
48
46
|
iconOnHover: false,
|
|
49
|
-
renderCustomHeader: null,
|
|
50
|
-
renderCustomFooter: null,
|
|
51
47
|
is24Hour: false
|
|
52
48
|
};
|
|
53
49
|
export const YearView_defaultProps = {
|
|
@@ -73,8 +73,6 @@ export const DateTime_propTypes = {
|
|
|
73
73
|
targetOffset: PropTypes.string,
|
|
74
74
|
isRestrictScroll: PropTypes.bool,
|
|
75
75
|
dropBoxPortalId: PropTypes.string,
|
|
76
|
-
renderCustomHeader: PropTypes.node,
|
|
77
|
-
renderCustomFooter: PropTypes.node,
|
|
78
76
|
customProps: PropTypes.object
|
|
79
77
|
};
|
|
80
78
|
export const DateWidget_propTypes = {
|
|
@@ -144,10 +142,7 @@ export const DateWidget_propTypes = {
|
|
|
144
142
|
dropBoxPortalId: PropTypes.string,
|
|
145
143
|
a11y: PropTypes.object,
|
|
146
144
|
getPopupProps: PropTypes.func,
|
|
147
|
-
|
|
148
|
-
renderCustomFooter: PropTypes.node,
|
|
149
|
-
customProps: PropTypes.object,
|
|
150
|
-
handleBlur: PropTypes.func
|
|
145
|
+
customProps: PropTypes.object
|
|
151
146
|
};
|
|
152
147
|
export const YearView_propTypes = {
|
|
153
148
|
onSelectMonth: PropTypes.func,
|
package/es/ListItem/ListItem.js
CHANGED
|
@@ -100,7 +100,7 @@ export default class ListItem extends React.Component {
|
|
|
100
100
|
autoHover: autoHover,
|
|
101
101
|
needTick: needTick,
|
|
102
102
|
needBorder: needBorder,
|
|
103
|
-
customClass: customListItem
|
|
103
|
+
customClass: `${needMultiLineText ? style.txtAlignBaseLine + ' ' + style.autoHeight : ''} ${customListItem}`,
|
|
104
104
|
dataId: dataIdString,
|
|
105
105
|
dataSelectorId: `${dataSelectorId}`,
|
|
106
106
|
isLink: isLink,
|
|
@@ -122,7 +122,7 @@ export default class ListItem extends React.Component {
|
|
|
122
122
|
adjust: true,
|
|
123
123
|
className: style.children
|
|
124
124
|
}, children) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
125
|
-
className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon}`,
|
|
125
|
+
className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon} ${needMultiLineText ? style.tickIconCenter : ''}`,
|
|
126
126
|
"aria-hidden": ariaHidden,
|
|
127
127
|
dataId: `${dataIdString}_tickIcon`,
|
|
128
128
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -17,8 +17,9 @@
|
|
|
17
17
|
}[dir=ltr] .varClass {
|
|
18
18
|
--listitem_avatar_margin: 0 var(--zd_size15) 0 0;
|
|
19
19
|
}[dir=rtl] .varClass {
|
|
20
|
-
--listitem_avatar_margin: 0
|
|
20
|
+
--listitem_avatar_margin: 0 var(--zd_size15) 0 0;
|
|
21
21
|
}
|
|
22
|
+
|
|
22
23
|
.list {
|
|
23
24
|
composes: varClass;
|
|
24
25
|
position: relative;
|
|
@@ -34,62 +35,84 @@
|
|
|
34
35
|
border-color: var(--listitem_border_color);
|
|
35
36
|
cursor: pointer;
|
|
36
37
|
}
|
|
38
|
+
|
|
37
39
|
.list, .default, .secondary {
|
|
38
40
|
background-color: var(--listitem_bg_color);
|
|
39
41
|
}
|
|
42
|
+
|
|
40
43
|
[dir=ltr] .withBorder {
|
|
41
|
-
--listitem_border_width: 0 0 0 1px
|
|
44
|
+
--listitem_border_width: 0 0 0 1px
|
|
45
|
+
/*rtl: 0 1px 0 0*/
|
|
46
|
+
;
|
|
42
47
|
}
|
|
48
|
+
|
|
43
49
|
[dir=rtl] .withBorder {
|
|
44
|
-
--listitem_border_width: 0
|
|
50
|
+
--listitem_border_width: 0 0 0 1px ;
|
|
45
51
|
}
|
|
52
|
+
|
|
46
53
|
.active {
|
|
47
54
|
--listitem_border_color: var(--zdt_listitem_active_border);
|
|
48
55
|
}
|
|
56
|
+
|
|
49
57
|
[dir=ltr] .small {
|
|
50
58
|
--listitem_padding: var(--zd_size7) var(--zd_size3) var(--zd_size7) var(--zd_size5);
|
|
51
59
|
}
|
|
60
|
+
|
|
52
61
|
[dir=rtl] .small {
|
|
53
|
-
--listitem_padding: var(--zd_size7) var(--
|
|
62
|
+
--listitem_padding: var(--zd_size7) var(--zd_size3) var(--zd_size7) var(--zd_size5);
|
|
54
63
|
}
|
|
64
|
+
|
|
55
65
|
.medium {
|
|
56
66
|
--listitem_padding: var(--zd_size7) var(--zd_size20);
|
|
57
67
|
--listitem_min_height: var(--zd_size35);
|
|
58
68
|
}
|
|
69
|
+
|
|
59
70
|
.large {
|
|
60
71
|
--listitem_height: var(--zd_size48);
|
|
61
72
|
}
|
|
73
|
+
|
|
62
74
|
[dir=ltr] .large {
|
|
63
75
|
--listitem_padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25);
|
|
64
76
|
}
|
|
77
|
+
|
|
65
78
|
[dir=rtl] .large {
|
|
66
|
-
--listitem_padding: var(--zd_size10) var(--
|
|
79
|
+
--listitem_padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25);
|
|
67
80
|
}
|
|
81
|
+
|
|
68
82
|
.value,
|
|
69
83
|
.children {
|
|
70
84
|
composes: dotted from '../common/common.module.css';
|
|
71
85
|
}
|
|
72
|
-
|
|
86
|
+
|
|
87
|
+
.value {
|
|
73
88
|
line-height: 1.5385;
|
|
74
89
|
}
|
|
75
|
-
|
|
90
|
+
|
|
91
|
+
.multiLineValue {
|
|
92
|
+
line-height: 1.5385;
|
|
76
93
|
word-break: break-word;
|
|
77
|
-
|
|
94
|
+
-webkit-line-clamp: 3;
|
|
95
|
+
composes: clamp from '../common/common.module.css';
|
|
78
96
|
}
|
|
97
|
+
|
|
79
98
|
.iconBox {
|
|
80
99
|
width: var(--zd_size20) ;
|
|
81
100
|
text-align: center;
|
|
82
101
|
}
|
|
102
|
+
|
|
83
103
|
[dir=ltr] .iconBox {
|
|
84
104
|
margin-right: var(--zd_size10) ;
|
|
85
105
|
}
|
|
106
|
+
|
|
86
107
|
[dir=rtl] .iconBox {
|
|
87
108
|
margin-left: var(--zd_size10) ;
|
|
88
109
|
}
|
|
110
|
+
|
|
89
111
|
.iconBox,
|
|
90
112
|
.leftAvatar {
|
|
91
113
|
font-size: 0 ;
|
|
92
114
|
}
|
|
115
|
+
|
|
93
116
|
.leftAvatar {
|
|
94
117
|
margin: var(--listitem_avatar_margin);
|
|
95
118
|
}
|
|
@@ -97,61 +120,78 @@
|
|
|
97
120
|
.defaultHover, .primaryHover, .secondaryHover, .darkHover {
|
|
98
121
|
background-color: var(--listitem_highlight_bg_color);
|
|
99
122
|
}
|
|
123
|
+
|
|
100
124
|
.activewithBorder {
|
|
101
125
|
--listitem_border_color: var(--zdt_listitem_active_border);
|
|
102
126
|
}
|
|
127
|
+
|
|
103
128
|
[dir=ltr] .activewithBorder {
|
|
104
|
-
--listitem_border_width: 0 0 0 1px
|
|
129
|
+
--listitem_border_width: 0 0 0 1px
|
|
130
|
+
/*rtl: 0 1px 0 0*/
|
|
131
|
+
;
|
|
105
132
|
}
|
|
133
|
+
|
|
106
134
|
[dir=rtl] .activewithBorder {
|
|
107
|
-
--listitem_border_width: 0
|
|
135
|
+
--listitem_border_width: 0 0 0 1px ;
|
|
108
136
|
}
|
|
109
137
|
|
|
110
138
|
.defaultHover,
|
|
111
139
|
.defaultEffect:hover
|
|
140
|
+
|
|
112
141
|
/* .defaultEffect:focus */
|
|
113
|
-
{
|
|
142
|
+
{
|
|
114
143
|
--listitem_bg_color: var(--zdt_listitem_highlight_bg);
|
|
115
144
|
}
|
|
145
|
+
|
|
116
146
|
.primaryHover,
|
|
117
147
|
.primaryEffect:hover
|
|
148
|
+
|
|
118
149
|
/* .primaryEffect:focus */
|
|
119
|
-
|
|
150
|
+
{
|
|
120
151
|
--listitem_bg_color: var(--zdt_listitem_primary_bg);
|
|
121
152
|
--listitem_highlight_bg_color: var(--zdt_listitem_primary_bg);
|
|
122
153
|
}
|
|
154
|
+
|
|
123
155
|
.secondaryHover,
|
|
124
156
|
.secondaryEffect:hover
|
|
157
|
+
|
|
125
158
|
/* .secondaryEffect:focus */
|
|
126
|
-
{
|
|
159
|
+
{
|
|
127
160
|
--listitem_bg_color: var(--zdt_listitem_secondary_bg);
|
|
128
161
|
--listitem_highlight_bg_color: var(--zdt_listitem_secondary_bg);
|
|
129
162
|
--listitem_text_color: var(--zdt_listitem_secondary_text);
|
|
130
163
|
}
|
|
164
|
+
|
|
131
165
|
.darkHover,
|
|
132
166
|
.darkEffect:hover
|
|
167
|
+
|
|
133
168
|
/* .darkEffect:focus */
|
|
134
|
-
|
|
169
|
+
{
|
|
135
170
|
--listitem_bg_color: var(--zdt_listitem_dark_effect_bg);
|
|
136
171
|
--listitem_highlight_bg_color: var(--zdt_listitem_dark_effect_bg);
|
|
137
172
|
}
|
|
173
|
+
|
|
138
174
|
.activedefault, .activeprimary, .activesecondary, .activedark {
|
|
139
175
|
background-color: var(--listitem_active_bg_color);
|
|
140
176
|
}
|
|
177
|
+
|
|
141
178
|
.activedefault,
|
|
142
179
|
.activedefault:hover,
|
|
143
180
|
.activeprimary,
|
|
144
181
|
.activeprimary:hover {
|
|
145
182
|
--listitem_active_bg_color: var(--zdt_listitem_primary_bg);
|
|
146
183
|
}
|
|
184
|
+
|
|
147
185
|
.activesecondary {
|
|
148
186
|
--listitem_active_bg_color: var(--zdt_listitem_secondary_bg);
|
|
149
187
|
--listitem_text_color: var(--zdt_listitem_secondary_text);
|
|
150
188
|
}
|
|
189
|
+
|
|
151
190
|
.dark {
|
|
152
191
|
--listitem_bg_color: var(--zdt_listitem_dark_bg);
|
|
153
192
|
--listitem_text_color: var(--zdt_listitem_dark_text);
|
|
154
193
|
}
|
|
194
|
+
|
|
155
195
|
.activedark {
|
|
156
196
|
--listitem_active_bg_color: var(--zdt_listitem_dark_active_bg);
|
|
157
197
|
}
|
|
@@ -170,36 +210,63 @@
|
|
|
170
210
|
[dir=rtl] .tickIcon, [dir=rtl] .defaultTick, [dir=rtl] .darkTick {
|
|
171
211
|
left: var(--zd_size20) ;
|
|
172
212
|
}
|
|
213
|
+
|
|
173
214
|
.defaultTick {
|
|
174
215
|
--listitem_tickicon_color: var(--zdt_listitem_default_tickicon);
|
|
175
216
|
}
|
|
217
|
+
|
|
176
218
|
.darkTick {
|
|
177
219
|
--listitem_tickicon_color: var(--zdt_listitem_dark_tickicon);
|
|
178
220
|
}
|
|
179
|
-
|
|
221
|
+
|
|
222
|
+
.defaultTick>i {
|
|
180
223
|
display: block;
|
|
181
224
|
}
|
|
225
|
+
|
|
182
226
|
[dir=ltr] .smallwithTick {
|
|
183
227
|
--listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size5);
|
|
184
228
|
}
|
|
229
|
+
|
|
185
230
|
[dir=rtl] .smallwithTick {
|
|
186
|
-
--listitem_padding: var(--zd_size7) var(--
|
|
231
|
+
--listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size5);
|
|
187
232
|
}
|
|
233
|
+
|
|
188
234
|
[dir=ltr] .mediumwithTick {
|
|
189
235
|
--listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size20);
|
|
190
236
|
}
|
|
237
|
+
|
|
191
238
|
[dir=rtl] .mediumwithTick {
|
|
192
|
-
--listitem_padding: var(--zd_size7) var(--
|
|
239
|
+
--listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size20);
|
|
193
240
|
}
|
|
241
|
+
|
|
194
242
|
[dir=ltr] .largewithTick {
|
|
195
243
|
--listitem_padding: var(--zd_size10) var(--zd_size39) var(--zd_size10) var(--zd_size25);
|
|
196
244
|
}
|
|
245
|
+
|
|
197
246
|
[dir=rtl] .largewithTick {
|
|
198
|
-
--listitem_padding: var(--zd_size10) var(--
|
|
247
|
+
--listitem_padding: var(--zd_size10) var(--zd_size39) var(--zd_size10) var(--zd_size25);
|
|
199
248
|
}
|
|
249
|
+
|
|
200
250
|
.responsiveHeight {
|
|
201
251
|
--listitem_min_height: var(--zd_size45);
|
|
202
252
|
font-size: var(--zd_font_size15) ;
|
|
203
253
|
padding-top: var(--zd_size10) ;
|
|
204
254
|
padding-bottom: var(--zd_size10) ;
|
|
205
255
|
}
|
|
256
|
+
|
|
257
|
+
.autoHeight {
|
|
258
|
+
height: auto ;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.tickIconCenter {
|
|
262
|
+
top: 50% ;
|
|
263
|
+
transform: translateY(-50%);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.txtAlignBaseLine {
|
|
267
|
+
align-items: baseline;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.alignSelfTop {
|
|
271
|
+
align-self: start;
|
|
272
|
+
}
|
|
@@ -105,7 +105,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
105
105
|
autoHover: autoHover,
|
|
106
106
|
needTick: needTick,
|
|
107
107
|
needBorder: needBorder,
|
|
108
|
-
customClass: customListItem
|
|
108
|
+
customClass: `${needMultiLineText ? style.autoHeight : ''} ${customListItem}`,
|
|
109
109
|
dataId: `${dataIdString}_ListItemWithAvatar`,
|
|
110
110
|
dataSelectorId: `${dataSelectorId}`,
|
|
111
111
|
onClick: this.handleClick,
|
|
@@ -116,7 +116,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
116
116
|
customProps: ListItemProps,
|
|
117
117
|
...ContainerProps
|
|
118
118
|
}, name || imgSrc ? /*#__PURE__*/React.createElement(Box, {
|
|
119
|
-
className: style.leftAvatar
|
|
119
|
+
className: `${needMultiLineText ? style.alignSelfTop : ''} ${style.leftAvatar}`
|
|
120
120
|
}, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
121
121
|
name: name,
|
|
122
122
|
size: "small",
|
|
@@ -143,7 +143,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
143
143
|
"data-title": isDisabled ? null : title,
|
|
144
144
|
className: needMultiLineText ? style.multiLineValue : style.value
|
|
145
145
|
}, value) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
146
|
-
className: style.tickIcon
|
|
146
|
+
className: `${style.tickIcon} ${needMultiLineText ? style.tickIconCenter : ''}`,
|
|
147
147
|
"aria-hidden": ariaHidden,
|
|
148
148
|
dataId: `${dataIdString}_tickIcon`,
|
|
149
149
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -95,7 +95,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
95
95
|
autoHover: autoHover,
|
|
96
96
|
needTick: needTick,
|
|
97
97
|
needBorder: needBorder,
|
|
98
|
-
customClass: customClass
|
|
98
|
+
customClass: `${needMultiLineText ? style.autoHeight : ''} ${needMultiLineText && iconClass && !iconName ? style.txtAlignBaseLine : ''} ${customClass}`,
|
|
99
99
|
dataId: dataIdString,
|
|
100
100
|
dataSelectorId: dataSelectorId,
|
|
101
101
|
isLink: isLink,
|
|
@@ -125,7 +125,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
125
125
|
"data-title": isDisabled ? null : title,
|
|
126
126
|
dataId: `${dataIdString}_Text`
|
|
127
127
|
}, value), needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
128
|
-
className: style.tickIcon
|
|
128
|
+
className: `${style.tickIcon} ${needMultiLineText ? style.tickIconCenter : ''}`,
|
|
129
129
|
"aria-hidden": ariaHidden,
|
|
130
130
|
dataId: `${dataIdString}_tickIcon`,
|
|
131
131
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -875,8 +875,12 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
875
875
|
palette,
|
|
876
876
|
needEffect,
|
|
877
877
|
autoComplete,
|
|
878
|
-
getTargetRef
|
|
878
|
+
getTargetRef,
|
|
879
|
+
customProps
|
|
879
880
|
} = this.props;
|
|
881
|
+
const {
|
|
882
|
+
suggestionsProps
|
|
883
|
+
} = customProps;
|
|
880
884
|
let {
|
|
881
885
|
clearText = 'Clear all'
|
|
882
886
|
} = i18nKeys;
|
|
@@ -1055,7 +1059,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1055
1059
|
a11y: {
|
|
1056
1060
|
role: 'option'
|
|
1057
1061
|
},
|
|
1058
|
-
dataId: `${dataId}_Options
|
|
1062
|
+
dataId: `${dataId}_Options`,
|
|
1063
|
+
...suggestionsProps
|
|
1059
1064
|
}));
|
|
1060
1065
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1061
1066
|
options: revampedGroups,
|
|
@@ -549,7 +549,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
549
549
|
role: 'option'
|
|
550
550
|
},
|
|
551
551
|
dataId: `${dataIdMultiSelectComp}_Options`,
|
|
552
|
-
...SuggestionsProps
|
|
552
|
+
...SuggestionsProps,
|
|
553
|
+
needMultiLineText: true
|
|
553
554
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
554
555
|
isLoading: isFetchingOptions,
|
|
555
556
|
options: options,
|
|
@@ -1015,8 +1015,12 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1015
1015
|
boxSize,
|
|
1016
1016
|
isLoading,
|
|
1017
1017
|
selectAllText,
|
|
1018
|
-
needSelectAll
|
|
1018
|
+
needSelectAll,
|
|
1019
|
+
customProps
|
|
1019
1020
|
} = this.props;
|
|
1021
|
+
const {
|
|
1022
|
+
suggestionsProps = {}
|
|
1023
|
+
} = customProps;
|
|
1020
1024
|
const {
|
|
1021
1025
|
selectedOptions,
|
|
1022
1026
|
searchStr,
|
|
@@ -1106,7 +1110,8 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1106
1110
|
selectedOptions: selectedOptionIds,
|
|
1107
1111
|
a11y: {
|
|
1108
1112
|
role: 'option'
|
|
1109
|
-
}
|
|
1113
|
+
},
|
|
1114
|
+
...suggestionsProps
|
|
1110
1115
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1111
1116
|
isLoading: isFetchingOptions,
|
|
1112
1117
|
options: options,
|
|
@@ -27,7 +27,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
27
27
|
avatarPalette,
|
|
28
28
|
palette,
|
|
29
29
|
htmlId,
|
|
30
|
-
a11y
|
|
30
|
+
a11y,
|
|
31
|
+
needMultiLineText
|
|
31
32
|
} = this.props;
|
|
32
33
|
const {
|
|
33
34
|
ariaParentRole,
|
|
@@ -92,7 +93,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
92
93
|
size: listItemSize,
|
|
93
94
|
avatarPalette: avatarPalette,
|
|
94
95
|
palette: palette,
|
|
95
|
-
a11y: list_a11y
|
|
96
|
+
a11y: list_a11y,
|
|
97
|
+
needMultiLineText: needMultiLineText
|
|
96
98
|
});
|
|
97
99
|
} else if (optionType === 'icon') {
|
|
98
100
|
return /*#__PURE__*/React.createElement(ListItemWithIcon, { ...commonProps,
|
|
@@ -112,7 +114,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
112
114
|
iconSize: iconSize,
|
|
113
115
|
size: listItemSize,
|
|
114
116
|
palette: palette,
|
|
115
|
-
a11y: list_a11y
|
|
117
|
+
a11y: list_a11y,
|
|
118
|
+
needMultiLineText: needMultiLineText
|
|
116
119
|
});
|
|
117
120
|
}
|
|
118
121
|
|
|
@@ -131,7 +134,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
131
134
|
active: isActive,
|
|
132
135
|
size: listItemSize,
|
|
133
136
|
palette: palette,
|
|
134
|
-
a11y: list_a11y
|
|
137
|
+
a11y: list_a11y,
|
|
138
|
+
needMultiLineText: needMultiLineText
|
|
135
139
|
});
|
|
136
140
|
})));
|
|
137
141
|
}
|
|
@@ -37,7 +37,8 @@ export const AdvancedGroupMultiSelect_defaultProps = {
|
|
|
37
37
|
needEffect: true,
|
|
38
38
|
palette: 'default',
|
|
39
39
|
isLoading: false,
|
|
40
|
-
dataSelectorId: 'advancedGroupMultiSelect'
|
|
40
|
+
dataSelectorId: 'advancedGroupMultiSelect',
|
|
41
|
+
customProps: {}
|
|
41
42
|
};
|
|
42
43
|
export const AdvancedMultiSelect_defaultProps = {
|
|
43
44
|
animationStyle: 'bounce',
|
|
@@ -154,13 +155,14 @@ export const MultiSelectWithAvatar_defaultProps = {
|
|
|
154
155
|
isLoading: false,
|
|
155
156
|
dataSelectorId: 'multiSelectWithAvatar',
|
|
156
157
|
keepSelectedOptions: false,
|
|
157
|
-
|
|
158
|
-
|
|
158
|
+
needResponsive: true,
|
|
159
|
+
customProps: {}
|
|
159
160
|
};
|
|
160
161
|
export const SelectedOptions_defaultProps = {
|
|
161
162
|
size: 'medium',
|
|
162
163
|
dataId: 'selectedOptions'
|
|
163
164
|
};
|
|
164
165
|
export const Suggestions_defaultProps = {
|
|
165
|
-
a11y: {}
|
|
166
|
+
a11y: {},
|
|
167
|
+
needMultiLineText: false
|
|
166
168
|
};
|
|
@@ -176,7 +176,8 @@ export const Suggestions_propTypes = {
|
|
|
176
176
|
logo: PropTypes.string,
|
|
177
177
|
optionType: PropTypes.string,
|
|
178
178
|
listItemProps: PropTypes.object
|
|
179
|
-
}))
|
|
179
|
+
})),
|
|
180
|
+
needMultiLineText: PropTypes.bool
|
|
180
181
|
};
|
|
181
182
|
export const AdvancedGroupMultiSelect_propTypes = {
|
|
182
183
|
animationStyle: PropTypes.string,
|
|
@@ -246,7 +247,8 @@ export const AdvancedGroupMultiSelect_propTypes = {
|
|
|
246
247
|
needToCloseOnSelect: PropTypes.func,
|
|
247
248
|
searchStr: PropTypes.string,
|
|
248
249
|
children: PropTypes.node,
|
|
249
|
-
dataSelectorId: PropTypes.string
|
|
250
|
+
dataSelectorId: PropTypes.string,
|
|
251
|
+
customProps: PropTypes.string
|
|
250
252
|
};
|
|
251
253
|
export const AdvancedMultiSelect_propTypes = { ...MultiSelect_propTypes,
|
|
252
254
|
selectedOptionDetails: PropTypes.string,
|
package/es/Select/GroupSelect.js
CHANGED
|
@@ -588,8 +588,12 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
588
588
|
htmlId,
|
|
589
589
|
iconOnHover,
|
|
590
590
|
isLoading,
|
|
591
|
-
dataSelectorId
|
|
591
|
+
dataSelectorId,
|
|
592
|
+
customProps
|
|
592
593
|
} = this.props;
|
|
594
|
+
const {
|
|
595
|
+
suggestionsProps = {}
|
|
596
|
+
} = customProps;
|
|
593
597
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
594
598
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
595
599
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -782,7 +786,8 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
782
786
|
ariaParentRole: 'listbox',
|
|
783
787
|
role: 'option'
|
|
784
788
|
},
|
|
785
|
-
dataId: `${dataId}_Options
|
|
789
|
+
dataId: `${dataId}_Options`,
|
|
790
|
+
...suggestionsProps
|
|
786
791
|
}));
|
|
787
792
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
788
793
|
options: revampedGroups,
|
|
@@ -163,8 +163,12 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
163
163
|
needEffect,
|
|
164
164
|
isLoading,
|
|
165
165
|
dataSelectorId,
|
|
166
|
-
getTargetRef
|
|
166
|
+
getTargetRef,
|
|
167
|
+
customProps
|
|
167
168
|
} = this.props;
|
|
169
|
+
const {
|
|
170
|
+
suggestionsProps = {}
|
|
171
|
+
} = customProps;
|
|
168
172
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
169
173
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
170
174
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -321,7 +325,8 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
321
325
|
a11y: {
|
|
322
326
|
ariaParentRole: 'listbox',
|
|
323
327
|
role: 'option'
|
|
324
|
-
}
|
|
328
|
+
},
|
|
329
|
+
...suggestionsProps
|
|
325
330
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
326
331
|
isLoading: isFetchingOptions,
|
|
327
332
|
options: options,
|
|
@@ -367,7 +367,8 @@ class SelectWithIcon extends Component {
|
|
|
367
367
|
let {
|
|
368
368
|
TextBoxProps = {},
|
|
369
369
|
DropdownSearchTextBoxProps = {},
|
|
370
|
-
TextBoxIconProps = {}
|
|
370
|
+
TextBoxIconProps = {},
|
|
371
|
+
listItemProps = {}
|
|
371
372
|
} = customProps;
|
|
372
373
|
return /*#__PURE__*/React.createElement("div", {
|
|
373
374
|
className: `${style.container} ${style[`box_${size}`]} ${isReadOnly ? style.readonly : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''}`,
|
|
@@ -530,7 +531,8 @@ class SelectWithIcon extends Component {
|
|
|
530
531
|
role: 'option',
|
|
531
532
|
ariaSelected: selectedId === options[idKey],
|
|
532
533
|
ariaLabel: options[valueKey]
|
|
533
|
-
}
|
|
534
|
+
},
|
|
535
|
+
...listItemProps
|
|
534
536
|
});
|
|
535
537
|
})) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
536
538
|
isLoading: isFetchingOptions,
|