@zohodesk/components 1.2.41 → 1.2.43

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 (76) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +17 -0
  3. package/es/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +1 -1
  4. package/es/DateTime/__tests__/__snapshots__/DateTimePopupHeader.spec.js.snap +1 -1
  5. package/es/DateTime/__tests__/__snapshots__/YearView.spec.js.snap +1 -1
  6. package/es/Heading/Heading.js +5 -2
  7. package/es/Heading/__tests__/Heading.spec.js +9 -0
  8. package/es/Heading/__tests__/__snapshots__/Heading.spec.js.snap +55 -1
  9. package/es/Heading/props/propTypes.js +2 -1
  10. package/es/MultiSelect/AdvancedGroupMultiSelect.js +12 -2
  11. package/es/MultiSelect/AdvancedMultiSelect.js +9 -1
  12. package/es/MultiSelect/MultiSelect.js +8 -0
  13. package/es/MultiSelect/MultiSelectWithAvatar.js +8 -0
  14. package/es/MultiSelect/props/defaultProps.js +9 -1
  15. package/es/MultiSelect/props/propTypes.js +8 -0
  16. package/es/Select/GroupSelect.js +8 -0
  17. package/es/Select/SelectWithAvatar.js +11 -2
  18. package/es/Select/SelectWithIcon.js +8 -0
  19. package/es/Select/props/defaultProps.js +6 -0
  20. package/es/Select/props/propTypes.js +10 -2
  21. package/es/Tooltip/Tooltip.js +13 -3
  22. package/es/Tooltip/Tooltip.module.css +0 -8
  23. package/es/common/common.module.css +24 -0
  24. package/es/utils/cssUtils.js +11 -0
  25. package/es/v1/Heading/Heading.js +5 -2
  26. package/es/v1/Heading/props/propTypes.js +2 -1
  27. package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +8 -2
  28. package/es/v1/MultiSelect/AdvancedMultiSelect.js +9 -1
  29. package/es/v1/MultiSelect/MultiSelect.js +8 -0
  30. package/es/v1/MultiSelect/MultiSelectWithAvatar.js +8 -0
  31. package/es/v1/MultiSelect/props/defaultProps.js +9 -1
  32. package/es/v1/MultiSelect/props/propTypes.js +8 -0
  33. package/es/v1/Select/GroupSelect.js +8 -0
  34. package/es/v1/Select/SelectWithAvatar.js +11 -2
  35. package/es/v1/Select/SelectWithIcon.js +8 -0
  36. package/es/v1/Select/props/defaultProps.js +6 -0
  37. package/es/v1/Select/props/propTypes.js +9 -1
  38. package/es/v1/Tooltip/Tooltip.js +13 -3
  39. package/lib/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +1 -1
  40. package/lib/DateTime/__tests__/__snapshots__/DateTimePopupHeader.spec.js.snap +1 -1
  41. package/lib/DateTime/__tests__/__snapshots__/YearView.spec.js.snap +1 -1
  42. package/lib/Heading/Heading.js +7 -3
  43. package/lib/Heading/__tests__/Heading.spec.js +9 -0
  44. package/lib/Heading/__tests__/__snapshots__/Heading.spec.js.snap +55 -1
  45. package/lib/Heading/props/propTypes.js +2 -1
  46. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +12 -2
  47. package/lib/MultiSelect/AdvancedMultiSelect.js +10 -2
  48. package/lib/MultiSelect/MultiSelect.js +8 -0
  49. package/lib/MultiSelect/MultiSelectWithAvatar.js +8 -0
  50. package/lib/MultiSelect/props/defaultProps.js +9 -1
  51. package/lib/MultiSelect/props/propTypes.js +8 -0
  52. package/lib/Select/GroupSelect.js +8 -0
  53. package/lib/Select/SelectWithAvatar.js +11 -2
  54. package/lib/Select/SelectWithIcon.js +8 -0
  55. package/lib/Select/props/defaultProps.js +5 -1
  56. package/lib/Select/props/propTypes.js +10 -2
  57. package/lib/Tooltip/Tooltip.js +15 -4
  58. package/lib/Tooltip/Tooltip.module.css +0 -8
  59. package/lib/common/common.module.css +24 -0
  60. package/lib/utils/cssUtils.js +22 -0
  61. package/lib/v1/Heading/Heading.js +7 -3
  62. package/lib/v1/Heading/props/propTypes.js +2 -1
  63. package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +8 -2
  64. package/lib/v1/MultiSelect/AdvancedMultiSelect.js +10 -2
  65. package/lib/v1/MultiSelect/MultiSelect.js +8 -0
  66. package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +8 -0
  67. package/lib/v1/MultiSelect/props/defaultProps.js +9 -1
  68. package/lib/v1/MultiSelect/props/propTypes.js +8 -0
  69. package/lib/v1/Select/GroupSelect.js +8 -0
  70. package/lib/v1/Select/SelectWithAvatar.js +11 -2
  71. package/lib/v1/Select/SelectWithIcon.js +8 -0
  72. package/lib/v1/Select/props/defaultProps.js +5 -1
  73. package/lib/v1/Select/props/propTypes.js +9 -1
  74. package/lib/v1/Tooltip/Tooltip.js +15 -4
  75. package/package.json +6 -6
  76. package/result.json +1 -1
