@zohodesk/components 1.0.0-temp-259.5 → 1.0.0-temp-261

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 (158) hide show
  1. package/CHANGELOG.md +24 -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 +3 -5
  7. package/es/DateTime/DateTime.module.css +13 -20
  8. package/es/DateTime/DateWidget.js +1 -1
  9. package/es/DateTime/DateWidget.module.css +10 -5
  10. package/es/DateTime/YearView.module.css +6 -9
  11. package/es/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +1 -1
  12. package/es/DividerLine/DividerLine.js +40 -0
  13. package/es/DividerLine/__tests__/DividerLine.spec.js +81 -0
  14. package/es/DividerLine/__tests__/__snapshots__/DividerLine.spec.js.snap +131 -0
  15. package/es/DividerLine/constants/index.js +29 -0
  16. package/es/DividerLine/css/DividerLine.module.css +52 -0
  17. package/es/DividerLine/css/cssJSLogic.js +1 -0
  18. package/es/DividerLine/css/dividerLine.cva.js +42 -0
  19. package/es/DividerLine/props/defaultProps.js +11 -0
  20. package/es/DividerLine/props/propTypes.js +19 -0
  21. package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +6 -7
  22. package/es/DropBox/css/DropBox.module.css +3 -3
  23. package/es/DropDown/DropDownHeading.module.css +1 -1
  24. package/es/DropDown/DropDownItem.module.css +3 -7
  25. package/es/DropDown/DropDownSeparator.js +9 -4
  26. package/es/DropDown/DropDownSeparator.module.css +0 -4
  27. package/es/DropDown/__tests__/DropDownSeparator.spec.js +8 -0
  28. package/es/DropDown/__tests__/__snapshots__/DropDownSeparator.spec.js.snap +12 -2
  29. package/es/Label/Label.module.css +3 -3
  30. package/es/ListItem/ListItem.module.css +9 -12
  31. package/es/MultiSelect/AdvancedGroupMultiSelect.js +1 -0
  32. package/es/MultiSelect/AdvancedMultiSelect.js +1 -0
  33. package/es/MultiSelect/MobileHeader/MobileHeader.module.css +1 -1
  34. package/es/MultiSelect/MultiSelect.module.css +13 -20
  35. package/es/MultiSelect/SelectedOptions.js +3 -3
  36. package/es/MultiSelect/SelectedOptions.module.css +1 -1
  37. package/es/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +42 -0
  38. package/es/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +10 -0
  39. package/es/MultiSelect/__tests__/MultiSelect.spec.js +10 -0
  40. package/es/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +121 -0
  41. package/es/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +97 -0
  42. package/es/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +157 -0
  43. package/es/PopOver/PopOver.module.css +2 -2
  44. package/es/Radio/Radio.module.css +7 -7
  45. package/es/Ribbon/Ribbon.module.css +12 -19
  46. package/es/RippleEffect/RippleEffect.module.css +2 -2
  47. package/es/Select/Select.module.css +4 -4
  48. package/es/Select/SelectWithAvatar.js +14 -3
  49. package/es/Select/SelectWithIcon.js +23 -1
  50. package/es/Select/__tests__/SelectWithAvatar.spec.js +17 -0
  51. package/es/Select/__tests__/SelectWithIcon.spec.js +18 -0
  52. package/es/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +47 -0
  53. package/es/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +19 -0
  54. package/es/Select/props/propTypes.js +1 -0
  55. package/es/Switch/Switch.module.css +4 -7
  56. package/es/Tab/Tab.module.css +5 -7
  57. package/es/Tab/TabContent.module.css +1 -1
  58. package/es/Tab/Tabs.module.css +8 -9
  59. package/es/Tag/Tag.module.css +4 -7
  60. package/es/TextBoxIcon/TextBoxIcon.module.css +1 -1
  61. package/es/Textarea/Textarea.module.css +3 -4
  62. package/es/Tooltip/Tooltip.js +4 -1
  63. package/es/Tooltip/Tooltip.module.css +3 -6
  64. package/es/Typography/__tests__/Typography.spec.js +1 -1
  65. package/es/Typography/__tests__/__snapshots__/Typography.spec.js.snap +40 -0
  66. package/es/Typography/css/Typography.module.css +30 -30
  67. package/es/Typography/props/propTypes.js +1 -1
  68. package/es/common/animation.module.css +8 -8
  69. package/es/common/basic.module.css +5 -5
  70. package/es/common/common.module.css +81 -153
  71. package/es/common/transition.module.css +2 -0
  72. package/es/semantic/Button/semanticButton.module.css +1 -4
  73. package/es/shared/InputFieldLine/InputFieldLine.module.css +1 -1
  74. package/es/v1/Button/__tests__/__snapshots__/Button.spec.js.snap +1 -1
  75. package/es/v1/Button/css/Button_v1.module.css +2 -2
  76. package/es/v1/Label/css/Label_v1.module.css +1 -1
  77. package/es/v1/Switch/css/Switch_v1.module.css +4 -7
  78. package/es/v1/shared/Spinner/Spinner_v1.module.css +3 -5
  79. package/es/v1/shared/SuccessTick/SuccessTick_v1.module.css +1 -2
  80. package/lib/Avatar/Avatar.module.css +5 -11
  81. package/lib/AvatarTeam/AvatarTeam.module.css +1 -3
  82. package/lib/Button/css/Button.module.css +7 -9
  83. package/lib/Card/Card.module.css +2 -2
  84. package/lib/CheckBox/CheckBox.module.css +3 -5
  85. package/lib/DateTime/DateTime.module.css +13 -20
  86. package/lib/DateTime/DateWidget.js +1 -1
  87. package/lib/DateTime/DateWidget.module.css +10 -5
  88. package/lib/DateTime/YearView.module.css +6 -9
  89. package/lib/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +1 -1
  90. package/lib/DividerLine/DividerLine.js +50 -0
  91. package/lib/DividerLine/__tests__/DividerLine.spec.js +88 -0
  92. package/lib/DividerLine/__tests__/__snapshots__/DividerLine.spec.js.snap +131 -0
  93. package/lib/DividerLine/constants/index.js +39 -0
  94. package/lib/DividerLine/css/DividerLine.module.css +52 -0
  95. package/lib/DividerLine/css/cssJSLogic.js +13 -0
  96. package/lib/DividerLine/css/dividerLine.cva.js +57 -0
  97. package/lib/DividerLine/props/defaultProps.js +21 -0
  98. package/lib/DividerLine/props/propTypes.js +31 -0
  99. package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +6 -7
  100. package/lib/DropBox/css/DropBox.module.css +3 -3
  101. package/lib/DropDown/DropDownHeading.module.css +1 -1
  102. package/lib/DropDown/DropDownItem.module.css +3 -7
  103. package/lib/DropDown/DropDownSeparator.js +9 -4
  104. package/lib/DropDown/DropDownSeparator.module.css +0 -4
  105. package/lib/DropDown/__tests__/DropDownSeparator.spec.js +8 -0
  106. package/lib/DropDown/__tests__/__snapshots__/DropDownSeparator.spec.js.snap +12 -2
  107. package/lib/Label/Label.module.css +3 -3
  108. package/lib/ListItem/ListItem.module.css +9 -12
  109. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +1 -0
  110. package/lib/MultiSelect/AdvancedMultiSelect.js +1 -0
  111. package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +1 -1
  112. package/lib/MultiSelect/MultiSelect.module.css +13 -20
  113. package/lib/MultiSelect/SelectedOptions.js +3 -3
  114. package/lib/MultiSelect/SelectedOptions.module.css +1 -1
  115. package/lib/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +42 -0
  116. package/lib/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +10 -0
  117. package/lib/MultiSelect/__tests__/MultiSelect.spec.js +10 -0
  118. package/lib/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +121 -0
  119. package/lib/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +97 -0
  120. package/lib/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +157 -0
  121. package/lib/PopOver/PopOver.module.css +2 -2
  122. package/lib/Radio/Radio.module.css +7 -7
  123. package/lib/Ribbon/Ribbon.module.css +12 -19
  124. package/lib/RippleEffect/RippleEffect.module.css +2 -2
  125. package/lib/Select/Select.module.css +4 -4
  126. package/lib/Select/SelectWithAvatar.js +15 -3
  127. package/lib/Select/SelectWithIcon.js +26 -1
  128. package/lib/Select/__tests__/SelectWithAvatar.spec.js +20 -0
  129. package/lib/Select/__tests__/SelectWithIcon.spec.js +21 -0
  130. package/lib/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +47 -0
  131. package/lib/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +19 -0
  132. package/lib/Select/props/propTypes.js +1 -0
  133. package/lib/Switch/Switch.module.css +4 -7
  134. package/lib/Tab/Tab.module.css +5 -7
  135. package/lib/Tab/TabContent.module.css +1 -1
  136. package/lib/Tab/Tabs.module.css +8 -9
  137. package/lib/Tag/Tag.module.css +4 -7
  138. package/lib/TextBoxIcon/TextBoxIcon.module.css +1 -1
  139. package/lib/Textarea/Textarea.module.css +3 -4
  140. package/lib/Tooltip/Tooltip.js +6 -1
  141. package/lib/Tooltip/Tooltip.module.css +3 -6
  142. package/lib/Typography/__tests__/Typography.spec.js +1 -1
  143. package/lib/Typography/__tests__/__snapshots__/Typography.spec.js.snap +40 -0
  144. package/lib/Typography/css/Typography.module.css +30 -30
  145. package/lib/Typography/props/propTypes.js +1 -1
  146. package/lib/common/animation.module.css +8 -8
  147. package/lib/common/basic.module.css +5 -5
  148. package/lib/common/common.module.css +81 -153
  149. package/lib/common/transition.module.css +2 -0
  150. package/lib/semantic/Button/semanticButton.module.css +1 -4
  151. package/lib/shared/InputFieldLine/InputFieldLine.module.css +1 -1
  152. package/lib/v1/Button/__tests__/__snapshots__/Button.spec.js.snap +1 -1
  153. package/lib/v1/Button/css/Button_v1.module.css +2 -2
  154. package/lib/v1/Label/css/Label_v1.module.css +1 -1
  155. package/lib/v1/Switch/css/Switch_v1.module.css +4 -7
  156. package/lib/v1/shared/Spinner/Spinner_v1.module.css +3 -5
  157. package/lib/v1/shared/SuccessTick/SuccessTick_v1.module.css +1 -2
  158. package/package.json +14 -13
