@zohodesk/components 1.0.0-temp-199.14 → 1.0.0-temp-222
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/assets/Appearance/dark/mode/Component_DarkMode.module.css +1 -0
- package/assets/Appearance/light/mode/Component_LightMode.module.css +1 -0
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +1 -0
- package/es/ListItem/ListItem.js +3 -5
- package/es/ListItem/ListItem.module.css +46 -23
- package/es/ListItem/ListItemWithAvatar.js +16 -13
- package/es/ListItem/ListItemWithCheckBox.js +16 -12
- package/es/ListItem/ListItemWithIcon.js +17 -14
- package/es/ListItem/ListItemWithRadio.js +16 -12
- package/es/ListItem/props/defaultProps.js +8 -6
- package/es/ListItem/props/propTypes.js +11 -5
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +2 -7
- package/es/MultiSelect/AdvancedMultiSelect.js +7 -3
- package/es/MultiSelect/MultiSelect.js +7 -8
- package/es/MultiSelect/MultiSelectWithAvatar.js +3 -1
- package/es/MultiSelect/Suggestions.js +34 -11
- package/es/MultiSelect/props/defaultProps.js +1 -4
- package/es/MultiSelect/props/propTypes.js +8 -11
- package/es/Select/GroupSelect.js +1 -5
- package/es/Select/SelectWithAvatar.js +2 -7
- package/es/Select/SelectWithIcon.js +2 -4
- package/es/Select/props/defaultProps.js +1 -2
- package/es/Select/props/propTypes.js +3 -8
- package/es/common/common.module.css +6 -1
- package/es/utils/dropDownUtils.js +19 -10
- package/lib/ListItem/ListItem.js +3 -5
- package/lib/ListItem/ListItem.module.css +46 -23
- package/lib/ListItem/ListItemWithAvatar.js +15 -12
- package/lib/ListItem/ListItemWithCheckBox.js +15 -11
- package/lib/ListItem/ListItemWithIcon.js +16 -13
- package/lib/ListItem/ListItemWithRadio.js +15 -11
- package/lib/ListItem/props/defaultProps.js +8 -6
- package/lib/ListItem/props/propTypes.js +11 -6
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +3 -8
- package/lib/MultiSelect/AdvancedMultiSelect.js +72 -67
- package/lib/MultiSelect/MultiSelect.js +8 -7
- package/lib/MultiSelect/MultiSelectWithAvatar.js +3 -1
- package/lib/MultiSelect/Suggestions.js +36 -11
- package/lib/MultiSelect/props/defaultProps.js +1 -4
- package/lib/MultiSelect/props/propTypes.js +8 -10
- package/lib/Select/GroupSelect.js +2 -4
- package/lib/Select/SelectWithAvatar.js +3 -8
- package/lib/Select/SelectWithIcon.js +3 -5
- package/lib/Select/props/defaultProps.js +1 -2
- package/lib/Select/props/propTypes.js +3 -8
- package/lib/common/common.module.css +6 -1
- package/lib/utils/dropDownUtils.js +21 -10
- package/package.json +4 -4
- package/result.json +1 -1
|
@@ -165,6 +165,7 @@
|
|
|
165
165
|
|
|
166
166
|
/* listitem */
|
|
167
167
|
--zdt_listitem_default_text: hsla(0, 0.00%, calc(0.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
168
|
+
--zdt_listitem_secondaryfield_text: hsla(218, 9.76%, calc(51.76% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
168
169
|
--zdt_listitem_default_border: var(--dot_mirror);
|
|
169
170
|
--zdt_listitem_default_bg: var(--dot_mirror);
|
|
170
171
|
--zdt_listitem_default_tickicon: var(--zdt_cta_primary_text);
|
|
@@ -165,6 +165,7 @@
|
|
|
165
165
|
|
|
166
166
|
/* listitem */
|
|
167
167
|
--zdt_listitem_default_text: hsla(210, 7.41%, calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
168
|
+
--zdt_listitem_secondaryfield_text: hsla(217, 7.76%, calc(54.51% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
168
169
|
--zdt_listitem_default_border: var(--dot_mirror);
|
|
169
170
|
--zdt_listitem_default_bg: var(--dot_mirror);
|
|
170
171
|
--zdt_listitem_default_tickicon: var(--zdt_cta_primary_text);
|
package/es/ListItem/ListItem.js
CHANGED
|
@@ -70,8 +70,7 @@ export default class ListItem extends React.Component {
|
|
|
70
70
|
a11y,
|
|
71
71
|
customClass,
|
|
72
72
|
customProps,
|
|
73
|
-
needMultiLineText
|
|
74
|
-
lhsBoxAlign
|
|
73
|
+
needMultiLineText
|
|
75
74
|
} = this.props;
|
|
76
75
|
let {
|
|
77
76
|
ListItemProps = {},
|
|
@@ -101,8 +100,7 @@ export default class ListItem extends React.Component {
|
|
|
101
100
|
autoHover: autoHover,
|
|
102
101
|
needTick: needTick,
|
|
103
102
|
needBorder: needBorder,
|
|
104
|
-
customClass:
|
|
105
|
-
align: lhsBoxAlign,
|
|
103
|
+
customClass: customListItem,
|
|
106
104
|
dataId: dataIdString,
|
|
107
105
|
dataSelectorId: `${dataSelectorId}`,
|
|
108
106
|
isLink: isLink,
|
|
@@ -124,7 +122,7 @@ export default class ListItem extends React.Component {
|
|
|
124
122
|
adjust: true,
|
|
125
123
|
className: style.children
|
|
126
124
|
}, children) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
127
|
-
className: `${style.tickIcon} ${tickIconPalette} ${
|
|
125
|
+
className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon}`,
|
|
128
126
|
"aria-hidden": ariaHidden,
|
|
129
127
|
dataId: `${dataIdString}_tickIcon`,
|
|
130
128
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
--listitem_min_height: var(--zd_size35);
|
|
58
58
|
}
|
|
59
59
|
.large {
|
|
60
|
-
--
|
|
60
|
+
--listitem_min_height: var(--zd_size48);
|
|
61
61
|
}
|
|
62
62
|
[dir=ltr] .large {
|
|
63
63
|
--listitem_padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25);
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
line-height: 1.5385;
|
|
74
74
|
}
|
|
75
75
|
.multiLineValue{
|
|
76
|
-
|
|
76
|
+
composes: lineClamp from '../common/common.module.css';
|
|
77
77
|
}
|
|
78
78
|
.iconBox {
|
|
79
79
|
width: var(--zd_size20) ;
|
|
@@ -85,10 +85,6 @@
|
|
|
85
85
|
[dir=rtl] .iconBox {
|
|
86
86
|
margin-left: var(--zd_size10) ;
|
|
87
87
|
}
|
|
88
|
-
.iconBoxTopAlign {
|
|
89
|
-
align-self: start;
|
|
90
|
-
composes: dflex alignVertical from '../common/common.module.css';
|
|
91
|
-
}
|
|
92
88
|
.iconBox,
|
|
93
89
|
.leftAvatar {
|
|
94
90
|
font-size: 0 ;
|
|
@@ -96,17 +92,36 @@
|
|
|
96
92
|
.leftAvatar {
|
|
97
93
|
margin: var(--listitem_avatar_margin);
|
|
98
94
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
|
|
96
|
+
.lhsAvatarBox,
|
|
97
|
+
.lhsJustifyContent_start,
|
|
98
|
+
.lhsJustifyContent_center,
|
|
99
|
+
.lhsJustifyContent_end {
|
|
100
|
+
composes: dflex alignVertical from '../common/common.module.css';
|
|
101
|
+
}
|
|
102
|
+
.lhsJustifyContent_start {
|
|
103
|
+
composes: justifyFStart from '../common/common.module.css';
|
|
102
104
|
}
|
|
103
|
-
.
|
|
104
|
-
|
|
105
|
-
height: var(--zd_font_size21);
|
|
105
|
+
.lhsJustifyContent_center {
|
|
106
|
+
composes: alignHorizontal from '../common/common.module.css';
|
|
106
107
|
}
|
|
107
|
-
.
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
.lhsJustifyContent_end {
|
|
109
|
+
composes: justifyFend from '../common/common.module.css';
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.lhsBox_small,
|
|
113
|
+
.lhsBox_medium,
|
|
114
|
+
.lhsBox_large{
|
|
115
|
+
height: 1em ;
|
|
116
|
+
}
|
|
117
|
+
.lhsBox_small {
|
|
118
|
+
font-size: var(--zd_font_size20) ;
|
|
119
|
+
}
|
|
120
|
+
.lhsBox_medium {
|
|
121
|
+
font-size: var(--zd_font_size21) ;
|
|
122
|
+
}
|
|
123
|
+
.lhsBox_large {
|
|
124
|
+
font-size: var(--zd_font_size28) ;
|
|
110
125
|
}
|
|
111
126
|
|
|
112
127
|
.defaultHover, .primaryHover, .secondaryHover, .darkHover {
|
|
@@ -171,17 +186,33 @@
|
|
|
171
186
|
--listitem_active_bg_color: var(--zdt_listitem_dark_active_bg);
|
|
172
187
|
}
|
|
173
188
|
|
|
189
|
+
.secondaryField{
|
|
190
|
+
color:var(--zdt_listitem_secondaryfield_text);
|
|
191
|
+
font-size: var(--zd_font_size12) ;
|
|
192
|
+
line-height: 1.25;
|
|
193
|
+
/* margin-top:1px */
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
|
|
174
197
|
.tickIcon,
|
|
175
198
|
.defaultTick,
|
|
176
199
|
.darkTick {
|
|
177
200
|
position: absolute;
|
|
178
201
|
color: var(--listitem_tickicon_color);
|
|
202
|
+
top:50% ;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
.tickIcon, .defaultTick, .darkTick {
|
|
207
|
+
transform: translateY(-50%);
|
|
179
208
|
}
|
|
180
209
|
|
|
210
|
+
|
|
181
211
|
[dir=ltr] .tickIcon, [dir=ltr] .defaultTick, [dir=ltr] .darkTick {
|
|
182
212
|
right: var(--zd_size20) ;
|
|
183
213
|
}
|
|
184
214
|
|
|
215
|
+
|
|
185
216
|
[dir=rtl] .tickIcon, [dir=rtl] .defaultTick, [dir=rtl] .darkTick {
|
|
186
217
|
left: var(--zd_size20) ;
|
|
187
218
|
}
|
|
@@ -212,17 +243,9 @@
|
|
|
212
243
|
[dir=rtl] .largewithTick {
|
|
213
244
|
--listitem_padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size39);
|
|
214
245
|
}
|
|
215
|
-
.largeSizeContainer{
|
|
216
|
-
--listitem_height: auto;
|
|
217
|
-
--listitem_min_height: var(--zd_size48);
|
|
218
|
-
}
|
|
219
246
|
.responsiveHeight {
|
|
220
247
|
--listitem_min_height: var(--zd_size45);
|
|
221
248
|
font-size: var(--zd_font_size15) ;
|
|
222
249
|
padding-top: var(--zd_size10) ;
|
|
223
250
|
padding-bottom: var(--zd_size10) ;
|
|
224
251
|
}
|
|
225
|
-
.tickIconCenter {
|
|
226
|
-
top: 50% ;
|
|
227
|
-
transform: translateY(-50%);
|
|
228
|
-
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**** Libraries ****/
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { Box } from "../Layout";
|
|
3
|
+
import { Box, Container } from "../Layout";
|
|
4
4
|
import ListContainer from "./ListContainer";
|
|
5
5
|
import { ListItemWithAvatarDefaultProps } from "./props/defaultProps";
|
|
6
6
|
import { ListItemWithAvatar_Props } from "./props/propTypes";
|
|
@@ -75,7 +75,8 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
75
75
|
customClass,
|
|
76
76
|
customProps,
|
|
77
77
|
needMultiLineText,
|
|
78
|
-
|
|
78
|
+
secondaryValue,
|
|
79
|
+
lhsAlignContent
|
|
79
80
|
} = this.props;
|
|
80
81
|
let {
|
|
81
82
|
ListItemProps = {},
|
|
@@ -98,11 +99,6 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
98
99
|
} = listA11y;
|
|
99
100
|
let isDarkPalette = palette === 'dark';
|
|
100
101
|
let dataIdString = value ? value : dataId;
|
|
101
|
-
const sizeClassMap = {
|
|
102
|
-
small: style.smallIconBox,
|
|
103
|
-
medium: style.mediumIconBox,
|
|
104
|
-
large: style.largeIconBox
|
|
105
|
-
};
|
|
106
102
|
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
107
103
|
a11y: listA11y,
|
|
108
104
|
size: size,
|
|
@@ -113,7 +109,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
113
109
|
autoHover: autoHover,
|
|
114
110
|
needTick: needTick,
|
|
115
111
|
needBorder: needBorder,
|
|
116
|
-
customClass:
|
|
112
|
+
customClass: customListItem,
|
|
117
113
|
dataId: `${dataIdString}_ListItemWithAvatar`,
|
|
118
114
|
dataSelectorId: `${dataSelectorId}`,
|
|
119
115
|
onClick: this.handleClick,
|
|
@@ -124,7 +120,8 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
124
120
|
customProps: ListItemProps,
|
|
125
121
|
...ContainerProps
|
|
126
122
|
}, name || imgSrc ? /*#__PURE__*/React.createElement(Box, {
|
|
127
|
-
|
|
123
|
+
align: lhsAlignContent,
|
|
124
|
+
className: `${style.leftAvatar} ${lhsAlignContent !== 'center' ? `${style.lhsAvatarBox} ${style[`lhsBox_${size}`]}` : ''}`
|
|
128
125
|
}, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
129
126
|
name: name,
|
|
130
127
|
size: "small",
|
|
@@ -147,13 +144,19 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
147
144
|
palette: isDarkPalette ? 'info' : avatarPalette,
|
|
148
145
|
customClass: customAvatar,
|
|
149
146
|
...AvatarProps
|
|
150
|
-
})) : null, value ? /*#__PURE__*/React.createElement(Box, {
|
|
147
|
+
})) : null, value || secondaryValue ? /*#__PURE__*/React.createElement(Box, {
|
|
151
148
|
flexible: true,
|
|
152
|
-
shrink: true
|
|
149
|
+
shrink: true
|
|
150
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
151
|
+
alignBox: "column"
|
|
152
|
+
}, value ? /*#__PURE__*/React.createElement(Box, {
|
|
153
153
|
"data-title": isDisabled ? null : title,
|
|
154
154
|
className: needMultiLineText ? style.multiLineValue : style.value
|
|
155
|
-
}, value) : null,
|
|
156
|
-
|
|
155
|
+
}, value) : null, secondaryValue ? /*#__PURE__*/React.createElement(Box, {
|
|
156
|
+
"data-title": isDisabled ? null : secondaryValue,
|
|
157
|
+
className: `${style.secondaryField} ${needMultiLineText ? style.multiLineValue : style.value}`
|
|
158
|
+
}, secondaryValue) : null)) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
159
|
+
className: style.tickIcon,
|
|
157
160
|
"aria-hidden": ariaHidden,
|
|
158
161
|
dataId: `${dataIdString}_tickIcon`,
|
|
159
162
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -3,7 +3,7 @@ import ListContainer from "./ListContainer";
|
|
|
3
3
|
import { ListItemWithCheckBoxDefaultProps } from "./props/defaultProps";
|
|
4
4
|
import { ListItemWithCheckBox_Props } from "./props/propTypes";
|
|
5
5
|
import CheckBox from "../CheckBox/CheckBox";
|
|
6
|
-
import { Box } from "../Layout";
|
|
6
|
+
import { Box, Container } from "../Layout";
|
|
7
7
|
import style from "./ListItem.module.css";
|
|
8
8
|
export default class ListItemWithCheckBox extends React.Component {
|
|
9
9
|
constructor(props) {
|
|
@@ -60,7 +60,9 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
60
60
|
customClass,
|
|
61
61
|
customProps,
|
|
62
62
|
needMultiLineText,
|
|
63
|
-
|
|
63
|
+
secondaryValue,
|
|
64
|
+
lhsAlignContent,
|
|
65
|
+
lhsJustifyContent
|
|
64
66
|
} = this.props;
|
|
65
67
|
const listA11y = {
|
|
66
68
|
role: 'option',
|
|
@@ -75,11 +77,6 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
75
77
|
customCheckBox = '',
|
|
76
78
|
customLabel = ''
|
|
77
79
|
} = customClass;
|
|
78
|
-
const sizeClassMap = {
|
|
79
|
-
small: style.smallIconBox,
|
|
80
|
-
medium: style.mediumIconBox,
|
|
81
|
-
large: style.largeIconBox
|
|
82
|
-
};
|
|
83
80
|
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
84
81
|
a11y: listA11y,
|
|
85
82
|
size: size,
|
|
@@ -88,7 +85,7 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
88
85
|
isDisabled: isDisabled,
|
|
89
86
|
active: active,
|
|
90
87
|
autoHover: autoHover,
|
|
91
|
-
customClass:
|
|
88
|
+
customClass: customListItem,
|
|
92
89
|
dataId: `${dataId ? dataId : value}_ListItemWithCheckBox`,
|
|
93
90
|
dataSelectorId: dataSelectorId,
|
|
94
91
|
onClick: this.onClick,
|
|
@@ -99,7 +96,8 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
99
96
|
customProps: ListItemProps,
|
|
100
97
|
...ContainerProps
|
|
101
98
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
102
|
-
|
|
99
|
+
align: lhsAlignContent,
|
|
100
|
+
className: `${style.iconBox} ${style[`lhsJustifyContent_${lhsJustifyContent}`]} ${lhsAlignContent !== 'center' ? style[`lhsBox_${size}`] : ''}`,
|
|
103
101
|
dataId: `${dataId ? dataId : value}_checkBox`
|
|
104
102
|
}, /*#__PURE__*/React.createElement(CheckBox, {
|
|
105
103
|
checked: checked,
|
|
@@ -110,12 +108,18 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
110
108
|
customCheckBox: customCheckBox,
|
|
111
109
|
customLabel: customLabel
|
|
112
110
|
}
|
|
113
|
-
})), /*#__PURE__*/React.createElement(Box, {
|
|
111
|
+
})), value || secondaryValue ? /*#__PURE__*/React.createElement(Box, {
|
|
114
112
|
flexible: true,
|
|
115
|
-
shrink: true
|
|
113
|
+
shrink: true
|
|
114
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
115
|
+
alignBox: "column"
|
|
116
|
+
}, value ? /*#__PURE__*/React.createElement(Box, {
|
|
116
117
|
"data-title": isDisabled ? null : title,
|
|
117
118
|
className: needMultiLineText ? style.multiLineValue : style.value
|
|
118
|
-
}, value)
|
|
119
|
+
}, value) : null, secondaryValue ? /*#__PURE__*/React.createElement(Box, {
|
|
120
|
+
"data-title": isDisabled ? null : secondaryValue,
|
|
121
|
+
className: `${style.secondaryField} ${needMultiLineText ? style.multiLineValue : style.value}`
|
|
122
|
+
}, secondaryValue) : null)) : null);
|
|
119
123
|
}
|
|
120
124
|
|
|
121
125
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**** Libraries ****/
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { Box } from "../Layout";
|
|
3
|
+
import { Box, Container } from "../Layout";
|
|
4
4
|
import { Icon } from '@zohodesk/icons';
|
|
5
5
|
import ListContainer from "./ListContainer";
|
|
6
6
|
import { ListItemWithIconDefaultProps } from "./props/defaultProps";
|
|
@@ -71,7 +71,9 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
71
71
|
customClass,
|
|
72
72
|
customProps,
|
|
73
73
|
needMultiLineText,
|
|
74
|
-
|
|
74
|
+
secondaryValue,
|
|
75
|
+
lhsAlignContent,
|
|
76
|
+
lhsJustifyContent
|
|
75
77
|
} = this.props;
|
|
76
78
|
let {
|
|
77
79
|
ListItemProps = {},
|
|
@@ -86,11 +88,6 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
86
88
|
ariaHidden
|
|
87
89
|
} = listA11y;
|
|
88
90
|
let dataIdString = dataId ? `${dataId.replace("'", '_')}` : value.toLowerCase().replace("'", '_');
|
|
89
|
-
const sizeClassMap = {
|
|
90
|
-
small: style.smallIconBox,
|
|
91
|
-
medium: style.mediumIconBox,
|
|
92
|
-
large: style.largeIconBox
|
|
93
|
-
};
|
|
94
91
|
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
95
92
|
a11y: listA11y,
|
|
96
93
|
size: size,
|
|
@@ -101,8 +98,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
101
98
|
autoHover: autoHover,
|
|
102
99
|
needTick: needTick,
|
|
103
100
|
needBorder: needBorder,
|
|
104
|
-
customClass:
|
|
105
|
-
align: needMultiLineText && iconClass && !iconName ? 'baseline' : 'vertical',
|
|
101
|
+
customClass: customClass,
|
|
106
102
|
dataId: dataIdString,
|
|
107
103
|
dataSelectorId: dataSelectorId,
|
|
108
104
|
isLink: isLink,
|
|
@@ -117,7 +113,8 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
117
113
|
...ContainerProps
|
|
118
114
|
}, iconName && /*#__PURE__*/React.createElement(Box, {
|
|
119
115
|
"aria-hidden": true,
|
|
120
|
-
|
|
116
|
+
align: lhsAlignContent,
|
|
117
|
+
className: `${style.iconBox} ${style[`lhsJustifyContent_${lhsJustifyContent}`]} ${lhsAlignContent !== 'center' ? style[`lhsBox_${size}`] : ''}`,
|
|
121
118
|
dataId: dataId ? `${dataId}_Icon` : `${value.toLowerCase().replace("'", '_')}_Icon`
|
|
122
119
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
123
120
|
iconClass: iconClass,
|
|
@@ -125,14 +122,20 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
125
122
|
size: iconSize
|
|
126
123
|
})), iconClass && !iconName ? /*#__PURE__*/React.createElement("span", {
|
|
127
124
|
className: iconClass
|
|
128
|
-
}) : null, value
|
|
125
|
+
}) : null, value || secondaryValue ? /*#__PURE__*/React.createElement(Box, {
|
|
129
126
|
flexible: true,
|
|
130
|
-
shrink: true
|
|
127
|
+
shrink: true
|
|
128
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
129
|
+
alignBox: "column"
|
|
130
|
+
}, value ? /*#__PURE__*/React.createElement(Box, {
|
|
131
131
|
className: needMultiLineText ? style.multiLineValue : style.value,
|
|
132
132
|
"data-title": isDisabled ? null : title,
|
|
133
133
|
dataId: `${dataIdString}_Text`
|
|
134
|
-
}, value)
|
|
135
|
-
|
|
134
|
+
}, value) : null, secondaryValue ? /*#__PURE__*/React.createElement(Box, {
|
|
135
|
+
"data-title": isDisabled ? null : secondaryValue,
|
|
136
|
+
className: `${style.secondaryField} ${needMultiLineText ? style.multiLineValue : style.value}`
|
|
137
|
+
}, secondaryValue) : null)) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
138
|
+
className: style.tickIcon,
|
|
136
139
|
"aria-hidden": ariaHidden,
|
|
137
140
|
dataId: `${dataIdString}_tickIcon`,
|
|
138
141
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Radio from "../Radio/Radio";
|
|
3
|
-
import { Box } from "../Layout";
|
|
3
|
+
import { Box, Container } from "../Layout";
|
|
4
4
|
import ListContainer from "./ListContainer";
|
|
5
5
|
import { ListItemWithRadioDefaultProps } from "./props/defaultProps";
|
|
6
6
|
import { ListItemWithRadio_Props } from "./props/propTypes";
|
|
@@ -61,7 +61,9 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
61
61
|
customClass,
|
|
62
62
|
customProps,
|
|
63
63
|
needMultiLineText,
|
|
64
|
-
|
|
64
|
+
secondaryValue,
|
|
65
|
+
lhsAlignContent,
|
|
66
|
+
lhsJustifyContent
|
|
65
67
|
} = this.props;
|
|
66
68
|
let {
|
|
67
69
|
ListItemProps = {},
|
|
@@ -76,11 +78,6 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
76
78
|
customRadio = '',
|
|
77
79
|
customRadioWrap = ''
|
|
78
80
|
} = customClass;
|
|
79
|
-
const sizeClassMap = {
|
|
80
|
-
small: style.smallIconBox,
|
|
81
|
-
medium: style.mediumIconBox,
|
|
82
|
-
large: style.largeIconBox
|
|
83
|
-
};
|
|
84
81
|
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
85
82
|
a11y: listA11y,
|
|
86
83
|
size: size,
|
|
@@ -89,7 +86,7 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
89
86
|
isDisabled: isDisabled,
|
|
90
87
|
active: active,
|
|
91
88
|
autoHover: autoHover,
|
|
92
|
-
customClass:
|
|
89
|
+
customClass: customListItem,
|
|
93
90
|
dataId: dataId,
|
|
94
91
|
dataSelectorId: dataSelectorId,
|
|
95
92
|
onClick: this.onClick,
|
|
@@ -100,7 +97,8 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
100
97
|
customProps: ListItemProps,
|
|
101
98
|
...ContainerProps
|
|
102
99
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
103
|
-
|
|
100
|
+
align: lhsAlignContent,
|
|
101
|
+
className: `${style.iconBox} ${style[`lhsJustifyContent_${lhsJustifyContent}`]} ${lhsAlignContent !== 'center' ? style[`lhsBox_${size}`] : ''}`,
|
|
104
102
|
dataId: `${dataId}_radio`
|
|
105
103
|
}, /*#__PURE__*/React.createElement(Radio, {
|
|
106
104
|
checked: checked,
|
|
@@ -112,12 +110,18 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
112
110
|
customRadio: customRadio,
|
|
113
111
|
customRadioWrap: customRadioWrap
|
|
114
112
|
}
|
|
115
|
-
})), /*#__PURE__*/React.createElement(Box, {
|
|
113
|
+
})), value || secondaryValue ? /*#__PURE__*/React.createElement(Box, {
|
|
116
114
|
flexible: true,
|
|
117
|
-
shrink: true
|
|
115
|
+
shrink: true
|
|
116
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
117
|
+
alignBox: "column"
|
|
118
|
+
}, value ? /*#__PURE__*/React.createElement(Box, {
|
|
118
119
|
"data-title": disableTitle ? null : title,
|
|
119
120
|
className: needMultiLineText ? style.multiLineValue : style.value
|
|
120
|
-
}, value)
|
|
121
|
+
}, value) : null, secondaryValue ? /*#__PURE__*/React.createElement(Box, {
|
|
122
|
+
"data-title": isDisabled ? null : secondaryValue,
|
|
123
|
+
className: `${style.secondaryField} ${needMultiLineText ? style.multiLineValue : style.value}`
|
|
124
|
+
}, secondaryValue) : null)) : null);
|
|
121
125
|
}
|
|
122
126
|
|
|
123
127
|
}
|
|
@@ -30,8 +30,7 @@ export const ListItemDefaultProps = {
|
|
|
30
30
|
customClass: {},
|
|
31
31
|
customProps: {},
|
|
32
32
|
dataSelectorId: 'listItem',
|
|
33
|
-
needMultiLineText: false
|
|
34
|
-
lhsBoxAlign: 'baseline'
|
|
33
|
+
needMultiLineText: false
|
|
35
34
|
};
|
|
36
35
|
export const ListItemWithAvatarDefaultProps = {
|
|
37
36
|
active: false,
|
|
@@ -50,7 +49,7 @@ export const ListItemWithAvatarDefaultProps = {
|
|
|
50
49
|
customProps: {},
|
|
51
50
|
dataSelectorId: 'listItemWithAvatar',
|
|
52
51
|
needMultiLineText: false,
|
|
53
|
-
|
|
52
|
+
lhsAlignContent: 'start'
|
|
54
53
|
};
|
|
55
54
|
export const ListItemWithCheckBoxDefaultProps = {
|
|
56
55
|
active: false,
|
|
@@ -65,7 +64,8 @@ export const ListItemWithCheckBoxDefaultProps = {
|
|
|
65
64
|
customProps: {},
|
|
66
65
|
dataSelectorId: 'listItemWithCheckBox',
|
|
67
66
|
needMultiLineText: false,
|
|
68
|
-
|
|
67
|
+
lhsAlignContent: 'start',
|
|
68
|
+
lhsJustifyContent: 'center'
|
|
69
69
|
};
|
|
70
70
|
export const ListItemWithIconDefaultProps = {
|
|
71
71
|
active: false,
|
|
@@ -83,7 +83,8 @@ export const ListItemWithIconDefaultProps = {
|
|
|
83
83
|
customProps: {},
|
|
84
84
|
dataSelectorId: 'listItemWithIcon',
|
|
85
85
|
needMultiLineText: false,
|
|
86
|
-
|
|
86
|
+
lhsAlignContent: 'start',
|
|
87
|
+
lhsJustifyContent: 'center'
|
|
87
88
|
};
|
|
88
89
|
export const ListItemWithRadioDefaultProps = {
|
|
89
90
|
active: false,
|
|
@@ -99,5 +100,6 @@ export const ListItemWithRadioDefaultProps = {
|
|
|
99
100
|
customProps: {},
|
|
100
101
|
dataSelectorId: 'listItemWithRadio',
|
|
101
102
|
needMultiLineText: false,
|
|
102
|
-
|
|
103
|
+
lhsAlignContent: 'start',
|
|
104
|
+
lhsJustifyContent: 'center'
|
|
103
105
|
};
|
|
@@ -58,7 +58,6 @@ export const ListItem_Props = {
|
|
|
58
58
|
ariaSelected: PropTypes.bool
|
|
59
59
|
}),
|
|
60
60
|
needMultiLineText: PropTypes.bool,
|
|
61
|
-
lhsBoxAlign: PropTypes.oneOf(['baseline', 'vertical']),
|
|
62
61
|
customClass: PropTypes.shape({
|
|
63
62
|
customListItem: PropTypes.string,
|
|
64
63
|
customTickIcon: PropTypes.string
|
|
@@ -93,6 +92,8 @@ export const ListItemWithAvatar_Props = {
|
|
|
93
92
|
size: PropTypes.string,
|
|
94
93
|
title: PropTypes.string,
|
|
95
94
|
value: PropTypes.string,
|
|
95
|
+
secondaryValue: PropTypes.string,
|
|
96
|
+
lhsAlignContent: PropTypes.oneOf(['start', 'end', 'center']),
|
|
96
97
|
a11y: PropTypes.shape({
|
|
97
98
|
role: PropTypes.string,
|
|
98
99
|
ariaSelected: PropTypes.bool,
|
|
@@ -104,7 +105,6 @@ export const ListItemWithAvatar_Props = {
|
|
|
104
105
|
customAvatarTeam: PropTypes.string
|
|
105
106
|
}),
|
|
106
107
|
needMultiLineText: PropTypes.bool,
|
|
107
|
-
lhsBoxAlign: PropTypes.oneOf(['baseline', 'vertical']),
|
|
108
108
|
customProps: PropTypes.shape({
|
|
109
109
|
ListItemProps: PropTypes.object,
|
|
110
110
|
ContainerProps: PropTypes.object,
|
|
@@ -130,12 +130,14 @@ export const ListItemWithCheckBox_Props = {
|
|
|
130
130
|
size: PropTypes.string,
|
|
131
131
|
title: PropTypes.string,
|
|
132
132
|
value: PropTypes.string,
|
|
133
|
+
secondaryValue: PropTypes.string,
|
|
134
|
+
lhsAlignContent: PropTypes.oneOf(['start', 'end', 'center']),
|
|
135
|
+
lhsJustifyContent: PropTypes.oneOf(['start', 'end', 'center']),
|
|
133
136
|
a11y: PropTypes.shape({
|
|
134
137
|
role: PropTypes.string,
|
|
135
138
|
ariaSelected: PropTypes.bool
|
|
136
139
|
}),
|
|
137
140
|
needMultiLineText: PropTypes.bool,
|
|
138
|
-
lhsBoxAlign: PropTypes.oneOf(['baseline', 'vertical']),
|
|
139
141
|
customClass: PropTypes.shape({
|
|
140
142
|
customListItem: PropTypes.string,
|
|
141
143
|
customCheckBox: PropTypes.string,
|
|
@@ -165,13 +167,15 @@ export const ListItemWithIcon_Props = {
|
|
|
165
167
|
size: PropTypes.string,
|
|
166
168
|
title: PropTypes.string,
|
|
167
169
|
value: PropTypes.string,
|
|
170
|
+
secondaryValue: PropTypes.string,
|
|
171
|
+
lhsAlignContent: PropTypes.oneOf(['start', 'end', 'center']),
|
|
172
|
+
lhsJustifyContent: PropTypes.oneOf(['start', 'end', 'center']),
|
|
168
173
|
a11y: PropTypes.shape({
|
|
169
174
|
role: PropTypes.string,
|
|
170
175
|
ariaSelected: PropTypes.bool,
|
|
171
176
|
ariaHidden: PropTypes.bool
|
|
172
177
|
}),
|
|
173
178
|
needMultiLineText: PropTypes.bool,
|
|
174
|
-
lhsBoxAlign: PropTypes.oneOf(['baseline', 'vertical']),
|
|
175
179
|
customClass: PropTypes.string,
|
|
176
180
|
customProps: PropTypes.shape({
|
|
177
181
|
ListItemProps: PropTypes.object
|
|
@@ -198,12 +202,14 @@ export const ListItemWithRadio_Props = {
|
|
|
198
202
|
size: PropTypes.string,
|
|
199
203
|
title: PropTypes.string,
|
|
200
204
|
value: PropTypes.string,
|
|
205
|
+
secondaryValue: PropTypes.string,
|
|
206
|
+
lhsAlignContent: PropTypes.oneOf(['start', 'end', 'center']),
|
|
207
|
+
lhsJustifyContent: PropTypes.oneOf(['start', 'end', 'center']),
|
|
201
208
|
a11y: PropTypes.shape({
|
|
202
209
|
role: PropTypes.string,
|
|
203
210
|
ariaSelected: PropTypes.bool
|
|
204
211
|
}),
|
|
205
212
|
needMultiLineText: PropTypes.bool,
|
|
206
|
-
lhsBoxAlign: PropTypes.oneOf(['baseline', 'vertical']),
|
|
207
213
|
customClass: PropTypes.shape({
|
|
208
214
|
customListItem: PropTypes.string,
|
|
209
215
|
customRadio: PropTypes.string,
|
|
@@ -884,12 +884,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
884
884
|
needEffect,
|
|
885
885
|
autoComplete,
|
|
886
886
|
getTargetRef,
|
|
887
|
-
isFocus
|
|
888
|
-
customProps
|
|
887
|
+
isFocus
|
|
889
888
|
} = this.props;
|
|
890
|
-
const {
|
|
891
|
-
SuggestionsProps = {}
|
|
892
|
-
} = customProps;
|
|
893
889
|
let {
|
|
894
890
|
clearText = 'Clear all'
|
|
895
891
|
} = i18nKeys;
|
|
@@ -1069,8 +1065,7 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1069
1065
|
a11y: {
|
|
1070
1066
|
role: 'option'
|
|
1071
1067
|
},
|
|
1072
|
-
dataId: `${dataId}_Options
|
|
1073
|
-
...SuggestionsProps
|
|
1068
|
+
dataId: `${dataId}_Options`
|
|
1074
1069
|
}));
|
|
1075
1070
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1076
1071
|
options: revampedGroups,
|
|
@@ -63,7 +63,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
63
63
|
searchStr
|
|
64
64
|
} = this.state;
|
|
65
65
|
const {
|
|
66
|
-
needLocalSearch
|
|
66
|
+
needLocalSearch,
|
|
67
|
+
searchFields
|
|
67
68
|
} = this.props;
|
|
68
69
|
const {
|
|
69
70
|
suggestions,
|
|
@@ -72,7 +73,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
72
73
|
options,
|
|
73
74
|
selectedOptions: dummyArray,
|
|
74
75
|
searchStr: getSearchString(searchStr),
|
|
75
|
-
needSearch: needLocalSearch
|
|
76
|
+
needSearch: needLocalSearch,
|
|
77
|
+
searchFields
|
|
76
78
|
});
|
|
77
79
|
this.suggestionsOrder = suggestionIds;
|
|
78
80
|
return suggestions;
|
|
@@ -379,7 +381,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
379
381
|
positionsOffset,
|
|
380
382
|
targetOffset,
|
|
381
383
|
isRestrictScroll,
|
|
382
|
-
isFocus
|
|
384
|
+
isFocus,
|
|
385
|
+
secondaryField
|
|
383
386
|
} = this.props;
|
|
384
387
|
let {
|
|
385
388
|
SuggestionsProps = {},
|
|
@@ -553,6 +556,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
553
556
|
onMouseEnter: this.handleMouseEnter,
|
|
554
557
|
needTick: true,
|
|
555
558
|
listItemSize: listItemSize,
|
|
559
|
+
secondaryField: secondaryField,
|
|
556
560
|
a11y: {
|
|
557
561
|
role: 'option'
|
|
558
562
|
},
|