package/README.md CHANGED
@@ -32,6 +32,23 @@ In this Package, we Provide Some Basic Components to Build Web App
32
32
  - TextBoxIcon
33
33
  - Tooltip
34
34
 
35
+ # 1.2.43
36
+
37
+ - **AdvancedMultiSelect, MultiSelect, MultiSelectWithAvatar, GroupSelect, SelectWithIcon** - Fixed position support added.
38
+
39
+ - **SelectWithAvatar, AdvancedGroupMultiSelect** - Fixed position support added and getTargetRef issue fixed.
40
+
41
+ - **Tooltip** - Fixed white space attribute value from preWrap to pre-wrap.
42
+
43
+ # 1.2.42
44
+
45
+ - **Heading (v0&v1)** -
46
+ - whiteSpace prop added
47
+
48
+ - **Tooltip (v0&v1)** -
49
+ - whiteSpace prop added
50
+ - `data-title-wrap` now accepts whitespace CSS values instead of a boolean, allowing the tooltip to support all whitespace options. Default value is `normal`.
51
+
35
52
  # 1.2.41
36
53
 
37
54
  - **Tabs**
@@ -27,7 +27,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
27
27
  data-test-id="selectYear"
28
28
  >
29
29
  <h2
30
- class="reset thMonYear"
30
+ class="reset thMonYear"
31
31
  data-title="July 2023"
32
32
  tabindex="0"
33
33
  >
@@ -15,7 +15,7 @@ exports[`DateTimePopupHeader rendering the defult props 1`] = `
15
15
  data-test-id="selectYear"
16
16
  >
17
17
  <h2
18
- class="reset thMonYear"
18
+ class="reset thMonYear"
19
19
  tabindex="0"
20
20
  />
21
21
  <span>
@@ -35,7 +35,7 @@ exports[`YearView rendering the defult props 1`] = `
35
35
  data-test-id="boxComponent"
36
36
  >
37
37
  <h4
38
- class="reset yearText"
38
+ class="reset yearText"
39
39
  data-title="1850"
40
40
  tabindex="0"
41
41
  >
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { defaultProps } from './props/defaultProps';
3
3
  import { propTypes } from './props/propTypes';
4
+ import { whiteSpaceClassMapping } from '../utils/cssUtils';
4
5
  import style from './Heading.module.css';
5
6
  export default class Heading extends React.Component {
6
7
  render() {
@@ -12,15 +13,17 @@ export default class Heading extends React.Component {
12
13
  title,
13
14
  dataTitle,
14
15
  dataId,
15
- a11y
16
+ a11y,
17
+ whiteSpace
16
18
  } = this.props;
17
19
  return /*#__PURE__*/React.createElement(tagName, {
18
- className: `${style.reset} ${className}`,
20
+ className: `${style.reset} ${whiteSpace ? whiteSpaceClassMapping[whiteSpace] : ''} ${className}`,
19
21
  onClick,
20
22
  onDoubleClick,
21
23
  'data-title': dataTitle || title,
22
24
  'data-id': dataId,
23
25
  'data-test-id': dataId,
26
+ 'data-title-wrap': whiteSpace,
24
27
  ...a11y
25
28
  }, title);
26
29
  }
@@ -8,4 +8,13 @@ describe('Heading', () => {
8
8
  } = render( /*#__PURE__*/React.createElement(Heading, null));
9
9
  expect(asFragment()).toMatchSnapshot();
10
10
  });
