@zohodesk/components 1.0.0-temp-199.4 → 1.0.0-temp-210.5
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 +16 -1
- package/es/DateTime/CalendarView.js +8 -5
- package/es/DateTime/DateTime.js +18 -4
- package/es/DateTime/DateTime.module.css +5 -5
- package/es/DateTime/DateWidget.js +5 -1
- package/es/DateTime/DaysRow.js +3 -2
- package/es/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +7 -7
- package/es/DateTime/props/defaultProps.js +9 -3
- package/es/DateTime/props/propTypes.js +11 -4
- 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 +2 -7
- package/es/MultiSelect/AdvancedMultiSelect.js +1 -2
- package/es/MultiSelect/MultiSelect.js +2 -7
- package/es/MultiSelect/Suggestions.js +4 -8
- package/es/MultiSelect/props/defaultProps.js +4 -6
- package/es/MultiSelect/props/propTypes.js +3 -6
- package/es/Popup/Popup.js +32 -13
- package/es/Popup/intersectionObserver.js +23 -19
- package/es/Select/GroupSelect.js +2 -7
- package/es/Select/SelectWithAvatar.js +2 -7
- package/es/Select/SelectWithIcon.js +2 -4
- package/es/Select/props/defaultProps.js +2 -4
- package/es/Select/props/propTypes.js +2 -4
- package/es/v1/DateTime/CalendarView.js +9 -6
- package/es/v1/DateTime/DateTime.js +18 -4
- package/es/v1/DateTime/DateWidget.js +5 -1
- package/es/v1/DateTime/DaysRow.js +3 -2
- package/es/v1/DateTime/props/defaultProps.js +9 -3
- package/es/v1/DateTime/props/propTypes.js +11 -4
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +1 -2
- package/es/v1/MultiSelect/MultiSelect.js +2 -7
- package/es/v1/MultiSelect/Suggestions.js +4 -8
- package/es/v1/MultiSelect/props/defaultProps.js +2 -4
- package/es/v1/MultiSelect/props/propTypes.js +2 -6
- package/es/v1/Select/GroupSelect.js +2 -7
- package/es/v1/Select/SelectWithAvatar.js +2 -7
- package/es/v1/Select/props/defaultProps.js +2 -4
- package/es/v1/Select/props/propTypes.js +2 -6
- package/lib/DateTime/CalendarView.js +8 -5
- package/lib/DateTime/DateTime.js +27 -4
- package/lib/DateTime/DateTime.module.css +5 -5
- package/lib/DateTime/DateWidget.js +5 -1
- package/lib/DateTime/DaysRow.js +3 -2
- package/lib/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +7 -7
- package/lib/DateTime/props/defaultProps.js +9 -3
- package/lib/DateTime/props/propTypes.js +11 -4
- 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/AdvancedMultiSelect.js +1 -3
- package/lib/MultiSelect/MultiSelect.js +3 -6
- package/lib/MultiSelect/Suggestions.js +4 -8
- package/lib/MultiSelect/props/defaultProps.js +4 -6
- package/lib/MultiSelect/props/propTypes.js +6 -8
- package/lib/Popup/Popup.js +32 -14
- package/lib/Popup/intersectionObserver.js +25 -21
- package/lib/Select/GroupSelect.js +3 -8
- package/lib/Select/SelectWithAvatar.js +3 -8
- package/lib/Select/SelectWithIcon.js +3 -5
- package/lib/Select/props/defaultProps.js +2 -4
- package/lib/Select/props/propTypes.js +2 -4
- package/lib/v1/DateTime/CalendarView.js +9 -6
- package/lib/v1/DateTime/DateTime.js +27 -4
- package/lib/v1/DateTime/DateWidget.js +5 -1
- package/lib/v1/DateTime/DaysRow.js +3 -2
- package/lib/v1/DateTime/props/defaultProps.js +9 -3
- package/lib/v1/DateTime/props/propTypes.js +11 -4
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +1 -3
- package/lib/v1/MultiSelect/MultiSelect.js +3 -8
- package/lib/v1/MultiSelect/Suggestions.js +4 -8
- package/lib/v1/MultiSelect/props/defaultProps.js +2 -4
- package/lib/v1/MultiSelect/props/propTypes.js +2 -6
- package/lib/v1/Select/GroupSelect.js +3 -8
- package/lib/v1/Select/SelectWithAvatar.js +3 -8
- package/lib/v1/Select/props/defaultProps.js +2 -4
- package/lib/v1/Select/props/propTypes.js +2 -6
- package/package.json +4 -4
- package/result.json +1 -1
|
@@ -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.5385;
|
|
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
|
-
}
|
|
@@ -158,7 +158,7 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
158
158
|
autoHover: autoHover,
|
|
159
159
|
needTick: needTick,
|
|
160
160
|
needBorder: needBorder,
|
|
161
|
-
customClass:
|
|
161
|
+
customClass: customListItem,
|
|
162
162
|
dataId: "".concat(dataIdString, "_ListItemWithAvatar"),
|
|
163
163
|
dataSelectorId: "".concat(dataSelectorId),
|
|
164
164
|
onClick: this.handleClick,
|
|
@@ -168,7 +168,7 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
168
168
|
title: null,
|
|
169
169
|
customProps: ListItemProps
|
|
170
170
|
}, ContainerProps), name || imgSrc ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
171
|
-
className:
|
|
171
|
+
className: _ListItemModule["default"].leftAvatar
|
|
172
172
|
}, isTeam ? /*#__PURE__*/_react["default"].createElement(_AvatarTeam["default"], {
|
|
173
173
|
name: name,
|
|
174
174
|
size: "small",
|
|
@@ -195,7 +195,7 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
195
195
|
"data-title": isDisabled ? null : title,
|
|
196
196
|
className: needMultiLineText ? _ListItemModule["default"].multiLineValue : _ListItemModule["default"].value
|
|
197
197
|
}, value) : null, needTick && active ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
198
|
-
className:
|
|
198
|
+
className: _ListItemModule["default"].tickIcon,
|
|
199
199
|
"aria-hidden": ariaHidden,
|
|
200
200
|
dataId: "".concat(dataIdString, "_tickIcon"),
|
|
201
201
|
dataSelectorId: "".concat(dataSelectorId, "_tickIcon")
|
|
@@ -147,7 +147,7 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
147
147
|
autoHover: autoHover,
|
|
148
148
|
needTick: needTick,
|
|
149
149
|
needBorder: needBorder,
|
|
150
|
-
customClass:
|
|
150
|
+
customClass: customClass,
|
|
151
151
|
dataId: dataIdString,
|
|
152
152
|
dataSelectorId: dataSelectorId,
|
|
153
153
|
isLink: isLink,
|
|
@@ -176,7 +176,7 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
176
176
|
"data-title": isDisabled ? null : title,
|
|
177
177
|
dataId: "".concat(dataIdString, "_Text")
|
|
178
178
|
}, value), needTick && active ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
179
|
-
className:
|
|
179
|
+
className: _ListItemModule["default"].tickIcon,
|
|
180
180
|
"aria-hidden": ariaHidden,
|
|
181
181
|
dataId: "".concat(dataIdString, "_tickIcon"),
|
|
182
182
|
dataSelectorId: "".concat(dataSelectorId, "_tickIcon")
|
|
@@ -53,8 +53,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
53
53
|
|
|
54
54
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
55
55
|
|
|
56
|
-
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); }
|
|
57
|
-
|
|
58
56
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
59
57
|
|
|
60
58
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -967,9 +965,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
967
965
|
palette = _this$props8.palette,
|
|
968
966
|
needEffect = _this$props8.needEffect,
|
|
969
967
|
autoComplete = _this$props8.autoComplete,
|
|
970
|
-
getTargetRef = _this$props8.getTargetRef
|
|
971
|
-
customProps = _this$props8.customProps;
|
|
972
|
-
var suggestionsProps = customProps.suggestionsProps;
|
|
968
|
+
getTargetRef = _this$props8.getTargetRef;
|
|
973
969
|
var _i18nKeys = i18nKeys,
|
|
974
970
|
_i18nKeys$clearText = _i18nKeys.clearText,
|
|
975
971
|
clearText = _i18nKeys$clearText === void 0 ? 'Clear all' : _i18nKeys$clearText;
|
|
@@ -1132,7 +1128,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1132
1128
|
a11y: {
|
|
1133
1129
|
role: 'heading'
|
|
1134
1130
|
}
|
|
1135
|
-
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"],
|
|
1131
|
+
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
1136
1132
|
suggestions: suggestions,
|
|
1137
1133
|
selectedOptions: selectedOptionIds,
|
|
1138
1134
|
getRef: _this5.suggestionItemRef,
|
|
@@ -1145,7 +1141,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1145
1141
|
role: 'option'
|
|
1146
1142
|
},
|
|
1147
1143
|
dataId: "".concat(dataId, "_Options")
|
|
1148
|
-
}
|
|
1144
|
+
}));
|
|
1149
1145
|
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
1150
1146
|
options: revampedGroups,
|
|
1151
1147
|
searchString: searchStr,
|
|
@@ -611,9 +611,7 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
611
611
|
role: 'option'
|
|
612
612
|
},
|
|
613
613
|
dataId: "".concat(dataIdMultiSelectComp, "_Options")
|
|
614
|
-
}, SuggestionsProps, {
|
|
615
|
-
needMultiLineText: true
|
|
616
|
-
})) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
614
|
+
}, SuggestionsProps)) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
617
615
|
isLoading: isFetchingOptions,
|
|
618
616
|
options: options,
|
|
619
617
|
searchString: searchStr,
|
|
@@ -1093,10 +1093,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1093
1093
|
boxSize = _this$props15.boxSize,
|
|
1094
1094
|
isLoading = _this$props15.isLoading,
|
|
1095
1095
|
selectAllText = _this$props15.selectAllText,
|
|
1096
|
-
needSelectAll = _this$props15.needSelectAll
|
|
1097
|
-
customProps = _this$props15.customProps;
|
|
1098
|
-
var _customProps$suggesti = customProps.suggestionsProps,
|
|
1099
|
-
suggestionsProps = _customProps$suggesti === void 0 ? {} : _customProps$suggesti;
|
|
1096
|
+
needSelectAll = _this$props15.needSelectAll;
|
|
1100
1097
|
var _this$state9 = this.state,
|
|
1101
1098
|
selectedOptions = _this$state9.selectedOptions,
|
|
1102
1099
|
searchStr = _this$state9.searchStr,
|
|
@@ -1173,7 +1170,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1173
1170
|
eleRef: this.suggestionContainerRef
|
|
1174
1171
|
}, isSearching ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
1175
1172
|
className: _MultiSelectModule["default"][palette]
|
|
1176
|
-
}, searchText) : suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"],
|
|
1173
|
+
}, searchText) : suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
1177
1174
|
suggestions: suggestions,
|
|
1178
1175
|
getRef: this.suggestionItemRef,
|
|
1179
1176
|
hoverOption: hoverOption,
|
|
@@ -1186,7 +1183,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1186
1183
|
a11y: {
|
|
1187
1184
|
role: 'option'
|
|
1188
1185
|
}
|
|
1189
|
-
}
|
|
1186
|
+
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
1190
1187
|
isLoading: isFetchingOptions,
|
|
1191
1188
|
options: options,
|
|
1192
1189
|
searchString: searchStr,
|
|
@@ -83,8 +83,7 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
83
83
|
avatarPalette = _this$props.avatarPalette,
|
|
84
84
|
palette = _this$props.palette,
|
|
85
85
|
htmlId = _this$props.htmlId,
|
|
86
|
-
a11y = _this$props.a11y
|
|
87
|
-
needMultiLineText = _this$props.needMultiLineText;
|
|
86
|
+
a11y = _this$props.a11y;
|
|
88
87
|
var ariaParentRole = a11y.ariaParentRole,
|
|
89
88
|
ariaMultiselectable = a11y.ariaMultiselectable;
|
|
90
89
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
@@ -144,8 +143,7 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
144
143
|
size: listItemSize,
|
|
145
144
|
avatarPalette: avatarPalette,
|
|
146
145
|
palette: palette,
|
|
147
|
-
a11y: list_a11y
|
|
148
|
-
needMultiLineText: needMultiLineText
|
|
146
|
+
a11y: list_a11y
|
|
149
147
|
}));
|
|
150
148
|
} else if (optionType === 'icon') {
|
|
151
149
|
return /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], _extends({}, commonProps, {
|
|
@@ -165,8 +163,7 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
165
163
|
iconSize: iconSize,
|
|
166
164
|
size: listItemSize,
|
|
167
165
|
palette: palette,
|
|
168
|
-
a11y: list_a11y
|
|
169
|
-
needMultiLineText: needMultiLineText
|
|
166
|
+
a11y: list_a11y
|
|
170
167
|
}));
|
|
171
168
|
}
|
|
172
169
|
|
|
@@ -185,8 +182,7 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
185
182
|
active: isActive,
|
|
186
183
|
size: listItemSize,
|
|
187
184
|
palette: palette,
|
|
188
|
-
a11y: list_a11y
|
|
189
|
-
needMultiLineText: needMultiLineText
|
|
185
|
+
a11y: list_a11y
|
|
190
186
|
}));
|
|
191
187
|
})));
|
|
192
188
|
}
|
|
@@ -45,8 +45,7 @@ var AdvancedGroupMultiSelect_defaultProps = {
|
|
|
45
45
|
needEffect: true,
|
|
46
46
|
palette: 'default',
|
|
47
47
|
isLoading: false,
|
|
48
|
-
dataSelectorId: 'advancedGroupMultiSelect'
|
|
49
|
-
customProps: {}
|
|
48
|
+
dataSelectorId: 'advancedGroupMultiSelect'
|
|
50
49
|
};
|
|
51
50
|
exports.AdvancedGroupMultiSelect_defaultProps = AdvancedGroupMultiSelect_defaultProps;
|
|
52
51
|
var AdvancedMultiSelect_defaultProps = {
|
|
@@ -168,8 +167,8 @@ var MultiSelectWithAvatar_defaultProps = {
|
|
|
168
167
|
isLoading: false,
|
|
169
168
|
dataSelectorId: 'multiSelectWithAvatar',
|
|
170
169
|
keepSelectedOptions: false,
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
customProps: {},
|
|
171
|
+
needResponsive: true
|
|
173
172
|
};
|
|
174
173
|
exports.MultiSelectWithAvatar_defaultProps = MultiSelectWithAvatar_defaultProps;
|
|
175
174
|
var SelectedOptions_defaultProps = {
|
|
@@ -178,7 +177,6 @@ var SelectedOptions_defaultProps = {
|
|
|
178
177
|
};
|
|
179
178
|
exports.SelectedOptions_defaultProps = SelectedOptions_defaultProps;
|
|
180
179
|
var Suggestions_defaultProps = {
|
|
181
|
-
a11y: {}
|
|
182
|
-
needMultiLineText: false
|
|
180
|
+
a11y: {}
|
|
183
181
|
};
|
|
184
182
|
exports.Suggestions_defaultProps = Suggestions_defaultProps;
|
|
@@ -7,8 +7,6 @@ exports.Suggestions_propTypes = exports.SelectedOptions_propTypes = exports.Mult
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
-
var _AdvancedGroupMultiSe;
|
|
11
|
-
|
|
12
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
11
|
|
|
14
12
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -129,8 +127,7 @@ var MultiSelect_propTypes = {
|
|
|
129
127
|
setAriaId: _propTypes["default"].string,
|
|
130
128
|
ariaErrorId: _propTypes["default"].string,
|
|
131
129
|
customProps: _propTypes["default"].shape({
|
|
132
|
-
TextBoxIconProps: _propTypes["default"].object
|
|
133
|
-
suggestionsProps: _propTypes["default"].object
|
|
130
|
+
TextBoxIconProps: _propTypes["default"].object
|
|
134
131
|
})
|
|
135
132
|
};
|
|
136
133
|
exports.MultiSelect_propTypes = MultiSelect_propTypes;
|
|
@@ -201,11 +198,11 @@ var Suggestions_propTypes = {
|
|
|
201
198
|
logo: _propTypes["default"].string,
|
|
202
199
|
optionType: _propTypes["default"].string,
|
|
203
200
|
listItemProps: _propTypes["default"].object
|
|
204
|
-
}))
|
|
205
|
-
needMultiLineText: _propTypes["default"].bool
|
|
201
|
+
}))
|
|
206
202
|
};
|
|
207
203
|
exports.Suggestions_propTypes = Suggestions_propTypes;
|
|
208
|
-
|
|
204
|
+
|
|
205
|
+
var AdvancedGroupMultiSelect_propTypes = _defineProperty({
|
|
209
206
|
animationStyle: _propTypes["default"].string,
|
|
210
207
|
autoComplete: _propTypes["default"].bool,
|
|
211
208
|
borderColor: _propTypes["default"].oneOf(['transparent', 'default']),
|
|
@@ -273,7 +270,8 @@ var AdvancedGroupMultiSelect_propTypes = (_AdvancedGroupMultiSe = {
|
|
|
273
270
|
needToCloseOnSelect: _propTypes["default"].func,
|
|
274
271
|
searchStr: _propTypes["default"].string,
|
|
275
272
|
children: _propTypes["default"].node
|
|
276
|
-
},
|
|
273
|
+
}, "dataSelectorId", _propTypes["default"].string);
|
|
274
|
+
|
|
277
275
|
exports.AdvancedGroupMultiSelect_propTypes = AdvancedGroupMultiSelect_propTypes;
|
|
278
276
|
|
|
279
277
|
var AdvancedMultiSelect_propTypes = _objectSpread(_objectSpread({}, MultiSelect_propTypes), {}, {
|
package/lib/Popup/Popup.js
CHANGED
|
@@ -158,6 +158,8 @@ var Popup = function Popup(Component) {
|
|
|
158
158
|
_this.preventKeyboardScroll = _this.preventKeyboardScroll.bind(_assertThisInitialized(_this));
|
|
159
159
|
_this.addScrollBlockListeners = _this.addScrollBlockListeners.bind(_assertThisInitialized(_this));
|
|
160
160
|
_this.removeScrollBlockListeners = _this.removeScrollBlockListeners.bind(_assertThisInitialized(_this));
|
|
161
|
+
_this.handlScrollBlockAdd = _this.handlScrollBlockAdd.bind(_assertThisInitialized(_this));
|
|
162
|
+
_this.handleScrollBlockRemove = _this.handleScrollBlockRemove.bind(_assertThisInitialized(_this));
|
|
161
163
|
_this.handleIntersectionObserver = _this.handleIntersectionObserver.bind(_assertThisInitialized(_this));
|
|
162
164
|
_this.popupObserver = new _ResizeObserver["default"](_this.handlePopupResize); //dropBoxSize
|
|
163
165
|
|
|
@@ -216,10 +218,7 @@ var Popup = function Popup(Component) {
|
|
|
216
218
|
oldStateOpen = _ref2$isPopupReady === void 0 ? false : _ref2$isPopupReady;
|
|
217
219
|
|
|
218
220
|
var dropElement = this.dropElement;
|
|
219
|
-
var
|
|
220
|
-
propResizeHandling = _this$props.needResizeHandling,
|
|
221
|
-
isAbsolutePositioningNeeded = _this$props.isAbsolutePositioningNeeded,
|
|
222
|
-
isOutsideScrollBlocked = _this$props.isOutsideScrollBlocked;
|
|
221
|
+
var propResizeHandling = this.props.needResizeHandling;
|
|
223
222
|
|
|
224
223
|
if (oldStateOpen !== isPopupReady) {
|
|
225
224
|
if (isPopupReady && dropElement && (propResizeHandling !== undefined ? propResizeHandling : needResizeHandling)) {
|
|
@@ -229,14 +228,10 @@ var Popup = function Popup(Component) {
|
|
|
229
228
|
this.popupObserver.disconnect();
|
|
230
229
|
}
|
|
231
230
|
|
|
232
|
-
if (
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
} else {
|
|
237
|
-
(0, _intersectionObserver.removeIntersectionObserver)(this.placeHolderElement, this.handleIntersectionObserver);
|
|
238
|
-
this.removeScrollBlockListeners();
|
|
239
|
-
}
|
|
231
|
+
if (isPopupReady) {
|
|
232
|
+
this.handlScrollBlockAdd();
|
|
233
|
+
} else {
|
|
234
|
+
this.handleScrollBlockRemove();
|
|
240
235
|
}
|
|
241
236
|
}
|
|
242
237
|
}
|
|
@@ -258,8 +253,7 @@ var Popup = function Popup(Component) {
|
|
|
258
253
|
|
|
259
254
|
return res;
|
|
260
255
|
}, popups);
|
|
261
|
-
|
|
262
|
-
this.removeScrollBlockListeners();
|
|
256
|
+
this.handleScrollBlockRemove();
|
|
263
257
|
var noPopups = true;
|
|
264
258
|
|
|
265
259
|
for (var i in popups) {
|
|
@@ -283,6 +277,30 @@ var Popup = function Popup(Component) {
|
|
|
283
277
|
document.removeEventListener('focus', this.handleDocumentFocus, true);
|
|
284
278
|
}
|
|
285
279
|
}
|
|
280
|
+
}, {
|
|
281
|
+
key: "handlScrollBlockAdd",
|
|
282
|
+
value: function handlScrollBlockAdd() {
|
|
283
|
+
var _this$props = this.props,
|
|
284
|
+
isAbsolutePositioningNeeded = _this$props.isAbsolutePositioningNeeded,
|
|
285
|
+
isOutsideScrollBlocked = _this$props.isOutsideScrollBlocked;
|
|
286
|
+
|
|
287
|
+
if (isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
|
|
288
|
+
(0, _intersectionObserver.addIntersectionObserver)(this.placeHolderElement, this.handleIntersectionObserver);
|
|
289
|
+
this.addScrollBlockListeners();
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}, {
|
|
293
|
+
key: "handleScrollBlockRemove",
|
|
294
|
+
value: function handleScrollBlockRemove() {
|
|
295
|
+
var _this$props2 = this.props,
|
|
296
|
+
isAbsolutePositioningNeeded = _this$props2.isAbsolutePositioningNeeded,
|
|
297
|
+
isOutsideScrollBlocked = _this$props2.isOutsideScrollBlocked;
|
|
298
|
+
|
|
299
|
+
if (isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
|
|
300
|
+
(0, _intersectionObserver.removeIntersectionObserver)(this.placeHolderElement, this.handleIntersectionObserver);
|
|
301
|
+
this.removeScrollBlockListeners();
|
|
302
|
+
}
|
|
303
|
+
}
|
|
286
304
|
}, {
|
|
287
305
|
key: "addScrollBlockListeners",
|
|
288
306
|
value: function addScrollBlockListeners() {
|
|
@@ -31,32 +31,36 @@ function handleObserverCallbacks(entries) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
function addIntersectionObserver(element, callback, options) {
|
|
34
|
-
if (
|
|
35
|
-
intersectionObserver
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
if (!!element && typeof callback == 'function') {
|
|
35
|
+
if (intersectionObserver === null && observerCallbacks === null) {
|
|
36
|
+
intersectionObserver = new IntersectionObserver(function (entries) {
|
|
37
|
+
handleObserverCallbacks(entries);
|
|
38
|
+
}, options);
|
|
39
|
+
observerCallbacks = new Map();
|
|
40
|
+
}
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
intersectionObserver.observe(element);
|
|
43
|
+
var oldCallbacks = observerCallbacks.get(element) || [];
|
|
44
|
+
observerCallbacks.set(element, [].concat(_toConsumableArray(oldCallbacks), [callback]));
|
|
45
|
+
}
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
function removeIntersectionObserver(element, callback) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
if (!!element && typeof callback == 'function') {
|
|
50
|
+
var oldCallbacks = observerCallbacks ? observerCallbacks.get(element) || [] : [];
|
|
51
|
+
oldCallbacks = oldCallbacks.filter(function (handler) {
|
|
52
|
+
return handler !== callback;
|
|
53
|
+
});
|
|
51
54
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
if (intersectionObserver && oldCallbacks.length === 0) {
|
|
56
|
+
observerCallbacks["delete"](element);
|
|
57
|
+
intersectionObserver.unobserve(element);
|
|
58
|
+
}
|
|
56
59
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
if (intersectionObserver && observerCallbacks && observerCallbacks.size === 0) {
|
|
61
|
+
intersectionObserver.disconnect();
|
|
62
|
+
intersectionObserver = null;
|
|
63
|
+
observerCallbacks = null;
|
|
64
|
+
}
|
|
61
65
|
}
|
|
62
66
|
}
|