@@ -20,6 +20,7 @@ import Loader from '@zohodesk/svg/lib/Loader/Loader';
20
20
 
21
21
  import { scrollTo, findScrollEnd, getSearchString } from "../utils/Common.js";
22
22
  import { isObjectContainsSearchString } from "../utils/dropDownUtils.js";
23
+ import { isRenderable, renderNode } from '@zohodesk/utils';
23
24
  /**** CSS ****/
24
25
 
25
26
  import { cn } from "@dot-system/css-utility";
@@ -351,6 +352,7 @@ class SelectWithIcon extends Component {
351
352
  dropBoxSize,
352
353
  emptyMessage,
353
354
  renderCustomEmptyState,
355
+ renderCustomSelectedValue,
354
356
  needIcon,
355
357
  iconName,
356
358
  iconSize,
@@ -396,7 +398,27 @@ class SelectWithIcon extends Component {
396
398
  ref: getTargetRef,
397
399
  "data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : dataId}`,
398
400
  "data-test-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : dataId}`
399
- }, /*#__PURE__*/React.createElement(Container, {
401
+ }, isRenderable(renderCustomSelectedValue) ? renderNode(renderCustomSelectedValue, {
402
+ iconName,
403
+ iconSize,
404
+ iconClass,
405
+ needIcon,
406
+ isDisabled,
407
+ isReadOnly,
408
+ isPopupOpen,
409
+ isActive: isPopupReady,
410
+ size,
411
+ option: this.props.options.find(option => option[idKey] === selectedId) || DUMMY_OBJECT,
412
+ selectedId,
413
+ selectedValue,
414
+ placeHolder,
415
+ htmlId,
416
+ maxLength,
417
+ dataId,
418
+ getRef: this.inputRef,
419
+ onKeyDown: this.handleKeyDown,
420
+ ariaControlsId: setAriaId
421
+ }) : /*#__PURE__*/React.createElement(Container, {
400
422
  alignBox: "row"
401
423
  }, needIcon ? /*#__PURE__*/React.createElement(Container, {
402
424
  align: "both",
@@ -9,4 +9,21 @@ describe('SelectWithAvatar', () => {
9
9
  } = render( /*#__PURE__*/React.createElement(SelectWithAvatar, null));
10
10
  expect(asFragment()).toMatchSnapshot();
11
11
  });
12
+ test('Should render with renderCustomSelectedValue', () => {
13
+ const options = [{
14
+ id: '1',
15
+ text: 'Option 1'
16
+ }, {
17
+ id: '2',
18
+ text: 'Option 2'
19
+ }];
20
+ const {
21
+ asFragment
22
+ } = render( /*#__PURE__*/React.createElement(SelectWithAvatar, {
23
+ options: options,
24
+ selectedValue: "1",
25
+ renderCustomSelectedValue: tagProps => /*#__PURE__*/React.createElement("div", null, tagProps.text, " - Custom Tag")
26
+ }));
27
+ expect(asFragment()).toMatchSnapshot();
28
+ });
12
29
  });
@@ -11,4 +11,22 @@ describe('SelectWithIcon', () => {
11
11
  }));
12
12
  expect(asFragment()).toMatchSnapshot();
13
13
  });