11
+ const whiteSpace = ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'];
12
+ test.each(whiteSpace)('Should render whiteSpace of Heading - %s', whiteSpace => {
13
+ const {
14
+ asFragment
15
+ } = render( /*#__PURE__*/React.createElement(Heading, {
16
+ whiteSpace: whiteSpace
17
+ }));
18
+ expect(asFragment()).toMatchSnapshot();
19
+ });
11
20
  });
@@ -1,9 +1,63 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`Heading Should render whiteSpace of Heading - break-spaces 1`] = `
4
+ <DocumentFragment>
5
+ <h1
6
+ class="reset whiteSpace_breakSpaces "
7
+ data-title-wrap="break-spaces"
8
+ />
9
+ </DocumentFragment>
10
+ `;
11
+
12
+ exports[`Heading Should render whiteSpace of Heading - normal 1`] = `
13
+ <DocumentFragment>
14
+ <h1
15
+ class="reset whiteSpace_normal "
16
+ data-title-wrap="normal"
17
+ />
18
+ </DocumentFragment>
19
+ `;
20
+
21
+ exports[`Heading Should render whiteSpace of Heading - nowrap 1`] = `
22
+ <DocumentFragment>
23
+ <h1
24
+ class="reset whiteSpace_nowrap "
25
+ data-title-wrap="nowrap"
26
+ />
27
+ </DocumentFragment>
28
+ `;
29
+
30
+ exports[`Heading Should render whiteSpace of Heading - pre 1`] = `
31
+ <DocumentFragment>
32
+ <h1
33
+ class="reset whiteSpace_pre "
34
+ data-title-wrap="pre"
35
+ />
36
+ </DocumentFragment>
37
+ `;
38
+
39
+ exports[`Heading Should render whiteSpace of Heading - pre-line 1`] = `
40
+ <DocumentFragment>
41
+ <h1
42
+ class="reset whiteSpace_preLine "
43
+ data-title-wrap="pre-line"
44
+ />
45
+ </DocumentFragment>
46
+ `;
47
+
48
+ exports[`Heading Should render whiteSpace of Heading - pre-wrap 1`] = `
49
+ <DocumentFragment>
50
+ <h1
51
+ class="reset whiteSpace_preWrap "
52
+ data-title-wrap="pre-wrap"
53
+ />
54
+ </DocumentFragment>
55
+ `;
56
+
3
57
  exports[`Heading rendering the defult props 1`] = `
4
58
  <DocumentFragment>
5
59
  <h1
6
- class="reset "
60
+ class="reset "
7
61
  />
8
62
  </DocumentFragment>
9
63
  `;
@@ -7,5 +7,6 @@ export const propTypes = {
7
7
  dataTitle: PropTypes.string,
8
8
  onClick: PropTypes.func,
9
9
  onDoubleClick: PropTypes.func,
10
- a11y: PropTypes.object
10
+ a11y: PropTypes.object,
11
+ whiteSpace: PropTypes.oneOf(['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'])
11
12
  };
