@zohodesk/components 1.0.0-temp-192 → 1.0.0-temp-193
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/DateTime/DateTime.js +8 -2
- package/es/DateTime/DateWidget.js +14 -3
- package/es/DateTime/Time.js +30 -13
- package/es/DateTime/props/defaultProps.js +4 -2
- package/es/DateTime/props/propTypes.js +6 -3
- package/es/ListItem/ListItem.js +2 -2
- package/es/ListItem/ListItem.module.css +18 -85
- package/es/ListItem/ListItemWithAvatar.js +3 -3
- package/es/ListItem/ListItemWithIcon.js +2 -2
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +3 -9
- package/es/MultiSelect/MultiSelect.js +3 -9
- package/es/MultiSelect/MultiSelectWithAvatar.js +1 -3
- package/es/MultiSelect/Suggestions.js +4 -8
- package/es/MultiSelect/props/defaultProps.js +5 -9
- package/es/MultiSelect/props/propTypes.js +3 -7
- package/es/Select/GroupSelect.js +3 -9
- package/es/Select/SelectWithAvatar.js +3 -9
- package/es/Select/SelectWithIcon.js +3 -9
- package/es/Select/props/defaultProps.js +3 -6
- package/es/Select/props/propTypes.js +3 -6
- package/lib/DateTime/DateTime.js +13 -2
- package/lib/DateTime/DateWidget.js +19 -3
- package/lib/DateTime/Time.js +35 -13
- package/lib/DateTime/props/defaultProps.js +4 -2
- package/lib/DateTime/props/propTypes.js +6 -3
- package/lib/ListItem/ListItem.js +2 -2
- package/lib/ListItem/ListItem.module.css +18 -85
- package/lib/ListItem/ListItemWithAvatar.js +3 -3
- package/lib/ListItem/ListItemWithIcon.js +2 -2
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +3 -7
- package/lib/MultiSelect/MultiSelect.js +3 -8
- package/lib/MultiSelect/MultiSelectWithAvatar.js +1 -3
- package/lib/MultiSelect/Suggestions.js +4 -8
- package/lib/MultiSelect/props/defaultProps.js +5 -9
- package/lib/MultiSelect/props/propTypes.js +6 -9
- package/lib/Select/GroupSelect.js +3 -8
- package/lib/Select/SelectWithAvatar.js +3 -8
- package/lib/Select/SelectWithIcon.js +3 -8
- package/lib/Select/props/defaultProps.js +3 -5
- package/lib/Select/props/propTypes.js +3 -6
- package/package.json +3 -3
- package/result.json +1 -1
package/es/DateTime/DateTime.js
CHANGED
|
@@ -649,8 +649,12 @@ export default class DateTime extends React.PureComponent {
|
|
|
649
649
|
positionsOffset,
|
|
650
650
|
targetOffset,
|
|
651
651
|
isRestrictScroll,
|
|
652
|
-
dropBoxPortalId
|
|
652
|
+
dropBoxPortalId,
|
|
653
|
+
customProps = {}
|
|
653
654
|
} = this.props;
|
|
655
|
+
const {
|
|
656
|
+
TimeProps = {}
|
|
657
|
+
} = customProps;
|
|
654
658
|
const {
|
|
655
659
|
timeText = 'Time',
|
|
656
660
|
submitText = 'Set',
|
|
@@ -706,7 +710,9 @@ export default class DateTime extends React.PureComponent {
|
|
|
706
710
|
ampmSuggestions: this.ampmSuggestions,
|
|
707
711
|
onAmPmSelect: this.amPmSelect,
|
|
708
712
|
amPm: amPm,
|
|
709
|
-
is24Hour: is24Hour
|
|
713
|
+
is24Hour: is24Hour,
|
|
714
|
+
customProps: { ...TimeProps
|
|
715
|
+
}
|
|
710
716
|
}) : null, needAction ? /*#__PURE__*/React.createElement(DateTimePopupFooter, {
|
|
711
717
|
submitText: submitText,
|
|
712
718
|
onSubmit: this.handleSelect,
|
|
@@ -988,8 +988,13 @@ class DateWidgetComponent extends React.Component {
|
|
|
988
988
|
dropBoxPortalId,
|
|
989
989
|
a11y,
|
|
990
990
|
boxSize,
|
|
991
|
-
onError
|
|
991
|
+
onError,
|
|
992
|
+
customProps = {}
|
|
992
993
|
} = this.props;
|
|
994
|
+
const {
|
|
995
|
+
DateTimeProps = {},
|
|
996
|
+
TextBoxProps = {}
|
|
997
|
+
} = customProps;
|
|
993
998
|
const {
|
|
994
999
|
selected: value = '',
|
|
995
1000
|
isError,
|
|
@@ -1041,7 +1046,11 @@ class DateWidgetComponent extends React.Component {
|
|
|
1041
1046
|
iconOnHover: iconOnHover,
|
|
1042
1047
|
isFocus: isPopupReady,
|
|
1043
1048
|
autoComplete: false,
|
|
1044
|
-
a11y: a11y
|
|
1049
|
+
a11y: a11y,
|
|
1050
|
+
customProps: {
|
|
1051
|
+
TextBoxProps: { ...TextBoxProps
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1045
1054
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
1046
1055
|
align: "both",
|
|
1047
1056
|
onClick: isDisabled || isReadOnly ? null : this.handleDateIconClick
|
|
@@ -1078,7 +1087,9 @@ class DateWidgetComponent extends React.Component {
|
|
|
1078
1087
|
isRestrictScroll: isRestrictScroll,
|
|
1079
1088
|
dropBoxPortalId: dropBoxPortalId,
|
|
1080
1089
|
boxSize: boxSize,
|
|
1081
|
-
onError: onError
|
|
1090
|
+
onError: onError,
|
|
1091
|
+
customProps: { ...DateTimeProps
|
|
1092
|
+
}
|
|
1082
1093
|
}));
|
|
1083
1094
|
}
|
|
1084
1095
|
|
package/es/DateTime/Time.js
CHANGED
|
@@ -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
|
/* eslint-disable react/forbid-component-props */
|
|
2
4
|
|
|
3
5
|
/** ** Libraries *** */
|
|
@@ -28,8 +30,14 @@ export default class Time extends PureComponent {
|
|
|
28
30
|
ampmSuggestions,
|
|
29
31
|
onAmPmSelect,
|
|
30
32
|
amPm,
|
|
31
|
-
is24Hour
|
|
33
|
+
is24Hour,
|
|
34
|
+
customProps = {}
|
|
32
35
|
} = this.props;
|
|
36
|
+
const {
|
|
37
|
+
HourCompProps = {},
|
|
38
|
+
MinuteCompProps = {},
|
|
39
|
+
AmPmCompProps = {}
|
|
40
|
+
} = customProps;
|
|
33
41
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
34
42
|
className: style.text
|
|
35
43
|
}, timeText), /*#__PURE__*/React.createElement(Container, {
|
|
@@ -46,7 +54,9 @@ export default class Time extends PureComponent {
|
|
|
46
54
|
onHourSelect: onHourSelect,
|
|
47
55
|
hours: hours,
|
|
48
56
|
needResponsive: needResponsive,
|
|
49
|
-
hourEmptyText: hourEmptyText
|
|
57
|
+
hourEmptyText: hourEmptyText,
|
|
58
|
+
customProps: { ...HourCompProps
|
|
59
|
+
}
|
|
50
60
|
})), /*#__PURE__*/React.createElement(Box, {
|
|
51
61
|
flexible: true,
|
|
52
62
|
className: style.dropDownContainer
|
|
@@ -55,7 +65,9 @@ export default class Time extends PureComponent {
|
|
|
55
65
|
onMinutesSelect: onMinutesSelect,
|
|
56
66
|
mins: mins,
|
|
57
67
|
minuteEmptyText: minuteEmptyText,
|
|
58
|
-
needResponsive: needResponsive
|
|
68
|
+
needResponsive: needResponsive,
|
|
69
|
+
customProps: { ...MinuteCompProps
|
|
70
|
+
}
|
|
59
71
|
})), !is24Hour ? /*#__PURE__*/React.createElement(Box, {
|
|
60
72
|
flexible: true,
|
|
61
73
|
className: style.dropDownContainer
|
|
@@ -63,7 +75,9 @@ export default class Time extends PureComponent {
|
|
|
63
75
|
ampmSuggestions: ampmSuggestions,
|
|
64
76
|
onAmPmSelect: onAmPmSelect,
|
|
65
77
|
amPm: amPm,
|
|
66
|
-
needResponsive: needResponsive
|
|
78
|
+
needResponsive: needResponsive,
|
|
79
|
+
customProps: { ...AmPmCompProps
|
|
80
|
+
}
|
|
67
81
|
})) : null));
|
|
68
82
|
}
|
|
69
83
|
|
|
@@ -78,9 +92,10 @@ class Hour extends React.PureComponent {
|
|
|
78
92
|
onHourSelect,
|
|
79
93
|
hours,
|
|
80
94
|
needResponsive,
|
|
81
|
-
hourEmptyText
|
|
95
|
+
hourEmptyText,
|
|
96
|
+
customProps
|
|
82
97
|
} = this.props;
|
|
83
|
-
return /*#__PURE__*/React.createElement(Select, {
|
|
98
|
+
return /*#__PURE__*/React.createElement(Select, _extends({
|
|
84
99
|
options: hourSuggestions,
|
|
85
100
|
onChange: onHourSelect,
|
|
86
101
|
selectedValue: hours,
|
|
@@ -99,7 +114,7 @@ class Hour extends React.PureComponent {
|
|
|
99
114
|
needListBorder: true,
|
|
100
115
|
needTick: false,
|
|
101
116
|
listItemSize: "small"
|
|
102
|
-
});
|
|
117
|
+
}, customProps));
|
|
103
118
|
}
|
|
104
119
|
|
|
105
120
|
}
|
|
@@ -111,9 +126,10 @@ class Minute extends React.PureComponent {
|
|
|
111
126
|
onMinutesSelect,
|
|
112
127
|
mins,
|
|
113
128
|
minuteEmptyText,
|
|
114
|
-
needResponsive
|
|
129
|
+
needResponsive,
|
|
130
|
+
customProps
|
|
115
131
|
} = this.props;
|
|
116
|
-
return /*#__PURE__*/React.createElement(Select, {
|
|
132
|
+
return /*#__PURE__*/React.createElement(Select, _extends({
|
|
117
133
|
options: minSuggestions,
|
|
118
134
|
onChange: onMinutesSelect,
|
|
119
135
|
selectedValue: mins,
|
|
@@ -132,7 +148,7 @@ class Minute extends React.PureComponent {
|
|
|
132
148
|
needListBorder: true,
|
|
133
149
|
needTick: false,
|
|
134
150
|
listItemSize: "small"
|
|
135
|
-
});
|
|
151
|
+
}, customProps));
|
|
136
152
|
}
|
|
137
153
|
|
|
138
154
|
}
|
|
@@ -143,9 +159,10 @@ class AmPm extends React.PureComponent {
|
|
|
143
159
|
ampmSuggestions,
|
|
144
160
|
onAmPmSelect,
|
|
145
161
|
amPm,
|
|
146
|
-
needResponsive
|
|
162
|
+
needResponsive,
|
|
163
|
+
customProps
|
|
147
164
|
} = this.props;
|
|
148
|
-
return /*#__PURE__*/React.createElement(Select, {
|
|
165
|
+
return /*#__PURE__*/React.createElement(Select, _extends({
|
|
149
166
|
options: ampmSuggestions,
|
|
150
167
|
onChange: onAmPmSelect,
|
|
151
168
|
selectedValue: amPm,
|
|
@@ -160,7 +177,7 @@ class AmPm extends React.PureComponent {
|
|
|
160
177
|
needListBorder: true,
|
|
161
178
|
needTick: false,
|
|
162
179
|
listItemSize: "small"
|
|
163
|
-
});
|
|
180
|
+
}, customProps));
|
|
164
181
|
}
|
|
165
182
|
|
|
166
183
|
}
|
|
@@ -20,7 +20,8 @@ export const DateTime_defaultProps = {
|
|
|
20
20
|
i18nKeys: {},
|
|
21
21
|
is24Hour: false,
|
|
22
22
|
isDefaultPosition: false,
|
|
23
|
-
customDateFormat: null
|
|
23
|
+
customDateFormat: null,
|
|
24
|
+
customProps: {}
|
|
24
25
|
};
|
|
25
26
|
export const DateWidget_defaultProps = {
|
|
26
27
|
borderColor: 'default',
|
|
@@ -53,5 +54,6 @@ export const DateTimePopupFooter_defaultProps = {
|
|
|
53
54
|
dataId: 'DateTimePopupFooter'
|
|
54
55
|
};
|
|
55
56
|
export const Time_defaultProps = {
|
|
56
|
-
dataId: 'Time'
|
|
57
|
+
dataId: 'Time',
|
|
58
|
+
customProps: {}
|
|
57
59
|
};
|
|
@@ -72,7 +72,8 @@ export const DateTime_propTypes = {
|
|
|
72
72
|
positionsOffset: PropTypes.array,
|
|
73
73
|
targetOffset: PropTypes.string,
|
|
74
74
|
isRestrictScroll: PropTypes.bool,
|
|
75
|
-
dropBoxPortalId: PropTypes.string
|
|
75
|
+
dropBoxPortalId: PropTypes.string,
|
|
76
|
+
customProps: PropTypes.object
|
|
76
77
|
};
|
|
77
78
|
export const DateWidget_propTypes = {
|
|
78
79
|
borderColor: PropTypes.oneOf(['transparent', 'default']),
|
|
@@ -139,7 +140,8 @@ export const DateWidget_propTypes = {
|
|
|
139
140
|
targetOffset: PropTypes.array,
|
|
140
141
|
isRestrictScroll: PropTypes.bool,
|
|
141
142
|
dropBoxPortalId: PropTypes.string,
|
|
142
|
-
a11y: PropTypes.object
|
|
143
|
+
a11y: PropTypes.object,
|
|
144
|
+
customProps: PropTypes.object
|
|
143
145
|
};
|
|
144
146
|
export const YearView_propTypes = {
|
|
145
147
|
onSelectMonth: PropTypes.func,
|
|
@@ -183,5 +185,6 @@ export const Time_propTypes = {
|
|
|
183
185
|
ampmSuggestions: PropTypes.array,
|
|
184
186
|
onAmPmSelect: PropTypes.func,
|
|
185
187
|
amPm: PropTypes.string,
|
|
186
|
-
is24Hour: PropTypes.bool
|
|
188
|
+
is24Hour: PropTypes.bool,
|
|
189
|
+
customProps: PropTypes.object
|
|
187
190
|
};
|
package/es/ListItem/ListItem.js
CHANGED
|
@@ -102,7 +102,7 @@ export default class ListItem extends React.Component {
|
|
|
102
102
|
autoHover: autoHover,
|
|
103
103
|
needTick: needTick,
|
|
104
104
|
needBorder: needBorder,
|
|
105
|
-
customClass:
|
|
105
|
+
customClass: customListItem,
|
|
106
106
|
dataId: dataIdString,
|
|
107
107
|
dataSelectorId: `${dataSelectorId}`,
|
|
108
108
|
isLink: isLink,
|
|
@@ -123,7 +123,7 @@ export default class ListItem extends React.Component {
|
|
|
123
123
|
adjust: true,
|
|
124
124
|
className: style.children
|
|
125
125
|
}, children) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
126
|
-
className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon}
|
|
126
|
+
className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon}`,
|
|
127
127
|
"aria-hidden": ariaHidden,
|
|
128
128
|
dataId: `${dataIdString}_tickIcon`,
|
|
129
129
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -17,9 +17,8 @@
|
|
|
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 var(--zd_size15)
|
|
20
|
+
--listitem_avatar_margin: 0 0 0 var(--zd_size15);
|
|
21
21
|
}
|
|
22
|
-
|
|
23
22
|
.list {
|
|
24
23
|
composes: varClass;
|
|
25
24
|
position: relative;
|
|
@@ -35,84 +34,62 @@
|
|
|
35
34
|
border-color: var(--listitem_border_color);
|
|
36
35
|
cursor: pointer;
|
|
37
36
|
}
|
|
38
|
-
|
|
39
37
|
.list, .default, .secondary {
|
|
40
38
|
background-color: var(--listitem_bg_color);
|
|
41
39
|
}
|
|
42
|
-
|
|
43
40
|
[dir=ltr] .withBorder {
|
|
44
|
-
--listitem_border_width: 0 0 0 1px
|
|
45
|
-
/*rtl: 0 1px 0 0*/
|
|
46
|
-
;
|
|
41
|
+
--listitem_border_width: 0 0 0 1px /*rtl: 0 1px 0 0*/;
|
|
47
42
|
}
|
|
48
|
-
|
|
49
43
|
[dir=rtl] .withBorder {
|
|
50
|
-
--listitem_border_width: 0 0 0
|
|
44
|
+
--listitem_border_width: 0 1px 0 0;
|
|
51
45
|
}
|
|
52
|
-
|
|
53
46
|
.active {
|
|
54
47
|
--listitem_border_color: var(--zdt_listitem_active_border);
|
|
55
48
|
}
|
|
56
|
-
|
|
57
49
|
[dir=ltr] .small {
|
|
58
50
|
--listitem_padding: var(--zd_size7) var(--zd_size3) var(--zd_size7) var(--zd_size5);
|
|
59
51
|
}
|
|
60
|
-
|
|
61
52
|
[dir=rtl] .small {
|
|
62
|
-
--listitem_padding: var(--zd_size7) var(--
|
|
53
|
+
--listitem_padding: var(--zd_size7) var(--zd_size5) var(--zd_size7) var(--zd_size3);
|
|
63
54
|
}
|
|
64
|
-
|
|
65
55
|
.medium {
|
|
66
56
|
--listitem_padding: var(--zd_size7) var(--zd_size20);
|
|
67
57
|
--listitem_min_height: var(--zd_size35);
|
|
68
58
|
}
|
|
69
|
-
|
|
70
59
|
.large {
|
|
71
60
|
--listitem_height: var(--zd_size48);
|
|
72
61
|
}
|
|
73
|
-
|
|
74
62
|
[dir=ltr] .large {
|
|
75
63
|
--listitem_padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25);
|
|
76
64
|
}
|
|
77
|
-
|
|
78
65
|
[dir=rtl] .large {
|
|
79
|
-
--listitem_padding: var(--zd_size10) var(--
|
|
66
|
+
--listitem_padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size3);
|
|
80
67
|
}
|
|
81
|
-
|
|
82
68
|
.value,
|
|
83
69
|
.children {
|
|
84
70
|
composes: dotted from '../common/common.module.css';
|
|
85
71
|
}
|
|
86
|
-
|
|
87
|
-
.value {
|
|
72
|
+
.value, .multiLineValue {
|
|
88
73
|
line-height: 1.5385;
|
|
89
74
|
}
|
|
90
|
-
|
|
91
|
-
.multiLineValue {
|
|
92
|
-
line-height: 1.3076;
|
|
75
|
+
.multiLineValue{
|
|
93
76
|
word-break: break-word;
|
|
94
|
-
|
|
95
|
-
composes: clamp from '../common/common.module.css';
|
|
77
|
+
composes: clamp from '../common/common.module.css'
|
|
96
78
|
}
|
|
97
|
-
|
|
98
79
|
.iconBox {
|
|
99
80
|
width: var(--zd_size20) ;
|
|
100
81
|
text-align: center;
|
|
101
82
|
}
|
|
102
|
-
|
|
103
83
|
[dir=ltr] .iconBox {
|
|
104
84
|
margin-right: var(--zd_size10) ;
|
|
105
85
|
}
|
|
106
|
-
|
|
107
86
|
[dir=rtl] .iconBox {
|
|
108
87
|
margin-left: var(--zd_size10) ;
|
|
109
88
|
}
|
|
110
|
-
|
|
111
89
|
.iconBox,
|
|
112
90
|
.leftAvatar {
|
|
113
91
|
font-size: 0 ;
|
|
114
92
|
}
|
|
115
|
-
|
|
116
93
|
.leftAvatar {
|
|
117
94
|
margin: var(--listitem_avatar_margin);
|
|
118
95
|
}
|
|
@@ -120,78 +97,61 @@
|
|
|
120
97
|
.defaultHover, .primaryHover, .secondaryHover, .darkHover {
|
|
121
98
|
background-color: var(--listitem_highlight_bg_color);
|
|
122
99
|
}
|
|
123
|
-
|
|
124
100
|
.activewithBorder {
|
|
125
101
|
--listitem_border_color: var(--zdt_listitem_active_border);
|
|
126
102
|
}
|
|
127
|
-
|
|
128
103
|
[dir=ltr] .activewithBorder {
|
|
129
|
-
--listitem_border_width: 0 0 0 1px
|
|
130
|
-
/*rtl: 0 1px 0 0*/
|
|
131
|
-
;
|
|
104
|
+
--listitem_border_width: 0 0 0 1px /*rtl: 0 1px 0 0*/;
|
|
132
105
|
}
|
|
133
|
-
|
|
134
106
|
[dir=rtl] .activewithBorder {
|
|
135
|
-
--listitem_border_width: 0 0 0
|
|
107
|
+
--listitem_border_width: 0 1px 0 0;
|
|
136
108
|
}
|
|
137
109
|
|
|
138
110
|
.defaultHover,
|
|
139
111
|
.defaultEffect:hover
|
|
140
|
-
|
|
141
112
|
/* .defaultEffect:focus */
|
|
142
|
-
|
|
113
|
+
{
|
|
143
114
|
--listitem_bg_color: var(--zdt_listitem_highlight_bg);
|
|
144
115
|
}
|
|
145
|
-
|
|
146
116
|
.primaryHover,
|
|
147
117
|
.primaryEffect:hover
|
|
148
|
-
|
|
149
118
|
/* .primaryEffect:focus */
|
|
150
|
-
|
|
119
|
+
{
|
|
151
120
|
--listitem_bg_color: var(--zdt_listitem_primary_bg);
|
|
152
121
|
--listitem_highlight_bg_color: var(--zdt_listitem_primary_bg);
|
|
153
122
|
}
|
|
154
|
-
|
|
155
123
|
.secondaryHover,
|
|
156
124
|
.secondaryEffect:hover
|
|
157
|
-
|
|
158
125
|
/* .secondaryEffect:focus */
|
|
159
|
-
|
|
126
|
+
{
|
|
160
127
|
--listitem_bg_color: var(--zdt_listitem_secondary_bg);
|
|
161
128
|
--listitem_highlight_bg_color: var(--zdt_listitem_secondary_bg);
|
|
162
129
|
--listitem_text_color: var(--zdt_listitem_secondary_text);
|
|
163
130
|
}
|
|
164
|
-
|
|
165
131
|
.darkHover,
|
|
166
132
|
.darkEffect:hover
|
|
167
|
-
|
|
168
133
|
/* .darkEffect:focus */
|
|
169
|
-
|
|
134
|
+
{
|
|
170
135
|
--listitem_bg_color: var(--zdt_listitem_dark_effect_bg);
|
|
171
136
|
--listitem_highlight_bg_color: var(--zdt_listitem_dark_effect_bg);
|
|
172
137
|
}
|
|
173
|
-
|
|
174
138
|
.activedefault, .activeprimary, .activesecondary, .activedark {
|
|
175
139
|
background-color: var(--listitem_active_bg_color);
|
|
176
140
|
}
|
|
177
|
-
|
|
178
141
|
.activedefault,
|
|
179
142
|
.activedefault:hover,
|
|
180
143
|
.activeprimary,
|
|
181
144
|
.activeprimary:hover {
|
|
182
145
|
--listitem_active_bg_color: var(--zdt_listitem_primary_bg);
|
|
183
146
|
}
|
|
184
|
-
|
|
185
147
|
.activesecondary {
|
|
186
148
|
--listitem_active_bg_color: var(--zdt_listitem_secondary_bg);
|
|
187
149
|
--listitem_text_color: var(--zdt_listitem_secondary_text);
|
|
188
150
|
}
|
|
189
|
-
|
|
190
151
|
.dark {
|
|
191
152
|
--listitem_bg_color: var(--zdt_listitem_dark_bg);
|
|
192
153
|
--listitem_text_color: var(--zdt_listitem_dark_text);
|
|
193
154
|
}
|
|
194
|
-
|
|
195
155
|
.activedark {
|
|
196
156
|
--listitem_active_bg_color: var(--zdt_listitem_dark_active_bg);
|
|
197
157
|
}
|
|
@@ -210,63 +170,36 @@
|
|
|
210
170
|
[dir=rtl] .tickIcon, [dir=rtl] .defaultTick, [dir=rtl] .darkTick {
|
|
211
171
|
left: var(--zd_size20) ;
|
|
212
172
|
}
|
|
213
|
-
|
|
214
173
|
.defaultTick {
|
|
215
174
|
--listitem_tickicon_color: var(--zdt_listitem_default_tickicon);
|
|
216
175
|
}
|
|
217
|
-
|
|
218
176
|
.darkTick {
|
|
219
177
|
--listitem_tickicon_color: var(--zdt_listitem_dark_tickicon);
|
|
220
178
|
}
|
|
221
|
-
|
|
222
|
-
.defaultTick>i {
|
|
179
|
+
.defaultTick > i {
|
|
223
180
|
display: block;
|
|
224
181
|
}
|
|
225
|
-
|
|
226
182
|
[dir=ltr] .smallwithTick {
|
|
227
183
|
--listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size5);
|
|
228
184
|
}
|
|
229
|
-
|
|
230
185
|
[dir=rtl] .smallwithTick {
|
|
231
|
-
--listitem_padding: var(--zd_size7) var(--
|
|
186
|
+
--listitem_padding: var(--zd_size7) var(--zd_size5) var(--zd_size7) var(--zd_size39);
|
|
232
187
|
}
|
|
233
|
-
|
|
234
188
|
[dir=ltr] .mediumwithTick {
|
|
235
189
|
--listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size20);
|
|
236
190
|
}
|
|
237
|
-
|
|
238
191
|
[dir=rtl] .mediumwithTick {
|
|
239
|
-
--listitem_padding: var(--zd_size7) var(--
|
|
192
|
+
--listitem_padding: var(--zd_size7) var(--zd_size20) var(--zd_size7) var(--zd_size39);
|
|
240
193
|
}
|
|
241
|
-
|
|
242
194
|
[dir=ltr] .largewithTick {
|
|
243
195
|
--listitem_padding: var(--zd_size10) var(--zd_size39) var(--zd_size10) var(--zd_size25);
|
|
244
196
|
}
|
|
245
|
-
|
|
246
197
|
[dir=rtl] .largewithTick {
|
|
247
|
-
--listitem_padding: var(--zd_size10) var(--
|
|
198
|
+
--listitem_padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size39);
|
|
248
199
|
}
|
|
249
|
-
|
|
250
200
|
.responsiveHeight {
|
|
251
201
|
--listitem_min_height: var(--zd_size45);
|
|
252
202
|
font-size: var(--zd_font_size15) ;
|
|
253
203
|
padding-top: var(--zd_size10) ;
|
|
254
204
|
padding-bottom: var(--zd_size10) ;
|
|
255
205
|
}
|
|
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
|
-
}
|
|
@@ -107,7 +107,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
107
107
|
autoHover: autoHover,
|
|
108
108
|
needTick: needTick,
|
|
109
109
|
needBorder: needBorder,
|
|
110
|
-
customClass:
|
|
110
|
+
customClass: customListItem,
|
|
111
111
|
dataId: `${dataIdString}_ListItemWithAvatar`,
|
|
112
112
|
dataSelectorId: `${dataSelectorId}`,
|
|
113
113
|
onClick: this.handleClick,
|
|
@@ -117,7 +117,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
117
117
|
title: null,
|
|
118
118
|
customProps: ListItemProps
|
|
119
119
|
}, ContainerProps), name || imgSrc ? /*#__PURE__*/React.createElement(Box, {
|
|
120
|
-
className:
|
|
120
|
+
className: style.leftAvatar
|
|
121
121
|
}, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
122
122
|
name: name,
|
|
123
123
|
size: "small",
|
|
@@ -144,7 +144,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
144
144
|
"data-title": isDisabled ? null : title,
|
|
145
145
|
className: needMultiLineText ? style.multiLineValue : style.value
|
|
146
146
|
}, value) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
147
|
-
className:
|
|
147
|
+
className: style.tickIcon,
|
|
148
148
|
"aria-hidden": ariaHidden,
|
|
149
149
|
dataId: `${dataIdString}_tickIcon`,
|
|
150
150
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -97,7 +97,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
97
97
|
autoHover: autoHover,
|
|
98
98
|
needTick: needTick,
|
|
99
99
|
needBorder: needBorder,
|
|
100
|
-
customClass:
|
|
100
|
+
customClass: customClass,
|
|
101
101
|
dataId: dataIdString,
|
|
102
102
|
dataSelectorId: dataSelectorId,
|
|
103
103
|
isLink: isLink,
|
|
@@ -126,7 +126,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
126
126
|
"data-title": isDisabled ? null : title,
|
|
127
127
|
dataId: `${dataIdString}_Text`
|
|
128
128
|
}, value), needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
129
|
-
className:
|
|
129
|
+
className: style.tickIcon,
|
|
130
130
|
"aria-hidden": ariaHidden,
|
|
131
131
|
dataId: `${dataIdString}_tickIcon`,
|
|
132
132
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -1,5 +1,3 @@
|
|
|
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
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import { AdvancedGroupMultiSelect_propTypes } from './props/propTypes';
|
|
5
3
|
import { AdvancedGroupMultiSelect_defaultProps } from './props/defaultProps';
|
|
@@ -872,12 +870,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
872
870
|
a11y,
|
|
873
871
|
palette,
|
|
874
872
|
needEffect,
|
|
875
|
-
autoComplete
|
|
876
|
-
customProps
|
|
873
|
+
autoComplete
|
|
877
874
|
} = this.props;
|
|
878
|
-
const {
|
|
879
|
-
suggestionsProps
|
|
880
|
-
} = customProps;
|
|
881
875
|
let {
|
|
882
876
|
clearText = 'Clear all'
|
|
883
877
|
} = i18nKeys;
|
|
@@ -1037,7 +1031,7 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1037
1031
|
a11y: {
|
|
1038
1032
|
role: 'heading'
|
|
1039
1033
|
}
|
|
1040
|
-
})), /*#__PURE__*/React.createElement(Suggestions,
|
|
1034
|
+
})), /*#__PURE__*/React.createElement(Suggestions, {
|
|
1041
1035
|
suggestions: suggestions,
|
|
1042
1036
|
selectedOptions: selectedOptionIds,
|
|
1043
1037
|
getRef: this.suggestionItemRef,
|
|
@@ -1049,7 +1043,7 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1049
1043
|
a11y: {
|
|
1050
1044
|
role: 'option'
|
|
1051
1045
|
}
|
|
1052
|
-
}
|
|
1046
|
+
}));
|
|
1053
1047
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1054
1048
|
options: revampedGroups,
|
|
1055
1049
|
searchString: searchStr,
|
|
@@ -1,5 +1,3 @@
|
|
|
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
|
-
|
|
3
1
|
/**** Libraries ****/
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { MultiSelect_propTypes } from './props/propTypes';
|
|
@@ -992,12 +990,8 @@ export class MultiSelectComponent extends React.Component {
|
|
|
992
990
|
boxSize,
|
|
993
991
|
isLoading,
|
|
994
992
|
selectAllText,
|
|
995
|
-
needSelectAll
|
|
996
|
-
customProps
|
|
993
|
+
needSelectAll
|
|
997
994
|
} = this.props;
|
|
998
|
-
const {
|
|
999
|
-
suggestionsProps = {}
|
|
1000
|
-
} = customProps;
|
|
1001
995
|
const {
|
|
1002
996
|
selectedOptions,
|
|
1003
997
|
searchStr,
|
|
@@ -1070,7 +1064,7 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1070
1064
|
eleRef: this.suggestionContainerRef
|
|
1071
1065
|
}, isSearching ? /*#__PURE__*/React.createElement("div", {
|
|
1072
1066
|
className: style[palette]
|
|
1073
|
-
}, searchText) : suggestions.length ? /*#__PURE__*/React.createElement(Suggestions,
|
|
1067
|
+
}, searchText) : suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
|
|
1074
1068
|
suggestions: suggestions,
|
|
1075
1069
|
getRef: this.suggestionItemRef,
|
|
1076
1070
|
hoverOption: hoverOption,
|
|
@@ -1083,7 +1077,7 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1083
1077
|
a11y: {
|
|
1084
1078
|
role: 'option'
|
|
1085
1079
|
}
|
|
1086
|
-
}
|
|
1080
|
+
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1087
1081
|
isLoading: isFetchingOptions,
|
|
1088
1082
|
options: options,
|
|
1089
1083
|
searchString: searchStr,
|
|
@@ -85,7 +85,6 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
85
85
|
needEffect,
|
|
86
86
|
isLoading,
|
|
87
87
|
keepSelectedOptions,
|
|
88
|
-
needMultiLineText,
|
|
89
88
|
customProps
|
|
90
89
|
} = this.props;
|
|
91
90
|
let {
|
|
@@ -171,8 +170,7 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
171
170
|
selectedOptions: selectedOptionIds,
|
|
172
171
|
a11y: {
|
|
173
172
|
role: 'option'
|
|
174
|
-
}
|
|
175
|
-
needMultiLineText: needMultiLineText
|
|
173
|
+
}
|
|
176
174
|
}, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
177
175
|
isLoading: isFetchingOptions,
|
|
178
176
|
options: options,
|
|
@@ -29,8 +29,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
29
29
|
avatarPalette,
|
|
30
30
|
palette,
|
|
31
31
|
htmlId,
|
|
32
|
-
a11y
|
|
33
|
-
needMultiLineText
|
|
32
|
+
a11y
|
|
34
33
|
} = this.props;
|
|
35
34
|
const {
|
|
36
35
|
ariaParentRole,
|
|
@@ -95,8 +94,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
95
94
|
size: listItemSize,
|
|
96
95
|
avatarPalette: avatarPalette,
|
|
97
96
|
palette: palette,
|
|
98
|
-
a11y: list_a11y
|
|
99
|
-
needMultiLineText: needMultiLineText
|
|
97
|
+
a11y: list_a11y
|
|
100
98
|
}));
|
|
101
99
|
} else if (optionType === 'icon') {
|
|
102
100
|
return /*#__PURE__*/React.createElement(ListItemWithIcon, _extends({}, commonProps, {
|
|
@@ -116,8 +114,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
116
114
|
iconSize: iconSize,
|
|
117
115
|
size: listItemSize,
|
|
118
116
|
palette: palette,
|
|
119
|
-
a11y: list_a11y
|
|
120
|
-
needMultiLineText: needMultiLineText
|
|
117
|
+
a11y: list_a11y
|
|
121
118
|
}));
|
|
122
119
|
}
|
|
123
120
|
|
|
@@ -136,8 +133,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
136
133
|
active: isActive,
|
|
137
134
|
size: listItemSize,
|
|
138
135
|
palette: palette,
|
|
139
|
-
a11y: list_a11y
|
|
140
|
-
needMultiLineText: needMultiLineText
|
|
136
|
+
a11y: list_a11y
|
|
141
137
|
}));
|
|
142
138
|
})));
|
|
143
139
|
}
|