@zohodesk/components 1.0.0-temp-199.4 → 1.0.0-temp-210.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +16 -1
  3. package/es/DateTime/CalendarView.js +8 -5
  4. package/es/DateTime/DateTime.js +18 -4
  5. package/es/DateTime/DateTime.module.css +5 -5
  6. package/es/DateTime/DateWidget.js +5 -1
  7. package/es/DateTime/DaysRow.js +3 -2
  8. package/es/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +7 -7
  9. package/es/DateTime/props/defaultProps.js +9 -3
  10. package/es/DateTime/props/propTypes.js +11 -4
  11. package/es/ListItem/ListItem.js +2 -2
  12. package/es/ListItem/ListItem.module.css +18 -85
  13. package/es/ListItem/ListItemWithAvatar.js +3 -3
  14. package/es/ListItem/ListItemWithIcon.js +2 -2
  15. package/es/MultiSelect/AdvancedGroupMultiSelect.js +2 -7
  16. package/es/MultiSelect/AdvancedMultiSelect.js +1 -2
  17. package/es/MultiSelect/MultiSelect.js +2 -7
  18. package/es/MultiSelect/Suggestions.js +4 -8
  19. package/es/MultiSelect/props/defaultProps.js +4 -6
  20. package/es/MultiSelect/props/propTypes.js +3 -6
  21. package/es/Popup/Popup.js +32 -13
  22. package/es/Popup/intersectionObserver.js +23 -19
  23. package/es/Select/GroupSelect.js +2 -7
  24. package/es/Select/SelectWithAvatar.js +2 -7
  25. package/es/Select/SelectWithIcon.js +2 -4
  26. package/es/Select/props/defaultProps.js +2 -4
  27. package/es/Select/props/propTypes.js +2 -4
  28. package/es/v1/DateTime/CalendarView.js +9 -6
  29. package/es/v1/DateTime/DateTime.js +18 -4
  30. package/es/v1/DateTime/DateWidget.js +5 -1
  31. package/es/v1/DateTime/DaysRow.js +3 -2
  32. package/es/v1/DateTime/props/defaultProps.js +9 -3
  33. package/es/v1/DateTime/props/propTypes.js +11 -4
  34. package/es/v1/MultiSelect/AdvancedMultiSelect.js +1 -2
  35. package/es/v1/MultiSelect/MultiSelect.js +2 -7
  36. package/es/v1/MultiSelect/Suggestions.js +4 -8
  37. package/es/v1/MultiSelect/props/defaultProps.js +2 -4
  38. package/es/v1/MultiSelect/props/propTypes.js +2 -6
  39. package/es/v1/Select/GroupSelect.js +2 -7
  40. package/es/v1/Select/SelectWithAvatar.js +2 -7
  41. package/es/v1/Select/props/defaultProps.js +2 -4
  42. package/es/v1/Select/props/propTypes.js +2 -6
  43. package/lib/DateTime/CalendarView.js +8 -5
  44. package/lib/DateTime/DateTime.js +27 -4
  45. package/lib/DateTime/DateTime.module.css +5 -5
  46. package/lib/DateTime/DateWidget.js +5 -1
  47. package/lib/DateTime/DaysRow.js +3 -2
  48. package/lib/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +7 -7
  49. package/lib/DateTime/props/defaultProps.js +9 -3
  50. package/lib/DateTime/props/propTypes.js +11 -4
  51. package/lib/ListItem/ListItem.js +2 -2
  52. package/lib/ListItem/ListItem.module.css +18 -85
  53. package/lib/ListItem/ListItemWithAvatar.js +3 -3
  54. package/lib/ListItem/ListItemWithIcon.js +2 -2
  55. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +3 -7
  56. package/lib/MultiSelect/AdvancedMultiSelect.js +1 -3
  57. package/lib/MultiSelect/MultiSelect.js +3 -6
  58. package/lib/MultiSelect/Suggestions.js +4 -8
  59. package/lib/MultiSelect/props/defaultProps.js +4 -6
  60. package/lib/MultiSelect/props/propTypes.js +6 -8
  61. package/lib/Popup/Popup.js +32 -14
  62. package/lib/Popup/intersectionObserver.js +25 -21
  63. package/lib/Select/GroupSelect.js +3 -8
  64. package/lib/Select/SelectWithAvatar.js +3 -8
  65. package/lib/Select/SelectWithIcon.js +3 -5
  66. package/lib/Select/props/defaultProps.js +2 -4
  67. package/lib/Select/props/propTypes.js +2 -4
  68. package/lib/v1/DateTime/CalendarView.js +9 -6
  69. package/lib/v1/DateTime/DateTime.js +27 -4
  70. package/lib/v1/DateTime/DateWidget.js +5 -1
  71. package/lib/v1/DateTime/DaysRow.js +3 -2
  72. package/lib/v1/DateTime/props/defaultProps.js +9 -3
  73. package/lib/v1/DateTime/props/propTypes.js +11 -4
  74. package/lib/v1/MultiSelect/AdvancedMultiSelect.js +1 -3
  75. package/lib/v1/MultiSelect/MultiSelect.js +3 -8
  76. package/lib/v1/MultiSelect/Suggestions.js +4 -8
  77. package/lib/v1/MultiSelect/props/defaultProps.js +2 -4
  78. package/lib/v1/MultiSelect/props/propTypes.js +2 -6
  79. package/lib/v1/Select/GroupSelect.js +3 -8
  80. package/lib/v1/Select/SelectWithAvatar.js +3 -8
  81. package/lib/v1/Select/props/defaultProps.js +2 -4
  82. package/lib/v1/Select/props/propTypes.js +2 -6
  83. package/package.json +4 -4
  84. package/result.json +1 -1