14
+ test('Should render with renderCustomSelectedValue', () => {
15
+ const options = [{
16
+ id: '1',
17
+ value: 'Option 1'
18
+ }, {
19
+ id: '2',
20
+ value: 'Option 2'
21
+ }];
22
+ const {
23
+ asFragment
24
+ } = render( /*#__PURE__*/React.createElement(SelectWithIcon, {
25
+ options: options,
26
+ selectedId: "1",
27
+ selectedValue: "Option 1",
28
+ renderCustomSelectedValue: valueProps => /*#__PURE__*/React.createElement("div", null, valueProps.selectedValue, " - Custom Value")
29
+ }));
30
+ expect(asFragment()).toMatchSnapshot();
31
+ });
14
32
  });
@@ -1,5 +1,52 @@
1
1
  // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
 
3
+ exports[`SelectWithAvatar Should render with renderCustomSelectedValue 1`] = `
4
+ <DocumentFragment>
5
+ <div
6
+ class="wrapper effect"
7
+ data-id="selectWithAvatar"
8
+ data-selector-id="selectWithAvatar"
9
+ data-test-id="selectWithAvatar"
10
+ >
11
+ <div
12
+ class="d-flex d-h-full d-w-full d-flex-row d-items-center container medium borderColor_default hasBorder"
13
+ data-id="containerComponent"
14
+ data-selector-id="container"
15
+ data-test-id="containerComponent"
16
+ >
17
+ <div>
18
+ Option 1 - Custom Tag
19
+ </div>
20
+ <div
21
+ class="d-min-h-0 d-min-w-0 d-flex-grow d-basis-0 d-flex-shrink-0"
22
+ data-id="selectWithAvatar_textBox"
23
+ data-selector-id="box"
24
+ data-test-id="selectWithAvatar_textBox"
25
+ >
26
+ <input
27
+ aria-activedescendant="1"
28
+ aria-controls="1"
29
+ aria-expanded="false"
30
+ aria-haspopup="true"
31
+ aria-owns="1"
32
+ aria-readonly="true"
33
+ autocomplete="off"
34
+ class="pointer container medium default effect borderColor_default"
35
+ data-id="textBox"
36
+ data-selector-id="textBox"
37
+ data-test-id="textBox"
38
+ placeholder=""
39
+ readonly=""
40
+ role="combobox"
41
+ type="text"
42
+ value=""
43
+ />
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </DocumentFragment>
48
+ `;
49
+
3
50
  exports[`SelectWithAvatar rendering the defult props 1`] = `
4
51
  <DocumentFragment>
5
52
  <div
@@ -1,5 +1,24 @@
1
1
  // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
 
3
+ exports[`SelectWithIcon Should render with renderCustomSelectedValue 1`] = `
4
+ <DocumentFragment>
5
+ <div
6
+ class="container box_medium"
7
+ data-selector-id="selectWithIcon"
8
+ >
9
+ <div
10
+ class=""
11
+ data-id="selectWithIcon"
12
+ data-test-id="selectWithIcon"
13
+ >
14
+ <div>
15
+ Option 1 - Custom Value
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </DocumentFragment>
20
+ `;
21
+
3
22
  exports[`SelectWithIcon rendering the defult props 1`] = `