@@ -852,6 +852,10 @@ class AdvancedGroupMultiSelect extends React.Component {
852
852
  dropBoxSize,
853
853
  position,
854
854
  getContainerRef,
855
+ isAbsolutePositioningNeeded,
856
+ positionsOffset,
857
+ targetOffset,
858
+ isRestrictScroll,
855
859
  emptyMessage,
856
860
  searchEmptyMessage,
857
861
  title,
@@ -870,7 +874,8 @@ class AdvancedGroupMultiSelect extends React.Component {
870
874
  a11y,
871
875
  palette,
872
876
  needEffect,
873
- autoComplete
877
+ autoComplete,
878
+ getTargetRef
874
879
  } = this.props;
875
880
  let {
876
881
  clearText = 'Clear all'
@@ -910,7 +915,8 @@ class AdvancedGroupMultiSelect extends React.Component {
910
915
  align: "vertical",
911
916
  alignBox: "row",
912
917
  onClick: this.togglePopup,
913
- className: customClass
918
+ className: customClass,
919
+ eleRef: getTargetRef
914
920
  }, children) : /*#__PURE__*/React.createElement(Container, {
915
921
  align: "vertical",
916
922
  alignBox: "row",
@@ -994,6 +1000,10 @@ class AdvancedGroupMultiSelect extends React.Component {
994
1000
  needResponsive: needResponsive,
995
1001
  isPadding: isPadding,
996
1002
  isBoxPaddingNeed: !needSelectAll,
1003
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
1004
+ positionsOffset: positionsOffset,
1005
+ targetOffset: targetOffset,
1006
+ isRestrictScroll: isRestrictScroll,
997
1007
  htmlId: setAriaId,
998
1008
  a11y: {
999
1009
  role: 'listbox',
@@ -368,7 +368,11 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
368
368
  disabledOptions,
369
369
  isLoading,
370
370
  dataSelectorId,
371
- customClass
371
+ customClass,
372
+ isAbsolutePositioningNeeded,
373
+ positionsOffset,
374
+ targetOffset,
375
+ isRestrictScroll
372
376
  } = this.props;
373
377
  let {
374
378
  SuggestionsProps = {},
@@ -508,6 +512,10 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
508
512
  ariaMultiselectable: true
509
513
  },
510
514
  dataId: `${dataIdMultiSelectComp}_dropbox`,
515
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
516
+ positionsOffset: positionsOffset,
517
+ targetOffset: targetOffset,
518
+ isRestrictScroll: isRestrictScroll,
511
519
  ...DropBoxProps,
512
520
  alignBox: "row",
513
521
  isResponsivePadding: getFooter ? false : true
@@ -992,6 +992,10 @@ export class MultiSelectComponent extends React.Component {
992
992
  borderColor,
993
993
  disableAction,
994
994
  isBoxPaddingNeed,
995
+ isAbsolutePositioningNeeded,
996
+ positionsOffset,
997
+ targetOffset,
998
+ isRestrictScroll,
995
999
  palette,
996
1000
  i18nKeys,
997
1001
  getFooter,
@@ -1039,6 +1043,10 @@ export class MultiSelectComponent extends React.Component {
1039
1043
  needResponsive: needResponsive,
1040
1044
  isPadding: false,
1041
1045
  isBoxPaddingNeed: isBoxPaddingNeed,
1046
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
1047
+ positionsOffset: positionsOffset,
1048
+ targetOffset: targetOffset,
1049
+ isRestrictScroll: isRestrictScroll,
1042
1050
  palette: palette,
1043
1051
  htmlId: setAriaId,
1044
1052
  a11y: {
@@ -68,6 +68,10 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
68
68
  selectAllText,
69
69
  getContainerRef,
70
70
  removeClose,
71
+ isAbsolutePositioningNeeded,
72
+ positionsOffset,
73
+ targetOffset,
74
+ isRestrictScroll,
71
75
  isAnimate,
72
76
  animationStyle,
73
77
  isDisabled,
@@ -124,6 +128,10 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
124
128
  needResponsive: needResponsive,
125
129
  isPadding: false,
126
130
  isBoxPaddingNeed: isBoxPaddingNeed,
131
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
132
+ positionsOffset: positionsOffset,
133
+ targetOffset: targetOffset,
134
+ isRestrictScroll: isRestrictScroll,
127
135
  palette: palette,
128
136
  htmlId: setAriaId,
129
137
  a11y: {
@@ -32,6 +32,8 @@ export const AdvancedGroupMultiSelect_defaultProps = {
32
32
  i18nKeys: {},
33
33
  a11y: {},
34
34
  isSearchClearOnSelect: true,
35
+ isAbsolutePositioningNeeded: true,
36
+ isRestrictScroll: false,
35
37
  needEffect: true,
36
38
  palette: 'default',
37
39
  isLoading: false,
@@ -67,7 +69,9 @@ export const AdvancedMultiSelect_defaultProps = {
67
69
  needEffect: true,
68
70
  isLoading: false,
69
71
  dataSelectorId: 'advancedMultiSelect',
70
- customClass: {}
72
+ customClass: {},
73
+ isAbsolutePositioningNeeded: true,
74
+ isRestrictScroll: false
71
75
  };
72
76
  export const EmptyState_defaultProps = {
73
77
  dataId: 'empty',
@@ -104,6 +108,8 @@ export const MultiSelect_defaultProps = {
104
108
  textBoxClass: '',
105
109
  palette: 'default',
106
110
  isSearchClearOnSelect: true,
111
+ isAbsolutePositioningNeeded: true,
112
+ isRestrictScroll: false,
107
113
  needEffect: true,
108
114
  boxSize: 'default',
109
115
  isLoading: false,
@@ -142,6 +148,8 @@ export const MultiSelectWithAvatar_defaultProps = {
142
148
  palette: 'default',
143
149
  isBoxPaddingNeed: true,
144
150
  isSearchClearOnSelect: true,
151
+ isAbsolutePositioningNeeded: true,
152
+ isRestrictScroll: false,
145
153
  needEffect: true,
146
154
  isLoading: false,
147
155
  dataSelectorId: 'multiSelectWithAvatar',
@@ -98,6 +98,10 @@ export const MultiSelect_propTypes = {
98
98
  getFooter: PropTypes.func,
99
99
  needEffect: PropTypes.bool,
100
100
  boxSize: PropTypes.string,
101
+ isAbsolutePositioningNeeded: PropTypes.bool,
102
+ isRestrictScroll: PropTypes.bool,
103
+ positionsOffset: PropTypes.object,
104
+ targetOffset: PropTypes.object,
101
105
  isLoading: PropTypes.bool,
102
106
  dataSelectorId: PropTypes.string,
103
107
  keepSelectedOptions: PropTypes.bool,
@@ -230,6 +234,10 @@ export const AdvancedGroupMultiSelect_propTypes = {
230
234
  textField: PropTypes.string,
231
235
  getTargetRef: PropTypes.func,
232
236
  togglePopup: PropTypes.func,
237
+ isAbsolutePositioningNeeded: PropTypes.bool,
238
+ isRestrictScroll: PropTypes.bool,
239
+ positionsOffset: PropTypes.object,
240
+ targetOffset: PropTypes.object,
233
241
  needLocalSearch: PropTypes.bool,
234
242
  isNextOptions: PropTypes.bool,
235
243
  getNextOptions: PropTypes.func,
@@ -576,6 +576,10 @@ export class GroupSelectComponent extends PureComponent {
576
576
  getContainerRef,
577
577
  isPopupReady,
578
578
  removeClose,
579
+ isAbsolutePositioningNeeded,
580
+ positionsOffset,
581
+ targetOffset,
582
+ isRestrictScroll,
579
583
  borderColor,
580
584
  needTick,
581
585
  children,
@@ -705,6 +709,10 @@ export class GroupSelectComponent extends PureComponent {
705
709
  onClick: removeClose,
706
710
  needResponsive: needResponsive,
707
711
  isPadding: false,
712
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
713
+ positionsOffset: positionsOffset,
714
+ targetOffset: targetOffset,
715
+ isRestrictScroll: isRestrictScroll,
708
716
  isResponsivePadding: getFooter ? false : true,
709
717
  alignBox: "row",
710
718
  dataId: `${dataId}_suggestionBox`
@@ -133,6 +133,10 @@ class SelectWithAvatarComponent extends SelectComponent {
133
133
  isPopupOpen,
134
134
  removeClose,
135
135
  isPopupReady,
136
+ isAbsolutePositioningNeeded,
137
+ positionsOffset,
138
+ targetOffset,
139
+ isRestrictScroll,
136
140
  animationStyle,
137
141
  textBoxSize,
138
142
  textBoxVariant,
@@ -158,7 +162,8 @@ class SelectWithAvatarComponent extends SelectComponent {
158
162
  htmlId,
159
163
  needEffect,
160
164
  isLoading,
161
- dataSelectorId
165
+ dataSelectorId,
166
+ getTargetRef
162
167
  } = this.props;
163
168
  i18nKeys = Object.assign({}, i18nKeys, {
164
169
  emptyText: i18nKeys.emptyText || emptyMessage,
@@ -190,7 +195,7 @@ class SelectWithAvatarComponent extends SelectComponent {
190
195
  align: "vertical",
191
196
  alignBox: "row",
192
197
  className: `${style.container} ${style[size]} ${style[`borderColor_${borderColor}`]} ${isActive && needBorder ? style.active : ''} ${textBoxClass ? textBoxClass : ''} ${needBorder ? style.hasBorder : ''}`,
193
- eleRef: this.getTargetRef,
198
+ eleRef: getTargetRef,
194
199
  onClick: !isDisabled && this.togglePopup
195
200
  }, selectedId ? /*#__PURE__*/React.createElement(Box, {
196
201
  className: style.tag,
@@ -256,6 +261,10 @@ class SelectWithAvatarComponent extends SelectComponent {
256
261
  isArrow: false,
257
262
  onClick: removeClose,
258
263
  needResponsive: needResponsive,
264
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
265
+ positionsOffset: positionsOffset,
266
+ targetOffset: targetOffset,
267
+ isRestrictScroll: isRestrictScroll,
259
268
  isPadding: false,
260
269
  isResponsivePadding: true,
261
270
  alignBox: "row",
@@ -323,6 +323,10 @@ class SelectWithIcon extends Component {
323
323
  isPopupReady,
324
324
  position,
325
325
  getContainerRef,
326
+ isAbsolutePositioningNeeded,
327
+ positionsOffset,
328
+ targetOffset,
329
+ isRestrictScroll,
326
330
  valueKey,
327
331
  idKey,
328
332
  needListBorder,
@@ -453,6 +457,10 @@ class SelectWithIcon extends Component {
453
457
  onClick: removeClose,
454
458
  getRef: getContainerRef,
455
459
  needResponsive: needResponsive,
460
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
461
+ positionsOffset: positionsOffset,
462
+ targetOffset: targetOffset,
463
+ isRestrictScroll: isRestrictScroll,
456
464
  dataId: `${dataId}_suggestions`,
457
465
  size: boxSize,
458
466
  isPadding: false,
@@ -65,6 +65,8 @@ export const GroupSelect_defaultProps = {
65
65
  needTick: true,
66
66
  needLocalSearch: true,
67
67
  isSearchClearOnClose: true,
68
+ isAbsolutePositioningNeeded: true,
69
+ isRestrictScroll: false,
68
70
  i18nKeys: {},
69
71
  iconOnHover: false,
70
72
  isLoading: false
@@ -89,6 +91,8 @@ export const SelectWithAvatar_defaultProps = {
89
91
  dataSelectorId: 'selectWithAvatar',
90
92
  borderColor: 'default',
91
93
  isSearchClearOnClose: true,
94
+ isAbsolutePositioningNeeded: true,
95
+ isRestrictScroll: false,
92
96
  i18nKeys: {},
93
97
  needEffect: true,
94
98
  isLoading: false
@@ -117,5 +121,7 @@ export const SelectWithIcon_defaultProps = {
117
121
  iconSize: '14',
118
122
  i18nKeys: {},
119
123
  isLoading: false,
124
+ isAbsolutePositioningNeeded: true,
125
+ isRestrictScroll: false,
120
126
  customProps: {}
121
127
  };
@@ -90,8 +90,8 @@ export const Select_propTypes = {
90
90
  isAbsolutePositioningNeeded: PropTypes.bool,
91
91
  openPopupOnly: PropTypes.bool,
92
92
  ariaLabelledby: PropTypes.string,
93
- positionsOffset: PropTypes.array,
94
- targetOffset: PropTypes.array,
93
+ positionsOffset: PropTypes.object,
94
+ targetOffset: PropTypes.object,
95
95
  isRestrictScroll: PropTypes.bool,
96
96
  dropBoxPortalId: PropTypes.string
97
97
  };
@@ -162,6 +162,10 @@ export const GroupSelect_propTypes = {
162
162
  closePopupOnly: PropTypes.func,
163
163
  position: PropTypes.string,
164
164
  removeClose: PropTypes.func,
165
+ isAbsolutePositioningNeeded: PropTypes.bool,
166
+ isRestrictScroll: PropTypes.bool,
167
+ positionsOffset: PropTypes.object,
168
+ targetOffset: PropTypes.object,
165
169
  i18nKeys: PropTypes.shape({
166
170
  loadingText: PropTypes.string,
167
171
  emptyText: PropTypes.string,
@@ -286,6 +290,10 @@ export const SelectWithIcon_propTypes = {
286
290
  needResponsive: PropTypes.bool,
287
291
  boxSize: PropTypes.string,
288
292
  emptyMessage: PropTypes.string,
293
+ isAbsolutePositioningNeeded: PropTypes.bool,
294
+ isRestrictScroll: PropTypes.bool,
295
+ positionsOffset: PropTypes.object,
296
+ targetOffset: PropTypes.object,
289
297
  customProps: PropTypes.shape({
290
298
  TextBoxProps: PropTypes.object,
291
299
  DropdownSearchTextBoxProps: PropTypes.object,
@@ -2,9 +2,10 @@ import React from 'react';
2
2
  import { defaultProps } from './props/defaultProps';
3
3
  import { propTypes } from './props/propTypes';
4
4
  import { getLibraryConfig } from '../Provider/Config';
5
- import style from './Tooltip.module.css';
6
5
  import ResizeObserver from '../Responsive/ResizeObserver';
7
6
  import selectn from 'selectn';
7
+ import { whiteSpaceClassMapping } from '../utils/cssUtils';
8
+ import style from './Tooltip.module.css';
8
9
  export default class Tooltip extends React.Component {
9
10
  constructor(props) {
10
11
  super(props);
@@ -192,7 +193,8 @@ export default class Tooltip extends React.Component {
192
193
 
193
194
  let isHtml = titleDiv.getAttribute('data-ishtml');
194
195
  let dataTooltipnoArrow = titleDiv.getAttribute('data-tooltip-noarrow') === 'true' ? true : false;
195
- let dataTooltipWrap = titleDiv.getAttribute('data-title-wrap') === 'true' ? true : false;
196
+ let dataTooltipWrap = titleDiv.getAttribute('data-title-wrap') || 'normal'; // values: normal, pre, pre-wrap, pre-line, nowrap, break-spaces
197
+
196
198
  let clientRect = titleDiv.getBoundingClientRect();
197
199
  let boxLayout = this.getClientRectOfContEl(containerElement);
198
200
  this.setState({
@@ -481,7 +483,15 @@ export default class Tooltip extends React.Component {
481
483
  } = this.props;
482
484
  let arrowStyle = isArrowHorizontal ? isArrowRight ? style.arrowRight : style.arrowLeft : isArrowDown ? style.arrowDown : style.arrowUp;
483
485
  title = title ? title.trim() : null;
484
- let tooltipCss = `${style.tooltipcont} ${dataTooltipWrap ? style.tooltipWrapCont : style.tooltipNormalCont}`;
486
+ let tooltipWhiteSpaceModification = dataTooltipWrap;
487
+
488
+ if (dataTooltipWrap == 'pre') {
489
+ tooltipWhiteSpaceModification = 'pre-wrap';
490
+ } else if (dataTooltipWrap == 'nowrap') {
491
+ tooltipWhiteSpaceModification = 'normal';
492
+ }
493
+
494
+ let tooltipCss = `${style.tooltipcont} ${whiteSpaceClassMapping[tooltipWhiteSpaceModification]}`;
485
495
  return title ? /*#__PURE__*/React.createElement("div", {
486
496
  className: `${customClass} ${style.tooltiptext}`,
487
497
  style: {
@@ -26,14 +26,6 @@
26
26
  border-color: transparent;
27
27
  border-radius: var(--zd_size4);
28
28
  }
29
-
30
- .tooltipWrapCont {
31
- white-space: pre-wrap;
32
- }
33
-
34
- .tooltipNormalCont {
35
- white-space: normal;
36
- }
37
29
  .tooltiparrow {
38
30
  content: '';
39
31
  position: absolute;
@@ -522,4 +522,28 @@
522
522
  .fitContHeight {
523
523
  height: fit-content ;
524
524
  height: -moz-fit-content ;
525
+ }
526
+
527
+ .whiteSpace_normal {
528
+ white-space: normal;
529
+ }
530
+
531
+ .whiteSpace_nowrap {
532
+ white-space: nowrap;
533
+ }
534
+
535
+ .whiteSpace_pre {
536
+ white-space: pre;
537
+ }
538
+
539
+ .whiteSpace_preLine {
540
+ white-space: pre-line;
541
+ }
542
+
543
+ .whiteSpace_preWrap {
544
+ white-space: pre-wrap;
545
+ }
546
+
547
+ .whiteSpace_breakSpaces {
548
+ white-space: break-spaces
525
549
  }
@@ -0,0 +1,11 @@
1
+ import commonStyle from '../common/common.module.css';
2
+ export const whiteSpaceClassMapping = {
3
+ // eslint-disable-next-line dot-notation
4
+ 'normal': commonStyle.whiteSpace_normal,
5
+ 'pre': commonStyle.whiteSpace_pre,
6
+ 'pre-wrap': commonStyle.whiteSpace_preWrap,
7
+ 'pre-line': commonStyle.whiteSpace_preLine,
8
+ // eslint-disable-next-line dot-notation
9
+ 'nowrap': commonStyle.whiteSpace_nowrap,
10
+ 'break-spaces': commonStyle.whiteSpace_breakSpaces
11
+ };
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { defaultProps } from './props/defaultProps';
3
3
  import { propTypes } from './props/propTypes';
4
+ import { whiteSpaceClassMapping } from '../../utils/cssUtils';
4
5
  import style from '../../Heading/Heading.module.css';
5
6
  export default function Heading(props) {
6
7
  let {
@@ -11,15 +12,17 @@ export default function Heading(props) {
11
12
  title,
12
13
  dataTitle,
13
14
  dataId,
14
- a11y
15
+ a11y,
16
+ whiteSpace
15
17
  } = props;
16
18
  return /*#__PURE__*/React.createElement(tagName, {
17
- className: `${style.reset} ${className}`,
19
+ className: `${style.reset} ${whiteSpace ? whiteSpaceClassMapping[whiteSpace] : ''} ${className}`,
18
20
  onClick,
19
21
  onDoubleClick,
20
22
  'data-title': dataTitle || title,
21
23
  'data-id': dataId,
22
24
  'data-test-id': dataId,
25
+ 'data-title-wrap': whiteSpace,
23
26
  ...a11y
24
27
  }, title);
25
28
  }
@@ -7,5 +7,6 @@ export const propTypes = {
7
7
  dataTitle: PropTypes.string,
8
8
  onClick: PropTypes.func,
9
9
  onDoubleClick: PropTypes.func,
10
- a11y: PropTypes.object
10
+ a11y: PropTypes.object,
11
+ whiteSpace: PropTypes.oneOf(['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'])
11
12
  };
@@ -853,6 +853,10 @@ class AdvancedGroupMultiSelect extends React.Component {
853
853
  dropBoxSize,
854
854
  position,
855
855
  getContainerRef,
856
+ isAbsolutePositioningNeeded,
857
+ positionsOffset,
858
+ targetOffset,
859
+ isRestrictScroll,
856
860
  emptyMessage,
857
861
  searchEmptyMessage,
858
862
  title,
@@ -871,7 +875,8 @@ class AdvancedGroupMultiSelect extends React.Component {
871
875
  a11y,
872
876
  palette,
873
877
  needEffect,
874
- autoComplete
878
+ autoComplete,
879
+ getTargetRef
875
880
  } = this.props;
876
881
  let {
877
882
  clearText = 'Clear all'
@@ -911,7 +916,8 @@ class AdvancedGroupMultiSelect extends React.Component {
911
916
  align: "vertical",
912
917
  alignBox: "row",
913
918
  onClick: this.togglePopup,
914
- className: customClass
919
+ className: customClass,
920
+ eleRef: getTargetRef
915
921
  }, children) : /*#__PURE__*/React.createElement(Container, {
916
922
  align: "vertical",
917
923
  alignBox: "row",