@zohodesk/components 1.6.27 → 1.6.29

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 (142) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/es/Avatar/Avatar.module.css +5 -11
  3. package/es/AvatarTeam/AvatarTeam.module.css +1 -3
  4. package/es/Button/css/Button.module.css +7 -9
  5. package/es/Card/Card.module.css +2 -2
  6. package/es/CheckBox/CheckBox.module.css +2 -4
  7. package/es/DateTime/DateTime.module.css +13 -20
  8. package/es/DateTime/DateWidget.module.css +7 -5
  9. package/es/DateTime/YearView.module.css +6 -9
  10. package/es/DividerLine/DividerLine.js +40 -0
  11. package/es/DividerLine/__tests__/DividerLine.spec.js +81 -0
  12. package/es/DividerLine/__tests__/__snapshots__/DividerLine.spec.js.snap +131 -0
  13. package/es/DividerLine/constants/index.js +29 -0
  14. package/es/DividerLine/css/DividerLine.module.css +52 -0
  15. package/es/DividerLine/css/cssJSLogic.js +1 -0
  16. package/es/DividerLine/css/dividerLine.cva.js +42 -0
  17. package/es/DividerLine/props/defaultProps.js +11 -0
  18. package/es/DividerLine/props/propTypes.js +19 -0
  19. package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +6 -7
  20. package/es/DropBox/css/DropBox.module.css +3 -3
  21. package/es/DropDown/DropDownHeading.module.css +1 -1
  22. package/es/DropDown/DropDownItem.module.css +3 -7
  23. package/es/DropDown/DropDownSeparator.js +9 -4
  24. package/es/DropDown/DropDownSeparator.module.css +0 -4
  25. package/es/DropDown/__tests__/DropDownSeparator.spec.js +8 -0
  26. package/es/DropDown/__tests__/__snapshots__/DropDownSeparator.spec.js.snap +12 -2
  27. package/es/Label/Label.module.css +3 -3
  28. package/es/ListItem/ListItem.module.css +9 -12
  29. package/es/MultiSelect/AdvancedGroupMultiSelect.js +1 -0
  30. package/es/MultiSelect/AdvancedMultiSelect.js +1 -0
  31. package/es/MultiSelect/MobileHeader/MobileHeader.module.css +1 -1
  32. package/es/MultiSelect/MultiSelect.module.css +13 -20
  33. package/es/MultiSelect/SelectedOptions.js +3 -3
  34. package/es/MultiSelect/SelectedOptions.module.css +1 -1
  35. package/es/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +42 -0
  36. package/es/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +10 -0
  37. package/es/MultiSelect/__tests__/MultiSelect.spec.js +10 -0
  38. package/es/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +121 -0
  39. package/es/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +97 -0
  40. package/es/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +157 -0
  41. package/es/PopOver/PopOver.module.css +2 -2
  42. package/es/Radio/Radio.module.css +7 -7
  43. package/es/Ribbon/Ribbon.module.css +12 -19
  44. package/es/RippleEffect/RippleEffect.module.css +2 -2
  45. package/es/Select/Select.module.css +4 -4
  46. package/es/Select/SelectWithAvatar.js +14 -3
  47. package/es/Select/SelectWithIcon.js +23 -1
  48. package/es/Select/__tests__/SelectWithAvatar.spec.js +17 -0
  49. package/es/Select/__tests__/SelectWithIcon.spec.js +18 -0
  50. package/es/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +47 -0
  51. package/es/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +19 -0
  52. package/es/Select/props/propTypes.js +1 -0
  53. package/es/Switch/Switch.module.css +4 -7
  54. package/es/Tab/Tab.module.css +5 -7
  55. package/es/Tab/TabContent.module.css +1 -1
  56. package/es/Tab/Tabs.module.css +8 -9
  57. package/es/Tag/Tag.module.css +4 -7
  58. package/es/TextBoxIcon/TextBoxIcon.module.css +1 -1
  59. package/es/Textarea/Textarea.module.css +3 -4
  60. package/es/Tooltip/Tooltip.js +4 -1
  61. package/es/Tooltip/Tooltip.module.css +2 -5
  62. package/es/Typography/css/Typography.module.css +24 -32
  63. package/es/common/animation.module.css +8 -8
  64. package/es/common/common.module.css +79 -147
  65. package/es/semantic/Button/semanticButton.module.css +1 -4
  66. package/es/shared/InputFieldLine/InputFieldLine.module.css +1 -1
  67. package/es/v1/Button/css/Button_v1.module.css +2 -2
  68. package/es/v1/Label/css/Label_v1.module.css +1 -1
  69. package/es/v1/Switch/css/Switch_v1.module.css +4 -7
  70. package/es/v1/shared/Spinner/Spinner_v1.module.css +3 -5
  71. package/es/v1/shared/SuccessTick/SuccessTick_v1.module.css +1 -2
  72. package/lib/Avatar/Avatar.module.css +5 -11
  73. package/lib/AvatarTeam/AvatarTeam.module.css +1 -3
  74. package/lib/Button/css/Button.module.css +7 -9
  75. package/lib/Card/Card.module.css +2 -2
  76. package/lib/CheckBox/CheckBox.module.css +2 -4
  77. package/lib/DateTime/DateTime.module.css +13 -20
  78. package/lib/DateTime/DateWidget.module.css +7 -5
  79. package/lib/DateTime/YearView.module.css +6 -9
  80. package/lib/DividerLine/DividerLine.js +50 -0
  81. package/lib/DividerLine/__tests__/DividerLine.spec.js +88 -0
  82. package/lib/DividerLine/__tests__/__snapshots__/DividerLine.spec.js.snap +131 -0
  83. package/lib/DividerLine/constants/index.js +39 -0
  84. package/lib/DividerLine/css/DividerLine.module.css +52 -0
  85. package/lib/DividerLine/css/cssJSLogic.js +13 -0
  86. package/lib/DividerLine/css/dividerLine.cva.js +57 -0
  87. package/lib/DividerLine/props/defaultProps.js +21 -0
  88. package/lib/DividerLine/props/propTypes.js +31 -0
  89. package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +6 -7
  90. package/lib/DropBox/css/DropBox.module.css +3 -3
  91. package/lib/DropDown/DropDownHeading.module.css +1 -1
  92. package/lib/DropDown/DropDownItem.module.css +3 -7
  93. package/lib/DropDown/DropDownSeparator.js +9 -4
  94. package/lib/DropDown/DropDownSeparator.module.css +0 -4
  95. package/lib/DropDown/__tests__/DropDownSeparator.spec.js +8 -0
  96. package/lib/DropDown/__tests__/__snapshots__/DropDownSeparator.spec.js.snap +12 -2
  97. package/lib/Label/Label.module.css +3 -3
  98. package/lib/ListItem/ListItem.module.css +9 -12
  99. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +1 -0
  100. package/lib/MultiSelect/AdvancedMultiSelect.js +1 -0
  101. package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +1 -1
  102. package/lib/MultiSelect/MultiSelect.module.css +13 -20
  103. package/lib/MultiSelect/SelectedOptions.js +3 -3
  104. package/lib/MultiSelect/SelectedOptions.module.css +1 -1
  105. package/lib/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +42 -0
  106. package/lib/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +10 -0
  107. package/lib/MultiSelect/__tests__/MultiSelect.spec.js +10 -0
  108. package/lib/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +121 -0
  109. package/lib/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +97 -0
  110. package/lib/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +157 -0
  111. package/lib/PopOver/PopOver.module.css +2 -2
  112. package/lib/Radio/Radio.module.css +7 -7
  113. package/lib/Ribbon/Ribbon.module.css +12 -19
  114. package/lib/RippleEffect/RippleEffect.module.css +2 -2
  115. package/lib/Select/Select.module.css +4 -4
  116. package/lib/Select/SelectWithAvatar.js +15 -3
  117. package/lib/Select/SelectWithIcon.js +26 -1
  118. package/lib/Select/__tests__/SelectWithAvatar.spec.js +20 -0
  119. package/lib/Select/__tests__/SelectWithIcon.spec.js +21 -0
  120. package/lib/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +47 -0
  121. package/lib/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +19 -0
  122. package/lib/Select/props/propTypes.js +1 -0
  123. package/lib/Switch/Switch.module.css +4 -7
  124. package/lib/Tab/Tab.module.css +5 -7
  125. package/lib/Tab/TabContent.module.css +1 -1
  126. package/lib/Tab/Tabs.module.css +8 -9
  127. package/lib/Tag/Tag.module.css +4 -7
  128. package/lib/TextBoxIcon/TextBoxIcon.module.css +1 -1
  129. package/lib/Textarea/Textarea.module.css +3 -4
  130. package/lib/Tooltip/Tooltip.js +6 -1
  131. package/lib/Tooltip/Tooltip.module.css +2 -5
  132. package/lib/Typography/css/Typography.module.css +24 -32
  133. package/lib/common/animation.module.css +8 -8
  134. package/lib/common/common.module.css +79 -147
  135. package/lib/semantic/Button/semanticButton.module.css +1 -4
  136. package/lib/shared/InputFieldLine/InputFieldLine.module.css +1 -1
  137. package/lib/v1/Button/css/Button_v1.module.css +2 -2
  138. package/lib/v1/Label/css/Label_v1.module.css +1 -1
  139. package/lib/v1/Switch/css/Switch_v1.module.css +4 -7
  140. package/lib/v1/shared/Spinner/Spinner_v1.module.css +3 -5
  141. package/lib/v1/shared/SuccessTick/SuccessTick_v1.module.css +1 -2
  142. package/package.json +10 -10
