@zohodesk/components 1.0.0-temp-217.5 → 1.0.0-temp-199.8
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 +9 -0
- package/es/DropBox/DropBoxElement/DropBoxElement.js +3 -1
- package/es/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +4 -2
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +54 -51
- package/es/DropBox/DropBoxElement/css/cssJSLogic.js +4 -4
- package/es/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +4 -2
- package/es/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +3 -1
- package/es/ListItem/ListItem.js +2 -2
- package/es/ListItem/ListItem.module.css +15 -2
- package/es/ListItem/ListItemWithAvatar.js +3 -3
- package/es/ListItem/ListItemWithIcon.js +2 -2
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +7 -2
- package/es/MultiSelect/MultiSelect.js +7 -2
- package/es/MultiSelect/Suggestions.js +14 -5
- package/es/MultiSelect/props/defaultProps.js +9 -4
- package/es/MultiSelect/props/propTypes.js +9 -3
- package/es/Popup/Popup.js +232 -83
- package/es/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +4 -2
- 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 +4 -2
- package/es/common/common.module.css +5 -0
- package/es/utils/Common.js +2 -1
- package/es/v1/ListItem/ListItem.js +1 -1
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +2 -1
- package/es/v1/MultiSelect/MultiSelect.js +7 -2
- package/es/v1/MultiSelect/Suggestions.js +8 -4
- package/es/v1/MultiSelect/props/defaultProps.js +4 -2
- package/es/v1/MultiSelect/props/propTypes.js +6 -2
- package/es/v1/Select/GroupSelect.js +7 -2
- package/es/v1/Select/SelectWithAvatar.js +7 -2
- package/es/v1/Select/props/defaultProps.js +4 -2
- package/es/v1/Select/props/propTypes.js +6 -2
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +3 -1
- package/lib/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +4 -2
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +54 -51
- package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +2 -2
- package/lib/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +4 -2
- package/lib/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +3 -1
- package/lib/ListItem/ListItem.js +2 -2
- package/lib/ListItem/ListItem.module.css +15 -2
- package/lib/ListItem/ListItemWithAvatar.js +3 -3
- package/lib/ListItem/ListItemWithIcon.js +2 -2
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +7 -3
- package/lib/MultiSelect/MultiSelect.js +6 -3
- package/lib/MultiSelect/Suggestions.js +12 -5
- package/lib/MultiSelect/props/defaultProps.js +9 -4
- package/lib/MultiSelect/props/propTypes.js +8 -3
- package/lib/Popup/Popup.js +282 -114
- package/lib/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +4 -2
- 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 +4 -2
- package/lib/common/common.module.css +5 -0
- package/lib/utils/Common.js +5 -1
- package/lib/v1/ListItem/ListItem.js +1 -1
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +3 -1
- package/lib/v1/MultiSelect/MultiSelect.js +8 -3
- package/lib/v1/MultiSelect/Suggestions.js +8 -4
- package/lib/v1/MultiSelect/props/defaultProps.js +4 -2
- package/lib/v1/MultiSelect/props/propTypes.js +6 -2
- package/lib/v1/Select/GroupSelect.js +8 -3
- package/lib/v1/Select/SelectWithAvatar.js +8 -3
- package/lib/v1/Select/props/defaultProps.js +4 -2
- package/lib/v1/Select/props/propTypes.js +6 -2
- package/package.json +2 -2
- package/result.json +1 -1
- package/assets/Appearance/dark/mode/Component_v2_DarkMode.module.css +0 -10
- package/assets/Appearance/light/mode/Component_v2_LightMode.module.css +0 -10
- package/assets/Appearance/pureDark/mode/Component_v2_PureDarkMode.module.css +0 -10
- package/es/components-v2/Switch/Switch.js +0 -124
- package/es/components-v2/Switch/contants/index.js +0 -10
- package/es/components-v2/Switch/css/Switch_v2.module.css +0 -121
- package/es/components-v2/Switch/css/cssJSLogic.js +0 -45
- package/es/components-v2/Switch/props/defaultProps.js +0 -19
- package/es/components-v2/Switch/props/propTypes.js +0 -27
- package/lib/components-v2/Switch/Switch.js +0 -138
- package/lib/components-v2/Switch/contants/index.js +0 -18
- package/lib/components-v2/Switch/css/Switch_v2.module.css +0 -121
- package/lib/components-v2/Switch/css/cssJSLogic.js +0 -36
- package/lib/components-v2/Switch/props/defaultProps.js +0 -26
- package/lib/components-v2/Switch/props/propTypes.js +0 -38
package/README.md
CHANGED
|
@@ -32,6 +32,15 @@ In this Package, we Provide Some Basic Components to Build Web App
|
|
|
32
32
|
- TextBoxIcon
|
|
33
33
|
- Tooltip
|
|
34
34
|
|
|
35
|
+
# 1.2.57
|
|
36
|
+
|
|
37
|
+
- **Popup**
|
|
38
|
+
- Fixed popup scroll behavior is now supported using the `isOutsideScrollBlocked` flag. When set to `false` (default).
|
|
39
|
+
|
|
40
|
+
- **DropBoxElement**
|
|
41
|
+
- **Attributes Added**: The `data-box-direction` and `data-arrow-position` attributes have been added to facilitate the use of component-level CSS selectors.
|
|
42
|
+
- **CSS Selectors**: Added support for `arrow`, `paddingSpace`, `shadow`, and `boxdirection` to facilitate the behavior of the dropbox using CSS selectors.
|
|
43
|
+
|
|
35
44
|
# 1.2.56
|
|
36
45
|
|
|
37
46
|
- **CheckBox**
|
|
@@ -103,6 +103,8 @@ export default function DropBoxElement(props) {
|
|
|
103
103
|
style: inlineStyle,
|
|
104
104
|
"data-tour": tourId,
|
|
105
105
|
"data-position": boxPosition,
|
|
106
|
+
"data-box-direction": boxDirection,
|
|
107
|
+
"data-arrow-position": arrowPosition,
|
|
106
108
|
id: htmlId,
|
|
107
109
|
role: role,
|
|
108
110
|
"aria-multiselectable": ariaMultiselectable,
|
|
@@ -122,7 +124,7 @@ export default function DropBoxElement(props) {
|
|
|
122
124
|
}, isModel ? /*#__PURE__*/React.createElement("div", {
|
|
123
125
|
className: style.closeBar
|
|
124
126
|
}) : null, isArrow && !isModel && /*#__PURE__*/React.createElement("div", {
|
|
125
|
-
className: style
|
|
127
|
+
className: style.arrowPosition,
|
|
126
128
|
style: arrowstyle,
|
|
127
129
|
"data-id": `${dataId}_arrow`,
|
|
128
130
|
"data-test-id": `${dataId}_arrow`,
|
|
@@ -5,6 +5,8 @@ exports[`DropBoxElement rendering the defult props 1`] = `
|
|
|
5
5
|
<div
|
|
6
6
|
class="main hidden container bottomStart default"
|
|
7
7
|
data-a11y-focus-main-area="true"
|
|
8
|
+
data-arrow-position="end"
|
|
9
|
+
data-box-direction="bottom"
|
|
8
10
|
data-id="dropBox"
|
|
9
11
|
data-position="bottomStart"
|
|
10
12
|
data-selector-id="dropBox"
|
|
@@ -12,14 +14,14 @@ exports[`DropBoxElement rendering the defult props 1`] = `
|
|
|
12
14
|
dot-ui-element="dropbox"
|
|
13
15
|
>
|
|
14
16
|
<div
|
|
15
|
-
class="subContainer
|
|
17
|
+
class="subContainer shadow radius defaultPalette"
|
|
16
18
|
data-id="dropBox_subcontainer"
|
|
17
19
|
data-selector-id="dropBox_subcontainer"
|
|
18
20
|
data-test-id="dropBox_subcontainer"
|
|
19
21
|
tabindex="-1"
|
|
20
22
|
>
|
|
21
23
|
<div
|
|
22
|
-
class="
|
|
24
|
+
class="arrowPosition"
|
|
23
25
|
data-id="dropBox_arrow"
|
|
24
26
|
data-selector-id="dropBox_arrow"
|
|
25
27
|
data-test-id="dropBox_arrow"
|
|
@@ -73,19 +73,19 @@
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
/* shadow */
|
|
76
|
-
|
|
76
|
+
[data-box-direction="top"]>.shadow {
|
|
77
77
|
--dropbox_box_shadow: var(--zd_bs_dropbox_top);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
[data-box-direction="left"]>.shadow {
|
|
81
81
|
--dropbox_box_shadow: var(--zd_bs_dropbox_left);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
[data-box-direction="right"]>.shadow {
|
|
85
85
|
--dropbox_box_shadow: var(--zd_bs_dropbox_right);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
[data-box-direction="bottom"]>.shadow {
|
|
89
89
|
--dropbox_box_shadow: var(--zd_bs_dropbox_bottom);
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -158,37 +158,37 @@
|
|
|
158
158
|
transform: translateY(-50%);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
/* space for arrow */
|
|
162
|
-
.
|
|
161
|
+
/* space for arrow using data-box-direction attribute*/
|
|
162
|
+
.arrow[data-box-direction="top"] {
|
|
163
163
|
padding-bottom: var(--zd_size10) ;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
.
|
|
166
|
+
.arrow[data-box-direction="right"] {
|
|
167
167
|
padding-left: var(--zd_size10) ;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
.
|
|
170
|
+
.arrow[data-box-direction="left"] {
|
|
171
171
|
padding-right: var(--zd_size10) ;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
.
|
|
174
|
+
.arrow[data-box-direction="bottom"] {
|
|
175
175
|
padding-top: var(--zd_size10) ;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
/* space from target */
|
|
179
|
-
.
|
|
178
|
+
/* space from target using data-box-direction attribute*/
|
|
179
|
+
.paddingSpace[data-box-direction="top"] {
|
|
180
180
|
padding-bottom: var(--zd_size5) ;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
.
|
|
183
|
+
.paddingSpace[data-box-direction="right"] {
|
|
184
184
|
padding-left: var(--zd_size5) ;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
.
|
|
187
|
+
.paddingSpace[data-box-direction="left"] {
|
|
188
188
|
padding-right: var(--zd_size5) ;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
.
|
|
191
|
+
.paddingSpace[data-box-direction="bottom"] {
|
|
192
192
|
padding-top: var(--zd_size5) ;
|
|
193
193
|
}
|
|
194
194
|
|
|
@@ -213,107 +213,106 @@
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
/* arrow placement styles */
|
|
216
|
-
.
|
|
217
|
-
.end,
|
|
218
|
-
.mid {
|
|
216
|
+
.arrowPosition {
|
|
219
217
|
composes: arrow;
|
|
220
218
|
}
|
|
221
219
|
|
|
222
|
-
.top .
|
|
223
|
-
.top .
|
|
224
|
-
.top .
|
|
220
|
+
.boxDirection[data-box-direction="top"][data-arrow-position="start"] .arrowPosition,
|
|
221
|
+
.boxDirection[data-box-direction="top"][data-arrow-position="end"] .arrowPosition,
|
|
222
|
+
.boxDirection[data-box-direction="top"][data-arrow-position="mid"] .arrowPosition {
|
|
225
223
|
bottom: calc( var(--zd_size17) * -1 ) ;
|
|
226
224
|
}
|
|
227
225
|
|
|
228
|
-
.top .
|
|
226
|
+
.boxDirection[data-box-direction="top"][data-arrow-position="start"] .arrowPosition {
|
|
229
227
|
left: var(--zd_size28) ;
|
|
230
228
|
}
|
|
231
229
|
|
|
232
|
-
.top .
|
|
230
|
+
.boxDirection[data-box-direction="top"][data-arrow-position="end"] .arrowPosition {
|
|
233
231
|
right: var(--zd_size28) ;
|
|
234
232
|
transform: rotate(180deg) translateX(-50%);
|
|
235
233
|
}
|
|
236
234
|
|
|
237
|
-
.top .
|
|
235
|
+
.boxDirection[data-box-direction="top"][data-arrow-position="mid"] .arrowPosition {
|
|
238
236
|
left: 50% ;
|
|
239
237
|
}
|
|
240
238
|
|
|
241
|
-
.top .
|
|
242
|
-
.top .
|
|
239
|
+
.boxDirection[data-box-direction="top"][data-arrow-position="start"] .arrowPosition,
|
|
240
|
+
.boxDirection[data-box-direction="top"][data-arrow-position="mid"] .arrowPosition {
|
|
243
241
|
transform: rotate(180deg) translateX(50%);
|
|
244
242
|
}
|
|
245
243
|
|
|
246
|
-
.bottom .
|
|
247
|
-
.bottom .
|
|
248
|
-
.bottom .
|
|
244
|
+
.boxDirection[data-box-direction="bottom"][data-arrow-position="start"] .arrowPosition,
|
|
245
|
+
.boxDirection[data-box-direction="bottom"][data-arrow-position="end"] .arrowPosition,
|
|
246
|
+
.boxDirection[data-box-direction="bottom"][data-arrow-position="mid"] .arrowPosition {
|
|
249
247
|
top: calc( var(--zd_size17) * -1 ) ;
|
|
250
248
|
}
|
|
251
249
|
|
|
252
|
-
.bottom .
|
|
250
|
+
.boxDirection[data-box-direction="bottom"][data-arrow-position="start"] .arrowPosition {
|
|
253
251
|
left: var(--zd_size28) ;
|
|
254
252
|
}
|
|
255
253
|
|
|
256
|
-
.bottom .
|
|
254
|
+
.boxDirection[data-box-direction="bottom"][data-arrow-position="mid"] .arrowPosition {
|
|
257
255
|
left: 50% ;
|
|
258
256
|
}
|
|
259
257
|
|
|
260
|
-
.bottom .
|
|
258
|
+
.boxDirection[data-box-direction="bottom"][data-arrow-position="end"] .arrowPosition {
|
|
261
259
|
right: var(--zd_size28) ;
|
|
262
260
|
transform: translateX(50%);
|
|
263
261
|
}
|
|
264
262
|
|
|
265
|
-
.bottom .
|
|
266
|
-
.bottom .
|
|
263
|
+
.boxDirection[data-box-direction="bottom"][data-arrow-position="mid"] .arrowPosition,
|
|
264
|
+
.boxDirection[data-box-direction="bottom"][data-arrow-position="start"] .arrowPosition {
|
|
267
265
|
transform: translateX(-50%);
|
|
268
266
|
}
|
|
269
267
|
|
|
270
|
-
.left .
|
|
271
|
-
.left .
|
|
272
|
-
.left .
|
|
268
|
+
.boxDirection[data-box-direction="left"][data-arrow-position="start"] .arrowPosition,
|
|
269
|
+
.boxDirection[data-box-direction="left"][data-arrow-position="mid"] .arrowPosition,
|
|
270
|
+
.boxDirection[data-box-direction="left"][data-arrow-position="end"] .arrowPosition {
|
|
273
271
|
right: calc( var(--zd_size17) * -1 ) ;
|
|
274
272
|
}
|
|
275
273
|
|
|
276
|
-
.left .
|
|
274
|
+
.boxDirection[data-box-direction="left"][data-arrow-position="start"] .arrowPosition {
|
|
277
275
|
top: var(--zd_size28) ;
|
|
278
276
|
}
|
|
279
277
|
|
|
280
|
-
.left .
|
|
278
|
+
.boxDirection[data-box-direction="left"][data-arrow-position="end"] .arrowPosition {
|
|
281
279
|
transform: rotate(90deg) translateX(50%);
|
|
282
280
|
bottom: var(--zd_size28) ;
|
|
283
281
|
}
|
|
284
282
|
|
|
285
|
-
.left .
|
|
283
|
+
.boxDirection[data-box-direction="left"][data-arrow-position="mid"] .arrowPosition {
|
|
286
284
|
top: 50% ;
|
|
287
285
|
}
|
|
288
286
|
|
|
289
|
-
.left .
|
|
290
|
-
.left .
|
|
287
|
+
.boxDirection[data-box-direction="left"][data-arrow-position="start"] .arrowPosition,
|
|
288
|
+
.boxDirection[data-box-direction="left"][data-arrow-position="mid"] .arrowPosition {
|
|
291
289
|
transform: rotate(90deg) translateX(-50%);
|
|
292
290
|
}
|
|
293
291
|
|
|
294
|
-
.right .
|
|
295
|
-
.right .
|
|
296
|
-
.right .
|
|
292
|
+
.boxDirection[data-box-direction="right"][data-arrow-position="start"] .arrowPosition,
|
|
293
|
+
.boxDirection[data-box-direction="right"][data-arrow-position="mid"] .arrowPosition,
|
|
294
|
+
.boxDirection[data-box-direction="right"][data-arrow-position="end"] .arrowPosition {
|
|
297
295
|
left: calc( var(--zd_size17) * -1 ) ;
|
|
298
296
|
}
|
|
299
297
|
|
|
300
|
-
.right .
|
|
298
|
+
.boxDirection[data-box-direction="right"][data-arrow-position="start"] .arrowPosition {
|
|
301
299
|
top: var(--zd_size28) ;
|
|
302
300
|
}
|
|
303
301
|
|
|
304
|
-
.right .
|
|
302
|
+
.boxDirection[data-box-direction="right"][data-arrow-position="mid"] .arrowPosition {
|
|
305
303
|
top: 50% ;
|
|
306
304
|
}
|
|
307
305
|
|
|
308
|
-
.right .
|
|
309
|
-
.right .
|
|
306
|
+
.boxDirection[data-box-direction="right"][data-arrow-position="start"] .arrowPosition,
|
|
307
|
+
.boxDirection[data-box-direction="right"][data-arrow-position="mid"] .arrowPosition {
|
|
310
308
|
transform: rotate(-90deg) translateX(50%);
|
|
311
309
|
}
|
|
312
310
|
|
|
313
|
-
.right .
|
|
311
|
+
.boxDirection[data-box-direction="right"][data-arrow-position="end"] .arrowPosition {
|
|
314
312
|
bottom: var(--zd_size28) ;
|
|
315
313
|
transform: rotate(-90deg) translateX(-50%);
|
|
316
314
|
}
|
|
315
|
+
[data-visible="hidden"],
|
|
317
316
|
.hidden {
|
|
318
317
|
visibility: hidden;
|
|
319
318
|
opacity: 0;
|
|
@@ -321,7 +320,7 @@
|
|
|
321
320
|
pointer-events: none;
|
|
322
321
|
}
|
|
323
322
|
|
|
324
|
-
.hidden .subContainer {
|
|
323
|
+
[data-visible="hidden"] .subContainer, .hidden .subContainer {
|
|
325
324
|
box-shadow: none;
|
|
326
325
|
}
|
|
327
326
|
|
|
@@ -342,17 +341,21 @@
|
|
|
342
341
|
composes: animationBasic;
|
|
343
342
|
composes: fadeIn modeForward from '../../../common/animation.module.css';
|
|
344
343
|
}
|
|
344
|
+
|
|
345
345
|
.scaleIn {
|
|
346
346
|
composes: animationBasic;
|
|
347
347
|
composes: scaleIn from '../../../common/animation.module.css';
|
|
348
348
|
}
|
|
349
|
+
|
|
349
350
|
.bounce {
|
|
350
351
|
composes: animationBasic;
|
|
351
352
|
}
|
|
353
|
+
|
|
352
354
|
[dir=ltr] .bounce {
|
|
353
355
|
animation-name: animation;
|
|
354
356
|
animation-timing-function: cubic-bezier(0.4, 1, 0.65, 1.1);
|
|
355
357
|
}
|
|
358
|
+
|
|
356
359
|
[dir=rtl] .bounce {
|
|
357
360
|
animation-name: animation;
|
|
358
361
|
animation-timing-function: cubic-bezier(0.4, 1, 0.65, 1.1);
|
|
@@ -414,7 +417,7 @@
|
|
|
414
417
|
}
|
|
415
418
|
|
|
416
419
|
.closeBar {
|
|
417
|
-
|
|
420
|
+
/* Variable:Ignore */
|
|
418
421
|
height: 6px;
|
|
419
422
|
width: 20% ;
|
|
420
423
|
border-radius: 5px;
|
|
@@ -52,9 +52,9 @@ export default function cssJSLogic(_ref) {
|
|
|
52
52
|
[style[boxPosition]]: isAbsolute && !isModel,
|
|
53
53
|
[style.fixedContainer]: !isAbsolute && !isModel,
|
|
54
54
|
[style[size]]: size && !isModel,
|
|
55
|
-
[style
|
|
56
|
-
[style
|
|
57
|
-
[style
|
|
55
|
+
[style.boxDirection]: !isModel && isActive && isArrow,
|
|
56
|
+
[style.arrow]: !isModel && isActive && isArrow && isAbsolute,
|
|
57
|
+
[style.paddingSpace]: !isModel && isActive && !isArrow && isPadding
|
|
58
58
|
});
|
|
59
59
|
let subContainerClass = compileClassNames({
|
|
60
60
|
[style.subContainer]: true,
|
|
@@ -62,7 +62,7 @@ export default function cssJSLogic(_ref) {
|
|
|
62
62
|
[style.mobRadius]: !!isModel,
|
|
63
63
|
[style.slideUp]: !!isModel && isActive,
|
|
64
64
|
[customDropBox]: !isModel,
|
|
65
|
-
[style
|
|
65
|
+
[style.shadow]: !isModel,
|
|
66
66
|
[style.boxPadding]: !isModel && isBoxPaddingNeed,
|
|
67
67
|
[style.radius]: !isModel && isRadius,
|
|
68
68
|
[style[animationValue]]: !isModel && isAnimate && !isReducedMotion && isActive && !!animationStyle
|
|
@@ -5,6 +5,8 @@ exports[`DropBox rendering the defult props 1`] = `
|
|
|
5
5
|
<div
|
|
6
6
|
class="main hidden container bottomStart default"
|
|
7
7
|
data-a11y-focus-main-area="true"
|
|
8
|
+
data-arrow-position="end"
|
|
9
|
+
data-box-direction="bottom"
|
|
8
10
|
data-id="dropBox"
|
|
9
11
|
data-position="bottomStart"
|
|
10
12
|
data-selector-id="dropBox"
|
|
@@ -12,14 +14,14 @@ exports[`DropBox rendering the defult props 1`] = `
|
|
|
12
14
|
dot-ui-element="dropbox"
|
|
13
15
|
>
|
|
14
16
|
<div
|
|
15
|
-
class="subContainer
|
|
17
|
+
class="subContainer shadow radius defaultPalette"
|
|
16
18
|
data-id="dropBox_subcontainer"
|
|
17
19
|
data-selector-id="dropBox_subcontainer"
|
|
18
20
|
data-test-id="dropBox_subcontainer"
|
|
19
21
|
tabindex="-1"
|
|
20
22
|
>
|
|
21
23
|
<div
|
|
22
|
-
class="
|
|
24
|
+
class="arrowPosition"
|
|
23
25
|
data-id="dropBox_arrow"
|
|
24
26
|
data-selector-id="dropBox_arrow"
|
|
25
27
|
data-test-id="dropBox_arrow"
|
|
@@ -15,6 +15,8 @@ exports[`DropDown rendering the defult props 1`] = `
|
|
|
15
15
|
<div
|
|
16
16
|
class="main hidden container bottomMid default"
|
|
17
17
|
data-a11y-focus-main-area="true"
|
|
18
|
+
data-arrow-position="mid"
|
|
19
|
+
data-box-direction="bottom"
|
|
18
20
|
data-id="dropBox"
|
|
19
21
|
data-position="bottomMid"
|
|
20
22
|
data-selector-id="dropBox"
|
|
@@ -22,7 +24,7 @@ exports[`DropDown rendering the defult props 1`] = `
|
|
|
22
24
|
dot-ui-element="dropbox"
|
|
23
25
|
>
|
|
24
26
|
<div
|
|
25
|
-
class="subContainer
|
|
27
|
+
class="subContainer shadow radius defaultPalette"
|
|
26
28
|
data-id="dropBox_subcontainer"
|
|
27
29
|
data-selector-id="dropBox_subcontainer"
|
|
28
30
|
data-test-id="dropBox_subcontainer"
|
package/es/ListItem/ListItem.js
CHANGED
|
@@ -100,7 +100,7 @@ export default class ListItem extends React.Component {
|
|
|
100
100
|
autoHover: autoHover,
|
|
101
101
|
needTick: needTick,
|
|
102
102
|
needBorder: needBorder,
|
|
103
|
-
customClass: customListItem
|
|
103
|
+
customClass: `${needMultiLineText ? style.txtAlignBaseLine + ' ' + style.autoHeight : ''} ${customListItem}`,
|
|
104
104
|
dataId: dataIdString,
|
|
105
105
|
dataSelectorId: `${dataSelectorId}`,
|
|
106
106
|
isLink: isLink,
|
|
@@ -122,7 +122,7 @@ export default class ListItem extends React.Component {
|
|
|
122
122
|
adjust: true,
|
|
123
123
|
className: style.children
|
|
124
124
|
}, children) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
125
|
-
className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon}`,
|
|
125
|
+
className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon} ${needMultiLineText ? style.tickIconCenter : ''}`,
|
|
126
126
|
"aria-hidden": ariaHidden,
|
|
127
127
|
dataId: `${dataIdString}_tickIcon`,
|
|
128
128
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
line-height: 1.5385;
|
|
74
74
|
}
|
|
75
75
|
.multiLineValue{
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
composes: listItemClamp from '~@zohodesk/components/es/common/common.module.css';
|
|
77
|
+
--line-clamp-count: var(--list-line-clamp-count, 3);
|
|
78
78
|
}
|
|
79
79
|
.iconBox {
|
|
80
80
|
width: var(--zd_size20) ;
|
|
@@ -203,3 +203,16 @@
|
|
|
203
203
|
padding-top: var(--zd_size10) ;
|
|
204
204
|
padding-bottom: var(--zd_size10) ;
|
|
205
205
|
}
|
|
206
|
+
.autoHeight {
|
|
207
|
+
height: auto ;
|
|
208
|
+
}
|
|
209
|
+
.tickIconCenter {
|
|
210
|
+
top: 50% ;
|
|
211
|
+
transform: translateY(-50%);
|
|
212
|
+
}
|
|
213
|
+
.txtAlignBaseLine {
|
|
214
|
+
align-items: baseline;
|
|
215
|
+
}
|
|
216
|
+
.alignSelfTop {
|
|
217
|
+
align-self: start;
|
|
218
|
+
}
|
|
@@ -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: customListItem
|
|
110
|
+
customClass: `${needMultiLineText ? style.autoHeight : ''} ${customListItem}`,
|
|
111
111
|
dataId: `${dataIdString}_ListItemWithAvatar`,
|
|
112
112
|
dataSelectorId: `${dataSelectorId}`,
|
|
113
113
|
onClick: this.handleClick,
|
|
@@ -118,7 +118,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
118
118
|
customProps: ListItemProps,
|
|
119
119
|
...ContainerProps
|
|
120
120
|
}, name || imgSrc ? /*#__PURE__*/React.createElement(Box, {
|
|
121
|
-
className: style.leftAvatar
|
|
121
|
+
className: `${needMultiLineText ? style.alignSelfTop : ''} ${style.leftAvatar}`
|
|
122
122
|
}, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
123
123
|
name: name,
|
|
124
124
|
size: "small",
|
|
@@ -147,7 +147,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
147
147
|
"data-title": isDisabled ? null : title,
|
|
148
148
|
className: needMultiLineText ? style.multiLineValue : style.value
|
|
149
149
|
}, value) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
150
|
-
className: style.tickIcon
|
|
150
|
+
className: `${style.tickIcon} ${needMultiLineText ? style.tickIconCenter : ''}`,
|
|
151
151
|
"aria-hidden": ariaHidden,
|
|
152
152
|
dataId: `${dataIdString}_tickIcon`,
|
|
153
153
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -95,7 +95,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
95
95
|
autoHover: autoHover,
|
|
96
96
|
needTick: needTick,
|
|
97
97
|
needBorder: needBorder,
|
|
98
|
-
customClass: customClass
|
|
98
|
+
customClass: `${needMultiLineText ? style.autoHeight : ''} ${needMultiLineText && iconClass && !iconName ? style.txtAlignBaseLine : ''} ${customClass}`,
|
|
99
99
|
dataId: dataIdString,
|
|
100
100
|
dataSelectorId: dataSelectorId,
|
|
101
101
|
isLink: isLink,
|
|
@@ -125,7 +125,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
125
125
|
"data-title": isDisabled ? null : title,
|
|
126
126
|
dataId: `${dataIdString}_Text`
|
|
127
127
|
}, value), needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
128
|
-
className: style.tickIcon
|
|
128
|
+
className: `${style.tickIcon} ${needMultiLineText ? style.tickIconCenter : ''}`,
|
|
129
129
|
"aria-hidden": ariaHidden,
|
|
130
130
|
dataId: `${dataIdString}_tickIcon`,
|
|
131
131
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -876,8 +876,12 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
876
876
|
needEffect,
|
|
877
877
|
autoComplete,
|
|
878
878
|
getTargetRef,
|
|
879
|
-
isFocus
|
|
879
|
+
isFocus,
|
|
880
|
+
customProps
|
|
880
881
|
} = this.props;
|
|
882
|
+
const {
|
|
883
|
+
suggestionsProps
|
|
884
|
+
} = customProps;
|
|
881
885
|
let {
|
|
882
886
|
clearText = 'Clear all'
|
|
883
887
|
} = i18nKeys;
|
|
@@ -1057,7 +1061,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1057
1061
|
a11y: {
|
|
1058
1062
|
role: 'option'
|
|
1059
1063
|
},
|
|
1060
|
-
dataId: `${dataId}_Options
|
|
1064
|
+
dataId: `${dataId}_Options`,
|
|
1065
|
+
...suggestionsProps
|
|
1061
1066
|
}));
|
|
1062
1067
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1063
1068
|
options: revampedGroups,
|
|
@@ -1011,8 +1011,12 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1011
1011
|
boxSize,
|
|
1012
1012
|
isLoading,
|
|
1013
1013
|
selectAllText,
|
|
1014
|
-
needSelectAll
|
|
1014
|
+
needSelectAll,
|
|
1015
|
+
customProps
|
|
1015
1016
|
} = this.props;
|
|
1017
|
+
const {
|
|
1018
|
+
suggestionsProps = {}
|
|
1019
|
+
} = customProps;
|
|
1016
1020
|
const {
|
|
1017
1021
|
selectedOptions,
|
|
1018
1022
|
searchStr,
|
|
@@ -1102,7 +1106,8 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1102
1106
|
selectedOptions: selectedOptionIds,
|
|
1103
1107
|
a11y: {
|
|
1104
1108
|
role: 'option'
|
|
1105
|
-
}
|
|
1109
|
+
},
|
|
1110
|
+
...suggestionsProps
|
|
1106
1111
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1107
1112
|
isLoading: isFetchingOptions,
|
|
1108
1113
|
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 : ''
|
|
@@ -92,7 +98,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
92
98
|
size: listItemSize,
|
|
93
99
|
avatarPalette: avatarPalette,
|
|
94
100
|
palette: palette,
|
|
95
|
-
a11y: list_a11y
|
|
101
|
+
a11y: list_a11y,
|
|
102
|
+
needMultiLineText: needMultiLineText
|
|
96
103
|
});
|
|
97
104
|
} else if (optionType === 'icon') {
|
|
98
105
|
return /*#__PURE__*/React.createElement(ListItemWithIcon, { ...commonProps,
|
|
@@ -112,7 +119,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
112
119
|
iconSize: iconSize,
|
|
113
120
|
size: listItemSize,
|
|
114
121
|
palette: palette,
|
|
115
|
-
a11y: list_a11y
|
|
122
|
+
a11y: list_a11y,
|
|
123
|
+
needMultiLineText: needMultiLineText
|
|
116
124
|
});
|
|
117
125
|
}
|
|
118
126
|
|
|
@@ -131,7 +139,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
131
139
|
active: isActive,
|
|
132
140
|
size: listItemSize,
|
|
133
141
|
palette: palette,
|
|
134
|
-
a11y: list_a11y
|
|
142
|
+
a11y: list_a11y,
|
|
143
|
+
needMultiLineText: needMultiLineText
|
|
135
144
|
});
|
|
136
145
|
})));
|
|
137
146
|
}
|
|
@@ -37,7 +37,8 @@ export const AdvancedGroupMultiSelect_defaultProps = {
|
|
|
37
37
|
needEffect: true,
|
|
38
38
|
palette: 'default',
|
|
39
39
|
isLoading: false,
|
|
40
|
-
dataSelectorId: 'advancedGroupMultiSelect'
|
|
40
|
+
dataSelectorId: 'advancedGroupMultiSelect',
|
|
41
|
+
customProps: {}
|
|
41
42
|
};
|
|
42
43
|
export const AdvancedMultiSelect_defaultProps = {
|
|
43
44
|
animationStyle: 'bounce',
|
|
@@ -154,13 +155,17 @@ export const MultiSelectWithAvatar_defaultProps = {
|
|
|
154
155
|
isLoading: false,
|
|
155
156
|
dataSelectorId: 'multiSelectWithAvatar',
|
|
156
157
|
keepSelectedOptions: false,
|
|
157
|
-
|
|
158
|
-
|
|
158
|
+
needResponsive: true,
|
|
159
|
+
customProps: {}
|
|
159
160
|
};
|
|
160
161
|
export const SelectedOptions_defaultProps = {
|
|
161
162
|
size: 'medium',
|
|
162
163
|
dataId: 'selectedOptions'
|
|
163
164
|
};
|
|
164
165
|
export const Suggestions_defaultProps = {
|
|
165
|
-
a11y: {}
|
|
166
|
+
a11y: {},
|
|
167
|
+
customClass: {
|
|
168
|
+
containerClass: ''
|
|
169
|
+
},
|
|
170
|
+
needMultiLineText: false
|
|
166
171
|
};
|
|
@@ -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
|
};
|
|
@@ -177,7 +178,11 @@ export const Suggestions_propTypes = {
|
|
|
177
178
|
logo: PropTypes.string,
|
|
178
179
|
optionType: PropTypes.string,
|
|
179
180
|
listItemProps: PropTypes.object
|
|
180
|
-
}))
|
|
181
|
+
})),
|
|
182
|
+
customClass: PropTypes.shape({
|
|
183
|
+
containerClass: PropTypes.string
|
|
184
|
+
}),
|
|
185
|
+
needMultiLineText: PropTypes.bool
|
|
181
186
|
};
|
|
182
187
|
export const AdvancedGroupMultiSelect_propTypes = {
|
|
183
188
|
animationStyle: PropTypes.string,
|
|
@@ -248,7 +253,8 @@ export const AdvancedGroupMultiSelect_propTypes = {
|
|
|
248
253
|
searchStr: PropTypes.string,
|
|
249
254
|
children: PropTypes.node,
|
|
250
255
|
dataSelectorId: PropTypes.string,
|
|
251
|
-
isFocus: PropTypes.bool
|
|
256
|
+
isFocus: PropTypes.bool,
|
|
257
|
+
customProps: PropTypes.object
|
|
252
258
|
};
|
|
253
259
|
export const AdvancedMultiSelect_propTypes = { ...MultiSelect_propTypes,
|
|
254
260
|
selectedOptionDetails: PropTypes.string,
|