@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
package/README.md
CHANGED
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Dot UI is a customizable React component library built to deliver a clean, accessible, and developer-friendly UI experience. It offers a growing set of reusable components designed to align with modern design systems and streamline application development across projects.
|
|
4
4
|
|
|
5
|
-
# 1.5.
|
|
6
|
-
- **InputFieldline**
|
|
7
|
-
- changed the handling of conditional logic for padding and size properties.
|
|
8
|
-
- `size` default prop declaration removed.
|
|
5
|
+
# 1.5.8
|
|
9
6
|
|
|
10
|
-
- **
|
|
11
|
-
- added support for `InputFieldLineProps` via the customProps object.
|
|
7
|
+
- Memoized **Portal** logic to improve performance.
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
# 1.5.7
|
|
10
|
+
|
|
11
|
+
- **ListContainer, ListItem, ListItemWithIcon**
|
|
12
|
+
- `danger` value supported for the **palette** prop.
|
|
15
13
|
|
|
16
14
|
# 1.5.6
|
|
17
15
|
|
|
@@ -183,6 +183,8 @@
|
|
|
183
183
|
--zdt_listitem_active_border: var(--zdt_cta_primary_border);
|
|
184
184
|
--zdt_listitem_primary_bg: var(--dot_listItemActive);
|
|
185
185
|
--zdt_listitem_secondary_bg: var(--zdtm_cta_primary_bg_default);
|
|
186
|
+
--zdt_listitem_danger_bg: rgba(255, 107, 107, 0.05);
|
|
187
|
+
--zdt_listitem_danger_text: hsla(0, 100.00%, calc(70.98% + var(--zdc_default_inverse_lower)), calc(1 + var(--zdc_alpha_low)));
|
|
186
188
|
--zdt_listitem_secondary_text: hsla(0, 0.00%, calc(12.94% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
187
189
|
|
|
188
190
|
/* ribbon */
|
|
@@ -183,6 +183,8 @@
|
|
|
183
183
|
--zdt_listitem_active_border: var(--zdt_cta_primary_border);
|
|
184
184
|
--zdt_listitem_primary_bg: var(--dot_listItemActive);
|
|
185
185
|
--zdt_listitem_secondary_bg: var(--zdtm_cta_primary_bg_default);
|
|
186
|
+
--zdt_listitem_danger_bg: rgb(253,243,243);
|
|
187
|
+
--zdt_listitem_danger_text: hsla(0, 71.91%, calc(53.92% + var(--zdc_default_inverse_lower)), calc(1 + var(--zdc_alpha_low)));
|
|
186
188
|
--zdt_listitem_secondary_text: hsla(0, 0.00%, calc(100.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
187
189
|
|
|
188
190
|
/* ribbon */
|
|
@@ -183,6 +183,8 @@
|
|
|
183
183
|
--zdt_listitem_active_border: var(--zdt_cta_primary_border);
|
|
184
184
|
--zdt_listitem_primary_bg: var(--dot_listItemActive);
|
|
185
185
|
--zdt_listitem_secondary_bg: var(--zdtm_cta_primary_bg_default);
|
|
186
|
+
--zdt_listitem_danger_bg: rgba(255, 107, 107, 0.05);
|
|
187
|
+
--zdt_listitem_danger_text: hsla(0, 100.00%, calc(70.98% + var(--zdc_default_inverse_lower)), calc(1 + var(--zdc_alpha_low)));
|
|
186
188
|
--zdt_listitem_secondary_text: hsla(0, 0.00%, calc(12.94% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
187
189
|
|
|
188
190
|
/* ribbon */
|
|
@@ -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);
|
|
@@ -124,11 +124,13 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
124
124
|
title: null,
|
|
125
125
|
customProps: ListItemProps,
|
|
126
126
|
...ContainerProps
|
|
127
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
128
|
+
className: style.contentWrapper
|
|
127
129
|
}, name || imgSrc ? /*#__PURE__*/React.createElement(Box, {
|
|
128
130
|
className: `${style.leftAvatar} ${lhsAlignContent !== 'center' ? `${style.lhsBox}` : ''}`
|
|
129
131
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
130
132
|
align: lhsAlignContent,
|
|
131
|
-
className: style
|
|
133
|
+
className: style.lhsBoxInner
|
|
132
134
|
}, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
133
135
|
name: name,
|
|
134
136
|
size: "small",
|
|
@@ -174,7 +176,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
174
176
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
175
177
|
name: "ZD-ticknew",
|
|
176
178
|
size: "8"
|
|
177
|
-
})) : null);
|
|
179
|
+
})) : null));
|
|
178
180
|
}
|
|
179
181
|
|
|
180
182
|
}
|
|
@@ -100,12 +100,14 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
100
100
|
title: null,
|
|
101
101
|
customProps: ListItemProps,
|
|
102
102
|
...ContainerProps
|
|
103
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
104
|
+
className: style.contentWrapper
|
|
103
105
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
104
106
|
className: `${style.iconBox} ${style.lhsBox} ${style[`lhsJustifyContent_${lhsJustifyContent}`]}`,
|
|
105
107
|
dataId: `${dataId ? dataId : value}_checkBox`
|
|
106
108
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
107
109
|
align: lhsAlignContent,
|
|
108
|
-
className: lhsAlignContent !== 'center' ? style
|
|
110
|
+
className: lhsAlignContent !== 'center' ? style.lhsBoxInner : ''
|
|
109
111
|
}, /*#__PURE__*/React.createElement(CheckBox, {
|
|
110
112
|
checked: checked,
|
|
111
113
|
a11y: {
|
|
@@ -130,7 +132,7 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
130
132
|
}, renderNode(renderValueRightPlaceholderNode)) : null), secondaryValue ? /*#__PURE__*/React.createElement(Box, {
|
|
131
133
|
"data-title": isDisabled ? null : secondaryValue,
|
|
132
134
|
className: `${style.secondaryField} ${needMultiLineText ? style.multiLine : style.secondaryValue}`
|
|
133
|
-
}, secondaryValue) : null));
|
|
135
|
+
}, secondaryValue) : null)));
|
|
134
136
|
}
|
|
135
137
|
|
|
136
138
|
}
|
|
@@ -116,6 +116,8 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
116
116
|
title: null,
|
|
117
117
|
customProps: ListItemProps,
|
|
118
118
|
...ContainerProps
|
|
119
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
120
|
+
className: style.contentWrapper
|
|
119
121
|
}, iconName && /*#__PURE__*/React.createElement(Box, {
|
|
120
122
|
"aria-hidden": true,
|
|
121
123
|
align: lhsAlignContent,
|
|
@@ -123,7 +125,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
123
125
|
dataId: dataId ? `${dataId}_Icon` : `${value.toLowerCase().replace("'", '_')}_Icon`
|
|
124
126
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
125
127
|
align: lhsAlignContent,
|
|
126
|
-
className: lhsAlignContent !== 'center' ? style
|
|
128
|
+
className: lhsAlignContent !== 'center' ? style.lhsBoxInner : ''
|
|
127
129
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
128
130
|
iconClass: iconClass,
|
|
129
131
|
name: iconName,
|
|
@@ -154,7 +156,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
154
156
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
155
157
|
name: "ZD-ticknew",
|
|
156
158
|
size: "8"
|
|
157
|
-
})) : null);
|
|
159
|
+
})) : null));
|
|
158
160
|
}
|
|
159
161
|
|
|
160
162
|
}
|
|
@@ -101,13 +101,15 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
101
101
|
title: null,
|
|
102
102
|
customProps: ListItemProps,
|
|
103
103
|
...ContainerProps
|
|
104
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
105
|
+
className: style.contentWrapper
|
|
104
106
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
105
107
|
align: lhsAlignContent,
|
|
106
108
|
className: `${style.iconBox} ${style.lhsBox} ${style[`lhsJustifyContent_${lhsJustifyContent}`]}`,
|
|
107
109
|
dataId: `${dataId}_radio`
|
|
108
110
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
109
111
|
align: lhsAlignContent,
|
|
110
|
-
className: lhsAlignContent !== 'center' ? style
|
|
112
|
+
className: lhsAlignContent !== 'center' ? style.lhsBoxInner : ''
|
|
111
113
|
}, /*#__PURE__*/React.createElement(Radio, {
|
|
112
114
|
checked: checked,
|
|
113
115
|
id: id,
|
|
@@ -133,7 +135,7 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
133
135
|
}, renderNode(renderValueRightPlaceholderNode)) : null), secondaryValue ? /*#__PURE__*/React.createElement(Box, {
|
|
134
136
|
"data-title": isDisabled ? null : secondaryValue,
|
|
135
137
|
className: `${style.secondaryField} ${needMultiLineText ? style.multiLine : style.secondaryValue}`
|
|
136
|
-
}, secondaryValue) : null));
|
|
138
|
+
}, secondaryValue) : null)));
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
}
|
|
@@ -17,7 +17,7 @@ export const ListContainer_Props = {
|
|
|
17
17
|
onClick: PropTypes.func,
|
|
18
18
|
onMouseEnter: PropTypes.func,
|
|
19
19
|
onMouseOver: PropTypes.func,
|
|
20
|
-
palette: PropTypes.oneOf(['default', 'primary', 'secondary', 'dark']),
|
|
20
|
+
palette: PropTypes.oneOf(['default', 'primary', 'secondary', 'dark', 'danger']),
|
|
21
21
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
22
22
|
target: PropTypes.oneOf(['blank', 'self']),
|
|
23
23
|
title: PropTypes.string,
|
|
@@ -48,7 +48,7 @@ export const ListItem_Props = {
|
|
|
48
48
|
needTick: PropTypes.bool,
|
|
49
49
|
onClick: PropTypes.func,
|
|
50
50
|
onMouseEnter: PropTypes.func,
|
|
51
|
-
palette: PropTypes.oneOf(['default', 'primary', 'secondary', 'dark']),
|
|
51
|
+
palette: PropTypes.oneOf(['default', 'primary', 'secondary', 'dark', 'danger']),
|
|
52
52
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
53
53
|
target: PropTypes.oneOf(['blank', 'self']),
|
|
54
54
|
title: PropTypes.string,
|
|
@@ -172,7 +172,7 @@ export const ListItemWithIcon_Props = {
|
|
|
172
172
|
needTick: PropTypes.bool,
|
|
173
173
|
onClick: PropTypes.func,
|
|
174
174
|
onMouseEnter: PropTypes.func,
|
|
175
|
-
palette: PropTypes.
|
|
175
|
+
palette: PropTypes.oneOf(['default', 'primary', 'secondary', 'dark', 'danger']),
|
|
176
176
|
size: PropTypes.string,
|
|
177
177
|
title: PropTypes.string,
|
|
178
178
|
value: PropTypes.string,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useCallback, useMemo } from "react";
|
|
2
2
|
import BasePortal from '@zohodesk/dotkit/es/react/components/Portal/Portal';
|
|
3
3
|
import { getLibraryConfig } from "../../Provider/Config";
|
|
4
4
|
import { defaultProps } from "./props/defaultProps";
|
|
@@ -8,13 +8,11 @@ export default function Portal(_ref) {
|
|
|
8
8
|
children,
|
|
9
9
|
portalId
|
|
10
10
|
} = _ref;
|
|
11
|
-
const
|
|
11
|
+
const getPortalContainer = useCallback(() => {
|
|
12
|
+
const getConfigPortalContainer = getLibraryConfig('getPortalContainer');
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (getPortalContainer && typeof getPortalContainer === 'function') {
|
|
17
|
-
const portal = getPortalContainer();
|
|
14
|
+
if (getConfigPortalContainer && typeof getConfigPortalContainer === 'function') {
|
|
15
|
+
const portal = getConfigPortalContainer();
|
|
18
16
|
|
|
19
17
|
if (portal) {
|
|
20
18
|
return portal;
|
|
@@ -22,10 +20,13 @@ export default function Portal(_ref) {
|
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
return null;
|
|
25
|
-
};
|
|
26
|
-
|
|
23
|
+
}, []);
|
|
24
|
+
const memoizedPortalId = useMemo(() => {
|
|
25
|
+
const portalPrefix = getLibraryConfig("portalPrefix");
|
|
26
|
+
return `${portalPrefix ? `${portalPrefix}` : ''}${portalId}`;
|
|
27
|
+
}, [portalId]);
|
|
27
28
|
return /*#__PURE__*/React.createElement(BasePortal, {
|
|
28
|
-
portalId:
|
|
29
|
+
portalId: memoizedPortalId,
|
|
29
30
|
getFallbackElement: getPortalContainer
|
|
30
31
|
}, children);
|
|
31
32
|
}
|
|
@@ -889,8 +889,12 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
889
889
|
autoComplete,
|
|
890
890
|
getTargetRef,
|
|
891
891
|
isFocus,
|
|
892
|
-
limit
|
|
892
|
+
limit,
|
|
893
|
+
customProps
|
|
893
894
|
} = this.props;
|
|
895
|
+
const {
|
|
896
|
+
SuggestionsProps = {}
|
|
897
|
+
} = customProps;
|
|
894
898
|
let {
|
|
895
899
|
clearText = MULTISELECT_I18N_KEYS.clearText,
|
|
896
900
|
limitReachedMessage = MULTISELECT_I18N_KEYS.limitReachedMessage
|
|
@@ -1059,7 +1063,7 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1059
1063
|
a11y: {
|
|
1060
1064
|
role: 'heading'
|
|
1061
1065
|
}
|
|
1062
|
-
})), /*#__PURE__*/React.createElement(Suggestions, {
|
|
1066
|
+
})), /*#__PURE__*/React.createElement(Suggestions, { ...SuggestionsProps,
|
|
1063
1067
|
suggestions: suggestions,
|
|
1064
1068
|
selectedOptions: selectedOptionIds,
|
|
1065
1069
|
getRef: this.suggestionItemRef,
|
|
@@ -1095,9 +1095,9 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1095
1095
|
isLoading,
|
|
1096
1096
|
selectAllText,
|
|
1097
1097
|
needSelectAll,
|
|
1098
|
-
customProps,
|
|
1099
1098
|
isVirtualizerEnabled,
|
|
1100
|
-
limit
|
|
1099
|
+
limit,
|
|
1100
|
+
customProps
|
|
1101
1101
|
} = this.props;
|
|
1102
1102
|
const {
|
|
1103
1103
|
selectedOptions,
|
|
@@ -193,18 +193,23 @@ export default class Suggestions extends React.PureComponent {
|
|
|
193
193
|
htmlId,
|
|
194
194
|
a11y,
|
|
195
195
|
getVirtualizerPublicMethods,
|
|
196
|
-
setVirtualizerContainerRefFunction
|
|
196
|
+
setVirtualizerContainerRefFunction,
|
|
197
|
+
customClass
|
|
197
198
|
} = this.props;
|
|
198
199
|
const {
|
|
199
200
|
ariaParentRole,
|
|
200
201
|
ariaMultiselectable
|
|
201
202
|
} = a11y;
|
|
203
|
+
const {
|
|
204
|
+
containerClass = ''
|
|
205
|
+
} = customClass;
|
|
202
206
|
return /*#__PURE__*/React.createElement(Container, {
|
|
203
207
|
isCover: false,
|
|
204
208
|
role: ariaParentRole,
|
|
205
209
|
id: htmlId,
|
|
206
210
|
tabindex: "0",
|
|
207
|
-
"aria-multiselectable": ariaMultiselectable
|
|
211
|
+
"aria-multiselectable": ariaMultiselectable,
|
|
212
|
+
className: containerClass
|
|
208
213
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
209
214
|
dataId: `${dataId}`,
|
|
210
215
|
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
|
|
@@ -38,6 +38,7 @@ export const AdvancedGroupMultiSelect_defaultProps = {
|
|
|
38
38
|
palette: 'default',
|
|
39
39
|
isLoading: false,
|
|
40
40
|
dataSelectorId: 'advancedGroupMultiSelect',
|
|
41
|
+
customProps: {},
|
|
41
42
|
allowValueFallback: true
|
|
42
43
|
};
|
|
43
44
|
export const AdvancedMultiSelect_defaultProps = {
|
|
@@ -169,5 +170,6 @@ export const SelectedOptions_defaultProps = {
|
|
|
169
170
|
export const Suggestions_defaultProps = {
|
|
170
171
|
a11y: {},
|
|
171
172
|
isVirtualizerEnabled: false,
|
|
173
|
+
customClass: {},
|
|
172
174
|
needMultiLineText: false
|
|
173
175
|
};
|