4
23
  <DocumentFragment>
5
24
  <div
@@ -329,6 +329,7 @@ export const SelectWithIcon_propTypes = {
329
329
  boxSize: PropTypes.string,
330
330
  emptyMessage: PropTypes.string,
331
331
  renderCustomEmptyState: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
332
+ renderCustomSelectedValue: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
332
333
  isAbsolutePositioningNeeded: PropTypes.bool,
333
334
  isRestrictScroll: PropTypes.bool,
334
335
  positionsOffset: PropTypes.object,
@@ -11,7 +11,7 @@
11
11
 
12
12
  .container {
13
13
  composes: varClass;
14
- vertical-align: middle;
14
+ composes: d-align-middle from global;
15
15
  }
16
16
 
17
17
  .disabled {
@@ -23,12 +23,10 @@
23
23
  }
24
24
 
25
25
  .label {
26
- display: inline-block;
27
- position: relative;
26
+ composes: d-inline-block d-relative d-cursor-pointer from global;
28
27
  transition: box-shadow var(--zd_transition3) ease-in-out;
29
28
  background-color: var(--switch_off_bg_color);
30
29
  border-radius: 20px;
31
- cursor: pointer;
32
30
  }
33
31
 
34
32
  .effect:hover .label
@@ -57,7 +55,7 @@
57
55
  }