@@ -0,0 +1,52 @@
1
+ .wrapper {
2
+ flex-shrink: 0;
3
+ border: none;
4
+ margin: 0 ;
5
+ }
6
+
7
+ .horizontal {
8
+ inline-size: 100% ;
9
+ block-size: 0 ;
10
+ border-block-start-width: 1px;
11
+ }
12
+
13
+ .vertical {
14
+ inline-size: 0 ;
15
+ block-size: 100% ;
16
+ border-inline-start-width: 1px;
17
+ }
18
+
19
+ .solid {
20
+ border-block-start-style: solid;
21
+ border-inline-start-style: solid;
22
+ }
23
+
24
+ .dashed {
25
+ border-block-start-style: dashed;
26
+ border-inline-start-style: dashed;
27
+ }
28
+
29
+ .dotted {
30
+ border-block-start-style: dotted;
31
+ border-inline-start-style: dotted;
32
+ }
33
+
34
+ .colorDefault {
35
+ border-block-start-color: var(--zd-border-primary);
36
+ border-inline-start-color: var(--zd-border-primary);
37
+ }
38
+
39
+ .colorSecondary {
40
+ border-block-start-color: var(--zd-border-secondary);
41
+ border-inline-start-color: var(--zd-border-secondary);
42
+ }
43
+
44
+ .colorTertiary {
45
+ border-block-start-color: var(--zd-border-tertiary);
46
+ border-inline-start-color: var(--zd-border-tertiary);
47
+ }
48
+
49
+ .colorBrand {
50
+ border-block-start-color: var(--zd-border-brand);
51
+ border-inline-start-color: var(--zd-border-brand);
52
+ }
@@ -0,0 +1 @@
1
+ export { dividerLine_cva as default } from "./dividerLine.cva";
@@ -0,0 +1,42 @@
1
+ import { cva } from '@dot-system/css-utility';
2
+ import { DUMMY_OBJECT } from '@zohodesk/utils/es/constantProps/constant';
3
+ import style from "./DividerLine.module.css";
4
+ import { LINE_STYLE_CLASS_MAP, COLOR_CLASS_MAP, DEFAULT_ORIENTATION, DEFAULT_LINE_STYLE, DEFAULT_COLOR } from "../constants";
5
+
6
+ const resolveClassVariants = classMap => Object.keys(classMap).reduce((acc, key) => {
7
+ acc[key] = style[classMap[key]];
8
+ return acc;
9
+ }, {});
10
+
11
+ const wrapperVariants = cva(style.wrapper, {
12
+ variants: {
13
+ orientation: {
14
+ horizontal: style.horizontal,
15
+ vertical: style.vertical
16
+ },
17
+ lineStyle: resolveClassVariants(LINE_STYLE_CLASS_MAP),
18
+ color: resolveClassVariants(COLOR_CLASS_MAP)
19
+ }
20
+ });
21
+ export function dividerLine_cva({
22
+ props
23
+ }) {
24
+ const {
25
+ orientation = DEFAULT_ORIENTATION,
26
+ lineStyle = DEFAULT_LINE_STYLE,
27
+ color = DEFAULT_COLOR,
28
+ customClass = DUMMY_OBJECT
29
+ } = props;
30
+ const {
31
+ wrapper: wrapperCustomClass = ''
32
+ } = customClass;
33
+ const wrapperClass = wrapperVariants({
34
+ orientation,
35
+ lineStyle,
36
+ color,
37
+ className: wrapperCustomClass
38
+ });
39
+ return {
40
+ wrapperClass
41
+ };
42
+ }
@@ -0,0 +1,11 @@
1
+ import { DEFAULT_ORIENTATION, DEFAULT_LINE_STYLE, DEFAULT_COLOR } from "../constants";
2
+ import { DUMMY_OBJECT } from '@zohodesk/utils/es/constantProps/constant';
3
+ const defaultProps = {
4
+ orientation: DEFAULT_ORIENTATION,
5
+ lineStyle: DEFAULT_LINE_STYLE,
6
+ color: DEFAULT_COLOR,
7
+ customClass: DUMMY_OBJECT,
8
+ customAttributes: DUMMY_OBJECT,
9
+ a11yAttributes: DUMMY_OBJECT
10
+ };
11
+ export default defaultProps;
@@ -0,0 +1,19 @@
1
+ import PropTypes from 'prop-types';
2
+ import { ORIENTATION, LINE_STYLE, COLOR } from "../constants";
3
+ const propTypes = {
4
+ customId: PropTypes.string,
5
+ testId: PropTypes.string,
6
+ orientation: PropTypes.oneOf(Object.values(ORIENTATION)),
7
+ lineStyle: PropTypes.oneOf(Object.values(LINE_STYLE)),
8
+ color: PropTypes.oneOf(Object.values(COLOR)),
9
+ customClass: PropTypes.shape({
10
+ wrapper: PropTypes.string
11
+ }),
12
+ customAttributes: PropTypes.shape({
13
+ wrapper: PropTypes.object
14
+ }),
15
+ a11yAttributes: PropTypes.shape({
16
+ wrapper: PropTypes.object
17
+ })
18
+ };
19
+ export default propTypes;
@@ -4,15 +4,15 @@
4
4
  }