package/README.md CHANGED
@@ -32,7 +32,22 @@ In this Package, we Provide Some Basic Components to Build Web App
32
32
  - TextBoxIcon
33
33
  - Tooltip
34
34
 
35
- # 1.2.49 (Yet To Publish)
35
+
36
+ # 1.2.50
37
+
38
+ - **DateTime (v0&v1), CalendarView (v0&v1)**
39
+
40
+ - Week starting day customization support added with `weekStartDay` props and week holiday customization support with `holidays` prop
41
+
42
+ - **DateWidget (v0&v1)**
43
+
44
+ - Support has been added for `weekStartDay`, `holidays` props
45
+
46
+ - **DaysRow (v0&v1)**
47
+
48
+ - `holidays` prop added for holiday column indication
49
+
50
+ # 1.2.49
36
51
 
37
52
  - **Popup**
38
53
  - `isOutsideScrollBlocked` prop supported - Scroll blocking behaviours supported
@@ -31,10 +31,12 @@ export default class CalendarView extends React.PureComponent {
31
31
  dayNamesShort,
32
32
  todayMonth,
33
33
  todayDate,
34
- todayYear
34
+ todayYear,
35
+ weekStartDay,
36
+ holidays
35
37
  } = this.props;
36
38
  const userSeeDate = new Date(year, month, 1);
37
- const userSeeDay = userSeeDate.getDay() + 1;
39
+ const userSeeDay = (userSeeDate.getDay() - weekStartDay + dayNames.length) % dayNames.length + 1;
38
40
  const userSeeYear = userSeeDate.getFullYear();
39
41
  const userSeeMonth = userSeeDate.getMonth();
40
42
  const monthEnd = getMonthEnd(month, year);
