@zohodesk/components 1.0.0-temp-221.1 → 1.0.0-temp-199.13
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/es/ListItem/ListContainer.js +3 -2
- package/es/ListItem/ListItem.js +5 -3
- package/es/ListItem/ListItem.module.css +25 -2
- package/es/ListItem/ListItemWithAvatar.js +10 -4
- package/es/ListItem/ListItemWithCheckBox.js +9 -3
- package/es/ListItem/ListItemWithIcon.js +11 -4
- package/es/ListItem/ListItemWithRadio.js +9 -3
- package/es/ListItem/props/defaultProps.js +12 -6
- package/es/ListItem/props/propTypes.js +7 -1
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +7 -2
- package/es/MultiSelect/MultiSelect.js +7 -2
- package/es/MultiSelect/Suggestions.js +9 -2
- package/es/MultiSelect/props/defaultProps.js +4 -1
- package/es/MultiSelect/props/propTypes.js +11 -3
- package/es/Select/GroupSelect.js +5 -1
- package/es/Select/SelectWithAvatar.js +7 -2
- package/es/Select/SelectWithIcon.js +4 -2
- package/es/Select/props/defaultProps.js +2 -1
- package/es/Select/props/propTypes.js +8 -3
- package/es/common/common.module.css +5 -0
- package/lib/ListItem/ListContainer.js +3 -2
- package/lib/ListItem/ListItem.js +5 -3
- package/lib/ListItem/ListItem.module.css +25 -2
- package/lib/ListItem/ListItemWithAvatar.js +10 -4
- package/lib/ListItem/ListItemWithCheckBox.js +9 -3
- package/lib/ListItem/ListItemWithIcon.js +11 -4
- package/lib/ListItem/ListItemWithRadio.js +9 -3
- package/lib/ListItem/props/defaultProps.js +12 -6
- package/lib/ListItem/props/propTypes.js +7 -2
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +8 -3
- package/lib/MultiSelect/MultiSelect.js +6 -3
- package/lib/MultiSelect/Suggestions.js +9 -3
- package/lib/MultiSelect/props/defaultProps.js +4 -1
- package/lib/MultiSelect/props/propTypes.js +10 -3
- package/lib/Select/GroupSelect.js +4 -2
- package/lib/Select/SelectWithAvatar.js +8 -3
- package/lib/Select/SelectWithIcon.js +5 -3
- package/lib/Select/props/defaultProps.js +2 -1
- package/lib/Select/props/propTypes.js +8 -3
- package/lib/common/common.module.css +5 -0
- package/package.json +2 -2
- package/result.json +1 -1
- package/assets/Appearance/dark/mode/Component_v2_DarkMode.module.css +0 -4
- package/assets/Appearance/light/mode/Component_v2_LightMode.module.css +0 -4
- package/assets/Appearance/pureDark/mode/Component_v2_PureDarkMode.module.css +0 -4
- package/es/components-v2/Label/Label.js +0 -86
- package/es/components-v2/Label/css/Label_v2.module.css +0 -41
- package/es/components-v2/Label/css/cssJSLogic.js +0 -27
- package/es/components-v2/Label/props/defaultProps.js +0 -8
- package/es/components-v2/Label/props/propTypes.js +0 -26
- package/lib/components-v2/Label/Label.js +0 -104
- package/lib/components-v2/Label/css/Label_v2.module.css +0 -41
- package/lib/components-v2/Label/css/cssJSLogic.js +0 -30
- package/lib/components-v2/Label/props/defaultProps.js +0 -15
- package/lib/components-v2/Label/props/propTypes.js +0 -37
|
@@ -31,7 +31,8 @@ const ListContainer = props => {
|
|
|
31
31
|
onClick,
|
|
32
32
|
onMouseEnter,
|
|
33
33
|
onMouseOver,
|
|
34
|
-
eleRef
|
|
34
|
+
eleRef,
|
|
35
|
+
align
|
|
35
36
|
} = props;
|
|
36
37
|
const responsiveFunc = useCallback(_ref => {
|
|
37
38
|
let {
|
|
@@ -77,7 +78,7 @@ const ListContainer = props => {
|
|
|
77
78
|
"aria-selected": ariaSelected,
|
|
78
79
|
"aria-label": ariaLabel,
|
|
79
80
|
isCover: false,
|
|
80
|
-
align:
|
|
81
|
+
align: align,
|
|
81
82
|
alignBox: "row",
|
|
82
83
|
className: `${style.list} ${style[size]} ${mobileToTab && isTouchDevice ? style.responsiveHeight : ''} ${style[palette]} ${active ? style[`active${palette}`] : highlight && !isDisabled ? style[`${palette}Hover`] : ''} ${autoHover && !isDisabled ? style[`${palette}Effect`] : ''} ${needTick ? style[`${size}withTick`] : ''} ${isDisabled ? CssProvider('isDisable') : ''} ${needBorder ? active ? style.activewithBorder : style.withBorder : ''} ${customClass}`,
|
|
83
84
|
dataId: dataId,
|
package/es/ListItem/ListItem.js
CHANGED
|
@@ -70,7 +70,8 @@ export default class ListItem extends React.Component {
|
|
|
70
70
|
a11y,
|
|
71
71
|
customClass,
|
|
72
72
|
customProps,
|
|
73
|
-
needMultiLineText
|
|
73
|
+
needMultiLineText,
|
|
74
|
+
lhsBoxAlign
|
|
74
75
|
} = this.props;
|
|
75
76
|
let {
|
|
76
77
|
ListItemProps = {},
|
|
@@ -100,7 +101,8 @@ export default class ListItem extends React.Component {
|
|
|
100
101
|
autoHover: autoHover,
|
|
101
102
|
needTick: needTick,
|
|
102
103
|
needBorder: needBorder,
|
|
103
|
-
customClass: customListItem
|
|
104
|
+
customClass: `${needMultiLineText && size == 'large' ? style.largeSizeContainer : ''} ${customListItem}`,
|
|
105
|
+
align: lhsBoxAlign,
|
|
104
106
|
dataId: dataIdString,
|
|
105
107
|
dataSelectorId: `${dataSelectorId}`,
|
|
106
108
|
isLink: isLink,
|
|
@@ -122,7 +124,7 @@ export default class ListItem extends React.Component {
|
|
|
122
124
|
adjust: true,
|
|
123
125
|
className: style.children
|
|
124
126
|
}, children) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
125
|
-
className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon}`,
|
|
127
|
+
className: `${style.tickIcon} ${tickIconPalette} ${needMultiLineText ? style.tickIconCenter : ''} ${customTickIcon}`,
|
|
126
128
|
"aria-hidden": ariaHidden,
|
|
127
129
|
dataId: `${dataIdString}_tickIcon`,
|
|
128
130
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -73,8 +73,7 @@
|
|
|
73
73
|
line-height: 1.5385;
|
|
74
74
|
}
|
|
75
75
|
.multiLineValue{
|
|
76
|
-
|
|
77
|
-
composes: clamp from '../common/common.module.css'
|
|
76
|
+
composes: lineClamp from '../common/common.module.css';
|
|
78
77
|
}
|
|
79
78
|
.iconBox {
|
|
80
79
|
width: var(--zd_size20) ;
|
|
@@ -86,6 +85,10 @@
|
|
|
86
85
|
[dir=rtl] .iconBox {
|
|
87
86
|
margin-left: var(--zd_size10) ;
|
|
88
87
|
}
|
|
88
|
+
.iconBoxTopAlign {
|
|
89
|
+
align-self: start;
|
|
90
|
+
composes: dflex alignVertical from '../common/common.module.css';
|
|
91
|
+
}
|
|
89
92
|
.iconBox,
|
|
90
93
|
.leftAvatar {
|
|
91
94
|
font-size: 0 ;
|
|
@@ -93,6 +96,18 @@
|
|
|
93
96
|
.leftAvatar {
|
|
94
97
|
margin: var(--listitem_avatar_margin);
|
|
95
98
|
}
|
|
99
|
+
.smallIconBox {
|
|
100
|
+
/* Variable:Ignore */
|
|
101
|
+
height: var(--zd_font_size20);
|
|
102
|
+
}
|
|
103
|
+
.mediumIconBox {
|
|
104
|
+
/* Variable:Ignore */
|
|
105
|
+
height: var(--zd_font_size21);
|
|
106
|
+
}
|
|
107
|
+
.largeIconBox {
|
|
108
|
+
/* Variable:Ignore */
|
|
109
|
+
height: var(--zd_font_size28);
|
|
110
|
+
}
|
|
96
111
|
|
|
97
112
|
.defaultHover, .primaryHover, .secondaryHover, .darkHover {
|
|
98
113
|
background-color: var(--listitem_highlight_bg_color);
|
|
@@ -197,9 +212,17 @@
|
|
|
197
212
|
[dir=rtl] .largewithTick {
|
|
198
213
|
--listitem_padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size39);
|
|
199
214
|
}
|
|
215
|
+
.largeSizeContainer{
|
|
216
|
+
--listitem_height: auto;
|
|
217
|
+
--listitem_min_height: var(--zd_size48);
|
|
218
|
+
}
|
|
200
219
|
.responsiveHeight {
|
|
201
220
|
--listitem_min_height: var(--zd_size45);
|
|
202
221
|
font-size: var(--zd_font_size15) ;
|
|
203
222
|
padding-top: var(--zd_size10) ;
|
|
204
223
|
padding-bottom: var(--zd_size10) ;
|
|
205
224
|
}
|
|
225
|
+
.tickIconCenter {
|
|
226
|
+
top: 50% ;
|
|
227
|
+
transform: translateY(-50%);
|
|
228
|
+
}
|
|
@@ -74,7 +74,8 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
74
74
|
a11y,
|
|
75
75
|
customClass,
|
|
76
76
|
customProps,
|
|
77
|
-
needMultiLineText
|
|
77
|
+
needMultiLineText,
|
|
78
|
+
lhsBoxAlign
|
|
78
79
|
} = this.props;
|
|
79
80
|
let {
|
|
80
81
|
ListItemProps = {},
|
|
@@ -97,6 +98,11 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
97
98
|
} = listA11y;
|
|
98
99
|
let isDarkPalette = palette === 'dark';
|
|
99
100
|
let dataIdString = value ? value : dataId;
|
|
101
|
+
const sizeClassMap = {
|
|
102
|
+
small: style.smallIconBox,
|
|
103
|
+
medium: style.mediumIconBox,
|
|
104
|
+
large: style.largeIconBox
|
|
105
|
+
};
|
|
100
106
|
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
101
107
|
a11y: listA11y,
|
|
102
108
|
size: size,
|
|
@@ -107,7 +113,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
107
113
|
autoHover: autoHover,
|
|
108
114
|
needTick: needTick,
|
|
109
115
|
needBorder: needBorder,
|
|
110
|
-
customClass: customListItem
|
|
116
|
+
customClass: `${needMultiLineText && size == 'large' ? style.largeSizeContainer : ''} ${customListItem}`,
|
|
111
117
|
dataId: `${dataIdString}_ListItemWithAvatar`,
|
|
112
118
|
dataSelectorId: `${dataSelectorId}`,
|
|
113
119
|
onClick: this.handleClick,
|
|
@@ -118,7 +124,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
118
124
|
customProps: ListItemProps,
|
|
119
125
|
...ContainerProps
|
|
120
126
|
}, name || imgSrc ? /*#__PURE__*/React.createElement(Box, {
|
|
121
|
-
className: style.leftAvatar
|
|
127
|
+
className: ` ${lhsBoxAlign == 'baseline' ? `${style.iconBoxTopAlign} ${sizeClassMap[size]}` : ''} ${style.leftAvatar}`
|
|
122
128
|
}, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
123
129
|
name: name,
|
|
124
130
|
size: "small",
|
|
@@ -147,7 +153,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
147
153
|
"data-title": isDisabled ? null : title,
|
|
148
154
|
className: needMultiLineText ? style.multiLineValue : style.value
|
|
149
155
|
}, value) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
150
|
-
className: style.tickIcon
|
|
156
|
+
className: `${style.tickIcon} ${needMultiLineText ? style.tickIconCenter : ''}`,
|
|
151
157
|
"aria-hidden": ariaHidden,
|
|
152
158
|
dataId: `${dataIdString}_tickIcon`,
|
|
153
159
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -59,7 +59,8 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
59
59
|
a11y,
|
|
60
60
|
customClass,
|
|
61
61
|
customProps,
|
|
62
|
-
needMultiLineText
|
|
62
|
+
needMultiLineText,
|
|
63
|
+
lhsBoxAlign
|
|
63
64
|
} = this.props;
|
|
64
65
|
const listA11y = {
|
|
65
66
|
role: 'option',
|
|
@@ -74,6 +75,11 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
74
75
|
customCheckBox = '',
|
|
75
76
|
customLabel = ''
|
|
76
77
|
} = customClass;
|
|
78
|
+
const sizeClassMap = {
|
|
79
|
+
small: style.smallIconBox,
|
|
80
|
+
medium: style.mediumIconBox,
|
|
81
|
+
large: style.largeIconBox
|
|
82
|
+
};
|
|
77
83
|
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
78
84
|
a11y: listA11y,
|
|
79
85
|
size: size,
|
|
@@ -82,7 +88,7 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
82
88
|
isDisabled: isDisabled,
|
|
83
89
|
active: active,
|
|
84
90
|
autoHover: autoHover,
|
|
85
|
-
customClass: customListItem
|
|
91
|
+
customClass: `${needMultiLineText && size == 'large' ? style.largeSizeContainer : ''} ${customListItem}`,
|
|
86
92
|
dataId: `${dataId ? dataId : value}_ListItemWithCheckBox`,
|
|
87
93
|
dataSelectorId: dataSelectorId,
|
|
88
94
|
onClick: this.onClick,
|
|
@@ -93,7 +99,7 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
93
99
|
customProps: ListItemProps,
|
|
94
100
|
...ContainerProps
|
|
95
101
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
96
|
-
className: style.iconBox
|
|
102
|
+
className: `${style.iconBox} ${lhsBoxAlign == 'baseline' ? `${style.iconBoxTopAlign} ${sizeClassMap[size]}` : ''}`,
|
|
97
103
|
dataId: `${dataId ? dataId : value}_checkBox`
|
|
98
104
|
}, /*#__PURE__*/React.createElement(CheckBox, {
|
|
99
105
|
checked: checked,
|
|
@@ -70,7 +70,8 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
70
70
|
a11y,
|
|
71
71
|
customClass,
|
|
72
72
|
customProps,
|
|
73
|
-
needMultiLineText
|
|
73
|
+
needMultiLineText,
|
|
74
|
+
lhsBoxAlign
|
|
74
75
|
} = this.props;
|
|
75
76
|
let {
|
|
76
77
|
ListItemProps = {},
|
|
@@ -85,6 +86,11 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
85
86
|
ariaHidden
|
|
86
87
|
} = listA11y;
|
|
87
88
|
let dataIdString = dataId ? `${dataId.replace("'", '_')}` : value.toLowerCase().replace("'", '_');
|
|
89
|
+
const sizeClassMap = {
|
|
90
|
+
small: style.smallIconBox,
|
|
91
|
+
medium: style.mediumIconBox,
|
|
92
|
+
large: style.largeIconBox
|
|
93
|
+
};
|
|
88
94
|
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
89
95
|
a11y: listA11y,
|
|
90
96
|
size: size,
|
|
@@ -95,7 +101,8 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
95
101
|
autoHover: autoHover,
|
|
96
102
|
needTick: needTick,
|
|
97
103
|
needBorder: needBorder,
|
|
98
|
-
customClass: customClass
|
|
104
|
+
customClass: `${needMultiLineText && size == 'large' ? style.largeSizeContainer : ''} ${customClass}`,
|
|
105
|
+
align: needMultiLineText && iconClass && !iconName ? 'baseline' : 'vertical',
|
|
99
106
|
dataId: dataIdString,
|
|
100
107
|
dataSelectorId: dataSelectorId,
|
|
101
108
|
isLink: isLink,
|
|
@@ -110,7 +117,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
110
117
|
...ContainerProps
|
|
111
118
|
}, iconName && /*#__PURE__*/React.createElement(Box, {
|
|
112
119
|
"aria-hidden": true,
|
|
113
|
-
className: style.iconBox
|
|
120
|
+
className: `${style.iconBox} ${lhsBoxAlign == 'baseline' ? `${style.iconBoxTopAlign} ${sizeClassMap[size]}` : ''}`,
|
|
114
121
|
dataId: dataId ? `${dataId}_Icon` : `${value.toLowerCase().replace("'", '_')}_Icon`
|
|
115
122
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
116
123
|
iconClass: iconClass,
|
|
@@ -125,7 +132,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
125
132
|
"data-title": isDisabled ? null : title,
|
|
126
133
|
dataId: `${dataIdString}_Text`
|
|
127
134
|
}, value), needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
128
|
-
className: style.tickIcon
|
|
135
|
+
className: `${style.tickIcon} ${needMultiLineText ? style.tickIconCenter : ''}`,
|
|
129
136
|
"aria-hidden": ariaHidden,
|
|
130
137
|
dataId: `${dataIdString}_tickIcon`,
|
|
131
138
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -60,7 +60,8 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
60
60
|
a11y,
|
|
61
61
|
customClass,
|
|
62
62
|
customProps,
|
|
63
|
-
needMultiLineText
|
|
63
|
+
needMultiLineText,
|
|
64
|
+
lhsBoxAlign
|
|
64
65
|
} = this.props;
|
|
65
66
|
let {
|
|
66
67
|
ListItemProps = {},
|
|
@@ -75,6 +76,11 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
75
76
|
customRadio = '',
|
|
76
77
|
customRadioWrap = ''
|
|
77
78
|
} = customClass;
|
|
79
|
+
const sizeClassMap = {
|
|
80
|
+
small: style.smallIconBox,
|
|
81
|
+
medium: style.mediumIconBox,
|
|
82
|
+
large: style.largeIconBox
|
|
83
|
+
};
|
|
78
84
|
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
79
85
|
a11y: listA11y,
|
|
80
86
|
size: size,
|
|
@@ -83,7 +89,7 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
83
89
|
isDisabled: isDisabled,
|
|
84
90
|
active: active,
|
|
85
91
|
autoHover: autoHover,
|
|
86
|
-
customClass: customListItem
|
|
92
|
+
customClass: `${needMultiLineText && size == 'large' ? style.largeSizeContainer : ''} ${customListItem}`,
|
|
87
93
|
dataId: dataId,
|
|
88
94
|
dataSelectorId: dataSelectorId,
|
|
89
95
|
onClick: this.onClick,
|
|
@@ -94,7 +100,7 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
94
100
|
customProps: ListItemProps,
|
|
95
101
|
...ContainerProps
|
|
96
102
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
97
|
-
className: style.iconBox
|
|
103
|
+
className: `${style.iconBox} ${lhsBoxAlign == 'baseline' ? `${style.iconBoxTopAlign} ${sizeClassMap[size]}` : ''}`,
|
|
98
104
|
dataId: `${dataId}_radio`
|
|
99
105
|
}, /*#__PURE__*/React.createElement(Radio, {
|
|
100
106
|
checked: checked,
|
|
@@ -12,7 +12,8 @@ export const ListContainerDefaultProps = {
|
|
|
12
12
|
customClass: '',
|
|
13
13
|
customProps: {},
|
|
14
14
|
dataSelectorId: 'listContainer',
|
|
15
|
-
needMultiLineText: false
|
|
15
|
+
needMultiLineText: false,
|
|
16
|
+
align: 'vertical'
|
|
16
17
|
};
|
|
17
18
|
export const ListItemDefaultProps = {
|
|
18
19
|
active: false,
|
|
@@ -29,7 +30,8 @@ export const ListItemDefaultProps = {
|
|
|
29
30
|
customClass: {},
|
|
30
31
|
customProps: {},
|
|
31
32
|
dataSelectorId: 'listItem',
|
|
32
|
-
needMultiLineText: false
|
|
33
|
+
needMultiLineText: false,
|
|
34
|
+
lhsBoxAlign: 'baseline'
|
|
33
35
|
};
|
|
34
36
|
export const ListItemWithAvatarDefaultProps = {
|
|
35
37
|
active: false,
|
|
@@ -47,7 +49,8 @@ export const ListItemWithAvatarDefaultProps = {
|
|
|
47
49
|
customClass: {},
|
|
48
50
|
customProps: {},
|
|
49
51
|
dataSelectorId: 'listItemWithAvatar',
|
|
50
|
-
needMultiLineText: false
|
|
52
|
+
needMultiLineText: false,
|
|
53
|
+
lhsBoxAlign: 'baseline'
|
|
51
54
|
};
|
|
52
55
|
export const ListItemWithCheckBoxDefaultProps = {
|
|
53
56
|
active: false,
|
|
@@ -61,7 +64,8 @@ export const ListItemWithCheckBoxDefaultProps = {
|
|
|
61
64
|
customClass: {},
|
|
62
65
|
customProps: {},
|
|
63
66
|
dataSelectorId: 'listItemWithCheckBox',
|
|
64
|
-
needMultiLineText: false
|
|
67
|
+
needMultiLineText: false,
|
|
68
|
+
lhsBoxAlign: 'baseline'
|
|
65
69
|
};
|
|
66
70
|
export const ListItemWithIconDefaultProps = {
|
|
67
71
|
active: false,
|
|
@@ -78,7 +82,8 @@ export const ListItemWithIconDefaultProps = {
|
|
|
78
82
|
customClass: '',
|
|
79
83
|
customProps: {},
|
|
80
84
|
dataSelectorId: 'listItemWithIcon',
|
|
81
|
-
needMultiLineText: false
|
|
85
|
+
needMultiLineText: false,
|
|
86
|
+
lhsBoxAlign: 'baseline'
|
|
82
87
|
};
|
|
83
88
|
export const ListItemWithRadioDefaultProps = {
|
|
84
89
|
active: false,
|
|
@@ -93,5 +98,6 @@ export const ListItemWithRadioDefaultProps = {
|
|
|
93
98
|
customClass: {},
|
|
94
99
|
customProps: {},
|
|
95
100
|
dataSelectorId: 'listItemWithRadio',
|
|
96
|
-
needMultiLineText: false
|
|
101
|
+
needMultiLineText: false,
|
|
102
|
+
lhsBoxAlign: 'baseline'
|
|
97
103
|
};
|
|
@@ -27,7 +27,8 @@ export const ListContainer_Props = {
|
|
|
27
27
|
}),
|
|
28
28
|
customClass: PropTypes.string,
|
|
29
29
|
customProps: PropTypes.object,
|
|
30
|
-
eleRef: PropTypes.func
|
|
30
|
+
eleRef: PropTypes.func,
|
|
31
|
+
align: PropTypes.string
|
|
31
32
|
};
|
|
32
33
|
export const ListItem_Props = {
|
|
33
34
|
active: PropTypes.bool,
|
|
@@ -57,6 +58,7 @@ export const ListItem_Props = {
|
|
|
57
58
|
ariaSelected: PropTypes.bool
|
|
58
59
|
}),
|
|
59
60
|
needMultiLineText: PropTypes.bool,
|
|
61
|
+
lhsBoxAlign: PropTypes.oneOf(['baseline', 'vertical']),
|
|
60
62
|
customClass: PropTypes.shape({
|
|
61
63
|
customListItem: PropTypes.string,
|
|
62
64
|
customTickIcon: PropTypes.string
|
|
@@ -102,6 +104,7 @@ export const ListItemWithAvatar_Props = {
|
|
|
102
104
|
customAvatarTeam: PropTypes.string
|
|
103
105
|
}),
|
|
104
106
|
needMultiLineText: PropTypes.bool,
|
|
107
|
+
lhsBoxAlign: PropTypes.oneOf(['baseline', 'vertical']),
|
|
105
108
|
customProps: PropTypes.shape({
|
|
106
109
|
ListItemProps: PropTypes.object,
|
|
107
110
|
ContainerProps: PropTypes.object,
|
|
@@ -132,6 +135,7 @@ export const ListItemWithCheckBox_Props = {
|
|
|
132
135
|
ariaSelected: PropTypes.bool
|
|
133
136
|
}),
|
|
134
137
|
needMultiLineText: PropTypes.bool,
|
|
138
|
+
lhsBoxAlign: PropTypes.oneOf(['baseline', 'vertical']),
|
|
135
139
|
customClass: PropTypes.shape({
|
|
136
140
|
customListItem: PropTypes.string,
|
|
137
141
|
customCheckBox: PropTypes.string,
|
|
@@ -167,6 +171,7 @@ export const ListItemWithIcon_Props = {
|
|
|
167
171
|
ariaHidden: PropTypes.bool
|
|
168
172
|
}),
|
|
169
173
|
needMultiLineText: PropTypes.bool,
|
|
174
|
+
lhsBoxAlign: PropTypes.oneOf(['baseline', 'vertical']),
|
|
170
175
|
customClass: PropTypes.string,
|
|
171
176
|
customProps: PropTypes.shape({
|
|
172
177
|
ListItemProps: PropTypes.object
|
|
@@ -198,6 +203,7 @@ export const ListItemWithRadio_Props = {
|
|
|
198
203
|
ariaSelected: PropTypes.bool
|
|
199
204
|
}),
|
|
200
205
|
needMultiLineText: PropTypes.bool,
|
|
206
|
+
lhsBoxAlign: PropTypes.oneOf(['baseline', 'vertical']),
|
|
201
207
|
customClass: PropTypes.shape({
|
|
202
208
|
customListItem: PropTypes.string,
|
|
203
209
|
customRadio: PropTypes.string,
|
|
@@ -884,8 +884,12 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
884
884
|
needEffect,
|
|
885
885
|
autoComplete,
|
|
886
886
|
getTargetRef,
|
|
887
|
-
isFocus
|
|
887
|
+
isFocus,
|
|
888
|
+
customProps
|
|
888
889
|
} = this.props;
|
|
890
|
+
const {
|
|
891
|
+
SuggestionsProps = {}
|
|
892
|
+
} = customProps;
|
|
889
893
|
let {
|
|
890
894
|
clearText = 'Clear all'
|
|
891
895
|
} = i18nKeys;
|
|
@@ -1065,7 +1069,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1065
1069
|
a11y: {
|
|
1066
1070
|
role: 'option'
|
|
1067
1071
|
},
|
|
1068
|
-
dataId: `${dataId}_Options
|
|
1072
|
+
dataId: `${dataId}_Options`,
|
|
1073
|
+
...SuggestionsProps
|
|
1069
1074
|
}));
|
|
1070
1075
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1071
1076
|
options: revampedGroups,
|
|
@@ -1017,8 +1017,12 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1017
1017
|
boxSize,
|
|
1018
1018
|
isLoading,
|
|
1019
1019
|
selectAllText,
|
|
1020
|
-
needSelectAll
|
|
1020
|
+
needSelectAll,
|
|
1021
|
+
customProps
|
|
1021
1022
|
} = this.props;
|
|
1023
|
+
const {
|
|
1024
|
+
SuggestionsProps = {}
|
|
1025
|
+
} = customProps;
|
|
1022
1026
|
const {
|
|
1023
1027
|
selectedOptions,
|
|
1024
1028
|
searchStr,
|
|
@@ -1108,7 +1112,8 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1108
1112
|
selectedOptions: selectedOptionIds,
|
|
1109
1113
|
a11y: {
|
|
1110
1114
|
role: 'option'
|
|
1111
|
-
}
|
|
1115
|
+
},
|
|
1116
|
+
...SuggestionsProps
|
|
1112
1117
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1113
1118
|
isLoading: isFetchingOptions,
|
|
1114
1119
|
options: options,
|
|
@@ -27,18 +27,24 @@ export default class Suggestions extends React.PureComponent {
|
|
|
27
27
|
avatarPalette,
|
|
28
28
|
palette,
|
|
29
29
|
htmlId,
|
|
30
|
-
a11y
|
|
30
|
+
a11y,
|
|
31
|
+
customClass,
|
|
32
|
+
needMultiLineText
|
|
31
33
|
} = this.props;
|
|
32
34
|
const {
|
|
33
35
|
ariaParentRole,
|
|
34
36
|
ariaMultiselectable
|
|
35
37
|
} = a11y;
|
|
38
|
+
const {
|
|
39
|
+
containerClass = ''
|
|
40
|
+
} = customClass;
|
|
36
41
|
return /*#__PURE__*/React.createElement(Container, {
|
|
37
42
|
isCover: false,
|
|
38
43
|
role: ariaParentRole,
|
|
39
44
|
id: htmlId,
|
|
40
45
|
tabindex: "0",
|
|
41
|
-
"aria-multiselectable": ariaMultiselectable
|
|
46
|
+
"aria-multiselectable": ariaMultiselectable,
|
|
47
|
+
className: containerClass
|
|
42
48
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
43
49
|
dataId: `${dataId}`,
|
|
44
50
|
className: className ? className : ''
|
|
@@ -63,6 +69,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
63
69
|
});
|
|
64
70
|
const commonProps = {
|
|
65
71
|
isDisabled,
|
|
72
|
+
needMultiLineText,
|
|
66
73
|
...listItemCustomProps
|
|
67
74
|
};
|
|
68
75
|
|
|
@@ -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 = {
|
|
@@ -166,5 +167,7 @@ export const SelectedOptions_defaultProps = {
|
|
|
166
167
|
dataId: 'selectedOptions'
|
|
167
168
|
};
|
|
168
169
|
export const Suggestions_defaultProps = {
|
|
169
|
-
a11y: {}
|
|
170
|
+
a11y: {},
|
|
171
|
+
customClass: {},
|
|
172
|
+
needMultiLineText: false
|
|
170
173
|
};
|
|
@@ -110,7 +110,8 @@ export const MultiSelect_propTypes = {
|
|
|
110
110
|
setAriaId: PropTypes.string,
|
|
111
111
|
ariaErrorId: PropTypes.string,
|
|
112
112
|
customProps: PropTypes.shape({
|
|
113
|
-
TextBoxIconProps: PropTypes.object
|
|
113
|
+
TextBoxIconProps: PropTypes.object,
|
|
114
|
+
SuggestionsProps: PropTypes.object
|
|
114
115
|
}),
|
|
115
116
|
isFocus: PropTypes.bool,
|
|
116
117
|
allowValueFallback: PropTypes.bool
|
|
@@ -178,7 +179,11 @@ export const Suggestions_propTypes = {
|
|
|
178
179
|
logo: PropTypes.string,
|
|
179
180
|
optionType: PropTypes.string,
|
|
180
181
|
listItemProps: PropTypes.object
|
|
181
|
-
}))
|
|
182
|
+
})),
|
|
183
|
+
customClass: PropTypes.shape({
|
|
184
|
+
containerClass: PropTypes.string
|
|
185
|
+
}),
|
|
186
|
+
needMultiLineText: PropTypes.bool
|
|
182
187
|
};
|
|
183
188
|
export const AdvancedGroupMultiSelect_propTypes = {
|
|
184
189
|
animationStyle: PropTypes.string,
|
|
@@ -250,7 +255,10 @@ export const AdvancedGroupMultiSelect_propTypes = {
|
|
|
250
255
|
children: PropTypes.node,
|
|
251
256
|
dataSelectorId: PropTypes.string,
|
|
252
257
|
isFocus: PropTypes.bool,
|
|
253
|
-
allowValueFallback: PropTypes.bool
|
|
258
|
+
allowValueFallback: PropTypes.bool,
|
|
259
|
+
customProps: PropTypes.shape({
|
|
260
|
+
SuggestionsProps: PropTypes.object
|
|
261
|
+
})
|
|
254
262
|
};
|
|
255
263
|
export const AdvancedMultiSelect_propTypes = { ...MultiSelect_propTypes,
|
|
256
264
|
selectedOptionDetails: PropTypes.string,
|
package/es/Select/GroupSelect.js
CHANGED
|
@@ -593,6 +593,9 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
593
593
|
dataSelectorId,
|
|
594
594
|
customProps
|
|
595
595
|
} = this.props;
|
|
596
|
+
const {
|
|
597
|
+
SuggestionsProps = {}
|
|
598
|
+
} = customProps;
|
|
596
599
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
597
600
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
598
601
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -791,7 +794,8 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
791
794
|
ariaParentRole: 'listbox',
|
|
792
795
|
role: 'option'
|
|
793
796
|
},
|
|
794
|
-
dataId: `${dataId}_Options
|
|
797
|
+
dataId: `${dataId}_Options`,
|
|
798
|
+
...SuggestionsProps
|
|
795
799
|
}));
|
|
796
800
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
797
801
|
options: revampedGroups,
|
|
@@ -165,8 +165,12 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
165
165
|
needEffect,
|
|
166
166
|
isLoading,
|
|
167
167
|
dataSelectorId,
|
|
168
|
-
getTargetRef
|
|
168
|
+
getTargetRef,
|
|
169
|
+
customProps
|
|
169
170
|
} = this.props;
|
|
171
|
+
const {
|
|
172
|
+
SuggestionsProps = {}
|
|
173
|
+
} = customProps;
|
|
170
174
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
171
175
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
172
176
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -323,7 +327,8 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
323
327
|
a11y: {
|
|
324
328
|
ariaParentRole: 'listbox',
|
|
325
329
|
role: 'option'
|
|
326
|
-
}
|
|
330
|
+
},
|
|
331
|
+
...SuggestionsProps
|
|
327
332
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
328
333
|
isLoading: isFetchingOptions,
|
|
329
334
|
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,
|
|
@@ -98,7 +98,8 @@ export const SelectWithAvatar_defaultProps = {
|
|
|
98
98
|
isRestrictScroll: false,
|
|
99
99
|
i18nKeys: {},
|
|
100
100
|
needEffect: true,
|
|
101
|
-
isLoading: false
|
|
101
|
+
isLoading: false,
|
|
102
|
+
customProps: {}
|
|
102
103
|
};
|
|
103
104
|
export const SelectWithIcon_defaultProps = {
|
|
104
105
|
isReadOnly: false,
|
|
@@ -178,7 +178,8 @@ export const GroupSelect_propTypes = {
|
|
|
178
178
|
isDefaultSelectValue: PropTypes.bool,
|
|
179
179
|
customProps: PropTypes.shape({
|
|
180
180
|
TextBoxProps: PropTypes.object,
|
|
181
|
-
TextBoxIconProps: PropTypes.object
|
|
181
|
+
TextBoxIconProps: PropTypes.object,
|
|
182
|
+
SuggestionsProps: PropTypes.object
|
|
182
183
|
}),
|
|
183
184
|
allowValueFallback: PropTypes.bool
|
|
184
185
|
};
|
|
@@ -241,7 +242,10 @@ export const SelectWithAvatar_propTypes = { ...Select_propTypes,
|
|
|
241
242
|
htmlId: PropTypes.string,
|
|
242
243
|
needEffect: PropTypes.bool,
|
|
243
244
|
isLoading: PropTypes.bool,
|
|
244
|
-
dataSelectorId: PropTypes.string
|
|
245
|
+
dataSelectorId: PropTypes.string,
|
|
246
|
+
customProps: PropTypes.shape({
|
|
247
|
+
SuggestionsProps: PropTypes.object
|
|
248
|
+
})
|
|
245
249
|
};
|
|
246
250
|
export const SelectWithIcon_propTypes = {
|
|
247
251
|
animationStyle: PropTypes.oneOf(['default', 'bounce']),
|
|
@@ -303,6 +307,7 @@ export const SelectWithIcon_propTypes = {
|
|
|
303
307
|
customProps: PropTypes.shape({
|
|
304
308
|
TextBoxProps: PropTypes.object,
|
|
305
309
|
DropdownSearchTextBoxProps: PropTypes.object,
|
|
306
|
-
TextBoxIconProps: PropTypes.object
|
|
310
|
+
TextBoxIconProps: PropTypes.object,
|
|
311
|
+
ListItemProps: PropTypes.object
|
|
307
312
|
})
|
|
308
313
|
};
|
|
@@ -58,7 +58,8 @@ var ListContainer = function ListContainer(props) {
|
|
|
58
58
|
onClick = props.onClick,
|
|
59
59
|
onMouseEnter = props.onMouseEnter,
|
|
60
60
|
onMouseOver = props.onMouseOver,
|
|
61
|
-
eleRef = props.eleRef
|
|
61
|
+
eleRef = props.eleRef,
|
|
62
|
+
align = props.align;
|
|
62
63
|
var responsiveFunc = (0, _react.useCallback)(function (_ref) {
|
|
63
64
|
var mediaQueryOR = _ref.mediaQueryOR,
|
|
64
65
|
isTouchDevice = _ref.isTouchDevice;
|
|
@@ -102,7 +103,7 @@ var ListContainer = function ListContainer(props) {
|
|
|
102
103
|
"aria-selected": ariaSelected,
|
|
103
104
|
"aria-label": ariaLabel,
|
|
104
105
|
isCover: false,
|
|
105
|
-
align:
|
|
106
|
+
align: align,
|
|
106
107
|
alignBox: "row",
|
|
107
108
|
className: "".concat(_ListItemModule["default"].list, " ").concat(_ListItemModule["default"][size], " ").concat(mobileToTab && isTouchDevice ? _ListItemModule["default"].responsiveHeight : '', " ").concat(_ListItemModule["default"][palette], " ").concat(active ? _ListItemModule["default"]["active".concat(palette)] : highlight && !isDisabled ? _ListItemModule["default"]["".concat(palette, "Hover")] : '', " ").concat(autoHover && !isDisabled ? _ListItemModule["default"]["".concat(palette, "Effect")] : '', " ").concat(needTick ? _ListItemModule["default"]["".concat(size, "withTick")] : '', " ").concat(isDisabled ? (0, _CssProvider["default"])('isDisable') : '', " ").concat(needBorder ? active ? _ListItemModule["default"].activewithBorder : _ListItemModule["default"].withBorder : '', " ").concat(customClass),
|
|
108
109
|
dataId: dataId,
|