@zohodesk/components 1.0.0-temp-248.1 → 1.0.0-temp-199.21
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/README.md +6 -8
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +2 -0
- package/assets/Appearance/light/mode/Component_LightMode.module.css +2 -0
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +2 -0
- package/es/ColorSelect/__tests__/__snapshots__/ColorMultiSelect.spec.js.snap +5 -5
- package/es/ColorSelect/__tests__/__snapshots__/ColorSingleSelect.spec.js.snap +6 -6
- package/es/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +3 -3
- package/es/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +1 -1
- package/es/DateTime/__tests__/__snapshots__/Time.spec.js.snap +3 -3
- package/es/ListItem/ListItem.module.css +30 -20
- package/es/ListItem/ListItemWithAvatar.js +4 -2
- package/es/ListItem/ListItemWithCheckBox.js +4 -2
- package/es/ListItem/ListItemWithIcon.js +4 -2
- package/es/ListItem/ListItemWithRadio.js +4 -2
- package/es/ListItem/props/propTypes.js +3 -3
- package/es/Modal/Portal/Portal.js +11 -10
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +6 -2
- package/es/MultiSelect/MultiSelect.js +2 -2
- package/es/MultiSelect/Suggestions.js +7 -2
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +1 -1
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +3 -3
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +3 -3
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelectWithAvatar.spec.js.snap +1 -1
- package/es/MultiSelect/props/defaultProps.js +2 -0
- package/es/MultiSelect/props/propTypes.js +11 -3
- package/es/Select/GroupSelect.js +1 -1
- package/es/Select/Select.js +3 -5
- package/es/Select/SelectWithAvatar.js +3 -3
- package/es/Select/SelectWithIcon.js +10 -3
- package/es/Select/__tests__/Select.spec.js +0 -5
- package/es/Select/__tests__/__snapshots__/GroupSelect.spec.js.snap +1 -1
- package/es/Select/__tests__/__snapshots__/Select.spec.js.snap +75 -75
- package/es/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +1 -1
- package/es/Select/props/defaultProps.js +4 -2
- package/es/Select/props/propTypes.js +12 -5
- package/es/TextBoxIcon/TextBoxIcon.js +1 -0
- package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +39 -39
- package/es/common/common.module.css +1 -1
- package/es/shared/InputFieldLine/InputFieldLine.js +1 -2
- package/es/shared/InputFieldLine/InputFieldLine.module.css +7 -13
- package/es/shared/InputFieldLine/__tests__/__snapshots__/InputFieldLine.spec.js.snap +19 -19
- package/es/shared/InputFieldLine/props/defaultProps.js +1 -0
- package/lib/ColorSelect/__tests__/__snapshots__/ColorMultiSelect.spec.js.snap +5 -5
- package/lib/ColorSelect/__tests__/__snapshots__/ColorSingleSelect.spec.js.snap +6 -6
- package/lib/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +3 -3
- package/lib/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +1 -1
- package/lib/DateTime/__tests__/__snapshots__/Time.spec.js.snap +3 -3
- package/lib/ListItem/ListItem.module.css +30 -20
- package/lib/ListItem/ListItemWithAvatar.js +5 -3
- package/lib/ListItem/ListItemWithCheckBox.js +4 -2
- package/lib/ListItem/ListItemWithIcon.js +5 -3
- package/lib/ListItem/ListItemWithRadio.js +4 -2
- package/lib/ListItem/props/propTypes.js +3 -3
- package/lib/Modal/Portal/Portal.js +17 -10
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +8 -3
- package/lib/MultiSelect/MultiSelect.js +2 -2
- package/lib/MultiSelect/Suggestions.js +6 -2
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +1 -1
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +3 -3
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +3 -3
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelectWithAvatar.spec.js.snap +1 -1
- package/lib/MultiSelect/props/defaultProps.js +2 -0
- package/lib/MultiSelect/props/propTypes.js +13 -5
- package/lib/Select/GroupSelect.js +2 -1
- package/lib/Select/Select.js +5 -8
- package/lib/Select/SelectWithAvatar.js +4 -3
- package/lib/Select/SelectWithIcon.js +10 -3
- package/lib/Select/__tests__/Select.spec.js +0 -5
- package/lib/Select/__tests__/__snapshots__/GroupSelect.spec.js.snap +1 -1
- package/lib/Select/__tests__/__snapshots__/Select.spec.js.snap +75 -75
- package/lib/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +1 -1
- package/lib/Select/props/defaultProps.js +5 -3
- package/lib/Select/props/propTypes.js +12 -5
- package/lib/TextBoxIcon/TextBoxIcon.js +1 -0
- package/lib/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +39 -39
- package/lib/common/common.module.css +1 -1
- package/lib/shared/InputFieldLine/InputFieldLine.js +1 -2
- package/lib/shared/InputFieldLine/InputFieldLine.module.css +7 -13
- package/lib/shared/InputFieldLine/__tests__/__snapshots__/InputFieldLine.spec.js.snap +19 -19
- package/lib/shared/InputFieldLine/props/defaultProps.js +1 -0
- package/package.json +7 -5
|
@@ -25,7 +25,7 @@ exports[`ColorMultiSelect Should render the default selected value 1`] = `
|
|
|
25
25
|
"
|
|
26
26
|
/>
|
|
27
27
|
<div
|
|
28
|
-
class="varClass customContainer
|
|
28
|
+
class="varClass customContainer effect container custmInputWrapper flex rowdir"
|
|
29
29
|
data-selector-id="textBoxIcon"
|
|
30
30
|
>
|
|
31
31
|
<div
|
|
@@ -210,7 +210,7 @@ exports[`ColorMultiSelect Should render the selected value 1`] = `
|
|
|
210
210
|
"
|
|
211
211
|
/>
|
|
212
212
|
<div
|
|
213
|
-
class="varClass customContainer
|
|
213
|
+
class="varClass customContainer effect container custmInputWrapper flex rowdir"
|
|
214
214
|
data-selector-id="textBoxIcon"
|
|
215
215
|
>
|
|
216
216
|
<div
|
|
@@ -311,7 +311,7 @@ exports[`ColorMultiSelect rendering the defult props 1`] = `
|
|
|
311
311
|
"
|
|
312
312
|
/>
|
|
313
313
|
<div
|
|
314
|
-
class="varClass customContainer
|
|
314
|
+
class="varClass customContainer effect container custmInputWrapper flex rowdir"
|
|
315
315
|
data-selector-id="textBoxIcon"
|
|
316
316
|
>
|
|
317
317
|
<div
|
|
@@ -394,7 +394,7 @@ exports[`ColorMultiSelect renders with renderCustomColorIndicator 1`] = `
|
|
|
394
394
|
"
|
|
395
395
|
/>
|
|
396
396
|
<div
|
|
397
|
-
class="varClass customContainer
|
|
397
|
+
class="varClass customContainer effect container custmInputWrapper flex rowdir"
|
|
398
398
|
data-selector-id="textBoxIcon"
|
|
399
399
|
>
|
|
400
400
|
<div
|
|
@@ -477,7 +477,7 @@ exports[`ColorMultiSelect renders with renderCustomSelectedValue 1`] = `
|
|
|
477
477
|
"
|
|
478
478
|
/>
|
|
479
479
|
<div
|
|
480
|
-
class="varClass customContainer
|
|
480
|
+
class="varClass customContainer effect container custmInputWrapper flex rowdir"
|
|
481
481
|
data-selector-id="textBoxIcon"
|
|
482
482
|
>
|
|
483
483
|
<div
|
|
@@ -18,7 +18,7 @@ exports[`ColorSingleSelect Should render the default selected value 1`] = `
|
|
|
18
18
|
aria-haspopup="listbox"
|
|
19
19
|
aria-owns="3"
|
|
20
20
|
aria-readonly="false"
|
|
21
|
-
class="varClass customContainer medium
|
|
21
|
+
class="varClass customContainer medium border_bottom effect borderColor_default hasBorder flex rowdir"
|
|
22
22
|
data-selector-id="container"
|
|
23
23
|
data-title=""
|
|
24
24
|
role="button"
|
|
@@ -96,7 +96,7 @@ exports[`ColorSingleSelect Should render the selected value 1`] = `
|
|
|
96
96
|
aria-haspopup="listbox"
|
|
97
97
|
aria-owns="6"
|
|
98
98
|
aria-readonly="false"
|
|
99
|
-
class="varClass customContainer medium
|
|
99
|
+
class="varClass customContainer medium border_bottom effect borderColor_default hasBorder flex rowdir"
|
|
100
100
|
data-selector-id="container"
|
|
101
101
|
data-title=""
|
|
102
102
|
role="button"
|
|
@@ -170,7 +170,7 @@ exports[`ColorSingleSelect rendering the defult props 1`] = `
|
|
|
170
170
|
aria-haspopup="listbox"
|
|
171
171
|
aria-owns="1"
|
|
172
172
|
aria-readonly="false"
|
|
173
|
-
class="varClass customContainer medium
|
|
173
|
+
class="varClass customContainer medium border_bottom effect borderColor_default hasBorder flex rowdir"
|
|
174
174
|
data-selector-id="container"
|
|
175
175
|
data-title=""
|
|
176
176
|
role="button"
|
|
@@ -233,7 +233,7 @@ exports[`ColorSingleSelect rendering with isDefaultSelectValue is false 1`] = `
|
|
|
233
233
|
aria-haspopup="listbox"
|
|
234
234
|
aria-owns="9"
|
|
235
235
|
aria-readonly="false"
|
|
236
|
-
class="varClass customContainer medium
|
|
236
|
+
class="varClass customContainer medium border_bottom effect borderColor_default hasBorder flex rowdir"
|
|
237
237
|
data-selector-id="container"
|
|
238
238
|
data-title=""
|
|
239
239
|
role="button"
|
|
@@ -298,7 +298,7 @@ exports[`ColorSingleSelect renders with renderCustomColorIndicator 1`] = `
|
|
|
298
298
|
aria-haspopup="listbox"
|
|
299
299
|
aria-owns="11"
|
|
300
300
|
aria-readonly="false"
|
|
301
|
-
class="varClass customContainer medium
|
|
301
|
+
class="varClass customContainer medium border_bottom effect borderColor_default hasBorder flex rowdir"
|
|
302
302
|
data-selector-id="container"
|
|
303
303
|
data-title=""
|
|
304
304
|
role="button"
|
|
@@ -376,7 +376,7 @@ exports[`ColorSingleSelect renders with renderCustomSelectedValue 1`] = `
|
|
|
376
376
|
aria-haspopup="listbox"
|
|
377
377
|
aria-owns="14"
|
|
378
378
|
aria-readonly="false"
|
|
379
|
-
class="varClass customContainer medium
|
|
379
|
+
class="varClass customContainer medium border_bottom effect borderColor_default hasBorder flex rowdir"
|
|
380
380
|
data-selector-id="container"
|
|
381
381
|
data-title=""
|
|
382
382
|
role="button"
|
|
@@ -618,7 +618,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
|
|
|
618
618
|
data-test-id="hourField"
|
|
619
619
|
>
|
|
620
620
|
<div
|
|
621
|
-
class="varClass customContainer
|
|
621
|
+
class="varClass customContainer border_bottom effect borderColor_default hasBorder container input flex rowdir"
|
|
622
622
|
data-selector-id="textBoxIcon"
|
|
623
623
|
>
|
|
624
624
|
<div
|
|
@@ -713,7 +713,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
|
|
|
713
713
|
data-test-id="minuteField"
|
|
714
714
|
>
|
|
715
715
|
<div
|
|
716
|
-
class="varClass customContainer
|
|
716
|
+
class="varClass customContainer border_bottom effect borderColor_default hasBorder container input flex rowdir"
|
|
717
717
|
data-selector-id="textBoxIcon"
|
|
718
718
|
>
|
|
719
719
|
<div
|
|
@@ -808,7 +808,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
|
|
|
808
808
|
data-test-id="ampmField"
|
|
809
809
|
>
|
|
810
810
|
<div
|
|
811
|
-
class="varClass customContainer
|
|
811
|
+
class="varClass customContainer border_bottom effect borderColor_default hasBorder container input flex rowdir"
|
|
812
812
|
data-selector-id="textBoxIcon"
|
|
813
813
|
>
|
|
814
814
|
<div
|
|
@@ -11,7 +11,7 @@ exports[`DateWidget rendering the defult props 1`] = `
|
|
|
11
11
|
data-test-id="dateWidget_widget"
|
|
12
12
|
>
|
|
13
13
|
<div
|
|
14
|
-
class="varClass customContainer
|
|
14
|
+
class="varClass customContainer border_bottom effect borderColor_default hasBorder container placeHolder flex rowdir"
|
|
15
15
|
data-selector-id="textBoxIcon"
|
|
16
16
|
>
|
|
17
17
|
<div
|
|
@@ -27,7 +27,7 @@ exports[`Time rendering the defult props 1`] = `
|
|
|
27
27
|
data-test-id="hourField"
|
|
28
28
|
>
|
|
29
29
|
<div
|
|
30
|
-
class="varClass customContainer
|
|
30
|
+
class="varClass customContainer border_bottom effect borderColor_default hasBorder container input flex rowdir"
|
|
31
31
|
data-selector-id="textBoxIcon"
|
|
32
32
|
>
|
|
33
33
|
<div
|
|
@@ -120,7 +120,7 @@ exports[`Time rendering the defult props 1`] = `
|
|
|
120
120
|
data-test-id="minuteField"
|
|
121
121
|
>
|
|
122
122
|
<div
|
|
123
|
-
class="varClass customContainer
|
|
123
|
+
class="varClass customContainer border_bottom effect borderColor_default hasBorder container input flex rowdir"
|
|
124
124
|
data-selector-id="textBoxIcon"
|
|
125
125
|
>
|
|
126
126
|
<div
|
|
@@ -213,7 +213,7 @@ exports[`Time rendering the defult props 1`] = `
|
|
|
213
213
|
data-test-id="ampmField"
|
|
214
214
|
>
|
|
215
215
|
<div
|
|
216
|
-
class="varClass customContainer
|
|
216
|
+
class="varClass customContainer border_bottom effect borderColor_default hasBorder container input flex rowdir"
|
|
217
217
|
data-selector-id="textBoxIcon"
|
|
218
218
|
>
|
|
219
219
|
<div
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* css:lineheight-validation:ignore */
|
|
1
2
|
.varClass {
|
|
2
3
|
/* listitem default variables */
|
|
3
4
|
--listitem_font_size: var(--zd_font_size13);
|
|
@@ -15,9 +16,14 @@
|
|
|
15
16
|
|
|
16
17
|
/* listitem tick icon default variables */
|
|
17
18
|
--listitem_tickicon_color: var(--zdt_listitem_default_tickicon);
|
|
18
|
-
|
|
19
|
+
|
|
20
|
+
/* multiLine value for list item */
|
|
21
|
+
--listitem_multiline_lineheight: 1.5385;
|
|
22
|
+
}
|
|
23
|
+
[dir=ltr] .varClass {
|
|
19
24
|
--listitem_avatar_margin: 0 var(--zd_size15) 0 0;
|
|
20
|
-
}
|
|
25
|
+
}
|
|
26
|
+
[dir=rtl] .varClass {
|
|
21
27
|
--listitem_avatar_margin: 0 0 0 var(--zd_size15);
|
|
22
28
|
}
|
|
23
29
|
.list {
|
|
@@ -76,8 +82,9 @@
|
|
|
76
82
|
[dir=rtl] .beforeChild{
|
|
77
83
|
margin-left: var(--zd_size10) ;
|
|
78
84
|
}
|
|
85
|
+
/* css:lineheight-validation:ignore */
|
|
79
86
|
.value, .multiLineValue {
|
|
80
|
-
line-height:
|
|
87
|
+
line-height: var(--listitem_multiline_lineheight);
|
|
81
88
|
}
|
|
82
89
|
.multiLineValue,.multiLine{
|
|
83
90
|
composes: lineClamp from '../common/common.module.css';
|
|
@@ -115,28 +122,20 @@
|
|
|
115
122
|
composes: justifyFend from '../common/common.module.css';
|
|
116
123
|
}
|
|
117
124
|
|
|
125
|
+
.contentWrapper {
|
|
126
|
+
composes: dflex flexrow alignVertical from '../common/common.module.css';
|
|
127
|
+
width: 100% ;
|
|
128
|
+
}
|
|
118
129
|
.lhsBox {
|
|
119
130
|
composes: dflex from '../common/common.module.css';
|
|
120
131
|
align-self: stretch;
|
|
121
132
|
}
|
|
122
|
-
.
|
|
123
|
-
.lhsBox_medium,
|
|
124
|
-
.lhsBox_large{
|
|
125
|
-
composes: varClass;
|
|
126
|
-
--listitem_doubleline_content_height: calc(var(--listitem_font_size) * 2 );
|
|
127
|
-
height: 100% ;
|
|
133
|
+
.lhsBoxInner{
|
|
128
134
|
composes: dflex alignVertical from '../common/common.module.css';
|
|
135
|
+
height: 100% ;
|
|
136
|
+
max-height: calc((var(--listitem_font_size) * var(--listitem_multiline_lineheight)) * 2 );
|
|
129
137
|
}
|
|
130
|
-
.
|
|
131
|
-
max-height: calc(var(--listitem_doubleline_content_height) + var(--zd_size7)); /* 7px = listitem min-height - (top + bottom padding) - doubleLine content height */
|
|
132
|
-
}
|
|
133
|
-
.lhsBox_medium {
|
|
134
|
-
max-height: calc(var(--listitem_doubleline_content_height) + var(--zd_size8)); /* 8px = listitem min-height - (top + bottom padding) - doubleLine content height */
|
|
135
|
-
}
|
|
136
|
-
.lhsBox_large {
|
|
137
|
-
max-height: calc(var(--listitem_doubleline_content_height) + var(--zd_size15)); /* 15px = listitem min-height - (top + bottom padding) - doubleLine content height */
|
|
138
|
-
}
|
|
139
|
-
.defaultHover, .primaryHover, .secondaryHover, .darkHover {
|
|
138
|
+
.defaultHover, .primaryHover, .dangerHover, .secondaryHover, .darkHover {
|
|
140
139
|
background-color: var(--listitem_highlight_bg_color);
|
|
141
140
|
}
|
|
142
141
|
.activewithBorder {
|
|
@@ -155,6 +154,13 @@
|
|
|
155
154
|
{
|
|
156
155
|
--listitem_bg_color: var(--zdt_listitem_highlight_bg);
|
|
157
156
|
}
|
|
157
|
+
.activedanger,
|
|
158
|
+
.dangerHover,
|
|
159
|
+
.dangerEffect:hover {
|
|
160
|
+
--listitem_bg_color: var(--zdt_listitem_danger_bg);
|
|
161
|
+
--listitem_highlight_bg_color: var(--zdt_listitem_danger_bg);
|
|
162
|
+
--listitem_text_color: var(--zdt_listitem_danger_text)
|
|
163
|
+
}
|
|
158
164
|
.primaryHover,
|
|
159
165
|
.primaryEffect:hover
|
|
160
166
|
/* .primaryEffect:focus */
|
|
@@ -177,7 +183,7 @@
|
|
|
177
183
|
--listitem_bg_color: var(--zdt_listitem_dark_effect_bg);
|
|
178
184
|
--listitem_highlight_bg_color: var(--zdt_listitem_dark_effect_bg);
|
|
179
185
|
}
|
|
180
|
-
.activedefault, .activeprimary, .activesecondary, .activedark {
|
|
186
|
+
.activedefault, .activeprimary, .activedanger, .activesecondary, .activedark {
|
|
181
187
|
background-color: var(--listitem_active_bg_color);
|
|
182
188
|
}
|
|
183
189
|
.activedefault,
|
|
@@ -186,6 +192,10 @@
|
|
|
186
192
|
.activeprimary:hover {
|
|
187
193
|
--listitem_active_bg_color: var(--zdt_listitem_primary_bg);
|
|
188
194
|
}
|
|
195
|
+
.activedanger,
|
|
196
|
+
.activedanger:hover {
|
|
197
|
+
--listitem_active_bg_color: var(--zdt_listitem_danger_bg);
|
|
198
|
+
}
|
|
189
199
|
.activesecondary {
|
|
190
200
|
--listitem_active_bg_color: var(--zdt_listitem_secondary_bg);
|
|
191
201
|
--listitem_text_color: var(--zdt_listitem_secondary_text);
|
|
@@ -178,11 +178,13 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
178
178
|
disableTitle: disableTitle,
|
|
179
179
|
title: null,
|
|
180
180
|
customProps: ListItemProps
|
|
181
|
-
}, ContainerProps),
|
|
181
|
+
}, ContainerProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
182
|
+
className: _ListItemModule["default"].contentWrapper
|
|
183
|
+
}, name || imgSrc ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
182
184
|
className: "".concat(_ListItemModule["default"].leftAvatar, " ").concat(lhsAlignContent !== 'center' ? "".concat(_ListItemModule["default"].lhsBox) : '')
|
|
183
185
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
184
186
|
align: lhsAlignContent,
|
|
185
|
-
className: _ListItemModule["default"]
|
|
187
|
+
className: _ListItemModule["default"].lhsBoxInner
|
|
186
188
|
}, isTeam ? /*#__PURE__*/_react["default"].createElement(_AvatarTeam["default"], _extends({
|
|
187
189
|
name: name,
|
|
188
190
|
size: "small",
|
|
@@ -226,7 +228,7 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
226
228
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
227
229
|
name: "ZD-ticknew",
|
|
228
230
|
size: "8"
|
|
229
|
-
})) : null);
|
|
231
|
+
})) : null));
|
|
230
232
|
}
|
|
231
233
|
}]);
|
|
232
234
|
|
|
@@ -160,11 +160,13 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
160
160
|
title: null,
|
|
161
161
|
customProps: ListItemProps
|
|
162
162
|
}, ContainerProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
163
|
+
className: _ListItemModule["default"].contentWrapper
|
|
164
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
163
165
|
className: "".concat(_ListItemModule["default"].iconBox, " ").concat(_ListItemModule["default"].lhsBox, " ").concat(_ListItemModule["default"]["lhsJustifyContent_".concat(lhsJustifyContent)]),
|
|
164
166
|
dataId: "".concat(dataId ? dataId : value, "_checkBox")
|
|
165
167
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
166
168
|
align: lhsAlignContent,
|
|
167
|
-
className: lhsAlignContent !== 'center' ? _ListItemModule["default"]
|
|
169
|
+
className: lhsAlignContent !== 'center' ? _ListItemModule["default"].lhsBoxInner : ''
|
|
168
170
|
}, /*#__PURE__*/_react["default"].createElement(_CheckBox["default"], {
|
|
169
171
|
checked: checked,
|
|
170
172
|
a11y: {
|
|
@@ -189,7 +191,7 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
189
191
|
}, (0, _utils.renderNode)(renderValueRightPlaceholderNode)) : null), secondaryValue ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
190
192
|
"data-title": isDisabled ? null : secondaryValue,
|
|
191
193
|
className: "".concat(_ListItemModule["default"].secondaryField, " ").concat(needMultiLineText ? _ListItemModule["default"].multiLine : _ListItemModule["default"].secondaryValue)
|
|
192
|
-
}, secondaryValue) : null));
|
|
194
|
+
}, secondaryValue) : null)));
|
|
193
195
|
}
|
|
194
196
|
}]);
|
|
195
197
|
|
|
@@ -166,14 +166,16 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
166
166
|
disableTitle: disableTitle,
|
|
167
167
|
title: null,
|
|
168
168
|
customProps: ListItemProps
|
|
169
|
-
}, ContainerProps),
|
|
169
|
+
}, ContainerProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
170
|
+
className: _ListItemModule["default"].contentWrapper
|
|
171
|
+
}, iconName && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
170
172
|
"aria-hidden": true,
|
|
171
173
|
align: lhsAlignContent,
|
|
172
174
|
className: "".concat(_ListItemModule["default"].iconBox, " ").concat(_ListItemModule["default"].lhsBox, " ").concat(_ListItemModule["default"]["lhsJustifyContent_".concat(lhsJustifyContent)]),
|
|
173
175
|
dataId: dataId ? "".concat(dataId, "_Icon") : "".concat(value.toLowerCase().replace("'", '_'), "_Icon")
|
|
174
176
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
175
177
|
align: lhsAlignContent,
|
|
176
|
-
className: lhsAlignContent !== 'center' ? _ListItemModule["default"]
|
|
178
|
+
className: lhsAlignContent !== 'center' ? _ListItemModule["default"].lhsBoxInner : ''
|
|
177
179
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
178
180
|
iconClass: iconClass,
|
|
179
181
|
name: iconName,
|
|
@@ -204,7 +206,7 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
204
206
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
205
207
|
name: "ZD-ticknew",
|
|
206
208
|
size: "8"
|
|
207
|
-
})) : null);
|
|
209
|
+
})) : null));
|
|
208
210
|
}
|
|
209
211
|
}]);
|
|
210
212
|
|
|
@@ -161,12 +161,14 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
161
161
|
title: null,
|
|
162
162
|
customProps: ListItemProps
|
|
163
163
|
}, ContainerProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
164
|
+
className: _ListItemModule["default"].contentWrapper
|
|
165
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
164
166
|
align: lhsAlignContent,
|
|
165
167
|
className: "".concat(_ListItemModule["default"].iconBox, " ").concat(_ListItemModule["default"].lhsBox, " ").concat(_ListItemModule["default"]["lhsJustifyContent_".concat(lhsJustifyContent)]),
|
|
166
168
|
dataId: "".concat(dataId, "_radio")
|
|
167
169
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
168
170
|
align: lhsAlignContent,
|
|
169
|
-
className: lhsAlignContent !== 'center' ? _ListItemModule["default"]
|
|
171
|
+
className: lhsAlignContent !== 'center' ? _ListItemModule["default"].lhsBoxInner : ''
|
|
170
172
|
}, /*#__PURE__*/_react["default"].createElement(_Radio["default"], {
|
|
171
173
|
checked: checked,
|
|
172
174
|
id: id,
|
|
@@ -192,7 +194,7 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
192
194
|
}, (0, _utils.renderNode)(renderValueRightPlaceholderNode)) : null), secondaryValue ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
193
195
|
"data-title": isDisabled ? null : secondaryValue,
|
|
194
196
|
className: "".concat(_ListItemModule["default"].secondaryField, " ").concat(needMultiLineText ? _ListItemModule["default"].multiLine : _ListItemModule["default"].secondaryValue)
|
|
195
|
-
}, secondaryValue) : null));
|
|
197
|
+
}, secondaryValue) : null)));
|
|
196
198
|
}
|
|
197
199
|
}]);
|
|
198
200
|
|
|
@@ -33,7 +33,7 @@ var ListContainer_Props = {
|
|
|
33
33
|
onClick: _propTypes["default"].func,
|
|
34
34
|
onMouseEnter: _propTypes["default"].func,
|
|
35
35
|
onMouseOver: _propTypes["default"].func,
|
|
36
|
-
palette: _propTypes["default"].oneOf(['default', 'primary', 'secondary', 'dark']),
|
|
36
|
+
palette: _propTypes["default"].oneOf(['default', 'primary', 'secondary', 'dark', 'danger']),
|
|
37
37
|
size: _propTypes["default"].oneOf(['small', 'medium', 'large']),
|
|
38
38
|
target: _propTypes["default"].oneOf(['blank', 'self']),
|
|
39
39
|
title: _propTypes["default"].string,
|
|
@@ -65,7 +65,7 @@ var ListItem_Props = {
|
|
|
65
65
|
needTick: _propTypes["default"].bool,
|
|
66
66
|
onClick: _propTypes["default"].func,
|
|
67
67
|
onMouseEnter: _propTypes["default"].func,
|
|
68
|
-
palette: _propTypes["default"].oneOf(['default', 'primary', 'secondary', 'dark']),
|
|
68
|
+
palette: _propTypes["default"].oneOf(['default', 'primary', 'secondary', 'dark', 'danger']),
|
|
69
69
|
size: _propTypes["default"].oneOf(['small', 'medium', 'large']),
|
|
70
70
|
target: _propTypes["default"].oneOf(['blank', 'self']),
|
|
71
71
|
title: _propTypes["default"].string,
|
|
@@ -163,7 +163,7 @@ var ListItemWithIcon_Props = {
|
|
|
163
163
|
needTick: _propTypes["default"].bool,
|
|
164
164
|
onClick: _propTypes["default"].func,
|
|
165
165
|
onMouseEnter: _propTypes["default"].func,
|
|
166
|
-
palette: _propTypes["default"].
|
|
166
|
+
palette: _propTypes["default"].oneOf(['default', 'primary', 'secondary', 'dark', 'danger']),
|
|
167
167
|
size: _propTypes["default"].string,
|
|
168
168
|
title: _propTypes["default"].string,
|
|
169
169
|
value: _propTypes["default"].string,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = Portal;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
10
12
|
var _Portal = _interopRequireDefault(require("@zohodesk/dotkit/es/react/components/Portal/Portal"));
|
|
11
13
|
|
|
@@ -17,16 +19,18 @@ var _propTypes = require("./props/propTypes");
|
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
20
26
|
function Portal(_ref) {
|
|
21
27
|
var children = _ref.children,
|
|
22
28
|
portalId = _ref.portalId;
|
|
23
|
-
var
|
|
29
|
+
var getPortalContainer = (0, _react.useCallback)(function () {
|
|
30
|
+
var getConfigPortalContainer = (0, _Config.getLibraryConfig)('getPortalContainer');
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (getPortalContainer && typeof getPortalContainer === 'function') {
|
|
29
|
-
var portal = getPortalContainer();
|
|
32
|
+
if (getConfigPortalContainer && typeof getConfigPortalContainer === 'function') {
|
|
33
|
+
var portal = getConfigPortalContainer();
|
|
30
34
|
|
|
31
35
|
if (portal) {
|
|
32
36
|
return portal;
|
|
@@ -34,10 +38,13 @@ function Portal(_ref) {
|
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
return null;
|
|
37
|
-
};
|
|
38
|
-
|
|
41
|
+
}, []);
|
|
42
|
+
var memoizedPortalId = (0, _react.useMemo)(function () {
|
|
43
|
+
var portalPrefix = (0, _Config.getLibraryConfig)("portalPrefix");
|
|
44
|
+
return "".concat(portalPrefix ? "".concat(portalPrefix) : '').concat(portalId);
|
|
45
|
+
}, [portalId]);
|
|
39
46
|
return /*#__PURE__*/_react["default"].createElement(_Portal["default"], {
|
|
40
|
-
portalId:
|
|
47
|
+
portalId: memoizedPortalId,
|
|
41
48
|
getFallbackElement: getPortalContainer
|
|
42
49
|
}, children);
|
|
43
50
|
}
|
|
@@ -55,6 +55,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
55
55
|
|
|
56
56
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
57
57
|
|
|
58
|
+
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); }
|
|
59
|
+
|
|
58
60
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
59
61
|
|
|
60
62
|
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."); }
|
|
@@ -979,7 +981,10 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
979
981
|
autoComplete = _this$props9.autoComplete,
|
|
980
982
|
getTargetRef = _this$props9.getTargetRef,
|
|
981
983
|
isFocus = _this$props9.isFocus,
|
|
982
|
-
limit = _this$props9.limit
|
|
984
|
+
limit = _this$props9.limit,
|
|
985
|
+
customProps = _this$props9.customProps;
|
|
986
|
+
var _customProps$Suggesti = customProps.SuggestionsProps,
|
|
987
|
+
SuggestionsProps = _customProps$Suggesti === void 0 ? {} : _customProps$Suggesti;
|
|
983
988
|
var _i18nKeys = i18nKeys,
|
|
984
989
|
_i18nKeys$clearText = _i18nKeys.clearText,
|
|
985
990
|
clearText = _i18nKeys$clearText === void 0 ? _constants.MULTISELECT_I18N_KEYS.clearText : _i18nKeys$clearText,
|
|
@@ -1145,7 +1150,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1145
1150
|
a11y: {
|
|
1146
1151
|
role: 'heading'
|
|
1147
1152
|
}
|
|
1148
|
-
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
1153
|
+
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], _extends({}, SuggestionsProps, {
|
|
1149
1154
|
suggestions: suggestions,
|
|
1150
1155
|
selectedOptions: selectedOptionIds,
|
|
1151
1156
|
getRef: _this5.suggestionItemRef,
|
|
@@ -1160,7 +1165,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1160
1165
|
limit: limit,
|
|
1161
1166
|
limitReachedMessage: limitReachedMessage,
|
|
1162
1167
|
dataId: "".concat(dataId, "_Options")
|
|
1163
|
-
}));
|
|
1168
|
+
})));
|
|
1164
1169
|
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
1165
1170
|
options: revampedGroups,
|
|
1166
1171
|
searchString: searchStr,
|
|
@@ -1171,9 +1171,9 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1171
1171
|
isLoading = _this$props15.isLoading,
|
|
1172
1172
|
selectAllText = _this$props15.selectAllText,
|
|
1173
1173
|
needSelectAll = _this$props15.needSelectAll,
|
|
1174
|
-
customProps = _this$props15.customProps,
|
|
1175
1174
|
isVirtualizerEnabled = _this$props15.isVirtualizerEnabled,
|
|
1176
|
-
limit = _this$props15.limit
|
|
1175
|
+
limit = _this$props15.limit,
|
|
1176
|
+
customProps = _this$props15.customProps;
|
|
1177
1177
|
var _this$state9 = this.state,
|
|
1178
1178
|
selectedOptions = _this$state9.selectedOptions,
|
|
1179
1179
|
searchStr = _this$state9.searchStr,
|
|
@@ -247,15 +247,19 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
247
247
|
htmlId = _this$props2.htmlId,
|
|
248
248
|
a11y = _this$props2.a11y,
|
|
249
249
|
getVirtualizerPublicMethods = _this$props2.getVirtualizerPublicMethods,
|
|
250
|
-
setVirtualizerContainerRefFunction = _this$props2.setVirtualizerContainerRefFunction
|
|
250
|
+
setVirtualizerContainerRefFunction = _this$props2.setVirtualizerContainerRefFunction,
|
|
251
|
+
customClass = _this$props2.customClass;
|
|
251
252
|
var ariaParentRole = a11y.ariaParentRole,
|
|
252
253
|
ariaMultiselectable = a11y.ariaMultiselectable;
|
|
254
|
+
var _customClass$containe = customClass.containerClass,
|
|
255
|
+
containerClass = _customClass$containe === void 0 ? '' : _customClass$containe;
|
|
253
256
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
254
257
|
isCover: false,
|
|
255
258
|
role: ariaParentRole,
|
|
256
259
|
id: htmlId,
|
|
257
260
|
tabindex: "0",
|
|
258
|
-
"aria-multiselectable": ariaMultiselectable
|
|
261
|
+
"aria-multiselectable": ariaMultiselectable,
|
|
262
|
+
className: containerClass
|
|
259
263
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
260
264
|
dataId: "".concat(dataId),
|
|
261
265
|
className: className ? className : ''
|
|
@@ -25,7 +25,7 @@ exports[`AdvancedGroupMultiSelect rendering the defult props 1`] = `
|
|
|
25
25
|
"
|
|
26
26
|
/>
|
|
27
27
|
<div
|
|
28
|
-
class="varClass customContainer
|
|
28
|
+
class="varClass customContainer effect container custmInputWrapper flex rowdir"
|
|
29
29
|
data-selector-id="textBoxIcon"
|
|
30
30
|
>
|
|
31
31
|
<div
|
|
@@ -25,7 +25,7 @@ exports[`AdvancedMultiSelect rendering the defult props 1`] = `
|
|
|
25
25
|
"
|
|
26
26
|
/>
|
|
27
27
|
<div
|
|
28
|
-
class="varClass customContainer
|
|
28
|
+
class="varClass customContainer effect container custmInputWrapper flex rowdir"
|
|
29
29
|
data-selector-id="textBoxIcon"
|
|
30
30
|
>
|
|
31
31
|
<div
|
|
@@ -96,7 +96,7 @@ exports[`AdvancedMultiSelect rendering the options array with objects and string
|
|
|
96
96
|
"
|
|
97
97
|
/>
|
|
98
98
|
<div
|
|
99
|
-
class="varClass customContainer
|
|
99
|
+
class="varClass customContainer effect container custmInputWrapper flex rowdir"
|
|
100
100
|
data-selector-id="textBoxIcon"
|
|
101
101
|
>
|
|
102
102
|
<div
|
|
@@ -342,7 +342,7 @@ exports[`AdvancedMultiSelect rendering the options array with only objects using
|
|
|
342
342
|
"
|
|
343
343
|
/>
|
|
344
344
|
<div
|
|
345
|
-
class="varClass customContainer
|
|
345
|
+
class="varClass customContainer effect container custmInputWrapper flex rowdir"
|
|
346
346
|
data-selector-id="textBoxIcon"
|
|
347
347
|
>
|
|
348
348
|
<div
|
|
@@ -25,7 +25,7 @@ exports[`MultiSelect Should render with renderCustomSelectedValue 1`] = `
|
|
|
25
25
|
"
|
|
26
26
|
/>
|
|
27
27
|
<div
|
|
28
|
-
class="varClass customContainer
|
|
28
|
+
class="varClass customContainer effect container custmInputWrapper flex rowdir"
|
|
29
29
|
data-selector-id="textBoxIcon"
|
|
30
30
|
>
|
|
31
31
|
<div
|
|
@@ -108,7 +108,7 @@ exports[`MultiSelect rendering the defult props 1`] = `
|
|
|
108
108
|
"
|
|
109
109
|
/>
|
|
110
110
|
<div
|
|
111
|
-
class="varClass customContainer
|
|
111
|
+
class="varClass customContainer effect container custmInputWrapper flex rowdir"
|
|
112
112
|
data-selector-id="textBoxIcon"
|
|
113
113
|
>
|
|
114
114
|
<div
|
|
@@ -341,7 +341,7 @@ exports[`MultiSelect rendering with limit feature 1`] = `
|
|
|
341
341
|
"
|
|
342
342
|
/>
|
|
343
343
|
<div
|
|
344
|
-
class="varClass customContainer
|
|
344
|
+
class="varClass customContainer effect container custmInputWrapper flex rowdir"
|
|
345
345
|
data-selector-id="textBoxIcon"
|
|
346
346
|
>
|
|
347
347
|
<div
|
|
@@ -25,7 +25,7 @@ exports[`MultiSelectWithAvatar rendering the defult props 1`] = `
|
|
|
25
25
|
"
|
|
26
26
|
/>
|
|
27
27
|
<div
|
|
28
|
-
class="varClass customContainer
|
|
28
|
+
class="varClass customContainer effect container custmInputWrapper flex rowdir"
|
|
29
29
|
data-selector-id="textBoxIcon"
|
|
30
30
|
>
|
|
31
31
|
<div
|
|
@@ -46,6 +46,7 @@ var AdvancedGroupMultiSelect_defaultProps = {
|
|
|
46
46
|
palette: 'default',
|
|
47
47
|
isLoading: false,
|
|
48
48
|
dataSelectorId: 'advancedGroupMultiSelect',
|
|
49
|
+
customProps: {},
|
|
49
50
|
allowValueFallback: true
|
|
50
51
|
};
|
|
51
52
|
exports.AdvancedGroupMultiSelect_defaultProps = AdvancedGroupMultiSelect_defaultProps;
|
|
@@ -184,6 +185,7 @@ exports.SelectedOptions_defaultProps = SelectedOptions_defaultProps;
|
|
|
184
185
|
var Suggestions_defaultProps = {
|
|
185
186
|
a11y: {},
|
|
186
187
|
isVirtualizerEnabled: false,
|
|
188
|
+
customClass: {},
|
|
187
189
|
needMultiLineText: false
|
|
188
190
|
};
|
|
189
191
|
exports.Suggestions_defaultProps = Suggestions_defaultProps;
|