58
56
 
59
57
  .input {
60
- display: none;
58
+ composes: d-hidden from global;
61
59
  }
62
60
 
63
61
  .small {
@@ -99,9 +97,8 @@
99
97
  }
100
98
 
101
99
  .switch {
102
- display: inline-block;
103
100
  composes: offSelection from '../common/common.module.css';
104
- vertical-align: middle;
101
+ composes: d-inline-block d-align-middle from global;
105
102
  }
106
103
 
107
104
  .switch_small {
@@ -1,15 +1,13 @@
1
1
  .tab {
2
- text-transform: uppercase;
2
+ composes: d-uppercase d-cursor-pointer from global;
3
3
  letter-spacing: 0.6px;
4
4
  text-decoration: none;
5
- cursor: pointer;
6
5
  }
7
6
  .vertical {
8
- height: 100% ;
7
+ composes: d-h-full from global;
9
8
  }
10
9
  .horizontal {
11
- width: 100% ;
12
- max-width: 100% ;
10
+ composes: d-w-full d-max-w-full from global;
13
11
  }
14
12
  .textContainer,
15
13
  .tabText {
@@ -19,7 +17,7 @@
19
17
  composes: dotted from '../common/common.module.css';
20
18
  }
21
19
  .disabled {
22
- cursor: not-allowed;
20
+ composes: d-cursor-not-allowed from global;
23
21
  }
24
22
  .border {
25
23
  border-bottom: 1px solid var(--zdt_tab_default_border);
@@ -55,12 +53,12 @@
55
53
  border-color: var(--zdt_tab_delta_active_border);
56
54
  }
57
55
  .beta {
56
+ composes: d-capitalize from global;
58
57
  padding-inline: var(--zd_size4) ;
59
58
  padding-block:0 ;
60
59
  font-size: var(--zd_font_size14) ;
61
60
  line-height: 4.2857;
62
61
  margin-inline-end: var(--zd_size40) ;
63
- text-transform: capitalize;
64
62
  }
65
63
  .tabBeta {
66
64
  composes: beta;
@@ -1,4 +1,4 @@
1
1
  /* $Id$ */
2
2
  .container {
3
- position: relative;
3
+ composes: d-relative from global;
4
4
  }
@@ -1,5 +1,5 @@
1
1
  .tab {
2
- position: relative;
2
+ composes: d-relative from global;
3
3
  z-index: 1;
4
4
  --tab_position_gap: 22px;
5
5
  }
@@ -14,9 +14,9 @@
14
14
  }
15
15
 
16
16
  .alpha_border {
17
+ composes: d-border-solid from global;
17
18
  border-width: 0 0 1px 0;
18
19
  border-color: var(--zdt_tabs_alpha_border);
19
- border-style: solid;
20
20
  }
21
21
 
22
22
  .alpha::after {
@@ -45,7 +45,7 @@
45
45
  width: 100% ;
46
46
  height: 100% ;
47
47
  top: 0 ;
48
- background: inherit;
48
+ background-color: inherit;
49
49
  }
50
50
 
51
51
  [dir=ltr] .alpha:before {
@@ -87,11 +87,11 @@
87
87
  }
88
88
 
89
89
  .maxWidth {
90
- max-width: 100% ;
90
+ composes: d-max-w-full from global;
91
91
  }
92
92
 
93
93
  .highlight {
94
- position: absolute;
94
+ composes: d-absolute from global;
95
95
  bottom: 0 ;
96
96
  border-bottom: 1px solid var(--zdt_tabs_highlight_border);
97
97
  }
@@ -101,8 +101,7 @@
101
101
  }