5
5
 
6
6
  .container {
7
- position: absolute;
7
+ composes: d-absolute from global;
8
8
  }
9
9
 
10
10
  .fixedContainer {
11
- position: fixed;
11
+ composes: d-fixed from global;
12
12
  }
13
13
 
14
14
  .subContainer {
15
- position: relative;
15
+ composes: d-relative from global;
16
16
  border-radius: var(--dropbox_border_radius);
17
17
  padding: var(--dropbox_padding);
18
18
  box-shadow: var(--dropbox_box_shadow);
@@ -74,7 +74,7 @@
74
74
  }
75
75
 
76
76
  .default {
77
- width: 100% ;
77
+ composes: d-w-full from global;
78
78
  }
79
79
 
80
80
  /* shadow */
@@ -411,9 +411,8 @@
411
411
  }
412
412
 
413
413
  .responsive {
414
- position: absolute;
414
+ composes: d-absolute d-w-full from global;
415
415
  bottom: 0 ;
416
- width: 100% ;
417
416
  max-height: 90% ;
418
417
  }
419
418
 
@@ -426,6 +425,7 @@
426
425
  }
427
426
 
428
427
  .closeBar {
428
+ composes: d-cursor-pointer from global;
429
429
  /* Variable:Ignore */
430
430
  height: 6px;
431
431
  /*css:theme-validation:ignore*/
@@ -434,7 +434,6 @@
434
434
  margin-inline:auto ;
435
435
  border-radius: 5px;
436
436
  background-color: var(--dropbox_mob_close_bg_color);
437
- cursor: pointer;
438
437
  }