@@ -65,8 +67,8 @@ export default class CalendarView extends React.PureComponent {
65
67
  isSelectedDay = false;
66
68
  let tdclass = `${style.datesStr} ${style.grid}`;
67
69
 
68
- if (i === 1) {
69
- tdclass += ` ${style.sunday}`;
70
+ if (holidays.includes(i - 1)) {
71
+ tdclass += ` ${style.holiday}`;
70
72
  }
71
73
 
72
74
  if (incremleti >= userSeeDay && incremday <= monthEnd) {
@@ -170,7 +172,8 @@ export default class CalendarView extends React.PureComponent {
170
172
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DaysRow, {
171
173
  dayNames: dayNames,
172
174
  dayNamesShort: dayNamesShort,
173
- ariaLabel: dayNamesShort
175
+ ariaLabel: dayNamesShort,
176
+ holidays: holidays
174
177
  }), /*#__PURE__*/React.createElement("div", {
175
178
  "data-id": `${dataId}_dateContainer`,
176
179
  "data-test-id": `${dataId}_dateContainer`,
@@ -650,7 +650,9 @@ export default class DateTime extends React.PureComponent {
650
650
  targetOffset,
651
651
  isRestrictScroll,
652
652
  dropBoxPortalId,
653
- customProps = {}
653
+ customProps = {},
654
+ weekStartDay,
655
+ holidays
654
656
  } = this.props;
655
657
  const {
656
658
  TimeProps = {}
@@ -669,6 +671,16 @@ export default class DateTime extends React.PureComponent {
669
671
  dayNamesShort = dayNamesShortDefault
670
672
  } = i18nKeys;
671
673
  const showmonthtxt = title(date, year, month, monthNames);
674
+ let customDayNames = dayNames,
675
+ customDayNamesShort = dayNamesShort,
676
+ customizedHolidays = holidays;
677
+
678
+ if (weekStartDay !== 0) {
679
+ customDayNames = [...dayNames.slice(weekStartDay), ...dayNames.slice(0, weekStartDay)];
680
+ customDayNamesShort = [...dayNamesShort.slice(weekStartDay), ...dayNamesShort.slice(0, weekStartDay)];
681
+ customizedHolidays = holidays.map(dayIndex => customDayNames.indexOf(dayNames[dayIndex]));
682
+ }
683
+
672
684
  const childEle = /*#__PURE__*/React.createElement("div", {
673
685
  className: `${style.container} ${innerClass}`,
674
686
  "data-id": `${dataId}_Calendar`,
@@ -690,11 +702,13 @@ export default class DateTime extends React.PureComponent {
690
702
  year: year,
691
703
  month: month,
692
704
  onSelect: this.dateSelect,
693
- dayNames: dayNames,
694
- dayNamesShort: dayNamesShort,
705
+ dayNames: customDayNames,
706
+ dayNamesShort: customDayNamesShort,
695
707
  todayDate: todayDate,
696
708
  todayMonth: todayMonth,
697
- todayYear: todayYear
709
+ todayYear: todayYear,
710
+ weekStartDay: weekStartDay,
711
+ holidays: customizedHolidays
698
712
  }), isDateTimeField ? /*#__PURE__*/React.createElement(Time, {
699
713
  timeText: timeText,
700
714
  dataId: dataId,
@@ -112,9 +112,9 @@
112
112
  margin-bottom: 0 ;
113
113
  }
114
114
 
115
- .sunday,
116
- .sunday:hover,
117
- .invalidDate.sunday:hover {
115
+ .holiday,
116
+ .holiday:hover,
117
+ .invalidDate.holiday:hover {
118
118
  color: var(--zdt_datetime_invalid_hover_text);
119
119
  }
120
120
 
@@ -122,7 +122,7 @@
122
122
  color: var(--zdt_datetime_invalid_text);
123
123
  }
124
124
 
125
- .invalidDate.sunday,.inActiveDate.sunday:hover {
125
+ .invalidDate.holiday,.inActiveDate.holiday:hover {
126
126
  color: var(--zdt_datetime_invaliddate_text);
127
127
  }
128
128
 
@@ -155,7 +155,7 @@ cursor: no-drop;
155
155
  {
156
156
  color: var(--zdt_datetime_invalid_text);
157
157
  }
158
- .inActiveDate:hover, .inActiveDate.sunday:hover{
158
+ .inActiveDate:hover, .inActiveDate.holiday:hover{
159
159
  background-color: var(--zdt_datetime_inactivedate_hover_bg);
160
160
 
161
161
  }
@@ -1004,6 +1004,8 @@ class DateWidgetComponent extends React.Component {
1004
1004
  a11y,
1005
1005
  boxSize,
1006
1006
  onError,
1007
+ weekStartDay,
1008
+ holidays,
1007
1009
  customProps = {}
1008
1010
  } = this.props;
1009
1011
  const {
@@ -1106,7 +1108,9 @@ class DateWidgetComponent extends React.Component {
1106
1108
  dropBoxPortalId: dropBoxPortalId,
1107
1109
  boxSize: boxSize,
1108
1110
  onError: onError,
1109
- customProps: DateTimeProps
1111
+ customProps: DateTimeProps,
1112
+ weekStartDay: weekStartDay,
1113
+ holidays: holidays
1110
1114
  }));
1111
1115
  }
1112
1116
 
@@ -13,7 +13,8 @@ export default class DaysRow extends PureComponent {
13
13
  render() {
14
14
  const {
15
15
  dayNames,
16
- dayNamesShort
16
+ dayNamesShort,
17
+ holidays
17
18
  } = this.props;
18
19
  return /*#__PURE__*/React.createElement(Container, {
19
20
  alignBox: "row",
@@ -21,7 +22,7 @@ export default class DaysRow extends PureComponent {
21
22
  className: style.days
22
23
  }, dayNames.map((dayName, index) => /*#__PURE__*/React.createElement(Box, {
23
24
  key: dayName,
24
- className: `${style.daysStr} ${style.grid} ${index === 0 ? style.sunday : ''}`,
25
+ className: `${style.daysStr} ${style.grid} ${holidays.includes(index) ? style.holiday : ''}`,
25
26
  "data-title": dayName,
26
27
  "aria-label": dayName
27
28
  }, dayNamesShort[index])));
@@ -96,7 +96,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
96
96
  >
97
97
  <div
98
98
  aria-label="Sunday"
99
- class="daysStr grid sunday shrinkOff"
99
+ class="daysStr grid holiday shrinkOff"
100
100
  data-id="boxComponent"
101
101
  data-selector-id="box"
102
102
  data-test-id="boxComponent"
@@ -178,7 +178,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
178
178
  >
179
179
  <div
180
180
  aria-label="25"
181
- class="datesStr grid sunday invalidDate shrinkOff"
181
+ class="datesStr grid holiday invalidDate shrinkOff"
182
182
  data-id="dateTime_invalidDate"
183
183
  data-selector-id="box"
184
184
  data-test-id="dateTime_invalidDate"
@@ -248,7 +248,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
248
248
  >
249
249
  <div
250
250
  aria-label="2"
251
- class="datesStr grid sunday shrinkOff"
251
+ class="datesStr grid holiday shrinkOff"
252
252
  data-id="dateTime_date"
253
253
  data-selector-id="box"
254
254
  data-test-id="dateTime_date"
@@ -318,7 +318,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
318
318
  >
319
319
  <div
320
320
  aria-label="9"
321
- class="datesStr grid sunday shrinkOff"
321
+ class="datesStr grid holiday shrinkOff"
322
322
  data-id="dateTime_date"
323
323
  data-selector-id="box"
324
324
  data-test-id="dateTime_date"
@@ -388,7 +388,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
388
388
  >
389
389
  <div
390
390
  aria-label="16"
391
- class="datesStr grid sunday shrinkOff"
391
+ class="datesStr grid holiday shrinkOff"
392
392
  data-id="dateTime_date"
393
393
  data-selector-id="box"
394
394
  data-test-id="dateTime_date"
@@ -458,7 +458,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
458
458
  >
459
459
  <div
460
460
  aria-label="23"
461
- class="datesStr grid sunday shrinkOff"
461
+ class="datesStr grid holiday shrinkOff"
462
462
  data-id="dateTime_date"
463
463
  data-selector-id="box"
464
464
  data-test-id="dateTime_date"
@@ -528,7 +528,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
528
528
  >
529
529
  <div
530
530
  aria-label="30"
531
- class="datesStr grid sunday shrinkOff"
531
+ class="datesStr grid holiday shrinkOff"
532
532
  data-id="dateTime_date"
533
533
  data-selector-id="box"
534
534
  data-test-id="dateTime_date"
@@ -1,6 +1,8 @@
1
1
  export const CalendarView_defaultProps = {
2
2
  dataId: 'dateContainer',
3
- needBorder: true
3
+ needBorder: true,
4
+ weekStartDay: 0,
5
+ holidays: [0]
4
6
  };
5
7
  export const Span_defaultProps = {
6
8
  dataId: 'calendar-view'
@@ -21,7 +23,9 @@ export const DateTime_defaultProps = {
21
23
  is24Hour: false,
22
24
  isDefaultPosition: false,
23
25
  customDateFormat: null,
24
- customProps: {}
26
+ customProps: {},
27
+ weekStartDay: 0,
28
+ holidays: [0]
25
29
  };
26
30
  export const DateWidget_defaultProps = {
27
31
  borderColor: 'default',
@@ -44,7 +48,9 @@ export const DateWidget_defaultProps = {
44
48
  needErrorOnBlur: false,
45
49
  isEditable: false,
46
50
  iconOnHover: false,
47
- is24Hour: false
51
+ is24Hour: false,
52
+ weekStartDay: 0,
53
+ holidays: [0]
48
54
  };
49
55
  export const YearView_defaultProps = {
50
56
  dataId: 'dateContainer',
@@ -11,7 +11,9 @@ export const CalendarView_propTypes = {
11
11
  dayNamesShort: PropTypes.array,
12
12
  todayMonth: PropTypes.string,
13
13
  todayDate: PropTypes.string,
14
- todayYear: PropTypes.string
14
+ todayYear: PropTypes.string,
15
+ weekStartDay: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]),
16
+ holidays: PropTypes.arrayOf(PropTypes.number)
15
17
  };
16
18
  export const Span_propTypes = {
17
19
  dataId: PropTypes.string,
@@ -73,7 +75,9 @@ export const DateTime_propTypes = {
73
75
  targetOffset: PropTypes.string,
74
76
  isRestrictScroll: PropTypes.bool,
75
77
  dropBoxPortalId: PropTypes.string,
76
- customProps: PropTypes.object
78
+ customProps: PropTypes.object,
79
+ weekStartDay: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]),
80
+ holidays: PropTypes.arrayOf(PropTypes.number)
77
81
  };
78
82
  export const DateWidget_propTypes = {
79
83
  borderColor: PropTypes.oneOf(['transparent', 'default']),
@@ -142,7 +146,9 @@ export const DateWidget_propTypes = {
142
146
  dropBoxPortalId: PropTypes.string,
143
147
  a11y: PropTypes.object,
144
148
  getPopupProps: PropTypes.func,
145
- customProps: PropTypes.object
149
+ customProps: PropTypes.object,
150
+ weekStartDay: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]),
151
+ holidays: PropTypes.arrayOf(PropTypes.number)
146
152
  };
147
153
  export const YearView_propTypes = {
148
154
  onSelectMonth: PropTypes.func,
@@ -169,7 +175,8 @@ export const DateTimePopupHeader_propTypes = {
169
175
  };
170
176
  export const DaysRow_propTypes = {
171
177
  dayNames: PropTypes.array,
172
- dayNamesShort: PropTypes.object
178
+ dayNamesShort: PropTypes.object,
179
+ holidays: PropTypes.arrayOf(PropTypes.number)
173
180
  };
174
181
  export const Time_propTypes = {
175
182
  timeText: PropTypes.string,
@@ -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: `${needMultiLineText ? style.txtAlignBaseLine + ' ' + style.autoHeight : ''} ${customListItem}`,
103
+ customClass: 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} ${needMultiLineText ? style.tickIconCenter : ''}`,
125
+ className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon}`,
126
126
  "aria-hidden": ariaHidden,
127
127
  dataId: `${dataIdString}_tickIcon`,
128
128
  dataSelectorId: `${dataSelectorId}_tickIcon`
@@ -17,9 +17,8 @@
17
17
  }[dir=ltr] .varClass {
18
18
  --listitem_avatar_margin: 0 var(--zd_size15) 0 0;
19
19
  }[dir=rtl] .varClass {
20
- --listitem_avatar_margin: 0 var(--zd_size15) 0 0;
20
+ --listitem_avatar_margin: 0 0 0 var(--zd_size15);
21
21
  }
22
-
23
22
  .list {
24
23
  composes: varClass;
25
24
  position: relative;
@@ -35,84 +34,62 @@
35
34
  border-color: var(--listitem_border_color);
36
35
  cursor: pointer;
37
36
  }
38
-
39
37
  .list, .default, .secondary {
40
38
  background-color: var(--listitem_bg_color);
41
39
  }
42
-
43
40
  [dir=ltr] .withBorder {
44
- --listitem_border_width: 0 0 0 1px
45
- /*rtl: 0 1px 0 0*/
46
- ;
41
+ --listitem_border_width: 0 0 0 1px /*rtl: 0 1px 0 0*/;
47
42
  }
48
-
49
43
  [dir=rtl] .withBorder {
50
- --listitem_border_width: 0 0 0 1px ;
44
+ --listitem_border_width: 0 1px 0 0;
51
45
  }
52
-
53
46
  .active {
54
47
  --listitem_border_color: var(--zdt_listitem_active_border);
55
48
  }
56
-
57
49
  [dir=ltr] .small {
58
50
  --listitem_padding: var(--zd_size7) var(--zd_size3) var(--zd_size7) var(--zd_size5);
59
51
  }
60
-
61
52
  [dir=rtl] .small {
62
- --listitem_padding: var(--zd_size7) var(--zd_size3) var(--zd_size7) var(--zd_size5);
53
+ --listitem_padding: var(--zd_size7) var(--zd_size5) var(--zd_size7) var(--zd_size3);
63
54
  }
64
-
65
55
  .medium {
66
56
  --listitem_padding: var(--zd_size7) var(--zd_size20);
67
57
  --listitem_min_height: var(--zd_size35);
68
58
  }
69
-
70
59
  .large {
71
60
  --listitem_height: var(--zd_size48);
72
61
  }
73
-
74
62
  [dir=ltr] .large {
75
63
  --listitem_padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25);
76
64
  }
77
-
78
65
  [dir=rtl] .large {
79
- --listitem_padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25);
66
+ --listitem_padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size3);
80
67
  }
81
-
82
68
  .value,
83
69
  .children {
84
70
  composes: dotted from '../common/common.module.css';
85
71
  }
86
-
87
- .value {
72
+ .value, .multiLineValue {
88
73
  line-height: 1.5385;
89
74
  }
90
-
91
- .multiLineValue {
92
- line-height: 1.5385;
75
+ .multiLineValue{
93
76
  word-break: break-word;
94
- -webkit-line-clamp: 3;
95
- composes: clamp from '../common/common.module.css';
77
+ composes: clamp from '../common/common.module.css'
96
78
  }
97
-
98
79
  .iconBox {
99
80
  width: var(--zd_size20) ;
100
81
  text-align: center;
101
82
  }
102
-
103
83
  [dir=ltr] .iconBox {
104
84
  margin-right: var(--zd_size10) ;
105
85
  }
106
-
107
86
  [dir=rtl] .iconBox {
108
87
  margin-left: var(--zd_size10) ;
109
88
  }
110
-
111
89
  .iconBox,
112
90
  .leftAvatar {
113
91
  font-size: 0 ;
114
92
  }
115
-
116
93
  .leftAvatar {
117
94
  margin: var(--listitem_avatar_margin);
118
95
  }
@@ -120,78 +97,61 @@
120
97
  .defaultHover, .primaryHover, .secondaryHover, .darkHover {
121
98
  background-color: var(--listitem_highlight_bg_color);
122
99
  }
123
-
124
100
  .activewithBorder {
125
101
  --listitem_border_color: var(--zdt_listitem_active_border);
126
102
  }
127
-
128
103
  [dir=ltr] .activewithBorder {
129
- --listitem_border_width: 0 0 0 1px
130
- /*rtl: 0 1px 0 0*/
131
- ;
104
+ --listitem_border_width: 0 0 0 1px /*rtl: 0 1px 0 0*/;
132
105
  }
133
-
134
106
  [dir=rtl] .activewithBorder {
135
- --listitem_border_width: 0 0 0 1px ;
107
+ --listitem_border_width: 0 1px 0 0;
136
108
  }
137
109
 
138
110
  .defaultHover,
139
111
  .defaultEffect:hover
140
-
141
112
  /* .defaultEffect:focus */
142
- {
113
+ {
143
114
  --listitem_bg_color: var(--zdt_listitem_highlight_bg);
144
115
  }
145
-
146
116
  .primaryHover,
147
117
  .primaryEffect:hover
148
-
149
118
  /* .primaryEffect:focus */
150
- {
119
+ {
151
120
  --listitem_bg_color: var(--zdt_listitem_primary_bg);
152
121
  --listitem_highlight_bg_color: var(--zdt_listitem_primary_bg);
153
122
  }
154
-
155
123
  .secondaryHover,
156
124
  .secondaryEffect:hover
157
-
158
125
  /* .secondaryEffect:focus */
159
- {
126
+ {
160
127
  --listitem_bg_color: var(--zdt_listitem_secondary_bg);
161
128
  --listitem_highlight_bg_color: var(--zdt_listitem_secondary_bg);
162
129
  --listitem_text_color: var(--zdt_listitem_secondary_text);
163
130
  }
164
-
165
131
  .darkHover,
166
132
  .darkEffect:hover
167
-
168
133
  /* .darkEffect:focus */
169
- {
134
+ {
170
135
  --listitem_bg_color: var(--zdt_listitem_dark_effect_bg);
171
136
  --listitem_highlight_bg_color: var(--zdt_listitem_dark_effect_bg);
172
137
  }
173
-
174
138
  .activedefault, .activeprimary, .activesecondary, .activedark {
175
139
  background-color: var(--listitem_active_bg_color);
176
140
  }
177
-
178
141
  .activedefault,
179
142
  .activedefault:hover,
180
143
  .activeprimary,
181
144
  .activeprimary:hover {
182
145
  --listitem_active_bg_color: var(--zdt_listitem_primary_bg);
183
146
  }
184
-
185
147
  .activesecondary {
186
148
  --listitem_active_bg_color: var(--zdt_listitem_secondary_bg);
187
149
  --listitem_text_color: var(--zdt_listitem_secondary_text);
188
150
  }
189
-
190
151
  .dark {
191
152
  --listitem_bg_color: var(--zdt_listitem_dark_bg);
192
153
  --listitem_text_color: var(--zdt_listitem_dark_text);
193
154
  }
194
-
195
155
  .activedark {
196
156
  --listitem_active_bg_color: var(--zdt_listitem_dark_active_bg);
197
157
  }
@@ -210,63 +170,36 @@
210
170
  [dir=rtl] .tickIcon, [dir=rtl] .defaultTick, [dir=rtl] .darkTick {
211
171
  left: var(--zd_size20) ;
212
172
  }
213
-
214
173
  .defaultTick {
215
174
  --listitem_tickicon_color: var(--zdt_listitem_default_tickicon);
216
175
  }
217
-
218
176
  .darkTick {
219
177
  --listitem_tickicon_color: var(--zdt_listitem_dark_tickicon);
220
178
  }
221
-
222
- .defaultTick>i {
179
+ .defaultTick > i {
223
180
  display: block;
224
181
  }
225
-
226
182
  [dir=ltr] .smallwithTick {
227
183
  --listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size5);
228
184
  }
229
-
230
185
  [dir=rtl] .smallwithTick {
231
- --listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size5);
186
+ --listitem_padding: var(--zd_size7) var(--zd_size5) var(--zd_size7) var(--zd_size39);
232
187
  }
233
-
234
188
  [dir=ltr] .mediumwithTick {
235
189
  --listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size20);
236
190
  }
237
-
238
191
  [dir=rtl] .mediumwithTick {
239
- --listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size20);
192
+ --listitem_padding: var(--zd_size7) var(--zd_size20) var(--zd_size7) var(--zd_size39);
240
193
  }
241
-
242
194
  [dir=ltr] .largewithTick {
243
195
  --listitem_padding: var(--zd_size10) var(--zd_size39) var(--zd_size10) var(--zd_size25);
244
196
  }
245
-
246
197
  [dir=rtl] .largewithTick {
247
- --listitem_padding: var(--zd_size10) var(--zd_size39) var(--zd_size10) var(--zd_size25);
198
+ --listitem_padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size39);
248
199
  }
249
-
250
200
  .responsiveHeight {
251
201
  --listitem_min_height: var(--zd_size45);
252
202
  font-size: var(--zd_font_size15) ;
253
203
  padding-top: var(--zd_size10) ;
254
204
  padding-bottom: var(--zd_size10) ;
255
205
  }
256
-
257
- .autoHeight {
258
- height: auto ;
259
- }
260
-
261
- .tickIconCenter {
262
- top: 50% ;
263
- transform: translateY(-50%);
264
- }
265
-
266
- .txtAlignBaseLine {
267
- align-items: baseline;
268
- }
269
-
270
- .alignSelfTop {
271
- align-self: start;
272
- }
@@ -105,7 +105,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
105
105
  autoHover: autoHover,
106
106
  needTick: needTick,
107
107
  needBorder: needBorder,
108
- customClass: `${needMultiLineText ? style.autoHeight : ''} ${customListItem}`,
108
+ customClass: customListItem,
109
109
  dataId: `${dataIdString}_ListItemWithAvatar`,
110
110
  dataSelectorId: `${dataSelectorId}`,
111
111
  onClick: this.handleClick,
@@ -116,7 +116,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
116
116
  customProps: ListItemProps,
117
117
  ...ContainerProps
118
118
  }, name || imgSrc ? /*#__PURE__*/React.createElement(Box, {
119
- className: `${needMultiLineText ? style.alignSelfTop : ''} ${style.leftAvatar}`
119
+ className: style.leftAvatar
120
120
  }, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
121
121
  name: name,
122
122
  size: "small",
@@ -143,7 +143,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
143
143
  "data-title": isDisabled ? null : title,
144
144
  className: needMultiLineText ? style.multiLineValue : style.value
145
145
  }, value) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
146
- className: `${style.tickIcon} ${needMultiLineText ? style.tickIconCenter : ''}`,
146
+ className: style.tickIcon,
147
147
  "aria-hidden": ariaHidden,
148
148
  dataId: `${dataIdString}_tickIcon`,
149
149
  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: `${needMultiLineText ? style.autoHeight : ''} ${needMultiLineText && iconClass && !iconName ? style.txtAlignBaseLine : ''} ${customClass}`,
98
+ customClass: 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} ${needMultiLineText ? style.tickIconCenter : ''}`,
128
+ className: style.tickIcon,
129
129
  "aria-hidden": ariaHidden,
130
130
  dataId: `${dataIdString}_tickIcon`,
131
131
  dataSelectorId: `${dataSelectorId}_tickIcon`
@@ -875,12 +875,8 @@ class AdvancedGroupMultiSelect extends React.Component {
875
875
  palette,
876
876
  needEffect,
877
877
  autoComplete,
878
- getTargetRef,
879
- customProps
878
+ getTargetRef
880
879
  } = this.props;
881
- const {
882
- suggestionsProps
883
- } = customProps;
884
880
  let {
885
881
  clearText = 'Clear all'
886
882
  } = i18nKeys;
@@ -1059,8 +1055,7 @@ class AdvancedGroupMultiSelect extends React.Component {
1059
1055
  a11y: {
1060
1056
  role: 'option'
1061
1057
  },
1062
- dataId: `${dataId}_Options`,
1063
- ...suggestionsProps
1058
+ dataId: `${dataId}_Options`
1064
1059
  }));
1065
1060
  }) : /*#__PURE__*/React.createElement(EmptyState, {
1066
1061
  options: revampedGroups,
@@ -549,8 +549,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
549
549
  role: 'option'
550
550
  },
551
551
  dataId: `${dataIdMultiSelectComp}_Options`,
552
- ...SuggestionsProps,
553
- needMultiLineText: true
552
+ ...SuggestionsProps
554
553
  }) : /*#__PURE__*/React.createElement(EmptyState, {
555
554
  isLoading: isFetchingOptions,
556
555
  options: options,