102
102
 
103
103
  .menu {
104
- position: relative;
105
- cursor: pointer;
104
+ composes: d-relative d-cursor-pointer from global;
106
105
  }
107
106
 
108
107
  .menuBox {
@@ -121,7 +120,7 @@
121
120
  }
122
121
 
123
122
  .hidden {
124
- visibility: hidden;
123
+ composes: d-invisible from global;
125
124
  }
126
125
 
127
126
  .search {
@@ -134,11 +133,11 @@
134
133
  }
135
134
 
136
135
  .emptyStateTitle {
136
+ composes: d-text-center from global;
137
137
  font-weight: var(--zd-fw-semibold);
138
138
  word-wrap: break-word;
139
139
  font-size: var(--zd_font_size16) ;
140
140
  max-width: var(--zd_size430) ;
141
- text-align: center;
142
141
  }
143
142
 
144
143
  [dir=ltr] .emptyStateTitle {
@@ -32,13 +32,11 @@
32
32
  .container {
33
33
  composes: varClass;
34
34
  composes: dInflex alignVertical flexrow from '../common/common.module.css';
35
- position: relative;
36
- vertical-align: middle;
35
+ composes: d-relative d-max-w-full d-align-middle from global;
37
36
  color: var(--tag_text_color);
38
37
  font-size: var(--tag_font_size);
39
38
  letter-spacing: var(--tag_letter_spacing);
40
39
  height: var(--tag_height);
41
- max-width: 100% ;
42
40
  background-color: var(--tag_bg_color);
43
41
  border-radius: var(--tag_border_radius);
44
42
  border-width: var(--tag_border_width);
@@ -48,7 +46,7 @@
48
46
  cursor: var(--tag_cursor);
49
47
  }
50
48
  .disabled {
51
- pointer-events: none;
49
+ composes: d-pointer-events-none from global;
52
50
  --tag_text_color: var(--zdt_tag_disabled_text);
53
51
  }
54
52
  .readonly,
@@ -123,15 +121,14 @@
123
121
  display: block;
124
122
  }