439
438
 
440
439
  .boxPadding {
@@ -15,7 +15,7 @@
15
15
 
16
16
  .activateInDelay {
17
17
  composes: modeForward from '../../common/animation.module.css';
18
- pointer-events: none;
18
+ composes: d-pointer-events-none from global;
19
19
  }
20
20
 
21
21
  [dir=ltr] .activateInDelay {
@@ -31,10 +31,10 @@
31
31
  }
32
32
 
33
33
  .freezeLayer {
34
- position: absolute;
35
34
  top: 0 ;
36
35
  bottom: 0 ;
37
36
  composes: activateInDelay;
37
+ composes: d-absolute from global;
38
38
  }
39
39
 
40
40
  [dir=ltr] .freezeLayer {
@@ -49,7 +49,7 @@
49
49
 
50
50
  .freeze {
51
51
  composes: varClass;
52
- background: var(--dropbox_mob_bg_color);
52
+ background-color: var(--dropbox_mob_bg_color);
53
53
  }
54
54
 
55
55
  @keyframes activateInDelay {
@@ -14,7 +14,7 @@
14
14
  .default {
15
15
  composes: dotted semibold from '../common/common.module.css';
16
16
  composes: varClass;
17
- position: relative;
17
+ composes: d-relative from global;
18
18
  font-size: var(--zd_font_size11) ;
19
19
  letter-spacing: 0.6px;
20
20
  text-transform: var(--dropdownheading_text_transform);
@@ -17,13 +17,11 @@
17
17
  .list {
18
18
  composes: varClass;
19
19
  composes: dflex alignVertical from '../common/common.module.css';
20
- position: relative;
20
+ composes: d-relative d-border-solid d-cursor-pointer from global;
21
21
  color: var(--zdt_dropdown_default_text);
22
22
  font-size: var(--zd_font_size13) ;
23
23
  padding: var(--dropdownitem-padding);
24
- border-style: solid;
25
24
  border-color: var(--dropdownitem-border-color);
26
- cursor: pointer;
27
25
  background-color: var(--dropdownitem-bg-color);
28
26
  }
29
27
  [dir=ltr] .list {
@@ -50,8 +48,8 @@
50
48
  }
51
49
 
52
50
  .children {
51
+ composes: d-inline-block from global;
53
52
  margin-inline-end: var(--zd_size10) ;
54
- display: inline-block;
55
53
  font-size: 0 ;
56
54
  }
57
55
 
@@ -61,11 +59,9 @@
61
59
 
62
60
  .user {
63
61
  composes: dflex alignVertical alignHorizontal from '../common/common.module.css';
64
- position: absolute;
62
+ composes: d-absolute d-invisible d-opacity-0 from global;
65
63
  top: 0 ;
66
64
  bottom: 0 ;
67
- opacity: 0;
68
- visibility: hidden;
69
65
  width: var(--dropdownitem-user-width);
70
66
  border-width: var(--dropdownitem-user-border-width);
71
67
  border-style: var(--dropdownitem-user-border-style);
@@ -1,14 +1,19 @@
1
1
  import React from 'react';
2
+ import DividerLine from "../DividerLine/DividerLine";
2
3
  import { DropDownSeparator_propTypes } from "./props/propTypes";
3
- import { cn } from "@dot-system/css-utility";
4
4
  import style from "./DropDownSeparator.module.css";
5
5
  export default class DropDownSeparator extends React.Component {
6
6
  render() {
7
- let {
7
+ const {
8
8
  customClass = ''
9
9
  } = this.props;
10
- return /*#__PURE__*/React.createElement("div", {
11
- className: cn(`${style.separator} ${customClass}`)
10
+ return /*#__PURE__*/React.createElement(DividerLine, {
11
+ orientation: "horizontal",
12
+ lineStyle: "solid",
13
+ color: "secondary",
14
+ customClass: {
15
+ wrapper: `${style.separator} ${customClass}`
16
+ }
12
17
  });
13
18
  }
14
19
 
@@ -1,8 +1,4 @@
1
1
  .separator {
2
- height: var(--zd_size1) ;
3
2
  margin-block: var(--zd_size5) ;
4
3
  margin-inline: 0 ;
5
- border-width: 0 0 1px 0;
6
- border-style: solid;
7
- border-color: var(--zdt_dropdown_user_default_border);
8
4
  }
@@ -8,4 +8,12 @@ describe('DropDownSeparator', () => {
8
8
  } = render( /*#__PURE__*/React.createElement(DropDownSeparator, null));
9
9
  expect(asFragment()).toMatchSnapshot();
10
10
  });
11
+ test('rendering the custom class', () => {
12
+ const {
13
+ asFragment
14
+ } = render( /*#__PURE__*/React.createElement(DropDownSeparator, {
15
+ customClass: "my-custom-class"
16
+ }));
17
+ expect(asFragment()).toMatchSnapshot();
18
+ });
11
19
  });
@@ -1,9 +1,19 @@
1
1
  // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
 
3
+ exports[`DropDownSeparator rendering the custom class 1`] = `
4
+ <DocumentFragment>
5
+ <hr
6
+ aria-orientation="horizontal"
7
+ class="wrapper horizontal solid colorSecondary separator my-custom-class"
8
+ />
9
+ </DocumentFragment>
10
+ `;
11
+
3
12
  exports[`DropDownSeparator rendering the defult props 1`] = `
4
13
  <DocumentFragment>
5
- <div
6
- class="separator"
14
+ <hr
15
+ aria-orientation="horizontal"
16
+ class="wrapper horizontal solid colorSecondary separator"
7
17
  />
8
18
  </DocumentFragment>
9
19
  `;
@@ -9,7 +9,7 @@
9
9
  /* css:lineheight-validation:ignore */
10
10
  .label {
11
11
  composes: varClass;
12
- vertical-align: middle;
12
+ composes: d-align-middle from global;
13
13
  line-height: var(--label_line_height);
14
14
  font-size: var(--label_font_size);
15
15
  color: var(--label_text_color);
@@ -40,10 +40,10 @@
40
40
  --label_cursor: default;
41
41
  }
42
42
  .title {
43
- display: block;
43
+ composes: d-block from global;
44
44
  }
45
45
  .subtitle {
46
- display: inline-block;
46
+ composes: d-inline-block from global;
47
47
  }
48
48
  .font_default {
49
49
  --label_font_weight: var(--zd-fw-normal);
@@ -28,7 +28,7 @@
28
28
  }
29
29
  .list {
30
30
  composes: varClass;
31
- position: relative;
31
+ composes: d-relative d-border-solid d-cursor-pointer from global;
32
32
  list-style: none;
33
33
  color: var(--listitem_text_color);
34
34
  font-size: var(--listitem_font_size);
@@ -37,9 +37,7 @@
37
37
  text-decoration: none;
38
38
  padding: var(--listitem_padding);
39
39
  border-width: var(--listitem_border_width);
40
- border-style: solid;
41
40
  border-color: var(--listitem_border_color);
42
- cursor: pointer;
43
41
  }
44
42
  .list, .default, .secondary {
45
43
  background-color: var(--listitem_bg_color);
@@ -93,9 +91,9 @@
93
91
  composes: dflex from '../common/common.module.css';
94
92
  }
95
93
  .iconBox {
94
+ composes: d-text-center from global;
96
95
  width: var(--zd_size20) ;
97
96
  margin-inline-end: var(--zd_size10) ;
98
- text-align: center;
99
97
  }
100
98
  .iconBox,
101
99
  .leftAvatar {
@@ -126,22 +124,21 @@
126
124
  composes: justifyFend from '../common/common.module.css';
127
125
  }
128
126
  .selfAlign_center{
129
- align-self: center;
127
+ composes: d-self-center from global;
130
128
  }
131
129
 
132
130
  .contentWrapper {
133
131
  composes: dflex flexrow from '../common/common.module.css';
134
- align-items: stretch;
135
- width: 100% ;
132
+ composes: d-items-stretch d-w-full from global;
136
133
  }
137
134
  .alignLhsBox_end {
138
- align-items: flex-end;
135
+ composes: d-items-end from global;
139
136
  }
140
137
  .alignLhsBox_center {
141
- align-items: center;
138
+ composes: d-items-center from global;
142
139
  }
143
140
  .lhsBoxInner{
144
- height: 100% ;
141
+ composes: d-h-full from global;
145
142
  max-height: calc((var(--listitem_font_size) * var(--listitem_multiline_lineheight)) * 2 );
146
143
  }
147
144
  .defaultHover, .primaryHover, .dangerHover, .secondaryHover, .darkHover {
@@ -225,7 +222,7 @@
225
222
  .tickIcon,
226
223
  .defaultTick,
227
224
  .darkTick {
228
- position: absolute;
225
+ composes: d-absolute from global;
229
226
  color: var(--listitem_tickicon_color);
230
227
  top:50% ;
231
228
  font-size: 0 ;
@@ -281,5 +278,5 @@
281
278
  }
282
279
 
283
280
  .titleBox {
284
- align-items: stretch;
281
+ composes: d-items-stretch from global;
285
282
  }
@@ -945,6 +945,7 @@ class AdvancedGroupMultiSelect extends React.Component {
945
945
  selectedOptions: formatSelectedOptions,
946
946
  highLightedSelectOptions: highLightedSelectOptions,
947
947
  isReadOnly: isReadOnly,
948
+ isDisabled: isDisabled,
948
949
  getRef: this.selectedOptionRef,
949
950
  onRemove: this.handleRemoveOption,
950
951
  onSelect: this.handleClickSelectedOption,
@@ -453,6 +453,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
453
453
  selectedOptions: selectedOptions,
454
454
  highLightedSelectOptions: highLightedSelectOptions,
455
455
  isReadOnly: isReadOnly,
456
+ isDisabled: isDisabled,
456
457
  getRef: this.selectedOptionRef,
457
458
  onRemove: this.handleRemoveOption,
458
459
  onSelect: this.handleClickSelectedOption,
@@ -13,5 +13,5 @@
13
13
  .buttonText{
14
14
  font-size: var(--zd_font_size15) ;
15
15
  composes: dotted from '../../common/common.module.css';
16
- padding: 0
16
+ composes: d-p-0 from global;
17
17
  }
@@ -1,8 +1,9 @@
1
1
  .wrapper {
2
- position: relative;
2
+ composes: d-relative from global;
3
3
  }
4
- .disabled, .readOnly {
5
- cursor: not-allowed;
4
+ .disabled,
5
+ .readOnly {
6
+ composes: d-cursor-not-allowed from global;
6
7
  }
7
8
  .container {
8
9
  max-height: var(--zd_size120) ;
@@ -51,10 +52,10 @@
51
52
  }
52
53
 
53
54
  .delete {
55
+ composes: d-cursor-pointer from global;
54
56
  padding-block: var(--zd_size2) ;
55
57
  padding-inline:var(--zd_size6) ;
56
58
  font: inherit;
57
- cursor: pointer;
58
59
  border: 0;
59
60
  background-color: var(--zdt_multiselect_delete_bg);
60
61
  }
@@ -83,7 +84,7 @@
83
84
  }
84
85
 
85
86
  .tag {
86
- max-width: 100% ;
87
+ composes: d-max-w-full from global;
87
88
  }
88
89
 
89
90
  .container.xmedium .tag {
@@ -96,10 +97,10 @@
96
97
  margin-inline:0 var(--zd_size10) ;
97
98
  }
98
99
  .responsiveParent{
99
- width: 100% ;
100
+ composes: d-w-full from global;
100
101
  }
101
102
  .box {
102
- background: var(--zdt_multiselect_box_bg);
103
+ background-color: var(--zdt_multiselect_box_bg);
103
104
  }
104
105
 
105
106
  .selectAll:hover {
@@ -137,21 +138,14 @@
137
138
  color: var(--zdt_multiselect_darkmsg_text);
138
139
  }
139
140
  .dark, .darkBox {
140
- background: var(--zdt_multiselect_darkmsg_bg);
141
+ background-color: var(--zdt_multiselect_darkmsg_bg);
141
142
  }
142
143
 
143
144
  .hide {
144
145
  composes: vishidden from '../common/common.module.css';
145
146
  }
146
147
  .custmSpan {
147
- display: inline-block;
148
- vertical-align: middle;
149
- opacity: 0;
150
- overflow: hidden;
151
- text-overflow: ellipsis;
152
- white-space: nowrap;
153
- max-width: 100% ;
154
- visibility: hidden;
148
+ composes: d-inline-block d-invisible d-max-w-full d-align-middle d-opacity-0 d-truncate from global;
155
149
  }
156
150
  .custmSpanMedium {
157
151
  height: var(--zd_size35) ;
@@ -160,9 +154,8 @@
160
154
  height: var(--zd_size28) ;
161
155
  }
162
156
  .custmInputWrapper {
163
- position: absolute;
157
+ composes: d-absolute d-w-full from global;
164
158
  top: 0 ;
165
- width: 100% ;
166
159
  }
167
160
  [dir=ltr] .custmInputWrapper {
168
161
  left: 0 ;
@@ -188,16 +181,16 @@
188
181
  }
189
182
 
190
183
  .more {
184
+ composes: d-cursor-pointer from global;
191
185
  font-size: var(--zd_font_size14) ;
192
186
  color: var(--zdt_multiselect_more_text);
193
187
  margin-block-start: var(--zd_size5) ;
194
188
  font-weight: var(--zd-fw-normal);
195
189
  margin-inline-end:var(--zd_size3) ;
196
- cursor: pointer;
197
190
  background-color: var(--zdt_multiselect_delete_bg);
198
191
  border: 0
199
192
  }
200
193
 
201
194
  .rightPlaceholder{
202
- height: 100% ;
195
+ composes: d-h-full from global;
203
196
  }
@@ -44,8 +44,8 @@ export default class SelectedOptions extends React.PureComponent {
44
44
  isDisabled
45
45
  } = option;
46
46
  const commonProps = {
47
- disabled: isDisabled,
48
- onRemove: isDisabled || isReadOnly ? null : onRemove,
47
+ disabled: isDisabled || isInputDisabled,
48
+ onRemove: isDisabled || isInputDisabled || isReadOnly ? null : onRemove,
49
49
  text: value,
50
50
  palette: isDarkPalette,
51
51
  onSelectTag: isReadOnly ? null : onSelect,
@@ -81,7 +81,7 @@ export default class SelectedOptions extends React.PureComponent {
81
81
  key: `${id}customTag`,
82
82
  dataId: dataId
83
83
  }, typeof renderCustomSelectedValue == 'function' ? renderCustomSelectedValue({
84
- onRemove: isDisabled || isReadOnly ? null : onRemove,
84
+ onRemove: isDisabled || isInputDisabled || isReadOnly ? null : onRemove,
85
85
  palette: isDarkPalette,
86
86
  onSelectTag: isReadOnly ? null : onSelect,
87
87
  getRef: getRef,
@@ -1,5 +1,5 @@
1
1
  .tag {
2
- max-width: 100% ;
2
+ composes: d-max-w-full from global;
3
3
  }
4
4
  .xmedium {
5
5
  margin-block: 0 var(--zd_size2) ;
@@ -2,6 +2,38 @@ import React from 'react';
2
2
  import { render } from '@testing-library/react';
3
3
  import AdvancedGroupMultiSelect from "../AdvancedGroupMultiSelect";
4
4
  describe('AdvancedGroupMultiSelect', () => {
5
+ const options = [{
6
+ id: 'Group1',
7
+ name: 'Group 1',
8
+ options: [{
9
+ id: 'group11',
10
+ value: 'Option 1'
11
+ }, {
12
+ id: 'group12',
13
+ value: 'Option 2'
14
+ }],
15
+ textField: 'value',
16
+ valueField: 'id'
17
+ }, {
18
+ id: 'Group2',
19
+ name: 'Group 2',
20
+ options: [{
21
+ id: 'group21',
22
+ value: 'Group2 Option 1'
23
+ }, {
24
+ id: 'group22',
25
+ value: 'Group2 Option 2'
26
+ }],
27
+ textField: 'value',
28
+ valueField: 'id'
29
+ }];
30
+ const selectedGroupOptions = [{
31
+ groupId: 'Group1',
32
+ id: 'group11'
33
+ }, {
34
+ groupId: 'Group2',
35
+ id: 'group22'
36
+ }];
5
37
  test('rendering the defult props', () => {
6
38
  const mockOnChange = jest.fn();
7
39
  const {
@@ -9,4 +41,14 @@ describe('AdvancedGroupMultiSelect', () => {
9
41
  } = render( /*#__PURE__*/React.createElement(AdvancedGroupMultiSelect, null));
10
42
  expect(asFragment()).toMatchSnapshot();
11
43
  });
44
+ test('Should render as disabled', () => {
45
+ const {
46
+ asFragment
47
+ } = render( /*#__PURE__*/React.createElement(AdvancedGroupMultiSelect, {
48
+ options: options,
49
+ selectedGroupOptions: selectedGroupOptions,
50
+ isDisabled: true
51
+ }));
52
+ expect(asFragment()).toMatchSnapshot();
53
+ });
12
54
  });
@@ -44,4 +44,14 @@ describe('AdvancedMultiSelect', () => {
44
44
  }));
45
45
  expect(asFragment()).toMatchSnapshot();
46
46
  });
47
+ test('Should render as disabled', () => {
48
+ const {
49
+ asFragment
50
+ } = render( /*#__PURE__*/React.createElement(AdvancedMultiSelect, {
51
+ options: options,
52
+ selectedOptions: ['Apple'],
53
+ isDisabled: true
54
+ }));
55
+ expect(asFragment()).toMatchSnapshot();
56
+ });
47
57
  });
@@ -71,4 +71,14 @@ describe('MultiSelect', () => {
71
71
  }));
72
72
  expect(asFragment()).toMatchSnapshot();
73
73
  });
74
+ test('Should render as disabled', () => {
75
+ const {
76
+ asFragment
77
+ } = render( /*#__PURE__*/React.createElement(MultiSelect, {
78
+ options: options,
79
+ selectedOptions: testSelectedData,
80
+ isDisabled: true
81
+ }));
82
+ expect(asFragment()).toMatchSnapshot();
83
+ });
74
84
  });