125
123
  .close {
124
+ composes: d-hidden d-absolute from global;
126
125
  color: var(--tag_closeicon_color);
127
- display: none;
128
- position: absolute;
129
126
  top: 0 ;
130
127
  bottom: 0 ;
131
128
  padding: var(--tag_closeicon_padding);
132
129
  cursor: var(--tag_closeicon_cursor);
133
130
  border-radius: var(--tag_closeicon_border_radius);
134
- background: var(--tag_closeicon_bg_color);
131
+ background-color: var(--tag_closeicon_bg_color);
135
132
  }
136
133
  [dir=ltr] .close {
137
134
  right: 0 ;
@@ -6,7 +6,7 @@
6
6
  }
7
7
  .container {
8
8
  composes: varClass;
9
- position: relative;
9
+ composes: d-relative from global;
10
10
  }
11
11
  .disabled,.readonly {
12
12
  --textboxicon_icon_cursor: not-allowed;
@@ -15,10 +15,10 @@
15
15
  }
16
16
  .basic {
17
17
  composes: varClass;
18
+ composes: d-outline-0 from global;
18
19
  -webkit-appearance: none;
19
20
  -moz-appearance: none;
20
21
  appearance: none;
21
- outline: 0;
22
22
  letter-spacing: 0.1px;
23
23
  color: var(--textarea_text_color);
24
24
  cursor: var(--textarea_cursor);
@@ -60,19 +60,18 @@
60
60
  /* css:lineheight-validation:ignore */
61
61
  .container {
62
62
  composes: basic;
63
+ composes: d-max-w-full d-border-solid from global;
63
64
  transition: border var(--zd_transition2) linear 0s,
64
65
  height var(--zd_transition2) linear 0s;
65
66
  -moz-transition: border var(--zd_transition2) linear 0s,
66
67
  height var(--zd_transition2) linear 0s;
67
68
  width: var(--textarea_width);
68
- max-width: 100% ;
69
69
  min-width: var(--zd_size100) ;
70
70
  font-size: var(--textarea_font_size);
71
71
  line-height: var(--textarea_line_height);
72
72
  height: var(--textarea_height);
73
73
  -webkit-transition: border var(--zd_transition2) linear 0s,
74
74
  height var(--zd_transition2) linear 0s;
75
- border-style: solid;
76
75
  background-color: var(--zdt_textarea_default_bg);
77
76
  border-color: var(--textarea_border_color);
78
77
  padding: var(--textarea_padding);
@@ -101,7 +100,7 @@
101
100
  }
102
101
  .xsmall,
103
102
  .xmedium {
104
- vertical-align: middle;
103
+ composes: d-align-middle from global;
105
104
  }
106
105
  .xsmall {
107
106
  --textarea_font_size: var(--zd_font_size14);
@@ -136,7 +136,10 @@ export default class Tooltip extends React.Component {
136
136
  handleOver(e, targetElement) {
137
137
  let containerElement = this.tooltipContainerEl;
138
138
  let element = e.target;
139
- let titleDiv = element.hasAttribute('data-title') || element.hasAttribute('title') ? element : element.closest('[data-title]') || element.closest('[title]');
139
+
140
+ let hasTitleValue = el => el.hasAttribute('data-title') && el.getAttribute('data-title') !== '' || el.hasAttribute('title') && el.getAttribute('title') !== '';
141
+
142
+ let titleDiv = hasTitleValue(element) ? element : element.closest('[data-title]:not([data-title=""])') || element.closest('[title]:not([title=""])');
140
143
 
141
144
  if (titleDiv) {
142
145
  let title = titleDiv.getAttribute('data-title') || titleDiv.getAttribute('title');
@@ -1,8 +1,7 @@
1
1
  .tooltiptext {
2
- position: fixed;
2
+ composes: d-fixed d-pointer-events-none from global;
3
3
  z-index: 9999999;
4
4
  /*Hook for editor alert*/
5
- pointer-events: none;
6
5
  box-shadow: 0 4px 12px 0 var(--zdt_tooltip_default_box_shadow);
7
6
  border-radius: 4px;
8
7
  }[dir=ltr] .tooltiptext {
@@ -12,6 +11,7 @@
12
11
  }
13
12
 
14
13
  .tooltipcont {
14
+ composes: d-overflow-hidden d-border-transparent d-border-solid from global;
15
15
  color: var(--zdt_tooltip_default_text);
16
16
  padding-block:0 ;
17
17
  padding-inline: var(--zd_size10) ;
@@ -21,15 +21,12 @@
21
21
  max-width: var(--zd_size420) ;
22
22
  line-height: 1.5385;
23
23
  min-height: var(--zd_size24) ;
24
- overflow: hidden;
25
24
  background-color: var(--zdt_tooltip_default_bg);
26
- border-style: solid;
27
- border-color: transparent;
28
25
  border-radius: 4px;
29
26
  }
30
27
  .tooltiparrow {
31
28
  content: '';
32
- position: absolute;
29
+ composes: d-absolute from global;
33
30
  top: 0 ;
34
31
  border-top-left-radius: 3px;
35
32
  }
@@ -9,7 +9,7 @@ describe('Typography', () => {
9
9
  const ui_display = ['block', 'inlineBlock', 'inline', 'initial'];
10
10
  const ui_weight = ['regular', 'light', 'semibold', 'bold'];
11
11
  const ui_typeFace = ['normal', 'italic'];
12
- const ui_textAlign = ['left', 'center', 'right', 'justify'];
12
+ const ui_textAlign = ['left', 'center', 'right', 'justify', 'start', 'end'];
13
13
  const ui_letterSpacing = ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '2', 'inherit'];
14
14
  const ui_transform = ['default', 'upper', 'lower', 'capital'];
15
15
  const ui_decoration = ['default', 'underline', 'strike', 'overline'];
@@ -880,6 +880,16 @@ exports[`Typography Should render textAlign - center 1`] = `
880
880
  </DocumentFragment>
881
881
  `;
882
882
 
883
+ exports[`Typography Should render textAlign - end 1`] = `
884
+ <DocumentFragment>
885
+ <div
886
+ class="textalign_end"
887
+ >
888
+ Heading
889
+ </div>
890
+ </DocumentFragment>
891
+ `;
892
+
883
893
  exports[`Typography Should render textAlign - justify 1`] = `
884
894
  <DocumentFragment>
885
895
  <div
@@ -910,6 +920,16 @@ exports[`Typography Should render textAlign - right 1`] = `
910
920
  </DocumentFragment>
911
921
  `;
912
922
 
923
+ exports[`Typography Should render textAlign - start 1`] = `
924
+ <DocumentFragment>
925
+ <div
926
+ class="textalign_start"
927
+ >
928
+ Heading
929
+ </div>
930
+ </DocumentFragment>
931
+ `;
932
+
913
933
  exports[`Typography Should render transform - capital 1`] = `
914
934
  <DocumentFragment>
915
935
  <div
@@ -1850,6 +1870,16 @@ exports[`Typography Should render ui_textAlign - center 1`] = `
1850
1870
  </DocumentFragment>
1851
1871
  `;
1852
1872
 
1873
+ exports[`Typography Should render ui_textAlign - end 1`] = `
1874
+ <DocumentFragment>
1875
+ <div
1876
+ class="textalign_end"
1877
+ >
1878
+ Heading
1879
+ </div>
1880
+ </DocumentFragment>
1881
+ `;
1882
+
1853
1883
  exports[`Typography Should render ui_textAlign - justify 1`] = `
1854
1884
  <DocumentFragment>
1855
1885
  <div
@@ -1880,6 +1910,16 @@ exports[`Typography Should render ui_textAlign - right 1`] = `
1880
1910
  </DocumentFragment>
1881
1911
  `;
1882
1912
 
1913
+ exports[`Typography Should render ui_textAlign - start 1`] = `
1914
+ <DocumentFragment>
1915
+ <div
1916
+ class="textalign_start"
1917
+ >
1918
+ Heading
1919
+ </div>
1920
+ </DocumentFragment>
1921
+ `;
1922
+
1883
1923
  exports[`Typography Should render ui_transform - capital 1`] = `
1884
1924
  <DocumentFragment>
1885
1925
  <div